@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,125 +1,136 @@
|
|
|
1
|
-
import * as FEAAS from '@sitecore-feaas/clientside/react';
|
|
2
|
-
import { ComponentFields, ComponentRendering } from '@sitecore-content-sdk/core/layout';
|
|
3
|
-
import { Page } from '@sitecore-content-sdk/core/client';
|
|
4
|
-
import { MissingComponentProps } from '../MissingComponent';
|
|
5
|
-
export declare const FEAAS_WRAPPER_RENDERING_NAME = "FEaaSWrapper";
|
|
6
|
-
export declare const FEAAS_COMPONENT_RENDERING_NAME = "FEaaSComponent";
|
|
7
|
-
export declare const BYOC_WRAPPER_RENDERING_NAME = "BYOCWrapper";
|
|
8
|
-
export declare const BYOC_COMPONENT_RENDERING_NAME = "BYOCComponent";
|
|
9
|
-
/**
|
|
10
|
-
* FEaaS props for server rendering.
|
|
11
|
-
*/
|
|
12
|
-
export type BYOCServerProps = {
|
|
13
|
-
/**
|
|
14
|
-
* Fetched data from server component props for server rendering, based on rendering params.
|
|
15
|
-
*/
|
|
16
|
-
fetchedData?: FEAAS.DataScopes;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Data from rendering params on Sitecore's BYOC rendering
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
import * as FEAAS from '@sitecore-feaas/clientside/react';
|
|
2
|
+
import { ComponentFields, ComponentRendering } from '@sitecore-content-sdk/core/layout';
|
|
3
|
+
import { Page } from '@sitecore-content-sdk/core/client';
|
|
4
|
+
import { MissingComponentProps } from '../MissingComponent';
|
|
5
|
+
export declare const FEAAS_WRAPPER_RENDERING_NAME = "FEaaSWrapper";
|
|
6
|
+
export declare const FEAAS_COMPONENT_RENDERING_NAME = "FEaaSComponent";
|
|
7
|
+
export declare const BYOC_WRAPPER_RENDERING_NAME = "BYOCWrapper";
|
|
8
|
+
export declare const BYOC_COMPONENT_RENDERING_NAME = "BYOCComponent";
|
|
9
|
+
/**
|
|
10
|
+
* FEaaS props for server rendering.
|
|
11
|
+
*/
|
|
12
|
+
export type BYOCServerProps = {
|
|
13
|
+
/**
|
|
14
|
+
* Fetched data from server component props for server rendering, based on rendering params.
|
|
15
|
+
*/
|
|
16
|
+
fetchedData?: FEAAS.DataScopes;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Data from rendering params on Sitecore's BYOC rendering
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export type BYOCComponentParams = {
|
|
23
|
+
/**
|
|
24
|
+
* Name of the component to render
|
|
25
|
+
*/
|
|
26
|
+
ComponentName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* JSON props to pass into rendered component
|
|
29
|
+
*/
|
|
30
|
+
ComponentProps?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A JSON object with data sources to be fetched and passed to the component
|
|
33
|
+
*/
|
|
34
|
+
ComponentDataOverride?: string;
|
|
35
|
+
/**
|
|
36
|
+
* A string with classes that can be used to apply themes, via SXA functionality
|
|
37
|
+
*/
|
|
38
|
+
styles?: string;
|
|
39
|
+
RenderingIdentifier?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Props for BYOCComponent. Includes components list to load external components from.
|
|
43
|
+
*/
|
|
44
|
+
export type BYOCComponentClientProps = {
|
|
45
|
+
/**
|
|
46
|
+
* rendering data
|
|
47
|
+
*/
|
|
48
|
+
rendering: ComponentRendering;
|
|
49
|
+
/**
|
|
50
|
+
* rendering params
|
|
51
|
+
*/
|
|
52
|
+
params?: BYOCComponentParams;
|
|
53
|
+
/**
|
|
54
|
+
* fields from datasource items to be passed as rendered child component props
|
|
55
|
+
*/
|
|
56
|
+
fields?: ComponentFields;
|
|
57
|
+
/**
|
|
58
|
+
* Error component override. To be shown when Renderer or underlying component throws
|
|
59
|
+
*/
|
|
60
|
+
errorComponent?: React.ComponentClass<ErrorComponentProps> | React.FC<ErrorComponentProps>;
|
|
61
|
+
/**
|
|
62
|
+
* Override to indicate missing component situations. Would be shown when BYOC component is not registered
|
|
63
|
+
* or ComponentName is missing
|
|
64
|
+
*/
|
|
65
|
+
missingComponentComponent?: React.ComponentClass<MissingComponentProps> | React.FC<MissingComponentProps>;
|
|
66
|
+
};
|
|
67
|
+
export type BYOCServerWrapperProps = BYOCComponentProps & {
|
|
68
|
+
rendering: ComponentRendering;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Props for BYOCComponent.
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export type BYOCComponentProps = BYOCComponentClientProps & BYOCServerProps;
|
|
75
|
+
export type ErrorComponentProps = {
|
|
76
|
+
[prop: string]: unknown;
|
|
77
|
+
error?: Error;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Params from a Sitecore FEaaS rendering
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export type FEaaSComponentParams = {
|
|
84
|
+
LibraryId?: string;
|
|
85
|
+
ComponentId?: string;
|
|
86
|
+
ComponentVersion?: string;
|
|
87
|
+
ComponentRevision?: RevisionType;
|
|
88
|
+
ComponentHostName?: string;
|
|
89
|
+
ComponentInstanceId?: string;
|
|
90
|
+
ComponentDataOverride?: string;
|
|
91
|
+
ComponentHTMLOverride?: string;
|
|
92
|
+
styles?: string;
|
|
93
|
+
RenderingIdentifier?: string;
|
|
94
|
+
};
|
|
95
|
+
export type RevisionType = number | 'staged' | 'published' | 'saved';
|
|
96
|
+
export type FEaaSServerWrapperProps = FEaaSComponentProps & {
|
|
97
|
+
rendering?: ComponentRendering;
|
|
98
|
+
page?: Page;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* The FEaaS component props.
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export type FEaaSComponentProps = FEaaSComponentServerProps & FEaaSComponentClientProps;
|
|
105
|
+
/**
|
|
106
|
+
* FEaaS props for server rendering.
|
|
107
|
+
*/
|
|
108
|
+
export type FEaaSComponentServerProps = {
|
|
109
|
+
/**
|
|
110
|
+
* HTML template for presentation rendered inside the component
|
|
111
|
+
*/
|
|
112
|
+
template?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Default revision to be fetched. Should be 'staged' for editing/preview. Can be overriden by params.ComponentRevision
|
|
115
|
+
*/
|
|
116
|
+
revisionFallback?: RevisionType;
|
|
117
|
+
/**
|
|
118
|
+
* Fetched data from server component props for server rendering, based on rendering params.
|
|
119
|
+
*/
|
|
120
|
+
fetchedData?: FEAAS.DataScopes;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* FEaaS props for client side component. Should be used as fallback when server props are not provided.
|
|
124
|
+
* Would also be passed on server to avoid hydration issues
|
|
125
|
+
*/
|
|
126
|
+
export type FEaaSComponentClientProps = {
|
|
127
|
+
/**
|
|
128
|
+
* parameters from Sitecore's FEAAS component
|
|
129
|
+
*/
|
|
130
|
+
params?: FEaaSComponentParams;
|
|
131
|
+
/**
|
|
132
|
+
* field data from component's datasource
|
|
133
|
+
*/
|
|
134
|
+
fields?: ComponentFields;
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/components/FEaaS/models.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
2
|
-
interface FieldMetadataProps {
|
|
3
|
-
metadata: {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
};
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The component which renders field metadata markup
|
|
10
|
-
* @param {FieldMetadataProps} props the props of the component
|
|
11
|
-
* @returns metadata markup wrapped around children
|
|
12
|
-
*/
|
|
13
|
-
export declare const FieldMetadata: {
|
|
14
|
-
(props: FieldMetadataProps): JSX.Element;
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
1
|
+
import React, { JSX } from 'react';
|
|
2
|
+
interface FieldMetadataProps {
|
|
3
|
+
metadata: {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The component which renders field metadata markup
|
|
10
|
+
* @param {FieldMetadataProps} props the props of the component
|
|
11
|
+
* @returns metadata markup wrapped around children
|
|
12
|
+
*/
|
|
13
|
+
export declare const FieldMetadata: {
|
|
14
|
+
(props: FieldMetadataProps): JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=FieldMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldMetadata.d.ts","sourceRoot":"","sources":["../../src/components/FieldMetadata.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGnC,UAAU,kBAAkB;IAC1B,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;YAAW,kBAAkB,GAAG,GAAG,CAAC,OAAO;;CAiBpE,CAAC"}
|
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface FileFieldValue {
|
|
3
|
-
[propName: string]: unknown;
|
|
4
|
-
src?: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
displayName?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FileFieldValue {
|
|
3
|
+
[propName: string]: unknown;
|
|
4
|
+
src?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
displayName?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The interface for the File field.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface FileField {
|
|
13
|
+
value: FileFieldValue;
|
|
14
|
+
}
|
|
15
|
+
export interface FileProps {
|
|
16
|
+
[attributeName: string]: unknown;
|
|
17
|
+
/** The file field data. */
|
|
18
|
+
field: FileFieldValue | FileField;
|
|
19
|
+
/** HTML attributes that will be appended to the rendered <a /> tag. */
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The File component.
|
|
24
|
+
* @param {FileProps} props component props
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare const File: React.FC<FileProps>;
|
|
28
|
+
//# sourceMappingURL=File.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/components/File.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,2BAA2B;IAC3B,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;IAClC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAoBpC,CAAC"}
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentRendering } from '@sitecore-content-sdk/core/layout';
|
|
3
|
-
/**
|
|
4
|
-
* Mock function to replace the form module functions for `testing` purposes.
|
|
5
|
-
* @param {any} formModule - The form module to mock
|
|
6
|
-
*/
|
|
7
|
-
export declare const mockFormModule: (formModule: any) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Shape of the Form component rendering data.
|
|
10
|
-
* FormId is the rendering parameter that specifies the ID of the Sitecore Form to render.
|
|
11
|
-
*/
|
|
12
|
-
export type FormProps = {
|
|
13
|
-
rendering: ComponentRendering;
|
|
14
|
-
params: {
|
|
15
|
-
/**
|
|
16
|
-
* The ID of the Sitecore Form to render.
|
|
17
|
-
*/
|
|
18
|
-
FormId: string;
|
|
19
|
-
/**
|
|
20
|
-
* CSS class to apply to the form
|
|
21
|
-
*/
|
|
22
|
-
styles?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The unique identifier of the rendering.
|
|
25
|
-
*/
|
|
26
|
-
RenderingIdentifier?: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentRendering } from '@sitecore-content-sdk/core/layout';
|
|
3
|
+
/**
|
|
4
|
+
* Mock function to replace the form module functions for `testing` purposes.
|
|
5
|
+
* @param {any} formModule - The form module to mock
|
|
6
|
+
*/
|
|
7
|
+
export declare const mockFormModule: (formModule: any) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Shape of the Form component rendering data.
|
|
10
|
+
* FormId is the rendering parameter that specifies the ID of the Sitecore Form to render.
|
|
11
|
+
*/
|
|
12
|
+
export type FormProps = {
|
|
13
|
+
rendering: ComponentRendering;
|
|
14
|
+
params: {
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the Sitecore Form to render.
|
|
17
|
+
*/
|
|
18
|
+
FormId: string;
|
|
19
|
+
/**
|
|
20
|
+
* CSS class to apply to the form
|
|
21
|
+
*/
|
|
22
|
+
styles?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The unique identifier of the rendering.
|
|
25
|
+
*/
|
|
26
|
+
RenderingIdentifier?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The Form component.
|
|
31
|
+
* @param {FormProps} props incoming props
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export declare const Form: ({ params, rendering }: FormProps) => React.JSX.Element;
|
|
35
|
+
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/components/Form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAOvE;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,YAAY,GAAG,SAI7C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE;QACN;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QACf;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;WAEG;QACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,IAAI,GAAI,uBAAuB,SAAS,sBAwDpD,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const HiddenRendering: () => React.JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const HiddenRendering: () => React.JSX.Element;
|
|
3
|
+
//# sourceMappingURL=HiddenRendering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HiddenRendering.d.ts","sourceRoot":"","sources":["../../src/components/HiddenRendering.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,eAAO,MAAM,eAAe,yBAK3B,CAAC"}
|
|
@@ -1,48 +1,70 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditableFieldProps } from './sharedTypes';
|
|
3
|
-
import { FieldMetadata } from '@sitecore-content-sdk/core/layout';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface
|
|
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
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditableFieldProps } from './sharedTypes';
|
|
3
|
+
import { FieldMetadata } from '@sitecore-content-sdk/core/layout';
|
|
4
|
+
/**
|
|
5
|
+
* The interface for the Image field value.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface ImageFieldValue {
|
|
9
|
+
[attributeName: string]: unknown;
|
|
10
|
+
src?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The interface for the Image field.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export interface ImageField {
|
|
17
|
+
value?: ImageFieldValue;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The interface for the Image size parameters.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface ImageSizeParameters {
|
|
24
|
+
[attr: string]: string | number | undefined;
|
|
25
|
+
/** Fixed width of the image */
|
|
26
|
+
w?: number;
|
|
27
|
+
/** Fixed height of the image */
|
|
28
|
+
h?: number;
|
|
29
|
+
/** Max width of the image */
|
|
30
|
+
mw?: number;
|
|
31
|
+
/** Max height of the image */
|
|
32
|
+
mh?: number;
|
|
33
|
+
/** Ignore aspect ratio */
|
|
34
|
+
iar?: 1 | 0;
|
|
35
|
+
/** Allow stretch */
|
|
36
|
+
as?: 1 | 0;
|
|
37
|
+
/** Image scale. Defaults to 1.0 */
|
|
38
|
+
sc?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The interface for the Image component props.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export interface ImageProps extends EditableFieldProps<ImageProps> {
|
|
45
|
+
[attributeName: string]: unknown;
|
|
46
|
+
/** Image field data (consistent with other field types) */
|
|
47
|
+
field?: (ImageField | ImageFieldValue) & FieldMetadata;
|
|
48
|
+
/**
|
|
49
|
+
* Parameters that will be attached to Sitecore media URLs
|
|
50
|
+
*/
|
|
51
|
+
imageParams?: {
|
|
52
|
+
[paramName: string]: string | number;
|
|
53
|
+
};
|
|
54
|
+
srcSet?: ImageSizeParameters[];
|
|
55
|
+
/**
|
|
56
|
+
* Custom regexp that finds media URL prefix that will be replaced by `/-/jssmedia` or `/~/jssmedia`.
|
|
57
|
+
* @example
|
|
58
|
+
* /\/([-~]{1})assets\//i
|
|
59
|
+
* /-assets/website -> /-/jssmedia/website
|
|
60
|
+
* /~assets/website -> /~/jssmedia/website
|
|
61
|
+
*/
|
|
62
|
+
mediaUrlPrefix?: RegExp;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The Image component.
|
|
66
|
+
* @param {ImageProps} props component props
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export declare const Image: React.FC<ImageProps>;
|
|
70
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/components/Image.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;CAEd;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C,+BAA+B;IAC/B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACZ,oBAAoB;IACpB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACX,mCAAmC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,kBAAkB,CAAC,UAAU,CAAC;IAChE,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,CAAC,UAAU,GAAG,eAAe,CAAC,GAAG,aAAa,CAAC;IAEvD;;OAEG;IACH,WAAW,CAAC,EAAE;QACZ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;KACtC,CAAC;IAEF,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAE/B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAGzB;AAmCD;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA+BtC,CAAC"}
|
|
@@ -1,27 +1,45 @@
|
|
|
1
|
-
import React, { RefAttributes } from 'react';
|
|
2
|
-
import { FieldMetadata } from '@sitecore-content-sdk/core/layout';
|
|
3
|
-
import { EditableFieldProps } from './sharedTypes';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
1
|
+
import React, { RefAttributes } from 'react';
|
|
2
|
+
import { FieldMetadata } from '@sitecore-content-sdk/core/layout';
|
|
3
|
+
import { EditableFieldProps } from './sharedTypes';
|
|
4
|
+
/**
|
|
5
|
+
* The interface for the Link field value.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface LinkFieldValue {
|
|
9
|
+
[attributeName: string]: unknown;
|
|
10
|
+
href?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
class?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
target?: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
anchor?: string;
|
|
17
|
+
querystring?: string;
|
|
18
|
+
linktype?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The interface for the Link field.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export interface LinkField {
|
|
25
|
+
value: LinkFieldValue;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The interface for the Link component props.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export type LinkProps = EditableFieldProps<LinkProps> & React.AnchorHTMLAttributes<HTMLAnchorElement> & RefAttributes<HTMLAnchorElement> & {
|
|
32
|
+
/** The link field data. */
|
|
33
|
+
field: (LinkField | LinkFieldValue) & FieldMetadata;
|
|
34
|
+
/**
|
|
35
|
+
* Displays a link text ('description' in Sitecore) even when children exist
|
|
36
|
+
*/
|
|
37
|
+
showLinkTextWithChildrenPresent?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The Link component.
|
|
41
|
+
* @param {LinkProps} props component props
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare const Link: React.FC<LinkProps>;
|
|
45
|
+
//# 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,KAAK,EAAE,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,aAAa,EAAqB,MAAM,mCAAmC,CAAC;AAIrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,GACnD,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAC7C,aAAa,CAAC,iBAAiB,CAAC,GAAG;IACjC,2BAA2B;IAC3B,KAAK,EAAE,CAAC,SAAS,GAAG,cAAc,CAAC,GAAG,aAAa,CAAC;IAEpD;;OAEG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC3C,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAoDpC,CAAC"}
|