@plone/volto 18.0.0-alpha.14 → 18.0.0-alpha.15

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 (150) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/jest-setup-afterenv.js +2 -0
  3. package/package.json +24 -20
  4. package/src/components/manage/Add/Add.jsx +9 -11
  5. package/src/components/manage/Add/Add.test.jsx +11 -13
  6. package/src/components/manage/Aliases/Aliases.jsx +6 -6
  7. package/src/components/manage/Aliases/Aliases.test.jsx +7 -7
  8. package/src/components/manage/BlockChooser/BlockChooser.test.jsx +0 -1
  9. package/src/components/manage/BlockChooser/BlockChooserButton.jsx +6 -6
  10. package/src/components/manage/BlockChooser/BlockChooserSearch.test.jsx +0 -1
  11. package/src/components/manage/Blocks/Block/Settings.test.jsx +0 -1
  12. package/src/components/manage/Blocks/Container/NewBlockAddButton.jsx +20 -19
  13. package/src/components/manage/Blocks/Image/View.test.jsx +0 -1
  14. package/src/components/manage/Blocks/Table/Edit.jsx +7 -6
  15. package/src/components/manage/Contents/Contents.jsx +6 -6
  16. package/src/components/manage/Contents/Contents.test.jsx +7 -7
  17. package/src/components/manage/Contents/ContentsPropertiesModal.test.jsx +4 -4
  18. package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +6 -6
  19. package/src/components/manage/Controlpanels/AddonsControlpanel.test.jsx +6 -7
  20. package/src/components/manage/Controlpanels/Aliases.jsx +6 -6
  21. package/src/components/manage/Controlpanels/Aliases.test.jsx +6 -7
  22. package/src/components/manage/Controlpanels/ContentType.jsx +6 -6
  23. package/src/components/manage/Controlpanels/ContentType.test.jsx +7 -7
  24. package/src/components/manage/Controlpanels/ContentTypeLayout.jsx +93 -85
  25. package/src/components/manage/Controlpanels/ContentTypeLayout.test.jsx +7 -7
  26. package/src/components/manage/Controlpanels/ContentTypeSchema.jsx +6 -6
  27. package/src/components/manage/Controlpanels/ContentTypes.jsx +6 -6
  28. package/src/components/manage/Controlpanels/ContentTypes.test.jsx +7 -7
  29. package/src/components/manage/Controlpanels/Controlpanel.jsx +6 -6
  30. package/src/components/manage/Controlpanels/Controlpanel.test.jsx +7 -7
  31. package/src/components/manage/Controlpanels/Controlpanels.jsx +6 -6
  32. package/src/components/manage/Controlpanels/Controlpanels.test.jsx +10 -10
  33. package/src/components/manage/Controlpanels/DatabaseInformation.jsx +6 -6
  34. package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +6 -6
  35. package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.test.jsx +7 -7
  36. package/src/components/manage/Controlpanels/ModerateComments.jsx +6 -6
  37. package/src/components/manage/Controlpanels/ModerateComments.test.jsx +7 -7
  38. package/src/components/manage/Controlpanels/Relations/Relations.jsx +13 -7
  39. package/src/components/manage/Controlpanels/Rules/AddRule.jsx +6 -6
  40. package/src/components/manage/Controlpanels/Rules/AddRule.test.jsx +6 -7
  41. package/src/components/manage/Controlpanels/Rules/ConfigureRule.jsx +6 -6
  42. package/src/components/manage/Controlpanels/Rules/ConfigureRule.test.jsx +6 -7
  43. package/src/components/manage/Controlpanels/Rules/EditRule.jsx +6 -6
  44. package/src/components/manage/Controlpanels/Rules/EditRule.test.jsx +6 -7
  45. package/src/components/manage/Controlpanels/Rules/Rules.jsx +6 -6
  46. package/src/components/manage/Controlpanels/Rules/Rules.test.jsx +6 -7
  47. package/src/components/manage/Controlpanels/Rules/components/{VariableModal.test.jsx → VariableModal.test.jsx.removed} +6 -7
  48. package/src/components/manage/Controlpanels/UndoControlpanel.jsx +6 -6
  49. package/src/components/manage/Controlpanels/UndoControlpanel.test.jsx +7 -7
  50. package/src/components/manage/Controlpanels/UpgradeControlPanel.jsx +6 -6
  51. package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +14 -8
  52. package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.test.jsx +7 -7
  53. package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +6 -6
  54. package/src/components/manage/Controlpanels/Users/UsersControlpanel.test.jsx +7 -7
  55. package/src/components/manage/Delete/Delete.jsx +6 -6
  56. package/src/components/manage/Delete/Delete.test.jsx +10 -10
  57. package/src/components/manage/Diff/Diff.jsx +6 -6
  58. package/src/components/manage/Diff/Diff.test.jsx +2 -3
  59. package/src/components/manage/Edit/Edit.jsx +10 -11
  60. package/src/components/manage/Edit/Edit.test.jsx +14 -10
  61. package/src/components/manage/Form/BlockDataForm.test.jsx +0 -1
  62. package/src/components/manage/Form/Form.jsx +16 -8
  63. package/src/components/manage/Form/ModalForm.test.jsx +0 -1
  64. package/src/components/manage/History/History.jsx +6 -6
  65. package/src/components/manage/History/History.test.jsx +14 -13
  66. package/src/components/manage/LinksToItem/LinksToItem.jsx +78 -49
  67. package/src/components/manage/LinksToItem/LinksToItem.test.jsx +7 -7
  68. package/src/components/manage/Multilingual/ManageTranslations.jsx +13 -7
  69. package/src/components/manage/Multilingual/ManageTranslations.test.jsx +6 -7
  70. package/src/components/manage/Preferences/ChangePassword.jsx +6 -6
  71. package/src/components/manage/Preferences/ChangePassword.test.jsx +6 -7
  72. package/src/components/manage/Preferences/PersonalInformation.test.jsx +1 -3
  73. package/src/components/manage/Preferences/PersonalPreferences.test.jsx +1 -3
  74. package/src/components/manage/Rules/Rules.jsx +6 -6
  75. package/src/components/manage/Rules/Rules.test.jsx +7 -7
  76. package/src/components/manage/Sharing/Sharing.jsx +6 -6
  77. package/src/components/manage/Sharing/Sharing.test.jsx +7 -7
  78. package/src/components/manage/Sidebar/ObjectBrowser.jsx +1 -1
  79. package/src/components/manage/Sidebar/Sidebar.jsx +2 -0
  80. package/src/components/manage/Sidebar/SidebarPopup.jsx +28 -21
  81. package/src/components/manage/Sidebar/SidebarPortal.jsx +7 -6
  82. package/src/components/manage/Widgets/FileWidget.jsx +1 -1
  83. package/src/components/manage/Widgets/ObjectBrowserWidget.test.jsx +4 -4
  84. package/src/components/manage/Widgets/ObjectListWidget.test.js +0 -1
  85. package/src/components/manage/Widgets/ObjectWidget.test.jsx +0 -1
  86. package/src/components/manage/Widgets/SchemaWidget.test.jsx +4 -4
  87. package/src/components/manage/Widgets/SchemaWidgetFieldset.test.jsx +5 -5
  88. package/src/components/manage/Widgets/UrlWidget.test.jsx +4 -4
  89. package/src/components/manage/Widgets/VocabularyTermsWidget.test.jsx +4 -4
  90. package/src/components/theme/Comments/Comments.jsx +7 -8
  91. package/src/components/theme/Component/Component.test.jsx +0 -1
  92. package/src/components/theme/ContactForm/ContactForm.jsx +6 -6
  93. package/src/components/theme/ContactForm/ContactForm.test.jsx +12 -10
  94. package/src/components/theme/Footer/Footer.test.jsx +0 -1
  95. package/src/components/theme/Logout/Logout.test.jsx +8 -5
  96. package/src/components/theme/Search/Search.jsx +6 -6
  97. package/src/components/theme/Search/Search.test.jsx +13 -10
  98. package/src/components/theme/SlotRenderer/SlotRenderer.test.jsx +0 -1
  99. package/src/components/theme/View/View.jsx +6 -6
  100. package/src/components/theme/View/View.test.jsx +25 -18
  101. package/src/helpers/AsyncConnect/AsyncConnect.test.js +0 -2
  102. package/src/helpers/Utils/UseDetectClickOutside.stories.jsx +8 -8
  103. package/src/start-client.jsx +3 -3
  104. package/types/components/manage/Add/Add.d.ts +1 -4
  105. package/types/components/manage/Aliases/Aliases.d.ts +1 -4
  106. package/types/components/manage/Blocks/Block/Edit.d.ts +1 -3
  107. package/types/components/manage/Blocks/HeroImageLeft/Edit.d.ts +1 -4
  108. package/types/components/manage/Blocks/Image/Edit.d.ts +1 -4
  109. package/types/components/manage/Contents/Contents.d.ts +2 -7
  110. package/types/components/manage/Contents/ContentsUploadModal.d.ts +1 -4
  111. package/types/components/manage/Controlpanels/AddonsControlpanel.d.ts +1 -4
  112. package/types/components/manage/Controlpanels/Aliases.d.ts +1 -4
  113. package/types/components/manage/Controlpanels/ContentType.d.ts +1 -4
  114. package/types/components/manage/Controlpanels/ContentTypeLayout.d.ts +1 -4
  115. package/types/components/manage/Controlpanels/ContentTypeSchema.d.ts +1 -4
  116. package/types/components/manage/Controlpanels/ContentTypes.d.ts +1 -4
  117. package/types/components/manage/Controlpanels/DatabaseInformation.d.ts +1 -4
  118. package/types/components/manage/Controlpanels/Groups/GroupsControlpanel.d.ts +1 -4
  119. package/types/components/manage/Controlpanels/ModerateComments.d.ts +1 -4
  120. package/types/components/manage/Controlpanels/Rules/AddRule.d.ts +1 -4
  121. package/types/components/manage/Controlpanels/Rules/ConfigureRule.d.ts +1 -4
  122. package/types/components/manage/Controlpanels/Rules/EditRule.d.ts +1 -4
  123. package/types/components/manage/Controlpanels/Rules/Rules.d.ts +1 -4
  124. package/types/components/manage/Controlpanels/Rules/components/VariableModal.d.ts +1 -4
  125. package/types/components/manage/Controlpanels/UndoControlpanel.d.ts +1 -4
  126. package/types/components/manage/Controlpanels/UpgradeControlPanel.d.ts +1 -4
  127. package/types/components/manage/Controlpanels/Users/RenderUsers.d.ts +1 -4
  128. package/types/components/manage/Controlpanels/Users/UsersControlpanel.d.ts +1 -4
  129. package/types/components/manage/Display/Display.d.ts +1 -4
  130. package/types/components/manage/Edit/Edit.d.ts +2 -7
  131. package/types/components/manage/Form/BlocksToolbar.d.ts +1 -3
  132. package/types/components/manage/History/History.d.ts +1 -4
  133. package/types/components/manage/Preferences/PersonalPreferences.d.ts +1 -4
  134. package/types/components/manage/Rules/Rules.d.ts +1 -4
  135. package/types/components/manage/Sidebar/ObjectBrowserBody.d.ts +1 -4
  136. package/types/components/manage/Toolbar/Toolbar.d.ts +1 -4
  137. package/types/components/manage/Widgets/ArrayWidget.d.ts +1 -3
  138. package/types/components/manage/Widgets/IdWidget.d.ts +1 -4
  139. package/types/components/manage/Widgets/QueryWidget.d.ts +1 -3
  140. package/types/components/manage/Widgets/ReferenceWidget.d.ts +1 -4
  141. package/types/components/manage/Widgets/SchemaWidget.d.ts +1 -4
  142. package/types/components/manage/Widgets/SelectAutoComplete.d.ts +1 -3
  143. package/types/components/manage/Widgets/TokenWidget.d.ts +1 -4
  144. package/types/components/manage/Widgets/WysiwygWidget.d.ts +1 -4
  145. package/types/components/theme/Search/Search.d.ts +2 -7
  146. package/types/components/theme/Sitemap/Sitemap.d.ts +2 -6
  147. package/types/components/theme/View/View.d.ts +1 -4
  148. package/types/config/Widgets.d.ts +1 -3
  149. package/src/components/manage/Multilingual/CreateTranslation.test.jsx +0 -46
  150. package/src/helpers/Utils/usePagination.test.js +0 -115
@@ -1,7 +1,7 @@
1
1
  import '@plone/volto/config'; // This is the bootstrap for the global config - client side
2
2
  import '@root/theme';
3
3
  import React from 'react';
4
- import { hydrate } from 'react-dom';
4
+ import { hydrateRoot } from 'react-dom/client';
5
5
  import { Provider } from 'react-redux';
6
6
  import { IntlProvider } from 'react-intl-redux';
7
7
  import { ConnectedRouter } from 'connected-react-router';
@@ -58,7 +58,8 @@ export default function client() {
58
58
  }
59
59
 
60
60
  loadableReady(() => {
61
- hydrate(
61
+ hydrateRoot(
62
+ document.getElementById('main'),
62
63
  <CookiesProvider>
63
64
  <Provider store={store}>
64
65
  <IntlProvider onError={reactIntlErrorHandler}>
@@ -70,7 +71,6 @@ export default function client() {
70
71
  </IntlProvider>
71
72
  </Provider>
72
73
  </CookiesProvider>,
73
- document.getElementById('main'),
74
74
  );
75
75
  });
76
76
  }
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -44,8 +44,6 @@ export class Edit extends React.Component<any, any, any> {
44
44
  */
45
45
  render(): string;
46
46
  }
47
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
48
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
49
- };
47
+ declare const _default: any;
50
48
  export default _default;
51
49
  import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,8 +1,3 @@
1
- export const __test__: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
4
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
5
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
6
- };
1
+ export const __test__: any;
2
+ declare const _default: any;
7
3
  export default _default;
8
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,8 +1,3 @@
1
- export const __test__: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
4
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
5
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
6
- };
1
+ export const __test__: any;
2
+ declare const _default: any;
7
3
  export default _default;
8
- import React from 'react';
@@ -10,8 +10,6 @@ export class BlocksToolbarComponent extends React.Component<any, any, any> {
10
10
  componentWillUnmount(): void;
11
11
  render(): import("react/jsx-runtime").JSX.Element;
12
12
  }
13
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
14
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
15
- };
13
+ declare const _default: any;
16
14
  export default _default;
17
15
  import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,8 +1,6 @@
1
1
  export const ArrayWidgetComponent: React.FC<import("react-intl").WithIntlProps<any>> & {
2
2
  WrappedComponent: React.ComponentType<any>;
3
3
  };
4
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
5
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
6
- };
4
+ declare const _default: any;
7
5
  export default _default;
8
6
  import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -74,8 +74,6 @@ export class QuerystringWidgetComponent extends React.Component<any, any, any> {
74
74
  */
75
75
  render(): string;
76
76
  }
77
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
78
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
79
- };
77
+ declare const _default: any;
80
78
  export default _default;
81
79
  import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,8 +1,6 @@
1
1
  export const SelectAutoCompleteComponent: React.FC<import("react-intl").WithIntlProps<any>> & {
2
2
  WrappedComponent: React.ComponentType<any>;
3
3
  };
4
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
5
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
6
- };
4
+ declare const _default: any;
7
5
  export default _default;
8
6
  import React from 'react';
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -1,6 +1,3 @@
1
- export const WysiwygWidget: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ export const WysiwygWidget: any;
4
2
  export default Preloader;
5
- import React from 'react';
6
3
  declare function Preloader(props: any): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,3 @@
1
- export const __test__: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
4
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
5
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
6
- };
1
+ export const __test__: any;
2
+ declare const _default: any;
7
3
  export default _default;
8
- import React from 'react';
@@ -1,8 +1,4 @@
1
1
  export function getSitemapPath(pathname: string, lang: any): any;
2
- export const __test__: import("react").ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & import("react").RefAttributes<import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
3
- WrappedComponent: import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>;
4
- };
5
- declare const _default: import("react").ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & import("react").RefAttributes<import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
6
- WrappedComponent: import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>;
7
- };
2
+ export const __test__: any;
3
+ declare const _default: any;
8
4
  export default _default;
@@ -1,5 +1,2 @@
1
- declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & React.RefAttributes<React.ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
2
- WrappedComponent: React.ComponentType<import("react-intl").WrappedComponentProps<string>>;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
5
- import React from 'react';
@@ -46,9 +46,7 @@ export namespace widgetMapping {
46
46
  'Relation List': import("react").ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & import("react").RefAttributes<import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
47
47
  WrappedComponent: import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>;
48
48
  };
49
- 'Relation Choice': import("react").ForwardRefExoticComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & import("react").RefAttributes<import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>>> & {
50
- WrappedComponent: import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>;
51
- };
49
+ 'Relation Choice': any;
52
50
  };
53
51
  export { SelectWidget as choices };
54
52
  export namespace type {
@@ -1,46 +0,0 @@
1
- import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import configureStore from 'redux-mock-store';
4
- import { Provider } from 'react-intl-redux';
5
- import { MemoryRouter } from 'react-router-dom';
6
- import config from '@plone/volto/registry';
7
-
8
- import CreateTranslation from './CreateTranslation';
9
-
10
- beforeAll(() => {
11
- config.settings.isMultilingual = true;
12
- config.settings.supportedLanguages = ['de', 'es'];
13
- });
14
-
15
- const mockStore = configureStore();
16
-
17
- describe('CreateTranslation', () => {
18
- it('renders a CreateTranslation component', () => {
19
- const store = mockStore({
20
- intl: {
21
- locale: 'en',
22
- messages: {},
23
- },
24
- translations: {
25
- translationLocation: '/es',
26
- },
27
- });
28
- const component = renderer.create(
29
- <Provider store={store}>
30
- <MemoryRouter>
31
- <CreateTranslation
32
- location={{
33
- pathname: '/blog-post',
34
- state: {
35
- language: 'es',
36
- translationOf: '/en/page-en',
37
- },
38
- }}
39
- />
40
- </MemoryRouter>
41
- </Provider>,
42
- );
43
- const json = component.toJSON();
44
- expect(json).toMatchSnapshot();
45
- });
46
- });
@@ -1,115 +0,0 @@
1
- import { renderHook } from '@testing-library/react-hooks';
2
- import { usePagination } from './usePagination';
3
- import * as redux from 'react-redux';
4
- import routeData from 'react-router';
5
- import { slugify } from '@plone/volto/helpers/Utils/Utils';
6
-
7
- const searchBlockId = '545b33de-92cf-4747-969d-68851837b317';
8
- const searchBlockId2 = '454b33de-92cf-4747-969d-68851837b713';
9
- const searchBlock = {
10
- '@type': 'search',
11
- query: {
12
- b_size: '4',
13
- query: [
14
- {
15
- i: 'path',
16
- o: 'plone.app.querystring.operation.string.relativePath',
17
- v: '',
18
- },
19
- ],
20
- sort_order: 'ascending',
21
- },
22
- showSearchInput: true,
23
- showTotalResults: true,
24
- };
25
- let state = {
26
- content: {
27
- data: {
28
- blocks: {
29
- [searchBlockId]: searchBlock,
30
- },
31
- blocks_layout: {
32
- items: [searchBlockId],
33
- },
34
- },
35
- },
36
- };
37
-
38
- let mockUseLocationValue = {
39
- pathname: '/testroute',
40
- search: '',
41
- };
42
-
43
- const setUp = (searchParam, numberOfSearches) => {
44
- mockUseLocationValue.search = searchParam;
45
- if (numberOfSearches > 1) {
46
- state.content.data.blocks[searchBlockId2] = searchBlock;
47
- state.content.data.blocks_layout.items.push(searchBlockId2);
48
- }
49
- return renderHook(({ id, defaultPage }) => usePagination(id, defaultPage), {
50
- initialProps: {
51
- id: searchBlockId,
52
- defaultPage: 1,
53
- },
54
- });
55
- };
56
-
57
- describe(`Tests for usePagination, for the block ${searchBlockId}`, () => {
58
- const useLocation = jest.spyOn(routeData, 'useLocation');
59
- const useHistory = jest.spyOn(routeData, 'useHistory');
60
- const useSelector = jest.spyOn(redux, 'useSelector');
61
- beforeEach(() => {
62
- useLocation.mockReturnValue(mockUseLocationValue);
63
- useHistory.mockReturnValue({ replace: jest.fn() });
64
- useSelector.mockImplementation((cb) => cb(state));
65
- });
66
-
67
- it('1 paginated block with id and defaultPage 1 - shoud be 1', () => {
68
- const { result } = setUp();
69
- expect(result.current.currentPage).toBe(1);
70
- });
71
-
72
- it('1 paginated block without params - shoud be 1', () => {
73
- const { result } = setUp();
74
- expect(result.current.currentPage).toBe(1);
75
- });
76
-
77
- const param1 = '?page=2';
78
- it(`1 paginated block with params: ${param1} - shoud be 2`, () => {
79
- const { result } = setUp(param1);
80
- expect(result.current.currentPage).toBe(2);
81
- });
82
-
83
- const param2 = `?${slugify(`page-${searchBlockId}`)}=2`;
84
- it(`2 paginated blocks with current block in the params: ${param2} - shoud be 2`, () => {
85
- const { result } = setUp(param2, 2);
86
- expect(result.current.currentPage).toBe(2);
87
- });
88
-
89
- const param3 = `?${slugify(`page-${searchBlockId2}`)}=2`;
90
- it(`2 paginated blocks with the other block in the params: ${param3} - shoud be 1`, () => {
91
- const { result } = setUp(param3, 2);
92
- expect(result.current.currentPage).toBe(1);
93
- });
94
-
95
- const param4 = `?${slugify(`page-${searchBlockId}`)}=2&${slugify(
96
- `page-${searchBlockId2}`,
97
- )}=1`;
98
- it(`2 paginated blocks with both blocks in the params, current 2: ${param4} - shoud be 2`, () => {
99
- const { result } = setUp(param4, 2);
100
- expect(result.current.currentPage).toBe(2);
101
- });
102
-
103
- const param5 = `?${slugify(`page-${searchBlockId}`)}=1&${slugify(
104
- `page-${searchBlockId2}`,
105
- )}=2`;
106
- it(`2 paginated blocks with both blocks in the params, current 1: ${param5} - shoud be 1`, () => {
107
- const { result } = setUp(param5, 2);
108
- expect(result.current.currentPage).toBe(1);
109
- });
110
-
111
- it(`2 paginated blocks with wrong page param: ${param1} - shoud be 1`, () => {
112
- const { result } = setUp(param1, 2);
113
- expect(result.current.currentPage).toBe(1);
114
- });
115
- });