@plone/volto 16.0.0-alpha.3 → 16.0.0-alpha.30
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/.editorconfig +36 -0
- package/.eslintrc +7 -2
- package/.github/workflows/acceptance.yml +76 -21
- package/.github/workflows/unit.yml +2 -13
- package/.storybook/main.js +10 -1
- package/CHANGELOG.md +549 -0
- package/README.md +7 -12
- package/addon-registry.js +33 -4
- package/babel.js +1 -0
- package/cypress/support/commands.js +304 -3
- package/cypress/support/{index.js → e2e.js} +2 -0
- package/cypress/support/volto-slate.js +78 -0
- package/cypress.config.js +12 -0
- package/locales/ca/LC_MESSAGES/volto.po +156 -41
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +165 -59
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +154 -39
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +167 -52
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +166 -51
- package/locales/eu.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +156 -41
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +166 -51
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +156 -41
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +154 -39
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +155 -40
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +219 -104
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +156 -41
- package/locales/ro.json +1 -1
- package/locales/volto.pot +155 -40
- package/package.json +21 -17
- package/packages/README.md +7 -0
- package/packages/volto-slate/.i18n.babel.config.js +1 -0
- package/packages/volto-slate/README.md +235 -0
- package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +90 -0
- package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +6 -0
- package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +6 -0
- package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +6 -0
- package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +10 -0
- package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +10 -0
- package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +30 -0
- package/packages/volto-slate/build/messages/src/elementEditor/messages.json +10 -0
- package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +6 -0
- package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +6 -0
- package/packages/volto-slate/locales/de/LC_MESSAGES/volto.po +148 -0
- package/packages/volto-slate/locales/en/LC_MESSAGES/volto.po +148 -0
- package/packages/volto-slate/locales/volto.pot +182 -0
- package/packages/volto-slate/package.json +43 -0
- package/packages/volto-slate/src/actions/content.js +30 -0
- package/packages/volto-slate/src/actions/index.js +3 -0
- package/packages/volto-slate/src/actions/plugins.js +9 -0
- package/packages/volto-slate/src/actions/selection.js +22 -0
- package/packages/volto-slate/src/blocks/Table/Cell.jsx +87 -0
- package/packages/volto-slate/src/blocks/Table/Cell.test.js +54 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockEdit.jsx +885 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js +40 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +150 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockView.test.js +49 -0
- package/packages/volto-slate/src/blocks/Table/deconstruct.js +113 -0
- package/packages/volto-slate/src/blocks/Table/extensions/normalizeTable.js +5 -0
- package/packages/volto-slate/src/blocks/Table/index.js +58 -0
- package/packages/volto-slate/src/blocks/Text/DefaultTextBlockEditor.jsx +300 -0
- package/packages/volto-slate/src/blocks/Text/DetachedTextBlockEditor.jsx +75 -0
- package/packages/volto-slate/src/blocks/Text/MarkdownIntroduction.jsx +59 -0
- package/packages/volto-slate/src/blocks/Text/PluginSidebar.jsx +18 -0
- package/packages/volto-slate/src/blocks/Text/ShortcutListing.jsx +28 -0
- package/packages/volto-slate/src/blocks/Text/SlashMenu.jsx +164 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockEdit.jsx +38 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js +107 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockSchema.js +54 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockView.jsx +26 -0
- package/packages/volto-slate/src/blocks/Text/css/editor.css +18 -0
- package/packages/volto-slate/src/blocks/Text/extensions/Readme.md +49 -0
- package/packages/volto-slate/src/blocks/Text/extensions/breakList.js +100 -0
- package/packages/volto-slate/src/blocks/Text/extensions/index.js +5 -0
- package/packages/volto-slate/src/blocks/Text/extensions/insertBreak.js +57 -0
- package/packages/volto-slate/src/blocks/Text/extensions/isSelected.js +8 -0
- package/packages/volto-slate/src/blocks/Text/extensions/withDeserializers.js +85 -0
- package/packages/volto-slate/src/blocks/Text/extensions/withLists.js +5 -0
- package/packages/volto-slate/src/blocks/Text/index.js +166 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/backspaceInList.js +58 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/breakBlocks.js +3 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/cancelEsc.js +7 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/indentListItems.js +240 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/index.js +52 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/joinBlocks.js +177 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/moveListItems.js +124 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/slashMenu.js +16 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/softBreak.js +7 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/traverseBlocks.js +81 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/unwrapEmptyString.js +26 -0
- package/packages/volto-slate/src/blocks/Text/schema.js +39 -0
- package/packages/volto-slate/src/constants.js +123 -0
- package/packages/volto-slate/src/editor/EditorContext.jsx +5 -0
- package/packages/volto-slate/src/editor/EditorReference.jsx +22 -0
- package/packages/volto-slate/src/editor/SlateEditor.jsx +372 -0
- package/packages/volto-slate/src/editor/config.jsx +340 -0
- package/packages/volto-slate/src/editor/decorate.js +63 -0
- package/packages/volto-slate/src/editor/deserialize.js +203 -0
- package/packages/volto-slate/src/editor/extensions/index.js +5 -0
- package/packages/volto-slate/src/editor/extensions/insertBreak.js +15 -0
- package/packages/volto-slate/src/editor/extensions/insertData.js +146 -0
- package/packages/volto-slate/src/editor/extensions/isInline.js +14 -0
- package/packages/volto-slate/src/editor/extensions/normalizeNode.js +48 -0
- package/packages/volto-slate/src/editor/extensions/withDeserializers.js +15 -0
- package/packages/volto-slate/src/editor/extensions/withTestingFeatures.jsx +84 -0
- package/packages/volto-slate/src/editor/index.js +14 -0
- package/packages/volto-slate/src/editor/less/editor.less +173 -0
- package/packages/volto-slate/src/editor/less/globals.less +18 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/deserialize.js +90 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/extensions.js +32 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/index.js +50 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/render.jsx +37 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/schema.js +114 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/styles.less +8 -0
- package/packages/volto-slate/src/editor/plugins/Blockquote/index.js +30 -0
- package/packages/volto-slate/src/editor/plugins/Callout/index.js +34 -0
- package/packages/volto-slate/src/editor/plugins/Image/deconstruct.js +30 -0
- package/packages/volto-slate/src/editor/plugins/Image/extensions.js +51 -0
- package/packages/volto-slate/src/editor/plugins/Image/index.js +11 -0
- package/packages/volto-slate/src/editor/plugins/Image/render.jsx +22 -0
- package/packages/volto-slate/src/editor/plugins/Link/extensions.js +53 -0
- package/packages/volto-slate/src/editor/plugins/Link/index.js +168 -0
- package/packages/volto-slate/src/editor/plugins/Link/render.jsx +46 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/constants.js +96 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/extensions.js +334 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/index.js +28 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/utils.js +198 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableButton.jsx +142 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableCell.jsx +44 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableContainer.jsx +37 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableSizePicker.jsx +83 -0
- package/packages/volto-slate/src/editor/plugins/Table/extensions.js +87 -0
- package/packages/volto-slate/src/editor/plugins/Table/index.js +390 -0
- package/packages/volto-slate/src/editor/plugins/Table/less/public.less +29 -0
- package/packages/volto-slate/src/editor/plugins/Table/less/table.less +28 -0
- package/packages/volto-slate/src/editor/plugins/Table/render.jsx +30 -0
- package/packages/volto-slate/src/editor/plugins/index.js +17 -0
- package/packages/volto-slate/src/editor/render.jsx +155 -0
- package/packages/volto-slate/src/editor/ui/BasicToolbar.jsx +11 -0
- package/packages/volto-slate/src/editor/ui/BlockButton.jsx +31 -0
- package/packages/volto-slate/src/editor/ui/ClearFormattingButton.jsx +21 -0
- package/packages/volto-slate/src/editor/ui/ExpandedToolbar.jsx +18 -0
- package/packages/volto-slate/src/editor/ui/Expando.jsx +5 -0
- package/packages/volto-slate/src/editor/ui/InlineToolbar.jsx +71 -0
- package/packages/volto-slate/src/editor/ui/MarkButton.jsx +23 -0
- package/packages/volto-slate/src/editor/ui/MarkElementButton.jsx +30 -0
- package/packages/volto-slate/src/editor/ui/Menu.jsx +13 -0
- package/packages/volto-slate/src/editor/ui/PositionedToolbar.jsx +30 -0
- package/packages/volto-slate/src/editor/ui/Separator.jsx +7 -0
- package/packages/volto-slate/src/editor/ui/SlateContextToolbar.jsx +13 -0
- package/packages/volto-slate/src/editor/ui/SlateToolbar.jsx +94 -0
- package/packages/volto-slate/src/editor/ui/Toolbar.jsx +97 -0
- package/packages/volto-slate/src/editor/ui/ToolbarButton.jsx +33 -0
- package/packages/volto-slate/src/editor/ui/ToolbarButton.test.js +25 -0
- package/packages/volto-slate/src/editor/ui/index.js +15 -0
- package/packages/volto-slate/src/elementEditor/ContextButtons.jsx +56 -0
- package/packages/volto-slate/src/elementEditor/PluginEditor.jsx +123 -0
- package/packages/volto-slate/src/elementEditor/Readme.md +6 -0
- package/packages/volto-slate/src/elementEditor/SchemaProvider.jsx +3 -0
- package/packages/volto-slate/src/elementEditor/SidebarEditor.jsx +46 -0
- package/packages/volto-slate/src/elementEditor/ToolbarButton.jsx +44 -0
- package/packages/volto-slate/src/elementEditor/index.js +5 -0
- package/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js +100 -0
- package/packages/volto-slate/src/elementEditor/messages.js +14 -0
- package/packages/volto-slate/src/elementEditor/utils.js +215 -0
- package/packages/volto-slate/src/hooks/index.js +2 -0
- package/packages/volto-slate/src/hooks/useEditorContext.js +6 -0
- package/packages/volto-slate/src/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/packages/volto-slate/src/i18n.js +180 -0
- package/packages/volto-slate/src/icons/hashlink.svg +57 -0
- package/packages/volto-slate/src/index.js +58 -0
- package/packages/volto-slate/src/reducers/content.js +74 -0
- package/packages/volto-slate/src/reducers/index.js +3 -0
- package/packages/volto-slate/src/reducers/plugins.js +17 -0
- package/packages/volto-slate/src/reducers/selection.js +16 -0
- package/packages/volto-slate/src/utils/blocks.js +338 -0
- package/packages/volto-slate/src/utils/blocks.test.js +138 -0
- package/packages/volto-slate/src/utils/editor.js +31 -0
- package/packages/volto-slate/src/utils/image.js +25 -0
- package/packages/volto-slate/src/utils/index.js +11 -0
- package/packages/volto-slate/src/utils/internals.js +46 -0
- package/packages/volto-slate/src/utils/lists.js +92 -0
- package/packages/volto-slate/src/utils/marks.js +104 -0
- package/packages/volto-slate/src/utils/mime-types.js +24 -0
- package/packages/volto-slate/src/utils/nodes.js +4 -0
- package/packages/volto-slate/src/utils/ops.js +20 -0
- package/packages/volto-slate/src/utils/random.js +17 -0
- package/packages/volto-slate/src/utils/selection.js +233 -0
- package/packages/volto-slate/src/utils/slate-string-utils.js +408 -0
- package/packages/volto-slate/src/utils/volto-blocks.js +314 -0
- package/packages/volto-slate/src/widgets/ErrorBoundary.jsx +27 -0
- package/packages/volto-slate/src/widgets/HtmlSlateWidget.jsx +139 -0
- package/packages/volto-slate/src/widgets/ObjectByTypeWidget.jsx +49 -0
- package/packages/volto-slate/src/widgets/RichTextWidget.jsx +65 -0
- package/packages/volto-slate/src/widgets/RichTextWidgetView.jsx +37 -0
- package/packages/volto-slate/src/widgets/style.css +21 -0
- package/pyvenv.cfg +3 -0
- package/razzle.config.js +11 -0
- package/src/actions/groups/groups.js +28 -13
- package/src/actions/users/users.js +41 -5
- package/src/actions/users/users.test.js +1 -1
- package/src/components/index.js +2 -1
- package/src/components/manage/Blocks/Block/Edit.jsx +6 -9
- package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +7 -3
- package/src/components/manage/Blocks/Block/Settings.jsx +2 -2
- package/src/components/manage/Blocks/Block/StylesSchema.jsx +4 -4
- package/src/components/manage/Blocks/Description/Edit.jsx +182 -211
- package/src/components/manage/Blocks/Description/Edit.test.jsx +42 -32
- package/src/components/manage/Blocks/Description/View.jsx +13 -8
- package/src/components/manage/Blocks/Image/Edit.jsx +3 -20
- package/src/components/manage/Blocks/Image/Edit.test.jsx +19 -1
- package/src/components/manage/Blocks/Image/ImageSidebar.jsx +38 -266
- package/src/components/manage/Blocks/Image/{Schema.jsx → LayoutSchema.jsx} +0 -0
- package/src/components/manage/Blocks/Image/View.jsx +64 -61
- package/src/components/manage/Blocks/Image/View.test.jsx +5 -3
- package/src/components/manage/Blocks/Image/schema.js +103 -0
- package/src/components/manage/Blocks/Listing/Edit.jsx +6 -1
- package/src/components/manage/Blocks/Listing/View.jsx +4 -0
- package/src/components/manage/Blocks/Listing/schema.js +30 -1
- package/src/components/manage/Blocks/Listing/withQuerystringResults.jsx +1 -0
- package/src/components/manage/Blocks/Maps/Edit.jsx +3 -2
- package/src/components/manage/Blocks/Maps/Edit.test.jsx +19 -0
- package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +37 -101
- package/src/components/manage/Blocks/Maps/View.jsx +5 -10
- package/src/components/manage/Blocks/Maps/View.test.jsx +19 -0
- package/src/components/manage/Blocks/Maps/schema.js +46 -0
- package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +12 -0
- package/src/components/manage/Blocks/Search/SearchBlockView.jsx +1 -1
- package/src/components/manage/Blocks/Search/components/DateRangeFacet.jsx +6 -2
- package/src/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx +1 -1
- package/src/components/manage/Blocks/Search/layout/RightColumnFacets.jsx +1 -1
- package/src/components/manage/Blocks/Table/Readme.md +5 -0
- package/src/components/manage/Blocks/Text/Readme.md +5 -0
- package/src/components/manage/Blocks/Title/Edit.jsx +166 -197
- package/src/components/manage/Blocks/Title/Edit.test.jsx +42 -32
- package/src/components/manage/Blocks/Title/View.jsx +13 -8
- package/src/components/manage/Blocks/ToC/Edit.jsx +29 -24
- package/src/components/manage/Blocks/ToC/Schema.jsx +43 -11
- package/src/components/manage/Blocks/ToC/View.jsx +87 -39
- package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +75 -0
- package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +65 -0
- package/src/components/manage/Blocks/ToC/variations/index.js +16 -0
- package/src/components/manage/Blocks/Video/Body.jsx +16 -12
- package/src/components/manage/Blocks/Video/Edit.jsx +3 -1
- package/src/components/manage/Blocks/Video/Edit.test.jsx +20 -1
- package/src/components/manage/Blocks/Video/VideoSidebar.jsx +38 -205
- package/src/components/manage/Blocks/Video/View.jsx +5 -2
- package/src/components/manage/Blocks/Video/View.test.jsx +39 -1
- package/src/components/manage/Blocks/Video/schema.js +49 -0
- package/src/components/manage/Contents/ContentsItem.jsx +1 -1
- package/src/components/manage/Contents/ContentsItem.test.jsx +1 -0
- package/src/components/manage/Contents/ContentsPropertiesModal.jsx +10 -2
- package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +10 -2
- package/src/components/manage/Controlpanels/Controlpanels.jsx +57 -8
- package/src/components/manage/Controlpanels/Controlpanels.test.jsx +40 -0
- package/src/components/manage/Controlpanels/DatabaseInformation.jsx +7 -1
- package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +11 -4
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +149 -0
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.test.jsx +62 -0
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipListing.jsx +326 -0
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipMatrix.jsx +206 -0
- package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +19 -7
- package/src/components/manage/Controlpanels/VersionOverview.jsx +1 -1
- package/src/components/manage/Display/Display.jsx +17 -8
- package/src/components/manage/Edit/Edit.jsx +8 -0
- package/src/components/manage/Form/Form.jsx +7 -5
- package/src/components/manage/LockingToastsFactory/LockingToastsFactory.jsx +3 -11
- package/src/components/manage/Sharing/Sharing.jsx +151 -134
- package/src/components/manage/Sharing/Sharing.test.jsx +6 -3
- package/src/components/manage/Sidebar/Sidebar.jsx +4 -1
- package/src/components/manage/Toolbar/More.jsx +12 -8
- package/src/components/manage/Toolbar/Toolbar.jsx +3 -2
- package/src/components/manage/UniversalLink/UniversalLink.jsx +7 -0
- package/src/components/manage/Widgets/AlignWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/ArrayWidget.jsx +29 -4
- package/src/components/manage/Widgets/ArrayWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/{ColorPicker.jsx → ColorPickerWidget.jsx} +8 -0
- package/src/components/manage/Widgets/ColorPickerWidget.test.jsx +68 -0
- package/src/components/manage/Widgets/DatetimeWidget.jsx +17 -6
- package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/EmailWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/FileWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/IdWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/ImageSizeWidget.jsx +93 -0
- package/src/components/manage/Widgets/ImageSizeWidget.stories.jsx +21 -0
- package/src/components/manage/Widgets/ImageSizeWidget.test.jsx +30 -0
- package/src/components/manage/Widgets/NumberWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/ObjectBrowserWidget.jsx +16 -9
- package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +8 -1
- package/src/components/manage/Widgets/ObjectListWidget.stories.js +1 -1
- package/src/components/manage/Widgets/ObjectWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/PasswordWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/QueryWidget.jsx +16 -12
- package/src/components/manage/Widgets/QueryWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/RecurrenceWidget/ByDayField.jsx +3 -3
- package/src/components/manage/Widgets/RecurrenceWidget/MonthOfTheYearField.jsx +3 -3
- package/src/components/manage/Widgets/RecurrenceWidget/Occurences.jsx +3 -1
- package/src/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +6 -2
- package/src/components/manage/Widgets/RecurrenceWidget/Utils.js +2 -2
- package/src/components/manage/Widgets/RecurrenceWidget/WeekdayOfTheMonthField.jsx +3 -3
- package/src/components/manage/Widgets/SchemaWidget.jsx +2 -1
- package/src/components/manage/Widgets/SelectAutoComplete.jsx +12 -7
- package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/SelectStyling.jsx +2 -0
- package/src/components/manage/Widgets/SelectWidget.jsx +7 -3
- package/src/components/manage/Widgets/SelectWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/TextWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/TextareaWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/TokenWidget.jsx +27 -4
- package/src/components/manage/Widgets/TokenWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/UrlWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +1 -1
- package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +1 -1
- package/src/components/manage/Workflow/Workflow.jsx +28 -25
- package/src/components/manage/Workflow/Workflow.test.jsx +21 -2
- package/src/components/manage/WorkingCopyToastsFactory/WorkingCopyToastsFactory.jsx +11 -5
- package/src/components/theme/Component/Component.jsx +4 -2
- package/src/components/theme/Component/Component.test.jsx +11 -0
- package/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +3 -1
- package/src/components/theme/Login/Login.jsx +3 -3
- package/src/components/theme/Pagination/Pagination.jsx +3 -1
- package/src/components/theme/PreviewImage/PreviewImage.jsx +5 -1
- package/src/components/theme/RequestTimeout/RequestTimeout.jsx +76 -0
- package/src/components/theme/RequestTimeout/RequestTimeout.test.jsx +28 -0
- package/src/components/theme/Search/Search.jsx +20 -9
- package/src/components/theme/Unauthorized/Unauthorized.jsx +1 -1
- package/src/components/theme/View/DefaultView.jsx +78 -34
- package/src/components/theme/View/DefaultView.test.jsx +6 -1
- package/src/components/theme/View/EventDatesInfo.jsx +3 -3
- package/src/components/theme/View/RenderBlocks.jsx +3 -3
- package/src/components/theme/View/View.jsx +2 -1
- package/src/components/theme/Widgets/ArrayWidget.jsx +22 -0
- package/src/components/theme/Widgets/ArrayWidget.test.js +60 -0
- package/src/components/theme/Widgets/BooleanWidget.jsx +35 -0
- package/src/components/theme/Widgets/BooleanWidget.stories.jsx +29 -0
- package/src/components/theme/Widgets/BooleanWidget.test.js +71 -0
- package/src/components/theme/Widgets/DateWidget.jsx +20 -0
- package/src/components/theme/Widgets/DateWidget.stories.jsx +32 -0
- package/src/components/theme/Widgets/DateWidget.test.js +59 -0
- package/src/components/theme/Widgets/DatetimeWidget.jsx +20 -0
- package/src/components/theme/Widgets/DatetimeWidget.stories.jsx +32 -0
- package/src/components/theme/Widgets/DatetimeWidget.test.js +63 -0
- package/src/components/theme/Widgets/DescriptionWidget.jsx +15 -0
- package/src/components/theme/Widgets/DescriptionWidget.stories.jsx +29 -0
- package/src/components/theme/Widgets/DescriptionWidget.test.js +29 -0
- package/src/components/theme/Widgets/EmailWidget.jsx +17 -0
- package/src/components/theme/Widgets/EmailWidget.stories.jsx +25 -0
- package/src/components/theme/Widgets/EmailWidget.test.js +52 -0
- package/src/components/theme/Widgets/FileWidget.jsx +42 -0
- package/src/components/theme/Widgets/FileWidget.stories.jsx +31 -0
- package/src/components/theme/Widgets/FileWidget.test.js +82 -0
- package/src/components/theme/Widgets/ImageWidget.jsx +37 -0
- package/src/components/theme/Widgets/ImageWidget.stories.jsx +32 -0
- package/src/components/theme/Widgets/ImageWidget.test.js +35 -0
- package/src/components/theme/Widgets/PasswordWidget.jsx +13 -0
- package/src/components/theme/Widgets/PasswordWidget.stories.jsx +29 -0
- package/src/components/theme/Widgets/PasswordWidget.test.js +29 -0
- package/src/components/theme/Widgets/RelationWidget.jsx +38 -0
- package/src/components/theme/Widgets/RelationWidget.stories.jsx +72 -0
- package/src/components/theme/Widgets/RelationWidget.test.js +84 -0
- package/src/components/theme/Widgets/RelationsWidget.jsx +24 -0
- package/src/components/theme/Widgets/RelationsWidget.stories.jsx +51 -0
- package/src/components/theme/Widgets/RelationsWidget.test.js +112 -0
- package/src/components/theme/Widgets/RichTextWidget.jsx +16 -0
- package/src/components/theme/Widgets/RichTextWidget.stories.jsx +29 -0
- package/src/components/theme/Widgets/RichTextWidget.test.js +32 -0
- package/src/components/theme/Widgets/SelectWidget.jsx +15 -0
- package/src/components/theme/Widgets/SelectWidget.stories.jsx +25 -0
- package/src/components/theme/Widgets/SelectWidget.test.js +43 -0
- package/src/components/theme/Widgets/TextWidget.jsx +15 -0
- package/src/components/theme/Widgets/TextWidget.stories.jsx +25 -0
- package/src/components/theme/Widgets/TextWidget.test.js +29 -0
- package/src/components/theme/Widgets/TitleWidget.jsx +13 -0
- package/src/components/theme/Widgets/TitleWidget.stories.jsx +25 -0
- package/src/components/theme/Widgets/TitleWidget.test.js +29 -0
- package/src/components/theme/Widgets/TokenWidget.jsx +22 -0
- package/src/components/theme/Widgets/TokenWidget.stories.jsx +25 -0
- package/src/components/theme/Widgets/TokenWidget.test.js +59 -0
- package/src/components/theme/Widgets/UrlWidget.jsx +14 -0
- package/src/components/theme/Widgets/UrlWidget.stories.jsx +25 -0
- package/src/components/theme/Widgets/UrlWidget.test.js +52 -0
- package/src/config/Blocks.jsx +5 -2
- package/src/config/NonContentRoutes.jsx +2 -2
- package/src/config/Views.jsx +2 -0
- package/src/config/Widgets.jsx +58 -1
- package/src/config/Workflows.js +10 -0
- package/src/config/index.js +10 -5
- package/src/constants/ActionTypes.js +1 -0
- package/src/express-middleware/files.js +10 -3
- package/src/helpers/Api/APIResourceWithAuth.js +2 -0
- package/src/helpers/Api/Api.js +9 -0
- package/src/helpers/Blocks/Blocks.js +1 -1
- package/src/helpers/Extensions/withBlockExtensions.js +10 -6
- package/src/helpers/Extensions/withBlockSchemaEnhancer.js +45 -19
- package/src/helpers/Extensions/withBlockSchemaEnhancer.test.js +30 -0
- package/src/helpers/Loadable/__mocks__/Loadable.js +2 -1
- package/src/helpers/MessageLabels/MessageLabels.js +32 -0
- package/src/helpers/Proxy/Proxy.js +30 -0
- package/src/helpers/Robots/Robots.js +2 -2
- package/src/helpers/Sitemap/Sitemap.js +4 -1
- package/src/helpers/Url/Url.test.js +2 -2
- package/src/helpers/Utils/Utils.js +51 -4
- package/src/helpers/Utils/Utils.test.js +81 -0
- package/src/helpers/Widget/utils.js +27 -0
- package/src/helpers/Widget/utils.test.js +59 -0
- package/src/helpers/Widget/widget.js +100 -0
- package/src/helpers/Workflows/Workflows.js +58 -0
- package/src/helpers/Workflows/Workflows.test.js +47 -0
- package/src/helpers/index.js +7 -0
- package/src/middleware/api.js +11 -0
- package/src/middleware/index.js +5 -0
- package/src/{storeProtectLoadUtils.js → middleware/storeProtectLoadUtils.js} +2 -1
- package/src/{storeProtectLoadUtils.test.js → middleware/storeProtectLoadUtils.test.js} +1 -1
- package/src/reducers/content/content.js +3 -0
- package/src/reducers/groups/groups.js +22 -0
- package/src/reducers/navigation/navigation.js +1 -0
- package/src/reducers/navigation/navigation.test.js +13 -1
- package/src/reducers/workflow/workflow.js +3 -0
- package/src/reducers/workflow/workflow.test.js +14 -0
- package/src/registry.js +31 -4
- package/src/registry.test.js +58 -9
- package/src/routes.js +9 -4
- package/src/server.jsx +4 -3
- package/src/start-client.jsx +8 -0
- package/src/store.js +4 -2
- package/test-setup-config.js +4 -1
- package/theme/themes/pastanaga/assets/fonts/Poppins/OFL.txt +93 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Bold-devanagari.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Bold-latin.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Bold-latinext.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-BoldItalic-devanagari.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-BoldItalic-latin.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-BoldItalic-latinext.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Light-devanagari.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Light-latin.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Light-latinext.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Regular-devanagari.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Regular-latin.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Regular-latinext.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-RegularItalic-devanagari.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-RegularItalic-latin.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-RegularItalic-latinext.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Semibold-devanagari.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Semibold-latin.woff2 +0 -0
- package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Semibold-latinext.woff2 +0 -0
- package/theme/themes/pastanaga/extras/fonts.less +208 -0
- package/theme/themes/pastanaga/extras/main.less +8 -0
- package/theme/themes/pastanaga/extras/mixins.less +9 -0
- package/theme/themes/pastanaga/extras/toolbar.less +4 -7
- package/theme/themes/pastanaga/extras/userscontrolpanel.less +125 -0
- package/theme/themes/pastanaga/globals/site.variables +2 -1
- package/cypress/plugins/index.js +0 -17
- package/cypress.json +0 -9
- package/dist/assets.json +0 -1
- package/dist/chunks.json +0 -571
- package/dist/loadable-stats.json +0 -2070
- package/dist/public/android-chrome-192x192.png +0 -0
- package/dist/public/android-chrome-512x512.png +0 -0
- package/dist/public/apple-touch-icon.png +0 -0
- package/dist/public/favicon-16x16.png +0 -0
- package/dist/public/favicon-32x32.png +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/icon.svg +0 -13
- package/dist/public/index.html.spa +0 -34
- package/dist/public/robots.txt +0 -2
- package/dist/public/site.webmanifest +0 -19
- package/dist/public/static/css/14.d7b2dfe0.chunk.css +0 -409
- package/dist/public/static/css/3.a3490306.chunk.css +0 -2
- package/dist/public/static/css/client.6af53db6.chunk.css +0 -8
- package/dist/public/static/css/plone-volto-components-manage-Widgets-DatetimeWidget.9a0f4d0d.chunk.css +0 -2
- package/dist/public/static/js/0.3e794c57.chunk.js +0 -2
- package/dist/public/static/js/1.fece2b93.chunk.js +0 -3
- package/dist/public/static/js/1.fece2b93.chunk.js.LICENSE.txt +0 -8
- package/dist/public/static/js/14.d7b2dfe0.chunk.js +0 -3
- package/dist/public/static/js/14.d7b2dfe0.chunk.js.LICENSE.txt +0 -146
- package/dist/public/static/js/15.c1eb25b4.chunk.js +0 -3
- package/dist/public/static/js/15.c1eb25b4.chunk.js.LICENSE.txt +0 -8
- package/dist/public/static/js/16.70e24cba.chunk.js +0 -2
- package/dist/public/static/js/17.f03d2a82.chunk.js +0 -2
- package/dist/public/static/js/18.8304f096.chunk.js +0 -3
- package/dist/public/static/js/18.8304f096.chunk.js.LICENSE.txt +0 -8
- package/dist/public/static/js/19.11da9600.chunk.js +0 -2
- package/dist/public/static/js/20.8d540d9e.chunk.js +0 -2
- package/dist/public/static/js/21.a0b6c3e3.chunk.js +0 -2
- package/dist/public/static/js/22.900fd756.chunk.js +0 -2
- package/dist/public/static/js/23.6af29de6.chunk.js +0 -2
- package/dist/public/static/js/24.150c2de0.chunk.js +0 -2
- package/dist/public/static/js/25.d0db20fc.chunk.js +0 -2
- package/dist/public/static/js/26.03061480.chunk.js +0 -2
- package/dist/public/static/js/27.9fa01afd.chunk.js +0 -2
- package/dist/public/static/js/28.11f2785d.chunk.js +0 -2
- package/dist/public/static/js/29.83468c28.chunk.js +0 -2
- package/dist/public/static/js/3.a3490306.chunk.js +0 -2
- package/dist/public/static/js/30.7ce1882f.chunk.js +0 -2
- package/dist/public/static/js/31.145dfcf9.chunk.js +0 -2
- package/dist/public/static/js/32.86ea3e21.chunk.js +0 -2
- package/dist/public/static/js/33.a7d2c488.chunk.js +0 -3
- package/dist/public/static/js/33.a7d2c488.chunk.js.LICENSE.txt +0 -37
- package/dist/public/static/js/34.54f44477.chunk.js +0 -3
- package/dist/public/static/js/34.54f44477.chunk.js.LICENSE.txt +0 -7
- package/dist/public/static/js/35.14d24902.chunk.js +0 -3
- package/dist/public/static/js/35.14d24902.chunk.js.LICENSE.txt +0 -14
- package/dist/public/static/js/36.9224daf8.chunk.js +0 -3
- package/dist/public/static/js/36.9224daf8.chunk.js.LICENSE.txt +0 -8
- package/dist/public/static/js/37.fba4ef54.chunk.js +0 -2
- package/dist/public/static/js/38.e3318f33.chunk.js +0 -2
- package/dist/public/static/js/39.4cbf0549.chunk.js +0 -2
- package/dist/public/static/js/4.bdc4a5c5.chunk.js +0 -2
- package/dist/public/static/js/6.69ba4792.chunk.js +0 -2
- package/dist/public/static/js/client.6af53db6.chunk.js +0 -2
- package/dist/public/static/js/draft-js-lib-isSoftNewlineEvent.ad4b1307.chunk.js +0 -2
- package/dist/public/static/js/moment.dfd83abb.chunk.js +0 -2
- package/dist/public/static/js/plone-volto-components-manage-Widgets-DatetimeWidget.9a0f4d0d.chunk.js +0 -2
- package/dist/public/static/js/plone-volto-components-theme-View-EventView.9992128c.chunk.js +0 -2
- package/dist/public/static/js/react-dates.d94a34ee.chunk.js +0 -2
- package/dist/public/static/js/react-select.697c74e8.chunk.js +0 -2
- package/dist/public/static/js/react-simple-code-editor.484ec69f.chunk.js +0 -2
- package/dist/public/static/js/runtime~client.712b828a.js +0 -2
- package/dist/public/static/media/Logo.16e25cdf.svg +0 -21
- package/dist/public/static/media/block-image.8a4a14d5.svg +0 -8
- package/dist/public/static/media/block-maps.731e84f6.svg +0 -7
- package/dist/public/static/media/block-video.832fa3ff.svg +0 -7
- package/dist/public/static/media/default-image.9451b251.svg +0 -13
- package/dist/public/static/media/flags.9c74e172.png +0 -0
- package/dist/public/static/media/icons.022583c4.svg +0 -320
- package/dist/public/static/media/icons.06400145.ttf +0 -0
- package/dist/public/static/media/icons.dbc1ef8b.eot +0 -0
- package/dist/public/static/media/icons.df45b7de.woff +0 -0
- package/dist/server.js +0 -2
- package/src/components/manage/Blocks/Image/ImageSizeWidget.jsx +0 -78
- package/src/components/manage/Blocks/ToC/Edit.test.jsx +0 -59
- package/src/components/manage/Blocks/ToC/View.test.jsx +0 -59
- package/src/constants/Workflows.js +0 -33
package/.editorconfig
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# EditorConfig Configurtaion file, for more details see:
|
|
2
|
+
# http://EditorConfig.org
|
|
3
|
+
# EditorConfig is a convention description, that could be interpreted
|
|
4
|
+
# by multiple editors to enforce common coding conventions for specific
|
|
5
|
+
# file types
|
|
6
|
+
|
|
7
|
+
# top-most EditorConfig file:
|
|
8
|
+
# Will ignore other EditorConfig files in Home directory or upper tree level.
|
|
9
|
+
root = true
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
[*] # For All Files
|
|
13
|
+
# Unix-style newlines with a newline ending every file
|
|
14
|
+
end_of_line = lf
|
|
15
|
+
insert_final_newline = true
|
|
16
|
+
trim_trailing_whitespace = true
|
|
17
|
+
# Set default charset
|
|
18
|
+
charset = utf-8
|
|
19
|
+
# Indent style default
|
|
20
|
+
indent_style = space
|
|
21
|
+
# Max Line Length - a hard line wrap, should be disabled
|
|
22
|
+
max_line_length = off
|
|
23
|
+
|
|
24
|
+
[*.{py,cfg,ini}]
|
|
25
|
+
# 4 space indentation
|
|
26
|
+
indent_size = 4
|
|
27
|
+
|
|
28
|
+
[*.{html,dtml,pt,zpt,xml,zcml,js,jsx,json,less,css,yaml,yml}]
|
|
29
|
+
# 2 space indentation
|
|
30
|
+
indent_size = 2
|
|
31
|
+
|
|
32
|
+
[{Makefile,.gitmodules}]
|
|
33
|
+
# Tab indentation (no size specified, but view as 4 spaces)
|
|
34
|
+
indent_style = tab
|
|
35
|
+
indent_size = unset
|
|
36
|
+
tab_width = unset
|
package/.eslintrc
CHANGED
|
@@ -32,14 +32,19 @@
|
|
|
32
32
|
"settings": {
|
|
33
33
|
"import/resolver": {
|
|
34
34
|
"alias": {
|
|
35
|
-
"map": [
|
|
35
|
+
"map": [
|
|
36
|
+
["@plone/volto", "./src"],
|
|
37
|
+
["@plone/volto-slate", "./packages/volto-slate/src"],
|
|
38
|
+
["@package", "./src"],
|
|
39
|
+
["@root", "./src"]
|
|
40
|
+
],
|
|
36
41
|
"extensions": [".js", ".jsx", ".json"]
|
|
37
42
|
},
|
|
38
43
|
"babel-plugin-root-import": {
|
|
39
44
|
"rootPathSuffix": "src"
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
|
-
"import/core-modules": [
|
|
47
|
+
"import/core-modules": ["load-volto-addons"]
|
|
43
48
|
},
|
|
44
49
|
"globals": {
|
|
45
50
|
"root": true,
|
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
- run: yarn --frozen-lockfile
|
|
34
34
|
|
|
35
35
|
- name: Cypress acceptance tests
|
|
36
|
-
uses: cypress-io/github-action@
|
|
36
|
+
uses: cypress-io/github-action@v4
|
|
37
37
|
env:
|
|
38
38
|
BABEL_ENV: production
|
|
39
39
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -47,7 +47,6 @@ jobs:
|
|
|
47
47
|
browser: chrome
|
|
48
48
|
# headless: true
|
|
49
49
|
group: Core ${{ matrix.node-version }}
|
|
50
|
-
config: integrationFolder=cypress/tests
|
|
51
50
|
spec: cypress/tests/core/basic/**/*.js
|
|
52
51
|
start: |
|
|
53
52
|
make start-test-acceptance-server
|
|
@@ -99,7 +98,7 @@ jobs:
|
|
|
99
98
|
- run: yarn --frozen-lockfile
|
|
100
99
|
|
|
101
100
|
- name: Cypress acceptance tests
|
|
102
|
-
uses: cypress-io/github-action@
|
|
101
|
+
uses: cypress-io/github-action@v4
|
|
103
102
|
env:
|
|
104
103
|
BABEL_ENV: production
|
|
105
104
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -113,7 +112,6 @@ jobs:
|
|
|
113
112
|
browser: chrome
|
|
114
113
|
# headless: true
|
|
115
114
|
group: Core Blocks ${{ matrix.node-version }}
|
|
116
|
-
config: integrationFolder=cypress/tests
|
|
117
115
|
spec: cypress/tests/core/blocks/**/*.js
|
|
118
116
|
start: |
|
|
119
117
|
make start-test-acceptance-server
|
|
@@ -133,6 +131,71 @@ jobs:
|
|
|
133
131
|
name: cypress-videos
|
|
134
132
|
path: cypress/videos
|
|
135
133
|
|
|
134
|
+
corevoltoslate:
|
|
135
|
+
runs-on: ubuntu-latest
|
|
136
|
+
name: Core Volto Slate
|
|
137
|
+
timeout-minutes: 45
|
|
138
|
+
strategy:
|
|
139
|
+
matrix:
|
|
140
|
+
node-version: [14.x, 16.x]
|
|
141
|
+
steps:
|
|
142
|
+
- uses: actions/checkout@v2
|
|
143
|
+
|
|
144
|
+
# node setup
|
|
145
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
146
|
+
uses: actions/setup-node@v1
|
|
147
|
+
with:
|
|
148
|
+
node-version: ${{ matrix.node-version }}
|
|
149
|
+
|
|
150
|
+
# node cache
|
|
151
|
+
- name: Get yarn cache directory path
|
|
152
|
+
id: yarn-cache-dir-path
|
|
153
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
154
|
+
- uses: actions/cache@v1
|
|
155
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
156
|
+
with:
|
|
157
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
158
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
159
|
+
restore-keys: |
|
|
160
|
+
${{ runner.os }}-yarn-
|
|
161
|
+
|
|
162
|
+
## node install
|
|
163
|
+
- run: yarn --frozen-lockfile
|
|
164
|
+
|
|
165
|
+
- name: Cypress acceptance tests
|
|
166
|
+
uses: cypress-io/github-action@v4
|
|
167
|
+
env:
|
|
168
|
+
BABEL_ENV: production
|
|
169
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
170
|
+
CYPRESS_RETRIES: 2
|
|
171
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
172
|
+
# determine the unique run id necessary to re-run the checks
|
|
173
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
174
|
+
with:
|
|
175
|
+
record: true
|
|
176
|
+
parallel: false # Since they run on different node versions, we can't parallel
|
|
177
|
+
browser: chrome
|
|
178
|
+
# headless: true
|
|
179
|
+
group: Core Volto Slate ${{ matrix.node-version }}
|
|
180
|
+
spec: cypress/tests/core/volto-slate/**/*.js
|
|
181
|
+
start: |
|
|
182
|
+
make start-test-acceptance-server
|
|
183
|
+
make start-test-acceptance-frontend
|
|
184
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
185
|
+
|
|
186
|
+
# Upload Cypress screenshots
|
|
187
|
+
- uses: actions/upload-artifact@v1
|
|
188
|
+
if: failure()
|
|
189
|
+
with:
|
|
190
|
+
name: cypress-screenshots
|
|
191
|
+
path: cypress/screenshots
|
|
192
|
+
# Upload Cypress videos
|
|
193
|
+
- uses: actions/upload-artifact@v1
|
|
194
|
+
if: failure()
|
|
195
|
+
with:
|
|
196
|
+
name: cypress-videos
|
|
197
|
+
path: cypress/videos
|
|
198
|
+
|
|
136
199
|
core6:
|
|
137
200
|
runs-on: ubuntu-latest
|
|
138
201
|
name: Core Basic - Plone 6
|
|
@@ -164,7 +227,7 @@ jobs:
|
|
|
164
227
|
- run: yarn --frozen-lockfile
|
|
165
228
|
|
|
166
229
|
- name: Cypress acceptance tests
|
|
167
|
-
uses: cypress-io/github-action@
|
|
230
|
+
uses: cypress-io/github-action@v4
|
|
168
231
|
env:
|
|
169
232
|
BABEL_ENV: production
|
|
170
233
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -178,10 +241,9 @@ jobs:
|
|
|
178
241
|
browser: chrome
|
|
179
242
|
# headless: true
|
|
180
243
|
group: Core Basic - Plone 6
|
|
181
|
-
config: integrationFolder=cypress/tests
|
|
182
244
|
spec: cypress/tests/core/basic/**/*.js
|
|
183
245
|
start: |
|
|
184
|
-
make start-test-acceptance-server DOCKER_IMAGE=plone/plone-backend:6.0.
|
|
246
|
+
make start-test-acceptance-server DOCKER_IMAGE=plone/plone-backend:6.0.0b1 KGS=
|
|
185
247
|
make start-test-acceptance-frontend
|
|
186
248
|
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
187
249
|
|
|
@@ -257,7 +319,7 @@ jobs:
|
|
|
257
319
|
# CI: true
|
|
258
320
|
|
|
259
321
|
- name: Cypress Coresandbox Acceptance tests
|
|
260
|
-
uses: cypress-io/github-action@
|
|
322
|
+
uses: cypress-io/github-action@v4
|
|
261
323
|
env:
|
|
262
324
|
BABEL_ENV: production
|
|
263
325
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -271,7 +333,6 @@ jobs:
|
|
|
271
333
|
browser: chrome
|
|
272
334
|
# headless: true
|
|
273
335
|
group: Coresandbox
|
|
274
|
-
config: integrationFolder=cypress/tests
|
|
275
336
|
spec: cypress/tests/coresandbox/**/*.js
|
|
276
337
|
start: |
|
|
277
338
|
make start-test-acceptance-server-coresandbox
|
|
@@ -323,7 +384,7 @@ jobs:
|
|
|
323
384
|
- run: yarn --frozen-lockfile
|
|
324
385
|
|
|
325
386
|
- name: Cypress acceptance tests
|
|
326
|
-
uses: cypress-io/github-action@
|
|
387
|
+
uses: cypress-io/github-action@v4
|
|
327
388
|
env:
|
|
328
389
|
BABEL_ENV: production
|
|
329
390
|
CYPRESS_API: guillotina
|
|
@@ -338,7 +399,6 @@ jobs:
|
|
|
338
399
|
browser: chrome
|
|
339
400
|
headless: true
|
|
340
401
|
group: Guillotina
|
|
341
|
-
config: integrationFolder=cypress/tests
|
|
342
402
|
spec: cypress/tests/guillotina/**/*.js
|
|
343
403
|
start: |
|
|
344
404
|
make start-test-acceptance-server-guillotina
|
|
@@ -393,7 +453,7 @@ jobs:
|
|
|
393
453
|
- run: yarn --frozen-lockfile
|
|
394
454
|
|
|
395
455
|
- name: Cypress acceptance tests
|
|
396
|
-
uses: cypress-io/github-action@
|
|
456
|
+
uses: cypress-io/github-action@v4
|
|
397
457
|
env:
|
|
398
458
|
BABEL_ENV: production
|
|
399
459
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -407,7 +467,6 @@ jobs:
|
|
|
407
467
|
browser: chrome
|
|
408
468
|
headless: true
|
|
409
469
|
group: Multilingual
|
|
410
|
-
config: integrationFolder=cypress/tests
|
|
411
470
|
spec: cypress/tests/multilingual/**/*.js
|
|
412
471
|
start: |
|
|
413
472
|
make start-test-acceptance-server-multilingual
|
|
@@ -484,7 +543,7 @@ jobs:
|
|
|
484
543
|
# CI: true
|
|
485
544
|
|
|
486
545
|
- name: Cypress acceptance tests
|
|
487
|
-
uses: cypress-io/github-action@
|
|
546
|
+
uses: cypress-io/github-action@v4
|
|
488
547
|
env:
|
|
489
548
|
BABEL_ENV: production
|
|
490
549
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -498,14 +557,12 @@ jobs:
|
|
|
498
557
|
browser: chrome
|
|
499
558
|
headless: true
|
|
500
559
|
group: Working Copy
|
|
501
|
-
config: integrationFolder=cypress/tests
|
|
502
560
|
spec: cypress/tests/workingCopy/**/*.js
|
|
503
561
|
start: |
|
|
504
562
|
make start-test-acceptance-server-workingcopy
|
|
505
563
|
make start-test-acceptance-frontend-workingcopy
|
|
506
564
|
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
507
565
|
|
|
508
|
-
|
|
509
566
|
# Upload Cypress screenshots
|
|
510
567
|
- uses: actions/upload-artifact@v1
|
|
511
568
|
if: failure()
|
|
@@ -557,7 +614,7 @@ jobs:
|
|
|
557
614
|
|
|
558
615
|
# Generator own tests
|
|
559
616
|
- name: Generator tests
|
|
560
|
-
run:
|
|
617
|
+
run: yarn && yarn test
|
|
561
618
|
working-directory: ${{env.generator-directory}}
|
|
562
619
|
|
|
563
620
|
# install Yeoman and the generator
|
|
@@ -582,7 +639,7 @@ jobs:
|
|
|
582
639
|
working-directory: ${{env.project-directory}}
|
|
583
640
|
|
|
584
641
|
- name: Cypress acceptance tests
|
|
585
|
-
uses: cypress-io/github-action@
|
|
642
|
+
uses: cypress-io/github-action@v4
|
|
586
643
|
env:
|
|
587
644
|
BABEL_ENV: production
|
|
588
645
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -596,7 +653,6 @@ jobs:
|
|
|
596
653
|
browser: chrome
|
|
597
654
|
headless: true
|
|
598
655
|
group: Project Generator
|
|
599
|
-
config: integrationFolder=cypress/tests
|
|
600
656
|
spec: cypress/tests/minimal/**/*.js
|
|
601
657
|
start: |
|
|
602
658
|
make start-test-acceptance-server
|
|
@@ -654,7 +710,7 @@ jobs:
|
|
|
654
710
|
- run: yarn --frozen-lockfile
|
|
655
711
|
|
|
656
712
|
- name: Cypress acceptance tests
|
|
657
|
-
uses: cypress-io/github-action@
|
|
713
|
+
uses: cypress-io/github-action@v4
|
|
658
714
|
env:
|
|
659
715
|
BABEL_ENV: production
|
|
660
716
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
@@ -668,7 +724,6 @@ jobs:
|
|
|
668
724
|
browser: chrome
|
|
669
725
|
headless: true
|
|
670
726
|
group: Seamless
|
|
671
|
-
config: integrationFolder=cypress/tests
|
|
672
727
|
spec: cypress/tests/minimal/**/*.js
|
|
673
728
|
start: |
|
|
674
729
|
make start-test-acceptance-server
|
|
@@ -12,21 +12,10 @@ jobs:
|
|
|
12
12
|
|
|
13
13
|
# node setup
|
|
14
14
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
15
|
-
uses: actions/setup-node@
|
|
15
|
+
uses: actions/setup-node@v3
|
|
16
16
|
with:
|
|
17
17
|
node-version: ${{ matrix.node-version }}
|
|
18
|
-
|
|
19
|
-
# node cache
|
|
20
|
-
- name: Get yarn cache directory path
|
|
21
|
-
id: yarn-cache-dir-path
|
|
22
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
23
|
-
- uses: actions/cache@v1
|
|
24
|
-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
25
|
-
with:
|
|
26
|
-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
27
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
28
|
-
restore-keys: |
|
|
29
|
-
${{ runner.os }}-yarn-
|
|
18
|
+
cache: yarn
|
|
30
19
|
|
|
31
20
|
# node install
|
|
32
21
|
- run: yarn --frozen-lockfile
|
package/.storybook/main.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const webpack = require('webpack');
|
|
2
|
+
const fs = require('fs');
|
|
2
3
|
const path = require('path');
|
|
3
4
|
const makeLoaderFinder = require('razzle-dev-utils/makeLoaderFinder');
|
|
4
5
|
const fileLoaderFinder = makeLoaderFinder('file-loader');
|
|
@@ -83,7 +84,15 @@ module.exports = {
|
|
|
83
84
|
},
|
|
84
85
|
};
|
|
85
86
|
|
|
86
|
-
//
|
|
87
|
+
// Addons have to be loaded with babel
|
|
88
|
+
const addonPaths = registry.addonNames.map((addon) =>
|
|
89
|
+
fs.realpathSync(registry.packages[addon].modulePath),
|
|
90
|
+
);
|
|
91
|
+
resultConfig.module.rules[1].exclude = (input) =>
|
|
92
|
+
// exclude every input from node_modules except from @plone/volto
|
|
93
|
+
/node_modules\/(?!(@plone\/volto)\/)/.test(input) &&
|
|
94
|
+
// If input is in an addon, DON'T exclude it
|
|
95
|
+
!addonPaths.some((p) => input.includes(p));
|
|
87
96
|
|
|
88
97
|
return resultConfig;
|
|
89
98
|
},
|