@enonic/nextjs-adapter 3.2.2 → 3.3.0-B2
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/{baseMappings.js → dist/baseMappings.js} +9 -9
- package/dist/baseMappings.js.map +1 -0
- package/dist/client/getClientHydratedHtml.jsx.map +1 -0
- package/dist/client.js.map +1 -0
- package/{common → dist/common}/ComponentRegistry.js +1 -1
- package/dist/common/ComponentRegistry.js.map +1 -0
- package/dist/common/UrlProcessor.js.map +1 -0
- package/dist/common/constants.js.map +1 -0
- package/{common → dist/common}/env.js +1 -1
- package/dist/common/env.js.map +1 -0
- package/dist/guillotine/applyProcessors.js.map +1 -0
- package/dist/guillotine/buildComponentTree.js.map +1 -0
- package/{guillotine → dist/guillotine}/buildErrorResponse.js +3 -3
- package/dist/guillotine/buildErrorResponse.js.map +1 -0
- package/{guillotine → dist/guillotine}/buildPage.js +1 -1
- package/dist/guillotine/buildPage.js.map +1 -0
- package/{guillotine → dist/guillotine}/collectComponentDescriptors.d.ts +1 -1
- package/{guillotine → dist/guillotine}/collectComponentDescriptors.js +4 -4
- package/dist/guillotine/collectComponentDescriptors.js.map +1 -0
- package/{guillotine → dist/guillotine}/combineMultipleQueries.js +1 -1
- package/dist/guillotine/combineMultipleQueries.js.map +1 -0
- package/{guillotine → dist/guillotine}/createMetaData.d.ts +1 -1
- package/{guillotine → dist/guillotine}/createMetaData.js +2 -2
- package/dist/guillotine/createMetaData.js.map +1 -0
- package/{guillotine → dist/guillotine}/fetchContent.js +10 -10
- package/dist/guillotine/fetchContent.js.map +1 -0
- package/{guillotine → dist/guillotine}/fetchContentData.js +2 -2
- package/dist/guillotine/fetchContentData.js.map +1 -0
- package/dist/guillotine/fetchContentPathsForAllLocales.js.map +1 -0
- package/{guillotine → dist/guillotine}/fetchContentPathsForLocale.js +4 -4
- package/dist/guillotine/fetchContentPathsForLocale.js.map +1 -0
- package/{guillotine → dist/guillotine}/fetchFromApi.js +7 -7
- package/dist/guillotine/fetchFromApi.js.map +1 -0
- package/{guillotine → dist/guillotine}/fetchGuillotine.js +6 -6
- package/dist/guillotine/fetchGuillotine.js.map +1 -0
- package/{guillotine → dist/guillotine}/fetchMetaData.js +4 -4
- package/dist/guillotine/fetchMetaData.js.map +1 -0
- package/{guillotine → dist/guillotine}/getCleanContentPathArrayOrThrow400.js +1 -1
- package/dist/guillotine/getCleanContentPathArrayOrThrow400.js.map +1 -0
- package/dist/guillotine/getComponentConfig.js.map +1 -0
- package/dist/guillotine/getContentAndComponentPaths.js.map +1 -0
- package/dist/guillotine/getMetaData.js.map +1 -0
- package/{guillotine → dist/guillotine}/getParentRegion.js +1 -1
- package/dist/guillotine/getParentRegion.js.map +1 -0
- package/{guillotine → dist/guillotine}/getQueryAndVariables.js +2 -2
- package/dist/guillotine/getQueryAndVariables.js.map +1 -0
- package/dist/guillotine/metadata/configQuery.js.map +1 -0
- package/dist/guillotine/metadata/richTextQuery.js.map +1 -0
- package/{guillotine → dist/guillotine}/parseComponentPath.js +3 -3
- package/dist/guillotine/parseComponentPath.js.map +1 -0
- package/dist/guillotine/prefixFragmentCmpPath.js.map +1 -0
- package/dist/guillotine/processComponentConfig.js.map +1 -0
- package/dist/guillotine/restrictComponentsToPath.js.map +1 -0
- package/dist/guillotine/validateData.js.map +1 -0
- package/dist/guillotine/validateNotFound.js.map +1 -0
- package/dist/guillotine/validateShortcut.js.map +1 -0
- package/{i18n → dist/i18n}/LocaleContext.d.ts +1 -1
- package/{i18n → dist/i18n}/LocaleContext.jsx +3 -3
- package/dist/i18n/LocaleContext.jsx.map +1 -0
- package/dist/i18n/i18n.js.map +1 -0
- package/{index.d.ts → dist/index.d.ts} +3 -3
- package/{index.js → dist/index.js} +3 -3
- package/dist/index.js.map +1 -0
- package/dist/query/Shortcut.js.map +1 -0
- package/dist/server/getServerRenderedHtml.js.map +1 -0
- package/dist/server.js.map +1 -0
- package/{types → dist/types}/component.js.map +1 -1
- package/{types → dist/types}/componentProps.d.ts +2 -1
- package/dist/types/componentProps.js.map +1 -0
- package/{types → dist/types}/guillotine.d.ts +1 -1
- package/{types → dist/types}/guillotine.js.map +1 -1
- package/dist/types/i18n.js.map +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/next.js.map +1 -0
- package/dist/types/util.js.map +1 -0
- package/dist/utils/addLineNumbers.js.map +1 -0
- package/{utils → dist/utils}/buildGuillotineRequestHeaders.d.ts +1 -1
- package/{utils → dist/utils}/buildGuillotineRequestHeaders.js +3 -3
- package/dist/utils/buildGuillotineRequestHeaders.js.map +1 -0
- package/dist/utils/commonChars.js.map +1 -0
- package/dist/utils/enonicLog.js.map +1 -0
- package/dist/utils/fixDoubleSlashes.js.map +1 -0
- package/dist/utils/getAllLocales.js.map +1 -0
- package/dist/utils/getContentApiUrl.js.map +1 -0
- package/dist/utils/getLocaleMapping.js.map +1 -0
- package/dist/utils/getLocaleMappingByLocale.js.map +1 -0
- package/dist/utils/getLocaleMappingByProjectId.js.map +1 -0
- package/{utils → dist/utils}/getLocaleMappings.js +1 -1
- package/dist/utils/getLocaleMappings.js.map +1 -0
- package/{utils → dist/utils}/getRenderMode.js +1 -1
- package/dist/utils/getRenderMode.js.map +1 -0
- package/dist/utils/getRequestLocaleInfo.js.map +1 -0
- package/dist/utils/getXpBaseUrl.js.map +1 -0
- package/dist/utils/indent.js.map +1 -0
- package/dist/utils/sanitizeGraphqlName.js.map +1 -0
- package/{views → dist/views}/BaseComponent.d.ts +1 -1
- package/{views → dist/views}/BaseComponent.jsx +5 -5
- package/dist/views/BaseComponent.jsx.map +1 -0
- package/{views → dist/views}/BaseContent.jsx +1 -1
- package/dist/views/BaseContent.jsx.map +1 -0
- package/dist/views/BaseLayout.jsx.map +1 -0
- package/dist/views/BaseMacro.jsx.map +1 -0
- package/dist/views/BasePage.jsx.map +1 -0
- package/dist/views/BasePart.jsx.map +1 -0
- package/dist/views/Empty.jsx.map +1 -0
- package/dist/views/Fragment.jsx.map +1 -0
- package/dist/views/MainView.jsx.map +1 -0
- package/{views → dist/views}/PropsView.jsx +1 -1
- package/dist/views/PropsView.jsx.map +1 -0
- package/dist/views/Region.jsx.map +1 -0
- package/dist/views/RichTextView.jsx +65 -0
- package/dist/views/RichTextView.jsx.map +1 -0
- package/dist/views/SingleComponent.jsx.map +1 -0
- package/dist/views/StaticContent.jsx.map +1 -0
- package/dist/views/Text.jsx.map +1 -0
- package/dist/views/macros/DefaultMacro.jsx.map +1 -0
- package/dist/views/macros/DisableMacro.jsx.map +1 -0
- package/package.json +49 -42
- package/baseMappings.js.map +0 -1
- package/client/getClientHydratedHtml.jsx.map +0 -1
- package/client.js.map +0 -1
- package/common/ComponentRegistry.js.map +0 -1
- package/common/UrlProcessor.js.map +0 -1
- package/common/constants.js.map +0 -1
- package/common/env.js.map +0 -1
- package/guillotine/applyProcessors.js.map +0 -1
- package/guillotine/buildComponentTree.js.map +0 -1
- package/guillotine/buildErrorResponse.js.map +0 -1
- package/guillotine/buildPage.js.map +0 -1
- package/guillotine/collectComponentDescriptors.js.map +0 -1
- package/guillotine/combineMultipleQueries.js.map +0 -1
- package/guillotine/createMetaData.js.map +0 -1
- package/guillotine/fetchContent.js.map +0 -1
- package/guillotine/fetchContentData.js.map +0 -1
- package/guillotine/fetchContentPathsForAllLocales.js.map +0 -1
- package/guillotine/fetchContentPathsForLocale.js.map +0 -1
- package/guillotine/fetchFromApi.js.map +0 -1
- package/guillotine/fetchGuillotine.js.map +0 -1
- package/guillotine/fetchMetaData.js.map +0 -1
- package/guillotine/getCleanContentPathArrayOrThrow400.js.map +0 -1
- package/guillotine/getComponentConfig.js.map +0 -1
- package/guillotine/getContentAndComponentPaths.js.map +0 -1
- package/guillotine/getMetaData.js.map +0 -1
- package/guillotine/getParentRegion.js.map +0 -1
- package/guillotine/getQueryAndVariables.js.map +0 -1
- package/guillotine/metadata/configQuery.js.map +0 -1
- package/guillotine/metadata/richTextQuery.js.map +0 -1
- package/guillotine/parseComponentPath.js.map +0 -1
- package/guillotine/prefixFragmentCmpPath.js.map +0 -1
- package/guillotine/processComponentConfig.js.map +0 -1
- package/guillotine/restrictComponentsToPath.js.map +0 -1
- package/guillotine/validateData.js.map +0 -1
- package/guillotine/validateNotFound.js.map +0 -1
- package/guillotine/validateShortcut.js.map +0 -1
- package/i18n/LocaleContext.jsx.map +0 -1
- package/i18n/i18n.js.map +0 -1
- package/index.js.map +0 -1
- package/query/Shortcut.js.map +0 -1
- package/server/getServerRenderedHtml.js.map +0 -1
- package/server.js.map +0 -1
- package/src/baseMappings.ts +0 -53
- package/src/client/getClientHydratedHtml.tsx +0 -12
- package/src/client.ts +0 -2
- package/src/common/ComponentRegistry.ts +0 -162
- package/src/common/UrlProcessor.ts +0 -172
- package/src/common/constants.ts +0 -92
- package/src/common/env.ts +0 -41
- package/src/guillotine/applyProcessors.ts +0 -38
- package/src/guillotine/buildComponentTree.ts +0 -57
- package/src/guillotine/buildErrorResponse.ts +0 -35
- package/src/guillotine/buildPage.ts +0 -15
- package/src/guillotine/collectComponentDescriptors.ts +0 -63
- package/src/guillotine/combineMultipleQueries.ts +0 -75
- package/src/guillotine/createMetaData.ts +0 -72
- package/src/guillotine/fetchContent.ts +0 -246
- package/src/guillotine/fetchContentData.ts +0 -37
- 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/getCleanContentPathArrayOrThrow400.ts +0 -22
- package/src/guillotine/getComponentConfig.ts +0 -7
- package/src/guillotine/getContentAndComponentPaths.ts +0 -11
- package/src/guillotine/getMetaData.ts +0 -74
- package/src/guillotine/getParentRegion.ts +0 -54
- package/src/guillotine/getQueryAndVariables.ts +0 -52
- package/src/guillotine/metadata/configQuery.ts +0 -46
- package/src/guillotine/metadata/richTextQuery.ts +0 -49
- package/src/guillotine/parseComponentPath.ts +0 -29
- package/src/guillotine/prefixFragmentCmpPath.ts +0 -13
- package/src/guillotine/processComponentConfig.ts +0 -38
- package/src/guillotine/restrictComponentsToPath.ts +0 -48
- package/src/guillotine/validateData.ts +0 -11
- package/src/guillotine/validateNotFound.ts +0 -20
- package/src/guillotine/validateShortcut.ts +0 -43
- package/src/i18n/LocaleContext.tsx +0 -59
- package/src/i18n/i18n.ts +0 -57
- package/src/index.ts +0 -42
- package/src/query/Shortcut.ts +0 -18
- package/src/server/getServerRenderedHtml.ts +0 -3
- package/src/server.ts +0 -5
- package/src/types/component.ts +0 -131
- package/src/types/componentProps.ts +0 -142
- package/src/types/guillotine.ts +0 -428
- package/src/types/i18n.ts +0 -8
- package/src/types/index.ts +0 -62
- 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 -32
- package/src/utils/commonChars.ts +0 -16
- 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/getLocaleMappings.ts +0 -36
- package/src/utils/getRenderMode.ts +0 -14
- package/src/utils/getRequestLocaleInfo.ts +0 -30
- package/src/utils/getXpBaseUrl.ts +0 -12
- package/src/utils/indent.ts +0 -4
- package/src/utils/sanitizeGraphqlName.ts +0 -11
- package/src/views/BaseComponent.tsx +0 -156
- package/src/views/BaseContent.tsx +0 -47
- package/src/views/BaseLayout.tsx +0 -33
- package/src/views/BaseMacro.tsx +0 -105
- package/src/views/BasePage.tsx +0 -42
- package/src/views/BasePart.tsx +0 -34
- package/src/views/Empty.tsx +0 -5
- package/src/views/Fragment.tsx +0 -41
- package/src/views/MainView.tsx +0 -22
- package/src/views/PropsView.tsx +0 -38
- package/src/views/Region.tsx +0 -76
- package/src/views/RichTextView.tsx +0 -63
- 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
- package/types/componentProps.js.map +0 -1
- package/types/i18n.js.map +0 -1
- package/types/index.js.map +0 -1
- package/types/next.js.map +0 -1
- package/types/util.js.map +0 -1
- package/utils/addLineNumbers.js.map +0 -1
- package/utils/buildGuillotineRequestHeaders.js.map +0 -1
- package/utils/commonChars.js.map +0 -1
- package/utils/enonicLog.js.map +0 -1
- package/utils/fixDoubleSlashes.js.map +0 -1
- package/utils/getAllLocales.js.map +0 -1
- package/utils/getContentApiUrl.js.map +0 -1
- package/utils/getLocaleMapping.js.map +0 -1
- package/utils/getLocaleMappingByLocale.js.map +0 -1
- package/utils/getLocaleMappingByProjectId.js.map +0 -1
- package/utils/getLocaleMappings.js.map +0 -1
- package/utils/getRenderMode.js.map +0 -1
- package/utils/getRequestLocaleInfo.js.map +0 -1
- package/utils/getXpBaseUrl.js.map +0 -1
- package/utils/indent.js.map +0 -1
- package/utils/sanitizeGraphqlName.js.map +0 -1
- package/views/BaseComponent.jsx.map +0 -1
- package/views/BaseContent.jsx.map +0 -1
- package/views/BaseLayout.jsx.map +0 -1
- package/views/BaseMacro.jsx.map +0 -1
- package/views/BasePage.jsx.map +0 -1
- package/views/BasePart.jsx.map +0 -1
- package/views/Empty.jsx.map +0 -1
- package/views/Fragment.jsx.map +0 -1
- package/views/MainView.jsx.map +0 -1
- package/views/PropsView.jsx.map +0 -1
- package/views/Region.jsx.map +0 -1
- package/views/RichTextView.jsx +0 -39
- package/views/RichTextView.jsx.map +0 -1
- package/views/SingleComponent.jsx.map +0 -1
- package/views/StaticContent.jsx.map +0 -1
- package/views/Text.jsx.map +0 -1
- package/views/macros/DefaultMacro.jsx.map +0 -1
- package/views/macros/DisableMacro.jsx.map +0 -1
- /package/{baseMappings.d.ts → dist/baseMappings.d.ts} +0 -0
- /package/{client → dist/client}/getClientHydratedHtml.d.ts +0 -0
- /package/{client → dist/client}/getClientHydratedHtml.jsx +0 -0
- /package/{client.d.ts → dist/client.d.ts} +0 -0
- /package/{client.js → dist/client.js} +0 -0
- /package/{common → dist/common}/ComponentRegistry.d.ts +0 -0
- /package/{common → dist/common}/UrlProcessor.d.ts +0 -0
- /package/{common → dist/common}/UrlProcessor.js +0 -0
- /package/{common → dist/common}/constants.d.ts +0 -0
- /package/{common → dist/common}/constants.js +0 -0
- /package/{common → dist/common}/env.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/applyProcessors.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/applyProcessors.js +0 -0
- /package/{guillotine → dist/guillotine}/buildComponentTree.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/buildComponentTree.js +0 -0
- /package/{guillotine → dist/guillotine}/buildErrorResponse.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/buildPage.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/combineMultipleQueries.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchContent.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchContentData.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchContentPathsForAllLocales.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchContentPathsForAllLocales.js +0 -0
- /package/{guillotine → dist/guillotine}/fetchContentPathsForLocale.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchFromApi.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchGuillotine.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/fetchMetaData.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/getCleanContentPathArrayOrThrow400.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/getComponentConfig.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/getComponentConfig.js +0 -0
- /package/{guillotine → dist/guillotine}/getContentAndComponentPaths.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/getContentAndComponentPaths.js +0 -0
- /package/{guillotine → dist/guillotine}/getMetaData.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/getMetaData.js +0 -0
- /package/{guillotine → dist/guillotine}/getParentRegion.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/getQueryAndVariables.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/metadata/configQuery.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/metadata/configQuery.js +0 -0
- /package/{guillotine → dist/guillotine}/metadata/richTextQuery.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/metadata/richTextQuery.js +0 -0
- /package/{guillotine → dist/guillotine}/parseComponentPath.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/prefixFragmentCmpPath.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/prefixFragmentCmpPath.js +0 -0
- /package/{guillotine → dist/guillotine}/processComponentConfig.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/processComponentConfig.js +0 -0
- /package/{guillotine → dist/guillotine}/restrictComponentsToPath.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/restrictComponentsToPath.js +0 -0
- /package/{guillotine → dist/guillotine}/validateData.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/validateData.js +0 -0
- /package/{guillotine → dist/guillotine}/validateNotFound.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/validateNotFound.js +0 -0
- /package/{guillotine → dist/guillotine}/validateShortcut.d.ts +0 -0
- /package/{guillotine → dist/guillotine}/validateShortcut.js +0 -0
- /package/{i18n → dist/i18n}/i18n.d.ts +0 -0
- /package/{i18n → dist/i18n}/i18n.js +0 -0
- /package/{query → dist/query}/Shortcut.d.ts +0 -0
- /package/{query → dist/query}/Shortcut.js +0 -0
- /package/{server → dist/server}/getServerRenderedHtml.d.ts +0 -0
- /package/{server → dist/server}/getServerRenderedHtml.js +0 -0
- /package/{server.d.ts → dist/server.d.ts} +0 -0
- /package/{server.js → dist/server.js} +0 -0
- /package/{types → dist/types}/component.d.ts +0 -0
- /package/{types → dist/types}/component.js +0 -0
- /package/{types → dist/types}/componentProps.js +0 -0
- /package/{types → dist/types}/guillotine.js +0 -0
- /package/{types → dist/types}/i18n.d.ts +0 -0
- /package/{types → dist/types}/i18n.js +0 -0
- /package/{types → dist/types}/index.d.ts +0 -0
- /package/{types → dist/types}/index.js +0 -0
- /package/{types → dist/types}/next.d.ts +0 -0
- /package/{types → dist/types}/next.js +0 -0
- /package/{types → dist/types}/util.d.ts +0 -0
- /package/{types → dist/types}/util.js +0 -0
- /package/{utils → dist/utils}/addLineNumbers.d.ts +0 -0
- /package/{utils → dist/utils}/addLineNumbers.js +0 -0
- /package/{utils → dist/utils}/commonChars.d.ts +0 -0
- /package/{utils → dist/utils}/commonChars.js +0 -0
- /package/{utils → dist/utils}/enonicLog.d.ts +0 -0
- /package/{utils → dist/utils}/enonicLog.js +0 -0
- /package/{utils → dist/utils}/fixDoubleSlashes.d.ts +0 -0
- /package/{utils → dist/utils}/fixDoubleSlashes.js +0 -0
- /package/{utils → dist/utils}/getAllLocales.d.ts +0 -0
- /package/{utils → dist/utils}/getAllLocales.js +0 -0
- /package/{utils → dist/utils}/getContentApiUrl.d.ts +0 -0
- /package/{utils → dist/utils}/getContentApiUrl.js +0 -0
- /package/{utils → dist/utils}/getLocaleMapping.d.ts +0 -0
- /package/{utils → dist/utils}/getLocaleMapping.js +0 -0
- /package/{utils → dist/utils}/getLocaleMappingByLocale.d.ts +0 -0
- /package/{utils → dist/utils}/getLocaleMappingByLocale.js +0 -0
- /package/{utils → dist/utils}/getLocaleMappingByProjectId.d.ts +0 -0
- /package/{utils → dist/utils}/getLocaleMappingByProjectId.js +0 -0
- /package/{utils → dist/utils}/getLocaleMappings.d.ts +0 -0
- /package/{utils → dist/utils}/getRenderMode.d.ts +0 -0
- /package/{utils → dist/utils}/getRequestLocaleInfo.d.ts +0 -0
- /package/{utils → dist/utils}/getRequestLocaleInfo.js +0 -0
- /package/{utils → dist/utils}/getXpBaseUrl.d.ts +0 -0
- /package/{utils → dist/utils}/getXpBaseUrl.js +0 -0
- /package/{utils → dist/utils}/indent.d.ts +0 -0
- /package/{utils → dist/utils}/indent.js +0 -0
- /package/{utils → dist/utils}/sanitizeGraphqlName.d.ts +0 -0
- /package/{utils → dist/utils}/sanitizeGraphqlName.js +0 -0
- /package/{views → dist/views}/BaseContent.d.ts +0 -0
- /package/{views → dist/views}/BaseLayout.d.ts +0 -0
- /package/{views → dist/views}/BaseLayout.jsx +0 -0
- /package/{views → dist/views}/BaseMacro.d.ts +0 -0
- /package/{views → dist/views}/BaseMacro.jsx +0 -0
- /package/{views → dist/views}/BasePage.d.ts +0 -0
- /package/{views → dist/views}/BasePage.jsx +0 -0
- /package/{views → dist/views}/BasePart.d.ts +0 -0
- /package/{views → dist/views}/BasePart.jsx +0 -0
- /package/{views → dist/views}/Empty.d.ts +0 -0
- /package/{views → dist/views}/Empty.jsx +0 -0
- /package/{views → dist/views}/Fragment.d.ts +0 -0
- /package/{views → dist/views}/Fragment.jsx +0 -0
- /package/{views → dist/views}/MainView.d.ts +0 -0
- /package/{views → dist/views}/MainView.jsx +0 -0
- /package/{views → dist/views}/PropsView.d.ts +0 -0
- /package/{views → dist/views}/Region.d.ts +0 -0
- /package/{views → dist/views}/Region.jsx +0 -0
- /package/{views → dist/views}/RichTextView.d.ts +0 -0
- /package/{views → dist/views}/SingleComponent.d.ts +0 -0
- /package/{views → dist/views}/SingleComponent.jsx +0 -0
- /package/{views → dist/views}/StaticContent.d.ts +0 -0
- /package/{views → dist/views}/StaticContent.jsx +0 -0
- /package/{views → dist/views}/Text.d.ts +0 -0
- /package/{views → dist/views}/Text.jsx +0 -0
- /package/{views → dist/views}/macros/DefaultMacro.d.ts +0 -0
- /package/{views → dist/views}/macros/DefaultMacro.jsx +0 -0
- /package/{views → dist/views}/macros/DisableMacro.d.ts +0 -0
- /package/{views → dist/views}/macros/DisableMacro.jsx +0 -0
package/src/index.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
APP_NAME,
|
|
3
|
-
APP_NAME_DASHED,
|
|
4
|
-
APP_NAME_UNDERSCORED,
|
|
5
|
-
IS_DEV_MODE,
|
|
6
|
-
} from './common/env';
|
|
7
|
-
|
|
8
|
-
export type * from './types';
|
|
9
|
-
|
|
10
|
-
export {ComponentRegistry} from './common/ComponentRegistry';
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
CATCH_ALL,
|
|
14
|
-
JSESSIONID_HEADER,
|
|
15
|
-
PORTAL_COMPONENT_ATTRIBUTE,
|
|
16
|
-
PORTAL_REGION_ATTRIBUTE,
|
|
17
|
-
PROJECT_ID_HEADER,
|
|
18
|
-
RENDER_MODE,
|
|
19
|
-
RENDER_MODE_HEADER,
|
|
20
|
-
XP_BASE_URL_HEADER,
|
|
21
|
-
XP_COMPONENT_TYPE,
|
|
22
|
-
XP_REQUEST_TYPE,
|
|
23
|
-
} from './common/constants';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export {richTextQuery} from './guillotine/metadata/richTextQuery';
|
|
27
|
-
export {validateData} from './guillotine/validateData';
|
|
28
|
-
|
|
29
|
-
export {I18n} from './i18n/i18n';
|
|
30
|
-
|
|
31
|
-
export {getContentApiUrl} from './utils/getContentApiUrl';
|
|
32
|
-
export {getLocaleMapping} from './utils/getLocaleMapping';
|
|
33
|
-
export {getLocaleMappingByProjectId} from './utils/getLocaleMappingByProjectId';
|
|
34
|
-
export {getLocaleMappingByLocale} from './utils/getLocaleMappingByLocale';
|
|
35
|
-
export {getRequestLocaleInfo} from './utils/getRequestLocaleInfo';
|
|
36
|
-
export {sanitizeGraphqlName} from './utils/sanitizeGraphqlName';
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
UrlProcessor,
|
|
40
|
-
getAsset,
|
|
41
|
-
getUrl,
|
|
42
|
-
} from './common/UrlProcessor';
|
package/src/query/Shortcut.ts
DELETED
package/src/server.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export {fetchContent} from './guillotine/fetchContent';
|
|
2
|
-
export {fetchContentPathsForAllLocales} from './guillotine/fetchContentPathsForAllLocales';
|
|
3
|
-
export {fetchContentPathsForLocale} from './guillotine/fetchContentPathsForLocale';
|
|
4
|
-
export {fetchFromApi} from './guillotine/fetchFromApi';
|
|
5
|
-
export {fetchGuillotine} from './guillotine/fetchGuillotine';
|
package/src/types/component.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import type {XP_COMPONENT_TYPE} from '../common/constants';
|
|
2
|
-
import type {Context} from './next';
|
|
3
|
-
import type {
|
|
4
|
-
RichTextData as CompsRichTextData,
|
|
5
|
-
LinkData as CompsLinkData,
|
|
6
|
-
ImageData as CompsImageData,
|
|
7
|
-
MacroData as CompsMacroData,
|
|
8
|
-
} from '@enonic/react-components';
|
|
9
|
-
|
|
10
|
-
// Differs from ComponentDefinition to avoid storing catchAll on all components
|
|
11
|
-
// catchAll is calculated in getType instead
|
|
12
|
-
export interface ComponentDefinitionParams {
|
|
13
|
-
query?: SelectedQueryMaybeVariablesFunc
|
|
14
|
-
configQuery?: string
|
|
15
|
-
processor?: DataProcessor
|
|
16
|
-
view?: React.FunctionComponent<any>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Object that configures the handling of a particular content type. All attributes are optional (see examples below), and missing values will fall back to default behavior:
|
|
21
|
-
* - 'query' (used in fetchContent.ts) Guillotine query for fetching content data, may also have a function that supplies guillotine variables. So, 'query' can EITHER be only a query string, OR also add a get-guillotine-variables function. In the latter case, 'query' can be an object with 'query' and 'variables' attributes, or an array where the query string is first and the get-variables function is second. Either way, the get-variables function takes two arguments: path (content path, mandatory) and context (next.js-supplied Context from getServerSideProps etc. Optional, and requires that fetchContent is called with the context, of course).
|
|
22
|
-
* - 'props' (used in fetchContent.ts) is a function for processing props after fetching them
|
|
23
|
-
* - 'view' (used in BasePage.tsx) is a React component: top-level content-type-specific rendering with the props first fetched from guillotine (and then optionally preprocessed with the function in 'props').
|
|
24
|
-
*/
|
|
25
|
-
export interface ComponentDefinition {
|
|
26
|
-
catchAll?: boolean; // will be set automatically depending on the binding
|
|
27
|
-
query?: SelectedQueryMaybeVariablesFunc,
|
|
28
|
-
configQuery?: string,
|
|
29
|
-
processor?: DataProcessor,
|
|
30
|
-
view?: React.FunctionComponent<any>
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface ComponentDescriptor {
|
|
34
|
-
type?: ComponentDefinition;
|
|
35
|
-
component?: PageComponent;
|
|
36
|
-
queryAndVariables?: QueryAndVariables;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type ComponentDictionary = Record<string, ComponentDefinitionParams>;
|
|
40
|
-
|
|
41
|
-
// NB! Always return null or empty object from processor for next is unable to serialize undefined
|
|
42
|
-
export type DataProcessor = (data: any, context?: Context, config?: any) => Promise<Record<string, any>>;
|
|
43
|
-
|
|
44
|
-
export interface FragmentData {
|
|
45
|
-
id: string;
|
|
46
|
-
fragment: {
|
|
47
|
-
components: PageComponent[];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type ImageData = CompsImageData;
|
|
52
|
-
|
|
53
|
-
export interface LayoutData {
|
|
54
|
-
descriptor: string;
|
|
55
|
-
config?: any;
|
|
56
|
-
|
|
57
|
-
[customKeysFromQuery: string]: any;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export type LinkData = CompsLinkData;
|
|
61
|
-
|
|
62
|
-
export type MacroConfig = Record<string, any>;
|
|
63
|
-
|
|
64
|
-
export type MacroData = CompsMacroData;
|
|
65
|
-
|
|
66
|
-
export interface PageComponent {
|
|
67
|
-
[key: string]: any; // keeps ts happy when accessing component data field by XP_COMPONENT_TYPE type
|
|
68
|
-
type: XP_COMPONENT_TYPE;
|
|
69
|
-
path: string;
|
|
70
|
-
page?: PageData;
|
|
71
|
-
part?: PartData;
|
|
72
|
-
layout?: LayoutData;
|
|
73
|
-
fragment?: FragmentData;
|
|
74
|
-
text?: TextData;
|
|
75
|
-
image?: any;
|
|
76
|
-
regions?: RegionTree;
|
|
77
|
-
data?: any;
|
|
78
|
-
error?: any;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface PageData {
|
|
82
|
-
descriptor: string;
|
|
83
|
-
config?: any;
|
|
84
|
-
template?: string | null;
|
|
85
|
-
regions?: RegionTree;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface PageRegion {
|
|
89
|
-
name: string;
|
|
90
|
-
components: PageComponent[];
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface PartData {
|
|
94
|
-
descriptor: string;
|
|
95
|
-
config: any; // TODO NestedRecord?;
|
|
96
|
-
|
|
97
|
-
[customKeysFromQuery: string]: any;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface QueryAndVariables {
|
|
101
|
-
query: string
|
|
102
|
-
variables?: Record<string, any>
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type QueryGetter = (path: string, context?: Context, config?: any) => string;
|
|
106
|
-
|
|
107
|
-
export type SelectedQueryMaybeVariablesFunc =
|
|
108
|
-
| string
|
|
109
|
-
| QueryGetter
|
|
110
|
-
| {
|
|
111
|
-
query: string | QueryGetter
|
|
112
|
-
variables: VariablesGetter
|
|
113
|
-
}
|
|
114
|
-
| [string | QueryGetter, VariablesGetter];
|
|
115
|
-
|
|
116
|
-
export type RegionTree = Record<string, PageRegion>;
|
|
117
|
-
|
|
118
|
-
export type RichTextData = CompsRichTextData;
|
|
119
|
-
|
|
120
|
-
export interface TextData {
|
|
121
|
-
value: RichTextData;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// TODO: also access as arguments: dataAsJson, pageAsJson, configAsJson from the first (meta) call here?
|
|
125
|
-
// Another option could be to let the component or page controller pass those values to NextJS by a header
|
|
126
|
-
export type VariablesGetter = (path: string, context?: Context, config?: any) => VariablesGetterResult;
|
|
127
|
-
|
|
128
|
-
export interface VariablesGetterResult {
|
|
129
|
-
[variables: string]: any
|
|
130
|
-
path: string
|
|
131
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import {DOMNode} from 'html-react-parser';
|
|
2
|
-
import type {RENDER_MODE, XP_REQUEST_TYPE} from '../common/constants';
|
|
3
|
-
import type {
|
|
4
|
-
FragmentData,
|
|
5
|
-
LayoutData,
|
|
6
|
-
MacroConfig,
|
|
7
|
-
MacroData,
|
|
8
|
-
PageComponent,
|
|
9
|
-
PageData,
|
|
10
|
-
PartData,
|
|
11
|
-
RichTextData,
|
|
12
|
-
RegionTree,
|
|
13
|
-
} from './component';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export interface BaseComponentProps {
|
|
17
|
-
component: PageComponent;
|
|
18
|
-
meta: MetaData;
|
|
19
|
-
common?: any; // Content is passed down for optional consumption in componentviews.
|
|
20
|
-
// TODO: Use a react contextprovider instead of "manually" passing everything down
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface BaseLayoutProps {
|
|
24
|
-
component?: LayoutData;
|
|
25
|
-
path: string;
|
|
26
|
-
regions?: RegionTree;
|
|
27
|
-
common?: any;
|
|
28
|
-
meta: MetaData;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface BaseMacroProps {
|
|
32
|
-
children: string | React.ReactNode;
|
|
33
|
-
data: Omit<MacroData, 'ref'>;
|
|
34
|
-
meta: MetaData;
|
|
35
|
-
renderInEditMode?: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface BasePageProps {
|
|
39
|
-
component?: PageData;
|
|
40
|
-
path?: string;
|
|
41
|
-
common?: any;
|
|
42
|
-
data?: any;
|
|
43
|
-
error?: string;
|
|
44
|
-
meta: MetaData;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface BasePartProps {
|
|
48
|
-
component?: PartData;
|
|
49
|
-
path: string;
|
|
50
|
-
common?: any;
|
|
51
|
-
data?: any;
|
|
52
|
-
error?: string;
|
|
53
|
-
meta: MetaData;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface FragmentProps {
|
|
57
|
-
page?: PageData;
|
|
58
|
-
component?: FragmentData;
|
|
59
|
-
common?: any;
|
|
60
|
-
meta: MetaData;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface LayoutProps {
|
|
64
|
-
layout: LayoutData;
|
|
65
|
-
path: string;
|
|
66
|
-
common: any;
|
|
67
|
-
meta: MetaData;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface MacroProps {
|
|
71
|
-
name: string;
|
|
72
|
-
children: string | React.ReactNode;
|
|
73
|
-
config: MacroConfig;
|
|
74
|
-
meta: MetaData;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface MetaData {
|
|
78
|
-
id: string,
|
|
79
|
-
type: string,
|
|
80
|
-
path: string,
|
|
81
|
-
requestType: XP_REQUEST_TYPE,
|
|
82
|
-
renderMode: RENDER_MODE,
|
|
83
|
-
requestedComponent?: PageComponent,
|
|
84
|
-
canRender: boolean,
|
|
85
|
-
catchAll: boolean,
|
|
86
|
-
apiUrl: string,
|
|
87
|
-
baseUrl: string,
|
|
88
|
-
locale: string,
|
|
89
|
-
defaultLocale: string,
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface PageProps {
|
|
93
|
-
page: PageData;
|
|
94
|
-
path: string;
|
|
95
|
-
data?: any;
|
|
96
|
-
common?: any; // Content is passed down to componentviews. TODO: Use a react contextprovider instead?
|
|
97
|
-
meta: MetaData;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface PartProps {
|
|
101
|
-
part: PartData
|
|
102
|
-
path: string
|
|
103
|
-
data?: any
|
|
104
|
-
// Content is passed down to componentviews. TODO: Use a react contextprovider instead?
|
|
105
|
-
common?: any
|
|
106
|
-
meta: MetaData
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface RegionProps {
|
|
110
|
-
name: string
|
|
111
|
-
components?: PageComponent[]
|
|
112
|
-
className?: string
|
|
113
|
-
// Content is passed down for optional consumption in componentviews. TODO: Use a react contextprovider instead?
|
|
114
|
-
common?: any
|
|
115
|
-
meta: MetaData
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface RegionsProps {
|
|
119
|
-
page: PageData | null;
|
|
120
|
-
name?: string;
|
|
121
|
-
// Content is passed down for optional consumption in componentviews. TODO: Use a react contextprovider instead?
|
|
122
|
-
common?: any;
|
|
123
|
-
meta: MetaData;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export type Replacer = (
|
|
127
|
-
domNode: DOMNode,
|
|
128
|
-
data: RichTextData,
|
|
129
|
-
meta: MetaData,
|
|
130
|
-
renderMacroInEditMode: boolean
|
|
131
|
-
) => ReplacerResult;
|
|
132
|
-
|
|
133
|
-
export type ReplacerResult = JSX.Element | DOMNode;
|
|
134
|
-
|
|
135
|
-
export interface RichTextViewProps {
|
|
136
|
-
data: RichTextData
|
|
137
|
-
meta: MetaData
|
|
138
|
-
className?: string
|
|
139
|
-
tag?: string
|
|
140
|
-
renderMacroInEditMode?: boolean
|
|
141
|
-
customReplacer?: Replacer
|
|
142
|
-
}
|