@webiny/app-website-builder 0.0.0-unstable.ac6ebf63c6 → 0.0.0-unstable.c27f4d8a31
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/BaseEditor/config/EditorConfig.d.ts +469 -0
- package/BaseEditor/config/EditorConfig.js +7 -2
- package/BaseEditor/config/EditorConfig.js.map +1 -1
- package/BaseEditor/config/Element.d.ts +2 -2
- package/BaseEditor/config/Element.js.map +1 -1
- package/BaseEditor/config/IconButton.d.ts +1 -1
- package/BaseEditor/config/IconButton.js.map +1 -1
- package/BaseEditor/config/IsNotReadOnly.d.ts +5 -0
- package/BaseEditor/config/IsNotReadOnly.js +13 -0
- package/BaseEditor/config/IsNotReadOnly.js.map +1 -0
- package/BaseEditor/config/IsReadOnly.d.ts +5 -0
- package/BaseEditor/config/IsReadOnly.js +13 -0
- package/BaseEditor/config/IsReadOnly.js.map +1 -0
- package/BaseEditor/config/Layout.js +13 -4
- package/BaseEditor/config/Layout.js.map +1 -1
- package/BaseEditor/config/Sidebar/Layout.js +2 -0
- package/BaseEditor/config/Sidebar/Layout.js.map +1 -1
- package/BaseEditor/config/Sidebar/Tab.d.ts +1 -1
- package/BaseEditor/config/Sidebar/Tab.js +1 -1
- package/BaseEditor/config/Sidebar/Tab.js.map +1 -1
- package/BaseEditor/config/Toolbar/Layout.js +1 -1
- package/BaseEditor/config/Toolbar/Layout.js.map +1 -1
- package/BaseEditor/config/Toolbar/Toolbar.js +2 -1
- package/BaseEditor/config/Toolbar/Toolbar.js.map +1 -1
- package/BaseEditor/config/TopBar/Layout.js +1 -0
- package/BaseEditor/config/TopBar/Layout.js.map +1 -1
- package/BaseEditor/config/TopBar/MenuItem.d.ts +1 -1
- package/BaseEditor/config/TopBar/MenuItem.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Breadcrumbs/Breadcrumbs.js +2 -1
- package/BaseEditor/defaultConfig/Content/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Breadcrumbs/styles.js +9 -67
- package/BaseEditor/defaultConfig/Content/Breadcrumbs/styles.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/AddressBar.js +2 -1
- package/BaseEditor/defaultConfig/Content/Preview/AddressBar.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/Iframe.js +27 -13
- package/BaseEditor/defaultConfig/Content/Preview/Iframe.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/PreviewContainer.d.ts +6 -0
- package/BaseEditor/defaultConfig/Content/Preview/PreviewContainer.js +16 -0
- package/BaseEditor/defaultConfig/Content/Preview/PreviewContainer.js.map +1 -0
- package/BaseEditor/defaultConfig/Content/Preview/PreviewEvents.js +17 -7
- package/BaseEditor/defaultConfig/Content/Preview/PreviewEvents.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/useResponsiveContainer.d.ts +3 -3
- package/BaseEditor/defaultConfig/Content/Preview/useResponsiveContainer.js +18 -13
- package/BaseEditor/defaultConfig/Content/Preview/useResponsiveContainer.js.map +1 -1
- package/BaseEditor/defaultConfig/DefaultEditorConfig.js +1 -1
- package/BaseEditor/defaultConfig/DefaultEditorConfig.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/ElementSettings/useBindingsForElement.d.ts +90 -58
- package/BaseEditor/hooks/useKeyHandler.js +1 -1
- package/BaseEditor/hooks/useKeyHandler.js.map +1 -1
- package/BaseEditor/hooks/useReservedUISpace.d.ts +10 -0
- package/BaseEditor/hooks/useReservedUISpace.js +48 -0
- package/BaseEditor/hooks/useReservedUISpace.js.map +1 -0
- package/Extension.js +21 -21
- package/Extension.js.map +1 -1
- package/constants.d.ts +34 -0
- package/constants.js +35 -0
- package/constants.js.map +1 -1
- package/domain/Page/Page.d.ts +5 -1
- package/domain/Page/Page.js +3 -3
- package/domain/Page/Page.js.map +1 -1
- package/domain/Page/PageDto.d.ts +3 -1
- package/domain/Page/PageDto.js +3 -2
- package/domain/Page/PageDto.js.map +1 -1
- package/ecommerce/EcommerceIntegration.d.ts +2 -1
- package/ecommerce/EcommerceIntegration.js.map +1 -1
- package/editorSdk/Editor.d.ts +6 -0
- package/editorSdk/Editor.js +5 -0
- package/editorSdk/Editor.js.map +1 -1
- package/exports/admin/website-builder/page/editor.d.ts +7 -1
- package/exports/admin/website-builder/page/editor.js +7 -1
- package/exports/admin/website-builder/page/editor.js.map +1 -1
- package/exports/admin/website-builder.d.ts +1 -0
- package/exports/admin/website-builder.js +1 -0
- package/exports/admin/website-builder.js.map +1 -1
- package/features/pages/createPage/CreatePageUseCase.js +3 -1
- package/features/pages/createPage/CreatePageUseCase.js.map +1 -1
- package/features/pages/createPage/useCreatePage.js +1 -1
- package/features/pages/createPage/useCreatePage.js.map +1 -1
- package/features/pages/createPageRevisionFrom/useCreatePageRevisionFrom.js +1 -1
- package/features/pages/createPageRevisionFrom/useCreatePageRevisionFrom.js.map +1 -1
- package/features/pages/getPage/useGetPage.js +1 -1
- package/features/pages/getPage/useGetPage.js.map +1 -1
- package/features/pages/loadPages/PageGatewayDto.d.ts +2 -1
- package/features/pages/loadPages/PageGatewayDto.js.map +1 -1
- package/features/pages/useGetPageGraphQLFields.js +4 -1
- package/features/pages/useGetPageGraphQLFields.js.map +1 -1
- package/inputRenderers/FileInput.d.ts +1 -1
- package/inputRenderers/FileInput.js +3 -10
- package/inputRenderers/FileInput.js.map +1 -1
- package/inputRenderers/LexicalInput/DefaultLexicalConfig.js +9 -10
- package/inputRenderers/LexicalInput/DefaultLexicalConfig.js.map +1 -1
- package/inputRenderers/LexicalInput/LexicalInput.js +5 -30
- package/inputRenderers/LexicalInput/LexicalInput.js.map +1 -1
- package/modules/pages/PageEditor/DefaultPageEditorConfig.js +11 -4
- package/modules/pages/PageEditor/DefaultPageEditorConfig.js.map +1 -1
- package/modules/pages/PageEditor/PageAutoSave.js +4 -0
- package/modules/pages/PageEditor/PageAutoSave.js.map +1 -1
- package/modules/pages/PageEditor/PageEditorConfig.d.ts +3 -1
- package/modules/pages/PageEditor/PageEditorConfig.js +2 -2
- package/modules/pages/PageEditor/PageEditorConfig.js.map +1 -1
- package/modules/pages/PageEditor/TopBar/PublishButton.js.map +1 -1
- package/modules/pages/PageEditor/TopBar/RevisionsMenu.js.map +1 -1
- package/modules/pages/PageEditor/TopBar/Title.js +12 -2
- package/modules/pages/PageEditor/TopBar/Title.js.map +1 -1
- package/modules/pages/PagesList/components/Main/CreatePage/CreatePage.js +3 -0
- package/modules/pages/PagesList/components/Main/CreatePage/CreatePage.js.map +1 -1
- package/modules/pages/PagesList/components/Sidebar/Sidebar.js +6 -1
- package/modules/pages/PagesList/components/Sidebar/Sidebar.js.map +1 -1
- package/modules/pages/PagesList/components/Table/Actions/ChangeStatus.js +11 -4
- package/modules/pages/PagesList/components/Table/Actions/ChangeStatus.js.map +1 -1
- package/modules/pages/PagesList/components/Table/Cells/CellLive.d.ts +2 -0
- package/modules/pages/PagesList/components/Table/Cells/CellLive.js +26 -0
- package/modules/pages/PagesList/components/Table/Cells/CellLive.js.map +1 -0
- package/modules/pages/PagesList/components/Table/Cells/index.d.ts +1 -0
- package/modules/pages/PagesList/components/Table/Cells/index.js +1 -0
- package/modules/pages/PagesList/components/Table/Cells/index.js.map +1 -1
- package/modules/pages/PagesListConfig.js +38 -18
- package/modules/pages/PagesListConfig.js.map +1 -1
- package/modules/pages/configs/list/Browser/PageAction.d.ts +1 -0
- package/modules/pages/configs/list/Browser/PageAction.js +3 -1
- package/modules/pages/configs/list/Browser/PageAction.js.map +1 -1
- package/modules/pages/configs/list/Browser/index.d.ts +1 -0
- package/modules/pages/configs/list/PageListConfig.d.ts +2 -0
- package/modules/redirects/RedirectsList/components/Sidebar/Sidebar.js +9 -5
- package/modules/redirects/RedirectsList/components/Sidebar/Sidebar.js.map +1 -1
- package/modules/redirects/RedirectsList/components/Table/Cells/CellName.js +7 -1
- package/modules/redirects/RedirectsList/components/Table/Cells/CellName.js.map +1 -1
- package/modules/redirects/RedirectsListConfig.js +12 -5
- package/modules/redirects/RedirectsListConfig.js.map +1 -1
- package/package.json +33 -34
- package/presentation/navigation/NextjsConfig/markdownComponents.js +25 -3
- package/presentation/navigation/NextjsConfig/markdownComponents.js.map +1 -1
- package/presentation/security/HasPermission.d.ts +34 -0
- package/presentation/security/HasPermission.js +5 -0
- package/presentation/security/HasPermission.js.map +1 -0
- package/presentation/security/usePermissions.d.ts +12 -0
- package/presentation/security/usePermissions.js +5 -0
- package/presentation/security/usePermissions.js.map +1 -0
- package/types.d.ts +4 -0
- package/types.js.map +1 -1
- package/inputRenderers/LexicalInput/LinkEditForm.d.ts +0 -6
- package/inputRenderers/LexicalInput/LinkEditForm.js +0 -63
- package/inputRenderers/LexicalInput/LinkEditForm.js.map +0 -1
- package/plugins/WebsiteBuilderPermissions.d.ts +0 -11
- package/plugins/WebsiteBuilderPermissions.js +0 -75
- package/plugins/WebsiteBuilderPermissions.js.map +0 -1
- package/plugins/permissionRenderer.d.ts +0 -2
- package/plugins/permissionRenderer.js +0 -23
- package/plugins/permissionRenderer.js.map +0 -1
|
@@ -1,5 +1,472 @@
|
|
|
1
1
|
import type { ElementConfig } from "./Element.js";
|
|
2
2
|
import type { ElementInputConfig } from "./ElementInput.js";
|
|
3
|
+
export declare const EditorConfigComponents: {
|
|
4
|
+
/**
|
|
5
|
+
* Components to configure editor UI.
|
|
6
|
+
*/
|
|
7
|
+
Ui: {
|
|
8
|
+
Element: (({ id, name, element, group, scope, remove, before, after }: import("./Element.js").ElementProps) => import("react").JSX.Element) & {
|
|
9
|
+
original: ({ id, name, element, group, scope, remove, before, after }: import("./Element.js").ElementProps) => import("react").JSX.Element;
|
|
10
|
+
originalName: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
} & {
|
|
13
|
+
original: (({ id, name, element, group, scope, remove, before, after }: import("./Element.js").ElementProps) => import("react").JSX.Element) & {
|
|
14
|
+
original: ({ id, name, element, group, scope, remove, before, after }: import("./Element.js").ElementProps) => import("react").JSX.Element;
|
|
15
|
+
originalName: string;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
originalName: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
} & {
|
|
21
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ id, name, element, group, scope, remove, before, after }: import("./Element.js").ElementProps) => import("react").JSX.Element) & {
|
|
22
|
+
original: ({ id, name, element, group, scope, remove, before, after }: import("./Element.js").ElementProps) => import("react").JSX.Element;
|
|
23
|
+
originalName: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
Elements: ({ group, scope, transform }: import("./Elements.js").ElementsProps) => import("react").JSX.Element;
|
|
28
|
+
Layout: (() => import("react").JSX.Element) & {
|
|
29
|
+
original: () => import("react").JSX.Element;
|
|
30
|
+
originalName: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
} & {
|
|
33
|
+
original: (() => import("react").JSX.Element) & {
|
|
34
|
+
original: () => import("react").JSX.Element;
|
|
35
|
+
originalName: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
originalName: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
} & {
|
|
41
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
42
|
+
original: () => import("react").JSX.Element;
|
|
43
|
+
originalName: string;
|
|
44
|
+
displayName: string;
|
|
45
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
46
|
+
};
|
|
47
|
+
Content: (() => import("react").JSX.Element) & {
|
|
48
|
+
original: () => import("react").JSX.Element;
|
|
49
|
+
originalName: string;
|
|
50
|
+
displayName: string;
|
|
51
|
+
} & {
|
|
52
|
+
original: (() => import("react").JSX.Element) & {
|
|
53
|
+
original: () => import("react").JSX.Element;
|
|
54
|
+
originalName: string;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
originalName: string;
|
|
58
|
+
displayName: string;
|
|
59
|
+
} & {
|
|
60
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
61
|
+
original: () => import("react").JSX.Element;
|
|
62
|
+
originalName: string;
|
|
63
|
+
displayName: string;
|
|
64
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
65
|
+
} & {
|
|
66
|
+
Layout: ({ children }: import("./Content/Layout.js").LayoutProps) => import("react").ReactNode;
|
|
67
|
+
Element: ((props: import("./Content/Content.js").ElementProps) => import("react").JSX.Element) & {
|
|
68
|
+
original: (props: import("./Content/Content.js").ElementProps) => import("react").JSX.Element;
|
|
69
|
+
originalName: string;
|
|
70
|
+
displayName: string;
|
|
71
|
+
} & {
|
|
72
|
+
original: ((props: import("./Content/Content.js").ElementProps) => import("react").JSX.Element) & {
|
|
73
|
+
original: (props: import("./Content/Content.js").ElementProps) => import("react").JSX.Element;
|
|
74
|
+
originalName: string;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
originalName: string;
|
|
78
|
+
displayName: string;
|
|
79
|
+
} & {
|
|
80
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./Content/Content.js").ElementProps) => import("react").JSX.Element) & {
|
|
81
|
+
original: (props: import("./Content/Content.js").ElementProps) => import("react").JSX.Element;
|
|
82
|
+
originalName: string;
|
|
83
|
+
displayName: string;
|
|
84
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
85
|
+
};
|
|
86
|
+
Elements: (() => import("react").JSX.Element) & {
|
|
87
|
+
original: () => import("react").JSX.Element;
|
|
88
|
+
originalName: string;
|
|
89
|
+
displayName: string;
|
|
90
|
+
} & {
|
|
91
|
+
original: (() => import("react").JSX.Element) & {
|
|
92
|
+
original: () => import("react").JSX.Element;
|
|
93
|
+
originalName: string;
|
|
94
|
+
displayName: string;
|
|
95
|
+
};
|
|
96
|
+
originalName: string;
|
|
97
|
+
displayName: string;
|
|
98
|
+
} & {
|
|
99
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
100
|
+
original: () => import("react").JSX.Element;
|
|
101
|
+
originalName: string;
|
|
102
|
+
displayName: string;
|
|
103
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
TopBar: (() => import("react").JSX.Element) & {
|
|
107
|
+
Element: ((props: import("./TopBar/TopBar.js").ElementProps) => import("react").JSX.Element) & {
|
|
108
|
+
original: (props: import("./TopBar/TopBar.js").ElementProps) => import("react").JSX.Element;
|
|
109
|
+
originalName: string;
|
|
110
|
+
displayName: string;
|
|
111
|
+
} & {
|
|
112
|
+
original: ((props: import("./TopBar/TopBar.js").ElementProps) => import("react").JSX.Element) & {
|
|
113
|
+
original: (props: import("./TopBar/TopBar.js").ElementProps) => import("react").JSX.Element;
|
|
114
|
+
originalName: string;
|
|
115
|
+
displayName: string;
|
|
116
|
+
};
|
|
117
|
+
originalName: string;
|
|
118
|
+
displayName: string;
|
|
119
|
+
} & {
|
|
120
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./TopBar/TopBar.js").ElementProps) => import("react").JSX.Element) & {
|
|
121
|
+
original: (props: import("./TopBar/TopBar.js").ElementProps) => import("react").JSX.Element;
|
|
122
|
+
originalName: string;
|
|
123
|
+
displayName: string;
|
|
124
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
125
|
+
};
|
|
126
|
+
Elements: ((props: import("./TopBar/TopBar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
127
|
+
original: (props: import("./TopBar/TopBar.js").ElementsProps) => import("react").JSX.Element;
|
|
128
|
+
originalName: string;
|
|
129
|
+
displayName: string;
|
|
130
|
+
} & {
|
|
131
|
+
original: ((props: import("./TopBar/TopBar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
132
|
+
original: (props: import("./TopBar/TopBar.js").ElementsProps) => import("react").JSX.Element;
|
|
133
|
+
originalName: string;
|
|
134
|
+
displayName: string;
|
|
135
|
+
};
|
|
136
|
+
originalName: string;
|
|
137
|
+
displayName: string;
|
|
138
|
+
} & {
|
|
139
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./TopBar/TopBar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
140
|
+
original: (props: import("./TopBar/TopBar.js").ElementsProps) => import("react").JSX.Element;
|
|
141
|
+
originalName: string;
|
|
142
|
+
displayName: string;
|
|
143
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
144
|
+
};
|
|
145
|
+
Layout: (() => import("react").JSX.Element) & {
|
|
146
|
+
original: () => import("react").JSX.Element;
|
|
147
|
+
originalName: string;
|
|
148
|
+
displayName: string;
|
|
149
|
+
} & {
|
|
150
|
+
original: (() => import("react").JSX.Element) & {
|
|
151
|
+
original: () => import("react").JSX.Element;
|
|
152
|
+
originalName: string;
|
|
153
|
+
displayName: string;
|
|
154
|
+
};
|
|
155
|
+
originalName: string;
|
|
156
|
+
displayName: string;
|
|
157
|
+
} & {
|
|
158
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
159
|
+
original: () => import("react").JSX.Element;
|
|
160
|
+
originalName: string;
|
|
161
|
+
displayName: string;
|
|
162
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
163
|
+
};
|
|
164
|
+
Divider: (() => import("react").JSX.Element) & {
|
|
165
|
+
original: () => import("react").JSX.Element;
|
|
166
|
+
originalName: string;
|
|
167
|
+
displayName: string;
|
|
168
|
+
} & {
|
|
169
|
+
original: (() => import("react").JSX.Element) & {
|
|
170
|
+
original: () => import("react").JSX.Element;
|
|
171
|
+
originalName: string;
|
|
172
|
+
displayName: string;
|
|
173
|
+
};
|
|
174
|
+
originalName: string;
|
|
175
|
+
displayName: string;
|
|
176
|
+
} & {
|
|
177
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
178
|
+
original: () => import("react").JSX.Element;
|
|
179
|
+
originalName: string;
|
|
180
|
+
displayName: string;
|
|
181
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
182
|
+
};
|
|
183
|
+
Action: ((props: import("./TopBar/TopBar.js").ActionProps) => import("react").JSX.Element) & {
|
|
184
|
+
original: (props: import("./TopBar/TopBar.js").ActionProps) => import("react").JSX.Element;
|
|
185
|
+
originalName: string;
|
|
186
|
+
displayName: string;
|
|
187
|
+
} & {
|
|
188
|
+
original: ((props: import("./TopBar/TopBar.js").ActionProps) => import("react").JSX.Element) & {
|
|
189
|
+
original: (props: import("./TopBar/TopBar.js").ActionProps) => import("react").JSX.Element;
|
|
190
|
+
originalName: string;
|
|
191
|
+
displayName: string;
|
|
192
|
+
};
|
|
193
|
+
originalName: string;
|
|
194
|
+
displayName: string;
|
|
195
|
+
} & {
|
|
196
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./TopBar/TopBar.js").ActionProps) => import("react").JSX.Element) & {
|
|
197
|
+
original: (props: import("./TopBar/TopBar.js").ActionProps) => import("react").JSX.Element;
|
|
198
|
+
originalName: string;
|
|
199
|
+
displayName: string;
|
|
200
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
201
|
+
};
|
|
202
|
+
DropdownAction: ((props: import("./TopBar/TopBar.js").DropdownActionProps) => import("react").JSX.Element) & {
|
|
203
|
+
original: (props: import("./TopBar/TopBar.js").DropdownActionProps) => import("react").JSX.Element;
|
|
204
|
+
originalName: string;
|
|
205
|
+
displayName: string;
|
|
206
|
+
} & {
|
|
207
|
+
original: ((props: import("./TopBar/TopBar.js").DropdownActionProps) => import("react").JSX.Element) & {
|
|
208
|
+
original: (props: import("./TopBar/TopBar.js").DropdownActionProps) => import("react").JSX.Element;
|
|
209
|
+
originalName: string;
|
|
210
|
+
displayName: string;
|
|
211
|
+
};
|
|
212
|
+
originalName: string;
|
|
213
|
+
displayName: string;
|
|
214
|
+
} & {
|
|
215
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./TopBar/TopBar.js").DropdownActionProps) => import("react").JSX.Element) & {
|
|
216
|
+
original: (props: import("./TopBar/TopBar.js").DropdownActionProps) => import("react").JSX.Element;
|
|
217
|
+
originalName: string;
|
|
218
|
+
displayName: string;
|
|
219
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
220
|
+
} & {
|
|
221
|
+
MenuItem: (props: import("./TopBar/MenuItem.js").MenuItemProps) => import("react").JSX.Element;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
Toolbar: (() => import("react").JSX.Element) & {
|
|
225
|
+
original: () => import("react").JSX.Element;
|
|
226
|
+
originalName: string;
|
|
227
|
+
displayName: string;
|
|
228
|
+
} & {
|
|
229
|
+
original: (() => import("react").JSX.Element) & {
|
|
230
|
+
original: () => import("react").JSX.Element;
|
|
231
|
+
originalName: string;
|
|
232
|
+
displayName: string;
|
|
233
|
+
};
|
|
234
|
+
originalName: string;
|
|
235
|
+
displayName: string;
|
|
236
|
+
} & {
|
|
237
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
238
|
+
original: () => import("react").JSX.Element;
|
|
239
|
+
originalName: string;
|
|
240
|
+
displayName: string;
|
|
241
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
242
|
+
} & {
|
|
243
|
+
Layout: () => import("react").JSX.Element;
|
|
244
|
+
Element: ((props: import("./Toolbar/Toolbar.js").ElementProps) => import("react").JSX.Element) & {
|
|
245
|
+
original: (props: import("./Toolbar/Toolbar.js").ElementProps) => import("react").JSX.Element;
|
|
246
|
+
originalName: string;
|
|
247
|
+
displayName: string;
|
|
248
|
+
} & {
|
|
249
|
+
original: ((props: import("./Toolbar/Toolbar.js").ElementProps) => import("react").JSX.Element) & {
|
|
250
|
+
original: (props: import("./Toolbar/Toolbar.js").ElementProps) => import("react").JSX.Element;
|
|
251
|
+
originalName: string;
|
|
252
|
+
displayName: string;
|
|
253
|
+
};
|
|
254
|
+
originalName: string;
|
|
255
|
+
displayName: string;
|
|
256
|
+
} & {
|
|
257
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./Toolbar/Toolbar.js").ElementProps) => import("react").JSX.Element) & {
|
|
258
|
+
original: (props: import("./Toolbar/Toolbar.js").ElementProps) => import("react").JSX.Element;
|
|
259
|
+
originalName: string;
|
|
260
|
+
displayName: string;
|
|
261
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
262
|
+
};
|
|
263
|
+
Elements: ((props: import("./Toolbar/Toolbar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
264
|
+
original: (props: import("./Toolbar/Toolbar.js").ElementsProps) => import("react").JSX.Element;
|
|
265
|
+
originalName: string;
|
|
266
|
+
displayName: string;
|
|
267
|
+
} & {
|
|
268
|
+
original: ((props: import("./Toolbar/Toolbar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
269
|
+
original: (props: import("./Toolbar/Toolbar.js").ElementsProps) => import("react").JSX.Element;
|
|
270
|
+
originalName: string;
|
|
271
|
+
displayName: string;
|
|
272
|
+
};
|
|
273
|
+
originalName: string;
|
|
274
|
+
displayName: string;
|
|
275
|
+
} & {
|
|
276
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./Toolbar/Toolbar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
277
|
+
original: (props: import("./Toolbar/Toolbar.js").ElementsProps) => import("react").JSX.Element;
|
|
278
|
+
originalName: string;
|
|
279
|
+
displayName: string;
|
|
280
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
Sidebar: (() => import("react").JSX.Element) & {
|
|
284
|
+
original: () => import("react").JSX.Element;
|
|
285
|
+
originalName: string;
|
|
286
|
+
displayName: string;
|
|
287
|
+
} & {
|
|
288
|
+
original: (() => import("react").JSX.Element) & {
|
|
289
|
+
original: () => import("react").JSX.Element;
|
|
290
|
+
originalName: string;
|
|
291
|
+
displayName: string;
|
|
292
|
+
};
|
|
293
|
+
originalName: string;
|
|
294
|
+
displayName: string;
|
|
295
|
+
} & {
|
|
296
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
297
|
+
original: () => import("react").JSX.Element;
|
|
298
|
+
originalName: string;
|
|
299
|
+
displayName: string;
|
|
300
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
301
|
+
} & {
|
|
302
|
+
Layout: (() => import("react").JSX.Element) & {
|
|
303
|
+
original: () => import("react").JSX.Element;
|
|
304
|
+
originalName: string;
|
|
305
|
+
displayName: string;
|
|
306
|
+
} & {
|
|
307
|
+
original: (() => import("react").JSX.Element) & {
|
|
308
|
+
original: () => import("react").JSX.Element;
|
|
309
|
+
originalName: string;
|
|
310
|
+
displayName: string;
|
|
311
|
+
};
|
|
312
|
+
originalName: string;
|
|
313
|
+
displayName: string;
|
|
314
|
+
} & {
|
|
315
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
316
|
+
original: () => import("react").JSX.Element;
|
|
317
|
+
originalName: string;
|
|
318
|
+
displayName: string;
|
|
319
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
320
|
+
};
|
|
321
|
+
Element: ((props: import("./Sidebar/Sidebar.js").BaseElementProps) => import("react").JSX.Element) & {
|
|
322
|
+
original: (props: import("./Sidebar/Sidebar.js").BaseElementProps) => import("react").JSX.Element;
|
|
323
|
+
originalName: string;
|
|
324
|
+
displayName: string;
|
|
325
|
+
} & {
|
|
326
|
+
original: ((props: import("./Sidebar/Sidebar.js").BaseElementProps) => import("react").JSX.Element) & {
|
|
327
|
+
original: (props: import("./Sidebar/Sidebar.js").BaseElementProps) => import("react").JSX.Element;
|
|
328
|
+
originalName: string;
|
|
329
|
+
displayName: string;
|
|
330
|
+
};
|
|
331
|
+
originalName: string;
|
|
332
|
+
displayName: string;
|
|
333
|
+
} & {
|
|
334
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./Sidebar/Sidebar.js").BaseElementProps) => import("react").JSX.Element) & {
|
|
335
|
+
original: (props: import("./Sidebar/Sidebar.js").BaseElementProps) => import("react").JSX.Element;
|
|
336
|
+
originalName: string;
|
|
337
|
+
displayName: string;
|
|
338
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
339
|
+
};
|
|
340
|
+
Elements: ((props: import("./Sidebar/Sidebar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
341
|
+
original: (props: import("./Sidebar/Sidebar.js").ElementsProps) => import("react").JSX.Element;
|
|
342
|
+
originalName: string;
|
|
343
|
+
displayName: string;
|
|
344
|
+
} & {
|
|
345
|
+
original: ((props: import("./Sidebar/Sidebar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
346
|
+
original: (props: import("./Sidebar/Sidebar.js").ElementsProps) => import("react").JSX.Element;
|
|
347
|
+
originalName: string;
|
|
348
|
+
displayName: string;
|
|
349
|
+
};
|
|
350
|
+
originalName: string;
|
|
351
|
+
displayName: string;
|
|
352
|
+
} & {
|
|
353
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./Sidebar/Sidebar.js").ElementsProps) => import("react").JSX.Element) & {
|
|
354
|
+
original: (props: import("./Sidebar/Sidebar.js").ElementsProps) => import("react").JSX.Element;
|
|
355
|
+
originalName: string;
|
|
356
|
+
displayName: string;
|
|
357
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
358
|
+
};
|
|
359
|
+
Group: ((props: import("./Sidebar/Sidebar.js").GroupProps) => import("react").JSX.Element) & {
|
|
360
|
+
original: (props: import("./Sidebar/Sidebar.js").GroupProps) => import("react").JSX.Element;
|
|
361
|
+
originalName: string;
|
|
362
|
+
displayName: string;
|
|
363
|
+
} & {
|
|
364
|
+
original: ((props: import("./Sidebar/Sidebar.js").GroupProps) => import("react").JSX.Element) & {
|
|
365
|
+
original: (props: import("./Sidebar/Sidebar.js").GroupProps) => import("react").JSX.Element;
|
|
366
|
+
originalName: string;
|
|
367
|
+
displayName: string;
|
|
368
|
+
};
|
|
369
|
+
originalName: string;
|
|
370
|
+
displayName: string;
|
|
371
|
+
} & {
|
|
372
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./Sidebar/Sidebar.js").GroupProps) => import("react").JSX.Element) & {
|
|
373
|
+
original: (props: import("./Sidebar/Sidebar.js").GroupProps) => import("react").JSX.Element;
|
|
374
|
+
originalName: string;
|
|
375
|
+
displayName: string;
|
|
376
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
377
|
+
} & {
|
|
378
|
+
Tab: ({ name, label, disabled, element, visible, noPadding }: import("./Sidebar/Tab.js").TabProps) => import("react").JSX.Element;
|
|
379
|
+
};
|
|
380
|
+
ScrollableContainer: ({ children }: any) => import("react").JSX.Element;
|
|
381
|
+
};
|
|
382
|
+
IsReadOnly: ({ children }: import("~/BaseEditor/config/IsReadOnly.js").IsNotReadOnlyProps) => import("react").JSX.Element | null;
|
|
383
|
+
IsNotReadOnly: ({ children }: import("~/BaseEditor/config/IsNotReadOnly.js").IsNotReadOnlyProps) => import("react").JSX.Element | null;
|
|
384
|
+
OnActiveElement: ({ children }: import("./OnActiveElement.js").OnActiveElementProps) => import("react").JSX.Element | null;
|
|
385
|
+
NoActiveElement: ({ children }: import("./NoActiveElement.js").NoActiveElementProps) => import("react").JSX.Element | null;
|
|
386
|
+
};
|
|
387
|
+
ElementInput: {
|
|
388
|
+
Renderer: (props: import("./ElementInput.js").RendererProps) => import("react").JSX.Element;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Define a new element property.
|
|
392
|
+
*/
|
|
393
|
+
ElementProperty: ((props: import("./ElementProperty.js").ElementPropertyProps) => import("react").JSX.Element) & {
|
|
394
|
+
original: (props: import("./ElementProperty.js").ElementPropertyProps) => import("react").JSX.Element;
|
|
395
|
+
originalName: string;
|
|
396
|
+
displayName: string;
|
|
397
|
+
} & {
|
|
398
|
+
original: ((props: import("./ElementProperty.js").ElementPropertyProps) => import("react").JSX.Element) & {
|
|
399
|
+
original: (props: import("./ElementProperty.js").ElementPropertyProps) => import("react").JSX.Element;
|
|
400
|
+
originalName: string;
|
|
401
|
+
displayName: string;
|
|
402
|
+
};
|
|
403
|
+
originalName: string;
|
|
404
|
+
displayName: string;
|
|
405
|
+
} & {
|
|
406
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./ElementProperty.js").ElementPropertyProps) => import("react").JSX.Element) & {
|
|
407
|
+
original: (props: import("./ElementProperty.js").ElementPropertyProps) => import("react").JSX.Element;
|
|
408
|
+
originalName: string;
|
|
409
|
+
displayName: string;
|
|
410
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
411
|
+
} & {
|
|
412
|
+
STYLE: string;
|
|
413
|
+
ELEMENT: string;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Render element properties for the given group.
|
|
417
|
+
*/
|
|
418
|
+
ElementProperties: (props: import("./ElementProperty.js").ElementPropertiesProps) => import("react").JSX.Element;
|
|
419
|
+
/**
|
|
420
|
+
* Define an element action.
|
|
421
|
+
*/
|
|
422
|
+
ElementAction: ((props: import("./ElementAction.js").ElementActionProps) => import("react").JSX.Element) & {
|
|
423
|
+
original: (props: import("./ElementAction.js").ElementActionProps) => import("react").JSX.Element;
|
|
424
|
+
originalName: string;
|
|
425
|
+
displayName: string;
|
|
426
|
+
} & {
|
|
427
|
+
original: ((props: import("./ElementAction.js").ElementActionProps) => import("react").JSX.Element) & {
|
|
428
|
+
original: (props: import("./ElementAction.js").ElementActionProps) => import("react").JSX.Element;
|
|
429
|
+
originalName: string;
|
|
430
|
+
displayName: string;
|
|
431
|
+
};
|
|
432
|
+
originalName: string;
|
|
433
|
+
displayName: string;
|
|
434
|
+
} & {
|
|
435
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: import("./ElementAction.js").ElementActionProps) => import("react").JSX.Element) & {
|
|
436
|
+
original: (props: import("./ElementAction.js").ElementActionProps) => import("react").JSX.Element;
|
|
437
|
+
originalName: string;
|
|
438
|
+
displayName: string;
|
|
439
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
440
|
+
} & {
|
|
441
|
+
IconButton: ({ label, icon, disabled, onClick }: import("./IconButton.js").IconButtonProps) => import("react").JSX.Element;
|
|
442
|
+
};
|
|
443
|
+
/**
|
|
444
|
+
* Render all element actions.
|
|
445
|
+
*/
|
|
446
|
+
ElementActions: (() => import("react").JSX.Element) & {
|
|
447
|
+
original: () => import("react").JSX.Element;
|
|
448
|
+
originalName: string;
|
|
449
|
+
displayName: string;
|
|
450
|
+
} & {
|
|
451
|
+
original: (() => import("react").JSX.Element) & {
|
|
452
|
+
original: () => import("react").JSX.Element;
|
|
453
|
+
originalName: string;
|
|
454
|
+
displayName: string;
|
|
455
|
+
};
|
|
456
|
+
originalName: string;
|
|
457
|
+
displayName: string;
|
|
458
|
+
} & {
|
|
459
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(() => import("react").JSX.Element) & {
|
|
460
|
+
original: () => import("react").JSX.Element;
|
|
461
|
+
originalName: string;
|
|
462
|
+
displayName: string;
|
|
463
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Access full editor config. WARNING: very low-level, we don't recommend using this directly!
|
|
467
|
+
*/
|
|
468
|
+
useEditorConfig: typeof useEditorConfig;
|
|
469
|
+
};
|
|
3
470
|
export declare const EditorConfig: (({ priority, children }: import("@webiny/react-properties").ConfigProps) => React.JSX.Element) & {
|
|
4
471
|
/**
|
|
5
472
|
* Components to configure editor UI.
|
|
@@ -379,6 +846,8 @@ export declare const EditorConfig: (({ priority, children }: import("@webiny/rea
|
|
|
379
846
|
};
|
|
380
847
|
ScrollableContainer: ({ children }: any) => import("react").JSX.Element;
|
|
381
848
|
};
|
|
849
|
+
IsReadOnly: ({ children }: import("~/BaseEditor/config/IsReadOnly.js").IsNotReadOnlyProps) => import("react").JSX.Element | null;
|
|
850
|
+
IsNotReadOnly: ({ children }: import("~/BaseEditor/config/IsNotReadOnly.js").IsNotReadOnlyProps) => import("react").JSX.Element | null;
|
|
382
851
|
OnActiveElement: ({ children }: import("./OnActiveElement.js").OnActiveElementProps) => import("react").JSX.Element | null;
|
|
383
852
|
NoActiveElement: ({ children }: import("./NoActiveElement.js").NoActiveElementProps) => import("react").JSX.Element | null;
|
|
384
853
|
};
|
|
@@ -11,8 +11,10 @@ import { NoActiveElement } from "./NoActiveElement.js";
|
|
|
11
11
|
import { ElementProperties, ElementProperty } from "./ElementProperty.js";
|
|
12
12
|
import { ElementAction, ElementActions } from "./ElementAction.js";
|
|
13
13
|
import { ElementInput } from "./ElementInput.js";
|
|
14
|
+
import { IsNotReadOnly } from "./IsNotReadOnly.js";
|
|
15
|
+
import { IsReadOnly } from "./IsReadOnly.js";
|
|
14
16
|
const base = createConfigurableComponent("DocumentEditor");
|
|
15
|
-
export const
|
|
17
|
+
export const EditorConfigComponents = {
|
|
16
18
|
/**
|
|
17
19
|
* Components to configure editor UI.
|
|
18
20
|
*/
|
|
@@ -24,6 +26,8 @@ export const EditorConfig = Object.assign(base.Config, {
|
|
|
24
26
|
TopBar,
|
|
25
27
|
Toolbar,
|
|
26
28
|
Sidebar,
|
|
29
|
+
IsReadOnly,
|
|
30
|
+
IsNotReadOnly,
|
|
27
31
|
OnActiveElement,
|
|
28
32
|
NoActiveElement
|
|
29
33
|
},
|
|
@@ -48,7 +52,8 @@ export const EditorConfig = Object.assign(base.Config, {
|
|
|
48
52
|
* Access full editor config. WARNING: very low-level, we don't recommend using this directly!
|
|
49
53
|
*/
|
|
50
54
|
useEditorConfig
|
|
51
|
-
}
|
|
55
|
+
};
|
|
56
|
+
export const EditorConfig = Object.assign(base.Config, EditorConfigComponents);
|
|
52
57
|
export const EditorWithConfig = Object.assign(base.WithConfig, {
|
|
53
58
|
displayName: "EditorWithConfig"
|
|
54
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createConfigurableComponent","Element","TopBar","Layout","Content","Toolbar","Sidebar","Elements","OnActiveElement","NoActiveElement","ElementProperties","ElementProperty","ElementAction","ElementActions","ElementInput","base","
|
|
1
|
+
{"version":3,"names":["createConfigurableComponent","Element","TopBar","Layout","Content","Toolbar","Sidebar","Elements","OnActiveElement","NoActiveElement","ElementProperties","ElementProperty","ElementAction","ElementActions","ElementInput","IsNotReadOnly","IsReadOnly","base","EditorConfigComponents","Ui","useEditorConfig","EditorConfig","Object","assign","Config","EditorWithConfig","WithConfig","displayName","config","useConfig","elements","inputRenderers"],"sources":["EditorConfig.tsx"],"sourcesContent":["import { createConfigurableComponent } from \"@webiny/react-properties\";\nimport type { ElementConfig } from \"./Element.js\";\nimport { Element } from \"./Element.js\";\nimport { TopBar } from \"./TopBar/TopBar.js\";\nimport { Layout } from \"./Layout.js\";\nimport { Content } from \"./Content/Content.js\";\nimport { Toolbar } from \"./Toolbar/Toolbar.js\";\nimport { Sidebar } from \"./Sidebar/Sidebar.js\";\nimport { Elements } from \"./Elements.js\";\nimport { OnActiveElement } from \"./OnActiveElement.js\";\nimport { NoActiveElement } from \"./NoActiveElement.js\";\nimport { ElementProperties, ElementProperty } from \"./ElementProperty.js\";\nimport { ElementAction, ElementActions } from \"./ElementAction.js\";\nimport type { ElementInputConfig } from \"./ElementInput.js\";\nimport { ElementInput } from \"./ElementInput.js\";\nimport { IsNotReadOnly } from \"~/BaseEditor/config/IsNotReadOnly.js\";\nimport { IsReadOnly } from \"~/BaseEditor/config/IsReadOnly.js\";\n\ninterface EditorConfig {\n elements: ElementConfig[];\n inputRenderers: ElementInputConfig[];\n}\n\nconst base = createConfigurableComponent<EditorConfig>(\"DocumentEditor\");\n\nexport const EditorConfigComponents = {\n /**\n * Components to configure editor UI.\n */\n Ui: {\n Element,\n Elements,\n Layout,\n Content,\n TopBar,\n Toolbar,\n Sidebar,\n IsReadOnly,\n IsNotReadOnly,\n OnActiveElement,\n NoActiveElement\n },\n ElementInput,\n /**\n * Define a new element property.\n */\n ElementProperty,\n /**\n * Render element properties for the given group.\n */\n ElementProperties,\n /**\n * Define an element action.\n */\n ElementAction,\n /**\n * Render all element actions.\n */\n ElementActions,\n /**\n * Access full editor config. WARNING: very low-level, we don't recommend using this directly!\n */\n useEditorConfig\n};\n\nexport const EditorConfig = Object.assign(base.Config, EditorConfigComponents);\n\nexport const EditorWithConfig = Object.assign(base.WithConfig, { displayName: \"EditorWithConfig\" });\n\nexport function useEditorConfig() {\n const config = base.useConfig();\n\n return { elements: config.elements || [], inputRenderers: config.inputRenderers || [] };\n}\n"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,0BAA0B;AAEtE,SAASC,OAAO;AAChB,SAASC,MAAM;AACf,SAASC,MAAM;AACf,SAASC,OAAO;AAChB,SAASC,OAAO;AAChB,SAASC,OAAO;AAChB,SAASC,QAAQ;AACjB,SAASC,eAAe;AACxB,SAASC,eAAe;AACxB,SAASC,iBAAiB,EAAEC,eAAe;AAC3C,SAASC,aAAa,EAAEC,cAAc;AAEtC,SAASC,YAAY;AACrB,SAASC,aAAa;AACtB,SAASC,UAAU;AAOnB,MAAMC,IAAI,GAAGjB,2BAA2B,CAAe,gBAAgB,CAAC;AAExE,OAAO,MAAMkB,sBAAsB,GAAG;EAClC;AACJ;AACA;EACIC,EAAE,EAAE;IACAlB,OAAO;IACPM,QAAQ;IACRJ,MAAM;IACNC,OAAO;IACPF,MAAM;IACNG,OAAO;IACPC,OAAO;IACPU,UAAU;IACVD,aAAa;IACbP,eAAe;IACfC;EACJ,CAAC;EACDK,YAAY;EACZ;AACJ;AACA;EACIH,eAAe;EACf;AACJ;AACA;EACID,iBAAiB;EACjB;AACJ;AACA;EACIE,aAAa;EACb;AACJ;AACA;EACIC,cAAc;EACd;AACJ;AACA;EACIO;AACJ,CAAC;AAED,OAAO,MAAMC,YAAY,GAAGC,MAAM,CAACC,MAAM,CAACN,IAAI,CAACO,MAAM,EAAEN,sBAAsB,CAAC;AAE9E,OAAO,MAAMO,gBAAgB,GAAGH,MAAM,CAACC,MAAM,CAACN,IAAI,CAACS,UAAU,EAAE;EAAEC,WAAW,EAAE;AAAmB,CAAC,CAAC;AAEnG,OAAO,SAASP,eAAeA,CAAA,EAAG;EAC9B,MAAMQ,MAAM,GAAGX,IAAI,CAACY,SAAS,CAAC,CAAC;EAE/B,OAAO;IAAEC,QAAQ,EAAEF,MAAM,CAACE,QAAQ,IAAI,EAAE;IAAEC,cAAc,EAAEH,MAAM,CAACG,cAAc,IAAI;EAAG,CAAC;AAC3F","ignoreList":[]}
|
|
@@ -3,12 +3,12 @@ export interface ElementConfig {
|
|
|
3
3
|
name: string;
|
|
4
4
|
group: string;
|
|
5
5
|
scope: string;
|
|
6
|
-
element: JSX.Element;
|
|
6
|
+
element: React.JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export interface ElementProps {
|
|
9
9
|
name: string;
|
|
10
10
|
id?: string;
|
|
11
|
-
element?: JSX.Element | null;
|
|
11
|
+
element?: React.JSX.Element | null;
|
|
12
12
|
/**
|
|
13
13
|
* `group` is a public prop that can be used by external developers to logically group elements.
|
|
14
14
|
* For example: "actions", "buttons", etc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","makeDecoratable","Property","useIdGenerator","Element","id","name","element","group","scope","remove","before","after","getId","realId","placeAfter","undefined","placeBefore","createElement","array","value"],"sources":["Element.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/app-admin\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\n\nexport interface ElementConfig {\n name: string;\n group: string;\n scope: string;\n element: JSX.Element;\n}\n\nexport interface ElementProps {\n name: string;\n id?: string;\n element?: JSX.Element | null;\n /**\n * `group` is a public prop that can be used by external developers to logically group elements.\n * For example: \"actions\", \"buttons\", etc.\n */\n group?: string;\n /**\n * `scope` is used for internal grouping of elements. It is only used to create higher level components used by the 3rd party.\n * For example: \"sidebar\", \"topBar\", \"toolbar\".\n * This creates a scope within which we can then filter elements by their `group` prop.\n */\n scope?: string;\n remove?: boolean;\n before?: string;\n after?: string;\n}\n\nexport const Element = makeDecoratable(\n \"EditorElement\",\n ({ id, name, element, group, scope, remove, before, after }: ElementProps) => {\n const getId = useIdGenerator(\"element\");\n const realId = id ?? name;\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n return (\n <Property\n id={getId(realId)}\n name={\"elements\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(realId, \"name\")} name={\"name\"} value={name} />\n {element ? (\n <Property id={getId(realId, \"element\")} name={\"element\"} value={element} />\n ) : null}\n {group ? (\n <Property id={getId(realId, \"group\")} name={\"group\"} value={group} />\n ) : null}\n {scope ? (\n <Property id={getId(realId, \"scope\")} name={\"scope\"} value={scope} />\n ) : null}\n </Property>\n );\n }\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,QAAQ,EAAEC,cAAc,QAAQ,0BAA0B;AA6BnE,OAAO,MAAMC,OAAO,GAAGH,eAAe,CAClC,eAAe,EACf,CAAC;EAAEI,EAAE;EAAEC,IAAI;EAAEC,OAAO;EAAEC,KAAK;EAAEC,KAAK;EAAEC,MAAM;EAAEC,MAAM;EAAEC;AAAoB,CAAC,KAAK;EAC1E,MAAMC,KAAK,GAAGV,cAAc,CAAC,SAAS,CAAC;EACvC,MAAMW,MAAM,GAAGT,EAAE,IAAIC,IAAI;EAEzB,MAAMS,UAAU,GAAGH,KAAK,KAAKI,SAAS,GAAGH,KAAK,CAACD,KAAK,CAAC,GAAGI,SAAS;EACjE,MAAMC,WAAW,GAAGN,MAAM,KAAKK,SAAS,GAAGH,KAAK,CAACF,MAAM,CAAC,GAAGK,SAAS;EAEpE,oBACIhB,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IACLG,EAAE,EAAEQ,KAAK,CAACC,MAAM,CAAE;IAClBR,IAAI,EAAE,UAAW;IACjBI,MAAM,EAAEA,MAAO;IACfS,KAAK,EAAE,IAAK;IACZR,MAAM,EAAEM,WAAY;IACpBL,KAAK,EAAEG;EAAW,gBAElBf,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,MAAM,CAAE;IAACR,IAAI,EAAE,MAAO;IAACc,KAAK,EAAEd;EAAK,CAAE,CAAC,EACjEC,OAAO,gBACJP,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,SAAS,CAAE;IAACR,IAAI,EAAE,SAAU;IAACc,KAAK,EAAEb;EAAQ,CAAE,CAAC,GAC3E,IAAI,EACPC,KAAK,gBACFR,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,OAAO,CAAE;IAACR,IAAI,EAAE,OAAQ;IAACc,KAAK,EAAEZ;EAAM,CAAE,CAAC,GACrE,IAAI,EACPC,KAAK,gBACFT,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,OAAO,CAAE;IAACR,IAAI,EAAE,OAAQ;IAACc,KAAK,EAAEX;EAAM,CAAE,CAAC,GACrE,IACE,CAAC;AAEnB,CACJ,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","makeDecoratable","Property","useIdGenerator","Element","id","name","element","group","scope","remove","before","after","getId","realId","placeAfter","undefined","placeBefore","createElement","array","value"],"sources":["Element.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/app-admin\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\n\nexport interface ElementConfig {\n name: string;\n group: string;\n scope: string;\n element: React.JSX.Element;\n}\n\nexport interface ElementProps {\n name: string;\n id?: string;\n element?: React.JSX.Element | null;\n /**\n * `group` is a public prop that can be used by external developers to logically group elements.\n * For example: \"actions\", \"buttons\", etc.\n */\n group?: string;\n /**\n * `scope` is used for internal grouping of elements. It is only used to create higher level components used by the 3rd party.\n * For example: \"sidebar\", \"topBar\", \"toolbar\".\n * This creates a scope within which we can then filter elements by their `group` prop.\n */\n scope?: string;\n remove?: boolean;\n before?: string;\n after?: string;\n}\n\nexport const Element = makeDecoratable(\n \"EditorElement\",\n ({ id, name, element, group, scope, remove, before, after }: ElementProps) => {\n const getId = useIdGenerator(\"element\");\n const realId = id ?? name;\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n return (\n <Property\n id={getId(realId)}\n name={\"elements\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(realId, \"name\")} name={\"name\"} value={name} />\n {element ? (\n <Property id={getId(realId, \"element\")} name={\"element\"} value={element} />\n ) : null}\n {group ? (\n <Property id={getId(realId, \"group\")} name={\"group\"} value={group} />\n ) : null}\n {scope ? (\n <Property id={getId(realId, \"scope\")} name={\"scope\"} value={scope} />\n ) : null}\n </Property>\n );\n }\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,QAAQ,EAAEC,cAAc,QAAQ,0BAA0B;AA6BnE,OAAO,MAAMC,OAAO,GAAGH,eAAe,CAClC,eAAe,EACf,CAAC;EAAEI,EAAE;EAAEC,IAAI;EAAEC,OAAO;EAAEC,KAAK;EAAEC,KAAK;EAAEC,MAAM;EAAEC,MAAM;EAAEC;AAAoB,CAAC,KAAK;EAC1E,MAAMC,KAAK,GAAGV,cAAc,CAAC,SAAS,CAAC;EACvC,MAAMW,MAAM,GAAGT,EAAE,IAAIC,IAAI;EAEzB,MAAMS,UAAU,GAAGH,KAAK,KAAKI,SAAS,GAAGH,KAAK,CAACD,KAAK,CAAC,GAAGI,SAAS;EACjE,MAAMC,WAAW,GAAGN,MAAM,KAAKK,SAAS,GAAGH,KAAK,CAACF,MAAM,CAAC,GAAGK,SAAS;EAEpE,oBACIhB,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IACLG,EAAE,EAAEQ,KAAK,CAACC,MAAM,CAAE;IAClBR,IAAI,EAAE,UAAW;IACjBI,MAAM,EAAEA,MAAO;IACfS,KAAK,EAAE,IAAK;IACZR,MAAM,EAAEM,WAAY;IACpBL,KAAK,EAAEG;EAAW,gBAElBf,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,MAAM,CAAE;IAACR,IAAI,EAAE,MAAO;IAACc,KAAK,EAAEd;EAAK,CAAE,CAAC,EACjEC,OAAO,gBACJP,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,SAAS,CAAE;IAACR,IAAI,EAAE,SAAU;IAACc,KAAK,EAAEb;EAAQ,CAAE,CAAC,GAC3E,IAAI,EACPC,KAAK,gBACFR,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,OAAO,CAAE;IAACR,IAAI,EAAE,OAAQ;IAACc,KAAK,EAAEZ;EAAM,CAAE,CAAC,GACrE,IAAI,EACPC,KAAK,gBACFT,KAAA,CAAAkB,aAAA,CAAChB,QAAQ;IAACG,EAAE,EAAEQ,KAAK,CAACC,MAAM,EAAE,OAAO,CAAE;IAACR,IAAI,EAAE,OAAQ;IAACc,KAAK,EAAEX;EAAM,CAAE,CAAC,GACrE,IACE,CAAC;AAEnB,CACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","IconButton","BaseIconButton","Tooltip","label","icon","disabled","onClick","createElement","placement","content"],"sources":["IconButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { IconButton as BaseIconButton } from \"@webiny/ui/Button/index.js\";\nimport { Tooltip } from \"@webiny/ui/Tooltip/index.js\";\n\nexport interface IconButtonProps {\n icon: JSX.Element;\n label: string;\n disabled?: boolean;\n onClick?: () => void;\n}\n\nexport const IconButton = ({ label, icon, disabled = false, onClick }: IconButtonProps) => {\n return (\n <Tooltip placement={\"bottom\"} content={label}>\n <BaseIconButton icon={icon} onClick={onClick} disabled={disabled} />\n </Tooltip>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,cAAc,QAAQ,4BAA4B;AACzE,SAASC,OAAO,QAAQ,6BAA6B;AASrD,OAAO,MAAMF,UAAU,GAAGA,CAAC;EAAEG,KAAK;EAAEC,IAAI;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAyB,CAAC,KAAK;EACvF,oBACIP,KAAA,CAAAQ,aAAA,CAACL,OAAO;IAACM,SAAS,EAAE,QAAS;IAACC,OAAO,EAAEN;EAAM,gBACzCJ,KAAA,CAAAQ,aAAA,CAACN,cAAc;IAACG,IAAI,EAAEA,IAAK;IAACE,OAAO,EAAEA,OAAQ;IAACD,QAAQ,EAAEA;EAAS,CAAE,CAC9D,CAAC;AAElB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","IconButton","BaseIconButton","Tooltip","label","icon","disabled","onClick","createElement","placement","content"],"sources":["IconButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { IconButton as BaseIconButton } from \"@webiny/ui/Button/index.js\";\nimport { Tooltip } from \"@webiny/ui/Tooltip/index.js\";\n\nexport interface IconButtonProps {\n icon: React.JSX.Element;\n label: string;\n disabled?: boolean;\n onClick?: () => void;\n}\n\nexport const IconButton = ({ label, icon, disabled = false, onClick }: IconButtonProps) => {\n return (\n <Tooltip placement={\"bottom\"} content={label}>\n <BaseIconButton icon={icon} onClick={onClick} disabled={disabled} />\n </Tooltip>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,cAAc,QAAQ,4BAA4B;AACzE,SAASC,OAAO,QAAQ,6BAA6B;AASrD,OAAO,MAAMF,UAAU,GAAGA,CAAC;EAAEG,KAAK;EAAEC,IAAI;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAyB,CAAC,KAAK;EACvF,oBACIP,KAAA,CAAAQ,aAAA,CAACL,OAAO;IAACM,SAAS,EAAE,QAAS;IAACC,OAAO,EAAEN;EAAM,gBACzCJ,KAAA,CAAAQ,aAAA,CAACN,cAAc;IAACG,IAAI,EAAEA,IAAK;IAACE,OAAO,EAAEA,OAAQ;IAACD,QAAQ,EAAEA;EAAS,CAAE,CAC9D,CAAC;AAElB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useSelectFromEditor } from "../hooks/useSelectFromEditor.js";
|
|
3
|
+
export const IsNotReadOnly = ({
|
|
4
|
+
children
|
|
5
|
+
}) => {
|
|
6
|
+
const isEditorReadOnly = useSelectFromEditor(state => state.isReadOnly);
|
|
7
|
+
if (isEditorReadOnly) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=IsNotReadOnly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useSelectFromEditor","IsNotReadOnly","children","isEditorReadOnly","state","isReadOnly","createElement","Fragment"],"sources":["IsNotReadOnly.tsx"],"sourcesContent":["import React from \"react\";\nimport { useSelectFromEditor } from \"~/BaseEditor/hooks/useSelectFromEditor.js\";\n\nexport interface IsNotReadOnlyProps {\n children: React.ReactNode;\n}\n\nexport const IsNotReadOnly = ({ children }: IsNotReadOnlyProps) => {\n const isEditorReadOnly = useSelectFromEditor(state => state.isReadOnly);\n\n if (isEditorReadOnly) {\n return null;\n }\n\n return <>{children}</>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB;AAM5B,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAAEC;AAA6B,CAAC,KAAK;EAC/D,MAAMC,gBAAgB,GAAGH,mBAAmB,CAACI,KAAK,IAAIA,KAAK,CAACC,UAAU,CAAC;EAEvE,IAAIF,gBAAgB,EAAE;IAClB,OAAO,IAAI;EACf;EAEA,oBAAOJ,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QAAGL,QAAW,CAAC;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useSelectFromEditor } from "../hooks/useSelectFromEditor.js";
|
|
3
|
+
export const IsReadOnly = ({
|
|
4
|
+
children
|
|
5
|
+
}) => {
|
|
6
|
+
const isEditorReadOnly = useSelectFromEditor(state => state.isReadOnly);
|
|
7
|
+
if (isEditorReadOnly) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=IsReadOnly.js.map
|