@plone/volto 18.0.0-alpha.40 → 18.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 (102) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/locales/ca/LC_MESSAGES/volto.po +31 -1
  3. package/locales/ca.json +1 -1
  4. package/locales/de/LC_MESSAGES/volto.po +31 -1
  5. package/locales/de.json +1 -1
  6. package/locales/en/LC_MESSAGES/volto.po +31 -1
  7. package/locales/en.json +1 -1
  8. package/locales/es/LC_MESSAGES/volto.po +31 -1
  9. package/locales/es.json +1 -1
  10. package/locales/eu/LC_MESSAGES/volto.po +31 -1
  11. package/locales/eu.json +1 -1
  12. package/locales/fi/LC_MESSAGES/volto.po +31 -1
  13. package/locales/fi.json +1 -1
  14. package/locales/fr/LC_MESSAGES/volto.po +31 -1
  15. package/locales/fr.json +1 -1
  16. package/locales/hi/LC_MESSAGES/volto.po +31 -1
  17. package/locales/hi.json +1 -1
  18. package/locales/it/LC_MESSAGES/volto.po +31 -1
  19. package/locales/it.json +1 -1
  20. package/locales/ja/LC_MESSAGES/volto.po +31 -1
  21. package/locales/ja.json +1 -1
  22. package/locales/nl/LC_MESSAGES/volto.po +31 -1
  23. package/locales/nl.json +1 -1
  24. package/locales/pt/LC_MESSAGES/volto.po +31 -1
  25. package/locales/pt.json +1 -1
  26. package/locales/pt_BR/LC_MESSAGES/volto.po +31 -1
  27. package/locales/pt_BR.json +1 -1
  28. package/locales/ro/LC_MESSAGES/volto.po +31 -1
  29. package/locales/ro.json +1 -1
  30. package/locales/volto.pot +32 -2
  31. package/locales/zh_CN/LC_MESSAGES/volto.po +31 -1
  32. package/locales/zh_CN.json +1 -1
  33. package/package.json +4 -5
  34. package/razzle.config.js +2 -2
  35. package/src/components/index.js +0 -1
  36. package/src/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +1 -1
  37. package/src/components/manage/AnchorPlugin/useLinkEditor.jsx +21 -21
  38. package/src/components/manage/Blocks/Block/BlocksForm.jsx +5 -0
  39. package/src/components/manage/Blocks/Block/Order/Item.jsx +6 -2
  40. package/src/components/manage/Blocks/Block/Order/Order.jsx +2 -0
  41. package/src/components/manage/Blocks/Container/Data.jsx +10 -2
  42. package/src/components/manage/Blocks/Image/ImageSidebar.jsx +10 -2
  43. package/src/components/manage/Blocks/Listing/ListingData.jsx +10 -2
  44. package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +3 -1
  45. package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +2 -0
  46. package/src/components/manage/Blocks/Search/SearchBlockView.jsx +18 -2
  47. package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +1 -1
  48. package/src/components/manage/Blocks/Teaser/Data.jsx +10 -2
  49. package/src/components/manage/Blocks/ToC/Edit.jsx +1 -0
  50. package/src/components/manage/Blocks/Video/Edit.jsx +1 -1
  51. package/src/components/manage/Blocks/Video/VideoSidebar.jsx +3 -1
  52. package/src/components/manage/Contents/Contents.jsx +1 -1
  53. package/src/components/manage/Controlpanels/ContentTypeSchema.jsx +1 -0
  54. package/src/components/manage/Controlpanels/UndoControlpanel.jsx +3 -3
  55. package/src/components/manage/Controlpanels/Users/UserGroupMembershipListing.jsx +28 -12
  56. package/src/components/manage/Controlpanels/Users/UserGroupMembershipMatrix.jsx +12 -4
  57. package/src/components/manage/Form/Form.jsx +85 -20
  58. package/src/components/manage/Form/InlineForm.jsx +4 -6
  59. package/src/components/manage/Form/ModalForm.jsx +1 -1
  60. package/src/components/manage/History/History.jsx +1 -1
  61. package/src/components/manage/Pluggable/Pluggable.test.js +1 -1
  62. package/src/components/manage/Toolbar/Toolbar.jsx +1 -1
  63. package/src/components/manage/Widgets/ArrayWidget.jsx +2 -2
  64. package/src/components/manage/Widgets/ImageWidget.jsx +34 -10
  65. package/src/components/manage/Widgets/RecurrenceWidget/EndField.jsx +7 -1
  66. package/src/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +80 -31
  67. package/src/components/theme/Login/Login.jsx +25 -4
  68. package/src/components/theme/Logout/Logout.jsx +2 -2
  69. package/src/components/theme/Search/Search.jsx +13 -5
  70. package/src/components/theme/View/View.jsx +0 -7
  71. package/src/components/theme/View/View.test.jsx +0 -3
  72. package/src/config/Widgets.jsx +1 -1
  73. package/src/config/index.js +7 -2
  74. package/src/config/validation.ts +155 -0
  75. package/src/helpers/Extensions/withBlockExtensions.jsx +1 -1
  76. package/src/helpers/FormValidation/FormValidation.jsx +109 -170
  77. package/src/helpers/FormValidation/FormValidation.test.js +836 -8
  78. package/src/helpers/FormValidation/validators.ts +203 -0
  79. package/src/helpers/MessageLabels/MessageLabels.js +28 -0
  80. package/src/helpers/Url/Url.test.js +4 -4
  81. package/src/helpers/User/User.js +1 -1
  82. package/src/hooks/client/useClient.js +1 -1
  83. package/test-setup-config.jsx +7 -0
  84. package/theme/themes/default/modules/embed.variables +1 -1
  85. package/theme/themes/pastanaga/collections/form.overrides +36 -2
  86. package/theme/themes/pastanaga/extras/blocks.less +14 -5
  87. package/theme/themes/pastanaga/extras/sidebar.less +4 -0
  88. package/theme/themes/pastanaga/extras/toolbar.less +10 -3
  89. package/tsconfig.declarations.json +3 -2
  90. package/types/components/index.d.ts +0 -1
  91. package/types/components/manage/Blocks/Block/Order/Order.d.ts +2 -1
  92. package/types/components/theme/Logout/Logout.d.ts +1 -1
  93. package/types/config/RichTextEditor/ToHTML.d.ts +1 -1
  94. package/types/config/Widgets.d.ts +2 -2
  95. package/types/config/validation.d.ts +3 -0
  96. package/types/helpers/Extensions/withBlockExtensions.d.ts +1 -1
  97. package/types/helpers/FormValidation/FormValidation.d.ts +1 -0
  98. package/types/helpers/FormValidation/validators.d.ts +29 -0
  99. package/types/helpers/MessageLabels/MessageLabels.d.ts +36 -0
  100. package/types/helpers/User/User.d.ts +1 -1
  101. package/src/components/theme/SocialSharing/SocialSharing.jsx +0 -48
  102. package/src/components/theme/SocialSharing/SocialSharing.test.jsx +0 -14
@@ -1,48 +0,0 @@
1
- /**
2
- * Social sharing component.
3
- * @module components/theme/SocialSharing/SocialSharing
4
- */
5
-
6
- import React from 'react';
7
- import PropTypes from 'prop-types';
8
- import { Button, Container } from 'semantic-ui-react';
9
- import { FacebookShareButton, TwitterShareButton } from 'react-share';
10
-
11
- /**
12
- * Social sharing component class.
13
- * @function SocialSharing
14
- * @param {string} url Url to share.
15
- * @param {string} title Title of the content.
16
- * @param {string} description Description of the content.
17
- * @returns {string} Markup of the component.
18
- */
19
- const SocialSharing = ({ url, title, description }) => (
20
- <Container style={{ clear: 'both' }}>
21
- <br />
22
- <FacebookShareButton url={url} quote={title}>
23
- <Button color="facebook" size="mini">
24
- Facebook
25
- </Button>
26
- </FacebookShareButton>
27
- <TwitterShareButton url={url} title={title} description={description}>
28
- <Button color="twitter" size="mini">
29
- Twitter
30
- </Button>
31
- </TwitterShareButton>
32
- <br />
33
- <br />
34
- </Container>
35
- );
36
-
37
- /**
38
- * Property types.
39
- * @property {Object} propTypes Property types.
40
- * @static
41
- */
42
- SocialSharing.propTypes = {
43
- url: PropTypes.string.isRequired,
44
- title: PropTypes.string.isRequired,
45
- description: PropTypes.string.isRequired,
46
- };
47
-
48
- export default SocialSharing;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
-
4
- import SocialSharing from './SocialSharing';
5
-
6
- describe('SocialSharing', () => {
7
- it('renders a social sharing component', () => {
8
- const component = renderer.create(
9
- <SocialSharing url="someurl" title="Title" description="Description" />,
10
- );
11
- const json = component.toJSON();
12
- expect(json).toMatchSnapshot();
13
- });
14
- });