@webiny/app-website-builder 6.4.0-beta.2 → 6.4.0-beta.4
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/components/DragPreview/DragCursorWrapper.d.ts +7 -0
- package/BaseEditor/components/DragPreview/DragCursorWrapper.js +17 -0
- package/BaseEditor/components/DragPreview/DragCursorWrapper.js.map +1 -0
- package/BaseEditor/components/DragPreview/DragPreview.js +37 -0
- package/BaseEditor/components/DragPreview/DragPreview.js.map +1 -0
- package/BaseEditor/components/DragPreview/index.d.ts +1 -0
- package/BaseEditor/components/DragPreview/index.js +1 -0
- package/BaseEditor/components/DragPreview/useDragPosition.d.ts +4 -0
- package/BaseEditor/components/DragPreview/useDragPosition.js +26 -0
- package/BaseEditor/components/DragPreview/useDragPosition.js.map +1 -0
- package/BaseEditor/components/Editor.js +1 -2
- package/BaseEditor/components/Editor.js.map +1 -1
- package/BaseEditor/config/EditorConfig.d.ts +4 -2
- package/BaseEditor/config/Layout.js +1 -1
- package/BaseEditor/config/Layout.js.map +1 -1
- package/BaseEditor/config/Sidebar/Layout.js +8 -14
- package/BaseEditor/config/Sidebar/Layout.js.map +1 -1
- package/BaseEditor/config/Sidebar/Sidebar.d.ts +1 -1
- package/BaseEditor/config/Sidebar/Sidebar.js +1 -1
- package/BaseEditor/config/Sidebar/Sidebar.js.map +1 -1
- package/BaseEditor/config/Sidebar/Tab.d.ts +2 -2
- package/BaseEditor/config/Sidebar/Tab.js +3 -3
- package/BaseEditor/config/Sidebar/Tab.js.map +1 -1
- package/BaseEditor/config/Toolbar/Layout.js +8 -14
- package/BaseEditor/config/Toolbar/Layout.js.map +1 -1
- package/BaseEditor/config/Toolbar/Tab.d.ts +10 -0
- package/BaseEditor/config/Toolbar/Tab.js +13 -0
- package/BaseEditor/config/Toolbar/Tab.js.map +1 -0
- package/BaseEditor/config/Toolbar/Toolbar.d.ts +1 -0
- package/BaseEditor/config/Toolbar/Toolbar.js +4 -2
- package/BaseEditor/config/Toolbar/Toolbar.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/AddressBar/AddressBar.js +1 -4
- package/BaseEditor/defaultConfig/Content/AddressBar/AddressBar.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/AddressBar/BreakpointSelector.js +20 -23
- package/BaseEditor/defaultConfig/Content/AddressBar/BreakpointSelector.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/AddressBar/PreviewDomain.js +1 -1
- package/BaseEditor/defaultConfig/Content/AddressBar/PreviewDomain.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Breadcrumbs/styles.js +2 -2
- package/BaseEditor/defaultConfig/Content/Breadcrumbs/styles.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/ContentPreviewConfig.js +6 -1
- package/BaseEditor/defaultConfig/Content/ContentPreviewConfig.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/DropZoneManager.d.ts +3 -0
- package/BaseEditor/defaultConfig/Content/Preview/DropZoneManager.js +6 -0
- package/BaseEditor/defaultConfig/Content/Preview/DropZoneManager.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/Iframe.js +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/Iframe.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/Overlays/ElementOverlay.js +10 -6
- package/BaseEditor/defaultConfig/Content/Preview/Overlays/ElementOverlay.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/Preview.js +2 -1
- package/BaseEditor/defaultConfig/Content/Preview/Preview.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/PreviewContainer.js +12 -2
- package/BaseEditor/defaultConfig/Content/Preview/PreviewContainer.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/PreviewEvents.js +1 -2
- package/BaseEditor/defaultConfig/Content/Preview/PreviewEvents.js.map +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/useResponsiveContainer.js +1 -1
- package/BaseEditor/defaultConfig/Content/Preview/useResponsiveContainer.js.map +1 -1
- package/BaseEditor/defaultConfig/DefaultEditorConfig.js +3 -5
- package/BaseEditor/defaultConfig/DefaultEditorConfig.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/ElementPreview.d.ts +7 -0
- package/BaseEditor/defaultConfig/Sidebar/ElementPreview.js +23 -0
- package/BaseEditor/defaultConfig/Sidebar/ElementPreview.js.map +1 -0
- package/BaseEditor/defaultConfig/Sidebar/ElementSettings/ElementInputs.js +12 -3
- package/BaseEditor/defaultConfig/Sidebar/ElementSettings/ElementInputs.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/ElementSettings/ElementSettingsGroup.js +6 -0
- package/BaseEditor/defaultConfig/Sidebar/ElementSettings/ElementSettingsGroup.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/ElementSettings/useBindingsForElement.d.ts +5 -5
- package/BaseEditor/defaultConfig/Sidebar/InfoMessage.js +2 -2
- package/BaseEditor/defaultConfig/Sidebar/InfoMessage.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/InheritanceLabel.js +2 -0
- package/BaseEditor/defaultConfig/Sidebar/InheritanceLabel.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/SidebarEmptyState.d.ts +4 -0
- package/BaseEditor/defaultConfig/Sidebar/SidebarEmptyState.js +12 -0
- package/BaseEditor/defaultConfig/Sidebar/SidebarEmptyState.js.map +1 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundColor.js +8 -5
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundColor.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundImage.js +11 -9
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundImage.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundPosition.js +7 -4
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundPosition.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundScaling.js +7 -4
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background/BackgroundScaling.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background.js +8 -4
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Background.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/Border.js +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/Border.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderColor.js +7 -4
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderColor.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderRadius.js +11 -14
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderRadius.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderStyle.js +7 -4
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderStyle.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderWidth.js +11 -14
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border/BorderWidth.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border.js +6 -9
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Border.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Layout/Alignment.js +8 -5
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Layout/Alignment.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Layout/LengthWithUnitInput.js +9 -8
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Layout/LengthWithUnitInput.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Layout.js +8 -4
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Layout.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/LinkedEditing.js +1 -5
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/LinkedEditing.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/Margin.js +10 -21
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/Margin.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/MarginPadding.js +2 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/MarginPadding.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/Padding.js +13 -16
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding/Padding.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding.js +6 -9
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/MarginPadding.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Visibility/Visibility.js +21 -7
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/Visibility/Visibility.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/VisibilityGroup.js +4 -3
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/Groups/VisibilityGroup.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/SidebarRow.d.ts +8 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/SidebarRow.js +24 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/SidebarRow.js.map +1 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleAccordion.d.ts +8 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleAccordion.js +11 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleAccordion.js.map +1 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleAccordionItem.d.ts +9 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleAccordionItem.js +45 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleAccordionItem.js.map +1 -0
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleProperties.js +8 -3
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleProperties.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleSettingsGroup.js +8 -7
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StyleSettingsGroup.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StylesStore.js +2 -2
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/StylesStore.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/UnitValuePicker.js +3 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/UnitValuePicker.js.map +1 -1
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/ValueSelector.js +9 -8
- package/BaseEditor/defaultConfig/Sidebar/StyleSettings/ValueSelector.js.map +1 -1
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GridItem.d.ts +5 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GridItem.js +24 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GridItem.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GroupItemsGrid.d.ts +7 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GroupItemsGrid.js +18 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GroupItemsGrid.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GroupItemsList.d.ts +7 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GroupItemsList.js +18 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/GroupItemsList.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/InsertElements.js +72 -36
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/InsertElements.js.map +1 -1
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/InsertElementsTab.js +6 -7
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/InsertElementsTab.js.map +1 -1
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/ListItem.d.ts +5 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/ListItem.js +23 -0
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/ListItem.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/ElementActions.d.ts +4 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/ElementActions.js +29 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/ElementActions.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/LayoutIllustration.d.ts +2 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/LayoutIllustration.js +94 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/LayoutIllustration.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/Navigator.js +12 -111
- package/BaseEditor/defaultConfig/Toolbar/Navigator/Navigator.js.map +1 -1
- package/BaseEditor/defaultConfig/Toolbar/Navigator/NavigatorEmptyState.d.ts +2 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/NavigatorEmptyState.js +20 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/NavigatorEmptyState.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/NavigatorTab.js +6 -7
- package/BaseEditor/defaultConfig/Toolbar/Navigator/NavigatorTab.js.map +1 -1
- package/BaseEditor/defaultConfig/Toolbar/Navigator/Placeholder.d.ts +7 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/Placeholder.js +16 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/Placeholder.js.map +1 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/navigatorUtils.d.ts +32 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/navigatorUtils.js +70 -0
- package/BaseEditor/defaultConfig/Toolbar/Navigator/navigatorUtils.js.map +1 -0
- package/BaseEditor/hooks/useCreateElement.d.ts +1 -1
- package/BaseEditor/hooks/useCreateElement.js +1 -3
- package/BaseEditor/hooks/useCreateElement.js.map +1 -1
- package/ecommerce/EcommerceIntegration.js +1 -1
- package/ecommerce/EcommerceIntegration.js.map +1 -1
- package/ecommerce/components/ResourcePage.d.ts +1 -1
- package/ecommerce/components/ResourcePage.js +1 -1
- package/ecommerce/components/ResourcePage.js.map +1 -1
- package/exports/admin/website-builder/lexical.d.ts +18 -17
- package/exports/admin/website-builder/lexical.js +3 -2
- package/features/ecommerce/apis/useEcommerceApi.js +3 -1
- package/features/ecommerce/apis/useEcommerceApi.js.map +1 -1
- package/inputRenderers/BooleanInput.js +15 -4
- package/inputRenderers/BooleanInput.js.map +1 -1
- package/inputRenderers/FileInput.js.map +1 -1
- package/inputRenderers/LexicalInput/DefaultLexicalConfig.js +4 -1
- package/inputRenderers/LexicalInput/DefaultLexicalConfig.js.map +1 -1
- package/inputRenderers/LexicalInput/ExpandEditorAction.js +4 -1
- package/inputRenderers/LexicalInput/ExpandEditorAction.js.map +1 -1
- package/inputRenderers/LexicalInput/LexicalEditor.d.ts +4 -1
- package/inputRenderers/LexicalInput/LexicalEditor.js +13 -2
- package/inputRenderers/LexicalInput/LexicalEditor.js.map +1 -1
- package/inputRenderers/LexicalInput/LexicalEditorConfig.d.ts +18 -0
- package/inputRenderers/LexicalInput/LexicalEditorConfig.js +5 -1
- package/inputRenderers/LexicalInput/LexicalEditorConfig.js.map +1 -1
- package/inputRenderers/LexicalInput/LexicalInput.js +5 -9
- package/inputRenderers/LexicalInput/LexicalInput.js.map +1 -1
- package/inputRenderers/LexicalInput/wbStaticToolbar.css +1 -1
- package/inputRenderers/TextInput.js +3 -1
- package/inputRenderers/TextInput.js.map +1 -1
- package/modules/pages/PageEditor/PageEditorConfig.d.ts +4 -2
- package/modules/pages/PageEditor/PageSettings/PageSettingsPresenter.js +2 -2
- package/modules/pages/PageEditor/PageSettings/PageSettingsPresenter.js.map +1 -1
- package/package.json +31 -29
- package/BaseEditor/components/DragPreview.js +0 -59
- package/BaseEditor/components/DragPreview.js.map +0 -1
- package/ecommerce/components/adaptInputToBind.d.ts +0 -6
- package/ecommerce/components/adaptInputToBind.js +0 -26
- package/ecommerce/components/adaptInputToBind.js.map +0 -1
- /package/BaseEditor/components/{DragPreview.d.ts → DragPreview/DragPreview.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecommerce/components/ResourcePage.js","sources":["../../../src/ecommerce/components/ResourcePage.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Skeleton } from \"@webiny/admin-ui\";\nimport type { IFormModel, IFieldVM } from \"@webiny/app-admin\";\nimport type { IPageType } from \"~/presentation/pages/CreatePage/abstractions.js\";\nimport type { CreatePageParams } from \"~/features/pages/createPage/abstractions.js\";\nimport type { IEcommerceApiProvider } from \"~/features/index.js\";\nimport type { Resource } from \"../types.js\";\nimport { ResourcesPickerButton } from \"./ResourcesPicker.js\";\nimport { toTitleCaseLabel } from \"./toTitleCaseLabel.js\";\nimport { useEcommerceApi } from \"~/features/index.js\";\n\n// ---------------------------------------------------------------------------\n// ResourcePicker field renderer\n// ---------------------------------------------------------------------------\n\ndeclare module \"@webiny/app-admin/features/formModel/abstractions.js\" {\n interface IFieldRendererRegistry {\n
|
|
1
|
+
{"version":3,"file":"ecommerce/components/ResourcePage.js","sources":["../../../src/ecommerce/components/ResourcePage.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Skeleton } from \"@webiny/admin-ui\";\nimport type { IFormModel, IFieldVM } from \"@webiny/app-admin\";\nimport type { IPageType } from \"~/presentation/pages/CreatePage/abstractions.js\";\nimport type { CreatePageParams } from \"~/features/pages/createPage/abstractions.js\";\nimport type { IEcommerceApiProvider } from \"~/features/index.js\";\nimport type { Resource } from \"../types.js\";\nimport { ResourcesPickerButton } from \"./ResourcesPicker.js\";\nimport { toTitleCaseLabel } from \"./toTitleCaseLabel.js\";\nimport { useEcommerceApi } from \"~/features/index.js\";\n\n// ---------------------------------------------------------------------------\n// ResourcePicker field renderer\n// ---------------------------------------------------------------------------\n\ndeclare module \"@webiny/app-admin/features/formModel/abstractions.js\" {\n interface IFieldRendererRegistry {\n [key: `resource-picker:${string}`]: { fieldType: \"text\"; settings?: { rows?: number } };\n }\n}\n\ninterface ResourcePickerRendererConfig {\n pluginName: string;\n resourceType: string;\n}\n\nexport function createResourcePickerRenderer(config: ResourcePickerRendererConfig) {\n return observer(function ResourcePickerField({ field }: { field: IFieldVM }) {\n const { api } = useEcommerceApi(config.pluginName);\n\n if (!api) {\n return <Skeleton />;\n }\n\n return (\n <div className={\"border-sm rounded-md border-neutral-muted p-sm\"}>\n <ResourcesPickerButton\n api={api}\n resourceName={config.resourceType}\n pluginName={config.pluginName}\n value={field.value as string}\n onChange={value => field.onChange(value)}\n />\n </div>\n );\n });\n}\n\n// ---------------------------------------------------------------------------\n// EcommerceResourcePageType — IPageType implementation\n// ---------------------------------------------------------------------------\n\nexport interface EcommerceResourcePageTypeConfig {\n name: string;\n label: string;\n resourceType: string;\n previewPath: (resource: Resource) => string;\n apiName: string;\n}\n\nexport class EcommerceResourcePageType implements IPageType {\n readonly name: string;\n readonly label: string;\n\n constructor(\n private config: EcommerceResourcePageTypeConfig,\n private provider: IEcommerceApiProvider\n ) {\n this.name = config.name;\n this.label = config.label;\n }\n\n modifyForm(form: IFormModel): void {\n form.fields(fields => ({\n resourceId: fields\n .text()\n .label(toTitleCaseLabel(this.config.resourceType))\n .required()\n .renderer(`resource-picker:${this.config.apiName}`)\n .afterChange((value, f) => {\n if (!value) {\n return;\n }\n void this.onResourceSelected(String(value), f);\n })\n }));\n\n form.field(\"title\").setDisabled(true);\n form.field(\"path\").setDisabled(true);\n\n form.layout(layout => [layout.row(\"resourceId\").before(\"title\")]);\n }\n\n mapFromForm(data: Record<string, unknown>, input: CreatePageParams): void {\n input.metadata = input.metadata ?? {};\n input.metadata.resourceId = data.resourceId;\n }\n\n private async onResourceSelected(resourceId: string, form: IFormModel): Promise<void> {\n const api = await this.provider.getApi(this.config.apiName);\n if (!api) {\n return;\n }\n\n const resource = await api[this.config.resourceType].findById(resourceId);\n form.field(\"title\").setValue(resource.title);\n form.field(\"title\").setDisabled(false);\n form.field(\"path\").setValue(this.config.previewPath(resource));\n form.field(\"path\").setDisabled(false);\n }\n}\n"],"names":["createResourcePickerRenderer","config","observer","field","api","useEcommerceApi","Skeleton","ResourcesPickerButton","value","EcommerceResourcePageType","provider","form","fields","toTitleCaseLabel","f","String","layout","data","input","resourceId","resource"],"mappings":";;;;;;AA2BO,SAASA,6BAA6BC,MAAoC;IAC7E,OAAOC,SAAS,SAA6B,EAAEC,KAAK,EAAuB;QACvE,MAAM,EAAEC,GAAG,EAAE,GAAGC,gBAAgBJ,OAAO,UAAU;QAEjD,IAAI,CAACG,KACD,OAAO,WAAP,GAAO,oBAACE,UAAQA;QAGpB,OAAO,WAAP,GACI,oBAAC;YAAI,WAAW;yBACZ,oBAACC,uBAAqBA;YAClB,KAAKH;YACL,cAAcH,OAAO,YAAY;YACjC,YAAYA,OAAO,UAAU;YAC7B,OAAOE,MAAM,KAAK;YAClB,UAAUK,CAAAA,QAASL,MAAM,QAAQ,CAACK;;IAIlD;AACJ;AAcO,MAAMC;IAIT,YACYR,MAAuC,EACvCS,QAA+B,CACzC;aAFUT,MAAM,GAANA;aACAS,QAAQ,GAARA;QAER,IAAI,CAAC,IAAI,GAAGT,OAAO,IAAI;QACvB,IAAI,CAAC,KAAK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 -1,17 +1,18 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export
|
|
1
|
+
export { LexicalEditorConfig } from "../../../inputRenderers/LexicalInput/LexicalEditorConfig.js";
|
|
2
|
+
export { LexicalEditor } from "../../../inputRenderers/LexicalInput/LexicalEditor.js";
|
|
3
|
+
export type { LexicalEditorProps } from "../../../inputRenderers/LexicalInput/LexicalEditor.js";
|
|
4
|
+
export { useLexicalEditorConfig } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
5
|
+
export { LexicalHtmlRenderer } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
6
|
+
export { getNodeFromSelection } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
7
|
+
export { useCurrentElement } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
8
|
+
export { useCurrentSelection } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
9
|
+
export { useDeriveValueFromSelection } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
10
|
+
export { useRichTextEditor } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
11
|
+
export { useFontColorPicker } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
12
|
+
export { useTextAlignmentAction } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
13
|
+
export { useTypographyAction } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
14
|
+
export { useIsMounted } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
15
|
+
export { Divider } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
16
|
+
export { DropDownItem } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
17
|
+
export { DropDown } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
18
|
+
export type { Klass, LexicalNode } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { LexicalEditorConfig } from "../../../inputRenderers/LexicalInput/LexicalEditorConfig.js";
|
|
2
|
+
export { LexicalEditor } from "../../../inputRenderers/LexicalInput/LexicalEditor.js";
|
|
3
|
+
export { Divider, DropDown, DropDownItem, LexicalHtmlRenderer, getNodeFromSelection, useCurrentElement, useCurrentSelection, useDeriveValueFromSelection, useFontColorPicker, useIsMounted, useLexicalEditorConfig, useRichTextEditor, useTextAlignmentAction, useTypographyAction } from "@webiny/lexical-editor/exports/admin/ui/lexical.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/ecommerce/apis/useEcommerceApi.js","sources":["../../../../src/features/ecommerce/apis/useEcommerceApi.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { Button, useToast } from \"@webiny/admin-ui\";\nimport { useEcommerceApiProvider } from \"~/features/index.js\";\nimport type { IEcommerceApi } from \"~/ecommerce/index.js\";\nimport { useIntegrationsDialog } from \"~/modules/integrations/useIntegrationsDialog.js\";\n\nconst warningShown = new Set<string>();\n\nexport const useEcommerceApi = (pluginName: string) => {\n const { showIntegrationsDialog } = useIntegrationsDialog();\n const { showWarningToast, hideToast } = useToast();\n const provider = useEcommerceApiProvider();\n const [api, setApi] = useState<IEcommerceApi | undefined>(undefined);\n\n useEffect(() => {\n provider\n .getApi(pluginName)\n .then(api => {\n setApi(api);\n })\n .catch(error => {\n if (warningShown.has(pluginName)) {\n return;\n }\n\n warningShown.add(pluginName);\n const id = showWarningToast({\n title: \"Integration not configured!\",\n description: error.message,\n actions: (\n <Button\n variant=\"primary\"\n text={\"Configure now!\"}\n onClick={() => {\n showIntegrationsDialog();\n hideToast(id);\n }}\n />\n )\n });\n });\n }, []);\n\n return { api };\n};\n"],"names":["warningShown","Set","useEcommerceApi","pluginName","showIntegrationsDialog","useIntegrationsDialog","showWarningToast","hideToast","useToast","provider","useEcommerceApiProvider","api","setApi","useState","undefined","useEffect","error","id","Button"],"mappings":";;;;AAMA,MAAMA,eAAe,IAAIC;AAElB,MAAMC,kBAAkB,CAACC;IAC5B,MAAM,EAAEC,sBAAsB,EAAE,GAAGC;IACnC,MAAM,EAAEC,gBAAgB,EAAEC,SAAS,EAAE,GAAGC;IACxC,MAAMC,WAAWC;IACjB,MAAM,CAACC,KAAKC,OAAO,GAAGC,SAAoCC;IAE1DC,UAAU;QACNN,SACK,MAAM,CAACN,YACP,IAAI,CAACQ,CAAAA;YACFC,OAAOD;QACX,GACC,KAAK,CAACK,CAAAA;YACH,IAAIhB,aAAa,GAAG,CAACG,aACjB;YAGJH,aAAa,GAAG,CAACG;YACjB,MAAMc,KAAKX,iBAAiB;gBACxB,OAAO;gBACP,aAAaU,MAAM,OAAO;gBAC1B,SAAS,WAAT,GACI,oBAACE,QAAMA;oBACH,SAAQ;oBACR,MAAM;oBACN,SAAS;wBACLd;wBACAG,UAAUU;oBACd;;YAGZ;QACJ;IACR,GAAG
|
|
1
|
+
{"version":3,"file":"features/ecommerce/apis/useEcommerceApi.js","sources":["../../../../src/features/ecommerce/apis/useEcommerceApi.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { Button, useToast } from \"@webiny/admin-ui\";\nimport { useEcommerceApiProvider } from \"~/features/index.js\";\nimport type { IEcommerceApi } from \"~/ecommerce/index.js\";\nimport { useIntegrationsDialog } from \"~/modules/integrations/useIntegrationsDialog.js\";\n\nconst warningShown = new Set<string>();\n\nexport const useEcommerceApi = (pluginName: string) => {\n const { showIntegrationsDialog } = useIntegrationsDialog();\n const { showWarningToast, hideToast } = useToast();\n const provider = useEcommerceApiProvider();\n const [api, setApi] = useState<IEcommerceApi | undefined>(undefined);\n\n useEffect(() => {\n provider\n .getApi(pluginName)\n .then(api => {\n setApi(api);\n })\n .catch(error => {\n if (warningShown.has(pluginName)) {\n return;\n }\n\n warningShown.add(pluginName);\n const id = showWarningToast({\n title: \"Integration not configured!\",\n description: error.message,\n actions: (\n <Button\n variant=\"primary\"\n text={\"Configure now!\"}\n onClick={() => {\n showIntegrationsDialog();\n hideToast(id);\n }}\n />\n )\n });\n });\n }, [pluginName]);\n\n return { api };\n};\n"],"names":["warningShown","Set","useEcommerceApi","pluginName","showIntegrationsDialog","useIntegrationsDialog","showWarningToast","hideToast","useToast","provider","useEcommerceApiProvider","api","setApi","useState","undefined","useEffect","error","id","Button"],"mappings":";;;;AAMA,MAAMA,eAAe,IAAIC;AAElB,MAAMC,kBAAkB,CAACC;IAC5B,MAAM,EAAEC,sBAAsB,EAAE,GAAGC;IACnC,MAAM,EAAEC,gBAAgB,EAAEC,SAAS,EAAE,GAAGC;IACxC,MAAMC,WAAWC;IACjB,MAAM,CAACC,KAAKC,OAAO,GAAGC,SAAoCC;IAE1DC,UAAU;QACNN,SACK,MAAM,CAACN,YACP,IAAI,CAACQ,CAAAA;YACFC,OAAOD;QACX,GACC,KAAK,CAACK,CAAAA;YACH,IAAIhB,aAAa,GAAG,CAACG,aACjB;YAGJH,aAAa,GAAG,CAACG;YACjB,MAAMc,KAAKX,iBAAiB;gBACxB,OAAO;gBACP,aAAaU,MAAM,OAAO;gBAC1B,SAAS,WAAT,GACI,oBAACE,QAAMA;oBACH,SAAQ;oBACR,MAAM;oBACN,SAAS;wBACLd;wBACAG,UAAUU;oBACd;;YAGZ;QACJ;IACR,GAAG;QAACd;KAAW;IAEf,OAAO;QAAEQ;IAAI;AACjB"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { SegmentedControl } from "@webiny/admin-ui";
|
|
3
|
+
const ITEMS = [
|
|
4
|
+
{
|
|
5
|
+
label: "Off",
|
|
6
|
+
value: "false"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
label: "On",
|
|
10
|
+
value: "true"
|
|
11
|
+
}
|
|
12
|
+
];
|
|
3
13
|
const BooleanInputRenderer = ({ value, onChange, input, label })=>{
|
|
4
14
|
const { description, helperText } = input;
|
|
5
|
-
return /*#__PURE__*/ react.createElement(
|
|
15
|
+
return /*#__PURE__*/ react.createElement(SegmentedControl, {
|
|
6
16
|
label: label,
|
|
7
17
|
note: helperText,
|
|
8
18
|
description: description,
|
|
9
|
-
|
|
19
|
+
items: ITEMS,
|
|
20
|
+
value: String(value),
|
|
10
21
|
onChange: (newValue)=>{
|
|
11
22
|
onChange(({ value })=>{
|
|
12
|
-
value.set(newValue);
|
|
23
|
+
value.set("true" === newValue);
|
|
13
24
|
});
|
|
14
25
|
}
|
|
15
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/BooleanInput.js","sources":["../../src/inputRenderers/BooleanInput.tsx"],"sourcesContent":["import React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"inputRenderers/BooleanInput.js","sources":["../../src/inputRenderers/BooleanInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { SegmentedControl } from \"@webiny/admin-ui\";\nimport type { ElementInputRendererProps } from \"~/BaseEditor/index.js\";\n\nconst ITEMS = [\n { label: \"Off\", value: \"false\" },\n { label: \"On\", value: \"true\" }\n];\n\nexport const BooleanInputRenderer = ({\n value,\n onChange,\n input,\n label\n}: ElementInputRendererProps) => {\n const { description, helperText } = input;\n return (\n <SegmentedControl\n label={label}\n note={helperText}\n description={description}\n items={ITEMS}\n value={String(value)}\n onChange={newValue => {\n onChange(({ value }) => {\n value.set(newValue === \"true\");\n });\n }}\n />\n );\n};\n"],"names":["ITEMS","BooleanInputRenderer","value","onChange","input","label","description","helperText","SegmentedControl","String","newValue"],"mappings":";;AAIA,MAAMA,QAAQ;IACV;QAAE,OAAO;QAAO,OAAO;IAAQ;IAC/B;QAAE,OAAO;QAAM,OAAO;IAAO;CAChC;AAEM,MAAMC,uBAAuB,CAAC,EACjCC,KAAK,EACLC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACmB;IACxB,MAAM,EAAEC,WAAW,EAAEC,UAAU,EAAE,GAAGH;IACpC,OAAO,WAAP,GACI,oBAACI,kBAAgBA;QACb,OAAOH;QACP,MAAME;QACN,aAAaD;QACb,OAAON;QACP,OAAOS,OAAOP;QACd,UAAUQ,CAAAA;YACNP,SAAS,CAAC,EAAED,KAAK,EAAE;gBACfA,MAAM,GAAG,CAACQ,AAAa,WAAbA;YACd;QACJ;;AAGZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/FileInput.js","sources":["../../src/inputRenderers/FileInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { FilePicker } from \"@webiny/admin-ui\";\nimport type { ElementInputRendererProps } from \"~/BaseEditor/index.js\";\nimport { FileManager, type FileManagerFileItem } from \"@webiny/app-admin\";\nimport { useBreakpoint } from \"~/BaseEditor/hooks/useBreakpoint.js\";\nimport type { FileInput } from \"@webiny/website-builder-sdk\";\nimport { fileManagerItemToValue } from \"~/shared/fileManagerItemToValue.js\";\n\nexport const FileInputRenderer = ({\n value,\n onChange,\n label,\n ...props\n}: ElementInputRendererProps) => {\n const input = props.input as FileInput;\n const { isBaseBreakpoint } = useBreakpoint();\n const onFileChange = (file: FileManagerFileItem) => {\n onChange(({ value }) => {\n const newValue = fileManagerItemToValue(file);\n value.set(newValue);\n });\n };\n\n const onRemove = () => {\n onChange(({ value }) => {\n if (isBaseBreakpoint) {\n value.set(undefined);\n } else {\n value.set(null);\n }\n });\n };\n\n return (\n <FileManager\n accept={input.allowedFileTypes}\n onChange={onFileChange}\n render={({ showFileManager }) => (\n <FilePicker\n label={label}\n description={input.description}\n type=\"compact\"\n value={value}\n onSelectItem={() => showFileManager()}\n onRemoveItem={onRemove}\n onEditItem={() => showFileManager()}\n />\n )}\n />\n );\n};\n"],"names":["FileInputRenderer","value","onChange","label","props","input","isBaseBreakpoint","useBreakpoint","onFileChange","file","newValue","fileManagerItemToValue","onRemove","undefined","FileManager","showFileManager","FilePicker"],"mappings":";;;;;AAQO,MAAMA,oBAAoB,CAAC,EAC9BC,KAAK,EACLC,QAAQ,EACRC,KAAK,EACL,GAAGC,OACqB;IACxB,MAAMC,QAAQD,MAAM,KAAK;IACzB,MAAM,EAAEE,gBAAgB,EAAE,GAAGC;
|
|
1
|
+
{"version":3,"file":"inputRenderers/FileInput.js","sources":["../../src/inputRenderers/FileInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { FilePicker } from \"@webiny/admin-ui\";\nimport type { ElementInputRendererProps } from \"~/BaseEditor/index.js\";\nimport { FileManager, type FileManagerFileItem } from \"@webiny/app-admin\";\nimport { useBreakpoint } from \"~/BaseEditor/hooks/useBreakpoint.js\";\nimport type { FileInput } from \"@webiny/website-builder-sdk\";\nimport { fileManagerItemToValue } from \"~/shared/fileManagerItemToValue.js\";\n\nexport const FileInputRenderer = ({\n value,\n onChange,\n label,\n ...props\n}: ElementInputRendererProps) => {\n const input = props.input as FileInput;\n const { isBaseBreakpoint } = useBreakpoint();\n\n const onFileChange = (file: FileManagerFileItem) => {\n onChange(({ value }) => {\n const newValue = fileManagerItemToValue(file);\n value.set(newValue);\n });\n };\n\n const onRemove = () => {\n onChange(({ value }) => {\n if (isBaseBreakpoint) {\n value.set(undefined);\n } else {\n value.set(null);\n }\n });\n };\n\n return (\n <FileManager\n accept={input.allowedFileTypes}\n onChange={onFileChange}\n render={({ showFileManager }) => (\n <FilePicker\n label={label}\n description={input.description}\n type=\"compact\"\n value={value}\n onSelectItem={() => showFileManager()}\n onRemoveItem={onRemove}\n onEditItem={() => showFileManager()}\n />\n )}\n />\n );\n};\n"],"names":["FileInputRenderer","value","onChange","label","props","input","isBaseBreakpoint","useBreakpoint","onFileChange","file","newValue","fileManagerItemToValue","onRemove","undefined","FileManager","showFileManager","FilePicker"],"mappings":";;;;;AAQO,MAAMA,oBAAoB,CAAC,EAC9BC,KAAK,EACLC,QAAQ,EACRC,KAAK,EACL,GAAGC,OACqB;IACxB,MAAMC,QAAQD,MAAM,KAAK;IACzB,MAAM,EAAEE,gBAAgB,EAAE,GAAGC;IAE7B,MAAMC,eAAe,CAACC;QAClBP,SAAS,CAAC,EAAED,KAAK,EAAE;YACf,MAAMS,WAAWC,uBAAuBF;YACxCR,MAAM,GAAG,CAACS;QACd;IACJ;IAEA,MAAME,WAAW;QACbV,SAAS,CAAC,EAAED,KAAK,EAAE;YACf,IAAIK,kBACAL,MAAM,GAAG,CAACY;iBAEVZ,MAAM,GAAG,CAAC;QAElB;IACJ;IAEA,OAAO,WAAP,GACI,oBAACa,aAAWA;QACR,QAAQT,MAAM,gBAAgB;QAC9B,UAAUG;QACV,QAAQ,CAAC,EAAEO,eAAe,EAAE,iBACxB,oBAACC,YAAUA;gBACP,OAAOb;gBACP,aAAaE,MAAM,WAAW;gBAC9B,MAAK;gBACL,OAAOJ;gBACP,cAAc,IAAMc;gBACpB,cAAcH;gBACd,YAAY,IAAMG;;;AAKtC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import { BoldAction, BulletListAction, CodeHighlightAction, Divider, FloatingLinkEditorPlugin, FontColorAction, FontColorPlugin, ItalicAction, LexicalEditorConfig, LinkAction, LinkPlugin, ListPlugin, NumberedListAction, QuoteAction, QuotePlugin, TextAlignmentAction, TypographyAction, TypographyPlugin, UnderlineAction } from "@webiny/lexical-editor";
|
|
2
|
+
import { BoldAction, BulletListAction, CodeHighlightAction, Divider, FloatingLinkEditorPlugin, FontColorAction, FontColorPlugin, FontSizeAction, ItalicAction, LexicalEditorConfig, LinkAction, LinkPlugin, ListPlugin, NumberedListAction, QuoteAction, QuotePlugin, TextAlignmentAction, TypographyAction, TypographyPlugin, UnderlineAction } from "@webiny/lexical-editor";
|
|
3
3
|
import { CompositionScope, LexicalLinkForm } from "@webiny/app-admin";
|
|
4
4
|
import { TypographyDropDown } from "./TypographyDropDown.js";
|
|
5
5
|
import { ExpandEditorAction } from "./ExpandEditorAction.js";
|
|
@@ -50,6 +50,9 @@ const DefaultLexicalConfig = ()=>/*#__PURE__*/ react.createElement(react.Fragmen
|
|
|
50
50
|
element: /*#__PURE__*/ react.createElement(FloatingLinkEditorPlugin, {
|
|
51
51
|
LinkForm: LexicalLinkForm
|
|
52
52
|
})
|
|
53
|
+
}), /*#__PURE__*/ react.createElement(ToolbarElement, {
|
|
54
|
+
name: "fontSize",
|
|
55
|
+
element: /*#__PURE__*/ react.createElement(FontSizeAction, null)
|
|
53
56
|
}), /*#__PURE__*/ react.createElement(ToolbarElement, {
|
|
54
57
|
name: "fontColor",
|
|
55
58
|
element: /*#__PURE__*/ react.createElement(FontColorAction, null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/LexicalInput/DefaultLexicalConfig.js","sources":["../../../src/inputRenderers/LexicalInput/DefaultLexicalConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n TypographyAction,\n FontColorAction,\n Divider,\n BoldAction,\n ItalicAction,\n UnderlineAction,\n CodeHighlightAction,\n NumberedListAction,\n BulletListAction,\n LinkAction,\n QuoteAction,\n QuotePlugin,\n FloatingLinkEditorPlugin,\n LinkPlugin,\n ListPlugin,\n TypographyPlugin,\n FontColorPlugin,\n TextAlignmentAction\n} from \"@webiny/lexical-editor\";\nimport { CompositionScope } from \"@webiny/app-admin\";\nimport { LexicalLinkForm } from \"@webiny/app-admin\";\nimport { LexicalEditorConfig } from \"@webiny/lexical-editor\";\nimport { TypographyDropDown } from \"./TypographyDropDown.js\";\nimport { ExpandEditorAction } from \"./ExpandEditorAction.js\";\n\nconst { ToolbarElement, Plugin } = LexicalEditorConfig;\n\nconst sharedPlugins = (\n <>\n <Plugin name={\"fontColor\"} element={<FontColorPlugin />} />\n <Plugin name={\"list\"} element={<ListPlugin />} />\n <Plugin name={\"typography\"} element={<TypographyPlugin />} />\n <Plugin name={\"link\"} element={<LinkPlugin />} />\n <Plugin name={\"quote\"} element={<QuotePlugin />} />\n </>\n);\n\nexport const DefaultLexicalConfig = () => {\n return (\n <>\n <CompositionScope name={\"compact\"}>\n <LexicalEditorConfig priority={\"primary\"}>\n {sharedPlugins}\n <ToolbarElement name=\"textAlignment\" element={<TextAlignmentAction />} />\n <ToolbarElement name=\"boldAction\" element={<BoldAction />} />\n <ToolbarElement name=\"italic\" element={<ItalicAction />} />\n <ToolbarElement name=\"underline\" element={<UnderlineAction />} />\n <ToolbarElement name=\"expand\" element={<ExpandEditorAction />} />\n </LexicalEditorConfig>\n </CompositionScope>\n <CompositionScope name={\"expanded\"}>\n <TypographyAction.TypographyDropDown element={<TypographyDropDown />} />\n <LexicalEditorConfig priority={\"primary\"}>\n {sharedPlugins}\n <Plugin\n name={\"floatingLinkEditor\"}\n element={<FloatingLinkEditorPlugin LinkForm={LexicalLinkForm} />}\n />\n <ToolbarElement name=\"fontColor\" element={<FontColorAction />} />\n <ToolbarElement name=\"typography\" element={<TypographyAction />} />\n <ToolbarElement name=\"textAlignment\" element={<TextAlignmentAction />} />\n <ToolbarElement name=\"divider1\" element={<Divider />} />\n <ToolbarElement name=\"boldAction\" element={<BoldAction />} />\n <ToolbarElement name=\"italic\" element={<ItalicAction />} />\n <ToolbarElement name=\"underline\" element={<UnderlineAction />} />\n <ToolbarElement name=\"codeHighlight\" element={<CodeHighlightAction />} />\n <ToolbarElement name=\"divider2\" element={<Divider />} />\n <ToolbarElement name=\"numberedList\" element={<NumberedListAction />} />\n <ToolbarElement name=\"bulletList\" element={<BulletListAction />} />\n <ToolbarElement name=\"divider2\" element={<Divider />} />\n <ToolbarElement name=\"link\" element={<LinkAction />} />\n <ToolbarElement name=\"quote\" element={<QuoteAction />} />\n </LexicalEditorConfig>\n </CompositionScope>\n </>\n );\n};\n"],"names":["ToolbarElement","Plugin","LexicalEditorConfig","sharedPlugins","FontColorPlugin","ListPlugin","TypographyPlugin","LinkPlugin","QuotePlugin","DefaultLexicalConfig","CompositionScope","TextAlignmentAction","BoldAction","ItalicAction","UnderlineAction","ExpandEditorAction","TypographyAction","TypographyDropDown","FloatingLinkEditorPlugin","LexicalLinkForm","FontColorAction","Divider","CodeHighlightAction","NumberedListAction","BulletListAction","LinkAction","QuoteAction"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"inputRenderers/LexicalInput/DefaultLexicalConfig.js","sources":["../../../src/inputRenderers/LexicalInput/DefaultLexicalConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n TypographyAction,\n FontColorAction,\n Divider,\n BoldAction,\n ItalicAction,\n UnderlineAction,\n CodeHighlightAction,\n NumberedListAction,\n BulletListAction,\n LinkAction,\n QuoteAction,\n QuotePlugin,\n FloatingLinkEditorPlugin,\n LinkPlugin,\n ListPlugin,\n TypographyPlugin,\n FontColorPlugin,\n TextAlignmentAction\n} from \"@webiny/lexical-editor\";\nimport { CompositionScope } from \"@webiny/app-admin\";\nimport { LexicalLinkForm } from \"@webiny/app-admin\";\nimport { LexicalEditorConfig } from \"@webiny/lexical-editor\";\nimport { TypographyDropDown } from \"./TypographyDropDown.js\";\nimport { ExpandEditorAction } from \"./ExpandEditorAction.js\";\nimport { FontSizeAction } from \"@webiny/lexical-editor\";\n\nconst { ToolbarElement, Plugin } = LexicalEditorConfig;\n\nconst sharedPlugins = (\n <>\n <Plugin name={\"fontColor\"} element={<FontColorPlugin />} />\n <Plugin name={\"list\"} element={<ListPlugin />} />\n <Plugin name={\"typography\"} element={<TypographyPlugin />} />\n <Plugin name={\"link\"} element={<LinkPlugin />} />\n <Plugin name={\"quote\"} element={<QuotePlugin />} />\n </>\n);\n\nexport const DefaultLexicalConfig = () => {\n return (\n <>\n <CompositionScope name={\"compact\"}>\n <LexicalEditorConfig priority={\"primary\"}>\n {sharedPlugins}\n <ToolbarElement name=\"textAlignment\" element={<TextAlignmentAction />} />\n <ToolbarElement name=\"boldAction\" element={<BoldAction />} />\n <ToolbarElement name=\"italic\" element={<ItalicAction />} />\n <ToolbarElement name=\"underline\" element={<UnderlineAction />} />\n <ToolbarElement name=\"expand\" element={<ExpandEditorAction />} />\n </LexicalEditorConfig>\n </CompositionScope>\n <CompositionScope name={\"expanded\"}>\n <TypographyAction.TypographyDropDown element={<TypographyDropDown />} />\n <LexicalEditorConfig priority={\"primary\"}>\n {sharedPlugins}\n <Plugin\n name={\"floatingLinkEditor\"}\n element={<FloatingLinkEditorPlugin LinkForm={LexicalLinkForm} />}\n />\n <ToolbarElement name=\"fontSize\" element={<FontSizeAction />} />\n <ToolbarElement name=\"fontColor\" element={<FontColorAction />} />\n <ToolbarElement name=\"typography\" element={<TypographyAction />} />\n <ToolbarElement name=\"textAlignment\" element={<TextAlignmentAction />} />\n <ToolbarElement name=\"divider1\" element={<Divider />} />\n <ToolbarElement name=\"boldAction\" element={<BoldAction />} />\n <ToolbarElement name=\"italic\" element={<ItalicAction />} />\n <ToolbarElement name=\"underline\" element={<UnderlineAction />} />\n <ToolbarElement name=\"codeHighlight\" element={<CodeHighlightAction />} />\n <ToolbarElement name=\"divider2\" element={<Divider />} />\n <ToolbarElement name=\"numberedList\" element={<NumberedListAction />} />\n <ToolbarElement name=\"bulletList\" element={<BulletListAction />} />\n <ToolbarElement name=\"divider2\" element={<Divider />} />\n <ToolbarElement name=\"link\" element={<LinkAction />} />\n <ToolbarElement name=\"quote\" element={<QuoteAction />} />\n </LexicalEditorConfig>\n </CompositionScope>\n </>\n );\n};\n"],"names":["ToolbarElement","Plugin","LexicalEditorConfig","sharedPlugins","FontColorPlugin","ListPlugin","TypographyPlugin","LinkPlugin","QuotePlugin","DefaultLexicalConfig","CompositionScope","TextAlignmentAction","BoldAction","ItalicAction","UnderlineAction","ExpandEditorAction","TypographyAction","TypographyDropDown","FloatingLinkEditorPlugin","LexicalLinkForm","FontSizeAction","FontColorAction","Divider","CodeHighlightAction","NumberedListAction","BulletListAction","LinkAction","QuoteAction"],"mappings":";;;;;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BAAeA;sBAC1D,oBAACrB,gBAAcA;QAAC,MAAK;QAAa,uBAAS,oBAACgB,kBAAgBA;sBAC5D,oBAAChB,gBAAcA;QAAC,MAAK;QAAgB,uBAAS,oBAACW,qBAAmBA;sBAClE,oBAACX,gBAAcA;QAAC,MAAK;QAAW,uBAAS,oBAACsB,SAAOA;sBACjD,oBAACtB,gBAAcA;QAAC,MAAK;QAAa,uBAAS,oBAACY,YAAUA;sBACtD,oBAACZ,gBAAcA;QAAC,MAAK;QAAS,uBAAS,oBAACa,cAAYA;sBACpD,oBAACb,gBAAcA;QAAC,MAAK;QAAY,uBAAS,oBAACc,iBAAeA;sBAC1D,oBAACd,gBAAcA;QAAC,MAAK;QAAgB,uBAAS,oBAACuB,qBAAmBA;sBAClE,oBAACvB,gBAAcA;QAAC,MAAK;QAAW,uBAAS,oBAACsB,SAAOA;sBACjD,oBAACtB,gBAAcA;QAAC,MAAK;QAAe,uBAAS,oBAACwB,oBAAkBA;sBAChE,oBAACxB,gBAAcA;QAAC,MAAK;QAAa,uBAAS,oBAACyB,kBAAgBA;sBAC5D,oBAACzB,gBAAcA;QAAC,MAAK;QAAW,uBAAS,oBAACsB,SAAOA;sBACjD,oBAACtB,gBAAcA;QAAC,MAAK;QAAO,uBAAS,oBAAC0B,YAAUA;sBAChD,oBAAC1B,gBAAcA;QAAC,MAAK;QAAQ,uBAAS,oBAAC2B,aAAWA"}
|
|
@@ -4,7 +4,10 @@ const ExpandEditorAction = ()=>{
|
|
|
4
4
|
const { setExpanded } = useExpandedEditor();
|
|
5
5
|
return /*#__PURE__*/ react.createElement("button", {
|
|
6
6
|
onClick: ()=>setExpanded((expanded)=>!expanded),
|
|
7
|
-
className: "popup-item absolute
|
|
7
|
+
className: "popup-item absolute z-1",
|
|
8
|
+
style: {
|
|
9
|
+
right: 5
|
|
10
|
+
},
|
|
8
11
|
"aria-label": "Expand editor"
|
|
9
12
|
}, /*#__PURE__*/ react.createElement("i", {
|
|
10
13
|
className: "format expand"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/LexicalInput/ExpandEditorAction.js","sources":["../../../src/inputRenderers/LexicalInput/ExpandEditorAction.tsx"],"sourcesContent":["import React from \"react\";\nimport { useExpandedEditor } from \"./ExpandedEditor.js\";\n\nexport const ExpandEditorAction = () => {\n const { setExpanded } = useExpandedEditor();\n\n return (\n <button\n onClick={() => setExpanded(expanded => !expanded)}\n className={\"popup-item absolute
|
|
1
|
+
{"version":3,"file":"inputRenderers/LexicalInput/ExpandEditorAction.js","sources":["../../../src/inputRenderers/LexicalInput/ExpandEditorAction.tsx"],"sourcesContent":["import React from \"react\";\nimport { useExpandedEditor } from \"./ExpandedEditor.js\";\n\nexport const ExpandEditorAction = () => {\n const { setExpanded } = useExpandedEditor();\n\n return (\n <button\n onClick={() => setExpanded(expanded => !expanded)}\n className={\"popup-item absolute z-1\"}\n style={{ right: 5 }}\n aria-label=\"Expand editor\"\n >\n <i className=\"format expand\" />\n </button>\n );\n};\n"],"names":["ExpandEditorAction","setExpanded","useExpandedEditor","expanded"],"mappings":";;AAGO,MAAMA,qBAAqB;IAC9B,MAAM,EAAEC,WAAW,EAAE,GAAGC;IAExB,OAAO,WAAP,GACI,oBAAC;QACG,SAAS,IAAMD,YAAYE,CAAAA,WAAY,CAACA;QACxC,WAAW;QACX,OAAO;YAAE,OAAO;QAAE;QAClB,cAAW;qBAEX,oBAAC;QAAE,WAAU;;AAGzB"}
|
|
@@ -2,4 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { LexicalEditor as BaseLexicalEditor } from "@webiny/app-admin";
|
|
3
3
|
import "./wbStaticToolbar.css";
|
|
4
4
|
export type LexicalEditorProps = Omit<React.ComponentProps<typeof BaseLexicalEditor>, "theme">;
|
|
5
|
-
export declare const LexicalEditor:
|
|
5
|
+
export declare const LexicalEditor: {
|
|
6
|
+
Expanded: (props: LexicalEditorProps) => React.JSX.Element;
|
|
7
|
+
Compact: (props: LexicalEditorProps) => React.JSX.Element;
|
|
8
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import { LexicalEditor } from "@webiny/app-admin";
|
|
2
|
+
import { CompositionScope, LexicalEditor } from "@webiny/app-admin";
|
|
3
3
|
import { StaticToolbar } from "@webiny/lexical-editor";
|
|
4
4
|
import { createLexicalTokens } from "@webiny/lexical-theme/createLexicalEditorTokens.js";
|
|
5
5
|
import { useWebsiteBuilderTheme } from "../../BaseEditor/components/index.js";
|
|
@@ -23,11 +23,12 @@ const styles = {
|
|
|
23
23
|
fontFamily: "var(--wb-theme-font-family)"
|
|
24
24
|
};
|
|
25
25
|
const lexicalTokens = createLexicalTokens("wb-lx-");
|
|
26
|
-
const
|
|
26
|
+
const LexicalEditorComponent = (props)=>{
|
|
27
27
|
const { theme } = useWebsiteBuilderTheme();
|
|
28
28
|
const editorTheme = {
|
|
29
29
|
colors: theme?.colors ?? [],
|
|
30
30
|
typography: theme?.typography ?? {},
|
|
31
|
+
fontSizes: theme?.fontSizes ?? [],
|
|
31
32
|
tokens: lexicalTokens
|
|
32
33
|
};
|
|
33
34
|
return /*#__PURE__*/ react.createElement(LexicalEditor, {
|
|
@@ -43,6 +44,16 @@ const LexicalEditor_LexicalEditor = (props)=>{
|
|
|
43
44
|
theme: editorTheme
|
|
44
45
|
});
|
|
45
46
|
};
|
|
47
|
+
const ExpandedLexicalEditor = (props)=>/*#__PURE__*/ react.createElement(CompositionScope, {
|
|
48
|
+
name: "expanded"
|
|
49
|
+
}, /*#__PURE__*/ react.createElement(LexicalEditorComponent, props));
|
|
50
|
+
const CompactLexicalEditor = (props)=>/*#__PURE__*/ react.createElement(CompositionScope, {
|
|
51
|
+
name: "compact"
|
|
52
|
+
}, /*#__PURE__*/ react.createElement(LexicalEditorComponent, props));
|
|
53
|
+
const LexicalEditor_LexicalEditor = {
|
|
54
|
+
Expanded: ExpandedLexicalEditor,
|
|
55
|
+
Compact: CompactLexicalEditor
|
|
56
|
+
};
|
|
46
57
|
export { LexicalEditor_LexicalEditor as LexicalEditor };
|
|
47
58
|
|
|
48
59
|
//# sourceMappingURL=LexicalEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/LexicalInput/LexicalEditor.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditor as BaseLexicalEditor } from \"@webiny/app-admin\";\nimport { StaticToolbar } from \"@webiny/lexical-editor\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\nimport { useWebsiteBuilderTheme } from \"~/BaseEditor/components/index.js\";\nimport \"./wbStaticToolbar.css\";\n\nconst placeholderStyles: React.CSSProperties = { position: \"absolute\", top: 40, left: 25 };\n\nconst contentEditableStyles: React.CSSProperties = {\n minHeight: 200,\n display: \"block\",\n padding: 10\n};\n\nconst styles: React.CSSProperties = {\n backgroundColor: \"#fff\",\n border: \"1px solid #e1e1e1\",\n padding: \"10px 14px\",\n minHeight: 200,\n maxHeight: 350,\n fontFamily: \"var(--wb-theme-font-family)\"\n};\n\nconst lexicalTokens = createLexicalTokens(\"wb-lx-\");\n\nexport type LexicalEditorProps = Omit<React.ComponentProps<typeof BaseLexicalEditor>, \"theme\">;\n\
|
|
1
|
+
{"version":3,"file":"inputRenderers/LexicalInput/LexicalEditor.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditor as BaseLexicalEditor } from \"@webiny/app-admin\";\nimport { StaticToolbar } from \"@webiny/lexical-editor\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\nimport { useWebsiteBuilderTheme } from \"~/BaseEditor/components/index.js\";\nimport \"./wbStaticToolbar.css\";\nimport { CompositionScope } from \"@webiny/app-admin\";\n\nconst placeholderStyles: React.CSSProperties = { position: \"absolute\", top: 40, left: 25 };\n\nconst contentEditableStyles: React.CSSProperties = {\n minHeight: 200,\n display: \"block\",\n padding: 10\n};\n\nconst styles: React.CSSProperties = {\n backgroundColor: \"#fff\",\n border: \"1px solid #e1e1e1\",\n padding: \"10px 14px\",\n minHeight: 200,\n maxHeight: 350,\n fontFamily: \"var(--wb-theme-font-family)\"\n};\n\nconst lexicalTokens = createLexicalTokens(\"wb-lx-\");\n\nexport type LexicalEditorProps = Omit<React.ComponentProps<typeof BaseLexicalEditor>, \"theme\">;\n\nconst LexicalEditorComponent = (props: LexicalEditorProps) => {\n const { theme } = useWebsiteBuilderTheme();\n\n const editorTheme: EditorTheme = {\n colors: theme?.colors ?? [],\n typography: theme?.typography ?? {},\n fontSizes: theme?.fontSizes ?? [],\n tokens: lexicalTokens\n };\n\n return (\n <BaseLexicalEditor\n {...props}\n staticToolbar={<StaticToolbar className={\"wb-static-toolbar\"} />}\n tag={\"p\"}\n placeholder={props?.placeholder || \"Enter your text here...\"}\n placeholderStyles={placeholderStyles}\n contentEditableStyles={contentEditableStyles}\n styles={styles}\n theme={editorTheme}\n />\n );\n};\n\nconst ExpandedLexicalEditor = (props: LexicalEditorProps) => {\n return (\n <CompositionScope name={\"expanded\"}>\n <LexicalEditorComponent {...props} />\n </CompositionScope>\n );\n};\n\nconst CompactLexicalEditor = (props: LexicalEditorProps) => {\n return (\n <CompositionScope name={\"compact\"}>\n <LexicalEditorComponent {...props} />\n </CompositionScope>\n );\n};\n\nexport const LexicalEditor = {\n Expanded: ExpandedLexicalEditor,\n Compact: CompactLexicalEditor\n};\n"],"names":["placeholderStyles","contentEditableStyles","styles","lexicalTokens","createLexicalTokens","LexicalEditorComponent","props","theme","useWebsiteBuilderTheme","editorTheme","BaseLexicalEditor","StaticToolbar","ExpandedLexicalEditor","CompositionScope","CompactLexicalEditor","LexicalEditor"],"mappings":";;;;;;AASA,MAAMA,oBAAyC;IAAE,UAAU;IAAY,KAAK;IAAI,MAAM;AAAG;AAEzF,MAAMC,wBAA6C;IAC/C,WAAW;IACX,SAAS;IACT,SAAS;AACb;AAEA,MAAMC,SAA8B;IAChC,iBAAiB;IACjB,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,YAAY;AAChB;AAEA,MAAMC,gBAAgBC,oBAAoB;AAI1C,MAAMC,yBAAyB,CAACC;IAC5B,MAAM,EAAEC,KAAK,EAAE,GAAGC;IAElB,MAAMC,cAA2B;QAC7B,QAAQF,OAAO,UAAU,EAAE;QAC3B,YAAYA,OAAO,cAAc,CAAC;QAClC,WAAWA,OAAO,aAAa,EAAE;QACjC,QAAQJ;IACZ;IAEA,OAAO,WAAP,GACI,oBAACO,eAAiBA;QACb,GAAGJ,KAAK;QACT,6BAAe,oBAACK,eAAaA;YAAC,WAAW;;QACzC,KAAK;QACL,aAAaL,OAAO,eAAe;QACnC,mBAAmBN;QACnB,uBAAuBC;QACvB,QAAQC;QACR,OAAOO;;AAGnB;AAEA,MAAMG,wBAAwB,CAACN,QACpB,WAAP,GACI,oBAACO,kBAAgBA;QAAC,MAAM;qBACpB,oBAACR,wBAA2BC;AAKxC,MAAMQ,uBAAuB,CAACR,QACnB,WAAP,GACI,oBAACO,kBAAgBA;QAAC,MAAM;qBACpB,oBAACR,wBAA2BC;AAKjC,MAAMS,8BAAgB;IACzB,UAAUH;IACV,SAASE;AACb"}
|
|
@@ -16,3 +16,21 @@ export declare const ExpandedEditorConfig: {
|
|
|
16
16
|
Plugin: (props: React.ComponentProps<typeof BaseConfig.Plugin>) => React.JSX.Element;
|
|
17
17
|
Node: (props: React.ComponentProps<typeof BaseConfig.Node>) => React.JSX.Element;
|
|
18
18
|
};
|
|
19
|
+
export declare const LexicalEditorConfig: {
|
|
20
|
+
Expanded: {
|
|
21
|
+
({ children }: {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
ToolbarAction: (props: React.ComponentProps<typeof BaseConfig.ToolbarElement>) => React.JSX.Element;
|
|
25
|
+
Plugin: (props: React.ComponentProps<typeof BaseConfig.Plugin>) => React.JSX.Element;
|
|
26
|
+
Node: (props: React.ComponentProps<typeof BaseConfig.Node>) => React.JSX.Element;
|
|
27
|
+
};
|
|
28
|
+
Compact: {
|
|
29
|
+
({ children }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
ToolbarAction: (props: React.ComponentProps<typeof BaseConfig.ToolbarElement>) => React.JSX.Element;
|
|
33
|
+
Plugin: (props: React.ComponentProps<typeof BaseConfig.Plugin>) => React.JSX.Element;
|
|
34
|
+
Node: (props: React.ComponentProps<typeof BaseConfig.Node>) => React.JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -20,6 +20,10 @@ const ExpandedEditorConfig = ({ children })=>/*#__PURE__*/ react.createElement(C
|
|
|
20
20
|
ExpandedEditorConfig.ToolbarAction = ToolbarAction;
|
|
21
21
|
ExpandedEditorConfig.Plugin = PluginConfig;
|
|
22
22
|
ExpandedEditorConfig.Node = NodeConfig;
|
|
23
|
-
|
|
23
|
+
const LexicalEditorConfig_LexicalEditorConfig = {
|
|
24
|
+
Expanded: ExpandedEditorConfig,
|
|
25
|
+
Compact: CompactEditorConfig
|
|
26
|
+
};
|
|
27
|
+
export { CompactEditorConfig, ExpandedEditorConfig, LexicalEditorConfig_LexicalEditorConfig as LexicalEditorConfig };
|
|
24
28
|
|
|
25
29
|
//# sourceMappingURL=LexicalEditorConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/LexicalInput/LexicalEditorConfig.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalEditorConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditorConfig as BaseConfig } from \"@webiny/lexical-editor\";\nimport { CompositionScope } from \"@webiny/react-composition\";\n\nconst ToolbarAction = (props: React.ComponentProps<typeof BaseConfig.ToolbarElement>) => {\n return <BaseConfig.ToolbarElement {...props} />;\n};\n\nconst PluginConfig = (props: React.ComponentProps<typeof BaseConfig.Plugin>) => {\n return <BaseConfig.Plugin {...props} />;\n};\n\nconst NodeConfig = (props: React.ComponentProps<typeof BaseConfig.Node>) => {\n return <BaseConfig.Node {...props} />;\n};\n\nexport const CompactEditorConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"compact\"}>\n <BaseConfig priority={\"secondary\"}>{children}</BaseConfig>\n </CompositionScope>\n );\n};\n\nCompactEditorConfig.ToolbarAction = ToolbarAction;\nCompactEditorConfig.Plugin = PluginConfig;\nCompactEditorConfig.Node = NodeConfig;\n\nexport const ExpandedEditorConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"expanded\"}>\n <BaseConfig priority={\"secondary\"}>{children}</BaseConfig>\n </CompositionScope>\n );\n};\n\nExpandedEditorConfig.ToolbarAction = ToolbarAction;\nExpandedEditorConfig.Plugin = PluginConfig;\nExpandedEditorConfig.Node = NodeConfig;\n"],"names":["ToolbarAction","props","BaseConfig","PluginConfig","NodeConfig","CompactEditorConfig","children","CompositionScope","ExpandedEditorConfig"],"mappings":";;;AAIA,MAAMA,gBAAgB,CAACC,QACZ,WAAP,GAAO,oBAACC,oBAAAA,cAAyB,EAAKD;AAG1C,MAAME,eAAe,CAACF,QACX,WAAP,GAAO,oBAACC,oBAAAA,MAAiB,EAAKD;AAGlC,MAAMG,aAAa,CAACH,QACT,WAAP,GAAO,oBAACC,oBAAAA,IAAe,EAAKD;AAGzB,MAAMI,sBAAsB,CAAC,EAAEC,QAAQ,EAAiC,GACpE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACL,qBAAUA;QAAC,UAAU;OAAcI;AAKhDD,oBAAoB,aAAa,GAAGL;AACpCK,oBAAoB,MAAM,GAAGF;AAC7BE,oBAAoB,IAAI,GAAGD;AAEpB,MAAMI,uBAAuB,CAAC,EAAEF,QAAQ,EAAiC,GACrE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACL,qBAAUA;QAAC,UAAU;OAAcI;AAKhDE,qBAAqB,aAAa,GAAGR;AACrCQ,qBAAqB,MAAM,GAAGL;AAC9BK,qBAAqB,IAAI,GAAGJ"}
|
|
1
|
+
{"version":3,"file":"inputRenderers/LexicalInput/LexicalEditorConfig.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalEditorConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditorConfig as BaseConfig } from \"@webiny/lexical-editor\";\nimport { CompositionScope } from \"@webiny/react-composition\";\n\nconst ToolbarAction = (props: React.ComponentProps<typeof BaseConfig.ToolbarElement>) => {\n return <BaseConfig.ToolbarElement {...props} />;\n};\n\nconst PluginConfig = (props: React.ComponentProps<typeof BaseConfig.Plugin>) => {\n return <BaseConfig.Plugin {...props} />;\n};\n\nconst NodeConfig = (props: React.ComponentProps<typeof BaseConfig.Node>) => {\n return <BaseConfig.Node {...props} />;\n};\n\nexport const CompactEditorConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"compact\"}>\n <BaseConfig priority={\"secondary\"}>{children}</BaseConfig>\n </CompositionScope>\n );\n};\n\nCompactEditorConfig.ToolbarAction = ToolbarAction;\nCompactEditorConfig.Plugin = PluginConfig;\nCompactEditorConfig.Node = NodeConfig;\n\nexport const ExpandedEditorConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"expanded\"}>\n <BaseConfig priority={\"secondary\"}>{children}</BaseConfig>\n </CompositionScope>\n );\n};\n\nExpandedEditorConfig.ToolbarAction = ToolbarAction;\nExpandedEditorConfig.Plugin = PluginConfig;\nExpandedEditorConfig.Node = NodeConfig;\n\nexport const LexicalEditorConfig = {\n Expanded: ExpandedEditorConfig,\n Compact: CompactEditorConfig\n};\n"],"names":["ToolbarAction","props","BaseConfig","PluginConfig","NodeConfig","CompactEditorConfig","children","CompositionScope","ExpandedEditorConfig","LexicalEditorConfig"],"mappings":";;;AAIA,MAAMA,gBAAgB,CAACC,QACZ,WAAP,GAAO,oBAACC,oBAAAA,cAAyB,EAAKD;AAG1C,MAAME,eAAe,CAACF,QACX,WAAP,GAAO,oBAACC,oBAAAA,MAAiB,EAAKD;AAGlC,MAAMG,aAAa,CAACH,QACT,WAAP,GAAO,oBAACC,oBAAAA,IAAe,EAAKD;AAGzB,MAAMI,sBAAsB,CAAC,EAAEC,QAAQ,EAAiC,GACpE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACL,qBAAUA;QAAC,UAAU;OAAcI;AAKhDD,oBAAoB,aAAa,GAAGL;AACpCK,oBAAoB,MAAM,GAAGF;AAC7BE,oBAAoB,IAAI,GAAGD;AAEpB,MAAMI,uBAAuB,CAAC,EAAEF,QAAQ,EAAiC,GACrE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACL,qBAAUA;QAAC,UAAU;OAAcI;AAKhDE,qBAAqB,aAAa,GAAGR;AACrCQ,qBAAqB,MAAM,GAAGL;AAC9BK,qBAAqB,IAAI,GAAGJ;AAErB,MAAMK,0CAAsB;IAC/B,UAAUD;IACV,SAASH;AACb"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import react, { useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { Dialog, FormComponentLabel } from "@webiny/admin-ui";
|
|
3
|
-
import { CompositionScope } from "@webiny/app-admin";
|
|
4
3
|
import { LexicalEditor } from "./LexicalEditor.js";
|
|
5
4
|
import { ExpandedEditorProvider, useExpandedEditor } from "./ExpandedEditor.js";
|
|
6
5
|
const LexicalInputRenderer = (props)=>{
|
|
@@ -30,6 +29,7 @@ const EditorDialog = (props)=>{
|
|
|
30
29
|
"data-hover-manager": "ignore",
|
|
31
30
|
title: `Edit ${props.input.label}`,
|
|
32
31
|
dismissible: false,
|
|
32
|
+
scrollable: false,
|
|
33
33
|
showCloseButton: false,
|
|
34
34
|
actions: /*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(Dialog.CancelAction, {
|
|
35
35
|
onClick: props.onClose
|
|
@@ -39,12 +39,10 @@ const EditorDialog = (props)=>{
|
|
|
39
39
|
props.onChange(localValue);
|
|
40
40
|
}
|
|
41
41
|
}))
|
|
42
|
-
}, /*#__PURE__*/ react.createElement(
|
|
43
|
-
name: "expanded"
|
|
44
|
-
}, /*#__PURE__*/ react.createElement(LexicalEditor, {
|
|
42
|
+
}, /*#__PURE__*/ react.createElement(LexicalEditor.Expanded, {
|
|
45
43
|
value: localValue,
|
|
46
44
|
onChange: setLocalValue
|
|
47
|
-
}))
|
|
45
|
+
}));
|
|
48
46
|
};
|
|
49
47
|
const ExpandableLexicalInputRenderer = ({ value, onChange, input, label })=>{
|
|
50
48
|
const { isExpanded, setExpanded } = useExpandedEditor();
|
|
@@ -57,13 +55,11 @@ const ExpandableLexicalInputRenderer = ({ value, onChange, input, label })=>{
|
|
|
57
55
|
]);
|
|
58
56
|
return /*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(FormComponentLabel, {
|
|
59
57
|
text: label
|
|
60
|
-
}), /*#__PURE__*/ react.createElement(
|
|
61
|
-
name: "compact"
|
|
62
|
-
}, /*#__PURE__*/ react.createElement(LexicalEditor, {
|
|
58
|
+
}), /*#__PURE__*/ react.createElement(LexicalEditor.Compact, {
|
|
63
59
|
value: value,
|
|
64
60
|
onChange: onChange,
|
|
65
61
|
key: input.name
|
|
66
|
-
})
|
|
62
|
+
}), /*#__PURE__*/ react.createElement(EditorDialog, {
|
|
67
63
|
open: isExpanded,
|
|
68
64
|
value: value,
|
|
69
65
|
onChange: applyChanges,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/LexicalInput/LexicalInput.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalInput.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\nimport { Dialog, FormComponentLabel } from \"@webiny/admin-ui\";\nimport
|
|
1
|
+
{"version":3,"file":"inputRenderers/LexicalInput/LexicalInput.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalInput.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\nimport { Dialog, FormComponentLabel } from \"@webiny/admin-ui\";\nimport type { RichTextValueWithHtml } from \"@webiny/app-admin\";\nimport { LexicalEditor } from \"./LexicalEditor.js\";\nimport type { ElementInputRendererProps } from \"~/BaseEditor/index.js\";\nimport {\n ExpandedEditorProvider,\n useExpandedEditor\n} from \"~/inputRenderers/LexicalInput/ExpandedEditor.js\";\n\ntype LexicalInputRendererProps = Omit<ElementInputRendererProps, \"onChange\" | \"metadata\"> & {\n onChange: (value: RichTextValueWithHtml) => void;\n};\n\nexport const LexicalInputRenderer = (props: ElementInputRendererProps) => {\n const onChange = (lexicalValue: RichTextValueWithHtml) => {\n props.onChange(({ value }) => {\n value.set(lexicalValue);\n });\n };\n\n const value = props.value ?? {};\n\n return (\n <ExpandedEditorProvider>\n <ExpandableLexicalInputRenderer {...props} value={value} onChange={onChange} />\n </ExpandedEditorProvider>\n );\n};\n\ninterface EditorDialogProps extends Omit<LexicalInputRendererProps, \"onPreviewChange\" | \"label\"> {\n open: boolean;\n onClose: () => void;\n}\n\nconst EditorDialog = (props: EditorDialogProps) => {\n const [localValue, setLocalValue] = useState(props.value);\n\n useEffect(() => {\n setLocalValue(props.value);\n }, [props.value]);\n\n return (\n <Dialog\n id={\"lexical-editor-dialog\"}\n open={props.open}\n className={\"w-[900px] max-w-[900px] overflow-visible\"}\n data-hover-manager={\"ignore\"}\n title={`Edit ${props.input.label}`}\n dismissible={false}\n scrollable={false}\n showCloseButton={false}\n actions={\n <>\n <Dialog.CancelAction onClick={props.onClose} />\n <Dialog.ConfirmAction\n text={\"Save Changes\"}\n onClick={() => {\n props.onChange(localValue);\n }}\n />\n </>\n }\n >\n <LexicalEditor.Expanded value={localValue} onChange={setLocalValue} />\n </Dialog>\n );\n};\n\nconst ExpandableLexicalInputRenderer = ({\n value,\n onChange,\n input,\n label\n}: LexicalInputRendererProps) => {\n const { isExpanded, setExpanded } = useExpandedEditor();\n\n const applyChanges = useCallback(\n (newValue: any) => {\n onChange(newValue);\n setExpanded(false);\n },\n [onChange, setExpanded]\n );\n\n return (\n <>\n <FormComponentLabel text={label} />\n <LexicalEditor.Compact value={value} onChange={onChange} key={input.name} />\n <EditorDialog\n open={isExpanded}\n value={value}\n onChange={applyChanges}\n onClose={() => setExpanded(false)}\n input={input}\n />\n </>\n );\n};\n"],"names":["LexicalInputRenderer","props","onChange","lexicalValue","value","ExpandedEditorProvider","ExpandableLexicalInputRenderer","EditorDialog","localValue","setLocalValue","useState","useEffect","Dialog","LexicalEditor","input","label","isExpanded","setExpanded","useExpandedEditor","applyChanges","useCallback","newValue","FormComponentLabel"],"mappings":";;;;AAcO,MAAMA,uBAAuB,CAACC;IACjC,MAAMC,WAAW,CAACC;QACdF,MAAM,QAAQ,CAAC,CAAC,EAAEG,KAAK,EAAE;YACrBA,MAAM,GAAG,CAACD;QACd;IACJ;IAEA,MAAMC,QAAQH,MAAM,KAAK,IAAI,CAAC;IAE9B,OAAO,WAAP,GACI,oBAACI,wBAAsBA,MAAAA,WAAAA,GACnB,oBAACC,gCAA8BA;QAAE,GAAGL,KAAK;QAAE,OAAOG;QAAO,UAAUF;;AAG/E;AAOA,MAAMK,eAAe,CAACN;IAClB,MAAM,CAACO,YAAYC,cAAc,GAAGC,SAAST,MAAM,KAAK;IAExDU,UAAU;QACNF,cAAcR,MAAM,KAAK;IAC7B,GAAG;QAACA,MAAM,KAAK;KAAC;IAEhB,OAAO,WAAP,GACI,oBAACW,QAAMA;QACH,IAAI;QACJ,MAAMX,MAAM,IAAI;QAChB,WAAW;QACX,sBAAoB;QACpB,OAAO,CAAC,KAAK,EAAEA,MAAM,KAAK,CAAC,KAAK,EAAE;QAClC,aAAa;QACb,YAAY;QACZ,iBAAiB;QACjB,uBACI,wDACI,oBAACW,OAAO,YAAY;YAAC,SAASX,MAAM,OAAO;0BAC3C,oBAACW,OAAO,aAAa;YACjB,MAAM;YACN,SAAS;gBACLX,MAAM,QAAQ,CAACO;YACnB;;qBAKZ,oBAACK,cAAc,QAAQ;QAAC,OAAOL;QAAY,UAAUC;;AAGjE;AAEA,MAAMH,iCAAiC,CAAC,EACpCF,KAAK,EACLF,QAAQ,EACRY,KAAK,EACLC,KAAK,EACmB;IACxB,MAAM,EAAEC,UAAU,EAAEC,WAAW,EAAE,GAAGC;IAEpC,MAAMC,eAAeC,YACjB,CAACC;QACGnB,SAASmB;QACTJ,YAAY;IAChB,GACA;QAACf;QAAUe;KAAY;IAG3B,OAAO,WAAP,GACI,wDACI,oBAACK,oBAAkBA;QAAC,MAAMP;sBAC1B,oBAACF,cAAc,OAAO;QAAC,OAAOT;QAAO,UAAUF;QAAU,KAAKY,MAAM,IAAI;sBACxE,oBAACP,cAAYA;QACT,MAAMS;QACN,OAAOZ;QACP,UAAUe;QACV,SAAS,IAAMF,YAAY;QAC3B,OAAOH;;AAIvB"}
|
|
@@ -12,12 +12,14 @@ const TextInputRenderer = ({ value, onChange, onPreviewChange, input, label })=>
|
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
14
|
return /*#__PURE__*/ react.createElement(Input, {
|
|
15
|
+
size: "md",
|
|
16
|
+
variant: "secondary",
|
|
15
17
|
value: value,
|
|
16
18
|
onChange: previewValue,
|
|
17
19
|
onBlur: (e)=>commitValue(e.currentTarget.value),
|
|
18
20
|
onEnter: (e)=>commitValue(e.currentTarget.value),
|
|
19
21
|
label: label,
|
|
20
|
-
|
|
22
|
+
hint: input.description,
|
|
21
23
|
note: input.helperText
|
|
22
24
|
});
|
|
23
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/TextInput.js","sources":["../../src/inputRenderers/TextInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { Input } from \"@webiny/admin-ui\";\nimport type { ElementInputRendererProps } from \"~/BaseEditor/index.js\";\n\nexport const TextInputRenderer = ({\n value,\n onChange,\n onPreviewChange,\n input,\n label\n}: ElementInputRendererProps) => {\n const commitValue = (newValue: string) => {\n onChange(({ value }) => {\n value.set(newValue);\n });\n };\n\n const previewValue = (newValue: string) => {\n onPreviewChange(({ value }) => {\n value.set(newValue);\n });\n };\n\n return (\n <Input\n value={value}\n onChange={previewValue}\n onBlur={e => commitValue(e.currentTarget.value)}\n onEnter={e => commitValue(e.currentTarget.value)}\n label={label}\n
|
|
1
|
+
{"version":3,"file":"inputRenderers/TextInput.js","sources":["../../src/inputRenderers/TextInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { Input } from \"@webiny/admin-ui\";\nimport type { ElementInputRendererProps } from \"~/BaseEditor/index.js\";\n\nexport const TextInputRenderer = ({\n value,\n onChange,\n onPreviewChange,\n input,\n label\n}: ElementInputRendererProps) => {\n const commitValue = (newValue: string) => {\n onChange(({ value }) => {\n value.set(newValue);\n });\n };\n\n const previewValue = (newValue: string) => {\n onPreviewChange(({ value }) => {\n value.set(newValue);\n });\n };\n\n return (\n <Input\n size={\"md\"}\n variant={\"secondary\"}\n value={value}\n onChange={previewValue}\n onBlur={e => commitValue(e.currentTarget.value)}\n onEnter={e => commitValue(e.currentTarget.value)}\n label={label}\n hint={input.description}\n note={input.helperText}\n />\n );\n};\n"],"names":["TextInputRenderer","value","onChange","onPreviewChange","input","label","commitValue","newValue","previewValue","Input","e"],"mappings":";;AAIO,MAAMA,oBAAoB,CAAC,EAC9BC,KAAK,EACLC,QAAQ,EACRC,eAAe,EACfC,KAAK,EACLC,KAAK,EACmB;IACxB,MAAMC,cAAc,CAACC;QACjBL,SAAS,CAAC,EAAED,KAAK,EAAE;YACfA,MAAM,GAAG,CAACM;QACd;IACJ;IAEA,MAAMC,eAAe,CAACD;QAClBJ,gBAAgB,CAAC,EAAEF,KAAK,EAAE;YACtBA,MAAM,GAAG,CAACM;QACd;IACJ;IAEA,OAAO,WAAP,GACI,oBAACE,OAAKA;QACF,MAAM;QACN,SAAS;QACT,OAAOR;QACP,UAAUO;QACV,QAAQE,CAAAA,IAAKJ,YAAYI,EAAE,aAAa,CAAC,KAAK;QAC9C,SAASA,CAAAA,IAAKJ,YAAYI,EAAE,aAAa,CAAC,KAAK;QAC/C,OAAOL;QACP,MAAMD,MAAM,WAAW;QACvB,MAAMA,MAAM,UAAU;;AAGlC"}
|
|
@@ -279,6 +279,7 @@ export declare const InternalPageEditorConfig: (({ children }: PageEditorConfigP
|
|
|
279
279
|
displayName: string;
|
|
280
280
|
}>) => (props: unknown) => React.JSX.Element;
|
|
281
281
|
};
|
|
282
|
+
Tab: ({ name, label, icon, element, disabled, visible }: import("../../../BaseEditor/config/Toolbar/Tab").TabProps) => React.JSX.Element;
|
|
282
283
|
};
|
|
283
284
|
Sidebar: (() => React.JSX.Element) & {
|
|
284
285
|
original: () => React.JSX.Element;
|
|
@@ -375,7 +376,7 @@ export declare const InternalPageEditorConfig: (({ children }: PageEditorConfigP
|
|
|
375
376
|
displayName: string;
|
|
376
377
|
}>) => (props: unknown) => React.JSX.Element;
|
|
377
378
|
} & {
|
|
378
|
-
Tab: ({ name, label, disabled, element, visible
|
|
379
|
+
Tab: ({ name, label, icon, disabled, element, visible }: import("../../../BaseEditor/config/Sidebar/Tab").TabProps) => React.JSX.Element;
|
|
379
380
|
};
|
|
380
381
|
ScrollableContainer: ({ children }: any) => React.JSX.Element;
|
|
381
382
|
};
|
|
@@ -735,6 +736,7 @@ export declare const PageEditorConfig: (({ children }: PageEditorConfigProps) =>
|
|
|
735
736
|
displayName: string;
|
|
736
737
|
}>) => (props: unknown) => React.JSX.Element;
|
|
737
738
|
};
|
|
739
|
+
Tab: ({ name, label, icon, element, disabled, visible }: import("../../../BaseEditor/config/Toolbar/Tab").TabProps) => React.JSX.Element;
|
|
738
740
|
};
|
|
739
741
|
Sidebar: (() => React.JSX.Element) & {
|
|
740
742
|
original: () => React.JSX.Element;
|
|
@@ -831,7 +833,7 @@ export declare const PageEditorConfig: (({ children }: PageEditorConfigProps) =>
|
|
|
831
833
|
displayName: string;
|
|
832
834
|
}>) => (props: unknown) => React.JSX.Element;
|
|
833
835
|
} & {
|
|
834
|
-
Tab: ({ name, label, disabled, element, visible
|
|
836
|
+
Tab: ({ name, label, icon, disabled, element, visible }: import("../../../BaseEditor/config/Sidebar/Tab").TabProps) => React.JSX.Element;
|
|
835
837
|
};
|
|
836
838
|
ScrollableContainer: ({ children }: any) => React.JSX.Element;
|
|
837
839
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, makeAutoObservable } from "mobx";
|
|
1
|
+
import { computed, makeAutoObservable, toJS } from "mobx";
|
|
2
2
|
import { FormModelFactory } from "@webiny/app-admin";
|
|
3
3
|
import { PageSettingsGroup, PageSettingsGroupModifier, PageSettingsPresenter } from "./abstractions.js";
|
|
4
4
|
class PageSettingsPresenterImpl {
|
|
@@ -40,7 +40,7 @@ class PageSettingsPresenterImpl {
|
|
|
40
40
|
if (!this.form || !this.originalData) return false;
|
|
41
41
|
const data = await this.form.submit();
|
|
42
42
|
if (!data) return false;
|
|
43
|
-
const doc = structuredClone(this.originalData);
|
|
43
|
+
const doc = structuredClone(toJS(this.originalData));
|
|
44
44
|
for (const group of this.groups)group.mapFromForm(data[group.name] ?? {}, doc);
|
|
45
45
|
for (const modifier of this.modifiers ?? [])if (modifier.mapFromForm) modifier.mapFromForm(data[modifier.group] ?? {}, doc);
|
|
46
46
|
return doc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules/pages/PageEditor/PageSettings/PageSettingsPresenter.js","sources":["../../../../../src/modules/pages/PageEditor/PageSettings/PageSettingsPresenter.ts"],"sourcesContent":["import { makeAutoObservable, computed } from \"mobx\";\nimport { FormModelFactory, FormModel } from \"@webiny/app-admin\";\nimport { PageSettingsPresenter as PresenterAbstraction } from \"./abstractions.js\";\nimport { PageSettingsGroup } from \"./abstractions.js\";\nimport { PageSettingsGroupModifier } from \"./abstractions.js\";\n\ntype FieldsFactory = (\n fields: FormModelFactory.FieldBuilderRegistry\n) => Record<string, FormModelFactory.FieldBuilder>;\n\ntype LayoutFactory = (layout: FormModelFactory.LayoutBuilder) => FormModel.LayoutNodeBuilder[];\n\ninterface CollectedGroup {\n group: PageSettingsGroup.Interface;\n fieldsFns: FieldsFactory[];\n layoutFns: LayoutFactory[];\n}\n\nclass PageSettingsPresenterImpl implements PresenterAbstraction.Interface {\n private form: FormModel.Interface | null = null;\n private error: string | null = null;\n private originalData: PageSettingsGroup.PageDocument | null = null;\n\n constructor(\n private factory: FormModelFactory.Interface,\n private groups: PageSettingsGroup.Interface[],\n private modifiers: PageSettingsGroupModifier.Interface[] | undefined\n ) {\n makeAutoObservable(this, { vm: computed }, { autoBind: true });\n }\n\n get vm(): PresenterAbstraction.ViewModel {\n return {\n form: this.form ? this.form.vm : null,\n error: this.error\n };\n }\n\n init(data: PageSettingsGroup.PageDocument): void {\n this.error = null;\n this.originalData = data;\n\n this.form = this.buildForm();\n\n const mapped: Record<string, any> = {};\n for (const group of this.groups) {\n mapped[group.name] = group.mapToForm(data);\n }\n\n for (const modifier of this.modifiers ?? []) {\n if (modifier.mapToForm) {\n const modData = modifier.mapToForm(data);\n mapped[modifier.group] = { ...mapped[modifier.group], ...modData };\n }\n }\n\n this.form.setData(mapped);\n }\n\n async submit(): Promise<PageSettingsGroup.PageDocument | false> {\n if (!this.form || !this.originalData) {\n return false;\n }\n\n const data = await this.form.submit<Record<string, any>>();\n if (!data) {\n return false;\n }\n\n const doc = structuredClone(this.originalData);\n\n for (const group of this.groups) {\n group.mapFromForm(data[group.name] ?? {}, doc);\n }\n\n for (const modifier of this.modifiers ?? []) {\n if (modifier.mapFromForm) {\n modifier.mapFromForm(data[modifier.group] ?? {}, doc);\n }\n }\n\n return doc;\n }\n\n private collectGroups(): CollectedGroup[] {\n return this.groups.map(group => {\n const fieldsFns: FieldsFactory[] = [];\n const layoutFns: LayoutFactory[] = [];\n\n const builder: PageSettingsGroup.FormBuilder = {\n fields(fn: FieldsFactory) {\n fieldsFns.push(fn);\n },\n layout(fn: LayoutFactory) {\n layoutFns.push(fn);\n }\n };\n\n group.buildForm(builder);\n\n for (const modifier of this.modifiers ?? []) {\n if (modifier.group === group.name) {\n modifier.modifyForm(builder);\n }\n }\n\n return { group, fieldsFns, layoutFns };\n });\n }\n\n private buildForm() {\n const collected = this.collectGroups();\n\n return this.factory.create({\n fields: fields => {\n const result: Record<string, FormModelFactory.FieldBuilder> = {};\n for (const { group, fieldsFns } of collected) {\n if (fieldsFns.length === 0) {\n continue;\n }\n result[group.name] = fields\n .object()\n .label(group.label)\n .renderer(\"passthrough\")\n .fields(registry => {\n const merged: Record<string, FormModelFactory.FieldBuilder> = {};\n for (const fn of fieldsFns) {\n Object.assign(merged, fn(registry));\n }\n return merged;\n });\n }\n return result;\n },\n layout: layout => {\n if (collected.length === 0) {\n return [];\n }\n\n const tabsBuilder = layout.tabs(\"settings-tabs\").renderer(\"tabsVertical\");\n\n for (const { group, layoutFns } of collected) {\n tabsBuilder.tab(group.name, tab => {\n tab.label(group.label);\n if (group.description) {\n tab.description(group.description);\n }\n if (group.icon) {\n tab.icon(group.icon);\n }\n tab.layout(l => {\n if (layoutFns.length > 0) {\n return [\n l.object(group.name, inner => {\n return layoutFns.flatMap(fn => fn(inner));\n })\n ];\n }\n\n return [l.row(group.name)];\n });\n });\n }\n\n return [tabsBuilder];\n }\n });\n }\n}\n\nexport const PageSettingsPresenterRegistration = PresenterAbstraction.createImplementation({\n implementation: PageSettingsPresenterImpl,\n dependencies: [\n FormModelFactory,\n [PageSettingsGroup, { multiple: true }],\n [PageSettingsGroupModifier, { multiple: true, optional: true }]\n ]\n});\n"],"names":["PageSettingsPresenterImpl","factory","groups","modifiers","makeAutoObservable","computed","data","mapped","group","modifier","modData","doc","structuredClone","fieldsFns","layoutFns","builder","fn","collected","fields","result","registry","merged","Object","layout","tabsBuilder","tab","l","inner","PageSettingsPresenterRegistration","PresenterAbstraction","Form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
|
+
{"version":3,"file":"modules/pages/PageEditor/PageSettings/PageSettingsPresenter.js","sources":["../../../../../src/modules/pages/PageEditor/PageSettings/PageSettingsPresenter.ts"],"sourcesContent":["import { makeAutoObservable, computed, toJS } from \"mobx\";\nimport { FormModelFactory, FormModel } from \"@webiny/app-admin\";\nimport { PageSettingsPresenter as PresenterAbstraction } from \"./abstractions.js\";\nimport { PageSettingsGroup } from \"./abstractions.js\";\nimport { PageSettingsGroupModifier } from \"./abstractions.js\";\n\ntype FieldsFactory = (\n fields: FormModelFactory.FieldBuilderRegistry\n) => Record<string, FormModelFactory.FieldBuilder>;\n\ntype LayoutFactory = (layout: FormModelFactory.LayoutBuilder) => FormModel.LayoutNodeBuilder[];\n\ninterface CollectedGroup {\n group: PageSettingsGroup.Interface;\n fieldsFns: FieldsFactory[];\n layoutFns: LayoutFactory[];\n}\n\nclass PageSettingsPresenterImpl implements PresenterAbstraction.Interface {\n private form: FormModel.Interface | null = null;\n private error: string | null = null;\n private originalData: PageSettingsGroup.PageDocument | null = null;\n\n constructor(\n private factory: FormModelFactory.Interface,\n private groups: PageSettingsGroup.Interface[],\n private modifiers: PageSettingsGroupModifier.Interface[] | undefined\n ) {\n makeAutoObservable(this, { vm: computed }, { autoBind: true });\n }\n\n get vm(): PresenterAbstraction.ViewModel {\n return {\n form: this.form ? this.form.vm : null,\n error: this.error\n };\n }\n\n init(data: PageSettingsGroup.PageDocument): void {\n this.error = null;\n this.originalData = data;\n\n this.form = this.buildForm();\n\n const mapped: Record<string, any> = {};\n for (const group of this.groups) {\n mapped[group.name] = group.mapToForm(data);\n }\n\n for (const modifier of this.modifiers ?? []) {\n if (modifier.mapToForm) {\n const modData = modifier.mapToForm(data);\n mapped[modifier.group] = { ...mapped[modifier.group], ...modData };\n }\n }\n\n this.form.setData(mapped);\n }\n\n async submit(): Promise<PageSettingsGroup.PageDocument | false> {\n if (!this.form || !this.originalData) {\n return false;\n }\n\n const data = await this.form.submit<Record<string, any>>();\n if (!data) {\n return false;\n }\n\n const doc = structuredClone(toJS(this.originalData));\n\n for (const group of this.groups) {\n group.mapFromForm(data[group.name] ?? {}, doc);\n }\n\n for (const modifier of this.modifiers ?? []) {\n if (modifier.mapFromForm) {\n modifier.mapFromForm(data[modifier.group] ?? {}, doc);\n }\n }\n\n return doc;\n }\n\n private collectGroups(): CollectedGroup[] {\n return this.groups.map(group => {\n const fieldsFns: FieldsFactory[] = [];\n const layoutFns: LayoutFactory[] = [];\n\n const builder: PageSettingsGroup.FormBuilder = {\n fields(fn: FieldsFactory) {\n fieldsFns.push(fn);\n },\n layout(fn: LayoutFactory) {\n layoutFns.push(fn);\n }\n };\n\n group.buildForm(builder);\n\n for (const modifier of this.modifiers ?? []) {\n if (modifier.group === group.name) {\n modifier.modifyForm(builder);\n }\n }\n\n return { group, fieldsFns, layoutFns };\n });\n }\n\n private buildForm() {\n const collected = this.collectGroups();\n\n return this.factory.create({\n fields: fields => {\n const result: Record<string, FormModelFactory.FieldBuilder> = {};\n for (const { group, fieldsFns } of collected) {\n if (fieldsFns.length === 0) {\n continue;\n }\n result[group.name] = fields\n .object()\n .label(group.label)\n .renderer(\"passthrough\")\n .fields(registry => {\n const merged: Record<string, FormModelFactory.FieldBuilder> = {};\n for (const fn of fieldsFns) {\n Object.assign(merged, fn(registry));\n }\n return merged;\n });\n }\n return result;\n },\n layout: layout => {\n if (collected.length === 0) {\n return [];\n }\n\n const tabsBuilder = layout.tabs(\"settings-tabs\").renderer(\"tabsVertical\");\n\n for (const { group, layoutFns } of collected) {\n tabsBuilder.tab(group.name, tab => {\n tab.label(group.label);\n if (group.description) {\n tab.description(group.description);\n }\n if (group.icon) {\n tab.icon(group.icon);\n }\n tab.layout(l => {\n if (layoutFns.length > 0) {\n return [\n l.object(group.name, inner => {\n return layoutFns.flatMap(fn => fn(inner));\n })\n ];\n }\n\n return [l.row(group.name)];\n });\n });\n }\n\n return [tabsBuilder];\n }\n });\n }\n}\n\nexport const PageSettingsPresenterRegistration = PresenterAbstraction.createImplementation({\n implementation: PageSettingsPresenterImpl,\n dependencies: [\n FormModelFactory,\n [PageSettingsGroup, { multiple: true }],\n [PageSettingsGroupModifier, { multiple: true, optional: true }]\n ]\n});\n"],"names":["PageSettingsPresenterImpl","factory","groups","modifiers","makeAutoObservable","computed","data","mapped","group","modifier","modData","doc","structuredClone","toJS","fieldsFns","layoutFns","builder","fn","collected","fields","result","registry","merged","Object","layout","tabsBuilder","tab","l","inner","PageSettingsPresenterRegistration","PresenterAbstraction","FormModelFactory","PageSettingsGroup","PageSettingsGroupModifier"],"mappings":";;;AAkBA,MAAMA;IAKF,YACYC,OAAmC,EACnCC,MAAqC,EACrCC,SAA4D,CACtE;aAHUF,OAAO,GAAPA;aACAC,MAAM,GAANA;aACAC,SAAS,GAATA;aAPJ,IAAI,GAA+B;aACnC,KAAK,GAAkB;aACvB,YAAY,GAA0C;QAO1DC,mBAAmB,IAAI,EAAE;YAAE,IAAIC;QAAS,GAAG;YAAE,UAAU;QAAK;IAChE;IAEA,IAAI,KAAqC;QACrC,OAAO;YACH,MAAM,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG;YACjC,OAAO,IAAI,CAAC,KAAK;QACrB;IACJ;IAEA,KAAKC,IAAoC,EAAQ;QAC7C,IAAI,CAAC,KAAK,GAAG;QACb,IAAI,CAAC,YAAY,GAAGA;QAEpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS;QAE1B,MAAMC,SAA8B,CAAC;QACrC,KAAK,MAAMC,SAAS,IAAI,CAAC,MAAM,CAC3BD,MAAM,CAACC,MAAM,IAAI,CAAC,GAAGA,MAAM,SAAS,CAACF;QAGzC,KAAK,MAAMG,YAAY,IAAI,CAAC,SAAS,IAAI,EAAE,CACvC,IAAIA,SAAS,SAAS,EAAE;YACpB,MAAMC,UAAUD,SAAS,SAAS,CAACH;YACnCC,MAAM,CAACE,SAAS,KAAK,CAAC,GAAG;gBAAE,GAAGF,MAAM,CAACE,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