@sitecore-jss/sitecore-jss-react 22.6.0 → 22.7.0-canary.10
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/LICENSE.txt +202 -202
- package/README.md +10 -10
- package/dist/cjs/components/Date.js +0 -15
- package/dist/cjs/components/ErrorBoundary.js +2 -2
- package/dist/cjs/components/FieldMetadata.js +0 -5
- package/dist/cjs/components/File.js +0 -11
- package/dist/cjs/components/Image.js +0 -19
- package/dist/cjs/components/Link.js +1 -24
- package/dist/cjs/components/MissingComponent.js +0 -6
- package/dist/cjs/components/PlaceholderCommon.js +2 -27
- package/dist/cjs/components/RichText.js +1 -19
- package/dist/cjs/components/SitecoreContext.js +0 -11
- package/dist/cjs/components/Text.js +0 -15
- package/dist/cjs/index.js +2 -4
- package/dist/esm/components/Date.js +0 -15
- package/dist/esm/components/ErrorBoundary.js +2 -2
- package/dist/esm/components/FieldMetadata.js +0 -5
- package/dist/esm/components/File.js +0 -11
- package/dist/esm/components/Image.js +0 -19
- package/dist/esm/components/Link.js +0 -20
- package/dist/esm/components/MissingComponent.js +0 -6
- package/dist/esm/components/PlaceholderCommon.js +2 -27
- package/dist/esm/components/RichText.js +0 -15
- package/dist/esm/components/SitecoreContext.js +0 -11
- package/dist/esm/components/Text.js +0 -15
- package/dist/esm/index.js +2 -2
- package/package.json +15 -17
- package/types/components/BYOCWrapper.d.ts +1 -0
- package/types/components/EditingScripts.d.ts +1 -0
- package/types/components/ErrorBoundary.d.ts +1 -0
- package/types/components/FEaaSComponent.d.ts +1 -0
- package/types/components/FEaaSWrapper.d.ts +1 -0
- package/types/components/FieldMetadata.d.ts +1 -6
- package/types/components/Link.d.ts +0 -13
- package/types/components/PlaceholderCommon.d.ts +5 -15
- package/types/components/PlaceholderMetadata.d.ts +1 -1
- package/types/components/RichText.d.ts +0 -13
- package/types/components/SitecoreContext.d.ts +0 -11
- package/types/enhancers/withComponentFactory.d.ts +1 -1
- package/types/enhancers/withDatasourceCheck.d.ts +2 -2
- package/types/index.d.ts +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="@types/react" />
|
|
2
2
|
import React, { ComponentType } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { ComponentFactory } from './sharedTypes';
|
|
5
4
|
import { ComponentRendering, RouteData, Field, Item, HtmlElementRendering, EditMode } from '@sitecore-jss/sitecore-jss/layout';
|
|
6
5
|
import { SitecoreContextValue } from './SitecoreContext';
|
|
@@ -66,22 +65,13 @@ export interface PlaceholderProps {
|
|
|
66
65
|
* The message that gets displayed while component is loading
|
|
67
66
|
*/
|
|
68
67
|
componentLoadingMessage?: string;
|
|
68
|
+
/**
|
|
69
|
+
* If true, disables Suspense for the placeholder.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
disableSuspense?: boolean;
|
|
69
73
|
}
|
|
70
74
|
export declare class PlaceholderCommon<T extends PlaceholderProps> extends React.Component<T> {
|
|
71
|
-
static propTypes: {
|
|
72
|
-
rendering: PropTypes.Validator<NonNullable<NonNullable<ComponentRendering<import("@sitecore-jss/sitecore-jss/layout").ComponentFields> | RouteData<Record<string, Field<import("@sitecore-jss/sitecore-jss/layout").GenericFieldValue> | Item | Item[]>>>>>;
|
|
73
|
-
fields: PropTypes.Requireable<{
|
|
74
|
-
[x: string]: NonNullable<NonNullable<Field<import("@sitecore-jss/sitecore-jss/layout").GenericFieldValue> | Item[]>>;
|
|
75
|
-
}>;
|
|
76
|
-
params: PropTypes.Requireable<{
|
|
77
|
-
[x: string]: string;
|
|
78
|
-
}>;
|
|
79
|
-
missingComponentComponent: PropTypes.Requireable<NonNullable<React.ComponentClass<unknown, any> | React.FC<unknown>>>;
|
|
80
|
-
hiddenRenderingComponent: PropTypes.Requireable<NonNullable<React.ComponentClass<unknown, any> | React.FC<unknown>>>;
|
|
81
|
-
errorComponent: PropTypes.Requireable<NonNullable<React.ComponentClass<unknown, any> | React.FC<unknown>>>;
|
|
82
|
-
modifyComponentProps: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
-
sitecoreContext: PropTypes.Requireable<SitecoreContextValue>;
|
|
84
|
-
};
|
|
85
75
|
nodeRefs: Element[];
|
|
86
76
|
state: Readonly<{
|
|
87
77
|
error?: Error;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="@types/react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { EditableFieldProps } from './sharedTypes';
|
|
5
4
|
import { FieldMetadata } from '@sitecore-jss/sitecore-jss/layout';
|
|
6
5
|
export interface RichTextField extends FieldMetadata {
|
|
@@ -18,15 +17,3 @@ export interface RichTextProps extends EditableFieldProps {
|
|
|
18
17
|
tag?: string;
|
|
19
18
|
}
|
|
20
19
|
export declare const RichText: React.FC<RichTextProps>;
|
|
21
|
-
export declare const RichTextPropTypes: {
|
|
22
|
-
field: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
|
-
value: PropTypes.Requireable<string>;
|
|
24
|
-
editable: PropTypes.Requireable<string>;
|
|
25
|
-
metadata: PropTypes.Requireable<{
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
}>;
|
|
28
|
-
}>>;
|
|
29
|
-
tag: PropTypes.Requireable<string>;
|
|
30
|
-
editable: PropTypes.Requireable<boolean>;
|
|
31
|
-
emptyFieldEditingComponent: PropTypes.Requireable<NonNullable<React.ComponentClass<unknown, any> | React.FC<unknown>>>;
|
|
32
|
-
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="@types/react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { ComponentFactory } from './sharedTypes';
|
|
5
4
|
import { LayoutServiceContext, LayoutServiceData, RouteData } from '../index';
|
|
6
5
|
export interface SitecoreContextProps {
|
|
@@ -39,16 +38,6 @@ export type SitecoreContextValue = LayoutServiceContext & {
|
|
|
39
38
|
route?: RouteData;
|
|
40
39
|
};
|
|
41
40
|
export declare class SitecoreContext extends React.Component<SitecoreContextProps, SitecoreContextState> {
|
|
42
|
-
static propTypes: {
|
|
43
|
-
children: PropTypes.Validator<any>;
|
|
44
|
-
componentFactory: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
|
-
layoutData: PropTypes.Requireable<PropTypes.InferProps<{
|
|
46
|
-
sitecore: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
|
-
context: PropTypes.Requireable<any>;
|
|
48
|
-
route: PropTypes.Requireable<any>;
|
|
49
|
-
}>>;
|
|
50
|
-
}>>;
|
|
51
|
-
};
|
|
52
41
|
static displayName: string;
|
|
53
42
|
constructor(props: SitecoreContextProps);
|
|
54
43
|
constructContext(layoutData?: LayoutServiceData): SitecoreContextValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@types/react" />
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { JSX } from 'react';
|
|
3
3
|
import { ComponentRendering } from '@sitecore-jss/sitecore-jss/layout';
|
|
4
4
|
export declare const DefaultEditingError: () => JSX.Element;
|
|
5
5
|
export interface WithDatasourceCheckProps {
|
|
@@ -19,4 +19,4 @@ export interface WithDatasourceCheckOptions {
|
|
|
19
19
|
* The wrapped component, if a datasource is present.
|
|
20
20
|
* A null component (in normal mode) or an error component (in editing mode), if a datasource is not present.
|
|
21
21
|
*/
|
|
22
|
-
export declare function withDatasourceCheck(options?: WithDatasourceCheckOptions): <ComponentProps extends WithDatasourceCheckProps>(Component: React.ComponentType<ComponentProps>) => (props: ComponentProps) =>
|
|
22
|
+
export declare function withDatasourceCheck(options?: WithDatasourceCheckOptions): <ComponentProps extends WithDatasourceCheckProps>(Component: React.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
package/types/index.d.ts
CHANGED
|
@@ -10,14 +10,14 @@ export { ComponentFactory, JssComponentType } from './components/sharedTypes';
|
|
|
10
10
|
export { Placeholder, PlaceholderComponentProps } from './components/Placeholder';
|
|
11
11
|
export { Form } from './components/Form';
|
|
12
12
|
export { Image, ImageProps, ImageField, getEEMarkup, ImageFieldValue, ImageSizeParameters, } from './components/Image';
|
|
13
|
-
export { RichText, RichTextProps,
|
|
13
|
+
export { RichText, RichTextProps, RichTextField } from './components/RichText';
|
|
14
14
|
export { Text, TextField } from './components/Text';
|
|
15
15
|
export { DateField, DateFieldProps } from './components/Date';
|
|
16
16
|
export { FEaaSComponent, FEaaSComponentProps, FEaaSComponentParams, fetchFEaaSComponentServerProps, } from './components/FEaaSComponent';
|
|
17
17
|
export { FEaaSWrapper } from './components/FEaaSWrapper';
|
|
18
18
|
export { BYOCComponent, BYOCComponentParams, BYOCComponentProps, fetchBYOCComponentServerProps, } from './components/BYOCComponent';
|
|
19
19
|
export { BYOCWrapper } from './components/BYOCWrapper';
|
|
20
|
-
export { Link, LinkField, LinkFieldValue, LinkProps
|
|
20
|
+
export { Link, LinkField, LinkFieldValue, LinkProps } from './components/Link';
|
|
21
21
|
export { File, FileField } from './components/File';
|
|
22
22
|
export { VisitorIdentification } from './components/VisitorIdentification';
|
|
23
23
|
export { SitecoreContext, SitecoreContextState, SitecoreContextValue, SitecoreContextReactContext, } from './components/SitecoreContext';
|