@strapi/content-manager 0.0.0-experimental.d1602f22dc638a4c3c5084965fd6126fff5e9d4f → 0.0.0-experimental.d2a56e52af31fcf0f0c582a5a2e58e310966e96b
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/dist/admin/chunks/{CardDragPreview-DwuraT0K.js → CardDragPreview-DwuraT0K.mjs} +1 -1
- package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
- package/dist/admin/chunks/{ComponentConfigurationPage-DXwOtpq1.js → ComponentConfigurationPage-CGn9IYeg.js} +6 -6
- package/dist/admin/chunks/{ComponentConfigurationPage-DXwOtpq1.js.map → ComponentConfigurationPage-CGn9IYeg.js.map} +1 -1
- package/dist/admin/chunks/{ComponentConfigurationPage-DhYZp4nN.js → ComponentConfigurationPage-DgYK4xW6.mjs} +9 -9
- package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs.map +1 -0
- package/dist/admin/chunks/{ComponentIcon-BZcTc4rj.js → ComponentIcon-BZcTc4rj.mjs} +1 -1
- package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
- package/dist/admin/chunks/{EditConfigurationPage-D0Ng758X.js → EditConfigurationPage-7w_-4jF4.js} +6 -6
- package/dist/admin/chunks/{EditConfigurationPage-D0Ng758X.js.map → EditConfigurationPage-7w_-4jF4.js.map} +1 -1
- package/dist/admin/chunks/{EditConfigurationPage-DDuPch5d.js → EditConfigurationPage-C05SwwH-.mjs} +9 -9
- package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs.map +1 -0
- package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs +318 -0
- package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs.map +1 -0
- package/dist/admin/chunks/EditViewPage-CuQfZJDf.js +341 -0
- package/dist/admin/chunks/EditViewPage-CuQfZJDf.js.map +1 -0
- package/dist/admin/chunks/{FieldTypeIcon-BY6MrVF4.js → FieldTypeIcon-BY6MrVF4.mjs} +1 -1
- package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
- package/dist/admin/chunks/{Form-BEqiuSvQ.js → Form-BqNYRsCb.js} +5 -5
- package/dist/admin/chunks/{Form-BEqiuSvQ.js.map → Form-BqNYRsCb.js.map} +1 -1
- package/dist/admin/chunks/{Form-CZmB6JIg.js → Form-DaEnqAeV.mjs} +5 -5
- package/dist/admin/chunks/Form-DaEnqAeV.mjs.map +1 -0
- package/dist/admin/chunks/{History-CPYXgxkS.js → History-B7dGNfmx.mjs} +68 -15
- package/dist/admin/chunks/History-B7dGNfmx.mjs.map +1 -0
- package/dist/admin/chunks/{History-BlLKDZSw.js → History-CEoOna4w.js} +67 -14
- package/dist/admin/chunks/History-CEoOna4w.js.map +1 -0
- package/dist/admin/chunks/{Input-CLX3C5DI.js → Input-B3QUS9rv.mjs} +2273 -511
- package/dist/admin/chunks/Input-B3QUS9rv.mjs.map +1 -0
- package/dist/admin/chunks/{Input-DiR2Xfa7.js → Input-B8I0b9aD.js} +2284 -519
- package/dist/admin/chunks/Input-B8I0b9aD.js.map +1 -0
- package/dist/admin/chunks/{ListConfigurationPage-DdTp-HxB.js → ListConfigurationPage-BbjJweN-.js} +7 -7
- package/dist/admin/chunks/{ListConfigurationPage-DdTp-HxB.js.map → ListConfigurationPage-BbjJweN-.js.map} +1 -1
- package/dist/admin/chunks/{ListConfigurationPage-CNvotSqe.js → ListConfigurationPage-VtFQ5mOK.mjs} +8 -8
- package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs.map +1 -0
- package/dist/admin/chunks/{ListViewPage-MJNfQTp-.js → ListViewPage-Cg3zbT7Y.mjs} +5 -5
- package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs.map +1 -0
- package/dist/admin/chunks/{ListViewPage-BtXYjEYz.js → ListViewPage-CzUm2VJN.js} +8 -8
- package/dist/admin/chunks/{ListViewPage-BtXYjEYz.js.map → ListViewPage-CzUm2VJN.js.map} +1 -1
- package/dist/admin/chunks/{NoContentTypePage-CVvVpwj4.js → NoContentTypePage-FcLLn2Wt.js} +3 -2
- package/dist/admin/chunks/{NoContentTypePage-BJrZvYPY.js.map → NoContentTypePage-FcLLn2Wt.js.map} +1 -1
- package/dist/admin/chunks/{NoContentTypePage-BJrZvYPY.js → NoContentTypePage-NOf7Aq_E.mjs} +3 -2
- package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs.map +1 -0
- package/dist/admin/chunks/{NoPermissionsPage-C5yWg70d.js → NoPermissionsPage-DmeyXtCk.js} +3 -2
- package/dist/admin/chunks/{NoPermissionsPage-BulvG4hB.js.map → NoPermissionsPage-DmeyXtCk.js.map} +1 -1
- package/dist/admin/chunks/{NoPermissionsPage-BulvG4hB.js → NoPermissionsPage-OVr9KG6L.mjs} +3 -2
- package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs.map +1 -0
- package/dist/admin/chunks/Preview-BH9l1QXk.mjs +593 -0
- package/dist/admin/chunks/Preview-BH9l1QXk.mjs.map +1 -0
- package/dist/admin/chunks/Preview-BYKkpc11.js +615 -0
- package/dist/admin/chunks/Preview-BYKkpc11.js.map +1 -0
- package/dist/admin/chunks/{ar-DckYq_WK.js → ar-DckYq_WK.mjs} +1 -1
- package/dist/admin/chunks/ar-DckYq_WK.mjs.map +1 -0
- package/dist/admin/chunks/{ca-DviY7mRj.js → ca-DviY7mRj.mjs} +1 -1
- package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
- package/dist/admin/chunks/{cs-C7OSYFQ7.js → cs-C7OSYFQ7.mjs} +1 -1
- package/dist/admin/chunks/cs-C7OSYFQ7.mjs.map +1 -0
- package/dist/admin/chunks/{de-5QRlDHyR.js → de-5QRlDHyR.mjs} +1 -1
- package/dist/admin/chunks/de-5QRlDHyR.mjs.map +1 -0
- package/dist/admin/chunks/{en-LfhocNG2.js → en-C2zEwS3-.mjs} +6 -1
- package/dist/admin/chunks/en-C2zEwS3-.mjs.map +1 -0
- package/dist/admin/chunks/{en-C1CjdAtC.js → en-G976DLsg.js} +6 -1
- package/dist/admin/chunks/{en-LfhocNG2.js.map → en-G976DLsg.js.map} +1 -1
- package/dist/admin/chunks/{es-DkoWSExG.js → es-DkoWSExG.mjs} +1 -1
- package/dist/admin/chunks/es-DkoWSExG.mjs.map +1 -0
- package/dist/admin/chunks/{eu-BG1xX7HK.js → eu-BG1xX7HK.mjs} +1 -1
- package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
- package/dist/admin/chunks/{fr-CFdRaRVj.js → fr-CFdRaRVj.mjs} +1 -1
- package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
- package/dist/admin/chunks/{gu-D5MMMXRs.js → gu-D5MMMXRs.mjs} +1 -1
- package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
- package/dist/admin/chunks/{hi-lp17SCjr.js → hi-lp17SCjr.mjs} +1 -1
- package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
- package/dist/admin/chunks/{hooks-DMvik5y_.js → hooks-DMvik5y_.mjs} +1 -1
- package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
- package/dist/admin/chunks/{hu-CLka1U2C.js → hu-CLka1U2C.mjs} +1 -1
- package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
- package/dist/admin/chunks/{id-USfY9m1g.js → id-USfY9m1g.mjs} +1 -1
- package/dist/admin/chunks/id-USfY9m1g.mjs.map +1 -0
- package/dist/admin/chunks/{index-BRlRBRLb.js → index-BE7PI9Wp.mjs} +273 -173
- package/dist/admin/chunks/index-BE7PI9Wp.mjs.map +1 -0
- package/dist/admin/chunks/{index-ZIwOPk6p.js → index-BwIhYBsG.js} +246 -142
- package/dist/admin/chunks/index-BwIhYBsG.js.map +1 -0
- package/dist/admin/chunks/{it-BAHrwmYS.js → it-BAHrwmYS.mjs} +1 -1
- package/dist/admin/chunks/it-BAHrwmYS.mjs.map +1 -0
- package/dist/admin/chunks/{ja-BWKmBJFT.js → ja-BWKmBJFT.mjs} +1 -1
- package/dist/admin/chunks/ja-BWKmBJFT.mjs.map +1 -0
- package/dist/admin/chunks/{ko-CgADGBNt.js → ko-CgADGBNt.mjs} +1 -1
- package/dist/admin/chunks/ko-CgADGBNt.mjs.map +1 -0
- package/dist/admin/chunks/{layout-B3-guCPG.js → layout-9zlUM9V3.mjs} +81 -7
- package/dist/admin/chunks/layout-9zlUM9V3.mjs.map +1 -0
- package/dist/admin/chunks/{layout-ameRNiAM.js → layout-Cr0HaJVS.js} +87 -13
- package/dist/admin/chunks/layout-Cr0HaJVS.js.map +1 -0
- package/dist/admin/chunks/{ml-CnhCfOn_.js → ml-CnhCfOn_.mjs} +1 -1
- package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
- package/dist/admin/chunks/{ms-Bh09NFff.js → ms-Bh09NFff.mjs} +1 -1
- package/dist/admin/chunks/ms-Bh09NFff.mjs.map +1 -0
- package/dist/admin/chunks/{nl-C8HYflTc.js → nl-C8HYflTc.mjs} +1 -1
- package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
- package/dist/admin/chunks/{useDragAndDrop-gcqEJMnO.js → objects-BJTP843m.js} +73 -1
- package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
- package/dist/admin/chunks/{useDragAndDrop-HYwNDExe.js → objects-D2z-IJgu.mjs} +72 -2
- package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
- package/dist/admin/chunks/{pl-MFCZJZuZ.js → pl-MFCZJZuZ.mjs} +1 -1
- package/dist/admin/chunks/pl-MFCZJZuZ.mjs.map +1 -0
- package/dist/admin/chunks/{pt-BR-CcotyBGJ.js → pt-BR-CcotyBGJ.mjs} +1 -1
- package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs.map +1 -0
- package/dist/admin/chunks/{pt-HbmgeiYO.js → pt-HbmgeiYO.mjs} +1 -1
- package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
- package/dist/admin/chunks/{ru-CB4BUyQp.js → ru-CB4BUyQp.mjs} +1 -1
- package/dist/admin/chunks/{ru-CB4BUyQp.js.map → ru-CB4BUyQp.mjs.map} +1 -1
- package/dist/admin/chunks/{sa-n_aPA-pU.js → sa-n_aPA-pU.mjs} +1 -1
- package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
- package/dist/admin/chunks/{sk-tn_BDjE2.js → sk-tn_BDjE2.mjs} +1 -1
- package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
- package/dist/admin/chunks/{sv-cq4ZrQRd.js → sv-cq4ZrQRd.mjs} +1 -1
- package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
- package/dist/admin/chunks/{th-mUH7hEtc.js → th-mUH7hEtc.mjs} +1 -1
- package/dist/admin/chunks/th-mUH7hEtc.mjs.map +1 -0
- package/dist/admin/chunks/{tr-Yt38daxh.js → tr-Yt38daxh.mjs} +1 -1
- package/dist/admin/chunks/tr-Yt38daxh.mjs.map +1 -0
- package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
- package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
- package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
- package/dist/admin/chunks/{en-C1CjdAtC.js.map → uk-DB6OgySY.js.map} +1 -1
- package/dist/admin/chunks/{relations-CmoFVrKj.js → usePrev-DgZBp9Oo.js} +18 -2
- package/dist/admin/chunks/usePrev-DgZBp9Oo.js.map +1 -0
- package/dist/admin/chunks/{relations-DYQAaXwZ.js → usePrev-PisKKvhT.mjs} +18 -4
- package/dist/admin/chunks/usePrev-PisKKvhT.mjs.map +1 -0
- package/dist/admin/chunks/{vi-CvBGlTjr.js → vi-CvBGlTjr.mjs} +1 -1
- package/dist/admin/chunks/vi-CvBGlTjr.mjs.map +1 -0
- package/dist/admin/chunks/{zh-BmF-sHaT.js → zh-BmF-sHaT.mjs} +1 -1
- package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
- package/dist/admin/chunks/{zh-Hans-CI0HKio3.js → zh-Hans-CI0HKio3.mjs} +1 -1
- package/dist/admin/chunks/{zh-Hans-CI0HKio3.js.map → zh-Hans-CI0HKio3.mjs.map} +1 -1
- package/dist/admin/index.js +2 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +2 -1
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/src/components/InjectionZone.d.ts +7 -1
- package/dist/admin/src/content-manager.d.ts +4 -0
- package/dist/admin/src/features/DocumentContext.d.ts +53 -0
- package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
- package/dist/admin/src/hooks/useDocument.d.ts +2 -0
- package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
- package/dist/admin/src/index.d.ts +1 -0
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
- package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +49 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +8 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +8 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
- package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +9 -3
- package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +7 -4
- package/dist/admin/src/preview/components/PreviewHeader.d.ts +1 -2
- package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.map +0 -1
- package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js.map +0 -1
- package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.map +0 -1
- package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js.map +0 -1
- package/dist/admin/chunks/EditViewPage-jCZnUuCR.js +0 -265
- package/dist/admin/chunks/EditViewPage-jCZnUuCR.js.map +0 -1
- package/dist/admin/chunks/EditViewPage-zSnDwLz3.js +0 -288
- package/dist/admin/chunks/EditViewPage-zSnDwLz3.js.map +0 -1
- package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.map +0 -1
- package/dist/admin/chunks/Form-CZmB6JIg.js.map +0 -1
- package/dist/admin/chunks/History-BlLKDZSw.js.map +0 -1
- package/dist/admin/chunks/History-CPYXgxkS.js.map +0 -1
- package/dist/admin/chunks/Input-CLX3C5DI.js.map +0 -1
- package/dist/admin/chunks/Input-DiR2Xfa7.js.map +0 -1
- package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js.map +0 -1
- package/dist/admin/chunks/ListViewPage-MJNfQTp-.js.map +0 -1
- package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js.map +0 -1
- package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js.map +0 -1
- package/dist/admin/chunks/Preview-DEuQgQg2.js +0 -482
- package/dist/admin/chunks/Preview-DEuQgQg2.js.map +0 -1
- package/dist/admin/chunks/Preview-H74FQ9Cq.js +0 -504
- package/dist/admin/chunks/Preview-H74FQ9Cq.js.map +0 -1
- package/dist/admin/chunks/Relations-C8jbZPVK.js +0 -827
- package/dist/admin/chunks/Relations-C8jbZPVK.js.map +0 -1
- package/dist/admin/chunks/Relations-mxOUS7TJ.js +0 -853
- package/dist/admin/chunks/Relations-mxOUS7TJ.js.map +0 -1
- package/dist/admin/chunks/ar-DckYq_WK.js.map +0 -1
- package/dist/admin/chunks/ca-DviY7mRj.js.map +0 -1
- package/dist/admin/chunks/cs-C7OSYFQ7.js.map +0 -1
- package/dist/admin/chunks/de-5QRlDHyR.js.map +0 -1
- package/dist/admin/chunks/es-DkoWSExG.js.map +0 -1
- package/dist/admin/chunks/eu-BG1xX7HK.js.map +0 -1
- package/dist/admin/chunks/fr-CFdRaRVj.js.map +0 -1
- package/dist/admin/chunks/gu-D5MMMXRs.js.map +0 -1
- package/dist/admin/chunks/hi-lp17SCjr.js.map +0 -1
- package/dist/admin/chunks/hooks-DMvik5y_.js.map +0 -1
- package/dist/admin/chunks/hu-CLka1U2C.js.map +0 -1
- package/dist/admin/chunks/id-USfY9m1g.js.map +0 -1
- package/dist/admin/chunks/index-BRlRBRLb.js.map +0 -1
- package/dist/admin/chunks/index-ZIwOPk6p.js.map +0 -1
- package/dist/admin/chunks/it-BAHrwmYS.js.map +0 -1
- package/dist/admin/chunks/ja-BWKmBJFT.js.map +0 -1
- package/dist/admin/chunks/ko-CgADGBNt.js.map +0 -1
- package/dist/admin/chunks/layout-B3-guCPG.js.map +0 -1
- package/dist/admin/chunks/layout-ameRNiAM.js.map +0 -1
- package/dist/admin/chunks/ml-CnhCfOn_.js.map +0 -1
- package/dist/admin/chunks/ms-Bh09NFff.js.map +0 -1
- package/dist/admin/chunks/nl-C8HYflTc.js.map +0 -1
- package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
- package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
- package/dist/admin/chunks/objects-wl73iEma.js +0 -73
- package/dist/admin/chunks/objects-wl73iEma.js.map +0 -1
- package/dist/admin/chunks/pl-MFCZJZuZ.js.map +0 -1
- package/dist/admin/chunks/pt-BR-CcotyBGJ.js.map +0 -1
- package/dist/admin/chunks/pt-HbmgeiYO.js.map +0 -1
- package/dist/admin/chunks/relations-CmoFVrKj.js.map +0 -1
- package/dist/admin/chunks/relations-DYQAaXwZ.js.map +0 -1
- package/dist/admin/chunks/sa-n_aPA-pU.js.map +0 -1
- package/dist/admin/chunks/sk-tn_BDjE2.js.map +0 -1
- package/dist/admin/chunks/sv-cq4ZrQRd.js.map +0 -1
- package/dist/admin/chunks/th-mUH7hEtc.js.map +0 -1
- package/dist/admin/chunks/tr-Yt38daxh.js.map +0 -1
- package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
- package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
- package/dist/admin/chunks/uk-Cpgmm7gE.js +0 -140
- package/dist/admin/chunks/uk-Cpgmm7gE.js.map +0 -1
- package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.map +0 -1
- package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
- package/dist/admin/chunks/usePrev-Bjw2dhmq.js +0 -18
- package/dist/admin/chunks/usePrev-Bjw2dhmq.js.map +0 -1
- package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
- package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
- package/dist/admin/chunks/vi-CvBGlTjr.js.map +0 -1
- package/dist/admin/chunks/zh-BmF-sHaT.js.map +0 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +0 -0
- package/dist/admin/src/preview/components/PreviewContent.d.ts +0 -3
@@ -0,0 +1,341 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
4
|
+
var React = require('react');
|
5
|
+
var strapiAdmin = require('@strapi/admin/strapi-admin');
|
6
|
+
var designSystem = require('@strapi/design-system');
|
7
|
+
var reactIntl = require('react-intl');
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
9
|
+
var styledComponents = require('styled-components');
|
10
|
+
var index = require('./index-BwIhYBsG.js');
|
11
|
+
var Input = require('./Input-B8I0b9aD.js');
|
12
|
+
require('@strapi/icons');
|
13
|
+
require('lodash/fp/mapValues');
|
14
|
+
require('yup');
|
15
|
+
require('fractional-indexing');
|
16
|
+
require('lodash/fp/pipe');
|
17
|
+
require('qs');
|
18
|
+
require('date-fns');
|
19
|
+
require('@reduxjs/toolkit');
|
20
|
+
require('prismjs');
|
21
|
+
require('slate');
|
22
|
+
require('slate-history');
|
23
|
+
require('slate-react');
|
24
|
+
require('prismjs/themes/prism-solarizedlight.css');
|
25
|
+
require('prismjs/components/prism-asmatmel');
|
26
|
+
require('prismjs/components/prism-bash');
|
27
|
+
require('prismjs/components/prism-basic');
|
28
|
+
require('prismjs/components/prism-c');
|
29
|
+
require('prismjs/components/prism-clojure');
|
30
|
+
require('prismjs/components/prism-cobol');
|
31
|
+
require('prismjs/components/prism-cpp');
|
32
|
+
require('prismjs/components/prism-csharp');
|
33
|
+
require('prismjs/components/prism-dart');
|
34
|
+
require('prismjs/components/prism-docker');
|
35
|
+
require('prismjs/components/prism-elixir');
|
36
|
+
require('prismjs/components/prism-erlang');
|
37
|
+
require('prismjs/components/prism-fortran');
|
38
|
+
require('prismjs/components/prism-fsharp');
|
39
|
+
require('prismjs/components/prism-go');
|
40
|
+
require('prismjs/components/prism-graphql');
|
41
|
+
require('prismjs/components/prism-groovy');
|
42
|
+
require('prismjs/components/prism-haskell');
|
43
|
+
require('prismjs/components/prism-haxe');
|
44
|
+
require('prismjs/components/prism-ini');
|
45
|
+
require('prismjs/components/prism-java');
|
46
|
+
require('prismjs/components/prism-javascript');
|
47
|
+
require('prismjs/components/prism-jsx');
|
48
|
+
require('prismjs/components/prism-json');
|
49
|
+
require('prismjs/components/prism-julia');
|
50
|
+
require('prismjs/components/prism-kotlin');
|
51
|
+
require('prismjs/components/prism-latex');
|
52
|
+
require('prismjs/components/prism-lua');
|
53
|
+
require('prismjs/components/prism-markdown');
|
54
|
+
require('prismjs/components/prism-matlab');
|
55
|
+
require('prismjs/components/prism-makefile');
|
56
|
+
require('prismjs/components/prism-objectivec');
|
57
|
+
require('prismjs/components/prism-perl');
|
58
|
+
require('prismjs/components/prism-php');
|
59
|
+
require('prismjs/components/prism-powershell');
|
60
|
+
require('prismjs/components/prism-python');
|
61
|
+
require('prismjs/components/prism-r');
|
62
|
+
require('prismjs/components/prism-ruby');
|
63
|
+
require('prismjs/components/prism-rust');
|
64
|
+
require('prismjs/components/prism-sas');
|
65
|
+
require('prismjs/components/prism-scala');
|
66
|
+
require('prismjs/components/prism-scheme');
|
67
|
+
require('prismjs/components/prism-sql');
|
68
|
+
require('prismjs/components/prism-stata');
|
69
|
+
require('prismjs/components/prism-swift');
|
70
|
+
require('prismjs/components/prism-typescript');
|
71
|
+
require('prismjs/components/prism-tsx');
|
72
|
+
require('prismjs/components/prism-vbnet');
|
73
|
+
require('prismjs/components/prism-yaml');
|
74
|
+
require('./usePrev-DgZBp9Oo.js');
|
75
|
+
require('./objects-BJTP843m.js');
|
76
|
+
require('react-dnd');
|
77
|
+
require('lodash/clone');
|
78
|
+
require('lodash/toPath');
|
79
|
+
require('@radix-ui/react-toolbar');
|
80
|
+
require('react-dnd-html5-backend');
|
81
|
+
require('./ComponentIcon-C-EjOUPA.js');
|
82
|
+
require('@strapi/icons/symbols');
|
83
|
+
require('react-window');
|
84
|
+
require('codemirror5');
|
85
|
+
require('sanitize-html');
|
86
|
+
require('highlight.js');
|
87
|
+
require('markdown-it');
|
88
|
+
require('markdown-it-abbr');
|
89
|
+
require('markdown-it-container');
|
90
|
+
require('markdown-it-deflist');
|
91
|
+
require('markdown-it-emoji');
|
92
|
+
require('markdown-it-footnote');
|
93
|
+
require('markdown-it-ins');
|
94
|
+
require('markdown-it-mark');
|
95
|
+
require('markdown-it-sub');
|
96
|
+
require('markdown-it-sup');
|
97
|
+
require('highlight.js/styles/solarized-dark.css');
|
98
|
+
require('codemirror5/addon/display/placeholder');
|
99
|
+
|
100
|
+
function _interopNamespaceDefault(e) {
|
101
|
+
var n = Object.create(null);
|
102
|
+
if (e) {
|
103
|
+
Object.keys(e).forEach(function (k) {
|
104
|
+
if (k !== 'default') {
|
105
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
106
|
+
Object.defineProperty(n, k, d.get ? d : {
|
107
|
+
enumerable: true,
|
108
|
+
get: function () { return e[k]; }
|
109
|
+
});
|
110
|
+
}
|
111
|
+
});
|
112
|
+
}
|
113
|
+
n.default = e;
|
114
|
+
return Object.freeze(n);
|
115
|
+
}
|
116
|
+
|
117
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
118
|
+
|
119
|
+
const useOnce = (effect)=>React__namespace.useEffect(effect, emptyDeps);
|
120
|
+
const emptyDeps = [];
|
121
|
+
|
122
|
+
/* -------------------------------------------------------------------------------------------------
|
123
|
+
* EditViewPage
|
124
|
+
* -----------------------------------------------------------------------------------------------*/ const EditViewPage = ()=>{
|
125
|
+
const location = reactRouterDom.useLocation();
|
126
|
+
const [{ query: { status } }, setQuery] = strapiAdmin.useQueryParams({
|
127
|
+
status: 'draft'
|
128
|
+
});
|
129
|
+
const { formatMessage } = reactIntl.useIntl();
|
130
|
+
const { toggleNotification } = strapiAdmin.useNotification();
|
131
|
+
const doc = index.useDoc();
|
132
|
+
const { document, meta, isLoading: isLoadingDocument, schema, components, collectionType, id, model, hasError, getTitle, getInitialFormValues } = doc;
|
133
|
+
const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
|
134
|
+
useOnce(()=>{
|
135
|
+
/**
|
136
|
+
* We only ever want to fire the notification once otherwise
|
137
|
+
* whenever the app re-renders it'll pop up regardless of
|
138
|
+
* what we do because the state comes from react-router-dom
|
139
|
+
*/ if (location?.state && 'error' in location.state) {
|
140
|
+
toggleNotification({
|
141
|
+
type: 'danger',
|
142
|
+
message: location.state.error,
|
143
|
+
timeout: 5000
|
144
|
+
});
|
145
|
+
}
|
146
|
+
});
|
147
|
+
const isLoadingActionsRBAC = index.useDocumentRBAC('EditViewPage', (state)=>state.isLoading);
|
148
|
+
const isSingleType = collectionType === index.SINGLE_TYPES;
|
149
|
+
/**
|
150
|
+
* single-types don't current have an id, but because they're a singleton
|
151
|
+
* we can simply use the update operation to continuously update the same
|
152
|
+
* document with varying params.
|
153
|
+
*/ const isCreatingDocument = !id && !isSingleType;
|
154
|
+
const { isLoading: isLoadingLayout, edit: { layout, settings: { mainField } } } = index.useDocumentLayout(model);
|
155
|
+
const { isLazyLoading } = Input.useLazyComponents([]);
|
156
|
+
const isLoading = isLoadingActionsRBAC || isLoadingDocument || isLoadingLayout || isLazyLoading;
|
157
|
+
const initialValues = getInitialFormValues(isCreatingDocument);
|
158
|
+
if (isLoading && !document?.documentId) {
|
159
|
+
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
|
160
|
+
}
|
161
|
+
if (!initialValues || hasError) {
|
162
|
+
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
|
163
|
+
}
|
164
|
+
const handleTabChange = (status)=>{
|
165
|
+
if (status === 'published' || status === 'draft') {
|
166
|
+
setQuery({
|
167
|
+
status
|
168
|
+
}, 'push', true);
|
169
|
+
}
|
170
|
+
};
|
171
|
+
const validateSync = (values, options)=>{
|
172
|
+
const yupSchema = index.createYupSchema(schema?.attributes, components, {
|
173
|
+
status,
|
174
|
+
...options
|
175
|
+
});
|
176
|
+
return yupSchema.validateSync(values, {
|
177
|
+
abortEarly: false
|
178
|
+
});
|
179
|
+
};
|
180
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Main, {
|
181
|
+
paddingLeft: 10,
|
182
|
+
paddingRight: 10,
|
183
|
+
children: [
|
184
|
+
/*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Title, {
|
185
|
+
children: getTitle(mainField)
|
186
|
+
}),
|
187
|
+
/*#__PURE__*/ jsxRuntime.jsx(index.DocumentContextProvider, {
|
188
|
+
initialDocument: {
|
189
|
+
documentId: id,
|
190
|
+
model,
|
191
|
+
collectionType
|
192
|
+
},
|
193
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Form, {
|
194
|
+
disabled: hasDraftAndPublished && status === 'published',
|
195
|
+
initialValues: initialValues,
|
196
|
+
method: isCreatingDocument ? 'POST' : 'PUT',
|
197
|
+
validate: (values, options)=>{
|
198
|
+
const yupSchema = index.createYupSchema(schema?.attributes, components, {
|
199
|
+
status,
|
200
|
+
...options
|
201
|
+
});
|
202
|
+
return yupSchema.validate(values, {
|
203
|
+
abortEarly: false
|
204
|
+
});
|
205
|
+
},
|
206
|
+
initialErrors: location?.state?.forceValidation ? validateSync(initialValues, {}) : {},
|
207
|
+
children: ({ resetForm })=>/*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
208
|
+
children: [
|
209
|
+
/*#__PURE__*/ jsxRuntime.jsx(index.Header, {
|
210
|
+
isCreating: isCreatingDocument,
|
211
|
+
status: hasDraftAndPublished ? getDocumentStatus(document, meta) : undefined,
|
212
|
+
title: getTitle(mainField)
|
213
|
+
}),
|
214
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tabs.Root, {
|
215
|
+
variant: "simple",
|
216
|
+
value: status,
|
217
|
+
onValueChange: handleTabChange,
|
218
|
+
children: [
|
219
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.List, {
|
220
|
+
"aria-label": formatMessage({
|
221
|
+
id: index.getTranslation('containers.edit.tabs.label'),
|
222
|
+
defaultMessage: 'Document status'
|
223
|
+
}),
|
224
|
+
children: hasDraftAndPublished ? /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
225
|
+
children: [
|
226
|
+
/*#__PURE__*/ jsxRuntime.jsx(StatusTab, {
|
227
|
+
value: "draft",
|
228
|
+
children: formatMessage({
|
229
|
+
id: index.getTranslation('containers.edit.tabs.draft'),
|
230
|
+
defaultMessage: 'draft'
|
231
|
+
})
|
232
|
+
}),
|
233
|
+
/*#__PURE__*/ jsxRuntime.jsx(StatusTab, {
|
234
|
+
disabled: !meta || meta.availableStatus.length === 0,
|
235
|
+
value: "published",
|
236
|
+
children: formatMessage({
|
237
|
+
id: index.getTranslation('containers.edit.tabs.published'),
|
238
|
+
defaultMessage: 'published'
|
239
|
+
})
|
240
|
+
})
|
241
|
+
]
|
242
|
+
}) : null
|
243
|
+
}),
|
244
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Grid.Root, {
|
245
|
+
paddingTop: 8,
|
246
|
+
gap: 4,
|
247
|
+
children: [
|
248
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Grid.Item, {
|
249
|
+
col: 9,
|
250
|
+
s: 12,
|
251
|
+
direction: "column",
|
252
|
+
alignItems: "stretch",
|
253
|
+
children: [
|
254
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Content, {
|
255
|
+
value: "draft",
|
256
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Input.FormLayout, {
|
257
|
+
layout: layout,
|
258
|
+
document: doc
|
259
|
+
})
|
260
|
+
}),
|
261
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Content, {
|
262
|
+
value: "published",
|
263
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Input.FormLayout, {
|
264
|
+
layout: layout,
|
265
|
+
document: doc
|
266
|
+
})
|
267
|
+
})
|
268
|
+
]
|
269
|
+
}),
|
270
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Item, {
|
271
|
+
col: 3,
|
272
|
+
s: 12,
|
273
|
+
direction: "column",
|
274
|
+
alignItems: "stretch",
|
275
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(index.Panels, {})
|
276
|
+
})
|
277
|
+
]
|
278
|
+
})
|
279
|
+
]
|
280
|
+
}),
|
281
|
+
/*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Blocker, {
|
282
|
+
// We reset the form to the published version to avoid errors like – https://strapi-inc.atlassian.net/browse/CONTENT-2284
|
283
|
+
onProceed: resetForm
|
284
|
+
})
|
285
|
+
]
|
286
|
+
})
|
287
|
+
})
|
288
|
+
})
|
289
|
+
]
|
290
|
+
});
|
291
|
+
};
|
292
|
+
const StatusTab = styledComponents.styled(designSystem.Tabs.Trigger)`
|
293
|
+
text-transform: uppercase;
|
294
|
+
`;
|
295
|
+
/**
|
296
|
+
* @internal
|
297
|
+
* @description Returns the status of the document where its latest state takes priority,
|
298
|
+
* this typically will be "published" unless a user has edited their draft in which we should
|
299
|
+
* display "modified".
|
300
|
+
*/ const getDocumentStatus = (document, meta)=>{
|
301
|
+
const docStatus = document?.status;
|
302
|
+
const statuses = meta?.availableStatus ?? [];
|
303
|
+
/**
|
304
|
+
* Creating an entry
|
305
|
+
*/ if (!docStatus) {
|
306
|
+
return 'draft';
|
307
|
+
}
|
308
|
+
/**
|
309
|
+
* We're viewing a draft, but the document could have a published version
|
310
|
+
*/ if (docStatus === 'draft' && statuses.find((doc)=>doc.publishedAt !== null)) {
|
311
|
+
return 'published';
|
312
|
+
}
|
313
|
+
return docStatus;
|
314
|
+
};
|
315
|
+
/* -------------------------------------------------------------------------------------------------
|
316
|
+
* ProtectedEditViewPage
|
317
|
+
* -----------------------------------------------------------------------------------------------*/ const ProtectedEditViewPage = ()=>{
|
318
|
+
const { slug = '' } = reactRouterDom.useParams();
|
319
|
+
const { permissions = [], isLoading, error } = strapiAdmin.useRBAC(index.PERMISSIONS.map((action)=>({
|
320
|
+
action,
|
321
|
+
subject: slug
|
322
|
+
})));
|
323
|
+
if (isLoading) {
|
324
|
+
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
|
325
|
+
}
|
326
|
+
if (error || !slug) {
|
327
|
+
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
|
328
|
+
}
|
329
|
+
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Protect, {
|
330
|
+
permissions: permissions,
|
331
|
+
children: ({ permissions })=>/*#__PURE__*/ jsxRuntime.jsx(index.DocumentRBAC, {
|
332
|
+
permissions: permissions,
|
333
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(EditViewPage, {})
|
334
|
+
})
|
335
|
+
});
|
336
|
+
};
|
337
|
+
|
338
|
+
exports.EditViewPage = EditViewPage;
|
339
|
+
exports.ProtectedEditViewPage = ProtectedEditViewPage;
|
340
|
+
exports.getDocumentStatus = getDocumentStatus;
|
341
|
+
//# sourceMappingURL=EditViewPage-CuQfZJDf.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EditViewPage-CuQfZJDf.js","sources":["../../../admin/src/hooks/useOnce.ts","../../../admin/src/pages/EditView/EditViewPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport * as React from 'react';\n\nexport const useOnce = (effect: React.EffectCallback) => React.useEffect(effect, emptyDeps);\n\nconst emptyDeps: React.DependencyList = [];\n","import * as React from 'react';\n\nimport {\n Page,\n Blocker,\n Form,\n useRBAC,\n useNotification,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { Grid, Main, Tabs } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { useLocation, useParams } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { SINGLE_TYPES } from '../../constants/collections';\nimport { PERMISSIONS } from '../../constants/plugin';\nimport { DocumentContextProvider } from '../../features/DocumentContext';\nimport { DocumentRBAC, useDocumentRBAC } from '../../features/DocumentRBAC';\nimport { useDoc, type UseDocument } from '../../hooks/useDocument';\nimport { useDocumentLayout } from '../../hooks/useDocumentLayout';\nimport { useLazyComponents } from '../../hooks/useLazyComponents';\nimport { useOnce } from '../../hooks/useOnce';\nimport { getTranslation } from '../../utils/translations';\nimport { createYupSchema } from '../../utils/validation';\n\nimport { FormLayout } from './components/FormLayout';\nimport { Header } from './components/Header';\nimport { Panels } from './components/Panels';\n\n/* -------------------------------------------------------------------------------------------------\n * EditViewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst EditViewPage = () => {\n const location = useLocation();\n const [\n {\n query: { status },\n },\n setQuery,\n ] = useQueryParams<{ status: 'draft' | 'published' }>({\n status: 'draft',\n });\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n\n const doc = useDoc();\n const {\n document,\n meta,\n isLoading: isLoadingDocument,\n schema,\n components,\n collectionType,\n id,\n model,\n hasError,\n getTitle,\n getInitialFormValues,\n } = doc;\n\n const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;\n\n useOnce(() => {\n /**\n * We only ever want to fire the notification once otherwise\n * whenever the app re-renders it'll pop up regardless of\n * what we do because the state comes from react-router-dom\n */\n if (location?.state && 'error' in location.state) {\n toggleNotification({\n type: 'danger',\n message: location.state.error,\n timeout: 5000,\n });\n }\n });\n\n const isLoadingActionsRBAC = useDocumentRBAC('EditViewPage', (state) => state.isLoading);\n\n const isSingleType = collectionType === SINGLE_TYPES;\n\n /**\n * single-types don't current have an id, but because they're a singleton\n * we can simply use the update operation to continuously update the same\n * document with varying params.\n */\n const isCreatingDocument = !id && !isSingleType;\n\n const {\n isLoading: isLoadingLayout,\n edit: {\n layout,\n settings: { mainField },\n },\n } = useDocumentLayout(model);\n\n const { isLazyLoading } = useLazyComponents([]);\n\n const isLoading = isLoadingActionsRBAC || isLoadingDocument || isLoadingLayout || isLazyLoading;\n\n const initialValues = getInitialFormValues(isCreatingDocument);\n\n if (isLoading && !document?.documentId) {\n return <Page.Loading />;\n }\n\n if (!initialValues || hasError) {\n return <Page.Error />;\n }\n\n const handleTabChange = (status: string) => {\n if (status === 'published' || status === 'draft') {\n setQuery({ status }, 'push', true);\n }\n };\n\n const validateSync = (values: Record<string, unknown>, options: Record<string, string>) => {\n const yupSchema = createYupSchema(schema?.attributes, components, {\n status,\n ...options,\n });\n\n return yupSchema.validateSync(values, { abortEarly: false });\n };\n\n return (\n <Main paddingLeft={10} paddingRight={10}>\n <Page.Title>{getTitle(mainField)}</Page.Title>\n <DocumentContextProvider\n initialDocument={{\n documentId: id!,\n model,\n collectionType,\n }}\n >\n <Form\n disabled={hasDraftAndPublished && status === 'published'}\n initialValues={initialValues}\n method={isCreatingDocument ? 'POST' : 'PUT'}\n validate={(values: Record<string, unknown>, options: Record<string, string>) => {\n const yupSchema = createYupSchema(schema?.attributes, components, {\n status,\n ...options,\n });\n\n return yupSchema.validate(values, { abortEarly: false });\n }}\n initialErrors={location?.state?.forceValidation ? validateSync(initialValues, {}) : {}}\n >\n {({ resetForm }) => (\n <>\n <Header\n isCreating={isCreatingDocument}\n status={hasDraftAndPublished ? getDocumentStatus(document, meta) : undefined}\n title={getTitle(mainField)}\n />\n <Tabs.Root variant=\"simple\" value={status} onValueChange={handleTabChange}>\n <Tabs.List\n aria-label={formatMessage({\n id: getTranslation('containers.edit.tabs.label'),\n defaultMessage: 'Document status',\n })}\n >\n {hasDraftAndPublished ? (\n <>\n <StatusTab value=\"draft\">\n {formatMessage({\n id: getTranslation('containers.edit.tabs.draft'),\n defaultMessage: 'draft',\n })}\n </StatusTab>\n <StatusTab\n disabled={!meta || meta.availableStatus.length === 0}\n value=\"published\"\n >\n {formatMessage({\n id: getTranslation('containers.edit.tabs.published'),\n defaultMessage: 'published',\n })}\n </StatusTab>\n </>\n ) : null}\n </Tabs.List>\n <Grid.Root paddingTop={8} gap={4}>\n <Grid.Item col={9} s={12} direction=\"column\" alignItems=\"stretch\">\n <Tabs.Content value=\"draft\">\n <FormLayout layout={layout} document={doc} />\n </Tabs.Content>\n <Tabs.Content value=\"published\">\n <FormLayout layout={layout} document={doc} />\n </Tabs.Content>\n </Grid.Item>\n <Grid.Item col={3} s={12} direction=\"column\" alignItems=\"stretch\">\n <Panels />\n </Grid.Item>\n </Grid.Root>\n </Tabs.Root>\n <Blocker\n // We reset the form to the published version to avoid errors like – https://strapi-inc.atlassian.net/browse/CONTENT-2284\n onProceed={resetForm}\n />\n </>\n )}\n </Form>\n </DocumentContextProvider>\n </Main>\n );\n};\n\nconst StatusTab = styled(Tabs.Trigger)`\n text-transform: uppercase;\n`;\n\n/**\n * @internal\n * @description Returns the status of the document where its latest state takes priority,\n * this typically will be \"published\" unless a user has edited their draft in which we should\n * display \"modified\".\n */\nconst getDocumentStatus = (\n document: ReturnType<UseDocument>['document'],\n meta: ReturnType<UseDocument>['meta']\n): 'draft' | 'published' | 'modified' => {\n const docStatus = document?.status;\n const statuses = meta?.availableStatus ?? [];\n\n /**\n * Creating an entry\n */\n if (!docStatus) {\n return 'draft';\n }\n\n /**\n * We're viewing a draft, but the document could have a published version\n */\n if (docStatus === 'draft' && statuses.find((doc) => doc.publishedAt !== null)) {\n return 'published';\n }\n\n return docStatus;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProtectedEditViewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedEditViewPage = () => {\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 <EditViewPage />\n </DocumentRBAC>\n )}\n </Page.Protect>\n );\n};\n\nexport { EditViewPage, ProtectedEditViewPage, getDocumentStatus };\n"],"names":["useOnce","effect","React","useEffect","emptyDeps","EditViewPage","location","useLocation","query","status","setQuery","useQueryParams","formatMessage","useIntl","toggleNotification","useNotification","doc","useDoc","document","meta","isLoading","isLoadingDocument","schema","components","collectionType","id","model","hasError","getTitle","getInitialFormValues","hasDraftAndPublished","options","draftAndPublish","state","type","message","error","timeout","isLoadingActionsRBAC","useDocumentRBAC","isSingleType","SINGLE_TYPES","isCreatingDocument","isLoadingLayout","edit","layout","settings","mainField","useDocumentLayout","isLazyLoading","useLazyComponents","initialValues","documentId","_jsx","Page","Loading","Error","handleTabChange","validateSync","values","yupSchema","createYupSchema","attributes","abortEarly","_jsxs","Main","paddingLeft","paddingRight","Title","DocumentContextProvider","initialDocument","Form","disabled","method","validate","initialErrors","forceValidation","resetForm","_Fragment","Header","isCreating","getDocumentStatus","undefined","title","Tabs","Root","variant","value","onValueChange","List","aria-label","getTranslation","defaultMessage","StatusTab","availableStatus","length","Grid","paddingTop","gap","Item","col","s","direction","alignItems","Content","FormLayout","Panels","Blocker","onProceed","styled","Trigger","docStatus","statuses","find","publishedAt","ProtectedEditViewPage","slug","useParams","permissions","useRB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,WAAW,KAAK,IAAO,CAAA,EAAA;QAC7E,OAAO,WAAA;AACT;IAEA,OAAOH,SAAAA;AACT;AAEA;;AAEkG,2GAE5FI,qBAAwB,GAAA,IAAA;AAC5B,IAAA,MAAM,EAAEC,IAAAA,GAAO,EAAE,EAAE,GAAGC,wBAAAA,EAAAA;AAGtB,IAAA,MAAM,EACJC,WAAAA,GAAc,EAAE,EAChBlG,SAAS,EACTgB,KAAK,EACN,GAAGmF,oBACFC,iBAAYC,CAAAA,GAAG,CAAC,CAACC,UAAY;AAC3BA,YAAAA,MAAAA;YACAC,OAASP,EAAAA;SACX,CAAA,CAAA,CAAA;AAGF,IAAA,IAAIhG,SAAW,EAAA;QACb,qBAAOiC,cAAA,CAACC,iBAAKC,OAAO,EAAA,EAAA,CAAA;AACtB;IAEA,IAAInB,KAAAA,IAAS,CAACgF,IAAM,EAAA;QAClB,qBAAO/D,cAAA,CAACC,iBAAKE,KAAK,EAAA,EAAA,CAAA;AACpB;IAEA,qBACEH,cAAA,CAACC,iBAAKsE,OAAO,EAAA;QAACN,WAAaA,EAAAA,WAAAA;AACxB,QAAA,QAAA,EAAA,CAAC,EAAEA,WAAW,EAAE,iBACfjE,cAACwE,CAAAA,kBAAAA,EAAAA;gBAAaP,WAAaA,EAAAA,WAAAA;AACzB,gBAAA,QAAA,gBAAAjE,cAAChD,CAAAA,YAAAA,EAAAA,EAAAA;;;AAKX;;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FieldTypeIcon-BY6MrVF4.mjs","sources":["../../../admin/src/components/FieldTypeIcon.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useStrapiApp } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport {\n BlocksField,\n BooleanField,\n ComponentField,\n DateField,\n DynamicZoneField,\n EmailField,\n EnumerationField,\n JsonField,\n MediaField,\n NumberField,\n PasswordField,\n RelationField,\n TextField,\n UidField,\n} from '@strapi/icons/symbols';\n\nimport type { Schema } from '@strapi/types';\n\nconst iconByTypes: Record<Schema.Attribute.Kind, React.ReactElement> = {\n biginteger: <NumberField />,\n boolean: <BooleanField />,\n date: <DateField />,\n datetime: <DateField />,\n decimal: <NumberField />,\n email: <EmailField />,\n enumeration: <EnumerationField />,\n float: <NumberField />,\n integer: <NumberField />,\n media: <MediaField />,\n password: <PasswordField />,\n relation: <RelationField />,\n string: <TextField />,\n text: <TextField />,\n richtext: <TextField />,\n time: <DateField />,\n timestamp: <DateField />,\n json: <JsonField />,\n uid: <UidField />,\n component: <ComponentField />,\n dynamiczone: <DynamicZoneField />,\n blocks: <BlocksField />,\n};\n\ninterface FieldTypeIconProps {\n type?: keyof typeof iconByTypes;\n customFieldUid?: string;\n}\n\nconst FieldTypeIcon = ({ type, customFieldUid }: FieldTypeIconProps) => {\n const getCustomField = useStrapiApp('FieldTypeIcon', (state) => state.customFields.get);\n\n if (!type) {\n return null;\n }\n\n let Compo = iconByTypes[type];\n\n if (customFieldUid) {\n const customField = getCustomField(customFieldUid);\n const CustomFieldIcon = customField?.icon;\n\n if (CustomFieldIcon) {\n Compo = (\n <Box marginRight={3} width={7} height={6}>\n <CustomFieldIcon />\n </Box>\n );\n }\n }\n\n if (!iconByTypes[type]) {\n return null;\n }\n\n return Compo;\n};\n\nexport { FieldTypeIcon };\n"],"names":["iconByTypes","biginteger","_jsx","NumberField","boolean","BooleanField","date","DateField","datetime","decimal","email","EmailField","enumeration","EnumerationField","float","integer","media","MediaField","password","PasswordField","relation","RelationField","string","TextField","text","richtext","time","timestamp","json","JsonField","uid","UidField","component","ComponentField","dynamiczone","DynamicZoneField","blocks","BlocksField","FieldTypeIcon","type","customFieldUid","getCustomField","useStrapiApp","state","customFields","get","Compo","customField","CustomFieldIcon","icon","Box","marginRight","width","height"],"mappings":";;;;;;AAuBA,MAAMA,WAAiE,GAAA;AACrEC,IAAAA,UAAAA,gBAAYC,GAACC,CAAAA,WAAAA,EAAAA,EAAAA,CAAAA;AACbC,IAAAA,O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,gBAAK5B,GAAC6B,CAAAA,QAAAA,EAAAA,EAAAA,CAAAA;AACNC,IAAAA,SAAAA,gBAAW9B,GAAC+B,CAAAA,cAAAA,EAAAA,EAAAA,CAAAA;AACZC,IAAAA,WAAAA,gBAAahC,GAACiC,CAAAA,gBAAAA,EAAAA,EAAAA,CAAAA;AACdC,IAAAA,MAAAA,gBAAQlC,GAACmC,CAAAA,WAAAA,EAAAA,EAAAA;AACX,CAAA;AAOA,MAAMC,gBAAgB,CAAC,EAAEC,IAAI,EAAEC,cAAc,EAAsB,GAAA;IACjE,MAAMC,cAAAA,GAAiBC,aAAa,eAAiB,EAAA,CAACC,QAAUA,KAAMC,CAAAA,YAAY,CAACC,GAAG,CAAA;AAEtF,IAAA,IAAI,CAACN,IAAM,EAAA;QACT,OAAO,IAAA;AACT;IAEA,IAAIO,KAAAA,GAAQ9C,WAAW,CAACuC,IAAK,CAAA;AAE7B,IAAA,IAAIC,cAAgB,EAAA;AAClB,QAAA,MAAMO,cAAcN,cAAeD,CAAAA,cAAAA,CAAAA;AACnC,QAAA,MAAMQ,kBAAkBD,WAAaE,EAAAA,IAAAA;AAErC,QAAA,IAAID,eAAiB,EAAA;AACnBF,YAAAA,KAAAA,iBACE5C,GAACgD,CAAAA,GAAAA,EAAAA;gBAAIC,WAAa,EAAA,CAAA;gBAAGC,KAAO,EAAA,CAAA;gBAAGC,MAAQ,EAAA,CAAA;AACrC,gBAAA,QAAA,gBAAAnD,GAAC8C,CAAAA,eAAAA,EAAAA,EAAAA;;AAGP;AACF;AAEA,IAAA,IAAI,CAAChD,WAAW,CAACuC,IAAAA,CAAK,EAAE;QACtB,OAAO,IAAA;AACT;IAEA,OAAOO,KAAAA;AACT;;;;"}
|
@@ -7,12 +7,12 @@ var designSystem = require('@strapi/design-system');
|
|
7
7
|
var fractionalIndexing = require('fractional-indexing');
|
8
8
|
var pipe = require('lodash/fp/pipe');
|
9
9
|
var reactIntl = require('react-intl');
|
10
|
-
var index = require('./index-
|
10
|
+
var index = require('./index-BwIhYBsG.js');
|
11
11
|
var Icons = require('@strapi/icons');
|
12
12
|
var reactDndHtml5Backend = require('react-dnd-html5-backend');
|
13
13
|
var reactRouterDom = require('react-router-dom');
|
14
14
|
var styledComponents = require('styled-components');
|
15
|
-
var
|
15
|
+
var objects = require('./objects-BJTP843m.js');
|
16
16
|
var ComponentIcon = require('./ComponentIcon-C-EjOUPA.js');
|
17
17
|
var yup = require('yup');
|
18
18
|
var FieldTypeIcon = require('./FieldTypeIcon-Bxh-7Jin.js');
|
@@ -494,9 +494,9 @@ const TEMP_FIELD_NAME = '_TEMP_';
|
|
494
494
|
const [isModalOpen, setIsModalOpen] = React__namespace.useState(false);
|
495
495
|
const { formatMessage } = reactIntl.useIntl();
|
496
496
|
const { value } = strapiAdmin.useField(name);
|
497
|
-
const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] =
|
497
|
+
const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] = objects.useDragAndDrop(true, {
|
498
498
|
dropSensitivity: 'immediate',
|
499
|
-
type:
|
499
|
+
type: objects.ItemTypes.EDIT_FIELD,
|
500
500
|
item: {
|
501
501
|
index: index$1,
|
502
502
|
label: value?.label,
|
@@ -975,4 +975,4 @@ const Header = ({ name })=>{
|
|
975
975
|
|
976
976
|
exports.ConfigurationForm = ConfigurationForm;
|
977
977
|
exports.TEMP_FIELD_NAME = TEMP_FIELD_NAME;
|
978
|
-
//# sourceMappingURL=Form-
|
978
|
+
//# sourceMappingURL=Form-BqNYRsCb.js.map
|