@plone/volto 19.0.0-alpha.4 → 19.0.0-alpha.6

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 (118) hide show
  1. package/.eslintrc +20 -0
  2. package/CHANGELOG.md +62 -0
  3. package/README.md +0 -2
  4. package/cypress/support/commands.js +8 -6
  5. package/locales/af.json +1 -1
  6. package/locales/ar.json +1 -1
  7. package/locales/bg.json +1 -1
  8. package/locales/bn.json +1 -1
  9. package/locales/ca/LC_MESSAGES/volto.po +16 -1
  10. package/locales/ca.json +1 -1
  11. package/locales/cs.json +1 -1
  12. package/locales/cy.json +1 -1
  13. package/locales/da.json +1 -1
  14. package/locales/de/LC_MESSAGES/volto.po +19 -4
  15. package/locales/de.json +1 -1
  16. package/locales/el.json +1 -1
  17. package/locales/en/LC_MESSAGES/volto.po +16 -1
  18. package/locales/en.json +1 -1
  19. package/locales/en_AU.json +1 -1
  20. package/locales/en_GB.json +1 -1
  21. package/locales/eo.json +1 -1
  22. package/locales/es/LC_MESSAGES/volto.po +16 -1
  23. package/locales/es.json +1 -1
  24. package/locales/et.json +1 -1
  25. package/locales/eu/LC_MESSAGES/volto.po +16 -1
  26. package/locales/eu.json +1 -1
  27. package/locales/fa.json +1 -1
  28. package/locales/fi/LC_MESSAGES/volto.po +16 -1
  29. package/locales/fi.json +1 -1
  30. package/locales/fr/LC_MESSAGES/volto.po +16 -1
  31. package/locales/fr.json +1 -1
  32. package/locales/fu.json +1 -1
  33. package/locales/gl.json +1 -1
  34. package/locales/he.json +1 -1
  35. package/locales/hi/LC_MESSAGES/volto.po +16 -1
  36. package/locales/hi.json +1 -1
  37. package/locales/hr.json +1 -1
  38. package/locales/hu.json +1 -1
  39. package/locales/hy.json +1 -1
  40. package/locales/id.json +1 -1
  41. package/locales/it/LC_MESSAGES/volto.po +16 -1
  42. package/locales/it.json +1 -1
  43. package/locales/ja/LC_MESSAGES/volto.po +16 -1
  44. package/locales/ja.json +1 -1
  45. package/locales/ka.json +1 -1
  46. package/locales/kn.json +1 -1
  47. package/locales/ko.json +1 -1
  48. package/locales/lt.json +1 -1
  49. package/locales/lv.json +1 -1
  50. package/locales/mi.json +1 -1
  51. package/locales/mk.json +1 -1
  52. package/locales/my.json +1 -1
  53. package/locales/nb_NO.json +1 -1
  54. package/locales/nl/LC_MESSAGES/volto.po +16 -1
  55. package/locales/nl.json +1 -1
  56. package/locales/nn.json +1 -1
  57. package/locales/pl.json +1 -1
  58. package/locales/pt/LC_MESSAGES/volto.po +16 -1
  59. package/locales/pt.json +1 -1
  60. package/locales/pt_BR/LC_MESSAGES/volto.po +25 -10
  61. package/locales/pt_BR.json +1 -1
  62. package/locales/rm.json +1 -1
  63. package/locales/ro/LC_MESSAGES/volto.po +16 -1
  64. package/locales/ro.json +1 -1
  65. package/locales/ru/LC_MESSAGES/volto.po +16 -1
  66. package/locales/ru.json +1 -1
  67. package/locales/sk.json +1 -1
  68. package/locales/sl.json +1 -1
  69. package/locales/sm.json +1 -1
  70. package/locales/sq.json +1 -1
  71. package/locales/sr.json +1 -1
  72. package/locales/sr@cyrl.json +1 -1
  73. package/locales/sr@latn.json +1 -1
  74. package/locales/sv.json +1 -1
  75. package/locales/ta.json +1 -1
  76. package/locales/te.json +1 -1
  77. package/locales/th.json +1 -1
  78. package/locales/to.json +1 -1
  79. package/locales/tr.json +1 -1
  80. package/locales/uk.json +1 -1
  81. package/locales/vi.json +1 -1
  82. package/locales/volto.pot +17 -2
  83. package/locales/zh_CN/LC_MESSAGES/volto.po +16 -1
  84. package/locales/zh_CN.json +1 -1
  85. package/locales/zh_Hant.json +1 -1
  86. package/locales/zh_Hant_HK.json +1 -1
  87. package/package.json +7 -7
  88. package/src/components/manage/Blocks/Image/Edit.jsx +5 -1
  89. package/src/components/manage/Blocks/LeadImage/Edit.jsx +2 -2
  90. package/src/components/manage/Blocks/LeadImage/LeadImageSidebar.jsx +1 -1
  91. package/src/components/manage/Blocks/Maps/Edit.jsx +2 -1
  92. package/src/components/manage/Blocks/Search/SearchBlockView.jsx +21 -4
  93. package/src/components/manage/Blocks/Teaser/Data.jsx +21 -7
  94. package/src/components/manage/Blocks/Teaser/DefaultBody.jsx +1 -1
  95. package/src/components/manage/Blocks/Video/Edit.jsx +2 -1
  96. package/src/components/manage/Contents/Contents.jsx +20 -2
  97. package/src/components/manage/Controlpanels/ContentType.jsx +1 -1
  98. package/src/components/manage/Controlpanels/Users/RenderUsers.jsx +156 -175
  99. package/src/components/manage/Form/InlineForm.jsx +2 -2
  100. package/src/components/manage/Sidebar/ObjectBrowserNav.jsx +2 -1
  101. package/src/components/manage/TemplateChooser/TemplateChooser.jsx +2 -1
  102. package/src/components/manage/Toolbar/PersonalTools.jsx +2 -1
  103. package/src/components/manage/Widgets/FileWidget.jsx +14 -8
  104. package/src/components/manage/Widgets/ImageWidget.jsx +160 -34
  105. package/src/components/manage/Widgets/RegistryImageWidget.test.jsx +2 -1
  106. package/src/components/theme/Avatar/Avatar.jsx +2 -1
  107. package/src/components/theme/PreviewImage/PreviewImage.jsx +1 -1
  108. package/src/components/theme/Widgets/ImageWidget.jsx +2 -1
  109. package/src/middleware/api.js +1 -1
  110. package/src/middleware/storeProtectLoadUtils.test.js +3 -3
  111. package/theme/themes/pastanaga/extras/blocks.less +19 -0
  112. package/theme/themes/pastanaga/extras/contents.less +12 -0
  113. package/types/components/manage/Controlpanels/Users/RenderUsers.d.ts +18 -2
  114. package/types/components/manage/Controlpanels/index.d.ts +1 -1
  115. package/types/components/manage/Widgets/ImageWidget.d.ts +41 -1
  116. package/types/components/manage/Widgets/RecurrenceWidget/Utils.d.ts +12 -18
  117. package/types/helpers/Helmet/Helmet.d.ts +1 -1
  118. package/cypress/downloads/downloads.html +0 -0
@@ -9,11 +9,14 @@ import { compose } from 'redux';
9
9
  import { toast } from 'react-toastify';
10
10
  import useLinkEditor from '@plone/volto/components/manage/AnchorPlugin/useLinkEditor';
11
11
  import withObjectBrowser from '@plone/volto/components/manage/Sidebar/ObjectBrowser';
12
+ import config from '@plone/volto/registry';
12
13
 
13
14
  import {
14
15
  flattenToAppURL,
15
16
  getBaseUrl,
16
17
  isInternalURL,
18
+ normalizeUrl,
19
+ removeProtocol,
17
20
  } from '@plone/volto/helpers/Url/Url';
18
21
  import { validateFileUploadSize } from '@plone/volto/helpers/FormValidation/FormValidation';
19
22
  import { usePrevious } from '@plone/volto/helpers/Utils/usePrevious';
@@ -28,6 +31,9 @@ import clearSVG from '@plone/volto/icons/clear.svg';
28
31
  import navTreeSVG from '@plone/volto/icons/nav.svg';
29
32
  import linkSVG from '@plone/volto/icons/link.svg';
30
33
  import uploadSVG from '@plone/volto/icons/upload.svg';
34
+ import Image from '../../theme/Image/Image';
35
+ import { urlValidator } from '@plone/volto/helpers/FormValidation/validators';
36
+ import { searchContent } from '@plone/volto/actions/search/search';
31
37
 
32
38
  const Dropzone = loadable(() => import('react-dropzone'));
33
39
 
@@ -70,6 +76,14 @@ const messages = defineMessages({
70
76
  id: 'imageUploadErrorMessage',
71
77
  defaultMessage: 'Please upload an image instead.',
72
78
  },
79
+ externalURLsNotAllowed: {
80
+ id: 'externalURLsNotAllowed',
81
+ defaultMessage: 'External URLs are not allowed in this field.',
82
+ },
83
+ internalImageNotFoundErrorMessage: {
84
+ id: 'internalImageNotFoundErrorMessage',
85
+ defaultMessage: 'No image was found in the internal path you provided.',
86
+ },
73
87
  });
74
88
 
75
89
  const UnconnectedImageInput = (props) => {
@@ -89,7 +103,7 @@ const UnconnectedImageInput = (props) => {
89
103
  placeholderLinkInput = '',
90
104
  onSelectItem,
91
105
  } = props;
92
- const imageValue = value?.[0]?.['@id'] || value;
106
+ const imageValue = value?.[0]?.['@id'] || value?.['@id'] || value;
93
107
 
94
108
  const intl = useIntl();
95
109
  const linkEditor = useLinkEditor();
@@ -109,16 +123,34 @@ const UnconnectedImageInput = (props) => {
109
123
  const imageId = content?.['@id'];
110
124
  const image = content?.image;
111
125
  let loading = false;
126
+ const isRelationChoice = props.factory === 'Relation Choice';
112
127
 
113
128
  useEffect(() => {
114
129
  if (uploading && loading && loaded) {
115
130
  setUploading(false);
116
- onChange(id, imageId, {
117
- image_field: 'image',
118
- image_scales: { image: [image] },
119
- });
131
+ if (isRelationChoice) {
132
+ onChange(id, content, {
133
+ image_field: 'image',
134
+ image_scales: { image: [image] },
135
+ });
136
+ } else {
137
+ onChange(id, imageId, {
138
+ image_field: 'image',
139
+ image_scales: { image: [image] },
140
+ });
141
+ }
120
142
  }
121
- }, [loading, loaded, uploading, imageId, image, id, onChange]); // Explicitly list all dependencies
143
+ }, [
144
+ loading,
145
+ loaded,
146
+ uploading,
147
+ imageId,
148
+ image,
149
+ id,
150
+ content,
151
+ isRelationChoice,
152
+ onChange,
153
+ ]);
122
154
 
123
155
  loading = usePrevious(props.request?.loading);
124
156
 
@@ -170,6 +202,83 @@ const UnconnectedImageInput = (props) => {
170
202
  }, [restrictFileUpload]);
171
203
  const onDragLeave = React.useCallback(() => setDragging(false), []);
172
204
 
205
+ const validateManualLink = React.useCallback(
206
+ (url) => {
207
+ if (!url.startsWith('/')) {
208
+ const error = urlValidator({
209
+ value: url,
210
+ formatMessage: intl.formatMessage,
211
+ });
212
+ // if (error && url !== '') {
213
+ // this.setState({ errors: [error] });
214
+ // } else {
215
+ // this.setState({ errors: [] });
216
+ // }
217
+ return !Boolean(error);
218
+ } else {
219
+ return isInternalURL(url);
220
+ }
221
+ },
222
+ [intl.formatMessage],
223
+ );
224
+
225
+ const onSubmitURL = React.useCallback(
226
+ (url) => {
227
+ if (validateManualLink(url)) {
228
+ if (isInternalURL(url)) {
229
+ // convert it into an internal on if possible
230
+ props
231
+ .searchContent(
232
+ '/',
233
+ {
234
+ portal_type: config.settings.imageObjects,
235
+ 'path.query': flattenToAppURL(url),
236
+ 'path.depth': '0',
237
+ sort_on: 'getObjPositionInParent',
238
+ metadata_fields: '_all',
239
+ b_size: 1000,
240
+ },
241
+ `${props.block}-${props.mode}`,
242
+ )
243
+ .then((resp) => {
244
+ if (resp.items?.length > 0) {
245
+ onChange(props.id, resp.items[0], {});
246
+ } else {
247
+ toast.error(
248
+ <Toast
249
+ error
250
+ title={intl.formatMessage(messages.Error)}
251
+ content={intl.formatMessage(
252
+ messages.internalImageNotFoundErrorMessage,
253
+ )}
254
+ />,
255
+ );
256
+ }
257
+ });
258
+ } else {
259
+ if (isRelationChoice) {
260
+ toast.error(
261
+ <Toast
262
+ error
263
+ title={intl.formatMessage(messages.Error)}
264
+ content={intl.formatMessage(messages.imageUploadErrorMessage)}
265
+ />,
266
+ );
267
+ } else {
268
+ // if it's an external link, we save it as is
269
+ onChange(props.id, [
270
+ {
271
+ '@id': normalizeUrl(url),
272
+ title: removeProtocol(url),
273
+ },
274
+ ]);
275
+ }
276
+ }
277
+ }
278
+ },
279
+ [validateManualLink, props, intl, isRelationChoice, onChange],
280
+ );
281
+
173
282
  return imageValue ? (
174
283
  <div
175
284
  className="image-upload-widget-image"
@@ -178,15 +287,20 @@ const UnconnectedImageInput = (props) => {
178
287
  role="toolbar"
179
288
  >
180
289
  {selected && <ImageToolbar {...props} />}
181
- <img
182
- className={props.className}
183
- src={
184
- isInternalURL(imageValue)
185
- ? `${flattenToAppURL(imageValue)}/@@images/image/${imageSize}`
186
- : imageValue
187
- }
188
- alt=""
189
- />
290
+ {/* If it's relation choice (preview_image_link) */}
291
+ {isRelationChoice ? (
292
+ <Image item={value} width="fit-content" height="auto" loading="lazy" />
293
+ ) : (
294
+ <Image
295
+ className={props.className}
296
+ src={
297
+ isInternalURL(imageValue)
298
+ ? `${flattenToAppURL(imageValue)}/@@images/image/${imageSize}`
299
+ : imageValue
300
+ }
301
+ alt=""
302
+ />
303
+ )}
190
304
  </div>
191
305
  ) : (
192
306
  <div
@@ -227,7 +341,7 @@ const UnconnectedImageInput = (props) => {
227
341
  </Loader>
228
342
  </Dimmer>
229
343
  )}
230
- <img src={imageBlockSVG} alt="" className="placeholder" />
344
+ <Image src={imageBlockSVG} alt="" className="placeholder" />
231
345
  <p>{description || intl.formatMessage(messages.addImage)}</p>
232
346
  <div className="toolbar-wrapper">
233
347
  <div className="toolbar-inner" ref={linkEditor.anchorNode}>
@@ -242,15 +356,24 @@ const UnconnectedImageInput = (props) => {
242
356
  e.preventDefault();
243
357
  openObjectBrowser({
244
358
  mode: objectBrowserPickerType,
245
- onSelectItem: onSelectItem
246
- ? onSelectItem
247
- : (url, { title, image_field, image_scales }) => {
248
- onChange(props.id, flattenToAppURL(url), {
249
- title,
250
- image_field,
251
- image_scales,
252
- });
253
- },
359
+ onSelectItem: isRelationChoice
360
+ ? (url, item) => {
361
+ // we save the whole item if it's a relation choice
362
+ onChange(props.id, item);
363
+ }
364
+ : onSelectItem
365
+ ? onSelectItem
366
+ : // else we save the url along with the image field and scales
367
+ (
368
+ url,
369
+ { title, image_field, image_scales },
370
+ ) => {
371
+ onChange(props.id, flattenToAppURL(url), {
372
+ title,
373
+ image_field,
374
+ image_scales,
375
+ });
376
+ },
254
377
  currentPath: contextUrl,
255
378
  });
256
379
  }}
@@ -311,13 +434,14 @@ const UnconnectedImageInput = (props) => {
311
434
  intl.formatMessage(messages.linkAnImage)
312
435
  }
313
436
  objectBrowserPickerType={objectBrowserPickerType}
314
- onChange={(_, e) =>
315
- onChange(
316
- props.id,
317
- isInternalURL(e) ? flattenToAppURL(e) : e,
318
- {},
319
- )
320
- }
437
+ onChange={(_, e) => {
438
+ onSubmitURL(e);
439
+ // onChange(
440
+ // props.id,
441
+ // isInternalURL(e) ? flattenToAppURL(e) : e,
442
+ // {},
443
+ // );
444
+ }}
321
445
  id={id}
322
446
  />
323
447
  )}
@@ -331,6 +455,8 @@ const UnconnectedImageInput = (props) => {
331
455
  };
332
456
 
333
457
  export const ImageInput = compose(
458
+ // This HOC goes first because it injects block in case that it's not present (not a block, but a DX field)
459
+ withObjectBrowser,
334
460
  connect(
335
461
  (state, ownProps) => {
336
462
  const requestId = `image-upload-${ownProps.id}`;
@@ -339,9 +465,9 @@ export const ImageInput = compose(
339
465
  content: state.content.subrequests[ownProps.block || requestId]?.data,
340
466
  };
341
467
  },
342
- { createContent },
468
+ { createContent, searchContent },
343
469
  ),
344
- )(withObjectBrowser(UnconnectedImageInput));
470
+ )(UnconnectedImageInput);
345
471
 
346
472
  const ImageUploadWidget = (props) => {
347
473
  const { fieldSet, id, title } = props;
@@ -82,8 +82,9 @@ describe('RegistryImageWidget', () => {
82
82
  const dropzone = container.querySelector('.file-widget-dropzone');
83
83
  const preview = container.querySelector('.image-preview');
84
84
  const filename = container.querySelector('.field-file-name');
85
+ const img = container.querySelector('img[src*="logo"]');
85
86
 
86
- return dropzone && preview && filename;
87
+ return dropzone && preview && filename && img && img.complete;
87
88
  },
88
89
  { timeout: 2000 },
89
90
  );
@@ -5,6 +5,7 @@
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import { getInitials } from '@plone/volto/helpers/Utils/Utils';
8
+ import Image from '@plone/volto/components/theme/Image/Image';
8
9
 
9
10
  const defaultSize = 30;
10
11
  const defaultColor = 'Teal';
@@ -15,7 +16,7 @@ const Avatar = ({ src, title, text, size, color, className }) => {
15
16
  return (
16
17
  <div className={className} title={title}>
17
18
  {src ? (
18
- <img src={src} alt={title}></img>
19
+ <Image src={src} alt={title} />
19
20
  ) : (
20
21
  <svg width={size} height={size}>
21
22
  <circle cx={radius} cy={radius} r={radius} fill={color} />
@@ -25,7 +25,7 @@ function PreviewImage({ item, alt, image_field, showDefault = true, ...rest }) {
25
25
  return image;
26
26
  } else {
27
27
  return (
28
- <img
28
+ <Image
29
29
  src={
30
30
  config.getComponent({
31
31
  name: 'DefaultImage',
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
3
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
4
+ import Image from '@plone/volto/components/theme/Image/Image';
4
5
 
5
6
  const niceBytes = (bytes) => {
6
7
  bytes = Number(bytes);
@@ -18,7 +19,7 @@ const niceBytes = (bytes) => {
18
19
  const ImageWidget = ({ value, className }) =>
19
20
  value ? (
20
21
  <span className={cx(className, 'image', 'widget')}>
21
- <img
22
+ <Image
22
23
  src={
23
24
  value.data
24
25
  ? `data:${value['content-type']};base64,${value.data}`
@@ -410,7 +410,7 @@ const apiMiddlewareFactory =
410
410
  ...rest,
411
411
  error,
412
412
  statusCode: error.response,
413
- message: error.response.body.message,
413
+ message: error.response?.body?.message,
414
414
  connectionRefused: false,
415
415
  type: SET_APIERROR,
416
416
  });
@@ -445,9 +445,9 @@ describe('storeProtectLoadUtils', () => {
445
445
  isCounting: false,
446
446
  });
447
447
  };
448
- test('pending', expectPass({ type: 'ANY_PENDING' }), 2);
449
- test('success', expectPass({ type: 'ANY_SUCCESS' }), 2);
450
- test('failure', expectPass({ type: 'ANY_FAIL' }), 2);
448
+ test('pending', expectPass({ type: 'ANY_PENDING' }, 2));
449
+ test('success', expectPass({ type: 'ANY_SUCCESS' }, 2));
450
+ test('failure', expectPass({ type: 'ANY_FAIL' }, 2));
451
451
  });
452
452
  describe('counting', () => {
453
453
  const expectCount = (action, from, to) => () => {
@@ -434,10 +434,18 @@ body.has-toolbar.has-sidebar-collapsed .ui.wrapper > .ui.inner.block.full {
434
434
  top: 1em;
435
435
  right: 1em;
436
436
 
437
+ .sidebar-container & .ui.icon.button:hover {
438
+ background: transparent !important;
439
+ }
440
+
437
441
  .icon.circled {
438
442
  border: 1px solid #e4e8ec;
439
443
  background: #f3f5f7;
440
444
  box-shadow: inset 0 0 0 0.14285714rem transparent !important;
445
+
446
+ &:hover {
447
+ background-color: #e4e8ec;
448
+ }
441
449
  }
442
450
  }
443
451
 
@@ -990,6 +998,17 @@ div.image-upload-widget-image {
990
998
  }
991
999
  }
992
1000
 
1001
+ // In the sidebar, the height is forced on all .ui.input T_T
1002
+ .ui.form .ui.input.input-anchorlink-theme,
1003
+ .ui.form
1004
+ .inline.field
1005
+ .link-form-container
1006
+ .wrapper
1007
+ .ui.input.input-anchorlink-theme
1008
+ input {
1009
+ height: 34px;
1010
+ }
1011
+
993
1012
  .block.image.align.left,
994
1013
  .block.image.align.right {
995
1014
  img {
@@ -107,6 +107,18 @@
107
107
  top: auto;
108
108
  bottom: 100%;
109
109
  }
110
+
111
+ .search-feedback {
112
+ position: absolute;
113
+ overflow: hidden;
114
+ width: 1px;
115
+ height: 1px;
116
+ padding: 0;
117
+ border: 0;
118
+ margin: -1px;
119
+ clip: rect(0, 0, 0, 0);
120
+ white-space: nowrap;
121
+ }
110
122
  }
111
123
 
112
124
  .ui.table .icon-align,
@@ -1,2 +1,18 @@
1
- declare const _default: any;
2
- export default _default;
1
+ export default RenderUsers;
2
+ /**
3
+ * RenderUsers functional component.
4
+ * @function RenderUsers
5
+ */
6
+ declare function RenderUsers(props: any): import("react/jsx-runtime").JSX.Element;
7
+ declare namespace RenderUsers {
8
+ namespace propTypes {
9
+ let user: any;
10
+ let roles: any;
11
+ let onDelete: any;
12
+ let isUserManager: any;
13
+ let listUsers: any;
14
+ let updateUser: any;
15
+ let inheritedRole: any;
16
+ let userschema: any;
17
+ }
18
+ }
@@ -5,7 +5,7 @@ export declare const AddRuleControlpanel: import("@loadable/component").Loadable
5
5
  export declare const EditRuleControlpanel: import("@loadable/component").LoadableClassComponent<any>;
6
6
  export declare const ConfigureRuleControlpanel: import("@loadable/component").LoadableClassComponent<any>;
7
7
  export declare const UsersControlpanel: import("@loadable/component").LoadableClassComponent<any>;
8
- export declare const RenderUsers: import("@loadable/component").LoadableClassComponent<any>;
8
+ export declare const RenderUsers: import("@loadable/component").LoadableComponent<any>;
9
9
  export declare const UserGroupMembershipControlPanel: import("@loadable/component").LoadableComponent<unknown>;
10
10
  export declare const GroupsControlpanel: import("@loadable/component").LoadableClassComponent<any>;
11
11
  export declare const RenderGroups: import("@loadable/component").LoadableComponent<any>;
@@ -5,6 +5,46 @@ export function ImageToolbar({ className, data, id, onChange, selected }: {
5
5
  onChange: any;
6
6
  selected: any;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- export const ImageInput: any;
8
+ export const ImageInput: {
9
+ new (): {
10
+ state: {
11
+ isObjectBrowserOpen: boolean;
12
+ };
13
+ openObjectBrowser: ({ mode, onSelectItem, dataName, overlay, propDataName, searchableTypes, selectableTypes, maximumSelectionSize, currentPath, }?: {
14
+ mode: string;
15
+ dataName: string;
16
+ onSelectItem: string;
17
+ overlay: string;
18
+ }) => void;
19
+ closeObjectBrowser: () => void;
20
+ render(): import("react/jsx-runtime").JSX.Element;
21
+ context: unknown;
22
+ setState<K extends string | number | symbol>(state: any, callback?: () => void): void;
23
+ forceUpdate(callback?: () => void): void;
24
+ readonly props: Readonly<any>;
25
+ refs: {
26
+ [key: string]: React.ReactInstance;
27
+ };
28
+ componentDidMount?(): void;
29
+ shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
30
+ componentWillUnmount?(): void;
31
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
32
+ getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
33
+ componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
34
+ componentWillMount?(): void;
35
+ UNSAFE_componentWillMount?(): void;
36
+ componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
37
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
38
+ componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
39
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
40
+ };
41
+ defaultProps: {
42
+ onChangeBlock: () => void;
43
+ data: {};
44
+ block: string;
45
+ };
46
+ contextType?: React.Context<any> | undefined;
47
+ };
9
48
  export default ImageUploadWidget;
49
+ import React from 'react';
10
50
  declare function ImageUploadWidget(props: any): import("react/jsx-runtime").JSX.Element;
@@ -19,36 +19,30 @@ export namespace FREQUENCES {
19
19
  }
20
20
  export namespace OPTIONS {
21
21
  let frequences: {
22
- [x: string]: {
22
+ [FREQUENCES.DAILY]: {
23
23
  rrule: import("rrule").Frequency;
24
24
  interval: boolean;
25
- byday?: undefined;
26
- bymonth?: undefined;
27
- byyear?: undefined;
28
- } | {
25
+ };
26
+ [FREQUENCES.MONDAYFRIDAY]: {
27
+ rrule: import("rrule").Frequency;
28
+ };
29
+ [FREQUENCES.WEEKDAYS]: {
29
30
  rrule: import("rrule").Frequency;
30
- interval?: undefined;
31
- byday?: undefined;
32
- bymonth?: undefined;
33
- byyear?: undefined;
34
- } | {
31
+ };
32
+ [FREQUENCES.WEEKLY]: {
35
33
  rrule: import("rrule").Frequency;
36
34
  interval: boolean;
37
35
  byday: boolean;
38
- bymonth?: undefined;
39
- byyear?: undefined;
40
- } | {
36
+ };
37
+ [FREQUENCES.MONTHLY]: {
41
38
  rrule: import("rrule").Frequency;
42
39
  interval: boolean;
43
40
  bymonth: boolean;
44
- byday?: undefined;
45
- byyear?: undefined;
46
- } | {
41
+ };
42
+ [FREQUENCES.YEARLY]: {
47
43
  rrule: import("rrule").Frequency;
48
44
  interval: boolean;
49
45
  byyear: boolean;
50
- byday?: undefined;
51
- bymonth?: undefined;
52
46
  };
53
47
  };
54
48
  }
@@ -132,7 +132,7 @@ declare const HelmetExport: {
132
132
  };
133
133
  peek: any;
134
134
  rewind: () => any;
135
- canUseDOM: any;
135
+ set canUseDOM(canUseDOM: any);
136
136
  contextType?: React.Context<any> | undefined;
137
137
  };
138
138
  import React from 'react';
Binary file