Skip to content

Commit

Permalink
Remove deprecated features (#1088)
Browse files Browse the repository at this point in the history
* Remove deprecated features

* update

* update
  • Loading branch information
illiakovalenko authored Jul 5, 2022
1 parent 33ad6fe commit 85dc89a
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 56 deletions.
2 changes: 0 additions & 2 deletions packages/sitecore-jss-angular/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export {
export { constants, HttpDataFetcher, HttpResponse, enableDebug } from '@sitecore-jss/sitecore-jss';
export {
isServer,
isExperienceEditorActive,
resetExperienceEditorChromes,
isEditorActive,
resetEditorChromes,
handleEditorAnchors,
Expand Down
11 changes: 2 additions & 9 deletions packages/sitecore-jss-nextjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ export {
NativeDataFetcherConfig,
enableDebug,
} from '@sitecore-jss/sitecore-jss';
export {
isEditorActive,
resetEditorChromes,
isExperienceEditorActive,
resetExperienceEditorChromes,
resolveUrl,
} from '@sitecore-jss/sitecore-jss/utils';
export { isEditorActive, resetEditorChromes, resolveUrl } from '@sitecore-jss/sitecore-jss/utils';
export {
LayoutService,
LayoutServiceData,
Expand Down Expand Up @@ -100,7 +94,7 @@ export {
useComponentProps,
} from './components/ComponentPropsContext';

export { handleEditorFastRefresh, handleExperienceEditorFastRefresh, getPublicUrl } from './utils';
export { handleEditorFastRefresh, getPublicUrl } from './utils';

export { EditingData, EditingPreviewData, isEditingData } from './sharedTypes/editing-data';
export {
Expand Down Expand Up @@ -137,7 +131,6 @@ export {
withSitecoreContext,
useSitecoreContext,
withEditorChromes,
withExperienceEditorChromes,
withPlaceholder,
withDatasourceCheck,
ImageSizeParameters,
Expand Down
10 changes: 0 additions & 10 deletions packages/sitecore-jss-nextjs/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ export const handleEditorFastRefresh = (forceReload = false): void => {
};
};

/**
* Since Sitecore editors do not support Fast Refresh:
* 1. Subscribe on events provided by webpack.
* 2. Reset editor chromes when build is finished
* @deprecated Will be removed in a future release. Please use handleEditorFastRefresh instead.
* @param {boolean} [forceReload] force page reload instead of reset chromes
* @default forceReload false
*/
export const handleExperienceEditorFastRefresh = handleEditorFastRefresh;

export const getJssEditingSecret = (): string => {
const secret = process.env.JSS_EDITING_SECRET;
if (!secret || secret.length === 0) {
Expand Down
7 changes: 1 addition & 6 deletions packages/sitecore-jss-react-native/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
export {
isEditorActive,
resetEditorChromes,
isExperienceEditorActive,
resetExperienceEditorChromes,
} from '@sitecore-jss/sitecore-jss/utils';
export { isEditorActive, resetEditorChromes } from '@sitecore-jss/sitecore-jss/utils';
export { mediaApi } from '@sitecore-jss/sitecore-jss/media';
export {
RestLayoutService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,3 @@ export const withEditorChromes = (

return Enhancer as React.ComponentClass;
};

/**
* @deprecated Will be removed in a future release. Please use withEditorChromes instead.
*/
export const withExperienceEditorChromes = withEditorChromes;
9 changes: 2 additions & 7 deletions packages/sitecore-jss-react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
export { constants, enableDebug } from '@sitecore-jss/sitecore-jss';
export {
isExperienceEditorActive,
resetExperienceEditorChromes,
isEditorActive,
resetEditorChromes,
} from '@sitecore-jss/sitecore-jss/utils';
export { isEditorActive, resetEditorChromes } from '@sitecore-jss/sitecore-jss/utils';
export {
LayoutService,
LayoutServiceData,
Expand Down Expand Up @@ -69,6 +64,6 @@ export {
WithSitecoreContextProps,
WithSitecoreContextHocProps,
} from './enhancers/withSitecoreContext';
export { withEditorChromes, withExperienceEditorChromes } from './enhancers/withEditorChromes';
export { withEditorChromes } from './enhancers/withEditorChromes';
export { withPlaceholder } from './enhancers/withPlaceholder';
export { withDatasourceCheck } from './enhancers/withDatasourceCheck';
2 changes: 0 additions & 2 deletions packages/sitecore-jss-vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export {
isEditorActive,
resetEditorChromes,
isExperienceEditorActive,
resetExperienceEditorChromes,
handleEditorAnchors,
} from '@sitecore-jss/sitecore-jss/utils';
export { constants, enableDebug } from '@sitecore-jss/sitecore-jss';
Expand Down
13 changes: 0 additions & 13 deletions packages/sitecore-jss/src/utils/editing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,3 @@ export const handleEditorAnchors = () => {
observer.observe(targetNode, observerOptions);
}
};

/**
* Determines whether the current execution context is within the Sitecore Experience Editor
* @deprecated Will be removed in a future release. Please use isEditorActive instead.
* @returns true if executing within the Sitecore Experience Editor
*/
export const isExperienceEditorActive = isEditorActive;

/**
* Resets Sitecore Experience Editor "chromes"
* @deprecated Will be removed in a future release. Please use resetEditorChromes instead.
*/
export const resetExperienceEditorChromes = resetEditorChromes;
2 changes: 0 additions & 2 deletions packages/sitecore-jss/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ export {
HorizonEditor,
isEditorActive,
resetEditorChromes,
isExperienceEditorActive,
resetExperienceEditorChromes,
handleEditorAnchors,
} from './editing';

0 comments on commit 85dc89a

Please sign in to comment.