@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.
Files changed (543) hide show
  1. package/.editorconfig +36 -0
  2. package/.eslintrc +7 -2
  3. package/.github/workflows/acceptance.yml +76 -21
  4. package/.github/workflows/unit.yml +2 -13
  5. package/.storybook/main.js +10 -1
  6. package/CHANGELOG.md +549 -0
  7. package/README.md +7 -12
  8. package/addon-registry.js +33 -4
  9. package/babel.js +1 -0
  10. package/cypress/support/commands.js +304 -3
  11. package/cypress/support/{index.js → e2e.js} +2 -0
  12. package/cypress/support/volto-slate.js +78 -0
  13. package/cypress.config.js +12 -0
  14. package/locales/ca/LC_MESSAGES/volto.po +156 -41
  15. package/locales/ca.json +1 -1
  16. package/locales/de/LC_MESSAGES/volto.po +165 -59
  17. package/locales/de.json +1 -1
  18. package/locales/en/LC_MESSAGES/volto.po +154 -39
  19. package/locales/en.json +1 -1
  20. package/locales/es/LC_MESSAGES/volto.po +167 -52
  21. package/locales/es.json +1 -1
  22. package/locales/eu/LC_MESSAGES/volto.po +166 -51
  23. package/locales/eu.json +1 -1
  24. package/locales/fr/LC_MESSAGES/volto.po +156 -41
  25. package/locales/fr.json +1 -1
  26. package/locales/it/LC_MESSAGES/volto.po +166 -51
  27. package/locales/it.json +1 -1
  28. package/locales/ja/LC_MESSAGES/volto.po +156 -41
  29. package/locales/ja.json +1 -1
  30. package/locales/nl/LC_MESSAGES/volto.po +154 -39
  31. package/locales/nl.json +1 -1
  32. package/locales/pt/LC_MESSAGES/volto.po +155 -40
  33. package/locales/pt.json +1 -1
  34. package/locales/pt_BR/LC_MESSAGES/volto.po +219 -104
  35. package/locales/pt_BR.json +1 -1
  36. package/locales/ro/LC_MESSAGES/volto.po +156 -41
  37. package/locales/ro.json +1 -1
  38. package/locales/volto.pot +155 -40
  39. package/package.json +21 -17
  40. package/packages/README.md +7 -0
  41. package/packages/volto-slate/.i18n.babel.config.js +1 -0
  42. package/packages/volto-slate/README.md +235 -0
  43. package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +90 -0
  44. package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +6 -0
  45. package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +6 -0
  46. package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +6 -0
  47. package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +10 -0
  48. package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +10 -0
  49. package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +30 -0
  50. package/packages/volto-slate/build/messages/src/elementEditor/messages.json +10 -0
  51. package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +6 -0
  52. package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +6 -0
  53. package/packages/volto-slate/locales/de/LC_MESSAGES/volto.po +148 -0
  54. package/packages/volto-slate/locales/en/LC_MESSAGES/volto.po +148 -0
  55. package/packages/volto-slate/locales/volto.pot +182 -0
  56. package/packages/volto-slate/package.json +43 -0
  57. package/packages/volto-slate/src/actions/content.js +30 -0
  58. package/packages/volto-slate/src/actions/index.js +3 -0
  59. package/packages/volto-slate/src/actions/plugins.js +9 -0
  60. package/packages/volto-slate/src/actions/selection.js +22 -0
  61. package/packages/volto-slate/src/blocks/Table/Cell.jsx +87 -0
  62. package/packages/volto-slate/src/blocks/Table/Cell.test.js +54 -0
  63. package/packages/volto-slate/src/blocks/Table/TableBlockEdit.jsx +885 -0
  64. package/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js +40 -0
  65. package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +150 -0
  66. package/packages/volto-slate/src/blocks/Table/TableBlockView.test.js +49 -0
  67. package/packages/volto-slate/src/blocks/Table/deconstruct.js +113 -0
  68. package/packages/volto-slate/src/blocks/Table/extensions/normalizeTable.js +5 -0
  69. package/packages/volto-slate/src/blocks/Table/index.js +58 -0
  70. package/packages/volto-slate/src/blocks/Text/DefaultTextBlockEditor.jsx +300 -0
  71. package/packages/volto-slate/src/blocks/Text/DetachedTextBlockEditor.jsx +75 -0
  72. package/packages/volto-slate/src/blocks/Text/MarkdownIntroduction.jsx +59 -0
  73. package/packages/volto-slate/src/blocks/Text/PluginSidebar.jsx +18 -0
  74. package/packages/volto-slate/src/blocks/Text/ShortcutListing.jsx +28 -0
  75. package/packages/volto-slate/src/blocks/Text/SlashMenu.jsx +164 -0
  76. package/packages/volto-slate/src/blocks/Text/TextBlockEdit.jsx +38 -0
  77. package/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js +107 -0
  78. package/packages/volto-slate/src/blocks/Text/TextBlockSchema.js +54 -0
  79. package/packages/volto-slate/src/blocks/Text/TextBlockView.jsx +26 -0
  80. package/packages/volto-slate/src/blocks/Text/css/editor.css +18 -0
  81. package/packages/volto-slate/src/blocks/Text/extensions/Readme.md +49 -0
  82. package/packages/volto-slate/src/blocks/Text/extensions/breakList.js +100 -0
  83. package/packages/volto-slate/src/blocks/Text/extensions/index.js +5 -0
  84. package/packages/volto-slate/src/blocks/Text/extensions/insertBreak.js +57 -0
  85. package/packages/volto-slate/src/blocks/Text/extensions/isSelected.js +8 -0
  86. package/packages/volto-slate/src/blocks/Text/extensions/withDeserializers.js +85 -0
  87. package/packages/volto-slate/src/blocks/Text/extensions/withLists.js +5 -0
  88. package/packages/volto-slate/src/blocks/Text/index.js +166 -0
  89. package/packages/volto-slate/src/blocks/Text/keyboard/backspaceInList.js +58 -0
  90. package/packages/volto-slate/src/blocks/Text/keyboard/breakBlocks.js +3 -0
  91. package/packages/volto-slate/src/blocks/Text/keyboard/cancelEsc.js +7 -0
  92. package/packages/volto-slate/src/blocks/Text/keyboard/indentListItems.js +240 -0
  93. package/packages/volto-slate/src/blocks/Text/keyboard/index.js +52 -0
  94. package/packages/volto-slate/src/blocks/Text/keyboard/joinBlocks.js +177 -0
  95. package/packages/volto-slate/src/blocks/Text/keyboard/moveListItems.js +124 -0
  96. package/packages/volto-slate/src/blocks/Text/keyboard/slashMenu.js +16 -0
  97. package/packages/volto-slate/src/blocks/Text/keyboard/softBreak.js +7 -0
  98. package/packages/volto-slate/src/blocks/Text/keyboard/traverseBlocks.js +81 -0
  99. package/packages/volto-slate/src/blocks/Text/keyboard/unwrapEmptyString.js +26 -0
  100. package/packages/volto-slate/src/blocks/Text/schema.js +39 -0
  101. package/packages/volto-slate/src/constants.js +123 -0
  102. package/packages/volto-slate/src/editor/EditorContext.jsx +5 -0
  103. package/packages/volto-slate/src/editor/EditorReference.jsx +22 -0
  104. package/packages/volto-slate/src/editor/SlateEditor.jsx +372 -0
  105. package/packages/volto-slate/src/editor/config.jsx +340 -0
  106. package/packages/volto-slate/src/editor/decorate.js +63 -0
  107. package/packages/volto-slate/src/editor/deserialize.js +203 -0
  108. package/packages/volto-slate/src/editor/extensions/index.js +5 -0
  109. package/packages/volto-slate/src/editor/extensions/insertBreak.js +15 -0
  110. package/packages/volto-slate/src/editor/extensions/insertData.js +146 -0
  111. package/packages/volto-slate/src/editor/extensions/isInline.js +14 -0
  112. package/packages/volto-slate/src/editor/extensions/normalizeNode.js +48 -0
  113. package/packages/volto-slate/src/editor/extensions/withDeserializers.js +15 -0
  114. package/packages/volto-slate/src/editor/extensions/withTestingFeatures.jsx +84 -0
  115. package/packages/volto-slate/src/editor/index.js +14 -0
  116. package/packages/volto-slate/src/editor/less/editor.less +173 -0
  117. package/packages/volto-slate/src/editor/less/globals.less +18 -0
  118. package/packages/volto-slate/src/editor/plugins/AdvancedLink/deserialize.js +90 -0
  119. package/packages/volto-slate/src/editor/plugins/AdvancedLink/extensions.js +32 -0
  120. package/packages/volto-slate/src/editor/plugins/AdvancedLink/index.js +50 -0
  121. package/packages/volto-slate/src/editor/plugins/AdvancedLink/render.jsx +37 -0
  122. package/packages/volto-slate/src/editor/plugins/AdvancedLink/schema.js +114 -0
  123. package/packages/volto-slate/src/editor/plugins/AdvancedLink/styles.less +8 -0
  124. package/packages/volto-slate/src/editor/plugins/Blockquote/index.js +30 -0
  125. package/packages/volto-slate/src/editor/plugins/Callout/index.js +34 -0
  126. package/packages/volto-slate/src/editor/plugins/Image/deconstruct.js +30 -0
  127. package/packages/volto-slate/src/editor/plugins/Image/extensions.js +51 -0
  128. package/packages/volto-slate/src/editor/plugins/Image/index.js +11 -0
  129. package/packages/volto-slate/src/editor/plugins/Image/render.jsx +22 -0
  130. package/packages/volto-slate/src/editor/plugins/Link/extensions.js +53 -0
  131. package/packages/volto-slate/src/editor/plugins/Link/index.js +168 -0
  132. package/packages/volto-slate/src/editor/plugins/Link/render.jsx +46 -0
  133. package/packages/volto-slate/src/editor/plugins/Markdown/constants.js +96 -0
  134. package/packages/volto-slate/src/editor/plugins/Markdown/extensions.js +334 -0
  135. package/packages/volto-slate/src/editor/plugins/Markdown/index.js +28 -0
  136. package/packages/volto-slate/src/editor/plugins/Markdown/utils.js +198 -0
  137. package/packages/volto-slate/src/editor/plugins/Table/TableButton.jsx +142 -0
  138. package/packages/volto-slate/src/editor/plugins/Table/TableCell.jsx +44 -0
  139. package/packages/volto-slate/src/editor/plugins/Table/TableContainer.jsx +37 -0
  140. package/packages/volto-slate/src/editor/plugins/Table/TableSizePicker.jsx +83 -0
  141. package/packages/volto-slate/src/editor/plugins/Table/extensions.js +87 -0
  142. package/packages/volto-slate/src/editor/plugins/Table/index.js +390 -0
  143. package/packages/volto-slate/src/editor/plugins/Table/less/public.less +29 -0
  144. package/packages/volto-slate/src/editor/plugins/Table/less/table.less +28 -0
  145. package/packages/volto-slate/src/editor/plugins/Table/render.jsx +30 -0
  146. package/packages/volto-slate/src/editor/plugins/index.js +17 -0
  147. package/packages/volto-slate/src/editor/render.jsx +155 -0
  148. package/packages/volto-slate/src/editor/ui/BasicToolbar.jsx +11 -0
  149. package/packages/volto-slate/src/editor/ui/BlockButton.jsx +31 -0
  150. package/packages/volto-slate/src/editor/ui/ClearFormattingButton.jsx +21 -0
  151. package/packages/volto-slate/src/editor/ui/ExpandedToolbar.jsx +18 -0
  152. package/packages/volto-slate/src/editor/ui/Expando.jsx +5 -0
  153. package/packages/volto-slate/src/editor/ui/InlineToolbar.jsx +71 -0
  154. package/packages/volto-slate/src/editor/ui/MarkButton.jsx +23 -0
  155. package/packages/volto-slate/src/editor/ui/MarkElementButton.jsx +30 -0
  156. package/packages/volto-slate/src/editor/ui/Menu.jsx +13 -0
  157. package/packages/volto-slate/src/editor/ui/PositionedToolbar.jsx +30 -0
  158. package/packages/volto-slate/src/editor/ui/Separator.jsx +7 -0
  159. package/packages/volto-slate/src/editor/ui/SlateContextToolbar.jsx +13 -0
  160. package/packages/volto-slate/src/editor/ui/SlateToolbar.jsx +94 -0
  161. package/packages/volto-slate/src/editor/ui/Toolbar.jsx +97 -0
  162. package/packages/volto-slate/src/editor/ui/ToolbarButton.jsx +33 -0
  163. package/packages/volto-slate/src/editor/ui/ToolbarButton.test.js +25 -0
  164. package/packages/volto-slate/src/editor/ui/index.js +15 -0
  165. package/packages/volto-slate/src/elementEditor/ContextButtons.jsx +56 -0
  166. package/packages/volto-slate/src/elementEditor/PluginEditor.jsx +123 -0
  167. package/packages/volto-slate/src/elementEditor/Readme.md +6 -0
  168. package/packages/volto-slate/src/elementEditor/SchemaProvider.jsx +3 -0
  169. package/packages/volto-slate/src/elementEditor/SidebarEditor.jsx +46 -0
  170. package/packages/volto-slate/src/elementEditor/ToolbarButton.jsx +44 -0
  171. package/packages/volto-slate/src/elementEditor/index.js +5 -0
  172. package/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js +100 -0
  173. package/packages/volto-slate/src/elementEditor/messages.js +14 -0
  174. package/packages/volto-slate/src/elementEditor/utils.js +215 -0
  175. package/packages/volto-slate/src/hooks/index.js +2 -0
  176. package/packages/volto-slate/src/hooks/useEditorContext.js +6 -0
  177. package/packages/volto-slate/src/hooks/useIsomorphicLayoutEffect.js +7 -0
  178. package/packages/volto-slate/src/i18n.js +180 -0
  179. package/packages/volto-slate/src/icons/hashlink.svg +57 -0
  180. package/packages/volto-slate/src/index.js +58 -0
  181. package/packages/volto-slate/src/reducers/content.js +74 -0
  182. package/packages/volto-slate/src/reducers/index.js +3 -0
  183. package/packages/volto-slate/src/reducers/plugins.js +17 -0
  184. package/packages/volto-slate/src/reducers/selection.js +16 -0
  185. package/packages/volto-slate/src/utils/blocks.js +338 -0
  186. package/packages/volto-slate/src/utils/blocks.test.js +138 -0
  187. package/packages/volto-slate/src/utils/editor.js +31 -0
  188. package/packages/volto-slate/src/utils/image.js +25 -0
  189. package/packages/volto-slate/src/utils/index.js +11 -0
  190. package/packages/volto-slate/src/utils/internals.js +46 -0
  191. package/packages/volto-slate/src/utils/lists.js +92 -0
  192. package/packages/volto-slate/src/utils/marks.js +104 -0
  193. package/packages/volto-slate/src/utils/mime-types.js +24 -0
  194. package/packages/volto-slate/src/utils/nodes.js +4 -0
  195. package/packages/volto-slate/src/utils/ops.js +20 -0
  196. package/packages/volto-slate/src/utils/random.js +17 -0
  197. package/packages/volto-slate/src/utils/selection.js +233 -0
  198. package/packages/volto-slate/src/utils/slate-string-utils.js +408 -0
  199. package/packages/volto-slate/src/utils/volto-blocks.js +314 -0
  200. package/packages/volto-slate/src/widgets/ErrorBoundary.jsx +27 -0
  201. package/packages/volto-slate/src/widgets/HtmlSlateWidget.jsx +139 -0
  202. package/packages/volto-slate/src/widgets/ObjectByTypeWidget.jsx +49 -0
  203. package/packages/volto-slate/src/widgets/RichTextWidget.jsx +65 -0
  204. package/packages/volto-slate/src/widgets/RichTextWidgetView.jsx +37 -0
  205. package/packages/volto-slate/src/widgets/style.css +21 -0
  206. package/pyvenv.cfg +3 -0
  207. package/razzle.config.js +11 -0
  208. package/src/actions/groups/groups.js +28 -13
  209. package/src/actions/users/users.js +41 -5
  210. package/src/actions/users/users.test.js +1 -1
  211. package/src/components/index.js +2 -1
  212. package/src/components/manage/Blocks/Block/Edit.jsx +6 -9
  213. package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +7 -3
  214. package/src/components/manage/Blocks/Block/Settings.jsx +2 -2
  215. package/src/components/manage/Blocks/Block/StylesSchema.jsx +4 -4
  216. package/src/components/manage/Blocks/Description/Edit.jsx +182 -211
  217. package/src/components/manage/Blocks/Description/Edit.test.jsx +42 -32
  218. package/src/components/manage/Blocks/Description/View.jsx +13 -8
  219. package/src/components/manage/Blocks/Image/Edit.jsx +3 -20
  220. package/src/components/manage/Blocks/Image/Edit.test.jsx +19 -1
  221. package/src/components/manage/Blocks/Image/ImageSidebar.jsx +38 -266
  222. package/src/components/manage/Blocks/Image/{Schema.jsx → LayoutSchema.jsx} +0 -0
  223. package/src/components/manage/Blocks/Image/View.jsx +64 -61
  224. package/src/components/manage/Blocks/Image/View.test.jsx +5 -3
  225. package/src/components/manage/Blocks/Image/schema.js +103 -0
  226. package/src/components/manage/Blocks/Listing/Edit.jsx +6 -1
  227. package/src/components/manage/Blocks/Listing/View.jsx +4 -0
  228. package/src/components/manage/Blocks/Listing/schema.js +30 -1
  229. package/src/components/manage/Blocks/Listing/withQuerystringResults.jsx +1 -0
  230. package/src/components/manage/Blocks/Maps/Edit.jsx +3 -2
  231. package/src/components/manage/Blocks/Maps/Edit.test.jsx +19 -0
  232. package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +37 -101
  233. package/src/components/manage/Blocks/Maps/View.jsx +5 -10
  234. package/src/components/manage/Blocks/Maps/View.test.jsx +19 -0
  235. package/src/components/manage/Blocks/Maps/schema.js +46 -0
  236. package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +12 -0
  237. package/src/components/manage/Blocks/Search/SearchBlockView.jsx +1 -1
  238. package/src/components/manage/Blocks/Search/components/DateRangeFacet.jsx +6 -2
  239. package/src/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx +1 -1
  240. package/src/components/manage/Blocks/Search/layout/RightColumnFacets.jsx +1 -1
  241. package/src/components/manage/Blocks/Table/Readme.md +5 -0
  242. package/src/components/manage/Blocks/Text/Readme.md +5 -0
  243. package/src/components/manage/Blocks/Title/Edit.jsx +166 -197
  244. package/src/components/manage/Blocks/Title/Edit.test.jsx +42 -32
  245. package/src/components/manage/Blocks/Title/View.jsx +13 -8
  246. package/src/components/manage/Blocks/ToC/Edit.jsx +29 -24
  247. package/src/components/manage/Blocks/ToC/Schema.jsx +43 -11
  248. package/src/components/manage/Blocks/ToC/View.jsx +87 -39
  249. package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +75 -0
  250. package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +65 -0
  251. package/src/components/manage/Blocks/ToC/variations/index.js +16 -0
  252. package/src/components/manage/Blocks/Video/Body.jsx +16 -12
  253. package/src/components/manage/Blocks/Video/Edit.jsx +3 -1
  254. package/src/components/manage/Blocks/Video/Edit.test.jsx +20 -1
  255. package/src/components/manage/Blocks/Video/VideoSidebar.jsx +38 -205
  256. package/src/components/manage/Blocks/Video/View.jsx +5 -2
  257. package/src/components/manage/Blocks/Video/View.test.jsx +39 -1
  258. package/src/components/manage/Blocks/Video/schema.js +49 -0
  259. package/src/components/manage/Contents/ContentsItem.jsx +1 -1
  260. package/src/components/manage/Contents/ContentsItem.test.jsx +1 -0
  261. package/src/components/manage/Contents/ContentsPropertiesModal.jsx +10 -2
  262. package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +10 -2
  263. package/src/components/manage/Controlpanels/Controlpanels.jsx +57 -8
  264. package/src/components/manage/Controlpanels/Controlpanels.test.jsx +40 -0
  265. package/src/components/manage/Controlpanels/DatabaseInformation.jsx +7 -1
  266. package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +11 -4
  267. package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +149 -0
  268. package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.test.jsx +62 -0
  269. package/src/components/manage/Controlpanels/Users/UserGroupMembershipListing.jsx +326 -0
  270. package/src/components/manage/Controlpanels/Users/UserGroupMembershipMatrix.jsx +206 -0
  271. package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +19 -7
  272. package/src/components/manage/Controlpanels/VersionOverview.jsx +1 -1
  273. package/src/components/manage/Display/Display.jsx +17 -8
  274. package/src/components/manage/Edit/Edit.jsx +8 -0
  275. package/src/components/manage/Form/Form.jsx +7 -5
  276. package/src/components/manage/LockingToastsFactory/LockingToastsFactory.jsx +3 -11
  277. package/src/components/manage/Sharing/Sharing.jsx +151 -134
  278. package/src/components/manage/Sharing/Sharing.test.jsx +6 -3
  279. package/src/components/manage/Sidebar/Sidebar.jsx +4 -1
  280. package/src/components/manage/Toolbar/More.jsx +12 -8
  281. package/src/components/manage/Toolbar/Toolbar.jsx +3 -2
  282. package/src/components/manage/UniversalLink/UniversalLink.jsx +7 -0
  283. package/src/components/manage/Widgets/AlignWidget.stories.jsx +1 -1
  284. package/src/components/manage/Widgets/ArrayWidget.jsx +29 -4
  285. package/src/components/manage/Widgets/ArrayWidget.stories.jsx +1 -1
  286. package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +1 -1
  287. package/src/components/manage/Widgets/{ColorPicker.jsx → ColorPickerWidget.jsx} +8 -0
  288. package/src/components/manage/Widgets/ColorPickerWidget.test.jsx +68 -0
  289. package/src/components/manage/Widgets/DatetimeWidget.jsx +17 -6
  290. package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +1 -1
  291. package/src/components/manage/Widgets/EmailWidget.stories.jsx +1 -1
  292. package/src/components/manage/Widgets/FileWidget.stories.jsx +1 -1
  293. package/src/components/manage/Widgets/IdWidget.stories.jsx +1 -1
  294. package/src/components/manage/Widgets/ImageSizeWidget.jsx +93 -0
  295. package/src/components/manage/Widgets/ImageSizeWidget.stories.jsx +21 -0
  296. package/src/components/manage/Widgets/ImageSizeWidget.test.jsx +30 -0
  297. package/src/components/manage/Widgets/NumberWidget.stories.jsx +1 -1
  298. package/src/components/manage/Widgets/ObjectBrowserWidget.jsx +16 -9
  299. package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +8 -1
  300. package/src/components/manage/Widgets/ObjectListWidget.stories.js +1 -1
  301. package/src/components/manage/Widgets/ObjectWidget.stories.jsx +1 -1
  302. package/src/components/manage/Widgets/PasswordWidget.stories.jsx +1 -1
  303. package/src/components/manage/Widgets/QueryWidget.jsx +16 -12
  304. package/src/components/manage/Widgets/QueryWidget.stories.jsx +1 -1
  305. package/src/components/manage/Widgets/RecurrenceWidget/ByDayField.jsx +3 -3
  306. package/src/components/manage/Widgets/RecurrenceWidget/MonthOfTheYearField.jsx +3 -3
  307. package/src/components/manage/Widgets/RecurrenceWidget/Occurences.jsx +3 -1
  308. package/src/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +6 -2
  309. package/src/components/manage/Widgets/RecurrenceWidget/Utils.js +2 -2
  310. package/src/components/manage/Widgets/RecurrenceWidget/WeekdayOfTheMonthField.jsx +3 -3
  311. package/src/components/manage/Widgets/SchemaWidget.jsx +2 -1
  312. package/src/components/manage/Widgets/SelectAutoComplete.jsx +12 -7
  313. package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +1 -1
  314. package/src/components/manage/Widgets/SelectStyling.jsx +2 -0
  315. package/src/components/manage/Widgets/SelectWidget.jsx +7 -3
  316. package/src/components/manage/Widgets/SelectWidget.stories.jsx +1 -1
  317. package/src/components/manage/Widgets/TextWidget.stories.jsx +1 -1
  318. package/src/components/manage/Widgets/TextareaWidget.stories.jsx +1 -1
  319. package/src/components/manage/Widgets/TokenWidget.jsx +27 -4
  320. package/src/components/manage/Widgets/TokenWidget.stories.jsx +1 -1
  321. package/src/components/manage/Widgets/UrlWidget.stories.jsx +1 -1
  322. package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +1 -1
  323. package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +1 -1
  324. package/src/components/manage/Workflow/Workflow.jsx +28 -25
  325. package/src/components/manage/Workflow/Workflow.test.jsx +21 -2
  326. package/src/components/manage/WorkingCopyToastsFactory/WorkingCopyToastsFactory.jsx +11 -5
  327. package/src/components/theme/Component/Component.jsx +4 -2
  328. package/src/components/theme/Component/Component.test.jsx +11 -0
  329. package/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +3 -1
  330. package/src/components/theme/Login/Login.jsx +3 -3
  331. package/src/components/theme/Pagination/Pagination.jsx +3 -1
  332. package/src/components/theme/PreviewImage/PreviewImage.jsx +5 -1
  333. package/src/components/theme/RequestTimeout/RequestTimeout.jsx +76 -0
  334. package/src/components/theme/RequestTimeout/RequestTimeout.test.jsx +28 -0
  335. package/src/components/theme/Search/Search.jsx +20 -9
  336. package/src/components/theme/Unauthorized/Unauthorized.jsx +1 -1
  337. package/src/components/theme/View/DefaultView.jsx +78 -34
  338. package/src/components/theme/View/DefaultView.test.jsx +6 -1
  339. package/src/components/theme/View/EventDatesInfo.jsx +3 -3
  340. package/src/components/theme/View/RenderBlocks.jsx +3 -3
  341. package/src/components/theme/View/View.jsx +2 -1
  342. package/src/components/theme/Widgets/ArrayWidget.jsx +22 -0
  343. package/src/components/theme/Widgets/ArrayWidget.test.js +60 -0
  344. package/src/components/theme/Widgets/BooleanWidget.jsx +35 -0
  345. package/src/components/theme/Widgets/BooleanWidget.stories.jsx +29 -0
  346. package/src/components/theme/Widgets/BooleanWidget.test.js +71 -0
  347. package/src/components/theme/Widgets/DateWidget.jsx +20 -0
  348. package/src/components/theme/Widgets/DateWidget.stories.jsx +32 -0
  349. package/src/components/theme/Widgets/DateWidget.test.js +59 -0
  350. package/src/components/theme/Widgets/DatetimeWidget.jsx +20 -0
  351. package/src/components/theme/Widgets/DatetimeWidget.stories.jsx +32 -0
  352. package/src/components/theme/Widgets/DatetimeWidget.test.js +63 -0
  353. package/src/components/theme/Widgets/DescriptionWidget.jsx +15 -0
  354. package/src/components/theme/Widgets/DescriptionWidget.stories.jsx +29 -0
  355. package/src/components/theme/Widgets/DescriptionWidget.test.js +29 -0
  356. package/src/components/theme/Widgets/EmailWidget.jsx +17 -0
  357. package/src/components/theme/Widgets/EmailWidget.stories.jsx +25 -0
  358. package/src/components/theme/Widgets/EmailWidget.test.js +52 -0
  359. package/src/components/theme/Widgets/FileWidget.jsx +42 -0
  360. package/src/components/theme/Widgets/FileWidget.stories.jsx +31 -0
  361. package/src/components/theme/Widgets/FileWidget.test.js +82 -0
  362. package/src/components/theme/Widgets/ImageWidget.jsx +37 -0
  363. package/src/components/theme/Widgets/ImageWidget.stories.jsx +32 -0
  364. package/src/components/theme/Widgets/ImageWidget.test.js +35 -0
  365. package/src/components/theme/Widgets/PasswordWidget.jsx +13 -0
  366. package/src/components/theme/Widgets/PasswordWidget.stories.jsx +29 -0
  367. package/src/components/theme/Widgets/PasswordWidget.test.js +29 -0
  368. package/src/components/theme/Widgets/RelationWidget.jsx +38 -0
  369. package/src/components/theme/Widgets/RelationWidget.stories.jsx +72 -0
  370. package/src/components/theme/Widgets/RelationWidget.test.js +84 -0
  371. package/src/components/theme/Widgets/RelationsWidget.jsx +24 -0
  372. package/src/components/theme/Widgets/RelationsWidget.stories.jsx +51 -0
  373. package/src/components/theme/Widgets/RelationsWidget.test.js +112 -0
  374. package/src/components/theme/Widgets/RichTextWidget.jsx +16 -0
  375. package/src/components/theme/Widgets/RichTextWidget.stories.jsx +29 -0
  376. package/src/components/theme/Widgets/RichTextWidget.test.js +32 -0
  377. package/src/components/theme/Widgets/SelectWidget.jsx +15 -0
  378. package/src/components/theme/Widgets/SelectWidget.stories.jsx +25 -0
  379. package/src/components/theme/Widgets/SelectWidget.test.js +43 -0
  380. package/src/components/theme/Widgets/TextWidget.jsx +15 -0
  381. package/src/components/theme/Widgets/TextWidget.stories.jsx +25 -0
  382. package/src/components/theme/Widgets/TextWidget.test.js +29 -0
  383. package/src/components/theme/Widgets/TitleWidget.jsx +13 -0
  384. package/src/components/theme/Widgets/TitleWidget.stories.jsx +25 -0
  385. package/src/components/theme/Widgets/TitleWidget.test.js +29 -0
  386. package/src/components/theme/Widgets/TokenWidget.jsx +22 -0
  387. package/src/components/theme/Widgets/TokenWidget.stories.jsx +25 -0
  388. package/src/components/theme/Widgets/TokenWidget.test.js +59 -0
  389. package/src/components/theme/Widgets/UrlWidget.jsx +14 -0
  390. package/src/components/theme/Widgets/UrlWidget.stories.jsx +25 -0
  391. package/src/components/theme/Widgets/UrlWidget.test.js +52 -0
  392. package/src/config/Blocks.jsx +5 -2
  393. package/src/config/NonContentRoutes.jsx +2 -2
  394. package/src/config/Views.jsx +2 -0
  395. package/src/config/Widgets.jsx +58 -1
  396. package/src/config/Workflows.js +10 -0
  397. package/src/config/index.js +10 -5
  398. package/src/constants/ActionTypes.js +1 -0
  399. package/src/express-middleware/files.js +10 -3
  400. package/src/helpers/Api/APIResourceWithAuth.js +2 -0
  401. package/src/helpers/Api/Api.js +9 -0
  402. package/src/helpers/Blocks/Blocks.js +1 -1
  403. package/src/helpers/Extensions/withBlockExtensions.js +10 -6
  404. package/src/helpers/Extensions/withBlockSchemaEnhancer.js +45 -19
  405. package/src/helpers/Extensions/withBlockSchemaEnhancer.test.js +30 -0
  406. package/src/helpers/Loadable/__mocks__/Loadable.js +2 -1
  407. package/src/helpers/MessageLabels/MessageLabels.js +32 -0
  408. package/src/helpers/Proxy/Proxy.js +30 -0
  409. package/src/helpers/Robots/Robots.js +2 -2
  410. package/src/helpers/Sitemap/Sitemap.js +4 -1
  411. package/src/helpers/Url/Url.test.js +2 -2
  412. package/src/helpers/Utils/Utils.js +51 -4
  413. package/src/helpers/Utils/Utils.test.js +81 -0
  414. package/src/helpers/Widget/utils.js +27 -0
  415. package/src/helpers/Widget/utils.test.js +59 -0
  416. package/src/helpers/Widget/widget.js +100 -0
  417. package/src/helpers/Workflows/Workflows.js +58 -0
  418. package/src/helpers/Workflows/Workflows.test.js +47 -0
  419. package/src/helpers/index.js +7 -0
  420. package/src/middleware/api.js +11 -0
  421. package/src/middleware/index.js +5 -0
  422. package/src/{storeProtectLoadUtils.js → middleware/storeProtectLoadUtils.js} +2 -1
  423. package/src/{storeProtectLoadUtils.test.js → middleware/storeProtectLoadUtils.test.js} +1 -1
  424. package/src/reducers/content/content.js +3 -0
  425. package/src/reducers/groups/groups.js +22 -0
  426. package/src/reducers/navigation/navigation.js +1 -0
  427. package/src/reducers/navigation/navigation.test.js +13 -1
  428. package/src/reducers/workflow/workflow.js +3 -0
  429. package/src/reducers/workflow/workflow.test.js +14 -0
  430. package/src/registry.js +31 -4
  431. package/src/registry.test.js +58 -9
  432. package/src/routes.js +9 -4
  433. package/src/server.jsx +4 -3
  434. package/src/start-client.jsx +8 -0
  435. package/src/store.js +4 -2
  436. package/test-setup-config.js +4 -1
  437. package/theme/themes/pastanaga/assets/fonts/Poppins/OFL.txt +93 -0
  438. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Bold-devanagari.woff2 +0 -0
  439. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Bold-latin.woff2 +0 -0
  440. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Bold-latinext.woff2 +0 -0
  441. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-BoldItalic-devanagari.woff2 +0 -0
  442. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-BoldItalic-latin.woff2 +0 -0
  443. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-BoldItalic-latinext.woff2 +0 -0
  444. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Light-devanagari.woff2 +0 -0
  445. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Light-latin.woff2 +0 -0
  446. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Light-latinext.woff2 +0 -0
  447. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Regular-devanagari.woff2 +0 -0
  448. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Regular-latin.woff2 +0 -0
  449. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Regular-latinext.woff2 +0 -0
  450. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-RegularItalic-devanagari.woff2 +0 -0
  451. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-RegularItalic-latin.woff2 +0 -0
  452. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-RegularItalic-latinext.woff2 +0 -0
  453. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Semibold-devanagari.woff2 +0 -0
  454. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Semibold-latin.woff2 +0 -0
  455. package/theme/themes/pastanaga/assets/fonts/Poppins/Poppins-Semibold-latinext.woff2 +0 -0
  456. package/theme/themes/pastanaga/extras/fonts.less +208 -0
  457. package/theme/themes/pastanaga/extras/main.less +8 -0
  458. package/theme/themes/pastanaga/extras/mixins.less +9 -0
  459. package/theme/themes/pastanaga/extras/toolbar.less +4 -7
  460. package/theme/themes/pastanaga/extras/userscontrolpanel.less +125 -0
  461. package/theme/themes/pastanaga/globals/site.variables +2 -1
  462. package/cypress/plugins/index.js +0 -17
  463. package/cypress.json +0 -9
  464. package/dist/assets.json +0 -1
  465. package/dist/chunks.json +0 -571
  466. package/dist/loadable-stats.json +0 -2070
  467. package/dist/public/android-chrome-192x192.png +0 -0
  468. package/dist/public/android-chrome-512x512.png +0 -0
  469. package/dist/public/apple-touch-icon.png +0 -0
  470. package/dist/public/favicon-16x16.png +0 -0
  471. package/dist/public/favicon-32x32.png +0 -0
  472. package/dist/public/favicon.ico +0 -0
  473. package/dist/public/icon.svg +0 -13
  474. package/dist/public/index.html.spa +0 -34
  475. package/dist/public/robots.txt +0 -2
  476. package/dist/public/site.webmanifest +0 -19
  477. package/dist/public/static/css/14.d7b2dfe0.chunk.css +0 -409
  478. package/dist/public/static/css/3.a3490306.chunk.css +0 -2
  479. package/dist/public/static/css/client.6af53db6.chunk.css +0 -8
  480. package/dist/public/static/css/plone-volto-components-manage-Widgets-DatetimeWidget.9a0f4d0d.chunk.css +0 -2
  481. package/dist/public/static/js/0.3e794c57.chunk.js +0 -2
  482. package/dist/public/static/js/1.fece2b93.chunk.js +0 -3
  483. package/dist/public/static/js/1.fece2b93.chunk.js.LICENSE.txt +0 -8
  484. package/dist/public/static/js/14.d7b2dfe0.chunk.js +0 -3
  485. package/dist/public/static/js/14.d7b2dfe0.chunk.js.LICENSE.txt +0 -146
  486. package/dist/public/static/js/15.c1eb25b4.chunk.js +0 -3
  487. package/dist/public/static/js/15.c1eb25b4.chunk.js.LICENSE.txt +0 -8
  488. package/dist/public/static/js/16.70e24cba.chunk.js +0 -2
  489. package/dist/public/static/js/17.f03d2a82.chunk.js +0 -2
  490. package/dist/public/static/js/18.8304f096.chunk.js +0 -3
  491. package/dist/public/static/js/18.8304f096.chunk.js.LICENSE.txt +0 -8
  492. package/dist/public/static/js/19.11da9600.chunk.js +0 -2
  493. package/dist/public/static/js/20.8d540d9e.chunk.js +0 -2
  494. package/dist/public/static/js/21.a0b6c3e3.chunk.js +0 -2
  495. package/dist/public/static/js/22.900fd756.chunk.js +0 -2
  496. package/dist/public/static/js/23.6af29de6.chunk.js +0 -2
  497. package/dist/public/static/js/24.150c2de0.chunk.js +0 -2
  498. package/dist/public/static/js/25.d0db20fc.chunk.js +0 -2
  499. package/dist/public/static/js/26.03061480.chunk.js +0 -2
  500. package/dist/public/static/js/27.9fa01afd.chunk.js +0 -2
  501. package/dist/public/static/js/28.11f2785d.chunk.js +0 -2
  502. package/dist/public/static/js/29.83468c28.chunk.js +0 -2
  503. package/dist/public/static/js/3.a3490306.chunk.js +0 -2
  504. package/dist/public/static/js/30.7ce1882f.chunk.js +0 -2
  505. package/dist/public/static/js/31.145dfcf9.chunk.js +0 -2
  506. package/dist/public/static/js/32.86ea3e21.chunk.js +0 -2
  507. package/dist/public/static/js/33.a7d2c488.chunk.js +0 -3
  508. package/dist/public/static/js/33.a7d2c488.chunk.js.LICENSE.txt +0 -37
  509. package/dist/public/static/js/34.54f44477.chunk.js +0 -3
  510. package/dist/public/static/js/34.54f44477.chunk.js.LICENSE.txt +0 -7
  511. package/dist/public/static/js/35.14d24902.chunk.js +0 -3
  512. package/dist/public/static/js/35.14d24902.chunk.js.LICENSE.txt +0 -14
  513. package/dist/public/static/js/36.9224daf8.chunk.js +0 -3
  514. package/dist/public/static/js/36.9224daf8.chunk.js.LICENSE.txt +0 -8
  515. package/dist/public/static/js/37.fba4ef54.chunk.js +0 -2
  516. package/dist/public/static/js/38.e3318f33.chunk.js +0 -2
  517. package/dist/public/static/js/39.4cbf0549.chunk.js +0 -2
  518. package/dist/public/static/js/4.bdc4a5c5.chunk.js +0 -2
  519. package/dist/public/static/js/6.69ba4792.chunk.js +0 -2
  520. package/dist/public/static/js/client.6af53db6.chunk.js +0 -2
  521. package/dist/public/static/js/draft-js-lib-isSoftNewlineEvent.ad4b1307.chunk.js +0 -2
  522. package/dist/public/static/js/moment.dfd83abb.chunk.js +0 -2
  523. package/dist/public/static/js/plone-volto-components-manage-Widgets-DatetimeWidget.9a0f4d0d.chunk.js +0 -2
  524. package/dist/public/static/js/plone-volto-components-theme-View-EventView.9992128c.chunk.js +0 -2
  525. package/dist/public/static/js/react-dates.d94a34ee.chunk.js +0 -2
  526. package/dist/public/static/js/react-select.697c74e8.chunk.js +0 -2
  527. package/dist/public/static/js/react-simple-code-editor.484ec69f.chunk.js +0 -2
  528. package/dist/public/static/js/runtime~client.712b828a.js +0 -2
  529. package/dist/public/static/media/Logo.16e25cdf.svg +0 -21
  530. package/dist/public/static/media/block-image.8a4a14d5.svg +0 -8
  531. package/dist/public/static/media/block-maps.731e84f6.svg +0 -7
  532. package/dist/public/static/media/block-video.832fa3ff.svg +0 -7
  533. package/dist/public/static/media/default-image.9451b251.svg +0 -13
  534. package/dist/public/static/media/flags.9c74e172.png +0 -0
  535. package/dist/public/static/media/icons.022583c4.svg +0 -320
  536. package/dist/public/static/media/icons.06400145.ttf +0 -0
  537. package/dist/public/static/media/icons.dbc1ef8b.eot +0 -0
  538. package/dist/public/static/media/icons.df45b7de.woff +0 -0
  539. package/dist/server.js +0 -2
  540. package/src/components/manage/Blocks/Image/ImageSizeWidget.jsx +0 -78
  541. package/src/components/manage/Blocks/ToC/Edit.test.jsx +0 -59
  542. package/src/components/manage/Blocks/ToC/View.test.jsx +0 -59
  543. 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": [["@plone/volto", "./src"], ["@package", "./src"], ["@root", "./src"]],
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": [ "load-volto-addons" ]
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@v2
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@v2
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@v2
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.0a4
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@v2
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@v2
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@v2
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@v2
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: yarn && yarn test
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@v2
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@v2
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@v1
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
@@ -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
- // console.dir(resultConfig, { depth: null });
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
  },