@sitecore-content-sdk/react 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/components/ClientEditingChromesUpdate.js +53 -52
- package/dist/cjs/components/Date.js +49 -45
- package/dist/cjs/components/DefaultEmptyFieldEditingComponents.js +32 -22
- package/dist/cjs/components/{DesignLibrary.js → DesignLibrary/DesignLibrary.js} +161 -202
- package/dist/cjs/components/DesignLibrary/DesignLibraryApp.js +31 -0
- package/dist/cjs/components/DesignLibrary/DesignLibraryClientEvents.js +123 -0
- package/dist/cjs/components/DesignLibrary/DesignLibraryErrorBoundary.js +65 -0
- package/dist/cjs/components/DesignLibrary/DesignLibraryServer.js +193 -0
- package/dist/cjs/components/DesignLibrary/index.js +7 -0
- package/dist/cjs/components/DesignLibrary/models.js +2 -0
- package/dist/cjs/components/EditingScripts.js +44 -43
- package/dist/cjs/components/ErrorBoundary.js +101 -92
- package/dist/cjs/components/FEaaS/BYOCServerWrapper.js +25 -28
- package/dist/cjs/components/FEaaS/BYOCWrapper.js +133 -122
- package/dist/cjs/components/FEaaS/FEaaSSeverWrapper.js +26 -34
- package/dist/cjs/components/FEaaS/FEaaSWrapper.js +84 -78
- package/dist/cjs/components/FEaaS/feaas-utils.js +130 -144
- package/dist/cjs/components/FEaaS/index.js +21 -21
- package/dist/cjs/components/FEaaS/models.js +7 -7
- package/dist/cjs/components/FieldMetadata.js +29 -29
- package/dist/cjs/components/File.js +43 -38
- package/dist/cjs/components/Form.js +100 -92
- package/dist/cjs/components/HiddenRendering.js +23 -23
- package/dist/cjs/components/Image.js +71 -66
- package/dist/cjs/components/Link.js +91 -86
- package/dist/cjs/components/MissingComponent.js +28 -28
- package/dist/cjs/components/Placeholder/AppPlaceholder.js +79 -76
- package/dist/cjs/components/Placeholder/ClientComponentWrapper.js +21 -21
- package/dist/cjs/components/Placeholder/Placeholder.js +144 -110
- package/dist/cjs/components/Placeholder/PlaceholderMetadata.js +68 -63
- package/dist/cjs/components/Placeholder/index.js +25 -25
- package/dist/cjs/components/Placeholder/models.js +18 -18
- package/dist/cjs/components/Placeholder/placeholder-utils.js +226 -226
- package/dist/cjs/components/RichText.js +75 -70
- package/dist/cjs/components/SitecoreProvider.js +62 -52
- package/dist/cjs/components/Text.js +69 -65
- package/dist/cjs/components/sharedTypes/components.js +7 -7
- package/dist/cjs/components/sharedTypes/index.js +18 -18
- package/dist/cjs/components/sharedTypes/props.js +2 -2
- package/dist/cjs/enhancers/withAppPlaceholder.js +21 -21
- package/dist/cjs/enhancers/withComponentMap.js +24 -24
- package/dist/cjs/enhancers/withDatasourceCheck.js +31 -30
- package/dist/cjs/enhancers/withEditorChromes.js +29 -24
- package/dist/cjs/enhancers/withEmptyFieldEditingComponent.js +71 -70
- package/dist/cjs/enhancers/withFieldMetadata.js +68 -67
- package/dist/cjs/enhancers/withLoadImportMap.js +53 -0
- package/dist/cjs/enhancers/withPlaceholder.js +64 -65
- package/dist/cjs/enhancers/withSitecore.js +47 -45
- package/dist/cjs/index.js +86 -85
- package/dist/cjs/rsc-utils/no-rsc.js +5 -5
- package/dist/cjs/rsc-utils/rsc.js +5 -5
- package/dist/cjs/search/index.js +7 -0
- package/dist/cjs/search/useInfiniteSearch.js +136 -0
- package/dist/cjs/search/useSearch.js +107 -0
- package/dist/cjs/search/utils.js +35 -0
- package/dist/cjs/server-actions/update-server-component-action.js +18 -0
- package/dist/cjs/utils.js +38 -38
- package/dist/esm/components/ClientEditingChromesUpdate.js +16 -15
- package/dist/esm/components/Date.js +43 -39
- package/dist/esm/components/DefaultEmptyFieldEditingComponents.js +24 -14
- package/dist/esm/components/{DesignLibrary.js → DesignLibrary/DesignLibrary.js} +124 -164
- package/dist/esm/components/DesignLibrary/DesignLibraryApp.js +24 -0
- package/dist/esm/components/DesignLibrary/DesignLibraryClientEvents.js +84 -0
- package/dist/esm/components/DesignLibrary/DesignLibraryErrorBoundary.js +28 -0
- package/dist/esm/components/DesignLibrary/DesignLibraryServer.js +150 -0
- package/dist/esm/components/DesignLibrary/index.js +2 -0
- package/dist/esm/components/DesignLibrary/models.js +1 -0
- package/dist/esm/components/EditingScripts.js +37 -36
- package/dist/esm/components/ErrorBoundary.js +64 -57
- package/dist/esm/components/FEaaS/BYOCServerWrapper.js +18 -21
- package/dist/esm/components/FEaaS/BYOCWrapper.js +91 -81
- package/dist/esm/components/FEaaS/FEaaSSeverWrapper.js +19 -27
- package/dist/esm/components/FEaaS/FEaaSWrapper.js +43 -37
- package/dist/esm/components/FEaaS/feaas-utils.js +91 -105
- package/dist/esm/components/FEaaS/index.js +6 -6
- package/dist/esm/components/FEaaS/models.js +4 -4
- package/dist/esm/components/FieldMetadata.js +22 -22
- package/dist/esm/components/File.js +36 -31
- package/dist/esm/components/Form.js +62 -54
- package/dist/esm/components/HiddenRendering.js +16 -16
- package/dist/esm/components/Image.js +65 -60
- package/dist/esm/components/Link.js +55 -50
- package/dist/esm/components/MissingComponent.js +21 -21
- package/dist/esm/components/Placeholder/AppPlaceholder.js +72 -69
- package/dist/esm/components/Placeholder/ClientComponentWrapper.js +14 -14
- package/dist/esm/components/Placeholder/Placeholder.js +104 -103
- package/dist/esm/components/Placeholder/PlaceholderMetadata.js +61 -56
- package/dist/esm/components/Placeholder/index.js +4 -4
- package/dist/esm/components/Placeholder/models.js +15 -15
- package/dist/esm/components/Placeholder/placeholder-utils.js +214 -214
- package/dist/esm/components/RichText.js +39 -34
- package/dist/esm/components/SitecoreProvider.js +55 -45
- package/dist/esm/components/Text.js +63 -59
- package/dist/esm/components/sharedTypes/components.js +4 -4
- package/dist/esm/components/sharedTypes/index.js +2 -2
- package/dist/esm/components/sharedTypes/props.js +1 -1
- package/dist/esm/enhancers/withAppPlaceholder.js +14 -14
- package/dist/esm/enhancers/withComponentMap.js +18 -18
- package/dist/esm/enhancers/withDatasourceCheck.js +23 -22
- package/dist/esm/enhancers/withEditorChromes.js +22 -17
- package/dist/esm/enhancers/withEmptyFieldEditingComponent.js +35 -34
- package/dist/esm/enhancers/withFieldMetadata.js +32 -31
- package/dist/esm/enhancers/withLoadImportMap.js +17 -0
- package/dist/esm/enhancers/withPlaceholder.js +58 -59
- package/dist/esm/enhancers/withSitecore.js +40 -38
- package/dist/esm/index.js +29 -29
- package/dist/esm/rsc-utils/no-rsc.js +2 -2
- package/dist/esm/rsc-utils/rsc.js +2 -2
- package/dist/esm/search/index.js +2 -0
- package/dist/esm/search/useInfiniteSearch.js +132 -0
- package/dist/esm/search/useSearch.js +103 -0
- package/dist/esm/search/utils.js +30 -0
- package/dist/esm/server-actions/update-server-component-action.js +15 -0
- package/dist/esm/utils.js +33 -33
- package/global.d.ts +17 -0
- package/package.json +27 -11
- package/search.d.ts +1 -0
- package/types/components/ClientEditingChromesUpdate.d.ts +8 -6
- package/types/components/ClientEditingChromesUpdate.d.ts.map +1 -0
- package/types/components/Date.d.ts +25 -16
- package/types/components/Date.d.ts.map +1 -0
- package/types/components/DefaultEmptyFieldEditingComponents.d.ts +20 -9
- package/types/components/DefaultEmptyFieldEditingComponents.d.ts.map +1 -0
- package/types/components/DesignLibrary/DesignLibrary.d.ts +20 -0
- package/types/components/DesignLibrary/DesignLibrary.d.ts.map +1 -0
- package/types/components/DesignLibrary/DesignLibraryApp.d.ts +14 -0
- package/types/components/DesignLibrary/DesignLibraryApp.d.ts.map +1 -0
- package/types/components/DesignLibrary/DesignLibraryClientEvents.d.ts +21 -0
- package/types/components/DesignLibrary/DesignLibraryClientEvents.d.ts.map +1 -0
- package/types/components/DesignLibrary/DesignLibraryErrorBoundary.d.ts +19 -0
- package/types/components/DesignLibrary/DesignLibraryErrorBoundary.d.ts.map +1 -0
- package/types/components/DesignLibrary/DesignLibraryServer.d.ts +38 -0
- package/types/components/DesignLibrary/DesignLibraryServer.d.ts.map +1 -0
- package/types/components/DesignLibrary/index.d.ts +3 -0
- package/types/components/DesignLibrary/index.d.ts.map +1 -0
- package/types/components/DesignLibrary/models.d.ts +67 -0
- package/types/components/DesignLibrary/models.d.ts.map +1 -0
- package/types/components/EditingScripts.d.ts +9 -7
- package/types/components/EditingScripts.d.ts.map +1 -0
- package/types/components/ErrorBoundary.d.ts +29 -17
- package/types/components/ErrorBoundary.d.ts.map +1 -0
- package/types/components/FEaaS/BYOCServerWrapper.d.ts +10 -3
- package/types/components/FEaaS/BYOCServerWrapper.d.ts.map +1 -0
- package/types/components/FEaaS/BYOCWrapper.d.ts +29 -25
- package/types/components/FEaaS/BYOCWrapper.d.ts.map +1 -0
- package/types/components/FEaaS/FEaaSSeverWrapper.d.ts +10 -8
- package/types/components/FEaaS/FEaaSSeverWrapper.d.ts.map +1 -0
- package/types/components/FEaaS/FEaaSWrapper.d.ts +14 -7
- package/types/components/FEaaS/FEaaSWrapper.d.ts.map +1 -0
- package/types/components/FEaaS/feaas-utils.d.ts +24 -21
- package/types/components/FEaaS/feaas-utils.d.ts.map +1 -0
- package/types/components/FEaaS/index.d.ts +7 -6
- package/types/components/FEaaS/index.d.ts.map +1 -0
- package/types/components/FEaaS/models.d.ts +136 -125
- package/types/components/FEaaS/models.d.ts.map +1 -0
- package/types/components/FieldMetadata.d.ts +18 -17
- package/types/components/FieldMetadata.d.ts.map +1 -0
- package/types/components/File.d.ts +28 -18
- package/types/components/File.d.ts.map +1 -0
- package/types/components/Form.d.ts +35 -29
- package/types/components/Form.d.ts.map +1 -0
- package/types/components/HiddenRendering.d.ts +3 -2
- package/types/components/HiddenRendering.d.ts.map +1 -0
- package/types/components/Image.d.ts +70 -48
- package/types/components/Image.d.ts.map +1 -0
- package/types/components/Link.d.ts +45 -27
- package/types/components/Link.d.ts.map +1 -0
- package/types/components/MissingComponent.d.ts +9 -8
- package/types/components/MissingComponent.d.ts.map +1 -0
- package/types/components/Placeholder/AppPlaceholder.d.ts +12 -10
- package/types/components/Placeholder/AppPlaceholder.d.ts.map +1 -0
- package/types/components/Placeholder/ClientComponentWrapper.d.ts +10 -9
- package/types/components/Placeholder/ClientComponentWrapper.d.ts.map +1 -0
- package/types/components/Placeholder/Placeholder.d.ts +33 -28
- package/types/components/Placeholder/Placeholder.d.ts.map +1 -0
- package/types/components/Placeholder/PlaceholderMetadata.d.ts +35 -28
- package/types/components/Placeholder/PlaceholderMetadata.d.ts.map +1 -0
- package/types/components/Placeholder/index.d.ts +6 -5
- package/types/components/Placeholder/index.d.ts.map +1 -0
- package/types/components/Placeholder/models.d.ts +149 -140
- package/types/components/Placeholder/models.d.ts.map +1 -0
- package/types/components/Placeholder/placeholder-utils.d.ts +52 -53
- package/types/components/Placeholder/placeholder-utils.d.ts.map +1 -0
- package/types/components/RichText.d.ts +31 -17
- package/types/components/RichText.d.ts.map +1 -0
- package/types/components/SitecoreProvider.d.ts +68 -48
- package/types/components/SitecoreProvider.d.ts.map +1 -0
- package/types/components/Text.d.ts +29 -20
- package/types/components/Text.d.ts.map +1 -0
- package/types/components/sharedTypes/components.d.ts +50 -38
- package/types/components/sharedTypes/components.d.ts.map +1 -0
- package/types/components/sharedTypes/index.d.ts +3 -2
- package/types/components/sharedTypes/index.d.ts.map +1 -0
- package/types/components/sharedTypes/props.d.ts +15 -14
- package/types/components/sharedTypes/props.d.ts.map +1 -0
- package/types/enhancers/withAppPlaceholder.d.ts +16 -15
- package/types/enhancers/withAppPlaceholder.d.ts.map +1 -0
- package/types/enhancers/withComponentMap.d.ts +13 -12
- package/types/enhancers/withComponentMap.d.ts.map +1 -0
- package/types/enhancers/withDatasourceCheck.d.ts +23 -21
- package/types/enhancers/withDatasourceCheck.d.ts.map +1 -0
- package/types/enhancers/withEditorChromes.d.ts +8 -2
- package/types/enhancers/withEditorChromes.d.ts.map +1 -0
- package/types/enhancers/withEmptyFieldEditingComponent.d.ts +29 -27
- package/types/enhancers/withEmptyFieldEditingComponent.d.ts.map +1 -0
- package/types/enhancers/withFieldMetadata.d.ts +18 -16
- package/types/enhancers/withFieldMetadata.d.ts.map +1 -0
- package/types/enhancers/withLoadImportMap.d.ts +22 -0
- package/types/enhancers/withLoadImportMap.d.ts.map +1 -0
- package/types/enhancers/withPlaceholder.d.ts +37 -35
- package/types/enhancers/withPlaceholder.d.ts.map +1 -0
- package/types/enhancers/withSitecore.d.ts +63 -48
- package/types/enhancers/withSitecore.d.ts.map +1 -0
- package/types/index.d.ts +31 -30
- package/types/index.d.ts.map +1 -0
- package/types/rsc-utils/no-rsc.d.ts +2 -1
- package/types/rsc-utils/no-rsc.d.ts.map +1 -0
- package/types/rsc-utils/rsc.d.ts +2 -1
- package/types/rsc-utils/rsc.d.ts.map +1 -0
- package/types/search/index.d.ts +4 -0
- package/types/search/index.d.ts.map +1 -0
- package/types/search/useInfiniteSearch.d.ts +116 -0
- package/types/search/useInfiniteSearch.d.ts.map +1 -0
- package/types/search/useSearch.d.ts +107 -0
- package/types/search/useSearch.d.ts.map +1 -0
- package/types/search/utils.d.ts +19 -0
- package/types/search/utils.d.ts.map +1 -0
- package/types/server-actions/update-server-component-action.d.ts +25 -0
- package/types/server-actions/update-server-component-action.d.ts.map +1 -0
- package/types/utils.d.ts +18 -17
- package/types/utils.d.ts.map +1 -0
- package/types/components/DesignLibrary.d.ts +0 -26
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditableFieldProps } from './sharedTypes';
|
|
3
|
-
import { FieldMetadata } from '@sitecore-content-sdk/core/layout';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditableFieldProps } from './sharedTypes';
|
|
3
|
+
import { FieldMetadata } from '@sitecore-content-sdk/core/layout';
|
|
4
|
+
/**
|
|
5
|
+
* The props for the DateField component.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface DateFieldProps extends EditableFieldProps<DateFieldProps> {
|
|
9
|
+
/** The date field data. */
|
|
10
|
+
[htmlAttributes: string]: unknown;
|
|
11
|
+
field: FieldMetadata & {
|
|
12
|
+
value?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The HTML element that will wrap the contents of the field.
|
|
16
|
+
*/
|
|
17
|
+
tag?: string;
|
|
18
|
+
render?: (date: Date | null) => React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The DateField component.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare const DateField: React.FC<DateFieldProps>;
|
|
25
|
+
//# sourceMappingURL=Date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../src/components/Date.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB,CAAC,cAAc,CAAC;IACxE,2BAA2B;IAC3B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,KAAK,EAAE,aAAa,GAAG;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;CACjD;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA+B9C,CAAC"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The DefaultEmptyFieldEditingComponentText component.
|
|
4
|
+
* @param {object} props - The props for the component.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const DefaultEmptyFieldEditingComponentText: React.FC<{
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
tag?: string;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* The DefaultEmptyFieldEditingComponentImage component.
|
|
13
|
+
* @param {object} props - The props for the component.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare const DefaultEmptyFieldEditingComponentImage: React.FC<{
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
className?: string;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=DefaultEmptyFieldEditingComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultEmptyFieldEditingComponents.d.ts","sourceRoot":"","sources":["../../src/components/DefaultEmptyFieldEditingComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,EAAE,KAAK,CAAC,EAAE,CAAC;IAC3D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAEA,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAkBA,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DesignLibraryProps } from './models';
|
|
3
|
+
export declare const __mockDependencies: (mocks: any) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Design Library component.
|
|
6
|
+
*
|
|
7
|
+
* Renders the **real** Sitecore component for `library` / `library-metadata` modes and,
|
|
8
|
+
* when generation is enabled (`page.mode.designLibrary.isVariantGeneration === true`),
|
|
9
|
+
* wires the **variant generation** handshake so the parent (DL Studio) can send
|
|
10
|
+
* generated code to preview and iterate on.
|
|
11
|
+
* @param {DesignLibraryProps} props
|
|
12
|
+
* @param {() => Promise} [props.loadImportMap] Optional async loader that resolves to the import-map used to resolve the generated component’s imports. Required when `isVariantGeneration` is true.
|
|
13
|
+
* @returns {JSX.Element} The preview surface, or `null` when not in Design Library mode.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare const DesignLibrary: {
|
|
17
|
+
(props: DesignLibraryProps): React.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=DesignLibrary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignLibrary.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibrary.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAenD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,UAAU,CAAC;AAYhE,eAAO,MAAM,kBAAkB,GAAI,OAAO,GAAG,SAQ5C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa;;;CA4HxB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DesingLibraryAppProps } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Design Library component intended to be used by the NextJs app router application
|
|
5
|
+
* This component serves as a router between client and server component rendering modes for the Design Library.
|
|
6
|
+
* It inspects the component type from the component map and
|
|
7
|
+
* delegates to the appropriate rendering implementation:
|
|
8
|
+
* - Client components are rendered using the `DesignLibrary` component
|
|
9
|
+
* - Server components are rendered using the `DesignLibraryServer` component
|
|
10
|
+
* @param {DesingLibraryAppProps} props - The properties for the Design Library App.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare const DesignLibraryApp: ({ page, componentMap, loadServerImportMap, }: DesingLibraryAppProps) => React.JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=DesignLibraryApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignLibraryApp.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibraryApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIjD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAAI,8CAI9B,qBAAqB,6BAsBvB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DesignLibraryPreviewEventsProps, DesignLibraryVariantGenerationEventsProps } from './models';
|
|
3
|
+
export declare const __mockDependencies: (mocks: any) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Design Library component for rendering server components in app router application.
|
|
6
|
+
* DesignLibraryPreviewEvents component serves as a communication bridge between DesignLibraryServer and the Design Studio on the client side.
|
|
7
|
+
* It posts messages to Design Library Studio and sets up handlers to receive updates and previews which are then passed to the server component via server function updateServerComponentAction.
|
|
8
|
+
* @param {DesignLibraryPreviewEventsProps} props The props. {@link DesignLibraryPreviewEventsProps}
|
|
9
|
+
* @returns {JSX.Element} empty JSX element.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DesignLibraryPreviewEvents: ({ designLibraryStatus, component, }: DesignLibraryPreviewEventsProps) => React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Design Library component for rendering server components in app router application.
|
|
14
|
+
* DesignLibraryVariantGenerationEvents component serves as a communication bridge between DesignLibraryServer and the Design Studio on the client side in variant generation mode.
|
|
15
|
+
* It posts messages to Design Library Studio and sets up handlers to receive updates and previews which are then passed to the server component via server function updateServerComponentAction.
|
|
16
|
+
* If the import map is not present then the import map error will be sent to Design Studio.
|
|
17
|
+
* @param {DesignLibraryVariantGenerationEventsProps} props The props. {@link DesignLibraryVariantGenerationEventsProps}
|
|
18
|
+
* @returns {JSX.Element} empty JSX element.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DesignLibraryVariantGenerationEvents: ({ designLibraryStatus, component, importMap, importMapError, previewComponentData, }: DesignLibraryVariantGenerationEventsProps) => React.JSX.Element;
|
|
21
|
+
//# sourceMappingURL=DesignLibraryClientEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignLibraryClientEvents.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibraryClientEvents.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EACL,+BAA+B,EAC/B,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAYlB,eAAO,MAAM,kBAAkB,GAAI,OAAO,GAAG,SAS5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,qCAGxC,+BAA+B,sBAgBjC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,GAAI,sFAMlD,yCAAyC,sBA6C3C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type DesignLibraryErrorBoundaryProps = {
|
|
3
|
+
uid: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
renderKey?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare class DesignLibraryErrorBoundary extends React.Component<DesignLibraryErrorBoundaryProps> {
|
|
8
|
+
state: {
|
|
9
|
+
hasError: boolean;
|
|
10
|
+
};
|
|
11
|
+
static getDerivedStateFromError(): {
|
|
12
|
+
hasError: boolean;
|
|
13
|
+
};
|
|
14
|
+
componentDidUpdate(prevProps: DesignLibraryErrorBoundaryProps): void;
|
|
15
|
+
componentDidCatch(error: Error): void;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=DesignLibraryErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignLibraryErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibraryErrorBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,KAAK,+BAA+B,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,qBAAa,0BAA2B,SAAQ,KAAK,CAAC,SAAS,CAAC,+BAA+B,CAAC;IAC9F,KAAK;;MAEH;IAEF,MAAM,CAAC,wBAAwB;;;IAI/B,kBAAkB,CAAC,SAAS,EAAE,+BAA+B;IAM7D,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAI9B,MAAM;CAOP"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DesignLibraryServerProps, DesignLibraryServerPreviewProps, DesignLibraryServerVariantGenerationProps } from './models';
|
|
3
|
+
export declare const __mockDependencies: (mocks: any) => Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* Design Library component for rendering server components in app router application.
|
|
6
|
+
*
|
|
7
|
+
* Renders the **real** Sitecore component for `library` / `library-metadata` modes and,
|
|
8
|
+
* when generation is enabled (`page.mode.designLibrary.isVariantGeneration === true`),
|
|
9
|
+
* wires the **variant generation** handshake so the parent (Design Library) can send
|
|
10
|
+
* generated code to preview and iterate on.
|
|
11
|
+
* Also renders the DesignLibraryClientEvents component which serves as a communication bridge between DesignLibraryServer and the Design Studio on the client side.
|
|
12
|
+
* @param {DesignLibraryServerProps} props The props. {@link DesignLibraryServerProps}
|
|
13
|
+
* @returns {JSX.Element} The preview surface, or `null` when not in Design Library mode.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DesignLibraryServer: ({ page, componentMap, rendering, loadServerImportMap, }: DesignLibraryServerProps) => Promise<React.JSX.Element | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Design Library component for rendering server components in app router application in variant generation mode.
|
|
18
|
+
*
|
|
19
|
+
* Renders the **real** Sitecore component for `library` / `library-metadata` modes on first render and,
|
|
20
|
+
* wires the **variant generation** handshake so the parent (Design Library) can send
|
|
21
|
+
* generated code to preview and iterate on.
|
|
22
|
+
* Also renders the DesignLibraryVariantGenerationEvents component which serves as a communication bridge between DesignLibraryServer and the Design Studio on the client side.
|
|
23
|
+
* @param {DesignLibraryServerVariantGenerationProps} props The props. {@link DesignLibraryServerVariantGenerationProps}
|
|
24
|
+
* @returns {JSX.Element} The preview surface, or `null` when not in Design Library mode.
|
|
25
|
+
*/
|
|
26
|
+
export declare const DesignLibraryServerVariantGeneration: ({ page, rendering, loadServerImportMap, componentMap, }: DesignLibraryServerVariantGenerationProps) => Promise<React.JSX.Element>;
|
|
27
|
+
/**
|
|
28
|
+
* Design Library component for rendering server components in app router application when variant generation is not enabled.
|
|
29
|
+
*
|
|
30
|
+
* Renders the **real** Sitecore component for `library` / `library-metadata` modes and,
|
|
31
|
+
* wires the **component update** handshake so the parent (Design Library) can send
|
|
32
|
+
* updated component props.
|
|
33
|
+
* Also renders the DesignLibraryPreviewEvents component which serves as a communication bridge between DesignLibraryServer and the Design Studio on the client side.
|
|
34
|
+
* @param {DesignLibraryServerPreviewProps} props The props. {@link DesignLibraryServerPreviewProps}
|
|
35
|
+
* @returns {JSX.Element} The preview surface, or `null` when not in Design Library mode.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DesignLibraryServerPreview: ({ page, rendering, componentMap, }: DesignLibraryServerPreviewProps) => Promise<React.JSX.Element>;
|
|
38
|
+
//# sourceMappingURL=DesignLibraryServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignLibraryServer.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibraryServer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,OAAO,EAEL,wBAAwB,EACxB,+BAA+B,EAC/B,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAOlB,eAAO,MAAM,kBAAkB,GAAU,OAAO,GAAG,kBAUlD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAU,yDAKvC,wBAAwB,sCAqB1B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oCAAoC,GAAU,yDAKxD,yCAAyC,+BA4F3C,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GAAU,oCAI9C,+BAA+B,+BAyCjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ImportEntry, ImportEntryInfo } from '@sitecore-content-sdk/core/codegen';
|
|
2
|
+
import { ComponentFields, ComponentParams, ComponentRendering, RouteData } from '@sitecore-content-sdk/core/layout';
|
|
3
|
+
import { DesignLibraryStatus } from '@sitecore-content-sdk/core/editing';
|
|
4
|
+
import { Page } from '@sitecore-content-sdk/core/client';
|
|
5
|
+
import { ComponentPreviewEventArgs } from '@sitecore-content-sdk/core/codegen';
|
|
6
|
+
import { ComponentMap } from '../sharedTypes';
|
|
7
|
+
export type ImportMapImport = {
|
|
8
|
+
default: ImportEntry[];
|
|
9
|
+
};
|
|
10
|
+
export type DynamicComponent = React.ComponentType<{
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
fields?: ComponentFields;
|
|
13
|
+
params?: ComponentParams;
|
|
14
|
+
}>;
|
|
15
|
+
export type DesignLibraryProps = {
|
|
16
|
+
/**
|
|
17
|
+
* The dynamic import for import map to be used in variant generation mode.
|
|
18
|
+
* Currently it's optional but it will be required in the next major version.
|
|
19
|
+
*/
|
|
20
|
+
loadImportMap?: () => Promise<ImportMapImport>;
|
|
21
|
+
};
|
|
22
|
+
export type DesignLibraryServerProps = {
|
|
23
|
+
/**
|
|
24
|
+
* Component Map will be used to map Sitecore component names to app implementation
|
|
25
|
+
*/
|
|
26
|
+
componentMap: ComponentMap;
|
|
27
|
+
/**
|
|
28
|
+
* Rendering data to be used when rendering the placeholder.
|
|
29
|
+
*/
|
|
30
|
+
rendering: ComponentRendering | RouteData;
|
|
31
|
+
/**
|
|
32
|
+
* Page data.
|
|
33
|
+
*/
|
|
34
|
+
page: Page;
|
|
35
|
+
/**
|
|
36
|
+
* The dynamic import for sever import map to be used in variant generation mode.
|
|
37
|
+
*/
|
|
38
|
+
loadServerImportMap: () => Promise<ImportMapImport>;
|
|
39
|
+
};
|
|
40
|
+
export type DesingLibraryAppProps = DesignLibraryServerProps;
|
|
41
|
+
export type DesignLibraryServerPreviewProps = Omit<DesignLibraryServerProps, 'loadServerImportMap'>;
|
|
42
|
+
export type DesignLibraryServerVariantGenerationProps = DesignLibraryServerProps;
|
|
43
|
+
export type DesignLibraryPreviewEventsProps = {
|
|
44
|
+
/**
|
|
45
|
+
* The design library status to be posted as a message to the Design Studio.
|
|
46
|
+
*/
|
|
47
|
+
designLibraryStatus: DesignLibraryStatus;
|
|
48
|
+
/**
|
|
49
|
+
* The component rendering data that is being edited in the Design Studio.
|
|
50
|
+
*/
|
|
51
|
+
component: ComponentRendering;
|
|
52
|
+
};
|
|
53
|
+
export type DesignLibraryVariantGenerationEventsProps = DesignLibraryPreviewEventsProps & {
|
|
54
|
+
/**
|
|
55
|
+
* The import map info to be posted as a message to the Design Studio.
|
|
56
|
+
*/
|
|
57
|
+
importMap?: ImportEntryInfo[];
|
|
58
|
+
/**
|
|
59
|
+
* Any error that occurred while loading the import map to be posted as a message to the Design Studio.
|
|
60
|
+
*/
|
|
61
|
+
importMapError?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The preview component data received from design library.
|
|
64
|
+
*/
|
|
65
|
+
previewComponentData?: ComponentPreviewEventArgs;
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,SAAS,EACV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC,CAAC;AAGH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,mBAAmB,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAEpG,MAAM,MAAM,yCAAyC,GAAG,wBAAwB,CAAC;AAEjF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IACzC;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG,+BAA+B,GAAG;IACxF;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,oBAAoB,CAAC,EAAE,yBAAyB,CAAC;CAClD,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Renders client scripts and data for editing/preview mode for Pages.
|
|
4
|
-
* Renders script required for the Design Library (when mode.isDesignLibrary is true).
|
|
5
|
-
* @returns A JSX element containing the editing scripts or an empty fragment if not in editing/preview mode.
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Renders client scripts and data for editing/preview mode for Pages.
|
|
4
|
+
* Renders script required for the Design Library (when mode.isDesignLibrary is true).
|
|
5
|
+
* @returns A JSX element containing the editing scripts or an empty fragment if not in editing/preview mode.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const EditingScripts: () => JSX.Element;
|
|
9
|
+
//# sourceMappingURL=EditingScripts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditingScripts.d.ts","sourceRoot":"","sources":["../../src/components/EditingScripts.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKnC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QAAO,GAAG,CAAC,OA+CrC,CAAC"}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { Page } from '@sitecore-content-sdk/core/client';
|
|
3
|
-
import { ComponentRendering } from '@sitecore-content-sdk/core/layout';
|
|
4
|
-
type ErrorComponentProps = {
|
|
5
|
-
[prop: string]: unknown;
|
|
6
|
-
};
|
|
7
|
-
export type ErrorBoundaryProps = {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
page: Page;
|
|
10
|
-
isDynamic?: boolean;
|
|
11
|
-
errorComponent?: React.ComponentClass<ErrorComponentProps> | React.FC<ErrorComponentProps>;
|
|
12
|
-
rendering?: ComponentRendering;
|
|
13
|
-
componentLoadingMessage?: string;
|
|
14
|
-
disableSuspense?: boolean;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Page } from '@sitecore-content-sdk/core/client';
|
|
3
|
+
import { ComponentRendering } from '@sitecore-content-sdk/core/layout';
|
|
4
|
+
type ErrorComponentProps = {
|
|
5
|
+
[prop: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
export type ErrorBoundaryProps = {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
page: Page;
|
|
10
|
+
isDynamic?: boolean;
|
|
11
|
+
errorComponent?: React.ComponentClass<ErrorComponentProps> | React.FC<ErrorComponentProps>;
|
|
12
|
+
rendering?: ComponentRendering;
|
|
13
|
+
componentLoadingMessage?: string;
|
|
14
|
+
disableSuspense?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Simple error component applying basic error styling.
|
|
18
|
+
* @param {object} props - Either with `message` (string) or with `children` (ReactNode), but not both.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ErrorComponent: (props: {
|
|
21
|
+
message: React.ReactNode;
|
|
22
|
+
children?: never;
|
|
23
|
+
} | {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
message?: never;
|
|
26
|
+
}) => React.JSX.Element;
|
|
27
|
+
declare const _default: (props: import("@sitecore-content-sdk/core/utils").EnhancedOmit<ErrorBoundaryProps, keyof import("../enhancers/withSitecore").WithSitecoreProps>) => React.JSX.Element;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,KAAK,mBAAmB,GAAG;IACzB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC;IAC3F,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,OACI;IAAE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,GAC9C;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,sBAOnD,CAAC;;AA0EF,wBAA6C"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BYOCServerWrapperProps } from './models';
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BYOCServerWrapperProps } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Server component for BYOC. Retrieves server props and renders client BYOCWrapper.
|
|
5
|
+
* @param {BYOCServerWrapperProps} props incoming props
|
|
6
|
+
* @returns rendered BYOCWrapper component
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare const BYOCServerWrapper: (props: BYOCServerWrapperProps) => Promise<React.JSX.Element>;
|
|
10
|
+
//# sourceMappingURL=BYOCServerWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BYOCServerWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/BYOCServerWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKtE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAU,OAAO,sBAAsB,+BAWpE,CAAC"}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
2
|
-
import { BYOCComponentProps } from './models';
|
|
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 React, { JSX } from 'react';
|
|
2
|
+
import { BYOCComponentProps } from './models';
|
|
3
|
+
export declare const __mockDependencies: (mocks: any) => void;
|
|
4
|
+
/**
|
|
5
|
+
* BYOCComponent facilitate the rendering of external components. It manages potential errors,
|
|
6
|
+
* missing components, and customization of error messages or alternative rendering components.
|
|
7
|
+
* @param {ByocComponentProps} props component props
|
|
8
|
+
* @returns dynamically rendered component or Missing Component error frame
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare class BYOCComponent extends React.Component<BYOCComponentProps> {
|
|
12
|
+
state: Readonly<{
|
|
13
|
+
error?: Error;
|
|
14
|
+
}>;
|
|
15
|
+
constructor(props: BYOCComponentProps);
|
|
16
|
+
static getDerivedStateFromError(error: Error): {
|
|
17
|
+
error: Error;
|
|
18
|
+
};
|
|
19
|
+
componentDidCatch(error: Error): void;
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SXA wrapper for BYOC components
|
|
24
|
+
* @param {BYOCComponentProps} props component props
|
|
25
|
+
* @returns wrapped BYOC component
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export declare const BYOCWrapper: (props: BYOCComponentProps) => JSX.Element;
|
|
29
|
+
//# sourceMappingURL=BYOCWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BYOCWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/BYOCWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,kBAAkB,EAAuB,MAAM,UAAU,CAAC;AAMnE,eAAO,MAAM,kBAAkB,GAAI,OAAO,GAAG,SAI5C,CAAC;AAQF;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC;IACpE,KAAK,EAAE,QAAQ,CAAC;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;gBAEvB,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK;;;IAK5C,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAI9B,MAAM;CAkEP;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,kBAAkB,KAAG,GAAG,CAAC,OAW3D,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FEaaSServerWrapperProps } from './models';
|
|
3
|
-
/**
|
|
4
|
-
* Server component for FEaaS. Retrieves server props and renders client FEaaSWrapper.
|
|
5
|
-
* @param {FEaaSComponentProps} props incoming props
|
|
6
|
-
* @returns
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FEaaSServerWrapperProps } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Server component for FEaaS. Retrieves server props and renders client FEaaSWrapper.
|
|
5
|
+
* @param {FEaaSComponentProps} props incoming props
|
|
6
|
+
* @returns rendered FEaaSWrapper component
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare const FEaaSServerWrapper: (props: FEaaSServerWrapperProps) => Promise<React.JSX.Element>;
|
|
10
|
+
//# sourceMappingURL=FEaaSSeverWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FEaaSSeverWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/FEaaSSeverWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAuB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGxE;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAU,OAAO,uBAAuB,+BAYtE,CAAC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { FEaaSComponentProps } from './models';
|
|
3
|
-
/**
|
|
4
|
-
* @param {FEaaSComponentProps} props component props
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { FEaaSComponentProps } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* @param {FEaaSComponentProps} props component props
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const FEaaSComponent: (props: FEaaSComponentProps) => JSX.Element | null;
|
|
8
|
+
/**
|
|
9
|
+
* The FEaaSWrapper component.
|
|
10
|
+
* @param {FEaaSComponentProps} props component props
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare const FEaaSWrapper: (props: FEaaSComponentProps) => JSX.Element;
|
|
14
|
+
//# sourceMappingURL=FEaaSWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FEaaSWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/FEaaSWrapper.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,KAAG,GAAG,CAAC,OAAO,GAAG,IAkCzE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,mBAAmB,KAAG,GAAG,CAAC,OAU7D,CAAC"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { BYOCComponentParams, BYOCServerProps, FEaaSComponentParams, FEaaSComponentServerProps, RevisionType } from './models';
|
|
2
|
-
/**
|
|
3
|
-
* Fetches server component props required for server rendering, based on rendering params.
|
|
4
|
-
* @param {BYOCComponentParams} params component params
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* @
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { BYOCComponentParams, BYOCServerProps, FEaaSComponentParams, FEaaSComponentServerProps, RevisionType } from './models';
|
|
2
|
+
/**
|
|
3
|
+
* Fetches server component props required for server rendering, based on rendering params.
|
|
4
|
+
* @param {BYOCComponentParams} params component params
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare function fetchBYOCComponentServerProps(params: BYOCComponentParams): Promise<BYOCServerProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Fetches server component props required for server rendering, based on rendering params.
|
|
10
|
+
* Component endpoint will either be retrieved from params or from endpointOverride
|
|
11
|
+
* @param {FEaaSComponentParams} params component params
|
|
12
|
+
* @param {boolean} [isPageStateNormal] whether page is in normal mode
|
|
13
|
+
* @param {string} [endpointOverride] optional override for component endpoint
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchFEaaSComponentServerProps(params: FEaaSComponentParams, isPageStateNormal?: boolean, endpointOverride?: string): Promise<FEaaSComponentServerProps | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Build component endpoint URL from component's params
|
|
19
|
+
* @param {FEaaSComponentParams} params rendering parameters for FEAAS component
|
|
20
|
+
* @param {RevisionType} revisionFallback fallback revision to fetch if revision is absent in params
|
|
21
|
+
* @returns component endpoint URL
|
|
22
|
+
*/
|
|
23
|
+
export declare const composeComponentEndpoint: (params: FEaaSComponentParams, revisionFallback: RevisionType) => string;
|
|
24
|
+
//# sourceMappingURL=feaas-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feaas-utils.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/feaas-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EACzB,YAAY,EACb,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,eAAe,CAAC,CAU1B;AAED;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,oBAAoB,EAC5B,iBAAiB,CAAC,EAAE,OAAO,EAC3B,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAuB3C;AA2CD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,oBAAoB,EAC5B,kBAAkB,YAAY,WAQ/B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { FEaaSWrapper, FEaaSComponent } from './FEaaSWrapper';
|
|
2
|
-
export { BYOCWrapper, BYOCComponent } from './BYOCWrapper';
|
|
3
|
-
export { FEaaSComponentClientProps, FEaaSComponentParams, FEaaSComponentProps, FEaaSServerWrapperProps, BYOCComponentParams, BYOCComponentProps, BYOCServerWrapperProps, FEAAS_COMPONENT_RENDERING_NAME, BYOC_COMPONENT_RENDERING_NAME, FEAAS_WRAPPER_RENDERING_NAME, BYOC_WRAPPER_RENDERING_NAME, } from './models';
|
|
4
|
-
export { FEaaSServerWrapper } from './FEaaSSeverWrapper';
|
|
5
|
-
export { BYOCServerWrapper } from './BYOCServerWrapper';
|
|
6
|
-
export { fetchFEaaSComponentServerProps, fetchBYOCComponentServerProps } from './feaas-utils';
|
|
1
|
+
export { FEaaSWrapper, FEaaSComponent } from './FEaaSWrapper';
|
|
2
|
+
export { BYOCWrapper, BYOCComponent } from './BYOCWrapper';
|
|
3
|
+
export { FEaaSComponentClientProps, FEaaSComponentParams, FEaaSComponentProps, FEaaSServerWrapperProps, BYOCComponentParams, BYOCComponentProps, BYOCServerWrapperProps, FEAAS_COMPONENT_RENDERING_NAME, BYOC_COMPONENT_RENDERING_NAME, FEAAS_WRAPPER_RENDERING_NAME, BYOC_WRAPPER_RENDERING_NAME, } from './models';
|
|
4
|
+
export { FEaaSServerWrapper } from './FEaaSSeverWrapper';
|
|
5
|
+
export { BYOCServerWrapper } from './BYOCServerWrapper';
|
|
6
|
+
export { fetchFEaaSComponentServerProps, fetchBYOCComponentServerProps } from './feaas-utils';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC"}
|