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

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 (102) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js → ComponentConfigurationPage-5ukroXAh.js} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js.map → ComponentConfigurationPage-5ukroXAh.js.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs → ComponentConfigurationPage-BAgyHiMm.mjs} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs.map → ComponentConfigurationPage-BAgyHiMm.mjs.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs → EditConfigurationPage-DmoXawIh.mjs} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs.map → EditConfigurationPage-DmoXawIh.mjs.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js → EditConfigurationPage-Xp7lun0f.js} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js.map → EditConfigurationPage-Xp7lun0f.js.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-DWb0DE7R.mjs → EditViewPage-BLsjc5F-.mjs} +46 -46
  11. package/dist/_chunks/EditViewPage-BLsjc5F-.mjs.map +1 -0
  12. package/dist/_chunks/{EditViewPage-CTTDHKkQ.js → EditViewPage-C-ukDOB7.js} +45 -45
  13. package/dist/_chunks/EditViewPage-C-ukDOB7.js.map +1 -0
  14. package/dist/_chunks/{Field-C5Z1Ivdv.js → Field-Bfph5SOd.js} +421 -141
  15. package/dist/_chunks/Field-Bfph5SOd.js.map +1 -0
  16. package/dist/_chunks/{Field-DnStdvQw.mjs → Field-Cs7duwWd.mjs} +422 -142
  17. package/dist/_chunks/Field-Cs7duwWd.mjs.map +1 -0
  18. package/dist/_chunks/{Form-B81OtW-k.js → Form-CPYqIWDG.js} +25 -26
  19. package/dist/_chunks/Form-CPYqIWDG.js.map +1 -0
  20. package/dist/_chunks/{Form-DqGgE55Q.mjs → Form-Dg_GS5TQ.mjs} +27 -28
  21. package/dist/_chunks/Form-Dg_GS5TQ.mjs.map +1 -0
  22. package/dist/_chunks/{History-4NbOq2dX.js → History-DNQkXANT.js} +51 -28
  23. package/dist/_chunks/History-DNQkXANT.js.map +1 -0
  24. package/dist/_chunks/{History-DS6-HCYX.mjs → History-wrnHqf09.mjs} +52 -29
  25. package/dist/_chunks/History-wrnHqf09.mjs.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-CpfstlYY.js → ListConfigurationPage-CUQxfpjT.js} +48 -47
  27. package/dist/_chunks/ListConfigurationPage-CUQxfpjT.js.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-DQJJltko.mjs → ListConfigurationPage-DScmJVkW.mjs} +49 -49
  29. package/dist/_chunks/ListConfigurationPage-DScmJVkW.mjs.map +1 -0
  30. package/dist/_chunks/{ListViewPage-CA3I75m5.js → ListViewPage-BsLiH2-2.js} +59 -67
  31. package/dist/_chunks/ListViewPage-BsLiH2-2.js.map +1 -0
  32. package/dist/_chunks/{ListViewPage-nQrOQuVo.mjs → ListViewPage-C4IvrMgY.mjs} +60 -68
  33. package/dist/_chunks/ListViewPage-C4IvrMgY.mjs.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js → NoContentTypePage-BZ-PnGAf.js} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js.map → NoContentTypePage-BZ-PnGAf.js.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs → NoContentTypePage-Djg8nPlj.mjs} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs.map → NoContentTypePage-Djg8nPlj.mjs.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs → NoPermissionsPage-DSP7R-hv.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs.map → NoPermissionsPage-DSP7R-hv.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-CO2MK200.js → NoPermissionsPage-_lUqjGW3.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-CO2MK200.js.map → NoPermissionsPage-_lUqjGW3.js.map} +1 -1
  42. package/dist/_chunks/{Relations-BDRl99Ux.mjs → Relations-BZr8tL0R.mjs} +3 -3
  43. package/dist/_chunks/Relations-BZr8tL0R.mjs.map +1 -0
  44. package/dist/_chunks/{Relations-DG2jnOcr.js → Relations-CtELXYIK.js} +3 -3
  45. package/dist/_chunks/Relations-CtELXYIK.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-OerGjbAN.js} +365 -375
  51. package/dist/_chunks/index-OerGjbAN.js.map +1 -0
  52. package/dist/_chunks/{index-Drt2DN7v.mjs → index-c_5DdJi-.mjs} +380 -390
  53. package/dist/_chunks/index-c_5DdJi-.mjs.map +1 -0
  54. package/dist/_chunks/{layout-DEYBqgF1.js → layout-Ci7qHlFb.js} +7 -7
  55. package/dist/_chunks/layout-Ci7qHlFb.js.map +1 -0
  56. package/dist/_chunks/{layout-BzAbmoO6.mjs → layout-oPBiO7RY.mjs} +8 -8
  57. package/dist/_chunks/layout-oPBiO7RY.mjs.map +1 -0
  58. package/dist/_chunks/{relations-D26zVRdi.mjs → relations-BIdWFjdq.mjs} +2 -2
  59. package/dist/_chunks/{relations-D26zVRdi.mjs.map → relations-BIdWFjdq.mjs.map} +1 -1
  60. package/dist/_chunks/{relations-D0eZ4VWw.js → relations-COBpStiF.js} +2 -2
  61. package/dist/_chunks/{relations-D0eZ4VWw.js.map → relations-COBpStiF.js.map} +1 -1
  62. package/dist/admin/index.js +1 -1
  63. package/dist/admin/index.mjs +4 -4
  64. package/dist/admin/src/history/index.d.ts +3 -0
  65. package/dist/admin/src/index.d.ts +1 -0
  66. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +8 -3
  67. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  68. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
  69. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +2 -10
  70. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  71. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  72. package/dist/server/index.js +41 -34
  73. package/dist/server/index.js.map +1 -1
  74. package/dist/server/index.mjs +41 -34
  75. package/dist/server/index.mjs.map +1 -1
  76. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  77. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  78. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  79. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  80. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  81. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  82. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  83. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  84. package/package.json +8 -8
  85. package/dist/_chunks/EditViewPage-CTTDHKkQ.js.map +0 -1
  86. package/dist/_chunks/EditViewPage-DWb0DE7R.mjs.map +0 -1
  87. package/dist/_chunks/Field-C5Z1Ivdv.js.map +0 -1
  88. package/dist/_chunks/Field-DnStdvQw.mjs.map +0 -1
  89. package/dist/_chunks/Form-B81OtW-k.js.map +0 -1
  90. package/dist/_chunks/Form-DqGgE55Q.mjs.map +0 -1
  91. package/dist/_chunks/History-4NbOq2dX.js.map +0 -1
  92. package/dist/_chunks/History-DS6-HCYX.mjs.map +0 -1
  93. package/dist/_chunks/ListConfigurationPage-CpfstlYY.js.map +0 -1
  94. package/dist/_chunks/ListConfigurationPage-DQJJltko.mjs.map +0 -1
  95. package/dist/_chunks/ListViewPage-CA3I75m5.js.map +0 -1
  96. package/dist/_chunks/ListViewPage-nQrOQuVo.mjs.map +0 -1
  97. package/dist/_chunks/Relations-BDRl99Ux.mjs.map +0 -1
  98. package/dist/_chunks/Relations-DG2jnOcr.js.map +0 -1
  99. package/dist/_chunks/index-BZoNZMXL.js.map +0 -1
  100. package/dist/_chunks/index-Drt2DN7v.mjs.map +0 -1
  101. package/dist/_chunks/layout-BzAbmoO6.mjs.map +0 -1
  102. package/dist/_chunks/layout-DEYBqgF1.js.map +0 -1
@@ -1,11 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { useId } from "react";
4
3
  import { useForm, Layouts, BackButton, InputRenderer, useNotification, useField, Form, useTracking, useAPIErrorHandler, Page } from "@strapi/admin/strapi-admin";
5
- import { Button, useCollator, Flex, Typography, Grid, GridItem, ModalLayout, ModalHeader, ModalBody, ModalFooter, Box, useComposedRefs, Menu, VisuallyHidden, Main, Divider } from "@strapi/design-system";
4
+ import { Button, useCollator, Flex, Typography, Grid, Modal, Box, useComposedRefs, Menu, VisuallyHidden, Main, Divider } from "@strapi/design-system";
6
5
  import { useIntl } from "react-intl";
7
6
  import { Navigate } from "react-router-dom";
8
- import { g as getTranslation, y as capitalise, c as useDoc, o as useGetContentTypeConfigurationQuery, v as checkIfAttributeIsDisplayable, n as useDocLayout, z as useUpdateContentTypeConfigurationMutation, S as SINGLE_TYPES } from "./index-Drt2DN7v.mjs";
7
+ import { g as getTranslation, x as capitalise, c as useDoc, o as useGetContentTypeConfigurationQuery, t as checkIfAttributeIsDisplayable, n as useDocLayout, y as useUpdateContentTypeConfigurationMutation, S as SINGLE_TYPES } from "./index-c_5DdJi-.mjs";
9
8
  import { u as useTypedSelector } from "./hooks-E5u1mcgM.mjs";
10
9
  import { s as setIn } from "./objects-mKMAmfec.mjs";
11
10
  import { Drag, Pencil, Cross, Plus } from "@strapi/icons";
@@ -103,8 +102,8 @@ const Settings = () => {
103
102
  id: getTranslation("containers.SettingPage.settings"),
104
103
  defaultMessage: "Settings"
105
104
  }) }),
106
- /* @__PURE__ */ jsx(Grid, { gap: 4, children: formLayout.map(
107
- (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsx(GridItem, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name))
105
+ /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: formLayout.map(
106
+ (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsx(Grid.Item, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name))
108
107
  ) }, "bottom")
109
108
  ] });
110
109
  };
@@ -182,7 +181,6 @@ const FIELD_SCHEMA = yup.object().shape({
182
181
  const EditFieldForm = ({ attribute, name, onClose }) => {
183
182
  const { formatMessage } = useIntl();
184
183
  const { toggleNotification } = useNotification();
185
- const id = useId();
186
184
  const { value, onChange } = useField(name);
187
185
  if (!value) {
188
186
  console.error(
@@ -201,7 +199,7 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
201
199
  if ("relation" in attribute && ["oneWay", "oneToOne", "manyToOne"].includes(attribute.relation)) {
202
200
  shouldDisplaySortToggle = true;
203
201
  }
204
- return /* @__PURE__ */ jsx(ModalLayout, { onClose, labelledBy: id, children: /* @__PURE__ */ jsxs(
202
+ return /* @__PURE__ */ jsx(Modal.Content, { children: /* @__PURE__ */ jsxs(
205
203
  Form,
206
204
  {
207
205
  method: "PUT",
@@ -212,9 +210,9 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
212
210
  onClose();
213
211
  },
214
212
  children: [
215
- /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs(HeaderContainer, { children: [
213
+ /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsxs(HeaderContainer, { children: [
216
214
  /* @__PURE__ */ jsx(FieldTypeIcon, { type: attribute.type }),
217
- /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: formatMessage(
215
+ /* @__PURE__ */ jsx(Modal.Title, { children: formatMessage(
218
216
  {
219
217
  id: getTranslation("containers.list-settings.modal-form.label"),
220
218
  defaultMessage: "Edit {fieldName}"
@@ -222,7 +220,7 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
222
220
  { fieldName: capitalise(value.label) }
223
221
  ) })
224
222
  ] }) }),
225
- /* @__PURE__ */ jsx(ModalBody, { children: /* @__PURE__ */ jsx(Grid, { gap: 4, children: [
223
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: [
226
224
  {
227
225
  name: "label",
228
226
  label: formatMessage({
@@ -247,14 +245,11 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
247
245
  }
248
246
  ].filter(
249
247
  (field) => field.name !== "sortable" || field.name === "sortable" && shouldDisplaySortToggle
250
- ).map(({ size, ...field }) => /* @__PURE__ */ jsx(GridItem, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name)) }) }),
251
- /* @__PURE__ */ jsx(
252
- ModalFooter,
253
- {
254
- startActions: /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }),
255
- endActions: /* @__PURE__ */ jsx(Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
256
- }
257
- )
248
+ ).map(({ size, ...field }) => /* @__PURE__ */ jsx(Grid.Item, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name)) }) }),
249
+ /* @__PURE__ */ jsxs(Modal.Footer, { children: [
250
+ /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }),
251
+ /* @__PURE__ */ jsx(Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
252
+ ] })
258
253
  ]
259
254
  }
260
255
  ) });
@@ -298,8 +293,11 @@ const DraggableCard = ({
298
293
  forceRerenderAfterDnd((prev) => !prev);
299
294
  }
300
295
  }, [isDraggingSibling]);
301
- const composedRefs = useComposedRefs(dragRef, objectRef);
302
- return /* @__PURE__ */ jsxs(FieldWrapper, { ref: dropRef, children: [
296
+ const composedRefs = useComposedRefs(
297
+ dropRef,
298
+ objectRef
299
+ );
300
+ return /* @__PURE__ */ jsxs(FieldWrapper, { ref: composedRefs, children: [
303
301
  isDragging && /* @__PURE__ */ jsx(CardDragPreview, { label }),
304
302
  !isDragging && isDraggingSibling && /* @__PURE__ */ jsx(CardDragPreview, { isSibling: true, label }),
305
303
  !isDragging && !isDraggingSibling && /* @__PURE__ */ jsxs(
@@ -315,7 +313,7 @@ const DraggableCard = ({
315
313
  /* @__PURE__ */ jsx(
316
314
  DragButton,
317
315
  {
318
- tag: "span",
316
+ ref: dragRef,
319
317
  "aria-label": formatMessage(
320
318
  {
321
319
  id: getTranslation("components.DraggableCard.move.field"),
@@ -324,31 +322,41 @@ const DraggableCard = ({
324
322
  { item: label }
325
323
  ),
326
324
  onClick: (e) => e.stopPropagation(),
327
- ref: composedRefs,
328
325
  children: /* @__PURE__ */ jsx(Drag, {})
329
326
  }
330
327
  ),
331
328
  /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: label })
332
329
  ] }),
333
- /* @__PURE__ */ jsxs(Flex, { paddingLeft: 3, children: [
334
- /* @__PURE__ */ jsx(
335
- ActionButton,
336
- {
337
- onClick: (e) => {
338
- e.stopPropagation();
339
- setIsModalOpen(true);
340
- },
341
- "aria-label": formatMessage(
342
- {
343
- id: getTranslation("components.DraggableCard.edit.field"),
344
- defaultMessage: "Edit {item}"
330
+ /* @__PURE__ */ jsxs(Flex, { paddingLeft: 3, onClick: (e) => e.stopPropagation(), children: [
331
+ /* @__PURE__ */ jsxs(Modal.Root, { open: isModalOpen, onOpenChange: setIsModalOpen, children: [
332
+ /* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(
333
+ ActionButton,
334
+ {
335
+ onClick: (e) => {
336
+ e.stopPropagation();
345
337
  },
346
- { item: label }
347
- ),
348
- type: "button",
349
- children: /* @__PURE__ */ jsx(Pencil, { width: "1.2rem", height: "1.2rem" })
350
- }
351
- ),
338
+ "aria-label": formatMessage(
339
+ {
340
+ id: getTranslation("components.DraggableCard.edit.field"),
341
+ defaultMessage: "Edit {item}"
342
+ },
343
+ { item: label }
344
+ ),
345
+ type: "button",
346
+ children: /* @__PURE__ */ jsx(Pencil, { width: "1.2rem", height: "1.2rem" })
347
+ }
348
+ ) }),
349
+ /* @__PURE__ */ jsx(
350
+ EditFieldForm,
351
+ {
352
+ attribute,
353
+ name: `layout.${index}`,
354
+ onClose: () => {
355
+ setIsModalOpen(false);
356
+ }
357
+ }
358
+ )
359
+ ] }),
352
360
  /* @__PURE__ */ jsx(
353
361
  ActionButton,
354
362
  {
@@ -368,14 +376,6 @@ const DraggableCard = ({
368
376
  ] })
369
377
  ]
370
378
  }
371
- ),
372
- isModalOpen && /* @__PURE__ */ jsx(
373
- EditFieldForm,
374
- {
375
- attribute,
376
- name: `layout.${index}`,
377
- onClose: () => setIsModalOpen(false)
378
- }
379
379
  )
380
380
  ] });
381
381
  };
@@ -619,4 +619,4 @@ export {
619
619
  ListConfiguration,
620
620
  ProtectedListConfiguration
621
621
  };
622
- //# sourceMappingURL=ListConfigurationPage-DQJJltko.mjs.map
622
+ //# sourceMappingURL=ListConfigurationPage-DScmJVkW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListConfigurationPage-DScmJVkW.mjs","sources":["../../admin/src/pages/ListConfiguration/components/Header.tsx","../../admin/src/pages/ListConfiguration/components/Settings.tsx","../../admin/src/pages/ListConfiguration/components/EditFieldForm.tsx","../../admin/src/pages/ListConfiguration/components/DraggableCard.tsx","../../admin/src/pages/ListConfiguration/components/SortDisplayedFields.tsx","../../admin/src/pages/ListConfiguration/ListConfigurationPage.tsx"],"sourcesContent":["import { useForm, BackButton, Layouts } from '@strapi/admin/strapi-admin';\nimport { Button } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { capitalise } from '../../../utils/strings';\nimport { getTranslation } from '../../../utils/translations';\n\ninterface HeaderProps {\n collectionType: string;\n name: string;\n model: string;\n}\n\nconst Header = ({ name }: HeaderProps) => {\n const { formatMessage } = useIntl();\n\n const modified = useForm('Header', (state) => state.modified);\n const isSubmitting = useForm('Header', (state) => state.isSubmitting);\n\n return (\n <Layouts.Header\n navigationAction={<BackButton />}\n primaryAction={\n <Button size=\"S\" disabled={!modified} type=\"submit\" loading={isSubmitting}>\n {formatMessage({ id: 'global.save', defaultMessage: 'Save' })}\n </Button>\n }\n subtitle={formatMessage({\n id: getTranslation('components.SettingsViewWrapper.pluginHeader.description.list-settings'),\n defaultMessage: 'Define the settings of the list view.',\n })}\n title={formatMessage(\n {\n id: getTranslation('components.SettingsViewWrapper.pluginHeader.title'),\n defaultMessage: 'Configure the view - {name}',\n },\n { name: capitalise(name) }\n )}\n />\n );\n};\n\nexport { Header };\nexport type { HeaderProps };\n","import * as React from 'react';\n\nimport { useForm, InputRenderer, type InputProps } from '@strapi/admin/strapi-admin';\nimport { Flex, Grid, Typography, useCollator } from '@strapi/design-system';\nimport { type MessageDescriptor, useIntl } from 'react-intl';\n\nimport { useDoc } from '../../../hooks/useDocument';\nimport { type EditFieldLayout } from '../../../hooks/useDocumentLayout';\nimport { getTranslation } from '../../../utils/translations';\nimport { type FormData } from '../ListConfigurationPage';\n\nimport type { DistributiveOmit } from 'react-redux';\n\nexport type InputPropsWithMessageDescriptors = DistributiveOmit<\n InputProps,\n 'hint' | 'label' | 'placeholder'\n> & {\n hint?: MessageDescriptor;\n label: MessageDescriptor;\n placeholder?: MessageDescriptor;\n};\n\n/**\n * @internal\n * @description Form inputs are always displayed in a grid, so we need\n * to use the size property to determine how many columns the input should\n * take up.\n */\nexport type FormLayoutInputProps = InputPropsWithMessageDescriptors & { size: number };\n\nconst EXCLUDED_SORT_ATTRIBUTE_TYPES = [\n 'media',\n 'richtext',\n 'dynamiczone',\n 'relation',\n 'component',\n 'json',\n 'blocks',\n];\n\ninterface SortOption {\n value: string;\n label: string;\n}\n\nconst Settings = () => {\n const { formatMessage, locale } = useIntl();\n const formatter = useCollator(locale, {\n sensitivity: 'base',\n });\n const { schema } = useDoc();\n\n const layout = useForm<FormData['layout']>('Settings', (state) => state.values.layout ?? []);\n const currentSortBy = useForm<FormData['settings']['defaultSortBy']>(\n 'Settings',\n (state) => state.values.settings.defaultSortBy\n );\n const onChange = useForm('Settings', (state) => state.onChange);\n\n const sortOptions = React.useMemo(\n () =>\n Object.values(layout).reduce<SortOption[]>((acc, field) => {\n if (schema && !EXCLUDED_SORT_ATTRIBUTE_TYPES.includes(schema.attributes[field.name].type)) {\n acc.push({\n value: field.name,\n label: typeof field.label !== 'string' ? formatMessage(field.label) : field.label,\n });\n }\n\n return acc;\n }, []),\n [formatMessage, layout, schema]\n );\n\n const sortOptionsSorted = sortOptions.sort((a, b) => formatter.compare(a.label, b.label));\n\n React.useEffect(() => {\n if (sortOptionsSorted.findIndex((opt) => opt.value === currentSortBy) === -1) {\n onChange('settings.defaultSortBy', sortOptionsSorted[0]?.value);\n }\n }, [currentSortBy, onChange, sortOptionsSorted]);\n\n const formLayout = React.useMemo(\n () =>\n SETTINGS_FORM_LAYOUT.map((row) =>\n row.map((field) => {\n if (field.type === 'enumeration') {\n return {\n ...field,\n hint: field.hint ? formatMessage(field.hint) : undefined,\n label: formatMessage(field.label),\n options: field.name === 'settings.defaultSortBy' ? sortOptionsSorted : field.options,\n };\n } else {\n return {\n ...field,\n hint: field.hint ? formatMessage(field.hint) : undefined,\n label: formatMessage(field.label),\n };\n }\n })\n ) as [top: EditFieldLayout[], bottom: EditFieldLayout[]],\n [formatMessage, sortOptionsSorted]\n );\n\n return (\n <Flex direction=\"column\" alignItems=\"stretch\" gap={4}>\n <Typography variant=\"delta\" tag=\"h2\">\n {formatMessage({\n id: getTranslation('containers.SettingPage.settings'),\n defaultMessage: 'Settings',\n })}\n </Typography>\n <Grid.Root key=\"bottom\" gap={4}>\n {formLayout.map((row) =>\n row.map(({ size, ...field }) => (\n <Grid.Item key={field.name} s={12} col={size}>\n {/* @ts-expect-error – issue with EnumerationProps conflicting with InputProps */}\n <InputRenderer {...field} />\n </Grid.Item>\n ))\n )}\n </Grid.Root>\n </Flex>\n );\n};\n\nconst SETTINGS_FORM_LAYOUT: FormLayoutInputProps[][] = [\n [\n {\n label: {\n id: getTranslation('form.Input.search'),\n defaultMessage: 'Enable search',\n },\n name: 'settings.searchable',\n size: 4,\n type: 'boolean' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.filters'),\n defaultMessage: 'Enable filters',\n },\n name: 'settings.filterable',\n size: 4,\n type: 'boolean' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.bulkActions'),\n defaultMessage: 'Enable bulk actions',\n },\n name: 'settings.bulkable',\n size: 4,\n type: 'boolean' as const,\n },\n ],\n [\n {\n hint: {\n id: getTranslation('form.Input.pageEntries.inputDescription'),\n defaultMessage: 'Note: You can override this value in the Collection Type settings page.',\n },\n label: {\n id: getTranslation('form.Input.pageEntries'),\n defaultMessage: 'Entries per page',\n },\n name: 'settings.pageSize',\n options: ['10', '20', '50', '100'].map((value) => ({ value, label: value })),\n size: 6,\n type: 'enumeration' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.defaultSort'),\n defaultMessage: 'Default sort attribute',\n },\n name: 'settings.defaultSortBy',\n options: [],\n size: 3,\n type: 'enumeration' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.sort.order'),\n defaultMessage: 'Default sort order',\n },\n name: 'settings.defaultSortOrder',\n options: ['ASC', 'DESC'].map((value) => ({ value, label: value })),\n size: 3,\n type: 'enumeration' as const,\n },\n ],\n];\n\nexport { Settings };\n","import { Form, useField, InputRenderer, useNotification } from '@strapi/admin/strapi-admin';\nimport { Button, Flex, FlexComponent, Grid, Modal } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\nimport * as yup from 'yup';\n\nimport { FieldTypeIcon } from '../../../components/FieldTypeIcon';\nimport { capitalise } from '../../../utils/strings';\nimport { getTranslation } from '../../../utils/translations';\n\nimport type { ListFieldLayout } from '../../../hooks/useDocumentLayout';\nimport type { FormData } from '../ListConfigurationPage';\n\ninterface EditFieldFormProps extends Pick<ListFieldLayout, 'attribute'> {\n name: string;\n onClose: () => void;\n}\n\nconst FIELD_SCHEMA = yup.object().shape({\n label: yup.string().required(),\n sortable: yup.boolean(),\n});\n\nconst EditFieldForm = ({ attribute, name, onClose }: EditFieldFormProps) => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n\n const { value, onChange } = useField<FormData['layout'][number]>(name);\n\n if (!value) {\n // This is very unlikely to happen, but it ensures the form is not opened without a value.\n console.error(\n \"You've opened a field to edit without it being part of the form, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.containers.list-settings.modal-form.error',\n defaultMessage: 'An error occurred while trying to open the form.',\n }),\n type: 'danger',\n });\n\n return null;\n }\n\n let shouldDisplaySortToggle = !['media', 'relation'].includes(attribute.type);\n\n if ('relation' in attribute && ['oneWay', 'oneToOne', 'manyToOne'].includes(attribute.relation)) {\n shouldDisplaySortToggle = true;\n }\n\n return (\n <Modal.Content>\n <Form\n method=\"PUT\"\n initialValues={value}\n validationSchema={FIELD_SCHEMA}\n onSubmit={(data) => {\n onChange(name, data);\n onClose();\n }}\n >\n <Modal.Header>\n <HeaderContainer>\n {/* @ts-expect-error attribute.type === custom does not work here */}\n <FieldTypeIcon type={attribute.type} />\n <Modal.Title>\n {formatMessage(\n {\n id: getTranslation('containers.list-settings.modal-form.label'),\n defaultMessage: 'Edit {fieldName}',\n },\n { fieldName: capitalise(value.label) }\n )}\n </Modal.Title>\n </HeaderContainer>\n </Modal.Header>\n <Modal.Body>\n <Grid.Root gap={4}>\n {[\n {\n name: 'label',\n label: formatMessage({\n id: getTranslation('form.Input.label'),\n defaultMessage: 'Label',\n }),\n hint: formatMessage({\n id: getTranslation('form.Input.label.inputDescription'),\n defaultMessage: \"This value overrides the label displayed in the table's head\",\n }),\n size: 6,\n type: 'string' as const,\n },\n {\n label: formatMessage({\n id: getTranslation('form.Input.sort.field'),\n defaultMessage: 'Enable sort on this field',\n }),\n name: 'sortable',\n size: 6,\n type: 'boolean' as const,\n },\n ]\n .filter(\n (field) =>\n field.name !== 'sortable' ||\n (field.name === 'sortable' && shouldDisplaySortToggle)\n )\n .map(({ size, ...field }) => (\n <Grid.Item key={field.name} s={12} col={size}>\n <InputRenderer {...field} />\n </Grid.Item>\n ))}\n </Grid.Root>\n </Modal.Body>\n <Modal.Footer>\n <Button onClick={onClose} variant=\"tertiary\">\n {formatMessage({ id: 'app.components.Button.cancel', defaultMessage: 'Cancel' })}\n </Button>\n <Button type=\"submit\">\n {formatMessage({ id: 'global.finish', defaultMessage: 'Finish' })}\n </Button>\n </Modal.Footer>\n </Form>\n </Modal.Content>\n );\n};\n\nconst HeaderContainer = styled<FlexComponent>(Flex)`\n svg {\n width: 3.2rem;\n margin-right: ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nexport { EditFieldForm };\nexport type { EditFieldFormProps };\n","import * as React from 'react';\n\nimport {\n Box,\n BoxComponent,\n Flex,\n FlexComponent,\n Modal,\n Typography,\n useComposedRefs,\n} from '@strapi/design-system';\nimport { Cross, Drag, Pencil } from '@strapi/icons';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { CardDragPreview } from '../../../components/DragPreviews/CardDragPreview';\nimport { ItemTypes } from '../../../constants/dragAndDrop';\nimport { useDragAndDrop } from '../../../hooks/useDragAndDrop';\nimport { getTranslation } from '../../../utils/translations';\n\nimport { EditFieldForm } from './EditFieldForm';\n\nimport type { ListFieldLayout } from '../../../hooks/useDocumentLayout';\n\ntype DraggableCardProps = Omit<ListFieldLayout, 'label'> & {\n label: string;\n index: number;\n isDraggingSibling: boolean;\n onMoveField: (dragIndex: number, hoverIndex: number) => void;\n onRemoveField: () => void;\n setIsDraggingSibling: (isDragging: boolean) => void;\n};\n\nconst DraggableCard = ({\n attribute,\n index,\n isDraggingSibling,\n label,\n name,\n onMoveField,\n onRemoveField,\n setIsDraggingSibling,\n}: DraggableCardProps) => {\n const [isModalOpen, setIsModalOpen] = React.useState(false);\n const { formatMessage } = useIntl();\n const [, forceRerenderAfterDnd] = React.useState(false);\n\n const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop(true, {\n type: ItemTypes.FIELD,\n item: { index, label, name },\n index,\n onMoveItem: onMoveField,\n onEnd: () => setIsDraggingSibling(false),\n });\n\n React.useEffect(() => {\n dragPreviewRef(getEmptyImage(), { captureDraggingState: false });\n }, [dragPreviewRef]);\n\n React.useEffect(() => {\n if (isDragging) {\n setIsDraggingSibling(true);\n }\n }, [isDragging, setIsDraggingSibling]);\n\n // Effect in order to force a rerender after reordering the components\n // Since we are removing the Accordion when doing the DnD we are losing the dragRef, therefore the replaced element cannot be dragged\n // anymore, this hack forces a rerender in order to apply the dragRef\n React.useEffect(() => {\n if (!isDraggingSibling) {\n forceRerenderAfterDnd((prev) => !prev);\n }\n }, [isDraggingSibling]);\n\n const composedRefs = useComposedRefs<HTMLButtonElement>(\n dropRef,\n objectRef as React.RefObject<HTMLButtonElement>\n );\n\n return (\n <FieldWrapper ref={composedRefs}>\n {isDragging && <CardDragPreview label={label} />}\n {!isDragging && isDraggingSibling && <CardDragPreview isSibling label={label} />}\n\n {!isDragging && !isDraggingSibling && (\n <FieldContainer\n borderColor=\"neutral150\"\n background=\"neutral100\"\n hasRadius\n justifyContent=\"space-between\"\n onClick={() => setIsModalOpen(true)}\n >\n <Flex gap={3}>\n <DragButton\n ref={dragRef}\n aria-label={formatMessage(\n {\n id: getTranslation('components.DraggableCard.move.field'),\n defaultMessage: 'Move {item}',\n },\n { item: label }\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Drag />\n </DragButton>\n <Typography fontWeight=\"bold\">{label}</Typography>\n </Flex>\n <Flex paddingLeft={3} onClick={(e) => e.stopPropagation()}>\n <Modal.Root open={isModalOpen} onOpenChange={setIsModalOpen}>\n <Modal.Trigger>\n <ActionButton\n onClick={(e) => {\n e.stopPropagation();\n }}\n aria-label={formatMessage(\n {\n id: getTranslation('components.DraggableCard.edit.field'),\n defaultMessage: 'Edit {item}',\n },\n { item: label }\n )}\n type=\"button\"\n >\n <Pencil width=\"1.2rem\" height=\"1.2rem\" />\n </ActionButton>\n </Modal.Trigger>\n <EditFieldForm\n attribute={attribute}\n name={`layout.${index}`}\n onClose={() => {\n setIsModalOpen(false);\n }}\n />\n </Modal.Root>\n <ActionButton\n onClick={onRemoveField}\n data-testid={`delete-${name}`}\n aria-label={formatMessage(\n {\n id: getTranslation('components.DraggableCard.delete.field'),\n defaultMessage: 'Delete {item}',\n },\n { item: label }\n )}\n type=\"button\"\n >\n <Cross width=\"1.2rem\" height=\"1.2rem\" />\n </ActionButton>\n </Flex>\n </FieldContainer>\n )}\n </FieldWrapper>\n );\n};\n\nconst ActionButton = styled.button`\n display: flex;\n align-items: center;\n height: ${({ theme }) => theme.spaces[7]};\n color: ${({ theme }) => theme.colors.neutral600};\n\n &:hover {\n color: ${({ theme }) => theme.colors.neutral700};\n }\n\n &:last-child {\n padding: 0 ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nconst DragButton = styled(ActionButton)`\n padding: 0 ${({ theme }) => theme.spaces[3]};\n border-right: 1px solid ${({ theme }) => theme.colors.neutral150};\n cursor: all-scroll;\n`;\n\nconst FieldContainer = styled<FlexComponent>(Flex)`\n max-height: 3.2rem;\n cursor: pointer;\n`;\n\nconst FieldWrapper = styled<BoxComponent>(Box)`\n &:last-child {\n padding-right: ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nexport { DraggableCard };\nexport type { DraggableCardProps };\n","import * as React from 'react';\n\nimport { useForm } from '@strapi/admin/strapi-admin';\nimport { Box, Flex, VisuallyHidden, Typography, Menu } from '@strapi/design-system';\nimport { Plus } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { useDoc } from '../../../hooks/useDocument';\nimport { useGetContentTypeConfigurationQuery } from '../../../services/contentTypes';\nimport { checkIfAttributeIsDisplayable } from '../../../utils/attributes';\nimport { getTranslation } from '../../../utils/translations';\n\nimport { DraggableCard, DraggableCardProps } from './DraggableCard';\n\nimport type { ListLayout } from '../../../hooks/useDocumentLayout';\nimport type { FormData } from '../ListConfigurationPage';\n\ninterface SortDisplayedFieldsProps extends Pick<ListLayout, 'layout'> {}\n\nconst SortDisplayedFields = () => {\n const { formatMessage } = useIntl();\n const { model, schema } = useDoc();\n const [isDraggingSibling, setIsDraggingSibling] = React.useState(false);\n const [lastAction, setLastAction] = React.useState<string | null>(null);\n const scrollableContainerRef = React.useRef<HTMLDivElement>(null);\n\n const values = useForm<FormData['layout']>(\n 'SortDisplayedFields',\n (state) => state.values.layout ?? []\n );\n const addFieldRow = useForm('SortDisplayedFields', (state) => state.addFieldRow);\n const removeFieldRow = useForm('SortDisplayedFields', (state) => state.removeFieldRow);\n const moveFieldRow = useForm('SortDisplayedFields', (state) => state.moveFieldRow);\n\n const { metadata: allMetadata } = useGetContentTypeConfigurationQuery(model, {\n selectFromResult: ({ data }) => ({ metadata: data?.contentType.metadatas ?? {} }),\n });\n\n /**\n * This is our list of fields that are not displayed in the current layout\n * so we create their default state to be added to the layout.\n */\n const nonDisplayedFields = React.useMemo(() => {\n if (!schema) {\n return [];\n }\n\n const displayedFieldNames = values.map((field) => field.name);\n\n return Object.entries(schema.attributes).reduce<Array<FormData['layout'][number]>>(\n (acc, [name, attribute]) => {\n if (!displayedFieldNames.includes(name) && checkIfAttributeIsDisplayable(attribute)) {\n const { list: metadata } = allMetadata[name];\n\n acc.push({\n name,\n label: metadata.label || name,\n sortable: metadata.sortable,\n });\n }\n\n return acc;\n },\n []\n );\n }, [allMetadata, values, schema]);\n\n const handleAddField = (field: FormData['layout'][number]) => {\n setLastAction('add');\n addFieldRow('layout', field);\n };\n\n const handleRemoveField = (index: number) => {\n setLastAction('remove');\n removeFieldRow('layout', index);\n };\n\n const handleMoveField: DraggableCardProps['onMoveField'] = (dragIndex, hoverIndex) => {\n moveFieldRow('layout', dragIndex, hoverIndex);\n };\n\n React.useEffect(() => {\n if (lastAction === 'add' && scrollableContainerRef?.current) {\n scrollableContainerRef.current.scrollLeft = scrollableContainerRef.current.scrollWidth;\n }\n }, [lastAction]);\n\n return (\n <Flex alignItems=\"stretch\" direction=\"column\" gap={4}>\n <Typography variant=\"delta\" tag=\"h2\">\n {formatMessage({\n id: getTranslation('containers.SettingPage.view'),\n defaultMessage: 'View',\n })}\n </Typography>\n\n <Flex padding={4} borderColor=\"neutral300\" borderStyle=\"dashed\" borderWidth=\"1px\" hasRadius>\n <Box flex=\"1\" overflow=\"auto hidden\" ref={scrollableContainerRef}>\n <Flex gap={3}>\n {values.map((field, index) => (\n <DraggableCard\n key={field.name}\n index={index}\n isDraggingSibling={isDraggingSibling}\n onMoveField={handleMoveField}\n onRemoveField={() => handleRemoveField(index)}\n setIsDraggingSibling={setIsDraggingSibling}\n {...field}\n attribute={schema!.attributes[field.name]}\n label={typeof field.label === 'object' ? formatMessage(field.label) : field.label}\n />\n ))}\n </Flex>\n </Box>\n\n <Menu.Root>\n <Menu.Trigger\n paddingLeft={2}\n paddingRight={2}\n justifyContent=\"center\"\n endIcon={null}\n disabled={nonDisplayedFields.length === 0}\n variant=\"tertiary\"\n >\n <VisuallyHidden tag=\"span\">\n {formatMessage({\n id: getTranslation('components.FieldSelect.label'),\n defaultMessage: 'Add a field',\n })}\n </VisuallyHidden>\n <Plus aria-hidden focusable={false} style={{ position: 'relative', top: 2 }} />\n </Menu.Trigger>\n <Menu.Content>\n {nonDisplayedFields.map((field) => (\n <Menu.Item key={field.name} onSelect={() => handleAddField(field)}>\n {typeof field.label === 'object' ? formatMessage(field.label) : field.label}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n </Flex>\n </Flex>\n );\n};\n\nexport { SortDisplayedFields };\nexport type { SortDisplayedFieldsProps };\n","import * as React from 'react';\n\nimport {\n Form,\n type FormProps,\n useNotification,\n useTracking,\n useAPIErrorHandler,\n Page,\n Layouts,\n} from '@strapi/admin/strapi-admin';\nimport { Divider, Flex, Main } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { Navigate } from 'react-router-dom';\n\nimport { SINGLE_TYPES } from '../../constants/collections';\nimport { useDoc } from '../../hooks/useDocument';\nimport { ListFieldLayout, ListLayout, useDocLayout } from '../../hooks/useDocumentLayout';\nimport { useTypedSelector } from '../../modules/hooks';\nimport { useUpdateContentTypeConfigurationMutation } from '../../services/contentTypes';\nimport { setIn } from '../../utils/objects';\n\nimport { Header } from './components/Header';\nimport { Settings } from './components/Settings';\nimport { SortDisplayedFields } from './components/SortDisplayedFields';\n\nimport type { Metadatas } from '../../../../shared/contracts/content-types';\n\ninterface FormData extends Pick<ListLayout, 'settings'> {\n layout: Array<Pick<ListFieldLayout, 'sortable' | 'name'> & { label: string }>;\n}\n\nconst ListConfiguration = () => {\n const { formatMessage } = useIntl();\n const { trackUsage } = useTracking();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { model, collectionType } = useDoc();\n\n const { isLoading: isLoadingLayout, list, edit } = useDocLayout();\n\n const [updateContentTypeConfiguration] = useUpdateContentTypeConfigurationMutation();\n const handleSubmit: FormProps<FormData>['onSubmit'] = async (data) => {\n try {\n trackUsage('willSaveContentTypeLayout');\n const layoutData = data.layout ?? [];\n /**\n * We reconstruct the metadatas object by taking the existing edit metadatas\n * and re-merging that by attribute name with the current list metadatas, whilst overwriting\n * the data from the form we've built.\n */\n const meta = Object.entries(edit.metadatas).reduce<Metadatas>((acc, [name, editMeta]) => {\n const { mainField: _mainField, ...listMeta } = list.metadatas[name];\n\n const { label, sortable } = layoutData.find((field) => field.name === name) ?? {};\n\n acc[name] = {\n edit: editMeta,\n list: {\n ...listMeta,\n label: label || listMeta.label,\n sortable: sortable || listMeta.sortable,\n },\n };\n\n return acc;\n }, {});\n\n const res = await updateContentTypeConfiguration({\n layouts: {\n edit: edit.layout.flatMap((panel) =>\n panel.map((row) => row.map(({ name, size }) => ({ name, size })))\n ),\n list: layoutData.map((field) => field.name),\n },\n settings: setIn(data.settings, 'displayName', undefined),\n metadatas: meta,\n uid: model,\n });\n\n if ('data' in res) {\n trackUsage('didEditListSettings');\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'notification.success.saved', defaultMessage: 'Saved' }),\n });\n } else {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n }\n } catch (err) {\n console.error(err);\n toggleNotification({\n type: 'danger',\n message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),\n });\n }\n };\n\n const initialValues = React.useMemo(() => {\n return {\n layout: list.layout.map(({ label, sortable, name }) => ({\n label: typeof label === 'string' ? label : formatMessage(label),\n sortable,\n name,\n })),\n settings: list.settings,\n } satisfies FormData;\n }, [formatMessage, list.layout, list.settings]);\n\n if (collectionType === SINGLE_TYPES) {\n return <Navigate to={`/single-types/${model}`} />;\n }\n\n if (isLoadingLayout) {\n return <Page.Loading />;\n }\n\n return (\n <Layouts.Root>\n <Page.Title>{`Configure ${list.settings.displayName} List View`}</Page.Title>\n <Main>\n <Form initialValues={initialValues} onSubmit={handleSubmit} method=\"PUT\">\n <Header\n collectionType={collectionType}\n model={model}\n name={list.settings.displayName ?? ''}\n />\n <Layouts.Content>\n <Flex\n alignItems=\"stretch\"\n background=\"neutral0\"\n direction=\"column\"\n gap={6}\n hasRadius\n shadow=\"tableShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingLeft={7}\n paddingRight={7}\n >\n <Settings />\n <Divider />\n <SortDisplayedFields />\n </Flex>\n </Layouts.Content>\n </Form>\n </Main>\n </Layouts.Root>\n );\n};\n\nconst ProtectedListConfiguration = () => {\n const permissions = useTypedSelector(\n (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations\n );\n\n return (\n <Page.Protect permissions={permissions}>\n <ListConfiguration />\n </Page.Protect>\n );\n};\n\nexport { ProtectedListConfiguration, ListConfiguration };\nexport type { FormData };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAM,SAAS,CAAC,EAAE,WAAwB;AAClC,QAAA,EAAE,kBAAkB;AAE1B,QAAM,WAAW,QAAQ,UAAU,CAAC,UAAU,MAAM,QAAQ;AAC5D,QAAM,eAAe,QAAQ,UAAU,CAAC,UAAU,MAAM,YAAY;AAGlE,SAAA;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACC,sCAAmB,YAAW,EAAA;AAAA,MAC9B,eACG,oBAAA,QAAA,EAAO,MAAK,KAAI,UAAU,CAAC,UAAU,MAAK,UAAS,SAAS,cAC1D,wBAAc,EAAE,IAAI,eAAe,gBAAgB,OAAQ,CAAA,GAC9D;AAAA,MAEF,UAAU,cAAc;AAAA,QACtB,IAAI,eAAe,uEAAuE;AAAA,QAC1F,gBAAgB;AAAA,MAAA,CACjB;AAAA,MACD,OAAO;AAAA,QACL;AAAA,UACE,IAAI,eAAe,mDAAmD;AAAA,UACtE,gBAAgB;AAAA,QAClB;AAAA,QACA,EAAE,MAAM,WAAW,IAAI,EAAE;AAAA,MAC3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A;AAAA,IAAA,oBAAC,KAAK,OAAL,EAAY,uBAAa,KAAK,SAAS,WAAW,aAAa,CAAA;AAAA,IAChE,oBAAC,QACC,UAAC,qBAAA,MAAA,EAAK,eAA8B,UAAU,cAAc,QAAO,OACjE,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,MAAM,KAAK,SAAS,eAAe;AAAA,QAAA;AAAA,MACrC;AAAA,MACA,oBAAC,QAAQ,SAAR,EACC,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,YAAW;AAAA,UACX,YAAW;AAAA,UACX,WAAU;AAAA,UACV,KAAK;AAAA,UACL,WAAS;AAAA,UACT,QAAO;AAAA,UACP,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,aAAa;AAAA,UACb,cAAc;AAAA,UAEd,UAAA;AAAA,YAAA,oBAAC,UAAS,EAAA;AAAA,gCACT,SAAQ,EAAA;AAAA,gCACR,qBAAoB,EAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,GAEzB;AAAA,IAAA,EAAA,CACF,EACF,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;AAEA,MAAM,6BAA6B,MAAM;AACvC,QAAM,cAAc;AAAA,IAClB,CAAC,UAAU,MAAM,UAAU,YAAY,gBAAgB;AAAA,EAAA;AAGzD,6BACG,KAAK,SAAL,EAAa,aACZ,UAAA,oBAAC,qBAAkB,EACrB,CAAA;AAEJ;"}
@@ -10,12 +10,12 @@ const qs = require("qs");
10
10
  const reactIntl = require("react-intl");
11
11
  const reactRouterDom = require("react-router-dom");
12
12
  const styledComponents = require("styled-components");
13
- const index = require("./index-BZoNZMXL.js");
13
+ const index = require("./index-OerGjbAN.js");
14
14
  const usePrev = require("./usePrev-B9w_-eYc.js");
15
15
  const isEmpty = require("lodash/isEmpty");
16
16
  const parseISO = require("date-fns/parseISO");
17
17
  const toString = require("lodash/toString");
18
- const relations = require("./relations-D0eZ4VWw.js");
18
+ const relations = require("./relations-COBpStiF.js");
19
19
  const hooks = require("./hooks-BAaaKPS_.js");
20
20
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
21
21
  function _interopNamespace(e) {
@@ -147,6 +147,15 @@ const FiltersImpl = ({ disabled, schema }) => {
147
147
  }
148
148
  };
149
149
  }
150
+ if (attribute.type === "enumeration") {
151
+ filter = {
152
+ ...filter,
153
+ options: attribute.enum.map((value) => ({
154
+ label: value,
155
+ value
156
+ }))
157
+ };
158
+ }
150
159
  return filter;
151
160
  }).filter(Boolean).toSorted((a, b) => formatter.compare(a.label, b.label));
152
161
  }, [
@@ -288,7 +297,15 @@ const MediaSingle = ({ url, mime, alternativeText, name, ext, formats }) => {
288
297
  if (mime.includes("image")) {
289
298
  const thumbnail = formats?.thumbnail?.url;
290
299
  const mediaURL = usePrev.prefixFileUrlWithBackendUrl(thumbnail) || fileURL;
291
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Avatar, { src: mediaURL, alt: alternativeText || name, preview: true });
300
+ return /* @__PURE__ */ jsxRuntime.jsx(
301
+ designSystem.Avatar.Item,
302
+ {
303
+ src: mediaURL,
304
+ alt: alternativeText || name,
305
+ fallback: alternativeText || name,
306
+ preview: true
307
+ }
308
+ );
292
309
  }
293
310
  const fileExtension = getFileExtension(ext);
294
311
  const fileName = name.length > 100 ? `${name.substring(0, 100)}...` : name;
@@ -317,7 +334,7 @@ const FileTypography = styledComponents.styled(designSystem.Typography)`
317
334
  line-height: 0.9rem;
318
335
  `;
319
336
  const MediaMultiple = ({ content }) => {
320
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.AvatarGroup, { children: content.map((file, index2) => {
337
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Avatar.Group, { children: content.map((file, index2) => {
321
338
  const key = `${file.id}${index2}`;
322
339
  if (index2 === 3) {
323
340
  const remainingFiles = `+${content.length - 3}`;
@@ -452,8 +469,6 @@ const hasContent = (content, mainField, attribute) => {
452
469
  };
453
470
  const isSingleRelation = (type) => ["oneToOne", "manyToOne", "oneToOneMorph"].includes(type);
454
471
  const ViewSettingsMenu = (props) => {
455
- const [isVisible, setIsVisible] = React__namespace.useState(false);
456
- const cogButtonRef = React__namespace.useRef(null);
457
472
  const permissions = hooks.useTypedSelector(
458
473
  (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations ?? []
459
474
  );
@@ -462,52 +477,37 @@ const ViewSettingsMenu = (props) => {
462
477
  const {
463
478
  allowedActions: { canConfigureView }
464
479
  } = strapiAdmin.useRBAC(permissions);
465
- const handleToggle = () => {
466
- setIsVisible((prev) => !prev);
467
- };
468
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
469
- /* @__PURE__ */ jsxRuntime.jsx(
480
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
481
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
470
482
  designSystem.IconButton,
471
483
  {
472
484
  label: formatMessage({
473
485
  id: "components.ViewSettings.tooltip",
474
486
  defaultMessage: "View Settings"
475
487
  }),
476
- ref: cogButtonRef,
477
- onClick: handleToggle,
478
488
  children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cog, {})
479
489
  }
480
- ),
481
- isVisible && /* @__PURE__ */ jsxRuntime.jsx(
482
- designSystem.Popover,
483
- {
484
- placement: "bottom-end",
485
- source: cogButtonRef,
486
- onDismiss: handleToggle,
487
- spacing: 4,
488
- padding: 3,
489
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "stretch", direction: "column", gap: 3, children: [
490
- canConfigureView ? /* @__PURE__ */ jsxRuntime.jsx(
491
- designSystem.LinkButton,
492
- {
493
- size: "S",
494
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ListPlus, {}),
495
- variant: "secondary",
496
- tag: reactRouterDom.NavLink,
497
- to: {
498
- pathname: "configurations/list",
499
- search: query.plugins ? qs.stringify({ plugins: query.plugins }, { encode: false }) : ""
500
- },
501
- children: formatMessage({
502
- id: "app.links.configure-view",
503
- defaultMessage: "Configure the view"
504
- })
505
- }
506
- ) : null,
507
- /* @__PURE__ */ jsxRuntime.jsx(FieldPicker, { ...props })
508
- ] })
509
- }
510
- )
490
+ ) }),
491
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { side: "bottom", align: "end", sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "stretch", direction: "column", padding: 3, gap: 3, children: [
492
+ canConfigureView ? /* @__PURE__ */ jsxRuntime.jsx(
493
+ designSystem.LinkButton,
494
+ {
495
+ size: "S",
496
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ListPlus, {}),
497
+ variant: "secondary",
498
+ tag: reactRouterDom.NavLink,
499
+ to: {
500
+ pathname: "configurations/list",
501
+ search: query.plugins ? qs.stringify({ plugins: query.plugins }, { encode: false }) : ""
502
+ },
503
+ children: formatMessage({
504
+ id: "app.links.configure-view",
505
+ defaultMessage: "Configure the view"
506
+ })
507
+ }
508
+ ) : null,
509
+ /* @__PURE__ */ jsxRuntime.jsx(FieldPicker, { ...props })
510
+ ] }) })
511
511
  ] });
512
512
  };
513
513
  const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
@@ -544,37 +544,29 @@ const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
544
544
  ] }),
545
545
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", children: columns.map((header) => {
546
546
  const isActive = headers.includes(header.name);
547
- return /* @__PURE__ */ jsxRuntime.jsxs(
548
- ChackboxWrapper,
547
+ return /* @__PURE__ */ jsxRuntime.jsx(
548
+ designSystem.Flex,
549
549
  {
550
550
  wrap: "wrap",
551
551
  gap: 2,
552
- tag: "label",
553
552
  background: isActive ? "primary100" : "transparent",
554
553
  hasRadius: true,
555
554
  padding: 2,
556
- children: [
557
- /* @__PURE__ */ jsxRuntime.jsx(
558
- designSystem.BaseCheckbox,
559
- {
560
- onChange: () => handleChange(header.name),
561
- value: isActive,
562
- name: header.name
563
- }
564
- ),
565
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontSize: 1, children: header.label })
566
- ]
555
+ children: /* @__PURE__ */ jsxRuntime.jsx(
556
+ designSystem.Checkbox,
557
+ {
558
+ onCheckedChange: () => handleChange(header.name),
559
+ checked: isActive,
560
+ name: header.name,
561
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontSize: 1, children: header.label })
562
+ }
563
+ )
567
564
  },
568
565
  header.name
569
566
  );
570
567
  }) })
571
568
  ] });
572
569
  };
573
- const ChackboxWrapper = styledComponents.styled(designSystem.Flex)`
574
- :hover {
575
- background-color: ${(props) => props.theme.colors.primary100};
576
- }
577
- `;
578
570
  const { INJECT_COLUMN_IN_TABLE } = index.HOOKS;
579
571
  const ListViewPage = () => {
580
572
  const { trackUsage } = strapiAdmin.useTracking();
@@ -602,7 +594,7 @@ const ListViewPage = () => {
602
594
  sort: list.settings.defaultSortBy ? `${list.settings.defaultSortBy}:${list.settings.defaultSortOrder}` : ""
603
595
  });
604
596
  const params = React__namespace.useMemo(() => index.buildValidParams(query), [query]);
605
- const { data, error, isLoading } = index.useGetAllDocumentsQuery({
597
+ const { data, error, isFetching } = index.useGetAllDocumentsQuery({
606
598
  model,
607
599
  params
608
600
  });
@@ -660,7 +652,7 @@ const ListViewPage = () => {
660
652
  }
661
653
  return formattedHeaders;
662
654
  }, [displayedHeaders, formatMessage, list, runHookWaterfall, schema?.options?.draftAndPublish]);
663
- if (isLoading) {
655
+ if (isFetching) {
664
656
  return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
665
657
  }
666
658
  if (error) {
@@ -726,7 +718,7 @@ const ListViewPage = () => {
726
718
  }
727
719
  ),
728
720
  /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 4, direction: "column", alignItems: "stretch", children: [
729
- /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Root, { rows: results, headers: tableHeaders, isLoading, children: [
721
+ /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Root, { rows: results, headers: tableHeaders, isLoading: isFetching, children: [
730
722
  /* @__PURE__ */ jsxRuntime.jsx(TableActionsBar, {}),
731
723
  /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Content, { children: [
732
724
  /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Head, { children: [
@@ -848,4 +840,4 @@ const ProtectedListViewPage = () => {
848
840
  };
849
841
  exports.ListViewPage = ListViewPage;
850
842
  exports.ProtectedListViewPage = ProtectedListViewPage;
851
- //# sourceMappingURL=ListViewPage-CA3I75m5.js.map
843
+ //# sourceMappingURL=ListViewPage-BsLiH2-2.js.map