@enonic/nextjs-adapter 3.3.0-B1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseMappings.d.ts +1 -0
- package/{src/baseMappings.ts → dist/baseMappings.js} +4 -14
- package/dist/baseMappings.js.map +1 -0
- package/dist/client/getClientHydratedHtml.d.ts +1 -0
- package/{src/client/getClientHydratedHtml.tsx → dist/client/getClientHydratedHtml.jsx} +3 -6
- package/dist/client/getClientHydratedHtml.jsx.map +1 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -0
- package/dist/common/ComponentRegistry.d.ts +34 -0
- package/dist/common/ComponentRegistry.js +121 -0
- package/dist/common/ComponentRegistry.js.map +1 -0
- package/dist/common/UrlProcessor.d.ts +25 -0
- package/{src/common/UrlProcessor.ts → dist/common/UrlProcessor.js} +49 -70
- package/dist/common/UrlProcessor.js.map +1 -0
- package/dist/common/constants.d.ts +51 -0
- package/{src/common/constants.ts → dist/common/constants.js} +38 -44
- package/dist/common/constants.js.map +1 -0
- package/dist/common/env.d.ts +12 -0
- package/{src/common/env.ts → dist/common/env.js} +3 -14
- package/dist/common/env.js.map +1 -0
- package/dist/guillotine/applyProcessors.d.ts +2 -0
- package/dist/guillotine/applyProcessors.js +33 -0
- package/dist/guillotine/applyProcessors.js.map +1 -0
- package/dist/guillotine/buildComponentTree.d.ts +2 -0
- package/{src/guillotine/buildComponentTree.ts → dist/guillotine/buildComponentTree.js} +13 -25
- package/dist/guillotine/buildComponentTree.js.map +1 -0
- package/dist/guillotine/buildErrorResponse.d.ts +3 -0
- package/{src/guillotine/buildErrorResponse.ts → dist/guillotine/buildErrorResponse.js} +2 -10
- package/dist/guillotine/buildErrorResponse.js.map +1 -0
- package/dist/guillotine/buildPage.d.ts +2 -0
- package/dist/guillotine/buildPage.js +10 -0
- package/dist/guillotine/buildPage.js.map +1 -0
- package/dist/guillotine/collectComponentDescriptors.d.ts +6 -0
- package/{src/guillotine/collectComponentDescriptors.ts → dist/guillotine/collectComponentDescriptors.js} +13 -26
- package/dist/guillotine/collectComponentDescriptors.js.map +1 -0
- package/dist/guillotine/combineMultipleQueries.d.ts +2 -0
- package/{src/guillotine/combineMultipleQueries.ts → dist/guillotine/combineMultipleQueries.js} +9 -23
- package/dist/guillotine/combineMultipleQueries.js.map +1 -0
- package/dist/guillotine/createMetaData.d.ts +18 -0
- package/dist/guillotine/createMetaData.js +45 -0
- package/dist/guillotine/createMetaData.js.map +1 -0
- package/dist/guillotine/fetchContent.d.ts +9 -0
- package/dist/guillotine/fetchContent.js +222 -0
- package/dist/guillotine/fetchContent.js.map +1 -0
- package/dist/guillotine/fetchContentData.d.ts +2 -0
- package/dist/guillotine/fetchContentData.js +30 -0
- package/dist/guillotine/fetchContentData.js.map +1 -0
- package/dist/guillotine/fetchContentPathsForAllLocales.d.ts +2 -0
- package/dist/guillotine/fetchContentPathsForAllLocales.js +21 -0
- package/dist/guillotine/fetchContentPathsForAllLocales.js.map +1 -0
- package/dist/guillotine/fetchContentPathsForLocale.d.ts +2 -0
- package/dist/guillotine/fetchContentPathsForLocale.js +42 -0
- package/dist/guillotine/fetchContentPathsForLocale.js.map +1 -0
- package/dist/guillotine/fetchFromApi.d.ts +3 -0
- package/dist/guillotine/fetchFromApi.js +76 -0
- package/dist/guillotine/fetchFromApi.js.map +1 -0
- package/dist/guillotine/fetchGuillotine.d.ts +3 -0
- package/dist/guillotine/fetchGuillotine.js +75 -0
- package/dist/guillotine/fetchGuillotine.js.map +1 -0
- package/dist/guillotine/fetchMetaData.d.ts +2 -0
- package/dist/guillotine/fetchMetaData.js +33 -0
- package/dist/guillotine/fetchMetaData.js.map +1 -0
- package/dist/guillotine/getCleanContentPathArrayOrThrow400.d.ts +2 -0
- package/{src/guillotine/getCleanContentPathArrayOrThrow400.ts → dist/guillotine/getCleanContentPathArrayOrThrow400.js} +7 -9
- package/dist/guillotine/getCleanContentPathArrayOrThrow400.js.map +1 -0
- package/dist/guillotine/getComponentConfig.d.ts +2 -0
- package/{src/guillotine/getComponentConfig.ts → dist/guillotine/getComponentConfig.js} +3 -5
- package/dist/guillotine/getComponentConfig.js.map +1 -0
- package/dist/guillotine/getContentAndComponentPaths.d.ts +1 -0
- package/{src/guillotine/getContentAndComponentPaths.ts → dist/guillotine/getContentAndComponentPaths.js} +6 -5
- package/dist/guillotine/getContentAndComponentPaths.js.map +1 -0
- package/dist/guillotine/getMetaData.d.ts +2 -0
- package/{src/guillotine/getMetaData.ts → dist/guillotine/getMetaData.js} +11 -18
- package/dist/guillotine/getMetaData.js.map +1 -0
- package/dist/guillotine/getParentRegion.d.ts +2 -0
- package/{src/guillotine/getParentRegion.ts → dist/guillotine/getParentRegion.js} +9 -23
- package/dist/guillotine/getParentRegion.js.map +1 -0
- package/dist/guillotine/getQueryAndVariables.d.ts +2 -0
- package/{src/guillotine/getQueryAndVariables.ts → dist/guillotine/getQueryAndVariables.js} +7 -23
- package/dist/guillotine/getQueryAndVariables.js.map +1 -0
- package/dist/guillotine/metadata/configQuery.d.ts +2 -0
- package/dist/guillotine/metadata/configQuery.js +36 -0
- package/dist/guillotine/metadata/configQuery.js.map +1 -0
- package/dist/guillotine/metadata/richTextQuery.d.ts +1 -0
- package/{src/guillotine/metadata/richTextQuery.ts → dist/guillotine/metadata/richTextQuery.js} +6 -8
- package/dist/guillotine/metadata/richTextQuery.js.map +1 -0
- package/dist/guillotine/parseComponentPath.d.ts +2 -0
- package/{src/guillotine/parseComponentPath.ts → dist/guillotine/parseComponentPath.js} +4 -8
- package/dist/guillotine/parseComponentPath.js.map +1 -0
- package/dist/guillotine/prefixFragmentCmpPath.d.ts +1 -0
- package/{src/guillotine/prefixFragmentCmpPath.ts → dist/guillotine/prefixFragmentCmpPath.js} +5 -5
- package/dist/guillotine/prefixFragmentCmpPath.js.map +1 -0
- package/dist/guillotine/processComponentConfig.d.ts +2 -0
- package/{src/guillotine/processComponentConfig.ts → dist/guillotine/processComponentConfig.js} +4 -12
- package/dist/guillotine/processComponentConfig.js.map +1 -0
- package/dist/guillotine/restrictComponentsToPath.d.ts +2 -0
- package/{src/guillotine/restrictComponentsToPath.ts → dist/guillotine/restrictComponentsToPath.js} +9 -19
- package/dist/guillotine/restrictComponentsToPath.js.map +1 -0
- package/dist/guillotine/validateData.d.ts +2 -0
- package/dist/guillotine/validateData.js +7 -0
- package/dist/guillotine/validateData.js.map +1 -0
- package/dist/guillotine/validateNotFound.d.ts +2 -0
- package/{src/guillotine/validateNotFound.ts → dist/guillotine/validateNotFound.js} +5 -9
- package/dist/guillotine/validateNotFound.js.map +1 -0
- package/dist/guillotine/validateShortcut.d.ts +2 -0
- package/{src/guillotine/validateShortcut.ts → dist/guillotine/validateShortcut.js} +12 -20
- package/dist/guillotine/validateShortcut.js.map +1 -0
- package/dist/i18n/LocaleContext.d.ts +7 -0
- package/dist/i18n/LocaleContext.jsx +50 -0
- package/dist/i18n/LocaleContext.jsx.map +1 -0
- package/dist/i18n/i18n.d.ts +12 -0
- package/dist/i18n/i18n.js +59 -0
- package/dist/i18n/i18n.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/query/Shortcut.d.ts +1 -0
- package/{src/query/Shortcut.ts → dist/query/Shortcut.js} +1 -0
- package/dist/query/Shortcut.js.map +1 -0
- package/dist/server/getServerRenderedHtml.d.ts +1 -0
- package/dist/server/getServerRenderedHtml.js +4 -0
- package/dist/server/getServerRenderedHtml.js.map +1 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.js +6 -0
- package/dist/server.js.map +1 -0
- package/{src/types/component.ts → dist/types/component.d.ts} +23 -62
- package/dist/types/component.js +2 -0
- package/dist/types/component.js.map +1 -0
- package/dist/types/componentProps.d.ts +107 -0
- package/dist/types/componentProps.js +2 -0
- package/dist/types/componentProps.js.map +1 -0
- package/dist/types/guillotine.d.ts +344 -0
- package/dist/types/guillotine.js +2 -0
- package/dist/types/guillotine.js.map +1 -0
- package/dist/types/i18n.d.ts +7 -0
- package/dist/types/i18n.js +2 -0
- package/dist/types/i18n.js.map +1 -0
- package/{src/types/index.ts → dist/types/index.d.ts} +19 -34
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/next.d.ts +6 -0
- package/dist/types/next.js +2 -0
- package/dist/types/next.js.map +1 -0
- package/dist/types/util.d.ts +3 -0
- package/dist/types/util.js +3 -0
- package/dist/types/util.js.map +1 -0
- package/dist/utils/addLineNumbers.d.ts +1 -0
- package/dist/utils/addLineNumbers.js +4 -0
- package/dist/utils/addLineNumbers.js.map +1 -0
- package/dist/utils/buildGuillotineRequestHeaders.d.ts +7 -0
- package/dist/utils/buildGuillotineRequestHeaders.js +16 -0
- package/dist/utils/buildGuillotineRequestHeaders.js.map +1 -0
- package/dist/utils/commonChars.d.ts +1 -0
- package/{src/utils/commonChars.ts → dist/utils/commonChars.js} +5 -4
- package/dist/utils/commonChars.js.map +1 -0
- package/dist/utils/enonicLog.d.ts +5 -0
- package/dist/utils/enonicLog.js +23 -0
- package/dist/utils/enonicLog.js.map +1 -0
- package/dist/utils/fixDoubleSlashes.d.ts +1 -0
- package/dist/utils/fixDoubleSlashes.js +4 -0
- package/dist/utils/fixDoubleSlashes.js.map +1 -0
- package/dist/utils/getAllLocales.d.ts +1 -0
- package/dist/utils/getAllLocales.js +5 -0
- package/dist/utils/getAllLocales.js.map +1 -0
- package/dist/utils/getContentApiUrl.d.ts +2 -0
- package/dist/utils/getContentApiUrl.js +15 -0
- package/dist/utils/getContentApiUrl.js.map +1 -0
- package/dist/utils/getLocaleMapping.d.ts +2 -0
- package/dist/utils/getLocaleMapping.js +19 -0
- package/dist/utils/getLocaleMapping.js.map +1 -0
- package/dist/utils/getLocaleMappingByLocale.d.ts +2 -0
- package/dist/utils/getLocaleMappingByLocale.js +13 -0
- package/dist/utils/getLocaleMappingByLocale.js.map +1 -0
- package/dist/utils/getLocaleMappingByProjectId.d.ts +2 -0
- package/dist/utils/getLocaleMappingByProjectId.js +16 -0
- package/dist/utils/getLocaleMappingByProjectId.js.map +1 -0
- package/dist/utils/getLocaleMappings.d.ts +2 -0
- package/{src/utils/getLocaleMappings.ts → dist/utils/getLocaleMappings.js} +8 -14
- package/dist/utils/getLocaleMappings.js.map +1 -0
- package/dist/utils/getRenderMode.d.ts +3 -0
- package/dist/utils/getRenderMode.js +8 -0
- package/dist/utils/getRenderMode.js.map +1 -0
- package/dist/utils/getRequestLocaleInfo.d.ts +6 -0
- package/{src/utils/getRequestLocaleInfo.ts → dist/utils/getRequestLocaleInfo.js} +12 -13
- package/dist/utils/getRequestLocaleInfo.js.map +1 -0
- package/dist/utils/getXpBaseUrl.d.ts +2 -0
- package/dist/utils/getXpBaseUrl.js +8 -0
- package/dist/utils/getXpBaseUrl.js.map +1 -0
- package/dist/utils/indent.d.ts +1 -0
- package/dist/utils/indent.js +5 -0
- package/dist/utils/indent.js.map +1 -0
- package/dist/utils/sanitizeGraphqlName.d.ts +1 -0
- package/{src/utils/sanitizeGraphqlName.ts → dist/utils/sanitizeGraphqlName.js} +3 -2
- package/dist/utils/sanitizeGraphqlName.js.map +1 -0
- package/dist/views/BaseComponent.d.ts +20 -0
- package/{src/views/BaseComponent.tsx → dist/views/BaseComponent.jsx} +49 -76
- package/dist/views/BaseComponent.jsx.map +1 -0
- package/dist/views/BaseContent.d.ts +3 -0
- package/dist/views/BaseContent.jsx +38 -0
- package/dist/views/BaseContent.jsx.map +1 -0
- package/dist/views/BaseLayout.d.ts +3 -0
- package/dist/views/BaseLayout.jsx +24 -0
- package/dist/views/BaseLayout.jsx.map +1 -0
- package/dist/views/BaseMacro.d.ts +6 -0
- package/{src/views/BaseMacro.tsx → dist/views/BaseMacro.jsx} +37 -42
- package/dist/views/BaseMacro.jsx.map +1 -0
- package/dist/views/BasePage.d.ts +3 -0
- package/dist/views/BasePage.jsx +34 -0
- package/dist/views/BasePage.jsx.map +1 -0
- package/dist/views/BasePart.d.ts +3 -0
- package/dist/views/BasePart.jsx +24 -0
- package/dist/views/BasePart.jsx.map +1 -0
- package/dist/views/Empty.d.ts +2 -0
- package/{src/views/Empty.tsx → dist/views/Empty.jsx} +1 -2
- package/dist/views/Empty.jsx.map +1 -0
- package/dist/views/Fragment.d.ts +3 -0
- package/dist/views/Fragment.jsx +30 -0
- package/dist/views/Fragment.jsx.map +1 -0
- package/dist/views/MainView.d.ts +3 -0
- package/dist/views/MainView.jsx +14 -0
- package/dist/views/MainView.jsx.map +1 -0
- package/dist/views/PropsView.d.ts +2 -0
- package/dist/views/PropsView.jsx +21 -0
- package/dist/views/PropsView.jsx.map +1 -0
- package/dist/views/Region.d.ts +6 -0
- package/{src/views/Region.tsx → dist/views/Region.jsx} +17 -41
- package/dist/views/Region.jsx.map +1 -0
- package/dist/views/RichTextView.d.ts +3 -0
- package/dist/views/RichTextView.jsx +65 -0
- package/dist/views/RichTextView.jsx.map +1 -0
- package/dist/views/SingleComponent.d.ts +4 -0
- package/dist/views/SingleComponent.jsx +10 -0
- package/dist/views/SingleComponent.jsx.map +1 -0
- package/dist/views/StaticContent.d.ts +10 -0
- package/dist/views/StaticContent.jsx +37 -0
- package/dist/views/StaticContent.jsx.map +1 -0
- package/dist/views/Text.d.ts +8 -0
- package/dist/views/Text.jsx +4 -0
- package/dist/views/Text.jsx.map +1 -0
- package/dist/views/macros/DefaultMacro.d.ts +3 -0
- package/dist/views/macros/DefaultMacro.jsx +4 -0
- package/dist/views/macros/DefaultMacro.jsx.map +1 -0
- package/dist/views/macros/DisableMacro.d.ts +3 -0
- package/dist/views/macros/DisableMacro.jsx +3 -0
- package/dist/views/macros/DisableMacro.jsx.map +1 -0
- package/package.json +20 -32
- package/src/client.ts +0 -2
- package/src/common/ComponentRegistry.ts +0 -159
- package/src/guillotine/applyProcessors.ts +0 -34
- package/src/guillotine/buildPage.ts +0 -15
- package/src/guillotine/createMetaData.ts +0 -72
- package/src/guillotine/fetchContent.ts +0 -240
- package/src/guillotine/fetchContentData.ts +0 -31
- package/src/guillotine/fetchContentPathsForAllLocales.ts +0 -21
- package/src/guillotine/fetchContentPathsForLocale.ts +0 -43
- package/src/guillotine/fetchFromApi.ts +0 -76
- package/src/guillotine/fetchGuillotine.ts +0 -76
- package/src/guillotine/fetchMetaData.ts +0 -31
- package/src/guillotine/metadata/configQuery.ts +0 -46
- package/src/guillotine/validateData.ts +0 -11
- package/src/i18n/LocaleContext.tsx +0 -59
- package/src/i18n/i18n.ts +0 -57
- package/src/index.ts +0 -42
- package/src/server/getServerRenderedHtml.ts +0 -3
- package/src/server.ts +0 -5
- package/src/types/componentProps.ts +0 -143
- package/src/types/guillotine.ts +0 -428
- package/src/types/i18n.ts +0 -8
- package/src/types/next.ts +0 -7
- package/src/types/util.ts +0 -5
- package/src/utils/addLineNumbers.ts +0 -3
- package/src/utils/buildGuillotineRequestHeaders.ts +0 -29
- package/src/utils/enonicLog.ts +0 -28
- package/src/utils/fixDoubleSlashes.ts +0 -3
- package/src/utils/getAllLocales.ts +0 -6
- package/src/utils/getContentApiUrl.ts +0 -20
- package/src/utils/getLocaleMapping.ts +0 -24
- package/src/utils/getLocaleMappingByLocale.ts +0 -19
- package/src/utils/getLocaleMappingByProjectId.ts +0 -21
- package/src/utils/getRenderMode.ts +0 -11
- package/src/utils/getXpBaseUrl.ts +0 -12
- package/src/utils/indent.ts +0 -4
- package/src/views/BaseContent.tsx +0 -47
- package/src/views/BaseLayout.tsx +0 -33
- package/src/views/BasePage.tsx +0 -42
- package/src/views/BasePart.tsx +0 -34
- package/src/views/Fragment.tsx +0 -41
- package/src/views/MainView.tsx +0 -22
- package/src/views/PropsView.tsx +0 -38
- package/src/views/RichTextView.tsx +0 -106
- package/src/views/SingleComponent.tsx +0 -19
- package/src/views/StaticContent.tsx +0 -39
- package/src/views/Text.tsx +0 -19
- package/src/views/macros/DefaultMacro.tsx +0 -9
- package/src/views/macros/DisableMacro.tsx +0 -8
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export function getComponentConfig(cmp?: PageComponent) {
|
|
1
|
+
export function getComponentConfig(cmp) {
|
|
5
2
|
const cmpData = cmp && cmp[cmp.type];
|
|
6
3
|
return cmpData && 'config' in cmpData ? cmpData.config : undefined;
|
|
7
|
-
}
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=getComponentConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getComponentConfig.js","sourceRoot":"","sources":["../../src/guillotine/getComponentConfig.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,kBAAkB,CAAC,GAAmB;IAClD,MAAM,OAAO,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,IAAI,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getContentAndComponentPaths: (requestPath: string) => string[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
const COMPONENT_PATH_KEY = /\/?_\/component/;
|
|
2
|
-
|
|
3
|
-
export const getContentAndComponentPaths = (requestPath: string): string[] => {
|
|
1
|
+
const COMPONENT_PATH_KEY = /\/?_\/component/; // first slash is optional for root components
|
|
2
|
+
export const getContentAndComponentPaths = (requestPath) => {
|
|
4
3
|
let contentPath, componentPath;
|
|
5
4
|
if (COMPONENT_PATH_KEY.test(requestPath)) {
|
|
6
5
|
[contentPath, componentPath] = requestPath.split(COMPONENT_PATH_KEY);
|
|
7
|
-
}
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
8
|
contentPath = requestPath;
|
|
9
9
|
}
|
|
10
10
|
return [contentPath, componentPath];
|
|
11
|
-
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=getContentAndComponentPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getContentAndComponentPaths.js","sourceRoot":"","sources":["../../src/guillotine/getContentAndComponentPaths.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,CAAG,8CAA8C;AAE9F,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,WAAmB,EAAY,EAAE;IACzE,IAAI,WAAW,EAAE,aAAa,CAAC;IAC/B,IAAI,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACzE,CAAC;SAAM,CAAC;QACJ,WAAW,GAAG,WAAW,CAAC;IAC9B,CAAC;IACD,OAAO,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC,CAAC"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import {ComponentRegistry} from '../common/ComponentRegistry';
|
|
2
|
-
import {configQuery} from './metadata/configQuery';
|
|
3
|
-
import {richTextQuery} from './metadata/richTextQuery';
|
|
4
|
-
import {indent} from '../utils/indent';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const partConfigQuery = (): string => {
|
|
1
|
+
import { ComponentRegistry } from '../common/ComponentRegistry';
|
|
2
|
+
import { configQuery } from './metadata/configQuery';
|
|
3
|
+
import { richTextQuery } from './metadata/richTextQuery';
|
|
4
|
+
import { indent } from '../utils/indent';
|
|
5
|
+
const partConfigQuery = () => {
|
|
8
6
|
return configQuery(ComponentRegistry.getParts());
|
|
9
7
|
};
|
|
10
|
-
|
|
11
|
-
const layoutConfigQuery = (): string => {
|
|
8
|
+
const layoutConfigQuery = () => {
|
|
12
9
|
return configQuery(ComponentRegistry.getLayouts());
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
const pageConfigQuery = (): string => {
|
|
11
|
+
const pageConfigQuery = () => {
|
|
16
12
|
return configQuery(ComponentRegistry.getPages());
|
|
17
13
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
14
|
/*
|
|
21
15
|
IMPORTANT: make sure to transform your queries into functions too when using this function inside them !!!
|
|
22
16
|
*/
|
|
@@ -46,21 +40,19 @@ image {
|
|
|
46
40
|
imageUrl (type:absolute, scale: "width-768")
|
|
47
41
|
}
|
|
48
42
|
}`;
|
|
49
|
-
|
|
50
43
|
// THIS QUERY DOES NOT SUPPORT NESTED FRAGMENTS
|
|
51
44
|
export const pageFragmentQuery = () => `components(resolveFragment: false, resolveTemplate: true) {
|
|
52
45
|
fragment {
|
|
53
46
|
id
|
|
54
47
|
fragment {
|
|
55
48
|
components {
|
|
56
|
-
${indent(componentsQuery(),16)}
|
|
49
|
+
${indent(componentsQuery(), 16)}
|
|
57
50
|
}
|
|
58
51
|
}
|
|
59
52
|
}
|
|
60
|
-
${indent(componentsQuery(),4)}
|
|
53
|
+
${indent(componentsQuery(), 4)}
|
|
61
54
|
}`;
|
|
62
|
-
|
|
63
|
-
export function getMetaQuery(pageFragment?: string): string {
|
|
55
|
+
export function getMetaQuery(pageFragment) {
|
|
64
56
|
return `query($path:ID!) {
|
|
65
57
|
guillotine {
|
|
66
58
|
get(key:$path) {
|
|
@@ -72,3 +64,4 @@ ${indent(pageFragment || '', 12)}
|
|
|
72
64
|
}
|
|
73
65
|
}`;
|
|
74
66
|
}
|
|
67
|
+
//# sourceMappingURL=getMetaData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMetaData.js","sourceRoot":"","sources":["../../src/guillotine/getMetaData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAGvC,MAAM,eAAe,GAAG,GAAW,EAAE;IACjC,OAAO,WAAW,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAW,EAAE;IACnC,OAAO,WAAW,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,GAAW,EAAE;IACjC,OAAO,WAAW,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAC;AACrD,CAAC,CAAC;AAGF;;GAEG;AACH,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC;;;;EAI5B,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;;;;;;;EAO5B,MAAM,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;;;EAG9B,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;;;;EAIjC,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;;;;;;;EAO5B,CAAC;AAEH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC;;;;;EAKrC,MAAM,CAAC,eAAe,EAAE,EAAC,EAAE,CAAC;;;;EAI5B,MAAM,CAAC,eAAe,EAAE,EAAC,CAAC,CAAC;EAC3B,CAAC;AAEH,MAAM,UAAU,YAAY,CAAC,YAAqB;IAC9C,OAAO;;;;;;EAMT,MAAM,CAAC,YAAY,IAAI,EAAE,EAAE,EAAE,CAAC;;;EAG9B,CAAC;AACH,CAAC"}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export function getParentRegion(
|
|
9
|
-
source: RegionTree,
|
|
10
|
-
contentType: string,
|
|
11
|
-
cmpPath: PathFragment[],
|
|
12
|
-
components: PageComponent[] = [],
|
|
13
|
-
createMissing ?: boolean
|
|
14
|
-
): PageRegion | undefined {
|
|
15
|
-
let currentTree: RegionTree = source;
|
|
16
|
-
let currentRegion: PageRegion | undefined;
|
|
1
|
+
import { XP_COMPONENT_TYPE } from '../common/constants';
|
|
2
|
+
import { prefixFragmentCmpPath } from './prefixFragmentCmpPath';
|
|
3
|
+
export function getParentRegion(source, contentType, cmpPath, components = [], createMissing) {
|
|
4
|
+
let currentTree = source;
|
|
5
|
+
let currentRegion;
|
|
17
6
|
let parentPath = '';
|
|
18
|
-
|
|
19
7
|
for (let i = 0; i < cmpPath.length; i++) {
|
|
20
8
|
const pathFragment = cmpPath[i];
|
|
21
9
|
const regionName = pathFragment.region;
|
|
22
10
|
parentPath += `/${pathFragment.region}/${pathFragment.index}`;
|
|
23
11
|
currentRegion = currentTree[regionName];
|
|
24
|
-
|
|
25
12
|
if (!currentRegion) {
|
|
26
13
|
if (createMissing) {
|
|
27
14
|
currentRegion = {
|
|
@@ -29,15 +16,14 @@ export function getParentRegion(
|
|
|
29
16
|
components: []
|
|
30
17
|
};
|
|
31
18
|
currentTree[regionName] = currentRegion;
|
|
32
|
-
}
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
33
21
|
throw new Error(`Region [${regionName}] was not found`);
|
|
34
22
|
}
|
|
35
23
|
}
|
|
36
|
-
|
|
37
24
|
if (i < cmpPath.length - 1) {
|
|
38
25
|
// look for layouts inside if this is not the last path fragment
|
|
39
|
-
|
|
40
|
-
const layout = components.find((cmp: PageComponent) => {
|
|
26
|
+
const layout = components.find((cmp) => {
|
|
41
27
|
return cmp.type === XP_COMPONENT_TYPE.LAYOUT && prefixFragmentCmpPath(contentType, cmp.path) === parentPath;
|
|
42
28
|
});
|
|
43
29
|
if (!layout) {
|
|
@@ -49,6 +35,6 @@ export function getParentRegion(
|
|
|
49
35
|
currentTree = layout.regions;
|
|
50
36
|
}
|
|
51
37
|
} // for
|
|
52
|
-
|
|
53
38
|
return currentRegion;
|
|
54
39
|
}
|
|
40
|
+
//# sourceMappingURL=getParentRegion.js.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AG,CAAC,IAAI,KAAK,iBAAiB,CAAC,MAAM,IAAI,qBAAqB,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC;YAChH,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,2DAA2D,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;YACzI,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;YACxB,CAAC;YACD,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QACjC,CAAC;IACL,CAAC,CAAC,MAAM;IAER,OAAO,aAAa,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Context, QueryAndVariables, SelectedQueryMaybeVariablesFunc } from '../types';
|
|
2
|
+
export declare function getQueryAndVariables(type: string, path: string, context: Context, selectedQuery?: SelectedQueryMaybeVariablesFunc, config?: any): QueryAndVariables | undefined;
|
|
@@ -1,42 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export function getQueryAndVariables(
|
|
5
|
-
type: string,
|
|
6
|
-
path: string,
|
|
7
|
-
context: Context,
|
|
8
|
-
selectedQuery?: SelectedQueryMaybeVariablesFunc,
|
|
9
|
-
config?: any
|
|
10
|
-
): QueryAndVariables | undefined {
|
|
11
|
-
|
|
1
|
+
export function getQueryAndVariables(type, path, context, selectedQuery, config) {
|
|
12
2
|
let query, getVariables;
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
typeof selectedQuery === 'string' || typeof selectedQuery === 'function'
|
|
16
|
-
) {
|
|
3
|
+
if (typeof selectedQuery === 'string' || typeof selectedQuery === 'function') {
|
|
17
4
|
query = selectedQuery;
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
}
|
|
6
|
+
else if (Array.isArray(selectedQuery)) {
|
|
20
7
|
query = selectedQuery[0];
|
|
21
8
|
getVariables = selectedQuery[1];
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
}
|
|
10
|
+
else if (typeof selectedQuery === 'object') {
|
|
24
11
|
query = selectedQuery.query;
|
|
25
12
|
getVariables = selectedQuery.variables;
|
|
26
13
|
}
|
|
27
|
-
|
|
28
14
|
if (getVariables && typeof getVariables !== 'function') {
|
|
29
15
|
throw Error(`getVariables for content type ${type} should be a function, not: ${typeof getVariables}`);
|
|
30
16
|
}
|
|
31
|
-
|
|
32
17
|
if (query && typeof query !== 'string' && typeof query !== 'function') {
|
|
33
18
|
throw Error(`Query for content type ${type} should be a string or function, not: ${typeof query}`);
|
|
34
19
|
}
|
|
35
|
-
|
|
36
20
|
if (typeof query === 'function') {
|
|
37
21
|
query = query(path, context, config);
|
|
38
22
|
}
|
|
39
|
-
|
|
40
23
|
if (query) {
|
|
41
24
|
return {
|
|
42
25
|
query,
|
|
@@ -46,3 +29,4 @@ export function getQueryAndVariables(
|
|
|
46
29
|
};
|
|
47
30
|
}
|
|
48
31
|
}
|
|
32
|
+
//# sourceMappingURL=getQueryAndVariables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getQueryAndVariables.js","sourceRoot":"","sources":["../../src/guillotine/getQueryAndVariables.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,oBAAoB,CAChC,IAAY,EACZ,IAAY,EACZ,OAAgB,EAChB,aAA+C,EAC/C,MAAY;IAGZ,IAAI,KAAK,EAAE,YAAY,CAAC;IAExB,IACI,OAAO,aAAa,KAAK,QAAQ,IAAI,OAAO,aAAa,KAAK,UAAU,EAC1E,CAAC;QACC,KAAK,GAAG,aAAa,CAAC;IAE1B,CAAC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACtC,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAEpC,CAAC;SAAM,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QAC3C,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC;QAC5B,YAAY,GAAG,aAAa,CAAC,SAAS,CAAC;IAC3C,CAAC;IAED,IAAI,YAAY,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE,CAAC;QACrD,MAAM,KAAK,CAAC,iCAAiC,IAAI,+BAA+B,OAAO,YAAY,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QACpE,MAAM,KAAK,CAAC,0BAA0B,IAAI,yCAAyC,OAAO,KAAK,EAAE,CAAC,CAAC;IACvG,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QAC9B,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACR,OAAO;YACH,KAAK;YACL,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC5D,IAAI;aACP;SACJ,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { sanitizeGraphqlName } from '../../utils/sanitizeGraphqlName';
|
|
2
|
+
export const configQuery = (list, includeAppName = true, canUseConfigAsJson = true) => {
|
|
3
|
+
const hasQueryList = (list === null || list === void 0 ? void 0 : list.filter(([key, def]) => def.configQuery)) || [];
|
|
4
|
+
if (hasQueryList.length === 0) {
|
|
5
|
+
return canUseConfigAsJson ? 'configAsJson' : '';
|
|
6
|
+
}
|
|
7
|
+
const configsByApp = {};
|
|
8
|
+
hasQueryList
|
|
9
|
+
.forEach((entry) => {
|
|
10
|
+
const nameParts = entry[0].split(':');
|
|
11
|
+
if (nameParts.length === 2) {
|
|
12
|
+
const sanitizedAppName = sanitizeGraphqlName(nameParts[0]);
|
|
13
|
+
let existingConfigs = configsByApp[sanitizedAppName];
|
|
14
|
+
if (!existingConfigs) {
|
|
15
|
+
existingConfigs = [];
|
|
16
|
+
configsByApp[sanitizedAppName] = existingConfigs;
|
|
17
|
+
}
|
|
18
|
+
existingConfigs.push(`${sanitizeGraphqlName(nameParts[1])}${entry[1].configQuery}`);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
// Still query for configAsJson if at least one item has no configQuery defined
|
|
22
|
+
const configAsJsonQuery = canUseConfigAsJson && hasQueryList.length < list.length ? 'configAsJson' : '';
|
|
23
|
+
if (!includeAppName) {
|
|
24
|
+
return `${configAsJsonQuery}
|
|
25
|
+
config {
|
|
26
|
+
${Object.values(configsByApp).reduce((arr, curr) => arr.concat(curr), []).join('\n')}
|
|
27
|
+
}`;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return `${configAsJsonQuery}
|
|
31
|
+
config {
|
|
32
|
+
${Object.entries(configsByApp).map(entry => entry[0] + '{\n' + entry[1].join('\n') + '\n}')}
|
|
33
|
+
}`;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=configQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configQuery.js","sourceRoot":"","sources":["../../../src/guillotine/metadata/configQuery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AAGpE,MAAM,CAAC,MAAM,WAAW,GAAG,CACvB,IAAqC,EACrC,cAAc,GAAG,IAAI,EACrB,kBAAkB,GAAG,IAAI,EACnB,EAAE;IACR,MAAM,YAAY,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAC,CAAC,CAAC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CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;kBACtF,CAAC;IACf,CAAC;SAAM,CAAC;QACJ,OAAO,GAAG,iBAAiB;;sBAEb,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;kBAC7F,CAAC;IACf,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const richTextQuery: (fieldName: string) => string;
|
package/{src/guillotine/metadata/richTextQuery.ts → dist/guillotine/metadata/richTextQuery.js}
RENAMED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {ComponentRegistry} from '../../common/ComponentRegistry';
|
|
2
|
-
import {configQuery} from './configQuery';
|
|
3
|
-
import {indent} from '../../utils/indent';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const macroConfigQuery = (): string => {
|
|
1
|
+
import { ComponentRegistry } from '../../common/ComponentRegistry';
|
|
2
|
+
import { configQuery } from './configQuery';
|
|
3
|
+
import { indent } from '../../utils/indent';
|
|
4
|
+
const macroConfigQuery = () => {
|
|
7
5
|
return configQuery(ComponentRegistry.getMacros(), false, false);
|
|
8
6
|
};
|
|
9
|
-
|
|
10
|
-
export const richTextQuery = (fieldName: string) => {
|
|
7
|
+
export const richTextQuery = (fieldName) => {
|
|
11
8
|
return `${fieldName}(processHtml:{type:absolute, imageWidths:[400, 800, 1200], imageSizes:"(max-width: 400px) 400px, (max-width: 800px) 800px, 1200px"}) {
|
|
12
9
|
processedHtml
|
|
13
10
|
macros {
|
|
@@ -47,3 +44,4 @@ export const richTextQuery = (fieldName: string) => {
|
|
|
47
44
|
}
|
|
48
45
|
}}`;
|
|
49
46
|
};
|
|
47
|
+
//# sourceMappingURL=richTextQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"richTextQuery.js","sourceRoot":"","sources":["../../../src/guillotine/metadata/richTextQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAG1C,MAAM,gBAAgB,GAAG,GAAW,EAAE;IAClC,OAAO,WAAW,CAAC,iBAAiB,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC/C,OAAO,GAAG,SAAS;;;;;;UAMb,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BhC,CAAC;AACR,CAAC,CAAC"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {FRAGMENT_CONTENTTYPE_NAME, FRAGMENT_DEFAULT_REGION_NAME} from '../common/constants';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export function parseComponentPath(contentType: string, path: string): PathFragment[] {
|
|
8
|
-
const matches: PathFragment[] = [];
|
|
1
|
+
import { FRAGMENT_CONTENTTYPE_NAME, FRAGMENT_DEFAULT_REGION_NAME } from '../common/constants';
|
|
2
|
+
export function parseComponentPath(contentType, path) {
|
|
3
|
+
const matches = [];
|
|
9
4
|
let match;
|
|
10
5
|
const myRegexp = /(?:(\w+)\/(\d+))+/g;
|
|
11
6
|
while ((match = myRegexp.exec(path)) !== null) {
|
|
@@ -24,3 +19,4 @@ export function parseComponentPath(contentType: string, path: string): PathFragm
|
|
|
24
19
|
}
|
|
25
20
|
return matches;
|
|
26
21
|
}
|
|
22
|
+
//# sourceMappingURL=parseComponentPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseComponentPath.js","sourceRoot":"","sources":["../../src/guillotine/parseComponentPath.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,qBAAqB,CAAC;AAG5F,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,IAAY;IAChE,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,IAAI,KAAK,CAAC;IACV,MAAM,QAAQ,GAAG,oBAAoB,CAAC;IACtC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;YAChB,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;SACnB,CAAC,CAAC;IACP,CAAC;IACD,IAAI,WAAW,KAAK,yBAAyB,EAAE,CAAC;QAC5C,kFAAkF;QAClF,4EAA4E;QAC5E,OAAO,CAAC,OAAO,CAAC;YACZ,MAAM,EAAE,4BAA4B;YACpC,KAAK,EAAE,CAAC;SACX,CAAC,CAAC;IACP,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function prefixFragmentCmpPath(contentType: string, path: string): string;
|
package/{src/guillotine/prefixFragmentCmpPath.ts → dist/guillotine/prefixFragmentCmpPath.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {FRAGMENT_CONTENTTYPE_NAME, FRAGMENT_DEFAULT_REGION_NAME} from '../common/constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export function prefixFragmentCmpPath(contentType: string, path: string): string {
|
|
1
|
+
import { FRAGMENT_CONTENTTYPE_NAME, FRAGMENT_DEFAULT_REGION_NAME } from '../common/constants';
|
|
2
|
+
export function prefixFragmentCmpPath(contentType, path) {
|
|
5
3
|
if (contentType !== FRAGMENT_CONTENTTYPE_NAME) {
|
|
6
4
|
return path;
|
|
7
|
-
}
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
8
7
|
// prepend FRAGMENT_DEFAULT_REGION_NAME to path to conform to page structure
|
|
9
8
|
// so that component with path '/' becomes /FRAGMENT_DEFAULT_REGION_NAME/0
|
|
10
9
|
// path /left/1 becomes /FRAGMENT_DEFAULT_REGION_NAME/0/left/1
|
|
11
10
|
return `/${FRAGMENT_DEFAULT_REGION_NAME}/0${path === '/' ? '' : path}`;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
13
|
+
//# sourceMappingURL=prefixFragmentCmpPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefixFragmentCmpPath.js","sourceRoot":"","sources":["../../src/guillotine/prefixFragmentCmpPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,qBAAqB,CAAC;AAG5F,MAAM,UAAU,qBAAqB,CAAC,WAAmB,EAAE,IAAY;IACnE,IAAI,WAAW,KAAK,yBAAyB,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IAChB,CAAC;SAAM,CAAC;QACJ,4EAA4E;QAC5E,0EAA0E;QAC1E,8DAA8D;QAC9D,OAAO,IAAI,4BAA4B,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3E,CAAC;AACL,CAAC"}
|
package/{src/guillotine/processComponentConfig.ts → dist/guillotine/processComponentConfig.js}
RENAMED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {sanitizeGraphqlName} from '../utils/sanitizeGraphqlName';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export function processComponentConfig(
|
|
8
|
-
myAppName: string,
|
|
9
|
-
myAppNameDashed: string,
|
|
10
|
-
cmp: PageComponent
|
|
11
|
-
): void {
|
|
1
|
+
import { sanitizeGraphqlName } from '../utils/sanitizeGraphqlName';
|
|
2
|
+
export function processComponentConfig(myAppName, myAppNameDashed, cmp) {
|
|
12
3
|
const cmpData = cmp[cmp.type];
|
|
13
4
|
if (cmpData && 'descriptor' in cmpData && cmpData.descriptor) {
|
|
14
5
|
const [appName, cmpName] = cmpData.descriptor.split(':');
|
|
@@ -16,7 +7,7 @@ export function processComponentConfig(
|
|
|
16
7
|
return;
|
|
17
8
|
}
|
|
18
9
|
let config;
|
|
19
|
-
const configArray
|
|
10
|
+
const configArray = [];
|
|
20
11
|
if ('configAsJson' in cmpData && cmpData.configAsJson && cmpData.configAsJson[myAppNameDashed]) {
|
|
21
12
|
config = cmpData.configAsJson[myAppNameDashed][cmpName];
|
|
22
13
|
if (config) {
|
|
@@ -36,3 +27,4 @@ export function processComponentConfig(
|
|
|
36
27
|
}
|
|
37
28
|
}
|
|
38
29
|
}
|
|
30
|
+
//# sourceMappingURL=processComponentConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processComponentConfig.js","sourceRoot":"","sources":["../../src/guillotine/processComponentConfig.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,mBAAmB,EAAC,MAAM,8BAA8B,CAAC;AAGjE,MAAM,UAAU,sBAAsB,CAClC,SAAiB,EACjB,eAAuB,EACvB,GAAkB;IAElB,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QAC3D,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO;QACX,CAAC;QACD,IAAI,MAAM,CAAC;QACX,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,IAAI,cAAc,IAAI,OAAO,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;YAC7F,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;YACxD,IAAI,MAAM,EAAE,CAAC;gBACT,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACzB,OAAO,OAAO,CAAC,YAAY,CAAC;YAChC,CAAC;QACL,CAAC;QACD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC5E,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;YACxE,IAAI,MAAM,EAAE,CAAC;gBACT,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;QACD,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;YACrB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,WAAW,CAAC,CAAC;QACvD,CAAC;IACL,CAAC;AACL,CAAC"}
|
package/{src/guillotine/restrictComponentsToPath.ts → dist/guillotine/restrictComponentsToPath.js}
RENAMED
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {prefixFragmentCmpPath} from './prefixFragmentCmpPath';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export function restrictComponentsToPath(
|
|
10
|
-
contentType: string,
|
|
11
|
-
components?: PageComponent[],
|
|
12
|
-
componentPath?: string
|
|
13
|
-
): PageComponent[] {
|
|
14
|
-
if (!componentPath || !components?.length) {
|
|
1
|
+
import { XP_COMPONENT_TYPE } from '../common/constants';
|
|
2
|
+
import { parseComponentPath } from './parseComponentPath';
|
|
3
|
+
import { prefixFragmentCmpPath } from './prefixFragmentCmpPath';
|
|
4
|
+
export function restrictComponentsToPath(contentType, components, componentPath) {
|
|
5
|
+
if (!componentPath || !(components === null || components === void 0 ? void 0 : components.length)) {
|
|
15
6
|
return components || [];
|
|
16
7
|
}
|
|
17
|
-
|
|
18
8
|
// filter components to the requested one only
|
|
19
9
|
const component = components.find(cmp => {
|
|
20
10
|
return cmp.path === componentPath;
|
|
21
11
|
});
|
|
22
|
-
|
|
23
12
|
if (!component) {
|
|
24
13
|
return [];
|
|
25
14
|
}
|
|
26
|
-
|
|
27
|
-
let result: PageComponent[] = [component];
|
|
15
|
+
let result = [component];
|
|
28
16
|
if (component.type !== XP_COMPONENT_TYPE.LAYOUT) {
|
|
29
17
|
// remember to include all parent layouts too !
|
|
30
18
|
const cmpPath = parseComponentPath(contentType, component.path);
|
|
@@ -37,7 +25,8 @@ export function restrictComponentsToPath(
|
|
|
37
25
|
result.unshift(parentCmp);
|
|
38
26
|
}
|
|
39
27
|
}
|
|
40
|
-
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
41
30
|
// It's a layout, include child components
|
|
42
31
|
const childCmps = components.filter(cmp => cmp.path !== component.path && cmp.path.startsWith(component.path));
|
|
43
32
|
if (childCmps.length) {
|
|
@@ -46,3 +35,4 @@ export function restrictComponentsToPath(
|
|
|
46
35
|
}
|
|
47
36
|
return result;
|
|
48
37
|
}
|
|
38
|
+
//# sourceMappingURL=restrictComponentsToPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restrictComponentsToPath.js","sourceRoot":"","sources":["../../src/guillotine/restrictComponentsToPath.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,C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C,CAAC;YAC9B,CAAC;QACL,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,0CAA0C;QAC1C,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/G,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateData.js","sourceRoot":"","sources":["../../src/guillotine/validateData.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAGpD,MAAM,UAAU,YAAY,CAAC,KAAyB;IAClD,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxB,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {notFound} from 'next/navigation';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export function validateNotFound(props: FetchContentResult): void {
|
|
8
|
-
const {error} = props;
|
|
1
|
+
import { notFound } from 'next/navigation';
|
|
2
|
+
export function validateNotFound(props) {
|
|
3
|
+
const { error } = props;
|
|
9
4
|
if (error) {
|
|
10
5
|
switch (error.code) {
|
|
11
6
|
case '404':
|
|
@@ -17,4 +12,5 @@ export function validateNotFound(props: FetchContentResult): void {
|
|
|
17
12
|
throw new Error(error.message);
|
|
18
13
|
}
|
|
19
14
|
}
|
|
20
|
-
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=validateNotFound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateNotFound.js","sourceRoot":"","sources":["../../src/guillotine/validateNotFound.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAGzC,MAAM,UAAU,gBAAgB,CAAC,KAAyB;IACtD,MAAM,EAAC,KAAK,EAAC,GAAG,KAAK,CAAC;IACtB,IAAI,KAAK,EAAE,CAAC;QACR,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACjB,KAAK,KAAK;gBACN,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBACxC,QAAQ,EAAE,CAAC;gBACX,MAAM;YACV;gBACI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBACzC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -1,43 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const {data, meta, error} = props;
|
|
12
|
-
const dataObj = data?.get?.data;
|
|
13
|
-
const pageUrl = dataObj?.target?.pageUrl;
|
|
14
|
-
const parameters = dataObj?.parameters;
|
|
1
|
+
import { notFound, redirect, RedirectType } from 'next/navigation';
|
|
2
|
+
import { RENDER_MODE } from '../common/constants';
|
|
3
|
+
import { IS_DEV_MODE } from '../common/env';
|
|
4
|
+
import { UrlProcessor } from '../common/UrlProcessor';
|
|
5
|
+
export function validateShortcut(props) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const { data, meta, error } = props;
|
|
8
|
+
const dataObj = (_a = data === null || data === void 0 ? void 0 : data.get) === null || _a === void 0 ? void 0 : _a.data;
|
|
9
|
+
const pageUrl = (_b = dataObj === null || dataObj === void 0 ? void 0 : dataObj.target) === null || _b === void 0 ? void 0 : _b.pageUrl;
|
|
10
|
+
const parameters = dataObj === null || dataObj === void 0 ? void 0 : dataObj.parameters;
|
|
15
11
|
if (meta.type === 'base:shortcut' && pageUrl) {
|
|
16
12
|
if (meta.renderMode !== RENDER_MODE.NEXT) {
|
|
17
13
|
// do not show shortcut targets in preview/edit mode
|
|
18
14
|
console.warn(404, `Shortcuts are not available in ${meta.renderMode} render mode`);
|
|
19
15
|
notFound();
|
|
20
16
|
}
|
|
21
|
-
|
|
22
17
|
let destination = UrlProcessor.process(pageUrl, meta, true);
|
|
23
18
|
if (parameters) {
|
|
24
|
-
const searchParams = parameters.map(({name, value}) => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`).join('&');
|
|
19
|
+
const searchParams = parameters.map(({ name, value }) => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`).join('&');
|
|
25
20
|
destination += '?' + searchParams;
|
|
26
21
|
}
|
|
27
22
|
console.debug(`Redirecting shortcut content [${meta.path}] to`, destination);
|
|
28
23
|
redirect(destination, RedirectType.replace);
|
|
29
24
|
}
|
|
30
|
-
|
|
31
25
|
// we can not set 418 for static paths,
|
|
32
26
|
// but we can show 404 instead to be handled in CS
|
|
33
27
|
const canNotRender = meta && !meta.canRender && meta.renderMode !== RENDER_MODE.EDIT;
|
|
34
|
-
|
|
35
28
|
const catchAllInNextProdMode = meta.renderMode === RENDER_MODE.NEXT && !IS_DEV_MODE && meta.catchAll;
|
|
36
|
-
|
|
37
29
|
const isNotFound = (error && error.code === '404') || canNotRender || catchAllInNextProdMode;
|
|
38
|
-
|
|
39
30
|
if (isNotFound) {
|
|
40
31
|
console.warn(404, `Can not render content at [${meta.path}]`);
|
|
41
32
|
notFound();
|
|
42
33
|
}
|
|
43
34
|
}
|
|
35
|
+
//# sourceMappingURL=validateShortcut.js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AAI,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC7H,WAAW,IAAI,GAAG,GAAG,YAAY,CAAC;QACtC,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,iCAAiC,IAAI,CAAC,IAAI,MAAM,EAAE,WAAW,CAAC,CAAC;QAC7E,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,uCAAuC;IACvC,kDAAkD;IAClD,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,WAAW,CAAC,IAAI,CAAC;IAErF,MAAM,sBAAsB,GAAG,IAAI,CAAC,UAAU,KAAK,WAAW,CAAC,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC;IAErG,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,YAAY,IAAI,sBAAsB,CAAC;IAE7F,IAAI,UAAU,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,8BAA8B,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QAC9D,QAAQ,EAAE,CAAC;IACf,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LocaleContextType } from '../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const useLocaleContext: () => LocaleContextType;
|
|
4
|
+
export declare const LocaleContextProvider: ({ children, locale: localeProps }: {
|
|
5
|
+
children: any;
|
|
6
|
+
locale?: string;
|
|
7
|
+
}) => React.JSX.Element;
|