@plone/volto 18.0.0-alpha.3 → 18.0.0-alpha.5
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/.eslintignore +1 -0
- package/.eslintrc +3 -3
- package/.prettierignore +8 -0
- package/.prettierrc +12 -0
- package/{packages/registry/.release-it.json → .release-it.json} +12 -6
- package/CHANGELOG.md +50 -4
- package/package.json +60 -127
- package/razzle.config.js +4 -7
- package/src/components/manage/Add/Add.jsx +6 -0
- package/src/components/manage/BlockChooser/BlockChooser.jsx +3 -1
- package/src/components/manage/BlockChooser/BlockChooserButton.jsx +5 -0
- package/src/components/manage/Blocks/Block/BlocksForm.jsx +4 -0
- package/src/components/manage/Blocks/Block/DefaultEdit.jsx +3 -1
- package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +5 -0
- package/src/components/manage/Blocks/Block/Settings.jsx +10 -1
- package/src/components/manage/Blocks/Container/Data.jsx +4 -1
- package/src/components/manage/Blocks/HeroImageLeft/Data.jsx +3 -1
- package/src/components/manage/Blocks/Image/ImageSidebar.jsx +4 -1
- package/src/components/manage/Blocks/Listing/ListingData.jsx +4 -1
- package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +3 -1
- package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +4 -0
- package/src/components/manage/Blocks/Teaser/Data.jsx +4 -1
- package/src/components/manage/Blocks/ToC/Edit.jsx +2 -0
- package/src/components/manage/Blocks/Video/VideoSidebar.jsx +3 -1
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +2 -2
- package/src/components/manage/Edit/Edit.jsx +1 -0
- package/src/components/manage/Form/Form.jsx +14 -3
- package/src/components/theme/Image/Image.jsx +4 -2
- package/src/components/theme/Image/Image.test.jsx +32 -0
- package/src/config/index.js +0 -4
- package/src/helpers/Blocks/Blocks.js +11 -2
- package/src/helpers/Extensions/withBlockSchemaEnhancer.js +20 -9
- package/src/helpers/Url/Url.js +5 -4
- package/src/helpers/Url/Url.test.js +52 -0
- package/src/icons/divide-horizontal.svg +0 -0
- package/src/icons/divide-vertical.svg +0 -0
- package/src/icons/hero.svg +0 -0
- package/src/icons/slider.svg +0 -0
- package/src/icons/summary.svg +0 -0
- package/src/middleware/api.js +1 -1
- package/theme/themes/default/elements/icon.overrides +0 -0
- package/theme/themes/default/globals/reset.overrides +0 -0
- package/theme/themes/default/globals/site.variables +0 -0
- package/theme/themes/default/modules/dropdown.overrides +0 -0
- package/theme/themes/default/modules/dropdown.variables +0 -0
- package/theme/themes/default/modules/modal.variables +0 -0
- package/theme/themes/default/modules/video.overrides +0 -0
- package/theme/themes/default/modules/video.variables +0 -0
- package/theme/themes/pastanaga/assets/fonts/icons.eot +0 -0
- package/theme/themes/pastanaga/assets/fonts/icons.svg +0 -0
- package/theme/themes/pastanaga/assets/fonts/icons.ttf +0 -0
- package/theme/themes/pastanaga/assets/fonts/icons.woff +0 -0
- package/theme/themes/pastanaga/globals/reset.overrides +0 -0
- package/theme/themes/pastanaga/globals/site.variables +0 -0
- package/theme/themes/pastanaga/modules/dropdown.variables +0 -0
- package/theme/themes/pastanaga/modules/modal.variables +0 -0
- package/theme/themes/pastanaga/modules/video.overrides +0 -0
- package/theme/themes/pastanaga/modules/video.variables +0 -0
- package/tsconfig.json +1 -4
- package/types/config/RichTextEditor/index.d.ts +5 -8
- package/types/helpers/AsyncConnect/index.d.ts +2 -2
- package/types/helpers/Extensions/withBlockSchemaEnhancer.d.ts +3 -1
- package/types/helpers/Url/Url.d.ts +3 -3
- package/types/icons/load-icons.d.ts +1 -1
- package/webpack-plugins/webpack-less-plugin.js +1 -0
- package/CODE_OF_CONDUCT.md +0 -13
- package/CONTRIBUTING.md +0 -7
- package/README.md +0 -154
- package/RELEASING.md +0 -73
- package/ROADMAP.md +0 -30
- package/SECURITY.md +0 -14
- package/apps/plone/node_modules/.bin/acorn +0 -17
- package/apps/plone/node_modules/.bin/addon +0 -17
- package/apps/plone/node_modules/.bin/autoprefixer +0 -17
- package/apps/plone/node_modules/.bin/browserslist +0 -17
- package/apps/plone/node_modules/.bin/build-storybook +0 -17
- package/apps/plone/node_modules/.bin/changelogupdater +0 -17
- package/apps/plone/node_modules/.bin/eslint +0 -17
- package/apps/plone/node_modules/.bin/eslint-config-prettier +0 -17
- package/apps/plone/node_modules/.bin/i18n +0 -17
- package/apps/plone/node_modules/.bin/jest +0 -17
- package/apps/plone/node_modules/.bin/lessc +0 -17
- package/apps/plone/node_modules/.bin/missdev +0 -17
- package/apps/plone/node_modules/.bin/prettier +0 -17
- package/apps/plone/node_modules/.bin/razzle +0 -17
- package/apps/plone/node_modules/.bin/server-test +0 -17
- package/apps/plone/node_modules/.bin/start-server-and-test +0 -17
- package/apps/plone/node_modules/.bin/start-storybook +0 -17
- package/apps/plone/node_modules/.bin/start-test +0 -17
- package/apps/plone/node_modules/.bin/storybook-server +0 -17
- package/apps/plone/node_modules/.bin/stylelint +0 -17
- package/apps/plone/node_modules/.bin/tlds +0 -17
- package/apps/plone/node_modules/.bin/ts-jest +0 -17
- package/apps/plone/node_modules/.bin/tsc +0 -17
- package/apps/plone/node_modules/.bin/tsserver +0 -17
- package/apps/plone/node_modules/.bin/uuid +0 -17
- package/apps/plone/node_modules/.bin/webpack +0 -17
- package/apps/plone/node_modules/.bin/webpack-dev-server +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/acorn +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/addon +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/browserslist +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/changelogupdater +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/eslint +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/eslint-config-prettier +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/i18n +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/prettier +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/release-it +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/stylelint +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/tsc +0 -17
- package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/tsserver +0 -17
- package/logos/Logo.png +0 -0
- package/logos/VoltoLogoEra2-dark-mode.png +0 -0
- package/logos/VoltoLogoEra2.png +0 -0
- package/logos/volto-colorful.png +0 -0
- package/logos/volto-colorful.svg +0 -35
- package/logos/volto-guide.png +0 -0
- package/logos/volto-h-transparent.svg +0 -6
- package/logos/volto-transparent.png +0 -0
- package/logos/volto-transparent.svg +0 -19
- package/logos/volto-transparent2.svg +0 -5
- package/logos/volto-yellow.svg +0 -29
- package/logos/volto.sketch +0 -0
- package/packages/README.md +0 -7
- package/packages/registry/.towncrier/towncrier_template.jinja +0 -10
- package/packages/registry/CHANGELOG.md +0 -16
- package/packages/registry/README.md +0 -207
- package/packages/registry/addon-registry.js +0 -603
- package/packages/registry/create-addons-loader.js +0 -116
- package/packages/registry/create-theme-addons-loader.js +0 -78
- package/packages/registry/news/.gitkeep +0 -0
- package/packages/registry/node_modules/.bin/browserslist +0 -17
- package/packages/registry/node_modules/.bin/parcel +0 -17
- package/packages/registry/node_modules/.bin/release-it +0 -17
- package/packages/registry/node_modules/.bin/tsc +0 -17
- package/packages/registry/node_modules/.bin/tsserver +0 -17
- package/packages/registry/node_modules/.bin/vitest +0 -17
- package/packages/registry/package.json +0 -76
- package/packages/registry/src/index.ts +0 -174
- package/packages/registry/src/registry.test.js +0 -111
- package/packages/registry/tsconfig.json +0 -32
- package/packages/scripts/CHANGELOG.md +0 -173
- package/packages/scripts/README.md +0 -128
- package/packages/scripts/addon/consolidate.js +0 -28
- package/packages/scripts/addon/generators.js +0 -213
- package/packages/scripts/addon/getAddonInfo.js +0 -65
- package/packages/scripts/addon/index.js +0 -88
- package/packages/scripts/addon/utils.js +0 -44
- package/packages/scripts/backportpr.js +0 -75
- package/packages/scripts/changelogupdater.cjs +0 -94
- package/packages/scripts/corepackagebump.js +0 -20
- package/packages/scripts/i18n.cjs +0 -310
- package/packages/scripts/package.json +0 -76
- package/packages/scripts/templates/towncrier_template.jinja +0 -10
- package/packages/types/Blocks/View.ts +0 -11
- package/packages/types/actions.ts +0 -15
- package/packages/types/breadcrumbs.ts +0 -10
- package/packages/types/config/Blocks.ts +0 -153
- package/packages/types/config/Content.ts +0 -62
- package/packages/types/config/Settings.ts +0 -86
- package/packages/types/config/Views.ts +0 -15
- package/packages/types/config/Widgets.ts +0 -7
- package/packages/types/config/index.ts +0 -21
- package/packages/types/content/common.ts +0 -60
- package/packages/types/content/get.ts +0 -66
- package/packages/types/index.ts +0 -0
- package/packages/types/navigation.ts +0 -12
- package/packages/types/node_modules/.bin/browserslist +0 -17
- package/packages/types/node_modules/.bin/parcel +0 -17
- package/packages/types/node_modules/.bin/release-it +0 -17
- package/packages/types/node_modules/.bin/tsc +0 -17
- package/packages/types/node_modules/.bin/tsserver +0 -17
- package/packages/types/package.json +0 -64
- package/packages/types/types.ts +0 -61
- package/packages/volto-slate/.i18n.babel.config.js +0 -1
- package/packages/volto-slate/README.md +0 -4
- package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +0 -90
- package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +0 -6
- package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +0 -6
- package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +0 -6
- package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +0 -10
- package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +0 -10
- package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +0 -30
- package/packages/volto-slate/build/messages/src/elementEditor/messages.json +0 -10
- package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +0 -6
- package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +0 -6
- package/packages/volto-slate/locales/de/LC_MESSAGES/volto.po +0 -148
- package/packages/volto-slate/locales/en/LC_MESSAGES/volto.po +0 -148
- package/packages/volto-slate/locales/volto.pot +0 -182
- package/packages/volto-slate/package.json +0 -43
- package/packages/volto-slate/src/actions/content.js +0 -30
- package/packages/volto-slate/src/actions/index.js +0 -3
- package/packages/volto-slate/src/actions/plugins.js +0 -9
- package/packages/volto-slate/src/actions/selection.js +0 -22
- package/packages/volto-slate/src/blocks/Table/Cell.jsx +0 -87
- package/packages/volto-slate/src/blocks/Table/Cell.test.js +0 -54
- package/packages/volto-slate/src/blocks/Table/TableBlockEdit.jsx +0 -694
- package/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js +0 -40
- package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +0 -150
- package/packages/volto-slate/src/blocks/Table/TableBlockView.test.js +0 -49
- package/packages/volto-slate/src/blocks/Table/deconstruct.js +0 -113
- package/packages/volto-slate/src/blocks/Table/extensions/normalizeTable.js +0 -5
- package/packages/volto-slate/src/blocks/Table/index.js +0 -60
- package/packages/volto-slate/src/blocks/Table/schema.js +0 -122
- package/packages/volto-slate/src/blocks/Text/DefaultTextBlockEditor.jsx +0 -304
- package/packages/volto-slate/src/blocks/Text/DetachedTextBlockEditor.jsx +0 -77
- package/packages/volto-slate/src/blocks/Text/MarkdownIntroduction.jsx +0 -59
- package/packages/volto-slate/src/blocks/Text/PluginSidebar.jsx +0 -18
- package/packages/volto-slate/src/blocks/Text/ShortcutListing.jsx +0 -28
- package/packages/volto-slate/src/blocks/Text/SlashMenu.jsx +0 -203
- package/packages/volto-slate/src/blocks/Text/TextBlockEdit.jsx +0 -38
- package/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js +0 -107
- package/packages/volto-slate/src/blocks/Text/TextBlockSchema.js +0 -54
- package/packages/volto-slate/src/blocks/Text/TextBlockView.jsx +0 -31
- package/packages/volto-slate/src/blocks/Text/css/editor.css +0 -18
- package/packages/volto-slate/src/blocks/Text/extensions/Readme.md +0 -49
- package/packages/volto-slate/src/blocks/Text/extensions/breakList.js +0 -100
- package/packages/volto-slate/src/blocks/Text/extensions/index.js +0 -6
- package/packages/volto-slate/src/blocks/Text/extensions/insertBreak.js +0 -57
- package/packages/volto-slate/src/blocks/Text/extensions/isSelected.js +0 -7
- package/packages/volto-slate/src/blocks/Text/extensions/normalizeExternalData.js +0 -7
- package/packages/volto-slate/src/blocks/Text/extensions/withDeserializers.js +0 -87
- package/packages/volto-slate/src/blocks/Text/extensions/withLists.js +0 -5
- package/packages/volto-slate/src/blocks/Text/index.js +0 -171
- package/packages/volto-slate/src/blocks/Text/keyboard/backspaceInList.js +0 -58
- package/packages/volto-slate/src/blocks/Text/keyboard/breakBlocks.js +0 -3
- package/packages/volto-slate/src/blocks/Text/keyboard/cancelEsc.js +0 -7
- package/packages/volto-slate/src/blocks/Text/keyboard/indentListItems.js +0 -240
- package/packages/volto-slate/src/blocks/Text/keyboard/index.js +0 -52
- package/packages/volto-slate/src/blocks/Text/keyboard/joinBlocks.js +0 -180
- package/packages/volto-slate/src/blocks/Text/keyboard/moveListItems.js +0 -124
- package/packages/volto-slate/src/blocks/Text/keyboard/slashMenu.js +0 -19
- package/packages/volto-slate/src/blocks/Text/keyboard/softBreak.js +0 -7
- package/packages/volto-slate/src/blocks/Text/keyboard/traverseBlocks.js +0 -81
- package/packages/volto-slate/src/blocks/Text/keyboard/unwrapEmptyString.js +0 -26
- package/packages/volto-slate/src/blocks/Text/schema.js +0 -39
- package/packages/volto-slate/src/constants.js +0 -123
- package/packages/volto-slate/src/editor/EditorContext.jsx +0 -5
- package/packages/volto-slate/src/editor/EditorReference.jsx +0 -22
- package/packages/volto-slate/src/editor/SlateEditor.jsx +0 -375
- package/packages/volto-slate/src/editor/config.jsx +0 -344
- package/packages/volto-slate/src/editor/decorate.js +0 -68
- package/packages/volto-slate/src/editor/deserialize.js +0 -185
- package/packages/volto-slate/src/editor/extensions/index.js +0 -6
- package/packages/volto-slate/src/editor/extensions/insertBreak.js +0 -15
- package/packages/volto-slate/src/editor/extensions/insertData.js +0 -159
- package/packages/volto-slate/src/editor/extensions/isInline.js +0 -14
- package/packages/volto-slate/src/editor/extensions/normalizeExternalData.js +0 -8
- package/packages/volto-slate/src/editor/extensions/normalizeNode.js +0 -48
- package/packages/volto-slate/src/editor/extensions/withDeserializers.js +0 -15
- package/packages/volto-slate/src/editor/extensions/withTestingFeatures.jsx +0 -84
- package/packages/volto-slate/src/editor/index.js +0 -14
- package/packages/volto-slate/src/editor/less/editor.less +0 -173
- package/packages/volto-slate/src/editor/less/globals.less +0 -18
- package/packages/volto-slate/src/editor/less/slate.less +0 -28
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/deserialize.js +0 -90
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/extensions.js +0 -32
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/index.js +0 -50
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/render.jsx +0 -37
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/schema.js +0 -114
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/styles.less +0 -8
- package/packages/volto-slate/src/editor/plugins/Blockquote/index.js +0 -30
- package/packages/volto-slate/src/editor/plugins/Callout/index.js +0 -34
- package/packages/volto-slate/src/editor/plugins/Image/deconstruct.js +0 -30
- package/packages/volto-slate/src/editor/plugins/Image/extensions.js +0 -51
- package/packages/volto-slate/src/editor/plugins/Image/index.js +0 -11
- package/packages/volto-slate/src/editor/plugins/Image/render.jsx +0 -22
- package/packages/volto-slate/src/editor/plugins/Link/extensions.js +0 -58
- package/packages/volto-slate/src/editor/plugins/Link/index.js +0 -164
- package/packages/volto-slate/src/editor/plugins/Link/render.jsx +0 -54
- package/packages/volto-slate/src/editor/plugins/Markdown/constants.js +0 -81
- package/packages/volto-slate/src/editor/plugins/Markdown/extensions.js +0 -334
- package/packages/volto-slate/src/editor/plugins/Markdown/index.js +0 -28
- package/packages/volto-slate/src/editor/plugins/Markdown/utils.js +0 -198
- package/packages/volto-slate/src/editor/plugins/StyleMenu/StyleMenu.jsx +0 -153
- package/packages/volto-slate/src/editor/plugins/StyleMenu/index.js +0 -19
- package/packages/volto-slate/src/editor/plugins/StyleMenu/style.less +0 -29
- package/packages/volto-slate/src/editor/plugins/StyleMenu/utils.js +0 -168
- package/packages/volto-slate/src/editor/plugins/Table/TableButton.jsx +0 -142
- package/packages/volto-slate/src/editor/plugins/Table/TableCell.jsx +0 -44
- package/packages/volto-slate/src/editor/plugins/Table/TableContainer.jsx +0 -37
- package/packages/volto-slate/src/editor/plugins/Table/TableSizePicker.jsx +0 -83
- package/packages/volto-slate/src/editor/plugins/Table/extensions.js +0 -87
- package/packages/volto-slate/src/editor/plugins/Table/index.js +0 -390
- package/packages/volto-slate/src/editor/plugins/Table/less/public.less +0 -29
- package/packages/volto-slate/src/editor/plugins/Table/less/table.less +0 -28
- package/packages/volto-slate/src/editor/plugins/Table/render.jsx +0 -30
- package/packages/volto-slate/src/editor/plugins/index.js +0 -19
- package/packages/volto-slate/src/editor/render.jsx +0 -224
- package/packages/volto-slate/src/editor/ui/BasicToolbar.jsx +0 -11
- package/packages/volto-slate/src/editor/ui/BlockButton.jsx +0 -31
- package/packages/volto-slate/src/editor/ui/ClearFormattingButton.jsx +0 -21
- package/packages/volto-slate/src/editor/ui/ExpandedToolbar.jsx +0 -18
- package/packages/volto-slate/src/editor/ui/Expando.jsx +0 -5
- package/packages/volto-slate/src/editor/ui/InlineToolbar.jsx +0 -73
- package/packages/volto-slate/src/editor/ui/MarkButton.jsx +0 -23
- package/packages/volto-slate/src/editor/ui/MarkElementButton.jsx +0 -30
- package/packages/volto-slate/src/editor/ui/Menu.jsx +0 -13
- package/packages/volto-slate/src/editor/ui/PositionedToolbar.jsx +0 -32
- package/packages/volto-slate/src/editor/ui/Separator.jsx +0 -7
- package/packages/volto-slate/src/editor/ui/SlateContextToolbar.jsx +0 -13
- package/packages/volto-slate/src/editor/ui/SlateToolbar.jsx +0 -96
- package/packages/volto-slate/src/editor/ui/Toolbar.jsx +0 -103
- package/packages/volto-slate/src/editor/ui/ToolbarButton.jsx +0 -33
- package/packages/volto-slate/src/editor/ui/ToolbarButton.test.js +0 -25
- package/packages/volto-slate/src/editor/ui/index.js +0 -15
- package/packages/volto-slate/src/editor/utils.js +0 -248
- package/packages/volto-slate/src/elementEditor/ContextButtons.jsx +0 -56
- package/packages/volto-slate/src/elementEditor/PluginEditor.jsx +0 -124
- package/packages/volto-slate/src/elementEditor/Readme.md +0 -6
- package/packages/volto-slate/src/elementEditor/SchemaProvider.jsx +0 -3
- package/packages/volto-slate/src/elementEditor/SidebarEditor.jsx +0 -46
- package/packages/volto-slate/src/elementEditor/ToolbarButton.jsx +0 -44
- package/packages/volto-slate/src/elementEditor/index.js +0 -5
- package/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js +0 -100
- package/packages/volto-slate/src/elementEditor/messages.js +0 -14
- package/packages/volto-slate/src/elementEditor/utils.js +0 -226
- package/packages/volto-slate/src/hooks/index.js +0 -3
- package/packages/volto-slate/src/hooks/useEditorContext.js +0 -6
- package/packages/volto-slate/src/hooks/useIsomorphicLayoutEffect.js +0 -7
- package/packages/volto-slate/src/hooks/useSelectionPosition.js +0 -25
- package/packages/volto-slate/src/i18n.js +0 -180
- package/packages/volto-slate/src/icons/hashlink.svg +0 -57
- package/packages/volto-slate/src/index.js +0 -61
- package/packages/volto-slate/src/reducers/content.js +0 -74
- package/packages/volto-slate/src/reducers/index.js +0 -3
- package/packages/volto-slate/src/reducers/plugins.js +0 -17
- package/packages/volto-slate/src/reducers/selection.js +0 -16
- package/packages/volto-slate/src/utils/blocks.js +0 -375
- package/packages/volto-slate/src/utils/blocks.test.js +0 -138
- package/packages/volto-slate/src/utils/editor.js +0 -31
- package/packages/volto-slate/src/utils/image.js +0 -25
- package/packages/volto-slate/src/utils/index.js +0 -11
- package/packages/volto-slate/src/utils/internals.js +0 -46
- package/packages/volto-slate/src/utils/lists.js +0 -92
- package/packages/volto-slate/src/utils/marks.js +0 -104
- package/packages/volto-slate/src/utils/mime-types.js +0 -24
- package/packages/volto-slate/src/utils/nodes.js +0 -4
- package/packages/volto-slate/src/utils/ops.js +0 -20
- package/packages/volto-slate/src/utils/random.js +0 -17
- package/packages/volto-slate/src/utils/selection.js +0 -236
- package/packages/volto-slate/src/utils/slate-string-utils.js +0 -408
- package/packages/volto-slate/src/utils/volto-blocks.js +0 -314
- package/packages/volto-slate/src/widgets/ErrorBoundary.jsx +0 -27
- package/packages/volto-slate/src/widgets/HtmlSlateWidget.jsx +0 -139
- package/packages/volto-slate/src/widgets/ObjectByTypeWidget.jsx +0 -49
- package/packages/volto-slate/src/widgets/RichTextWidget.jsx +0 -72
- package/packages/volto-slate/src/widgets/RichTextWidgetView.jsx +0 -37
- package/packages/volto-slate/src/widgets/style.css +0 -21
- package/types/components/manage/Blocks/Video/Body.test.d.ts +0 -1
|
@@ -4,7 +4,7 @@ import schemaHero from './schema.js';
|
|
|
4
4
|
import { BlockDataForm } from '@plone/volto/components';
|
|
5
5
|
|
|
6
6
|
const HeroImageLeftBlockData = (props) => {
|
|
7
|
-
const { block, data, onChangeBlock } = props;
|
|
7
|
+
const { block, data, onChangeBlock, navRoot, contentType } = props;
|
|
8
8
|
const intl = useIntl();
|
|
9
9
|
const schema = schemaHero({ ...props, intl });
|
|
10
10
|
return (
|
|
@@ -20,6 +20,8 @@ const HeroImageLeftBlockData = (props) => {
|
|
|
20
20
|
onChangeBlock={onChangeBlock}
|
|
21
21
|
formData={data}
|
|
22
22
|
block={block}
|
|
23
|
+
navRoot={navRoot}
|
|
24
|
+
contentType={contentType}
|
|
23
25
|
/>
|
|
24
26
|
);
|
|
25
27
|
};
|
|
@@ -9,7 +9,8 @@ import imageSVG from '@plone/volto/icons/image.svg';
|
|
|
9
9
|
import trashSVG from '@plone/volto/icons/delete.svg';
|
|
10
10
|
|
|
11
11
|
const ImageSidebar = (props) => {
|
|
12
|
-
const { blocksConfig, data, block, onChangeBlock } =
|
|
12
|
+
const { blocksConfig, data, block, onChangeBlock, navRoot, contentType } =
|
|
13
|
+
props;
|
|
13
14
|
const intl = useIntl();
|
|
14
15
|
const schema = ImageSchema({ formData: data, intl });
|
|
15
16
|
return (
|
|
@@ -94,6 +95,8 @@ const ImageSidebar = (props) => {
|
|
|
94
95
|
formData={data}
|
|
95
96
|
block={block}
|
|
96
97
|
blocksConfig={blocksConfig}
|
|
98
|
+
navRoot={navRoot}
|
|
99
|
+
contentType={contentType}
|
|
97
100
|
/>
|
|
98
101
|
</>
|
|
99
102
|
);
|
|
@@ -4,7 +4,8 @@ import { useIntl } from 'react-intl';
|
|
|
4
4
|
import { BlockDataForm } from '@plone/volto/components';
|
|
5
5
|
|
|
6
6
|
const ListingData = (props) => {
|
|
7
|
-
const { data, block, blocksConfig, onChangeBlock } =
|
|
7
|
+
const { data, block, blocksConfig, onChangeBlock, navRoot, contentType } =
|
|
8
|
+
props;
|
|
8
9
|
const intl = useIntl();
|
|
9
10
|
const schema = blocksConfig.listing.blockSchema({
|
|
10
11
|
...props,
|
|
@@ -25,6 +26,8 @@ const ListingData = (props) => {
|
|
|
25
26
|
formData={data}
|
|
26
27
|
blocksConfig={blocksConfig}
|
|
27
28
|
block={block}
|
|
29
|
+
navRoot={navRoot}
|
|
30
|
+
contentType={contentType}
|
|
28
31
|
/>
|
|
29
32
|
);
|
|
30
33
|
};
|
|
@@ -18,7 +18,7 @@ const messages = defineMessages({
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const MapsSidebar = (props) => {
|
|
21
|
-
const { data, block, onChangeBlock } = props;
|
|
21
|
+
const { data, block, onChangeBlock, navRoot, contentType } = props;
|
|
22
22
|
const intl = useIntl();
|
|
23
23
|
const schema = MapsSchema({ ...props, intl });
|
|
24
24
|
|
|
@@ -42,6 +42,8 @@ const MapsSidebar = (props) => {
|
|
|
42
42
|
onChangeBlock={onChangeBlock}
|
|
43
43
|
formData={data}
|
|
44
44
|
block={block}
|
|
45
|
+
navRoot={navRoot}
|
|
46
|
+
contentType={contentType}
|
|
45
47
|
/>
|
|
46
48
|
)}
|
|
47
49
|
</>
|
|
@@ -26,6 +26,8 @@ const SearchBlockEdit = (props) => {
|
|
|
26
26
|
data,
|
|
27
27
|
selected,
|
|
28
28
|
intl,
|
|
29
|
+
navRoot,
|
|
30
|
+
contentType,
|
|
29
31
|
onTriggerSearch,
|
|
30
32
|
querystring = {},
|
|
31
33
|
} = props;
|
|
@@ -83,6 +85,8 @@ const SearchBlockEdit = (props) => {
|
|
|
83
85
|
}}
|
|
84
86
|
onChangeBlock={onChangeBlock}
|
|
85
87
|
formData={data}
|
|
88
|
+
navRoot={navRoot}
|
|
89
|
+
contentType={contentType}
|
|
86
90
|
/>
|
|
87
91
|
</SidebarPortal>
|
|
88
92
|
</>
|
|
@@ -14,7 +14,8 @@ const messages = defineMessages({
|
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
const TeaserData = (props) => {
|
|
17
|
-
const { block, blocksConfig, data, onChangeBlock } =
|
|
17
|
+
const { block, blocksConfig, data, onChangeBlock, navRoot, contentType } =
|
|
18
|
+
props;
|
|
18
19
|
const intl = useIntl();
|
|
19
20
|
|
|
20
21
|
const reset = () => {
|
|
@@ -64,6 +65,8 @@ const TeaserData = (props) => {
|
|
|
64
65
|
block={block}
|
|
65
66
|
blocksConfig={blocksConfig}
|
|
66
67
|
headerActions={HeaderActions}
|
|
68
|
+
navRoot={navRoot}
|
|
69
|
+
contentType={contentType}
|
|
67
70
|
/>
|
|
68
71
|
);
|
|
69
72
|
};
|
|
@@ -18,7 +18,7 @@ const messages = defineMessages({
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const VideoSidebar = (props) => {
|
|
21
|
-
const { data, block, onChangeBlock } = props;
|
|
21
|
+
const { data, block, onChangeBlock, navRoot, contentType } = props;
|
|
22
22
|
const intl = useIntl();
|
|
23
23
|
const schema = VideoBlockSchema({ ...props, intl });
|
|
24
24
|
|
|
@@ -42,6 +42,8 @@ const VideoSidebar = (props) => {
|
|
|
42
42
|
onChangeBlock={onChangeBlock}
|
|
43
43
|
formData={data}
|
|
44
44
|
block={block}
|
|
45
|
+
navRoot={navRoot}
|
|
46
|
+
contentType={contentType}
|
|
45
47
|
/>
|
|
46
48
|
)}
|
|
47
49
|
</>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* TODO Enrich with features of user control panel. Then replace user control panel.
|
|
4
4
|
*/
|
|
5
5
|
import React, { useEffect } from 'react';
|
|
6
|
-
import { find
|
|
6
|
+
import { find } from 'lodash';
|
|
7
7
|
import { Portal } from 'react-portal';
|
|
8
8
|
import { useHistory } from 'react-router';
|
|
9
9
|
import { Link, useLocation } from 'react-router-dom';
|
|
@@ -38,7 +38,7 @@ const UserGroupMembershipPanel = () => {
|
|
|
38
38
|
(state) => state.controlpanels.systeminformation,
|
|
39
39
|
);
|
|
40
40
|
const can_use_group_membership_panel = systeminformation
|
|
41
|
-
?
|
|
41
|
+
? parseFloat(systeminformation?.plone_restapi_version.slice(0, 4)) >= 8.24
|
|
42
42
|
: false;
|
|
43
43
|
const actions = useSelector((state) => state.actions?.actions ?? {});
|
|
44
44
|
const ploneSetupAction = find(actions.user, {
|
|
@@ -286,6 +286,7 @@ class Edit extends Component {
|
|
|
286
286
|
<Form
|
|
287
287
|
isEditForm
|
|
288
288
|
ref={this.form}
|
|
289
|
+
navRoot={this.props.content?.['@components']?.navroot?.navroot || {}}
|
|
289
290
|
schema={this.props.schema}
|
|
290
291
|
type={this.props.content?.['@type']}
|
|
291
292
|
formData={this.props.content}
|
|
@@ -148,7 +148,10 @@ class Form extends Component {
|
|
|
148
148
|
...formData,
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
|
|
152
|
+
// We initialize the formData snapshot in here, before the initial data checks
|
|
153
|
+
const initialFormData = cloneDeep(formData);
|
|
154
|
+
|
|
152
155
|
// Adding fallback in case the fields are empty, so we are sure that the edit form
|
|
153
156
|
// shows at least the default blocks
|
|
154
157
|
if (
|
|
@@ -200,7 +203,7 @@ class Form extends Component {
|
|
|
200
203
|
|
|
201
204
|
this.state = {
|
|
202
205
|
formData,
|
|
203
|
-
initialFormData
|
|
206
|
+
initialFormData,
|
|
204
207
|
errors: {},
|
|
205
208
|
selected: selectedBlock,
|
|
206
209
|
multiSelected: [],
|
|
@@ -541,7 +544,13 @@ class Form extends Component {
|
|
|
541
544
|
*/
|
|
542
545
|
render() {
|
|
543
546
|
const { settings } = config;
|
|
544
|
-
const {
|
|
547
|
+
const {
|
|
548
|
+
schema: originalSchema,
|
|
549
|
+
onCancel,
|
|
550
|
+
onSubmit,
|
|
551
|
+
navRoot,
|
|
552
|
+
type,
|
|
553
|
+
} = this.props;
|
|
545
554
|
const { formData } = this.state;
|
|
546
555
|
const schema = this.removeBlocksLayoutFields(originalSchema);
|
|
547
556
|
const Container =
|
|
@@ -590,6 +599,8 @@ class Form extends Component {
|
|
|
590
599
|
onChangeField={this.onChangeField}
|
|
591
600
|
onSelectBlock={this.onSelectBlock}
|
|
592
601
|
properties={formData}
|
|
602
|
+
navRoot={navRoot}
|
|
603
|
+
type={type}
|
|
593
604
|
pathname={this.props.pathname}
|
|
594
605
|
selectedBlock={this.state.selected}
|
|
595
606
|
multiSelected={this.state.multiSelected}
|
|
@@ -45,8 +45,10 @@ export default function Image({
|
|
|
45
45
|
if (!image) return null;
|
|
46
46
|
|
|
47
47
|
const isSvg = image['content-type'] === 'image/svg+xml';
|
|
48
|
+
// In case `base_path` is present (`preview_image_link`) use it as base path
|
|
49
|
+
const basePath = image.base_path || item['@id'];
|
|
48
50
|
|
|
49
|
-
attrs.src = `${flattenToAppURL(
|
|
51
|
+
attrs.src = `${flattenToAppURL(basePath)}/${image.download}`;
|
|
50
52
|
attrs.width = image.width;
|
|
51
53
|
attrs.height = image.height;
|
|
52
54
|
attrs.className = cx(className, { responsive });
|
|
@@ -61,7 +63,7 @@ export default function Image({
|
|
|
61
63
|
attrs.srcSet = sortedScales
|
|
62
64
|
.map(
|
|
63
65
|
(scale) =>
|
|
64
|
-
`${flattenToAppURL(
|
|
66
|
+
`${flattenToAppURL(basePath)}/${scale.download} ${scale.width}w`,
|
|
65
67
|
)
|
|
66
68
|
.join(', ');
|
|
67
69
|
}
|
|
@@ -113,6 +113,38 @@ test('renders an image component from a catalog brain', () => {
|
|
|
113
113
|
expect(json).toMatchSnapshot();
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
+
test('renders an image component from a catalog brain using `preview_image_link`', () => {
|
|
117
|
+
const component = renderer.create(
|
|
118
|
+
<Image
|
|
119
|
+
item={{
|
|
120
|
+
'@id': 'http://localhost:3000/blog/blog-post',
|
|
121
|
+
image_field: 'preview_image_link',
|
|
122
|
+
image_scales: {
|
|
123
|
+
preview_image_link: [
|
|
124
|
+
{
|
|
125
|
+
base_path: '/image.png',
|
|
126
|
+
download: '@@images/image.png',
|
|
127
|
+
width: 400,
|
|
128
|
+
height: 400,
|
|
129
|
+
scales: {
|
|
130
|
+
preview: {
|
|
131
|
+
download: '@@images/image-400.png',
|
|
132
|
+
width: 400,
|
|
133
|
+
height: 400,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
}}
|
|
140
|
+
imageField="preview_image_link"
|
|
141
|
+
alt="alt text"
|
|
142
|
+
/>,
|
|
143
|
+
);
|
|
144
|
+
const json = component.toJSON();
|
|
145
|
+
expect(json).toMatchSnapshot();
|
|
146
|
+
});
|
|
147
|
+
|
|
116
148
|
test('renders an image component from a string src', () => {
|
|
117
149
|
const component = renderer.create(
|
|
118
150
|
<Image
|
package/src/config/index.js
CHANGED
|
@@ -517,7 +517,10 @@ export function applySchemaDefaults({ data = {}, schema, intl }) {
|
|
|
517
517
|
* @param {Object} params An object with data, intl and anything else
|
|
518
518
|
* @return {Object} Derived data, with the defaults extracted from the schema
|
|
519
519
|
*/
|
|
520
|
-
export function applyBlockDefaults(
|
|
520
|
+
export function applyBlockDefaults(
|
|
521
|
+
{ data, intl, navRoot, contentType, ...rest },
|
|
522
|
+
blocksConfig,
|
|
523
|
+
) {
|
|
521
524
|
// We pay attention to not break on a missing (invalid) block.
|
|
522
525
|
const block_type = data?.['@type'];
|
|
523
526
|
const { blockSchema } =
|
|
@@ -528,7 +531,13 @@ export function applyBlockDefaults({ data, intl, ...rest }, blocksConfig) {
|
|
|
528
531
|
typeof blockSchema === 'function'
|
|
529
532
|
? blockSchema({ data, intl, ...rest })
|
|
530
533
|
: blockSchema;
|
|
531
|
-
schema = applySchemaEnhancer({
|
|
534
|
+
schema = applySchemaEnhancer({
|
|
535
|
+
schema,
|
|
536
|
+
formData: data,
|
|
537
|
+
intl,
|
|
538
|
+
navRoot,
|
|
539
|
+
contentType,
|
|
540
|
+
});
|
|
532
541
|
|
|
533
542
|
return applySchemaDefaults({ data, schema, intl });
|
|
534
543
|
}
|
|
@@ -199,6 +199,8 @@ export const applySchemaEnhancer = ({
|
|
|
199
199
|
formData,
|
|
200
200
|
intl,
|
|
201
201
|
blocksConfig = config.blocks.blocksConfig,
|
|
202
|
+
navRoot,
|
|
203
|
+
contentType,
|
|
202
204
|
}) => {
|
|
203
205
|
let schema, schemaEnhancer;
|
|
204
206
|
|
|
@@ -215,6 +217,8 @@ export const applySchemaEnhancer = ({
|
|
|
215
217
|
schema: cloneDeepSchema(originalSchema),
|
|
216
218
|
formData,
|
|
217
219
|
intl,
|
|
220
|
+
navRoot,
|
|
221
|
+
contentType,
|
|
218
222
|
});
|
|
219
223
|
return schema || originalSchema;
|
|
220
224
|
}
|
|
@@ -230,12 +234,15 @@ export const applySchemaEnhancer = ({
|
|
|
230
234
|
schema: cloneDeepSchema(originalSchema),
|
|
231
235
|
formData,
|
|
232
236
|
intl,
|
|
237
|
+
navRoot,
|
|
238
|
+
contentType,
|
|
233
239
|
})
|
|
234
240
|
: cloneDeepSchema(originalSchema);
|
|
235
241
|
|
|
236
242
|
// Finalize the schema with a schemaEnhancer in the block config;
|
|
237
243
|
schemaEnhancer = blocksConfig?.[blockType]?.schemaEnhancer;
|
|
238
|
-
if (schemaEnhancer)
|
|
244
|
+
if (schemaEnhancer)
|
|
245
|
+
schema = schemaEnhancer({ schema, formData, intl, navRoot, contentType });
|
|
239
246
|
|
|
240
247
|
return schema || originalSchema;
|
|
241
248
|
};
|
|
@@ -248,7 +255,7 @@ export const applySchemaEnhancer = ({
|
|
|
248
255
|
* - adds the variation selection input (as a choice widget)
|
|
249
256
|
*/
|
|
250
257
|
export const withVariationSchemaEnhancer = (FormComponent) => (props) => {
|
|
251
|
-
const { formData, schema: originalSchema } = props;
|
|
258
|
+
const { formData, schema: originalSchema, navRoot, contentType } = props;
|
|
252
259
|
const intl = useIntl();
|
|
253
260
|
|
|
254
261
|
const blocksConfig = getBlocksConfig(props);
|
|
@@ -256,15 +263,10 @@ export const withVariationSchemaEnhancer = (FormComponent) => (props) => {
|
|
|
256
263
|
const blockType = formData['@type'];
|
|
257
264
|
const variations = blocksConfig[blockType]?.variations || [];
|
|
258
265
|
|
|
259
|
-
let schema =
|
|
260
|
-
schema: originalSchema,
|
|
261
|
-
formData,
|
|
262
|
-
intl,
|
|
263
|
-
blocksConfig,
|
|
264
|
-
});
|
|
266
|
+
let schema = cloneDeepSchema(originalSchema);
|
|
265
267
|
|
|
266
268
|
if (variations.length > 1) {
|
|
267
|
-
addExtensionFieldToSchema({
|
|
269
|
+
schema = addExtensionFieldToSchema({
|
|
268
270
|
schema,
|
|
269
271
|
name: 'variation',
|
|
270
272
|
items: variations,
|
|
@@ -274,6 +276,15 @@ export const withVariationSchemaEnhancer = (FormComponent) => (props) => {
|
|
|
274
276
|
});
|
|
275
277
|
}
|
|
276
278
|
|
|
279
|
+
schema = applySchemaEnhancer({
|
|
280
|
+
schema,
|
|
281
|
+
formData,
|
|
282
|
+
intl,
|
|
283
|
+
blocksConfig,
|
|
284
|
+
navRoot,
|
|
285
|
+
contentType,
|
|
286
|
+
});
|
|
287
|
+
|
|
277
288
|
return <FormComponent {...props} schema={schema} />;
|
|
278
289
|
};
|
|
279
290
|
|
package/src/helpers/Url/Url.js
CHANGED
|
@@ -366,19 +366,20 @@ export const URLUtils = {
|
|
|
366
366
|
* @returns {object} New object with the flattened scale URLs
|
|
367
367
|
*/
|
|
368
368
|
export function flattenScales(path, image) {
|
|
369
|
-
function removeObjectIdFromURL(
|
|
370
|
-
return scale.replace(`${
|
|
369
|
+
function removeObjectIdFromURL(basePath, scale) {
|
|
370
|
+
return scale.replace(`${basePath}/`, '');
|
|
371
371
|
}
|
|
372
372
|
if (!image) return;
|
|
373
373
|
|
|
374
|
+
const basePath = image.base_path || path;
|
|
374
375
|
const imageInfo = {
|
|
375
376
|
...image,
|
|
376
|
-
download: flattenToAppURL(removeObjectIdFromURL(
|
|
377
|
+
download: flattenToAppURL(removeObjectIdFromURL(basePath, image.download)),
|
|
377
378
|
};
|
|
378
379
|
|
|
379
380
|
Object.keys(imageInfo.scales).forEach((key) => {
|
|
380
381
|
imageInfo.scales[key].download = flattenToAppURL(
|
|
381
|
-
removeObjectIdFromURL(
|
|
382
|
+
removeObjectIdFromURL(basePath, image.scales[key].download),
|
|
382
383
|
);
|
|
383
384
|
});
|
|
384
385
|
|
|
@@ -351,6 +351,7 @@ describe('Url', () => {
|
|
|
351
351
|
);
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
|
+
|
|
354
355
|
describe('flattenScales', () => {
|
|
355
356
|
it('flattenScales image is not set', () => {
|
|
356
357
|
const id = '/halfdome2022-2.jpg';
|
|
@@ -405,6 +406,57 @@ describe('Url', () => {
|
|
|
405
406
|
width: 1182,
|
|
406
407
|
});
|
|
407
408
|
});
|
|
409
|
+
|
|
410
|
+
it('[preview_image_link] flattenScales test from the catalog', () => {
|
|
411
|
+
const id = '/halfdome2022-2.jpg';
|
|
412
|
+
const image = {
|
|
413
|
+
base_path: '/broccoli.jpg',
|
|
414
|
+
'content-type': 'image/jpeg',
|
|
415
|
+
download: '@@images/image-1182-cf763ae23c52340d8a17a7afdb26c8cb.jpeg',
|
|
416
|
+
filename: 'halfdome2022.jpg',
|
|
417
|
+
height: 665,
|
|
418
|
+
scales: {
|
|
419
|
+
great: {
|
|
420
|
+
download:
|
|
421
|
+
'@@images/image-1200-539ab119ebadc7d011798980a4a5e8d4.jpeg',
|
|
422
|
+
height: 665,
|
|
423
|
+
width: 1182,
|
|
424
|
+
},
|
|
425
|
+
huge: {
|
|
426
|
+
download:
|
|
427
|
+
'@@images/image-1600-188968febc677890c1b99d5339f9bef1.jpeg',
|
|
428
|
+
height: 665,
|
|
429
|
+
width: 1182,
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
size: 319364,
|
|
433
|
+
width: 1182,
|
|
434
|
+
};
|
|
435
|
+
expect(flattenScales(id, image)).toStrictEqual({
|
|
436
|
+
base_path: '/broccoli.jpg',
|
|
437
|
+
'content-type': 'image/jpeg',
|
|
438
|
+
download: '@@images/image-1182-cf763ae23c52340d8a17a7afdb26c8cb.jpeg',
|
|
439
|
+
filename: 'halfdome2022.jpg',
|
|
440
|
+
height: 665,
|
|
441
|
+
scales: {
|
|
442
|
+
great: {
|
|
443
|
+
download:
|
|
444
|
+
'@@images/image-1200-539ab119ebadc7d011798980a4a5e8d4.jpeg',
|
|
445
|
+
height: 665,
|
|
446
|
+
width: 1182,
|
|
447
|
+
},
|
|
448
|
+
huge: {
|
|
449
|
+
download:
|
|
450
|
+
'@@images/image-1600-188968febc677890c1b99d5339f9bef1.jpeg',
|
|
451
|
+
height: 665,
|
|
452
|
+
width: 1182,
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
size: 319364,
|
|
456
|
+
width: 1182,
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
|
|
408
460
|
it('flattenScales test from serialization', () => {
|
|
409
461
|
const id = 'http://localhost:3000/halfdome2022-2.jpg';
|
|
410
462
|
const image = {
|
|
File without changes
|
|
File without changes
|
package/src/icons/hero.svg
CHANGED
|
File without changes
|
package/src/icons/slider.svg
CHANGED
|
File without changes
|
package/src/icons/summary.svg
CHANGED
|
File without changes
|
package/src/middleware/api.js
CHANGED
|
@@ -230,7 +230,7 @@ const apiMiddlewareFactory =
|
|
|
230
230
|
config.settings.supportedLanguages.includes(lang)
|
|
231
231
|
) {
|
|
232
232
|
const langFileName = toGettextLang(lang);
|
|
233
|
-
import('
|
|
233
|
+
import('@root/../locales/' + langFileName + '.json').then(
|
|
234
234
|
(locale) => {
|
|
235
235
|
dispatch(changeLanguage(lang, locale.default));
|
|
236
236
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/tsconfig.json
CHANGED
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
"jsx": "react-jsx",
|
|
18
18
|
"paths": {
|
|
19
19
|
"@plone/volto/*": ["./src/*"],
|
|
20
|
-
"@plone/volto-slate/*": ["
|
|
21
|
-
"@plone/registry/*": ["./packages/registry/src/*"],
|
|
22
|
-
"@plone/registry": ["./packages/registry/src"],
|
|
23
|
-
"@plone/types/*": ["./packages/types/*"],
|
|
20
|
+
"@plone/volto-slate/*": ["../volto-slate/src/*"],
|
|
24
21
|
"@root/*": ["./src/*"]
|
|
25
22
|
}
|
|
26
23
|
},
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
export function richtextEditorSettings(props: any): {
|
|
2
2
|
extendedBlockRenderMap: any;
|
|
3
|
-
blockStyleFn:
|
|
4
|
-
listBlockTypes:
|
|
5
|
-
richTextEditorPlugins: any
|
|
6
|
-
richTextEditorInlineToolbarButtons: any
|
|
7
|
-
FromHTMLCustomBlockFn:
|
|
3
|
+
blockStyleFn: any;
|
|
4
|
+
listBlockTypes: any;
|
|
5
|
+
richTextEditorPlugins: any;
|
|
6
|
+
richTextEditorInlineToolbarButtons: any;
|
|
7
|
+
FromHTMLCustomBlockFn: any;
|
|
8
8
|
customStyleMap: any;
|
|
9
9
|
};
|
|
10
10
|
export namespace richtextViewSettings {
|
|
11
11
|
export { ToHTMLRenderers };
|
|
12
12
|
export { ToHTMLOptions };
|
|
13
13
|
}
|
|
14
|
-
import FromHTMLCustomBlockFn from './FromHTML';
|
|
15
|
-
import ToHTMLRenderers from './ToHTML';
|
|
16
|
-
import { options as ToHTMLOptions } from './ToHTML';
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* with the "object promises" and that's our "object promises" (which it calls
|
|
15
15
|
* internally "asyncItems").
|
|
16
16
|
*/
|
|
17
|
-
export function asyncConnect(asyncItems: any, mapStateToProps: any, mapDispatchToProps: any, mergeProps: any, options: any): (Component: any) =>
|
|
18
|
-
export const ReduxAsyncConnect:
|
|
17
|
+
export function asyncConnect(asyncItems: any, mapStateToProps: any, mapDispatchToProps: any, mergeProps: any, options: any): (Component: any) => any;
|
|
18
|
+
export const ReduxAsyncConnect: any;
|
|
19
19
|
export { loadOnServer, loadAsyncConnect } from "./ssr";
|
|
@@ -21,11 +21,13 @@ export function addExtensionFieldToSchema({ schema, name, items, intl, title, de
|
|
|
21
21
|
export function withBlockSchemaEnhancer(FormComponent: any, extensionName?: string, insertFieldToOrder?: typeof _addField): ({ ...props }: {
|
|
22
22
|
[x: string]: any;
|
|
23
23
|
}) => JSX.Element;
|
|
24
|
-
export function applySchemaEnhancer({ schema: originalSchema, formData, intl, blocksConfig, }: {
|
|
24
|
+
export function applySchemaEnhancer({ schema: originalSchema, formData, intl, blocksConfig, navRoot, contentType, }: {
|
|
25
25
|
schema: any;
|
|
26
26
|
formData: any;
|
|
27
27
|
intl: any;
|
|
28
28
|
blocksConfig?: any;
|
|
29
|
+
navRoot: any;
|
|
30
|
+
contentType: any;
|
|
29
31
|
}): any;
|
|
30
32
|
export function withVariationSchemaEnhancer(FormComponent: any): (props: any) => JSX.Element;
|
|
31
33
|
export namespace EMPTY_STYLES_SCHEMA {
|
|
@@ -118,21 +118,21 @@ export function flattenScales(path: string, image: object): object;
|
|
|
118
118
|
* @param {string} url Url to be parsed.
|
|
119
119
|
* @return {string} Base url of content object.
|
|
120
120
|
*/
|
|
121
|
-
export const getBaseUrl:
|
|
121
|
+
export const getBaseUrl: any;
|
|
122
122
|
/**
|
|
123
123
|
* Get parent url.
|
|
124
124
|
* @function getParentUrl
|
|
125
125
|
* @param {string} url Url to be parsed.
|
|
126
126
|
* @return {string} Parent url of content object.
|
|
127
127
|
*/
|
|
128
|
-
export const getParentUrl:
|
|
128
|
+
export const getParentUrl: any;
|
|
129
129
|
/**
|
|
130
130
|
* Returns true if the current view is a cms ui view
|
|
131
131
|
* @method isCmsUi
|
|
132
132
|
* @param {string} currentPathname pathname of the current view
|
|
133
133
|
* @returns {boolean} true if the current view is a cms ui view
|
|
134
134
|
*/
|
|
135
|
-
export const isCmsUi:
|
|
135
|
+
export const isCmsUi: any;
|
|
136
136
|
export function getFieldURL(data: object): string | any;
|
|
137
137
|
export namespace URLUtils {
|
|
138
138
|
export { normalizeTelephone };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default icons;
|
|
2
|
-
declare const icons:
|
|
2
|
+
declare const icons: any;
|
|
@@ -140,6 +140,7 @@ module.exports = (userOptions = {}) => ({
|
|
|
140
140
|
path.resolve('./theme'),
|
|
141
141
|
path.resolve('./src'),
|
|
142
142
|
/node_modules\/@plone\/volto\/theme/,
|
|
143
|
+
/packages\/volto\/theme/,
|
|
143
144
|
/plone\.volto\/theme/,
|
|
144
145
|
/node_modules\/semantic-ui-less/,
|
|
145
146
|
...Object.values(registry.getResolveAliases()),
|