@plone/volto 14.0.0-alpha.39 → 14.0.0-alpha.42

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 (59) hide show
  1. package/.github/workflows/core-sandbox.yml +24 -0
  2. package/.storybook/preview.js +1 -1
  3. package/CHANGELOG.md +49 -0
  4. package/README.md +17 -8
  5. package/cypress/support/commands.js +36 -37
  6. package/locales/ca/LC_MESSAGES/volto.po +3555 -0
  7. package/locales/ca.json +1 -0
  8. package/locales/de/LC_MESSAGES/volto.po +12 -0
  9. package/locales/de.json +1 -1
  10. package/locales/en/LC_MESSAGES/volto.po +12 -0
  11. package/locales/en.json +1 -1
  12. package/locales/es/LC_MESSAGES/volto.po +12 -0
  13. package/locales/es.json +1 -1
  14. package/locales/eu/LC_MESSAGES/volto.po +12 -0
  15. package/locales/eu.json +1 -1
  16. package/locales/fr/LC_MESSAGES/volto.po +12 -0
  17. package/locales/fr.json +1 -1
  18. package/locales/it/LC_MESSAGES/volto.po +12 -0
  19. package/locales/it.json +1 -1
  20. package/locales/ja/LC_MESSAGES/volto.po +12 -0
  21. package/locales/ja.json +1 -1
  22. package/locales/nl/LC_MESSAGES/volto.po +12 -0
  23. package/locales/nl.json +1 -1
  24. package/locales/pt/LC_MESSAGES/volto.po +12 -0
  25. package/locales/pt.json +1 -1
  26. package/locales/pt_BR/LC_MESSAGES/volto.po +12 -0
  27. package/locales/pt_BR.json +1 -1
  28. package/locales/ro/LC_MESSAGES/volto.po +12 -0
  29. package/locales/ro.json +1 -1
  30. package/locales/volto.pot +13 -1
  31. package/package.json +5 -2
  32. package/src/actions/vocabularies/vocabularies.js +19 -4
  33. package/src/actions/vocabularies/vocabularies.test.js +22 -10
  34. package/src/components/manage/Blocks/Listing/withQuerystringResults.jsx +2 -4
  35. package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +6 -5
  36. package/src/components/manage/Blocks/Search/widgets/SelectMetadataField.jsx +6 -2
  37. package/src/components/manage/DragDropList/DragDropList.jsx +81 -64
  38. package/src/components/manage/Form/Field.jsx +29 -4
  39. package/src/components/manage/Widgets/ArrayWidget.jsx +169 -115
  40. package/src/components/manage/Widgets/ArrayWidget.stories.jsx +28 -2
  41. package/src/components/manage/Widgets/SelectAutoComplete.jsx +251 -0
  42. package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +45 -0
  43. package/src/components/manage/Widgets/SelectStyling.jsx +62 -0
  44. package/src/components/manage/Widgets/SelectWidget.jsx +81 -128
  45. package/src/components/manage/Widgets/SelectWidget.stories.jsx +28 -5
  46. package/src/components/manage/Widgets/TokenWidget.jsx +20 -49
  47. package/src/components/manage/Widgets/__mocks__/react-sortable-hoc.js +3 -0
  48. package/src/components/theme/Search/SearchTags.jsx +1 -1
  49. package/src/components/theme/View/LinkView.jsx +5 -1
  50. package/src/config/Loadables.jsx +7 -0
  51. package/src/config/Views.jsx +1 -0
  52. package/src/config/Widgets.jsx +2 -0
  53. package/src/helpers/ScrollToTop/ScrollToTop.jsx +1 -5
  54. package/src/reducers/vocabularies/vocabularies.js +131 -49
  55. package/test-setup-config.js +1 -0
  56. package/theme/themes/pastanaga/extras/main.less +50 -0
  57. package/theme/themes/pastanaga/extras/main.variables +5 -0
  58. package/webpack-less-plugin.js +1 -0
  59. package/test.py +0 -8
@@ -34,6 +34,30 @@ jobs:
34
34
  # node install
35
35
  - run: yarn install --frozen-lockfile
36
36
 
37
+ # python setup (temporary, while p.volto code-sandbox changes are in a PR)
38
+ # - name: Set up Python ${{ matrix.python-version }}
39
+ # uses: actions/setup-python@v1
40
+ # with:
41
+ # python-version: ${{ matrix.python-version }}
42
+
43
+ # # python cache
44
+ # - uses: actions/cache@v1
45
+ # with:
46
+ # path: ~/.cache/pip
47
+ # key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
48
+ # restore-keys: |
49
+ # ${{ runner.os }}-pip-
50
+ # # python install
51
+ # - run: pip install virtualenv
52
+ # - name: pip install
53
+ # working-directory: api
54
+ # run: pip install -r requirements.txt
55
+ # - name: buildout
56
+ # working-directory: api
57
+ # run: buildout
58
+ # env:
59
+ # CI: true
60
+
37
61
  - name: Cypress Core Sandbox Acceptance Tests
38
62
  run: yarn ci:cypress:run:core-sandbox
39
63
 
@@ -1,4 +1,4 @@
1
- import '~/config'; // This is the bootstrap for the global config - client side
1
+ import '@plone/volto/config'; // This is the bootstrap for the global config - client side
2
2
  import React from 'react';
3
3
  import { StaticRouter } from 'react-router-dom';
4
4
  import { IntlProvider } from 'react-intl';
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.0.0-alpha.42 (2021-12-13)
4
+
5
+ ### Breaking
6
+
7
+ - Removed pagination in vocabularies widgets (SelectWidget, ArrayWidget, TokenWidget) and introduced subrequest to vocabulary action. @giuliaghisini
8
+
9
+ ### Feature
10
+
11
+ - Add autocomplete Widget component - It holds off the vocabulary endpoint pull until you search (more than 2 chars). Useful when dealing with huge vocabularies @sneridagh @reebalazs
12
+
13
+ ### Bugfix
14
+
15
+ - Add missing layout view for document_view @MarcoCouto
16
+
17
+ ## 14.0.0-alpha.41 (2021-12-13)
18
+
19
+ ### Feature
20
+
21
+ - Add catalan translation @bloodbare @sneridagh
22
+ - Added `.storybook` setup in the Volto `app` generator. Volto projects
23
+ generated from this scafolding are now ready to run Storybook for the project
24
+ and develop addons (in `src/addons` folder).
25
+ - Add new listing block option "fullobjects" per variation @ksuess
26
+ - Style checkboxes @nileshgulia1
27
+ - Allow loading .less files also from a Volto project's `src` folder. @tiberiuichim
28
+
29
+ ### Bugfix
30
+
31
+ - Udate demo address @ksuess
32
+ - Update list of trainings documentation @ksuess
33
+ - Scroll to window top only when the location pathname changes, no longer take the window location search parameters into account. The search page and the listing block already use custom logic for their "scroll into view" behaviors. @tiberiuichim
34
+
35
+ ### Internal
36
+
37
+ - Update to plone.restapi 8.16.2 (revert missing_value PR) @sneridagh
38
+ - Update all requirements and the reasoning behind them in builds @sneridagh
39
+ - Update Plone version in api backend to 5.2.6. Update README and cleanup @fredvd
40
+ - Document CI changelog verifier failure details that mislead contributors
41
+ - Updated italian translation @pnicolli
42
+
43
+ ## 14.0.0-alpha.40 (2021-12-01)
44
+
45
+ ### Bugfix
46
+
47
+ - In search block, read SearchableText search param, to use it as search text input
48
+ @tiberiuichim
49
+ - Fix missing translation in link content type @iRohitSingh
50
+ - Fixed drag-and-drop list placeholder issues @reebalazs
51
+
3
52
  ## 14.0.0-alpha.39 (2021-11-30)
4
53
 
5
54
  ### Bugfix
package/README.md CHANGED
@@ -5,8 +5,6 @@
5
5
  [![NPM](https://img.shields.io/npm/v/@plone/volto.svg)](https://www.npmjs.com/package/@plone/volto)
6
6
  [![Build Status Core](https://github.com/plone/volto/actions/workflows/core.yml/badge.svg)](https://github.com/plone/volto/actions)
7
7
  [![Build Status Docs](https://github.com/plone/volto/actions/workflows/docs.yml/badge.svg)](https://github.com/plone/volto/actions)
8
- [![Dependencies](https://img.shields.io/david/plone/volto.svg)](https://github.com/plone/volto/blob/master/package.json)
9
- [![Dev Dependencies](https://img.shields.io/david/dev/plone/volto.svg)](https://github.com/plone/volto/blob/master/package.json)
10
8
 
11
9
  ## Introduction
12
10
 
@@ -14,7 +12,7 @@
14
12
  management systems, currently supporting three backend implementations: Plone,
15
13
  Guillotina and a NodeJS reference implementation.
16
14
 
17
- [Plone](https://plone.org) is a CMS built on Python with over 17 years of experience.
15
+ [Plone](https://plone.org) is a CMS built on Python with over 20 years of history and experience.
18
16
 
19
17
  Plone has very interesting features that appeal to developers and users alike,
20
18
  such as customizable content types, hierarchical URL object traversing and a
@@ -36,7 +34,7 @@ through it.
36
34
 
37
35
  ## Demo
38
36
 
39
- You can try a Volto online demo in [https://volto.kitconcept.com](https://volto.kitconcept.com)
37
+ You can try a Volto online demo in [https://6.demo.plone.org/](https://6.demo.plone.org/)
40
38
 
41
39
  ### Try the demo locally
42
40
 
@@ -57,7 +55,7 @@ First get all the requirements installed on your system.
57
55
  ### Prerequisites
58
56
 
59
57
  - [Node.js LTS (16.x)](https://nodejs.org/)
60
- - [Python 3.7.x / 2.7.x](https://python.org/) or
58
+ - [Python 3.8.x](https://python.org/) or
61
59
  - [Docker](https://www.docker.com/get-started) (if using the Plone/Guillotina docker images)
62
60
 
63
61
  ### Create a Volto project using the generator
@@ -145,12 +143,23 @@ Please create a new [issue](https://github.com/plone/volto/issues/new) or [pull
145
143
 
146
144
  ## Documentation
147
145
 
148
- You can find the (beta) documentation in [http://docs.voltocms.com](http://docs.voltocms.com)
146
+ You can find the documentation in [https://docs.voltocms.com](https://docs.voltocms.com)
149
147
 
150
148
  ## Training
151
149
 
152
- A detailed training on how to create your own website using Volto is available
153
- as part of the Plone training docs at [https://training.plone.org/5/volto/index.html](https://training.plone.org/5/volto/index.html).
150
+ On the [Plone Trainings Website](https://training.plone.org) you'll find
151
+ Volto-dedicated open training materials, plus React and other
152
+ JavaScript-centered trainings.
153
+
154
+ - [Mastering Plone 6 Development](https://training.plone.org/5/mastering-plone/)
155
+ The comprehensive training on Plone 6 with best practice tips for developers and integrators.
156
+ - [Volto](https://training.plone.org/5/volto/index.html)
157
+ A detailed training on how to create your own website using Volto frontend.
158
+ - [Volto Hands-On](https://training.plone.org/5/voltohandson/index.html)
159
+ - [Volto Add-ons Development](https://training.plone.org/5/voltoaddons/index.html)
160
+ - [Plone Deployment](https://training.plone.org/5/plone-deployment/index.html)
161
+ - [React](https://training.plone.org/5/react/index.html)
162
+ - [JavaScript For Plone Developers](https://training.plone.org/5/javascript/index.html)
154
163
 
155
164
  ## Talks
156
165
 
@@ -172,7 +172,7 @@ Cypress.Commands.add(
172
172
  fullname = 'editor',
173
173
  email = 'editor@local.dev',
174
174
  password = 'secret',
175
- roles = ['Editor']
175
+ roles = ['Editor'],
176
176
  }) => {
177
177
  let api_url, auth, path;
178
178
  if (Cypress.env('API') === 'guillotina') {
@@ -200,12 +200,12 @@ Cypress.Commands.add(
200
200
  },
201
201
  auth: auth,
202
202
  body: {
203
- "@type": "User",
203
+ '@type': 'User',
204
204
  username: username,
205
205
  fullname: fullname,
206
206
  email: email,
207
207
  password: password,
208
- roles: roles
208
+ roles: roles,
209
209
  },
210
210
  })
211
211
  .then(() => console.log(`User ${username} created`));
@@ -213,40 +213,35 @@ Cypress.Commands.add(
213
213
  );
214
214
 
215
215
  // Remove user
216
- Cypress.Commands.add(
217
- 'removeUser',
218
- (
219
- username = 'editor',
220
- ) => {
221
- let api_url, auth, path;
222
- if (Cypress.env('API') === 'guillotina') {
223
- api_url = 'http://localhost:8081/db/web';
224
- auth = {
225
- user: 'root',
226
- pass: 'root',
227
- };
228
- path = 'users';
229
- } else {
230
- api_url = 'http://localhost:55001/plone';
231
- auth = {
232
- user: 'admin',
233
- pass: 'secret',
234
- };
235
- path = '@users';
236
- }
216
+ Cypress.Commands.add('removeUser', (username = 'editor') => {
217
+ let api_url, auth, path;
218
+ if (Cypress.env('API') === 'guillotina') {
219
+ api_url = 'http://localhost:8081/db/web';
220
+ auth = {
221
+ user: 'root',
222
+ pass: 'root',
223
+ };
224
+ path = 'users';
225
+ } else {
226
+ api_url = 'http://localhost:55001/plone';
227
+ auth = {
228
+ user: 'admin',
229
+ pass: 'secret',
230
+ };
231
+ path = '@users';
232
+ }
237
233
 
238
- return cy
239
- .request({
240
- method: 'DELETE',
241
- url: `${api_url}/${path}/${username}`,
242
- headers: {
243
- Accept: 'application/json',
244
- },
245
- auth: auth,
246
- })
247
- .then(() => console.log(`User ${username} removed`));
248
- },
249
- );
234
+ return cy
235
+ .request({
236
+ method: 'DELETE',
237
+ url: `${api_url}/${path}/${username}`,
238
+ headers: {
239
+ Accept: 'application/json',
240
+ },
241
+ auth: auth,
242
+ })
243
+ .then(() => console.log(`User ${username} removed`));
244
+ });
250
245
 
251
246
  // --- SET WORKFLOW ----------------------------------------------------------
252
247
  Cypress.Commands.add(
@@ -309,9 +304,13 @@ Cypress.Commands.add('waitForResourceToLoad', (fileName, type) => {
309
304
  }
310
305
 
311
306
  count[0] += 1;
312
- setTimeout(checkIfResourceHasBeenLoaded, resourceCheckInterval);
307
+ const tid = setTimeout(
308
+ checkIfResourceHasBeenLoaded,
309
+ resourceCheckInterval,
310
+ );
313
311
 
314
312
  if (count[0] > maxChecks) {
313
+ clearTimeout(tid);
315
314
  throw new Error(
316
315
  `Timeout resolving resource: ${fileName} (type ${type})`,
317
316
  );