@strapi/content-manager 0.0.0-experimental.dd3311938ac827f1fa8560c8840a9a394f5896c0 → 0.0.0-experimental.e14656d3b8681880212c13260b9a2b340c182f2d

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/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js → ComponentConfigurationPage-D_M8iBw5.js} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js.map → ComponentConfigurationPage-D_M8iBw5.js.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs → ComponentConfigurationPage-qemkOlnj.mjs} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs.map → ComponentConfigurationPage-qemkOlnj.mjs.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js → EditConfigurationPage-BePwPuHy.js} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js.map → EditConfigurationPage-BePwPuHy.js.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs → EditConfigurationPage-CjUrEewK.mjs} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs.map → EditConfigurationPage-CjUrEewK.mjs.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-CTTDHKkQ.js → EditViewPage-B-RJeiJD.js} +57 -46
  11. package/dist/_chunks/EditViewPage-B-RJeiJD.js.map +1 -0
  12. package/dist/_chunks/{EditViewPage-DWb0DE7R.mjs → EditViewPage-De8GyU8P.mjs} +58 -47
  13. package/dist/_chunks/EditViewPage-De8GyU8P.mjs.map +1 -0
  14. package/dist/_chunks/{Field-C5Z1Ivdv.js → Field-dq8Tg1M_.js} +514 -168
  15. package/dist/_chunks/Field-dq8Tg1M_.js.map +1 -0
  16. package/dist/_chunks/{Field-DnStdvQw.mjs → Field-pb2o8uBe.mjs} +516 -170
  17. package/dist/_chunks/Field-pb2o8uBe.mjs.map +1 -0
  18. package/dist/_chunks/{Form-B81OtW-k.js → Form-DGIf4jQU.js} +38 -28
  19. package/dist/_chunks/Form-DGIf4jQU.js.map +1 -0
  20. package/dist/_chunks/{Form-DqGgE55Q.mjs → Form-DJn0Dxha.mjs} +40 -30
  21. package/dist/_chunks/Form-DJn0Dxha.mjs.map +1 -0
  22. package/dist/_chunks/{History-DS6-HCYX.mjs → History-BowL3JKP.mjs} +52 -29
  23. package/dist/_chunks/History-BowL3JKP.mjs.map +1 -0
  24. package/dist/_chunks/{History-4NbOq2dX.js → History-Dh2NEHnR.js} +51 -28
  25. package/dist/_chunks/History-Dh2NEHnR.js.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-DQJJltko.mjs → ListConfigurationPage-BpVOB-hn.mjs} +58 -48
  27. package/dist/_chunks/ListConfigurationPage-BpVOB-hn.mjs.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-CpfstlYY.js → ListConfigurationPage-BxYCWz9e.js} +57 -46
  29. package/dist/_chunks/ListConfigurationPage-BxYCWz9e.js.map +1 -0
  30. package/dist/_chunks/{ListViewPage-CA3I75m5.js → ListViewPage-4XsciqHZ.js} +65 -68
  31. package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +1 -0
  32. package/dist/_chunks/{ListViewPage-nQrOQuVo.mjs → ListViewPage-CXFUjZQC.mjs} +67 -70
  33. package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js → NoContentTypePage-C8OpoHeU.js} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js.map → NoContentTypePage-C8OpoHeU.js.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs → NoContentTypePage-DuhOTp3x.mjs} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs.map → NoContentTypePage-DuhOTp3x.mjs.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs → NoPermissionsPage-DVz3mzDz.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs.map → NoPermissionsPage-DVz3mzDz.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-CO2MK200.js → NoPermissionsPage-y_r7DVA2.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-CO2MK200.js.map → NoPermissionsPage-y_r7DVA2.js.map} +1 -1
  42. package/dist/_chunks/{Relations-BDRl99Ux.mjs → Relations-CVNLrn1Y.mjs} +4 -4
  43. package/dist/_chunks/Relations-CVNLrn1Y.mjs.map +1 -0
  44. package/dist/_chunks/{Relations-DG2jnOcr.js → Relations-DPFCAa7b.js} +4 -4
  45. package/dist/_chunks/Relations-DPFCAa7b.js.map +1 -0
  46. package/dist/_chunks/{en-Ux26r5pl.mjs → en-BrCTWlZv.mjs} +5 -4
  47. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-BrCTWlZv.mjs.map} +1 -1
  48. package/dist/_chunks/{en-fbKQxLGn.js → en-uOUIxfcQ.js} +5 -4
  49. package/dist/_chunks/{en-fbKQxLGn.js.map → en-uOUIxfcQ.js.map} +1 -1
  50. package/dist/_chunks/{index-BZoNZMXL.js → index-C3fJE-1-.js} +465 -422
  51. package/dist/_chunks/index-C3fJE-1-.js.map +1 -0
  52. package/dist/_chunks/{index-Drt2DN7v.mjs → index-DiMrfcfy.mjs} +472 -429
  53. package/dist/_chunks/index-DiMrfcfy.mjs.map +1 -0
  54. package/dist/_chunks/{layout-DEYBqgF1.js → layout-C788OmNr.js} +23 -11
  55. package/dist/_chunks/layout-C788OmNr.js.map +1 -0
  56. package/dist/_chunks/{layout-BzAbmoO6.mjs → layout-ls3gxfpH.mjs} +25 -13
  57. package/dist/_chunks/layout-ls3gxfpH.mjs.map +1 -0
  58. package/dist/_chunks/{relations-D26zVRdi.mjs → relations-CLcOmGO0.mjs} +2 -2
  59. package/dist/_chunks/{relations-D26zVRdi.mjs.map → relations-CLcOmGO0.mjs.map} +1 -1
  60. package/dist/_chunks/{relations-D0eZ4VWw.js → relations-DYeotliT.js} +2 -2
  61. package/dist/_chunks/{relations-D0eZ4VWw.js.map → relations-DYeotliT.js.map} +1 -1
  62. package/dist/admin/index.js +1 -1
  63. package/dist/admin/index.mjs +1 -1
  64. package/dist/admin/src/history/index.d.ts +3 -0
  65. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  66. package/dist/admin/src/index.d.ts +1 -0
  67. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +8 -3
  68. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  69. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
  70. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  71. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  72. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +12 -32
  73. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  74. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  75. package/dist/admin/src/services/api.d.ts +1 -1
  76. package/dist/admin/src/services/components.d.ts +2 -2
  77. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  78. package/dist/admin/src/services/documents.d.ts +16 -16
  79. package/dist/admin/src/services/init.d.ts +1 -1
  80. package/dist/admin/src/services/relations.d.ts +2 -2
  81. package/dist/admin/src/services/uid.d.ts +3 -3
  82. package/dist/admin/src/utils/validation.d.ts +4 -1
  83. package/dist/server/index.js +166 -108
  84. package/dist/server/index.js.map +1 -1
  85. package/dist/server/index.mjs +167 -109
  86. package/dist/server/index.mjs.map +1 -1
  87. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  88. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  89. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  90. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  91. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  92. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  93. package/dist/server/src/history/services/utils.d.ts +1 -1
  94. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  95. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  96. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  97. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  98. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  99. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  100. package/package.json +8 -8
  101. package/dist/_chunks/EditViewPage-CTTDHKkQ.js.map +0 -1
  102. package/dist/_chunks/EditViewPage-DWb0DE7R.mjs.map +0 -1
  103. package/dist/_chunks/Field-C5Z1Ivdv.js.map +0 -1
  104. package/dist/_chunks/Field-DnStdvQw.mjs.map +0 -1
  105. package/dist/_chunks/Form-B81OtW-k.js.map +0 -1
  106. package/dist/_chunks/Form-DqGgE55Q.mjs.map +0 -1
  107. package/dist/_chunks/History-4NbOq2dX.js.map +0 -1
  108. package/dist/_chunks/History-DS6-HCYX.mjs.map +0 -1
  109. package/dist/_chunks/ListConfigurationPage-CpfstlYY.js.map +0 -1
  110. package/dist/_chunks/ListConfigurationPage-DQJJltko.mjs.map +0 -1
  111. package/dist/_chunks/ListViewPage-CA3I75m5.js.map +0 -1
  112. package/dist/_chunks/ListViewPage-nQrOQuVo.mjs.map +0 -1
  113. package/dist/_chunks/Relations-BDRl99Ux.mjs.map +0 -1
  114. package/dist/_chunks/Relations-DG2jnOcr.js.map +0 -1
  115. package/dist/_chunks/index-BZoNZMXL.js.map +0 -1
  116. package/dist/_chunks/index-Drt2DN7v.mjs.map +0 -1
  117. package/dist/_chunks/layout-BzAbmoO6.mjs.map +0 -1
  118. package/dist/_chunks/layout-DEYBqgF1.js.map +0 -1
@@ -5,9 +5,9 @@ const strapiAdmin = require("@strapi/admin/strapi-admin");
5
5
  const designSystem = require("@strapi/design-system");
6
6
  const pipe$1 = require("lodash/fp/pipe");
7
7
  const reactIntl = require("react-intl");
8
- const index = require("./index-BZoNZMXL.js");
8
+ const index = require("./index-C3fJE-1-.js");
9
9
  const fractionalIndexing = require("fractional-indexing");
10
- const Relations = require("./Relations-DG2jnOcr.js");
10
+ const Relations = require("./Relations-DPFCAa7b.js");
11
11
  const Icons = require("@strapi/icons");
12
12
  const styledComponents = require("styled-components");
13
13
  const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
@@ -194,6 +194,220 @@ const useLazyComponents = (componentUids = []) => {
194
194
  }, []);
195
195
  return { isLazyLoading: loading, lazyComponentStore, cleanup };
196
196
  };
197
+ const codeLanguages = [
198
+ {
199
+ value: "asm",
200
+ label: "Assembly"
201
+ },
202
+ {
203
+ value: "bash",
204
+ label: "Bash"
205
+ },
206
+ {
207
+ value: "c",
208
+ label: "C"
209
+ },
210
+ {
211
+ value: "clojure",
212
+ label: "Clojure"
213
+ },
214
+ {
215
+ value: "cobol",
216
+ label: "COBOL"
217
+ },
218
+ {
219
+ value: "cpp",
220
+ label: "C++"
221
+ },
222
+ {
223
+ value: "csharp",
224
+ label: "C#"
225
+ },
226
+ {
227
+ value: "css",
228
+ label: "CSS"
229
+ },
230
+ {
231
+ value: "dart",
232
+ label: "Dart"
233
+ },
234
+ {
235
+ value: "dockerfile",
236
+ label: "Dockerfile"
237
+ },
238
+ {
239
+ value: "elixir",
240
+ label: "Elixir"
241
+ },
242
+ {
243
+ value: "erlang",
244
+ label: "Erlang"
245
+ },
246
+ {
247
+ value: "fortran",
248
+ label: "Fortran"
249
+ },
250
+ {
251
+ value: "fsharp",
252
+ label: "F#"
253
+ },
254
+ {
255
+ value: "go",
256
+ label: "Go"
257
+ },
258
+ {
259
+ value: "graphql",
260
+ label: "GraphQL"
261
+ },
262
+ {
263
+ value: "groovy",
264
+ label: "Groovy"
265
+ },
266
+ {
267
+ value: "haskell",
268
+ label: "Haskell"
269
+ },
270
+ {
271
+ value: "haxe",
272
+ label: "Haxe"
273
+ },
274
+ {
275
+ value: "html",
276
+ label: "HTML"
277
+ },
278
+ {
279
+ value: "ini",
280
+ label: "INI"
281
+ },
282
+ {
283
+ value: "java",
284
+ label: "Java"
285
+ },
286
+ {
287
+ value: "javascript",
288
+ label: "JavaScript"
289
+ },
290
+ {
291
+ value: "jsx",
292
+ label: "JavaScript (React)"
293
+ },
294
+ {
295
+ value: "json",
296
+ label: "JSON"
297
+ },
298
+ {
299
+ value: "julia",
300
+ label: "Julia"
301
+ },
302
+ {
303
+ value: "kotlin",
304
+ label: "Kotlin"
305
+ },
306
+ {
307
+ value: "latex",
308
+ label: "LaTeX"
309
+ },
310
+ {
311
+ value: "lua",
312
+ label: "Lua"
313
+ },
314
+ {
315
+ value: "markdown",
316
+ label: "Markdown"
317
+ },
318
+ {
319
+ value: "matlab",
320
+ label: "MATLAB"
321
+ },
322
+ {
323
+ value: "makefile",
324
+ label: "Makefile"
325
+ },
326
+ {
327
+ value: "objectivec",
328
+ label: "Objective-C"
329
+ },
330
+ {
331
+ value: "perl",
332
+ label: "Perl"
333
+ },
334
+ {
335
+ value: "php",
336
+ label: "PHP"
337
+ },
338
+ {
339
+ value: "plaintext",
340
+ label: "Plain text"
341
+ },
342
+ {
343
+ value: "powershell",
344
+ label: "PowerShell"
345
+ },
346
+ {
347
+ value: "python",
348
+ label: "Python"
349
+ },
350
+ {
351
+ value: "r",
352
+ label: "R"
353
+ },
354
+ {
355
+ value: "ruby",
356
+ label: "Ruby"
357
+ },
358
+ {
359
+ value: "rust",
360
+ label: "Rust"
361
+ },
362
+ {
363
+ value: "sas",
364
+ label: "SAS"
365
+ },
366
+ {
367
+ value: "scala",
368
+ label: "Scala"
369
+ },
370
+ {
371
+ value: "scheme",
372
+ label: "Scheme"
373
+ },
374
+ {
375
+ value: "shell",
376
+ label: "Shell"
377
+ },
378
+ {
379
+ value: "sql",
380
+ label: "SQL"
381
+ },
382
+ {
383
+ value: "stata",
384
+ label: "Stata"
385
+ },
386
+ {
387
+ value: "swift",
388
+ label: "Swift"
389
+ },
390
+ {
391
+ value: "typescript",
392
+ label: "TypeScript"
393
+ },
394
+ {
395
+ value: "tsx",
396
+ label: "TypeScript (React)"
397
+ },
398
+ {
399
+ value: "vbnet",
400
+ label: "VB.NET"
401
+ },
402
+ {
403
+ value: "xml",
404
+ label: "XML"
405
+ },
406
+ {
407
+ value: "yaml",
408
+ label: "YAML"
409
+ }
410
+ ];
197
411
  const baseHandleConvert = (editor, attributesToSet) => {
198
412
  const [_, lastNodePath] = slate.Editor.last(editor, []);
199
413
  slate.Transforms.unwrapNodes(editor, {
@@ -264,6 +478,7 @@ const CodeBlock = styledComponents.styled.pre`
264
478
  overflow: auto;
265
479
  padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
266
480
  flex-shrink: 1;
481
+
267
482
  & > code {
268
483
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas,
269
484
  monospace;
@@ -272,9 +487,61 @@ const CodeBlock = styledComponents.styled.pre`
272
487
  max-width: 100%;
273
488
  }
274
489
  `;
490
+ const CodeEditor = (props) => {
491
+ const { editor } = useBlocksEditorContext("ImageDialog");
492
+ const editorIsFocused = slateReact.useFocused();
493
+ const imageIsSelected = slateReact.useSelected();
494
+ const { formatMessage } = reactIntl.useIntl();
495
+ const [isSelectOpen, setIsSelectOpen] = React__namespace.useState(false);
496
+ const shouldDisplayLanguageSelect = editorIsFocused && imageIsSelected || isSelectOpen;
497
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { position: "relative", width: "100%", children: [
498
+ /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, { ...props.attributes, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: props.children }) }),
499
+ shouldDisplayLanguageSelect && /* @__PURE__ */ jsxRuntime.jsx(
500
+ designSystem.Box,
501
+ {
502
+ position: "absolute",
503
+ background: "neutral0",
504
+ borderColor: "neutral150",
505
+ borderStyle: "solid",
506
+ borderWidth: "0.5px",
507
+ shadow: "tableShadow",
508
+ top: "100%",
509
+ marginTop: 1,
510
+ right: 0,
511
+ padding: 1,
512
+ hasRadius: true,
513
+ children: /* @__PURE__ */ jsxRuntime.jsx(
514
+ designSystem.SingleSelect,
515
+ {
516
+ onChange: (open) => {
517
+ slate.Transforms.setNodes(
518
+ editor,
519
+ { language: open.toString() },
520
+ { match: (node) => !slate.Editor.isEditor(node) && node.type === "code" }
521
+ );
522
+ },
523
+ value: props.element.type === "code" && props.element.language || "plaintext",
524
+ onOpenChange: (open) => {
525
+ setIsSelectOpen(open);
526
+ if (!open) {
527
+ slateReact.ReactEditor.focus(editor);
528
+ }
529
+ },
530
+ onCloseAutoFocus: (e) => e.preventDefault(),
531
+ "aria-label": formatMessage({
532
+ id: "components.Blocks.blocks.code.languageLabel",
533
+ defaultMessage: "Select a language"
534
+ }),
535
+ children: codeLanguages.map(({ value, label }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value, children: label }, value))
536
+ }
537
+ )
538
+ }
539
+ )
540
+ ] });
541
+ };
275
542
  const codeBlocks = {
276
543
  code: {
277
- renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, { ...props.attributes, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: props.children }) }),
544
+ renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeEditor, { ...props }),
278
545
  icon: Icons.Code,
279
546
  label: {
280
547
  id: "components.Blocks.blocks.code",
@@ -283,7 +550,7 @@ const codeBlocks = {
283
550
  matchNode: (node) => node.type === "code",
284
551
  isInBlocksSelector: true,
285
552
  handleConvert(editor) {
286
- baseHandleConvert(editor, { type: "code" });
553
+ baseHandleConvert(editor, { type: "code", language: "plaintext" });
287
554
  },
288
555
  handleEnterKey(editor) {
289
556
  pressEnterTwiceToExit(editor);
@@ -623,18 +890,12 @@ const LinkContent = React__namespace.forwardRef(
623
890
  const [popoverOpen, setPopoverOpen] = React__namespace.useState(
624
891
  editor.lastInsertedLinkPath ? slate.Path.equals(path, editor.lastInsertedLinkPath) : false
625
892
  );
626
- const linkRef = React__namespace.useRef(null);
627
893
  const elementText = link.children.map((child) => child.text).join("");
628
894
  const [linkText, setLinkText] = React__namespace.useState(elementText);
629
895
  const [linkUrl, setLinkUrl] = React__namespace.useState(link.url);
630
896
  const linkInputRef = React__namespace.useRef(null);
631
- const [showRemoveButton, setShowRemoveButton] = React__namespace.useState(false);
897
+ const isLastInsertedLink = editor.lastInsertedLinkPath ? !slate.Path.equals(path, editor.lastInsertedLinkPath) : true;
632
898
  const [isSaveDisabled, setIsSaveDisabled] = React__namespace.useState(false);
633
- const handleOpenEditPopover = (e) => {
634
- e.preventDefault();
635
- setPopoverOpen(true);
636
- setShowRemoveButton(true);
637
- };
638
899
  const onLinkChange = (e) => {
639
900
  setIsSaveDisabled(false);
640
901
  setLinkUrl(e.target.value);
@@ -655,33 +916,33 @@ const LinkContent = React__namespace.forwardRef(
655
916
  editLink(editor, { url: linkUrl, text: linkText });
656
917
  setPopoverOpen(false);
657
918
  editor.lastInsertedLinkPath = null;
919
+ slateReact.ReactEditor.focus(editor);
658
920
  };
659
- const handleDismiss = () => {
660
- setPopoverOpen(false);
921
+ const handleClose = () => {
661
922
  if (link.url === "") {
662
923
  removeLink(editor);
663
924
  }
925
+ setPopoverOpen(false);
664
926
  slateReact.ReactEditor.focus(editor);
665
927
  };
666
- const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
667
- const composedRefs = designSystem.useComposedRefs(linkRef, forwardedRef);
668
928
  React__namespace.useEffect(() => {
669
929
  if (popoverOpen)
670
930
  linkInputRef.current?.focus();
671
931
  }, [popoverOpen]);
672
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
673
- /* @__PURE__ */ jsxRuntime.jsx(
932
+ const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
933
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
934
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
674
935
  StyledBaseLink,
675
936
  {
676
937
  ...attributes,
677
- ref: composedRefs,
938
+ ref: forwardedRef,
678
939
  href: link.url,
679
- onClick: handleOpenEditPopover,
940
+ onClick: () => setPopoverOpen(true),
680
941
  color: "primary600",
681
942
  children
682
943
  }
683
- ),
684
- popoverOpen && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover, { source: linkRef, onDismiss: handleDismiss, padding: 4, contentEditable: false, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "form", onSubmit: handleSave, direction: "column", gap: 4, children: [
944
+ ) }),
945
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { onPointerDownOutside: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, direction: "column", gap: 4, children: [
685
946
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
686
947
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
687
948
  id: "components.Blocks.popover.text",
@@ -727,7 +988,7 @@ const LinkContent = React__namespace.forwardRef(
727
988
  {
728
989
  variant: "danger-light",
729
990
  onClick: () => removeLink(editor),
730
- $visible: showRemoveButton,
991
+ $visible: isLastInsertedLink,
731
992
  children: formatMessage({
732
993
  id: "components.Blocks.popover.remove",
733
994
  defaultMessage: "Remove"
@@ -735,11 +996,11 @@ const LinkContent = React__namespace.forwardRef(
735
996
  }
736
997
  ),
737
998
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
738
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleDismiss, children: formatMessage({
999
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
739
1000
  id: "components.Blocks.popover.cancel",
740
1001
  defaultMessage: "Cancel"
741
1002
  }) }),
742
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { type: "submit", disabled: Boolean(inputNotDirty) || isSaveDisabled, children: formatMessage({
1003
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
743
1004
  id: "components.Blocks.popover.save",
744
1005
  defaultMessage: "Save"
745
1006
  }) })
@@ -1325,6 +1586,26 @@ const ListButton = ({ block, format }) => {
1325
1586
  }
1326
1587
  return false;
1327
1588
  };
1589
+ const isListDisabled = () => {
1590
+ if (disabled) {
1591
+ return true;
1592
+ }
1593
+ if (!editor.selection) {
1594
+ return false;
1595
+ }
1596
+ const anchorNodeEntry = slate.Editor.above(editor, {
1597
+ at: editor.selection.anchor,
1598
+ match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
1599
+ });
1600
+ const focusNodeEntry = slate.Editor.above(editor, {
1601
+ at: editor.selection.focus,
1602
+ match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
1603
+ });
1604
+ if (!anchorNodeEntry || !focusNodeEntry) {
1605
+ return false;
1606
+ }
1607
+ return anchorNodeEntry[0] !== focusNodeEntry[0];
1608
+ };
1328
1609
  const toggleList = (format2) => {
1329
1610
  let currentListEntry;
1330
1611
  if (editor.selection) {
@@ -1358,7 +1639,7 @@ const ListButton = ({ block, format }) => {
1358
1639
  name: format,
1359
1640
  label: block.label,
1360
1641
  isActive: isListActive(),
1361
- disabled,
1642
+ disabled: isListDisabled(),
1362
1643
  handleClick: () => toggleList(format)
1363
1644
  }
1364
1645
  );
@@ -1525,7 +1806,7 @@ const DragIconButton = styledComponents.styled(designSystem.IconButton)`
1525
1806
  }
1526
1807
  svg {
1527
1808
  height: auto;
1528
- width: ${({ theme }) => theme.spaces[3]};
1809
+ min-width: ${({ theme }) => theme.spaces[3]};
1529
1810
 
1530
1811
  path {
1531
1812
  fill: ${({ theme }) => theme.colors.neutral700};
@@ -1642,7 +1923,7 @@ const DragAndDropElement = ({
1642
1923
  disabled,
1643
1924
  draggable: true,
1644
1925
  $dragHandleTopMargin: dragHandleTopMargin,
1645
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "neutral600" })
1926
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "primary500" })
1646
1927
  }
1647
1928
  ),
1648
1929
  children
@@ -1966,7 +2247,7 @@ const EditorLayout$1 = ({
1966
2247
  /* @__PURE__ */ jsxRuntime.jsx(
1967
2248
  CollapseIconButton,
1968
2249
  {
1969
- "aria-label": formatMessage({
2250
+ label: formatMessage({
1970
2251
  id: index.getTranslation("components.Blocks.collapse"),
1971
2252
  defaultMessage: "Collapse"
1972
2253
  }),
@@ -2305,7 +2586,7 @@ const BlocksEditor = React__namespace.forwardRef(
2305
2586
  !isExpandedMode && /* @__PURE__ */ jsxRuntime.jsx(
2306
2587
  ExpandIconButton,
2307
2588
  {
2308
- "aria-label": formatMessage({
2589
+ label: formatMessage({
2309
2590
  id: index.getTranslation("components.Blocks.expand"),
2310
2591
  defaultMessage: "Expand"
2311
2592
  }),
@@ -2371,30 +2652,27 @@ const createDefaultForm = (contentType, components = {}) => {
2371
2652
  const Initializer = ({ disabled, name: name2, onClick }) => {
2372
2653
  const { formatMessage } = reactIntl.useIntl();
2373
2654
  const field = strapiAdmin.useField(name2);
2374
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2375
- /* @__PURE__ */ jsxRuntime.jsx(
2376
- designSystem.Box,
2377
- {
2378
- tag: "button",
2379
- background: "neutral100",
2380
- borderColor: field.error ? "danger600" : "neutral200",
2381
- hasRadius: true,
2382
- disabled,
2383
- onClick,
2384
- paddingTop: 9,
2385
- paddingBottom: 9,
2386
- type: "button",
2387
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2388
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2389
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2390
- id: index.getTranslation("components.empty-repeatable"),
2391
- defaultMessage: "No entry yet. Click on the button below to add one."
2392
- }) }) })
2393
- ] })
2394
- }
2395
- ),
2396
- field.error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", variant: "pi", children: field.error })
2397
- ] });
2655
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
2656
+ designSystem.Box,
2657
+ {
2658
+ tag: "button",
2659
+ background: "neutral100",
2660
+ borderColor: field.error ? "danger600" : "neutral200",
2661
+ hasRadius: true,
2662
+ disabled,
2663
+ onClick,
2664
+ paddingTop: 9,
2665
+ paddingBottom: 9,
2666
+ type: "button",
2667
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2668
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2669
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2670
+ id: index.getTranslation("components.empty-repeatable"),
2671
+ defaultMessage: "No entry yet. Click on the button below to add one."
2672
+ }) }) })
2673
+ ] })
2674
+ }
2675
+ ) });
2398
2676
  };
2399
2677
  const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
2400
2678
  width: 2.4rem;
@@ -2426,9 +2704,20 @@ const NonRepeatableComponent = ({
2426
2704
  hasRadius: isNested,
2427
2705
  borderColor: isNested ? "neutral200" : void 0,
2428
2706
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
2429
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
2707
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2430
2708
  const completeFieldName = `${name2}.${field.name}`;
2431
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2709
+ return /* @__PURE__ */ jsxRuntime.jsx(
2710
+ designSystem.Grid.Item,
2711
+ {
2712
+ col: size,
2713
+ s: 12,
2714
+ xs: 12,
2715
+ direction: "column",
2716
+ alignItems: "stretch",
2717
+ children: children({ ...field, name: completeFieldName })
2718
+ },
2719
+ completeFieldName
2720
+ );
2432
2721
  }) }, index2);
2433
2722
  }) })
2434
2723
  }
@@ -2604,9 +2893,20 @@ const RepeatableComponent = ({
2604
2893
  onGrabItem: handleGrabItem,
2605
2894
  __temp_key__: key,
2606
2895
  children: layout.map((row, index22) => {
2607
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
2896
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2608
2897
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2609
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2898
+ return /* @__PURE__ */ jsxRuntime.jsx(
2899
+ designSystem.Grid.Item,
2900
+ {
2901
+ col: size,
2902
+ s: 12,
2903
+ xs: 12,
2904
+ direction: "column",
2905
+ alignItems: "stretch",
2906
+ children: children({ ...field, name: completeFieldName })
2907
+ },
2908
+ completeFieldName
2909
+ );
2610
2910
  }) }, index22);
2611
2911
  })
2612
2912
  }
@@ -2651,7 +2951,7 @@ const TextButtonCustom = styledComponents.styled(designSystem.TextButton)`
2651
2951
  }
2652
2952
 
2653
2953
  @media (prefers-reduced-motion: no-preference) {
2654
- transition: background-color 120ms ${(props) => props.theme.easings.easeOutQuad};
2954
+ transition: background-color 120ms ${(props) => props.theme.motion.easings.easeOutQuad};
2655
2955
  }
2656
2956
  `;
2657
2957
  const Component = ({
@@ -2701,7 +3001,7 @@ const Component = ({
2701
3001
  /* @__PURE__ */ jsxRuntime.jsx(
2702
3002
  designSystem.IconButton,
2703
3003
  {
2704
- borderWidth: 0,
3004
+ variant: "ghost",
2705
3005
  onClick: onDeleteComponent,
2706
3006
  label: formatMessage({
2707
3007
  id: index.getTranslation("containers.Edit.delete"),
@@ -2714,7 +3014,7 @@ const Component = ({
2714
3014
  designSystem.IconButton,
2715
3015
  {
2716
3016
  ref: composedAccordionRefs,
2717
- borderWidth: 0,
3017
+ variant: "ghost",
2718
3018
  onClick: (e) => e.stopPropagation(),
2719
3019
  "data-handler-id": handlerId,
2720
3020
  label: formatMessage({
@@ -2784,7 +3084,7 @@ const ComponentInput = ({
2784
3084
  id: index.getTranslation("components.reset-entry"),
2785
3085
  defaultMessage: "Reset Entry"
2786
3086
  }),
2787
- borderWidth: 0,
3087
+ variant: "ghost",
2788
3088
  onClick: () => {
2789
3089
  field.onChange(name2, null);
2790
3090
  },
@@ -2813,11 +3113,8 @@ const AddComponentButton = ({
2813
3113
  onClick,
2814
3114
  disabled: isDisabled,
2815
3115
  background: "neutral0",
2816
- paddingTop: 3,
2817
- paddingBottom: 3,
2818
- paddingLeft: 4,
2819
- paddingRight: 4,
2820
3116
  style: { cursor: isDisabled ? "not-allowed" : "pointer" },
3117
+ variant: "tertiary",
2821
3118
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
2822
3119
  /* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
2823
3120
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2846,10 +3143,11 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
2846
3143
  }
2847
3144
  `;
2848
3145
  const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
2849
- const StyledButton = styledComponents.styled(designSystem.BaseButton)`
3146
+ const StyledButton = styledComponents.styled(designSystem.Button)`
2850
3147
  border-radius: 26px;
2851
3148
  border-color: ${({ theme }) => theme.colors.neutral150};
2852
3149
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
3150
+ height: 5rem;
2853
3151
 
2854
3152
  &:hover {
2855
3153
  ${AddComponentTitle} {
@@ -2861,7 +3159,7 @@ const StyledButton = styledComponents.styled(designSystem.BaseButton)`
2861
3159
  fill: ${({ theme }) => theme.colors.primary600};
2862
3160
  }
2863
3161
  > path {
2864
- fill: ${({ theme }) => theme.colors.neutral100};
3162
+ fill: ${({ theme }) => theme.colors.primary600};
2865
3163
  }
2866
3164
  }
2867
3165
  }
@@ -2919,7 +3217,7 @@ const ComponentBox = styledComponents.styled(designSystem.Flex)`
2919
3217
  cursor: pointer;
2920
3218
 
2921
3219
  @media (prefers-reduced-motion: no-preference) {
2922
- transition: color 120ms ${(props) => props.theme.easings.easeOutQuad};
3220
+ transition: color 120ms ${(props) => props.theme.motion.easings.easeOutQuad};
2923
3221
  }
2924
3222
 
2925
3223
  &:focus,
@@ -3038,7 +3336,10 @@ const uidApi = index.contentManagerApi.injectEndpoints({
3038
3336
  config: {
3039
3337
  params
3040
3338
  }
3041
- })
3339
+ }),
3340
+ providesTags: (_res, _error, params) => [
3341
+ { type: "UidAvailability", id: params.contentTypeUID }
3342
+ ]
3042
3343
  })
3043
3344
  })
3044
3345
  });
@@ -3050,8 +3351,10 @@ const UIDInput = React__namespace.forwardRef(
3050
3351
  const allFormValues = strapiAdmin.useForm("InputUID", (form) => form.values);
3051
3352
  const [availability, setAvailability] = React__namespace.useState();
3052
3353
  const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
3354
+ const isCloning = reactRouterDom.useMatch(index.CLONE_PATH) !== null;
3053
3355
  const field = strapiAdmin.useField(name2);
3054
3356
  const debouncedValue = useDebounce(field.value, 300);
3357
+ const hasChanged = debouncedValue !== field.initialValue;
3055
3358
  const { toggleNotification } = strapiAdmin.useNotification();
3056
3359
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
3057
3360
  const { formatMessage } = reactIntl.useIntl();
@@ -3127,8 +3430,9 @@ const UIDInput = React__namespace.forwardRef(
3127
3430
  params
3128
3431
  },
3129
3432
  {
3433
+ // Don't check availability if the value is empty or wasn't changed
3130
3434
  skip: !Boolean(
3131
- debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3435
+ (hasChanged || isCloning) && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3132
3436
  )
3133
3437
  }
3134
3438
  );
@@ -3157,6 +3461,7 @@ const UIDInput = React__namespace.forwardRef(
3157
3461
  const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3158
3462
  const fieldRef = strapiAdmin.useFocusInputField(name2);
3159
3463
  const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
3464
+ const shouldShowAvailability = (hasChanged || isCloning) && debouncedValue != null && availability && !showRegenerate;
3160
3465
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { hint, name: name2, error: field.error, required, children: [
3161
3466
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
3162
3467
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3165,7 +3470,7 @@ const UIDInput = React__namespace.forwardRef(
3165
3470
  ref: composedRefs,
3166
3471
  disabled: props.disabled,
3167
3472
  endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { position: "relative", gap: 1, children: [
3168
- availability && !showRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
3473
+ shouldShowAvailability && /* @__PURE__ */ jsxRuntime.jsxs(
3169
3474
  TextValidation,
3170
3475
  {
3171
3476
  alignItems: "center",
@@ -3999,7 +4304,7 @@ const EditorLayout = ({
3999
4304
  justifyContent: "flex-end",
4000
4305
  shrink: 0,
4001
4306
  width: "100%",
4002
- children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, children: [
4307
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
4003
4308
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4004
4309
  id: "components.Wysiwyg.collapse",
4005
4310
  defaultMessage: "Collapse"
@@ -4017,12 +4322,14 @@ const EditorLayout = ({
4017
4322
  ) }) });
4018
4323
  }
4019
4324
  return /* @__PURE__ */ jsxRuntime.jsx(
4020
- designSystem.Box,
4325
+ designSystem.Flex,
4021
4326
  {
4022
4327
  borderColor: error ? "danger600" : "neutral200",
4023
4328
  borderStyle: "solid",
4024
4329
  borderWidth: "1px",
4025
4330
  hasRadius: true,
4331
+ direction: "column",
4332
+ alignItems: "stretch",
4026
4333
  children
4027
4334
  }
4028
4335
  );
@@ -4033,11 +4340,19 @@ const ExpandWrapper = styledComponents.styled(designSystem.Flex)`
4033
4340
  const BoxWithBorder = styledComponents.styled(designSystem.Box)`
4034
4341
  border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
4035
4342
  `;
4036
- const ExpandButton$1 = styledComponents.styled(designSystem.BaseButton)`
4343
+ const ExpandButton$1 = styledComponents.styled(designSystem.Button)`
4037
4344
  background-color: transparent;
4038
4345
  border: none;
4039
4346
  align-items: center;
4040
4347
 
4348
+ & > span {
4349
+ display: flex;
4350
+ justify-content: space-between;
4351
+ align-items: center;
4352
+ width: 100%;
4353
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4354
+ }
4355
+
4041
4356
  svg {
4042
4357
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4043
4358
 
@@ -4306,8 +4621,6 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4306
4621
  };
4307
4622
  const CustomIconButton = styledComponents.styled(designSystem.IconButton)`
4308
4623
  padding: ${({ theme }) => theme.spaces[2]};
4309
- /* Trick to prevent the outline from overflowing because of the general outline-offset */
4310
- outline-offset: -2px !important;
4311
4624
 
4312
4625
  svg {
4313
4626
  width: 1.8rem;
@@ -4335,11 +4648,19 @@ const MoreButton = styledComponents.styled(designSystem.IconButton)`
4335
4648
  const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
4336
4649
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
4337
4650
  `;
4338
- const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4651
+ const ExpandButton = styledComponents.styled(designSystem.Button)`
4339
4652
  background-color: transparent;
4340
4653
  border: none;
4341
4654
  align-items: center;
4342
4655
 
4656
+ & > span {
4657
+ display: flex;
4658
+ justify-content: space-between;
4659
+ align-items: center;
4660
+ width: 100%;
4661
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4662
+ }
4663
+
4343
4664
  svg {
4344
4665
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4345
4666
  path {
@@ -4351,8 +4672,8 @@ const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4351
4672
  `;
4352
4673
  const WysiwygFooter = ({ onToggleExpand }) => {
4353
4674
  const { formatMessage } = reactIntl.useIntl();
4354
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, children: [
4355
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4675
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, variant: "tertiary", size: "M", children: [
4676
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
4356
4677
  id: "components.WysiwygBottomControls.fullscreen",
4357
4678
  defaultMessage: "Expand"
4358
4679
  }) }),
@@ -4374,7 +4695,7 @@ const WysiwygNav = ({
4374
4695
  id: "components.Wysiwyg.selectOptions.title",
4375
4696
  defaultMessage: "Add a title"
4376
4697
  });
4377
- const buttonMoreRef = React__namespace.useRef(null);
4698
+ React__namespace.useRef(null);
4378
4699
  const handleTogglePopover = () => {
4379
4700
  setVisiblePopover((prev) => !prev);
4380
4701
  };
@@ -4388,14 +4709,23 @@ const WysiwygNav = ({
4388
4709
  borderRadius: `0.4rem 0.4rem 0 0`,
4389
4710
  children: [
4390
4711
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4391
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.SingleSelect, { disabled: true, placeholder: selectPlaceholder, "aria-label": selectPlaceholder, children: [
4392
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4393
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4394
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4395
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4396
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4397
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4398
- ] }) }),
4712
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4713
+ designSystem.SingleSelect,
4714
+ {
4715
+ disabled: true,
4716
+ placeholder: selectPlaceholder,
4717
+ "aria-label": selectPlaceholder,
4718
+ size: "S",
4719
+ children: [
4720
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4721
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4722
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4723
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4724
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4725
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4726
+ ]
4727
+ }
4728
+ ) }),
4399
4729
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4400
4730
  /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4401
4731
  /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
@@ -4426,6 +4756,7 @@ const WysiwygNav = ({
4426
4756
  placeholder: selectPlaceholder,
4427
4757
  "aria-label": selectPlaceholder,
4428
4758
  onChange: (value) => onActionClick(value, editorRef),
4759
+ size: "S",
4429
4760
  children: [
4430
4761
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4431
4762
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
@@ -4465,79 +4796,81 @@ const WysiwygNav = ({
4465
4796
  }
4466
4797
  )
4467
4798
  ] }),
4468
- /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { ref: buttonMoreRef, onClick: handleTogglePopover, label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) }),
4469
- visiblePopover && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover, { onDismiss: handleTogglePopover, centered: true, source: buttonMoreRef, spacing: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4470
- /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4471
- /* @__PURE__ */ jsxRuntime.jsx(
4472
- CustomIconButton,
4473
- {
4474
- onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4475
- label: "Strikethrough",
4476
- name: "Strikethrough",
4477
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.StrikeThrough, {})
4478
- }
4479
- ),
4480
- /* @__PURE__ */ jsxRuntime.jsx(
4481
- CustomIconButton,
4482
- {
4483
- onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4484
- label: "BulletList",
4485
- name: "BulletList",
4486
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.BulletList, {})
4487
- }
4488
- ),
4489
- /* @__PURE__ */ jsxRuntime.jsx(
4490
- CustomIconButton,
4491
- {
4492
- onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4493
- label: "NumberList",
4494
- name: "NumberList",
4495
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.NumberList, {})
4496
- }
4497
- )
4498
- ] }),
4499
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4500
- /* @__PURE__ */ jsxRuntime.jsx(
4501
- CustomIconButton,
4502
- {
4503
- onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4504
- label: "Code",
4505
- name: "Code",
4506
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Code, {})
4507
- }
4508
- ),
4509
- /* @__PURE__ */ jsxRuntime.jsx(
4510
- CustomIconButton,
4511
- {
4512
- onClick: () => {
4513
- handleTogglePopover();
4514
- onToggleMediaLib();
4515
- },
4516
- label: "Image",
4517
- name: "Image",
4518
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Image, {})
4519
- }
4520
- ),
4521
- /* @__PURE__ */ jsxRuntime.jsx(
4522
- CustomLinkIconButton,
4523
- {
4524
- onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4525
- label: "Link",
4526
- name: "Link",
4527
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
4528
- }
4529
- ),
4530
- /* @__PURE__ */ jsxRuntime.jsx(
4531
- CustomIconButton,
4532
- {
4533
- onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4534
- label: "Quote",
4535
- name: "Quote",
4536
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Quotes, {})
4537
- }
4538
- )
4539
- ] })
4540
- ] }) })
4799
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
4800
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) }) }),
4801
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 2, children: [
4802
+ /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4803
+ /* @__PURE__ */ jsxRuntime.jsx(
4804
+ CustomIconButton,
4805
+ {
4806
+ onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4807
+ label: "Strikethrough",
4808
+ name: "Strikethrough",
4809
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.StrikeThrough, {})
4810
+ }
4811
+ ),
4812
+ /* @__PURE__ */ jsxRuntime.jsx(
4813
+ CustomIconButton,
4814
+ {
4815
+ onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4816
+ label: "BulletList",
4817
+ name: "BulletList",
4818
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.BulletList, {})
4819
+ }
4820
+ ),
4821
+ /* @__PURE__ */ jsxRuntime.jsx(
4822
+ CustomIconButton,
4823
+ {
4824
+ onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4825
+ label: "NumberList",
4826
+ name: "NumberList",
4827
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.NumberList, {})
4828
+ }
4829
+ )
4830
+ ] }),
4831
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4832
+ /* @__PURE__ */ jsxRuntime.jsx(
4833
+ CustomIconButton,
4834
+ {
4835
+ onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4836
+ label: "Code",
4837
+ name: "Code",
4838
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Code, {})
4839
+ }
4840
+ ),
4841
+ /* @__PURE__ */ jsxRuntime.jsx(
4842
+ CustomIconButton,
4843
+ {
4844
+ onClick: () => {
4845
+ handleTogglePopover();
4846
+ onToggleMediaLib();
4847
+ },
4848
+ label: "Image",
4849
+ name: "Image",
4850
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Image, {})
4851
+ }
4852
+ ),
4853
+ /* @__PURE__ */ jsxRuntime.jsx(
4854
+ CustomLinkIconButton,
4855
+ {
4856
+ onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4857
+ label: "Link",
4858
+ name: "Link",
4859
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
4860
+ }
4861
+ ),
4862
+ /* @__PURE__ */ jsxRuntime.jsx(
4863
+ CustomIconButton,
4864
+ {
4865
+ onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4866
+ label: "Quote",
4867
+ name: "Quote",
4868
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Quotes, {})
4869
+ }
4870
+ )
4871
+ ] })
4872
+ ] }) })
4873
+ ] })
4541
4874
  ] }),
4542
4875
  onTogglePreviewMode && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onTogglePreviewMode, variant: "tertiary", children: formatMessage({
4543
4876
  id: "components.Wysiwyg.ToggleMode.preview-mode",
@@ -4763,7 +5096,9 @@ const useFieldHint = (hint = void 0, attribute) => {
4763
5096
  if (!maximum && !minimum) {
4764
5097
  return hint;
4765
5098
  }
4766
- const units = !["biginteger", "integer", "number"].includes(attribute.type) ? formatMessage(
5099
+ const units = !["biginteger", "integer", "number", "dynamiczone", "component"].includes(
5100
+ attribute.type
5101
+ ) ? formatMessage(
4767
5102
  {
4768
5103
  id: "content-manager.form.Input.hint.character.unit",
4769
5104
  defaultMessage: "{maxValue, plural, one { character} other { characters}}"
@@ -4857,7 +5192,7 @@ const DynamicComponent = ({
4857
5192
  /* @__PURE__ */ jsxRuntime.jsx(
4858
5193
  designSystem.IconButton,
4859
5194
  {
4860
- borderWidth: 0,
5195
+ variant: "ghost",
4861
5196
  label: formatMessage(
4862
5197
  {
4863
5198
  id: index.getTranslation("components.DynamicZone.delete-label"),
@@ -4872,7 +5207,7 @@ const DynamicComponent = ({
4872
5207
  /* @__PURE__ */ jsxRuntime.jsx(
4873
5208
  designSystem.IconButton,
4874
5209
  {
4875
- borderWidth: 0,
5210
+ variant: "ghost",
4876
5211
  onClick: (e) => e.stopPropagation(),
4877
5212
  "data-handler-id": handlerId,
4878
5213
  ref: dragRef,
@@ -4931,9 +5266,20 @@ const DynamicComponent = ({
4931
5266
  ),
4932
5267
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Actions, { children: accordionActions })
4933
5268
  ] }),
4934
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
5269
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
4935
5270
  const fieldName = `${name2}.${index$1}.${field.name}`;
4936
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName }) }, fieldName);
5271
+ return /* @__PURE__ */ jsxRuntime.jsx(
5272
+ designSystem.Grid.Item,
5273
+ {
5274
+ col: size,
5275
+ s: 12,
5276
+ xs: 12,
5277
+ direction: "column",
5278
+ alignItems: "stretch",
5279
+ children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5280
+ },
5281
+ fieldName
5282
+ );
4937
5283
  }) }, rowInd)) }) }) })
4938
5284
  ] }) }) })
4939
5285
  ] });
@@ -5126,7 +5472,7 @@ const DynamicZone = ({
5126
5472
  const handleRemoveComponent = (name22, currentIndex) => () => {
5127
5473
  removeFieldRow(name22, currentIndex);
5128
5474
  };
5129
- const hasError = error !== void 0 || dynamicDisplayedComponentsLength < min || dynamicDisplayedComponentsLength > max;
5475
+ const hasError = error !== void 0;
5130
5476
  const renderButtonLabel = () => {
5131
5477
  if (addComponentIsOpen) {
5132
5478
  return formatMessage({ id: "app.utils.close-label", defaultMessage: "Close" });
@@ -5240,4 +5586,4 @@ exports.transformDocument = transformDocument;
5240
5586
  exports.useDynamicZone = useDynamicZone;
5241
5587
  exports.useFieldHint = useFieldHint;
5242
5588
  exports.useLazyComponents = useLazyComponents;
5243
- //# sourceMappingURL=Field-C5Z1Ivdv.js.map
5589
+ //# sourceMappingURL=Field-dq8Tg1M_.js.map