@plone/volto 18.0.0-alpha.46 → 18.0.0-alpha.48

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 (84) hide show
  1. package/.eslintrc +0 -1
  2. package/CHANGELOG.md +64 -0
  3. package/locales/ca/LC_MESSAGES/volto.po +82 -15
  4. package/locales/ca.json +1 -1
  5. package/locales/de/LC_MESSAGES/volto.po +87 -20
  6. package/locales/de.json +1 -1
  7. package/locales/en/LC_MESSAGES/volto.po +82 -15
  8. package/locales/en.json +1 -1
  9. package/locales/es/LC_MESSAGES/volto.po +82 -15
  10. package/locales/es.json +1 -1
  11. package/locales/eu/LC_MESSAGES/volto.po +82 -15
  12. package/locales/eu.json +1 -1
  13. package/locales/fi/LC_MESSAGES/volto.po +82 -15
  14. package/locales/fi.json +1 -1
  15. package/locales/fr/LC_MESSAGES/volto.po +82 -15
  16. package/locales/fr.json +1 -1
  17. package/locales/hi/LC_MESSAGES/volto.po +82 -15
  18. package/locales/hi.json +1 -1
  19. package/locales/it/LC_MESSAGES/volto.po +82 -15
  20. package/locales/it.json +1 -1
  21. package/locales/ja/LC_MESSAGES/volto.po +82 -15
  22. package/locales/ja.json +1 -1
  23. package/locales/nl/LC_MESSAGES/volto.po +82 -15
  24. package/locales/nl.json +1 -1
  25. package/locales/pt/LC_MESSAGES/volto.po +82 -15
  26. package/locales/pt.json +1 -1
  27. package/locales/pt_BR/LC_MESSAGES/volto.po +82 -15
  28. package/locales/pt_BR.json +1 -1
  29. package/locales/ro/LC_MESSAGES/volto.po +82 -15
  30. package/locales/ro.json +1 -1
  31. package/locales/volto.pot +83 -16
  32. package/locales/zh_CN/LC_MESSAGES/volto.po +82 -15
  33. package/locales/zh_CN.json +1 -1
  34. package/package.json +11 -9
  35. package/razzle.config.js +8 -5
  36. package/src/actions/aliases/aliases.js +27 -7
  37. package/src/actions/aliases/aliases.test.js +1 -1
  38. package/src/components/manage/Blocks/Block/Edit.jsx +1 -2
  39. package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +5 -2
  40. package/src/components/manage/Blocks/Block/StyleWrapper.jsx +1 -1
  41. package/src/components/manage/Blocks/Listing/getAsyncData.js +8 -0
  42. package/src/components/manage/Blocks/ToC/View.jsx +18 -7
  43. package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +2 -20
  44. package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +2 -19
  45. package/src/components/manage/Controlpanels/Aliases.jsx +499 -412
  46. package/src/components/manage/Controlpanels/Aliases.test.jsx +7 -0
  47. package/src/components/manage/Edit/Edit.jsx +7 -3
  48. package/src/components/manage/Form/ModalForm.jsx +3 -1
  49. package/src/components/manage/Toolbar/PersonalTools.jsx +7 -7
  50. package/src/components/manage/Toolbar/PersonalTools.test.jsx +71 -0
  51. package/src/components/manage/Widgets/IdWidget.jsx +6 -7
  52. package/src/components/theme/App/App.jsx +2 -0
  53. package/src/components/theme/App/App.test.jsx +4 -3
  54. package/src/components/theme/Login/Login.jsx +1 -2
  55. package/src/components/theme/RouteAnnouncer/RouteAnnouncer.jsx +64 -0
  56. package/src/constants/ActionTypes.js +1 -0
  57. package/src/express-middleware/static.js +2 -2
  58. package/src/helpers/Api/Api.js +12 -1
  59. package/src/helpers/Blocks/Blocks.js +73 -33
  60. package/src/helpers/Blocks/Blocks.test.js +204 -27
  61. package/src/middleware/api.js +3 -0
  62. package/src/reducers/content/content.js +12 -0
  63. package/src/start-server.js +2 -5
  64. package/types/actions/aliases/aliases.d.ts +8 -1
  65. package/types/components/manage/Blocks/ToC/View.d.ts +1 -4
  66. package/types/components/manage/Blocks/ToC/variations/DefaultTocRenderer.d.ts +10 -5
  67. package/types/components/manage/Blocks/ToC/variations/HorizontalMenu.d.ts +10 -5
  68. package/types/components/manage/Blocks/ToC/variations/index.d.ts +16 -4
  69. package/types/components/manage/Contents/__mocks__/index.d.ts +0 -1
  70. package/types/components/manage/Controlpanels/Relations/RelationsMatrix.d.ts +1 -1
  71. package/types/components/manage/Controlpanels/index.d.ts +0 -1
  72. package/types/components/manage/Form/__mocks__/index.d.ts +0 -1
  73. package/types/components/manage/Form/index.d.ts +0 -1
  74. package/types/components/manage/Multilingual/ManageTranslations.d.ts +1 -1
  75. package/types/components/manage/Sidebar/ObjectBrowser.d.ts +1 -1
  76. package/types/components/manage/Widgets/InternalUrlWidget.d.ts +1 -1
  77. package/types/components/manage/Widgets/UrlWidget.d.ts +1 -1
  78. package/types/components/manage/Widgets/__mocks__/index.d.ts +0 -1
  79. package/types/components/manage/Widgets/index.d.ts +2 -3
  80. package/types/components/theme/RouteAnnouncer/RouteAnnouncer.d.ts +2 -0
  81. package/types/config/slots.d.ts +1 -1
  82. package/types/constants/ActionTypes.d.ts +1 -0
  83. package/types/helpers/Blocks/Blocks.d.ts +10 -1
  84. package/types/helpers/Helmet/Helmet.d.ts +1 -1
@@ -3,11 +3,9 @@
3
3
  * @module components/manage/Blocks/ToC/View
4
4
  */
5
5
 
6
- import React from 'react';
7
6
  import PropTypes from 'prop-types';
8
7
  import { map } from 'lodash';
9
8
  import { List } from 'semantic-ui-react';
10
- import { FormattedMessage, injectIntl } from 'react-intl';
11
9
  import Slugger from 'github-slugger';
12
10
  import { UniversalLink } from '@plone/volto/components';
13
11
  import { normalizeString } from '@plone/volto/helpers';
@@ -37,26 +35,10 @@ const RenderListItems = ({ items, data }) => {
37
35
  });
38
36
  };
39
37
 
40
- /**
41
- * View toc block class.
42
- * @class View
43
- * @extends Component
44
- */
45
38
  const View = ({ data, tocEntries }) => {
46
39
  return (
47
40
  <>
48
- {data.title && !data.hide_title ? (
49
- <h2>
50
- {data.title || (
51
- <FormattedMessage
52
- id="Table of Contents"
53
- defaultMessage="Table of Contents"
54
- />
55
- )}
56
- </h2>
57
- ) : (
58
- ''
59
- )}
41
+ {data.title && !data.hide_title ? <h2>{data.title}</h2> : ''}
60
42
  <List
61
43
  ordered={data.ordered}
62
44
  bulleted={!data.ordered}
@@ -77,4 +59,4 @@ View.propTypes = {
77
59
  properties: PropTypes.objectOf(PropTypes.any).isRequired,
78
60
  };
79
61
 
80
- export default injectIntl(View);
62
+ export default View;
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { map } from 'lodash';
4
4
  import { Menu, Dropdown } from 'semantic-ui-react';
5
- import { FormattedMessage, injectIntl } from 'react-intl';
6
5
  import AnchorLink from 'react-anchor-link-smooth-scroll';
7
6
  import Slugger from 'github-slugger';
8
7
  import { normalizeString } from '@plone/volto/helpers';
@@ -26,11 +25,6 @@ const RenderMenuItems = ({ items }) => {
26
25
  });
27
26
  };
28
27
 
29
- /**
30
- * View toc block class.
31
- * @class View
32
- * @extends Component
33
- */
34
28
  const View = ({ data, tocEntries }) => {
35
29
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
36
30
  // When the page is resized to prevent items from the TOC from going out of the viewport,
@@ -159,18 +153,7 @@ const View = ({ data, tocEntries }) => {
159
153
 
160
154
  return (
161
155
  <>
162
- {data.title && !data.hide_title ? (
163
- <h2>
164
- {data.title || (
165
- <FormattedMessage
166
- id="Table of Contents"
167
- defaultMessage="Table of Contents"
168
- />
169
- )}
170
- </h2>
171
- ) : (
172
- ''
173
- )}
156
+ {data.title && !data.hide_title ? <h2>{data.title}</h2> : ''}
174
157
  <Menu className="responsive-menu">
175
158
  <RenderMenuItems items={tocEntries} />
176
159
  <Dropdown
@@ -201,4 +184,4 @@ View.propTypes = {
201
184
  properties: PropTypes.objectOf(PropTypes.any).isRequired,
202
185
  };
203
186
 
204
- export default injectIntl(View);
187
+ export default View;