@plone/volto 17.0.0-alpha.24 → 17.0.0-alpha.26

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 (130) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/CHANGELOG.md +92 -4
  3. package/CONTRIBUTING.md +5 -1
  4. package/README.md +9 -7
  5. package/cypress/support/commands.js +12 -9
  6. package/cypress.config.js +1 -0
  7. package/locales/ca/LC_MESSAGES/volto.po +41 -15
  8. package/locales/ca.json +1 -1
  9. package/locales/de/LC_MESSAGES/volto.po +41 -15
  10. package/locales/de.json +1 -1
  11. package/locales/en/LC_MESSAGES/volto.po +40 -14
  12. package/locales/en.json +1 -1
  13. package/locales/es/LC_MESSAGES/volto.po +69 -43
  14. package/locales/es.json +1 -1
  15. package/locales/eu/LC_MESSAGES/volto.po +40 -14
  16. package/locales/eu.json +1 -1
  17. package/locales/fi/LC_MESSAGES/volto.po +40 -14
  18. package/locales/fi.json +1 -1
  19. package/locales/fr/LC_MESSAGES/volto.po +41 -15
  20. package/locales/fr.json +1 -1
  21. package/locales/it/LC_MESSAGES/volto.po +40 -14
  22. package/locales/it.json +1 -1
  23. package/locales/ja/LC_MESSAGES/volto.po +40 -14
  24. package/locales/ja.json +1 -1
  25. package/locales/nl/LC_MESSAGES/volto.po +41 -15
  26. package/locales/nl.json +1 -1
  27. package/locales/pt/LC_MESSAGES/volto.po +41 -15
  28. package/locales/pt.json +1 -1
  29. package/locales/pt_BR/LC_MESSAGES/volto.po +40 -14
  30. package/locales/pt_BR.json +1 -1
  31. package/locales/ro/LC_MESSAGES/volto.po +41 -15
  32. package/locales/ro.json +1 -1
  33. package/locales/volto.pot +41 -15
  34. package/locales/zh_CN/LC_MESSAGES/volto.po +41 -15
  35. package/locales/zh_CN.json +1 -1
  36. package/package.json +4 -4
  37. package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +90 -0
  38. package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +6 -0
  39. package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +6 -0
  40. package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +6 -0
  41. package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +10 -0
  42. package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +10 -0
  43. package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +30 -0
  44. package/packages/volto-slate/build/messages/src/elementEditor/messages.json +10 -0
  45. package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +6 -0
  46. package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +6 -0
  47. package/packages/volto-slate/package.json +1 -1
  48. package/packages/volto-slate/src/editor/render.jsx +2 -3
  49. package/src/actions/index.js +4 -0
  50. package/src/actions/navroot/navroot.js +16 -0
  51. package/src/actions/navroot/navroot.test.js +15 -0
  52. package/src/actions/relations/relations.js +17 -0
  53. package/src/actions/site/site.js +16 -0
  54. package/src/actions/site/site.test.js +15 -0
  55. package/src/actions/userSession/userSession.js +17 -1
  56. package/src/components/manage/Blocks/Block/Settings.jsx +2 -0
  57. package/src/components/manage/Blocks/Block/Settings.test.jsx +90 -0
  58. package/src/components/manage/Blocks/Image/schema.js +5 -1
  59. package/src/components/manage/Blocks/Listing/withQuerystringResults.jsx +18 -11
  60. package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +42 -25
  61. package/src/components/manage/Blocks/ToC/View.jsx +75 -13
  62. package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +4 -13
  63. package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.test.jsx +44 -0
  64. package/src/components/manage/Contents/Contents.jsx +27 -0
  65. package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +65 -38
  66. package/src/components/manage/Controlpanels/Relations/BrokenRelations.jsx +11 -9
  67. package/src/components/manage/Controlpanels/Relations/Relations.jsx +3 -3
  68. package/src/components/manage/Controlpanels/Relations/RelationsListing.jsx +8 -7
  69. package/src/components/manage/Controlpanels/Relations/RelationsMatrix.jsx +15 -9
  70. package/src/components/manage/Controlpanels/Rules/AddRule.jsx +1 -1
  71. package/src/components/manage/Controlpanels/Rules/EditRule.jsx +1 -1
  72. package/src/components/manage/Controlpanels/Users/RenderUsers.jsx +95 -5
  73. package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +127 -99
  74. package/src/components/manage/Diff/DiffField.jsx +25 -1
  75. package/src/components/manage/Form/BlockDataForm.jsx +3 -2
  76. package/src/components/manage/Form/BlockDataForm.test.jsx +34 -2
  77. package/src/components/manage/LinksToItem/LinksToItem.jsx +1 -1
  78. package/src/components/manage/LinksToItem/LinksToItem.test.jsx +5 -2
  79. package/src/components/manage/Messages/Messages.jsx +32 -99
  80. package/src/components/manage/Messages/Messages.test.jsx +0 -1
  81. package/src/components/manage/Sharing/Sharing.jsx +50 -21
  82. package/src/components/manage/UniversalLink/UniversalLink.jsx +4 -6
  83. package/src/components/manage/Widgets/ArrayWidget.jsx +3 -1
  84. package/src/components/manage/Widgets/ArrayWidget.test.jsx +45 -1
  85. package/src/components/manage/Widgets/FormFieldWrapper.jsx +1 -1
  86. package/src/components/manage/Widgets/RegistryImageWidget.jsx +210 -0
  87. package/src/components/manage/Widgets/RegistryImageWidget.test.jsx +91 -0
  88. package/src/components/manage/Widgets/SelectWidget.jsx +15 -1
  89. package/src/components/manage/Widgets/SelectWidget.test.jsx +45 -1
  90. package/src/components/theme/Comments/Comment.stories.jsx +84 -0
  91. package/src/components/theme/Comments/Comments.jsx +273 -378
  92. package/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +37 -3
  93. package/src/components/theme/Login/Login.jsx +159 -241
  94. package/src/components/theme/Logo/Logo.Multilingual.test.jsx +131 -1
  95. package/src/components/theme/Logo/Logo.jsx +35 -29
  96. package/src/components/theme/Logo/Logo.test.jsx +135 -1
  97. package/src/components/theme/Logout/Logout.jsx +36 -83
  98. package/src/components/theme/Navigation/Navigation.jsx +86 -171
  99. package/src/components/theme/Search/SearchTags.jsx +30 -60
  100. package/src/components/theme/SearchWidget/SearchWidget.jsx +15 -3
  101. package/src/components/theme/SearchWidget/SearchWidget.test.jsx +8 -0
  102. package/src/components/theme/Sitemap/Sitemap.jsx +24 -13
  103. package/src/components/theme/Sitemap/Sitemap.test.jsx +23 -2
  104. package/src/components/theme/View/View.jsx +2 -0
  105. package/src/config/ControlPanels.js +0 -1
  106. package/src/config/Widgets.jsx +2 -0
  107. package/src/config/index.js +15 -3
  108. package/src/constants/ActionTypes.js +4 -0
  109. package/src/express-middleware/images.js +1 -0
  110. package/src/helpers/MessageLabels/MessageLabels.js +26 -4
  111. package/src/helpers/Site/index.js +21 -0
  112. package/src/helpers/index.js +1 -0
  113. package/src/reducers/index.js +4 -0
  114. package/src/reducers/navroot/navroot.js +79 -0
  115. package/src/reducers/navroot/navroot.test.js +110 -0
  116. package/src/reducers/relations/relations.js +74 -46
  117. package/src/reducers/site/site.js +51 -0
  118. package/src/reducers/site/site.test.js +67 -0
  119. package/src/reducers/userSession/userSession.js +15 -1
  120. package/src/server.jsx +9 -0
  121. package/test-setup-config.js +1 -0
  122. package/theme/themes/pastanaga/collections/form.overrides +46 -0
  123. package/theme/themes/pastanaga/elements/input.overrides +10 -0
  124. package/theme/themes/pastanaga/elements/label.overrides +10 -0
  125. package/theme/themes/pastanaga/extras/login.less +3 -0
  126. package/webpack-plugins/webpack-less-plugin.js +19 -0
  127. package/.gitignore~ +0 -71
  128. package/news/4547.breaking~ +0 -1
  129. package/package.json~ +0 -444
  130. package/src/config/index.js~ +0 -223
package/package.json~ DELETED
@@ -1,444 +0,0 @@
1
- {
2
- "name": "@plone/volto",
3
- "description": "Volto",
4
- "maintainers": [
5
- {
6
- "name": "Plone Foundation",
7
- "email": "plone-developers@lists.sourceforge.net",
8
- "url": "http://plone.org"
9
- }
10
- ],
11
- "license": "MIT",
12
- "version": "17.0.0-alpha.23",
13
- "repository": {
14
- "type": "git",
15
- "url": "git@github.com:plone/volto.git"
16
- },
17
- "customizationPaths": [
18
- "src/customizations/"
19
- ],
20
- "bugs": {
21
- "url": "https://github.com/plone/volto/issues",
22
- "email": "plone-developers@lists.sourceforge.net"
23
- },
24
- "homepage": "https://plone.org",
25
- "keywords": [
26
- "volto",
27
- "plone",
28
- "react"
29
- ],
30
- "packagesFolderAddons": {
31
- "volto-slate": {
32
- "package": "@plone/volto-slate"
33
- }
34
- },
35
- "scripts": {
36
- "postinstall": "make patches",
37
- "analyze": "BUNDLE_ANALYZE=true razzle build",
38
- "start": "razzle start",
39
- "start:coresandbox": "ADDONS=coresandbox razzle start",
40
- "build": "razzle build --noninteractive",
41
- "prepare": "husky install",
42
- "test": "razzle test --maxWorkers=50%",
43
- "test:ci": "CI=true NODE_ICU_DATA=node_modules/full-icu razzle test",
44
- "test:husky": "CI=true yarn test --bail --findRelatedTests",
45
- "test:debug": "node --inspect node_modules/.bin/jest --runInBand",
46
- "start:prod": "NODE_ENV=production node build/server.js",
47
- "prettier": "./node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,ts,tsx,json}'",
48
- "prettier:fix": "./node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,ts,tsx,json}'",
49
- "stylelint": "./node_modules/.bin/stylelint 'theme/**/*.{css,less}' 'src/**/*.{css,less}'",
50
- "stylelint:overrides": "./node_modules/.bin/stylelint 'theme/**/*.overrides' 'src/**/*.overrides'",
51
- "stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
52
- "lint": "./node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx,json}'",
53
- "lint:fix": "./node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx,json}'",
54
- "i18n": "rm -rf build/messages && NODE_ENV=production i18n",
55
- "i18n:ci": "yarn i18n && git diff -G'^[^\"POT]' --exit-code",
56
- "dry-release": "release-it --dry-run",
57
- "release": "release-it",
58
- "release-major-alpha": "release-it major --preRelease=alpha",
59
- "release-alpha": "release-it --preRelease=alpha",
60
- "storybook": "start-storybook -p 6006",
61
- "build-storybook": "build-storybook"
62
- },
63
- "bundlewatch": {
64
- "files": [
65
- {
66
- "path": "build/public/static/js/*.js",
67
- "maxSize": "700kB"
68
- }
69
- ]
70
- },
71
- "jest": {
72
- "modulePathIgnorePatterns": [
73
- "api",
74
- "packages"
75
- ],
76
- "transform": {
77
- "^.+\\.js(x)?$": "babel-jest",
78
- "^.+\\.(png)$": "jest-file",
79
- "^.+\\.(jpg)$": "jest-file",
80
- "^.+\\.(svg)$": "./jest-svgsystem-transform.js"
81
- },
82
- "moduleNameMapper": {
83
- "@plone/volto/package.json": "<rootDir>/package.json",
84
- "@plone/volto/babel": "<rootDir>/babel.js",
85
- "@plone/volto/(.*)$": "<rootDir>/src/$1",
86
- "@plone/volto-slate/(.*)$": "<rootDir>/packages/volto-slate/src/$1",
87
- "~/config": "<rootDir>/src/config",
88
- "~/../locales/${lang}.json": "<rootDir>/locales/en.json",
89
- "(.*)/locales/(.*)": "<rootDir>/locales/$2",
90
- "load-volto-addons": "<rootDir>/jest-addons-loader.js",
91
- "@package/(.*)$": "<rootDir>/src/$1",
92
- "@root/config": "<rootDir>/jest-addons-loader.js",
93
- "@root/(.*)$": "<rootDir>/src/$1",
94
- "@voltoconfig": "<rootDir>/jest-addons-loader.js",
95
- "\\.(css|less|scss|sass)$": "identity-obj-proxy"
96
- },
97
- "coverageThreshold": {
98
- "global": {
99
- "branches": 10,
100
- "functions": 10,
101
- "lines": 10,
102
- "statements": 10
103
- }
104
- },
105
- "setupFiles": [
106
- "./test-setup-globals.js",
107
- "./test-setup-config.js"
108
- ],
109
- "globalSetup": "./global-test-setup.js",
110
- "globals": {
111
- "__DEV__": true
112
- },
113
- "testMatch": [
114
- "<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
115
- "<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}",
116
- "<rootDir>/__tests__/**/?(*.)(spec|test).{js,jsx,mjs}",
117
- "<rootDir>/packages/volto-slate/src/**/?(*.)(spec|test).{js,jsx,mjs}"
118
- ]
119
- },
120
- "prettier": {
121
- "trailingComma": "all",
122
- "singleQuote": true,
123
- "overrides": [
124
- {
125
- "files": "*.overrides",
126
- "options": {
127
- "parser": "less"
128
- }
129
- }
130
- ]
131
- },
132
- "stylelint": {
133
- "extends": [
134
- "stylelint-config-idiomatic-order"
135
- ],
136
- "plugins": [
137
- "stylelint-prettier"
138
- ],
139
- "overrides": [
140
- {
141
- "files": [
142
- "**/*.scss"
143
- ],
144
- "customSyntax": "postcss-scss"
145
- },
146
- {
147
- "files": [
148
- "**/*.less"
149
- ],
150
- "customSyntax": "postcss-less"
151
- },
152
- {
153
- "files": [
154
- "**/*.overrides"
155
- ],
156
- "customSyntax": "postcss-less"
157
- }
158
- ],
159
- "rules": {
160
- "prettier/prettier": true,
161
- "rule-empty-line-before": [
162
- "always-multi-line",
163
- {
164
- "except": [
165
- "first-nested"
166
- ],
167
- "ignore": [
168
- "after-comment"
169
- ]
170
- }
171
- ]
172
- },
173
- "ignoreFiles": "theme/themes/default/**/*.overrides"
174
- },
175
- "browserslist": [
176
- ">1%",
177
- "last 4 versions",
178
- "Firefox ESR",
179
- "not ie 11",
180
- "not dead"
181
- ],
182
- "release-it": {
183
- "hooks": {
184
- "before:bump": [
185
- "yarn i18n",
186
- "git add locales"
187
- ],
188
- "after:bump": "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft && pipx run towncrier build --yes --version ${version} && make corepackagebump VERSION=${version}",
189
- "after:release": "rm .changelog.draft"
190
- },
191
- "git": {
192
- "changelog": "pipx run towncrier build --draft --yes --version 0.0.0",
193
- "requireUpstream": false,
194
- "requireCleanWorkingDir": false
195
- },
196
- "github": {
197
- "release": true,
198
- "releaseName": "${version}",
199
- "releaseNotes": "cat .changelog.draft"
200
- }
201
- },
202
- "lint-staged": {
203
- "src/**/*.{js,jsx,ts,tsx,json}": [
204
- "npx eslint --max-warnings=0 --fix",
205
- "npx prettier --single-quote --write",
206
- "yarn test:husky"
207
- ],
208
- "src/**/*.{jsx}": [
209
- "yarn i18n"
210
- ],
211
- "theme/**/*.{css,less}": [
212
- "npx stylelint --fix"
213
- ],
214
- "src/**/*.{css,less}": [
215
- "npx stylelint --fix"
216
- ],
217
- "theme/**/*.overrides": [
218
- "npx stylelint --fix"
219
- ],
220
- "src/**/*.overrides": [
221
- "npx stylelint --fix"
222
- ]
223
- },
224
- "engines": {
225
- "node": "^16 || ^18"
226
- },
227
- "dependencies": {
228
- "@babel/core": "^7.0.0",
229
- "@babel/plugin-proposal-export-default-from": "7.18.9",
230
- "@babel/plugin-proposal-export-namespace-from": "7.18.9",
231
- "@babel/plugin-proposal-json-strings": "7.18.6",
232
- "@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
233
- "@babel/plugin-proposal-throw-expressions": "7.18.6",
234
- "@babel/plugin-syntax-export-namespace-from": "7.8.3",
235
- "@babel/runtime": "7.20.6",
236
- "@babel/types": "7.20.5",
237
- "@loadable/babel-plugin": "5.13.2",
238
- "@loadable/component": "5.14.1",
239
- "@loadable/server": "5.14.0",
240
- "@loadable/webpack-plugin": "5.15.2",
241
- "@plone/scripts": "2.1.2",
242
- "@testing-library/cypress": "9.0.0",
243
- "@testing-library/jest-dom": "5.16.4",
244
- "@testing-library/react": "12.1.5",
245
- "@testing-library/react-hooks": "8.0.1",
246
- "autoprefixer": "10.4.8",
247
- "axe-core": "4.4.2",
248
- "babel-eslint": "10.1.0",
249
- "babel-plugin-add-module-exports": "0.2.1",
250
- "babel-plugin-lodash": "3.3.4",
251
- "babel-plugin-react-intl": "5.1.17",
252
- "babel-plugin-root-import": "6.1.0",
253
- "babel-preset-razzle": "4.2.17",
254
- "circular-dependency-plugin": "5.2.2",
255
- "classnames": "2.2.6",
256
- "commander": "8.2.0",
257
- "connected-react-router": "6.8.0",
258
- "crypto-random-string": "3.2.0",
259
- "css-loader": "5.2.7",
260
- "cypress": "12.17.1",
261
- "cypress-axe": "1.4.0",
262
- "cypress-file-upload": "5.0.8",
263
- "debug": "4.3.2",
264
- "decorate-component-with-props": "1.2.1",
265
- "deep-freeze": "0.0.1",
266
- "dependency-graph": "0.10.0",
267
- "detect-browser": "5.1.0",
268
- "diff": "3.5.0",
269
- "draft-js": "0.10.5",
270
- "draft-js-block-breakout-plugin": "2.0.1",
271
- "draft-js-buttons": "2.0.2",
272
- "draft-js-import-html": "1.4.1",
273
- "draft-js-inline-toolbar-plugin": "2.0.3",
274
- "draft-js-plugins-editor": "2.1.1",
275
- "draft-js-plugins-utils": "2.0.3",
276
- "draftjs-filters": "2.3.0",
277
- "eslint": "6.8.0",
278
- "eslint-config-airbnb": "18.1.0",
279
- "eslint-config-prettier": "6.11.0",
280
- "eslint-config-react-app": "5.2.1",
281
- "eslint-import-resolver-alias": "1.1.2",
282
- "eslint-import-resolver-babel-plugin-root-import": "1.1.1",
283
- "eslint-plugin-flowtype": "4.7.0",
284
- "eslint-plugin-import": "2.20.2",
285
- "eslint-plugin-jsx-a11y": "6.2.3",
286
- "eslint-plugin-prettier": "3.1.3",
287
- "eslint-plugin-react": "7.20.0",
288
- "eslint-plugin-react-hooks": "4.0.2",
289
- "express": "4.17.3",
290
- "filesize": "6",
291
- "github-slugger": "1.4.0",
292
- "glob": "7.1.6",
293
- "history": "4.10.1",
294
- "hoist-non-react-statics": "3.3.2",
295
- "html-webpack-plugin": "5.5.0",
296
- "http-proxy-middleware": "2.0.1",
297
- "husky": "8.0.1",
298
- "identity-obj-proxy": "3.0.0",
299
- "image-extensions": "1.1.0",
300
- "immutable": "3",
301
- "is-hotkey": "0.2.0",
302
- "is-url": "1.2.4",
303
- "jest-file": "1.0.0",
304
- "jotai": "2.0.3",
305
- "jwt-decode": "2.2.0",
306
- "less": "3.11.1",
307
- "less-loader": "11.1.0",
308
- "linkify-it": "3.0.2",
309
- "lint-staged": "10.2.2",
310
- "locale": "0.1.0",
311
- "lodash": "4.17.21",
312
- "lodash-move": "1.1.1",
313
- "lodash-webpack-plugin": "0.11.6",
314
- "mini-css-extract-plugin": "2.7.2",
315
- "moment": "2.29.4",
316
- "object-assign": "4.1.1",
317
- "pofile": "1.0.10",
318
- "postcss": "8.4.13",
319
- "postcss-flexbugs-fixes": "5.0.2",
320
- "postcss-less": "6.0.0",
321
- "postcss-load-config": "3.1.4",
322
- "postcss-loader": "7.0.2",
323
- "postcss-overrides": "3.1.4",
324
- "postcss-scss": "4.0.6",
325
- "prepend-http": "2",
326
- "prettier": "2.0.5",
327
- "pretty-bytes": "5.3.0",
328
- "prismjs": "1.27.0",
329
- "promise-file-reader": "1.0.2",
330
- "prop-types": "15.7.2",
331
- "query-string": "7.1.0",
332
- "razzle": "4.2.18",
333
- "razzle-dev-utils": "4.2.18",
334
- "razzle-plugin-bundle-analyzer": "4.2.18",
335
- "razzle-plugin-scss": "4.2.18",
336
- "rc-time-picker": "3.7.3",
337
- "react": "17.0.2",
338
- "react-anchor-link-smooth-scroll": "1.0.12",
339
- "react-animate-height": "2.0.17",
340
- "react-beautiful-dnd": "13.0.0",
341
- "react-cookie": "4.1.1",
342
- "react-dates": "21.5.1",
343
- "react-detect-click-outside": "1.1.1",
344
- "react-dnd": "5.0.0",
345
- "react-dnd-html5-backend": "5.0.1",
346
- "react-dom": "17.0.2",
347
- "react-dropzone": "11.1.0",
348
- "react-fast-compare": "2.0.4",
349
- "react-image-gallery": "1.2.7",
350
- "react-intersection-observer": "9.1.0",
351
- "react-intl": "3.8.0",
352
- "react-intl-redux": "2.2.0",
353
- "react-medium-image-zoom": "3.0.15",
354
- "react-portal": "4.2.1",
355
- "react-redux": "7.2.4",
356
- "react-router": "5.2.0",
357
- "react-router-config": "5.1.1",
358
- "react-router-dom": "5.2.0",
359
- "react-router-hash-link": "2.4.3",
360
- "react-select": "4.3.1",
361
- "react-select-async-paginate": "0.5.3",
362
- "react-share": "2.3.1",
363
- "react-side-effect": "2.1.0",
364
- "react-simple-code-editor": "0.7.1",
365
- "react-sortable-hoc": "2.0.0",
366
- "react-test-renderer": "17.0.2",
367
- "react-toastify": "5.4.1",
368
- "react-transition-group": "4.4.5",
369
- "react-virtualized": "9.22.3",
370
- "redraft": "0.10.2",
371
- "redux": "4.1.0",
372
- "redux-actions": "2.6.5",
373
- "redux-connect": "10.0.0",
374
- "redux-devtools-extension": "2.13.8",
375
- "redux-localstorage-simple": "2.3.1",
376
- "redux-mock-store": "1.5.4",
377
- "redux-thunk": "2.3.0",
378
- "rrule": "2.7.1",
379
- "semantic-ui-less": "2.4.1",
380
- "semantic-ui-react": "2.0.3",
381
- "serialize-javascript": "3.1.0",
382
- "slate": "0.84.0",
383
- "slate-hyperscript": "0.81.3",
384
- "slate-react": "0.83.2",
385
- "start-server-and-test": "1.14.0",
386
- "style-loader": "3.3.1",
387
- "stylelint": "14.0.1",
388
- "stylelint-config-idiomatic-order": "8.1.0",
389
- "stylelint-config-prettier": "8.0.1",
390
- "stylelint-prettier": "1.1.2",
391
- "superagent": "3.8.2",
392
- "svg-loader": "0.0.2",
393
- "svgo-loader": "3.0.3",
394
- "terser-webpack-plugin": "5.3.6",
395
- "tlds": "1.203.1",
396
- "undoo": "0.5.0",
397
- "universal-cookie": "4.0.4",
398
- "universal-cookie-express": "4.0.3",
399
- "use-deep-compare-effect": "1.8.1",
400
- "uuid": "^8.3.2",
401
- "webpack": "5.76.1",
402
- "webpack-dev-server": "4.11.1",
403
- "webpack-node-externals": "3.0.0",
404
- "xmlrpc": "1.3.2",
405
- "yarnhook": "0.5.1"
406
- },
407
- "devDependencies": {
408
- "@storybook/addon-actions": "^6.5.15",
409
- "@storybook/addon-controls": "6.5.15",
410
- "@storybook/addon-essentials": "^6.5.15",
411
- "@storybook/addon-links": "^6.5.15",
412
- "@storybook/builder-webpack5": "^6.5.15",
413
- "@storybook/manager-webpack5": "^6.5.15",
414
- "@storybook/react": "^6.5.15",
415
- "babel-loader": "9.1.0",
416
- "bundlewatch": "0.3.3",
417
- "full-icu": "1.4.0",
418
- "identity-obj-proxy": "3.0.0",
419
- "jest": "26.6.3",
420
- "jest-environment-jsdom": "^26",
421
- "jsonwebtoken": "9.0.0",
422
- "react-error-overlay": "6.0.9",
423
- "react-is": "^16.13.1",
424
- "release-it": "^16.1.3",
425
- "semver": "^7.5.4",
426
- "tmp": "0.2.1",
427
- "use-trace-update": "1.3.2",
428
- "why": "0.6.2"
429
- },
430
- "resolutions-comments": {
431
- "ua-parser-js": "See https://github.com/faisalman/ua-parser-js/issues/536"
432
- },
433
- "resolutions": {
434
- "clean-css": "5.3.1",
435
- "http-proxy": "^1.18.1",
436
- "react-dev-utils": "^12",
437
- "react-error-overlay": "6.0.9",
438
- "ua-parser-js": "0.7.28"
439
- },
440
- "volta": {
441
- "node": "18.13.0"
442
- },
443
- "packageManager": "yarn@3.2.3"
444
- }
@@ -1,223 +0,0 @@
1
- /**
2
- * Config.
3
- * @module config
4
- */
5
- import { parse as parseUrl } from 'url';
6
- import { defaultWidget, widgetMapping } from './Widgets';
7
- import {
8
- layoutViews,
9
- contentTypesViews,
10
- defaultView,
11
- errorViews,
12
- layoutViewsNamesMapping,
13
- } from './Views';
14
- import { nonContentRoutes } from './NonContentRoutes';
15
- import {
16
- groupBlocksOrder,
17
- requiredBlocks,
18
- blocksConfig,
19
- initialBlocks,
20
- initialBlocksFocus,
21
- } from './Blocks';
22
- import { components } from './Components';
23
- import { loadables } from './Loadables';
24
- import { workflowMapping } from './Workflows';
25
-
26
- import { contentIcons } from './ContentIcons';
27
- import { styleClassNameConverters, styleClassNameExtenders } from './Style';
28
- import {
29
- controlPanelsIcons,
30
- filterControlPanels,
31
- filterControlPanelsSchema,
32
- } from './ControlPanels';
33
-
34
- import { richtextEditorSettings, richtextViewSettings } from './RichTextEditor';
35
-
36
- import applyAddonConfiguration, { addonsInfo } from 'load-volto-addons';
37
-
38
- import ConfigRegistry from '@plone/volto/registry';
39
-
40
- const host = process.env.HOST || 'localhost';
41
- const port = process.env.PORT || '3000';
42
-
43
- const apiPath =
44
- process.env.RAZZLE_API_PATH ||
45
- (__DEVELOPMENT__ ? `http://${host}:${port}` : '');
46
-
47
- const getServerURL = (url) => {
48
- if (!url) return;
49
- const apiPathURL = parseUrl(url);
50
- return `${apiPathURL.protocol}//${apiPathURL.hostname}${
51
- apiPathURL.port ? `:${apiPathURL.port}` : ''
52
- }`;
53
- };
54
-
55
- // Sensible defaults for publicURL
56
- // if RAZZLE_PUBLIC_URL is present, use it
57
- // if in DEV, use the host/port combination by default
58
- // if in PROD, assume it's RAZZLE_API_PATH server name (no /api or alikes) or fallback
59
- // to DEV settings if RAZZLE_API_PATH is not present
60
- const publicURL =
61
- process.env.RAZZLE_PUBLIC_URL ||
62
- (__DEVELOPMENT__
63
- ? `http://${host}:${port}`
64
- : getServerURL(process.env.RAZZLE_API_PATH) || `http://${host}:${port}`);
65
-
66
- const serverConfig =
67
- typeof __SERVER__ !== 'undefined' && __SERVER__
68
- ? require('./server').default
69
- : {};
70
-
71
- let config = {
72
- settings: {
73
- host,
74
- port,
75
- // The URL Volto is going to be served (see sensible defaults above)
76
- publicURL,
77
- apiPath,
78
- apiExpanders: [
79
- // Add the following expanders for only issuing a single request.
80
- // https://6.docs.plone.org/volto/configuration/settings-reference.html#term-apiExpanders
81
- // {
82
- // match: '',
83
- // GET_CONTENT: ['breadcrumbs', 'navigation', 'actions', 'types'],
84
- // },
85
- ],
86
- // Internal proxy to bypass CORS *while developing*. NOT intended for production use.
87
- // In production is recommended you use a Seamless mode deployment using a web server in
88
- // front of both the frontend and the backend so you can bypass CORS safely.
89
- // https://6.docs.plone.org/volto/deploying/seamless-mode.html
90
- devProxyToApiPath:
91
- process.env.RAZZLE_DEV_PROXY_API_PATH ||
92
- process.env.RAZZLE_INTERNAL_API_PATH ||
93
- process.env.RAZZLE_API_PATH ||
94
- 'http://localhost:8080/Plone', // Set it to '' for disabling the proxy
95
- // proxyRewriteTarget Set it for set a custom target for the proxy or overide the internal VHM rewrite
96
- // proxyRewriteTarget: '/VirtualHostBase/http/localhost:8080/Plone/VirtualHostRoot/_vh_api'
97
- // proxyRewriteTarget: 'https://myvoltositeinproduction.com'
98
- proxyRewriteTarget: process.env.RAZZLE_PROXY_REWRITE_TARGET || undefined,
99
- // apiPath: process.env.RAZZLE_API_PATH || 'http://localhost:8000', // for Volto reference
100
- // apiPath: process.env.RAZZLE_API_PATH || 'http://localhost:8081/db/web', // for guillotina
101
- actions_raising_api_errors: ['GET_CONTENT', 'UPDATE_CONTENT'],
102
- internalApiPath: process.env.RAZZLE_INTERNAL_API_PATH || undefined,
103
- websockets: process.env.RAZZLE_WEBSOCKETS || false,
104
- // TODO: legacyTraverse to be removed when the use of the legacy traverse is deprecated.
105
- legacyTraverse: process.env.RAZZLE_LEGACY_TRAVERSE || false,
106
- cookieExpires: 15552000, //in seconds. Default is 6 month (15552000)
107
- nonContentRoutes,
108
- richtextEditorSettings, // Part of draftjs support, to be removed
109
- richtextViewSettings, // Part of draftjs support, to be removed
110
- imageObjects: ['Image'],
111
- reservedIds: ['login', 'layout', 'plone', 'zip', 'properties'],
112
- downloadableObjects: ['File'], //list of content-types for which the direct download of the file will be carried out if the user is not authenticated
113
- viewableInBrowserObjects: [], //ex: ['File']. List of content-types for which the file will be displayed in browser if the user is not authenticated
114
- listingPreviewImageField: 'image', // deprecated from Volto 14 onwards
115
- openExternalLinkInNewTab: false,
116
- notSupportedBrowsers: ['ie'],
117
- defaultPageSize: 25,
118
- isMultilingual: false,
119
- supportedLanguages: ['en'],
120
- defaultLanguage: 'en',
121
- navDepth: 1,
122
- expressMiddleware: serverConfig.expressMiddleware, // BBB
123
- defaultBlockType: 'slate',
124
- verticalFormTabs: false,
125
- useEmailAsLogin: false,
126
- persistentReducers: ['blocksClipboard'],
127
- initialReducersBlacklist: [], // reducers in this list won't be hydrated in windows.__data
128
- asyncPropsExtenders: [], // per route asyncConnect customizers
129
- contentIcons: contentIcons,
130
- loadables,
131
- lazyBundles: {
132
- cms: [
133
- 'prettierStandalone',
134
- 'prettierParserHtml',
135
- 'prismCore',
136
- 'toastify',
137
- 'reactSelect',
138
- 'reactBeautifulDnd',
139
- // 'diffLib',
140
- ],
141
- draftEditor: [
142
- 'immutableLib',
143
- 'draftJs',
144
- 'draftJsLibIsSoftNewlineEvent',
145
- 'draftJsFilters',
146
- 'draftJsInlineToolbarPlugin',
147
- 'draftJsImportHtml',
148
- 'draftJsBlockBreakoutPlugin',
149
- ],
150
- },
151
- appExtras: [],
152
- maxResponseSize: 2000000000, // This is superagent default (200 mb)
153
- serverConfig,
154
- storeExtenders: [],
155
- showTags: true,
156
- controlpanels: [],
157
- controlPanelsIcons,
158
- filterControlPanels,
159
- filterControlPanelsSchema,
160
- externalRoutes: [
161
- // URL to be considered as external
162
- // {
163
- // match: {
164
- // path: '/news',
165
- // exact: false,
166
- // strict: false,
167
- // },
168
- // url(payload) {
169
- // return payload.location.pathname;
170
- // },
171
- // },
172
- ],
173
- showSelfRegistration: false,
174
- contentMetadataTagsImageField: 'image',
175
- hasWorkingCopySupport: false,
176
- maxUndoLevels: 200, // undo history size for the main form
177
- addonsInfo: addonsInfo,
178
- workflowMapping,
179
- errorHandlers: [], // callables for unhandled errors
180
- styleClassNameConverters,
181
- hashLinkSmoothScroll: false,
182
- styleClassNameExtenders,
183
- querystringSearchGet: false,
184
- },
185
- experimental: {
186
- addBlockButton: {
187
- enabled: false,
188
- },
189
- },
190
- widgets: {
191
- ...widgetMapping,
192
- default: defaultWidget,
193
- },
194
- views: {
195
- layoutViews,
196
- contentTypesViews,
197
- defaultView,
198
- errorViews,
199
- layoutViewsNamesMapping,
200
- },
201
- blocks: {
202
- requiredBlocks,
203
- blocksConfig,
204
- groupBlocksOrder,
205
- initialBlocks,
206
- initialBlocksFocus,
207
- showEditBlocksInBabelView: false,
208
- },
209
- addonRoutes: [],
210
- addonReducers: {},
211
- components,
212
- };
213
-
214
- ConfigRegistry.settings = config.settings;
215
- ConfigRegistry.experimental = config.experimental;
216
- ConfigRegistry.blocks = config.blocks;
217
- ConfigRegistry.views = config.views;
218
- ConfigRegistry.widgets = config.widgets;
219
- ConfigRegistry.addonRoutes = config.addonRoutes;
220
- ConfigRegistry.addonReducers = config.addonReducers;
221
- ConfigRegistry.components = config.components;
222
-
223
- applyAddonConfiguration(ConfigRegistry);