@strapi/content-manager 0.0.0-experimental.d954d57341a6623992a0d211daaec8e245c3517d → 0.0.0-experimental.da85533897155e719d784f0271223c866d2f69ab

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 (117) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-gdUj_t-O.mjs → ComponentConfigurationPage-9lRmRdIr.mjs} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-gdUj_t-O.mjs.map → ComponentConfigurationPage-9lRmRdIr.mjs.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-WRPUXGd6.js → ComponentConfigurationPage-DyDkPajU.js} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-WRPUXGd6.js.map → ComponentConfigurationPage-DyDkPajU.js.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-BwuIPOJG.mjs → EditConfigurationPage-Bk893vVY.mjs} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-BwuIPOJG.mjs.map → EditConfigurationPage-Bk893vVY.mjs.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-C1vjMBgy.js → EditConfigurationPage-DValmA0m.js} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-C1vjMBgy.js.map → EditConfigurationPage-DValmA0m.js.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-0MiFkXa8.mjs → EditViewPage-DiNFdFqP.mjs} +19 -8
  11. package/dist/_chunks/EditViewPage-DiNFdFqP.mjs.map +1 -0
  12. package/dist/_chunks/{EditViewPage-DbcGfyqK.js → EditViewPage-Dk7Eaft4.js} +19 -8
  13. package/dist/_chunks/EditViewPage-Dk7Eaft4.js.map +1 -0
  14. package/dist/_chunks/{Field-BG1xu38N.js → Field-DH2OaqUP.js} +458 -128
  15. package/dist/_chunks/Field-DH2OaqUP.js.map +1 -0
  16. package/dist/_chunks/{Field-BDMSCcy5.mjs → Field-Dv_HTFTa.mjs} +460 -130
  17. package/dist/_chunks/Field-Dv_HTFTa.mjs.map +1 -0
  18. package/dist/_chunks/{Form-9BnFyUjy.js → Form-B_dUDizM.js} +26 -12
  19. package/dist/_chunks/Form-B_dUDizM.js.map +1 -0
  20. package/dist/_chunks/{Form-CPVWavB8.mjs → Form-Dy6P4HgH.mjs} +26 -12
  21. package/dist/_chunks/Form-Dy6P4HgH.mjs.map +1 -0
  22. package/dist/_chunks/{History-BWWxLt2Z.js → History-BT4w83Oa.js} +44 -19
  23. package/dist/_chunks/History-BT4w83Oa.js.map +1 -0
  24. package/dist/_chunks/{History-BVpd8LP3.mjs → History-DrwsD1Vc.mjs} +44 -19
  25. package/dist/_chunks/History-DrwsD1Vc.mjs.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-DozVMKcR.mjs → ListConfigurationPage-BxIP0jRy.mjs} +20 -8
  27. package/dist/_chunks/ListConfigurationPage-BxIP0jRy.mjs.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-6swzjdAZ.js → ListConfigurationPage-CuYrMcW3.js} +20 -8
  29. package/dist/_chunks/ListConfigurationPage-CuYrMcW3.js.map +1 -0
  30. package/dist/_chunks/{ListViewPage-Ds0ulgfG.mjs → ListViewPage-5a1vw-OK.mjs} +40 -34
  31. package/dist/_chunks/ListViewPage-5a1vw-OK.mjs.map +1 -0
  32. package/dist/_chunks/{ListViewPage-BlzfjS2Q.js → ListViewPage-BvpwNur7.js} +38 -32
  33. package/dist/_chunks/ListViewPage-BvpwNur7.js.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-BH11kaKt.mjs → NoContentTypePage-Bm6tRcd3.mjs} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-BH11kaKt.mjs.map → NoContentTypePage-Bm6tRcd3.mjs.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-D2nCCWEl.js → NoContentTypePage-UqEiWKkM.js} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-D2nCCWEl.js.map → NoContentTypePage-UqEiWKkM.js.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-BT2Tn0D_.mjs → NoPermissionsPage-BHPqn_tQ.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-BT2Tn0D_.mjs.map → NoPermissionsPage-BHPqn_tQ.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-DN_JlsU2.js → NoPermissionsPage-C_vGRo8Q.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-DN_JlsU2.js.map → NoPermissionsPage-C_vGRo8Q.js.map} +1 -1
  42. package/dist/_chunks/{Relations-Dnag3fhV.mjs → Relations-C7fPyh5P.mjs} +4 -4
  43. package/dist/_chunks/Relations-C7fPyh5P.mjs.map +1 -0
  44. package/dist/_chunks/{Relations-CcgFTcWo.js → Relations-CznVF6LS.js} +4 -4
  45. package/dist/_chunks/Relations-CznVF6LS.js.map +1 -0
  46. package/dist/_chunks/{en-Ux26r5pl.mjs → en-CbaIuYoB.mjs} +6 -5
  47. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-CbaIuYoB.mjs.map} +1 -1
  48. package/dist/_chunks/{en-fbKQxLGn.js → en-otD_UBJi.js} +6 -5
  49. package/dist/_chunks/{en-fbKQxLGn.js.map → en-otD_UBJi.js.map} +1 -1
  50. package/dist/_chunks/{index-JNNNKUHs.mjs → index-BJ6uTqLL.mjs} +395 -179
  51. package/dist/_chunks/index-BJ6uTqLL.mjs.map +1 -0
  52. package/dist/_chunks/{index-CWpLBSt0.js → index-D9UmmBcM.js} +388 -172
  53. package/dist/_chunks/index-D9UmmBcM.js.map +1 -0
  54. package/dist/_chunks/{layout--iHdZzRk.js → layout-kfu5Wtix.js} +23 -11
  55. package/dist/_chunks/layout-kfu5Wtix.js.map +1 -0
  56. package/dist/_chunks/{layout-DC503LnF.mjs → layout-uomiIGbG.mjs} +25 -13
  57. package/dist/_chunks/layout-uomiIGbG.mjs.map +1 -0
  58. package/dist/_chunks/{relations-BbHizA5K.js → relations-DKENrxko.js} +2 -2
  59. package/dist/_chunks/{relations-BbHizA5K.js.map → relations-DKENrxko.js.map} +1 -1
  60. package/dist/_chunks/{relations-CTje5t-a.mjs → relations-DiDufGSA.mjs} +2 -2
  61. package/dist/_chunks/{relations-CTje5t-a.mjs.map → relations-DiDufGSA.mjs.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 +1 -0
  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 +4 -48
  73. package/dist/admin/src/services/api.d.ts +1 -1
  74. package/dist/admin/src/services/components.d.ts +2 -2
  75. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  76. package/dist/admin/src/services/documents.d.ts +16 -16
  77. package/dist/admin/src/services/init.d.ts +1 -1
  78. package/dist/admin/src/services/relations.d.ts +2 -2
  79. package/dist/admin/src/services/uid.d.ts +3 -3
  80. package/dist/admin/src/utils/validation.d.ts +4 -1
  81. package/dist/server/index.js +178 -109
  82. package/dist/server/index.js.map +1 -1
  83. package/dist/server/index.mjs +179 -110
  84. package/dist/server/index.mjs.map +1 -1
  85. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  86. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  87. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  88. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  89. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  90. package/dist/server/src/history/services/history.d.ts.map +1 -1
  91. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  92. package/dist/server/src/history/services/utils.d.ts +2 -1
  93. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  94. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  95. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  96. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  97. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  98. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  99. package/package.json +8 -8
  100. package/dist/_chunks/EditViewPage-0MiFkXa8.mjs.map +0 -1
  101. package/dist/_chunks/EditViewPage-DbcGfyqK.js.map +0 -1
  102. package/dist/_chunks/Field-BDMSCcy5.mjs.map +0 -1
  103. package/dist/_chunks/Field-BG1xu38N.js.map +0 -1
  104. package/dist/_chunks/Form-9BnFyUjy.js.map +0 -1
  105. package/dist/_chunks/Form-CPVWavB8.mjs.map +0 -1
  106. package/dist/_chunks/History-BVpd8LP3.mjs.map +0 -1
  107. package/dist/_chunks/History-BWWxLt2Z.js.map +0 -1
  108. package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js.map +0 -1
  109. package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs.map +0 -1
  110. package/dist/_chunks/ListViewPage-BlzfjS2Q.js.map +0 -1
  111. package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs.map +0 -1
  112. package/dist/_chunks/Relations-CcgFTcWo.js.map +0 -1
  113. package/dist/_chunks/Relations-Dnag3fhV.mjs.map +0 -1
  114. package/dist/_chunks/index-CWpLBSt0.js.map +0 -1
  115. package/dist/_chunks/index-JNNNKUHs.mjs.map +0 -1
  116. package/dist/_chunks/layout--iHdZzRk.js.map +0 -1
  117. package/dist/_chunks/layout-DC503LnF.mjs.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-CWpLBSt0.js");
8
+ const index = require("./index-D9UmmBcM.js");
9
9
  const fractionalIndexing = require("fractional-indexing");
10
- const Relations = require("./Relations-CcgFTcWo.js");
10
+ const Relations = require("./Relations-CznVF6LS.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);
@@ -627,20 +894,8 @@ const LinkContent = React__namespace.forwardRef(
627
894
  const [linkText, setLinkText] = React__namespace.useState(elementText);
628
895
  const [linkUrl, setLinkUrl] = React__namespace.useState(link.url);
629
896
  const linkInputRef = React__namespace.useRef(null);
630
- const [showRemoveButton, setShowRemoveButton] = React__namespace.useState(false);
897
+ const isLastInsertedLink = editor.lastInsertedLinkPath ? !slate.Path.equals(path, editor.lastInsertedLinkPath) : true;
631
898
  const [isSaveDisabled, setIsSaveDisabled] = React__namespace.useState(false);
632
- const handleOpenChange = (isOpen) => {
633
- if (isOpen) {
634
- setPopoverOpen(isOpen);
635
- setShowRemoveButton(isOpen);
636
- } else {
637
- setPopoverOpen(isOpen);
638
- if (link.url === "") {
639
- removeLink(editor);
640
- }
641
- slateReact.ReactEditor.focus(editor);
642
- }
643
- };
644
899
  const onLinkChange = (e) => {
645
900
  setIsSaveDisabled(false);
646
901
  setLinkUrl(e.target.value);
@@ -661,15 +916,33 @@ const LinkContent = React__namespace.forwardRef(
661
916
  editLink(editor, { url: linkUrl, text: linkText });
662
917
  setPopoverOpen(false);
663
918
  editor.lastInsertedLinkPath = null;
919
+ slateReact.ReactEditor.focus(editor);
920
+ };
921
+ const handleClose = () => {
922
+ if (link.url === "") {
923
+ removeLink(editor);
924
+ }
925
+ setPopoverOpen(false);
926
+ slateReact.ReactEditor.focus(editor);
664
927
  };
665
928
  React__namespace.useEffect(() => {
666
929
  if (popoverOpen)
667
930
  linkInputRef.current?.focus();
668
931
  }, [popoverOpen]);
669
932
  const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
670
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { onOpenChange: handleOpenChange, open: popoverOpen, children: [
671
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledBaseLink, { ...attributes, ref: forwardedRef, href: link.url, color: "primary600", children }) }),
672
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, tag: "form", onSubmit: handleSave, direction: "column", gap: 4, children: [
933
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
934
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
935
+ StyledBaseLink,
936
+ {
937
+ ...attributes,
938
+ ref: forwardedRef,
939
+ href: link.url,
940
+ onClick: () => setPopoverOpen(true),
941
+ color: "primary600",
942
+ children
943
+ }
944
+ ) }),
945
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { onPointerDownOutside: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, direction: "column", gap: 4, children: [
673
946
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
674
947
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
675
948
  id: "components.Blocks.popover.text",
@@ -715,7 +988,7 @@ const LinkContent = React__namespace.forwardRef(
715
988
  {
716
989
  variant: "danger-light",
717
990
  onClick: () => removeLink(editor),
718
- $visible: showRemoveButton,
991
+ $visible: isLastInsertedLink,
719
992
  children: formatMessage({
720
993
  id: "components.Blocks.popover.remove",
721
994
  defaultMessage: "Remove"
@@ -723,11 +996,11 @@ const LinkContent = React__namespace.forwardRef(
723
996
  }
724
997
  ),
725
998
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
726
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: () => handleOpenChange(false), children: formatMessage({
999
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
727
1000
  id: "components.Blocks.popover.cancel",
728
1001
  defaultMessage: "Cancel"
729
1002
  }) }),
730
- /* @__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({
731
1004
  id: "components.Blocks.popover.save",
732
1005
  defaultMessage: "Save"
733
1006
  }) })
@@ -1168,7 +1441,7 @@ const ToolbarButton = ({
1168
1441
  width: 7,
1169
1442
  height: 7,
1170
1443
  hasRadius: true,
1171
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { width: "1.2rem", height: "1.2rem", fill: disabled ? "neutral300" : enabledColor })
1444
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { fill: disabled ? "neutral300" : enabledColor })
1172
1445
  }
1173
1446
  )
1174
1447
  }
@@ -1313,6 +1586,26 @@ const ListButton = ({ block, format }) => {
1313
1586
  }
1314
1587
  return false;
1315
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
+ };
1316
1609
  const toggleList = (format2) => {
1317
1610
  let currentListEntry;
1318
1611
  if (editor.selection) {
@@ -1346,7 +1639,7 @@ const ListButton = ({ block, format }) => {
1346
1639
  name: format,
1347
1640
  label: block.label,
1348
1641
  isActive: isListActive(),
1349
- disabled,
1642
+ disabled: isListDisabled(),
1350
1643
  handleClick: () => toggleList(format)
1351
1644
  }
1352
1645
  );
@@ -1513,7 +1806,7 @@ const DragIconButton = styledComponents.styled(designSystem.IconButton)`
1513
1806
  }
1514
1807
  svg {
1515
1808
  height: auto;
1516
- width: ${({ theme }) => theme.spaces[3]};
1809
+ min-width: ${({ theme }) => theme.spaces[3]};
1517
1810
 
1518
1811
  path {
1519
1812
  fill: ${({ theme }) => theme.colors.neutral700};
@@ -1630,7 +1923,7 @@ const DragAndDropElement = ({
1630
1923
  disabled,
1631
1924
  draggable: true,
1632
1925
  $dragHandleTopMargin: dragHandleTopMargin,
1633
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "neutral600" })
1926
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "primary500" })
1634
1927
  }
1635
1928
  ),
1636
1929
  children
@@ -1954,7 +2247,7 @@ const EditorLayout$1 = ({
1954
2247
  /* @__PURE__ */ jsxRuntime.jsx(
1955
2248
  CollapseIconButton,
1956
2249
  {
1957
- "aria-label": formatMessage({
2250
+ label: formatMessage({
1958
2251
  id: index.getTranslation("components.Blocks.collapse"),
1959
2252
  defaultMessage: "Collapse"
1960
2253
  }),
@@ -2293,7 +2586,7 @@ const BlocksEditor = React__namespace.forwardRef(
2293
2586
  !isExpandedMode && /* @__PURE__ */ jsxRuntime.jsx(
2294
2587
  ExpandIconButton,
2295
2588
  {
2296
- "aria-label": formatMessage({
2589
+ label: formatMessage({
2297
2590
  id: index.getTranslation("components.Blocks.expand"),
2298
2591
  defaultMessage: "Expand"
2299
2592
  }),
@@ -2359,30 +2652,27 @@ const createDefaultForm = (contentType, components = {}) => {
2359
2652
  const Initializer = ({ disabled, name: name2, onClick }) => {
2360
2653
  const { formatMessage } = reactIntl.useIntl();
2361
2654
  const field = strapiAdmin.useField(name2);
2362
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2363
- /* @__PURE__ */ jsxRuntime.jsx(
2364
- designSystem.Box,
2365
- {
2366
- tag: "button",
2367
- background: "neutral100",
2368
- borderColor: field.error ? "danger600" : "neutral200",
2369
- hasRadius: true,
2370
- disabled,
2371
- onClick,
2372
- paddingTop: 9,
2373
- paddingBottom: 9,
2374
- type: "button",
2375
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2376
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2377
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2378
- id: index.getTranslation("components.empty-repeatable"),
2379
- defaultMessage: "No entry yet. Click on the button below to add one."
2380
- }) }) })
2381
- ] })
2382
- }
2383
- ),
2384
- field.error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", variant: "pi", children: field.error })
2385
- ] });
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
+ ) });
2386
2676
  };
2387
2677
  const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
2388
2678
  width: 2.4rem;
@@ -2416,7 +2706,18 @@ const NonRepeatableComponent = ({
2416
2706
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
2417
2707
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2418
2708
  const completeFieldName = `${name2}.${field.name}`;
2419
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { 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
+ );
2420
2721
  }) }, index2);
2421
2722
  }) })
2422
2723
  }
@@ -2594,7 +2895,18 @@ const RepeatableComponent = ({
2594
2895
  children: layout.map((row, index22) => {
2595
2896
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2596
2897
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2597
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { 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
+ );
2598
2910
  }) }, index22);
2599
2911
  })
2600
2912
  }
@@ -2689,7 +3001,7 @@ const Component = ({
2689
3001
  /* @__PURE__ */ jsxRuntime.jsx(
2690
3002
  designSystem.IconButton,
2691
3003
  {
2692
- borderWidth: 0,
3004
+ variant: "ghost",
2693
3005
  onClick: onDeleteComponent,
2694
3006
  label: formatMessage({
2695
3007
  id: index.getTranslation("containers.Edit.delete"),
@@ -2702,7 +3014,7 @@ const Component = ({
2702
3014
  designSystem.IconButton,
2703
3015
  {
2704
3016
  ref: composedAccordionRefs,
2705
- borderWidth: 0,
3017
+ variant: "ghost",
2706
3018
  onClick: (e) => e.stopPropagation(),
2707
3019
  "data-handler-id": handlerId,
2708
3020
  label: formatMessage({
@@ -2772,7 +3084,7 @@ const ComponentInput = ({
2772
3084
  id: index.getTranslation("components.reset-entry"),
2773
3085
  defaultMessage: "Reset Entry"
2774
3086
  }),
2775
- borderWidth: 0,
3087
+ variant: "ghost",
2776
3088
  onClick: () => {
2777
3089
  field.onChange(name2, null);
2778
3090
  },
@@ -2801,11 +3113,8 @@ const AddComponentButton = ({
2801
3113
  onClick,
2802
3114
  disabled: isDisabled,
2803
3115
  background: "neutral0",
2804
- paddingTop: 3,
2805
- paddingBottom: 3,
2806
- paddingLeft: 4,
2807
- paddingRight: 4,
2808
3116
  style: { cursor: isDisabled ? "not-allowed" : "pointer" },
3117
+ variant: "tertiary",
2809
3118
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
2810
3119
  /* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
2811
3120
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2834,10 +3143,11 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
2834
3143
  }
2835
3144
  `;
2836
3145
  const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
2837
- const StyledButton = styledComponents.styled(designSystem.BaseButton)`
3146
+ const StyledButton = styledComponents.styled(designSystem.Button)`
2838
3147
  border-radius: 26px;
2839
3148
  border-color: ${({ theme }) => theme.colors.neutral150};
2840
3149
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
3150
+ height: 5rem;
2841
3151
 
2842
3152
  &:hover {
2843
3153
  ${AddComponentTitle} {
@@ -2849,7 +3159,7 @@ const StyledButton = styledComponents.styled(designSystem.BaseButton)`
2849
3159
  fill: ${({ theme }) => theme.colors.primary600};
2850
3160
  }
2851
3161
  > path {
2852
- fill: ${({ theme }) => theme.colors.neutral100};
3162
+ fill: ${({ theme }) => theme.colors.primary600};
2853
3163
  }
2854
3164
  }
2855
3165
  }
@@ -3026,7 +3336,10 @@ const uidApi = index.contentManagerApi.injectEndpoints({
3026
3336
  config: {
3027
3337
  params
3028
3338
  }
3029
- })
3339
+ }),
3340
+ providesTags: (_res, _error, params) => [
3341
+ { type: "UidAvailability", id: params.contentTypeUID }
3342
+ ]
3030
3343
  })
3031
3344
  })
3032
3345
  });
@@ -3038,8 +3351,10 @@ const UIDInput = React__namespace.forwardRef(
3038
3351
  const allFormValues = strapiAdmin.useForm("InputUID", (form) => form.values);
3039
3352
  const [availability, setAvailability] = React__namespace.useState();
3040
3353
  const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
3354
+ const isCloning = reactRouterDom.useMatch(index.CLONE_PATH) !== null;
3041
3355
  const field = strapiAdmin.useField(name2);
3042
3356
  const debouncedValue = useDebounce(field.value, 300);
3357
+ const hasChanged = debouncedValue !== field.initialValue;
3043
3358
  const { toggleNotification } = strapiAdmin.useNotification();
3044
3359
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
3045
3360
  const { formatMessage } = reactIntl.useIntl();
@@ -3115,8 +3430,9 @@ const UIDInput = React__namespace.forwardRef(
3115
3430
  params
3116
3431
  },
3117
3432
  {
3433
+ // Don't check availability if the value is empty or wasn't changed
3118
3434
  skip: !Boolean(
3119
- debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3435
+ (hasChanged || isCloning) && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3120
3436
  )
3121
3437
  }
3122
3438
  );
@@ -3145,6 +3461,7 @@ const UIDInput = React__namespace.forwardRef(
3145
3461
  const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3146
3462
  const fieldRef = strapiAdmin.useFocusInputField(name2);
3147
3463
  const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
3464
+ const shouldShowAvailability = (hasChanged || isCloning) && debouncedValue != null && availability && !showRegenerate;
3148
3465
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { hint, name: name2, error: field.error, required, children: [
3149
3466
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
3150
3467
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3153,7 +3470,7 @@ const UIDInput = React__namespace.forwardRef(
3153
3470
  ref: composedRefs,
3154
3471
  disabled: props.disabled,
3155
3472
  endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { position: "relative", gap: 1, children: [
3156
- availability && !showRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
3473
+ shouldShowAvailability && /* @__PURE__ */ jsxRuntime.jsxs(
3157
3474
  TextValidation,
3158
3475
  {
3159
3476
  alignItems: "center",
@@ -3987,7 +4304,7 @@ const EditorLayout = ({
3987
4304
  justifyContent: "flex-end",
3988
4305
  shrink: 0,
3989
4306
  width: "100%",
3990
- children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, children: [
4307
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
3991
4308
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
3992
4309
  id: "components.Wysiwyg.collapse",
3993
4310
  defaultMessage: "Collapse"
@@ -4005,12 +4322,14 @@ const EditorLayout = ({
4005
4322
  ) }) });
4006
4323
  }
4007
4324
  return /* @__PURE__ */ jsxRuntime.jsx(
4008
- designSystem.Box,
4325
+ designSystem.Flex,
4009
4326
  {
4010
4327
  borderColor: error ? "danger600" : "neutral200",
4011
4328
  borderStyle: "solid",
4012
4329
  borderWidth: "1px",
4013
4330
  hasRadius: true,
4331
+ direction: "column",
4332
+ alignItems: "stretch",
4014
4333
  children
4015
4334
  }
4016
4335
  );
@@ -4021,11 +4340,19 @@ const ExpandWrapper = styledComponents.styled(designSystem.Flex)`
4021
4340
  const BoxWithBorder = styledComponents.styled(designSystem.Box)`
4022
4341
  border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
4023
4342
  `;
4024
- const ExpandButton$1 = styledComponents.styled(designSystem.BaseButton)`
4343
+ const ExpandButton$1 = styledComponents.styled(designSystem.Button)`
4025
4344
  background-color: transparent;
4026
4345
  border: none;
4027
4346
  align-items: center;
4028
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
+
4029
4356
  svg {
4030
4357
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4031
4358
 
@@ -4292,40 +4619,28 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4292
4619
  insertWithoutTextToEdit(editor, markdownType, line, contentLength);
4293
4620
  }
4294
4621
  };
4295
- const CustomIconButton = styledComponents.styled(designSystem.IconButton)`
4296
- padding: ${({ theme }) => theme.spaces[2]};
4297
-
4298
- svg {
4299
- width: 1.8rem;
4300
- height: 1.8rem;
4301
- }
4302
- `;
4303
- const CustomLinkIconButton = styledComponents.styled(CustomIconButton)`
4304
- svg {
4305
- width: 0.8rem;
4306
- height: 0.8rem;
4307
- }
4308
- `;
4309
4622
  const MainButtons = styledComponents.styled(designSystem.IconButtonGroup)`
4310
4623
  margin-left: ${({ theme }) => theme.spaces[4]};
4311
4624
  `;
4312
4625
  const MoreButton = styledComponents.styled(designSystem.IconButton)`
4313
4626
  margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
4314
- padding: ${({ theme }) => theme.spaces[2]};
4315
-
4316
- svg {
4317
- width: 1.8rem;
4318
- height: 1.8rem;
4319
- }
4320
4627
  `;
4321
4628
  const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
4322
4629
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
4323
4630
  `;
4324
- const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4631
+ const ExpandButton = styledComponents.styled(designSystem.Button)`
4325
4632
  background-color: transparent;
4326
4633
  border: none;
4327
4634
  align-items: center;
4328
4635
 
4636
+ & > span {
4637
+ display: flex;
4638
+ justify-content: space-between;
4639
+ align-items: center;
4640
+ width: 100%;
4641
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4642
+ }
4643
+
4329
4644
  svg {
4330
4645
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4331
4646
  path {
@@ -4337,8 +4652,8 @@ const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4337
4652
  `;
4338
4653
  const WysiwygFooter = ({ onToggleExpand }) => {
4339
4654
  const { formatMessage } = reactIntl.useIntl();
4340
- 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: [
4341
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4655
+ 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: [
4656
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
4342
4657
  id: "components.WysiwygBottomControls.fullscreen",
4343
4658
  defaultMessage: "Expand"
4344
4659
  }) }),
@@ -4374,18 +4689,27 @@ const WysiwygNav = ({
4374
4689
  borderRadius: `0.4rem 0.4rem 0 0`,
4375
4690
  children: [
4376
4691
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4377
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.SingleSelect, { disabled: true, placeholder: selectPlaceholder, "aria-label": selectPlaceholder, children: [
4378
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4379
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4380
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4381
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4382
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4383
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4384
- ] }) }),
4692
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4693
+ designSystem.SingleSelect,
4694
+ {
4695
+ disabled: true,
4696
+ placeholder: selectPlaceholder,
4697
+ "aria-label": selectPlaceholder,
4698
+ size: "S",
4699
+ children: [
4700
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4701
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4702
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4703
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4704
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4705
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4706
+ ]
4707
+ }
4708
+ ) }),
4385
4709
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4386
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4387
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4388
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4710
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4711
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4712
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4389
4713
  ] }),
4390
4714
  /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) })
4391
4715
  ] }),
@@ -4412,6 +4736,7 @@ const WysiwygNav = ({
4412
4736
  placeholder: selectPlaceholder,
4413
4737
  "aria-label": selectPlaceholder,
4414
4738
  onChange: (value) => onActionClick(value, editorRef),
4739
+ size: "S",
4415
4740
  children: [
4416
4741
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4417
4742
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
@@ -4423,17 +4748,9 @@ const WysiwygNav = ({
4423
4748
  }
4424
4749
  ) }),
4425
4750
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4751
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { onClick: () => onActionClick("Bold", editorRef), label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4426
4752
  /* @__PURE__ */ jsxRuntime.jsx(
4427
- CustomIconButton,
4428
- {
4429
- onClick: () => onActionClick("Bold", editorRef),
4430
- label: "Bold",
4431
- name: "Bold",
4432
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {})
4433
- }
4434
- ),
4435
- /* @__PURE__ */ jsxRuntime.jsx(
4436
- CustomIconButton,
4753
+ designSystem.IconButton,
4437
4754
  {
4438
4755
  onClick: () => onActionClick("Italic", editorRef),
4439
4756
  label: "Italic",
@@ -4442,7 +4759,7 @@ const WysiwygNav = ({
4442
4759
  }
4443
4760
  ),
4444
4761
  /* @__PURE__ */ jsxRuntime.jsx(
4445
- CustomIconButton,
4762
+ designSystem.IconButton,
4446
4763
  {
4447
4764
  onClick: () => onActionClick("Underline", editorRef),
4448
4765
  label: "Underline",
@@ -4456,7 +4773,7 @@ const WysiwygNav = ({
4456
4773
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 2, children: [
4457
4774
  /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4458
4775
  /* @__PURE__ */ jsxRuntime.jsx(
4459
- CustomIconButton,
4776
+ designSystem.IconButton,
4460
4777
  {
4461
4778
  onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4462
4779
  label: "Strikethrough",
@@ -4465,7 +4782,7 @@ const WysiwygNav = ({
4465
4782
  }
4466
4783
  ),
4467
4784
  /* @__PURE__ */ jsxRuntime.jsx(
4468
- CustomIconButton,
4785
+ designSystem.IconButton,
4469
4786
  {
4470
4787
  onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4471
4788
  label: "BulletList",
@@ -4474,7 +4791,7 @@ const WysiwygNav = ({
4474
4791
  }
4475
4792
  ),
4476
4793
  /* @__PURE__ */ jsxRuntime.jsx(
4477
- CustomIconButton,
4794
+ designSystem.IconButton,
4478
4795
  {
4479
4796
  onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4480
4797
  label: "NumberList",
@@ -4485,7 +4802,7 @@ const WysiwygNav = ({
4485
4802
  ] }),
4486
4803
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4487
4804
  /* @__PURE__ */ jsxRuntime.jsx(
4488
- CustomIconButton,
4805
+ designSystem.IconButton,
4489
4806
  {
4490
4807
  onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4491
4808
  label: "Code",
@@ -4494,7 +4811,7 @@ const WysiwygNav = ({
4494
4811
  }
4495
4812
  ),
4496
4813
  /* @__PURE__ */ jsxRuntime.jsx(
4497
- CustomIconButton,
4814
+ designSystem.IconButton,
4498
4815
  {
4499
4816
  onClick: () => {
4500
4817
  handleTogglePopover();
@@ -4506,7 +4823,7 @@ const WysiwygNav = ({
4506
4823
  }
4507
4824
  ),
4508
4825
  /* @__PURE__ */ jsxRuntime.jsx(
4509
- CustomLinkIconButton,
4826
+ designSystem.IconButton,
4510
4827
  {
4511
4828
  onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4512
4829
  label: "Link",
@@ -4515,7 +4832,7 @@ const WysiwygNav = ({
4515
4832
  }
4516
4833
  ),
4517
4834
  /* @__PURE__ */ jsxRuntime.jsx(
4518
- CustomIconButton,
4835
+ designSystem.IconButton,
4519
4836
  {
4520
4837
  onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4521
4838
  label: "Quote",
@@ -4751,7 +5068,9 @@ const useFieldHint = (hint = void 0, attribute) => {
4751
5068
  if (!maximum && !minimum) {
4752
5069
  return hint;
4753
5070
  }
4754
- const units = !["biginteger", "integer", "number"].includes(attribute.type) ? formatMessage(
5071
+ const units = !["biginteger", "integer", "number", "dynamiczone", "component"].includes(
5072
+ attribute.type
5073
+ ) ? formatMessage(
4755
5074
  {
4756
5075
  id: "content-manager.form.Input.hint.character.unit",
4757
5076
  defaultMessage: "{maxValue, plural, one { character} other { characters}}"
@@ -4845,7 +5164,7 @@ const DynamicComponent = ({
4845
5164
  /* @__PURE__ */ jsxRuntime.jsx(
4846
5165
  designSystem.IconButton,
4847
5166
  {
4848
- borderWidth: 0,
5167
+ variant: "ghost",
4849
5168
  label: formatMessage(
4850
5169
  {
4851
5170
  id: index.getTranslation("components.DynamicZone.delete-label"),
@@ -4860,7 +5179,7 @@ const DynamicComponent = ({
4860
5179
  /* @__PURE__ */ jsxRuntime.jsx(
4861
5180
  designSystem.IconButton,
4862
5181
  {
4863
- borderWidth: 0,
5182
+ variant: "ghost",
4864
5183
  onClick: (e) => e.stopPropagation(),
4865
5184
  "data-handler-id": handlerId,
4866
5185
  ref: dragRef,
@@ -4921,7 +5240,18 @@ const DynamicComponent = ({
4921
5240
  ] }),
4922
5241
  /* @__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 }) => {
4923
5242
  const fieldName = `${name2}.${index$1}.${field.name}`;
4924
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName }) }, fieldName);
5243
+ return /* @__PURE__ */ jsxRuntime.jsx(
5244
+ designSystem.Grid.Item,
5245
+ {
5246
+ col: size,
5247
+ s: 12,
5248
+ xs: 12,
5249
+ direction: "column",
5250
+ alignItems: "stretch",
5251
+ children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5252
+ },
5253
+ fieldName
5254
+ );
4925
5255
  }) }, rowInd)) }) }) })
4926
5256
  ] }) }) })
4927
5257
  ] });
@@ -5114,7 +5444,7 @@ const DynamicZone = ({
5114
5444
  const handleRemoveComponent = (name22, currentIndex) => () => {
5115
5445
  removeFieldRow(name22, currentIndex);
5116
5446
  };
5117
- const hasError = error !== void 0 || dynamicDisplayedComponentsLength < min || dynamicDisplayedComponentsLength > max;
5447
+ const hasError = error !== void 0;
5118
5448
  const renderButtonLabel = () => {
5119
5449
  if (addComponentIsOpen) {
5120
5450
  return formatMessage({ id: "app.utils.close-label", defaultMessage: "Close" });
@@ -5228,4 +5558,4 @@ exports.transformDocument = transformDocument;
5228
5558
  exports.useDynamicZone = useDynamicZone;
5229
5559
  exports.useFieldHint = useFieldHint;
5230
5560
  exports.useLazyComponents = useLazyComponents;
5231
- //# sourceMappingURL=Field-BG1xu38N.js.map
5561
+ //# sourceMappingURL=Field-DH2OaqUP.js.map