@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
@@ -7,17 +7,16 @@ const designSystem = require("@strapi/design-system");
|
|
7
7
|
const qs = require("qs");
|
8
8
|
const reactIntl = require("react-intl");
|
9
9
|
const reactRouterDom = require("react-router-dom");
|
10
|
-
const index = require("./index-
|
10
|
+
const index = require("./index-Cnw4gqee.js");
|
11
11
|
const pipe = require("lodash/fp/pipe");
|
12
12
|
const hooks = require("./hooks-BAaaKPS_.js");
|
13
|
-
const Field = require("./Field-
|
13
|
+
const Field = require("./Field-kYFVIGiP.js");
|
14
14
|
const Icons = require("@strapi/icons");
|
15
|
-
const
|
16
|
-
const relations = require("./relations-
|
15
|
+
const styledComponents = require("styled-components");
|
16
|
+
const relations = require("./relations-B7C7O_Pv.js");
|
17
17
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
18
18
|
function _interopNamespace(e) {
|
19
|
-
if (e && e.__esModule)
|
20
|
-
return e;
|
19
|
+
if (e && e.__esModule) return e;
|
21
20
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
22
21
|
if (e) {
|
23
22
|
for (const k in e) {
|
@@ -35,14 +34,13 @@ function _interopNamespace(e) {
|
|
35
34
|
}
|
36
35
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
37
36
|
const pipe__default = /* @__PURE__ */ _interopDefault(pipe);
|
38
|
-
const
|
39
|
-
|
40
|
-
} })`
|
37
|
+
const StyledAlert = styledComponents.styled(designSystem.Alert).attrs({ closeLabel: "Close", onClose: () => {
|
38
|
+
}, shadow: "none" })`
|
41
39
|
button {
|
42
40
|
display: none;
|
43
41
|
}
|
44
42
|
`;
|
45
|
-
const LinkEllipsis =
|
43
|
+
const LinkEllipsis = styledComponents.styled(designSystem.Link)`
|
46
44
|
display: block;
|
47
45
|
|
48
46
|
& > span {
|
@@ -55,13 +53,13 @@ const LinkEllipsis = styled__default.default(designSystem.Link)`
|
|
55
53
|
const CustomRelationInput = (props) => {
|
56
54
|
const { formatMessage } = reactIntl.useIntl();
|
57
55
|
const field = strapiAdmin.useField(props.name);
|
58
|
-
|
59
|
-
|
60
|
-
meta: { missingCount: 0 }
|
61
|
-
}
|
62
|
-
if (!formattedFieldValue || formattedFieldValue.results.length === 0) {
|
56
|
+
let formattedFieldValue;
|
57
|
+
if (field) {
|
58
|
+
formattedFieldValue = Array.isArray(field.value) ? { results: field.value, meta: { missingCount: 0 } } : field.value;
|
59
|
+
}
|
60
|
+
if (!formattedFieldValue || formattedFieldValue.results.length === 0 && formattedFieldValue.meta.missingCount === 0) {
|
63
61
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
64
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: props.labelAction, children: props.label }),
|
65
63
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(StyledAlert, { variant: "default", children: formatMessage({
|
66
64
|
id: "content-manager.history.content.no-relations",
|
67
65
|
defaultMessage: "No relations."
|
@@ -70,10 +68,12 @@ const CustomRelationInput = (props) => {
|
|
70
68
|
}
|
71
69
|
const { results, meta } = formattedFieldValue;
|
72
70
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
73
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: props.label }),
|
74
72
|
results.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", gap: 2, marginTop: 1, alignItems: "stretch", children: results.map((relationData) => {
|
75
|
-
const
|
73
|
+
const { targetModel } = props.attribute;
|
74
|
+
const href = `../${index.COLLECTION_TYPES}/${targetModel}/${relationData.documentId}`;
|
76
75
|
const label = relations.getRelationLabel(relationData, props.mainField);
|
76
|
+
const isAdminUserRelation = targetModel === "admin::user";
|
77
77
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
78
78
|
designSystem.Flex,
|
79
79
|
{
|
@@ -86,14 +86,15 @@ const CustomRelationInput = (props) => {
|
|
86
86
|
background: "neutral150",
|
87
87
|
justifyContent: "space-between",
|
88
88
|
children: [
|
89
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { minWidth: 0, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, {
|
89
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { minWidth: 0, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label, children: isAdminUserRelation ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: label }) : /* @__PURE__ */ jsxRuntime.jsx(LinkEllipsis, { tag: reactRouterDom.NavLink, to: href, children: label }) }) }),
|
90
90
|
/* @__PURE__ */ jsxRuntime.jsx(index.DocumentStatus, { status: relationData.status })
|
91
91
|
]
|
92
92
|
},
|
93
|
-
relationData.documentId
|
93
|
+
relationData.documentId ?? relationData.id
|
94
94
|
);
|
95
95
|
}) }),
|
96
|
-
meta.missingCount > 0 && /* @
|
96
|
+
meta.missingCount > 0 && /* @ts-expect-error – we dont need closeLabel */
|
97
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
97
98
|
StyledAlert,
|
98
99
|
{
|
99
100
|
marginTop: 1,
|
@@ -113,17 +114,13 @@ const CustomRelationInput = (props) => {
|
|
113
114
|
{ number: meta.missingCount }
|
114
115
|
)
|
115
116
|
}
|
116
|
-
)
|
117
|
-
results.length === 0 && meta.missingCount === 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(StyledAlert, { variant: "default", children: formatMessage({
|
118
|
-
id: "content-manager.history.content.no-relations",
|
119
|
-
defaultMessage: "No relations."
|
120
|
-
}) }) })
|
117
|
+
)
|
121
118
|
] });
|
122
119
|
};
|
123
120
|
const CustomMediaInput = (props) => {
|
124
|
-
const {
|
125
|
-
|
126
|
-
|
121
|
+
const { value } = strapiAdmin.useField(props.name);
|
122
|
+
const results = value ? value.results : [];
|
123
|
+
const meta = value ? value.meta : { missingCount: 0 };
|
127
124
|
const { formatMessage } = reactIntl.useIntl();
|
128
125
|
const fields = strapiAdmin.useStrapiApp("CustomMediaInput", (state) => state.fields);
|
129
126
|
const MediaLibrary = fields.media;
|
@@ -154,12 +151,39 @@ const CustomMediaInput = (props) => {
|
|
154
151
|
)
|
155
152
|
] });
|
156
153
|
};
|
154
|
+
const getLabelAction = (labelAction) => {
|
155
|
+
if (!React__namespace.isValidElement(labelAction)) {
|
156
|
+
return labelAction;
|
157
|
+
}
|
158
|
+
const labelActionTitleId = labelAction.props.title.id;
|
159
|
+
if (labelActionTitleId === "i18n.Field.localized") {
|
160
|
+
return React__namespace.cloneElement(labelAction, {
|
161
|
+
...labelAction.props,
|
162
|
+
title: {
|
163
|
+
id: "history.content.localized",
|
164
|
+
defaultMessage: "This value is specific to this locale. If you restore this version, the content will not be replaced for other locales."
|
165
|
+
}
|
166
|
+
});
|
167
|
+
}
|
168
|
+
if (labelActionTitleId === "i18n.Field.not-localized") {
|
169
|
+
return React__namespace.cloneElement(labelAction, {
|
170
|
+
...labelAction.props,
|
171
|
+
title: {
|
172
|
+
id: "history.content.not-localized",
|
173
|
+
defaultMessage: "This value is common to all locales. If you restore this version and save the changes, the content will be replaced for all locales."
|
174
|
+
}
|
175
|
+
});
|
176
|
+
}
|
177
|
+
return labelAction;
|
178
|
+
};
|
157
179
|
const VersionInputRenderer = ({
|
158
180
|
visible,
|
159
181
|
hint: providedHint,
|
160
182
|
shouldIgnoreRBAC = false,
|
183
|
+
labelAction,
|
161
184
|
...props
|
162
185
|
}) => {
|
186
|
+
const customLabelAction = getLabelAction(labelAction);
|
163
187
|
const { formatMessage } = reactIntl.useIntl();
|
164
188
|
const version = useHistoryContext("VersionContent", (state) => state.selectedVersion);
|
165
189
|
const configuration = useHistoryContext("VersionContent", (state) => state.configuration);
|
@@ -193,7 +217,7 @@ const VersionInputRenderer = ({
|
|
193
217
|
const addedAttributes = version.meta.unknownAttributes.added;
|
194
218
|
if (Object.keys(addedAttributes).includes(props.name)) {
|
195
219
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
|
196
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: props.label }),
|
197
221
|
/* @__PURE__ */ jsxRuntime.jsx(
|
198
222
|
StyledAlert,
|
199
223
|
{
|
@@ -217,29 +241,46 @@ const VersionInputRenderer = ({
|
|
217
241
|
if (attributeHasCustomFieldProperty(props.attribute)) {
|
218
242
|
const CustomInput = lazyComponentStore[props.attribute.customField];
|
219
243
|
if (CustomInput) {
|
220
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
244
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
245
|
+
CustomInput,
|
246
|
+
{
|
247
|
+
...props,
|
248
|
+
hint,
|
249
|
+
labelAction: customLabelAction,
|
250
|
+
disabled: fieldIsDisabled
|
251
|
+
}
|
252
|
+
);
|
221
253
|
}
|
222
254
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
223
255
|
strapiAdmin.InputRenderer,
|
224
256
|
{
|
225
257
|
...props,
|
226
258
|
hint,
|
259
|
+
labelAction: customLabelAction,
|
227
260
|
type: props.attribute.customField,
|
228
261
|
disabled: fieldIsDisabled
|
229
262
|
}
|
230
263
|
);
|
231
264
|
}
|
232
265
|
if (props.type === "media") {
|
233
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CustomMediaInput, { ...props, disabled: fieldIsDisabled });
|
266
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CustomMediaInput, { ...props, labelAction: customLabelAction, disabled: fieldIsDisabled });
|
234
267
|
}
|
235
268
|
const addedInputTypes = Object.keys(fields);
|
236
269
|
if (!attributeHasCustomFieldProperty(props.attribute) && addedInputTypes.includes(props.type)) {
|
237
270
|
const CustomInput = fields[props.type];
|
238
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
271
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
272
|
+
CustomInput,
|
273
|
+
{
|
274
|
+
...props,
|
275
|
+
hint,
|
276
|
+
labelAction: customLabelAction,
|
277
|
+
disabled: fieldIsDisabled
|
278
|
+
}
|
279
|
+
);
|
239
280
|
}
|
240
281
|
switch (props.type) {
|
241
282
|
case "blocks":
|
242
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field.
|
283
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field.MemoizedBlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
|
243
284
|
case "component":
|
244
285
|
const { layout } = componentsLayout[props.attribute.component];
|
245
286
|
const [remainingFieldsLayout] = getRemaingFieldsLayout({
|
@@ -249,29 +290,65 @@ const VersionInputRenderer = ({
|
|
249
290
|
schemaAttributes: components[props.attribute.component].attributes
|
250
291
|
});
|
251
292
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
252
|
-
Field.
|
293
|
+
Field.MemoizedComponentInput,
|
253
294
|
{
|
254
295
|
...props,
|
255
296
|
layout: [...layout, ...remainingFieldsLayout || []],
|
256
297
|
hint,
|
298
|
+
labelAction: customLabelAction,
|
257
299
|
disabled: fieldIsDisabled,
|
258
300
|
children: (inputProps) => /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...inputProps, shouldIgnoreRBAC: true })
|
259
301
|
}
|
260
302
|
);
|
261
303
|
case "dynamiczone":
|
262
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
304
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
305
|
+
Field.DynamicZone,
|
306
|
+
{
|
307
|
+
...props,
|
308
|
+
hint,
|
309
|
+
labelAction: customLabelAction,
|
310
|
+
disabled: fieldIsDisabled
|
311
|
+
}
|
312
|
+
);
|
263
313
|
case "relation":
|
264
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
314
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
315
|
+
CustomRelationInput,
|
316
|
+
{
|
317
|
+
...props,
|
318
|
+
hint,
|
319
|
+
labelAction: customLabelAction,
|
320
|
+
disabled: fieldIsDisabled
|
321
|
+
}
|
322
|
+
);
|
265
323
|
case "richtext":
|
266
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
324
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
325
|
+
Field.MemoizedWysiwyg,
|
326
|
+
{
|
327
|
+
...props,
|
328
|
+
hint,
|
329
|
+
type: props.type,
|
330
|
+
labelAction: customLabelAction,
|
331
|
+
disabled: fieldIsDisabled
|
332
|
+
}
|
333
|
+
);
|
267
334
|
case "uid":
|
268
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
335
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
336
|
+
Field.MemoizedUIDInput,
|
337
|
+
{
|
338
|
+
...props,
|
339
|
+
hint,
|
340
|
+
type: props.type,
|
341
|
+
labelAction: customLabelAction,
|
342
|
+
disabled: fieldIsDisabled
|
343
|
+
}
|
344
|
+
);
|
269
345
|
case "enumeration":
|
270
346
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
271
347
|
strapiAdmin.InputRenderer,
|
272
348
|
{
|
273
349
|
...props,
|
274
350
|
hint,
|
351
|
+
labelAction: customLabelAction,
|
275
352
|
options: props.attribute.enum.map((value) => ({ value })),
|
276
353
|
type: props.customField ? "custom-field" : props.type,
|
277
354
|
disabled: fieldIsDisabled
|
@@ -284,6 +361,7 @@ const VersionInputRenderer = ({
|
|
284
361
|
{
|
285
362
|
...restProps,
|
286
363
|
hint,
|
364
|
+
labelAction: customLabelAction,
|
287
365
|
type: props.customField ? "custom-field" : props.type,
|
288
366
|
disabled: fieldIsDisabled
|
289
367
|
}
|
@@ -337,7 +415,7 @@ const FormPanel = ({ panel }) => {
|
|
337
415
|
if (panel.some((row) => row.some((field) => field.type === "dynamiczone"))) {
|
338
416
|
const [row] = panel;
|
339
417
|
const [field] = row;
|
340
|
-
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
418
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 12, s: 12, xs: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...field }) }) }, field.name);
|
341
419
|
}
|
342
420
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
343
421
|
designSystem.Box,
|
@@ -350,8 +428,19 @@ const FormPanel = ({ panel }) => {
|
|
350
428
|
paddingTop: 6,
|
351
429
|
paddingBottom: 6,
|
352
430
|
borderColor: "neutral150",
|
353
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: panel.map((row, gridRowIndex) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
|
354
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
431
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: panel.map((row, gridRowIndex) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
433
|
+
designSystem.Grid.Item,
|
434
|
+
{
|
435
|
+
col: size,
|
436
|
+
s: 12,
|
437
|
+
xs: 12,
|
438
|
+
direction: "column",
|
439
|
+
alignItems: "stretch",
|
440
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...field })
|
441
|
+
},
|
442
|
+
field.name
|
443
|
+
);
|
355
444
|
}) }, gridRowIndex)) })
|
356
445
|
}
|
357
446
|
);
|
@@ -466,6 +555,7 @@ const VersionHeader = ({ headerId }) => {
|
|
466
555
|
const [isConfirmDialogOpen, setIsConfirmDialogOpen] = React__namespace.useState(false);
|
467
556
|
const navigate = reactRouterDom.useNavigate();
|
468
557
|
const { formatMessage, formatDate } = reactIntl.useIntl();
|
558
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
469
559
|
const { toggleNotification } = strapiAdmin.useNotification();
|
470
560
|
const [{ query }] = strapiAdmin.useQueryParams();
|
471
561
|
const { collectionType, slug } = reactRouterDom.useParams();
|
@@ -481,14 +571,8 @@ const VersionHeader = ({ headerId }) => {
|
|
481
571
|
const mainFieldValue = version.data[mainField];
|
482
572
|
const getNextNavigation = () => {
|
483
573
|
const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
|
484
|
-
if (collectionType === index.COLLECTION_TYPES) {
|
485
|
-
return {
|
486
|
-
pathname: `/content-manager/${collectionType}/${version.contentType}/${version.relatedDocumentId}`,
|
487
|
-
search: pluginsQueryParams
|
488
|
-
};
|
489
|
-
}
|
490
574
|
return {
|
491
|
-
pathname:
|
575
|
+
pathname: "..",
|
492
576
|
search: pluginsQueryParams
|
493
577
|
};
|
494
578
|
};
|
@@ -504,7 +588,7 @@ const VersionHeader = ({ headerId }) => {
|
|
504
588
|
body: { contentType: version.contentType }
|
505
589
|
});
|
506
590
|
if ("data" in response) {
|
507
|
-
navigate(getNextNavigation());
|
591
|
+
navigate(getNextNavigation(), { relative: "path" });
|
508
592
|
toggleNotification({
|
509
593
|
type: "success",
|
510
594
|
title: formatMessage({
|
@@ -513,9 +597,10 @@ const VersionHeader = ({ headerId }) => {
|
|
513
597
|
}),
|
514
598
|
message: formatMessage({
|
515
599
|
id: "content-manager.restore.success.message",
|
516
|
-
defaultMessage: "
|
600
|
+
defaultMessage: "A past version of the content was restored."
|
517
601
|
})
|
518
602
|
});
|
603
|
+
trackUsage("didRestoreHistoryVersion");
|
519
604
|
}
|
520
605
|
if ("error" in response) {
|
521
606
|
toggleNotification({
|
@@ -533,7 +618,7 @@ const VersionHeader = ({ headerId }) => {
|
|
533
618
|
});
|
534
619
|
}
|
535
620
|
};
|
536
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
621
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Root, { open: isConfirmDialogOpen, onOpenChange: setIsConfirmDialogOpen, children: [
|
537
622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
538
623
|
strapiAdmin.Layouts.BaseHeader,
|
539
624
|
{
|
@@ -545,7 +630,7 @@ const VersionHeader = ({ headerId }) => {
|
|
545
630
|
hour: "numeric",
|
546
631
|
minute: "numeric"
|
547
632
|
}),
|
548
|
-
subtitle: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", children: formatMessage(
|
633
|
+
subtitle: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", textColor: "neutral600", children: formatMessage(
|
549
634
|
{
|
550
635
|
id: "content-manager.history.version.subtitle",
|
551
636
|
defaultMessage: "{hasLocale, select, true {{subtitle}, in {locale}} other {{subtitle}}}"
|
@@ -560,8 +645,10 @@ const VersionHeader = ({ headerId }) => {
|
|
560
645
|
designSystem.Link,
|
561
646
|
{
|
562
647
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowLeft, {}),
|
563
|
-
|
648
|
+
tag: reactRouterDom.NavLink,
|
564
649
|
to: getNextNavigation(),
|
650
|
+
relative: "path",
|
651
|
+
isExternal: false,
|
565
652
|
children: formatMessage({
|
566
653
|
id: "global.back",
|
567
654
|
defaultMessage: "Back"
|
@@ -569,7 +656,7 @@ const VersionHeader = ({ headerId }) => {
|
|
569
656
|
}
|
570
657
|
),
|
571
658
|
sticky: false,
|
572
|
-
primaryAction: /* @__PURE__ */ jsxRuntime.jsx(
|
659
|
+
primaryAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
573
660
|
designSystem.Button,
|
574
661
|
{
|
575
662
|
disabled: !allowedActions.canUpdate || isCurrentVersion,
|
@@ -581,16 +668,13 @@ const VersionHeader = ({ headerId }) => {
|
|
581
668
|
defaultMessage: "Restore"
|
582
669
|
})
|
583
670
|
}
|
584
|
-
)
|
671
|
+
) })
|
585
672
|
}
|
586
673
|
),
|
587
674
|
/* @__PURE__ */ jsxRuntime.jsx(
|
588
675
|
strapiAdmin.ConfirmDialog,
|
589
676
|
{
|
590
|
-
isOpen: isConfirmDialogOpen,
|
591
|
-
onClose: () => setIsConfirmDialogOpen(false),
|
592
677
|
onConfirm: handleRestore,
|
593
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}),
|
594
678
|
endAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "secondary", onClick: handleRestore, loading: isLoading, children: formatMessage({
|
595
679
|
id: "content-manager.history.restore.confirm.button",
|
596
680
|
defaultMessage: "Restore"
|
@@ -604,6 +688,7 @@ const VersionHeader = ({ headerId }) => {
|
|
604
688
|
gap: 2,
|
605
689
|
textAlign: "center",
|
606
690
|
children: [
|
691
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
607
692
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
|
608
693
|
id: "content-manager.history.restore.confirm.title",
|
609
694
|
defaultMessage: "Are you sure you want to restore this version?"
|
@@ -624,46 +709,10 @@ const VersionHeader = ({ headerId }) => {
|
|
624
709
|
)
|
625
710
|
] });
|
626
711
|
};
|
627
|
-
const BlueText = (children) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", children });
|
712
|
+
const BlueText = (children) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", children });
|
628
713
|
const VersionCard = ({ version, isCurrent }) => {
|
629
714
|
const { formatDate, formatMessage } = reactIntl.useIntl();
|
630
715
|
const [{ query }] = strapiAdmin.useQueryParams();
|
631
|
-
const statusData = (() => {
|
632
|
-
switch (version.status) {
|
633
|
-
case "draft":
|
634
|
-
return {
|
635
|
-
background: "secondary100",
|
636
|
-
border: "secondary200",
|
637
|
-
text: "secondary700",
|
638
|
-
message: {
|
639
|
-
id: "content-manager.containers.List.draft",
|
640
|
-
defaultMessage: "Draft"
|
641
|
-
}
|
642
|
-
};
|
643
|
-
case "modified":
|
644
|
-
return {
|
645
|
-
background: "alternative100",
|
646
|
-
border: "alternative200",
|
647
|
-
text: "alternative700",
|
648
|
-
message: {
|
649
|
-
// TODO: check the translation key once D&P v5 is done
|
650
|
-
id: "content-manager.containers.List.modified",
|
651
|
-
defaultMessage: "Modified"
|
652
|
-
}
|
653
|
-
};
|
654
|
-
case "published":
|
655
|
-
default:
|
656
|
-
return {
|
657
|
-
background: "success100",
|
658
|
-
border: "success200",
|
659
|
-
text: "success700",
|
660
|
-
message: {
|
661
|
-
id: "content-manager.containers.List.published",
|
662
|
-
defaultMessage: "Published"
|
663
|
-
}
|
664
|
-
};
|
665
|
-
}
|
666
|
-
})();
|
667
716
|
const isActive = query.id === version.id.toString();
|
668
717
|
const author = version.createdBy && index.getDisplayName(version.createdBy);
|
669
718
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
@@ -676,23 +725,21 @@ const VersionCard = ({ version, isCurrent }) => {
|
|
676
725
|
borderWidth: "1px",
|
677
726
|
borderStyle: "solid",
|
678
727
|
borderColor: isActive ? "primary600" : "neutral200",
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
paddingRight: 5,
|
683
|
-
as: reactRouterDom.Link,
|
728
|
+
color: "neutral800",
|
729
|
+
padding: 5,
|
730
|
+
tag: reactRouterDom.Link,
|
684
731
|
to: `?${qs.stringify({ ...query, id: version.id })}`,
|
685
732
|
style: { textDecoration: "none" },
|
686
733
|
children: [
|
687
734
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "flex-start", children: [
|
688
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, {
|
735
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
|
689
736
|
day: "numeric",
|
690
737
|
month: "numeric",
|
691
738
|
year: "numeric",
|
692
739
|
hour: "2-digit",
|
693
740
|
minute: "2-digit"
|
694
741
|
}) }),
|
695
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, {
|
742
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
|
696
743
|
{
|
697
744
|
id: "content-manager.history.sidebar.versionDescription",
|
698
745
|
defaultMessage: "{distanceToNow}{isAnonymous, select, true {} other { by {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}"
|
@@ -706,21 +753,7 @@ const VersionCard = ({ version, isCurrent }) => {
|
|
706
753
|
}
|
707
754
|
) })
|
708
755
|
] }),
|
709
|
-
version.status && /* @__PURE__ */ jsxRuntime.jsx(
|
710
|
-
designSystem.Box,
|
711
|
-
{
|
712
|
-
background: statusData.background,
|
713
|
-
borderStyle: "solid",
|
714
|
-
borderWidth: "1px",
|
715
|
-
borderColor: statusData.border,
|
716
|
-
hasRadius: true,
|
717
|
-
paddingLeft: "6px",
|
718
|
-
paddingRight: "6px",
|
719
|
-
paddingTop: "2px",
|
720
|
-
paddingBottom: "2px",
|
721
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", textColor: statusData.text, children: formatMessage(statusData.message) })
|
722
|
-
}
|
723
|
-
)
|
756
|
+
version.status && /* @__PURE__ */ jsxRuntime.jsx(index.DocumentStatus, { status: version.status, size: "XS" })
|
724
757
|
]
|
725
758
|
}
|
726
759
|
);
|
@@ -748,7 +781,7 @@ const VersionsList = () => {
|
|
748
781
|
borderColor: "neutral200",
|
749
782
|
borderWidth: "0 0 0 1px",
|
750
783
|
borderStyle: "solid",
|
751
|
-
|
784
|
+
tag: "aside",
|
752
785
|
children: [
|
753
786
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
754
787
|
designSystem.Flex,
|
@@ -759,9 +792,9 @@ const VersionsList = () => {
|
|
759
792
|
borderColor: "neutral200",
|
760
793
|
borderWidth: "0 0 1px",
|
761
794
|
borderStyle: "solid",
|
762
|
-
|
795
|
+
tag: "header",
|
763
796
|
children: [
|
764
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, {
|
797
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
|
765
798
|
id: "content-manager.history.sidebar.title",
|
766
799
|
defaultMessage: "Versions"
|
767
800
|
}) }),
|
@@ -774,31 +807,18 @@ const VersionsList = () => {
|
|
774
807
|
id: "content-manager.history.sidebar.show-newer",
|
775
808
|
defaultMessage: "Show newer versions"
|
776
809
|
}) }) }),
|
777
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
778
|
-
|
810
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", gap: 3, padding: 4, tag: "ul", alignItems: "stretch", children: versions.data.map((version, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
811
|
+
"li",
|
779
812
|
{
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
"li",
|
790
|
-
{
|
791
|
-
"aria-label": formatMessage({
|
792
|
-
id: "content-manager.history.sidebar.title.version-card.aria-label",
|
793
|
-
defaultMessage: "Version card"
|
794
|
-
}),
|
795
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(VersionCard, { version, isCurrent: page === 1 && index2 === 0 })
|
796
|
-
},
|
797
|
-
version.id
|
798
|
-
))
|
799
|
-
}
|
800
|
-
),
|
801
|
-
versions.meta.pagination.page < versions.meta.pagination.pageCount && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 5, textAlign: "center", children: /* @__PURE__ */ jsxRuntime.jsx(PaginationButton, { page: page + 1, children: formatMessage({
|
813
|
+
"aria-label": formatMessage({
|
814
|
+
id: "content-manager.history.sidebar.title.version-card.aria-label",
|
815
|
+
defaultMessage: "Version card"
|
816
|
+
}),
|
817
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(VersionCard, { version, isCurrent: page === 1 && index2 === 0 })
|
818
|
+
},
|
819
|
+
version.id
|
820
|
+
)) }),
|
821
|
+
versions.meta.pagination.page < versions.meta.pagination.pageCount && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, textAlign: "center", children: /* @__PURE__ */ jsxRuntime.jsx(PaginationButton, { page: page + 1, children: formatMessage({
|
802
822
|
id: "content-manager.history.sidebar.show-older",
|
803
823
|
defaultMessage: "Show older versions"
|
804
824
|
}) }) })
|
@@ -850,7 +870,22 @@ const HistoryPage = () => {
|
|
850
870
|
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
|
851
871
|
}
|
852
872
|
if (!versionsResponse.isError && !versionsResponse.data?.data?.length) {
|
853
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
873
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
874
|
+
strapiAdmin.Page.NoData,
|
875
|
+
{
|
876
|
+
action: /* @__PURE__ */ jsxRuntime.jsx(
|
877
|
+
designSystem.Link,
|
878
|
+
{
|
879
|
+
tag: reactRouterDom.NavLink,
|
880
|
+
to: `/content-manager/${collectionType}/${slug}${documentId ? `/${documentId}` : ""}`,
|
881
|
+
children: formatMessage({
|
882
|
+
id: "global.back",
|
883
|
+
defaultMessage: "Back"
|
884
|
+
})
|
885
|
+
}
|
886
|
+
)
|
887
|
+
}
|
888
|
+
) });
|
854
889
|
}
|
855
890
|
if (versionsResponse.data?.data?.length && !selectedVersionId) {
|
856
891
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -957,4 +992,4 @@ const ProtectedHistoryPage = () => {
|
|
957
992
|
exports.HistoryProvider = HistoryProvider;
|
958
993
|
exports.ProtectedHistoryPage = ProtectedHistoryPage;
|
959
994
|
exports.useHistoryContext = useHistoryContext;
|
960
|
-
//# sourceMappingURL=History-
|
995
|
+
//# sourceMappingURL=History-BMndx49M.js.map
|