@strapi/content-manager 0.0.0-experimental.e60ec1829240dae21c1e1d29076681c322288813 → 0.0.0-experimental.e8d8fc824d0f6a695b2a9ebaa4680ed21c3645ca
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.
- package/LICENSE +18 -3
- package/dist/_chunks/{CardDragPreview-DSVYodBX.js → CardDragPreview-C0QyJgRA.js} +10 -14
- package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
- package/dist/_chunks/{CardDragPreview-ikSG4M46.mjs → CardDragPreview-DOxamsuj.mjs} +7 -9
- package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
- package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js → ComponentConfigurationPage-BlzvDpbX.js} +5 -6
- package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js.map → ComponentConfigurationPage-BlzvDpbX.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs → ComponentConfigurationPage-DaPOlQaD.mjs} +4 -4
- package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs.map → ComponentConfigurationPage-DaPOlQaD.mjs.map} +1 -1
- package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-CRbtQEUV.js} +9 -4
- package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +1 -0
- package/dist/_chunks/{ComponentIcon-BOFnK76n.mjs → ComponentIcon-u4bIXTFY.mjs} +9 -3
- package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
- package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs → EditConfigurationPage-BZPXItXo.mjs} +4 -4
- package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs.map → EditConfigurationPage-BZPXItXo.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js → EditConfigurationPage-uy-v43AR.js} +5 -6
- package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js.map → EditConfigurationPage-uy-v43AR.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-DvNpQkam.js → EditViewPage-DT6A4ayX.js} +102 -54
- package/dist/_chunks/EditViewPage-DT6A4ayX.js.map +1 -0
- package/dist/_chunks/EditViewPage-oOLeTySr.mjs +254 -0
- package/dist/_chunks/EditViewPage-oOLeTySr.mjs.map +1 -0
- package/dist/_chunks/{Field-6gvGdPBV.mjs → Field-D7dv2aUX.mjs} +1192 -896
- package/dist/_chunks/Field-D7dv2aUX.mjs.map +1 -0
- package/dist/_chunks/{Field-DmVKIAOo.js → Field-kYFVIGiP.js} +1238 -943
- package/dist/_chunks/Field-kYFVIGiP.js.map +1 -0
- package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
- package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
- package/dist/_chunks/{Form-DW6K1IH-.mjs → Form-BxR6sc29.mjs} +67 -46
- package/dist/_chunks/Form-BxR6sc29.mjs.map +1 -0
- package/dist/_chunks/{Form-CPZC9vWa.js → Form-CCijSg3V.js} +68 -49
- package/dist/_chunks/Form-CCijSg3V.js.map +1 -0
- package/dist/_chunks/{History-DeAPlvtv.js → History-BMndx49M.js} +182 -147
- package/dist/_chunks/History-BMndx49M.js.map +1 -0
- package/dist/_chunks/{History-Dmr9fmUA.mjs → History-D8F7aYQU.mjs} +181 -144
- package/dist/_chunks/History-D8F7aYQU.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DPCwW5Vr.js → ListConfigurationPage-DouY1EWM.js} +72 -63
- package/dist/_chunks/ListConfigurationPage-DouY1EWM.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DhwvYcNv.mjs → ListConfigurationPage-DqAdSPwC.mjs} +68 -57
- package/dist/_chunks/ListConfigurationPage-DqAdSPwC.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-5ySZ-VUs.js → ListViewPage-BPVmh9pq.js} +179 -164
- package/dist/_chunks/ListViewPage-BPVmh9pq.js.map +1 -0
- package/dist/_chunks/{ListViewPage-BtAwuYLE.mjs → ListViewPage-C73F0jPh.mjs} +175 -159
- package/dist/_chunks/ListViewPage-C73F0jPh.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-DSPxnxxp.mjs → NoContentTypePage-B5w7iJOF.mjs} +3 -3
- package/dist/_chunks/NoContentTypePage-B5w7iJOF.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-DOC_yWOf.js → NoContentTypePage-BwcL--4H.js} +3 -3
- package/dist/_chunks/NoContentTypePage-BwcL--4H.js.map +1 -0
- package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js → NoPermissionsPage-BMFKVcwJ.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js.map → NoPermissionsPage-BMFKVcwJ.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs → NoPermissionsPage-UnEgMGK4.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs.map → NoPermissionsPage-UnEgMGK4.mjs.map} +1 -1
- package/dist/_chunks/Preview-B7PR3Ok_.js +312 -0
- package/dist/_chunks/Preview-B7PR3Ok_.js.map +1 -0
- package/dist/_chunks/Preview-DECOhK0D.mjs +294 -0
- package/dist/_chunks/Preview-DECOhK0D.mjs.map +1 -0
- package/dist/_chunks/{Relations-J8cscLlR.mjs → Relations-DinMQJ4B.mjs} +138 -94
- package/dist/_chunks/Relations-DinMQJ4B.mjs.map +1 -0
- package/dist/_chunks/{Relations-CgWtgnPe.js → Relations-lndx3aQk.js} +142 -100
- package/dist/_chunks/Relations-lndx3aQk.js.map +1 -0
- package/dist/_chunks/{en-C-V1_90f.js → en-BK8Xyl5I.js} +38 -18
- package/dist/_chunks/{en-C-V1_90f.js.map → en-BK8Xyl5I.js.map} +1 -1
- package/dist/_chunks/{en-MBPul9Su.mjs → en-Dtk_ot79.mjs} +38 -18
- package/dist/_chunks/{en-MBPul9Su.mjs.map → en-Dtk_ot79.mjs.map} +1 -1
- package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
- package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
- package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
- package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
- package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
- package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
- package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
- package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
- package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
- package/dist/_chunks/{index-CwRRo1V9.mjs → index-C2SagWVW.mjs} +2070 -988
- package/dist/_chunks/index-C2SagWVW.mjs.map +1 -0
- package/dist/_chunks/{index-C6AH2hEl.js → index-Cnw4gqee.js} +2047 -966
- package/dist/_chunks/index-Cnw4gqee.js.map +1 -0
- package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
- package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
- package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
- package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
- package/dist/_chunks/{layout-jIDzX0Fp.mjs → layout-DY_D9MGA.mjs} +46 -28
- package/dist/_chunks/layout-DY_D9MGA.mjs.map +1 -0
- package/dist/_chunks/{layout-B_SXLhqf.js → layout-ivwIVPnV.js} +47 -32
- package/dist/_chunks/layout-ivwIVPnV.js.map +1 -0
- package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
- package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
- package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
- package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
- package/dist/_chunks/{relations-iBMa_OFG.js → relations-B7C7O_Pv.js} +6 -7
- package/dist/_chunks/relations-B7C7O_Pv.js.map +1 -0
- package/dist/_chunks/{relations-CuvIgCqI.mjs → relations-Boc5Y9kX.mjs} +6 -7
- package/dist/_chunks/relations-Boc5Y9kX.mjs.map +1 -0
- package/dist/_chunks/useDebounce-CtcjDB3L.js +28 -0
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
- package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
- package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +1 -0
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
- package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +1 -0
- package/dist/admin/index.js +3 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +9 -7
- package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
- package/dist/admin/src/content-manager.d.ts +6 -5
- package/dist/admin/src/exports.d.ts +2 -1
- package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
- package/dist/admin/src/history/index.d.ts +3 -0
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/hooks/useDocument.d.ts +37 -9
- package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
- package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
- package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
- package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
- package/dist/admin/src/index.d.ts +1 -0
- package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +12 -5
- package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +7 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +5 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
- package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
- package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +16 -53
- package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
- package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
- package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
- package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
- package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
- package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
- package/dist/admin/src/preview/index.d.ts +4 -0
- package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
- package/dist/admin/src/preview/routes.d.ts +3 -0
- package/dist/admin/src/preview/services/preview.d.ts +3 -0
- package/dist/admin/src/router.d.ts +1 -1
- package/dist/admin/src/services/api.d.ts +2 -3
- package/dist/admin/src/services/components.d.ts +2 -2
- package/dist/admin/src/services/contentTypes.d.ts +5 -5
- package/dist/admin/src/services/documents.d.ts +31 -20
- package/dist/admin/src/services/init.d.ts +2 -2
- package/dist/admin/src/services/relations.d.ts +3 -3
- package/dist/admin/src/services/uid.d.ts +3 -3
- package/dist/admin/src/utils/api.d.ts +4 -18
- package/dist/admin/src/utils/validation.d.ts +5 -7
- package/dist/server/index.js +886 -480
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +892 -485
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- package/dist/server/src/controllers/single-types.d.ts.map +1 -1
- package/dist/server/src/controllers/uid.d.ts.map +1 -1
- package/dist/server/src/controllers/utils/metadata.d.ts +23 -0
- package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
- package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
- package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
- package/dist/server/src/controllers/validation/index.d.ts +1 -1
- package/dist/server/src/history/services/history.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/history/services/utils.d.ts +4 -4
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +22 -42
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
- package/dist/server/src/preview/controllers/index.d.ts +2 -0
- package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/preview.d.ts +13 -0
- package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
- package/dist/server/src/preview/index.d.ts +4 -0
- package/dist/server/src/preview/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/index.d.ts +8 -0
- package/dist/server/src/preview/routes/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/preview.d.ts +4 -0
- package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
- package/dist/server/src/preview/services/index.d.ts +16 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview-config.d.ts +32 -0
- package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview.d.ts +12 -0
- package/dist/server/src/preview/services/preview.d.ts.map +1 -0
- package/dist/server/src/preview/utils.d.ts +19 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -0
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/services/document-manager.d.ts +13 -12
- package/dist/server/src/services/document-manager.d.ts.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts +16 -35
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +22 -42
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/permission-checker.d.ts.map +1 -1
- package/dist/server/src/services/utils/populate.d.ts +8 -1
- package/dist/server/src/services/utils/populate.d.ts.map +1 -1
- package/dist/server/src/utils/index.d.ts +2 -0
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/dist/shared/contracts/collection-types.d.ts +17 -7
- package/dist/shared/contracts/collection-types.d.ts.map +1 -1
- package/dist/shared/contracts/index.d.ts +1 -0
- package/dist/shared/contracts/index.d.ts.map +1 -1
- package/dist/shared/contracts/preview.d.ts +27 -0
- package/dist/shared/contracts/preview.d.ts.map +1 -0
- package/dist/shared/contracts/relations.d.ts +2 -2
- package/dist/shared/contracts/relations.d.ts.map +1 -1
- package/dist/shared/index.js +4 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs +4 -0
- package/dist/shared/index.mjs.map +1 -1
- package/package.json +22 -21
- package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
- package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
- package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
- package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-DDS6H9HO.mjs +0 -203
- package/dist/_chunks/EditViewPage-DDS6H9HO.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-DvNpQkam.js.map +0 -1
- package/dist/_chunks/Field-6gvGdPBV.mjs.map +0 -1
- package/dist/_chunks/Field-DmVKIAOo.js.map +0 -1
- package/dist/_chunks/Form-CPZC9vWa.js.map +0 -1
- package/dist/_chunks/Form-DW6K1IH-.mjs.map +0 -1
- package/dist/_chunks/History-DeAPlvtv.js.map +0 -1
- package/dist/_chunks/History-Dmr9fmUA.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-DPCwW5Vr.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-DhwvYcNv.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-5ySZ-VUs.js.map +0 -1
- package/dist/_chunks/ListViewPage-BtAwuYLE.mjs.map +0 -1
- package/dist/_chunks/NoContentTypePage-DOC_yWOf.js.map +0 -1
- package/dist/_chunks/NoContentTypePage-DSPxnxxp.mjs.map +0 -1
- package/dist/_chunks/Relations-CgWtgnPe.js.map +0 -1
- package/dist/_chunks/Relations-J8cscLlR.mjs.map +0 -1
- package/dist/_chunks/index-C6AH2hEl.js.map +0 -1
- package/dist/_chunks/index-CwRRo1V9.mjs.map +0 -1
- package/dist/_chunks/layout-B_SXLhqf.js.map +0 -1
- package/dist/_chunks/layout-jIDzX0Fp.mjs.map +0 -1
- package/dist/_chunks/relations-CuvIgCqI.mjs.map +0 -1
- package/dist/_chunks/relations-iBMa_OFG.js.map +0 -1
- package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
- package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
- package/dist/_chunks/urls-DzZya_gm.js +0 -6
- package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
- package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
- package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
- package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
- package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
- package/strapi-server.js +0 -3
@@ -9,18 +9,17 @@ 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
|
13
|
-
const index = require("./index-
|
12
|
+
const styledComponents = require("styled-components");
|
13
|
+
const index = require("./index-Cnw4gqee.js");
|
14
|
+
const useDebounce = require("./useDebounce-CtcjDB3L.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
|
18
|
-
const relations = require("./relations-iBMa_OFG.js");
|
18
|
+
const relations = require("./relations-B7C7O_Pv.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) {
|
22
|
-
if (e && e.__esModule)
|
23
|
-
return e;
|
22
|
+
if (e && e.__esModule) return e;
|
24
23
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
25
24
|
if (e) {
|
26
25
|
for (const k in e) {
|
@@ -38,17 +37,9 @@ function _interopNamespace(e) {
|
|
38
37
|
}
|
39
38
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
40
39
|
const isEqual__default = /* @__PURE__ */ _interopDefault(isEqual);
|
41
|
-
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
42
40
|
const isEmpty__default = /* @__PURE__ */ _interopDefault(isEmpty);
|
43
41
|
const parseISO__default = /* @__PURE__ */ _interopDefault(parseISO);
|
44
42
|
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
43
|
const NOT_ALLOWED_FILTERS = [
|
53
44
|
"json",
|
54
45
|
"component",
|
@@ -155,6 +146,15 @@ const FiltersImpl = ({ disabled, schema }) => {
|
|
155
146
|
}
|
156
147
|
};
|
157
148
|
}
|
149
|
+
if (attribute.type === "enumeration") {
|
150
|
+
filter = {
|
151
|
+
...filter,
|
152
|
+
options: attribute.enum.map((value) => ({
|
153
|
+
label: value,
|
154
|
+
value
|
155
|
+
}))
|
156
|
+
};
|
157
|
+
}
|
158
158
|
return filter;
|
159
159
|
}).filter(Boolean).toSorted((a, b) => formatter.compare(a.label, b.label));
|
160
160
|
}, [
|
@@ -197,18 +197,22 @@ const FiltersImpl = ({ disabled, schema }) => {
|
|
197
197
|
);
|
198
198
|
};
|
199
199
|
const AdminUsersFilter = ({ name }) => {
|
200
|
-
const [
|
200
|
+
const [pageSize, setPageSize] = React__namespace.useState(10);
|
201
|
+
const [search, setSearch] = React__namespace.useState("");
|
201
202
|
const { formatMessage } = reactIntl.useIntl();
|
203
|
+
const debouncedSearch = useDebounce.useDebounce(search, 300);
|
202
204
|
const { data, isLoading } = strapiAdmin.useAdminUsers({
|
203
|
-
|
205
|
+
pageSize,
|
206
|
+
_q: debouncedSearch
|
204
207
|
});
|
205
208
|
const field = strapiAdmin.useField(name);
|
206
209
|
const handleOpenChange = (isOpen) => {
|
207
210
|
if (!isOpen) {
|
208
|
-
|
211
|
+
setPageSize(10);
|
209
212
|
}
|
210
213
|
};
|
211
|
-
const users = data
|
214
|
+
const { users = [], pagination } = data ?? {};
|
215
|
+
const { pageCount = 1, page = 1 } = pagination ?? {};
|
212
216
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
213
217
|
designSystem.Combobox,
|
214
218
|
{
|
@@ -220,7 +224,11 @@ const AdminUsersFilter = ({ name }) => {
|
|
220
224
|
onOpenChange: handleOpenChange,
|
221
225
|
onChange: (value) => field.onChange(name, value),
|
222
226
|
loading: isLoading,
|
223
|
-
onLoadMore: () =>
|
227
|
+
onLoadMore: () => setPageSize(pageSize + 10),
|
228
|
+
hasMoreItems: page < pageCount,
|
229
|
+
onInputChange: (e) => {
|
230
|
+
setSearch(e.currentTarget.value);
|
231
|
+
},
|
224
232
|
children: users.map((user) => {
|
225
233
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ComboboxOption, { value: user.id.toString(), children: index.getDisplayName(user) }, user.id);
|
226
234
|
})
|
@@ -262,20 +270,16 @@ const SingleComponent = ({ content, mainField }) => {
|
|
262
270
|
if (!mainField) {
|
263
271
|
return null;
|
264
272
|
}
|
265
|
-
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label: content[mainField.name], children: /* @__PURE__ */ jsxRuntime.jsx(
|
273
|
+
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
274
|
};
|
267
|
-
const SingleComponentTypography = styled__default.default(designSystem.Typography)`
|
268
|
-
max-width: 250px;
|
269
|
-
`;
|
270
275
|
const RepeatableComponent = ({ content, mainField }) => {
|
271
276
|
const { formatMessage } = reactIntl.useIntl();
|
272
277
|
if (!mainField) {
|
273
278
|
return null;
|
274
279
|
}
|
275
280
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { children: [
|
276
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
281
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Trigger, { onClick: (e) => e.stopPropagation(), children: [
|
277
282
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { children: content.length }),
|
278
|
-
" ",
|
279
283
|
formatMessage(
|
280
284
|
{
|
281
285
|
id: "content-manager.containers.list.items",
|
@@ -284,25 +288,24 @@ const RepeatableComponent = ({ content, mainField }) => {
|
|
284
288
|
{ number: content.length }
|
285
289
|
)
|
286
290
|
] }),
|
287
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Content, { children: content.map((item) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
291
|
+
/* @__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
292
|
] });
|
289
293
|
};
|
290
|
-
const RepeatableComponentTypography = styled__default.default(designSystem.Typography)`
|
291
|
-
max-width: 500px;
|
292
|
-
`;
|
293
|
-
const MenuTrigger$1 = styled__default.default(designSystem.Menu.Trigger)`
|
294
|
-
svg {
|
295
|
-
width: 0.6rem;
|
296
|
-
height: 0.4rem;
|
297
|
-
}
|
298
|
-
`;
|
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 =
|
296
|
+
const fileURL = useDebounce.prefixFileUrlWithBackendUrl(url);
|
302
297
|
if (mime.includes("image")) {
|
303
298
|
const thumbnail = formats?.thumbnail?.url;
|
304
|
-
const mediaURL =
|
305
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
299
|
+
const mediaURL = useDebounce.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
|
-
|
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 =
|
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.
|
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(
|
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();
|
@@ -366,6 +366,7 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
|
|
366
366
|
refetchOnMountOrArgChange: true
|
367
367
|
}
|
368
368
|
);
|
369
|
+
const contentCount = Array.isArray(content) ? content.length : content.count;
|
369
370
|
React__namespace.useEffect(() => {
|
370
371
|
if (data) {
|
371
372
|
notifyStatus(
|
@@ -377,23 +378,20 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
|
|
377
378
|
}
|
378
379
|
}, [data, formatMessage, notifyStatus]);
|
379
380
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { onOpenChange: (isOpen2) => setIsOpen(isOpen2), children: [
|
380
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
381
|
-
|
382
|
-
|
383
|
-
{
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
{ number: content.count }
|
388
|
-
)
|
389
|
-
] }) }),
|
381
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Trigger, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { style: { cursor: "pointer" }, textColor: "neutral800", fontWeight: "regular", children: contentCount > 0 ? formatMessage(
|
382
|
+
{
|
383
|
+
id: "content-manager.containers.list.items",
|
384
|
+
defaultMessage: "{number} {number, plural, =0 {items} one {item} other {items}}"
|
385
|
+
},
|
386
|
+
{ number: contentCount }
|
387
|
+
) : "-" }) }),
|
390
388
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { children: [
|
391
389
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { small: true, children: formatMessage({
|
392
390
|
id: index.getTranslation("ListViewTable.relation-loading"),
|
393
391
|
defaultMessage: "Relations are loading"
|
394
392
|
}) }) }),
|
395
393
|
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(
|
394
|
+
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
395
|
data?.pagination && data?.pagination.total > 10 && /* @__PURE__ */ jsxRuntime.jsx(
|
398
396
|
designSystem.Menu.Item,
|
399
397
|
{
|
@@ -409,15 +407,17 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
|
|
409
407
|
] })
|
410
408
|
] });
|
411
409
|
};
|
412
|
-
const MenuTrigger = styled__default.default(designSystem.Menu.Trigger)`
|
413
|
-
svg {
|
414
|
-
width: 0.6rem;
|
415
|
-
height: 0.4rem;
|
416
|
-
}
|
417
|
-
`;
|
418
410
|
const CellContent = ({ content, mainField, attribute, rowId, name }) => {
|
419
411
|
if (!hasContent(content, mainField, attribute)) {
|
420
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
412
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
413
|
+
designSystem.Typography,
|
414
|
+
{
|
415
|
+
textColor: "neutral800",
|
416
|
+
paddingLeft: attribute.type === "relation" ? "1.6rem" : 0,
|
417
|
+
paddingRight: attribute.type === "relation" ? "1.6rem" : 0,
|
418
|
+
children: "-"
|
419
|
+
}
|
420
|
+
);
|
421
421
|
}
|
422
422
|
switch (attribute.type) {
|
423
423
|
case "media":
|
@@ -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(
|
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(
|
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) {
|
@@ -460,6 +457,9 @@ const hasContent = (content, mainField, attribute) => {
|
|
460
457
|
if (isSingleRelation(attribute.relation)) {
|
461
458
|
return !isEmpty__default.default(content);
|
462
459
|
}
|
460
|
+
if (Array.isArray(content)) {
|
461
|
+
return content.length > 0;
|
462
|
+
}
|
463
463
|
return content?.count > 0;
|
464
464
|
}
|
465
465
|
if (["integer", "decimal", "float", "number"].includes(attribute.type)) {
|
@@ -472,8 +472,6 @@ const hasContent = (content, mainField, attribute) => {
|
|
472
472
|
};
|
473
473
|
const isSingleRelation = (type) => ["oneToOne", "manyToOne", "oneToOneMorph"].includes(type);
|
474
474
|
const ViewSettingsMenu = (props) => {
|
475
|
-
const [isVisible, setIsVisible] = React__namespace.useState(false);
|
476
|
-
const cogButtonRef = React__namespace.useRef(null);
|
477
475
|
const permissions = hooks.useTypedSelector(
|
478
476
|
(state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations ?? []
|
479
477
|
);
|
@@ -482,52 +480,37 @@ const ViewSettingsMenu = (props) => {
|
|
482
480
|
const {
|
483
481
|
allowedActions: { canConfigureView }
|
484
482
|
} = strapiAdmin.useRBAC(permissions);
|
485
|
-
|
486
|
-
|
487
|
-
};
|
488
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
489
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
483
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
|
484
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
490
485
|
designSystem.IconButton,
|
491
486
|
{
|
492
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cog, {}),
|
493
487
|
label: formatMessage({
|
494
488
|
id: "components.ViewSettings.tooltip",
|
495
489
|
defaultMessage: "View Settings"
|
496
490
|
}),
|
497
|
-
|
498
|
-
onClick: handleToggle
|
491
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cog, {})
|
499
492
|
}
|
500
|
-
),
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
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
|
-
)
|
493
|
+
) }),
|
494
|
+
/* @__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: [
|
495
|
+
canConfigureView ? /* @__PURE__ */ jsxRuntime.jsx(
|
496
|
+
designSystem.LinkButton,
|
497
|
+
{
|
498
|
+
size: "S",
|
499
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ListPlus, {}),
|
500
|
+
variant: "secondary",
|
501
|
+
tag: reactRouterDom.NavLink,
|
502
|
+
to: {
|
503
|
+
pathname: "configurations/list",
|
504
|
+
search: query.plugins ? qs.stringify({ plugins: query.plugins }, { encode: false }) : ""
|
505
|
+
},
|
506
|
+
children: formatMessage({
|
507
|
+
id: "app.links.configure-view",
|
508
|
+
defaultMessage: "Configure the view"
|
509
|
+
})
|
510
|
+
}
|
511
|
+
) : null,
|
512
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldPicker, { ...props })
|
513
|
+
] }) })
|
531
514
|
] });
|
532
515
|
};
|
533
516
|
const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
|
@@ -551,51 +534,58 @@ const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
|
|
551
534
|
const handleReset = () => {
|
552
535
|
resetHeaders();
|
553
536
|
};
|
554
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
537
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
538
|
+
designSystem.Flex,
|
539
|
+
{
|
540
|
+
tag: "fieldset",
|
541
|
+
direction: "column",
|
542
|
+
alignItems: "stretch",
|
543
|
+
gap: 3,
|
544
|
+
borderWidth: 0,
|
545
|
+
maxHeight: "240px",
|
546
|
+
overflow: "scroll",
|
547
|
+
children: [
|
548
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
|
549
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "legend", variant: "pi", fontWeight: "bold", children: formatMessage({
|
550
|
+
id: "containers.list.displayedFields",
|
551
|
+
defaultMessage: "Displayed fields"
|
552
|
+
}) }),
|
553
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.TextButton, { onClick: handleReset, children: formatMessage({
|
554
|
+
id: "app.components.Button.reset",
|
555
|
+
defaultMessage: "Reset"
|
556
|
+
}) })
|
557
|
+
] }),
|
558
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", children: columns.map((header) => {
|
559
|
+
const isActive = headers.includes(header.name);
|
560
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
561
|
+
designSystem.Flex,
|
562
|
+
{
|
563
|
+
wrap: "wrap",
|
564
|
+
gap: 2,
|
565
|
+
background: isActive ? "primary100" : "transparent",
|
566
|
+
hasRadius: true,
|
567
|
+
padding: 2,
|
568
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
569
|
+
designSystem.Checkbox,
|
570
|
+
{
|
571
|
+
onCheckedChange: () => handleChange(header.name),
|
572
|
+
checked: isActive,
|
573
|
+
name: header.name,
|
574
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontSize: 1, children: header.label })
|
575
|
+
}
|
576
|
+
)
|
577
|
+
},
|
578
|
+
header.name
|
579
|
+
);
|
580
|
+
}) })
|
581
|
+
]
|
582
|
+
}
|
583
|
+
);
|
592
584
|
};
|
593
|
-
const ChackboxWrapper = styled__default.default(designSystem.Flex)`
|
594
|
-
:hover {
|
595
|
-
background-color: ${(props) => props.theme.colors.primary100};
|
596
|
-
}
|
597
|
-
`;
|
598
585
|
const { INJECT_COLUMN_IN_TABLE } = index.HOOKS;
|
586
|
+
const LayoutsHeaderCustom = styledComponents.styled(strapiAdmin.Layouts.Header)`
|
587
|
+
overflow-wrap: anywhere;
|
588
|
+
`;
|
599
589
|
const ListViewPage = () => {
|
600
590
|
const { trackUsage } = strapiAdmin.useTracking();
|
601
591
|
const navigate = reactRouterDom.useNavigate();
|
@@ -605,7 +595,7 @@ const ListViewPage = () => {
|
|
605
595
|
const { collectionType, model, schema } = index.useDoc();
|
606
596
|
const { list } = index.useDocumentLayout(model);
|
607
597
|
const [displayedHeaders, setDisplayedHeaders] = React__namespace.useState([]);
|
608
|
-
const listLayout = usePrev(list.layout);
|
598
|
+
const listLayout = useDebounce.usePrev(list.layout);
|
609
599
|
React__namespace.useEffect(() => {
|
610
600
|
if (!isEqual__default.default(listLayout, list.layout)) {
|
611
601
|
setDisplayedHeaders(list.layout);
|
@@ -622,7 +612,7 @@ const ListViewPage = () => {
|
|
622
612
|
sort: list.settings.defaultSortBy ? `${list.settings.defaultSortBy}:${list.settings.defaultSortOrder}` : ""
|
623
613
|
});
|
624
614
|
const params = React__namespace.useMemo(() => index.buildValidParams(query), [query]);
|
625
|
-
const { data, error,
|
615
|
+
const { data, error, isFetching } = index.useGetAllDocumentsQuery({
|
626
616
|
model,
|
627
617
|
params
|
628
618
|
});
|
@@ -658,10 +648,14 @@ const ListViewPage = () => {
|
|
658
648
|
layout: list
|
659
649
|
});
|
660
650
|
const formattedHeaders = headers.displayedHeaders.map((header) => {
|
651
|
+
const translation = typeof header.label === "string" ? {
|
652
|
+
id: `content-manager.content-types.${model}.${header.name}`,
|
653
|
+
defaultMessage: header.label
|
654
|
+
} : header.label;
|
661
655
|
return {
|
662
656
|
...header,
|
663
|
-
label:
|
664
|
-
name: `${header.name}${header.mainField ? `.${header.mainField}` : ""}`
|
657
|
+
label: formatMessage(translation),
|
658
|
+
name: `${header.name}${header.mainField?.name ? `.${header.mainField.name}` : ""}`
|
665
659
|
};
|
666
660
|
});
|
667
661
|
if (schema?.options?.draftAndPublish) {
|
@@ -679,8 +673,15 @@ const ListViewPage = () => {
|
|
679
673
|
});
|
680
674
|
}
|
681
675
|
return formattedHeaders;
|
682
|
-
}, [
|
683
|
-
|
676
|
+
}, [
|
677
|
+
displayedHeaders,
|
678
|
+
formatMessage,
|
679
|
+
list,
|
680
|
+
runHookWaterfall,
|
681
|
+
schema?.options?.draftAndPublish,
|
682
|
+
model
|
683
|
+
]);
|
684
|
+
if (isFetching) {
|
684
685
|
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
|
685
686
|
}
|
686
687
|
if (error) {
|
@@ -697,7 +698,7 @@ const ListViewPage = () => {
|
|
697
698
|
return /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Page.Main, { children: [
|
698
699
|
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Title, { children: `${contentTypeTitle}` }),
|
699
700
|
/* @__PURE__ */ jsxRuntime.jsx(
|
700
|
-
|
701
|
+
LayoutsHeaderCustom,
|
701
702
|
{
|
702
703
|
primaryAction: canCreate ? /* @__PURE__ */ jsxRuntime.jsx(CreateButton, {}) : null,
|
703
704
|
subtitle: formatMessage(
|
@@ -746,8 +747,8 @@ const ListViewPage = () => {
|
|
746
747
|
}
|
747
748
|
),
|
748
749
|
/* @__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(
|
750
|
+
/* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Root, { rows: results, headers: tableHeaders, isLoading: isFetching, children: [
|
751
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableActionsBar, {}),
|
751
752
|
/* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Content, { children: [
|
752
753
|
/* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Head, { children: [
|
753
754
|
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.HeaderCheckboxCell, {}),
|
@@ -805,10 +806,22 @@ const ListViewPage = () => {
|
|
805
806
|
] }) })
|
806
807
|
] });
|
807
808
|
};
|
808
|
-
const ActionsCell =
|
809
|
+
const ActionsCell = styledComponents.styled(strapiAdmin.Table.Cell)`
|
809
810
|
display: flex;
|
810
811
|
justify-content: flex-end;
|
811
812
|
`;
|
813
|
+
const TableActionsBar = () => {
|
814
|
+
const selectRow = strapiAdmin.useTable("TableActionsBar", (state) => state.selectRow);
|
815
|
+
const [{ query }] = strapiAdmin.useQueryParams();
|
816
|
+
const locale = query?.plugins?.i18n?.locale;
|
817
|
+
const prevLocale = useDebounce.usePrev(locale);
|
818
|
+
React__namespace.useEffect(() => {
|
819
|
+
if (prevLocale !== locale) {
|
820
|
+
selectRow([]);
|
821
|
+
}
|
822
|
+
}, [selectRow, prevLocale, locale]);
|
823
|
+
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.ActionBar, { children: /* @__PURE__ */ jsxRuntime.jsx(index.BulkActionsRenderer, {}) });
|
824
|
+
};
|
812
825
|
const CreateButton = ({ variant }) => {
|
813
826
|
const { formatMessage } = reactIntl.useIntl();
|
814
827
|
const { trackUsage } = strapiAdmin.useTracking();
|
@@ -817,7 +830,7 @@ const CreateButton = ({ variant }) => {
|
|
817
830
|
designSystem.Button,
|
818
831
|
{
|
819
832
|
variant,
|
820
|
-
|
833
|
+
tag: reactRouterDom.Link,
|
821
834
|
onClick: () => {
|
822
835
|
trackUsage("willCreateEntry", { status: "draft" });
|
823
836
|
},
|
@@ -827,6 +840,8 @@ const CreateButton = ({ variant }) => {
|
|
827
840
|
pathname: "create",
|
828
841
|
search: qs.stringify({ plugins: query.plugins })
|
829
842
|
},
|
843
|
+
minWidth: "max-content",
|
844
|
+
marginLeft: 2,
|
830
845
|
children: formatMessage({
|
831
846
|
id: index.getTranslation("HeaderLayout.button.label-add-entry"),
|
832
847
|
defaultMessage: "Create new entry"
|
@@ -856,4 +871,4 @@ const ProtectedListViewPage = () => {
|
|
856
871
|
};
|
857
872
|
exports.ListViewPage = ListViewPage;
|
858
873
|
exports.ProtectedListViewPage = ProtectedListViewPage;
|
859
|
-
//# sourceMappingURL=ListViewPage-
|
874
|
+
//# sourceMappingURL=ListViewPage-BPVmh9pq.js.map
|