@strapi/content-manager 0.0.0-experimental.e60ec1829240dae21c1e1d29076681c322288813 → 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 (174) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{CardDragPreview-DSVYodBX.js → CardDragPreview-C0QyJgRA.js} +10 -14
  3. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
  4. package/dist/_chunks/{CardDragPreview-ikSG4M46.mjs → CardDragPreview-DOxamsuj.mjs} +7 -9
  5. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
  6. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js → ComponentConfigurationPage-5ukroXAh.js} +3 -3
  7. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js.map → ComponentConfigurationPage-5ukroXAh.js.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs → ComponentConfigurationPage-BAgyHiMm.mjs} +3 -3
  9. package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs.map → ComponentConfigurationPage-BAgyHiMm.mjs.map} +1 -1
  10. package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-BXdiCGQp.js} +8 -2
  11. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +1 -0
  12. package/dist/_chunks/{ComponentIcon-BOFnK76n.mjs → ComponentIcon-u4bIXTFY.mjs} +9 -3
  13. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
  14. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs → EditConfigurationPage-DmoXawIh.mjs} +3 -3
  15. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs.map → EditConfigurationPage-DmoXawIh.mjs.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js → EditConfigurationPage-Xp7lun0f.js} +3 -3
  17. package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js.map → EditConfigurationPage-Xp7lun0f.js.map} +1 -1
  18. package/dist/_chunks/{EditViewPage-DDS6H9HO.mjs → EditViewPage-BLsjc5F-.mjs} +47 -47
  19. package/dist/_chunks/EditViewPage-BLsjc5F-.mjs.map +1 -0
  20. package/dist/_chunks/{EditViewPage-DvNpQkam.js → EditViewPage-C-ukDOB7.js} +46 -48
  21. package/dist/_chunks/EditViewPage-C-ukDOB7.js.map +1 -0
  22. package/dist/_chunks/{Field-DmVKIAOo.js → Field-Bfph5SOd.js} +953 -782
  23. package/dist/_chunks/Field-Bfph5SOd.js.map +1 -0
  24. package/dist/_chunks/{Field-6gvGdPBV.mjs → Field-Cs7duwWd.mjs} +901 -729
  25. package/dist/_chunks/Field-Cs7duwWd.mjs.map +1 -0
  26. package/dist/_chunks/{Form-CPZC9vWa.js → Form-CPYqIWDG.js} +39 -38
  27. package/dist/_chunks/Form-CPYqIWDG.js.map +1 -0
  28. package/dist/_chunks/{Form-DW6K1IH-.mjs → Form-Dg_GS5TQ.mjs} +39 -37
  29. package/dist/_chunks/Form-Dg_GS5TQ.mjs.map +1 -0
  30. package/dist/_chunks/{History-DeAPlvtv.js → History-DNQkXANT.js} +149 -56
  31. package/dist/_chunks/History-DNQkXANT.js.map +1 -0
  32. package/dist/_chunks/{History-Dmr9fmUA.mjs → History-wrnHqf09.mjs} +148 -54
  33. package/dist/_chunks/History-wrnHqf09.mjs.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-DPCwW5Vr.js → ListConfigurationPage-CUQxfpjT.js} +58 -59
  35. package/dist/_chunks/ListConfigurationPage-CUQxfpjT.js.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-DhwvYcNv.mjs → ListConfigurationPage-DScmJVkW.mjs} +54 -54
  37. package/dist/_chunks/ListConfigurationPage-DScmJVkW.mjs.map +1 -0
  38. package/dist/_chunks/{ListViewPage-5ySZ-VUs.js → ListViewPage-BsLiH2-2.js} +92 -108
  39. package/dist/_chunks/ListViewPage-BsLiH2-2.js.map +1 -0
  40. package/dist/_chunks/{ListViewPage-BtAwuYLE.mjs → ListViewPage-C4IvrMgY.mjs} +87 -103
  41. package/dist/_chunks/ListViewPage-C4IvrMgY.mjs.map +1 -0
  42. package/dist/_chunks/{NoContentTypePage-DOC_yWOf.js → NoContentTypePage-BZ-PnGAf.js} +3 -3
  43. package/dist/_chunks/NoContentTypePage-BZ-PnGAf.js.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-DSPxnxxp.mjs → NoContentTypePage-Djg8nPlj.mjs} +3 -3
  45. package/dist/_chunks/NoContentTypePage-Djg8nPlj.mjs.map +1 -0
  46. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs → NoPermissionsPage-DSP7R-hv.mjs} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs.map → NoPermissionsPage-DSP7R-hv.mjs.map} +1 -1
  48. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js → NoPermissionsPage-_lUqjGW3.js} +2 -2
  49. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js.map → NoPermissionsPage-_lUqjGW3.js.map} +1 -1
  50. package/dist/_chunks/{Relations-J8cscLlR.mjs → Relations-BZr8tL0R.mjs} +66 -56
  51. package/dist/_chunks/Relations-BZr8tL0R.mjs.map +1 -0
  52. package/dist/_chunks/{Relations-CgWtgnPe.js → Relations-CtELXYIK.js} +70 -61
  53. package/dist/_chunks/Relations-CtELXYIK.js.map +1 -0
  54. package/dist/_chunks/{en-MBPul9Su.mjs → en-BrCTWlZv.mjs} +11 -4
  55. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-BrCTWlZv.mjs.map} +1 -1
  56. package/dist/_chunks/{en-C-V1_90f.js → en-uOUIxfcQ.js} +11 -4
  57. package/dist/_chunks/{en-C-V1_90f.js.map → en-uOUIxfcQ.js.map} +1 -1
  58. package/dist/_chunks/{index-C6AH2hEl.js → index-OerGjbAN.js} +1588 -837
  59. package/dist/_chunks/index-OerGjbAN.js.map +1 -0
  60. package/dist/_chunks/{index-CwRRo1V9.mjs → index-c_5DdJi-.mjs} +1610 -858
  61. package/dist/_chunks/index-c_5DdJi-.mjs.map +1 -0
  62. package/dist/_chunks/{layout-B_SXLhqf.js → layout-Ci7qHlFb.js} +30 -27
  63. package/dist/_chunks/layout-Ci7qHlFb.js.map +1 -0
  64. package/dist/_chunks/{layout-jIDzX0Fp.mjs → layout-oPBiO7RY.mjs} +29 -24
  65. package/dist/_chunks/layout-oPBiO7RY.mjs.map +1 -0
  66. package/dist/_chunks/{relations-CuvIgCqI.mjs → relations-BIdWFjdq.mjs} +2 -2
  67. package/dist/_chunks/{relations-CuvIgCqI.mjs.map → relations-BIdWFjdq.mjs.map} +1 -1
  68. package/dist/_chunks/{relations-iBMa_OFG.js → relations-COBpStiF.js} +2 -2
  69. package/dist/_chunks/{relations-iBMa_OFG.js.map → relations-COBpStiF.js.map} +1 -1
  70. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +1 -1
  71. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +1 -1
  72. package/dist/_chunks/usePrev-B9w_-eYc.js +15 -0
  73. package/dist/_chunks/usePrev-B9w_-eYc.js.map +1 -0
  74. package/dist/_chunks/usePrev-DH6iah0A.mjs +16 -0
  75. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +1 -0
  76. package/dist/admin/index.js +2 -1
  77. package/dist/admin/index.js.map +1 -1
  78. package/dist/admin/index.mjs +5 -4
  79. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  80. package/dist/admin/src/content-manager.d.ts +3 -3
  81. package/dist/admin/src/exports.d.ts +1 -0
  82. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  83. package/dist/admin/src/history/index.d.ts +3 -0
  84. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  85. package/dist/admin/src/hooks/useDocument.d.ts +5 -8
  86. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  87. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  88. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  89. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  90. package/dist/admin/src/index.d.ts +1 -0
  91. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +11 -4
  92. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  93. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  94. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  95. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  96. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
  97. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  98. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  99. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  100. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  101. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +59 -52
  102. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  103. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  104. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  105. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  106. package/dist/admin/src/services/api.d.ts +2 -3
  107. package/dist/admin/src/services/components.d.ts +2 -2
  108. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  109. package/dist/admin/src/services/documents.d.ts +29 -17
  110. package/dist/admin/src/services/init.d.ts +2 -2
  111. package/dist/admin/src/services/relations.d.ts +3 -3
  112. package/dist/admin/src/services/uid.d.ts +3 -3
  113. package/dist/admin/src/utils/api.d.ts +4 -18
  114. package/dist/admin/src/utils/validation.d.ts +1 -6
  115. package/dist/server/index.js +309 -218
  116. package/dist/server/index.js.map +1 -1
  117. package/dist/server/index.mjs +317 -226
  118. package/dist/server/index.mjs.map +1 -1
  119. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  120. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  121. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  122. package/dist/server/src/controllers/utils/metadata.d.ts +8 -0
  123. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  124. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  125. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  126. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  127. package/dist/server/src/history/services/history.d.ts.map +1 -1
  128. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  129. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  130. package/dist/server/src/index.d.ts +18 -39
  131. package/dist/server/src/index.d.ts.map +1 -1
  132. package/dist/server/src/services/document-manager.d.ts +13 -12
  133. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  134. package/dist/server/src/services/document-metadata.d.ts +8 -29
  135. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  136. package/dist/server/src/services/index.d.ts +18 -39
  137. package/dist/server/src/services/index.d.ts.map +1 -1
  138. package/dist/server/src/services/utils/populate.d.ts +8 -1
  139. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  140. package/dist/shared/contracts/collection-types.d.ts +14 -6
  141. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  142. package/dist/shared/contracts/relations.d.ts +2 -2
  143. package/dist/shared/contracts/relations.d.ts.map +1 -1
  144. package/package.json +13 -14
  145. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  146. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  147. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  148. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  149. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs.map +0 -1
  150. package/dist/_chunks/EditViewPage-DvNpQkam.js.map +0 -1
  151. package/dist/_chunks/Field-6gvGdPBV.mjs.map +0 -1
  152. package/dist/_chunks/Field-DmVKIAOo.js.map +0 -1
  153. package/dist/_chunks/Form-CPZC9vWa.js.map +0 -1
  154. package/dist/_chunks/Form-DW6K1IH-.mjs.map +0 -1
  155. package/dist/_chunks/History-DeAPlvtv.js.map +0 -1
  156. package/dist/_chunks/History-Dmr9fmUA.mjs.map +0 -1
  157. package/dist/_chunks/ListConfigurationPage-DPCwW5Vr.js.map +0 -1
  158. package/dist/_chunks/ListConfigurationPage-DhwvYcNv.mjs.map +0 -1
  159. package/dist/_chunks/ListViewPage-5ySZ-VUs.js.map +0 -1
  160. package/dist/_chunks/ListViewPage-BtAwuYLE.mjs.map +0 -1
  161. package/dist/_chunks/NoContentTypePage-DOC_yWOf.js.map +0 -1
  162. package/dist/_chunks/NoContentTypePage-DSPxnxxp.mjs.map +0 -1
  163. package/dist/_chunks/Relations-CgWtgnPe.js.map +0 -1
  164. package/dist/_chunks/Relations-J8cscLlR.mjs.map +0 -1
  165. package/dist/_chunks/index-C6AH2hEl.js.map +0 -1
  166. package/dist/_chunks/index-CwRRo1V9.mjs.map +0 -1
  167. package/dist/_chunks/layout-B_SXLhqf.js.map +0 -1
  168. package/dist/_chunks/layout-jIDzX0Fp.mjs.map +0 -1
  169. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  170. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  171. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  172. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  173. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  174. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
@@ -9,13 +9,13 @@ const isEqual = require("lodash/isEqual");
9
9
  const qs = require("qs");
10
10
  const reactIntl = require("react-intl");
11
11
  const reactRouterDom = require("react-router-dom");
12
- const styled = require("styled-components");
13
- const index = require("./index-C6AH2hEl.js");
12
+ const styledComponents = require("styled-components");
13
+ const index = require("./index-OerGjbAN.js");
14
+ const usePrev = require("./usePrev-B9w_-eYc.js");
14
15
  const isEmpty = require("lodash/isEmpty");
15
16
  const parseISO = require("date-fns/parseISO");
16
17
  const toString = require("lodash/toString");
17
- const urls = require("./urls-DzZya_gm.js");
18
- const relations = require("./relations-iBMa_OFG.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) {
@@ -38,17 +38,9 @@ function _interopNamespace(e) {
38
38
  }
39
39
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
40
40
  const isEqual__default = /* @__PURE__ */ _interopDefault(isEqual);
41
- const styled__default = /* @__PURE__ */ _interopDefault(styled);
42
41
  const isEmpty__default = /* @__PURE__ */ _interopDefault(isEmpty);
43
42
  const parseISO__default = /* @__PURE__ */ _interopDefault(parseISO);
44
43
  const toString__default = /* @__PURE__ */ _interopDefault(toString);
45
- const usePrev = (value) => {
46
- const ref = React.useRef();
47
- React.useEffect(() => {
48
- ref.current = value;
49
- }, [value]);
50
- return ref.current;
51
- };
52
44
  const NOT_ALLOWED_FILTERS = [
53
45
  "json",
54
46
  "component",
@@ -155,6 +147,15 @@ const FiltersImpl = ({ disabled, schema }) => {
155
147
  }
156
148
  };
157
149
  }
150
+ if (attribute.type === "enumeration") {
151
+ filter = {
152
+ ...filter,
153
+ options: attribute.enum.map((value) => ({
154
+ label: value,
155
+ value
156
+ }))
157
+ };
158
+ }
158
159
  return filter;
159
160
  }).filter(Boolean).toSorted((a, b) => formatter.compare(a.label, b.label));
160
161
  }, [
@@ -262,11 +263,8 @@ const SingleComponent = ({ content, mainField }) => {
262
263
  if (!mainField) {
263
264
  return null;
264
265
  }
265
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label: content[mainField.name], children: /* @__PURE__ */ jsxRuntime.jsx(SingleComponentTypography, { textColor: "neutral800", ellipsis: true, children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: mainField.type, value: content[mainField.name] }) }) });
266
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label: content[mainField.name], children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { maxWidth: "25rem", textColor: "neutral800", ellipsis: true, children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: mainField.type, value: content[mainField.name] }) }) });
266
267
  };
267
- const SingleComponentTypography = styled__default.default(designSystem.Typography)`
268
- max-width: 250px;
269
- `;
270
268
  const RepeatableComponent = ({ content, mainField }) => {
271
269
  const { formatMessage } = reactIntl.useIntl();
272
270
  if (!mainField) {
@@ -284,13 +282,10 @@ const RepeatableComponent = ({ content, mainField }) => {
284
282
  { number: content.length }
285
283
  )
286
284
  ] }),
287
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Content, { children: content.map((item) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(RepeatableComponentTypography, { ellipsis: true, children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: mainField.type, value: item[mainField.name] }) }) }, item.id)) })
285
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Content, { children: content.map((item) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { maxWidth: "50rem", ellipsis: true, children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: mainField.type, value: item[mainField.name] }) }) }, item.id)) })
288
286
  ] });
289
287
  };
290
- const RepeatableComponentTypography = styled__default.default(designSystem.Typography)`
291
- max-width: 500px;
292
- `;
293
- const MenuTrigger$1 = styled__default.default(designSystem.Menu.Trigger)`
288
+ const MenuTrigger$1 = styledComponents.styled(designSystem.Menu.Trigger)`
294
289
  svg {
295
290
  width: 0.6rem;
296
291
  height: 0.4rem;
@@ -298,11 +293,19 @@ const MenuTrigger$1 = styled__default.default(designSystem.Menu.Trigger)`
298
293
  `;
299
294
  const getFileExtension = (ext) => ext && ext[0] === "." ? ext.substring(1) : ext;
300
295
  const MediaSingle = ({ url, mime, alternativeText, name, ext, formats }) => {
301
- const fileURL = urls.prefixFileUrlWithBackendUrl(url);
296
+ const fileURL = usePrev.prefixFileUrlWithBackendUrl(url);
302
297
  if (mime.includes("image")) {
303
298
  const thumbnail = formats?.thumbnail?.url;
304
- const mediaURL = urls.prefixFileUrlWithBackendUrl(thumbnail) || fileURL;
305
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Avatar, { src: mediaURL, alt: alternativeText || name, preview: true });
299
+ const mediaURL = usePrev.prefixFileUrlWithBackendUrl(thumbnail) || fileURL;
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
+ );
306
309
  }
307
310
  const fileExtension = getFileExtension(ext);
308
311
  const fileName = name.length > 100 ? `${name.substring(0, 100)}...` : name;
@@ -312,7 +315,7 @@ const FileWrapper = ({ children }) => {
312
315
  return /* @__PURE__ */ jsxRuntime.jsx(
313
316
  designSystem.Flex,
314
317
  {
315
- as: "span",
318
+ tag: "span",
316
319
  position: "relative",
317
320
  borderRadius: "50%",
318
321
  width: "26px",
@@ -326,12 +329,12 @@ const FileWrapper = ({ children }) => {
326
329
  }
327
330
  );
328
331
  };
329
- const FileTypography = styled__default.default(designSystem.Typography)`
332
+ const FileTypography = styledComponents.styled(designSystem.Typography)`
330
333
  font-size: 0.9rem;
331
334
  line-height: 0.9rem;
332
335
  `;
333
336
  const MediaMultiple = ({ content }) => {
334
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.AvatarGroup, { children: content.map((file, index2) => {
337
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Avatar.Group, { children: content.map((file, index2) => {
335
338
  const key = `${file.id}${index2}`;
336
339
  if (index2 === 3) {
337
340
  const remainingFiles = `+${content.length - 3}`;
@@ -344,11 +347,8 @@ const MediaMultiple = ({ content }) => {
344
347
  }) });
345
348
  };
346
349
  const RelationSingle = ({ mainField, content }) => {
347
- return /* @__PURE__ */ jsxRuntime.jsx(TypographyMaxWidth$1, { textColor: "neutral800", ellipsis: true, children: relations.getRelationLabel(content, mainField) });
350
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { maxWidth: "50rem", textColor: "neutral800", ellipsis: true, children: relations.getRelationLabel(content, mainField) });
348
351
  };
349
- const TypographyMaxWidth$1 = styled__default.default(designSystem.Typography)`
350
- max-width: 500px;
351
- `;
352
352
  const RelationMultiple = ({ mainField, content, rowId, name }) => {
353
353
  const { model } = index.useDoc();
354
354
  const { formatMessage } = reactIntl.useIntl();
@@ -393,7 +393,7 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
393
393
  defaultMessage: "Relations are loading"
394
394
  }) }) }),
395
395
  data?.results && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
396
- data.results.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(TypographyMaxWidth$1, { ellipsis: true, children: relations.getRelationLabel(entry, mainField) }) }, entry.documentId)),
396
+ data.results.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { maxWidth: "50rem", ellipsis: true, children: relations.getRelationLabel(entry, mainField) }) }, entry.documentId)),
397
397
  data?.pagination && data?.pagination.total > 10 && /* @__PURE__ */ jsxRuntime.jsx(
398
398
  designSystem.Menu.Item,
399
399
  {
@@ -409,7 +409,7 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
409
409
  ] })
410
410
  ] });
411
411
  };
412
- const MenuTrigger = styled__default.default(designSystem.Menu.Trigger)`
412
+ const MenuTrigger = styledComponents.styled(designSystem.Menu.Trigger)`
413
413
  svg {
414
414
  width: 0.6rem;
415
415
  height: 0.4rem;
@@ -437,14 +437,11 @@ const CellContent = ({ content, mainField, attribute, rowId, name }) => {
437
437
  }
438
438
  return /* @__PURE__ */ jsxRuntime.jsx(SingleComponent, { mainField, content });
439
439
  case "string":
440
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { description: content, children: /* @__PURE__ */ jsxRuntime.jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: attribute.type, value: content }) }) });
440
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { description: content, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { maxWidth: "30rem", ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: attribute.type, value: content }) }) });
441
441
  default:
442
- return /* @__PURE__ */ jsxRuntime.jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: attribute.type, value: content }) });
442
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { maxWidth: "30rem", ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsxRuntime.jsx(CellValue, { type: attribute.type, value: content }) });
443
443
  }
444
444
  };
445
- const TypographyMaxWidth = styled__default.default(designSystem.Typography)`
446
- max-width: 300px;
447
- `;
448
445
  const hasContent = (content, mainField, attribute) => {
449
446
  if (attribute.type === "component") {
450
447
  if (attribute.repeatable || !mainField) {
@@ -472,8 +469,6 @@ const hasContent = (content, mainField, attribute) => {
472
469
  };
473
470
  const isSingleRelation = (type) => ["oneToOne", "manyToOne", "oneToOneMorph"].includes(type);
474
471
  const ViewSettingsMenu = (props) => {
475
- const [isVisible, setIsVisible] = React__namespace.useState(false);
476
- const cogButtonRef = React__namespace.useRef(null);
477
472
  const permissions = hooks.useTypedSelector(
478
473
  (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations ?? []
479
474
  );
@@ -482,52 +477,37 @@ const ViewSettingsMenu = (props) => {
482
477
  const {
483
478
  allowedActions: { canConfigureView }
484
479
  } = strapiAdmin.useRBAC(permissions);
485
- const handleToggle = () => {
486
- setIsVisible((prev) => !prev);
487
- };
488
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
489
- /* @__PURE__ */ jsxRuntime.jsx(
480
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
481
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
490
482
  designSystem.IconButton,
491
483
  {
492
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cog, {}),
493
484
  label: formatMessage({
494
485
  id: "components.ViewSettings.tooltip",
495
486
  defaultMessage: "View Settings"
496
487
  }),
497
- ref: cogButtonRef,
498
- onClick: handleToggle
488
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cog, {})
499
489
  }
500
- ),
501
- isVisible && /* @__PURE__ */ jsxRuntime.jsx(
502
- designSystem.Popover,
503
- {
504
- placement: "bottom-end",
505
- source: cogButtonRef,
506
- onDismiss: handleToggle,
507
- spacing: 4,
508
- padding: 3,
509
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "stretch", direction: "column", gap: 3, children: [
510
- canConfigureView ? /* @__PURE__ */ jsxRuntime.jsx(
511
- designSystem.LinkButton,
512
- {
513
- size: "S",
514
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ListPlus, {}),
515
- variant: "secondary",
516
- as: reactRouterDom.NavLink,
517
- to: {
518
- pathname: "configurations/list",
519
- search: query.plugins ? qs.stringify({ plugins: query.plugins }, { encode: false }) : ""
520
- },
521
- children: formatMessage({
522
- id: "app.links.configure-view",
523
- defaultMessage: "Configure the view"
524
- })
525
- }
526
- ) : null,
527
- /* @__PURE__ */ jsxRuntime.jsx(FieldPicker, { ...props })
528
- ] })
529
- }
530
- )
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
+ ] }) })
531
511
  ] });
532
512
  };
533
513
  const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
@@ -551,9 +531,9 @@ const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
551
531
  const handleReset = () => {
552
532
  resetHeaders();
553
533
  };
554
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { as: "fieldset", direction: "column", alignItems: "stretch", gap: 3, children: [
534
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "fieldset", direction: "column", alignItems: "stretch", gap: 3, borderWidth: 0, children: [
555
535
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
556
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "legend", variant: "pi", fontWeight: "bold", children: formatMessage({
536
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "legend", variant: "pi", fontWeight: "bold", children: formatMessage({
557
537
  id: "containers.list.displayedFields",
558
538
  defaultMessage: "Displayed fields"
559
539
  }) }),
@@ -564,37 +544,29 @@ const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
564
544
  ] }),
565
545
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", children: columns.map((header) => {
566
546
  const isActive = headers.includes(header.name);
567
- return /* @__PURE__ */ jsxRuntime.jsxs(
568
- ChackboxWrapper,
547
+ return /* @__PURE__ */ jsxRuntime.jsx(
548
+ designSystem.Flex,
569
549
  {
570
550
  wrap: "wrap",
571
551
  gap: 2,
572
- as: "label",
573
552
  background: isActive ? "primary100" : "transparent",
574
553
  hasRadius: true,
575
554
  padding: 2,
576
- children: [
577
- /* @__PURE__ */ jsxRuntime.jsx(
578
- designSystem.BaseCheckbox,
579
- {
580
- onChange: () => handleChange(header.name),
581
- value: isActive,
582
- name: header.name
583
- }
584
- ),
585
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontSize: 1, children: header.label })
586
- ]
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
+ )
587
564
  },
588
565
  header.name
589
566
  );
590
567
  }) })
591
568
  ] });
592
569
  };
593
- const ChackboxWrapper = styled__default.default(designSystem.Flex)`
594
- :hover {
595
- background-color: ${(props) => props.theme.colors.primary100};
596
- }
597
- `;
598
570
  const { INJECT_COLUMN_IN_TABLE } = index.HOOKS;
599
571
  const ListViewPage = () => {
600
572
  const { trackUsage } = strapiAdmin.useTracking();
@@ -605,7 +577,7 @@ const ListViewPage = () => {
605
577
  const { collectionType, model, schema } = index.useDoc();
606
578
  const { list } = index.useDocumentLayout(model);
607
579
  const [displayedHeaders, setDisplayedHeaders] = React__namespace.useState([]);
608
- const listLayout = usePrev(list.layout);
580
+ const listLayout = usePrev.usePrev(list.layout);
609
581
  React__namespace.useEffect(() => {
610
582
  if (!isEqual__default.default(listLayout, list.layout)) {
611
583
  setDisplayedHeaders(list.layout);
@@ -622,7 +594,7 @@ const ListViewPage = () => {
622
594
  sort: list.settings.defaultSortBy ? `${list.settings.defaultSortBy}:${list.settings.defaultSortOrder}` : ""
623
595
  });
624
596
  const params = React__namespace.useMemo(() => index.buildValidParams(query), [query]);
625
- const { data, error, isLoading } = index.useGetAllDocumentsQuery({
597
+ const { data, error, isFetching } = index.useGetAllDocumentsQuery({
626
598
  model,
627
599
  params
628
600
  });
@@ -680,7 +652,7 @@ const ListViewPage = () => {
680
652
  }
681
653
  return formattedHeaders;
682
654
  }, [displayedHeaders, formatMessage, list, runHookWaterfall, schema?.options?.draftAndPublish]);
683
- if (isLoading) {
655
+ if (isFetching) {
684
656
  return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
685
657
  }
686
658
  if (error) {
@@ -746,8 +718,8 @@ const ListViewPage = () => {
746
718
  }
747
719
  ),
748
720
  /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 4, direction: "column", alignItems: "stretch", children: [
749
- /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Root, { rows: results, headers: tableHeaders, isLoading, children: [
750
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.ActionBar, {}),
721
+ /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Root, { rows: results, headers: tableHeaders, isLoading: isFetching, children: [
722
+ /* @__PURE__ */ jsxRuntime.jsx(TableActionsBar, {}),
751
723
  /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Content, { children: [
752
724
  /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Head, { children: [
753
725
  /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.HeaderCheckboxCell, {}),
@@ -805,10 +777,22 @@ const ListViewPage = () => {
805
777
  ] }) })
806
778
  ] });
807
779
  };
808
- const ActionsCell = styled__default.default(strapiAdmin.Table.Cell)`
780
+ const ActionsCell = styledComponents.styled(strapiAdmin.Table.Cell)`
809
781
  display: flex;
810
782
  justify-content: flex-end;
811
783
  `;
784
+ const TableActionsBar = () => {
785
+ const selectRow = strapiAdmin.useTable("TableActionsBar", (state) => state.selectRow);
786
+ const [{ query }] = strapiAdmin.useQueryParams();
787
+ const locale = query?.plugins?.i18n?.locale;
788
+ const prevLocale = usePrev.usePrev(locale);
789
+ React__namespace.useEffect(() => {
790
+ if (prevLocale !== locale) {
791
+ selectRow([]);
792
+ }
793
+ }, [selectRow, prevLocale, locale]);
794
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.ActionBar, { children: /* @__PURE__ */ jsxRuntime.jsx(index.BulkActionsRenderer, {}) });
795
+ };
812
796
  const CreateButton = ({ variant }) => {
813
797
  const { formatMessage } = reactIntl.useIntl();
814
798
  const { trackUsage } = strapiAdmin.useTracking();
@@ -817,7 +801,7 @@ const CreateButton = ({ variant }) => {
817
801
  designSystem.Button,
818
802
  {
819
803
  variant,
820
- forwardedAs: reactRouterDom.Link,
804
+ tag: reactRouterDom.Link,
821
805
  onClick: () => {
822
806
  trackUsage("willCreateEntry", { status: "draft" });
823
807
  },
@@ -856,4 +840,4 @@ const ProtectedListViewPage = () => {
856
840
  };
857
841
  exports.ListViewPage = ListViewPage;
858
842
  exports.ProtectedListViewPage = ProtectedListViewPage;
859
- //# sourceMappingURL=ListViewPage-5ySZ-VUs.js.map
843
+ //# sourceMappingURL=ListViewPage-BsLiH2-2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListViewPage-BsLiH2-2.js","sources":["../../admin/src/pages/ListView/components/Filters.tsx","../../admin/src/pages/ListView/components/TableCells/CellValue.tsx","../../admin/src/pages/ListView/components/TableCells/Components.tsx","../../admin/src/pages/ListView/components/TableCells/Media.tsx","../../admin/src/pages/ListView/components/TableCells/Relations.tsx","../../admin/src/pages/ListView/components/TableCells/CellContent.tsx","../../admin/src/pages/ListView/components/ViewSettingsMenu.tsx","../../admin/src/pages/ListView/ListViewPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Filters,\n useField,\n useAuth,\n useTracking,\n useQueryParams,\n useAdminUsers,\n} from '@strapi/admin/strapi-admin';\nimport { Combobox, ComboboxOption, useCollator } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { CREATOR_FIELDS } from '../../../constants/attributes';\nimport { useContentTypeSchema } from '../../../hooks/useContentTypeSchema';\nimport { Schema } from '../../../hooks/useDocument';\nimport { useGetContentTypeConfigurationQuery } from '../../../services/contentTypes';\nimport { getMainField } from '../../../utils/attributes';\nimport { getDisplayName } from '../../../utils/users';\n\n/**\n * If new attributes are added, this list needs to be updated.\n */\nconst NOT_ALLOWED_FILTERS = [\n 'json',\n 'component',\n 'media',\n 'richtext',\n 'dynamiczone',\n 'password',\n 'blocks',\n];\nconst DEFAULT_ALLOWED_FILTERS = ['createdAt', 'updatedAt'];\nconst USER_FILTER_ATTRIBUTES = [...CREATOR_FIELDS, 'strapi_assignee'];\n\n/* -------------------------------------------------------------------------------------------------\n * Filters\n * -----------------------------------------------------------------------------------------------*/\ninterface FiltersProps {\n disabled?: boolean;\n schema: Schema;\n}\n\nconst FiltersImpl = ({ disabled, schema }: FiltersProps) => {\n const { attributes, uid: model, options } = schema;\n const { formatMessage, locale } = useIntl();\n const { trackUsage } = useTracking();\n const allPermissions = useAuth('FiltersImpl', (state) => state.permissions);\n const [{ query }] = useQueryParams<Filters.Query>();\n const { schemas } = useContentTypeSchema();\n\n const canReadAdminUsers = React.useMemo(\n () =>\n allPermissions.filter(\n (permission) => permission.action === 'admin::users.read' && permission.subject === null\n ).length > 0,\n [allPermissions]\n );\n\n const selectedUserIds = (query?.filters?.$and ?? []).reduce<string[]>((acc, filter) => {\n const [key, value] = Object.entries(filter)[0];\n if (typeof value.id !== 'object') {\n return acc;\n }\n\n const id = value.id.$eq || value.id.$ne;\n\n if (id && USER_FILTER_ATTRIBUTES.includes(key) && !acc.includes(id)) {\n acc.push(id);\n }\n\n return acc;\n }, []);\n\n const { data: userData, isLoading: isLoadingAdminUsers } = useAdminUsers(\n { filters: { id: { $in: selectedUserIds } } },\n {\n // fetch the list of admin users only if the filter contains users and the\n // current user has permissions to display users\n skip: selectedUserIds.length === 0 || !canReadAdminUsers,\n }\n );\n\n const { users = [] } = userData ?? {};\n\n const { metadata } = useGetContentTypeConfigurationQuery(model, {\n selectFromResult: ({ data }) => ({ metadata: data?.contentType.metadatas ?? {} }),\n });\n\n const formatter = useCollator(locale, {\n sensitivity: 'base',\n });\n\n const displayedFilters = React.useMemo(() => {\n const [{ properties: { fields = [] } = { fields: [] } }] = allPermissions.filter(\n (permission) =>\n permission.action === 'plugin::content-manager.explorer.read' &&\n permission.subject === model\n );\n\n const allowedFields = fields.filter((field) => {\n const attribute = attributes[field] ?? {};\n\n return attribute.type && !NOT_ALLOWED_FILTERS.includes(attribute.type);\n });\n\n return (\n [\n 'id',\n ...allowedFields,\n ...DEFAULT_ALLOWED_FILTERS,\n ...(canReadAdminUsers ? CREATOR_FIELDS : []),\n ]\n .map((name) => {\n const attribute = attributes[name];\n\n if (NOT_ALLOWED_FILTERS.includes(attribute.type)) {\n return null;\n }\n\n const { mainField: mainFieldName = '', label } = metadata[name].list;\n\n let filter: Filters.Filter = {\n name,\n label: label ?? '',\n mainField: getMainField(attribute, mainFieldName, { schemas, components: {} }),\n // @ts-expect-error – TODO: this is filtered out above in the `allowedFields` call but TS complains, is there a better way to solve this?\n type: attribute.type,\n };\n\n if (\n attribute.type === 'relation' &&\n 'target' in attribute &&\n attribute.target === 'admin::user'\n ) {\n filter = {\n ...filter,\n input: AdminUsersFilter,\n options: users.map((user) => ({\n label: getDisplayName(user),\n value: user.id.toString(),\n })),\n operators: [\n {\n label: formatMessage({\n id: 'components.FilterOptions.FILTER_TYPES.$eq',\n defaultMessage: 'is',\n }),\n value: '$eq',\n },\n {\n label: formatMessage({\n id: 'components.FilterOptions.FILTER_TYPES.$ne',\n defaultMessage: 'is not',\n }),\n value: '$ne',\n },\n ],\n mainField: {\n name: 'id',\n type: 'integer',\n },\n };\n }\n\n if (attribute.type === 'enumeration') {\n filter = {\n ...filter,\n options: attribute.enum.map((value) => ({\n label: value,\n value,\n })),\n };\n }\n\n return filter;\n })\n .filter(Boolean) as Filters.Filter[]\n ).toSorted((a, b) => formatter.compare(a.label, b.label));\n }, [\n allPermissions,\n canReadAdminUsers,\n model,\n attributes,\n metadata,\n schemas,\n users,\n formatMessage,\n formatter,\n ]);\n\n const onOpenChange = (isOpen: boolean) => {\n if (isOpen) {\n trackUsage('willFilterEntries');\n }\n };\n\n const handleFilterChange: Filters.Props['onChange'] = (data) => {\n const attribute = attributes[data.name];\n\n if (attribute) {\n trackUsage('didFilterEntries', {\n useRelation: attribute.type === 'relation',\n });\n }\n };\n\n return (\n <Filters.Root\n disabled={disabled}\n options={displayedFilters}\n onOpenChange={onOpenChange}\n onChange={handleFilterChange}\n >\n <Filters.Trigger />\n <Filters.Popover />\n <Filters.List />\n </Filters.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * AdminUsersFilter\n * -----------------------------------------------------------------------------------------------*/\n\nconst AdminUsersFilter = ({ name }: Filters.ValueInputProps) => {\n const [page, setPage] = React.useState(1);\n const { formatMessage } = useIntl();\n const { data, isLoading } = useAdminUsers({\n page,\n });\n const field = useField(name);\n\n const handleOpenChange = (isOpen?: boolean) => {\n if (!isOpen) {\n setPage(1);\n }\n };\n\n const users = data?.users || [];\n\n return (\n <Combobox\n value={field.value}\n aria-label={formatMessage({\n id: 'content-manager.components.Filters.usersSelect.label',\n defaultMessage: 'Search and select a user to filter',\n })}\n onOpenChange={handleOpenChange}\n onChange={(value) => field.onChange(name, value)}\n loading={isLoading}\n onLoadMore={() => setPage((prev) => prev + 1)}\n >\n {users.map((user) => {\n return (\n <ComboboxOption key={user.id} value={user.id.toString()}>\n {getDisplayName(user)}\n </ComboboxOption>\n );\n })}\n </Combobox>\n );\n};\n\nexport { FiltersImpl as Filters };\nexport type { FiltersProps };\n","import parseISO from 'date-fns/parseISO';\nimport toString from 'lodash/toString';\nimport { useIntl } from 'react-intl';\n\nimport type { Schema } from '@strapi/types';\n\ninterface CellValueProps {\n type: Schema.Attribute.Kind | 'custom';\n value: any;\n}\n\nconst CellValue = ({ type, value }: CellValueProps) => {\n const { formatDate, formatTime, formatNumber } = useIntl();\n let formattedValue = value;\n\n if (type === 'date') {\n formattedValue = formatDate(parseISO(value), { dateStyle: 'full' });\n }\n\n if (type === 'datetime') {\n formattedValue = formatDate(value, { dateStyle: 'full', timeStyle: 'short' });\n }\n\n if (type === 'time') {\n const [hour, minute, second] = value.split(':');\n const date = new Date();\n date.setHours(hour);\n date.setMinutes(minute);\n date.setSeconds(second);\n\n formattedValue = formatTime(date, {\n timeStyle: 'short',\n });\n }\n\n if (['float', 'decimal'].includes(type)) {\n formattedValue = formatNumber(value, {\n // Should be kept in sync with the corresponding value\n // in the design-system/NumberInput: https://github.com/strapi/design-system/blob/main/packages/strapi-design-system/src/NumberInput/NumberInput.js#L53\n maximumFractionDigits: 20,\n });\n }\n\n if (['integer', 'biginteger'].includes(type)) {\n formattedValue = formatNumber(value, { maximumFractionDigits: 0 });\n }\n\n return toString(formattedValue);\n};\n\nexport { CellValue };\nexport type { CellValueProps };\n","import { Badge, Tooltip, Typography, Menu } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { CellContentProps } from './CellContent';\nimport { CellValue } from './CellValue';\n\nimport type { Schema } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * SingleComponent\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SingleComponentProps extends Pick<CellContentProps, 'mainField'> {\n content: Schema.Attribute.Value<Schema.Attribute.Component<`${string}.${string}`, false>>;\n}\n\nconst SingleComponent = ({ content, mainField }: SingleComponentProps) => {\n if (!mainField) {\n return null;\n }\n\n return (\n <Tooltip label={content[mainField.name]}>\n <Typography maxWidth=\"25rem\" textColor=\"neutral800\" ellipsis>\n <CellValue type={mainField.type} value={content[mainField.name]} />\n </Typography>\n </Tooltip>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * RepeatableComponent\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RepeatableComponentProps extends Pick<CellContentProps, 'mainField'> {\n content: Schema.Attribute.Value<Schema.Attribute.Component<`${string}.${string}`, true>>;\n}\n\nconst RepeatableComponent = ({ content, mainField }: RepeatableComponentProps) => {\n const { formatMessage } = useIntl();\n\n if (!mainField) {\n return null;\n }\n\n return (\n <Menu.Root>\n <MenuTrigger onClick={(e) => e.stopPropagation()}>\n <Badge>{content.length}</Badge>{' '}\n {formatMessage(\n {\n id: 'content-manager.containers.list.items',\n defaultMessage: '{number, plural, =0 {items} one {item} other {items}}',\n },\n { number: content.length }\n )}\n </MenuTrigger>\n <Menu.Content>\n {content.map((item) => (\n <Menu.Item key={item.id} disabled>\n <Typography maxWidth=\"50rem\" ellipsis>\n <CellValue type={mainField.type} value={item[mainField.name]} />\n </Typography>\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n );\n};\n\n/**\n * TODO: this needs to be solved in the Design-System\n */\nconst MenuTrigger = styled(Menu.Trigger)`\n svg {\n width: 0.6rem;\n height: 0.4rem;\n }\n`;\n\nexport { SingleComponent, RepeatableComponent };\nexport type { SingleComponentProps, RepeatableComponentProps };\n","import * as React from 'react';\n\nimport { Avatar, Flex, Tooltip, Typography, TypographyComponent } from '@strapi/design-system';\nimport { styled } from 'styled-components';\n\nimport { prefixFileUrlWithBackendUrl } from '../../../../utils/urls';\n\nimport type { Data } from '@strapi/types';\n\ninterface MediaFile {\n id?: Data.ID;\n alternativeText?: string;\n ext: string;\n formats: {\n thumbnail?: {\n url?: string;\n };\n };\n mime: string;\n name: string;\n url: string;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Media\n * -----------------------------------------------------------------------------------------------*/\n\ninterface MediaSingleProps extends MediaFile {}\n\nconst getFileExtension = (ext: string) => (ext && ext[0] === '.' ? ext.substring(1) : ext);\n\nconst MediaSingle = ({ url, mime, alternativeText, name, ext, formats }: MediaSingleProps) => {\n const fileURL = prefixFileUrlWithBackendUrl(url)!;\n\n if (mime.includes('image')) {\n const thumbnail = formats?.thumbnail?.url;\n const mediaURL = prefixFileUrlWithBackendUrl(thumbnail) || fileURL;\n\n return (\n <Avatar.Item\n src={mediaURL}\n alt={alternativeText || name}\n fallback={alternativeText || name}\n preview\n />\n );\n }\n\n const fileExtension = getFileExtension(ext);\n const fileName = name.length > 100 ? `${name.substring(0, 100)}...` : name;\n\n return (\n <Tooltip description={fileName}>\n <FileWrapper>{fileExtension}</FileWrapper>\n </Tooltip>\n );\n};\n\nconst FileWrapper = ({ children }: { children: React.ReactNode }) => {\n return (\n <Flex\n tag=\"span\"\n position=\"relative\"\n borderRadius=\"50%\"\n width=\"26px\"\n height=\"26px\"\n borderColor=\"neutral200\"\n background=\"neutral150\"\n paddingLeft=\"1px\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <FileTypography variant=\"sigma\" textColor=\"neutral600\">\n {children}\n </FileTypography>\n </Flex>\n );\n};\n\nconst FileTypography = styled<TypographyComponent>(Typography)`\n font-size: 0.9rem;\n line-height: 0.9rem;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * MediaMultiple\n * -----------------------------------------------------------------------------------------------*/\n\ninterface MediaMultipleProps {\n content: MediaFile[];\n}\n\nconst MediaMultiple = ({ content }: MediaMultipleProps) => {\n return (\n <Avatar.Group>\n {content.map((file, index) => {\n const key = `${file.id}${index}`;\n\n if (index === 3) {\n const remainingFiles = `+${content.length - 3}`;\n\n return <FileWrapper key={key}>{remainingFiles}</FileWrapper>;\n }\n\n if (index > 3) {\n return null;\n }\n\n return <MediaSingle key={key} {...file} />;\n })}\n </Avatar.Group>\n );\n};\n\nexport { MediaMultiple, MediaSingle };\nexport type { MediaMultipleProps, MediaSingleProps };\n","import * as React from 'react';\n\nimport { Typography, Badge, Flex, Loader, useNotifyAT, Menu } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { useDoc } from '../../../../hooks/useDocument';\nimport { useGetRelationsQuery } from '../../../../services/relations';\nimport { getRelationLabel } from '../../../../utils/relations';\nimport { getTranslation } from '../../../../utils/translations';\n\nimport type { CellContentProps } from './CellContent';\n\n/* -------------------------------------------------------------------------------------------------\n * RelationSingle\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RelationSingleProps extends Pick<CellContentProps, 'mainField' | 'content'> {}\n\nconst RelationSingle = ({ mainField, content }: RelationSingleProps) => {\n return (\n <Typography maxWidth=\"50rem\" textColor=\"neutral800\" ellipsis>\n {getRelationLabel(content, mainField)}\n </Typography>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * RelationMultiple\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RelationMultipleProps\n extends Pick<CellContentProps, 'mainField' | 'content' | 'name' | 'rowId'> {}\n\n/**\n * TODO: fix this component – tracking issue https://strapi-inc.atlassian.net/browse/CONTENT-2184\n */\nconst RelationMultiple = ({ mainField, content, rowId, name }: RelationMultipleProps) => {\n const { model } = useDoc();\n const { formatMessage } = useIntl();\n const { notifyStatus } = useNotifyAT();\n const [isOpen, setIsOpen] = React.useState(false);\n\n const [targetField] = name.split('.');\n\n const { data, isLoading } = useGetRelationsQuery(\n {\n model,\n id: rowId,\n targetField,\n },\n {\n skip: !isOpen,\n refetchOnMountOrArgChange: true,\n }\n );\n\n React.useEffect(() => {\n if (data) {\n notifyStatus(\n formatMessage({\n id: getTranslation('DynamicTable.relation-loaded'),\n defaultMessage: 'Relations have been loaded',\n })\n );\n }\n }, [data, formatMessage, notifyStatus]);\n\n return (\n <Menu.Root onOpenChange={(isOpen) => setIsOpen(isOpen)}>\n <MenuTrigger onClick={(e) => e.stopPropagation()}>\n <Flex gap={1} wrap=\"nowrap\">\n <Badge>{content.count}</Badge>\n {formatMessage(\n {\n id: 'content-manager.containers.list.items',\n defaultMessage: '{number, plural, =0 {items} one {item} other {items}}',\n },\n { number: content.count }\n )}\n </Flex>\n </MenuTrigger>\n <Menu.Content>\n {isLoading && (\n <Menu.Item disabled>\n <Loader small>\n {formatMessage({\n id: getTranslation('ListViewTable.relation-loading'),\n defaultMessage: 'Relations are loading',\n })}\n </Loader>\n </Menu.Item>\n )}\n {data?.results && (\n <>\n {data.results.map((entry) => (\n <Menu.Item key={entry.documentId} disabled>\n <Typography maxWidth=\"50rem\" ellipsis>\n {getRelationLabel(entry, mainField)}\n </Typography>\n </Menu.Item>\n ))}\n\n {data?.pagination && data?.pagination.total > 10 && (\n <Menu.Item\n aria-disabled\n aria-label={formatMessage({\n id: getTranslation('ListViewTable.relation-more'),\n defaultMessage: 'This relation contains more entities than displayed',\n })}\n >\n <Typography>…</Typography>\n </Menu.Item>\n )}\n </>\n )}\n </Menu.Content>\n </Menu.Root>\n );\n};\n\n/**\n * TODO: this needs to be solved in the Design-System\n */\nconst MenuTrigger = styled(Menu.Trigger)`\n svg {\n width: 0.6rem;\n height: 0.4rem;\n }\n`;\n\nexport { RelationSingle, RelationMultiple };\nexport type { RelationSingleProps, RelationMultipleProps };\n","import { Tooltip, Typography } from '@strapi/design-system';\nimport isEmpty from 'lodash/isEmpty';\n\nimport { CellValue } from './CellValue';\nimport { SingleComponent, RepeatableComponent } from './Components';\nimport { MediaSingle, MediaMultiple } from './Media';\nimport { RelationMultiple, RelationSingle } from './Relations';\n\nimport type { ListFieldLayout } from '../../../../hooks/useDocumentLayout';\nimport type { Schema, Data } from '@strapi/types';\n\ninterface CellContentProps extends Omit<ListFieldLayout, 'cellFormatter'> {\n content: Schema.Attribute.Value<Schema.Attribute.AnyAttribute>;\n rowId: Data.ID;\n}\n\nconst CellContent = ({ content, mainField, attribute, rowId, name }: CellContentProps) => {\n if (!hasContent(content, mainField, attribute)) {\n return <Typography textColor=\"neutral800\">-</Typography>;\n }\n\n switch (attribute.type) {\n case 'media':\n if (!attribute.multiple) {\n return <MediaSingle {...content} />;\n }\n\n return <MediaMultiple content={content} />;\n\n case 'relation': {\n if (isSingleRelation(attribute.relation)) {\n return <RelationSingle mainField={mainField} content={content} />;\n }\n\n return <RelationMultiple rowId={rowId} mainField={mainField} content={content} name={name} />;\n }\n\n case 'component':\n if (attribute.repeatable) {\n return <RepeatableComponent mainField={mainField} content={content} />;\n }\n\n return <SingleComponent mainField={mainField} content={content} />;\n\n case 'string':\n return (\n <Tooltip description={content}>\n <Typography maxWidth=\"30rem\" ellipsis textColor=\"neutral800\">\n <CellValue type={attribute.type} value={content} />\n </Typography>\n </Tooltip>\n );\n\n default:\n return (\n <Typography maxWidth=\"30rem\" ellipsis textColor=\"neutral800\">\n <CellValue type={attribute.type} value={content} />\n </Typography>\n );\n }\n};\n\nconst hasContent = (\n content: CellContentProps['content'],\n mainField: CellContentProps['mainField'],\n attribute: CellContentProps['attribute']\n) => {\n if (attribute.type === 'component') {\n // Repeatable fields show the ID as fallback, in case the mainField\n // doesn't have any content\n if (attribute.repeatable || !mainField) {\n return content?.length > 0;\n }\n\n const value = content?.[mainField.name];\n\n // relations, media ... show the id as fallback\n if (mainField.name === 'id' && ![undefined, null].includes(value)) {\n return true;\n }\n\n return !isEmpty(value);\n }\n\n if (attribute.type === 'relation') {\n if (isSingleRelation(attribute.relation)) {\n return !isEmpty(content);\n }\n\n return content?.count > 0;\n }\n\n /*\n Biginteger fields need to be treated as strings, as `isNumber`\n doesn't deal with them.\n */\n if (['integer', 'decimal', 'float', 'number'].includes(attribute.type)) {\n return typeof content === 'number';\n }\n\n if (attribute.type === 'boolean') {\n return content !== null;\n }\n\n return !isEmpty(content);\n};\n\nconst isSingleRelation = (\n type: Extract<CellContentProps['attribute'], { type: 'relation' }>['relation']\n) => ['oneToOne', 'manyToOne', 'oneToOneMorph'].includes(type);\n\nexport { CellContent };\nexport type { CellContentProps };\n","import * as React from 'react';\n\nimport { useTracking, useRBAC, useQueryParams } from '@strapi/admin/strapi-admin';\nimport {\n Flex,\n IconButton,\n Popover,\n Checkbox,\n TextButton,\n Typography,\n useCollator,\n LinkButton,\n} from '@strapi/design-system';\nimport { Cog, ListPlus } from '@strapi/icons';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\n\nimport { useDoc } from '../../../hooks/useDocument';\nimport { useDocumentLayout } from '../../../hooks/useDocumentLayout';\nimport { useTypedSelector } from '../../../modules/hooks';\nimport { checkIfAttributeIsDisplayable } from '../../../utils/attributes';\n\ninterface ViewSettingsMenuProps extends FieldPickerProps {}\n\nconst ViewSettingsMenu = (props: ViewSettingsMenuProps) => {\n const permissions = useTypedSelector(\n (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations ?? []\n );\n const [{ query }] = useQueryParams<{ plugins?: Record<string, unknown> }>();\n const { formatMessage } = useIntl();\n const {\n allowedActions: { canConfigureView },\n } = useRBAC(permissions);\n\n return (\n <Popover.Root>\n <Popover.Trigger>\n <IconButton\n label={formatMessage({\n id: 'components.ViewSettings.tooltip',\n defaultMessage: 'View Settings',\n })}\n >\n <Cog />\n </IconButton>\n </Popover.Trigger>\n <Popover.Content side=\"bottom\" align=\"end\" sideOffset={4}>\n <Flex alignItems=\"stretch\" direction=\"column\" padding={3} gap={3}>\n {canConfigureView ? (\n <LinkButton\n size=\"S\"\n startIcon={<ListPlus />}\n variant=\"secondary\"\n tag={NavLink}\n to={{\n pathname: 'configurations/list',\n search: query.plugins\n ? stringify({ plugins: query.plugins }, { encode: false })\n : '',\n }}\n >\n {formatMessage({\n id: 'app.links.configure-view',\n defaultMessage: 'Configure the view',\n })}\n </LinkButton>\n ) : null}\n <FieldPicker {...props} />\n </Flex>\n </Popover.Content>\n </Popover.Root>\n );\n};\n\ninterface FieldPickerProps {\n headers?: string[];\n setHeaders: (headers: string[]) => void;\n resetHeaders: () => void;\n}\n\nconst FieldPicker = ({ headers = [], resetHeaders, setHeaders }: FieldPickerProps) => {\n const { trackUsage } = useTracking();\n const { formatMessage, locale } = useIntl();\n\n const { schema, model } = useDoc();\n const { list } = useDocumentLayout(model);\n\n const formatter = useCollator(locale, {\n sensitivity: 'base',\n });\n\n const attributes = schema?.attributes ?? {};\n\n const columns = Object.keys(attributes)\n .filter((name) => checkIfAttributeIsDisplayable(attributes[name]))\n .map((name) => ({\n name,\n label: list.metadatas[name]?.label ?? '',\n }))\n .sort((a, b) => formatter.compare(a.label, b.label));\n\n const handleChange = (name: string) => {\n trackUsage('didChangeDisplayedFields');\n\n /**\n * create an array of the new headers, if the new name exists it should be removed,\n * otherwise it should be added\n */\n const newHeaders = headers.includes(name)\n ? headers.filter((header) => header !== name)\n : [...headers, name];\n\n setHeaders(newHeaders);\n };\n\n const handleReset = () => {\n resetHeaders();\n };\n\n return (\n <Flex tag=\"fieldset\" direction=\"column\" alignItems=\"stretch\" gap={3} borderWidth={0}>\n <Flex justifyContent=\"space-between\">\n <Typography tag=\"legend\" variant=\"pi\" fontWeight=\"bold\">\n {formatMessage({\n id: 'containers.list.displayedFields',\n defaultMessage: 'Displayed fields',\n })}\n </Typography>\n\n <TextButton onClick={handleReset}>\n {formatMessage({\n id: 'app.components.Button.reset',\n defaultMessage: 'Reset',\n })}\n </TextButton>\n </Flex>\n\n <Flex direction=\"column\" alignItems=\"stretch\">\n {columns.map((header) => {\n const isActive = headers.includes(header.name);\n\n return (\n <Flex\n wrap=\"wrap\"\n gap={2}\n background={isActive ? 'primary100' : 'transparent'}\n hasRadius\n padding={2}\n key={header.name}\n >\n <Checkbox\n onCheckedChange={() => handleChange(header.name)}\n checked={isActive}\n name={header.name}\n >\n <Typography fontSize={1}>{header.label}</Typography>\n </Checkbox>\n </Flex>\n );\n })}\n </Flex>\n </Flex>\n );\n};\n\nexport { ViewSettingsMenu };\nexport type { ViewSettingsMenuProps, FieldPickerProps };\n","import * as React from 'react';\n\nimport {\n Page,\n Pagination,\n SearchInput,\n Table,\n BackButton,\n useNotification,\n useStrapiApp,\n useTracking,\n useAPIErrorHandler,\n useQueryParams,\n useRBAC,\n Layouts,\n useTable,\n} from '@strapi/admin/strapi-admin';\nimport { Button, Flex, Typography, ButtonProps } from '@strapi/design-system';\nimport { Plus } from '@strapi/icons';\nimport isEqual from 'lodash/isEqual';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { useNavigate, Link as ReactRouterLink, useParams } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { InjectionZone } from '../../components/InjectionZone';\nimport { HOOKS } from '../../constants/hooks';\nimport { PERMISSIONS } from '../../constants/plugin';\nimport { DocumentRBAC, useDocumentRBAC } from '../../features/DocumentRBAC';\nimport { useDoc } from '../../hooks/useDocument';\nimport {\n ListFieldLayout,\n convertListLayoutToFieldLayouts,\n useDocumentLayout,\n} from '../../hooks/useDocumentLayout';\nimport { usePrev } from '../../hooks/usePrev';\nimport { useGetAllDocumentsQuery } from '../../services/documents';\nimport { buildValidParams } from '../../utils/api';\nimport { getTranslation } from '../../utils/translations';\nimport { getDisplayName } from '../../utils/users';\nimport { DocumentStatus } from '../EditView/components/DocumentStatus';\n\nimport { BulkActionsRenderer } from './components/BulkActions/Actions';\nimport { Filters } from './components/Filters';\nimport { TableActions } from './components/TableActions';\nimport { CellContent } from './components/TableCells/CellContent';\nimport { ViewSettingsMenu } from './components/ViewSettingsMenu';\n\nimport type { Modules } from '@strapi/types';\n\nconst { INJECT_COLUMN_IN_TABLE } = HOOKS;\n\n/* -------------------------------------------------------------------------------------------------\n * ListViewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ListViewPage = () => {\n const { trackUsage } = useTracking();\n const navigate = useNavigate();\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler(getTranslation);\n\n const { collectionType, model, schema } = useDoc();\n const { list } = useDocumentLayout(model);\n\n const [displayedHeaders, setDisplayedHeaders] = React.useState<ListFieldLayout[]>([]);\n\n const listLayout = usePrev(list.layout);\n React.useEffect(() => {\n /**\n * ONLY update the displayedHeaders if the document\n * layout has actually changed in value.\n */\n if (!isEqual(listLayout, list.layout)) {\n setDisplayedHeaders(list.layout);\n }\n }, [list.layout, listLayout]);\n\n const handleSetHeaders = (headers: string[]) => {\n setDisplayedHeaders(\n convertListLayoutToFieldLayouts(headers, schema!.attributes, list.metadatas)\n );\n };\n\n const [{ query }] = useQueryParams<{\n plugins?: Record<string, unknown>;\n page?: string;\n pageSize?: string;\n sort?: string;\n }>({\n page: '1',\n pageSize: list.settings.pageSize.toString(),\n sort: list.settings.defaultSortBy\n ? `${list.settings.defaultSortBy}:${list.settings.defaultSortOrder}`\n : '',\n });\n\n const params = React.useMemo(() => buildValidParams(query), [query]);\n const { data, error, isFetching } = useGetAllDocumentsQuery({\n model,\n params,\n });\n\n /**\n * If the API returns an error, display a notification\n */\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const { results = [], pagination } = data ?? {};\n\n React.useEffect(() => {\n if (pagination && pagination.pageCount > 0 && pagination.page > pagination.pageCount) {\n navigate(\n {\n search: stringify({\n ...query,\n page: pagination.pageCount,\n }),\n },\n { replace: true }\n );\n }\n }, [pagination, formatMessage, query, navigate]);\n\n const { canCreate } = useDocumentRBAC('ListViewPage', ({ canCreate }) => ({\n canCreate,\n }));\n\n const runHookWaterfall = useStrapiApp('ListViewPage', ({ runHookWaterfall }) => runHookWaterfall);\n /**\n * Run the waterfall and then inject our additional table headers.\n */\n const tableHeaders = React.useMemo(() => {\n const headers = runHookWaterfall(INJECT_COLUMN_IN_TABLE, {\n displayedHeaders,\n layout: list,\n });\n\n const formattedHeaders = headers.displayedHeaders.map<ListFieldLayout>((header) => {\n return {\n ...header,\n label: typeof header.label === 'string' ? header.label : formatMessage(header.label),\n name: `${header.name}${header.mainField ? `.${header.mainField}` : ''}`,\n };\n });\n\n if (schema?.options?.draftAndPublish) {\n formattedHeaders.push({\n attribute: {\n type: 'custom',\n },\n name: 'status',\n label: formatMessage({\n id: getTranslation(`containers.list.table-headers.status`),\n defaultMessage: 'status',\n }),\n searchable: false,\n sortable: false,\n } satisfies ListFieldLayout);\n }\n\n return formattedHeaders;\n }, [displayedHeaders, formatMessage, list, runHookWaterfall, schema?.options?.draftAndPublish]);\n\n if (isFetching) {\n return <Page.Loading />;\n }\n\n if (error) {\n return <Page.Error />;\n }\n\n const contentTypeTitle = schema?.info.displayName ?? 'Untitled';\n\n const handleRowClick = (id: Modules.Documents.ID) => () => {\n trackUsage('willEditEntryFromList');\n navigate({\n pathname: id.toString(),\n search: stringify({ plugins: query.plugins }),\n });\n };\n\n return (\n <Page.Main>\n <Page.Title>{`${contentTypeTitle}`}</Page.Title>\n <Layouts.Header\n primaryAction={canCreate ? <CreateButton /> : null}\n subtitle={formatMessage(\n {\n id: getTranslation('pages.ListView.header-subtitle'),\n defaultMessage:\n '{number, plural, =0 {# entries} one {# entry} other {# entries}} found',\n },\n { number: pagination?.total }\n )}\n title={contentTypeTitle}\n navigationAction={<BackButton />}\n />\n <Layouts.Action\n endActions={\n <>\n <InjectionZone area=\"listView.actions\" />\n <ViewSettingsMenu\n setHeaders={handleSetHeaders}\n resetHeaders={() => setDisplayedHeaders(list.layout)}\n headers={displayedHeaders.map((header) => header.name)}\n />\n </>\n }\n startActions={\n <>\n {list.settings.searchable && (\n <SearchInput\n disabled={results.length === 0}\n label={formatMessage(\n { id: 'app.component.search.label', defaultMessage: 'Search for {target}' },\n { target: contentTypeTitle }\n )}\n placeholder={formatMessage({\n id: 'global.search',\n defaultMessage: 'Search',\n })}\n trackedEvent=\"didSearch\"\n />\n )}\n {list.settings.filterable && schema ? (\n <Filters disabled={results.length === 0} schema={schema} />\n ) : null}\n </>\n }\n />\n <Layouts.Content>\n <Flex gap={4} direction=\"column\" alignItems=\"stretch\">\n <Table.Root rows={results} headers={tableHeaders} isLoading={isFetching}>\n <TableActionsBar />\n <Table.Content>\n <Table.Head>\n <Table.HeaderCheckboxCell />\n {tableHeaders.map((header: ListFieldLayout) => (\n <Table.HeaderCell key={header.name} {...header} />\n ))}\n </Table.Head>\n <Table.Loading />\n <Table.Empty action={canCreate ? <CreateButton variant=\"secondary\" /> : null} />\n <Table.Body>\n {results.map((row) => {\n return (\n <Table.Row\n cursor=\"pointer\"\n key={row.id}\n onClick={handleRowClick(row.documentId)}\n >\n <Table.CheckboxCell id={row.id} />\n {tableHeaders.map(({ cellFormatter, ...header }) => {\n if (header.name === 'status') {\n const { status } = row;\n\n return (\n <Table.Cell key={header.name}>\n <DocumentStatus status={status} maxWidth={'min-content'} />\n </Table.Cell>\n );\n }\n if (['createdBy', 'updatedBy'].includes(header.name.split('.')[0])) {\n // Display the users full name\n // Some entries doesn't have a user assigned as creator/updater (ex: entries created through content API)\n // In this case, we display a dash\n return (\n <Table.Cell key={header.name}>\n <Typography textColor=\"neutral800\">\n {row[header.name.split('.')[0]]\n ? getDisplayName(row[header.name.split('.')[0]])\n : '-'}\n </Typography>\n </Table.Cell>\n );\n }\n if (typeof cellFormatter === 'function') {\n return (\n <Table.Cell key={header.name}>\n {/* @ts-expect-error – TODO: fix this TS error */}\n {cellFormatter(row, header, { collectionType, model })}\n </Table.Cell>\n );\n }\n return (\n <Table.Cell key={header.name}>\n <CellContent\n content={row[header.name.split('.')[0]]}\n rowId={row.documentId}\n {...header}\n />\n </Table.Cell>\n );\n })}\n {/* we stop propogation here to allow the menu to trigger it's events without triggering the row redirect */}\n <ActionsCell onClick={(e) => e.stopPropagation()}>\n <TableActions document={row} />\n </ActionsCell>\n </Table.Row>\n );\n })}\n </Table.Body>\n </Table.Content>\n </Table.Root>\n <Pagination.Root\n {...pagination}\n onPageSizeChange={() => trackUsage('willChangeNumberOfEntriesPerPage')}\n >\n <Pagination.PageSize />\n <Pagination.Links />\n </Pagination.Root>\n </Flex>\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nconst ActionsCell = styled(Table.Cell)`\n display: flex;\n justify-content: flex-end;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * TableActionsBar\n * -----------------------------------------------------------------------------------------------*/\n\nconst TableActionsBar = () => {\n const selectRow = useTable('TableActionsBar', (state) => state.selectRow);\n const [{ query }] = useQueryParams<{ plugins: { i18n: { locale: string } } }>();\n const locale = query?.plugins?.i18n?.locale;\n const prevLocale = usePrev(locale);\n\n // TODO: find a better way to reset the selected rows when the locale changes across all the app\n React.useEffect(() => {\n if (prevLocale !== locale) {\n selectRow([]);\n }\n }, [selectRow, prevLocale, locale]);\n\n return (\n <Table.ActionBar>\n <BulkActionsRenderer />\n </Table.ActionBar>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * CreateButton\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CreateButtonProps extends Pick<ButtonProps, 'variant'> {}\n\nconst CreateButton = ({ variant }: CreateButtonProps) => {\n const { formatMessage } = useIntl();\n const { trackUsage } = useTracking();\n const [{ query }] = useQueryParams<{ plugins: object }>();\n\n return (\n <Button\n variant={variant}\n tag={ReactRouterLink}\n onClick={() => {\n trackUsage('willCreateEntry', { status: 'draft' });\n }}\n startIcon={<Plus />}\n style={{ textDecoration: 'none' }}\n to={{\n pathname: 'create',\n search: stringify({ plugins: query.plugins }),\n }}\n >\n {formatMessage({\n id: getTranslation('HeaderLayout.button.label-add-entry'),\n defaultMessage: 'Create new entry',\n })}\n </Button>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProtectedListViewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedListViewPage = () => {\n const { slug = '' } = useParams<{\n slug: string;\n }>();\n const {\n permissions = [],\n isLoading,\n error,\n } = useRBAC(\n PERMISSIONS.map((action) => ({\n action,\n subject: slug,\n }))\n );\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !slug) {\n return <Page.Error />;\n }\n\n return (\n <Page.Protect permissions={permissions}>\n {({ permissions }) => (\n <DocumentRBAC permissions={permissions}>\n <ListViewPage />\n </DocumentRBAC>\n )}\n </Page.Protect>\n );\n};\n\nexport { ListViewPage, ProtectedListViewPage };\n"],"names":["CREATOR_FIELDS","useIntl","useTracking","useAuth","useQueryParams","useContentTypeSchema","React","useAdminUsers","useGetContentTypeConfigurationQuery","useCollator","getMainField","getDisplayName","jsxs","Filters","jsx","useField","Combobox","ComboboxOption","parseISO","toString","Tooltip","Typography","Menu","MenuTrigger","Badge","styled","prefixFileUrlWithBackendUrl","Avatar","Flex","index","getRelationLabel","useDoc","useNotifyAT","useGetRelationsQuery","getTranslation","isOpen","Loader","Fragment","isEmpty","useTypedSelector","useRBAC","Popover","IconButton","Cog","LinkButton","ListPlus","NavLink","stringify","useDocumentLayout","checkIfAttributeIsDisplayable","TextButton","Checkbox","HOOKS","useNavigate","useNotification","useAPIErrorHandler","usePrev","isEqual","convertListLayoutToFieldLayouts","buildValidParams","useGetAllDocumentsQuery","useDocumentRBAC","canCreate","useStrapiApp","runHookWaterfall","Page","Layouts","BackButton","InjectionZone","SearchInput","Table","DocumentStatus","TableActions","Pagination","useTable","BulkActionsRenderer","Button","ReactRouterLink","Plus","useParams","PERMISSIONS","permissions","DocumentRBAC"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,sBAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,M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