@webiny/app-headless-cms 5.40.6 → 5.41.0-beta.0
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/ContentEntryEditorConfig.d.ts +271 -43
- package/ContentEntryEditorConfig.js +5 -0
- package/ContentEntryEditorConfig.js.map +1 -1
- package/ContentEntryListConfig.d.ts +82 -16
- package/admin/components/ContentEntries/BulkActions/ActionDelete.js +17 -5
- package/admin/components/ContentEntries/BulkActions/ActionDelete.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionMove.js +24 -4
- package/admin/components/ContentEntries/BulkActions/ActionMove.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionPublish.js +17 -5
- package/admin/components/ContentEntries/BulkActions/ActionPublish.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionUnpublish.js +17 -5
- package/admin/components/ContentEntries/BulkActions/ActionUnpublish.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/BulkActions.d.ts +1 -1
- package/admin/components/ContentEntries/BulkActions/BulkActions.js +15 -6
- package/admin/components/ContentEntries/BulkActions/BulkActions.js.map +1 -1
- package/admin/components/ContentEntries/SelectAll/Messages.d.ts +7 -0
- package/admin/components/ContentEntries/SelectAll/Messages.js +29 -0
- package/admin/components/ContentEntries/SelectAll/Messages.js.map +1 -0
- package/admin/components/ContentEntries/SelectAll/SelectAll.d.ts +3 -0
- package/admin/components/ContentEntries/SelectAll/SelectAll.js +32 -0
- package/admin/components/ContentEntries/SelectAll/SelectAll.js.map +1 -0
- package/admin/components/ContentEntries/SelectAll/SelectAll.styled.d.ts +12 -0
- package/admin/components/ContentEntries/SelectAll/SelectAll.styled.js +54 -0
- package/admin/components/ContentEntries/SelectAll/SelectAll.styled.js.map +1 -0
- package/admin/components/ContentEntries/SelectAll/index.d.ts +1 -0
- package/admin/components/ContentEntries/SelectAll/index.js +18 -0
- package/admin/components/ContentEntries/SelectAll/index.js.map +1 -0
- package/admin/components/ContentEntries/Table/Cells/CellActions.d.ts +15 -3
- package/admin/components/ContentEntries/TrashBin/adapters/TrashBinBulkActionsGraphQLGateway.d.ts +12 -0
- package/admin/components/ContentEntries/TrashBin/adapters/TrashBinBulkActionsGraphQLGateway.js +40 -0
- package/admin/components/ContentEntries/TrashBin/adapters/TrashBinBulkActionsGraphQLGateway.js.map +1 -0
- package/admin/components/ContentEntries/TrashBin/adapters/index.d.ts +1 -0
- package/admin/components/ContentEntries/TrashBin/adapters/index.js +11 -0
- package/admin/components/ContentEntries/TrashBin/adapters/index.js.map +1 -1
- package/admin/components/ContentEntries/TrashBin/components/TrashBin.js +6 -0
- package/admin/components/ContentEntries/TrashBin/components/TrashBin.js.map +1 -1
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +15 -3
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +15 -3
- package/admin/components/ContentEntryForm/FieldElement.d.ts +31 -7
- package/admin/components/ContentEntryForm/SingletonHeader/SaveAction.js +2 -2
- package/admin/components/ContentEntryForm/SingletonHeader/SaveAction.js.map +1 -1
- package/admin/components/ContentModelEditor/ContentModelEditor.d.ts +15 -3
- package/admin/components/Droppable.d.ts +1 -1
- package/admin/components/FieldEditor/utils/deleteField.d.ts +1 -1
- package/admin/components/ModelFieldProvider/ModelFieldContext.d.ts +1 -1
- package/admin/components/ModelProvider/ModelContext.d.ts +1 -1
- package/admin/components/ModelProvider/useModel.d.ts +1 -1
- package/admin/config/contentEntries/editor/Actions/ButtonAction.d.ts +32 -8
- package/admin/config/contentEntries/editor/Actions/MenuItemAction.d.ts +32 -8
- package/admin/config/contentEntries/editor/Actions/index.d.ts +31 -7
- package/admin/config/contentEntries/editor/ContentEntryEditorConfig.d.ts +35 -7
- package/admin/config/contentEntries/editor/FieldElement.d.ts +5 -1
- package/admin/config/contentEntries/list/Browser/BulkAction.d.ts +37 -6
- package/admin/config/contentEntries/list/Browser/BulkAction.js +25 -2
- package/admin/config/contentEntries/list/Browser/BulkAction.js.map +1 -1
- package/admin/config/contentEntries/list/Browser/EntryAction.d.ts +15 -3
- package/admin/config/contentEntries/list/Browser/Filter.d.ts +20 -4
- package/admin/config/contentEntries/list/Browser/Table/Column.d.ts +15 -3
- package/admin/config/contentEntries/list/Browser/Table/index.d.ts +15 -3
- package/admin/config/contentEntries/list/Browser/index.d.ts +67 -13
- package/admin/config/contentEntries/list/ContentEntryListConfig.d.ts +67 -13
- package/admin/constants.d.ts +1 -1
- package/admin/contexts/Cms/index.d.ts +22 -9
- package/admin/contexts/Cms/index.js +44 -0
- package/admin/contexts/Cms/index.js.map +1 -1
- package/admin/hooks/usePermission.d.ts +1 -1
- package/admin/lexicalConfig/LexicalEditorConfig.js +6 -10
- package/admin/lexicalConfig/LexicalEditorConfig.js.map +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.d.ts +46 -10
- package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.d.ts +1 -1
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.d.ts +106 -16
- package/admin/plugins/fieldRenderers/dynamicZone/TemplateItem.d.ts +15 -3
- package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.d.ts +16 -4
- package/admin/plugins/fieldRenderers/ref/components/useReference.d.ts +1 -1
- package/admin/plugins/fields/ref/renderInfo.d.ts +1 -1
- package/admin/views/contentEntries/ContentEntries.d.ts +15 -3
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +9 -9
- package/admin/views/contentEntries/ContentEntry/RevisionsList/PublishEntryRevisionListItem.d.ts +15 -3
- package/admin/views/contentEntries/ContentEntry/SingletonContentEntry.d.ts +15 -3
- package/admin/views/contentEntries/ContentEntry/SingletonContentEntry.js +2 -2
- package/admin/views/contentEntries/ContentEntry/SingletonContentEntry.js.map +1 -1
- package/admin/views/contentEntries/ContentEntry/SingletonContentEntryContext.d.ts +3 -3
- package/admin/views/contentEntries/ContentEntry/SingletonContentEntryContext.js.map +1 -1
- package/admin/views/contentEntries/ContentEntry.d.ts +15 -3
- package/admin/views/contentEntries/Table/Main.js +2 -1
- package/admin/views/contentEntries/Table/Main.js.map +1 -1
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +6 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.js +13 -2
- package/admin/views/contentEntries/hooks/useContentEntriesList.js.map +1 -1
- package/admin/views/contentModelGroups/graphql.d.ts +1 -1
- package/admin/views/contentModels/OptionsMenu.d.ts +15 -3
- package/admin/views/utils.d.ts +1 -1
- package/index.d.ts +20 -4
- package/package.json +29 -29
- package/types.d.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BindComponent, BindComponentRenderProp, CmsDynamicZoneTemplate, CmsModelFieldRendererProps, CmsModel, CmsModelField } from "../../../../types";
|
|
3
|
-
|
|
3
|
+
type GetBind = CmsModelFieldRendererProps["getBind"];
|
|
4
4
|
export interface MultiValueItemContainerProps {
|
|
5
5
|
value: TemplateValue;
|
|
6
6
|
contentModel: CmsModel;
|
|
@@ -16,24 +16,48 @@ export interface MultiValueItemContainerProps {
|
|
|
16
16
|
template: CmsDynamicZoneTemplate;
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
}
|
|
19
|
-
export declare const MultiValueItemContainer:
|
|
20
|
-
original:
|
|
19
|
+
export declare const MultiValueItemContainer: (({ children, ...props }: MultiValueItemContainerProps) => React.JSX.Element) & {
|
|
20
|
+
original: ({ children, ...props }: MultiValueItemContainerProps) => React.JSX.Element;
|
|
21
21
|
originalName: string;
|
|
22
22
|
displayName: string;
|
|
23
23
|
} & {
|
|
24
|
-
|
|
24
|
+
original: (({ children, ...props }: MultiValueItemContainerProps) => React.JSX.Element) & {
|
|
25
|
+
original: ({ children, ...props }: MultiValueItemContainerProps) => React.JSX.Element;
|
|
26
|
+
originalName: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
originalName: string;
|
|
30
|
+
displayName: string;
|
|
31
|
+
} & {
|
|
32
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children, ...props }: MultiValueItemContainerProps) => React.JSX.Element) & {
|
|
33
|
+
original: ({ children, ...props }: MultiValueItemContainerProps) => React.JSX.Element;
|
|
34
|
+
originalName: string;
|
|
35
|
+
displayName: string;
|
|
36
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
25
37
|
};
|
|
26
38
|
export interface MultiValueItemItemProps {
|
|
27
39
|
template: CmsDynamicZoneTemplate;
|
|
28
40
|
contentModel: CmsModel;
|
|
29
41
|
Bind: BindComponent;
|
|
30
42
|
}
|
|
31
|
-
export declare const MultiValueItem:
|
|
32
|
-
original:
|
|
43
|
+
export declare const MultiValueItem: ((props: MultiValueItemItemProps) => React.JSX.Element) & {
|
|
44
|
+
original: (props: MultiValueItemItemProps) => React.JSX.Element;
|
|
33
45
|
originalName: string;
|
|
34
46
|
displayName: string;
|
|
35
47
|
} & {
|
|
36
|
-
|
|
48
|
+
original: ((props: MultiValueItemItemProps) => React.JSX.Element) & {
|
|
49
|
+
original: (props: MultiValueItemItemProps) => React.JSX.Element;
|
|
50
|
+
originalName: string;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
originalName: string;
|
|
54
|
+
displayName: string;
|
|
55
|
+
} & {
|
|
56
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: MultiValueItemItemProps) => React.JSX.Element) & {
|
|
57
|
+
original: (props: MultiValueItemItemProps) => React.JSX.Element;
|
|
58
|
+
originalName: string;
|
|
59
|
+
displayName: string;
|
|
60
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
37
61
|
};
|
|
38
62
|
interface TemplateValue {
|
|
39
63
|
_templateId: string;
|
|
@@ -42,12 +66,24 @@ interface TemplateValue {
|
|
|
42
66
|
export interface MultiValueContainerProps extends MultiValueDynamicZoneProps {
|
|
43
67
|
children: React.ReactNode;
|
|
44
68
|
}
|
|
45
|
-
export declare const MultiValueContainer:
|
|
46
|
-
original:
|
|
69
|
+
export declare const MultiValueContainer: (({ children }: MultiValueContainerProps) => React.JSX.Element) & {
|
|
70
|
+
original: ({ children }: MultiValueContainerProps) => React.JSX.Element;
|
|
71
|
+
originalName: string;
|
|
72
|
+
displayName: string;
|
|
73
|
+
} & {
|
|
74
|
+
original: (({ children }: MultiValueContainerProps) => React.JSX.Element) & {
|
|
75
|
+
original: ({ children }: MultiValueContainerProps) => React.JSX.Element;
|
|
76
|
+
originalName: string;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
47
79
|
originalName: string;
|
|
48
80
|
displayName: string;
|
|
49
81
|
} & {
|
|
50
|
-
createDecorator: (decorator: import("@webiny/react-composition").
|
|
82
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children }: MultiValueContainerProps) => React.JSX.Element) & {
|
|
83
|
+
original: ({ children }: MultiValueContainerProps) => React.JSX.Element;
|
|
84
|
+
originalName: string;
|
|
85
|
+
displayName: string;
|
|
86
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
51
87
|
};
|
|
52
88
|
interface MultiValueDynamicZoneProps {
|
|
53
89
|
field: CmsModelField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BindComponentRenderProp, CmsModelFieldRendererProps, CmsModel, CmsModelField } from "../../../../types";
|
|
3
|
-
|
|
3
|
+
type GetBind = CmsModelFieldRendererProps["getBind"];
|
|
4
4
|
interface SingleValueDynamicZoneProps {
|
|
5
5
|
field: CmsModelField;
|
|
6
6
|
bind: BindComponentRenderProp;
|
|
@@ -14,46 +14,136 @@ export interface TemplateGalleryProps {
|
|
|
14
14
|
onClose: () => void;
|
|
15
15
|
templates?: CmsDynamicZoneTemplate[];
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type ShouldRender = {
|
|
18
18
|
modelIds?: string[];
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* We're wrapping each component with `withShouldRender`, because they're all decoratable, and `withShouldRender` attaches a
|
|
22
22
|
* conditional decorator, which optionally takes a `modelIds` prop, so you can control on which models that component will be decorated.
|
|
23
23
|
*/
|
|
24
|
-
export declare const TemplateGallery:
|
|
25
|
-
original:
|
|
24
|
+
export declare const TemplateGallery: ((props: TemplateGalleryProps) => React.JSX.Element) & {
|
|
25
|
+
original: (props: TemplateGalleryProps) => React.JSX.Element;
|
|
26
26
|
originalName: string;
|
|
27
27
|
displayName: string;
|
|
28
28
|
} & {
|
|
29
|
-
|
|
29
|
+
original: ((props: TemplateGalleryProps) => React.JSX.Element) & {
|
|
30
|
+
original: (props: TemplateGalleryProps) => React.JSX.Element;
|
|
31
|
+
originalName: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
originalName: string;
|
|
35
|
+
displayName: string;
|
|
36
|
+
} & {
|
|
37
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: TemplateGalleryProps) => React.JSX.Element) & {
|
|
38
|
+
original: (props: TemplateGalleryProps) => React.JSX.Element;
|
|
39
|
+
originalName: string;
|
|
40
|
+
displayName: string;
|
|
41
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
42
|
+
} & {
|
|
43
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: TemplateGalleryProps) => React.JSX.Element) & {
|
|
44
|
+
original: (props: TemplateGalleryProps) => React.JSX.Element;
|
|
45
|
+
originalName: string;
|
|
46
|
+
displayName: string;
|
|
47
|
+
}>) => (props: ShouldRender) => React.JSX.Element;
|
|
30
48
|
} & {
|
|
31
|
-
Container:
|
|
32
|
-
original:
|
|
49
|
+
Container: ((props: TemplateGalleryContainerProps) => React.JSX.Element) & {
|
|
50
|
+
original: (props: TemplateGalleryContainerProps) => React.JSX.Element;
|
|
51
|
+
originalName: string;
|
|
52
|
+
displayName: string;
|
|
53
|
+
} & {
|
|
54
|
+
original: ((props: TemplateGalleryContainerProps) => React.JSX.Element) & {
|
|
55
|
+
original: (props: TemplateGalleryContainerProps) => React.JSX.Element;
|
|
56
|
+
originalName: string;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
33
59
|
originalName: string;
|
|
34
60
|
displayName: string;
|
|
35
61
|
} & {
|
|
36
|
-
createDecorator: (decorator: import("@webiny/app-admin").
|
|
62
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: TemplateGalleryContainerProps) => React.JSX.Element) & {
|
|
63
|
+
original: (props: TemplateGalleryContainerProps) => React.JSX.Element;
|
|
64
|
+
originalName: string;
|
|
65
|
+
displayName: string;
|
|
66
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
67
|
+
} & {
|
|
68
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: TemplateGalleryContainerProps) => React.JSX.Element) & {
|
|
69
|
+
original: (props: TemplateGalleryContainerProps) => React.JSX.Element;
|
|
70
|
+
originalName: string;
|
|
71
|
+
displayName: string;
|
|
72
|
+
}>) => (props: ShouldRender) => React.JSX.Element;
|
|
37
73
|
};
|
|
38
|
-
List:
|
|
39
|
-
original:
|
|
74
|
+
List: ((props: TemplateGalleryListProps) => React.JSX.Element) & {
|
|
75
|
+
original: (props: TemplateGalleryListProps) => React.JSX.Element;
|
|
76
|
+
originalName: string;
|
|
77
|
+
displayName: string;
|
|
78
|
+
} & {
|
|
79
|
+
original: ((props: TemplateGalleryListProps) => React.JSX.Element) & {
|
|
80
|
+
original: (props: TemplateGalleryListProps) => React.JSX.Element;
|
|
81
|
+
originalName: string;
|
|
82
|
+
displayName: string;
|
|
83
|
+
};
|
|
40
84
|
originalName: string;
|
|
41
85
|
displayName: string;
|
|
42
86
|
} & {
|
|
43
|
-
createDecorator: (decorator: import("@webiny/app-admin").
|
|
87
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: TemplateGalleryListProps) => React.JSX.Element) & {
|
|
88
|
+
original: (props: TemplateGalleryListProps) => React.JSX.Element;
|
|
89
|
+
originalName: string;
|
|
90
|
+
displayName: string;
|
|
91
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
92
|
+
} & {
|
|
93
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: TemplateGalleryListProps) => React.JSX.Element) & {
|
|
94
|
+
original: (props: TemplateGalleryListProps) => React.JSX.Element;
|
|
95
|
+
originalName: string;
|
|
96
|
+
displayName: string;
|
|
97
|
+
}>) => (props: ShouldRender) => React.JSX.Element;
|
|
44
98
|
};
|
|
45
|
-
Item:
|
|
46
|
-
original:
|
|
99
|
+
Item: (({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element) & {
|
|
100
|
+
original: ({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element;
|
|
47
101
|
originalName: string;
|
|
48
102
|
displayName: string;
|
|
49
103
|
} & {
|
|
50
|
-
|
|
104
|
+
original: (({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element) & {
|
|
105
|
+
original: ({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element;
|
|
106
|
+
originalName: string;
|
|
107
|
+
displayName: string;
|
|
108
|
+
};
|
|
109
|
+
originalName: string;
|
|
110
|
+
displayName: string;
|
|
111
|
+
} & {
|
|
112
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element) & {
|
|
113
|
+
original: ({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element;
|
|
114
|
+
originalName: string;
|
|
115
|
+
displayName: string;
|
|
116
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
117
|
+
} & {
|
|
118
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element) & {
|
|
119
|
+
original: ({ template, onTemplate }: import("./TemplateItem").TemplateCardProps) => React.JSX.Element;
|
|
120
|
+
originalName: string;
|
|
121
|
+
displayName: string;
|
|
122
|
+
}>) => (props: ShouldRender) => React.JSX.Element;
|
|
51
123
|
};
|
|
52
|
-
Close:
|
|
53
|
-
original:
|
|
124
|
+
Close: ((props: CloseGalleryProps) => React.JSX.Element) & {
|
|
125
|
+
original: (props: CloseGalleryProps) => React.JSX.Element;
|
|
126
|
+
originalName: string;
|
|
127
|
+
displayName: string;
|
|
128
|
+
} & {
|
|
129
|
+
original: ((props: CloseGalleryProps) => React.JSX.Element) & {
|
|
130
|
+
original: (props: CloseGalleryProps) => React.JSX.Element;
|
|
131
|
+
originalName: string;
|
|
132
|
+
displayName: string;
|
|
133
|
+
};
|
|
54
134
|
originalName: string;
|
|
55
135
|
displayName: string;
|
|
56
136
|
} & {
|
|
57
|
-
createDecorator: (decorator: import("@webiny/app-admin").
|
|
137
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: CloseGalleryProps) => React.JSX.Element) & {
|
|
138
|
+
original: (props: CloseGalleryProps) => React.JSX.Element;
|
|
139
|
+
originalName: string;
|
|
140
|
+
displayName: string;
|
|
141
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
142
|
+
} & {
|
|
143
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: CloseGalleryProps) => React.JSX.Element) & {
|
|
144
|
+
original: (props: CloseGalleryProps) => React.JSX.Element;
|
|
145
|
+
originalName: string;
|
|
146
|
+
displayName: string;
|
|
147
|
+
}>) => (props: ShouldRender) => React.JSX.Element;
|
|
58
148
|
};
|
|
59
149
|
};
|
|
@@ -4,10 +4,22 @@ export interface TemplateCardProps {
|
|
|
4
4
|
template: CmsDynamicZoneTemplate;
|
|
5
5
|
onTemplate: (template: CmsDynamicZoneTemplate) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const TemplateItem:
|
|
8
|
-
original:
|
|
7
|
+
export declare const TemplateItem: (({ template, onTemplate }: TemplateCardProps) => React.JSX.Element) & {
|
|
8
|
+
original: ({ template, onTemplate }: TemplateCardProps) => React.JSX.Element;
|
|
9
9
|
originalName: string;
|
|
10
10
|
displayName: string;
|
|
11
11
|
} & {
|
|
12
|
-
|
|
12
|
+
original: (({ template, onTemplate }: TemplateCardProps) => React.JSX.Element) & {
|
|
13
|
+
original: ({ template, onTemplate }: TemplateCardProps) => React.JSX.Element;
|
|
14
|
+
originalName: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
originalName: string;
|
|
18
|
+
displayName: string;
|
|
19
|
+
} & {
|
|
20
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ template, onTemplate }: TemplateCardProps) => React.JSX.Element) & {
|
|
21
|
+
original: ({ template, onTemplate }: TemplateCardProps) => React.JSX.Element;
|
|
22
|
+
originalName: string;
|
|
23
|
+
displayName: string;
|
|
24
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
13
25
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BindComponent, BindComponentRenderProp, CmsModel, CmsModelField, CmsModelFieldRendererPlugin } from "../../../../types";
|
|
3
|
-
export
|
|
3
|
+
export type DynamicZoneContainerProps = {
|
|
4
4
|
field: CmsModelField;
|
|
5
5
|
getBind: (index?: number, key?: string) => BindComponent;
|
|
6
6
|
contentModel: CmsModel;
|
|
@@ -10,11 +10,23 @@ export declare type DynamicZoneContainerProps = {
|
|
|
10
10
|
description?: string;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
13
|
-
export declare const DynamicZoneContainer:
|
|
14
|
-
original:
|
|
13
|
+
export declare const DynamicZoneContainer: ((props: DynamicZoneContainerProps) => React.JSX.Element) & {
|
|
14
|
+
original: (props: DynamicZoneContainerProps) => React.JSX.Element;
|
|
15
15
|
originalName: string;
|
|
16
16
|
displayName: string;
|
|
17
17
|
} & {
|
|
18
|
-
|
|
18
|
+
original: ((props: DynamicZoneContainerProps) => React.JSX.Element) & {
|
|
19
|
+
original: (props: DynamicZoneContainerProps) => React.JSX.Element;
|
|
20
|
+
originalName: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
originalName: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
} & {
|
|
26
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: DynamicZoneContainerProps) => React.JSX.Element) & {
|
|
27
|
+
original: (props: DynamicZoneContainerProps) => React.JSX.Element;
|
|
28
|
+
originalName: string;
|
|
29
|
+
displayName: string;
|
|
30
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
19
31
|
};
|
|
20
32
|
export declare const dynamicZoneFieldRenderer: CmsModelFieldRendererPlugin;
|
|
@@ -12,6 +12,6 @@ interface UseReferenceHookValue {
|
|
|
12
12
|
loading: boolean;
|
|
13
13
|
options: OptionItem[];
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
type UseReferenceHook = (args: UseReferenceHookArgs) => UseReferenceHookValue;
|
|
16
16
|
export declare const useReference: UseReferenceHook;
|
|
17
17
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CmsModel as BaseCmsModel, CmsModelField } from "../../../../types";
|
|
3
|
-
|
|
3
|
+
type CmsModel = Pick<BaseCmsModel, "modelId" | "name">;
|
|
4
4
|
interface RenderInfoParams {
|
|
5
5
|
field: CmsModelField;
|
|
6
6
|
model: CmsModel;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const ContentEntries:
|
|
3
|
-
original:
|
|
2
|
+
export declare const ContentEntries: (() => React.JSX.Element) & {
|
|
3
|
+
original: () => React.JSX.Element;
|
|
4
4
|
originalName: string;
|
|
5
5
|
displayName: string;
|
|
6
6
|
} & {
|
|
7
|
-
|
|
7
|
+
original: (() => React.JSX.Element) & {
|
|
8
|
+
original: () => React.JSX.Element;
|
|
9
|
+
originalName: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
originalName: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
} & {
|
|
15
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(() => React.JSX.Element) & {
|
|
16
|
+
original: () => React.JSX.Element;
|
|
17
|
+
originalName: string;
|
|
18
|
+
displayName: string;
|
|
19
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
8
20
|
};
|
|
@@ -8,19 +8,19 @@ interface UpdateListCacheOptions {
|
|
|
8
8
|
addItemToListCache?: boolean;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
11
|
+
export type GetEntryParams = Omit<Cms.GetEntryParams, "model">;
|
|
12
|
+
export type CreateEntryParams = Omit<Cms.CreateEntryParams, "model"> & UpdateListCacheOptions;
|
|
13
|
+
export type CreateEntryRevisionFromParams = Omit<Cms.CreateEntryRevisionFromParams, "model">;
|
|
14
|
+
export type UpdateEntryRevisionParams = Omit<Cms.UpdateEntryRevisionParams, "model">;
|
|
15
|
+
export type PublishEntryRevisionParams = Omit<Cms.PublishEntryRevisionParams, "model">;
|
|
16
|
+
export type UnpublishEntryRevisionParams = Omit<Cms.UnpublishEntryRevisionParams, "model">;
|
|
17
|
+
export type DeleteEntryParams = Omit<Cms.DeleteEntryParams, "model">;
|
|
18
|
+
export type DeleteEntryRevisionParams = DeleteEntryParams;
|
|
19
19
|
export interface DeleteEntryRevisionOperationSuccess {
|
|
20
20
|
newLatestRevision: CmsContentEntryRevision;
|
|
21
21
|
error?: never;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
23
|
+
export type DeleteEntryRevisionResponse = OperationError | DeleteEntryRevisionOperationSuccess;
|
|
24
24
|
export interface ContentEntryCrud {
|
|
25
25
|
getEntry: (params: GetEntryParams) => Promise<Cms.GetEntryResponse>;
|
|
26
26
|
createEntry: (params: CreateEntryParams) => Promise<Cms.CreateEntryResponse>;
|
package/admin/views/contentEntries/ContentEntry/RevisionsList/PublishEntryRevisionListItem.d.ts
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const PublishEntryRevisionListItem:
|
|
3
|
-
original:
|
|
2
|
+
export declare const PublishEntryRevisionListItem: (() => React.JSX.Element) & {
|
|
3
|
+
original: () => React.JSX.Element;
|
|
4
4
|
originalName: string;
|
|
5
5
|
displayName: string;
|
|
6
6
|
} & {
|
|
7
|
-
|
|
7
|
+
original: (() => React.JSX.Element) & {
|
|
8
|
+
original: () => React.JSX.Element;
|
|
9
|
+
originalName: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
originalName: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
} & {
|
|
15
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(() => React.JSX.Element) & {
|
|
16
|
+
original: () => React.JSX.Element;
|
|
17
|
+
originalName: string;
|
|
18
|
+
displayName: string;
|
|
19
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
8
20
|
};
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const SingletonContentEntry:
|
|
3
|
-
original:
|
|
2
|
+
export declare const SingletonContentEntry: (() => React.JSX.Element) & {
|
|
3
|
+
original: () => React.JSX.Element;
|
|
4
4
|
originalName: string;
|
|
5
5
|
displayName: string;
|
|
6
6
|
} & {
|
|
7
|
-
|
|
7
|
+
original: (() => React.JSX.Element) & {
|
|
8
|
+
original: () => React.JSX.Element;
|
|
9
|
+
originalName: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
originalName: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
} & {
|
|
15
|
+
createDecorator: (decorator: import("@webiny/app").ComponentDecorator<(() => React.JSX.Element) & {
|
|
16
|
+
original: () => React.JSX.Element;
|
|
17
|
+
originalName: string;
|
|
18
|
+
displayName: string;
|
|
19
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
8
20
|
};
|
|
@@ -25,7 +25,7 @@ var Elevation = /*#__PURE__*/(0, _base.default)(_Elevation.Elevation, process.en
|
|
|
25
25
|
} : {
|
|
26
26
|
name: "frd0x5",
|
|
27
27
|
styles: "height:100%;flex:0 0 50%",
|
|
28
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
28
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNpbmdsZXRvbkNvbnRlbnRFbnRyeS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVXVDIiwiZmlsZSI6IlNpbmdsZXRvbkNvbnRlbnRFbnRyeS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IEVsZXZhdGlvbiBhcyBCYXNlRWxldmF0aW9uIH0gZnJvbSBcIkB3ZWJpbnkvdWkvRWxldmF0aW9uXCI7XG5pbXBvcnQgeyBDaXJjdWxhclByb2dyZXNzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvUHJvZ3Jlc3NcIjtcbmltcG9ydCB7IENvbnRlbnRFbnRyeUZvcm0gfSBmcm9tIFwifi9hZG1pbi9jb21wb25lbnRzL0NvbnRlbnRFbnRyeUZvcm0vQ29udGVudEVudHJ5Rm9ybVwiO1xuaW1wb3J0IHsgbWFrZURlY29yYXRhYmxlIH0gZnJvbSBcIkB3ZWJpbnkvYXBwXCI7XG5pbXBvcnQgeyB1c2VTaW5nbGV0b25Db250ZW50RW50cnkgfSBmcm9tIFwiLi4vaG9va3MvdXNlU2luZ2xldG9uQ29udGVudEVudHJ5XCI7XG5pbXBvcnQg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J5ID0+XG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVFbnRyeSh7IGVudHJ5OiBlbnRyeSBhcyBQYXJ0aWFsQ21zQ29udGVudEVudHJ5V2l0aElkIH0pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9FbGV2YXRpb24+XG4gICAgICAgIDwvQ29udGFpbmVyPlxuICAgICk7XG59KTtcbiJdfQ== */",
|
|
29
29
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
30
|
});
|
|
31
31
|
var Container = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
|
|
@@ -39,7 +39,7 @@ var Container = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV ===
|
|
|
39
39
|
} : {
|
|
40
40
|
name: "1wtwjro",
|
|
41
41
|
styles: "display:flex;padding:25px;justify-content:center",
|
|
42
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
42
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNpbmdsZXRvbkNvbnRlbnRFbnRyeS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZTRCIiwiZmlsZSI6IlNpbmdsZXRvbkNvbnRlbnRFbnRyeS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IEVsZXZhdGlvbiBhcyBCYXNlRWxldmF0aW9uIH0gZnJvbSBcIkB3ZWJpbnkvdWkvRWxldmF0aW9uXCI7XG5pbXBvcnQgeyBDaXJjdWxhclByb2dyZXNzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvUHJvZ3Jlc3NcIjtcbmltcG9ydCB7IENvbnRlbnRFbnR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AgICAgICB7bG9hZGluZyAmJiA8Q2lyY3VsYXJQcm9ncmVzcyAvPn1cbiAgICAgICAgICAgICAgICA8Q29udGVudEVudHJ5Rm9ybVxuICAgICAgICAgICAgICAgICAgICBoZWFkZXI9ezxTaW5nbGV0b25IZWFkZXIgdGl0bGU9e2NvbnRlbnRNb2RlbC5uYW1lfSAvPn1cbiAgICAgICAgICAgICAgICAgICAgZW50cnk9e2VudHJ5fVxuICAgICAgICAgICAgICAgICAgICBwZXJzaXN0RW50cnk9e2VudHJ5ID0+XG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVFbnRyeSh7IGVudHJ5OiBlbnRyeSBhcyBQYXJ0aWFsQ21zQ29udGVudEVudHJ5V2l0aElkIH0pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9FbGV2YXRpb24+XG4gICAgICAgIDwvQ29udGFpbmVyPlxuICAgICk7XG59KTtcbiJdfQ== */",
|
|
43
43
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
44
44
|
});
|
|
45
45
|
var SingletonContentEntry = exports.SingletonContentEntry = (0, _app.makeDecoratable)("SingletonContentEntry", function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_Elevation","_Progress","_ContentEntryForm","_app","_useSingletonContentEntry","_SingletonHeader","_EMOTION_STRINGIFIED_CSS_ERROR__","Elevation","_base","default","BaseElevation","process","env","NODE_ENV","target","label","name","styles","map","toString","Container","SingletonContentEntry","exports","makeDecoratable","_useSingletonContentE","useSingletonContentEntry","loading","entry","updateEntry","contentModel","createElement","z","CircularProgress","ContentEntryForm","header","SingletonHeader","title","persistEntry"],"sources":["SingletonContentEntry.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { Elevation as BaseElevation } from \"@webiny/ui/Elevation\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { ContentEntryForm } from \"~/admin/components/ContentEntryForm/ContentEntryForm\";\nimport { makeDecoratable } from \"@webiny/app\";\nimport { useSingletonContentEntry } from \"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_Elevation","_Progress","_ContentEntryForm","_app","_useSingletonContentEntry","_SingletonHeader","_EMOTION_STRINGIFIED_CSS_ERROR__","Elevation","_base","default","BaseElevation","process","env","NODE_ENV","target","label","name","styles","map","toString","Container","SingletonContentEntry","exports","makeDecoratable","_useSingletonContentE","useSingletonContentEntry","loading","entry","updateEntry","contentModel","createElement","z","CircularProgress","ContentEntryForm","header","SingletonHeader","title","persistEntry"],"sources":["SingletonContentEntry.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { Elevation as BaseElevation } from \"@webiny/ui/Elevation\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { ContentEntryForm } from \"~/admin/components/ContentEntryForm/ContentEntryForm\";\nimport { makeDecoratable } from \"@webiny/app\";\nimport { useSingletonContentEntry } from \"../hooks/useSingletonContentEntry\";\nimport { PartialCmsContentEntryWithId } from \"~/admin/contexts/Cms\";\nimport { SingletonHeader } from \"~/admin/components/ContentEntryForm/SingletonHeader\";\n\nconst Elevation = styled(BaseElevation)`\n height: 100%;\n flex: 0 0 50%;\n`;\n\nconst Container = styled.div`\n display: flex;\n padding: 25px;\n justify-content: center;\n`;\n\nexport const SingletonContentEntry = makeDecoratable(\"SingletonContentEntry\", () => {\n const { loading, entry, updateEntry, contentModel } = useSingletonContentEntry();\n\n return (\n <Container>\n <Elevation z={2}>\n {loading && <CircularProgress />}\n <ContentEntryForm\n header={<SingletonHeader title={contentModel.name} />}\n entry={entry}\n persistEntry={entry =>\n updateEntry({ entry: entry as PartialCmsContentEntryWithId })\n }\n />\n </Elevation>\n </Container>\n );\n});\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,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,GACXL,OAAO,iBAAI7B,MAAA,CAAAY,OAAA,CAAAqB,aAAA,CAAC7B,SAAA,CAAA+B,gBAAgB,MAAE,CAAC,eAChCnC,MAAA,CAAAY,OAAA,CAAAqB,aAAA,CAAC5B,iBAAA,CAAA+B,gBAAgB;IACbC,MAAM,eAAErC,MAAA,CAAAY,OAAA,CAAAqB,aAAA,CAACzB,gBAAA,CAAA8B,eAAe;MAACC,KAAK,EAAEP,YAAY,CAACb;IAAK,CAAE,CAAE;IACtDW,KAAK,EAAEA,KAAM;IACbU,YAAY,EAAE,SAAAA,aAAAV,KAAK;MAAA,OACfC,WAAW,CAAC;QAAED,KAAK,EAAEA;MAAsC,CAAC,CAAC;IAAA;EAChE,CACJ,CACM,CACJ,CAAC;AAEpB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CmsContentEntry, CmsModel } from "../../../../types";
|
|
3
|
-
import * as Cms from "../../../contexts/Cms";
|
|
4
|
-
export
|
|
2
|
+
import type { CmsContentEntry, CmsModel } from "../../../../types";
|
|
3
|
+
import type * as Cms from "../../../contexts/Cms";
|
|
4
|
+
export type UpdateEntryParams = Omit<Cms.UpdateEntryRevisionParams, "model">;
|
|
5
5
|
export interface SingletonContentEntryCrud {
|
|
6
6
|
updateEntry: (params: UpdateEntryParams) => Promise<Cms.UpdateEntryRevisionResponse>;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_appAdmin","_hooks","_useContentEntries2","SingletonContentEntryContext","exports","React","createContext","undefined","SingletonContentEntryProvider","_ref","children","_useIsMounted","useIsMounted","isMounted","_useState","useState","_useState2","_slicedToArray2","default","entry","setEntry","_useContentEntries","useContentEntries","model","contentModel","_useSnackbar","useSnackbar","showSnackbar","cms","useCms","_useState3","_useState4","isLoading","setLoading","useEffect","_await$cms$getSinglet","getSingletonEntry","error","message","updateEntry","params","response","updateSingletonEntry","_objectSpread2","value","loading","createElement","Provider","displayName"],"sources":["SingletonContentEntryContext.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { useSnackbar, useIsMounted } from \"@webiny/app-admin\";\nimport { useCms } from \"~/admin/hooks\";\nimport { useContentEntries } from \"~/admin/views/contentEntries/hooks/useContentEntries\";\nimport { CmsContentEntry, CmsModel } from \"~/types\";\nimport * as Cms from \"~/admin/contexts/Cms\";\n\nexport type UpdateEntryParams = Omit<Cms.UpdateEntryRevisionParams, \"model\">;\n\nexport interface SingletonContentEntryCrud {\n updateEntry: (params: UpdateEntryParams) => Promise<Cms.UpdateEntryRevisionResponse>;\n}\n\nexport interface SingletonContentEntryContext extends SingletonContentEntryCrud {\n contentModel: CmsModel;\n entry: CmsContentEntry;\n loading: boolean;\n}\n\nexport const SingletonContentEntryContext = React.createContext<\n SingletonContentEntryContext | undefined\n>(undefined);\n\nexport interface ContentEntryContextProviderProps {\n children: React.ReactNode;\n}\n\nexport const SingletonContentEntryProvider = ({ children }: ContentEntryContextProviderProps) => {\n const { isMounted } = useIsMounted();\n const [entry, setEntry] = useState<CmsContentEntry>();\n const { contentModel: model } = useContentEntries();\n const { showSnackbar } = useSnackbar();\n const cms = useCms();\n const [isLoading, setLoading] = useState<boolean>(false);\n\n useEffect(() => {\n (async () => {\n setLoading(true);\n const { entry, error } = await cms.getSingletonEntry({ model });\n setLoading(false);\n\n if (!isMounted()) {\n return;\n }\n\n if (!error) {\n setEntry(entry);\n return;\n }\n showSnackbar(error.message);\n })();\n }, []);\n\n const updateEntry: SingletonContentEntryCrud[\"updateEntry\"] = async params => {\n setLoading(true);\n const response = await cms.updateSingletonEntry({ model, ...params });\n setLoading(false);\n if (response.entry) {\n setEntry(response.entry);\n }\n return response;\n };\n\n const value: SingletonContentEntryContext = {\n contentModel: model,\n entry: (entry || {}) as CmsContentEntry,\n loading: isLoading,\n updateEntry\n };\n\n return (\n <SingletonContentEntryContext.Provider value={value}>\n {children}\n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min","_hooks","_useContentEntries2","SingletonContentEntryContext","exports","React","createContext","undefined","SingletonContentEntryProvider","_ref","children","_useIsMounted","useIsMounted","isMounted","_useState","useState","_useState2","_slicedToArray2","default","entry","setEntry","_useContentEntries","useContentEntries","model","contentModel","_useSnackbar","useSnackbar","showSnackbar","cms","useCms","_useState3","_useState4","isLoading","setLoading","useEffect","_await$cms$getSinglet","getSingletonEntry","error","message","updateEntry","params","response","updateSingletonEntry","_objectSpread2","value","loading","createElement","Provider","displayName"],"sources":["SingletonContentEntryContext.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { useSnackbar, useIsMounted } from \"@webiny/app-admin\";\nimport { useCms } from \"~/admin/hooks\";\nimport { useContentEntries } from \"~/admin/views/contentEntries/hooks/useContentEntries\";\nimport type { CmsContentEntry, CmsModel } from \"~/types\";\nimport type * as Cms from \"~/admin/contexts/Cms\";\n\nexport type UpdateEntryParams = Omit<Cms.UpdateEntryRevisionParams, \"model\">;\n\nexport interface SingletonContentEntryCrud {\n updateEntry: (params: UpdateEntryParams) => Promise<Cms.UpdateEntryRevisionResponse>;\n}\n\nexport interface SingletonContentEntryContext extends SingletonContentEntryCrud {\n contentModel: CmsModel;\n entry: CmsContentEntry;\n loading: boolean;\n}\n\nexport const SingletonContentEntryContext = React.createContext<\n SingletonContentEntryContext | undefined\n>(undefined);\n\nexport interface ContentEntryContextProviderProps {\n children: React.ReactNode;\n}\n\nexport const SingletonContentEntryProvider = ({ children }: ContentEntryContextProviderProps) => {\n const { isMounted } = useIsMounted();\n const [entry, setEntry] = useState<CmsContentEntry>();\n const { contentModel: model } = useContentEntries();\n const { showSnackbar } = useSnackbar();\n const cms = useCms();\n const [isLoading, setLoading] = useState<boolean>(false);\n\n useEffect(() => {\n (async () => {\n setLoading(true);\n const { entry, error } = await cms.getSingletonEntry({ model });\n setLoading(false);\n\n if (!isMounted()) {\n return;\n }\n\n if (!error) {\n setEntry(entry);\n return;\n }\n showSnackbar(error.message);\n })();\n }, []);\n\n const updateEntry: SingletonContentEntryCrud[\"updateEntry\"] = async params => {\n setLoading(true);\n const response = await cms.updateSingletonEntry({ model, ...params });\n setLoading(false);\n if (response.entry) {\n setEntry(response.entry);\n }\n return response;\n };\n\n const value: SingletonContentEntryContext = {\n contentModel: model,\n entry: (entry || {}) as CmsContentEntry,\n loading: isLoading,\n updateEntry\n };\n\n return (\n <SingletonContentEntryContext.Provider value={value}>\n {children}\n </SingletonContentEntryContext.Provider>\n );\n};\n\nSingletonContentEntryProvider.displayName = \"SingletonContentEntryProvider\";\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAgBO,IAAMI,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,gBAAGE,cAAK,CAACC,aAAa,CAE7DC,SAAS,CAAC;AAML,IAAMC,6BAA6B,GAAAJ,OAAA,CAAAI,6BAAA,GAAG,SAAhCA,6BAA6BA,CAAAC,IAAA,EAAuD;EAAA,IAAjDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EACpD,IAAAC,aAAA,GAAsB,IAAAC,sBAAY,EAAC,CAAC;IAA5BC,SAAS,GAAAF,aAAA,CAATE,SAAS;EACjB,IAAAC,SAAA,GAA0B,IAAAC,eAAQ,EAAkB,CAAC;IAAAC,UAAA,OAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA;IAA9CK,KAAK,GAAAH,UAAA;IAAEI,QAAQ,GAAAJ,UAAA;EACtB,IAAAK,kBAAA,GAAgC,IAAAC,qCAAiB,EAAC,CAAC;IAA7BC,KAAK,GAAAF,kBAAA,CAAnBG,YAAY;EACpB,IAAAC,YAAA,GAAyB,IAAAC,qBAAW,EAAC,CAAC;IAA9BC,YAAY,GAAAF,YAAA,CAAZE,YAAY;EACpB,IAAMC,GAAG,GAAG,IAAAC,aA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,WAAW,EAAXA;EACJ,CAAC;EAED,oBACI1C,MAAA,CAAAqB,OAAA,CAAA4B,aAAA,CAAC3C,4BAA4B,CAAC4C,QAAQ;IAACH,KAAK,EAAEA;EAAM,GAC/ClC,QACkC,CAAC;AAEhD,CAAC;AAEDF,6BAA6B,CAACwC,WAAW,GAAG,+BAA+B","ignoreList":[]}
|
|
@@ -8,10 +8,22 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
export declare const ContentEntry:
|
|
12
|
-
original:
|
|
11
|
+
export declare const ContentEntry: (() => React.JSX.Element) & {
|
|
12
|
+
original: () => React.JSX.Element;
|
|
13
13
|
originalName: string;
|
|
14
14
|
displayName: string;
|
|
15
15
|
} & {
|
|
16
|
-
|
|
16
|
+
original: (() => React.JSX.Element) & {
|
|
17
|
+
original: () => React.JSX.Element;
|
|
18
|
+
originalName: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
originalName: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
} & {
|
|
24
|
+
createDecorator: (decorator: import("@webiny/app").ComponentDecorator<(() => React.JSX.Element) & {
|
|
25
|
+
original: () => React.JSX.Element;
|
|
26
|
+
originalName: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
17
29
|
};
|
|
@@ -23,6 +23,7 @@ var _ContentEntry = require("../ContentEntry");
|
|
|
23
23
|
var _reactRouter = require("@webiny/react-router");
|
|
24
24
|
var _constants = require("../../../constants");
|
|
25
25
|
var _BulkActions = require("../../../components/ContentEntries/BulkActions");
|
|
26
|
+
var _SelectAll = require("../../../components/ContentEntries/SelectAll");
|
|
26
27
|
var Main = exports.Main = function Main(_ref) {
|
|
27
28
|
var initialFolderId = _ref.folderId;
|
|
28
29
|
var folderId = initialFolderId === undefined ? _constants.ROOT_FOLDER : initialFolderId;
|
|
@@ -85,7 +86,7 @@ var Main = exports.Main = function Main(_ref) {
|
|
|
85
86
|
onCreateFolder: onCreateFolder,
|
|
86
87
|
searchValue: list.search,
|
|
87
88
|
onSearchChange: list.setSearch
|
|
88
|
-
}), /*#__PURE__*/_react.default.createElement(_BulkActions.BulkActions, null), /*#__PURE__*/_react.default.createElement(_styled.Wrapper, null, /*#__PURE__*/_react.default.createElement(_Filters.Filters, null), list.records.length === 0 && list.folders.length === 0 && !list.isListLoading ? /*#__PURE__*/_react.default.createElement(_Empty.Empty, {
|
|
89
|
+
}), /*#__PURE__*/_react.default.createElement(_BulkActions.BulkActions, null), /*#__PURE__*/_react.default.createElement(_styled.Wrapper, null, /*#__PURE__*/_react.default.createElement(_SelectAll.SelectAll, null), /*#__PURE__*/_react.default.createElement(_Filters.Filters, null), list.records.length === 0 && list.folders.length === 0 && !list.isListLoading ? /*#__PURE__*/_react.default.createElement(_Empty.Empty, {
|
|
89
90
|
isSearch: list.isSearch,
|
|
90
91
|
canCreateFolder: canCreateFolder,
|
|
91
92
|
canCreateContent: canCreateContent,
|