@sitecore-content-sdk/nextjs 1.3.0-canary.9 → 1.4.0-canary.2
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/README.md +11 -11
- package/dist/cjs/client/index.js +10 -10
- package/dist/cjs/client/models.js +2 -2
- package/dist/cjs/client/sitecore-nextjs-client.js +160 -156
- package/dist/cjs/components/BYOCWrapper.js +31 -30
- package/dist/cjs/components/ComponentPropsContext.js +66 -59
- package/dist/cjs/components/FEaaSWrapper.js +33 -32
- package/dist/cjs/components/Link.js +117 -90
- package/dist/cjs/components/NextImage.js +66 -62
- package/dist/cjs/components/Placeholder.js +55 -50
- package/dist/cjs/components/RichText.js +133 -128
- package/dist/cjs/config/define-config.js +26 -25
- package/dist/cjs/config/index.js +5 -5
- package/dist/cjs/config-cli/define-cli-config.js +40 -39
- package/dist/cjs/config-cli/index.js +5 -5
- package/dist/cjs/editing/codegen/import-map.js +129 -118
- package/dist/cjs/editing/codegen/index.js +6 -6
- package/dist/cjs/editing/constants.js +10 -10
- package/dist/cjs/editing/editing-config-middleware.js +70 -69
- package/dist/cjs/editing/editing-render-middleware.js +145 -144
- package/dist/cjs/editing/feaas-render-middleware.js +102 -101
- package/dist/cjs/editing/index.js +19 -19
- package/dist/cjs/editing/render-middleware.js +46 -46
- package/dist/cjs/editing/utils.js +260 -257
- package/dist/cjs/index.js +132 -131
- package/dist/cjs/middleware/app-router-multisite-middleware.js +41 -20
- package/dist/cjs/middleware/index.js +30 -30
- package/dist/cjs/middleware/locale-middleware.js +85 -84
- package/dist/cjs/middleware/middleware.js +195 -192
- package/dist/cjs/middleware/multisite-middleware.js +141 -118
- package/dist/cjs/middleware/personalize-middleware.js +240 -236
- package/dist/cjs/middleware/redirects-middleware.js +323 -297
- package/dist/cjs/middleware/robots-middleware.js +45 -44
- package/dist/cjs/middleware/sitemap-middleware.js +50 -49
- package/dist/cjs/monitoring/healthcheck-middleware.js +31 -30
- package/dist/cjs/monitoring/index.js +5 -5
- package/dist/cjs/route-handler/editing-config-route-handler.js +110 -106
- package/dist/cjs/route-handler/editing-render-route-handler.js +270 -165
- package/dist/cjs/route-handler/index.js +11 -11
- package/dist/cjs/route-handler/robots-route-handler.js +69 -68
- package/dist/cjs/route-handler/sitemap-route-handler.js +66 -65
- package/dist/cjs/search/index.js +17 -0
- package/dist/cjs/services/component-props-service.js +142 -138
- package/dist/cjs/sharedTypes/component-props.js +2 -2
- package/dist/cjs/sharedTypes/sitecore-page-props.js +2 -2
- package/dist/cjs/site/index.js +5 -5
- package/dist/cjs/tools/codegen/import-map.js +15 -0
- package/dist/cjs/tools/component-props.loader.js +95 -95
- package/dist/cjs/tools/generate-map.js +317 -317
- package/dist/cjs/tools/index.js +14 -13
- package/dist/cjs/tools/templating/byoc-component.js +36 -36
- package/dist/cjs/tools/templating/constants.js +7 -7
- package/dist/cjs/tools/templating/default-component.js +35 -35
- package/dist/cjs/tools/templating/utils.js +200 -0
- package/dist/cjs/utils/index.js +14 -14
- package/dist/cjs/utils/utils.js +82 -73
- package/dist/esm/client/index.js +2 -2
- package/dist/esm/client/models.js +1 -1
- package/dist/esm/client/sitecore-nextjs-client.js +156 -152
- package/dist/esm/components/BYOCWrapper.js +27 -26
- package/dist/esm/components/ComponentPropsContext.js +28 -21
- package/dist/esm/components/FEaaSWrapper.js +29 -28
- package/dist/esm/components/Link.js +78 -51
- package/dist/esm/components/NextImage.js +60 -56
- package/dist/esm/components/Placeholder.js +18 -13
- package/dist/esm/components/RichText.js +96 -91
- package/dist/esm/config/define-config.js +21 -20
- package/dist/esm/config/index.js +1 -1
- package/dist/esm/config-cli/define-cli-config.js +36 -35
- package/dist/esm/config-cli/index.js +1 -1
- package/dist/esm/editing/codegen/import-map.js +92 -81
- package/dist/esm/editing/codegen/index.js +1 -1
- package/dist/esm/editing/constants.js +7 -7
- package/dist/esm/editing/editing-config-middleware.js +66 -65
- package/dist/esm/editing/editing-render-middleware.js +141 -140
- package/dist/esm/editing/feaas-render-middleware.js +98 -97
- package/dist/esm/editing/index.js +6 -6
- package/dist/esm/editing/render-middleware.js +42 -42
- package/dist/esm/editing/utils.js +246 -243
- package/dist/esm/index.js +25 -25
- package/dist/esm/middleware/app-router-multisite-middleware.js +37 -16
- package/dist/esm/middleware/index.js +11 -11
- package/dist/esm/middleware/locale-middleware.js +81 -80
- package/dist/esm/middleware/middleware.js +189 -186
- package/dist/esm/middleware/multisite-middleware.js +137 -114
- package/dist/esm/middleware/personalize-middleware.js +236 -232
- package/dist/esm/middleware/redirects-middleware.js +316 -290
- package/dist/esm/middleware/robots-middleware.js +41 -40
- package/dist/esm/middleware/sitemap-middleware.js +46 -45
- package/dist/esm/monitoring/healthcheck-middleware.js +27 -26
- package/dist/esm/monitoring/index.js +1 -1
- package/dist/esm/route-handler/editing-config-route-handler.js +106 -102
- package/dist/esm/route-handler/editing-render-route-handler.js +265 -160
- package/dist/esm/route-handler/index.js +4 -4
- package/dist/esm/route-handler/robots-route-handler.js +65 -64
- package/dist/esm/route-handler/sitemap-route-handler.js +63 -62
- package/dist/esm/search/index.js +1 -0
- package/dist/esm/services/component-props-service.js +135 -131
- package/dist/esm/sharedTypes/component-props.js +1 -1
- package/dist/esm/sharedTypes/sitecore-page-props.js +1 -1
- package/dist/esm/site/index.js +1 -1
- package/dist/esm/tools/codegen/import-map.js +11 -0
- package/dist/esm/tools/component-props.loader.js +59 -59
- package/dist/esm/tools/generate-map.js +279 -279
- package/dist/esm/tools/index.js +3 -2
- package/dist/esm/tools/templating/byoc-component.js +30 -30
- package/dist/esm/tools/templating/constants.js +4 -4
- package/dist/esm/tools/templating/default-component.js +29 -29
- package/dist/esm/tools/templating/utils.js +190 -0
- package/dist/esm/utils/index.js +3 -3
- package/dist/esm/utils/utils.js +74 -65
- package/package.json +87 -13
- package/search.d.ts +1 -0
- package/types/client/index.d.ts +3 -2
- package/types/client/index.d.ts.map +1 -0
- package/types/client/models.d.ts +9 -8
- package/types/client/models.d.ts.map +1 -0
- package/types/client/sitecore-nextjs-client.d.ts +68 -63
- package/types/client/sitecore-nextjs-client.d.ts.map +1 -0
- package/types/components/BYOCWrapper.d.ts +16 -14
- package/types/components/BYOCWrapper.d.ts.map +1 -0
- package/types/components/ComponentPropsContext.d.ts +30 -18
- package/types/components/ComponentPropsContext.d.ts.map +1 -0
- package/types/components/FEaaSWrapper.d.ts +17 -15
- package/types/components/FEaaSWrapper.d.ts.map +1 -0
- package/types/components/Link.d.ts +25 -15
- package/types/components/Link.d.ts.map +1 -0
- package/types/components/NextImage.d.ts +11 -6
- package/types/components/NextImage.d.ts.map +1 -0
- package/types/components/Placeholder.d.ts +14 -8
- package/types/components/Placeholder.d.ts.map +1 -0
- package/types/components/RichText.d.ts +35 -25
- package/types/components/RichText.d.ts.map +1 -0
- package/types/config/define-config.d.ts +42 -38
- package/types/config/define-config.d.ts.map +1 -0
- package/types/config/index.d.ts +2 -1
- package/types/config/index.d.ts.map +1 -0
- package/types/config-cli/define-cli-config.d.ts +10 -8
- package/types/config-cli/define-cli-config.d.ts.map +1 -0
- package/types/config-cli/index.d.ts +2 -1
- package/types/config-cli/index.d.ts.map +1 -0
- package/types/editing/codegen/import-map.d.ts +15 -3
- package/types/editing/codegen/import-map.d.ts.map +1 -0
- package/types/editing/codegen/index.d.ts +3 -2
- package/types/editing/codegen/index.d.ts.map +1 -0
- package/types/editing/constants.d.ts +8 -7
- package/types/editing/constants.d.ts.map +1 -0
- package/types/editing/editing-config-middleware.d.ts +37 -31
- package/types/editing/editing-config-middleware.d.ts.map +1 -0
- package/types/editing/editing-render-middleware.d.ts +47 -44
- package/types/editing/editing-render-middleware.d.ts.map +1 -0
- package/types/editing/feaas-render-middleware.d.ts +35 -32
- package/types/editing/feaas-render-middleware.d.ts.map +1 -0
- package/types/editing/index.d.ts +7 -6
- package/types/editing/index.d.ts.map +1 -0
- package/types/editing/render-middleware.d.ts +26 -25
- package/types/editing/render-middleware.d.ts.map +1 -0
- package/types/editing/utils.d.ts +110 -106
- package/types/editing/utils.d.ts.map +1 -0
- package/types/index.d.ts +25 -24
- package/types/index.d.ts.map +1 -0
- package/types/middleware/app-router-multisite-middleware.d.ts +28 -13
- package/types/middleware/app-router-multisite-middleware.d.ts.map +1 -0
- package/types/middleware/index.d.ts +12 -11
- package/types/middleware/index.d.ts.map +1 -0
- package/types/middleware/locale-middleware.d.ts +35 -32
- package/types/middleware/locale-middleware.d.ts.map +1 -0
- package/types/middleware/middleware.d.ts +135 -127
- package/types/middleware/middleware.d.ts.map +1 -0
- package/types/middleware/multisite-middleware.d.ts +54 -37
- package/types/middleware/multisite-middleware.d.ts.map +1 -0
- package/types/middleware/personalize-middleware.d.ts +81 -65
- package/types/middleware/personalize-middleware.d.ts.map +1 -0
- package/types/middleware/redirects-middleware.d.ts +68 -65
- package/types/middleware/redirects-middleware.d.ts.map +1 -0
- package/types/middleware/robots-middleware.d.ts +15 -13
- package/types/middleware/robots-middleware.d.ts.map +1 -0
- package/types/middleware/sitemap-middleware.d.ts +16 -14
- package/types/middleware/sitemap-middleware.d.ts.map +1 -0
- package/types/monitoring/healthcheck-middleware.d.ts +14 -12
- package/types/monitoring/healthcheck-middleware.d.ts.map +1 -0
- package/types/monitoring/index.d.ts +2 -1
- package/types/monitoring/index.d.ts.map +1 -0
- package/types/route-handler/editing-config-route-handler.d.ts +30 -24
- package/types/route-handler/editing-config-route-handler.d.ts.map +1 -0
- package/types/route-handler/editing-render-route-handler.d.ts +33 -25
- package/types/route-handler/editing-render-route-handler.d.ts.map +1 -0
- package/types/route-handler/index.d.ts +5 -4
- package/types/route-handler/index.d.ts.map +1 -0
- package/types/route-handler/robots-route-handler.d.ts +30 -28
- package/types/route-handler/robots-route-handler.d.ts.map +1 -0
- package/types/route-handler/sitemap-route-handler.d.ts +30 -28
- package/types/route-handler/sitemap-route-handler.d.ts.map +1 -0
- package/types/search/index.d.ts +2 -0
- package/types/search/index.d.ts.map +1 -0
- package/types/services/component-props-service.d.ts +62 -57
- package/types/services/component-props-service.d.ts.map +1 -0
- package/types/sharedTypes/component-props.d.ts +62 -47
- package/types/sharedTypes/component-props.d.ts.map +1 -0
- package/types/sharedTypes/sitecore-page-props.d.ts +14 -9
- package/types/sharedTypes/sitecore-page-props.d.ts.map +1 -0
- package/types/site/index.d.ts +2 -1
- package/types/site/index.d.ts.map +1 -0
- package/types/tools/codegen/import-map.d.ts +10 -0
- package/types/tools/codegen/import-map.d.ts.map +1 -0
- package/types/tools/component-props.loader.d.ts +8 -7
- package/types/tools/component-props.loader.d.ts.map +1 -0
- package/types/tools/generate-map.d.ts +26 -24
- package/types/tools/generate-map.d.ts.map +1 -0
- package/types/tools/index.d.ts +4 -2
- package/types/tools/index.d.ts.map +1 -0
- package/types/tools/templating/byoc-component.d.ts +3 -2
- package/types/tools/templating/byoc-component.d.ts.map +1 -0
- package/types/tools/templating/constants.d.ts +5 -4
- package/types/tools/templating/constants.d.ts.map +1 -0
- package/types/tools/templating/default-component.d.ts +3 -2
- package/types/tools/templating/default-component.d.ts.map +1 -0
- package/types/tools/templating/utils.d.ts +44 -0
- package/types/tools/templating/utils.d.ts.map +1 -0
- package/types/utils/index.d.ts +4 -3
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/utils.d.ts +34 -24
- package/types/utils/utils.d.ts.map +1 -0
- package/client.js +0 -1
- package/codegen.js +0 -1
- package/config-cli.js +0 -1
- package/config.js +0 -1
- package/editing.js +0 -1
- package/middleware.js +0 -1
- package/monitoring.js +0 -1
- package/route-handler.js +0 -1
- package/site.js +0 -1
- package/tools.js +0 -1
- package/utils.js +0 -1
package/types/client/models.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Static params shape for the Next.js App Router `generateStaticParams`.
|
|
3
|
-
*/
|
|
4
|
-
export type StaticParams = {
|
|
5
|
-
site: string;
|
|
6
|
-
locale: string;
|
|
7
|
-
path: string[];
|
|
8
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Static params shape for the Next.js App Router `generateStaticParams`.
|
|
3
|
+
*/
|
|
4
|
+
export type StaticParams = {
|
|
5
|
+
site: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
path: string[];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/client/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC"}
|
|
@@ -1,63 +1,68 @@
|
|
|
1
|
-
import { FetchOptions, Page, PageOptions, SitecoreClient, SitecoreClientInit } from '@sitecore-content-sdk/core/client';
|
|
2
|
-
import { ComponentPropsCollection, NextjsContentSdkComponent } from '../sharedTypes/component-props';
|
|
3
|
-
import { GetServerSidePropsContext, GetStaticPropsContext, PreviewData } from 'next';
|
|
4
|
-
import { LayoutServiceData } from '@sitecore-content-sdk/core/layout';
|
|
5
|
-
import { ComponentPropsService } from '../services/component-props-service';
|
|
6
|
-
import { ComponentMap } from '@sitecore-content-sdk/react';
|
|
7
|
-
import { StaticParams } from './models';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
1
|
+
import { FetchOptions, Page, PageOptions, SitecoreClient, SitecoreClientInit } from '@sitecore-content-sdk/core/client';
|
|
2
|
+
import { ComponentPropsCollection, NextjsContentSdkComponent } from '../sharedTypes/component-props';
|
|
3
|
+
import { GetServerSidePropsContext, GetStaticPropsContext, PreviewData } from 'next';
|
|
4
|
+
import { LayoutServiceData } from '@sitecore-content-sdk/core/layout';
|
|
5
|
+
import { ComponentPropsService } from '../services/component-props-service';
|
|
6
|
+
import { ComponentMap } from '@sitecore-content-sdk/react';
|
|
7
|
+
import { StaticParams } from './models';
|
|
8
|
+
/**
|
|
9
|
+
* The SitecoreNextjsClient class extends the SitecoreClient class to provide additional functionality for Next.js.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare class SitecoreNextjsClient extends SitecoreClient {
|
|
13
|
+
protected initOptions: SitecoreClientInit;
|
|
14
|
+
protected componentPropsService: ComponentPropsService;
|
|
15
|
+
constructor(initOptions: SitecoreClientInit);
|
|
16
|
+
/**
|
|
17
|
+
* Gets site name based on the provided path
|
|
18
|
+
* @param {string | string[]} path path to get site name from
|
|
19
|
+
* @returns site name, or default site info if not found
|
|
20
|
+
*/
|
|
21
|
+
getSiteNameFromPath(path: string | string[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Normalizes a nextjs path that could have been rewritten
|
|
24
|
+
* @param {string | string[]} path nextjs path
|
|
25
|
+
* @returns path string without nextjs prefixes
|
|
26
|
+
*/
|
|
27
|
+
parsePath(path: string | string[]): string;
|
|
28
|
+
getPage(path: string | string[], pageOptions: PageOptions, options?: FetchOptions): Promise<Page | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Get design library page details for Design Library mode of your app
|
|
31
|
+
* @param {PreviewData} designLibData preview data set in 'library' mode of the app
|
|
32
|
+
* @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
|
|
33
|
+
* @returns {Page} preview page for Design Library
|
|
34
|
+
*/
|
|
35
|
+
getDesignLibraryData(designLibData: PreviewData, fetchOptions?: FetchOptions): Promise<Page>;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves preview page and layout details
|
|
38
|
+
* @param {PreviewData} previewData - The editing preview data for metadata mode.
|
|
39
|
+
* @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests (like retries and fetch)
|
|
40
|
+
*/
|
|
41
|
+
getPreview(previewData: PreviewData, fetchOptions?: FetchOptions): Promise<Page | null>;
|
|
42
|
+
/**
|
|
43
|
+
* Generates static params for the Next.js App Router from Sitecore routes.
|
|
44
|
+
*
|
|
45
|
+
* Fetches routes for the specified `sites` and `languages`, then converts them into
|
|
46
|
+
* objects consumable by `generateStaticParams`. Internal multisite segments are removed.
|
|
47
|
+
* The `site` name is resolved from the path. If a route lacks a locale, the
|
|
48
|
+
* client's `defaultLanguage` is used.
|
|
49
|
+
*
|
|
50
|
+
* **NOTE**: App Router only. For the Pages Router, use `getPagePaths`.
|
|
51
|
+
* @param {string[]} sites - An array of site names to fetch routes for.
|
|
52
|
+
* @param {string[]} [languages] - Language codes to generate params for.
|
|
53
|
+
* @param {FetchOptions} [fetchOptions] - Additional fetch options.
|
|
54
|
+
* @returns {Promise<StaticParams[]>} Array of `{ site, locale, path }` entries for `generateStaticParams`.
|
|
55
|
+
*/
|
|
56
|
+
getAppRouterStaticParams(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticParams[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Parses components from nextjs component map and layoutData, executes getServerProps/getStaticProps methods
|
|
59
|
+
* and returns resulting props from components
|
|
60
|
+
* @param {LayoutServiceData} layoutData layout data to parse compnents from
|
|
61
|
+
* @param {PreviewData} context Nextjs preview data
|
|
62
|
+
* @param {ComponentMap<NextjsContentSdkComponent>} components component map to get props for
|
|
63
|
+
* @returns {ComponentPropsCollection} component props
|
|
64
|
+
*/
|
|
65
|
+
getComponentData(layoutData: LayoutServiceData, context: GetServerSidePropsContext | GetStaticPropsContext, components: ComponentMap<NextjsContentSdkComponent>): Promise<ComponentPropsCollection>;
|
|
66
|
+
protected getComponentPropsService(): ComponentPropsService;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=sitecore-nextjs-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sitecore-nextjs-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-nextjs-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAU5E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IAE1C,SAAS,CAAC,WAAW,EAAE,kBAAkB;IADrD,SAAS,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;gBACjC,WAAW,EAAE,kBAAkB;IAKrD;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAO3C;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAK3B,OAAO,CACX,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAmBvB;;;;;OAKG;IACG,oBAAoB,CACxB,aAAa,EAAE,WAAW,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;OAIG;IACG,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAI7F;;;;;;;;;;;;;OAaG;IACG,wBAAwB,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;IAmB1B;;;;;;;OAOG;IACG,gBAAgB,CACpB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,yBAAyB,GAAG,qBAAqB,EAC1D,UAAU,EAAE,YAAY,CAAC,yBAAyB,CAAC,GAClD,OAAO,CAAC,wBAAwB,CAAC;IA2BpC,SAAS,CAAC,wBAAwB,IAAI,qBAAqB;CAG5D"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { BYOCWrapper } from '@sitecore-content-sdk/react';
|
|
2
|
-
import { GetComponentServerProps } from '../sharedTypes/component-props';
|
|
3
|
-
/**
|
|
4
|
-
* TODO: remove when framework agnostic forms implemented
|
|
5
|
-
* This is a repackaged version of the React BYOCWrapper component with support for
|
|
6
|
-
* server rendering in Next.js (using component-level data-fetching feature of Content SDK).
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Will be called during SSG or SSR
|
|
10
|
-
* @param {ComponentRendering} rendering
|
|
11
|
-
* @returns {GetStaticPropsContext | GetStaticPropsContext} context with type depending on SSR or SSG mode
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
1
|
+
import { BYOCWrapper } from '@sitecore-content-sdk/react';
|
|
2
|
+
import { GetComponentServerProps } from '../sharedTypes/component-props';
|
|
3
|
+
/**
|
|
4
|
+
* TODO: remove when framework agnostic forms implemented
|
|
5
|
+
* This is a repackaged version of the React BYOCWrapper component with support for
|
|
6
|
+
* server rendering in Next.js (using component-level data-fetching feature of Content SDK).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Will be called during SSG or SSR
|
|
10
|
+
* @param {ComponentRendering} rendering
|
|
11
|
+
* @returns {GetStaticPropsContext | GetStaticPropsContext} context with type depending on SSR or SSG mode
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const getComponentServerProps: GetComponentServerProps;
|
|
15
|
+
export default BYOCWrapper;
|
|
16
|
+
//# sourceMappingURL=BYOCWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BYOCWrapper.d.ts","sourceRoot":"","sources":["../../src/components/BYOCWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAIrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import React, { ReactNode, JSX } from 'react';
|
|
2
|
-
import { ComponentPropsCollection } from '../sharedTypes/component-props';
|
|
3
|
-
/**
|
|
4
|
-
* Component props context which we are using in order to store data fetched on components level (getComponentServerProps)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import React, { ReactNode, JSX } from 'react';
|
|
2
|
+
import { ComponentPropsCollection } from '../sharedTypes/component-props';
|
|
3
|
+
/**
|
|
4
|
+
* Component props context which we are using in order to store data fetched on components level (getComponentServerProps)
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const ComponentPropsReactContext: React.Context<ComponentPropsCollection>;
|
|
8
|
+
/**
|
|
9
|
+
* Hook in order to get access to props related to specific component. Data comes from ComponentPropsContext.
|
|
10
|
+
* @see ComponentPropsContext
|
|
11
|
+
* @param {string | undefined} componentUid component uId
|
|
12
|
+
* @returns {ComponentData | undefined} component props
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare function useComponentProps<ComponentData>(componentUid: string | undefined): ComponentData | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The interface for the ComponentPropsContext component props.
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export type ComponentPropsContextProps = {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
value: ComponentPropsCollection;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The ComponentPropsContext component. Stores component props in a context.
|
|
26
|
+
* @param {ComponentPropsContextProps} props component props
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare const ComponentPropsContext: ({ children, value, }: ComponentPropsContextProps) => JSX.Element;
|
|
30
|
+
//# sourceMappingURL=ComponentPropsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentPropsContext.d.ts","sourceRoot":"","sources":["../../src/components/ComponentPropsContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,yCAA8C,CAAC;AAEtF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,aAAa,GAAG,SAAS,CAQ3B;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,wBAAwB,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,sBAGnC,0BAA0B,KAAG,GAAG,CAAC,OAInC,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { FEaaSWrapper } from '@sitecore-content-sdk/react';
|
|
2
|
-
import { GetComponentServerProps } from '../sharedTypes/component-props';
|
|
3
|
-
/**
|
|
4
|
-
* TODO: remove when framework agnostic forms implemented
|
|
5
|
-
* This is a repackaged version of the React FEaaSWrapper component with support for
|
|
6
|
-
* server rendering in Next.js (using component-level data-fetching feature of Content SDK).
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Will be called during SSG or SSR
|
|
10
|
-
* @param {ComponentRendering} rendering
|
|
11
|
-
* @param {LayoutServiceData} layoutData
|
|
12
|
-
* @returns {GetStaticPropsContext | GetServerSideProps} context
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
1
|
+
import { FEaaSWrapper } from '@sitecore-content-sdk/react';
|
|
2
|
+
import { GetComponentServerProps } from '../sharedTypes/component-props';
|
|
3
|
+
/**
|
|
4
|
+
* TODO: remove when framework agnostic forms implemented
|
|
5
|
+
* This is a repackaged version of the React FEaaSWrapper component with support for
|
|
6
|
+
* server rendering in Next.js (using component-level data-fetching feature of Content SDK).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Will be called during SSG or SSR
|
|
10
|
+
* @param {ComponentRendering} rendering
|
|
11
|
+
* @param {LayoutServiceData} layoutData
|
|
12
|
+
* @returns {GetStaticPropsContext | GetServerSideProps} context
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare const getComponentServerProps: GetComponentServerProps;
|
|
16
|
+
export default FEaaSWrapper;
|
|
17
|
+
//# sourceMappingURL=FEaaSWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FEaaSWrapper.d.ts","sourceRoot":"","sources":["../../src/components/FEaaSWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;GAIG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAMrC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { LinkProps as NextLinkProps } from 'next/link';
|
|
3
|
-
import { LinkProps as ReactLinkProps } from '@sitecore-content-sdk/react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LinkProps as NextLinkProps } from 'next/link';
|
|
3
|
+
import { LinkProps as ReactLinkProps } from '@sitecore-content-sdk/react';
|
|
4
|
+
/**
|
|
5
|
+
* The list of NextLink props to be supported by the Link component.
|
|
6
|
+
*/
|
|
7
|
+
declare const supportedNextLinkProps: readonly ["as", "onNavigate", "passHref", "prefetch", "replace", "scroll", "shallow"];
|
|
8
|
+
/**
|
|
9
|
+
* The interface for the Link component props.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type LinkProps = ReactLinkProps & {
|
|
13
|
+
/**
|
|
14
|
+
* If `href` match with `internalLinkMatcher` regexp, then it's internal link and NextLink will be rendered
|
|
15
|
+
* @default /^\//g
|
|
16
|
+
*/
|
|
17
|
+
internalLinkMatcher?: RegExp;
|
|
18
|
+
} & Pick<NextLinkProps, (typeof supportedNextLinkProps)[number]>;
|
|
19
|
+
/**
|
|
20
|
+
* Next.js specific Link component implementation.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/components/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAiB,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAIL,SAAS,IAAI,cAAc,EAC5B,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,QAAA,MAAM,sBAAsB,uFAQlB,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG;IACvC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAOjE;;;GAGG;AACH,eAAO,MAAM,IAAI,kGAiEhB,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ImageProps } from '@sitecore-content-sdk/react';
|
|
3
|
-
import { ImageProps as NextImageProperties } from 'next/image';
|
|
4
|
-
type NextImageProps = ImageProps & Partial<NextImageProperties>;
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageProps } from '@sitecore-content-sdk/react';
|
|
3
|
+
import { ImageProps as NextImageProperties } from 'next/image';
|
|
4
|
+
type NextImageProps = ImageProps & Partial<NextImageProperties>;
|
|
5
|
+
/**
|
|
6
|
+
* Next.js specific Image component implementation.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare const NextImage: React.FC<NextImageProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=NextImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextImage.d.ts","sourceRoot":"","sources":["../../src/components/NextImage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAOX,MAAM,6BAA6B,CAAC;AACrC,OAAc,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGtE,KAAK,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmE9C,CAAC"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PlaceholderComponentProps, WithSitecoreProps, EnhancedOmit } from '@sitecore-content-sdk/react';
|
|
3
|
-
/**
|
|
4
|
-
* React Placeholder component wrapped by withSitecore, so these properties shouldn't be passed to the Next.js Placeholder.
|
|
5
|
-
*/
|
|
6
|
-
type PlaceholderProps = EnhancedOmit<PlaceholderComponentProps, keyof WithSitecoreProps>;
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PlaceholderComponentProps, WithSitecoreProps, EnhancedOmit } from '@sitecore-content-sdk/react';
|
|
3
|
+
/**
|
|
4
|
+
* React Placeholder component wrapped by withSitecore, so these properties shouldn't be passed to the Next.js Placeholder.
|
|
5
|
+
*/
|
|
6
|
+
type PlaceholderProps = EnhancedOmit<PlaceholderComponentProps, keyof WithSitecoreProps>;
|
|
7
|
+
/**
|
|
8
|
+
* The Placeholder component.
|
|
9
|
+
* @param {PlaceholderProps} props component props
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const Placeholder: (props: PlaceholderProps) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/components/Placeholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAEL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACb,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,KAAK,gBAAgB,GAAG,YAAY,CAAC,yBAAyB,EAAE,MAAM,iBAAiB,CAAC,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAiBlD,CAAC"}
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { RichTextProps as ReactRichTextProps } from '@sitecore-content-sdk/react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { RichTextProps as ReactRichTextProps } from '@sitecore-content-sdk/react';
|
|
3
|
+
/**
|
|
4
|
+
* The interface for the RichText component props.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type RichTextProps = ReactRichTextProps & {
|
|
8
|
+
/**
|
|
9
|
+
* Selector which should be used in order to prefetch it and attach event listeners
|
|
10
|
+
* @default 'a[href^="/"]'
|
|
11
|
+
*/
|
|
12
|
+
internalLinksSelector?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Controls the prefetch of internal links. This can be beneficial if you have RichText fields
|
|
15
|
+
* with large numbers of internal links in them.
|
|
16
|
+
* - `true` (default): The full route & its data will be prefetched.
|
|
17
|
+
* - `hover`: Prefetching will happen on hover.
|
|
18
|
+
* - `false`: Prefetching will not happen.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
prefetchLinks?: boolean | 'hover';
|
|
22
|
+
};
|
|
23
|
+
export declare const prefetched: {
|
|
24
|
+
[cacheKey: string]: boolean;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The RichText component.
|
|
28
|
+
* @param {RichTextProps} props - The props for the RichText component.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare const RichText: {
|
|
32
|
+
(props: RichTextProps): JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=RichText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/components/RichText.tsx"],"names":[],"mappings":"AACA,OAAc,EAAqB,GAAG,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,aAAa,IAAI,kBAAkB,EACpC,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC/C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AAiB9D;;;;GAIG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa,GAAG,GAAG,CAAC,OAAO;;CA6E1D,CAAC"}
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
import { DeepRequired, SitecoreConfigInput as SitecoreConfigInputCore } from '@sitecore-content-sdk/core/config';
|
|
2
|
-
/**
|
|
3
|
-
* Provides default NextJs initial values from env variables for SitecoreConfig
|
|
4
|
-
* @param {SitecoreConfigInput} config optional override values to be written over default config settings
|
|
5
|
-
* @returns default nextjs input config
|
|
6
|
-
*/
|
|
7
|
-
export declare const getNextFallbackConfig: (config?: SitecoreConfigInput) => SitecoreConfigInput;
|
|
8
|
-
/**
|
|
9
|
-
* Type to be used as config input in sitecore.config
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { DeepRequired, SitecoreConfigInput as SitecoreConfigInputCore } from '@sitecore-content-sdk/core/config';
|
|
2
|
+
/**
|
|
3
|
+
* Provides default NextJs initial values from env variables for SitecoreConfig
|
|
4
|
+
* @param {SitecoreConfigInput} config optional override values to be written over default config settings
|
|
5
|
+
* @returns default nextjs input config
|
|
6
|
+
*/
|
|
7
|
+
export declare const getNextFallbackConfig: (config?: SitecoreConfigInput) => SitecoreConfigInput;
|
|
8
|
+
/**
|
|
9
|
+
* Type to be used as config input in sitecore.config
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type SitecoreConfigInput = SitecoreConfigInputCore & {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether SSG `getStaticPaths` pre-render any pages.
|
|
15
|
+
*
|
|
16
|
+
* Set the environment variable `GENERATE_STATIC_PATHS=true`
|
|
17
|
+
* to enable static paths generation.
|
|
18
|
+
*
|
|
19
|
+
* By default, this is set to `true`.
|
|
20
|
+
*
|
|
21
|
+
* This is set to `false` when the application is deployed and used as editing host in Sitecore.
|
|
22
|
+
*/
|
|
23
|
+
generateStaticPaths?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The internal host URL for the Next.js application, used for server-side requests for page rendering during editing.
|
|
26
|
+
* This should be the base URL where the Next.js app is accessible from the server side (e.g., "http://localhost:3000").
|
|
27
|
+
*/
|
|
28
|
+
sitecoreInternalEditingHostUrl?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Final sitecore config type used at runtime Every property should be populated, either from sitecore.config or built-in fallback values
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export type SitecoreConfig = DeepRequired<SitecoreConfigInput>;
|
|
35
|
+
/**
|
|
36
|
+
* Accepts a SitecoreConfigInput object and returns full sitecore configuration
|
|
37
|
+
* @param {SitecoreConfigInput} config override values to be written over default config settings
|
|
38
|
+
* @returns {SitecoreConfig} full sitecore configuration to use in application
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export declare const defineConfig: (config?: SitecoreConfigInput) => SitecoreConfig;
|
|
42
|
+
//# sourceMappingURL=define-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../src/config/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,mBAAmB,IAAI,uBAAuB,EAC/C,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,mBAAmB,KAAG,mBAoCpE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG;IAC1D;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,mBAAmB,KAAG,cAE3D,CAAC"}
|
package/types/config/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { SitecoreConfig, SitecoreConfigInput, defineConfig } from './define-config';
|
|
1
|
+
export { SitecoreConfig, SitecoreConfigInput, defineConfig } from './define-config';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { SitecoreCliConfigInput, SitecoreCliConfig } from '@sitecore-content-sdk/core/config';
|
|
2
|
-
/**
|
|
3
|
-
* Accepts a `SitecoreCliConfigInput` object and returns the Sitecore Content SDK CLI configuration from the specified file,
|
|
4
|
-
* updated with the required default values.
|
|
5
|
-
* @param {SitecoreCliConfigInput} cliConfig the cli configuration provided by the application
|
|
6
|
-
* @returns {SitecoreCliConfig} full sitecore cli configuration to use with cli
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { SitecoreCliConfigInput, SitecoreCliConfig } from '@sitecore-content-sdk/core/config';
|
|
2
|
+
/**
|
|
3
|
+
* Accepts a `SitecoreCliConfigInput` object and returns the Sitecore Content SDK CLI configuration from the specified file,
|
|
4
|
+
* updated with the required default values.
|
|
5
|
+
* @param {SitecoreCliConfigInput} cliConfig the cli configuration provided by the application
|
|
6
|
+
* @returns {SitecoreCliConfig} full sitecore cli configuration to use with cli
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare const defineCliConfig: (cliConfig: SitecoreCliConfigInput) => SitecoreCliConfig;
|
|
10
|
+
//# sourceMappingURL=define-cli-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-cli-config.d.ts","sourceRoot":"","sources":["../../src/config-cli/define-cli-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAM9F;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,sBAAsB,KAAG,iBAInE,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { defineCliConfig } from './define-cli-config';
|
|
1
|
+
export { defineCliConfig } from './define-cli-config';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config-cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
import { ImportEntry } from '@sitecore-content-sdk/core/codegen';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ImportEntry } from '@sitecore-content-sdk/core/codegen';
|
|
2
|
+
/**
|
|
3
|
+
* The default import entries for the import map.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const defaultImportEntries: ImportEntry[];
|
|
7
|
+
/**
|
|
8
|
+
* Combines the default import entries with the generated import entries.
|
|
9
|
+
* @param {ImportEntry[]} defaultImportEntries - The default import entries.
|
|
10
|
+
* @param {ImportEntry[]} generatedImportEntries - The generated import entries.
|
|
11
|
+
* @returns {ImportEntry[]} The combined import entries.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare const combineImportEntries: (defaultImportEntries: ImportEntry[], generatedImportEntries: ImportEntry[]) => ImportEntry[];
|
|
15
|
+
//# sourceMappingURL=import-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-map.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/import-map.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAgBjE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,EAmD7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,sBAAsB,WAAW,EAAE,EACnC,wBAAwB,WAAW,EAAE,KACpC,WAAW,EA6Bb,CAAC"}
|