@strapi/content-manager 0.0.0-experimental.da85533897155e719d784f0271223c866d2f69ab → 0.0.0-experimental.dad3c50630ca4fd9eccdcbe549ee632fc572e23d
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/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -1
- package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-DyDkPajU.js → ComponentConfigurationPage-BLWQy8ru.js} +5 -6
- package/dist/_chunks/{ComponentConfigurationPage-DyDkPajU.js.map → ComponentConfigurationPage-BLWQy8ru.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-9lRmRdIr.mjs → ComponentConfigurationPage-CtIa3aa2.mjs} +4 -4
- package/dist/_chunks/{ComponentConfigurationPage-9lRmRdIr.mjs.map → ComponentConfigurationPage-CtIa3aa2.mjs.map} +1 -1
- package/dist/_chunks/{ComponentIcon-BXdiCGQp.js → ComponentIcon-CRbtQEUV.js} +2 -3
- package/dist/_chunks/{ComponentIcon-BXdiCGQp.js.map → ComponentIcon-CRbtQEUV.js.map} +1 -1
- package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -1
- package/dist/_chunks/{EditConfigurationPage-Bk893vVY.mjs → EditConfigurationPage-DsPR2DVk.mjs} +4 -4
- package/dist/_chunks/{EditConfigurationPage-Bk893vVY.mjs.map → EditConfigurationPage-DsPR2DVk.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DValmA0m.js → EditConfigurationPage-RQkymxCy.js} +5 -6
- package/dist/_chunks/{EditConfigurationPage-DValmA0m.js.map → EditConfigurationPage-RQkymxCy.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-Dk7Eaft4.js → EditViewPage-B-kExt8C.js} +50 -11
- package/dist/_chunks/EditViewPage-B-kExt8C.js.map +1 -0
- package/dist/_chunks/{EditViewPage-DiNFdFqP.mjs → EditViewPage-BPyVuPfM.mjs} +50 -10
- package/dist/_chunks/EditViewPage-BPyVuPfM.mjs.map +1 -0
- package/dist/_chunks/{Field-DH2OaqUP.js → Field-DPIsQRre.js} +250 -161
- package/dist/_chunks/Field-DPIsQRre.js.map +1 -0
- package/dist/_chunks/{Field-Dv_HTFTa.mjs → Field-Dltnt1km.mjs} +244 -155
- package/dist/_chunks/Field-Dltnt1km.mjs.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-B_dUDizM.js → Form-BFi4MXMT.js} +19 -12
- package/dist/_chunks/Form-BFi4MXMT.js.map +1 -0
- package/dist/_chunks/{Form-Dy6P4HgH.mjs → Form-C1IcWm1u.mjs} +17 -9
- package/dist/_chunks/Form-C1IcWm1u.mjs.map +1 -0
- package/dist/_chunks/{History-DrwsD1Vc.mjs → History-04ChQ4pl.mjs} +71 -104
- package/dist/_chunks/History-04ChQ4pl.mjs.map +1 -0
- package/dist/_chunks/{History-BT4w83Oa.js → History-wjcK4L0C.js} +70 -104
- package/dist/_chunks/History-wjcK4L0C.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-BxIP0jRy.mjs → ListConfigurationPage-BYqPYLSU.mjs} +7 -6
- package/dist/_chunks/ListConfigurationPage-BYqPYLSU.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-CuYrMcW3.js → ListConfigurationPage-CRbxIC3J.js} +7 -7
- package/dist/_chunks/ListConfigurationPage-CRbxIC3J.js.map +1 -0
- package/dist/_chunks/{ListViewPage-BvpwNur7.js → ListViewPage-D5NY9183.js} +88 -54
- package/dist/_chunks/ListViewPage-D5NY9183.js.map +1 -0
- package/dist/_chunks/{ListViewPage-5a1vw-OK.mjs → ListViewPage-FU2LBuhl.mjs} +83 -48
- package/dist/_chunks/ListViewPage-FU2LBuhl.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-UqEiWKkM.js → NoContentTypePage-BgQVE_Qb.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-UqEiWKkM.js.map → NoContentTypePage-BgQVE_Qb.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Bm6tRcd3.mjs → NoContentTypePage-DCKUkwb8.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-Bm6tRcd3.mjs.map → NoContentTypePage-DCKUkwb8.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-C_vGRo8Q.js → NoPermissionsPage-C5jwn70o.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-C_vGRo8Q.js.map → NoPermissionsPage-C5jwn70o.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BHPqn_tQ.mjs → NoPermissionsPage-jqve7C8l.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BHPqn_tQ.mjs.map → NoPermissionsPage-jqve7C8l.mjs.map} +1 -1
- package/dist/_chunks/Preview-BMYN548c.mjs +294 -0
- package/dist/_chunks/Preview-BMYN548c.mjs.map +1 -0
- package/dist/_chunks/Preview-DaOihysv.js +312 -0
- package/dist/_chunks/Preview-DaOihysv.js.map +1 -0
- package/dist/_chunks/{Relations-CznVF6LS.js → Relations-CTGM7Hv5.js} +75 -42
- package/dist/_chunks/Relations-CTGM7Hv5.js.map +1 -0
- package/dist/_chunks/{Relations-C7fPyh5P.mjs → Relations-gscPkxjF.mjs} +75 -41
- package/dist/_chunks/Relations-gscPkxjF.mjs.map +1 -0
- package/dist/_chunks/{en-otD_UBJi.js → en-BzQmavmK.js} +32 -14
- package/dist/_chunks/{en-otD_UBJi.js.map → en-BzQmavmK.js.map} +1 -1
- package/dist/_chunks/{en-CbaIuYoB.mjs → en-CSxLmrh1.mjs} +32 -14
- package/dist/_chunks/{en-CbaIuYoB.mjs.map → en-CSxLmrh1.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-D9UmmBcM.js → index-Ca7YWlAA.js} +1063 -754
- package/dist/_chunks/index-Ca7YWlAA.js.map +1 -0
- package/dist/_chunks/{index-BJ6uTqLL.mjs → index-DqasUQ6Q.mjs} +1066 -757
- package/dist/_chunks/index-DqasUQ6Q.mjs.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-kfu5Wtix.js → layout-BW80JSCd.js} +7 -7
- package/dist/_chunks/{layout-kfu5Wtix.js.map → layout-BW80JSCd.js.map} +1 -1
- package/dist/_chunks/{layout-uomiIGbG.mjs → layout-W3clJSCy.mjs} +6 -5
- package/dist/_chunks/{layout-uomiIGbG.mjs.map → layout-W3clJSCy.mjs.map} +1 -1
- 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-DiDufGSA.mjs → relations-BlDkoeWh.mjs} +6 -7
- package/dist/_chunks/relations-BlDkoeWh.mjs.map +1 -0
- package/dist/_chunks/{relations-DKENrxko.js → relations-C9Usz9k5.js} +6 -7
- package/dist/_chunks/relations-C9Usz9k5.js.map +1 -0
- package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
- 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-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
- package/dist/admin/index.js +3 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +5 -3
- package/dist/admin/src/content-manager.d.ts +3 -2
- package/dist/admin/src/exports.d.ts +2 -1
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/hooks/useDocument.d.ts +32 -1
- package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
- 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/utils/constants.d.ts +1 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
- package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
- 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 +1 -1
- package/dist/admin/src/services/components.d.ts +2 -2
- package/dist/admin/src/services/contentTypes.d.ts +3 -3
- package/dist/admin/src/services/documents.d.ts +19 -20
- package/dist/admin/src/services/init.d.ts +1 -1
- package/dist/admin/src/services/relations.d.ts +2 -2
- package/dist/admin/src/services/uid.d.ts +3 -3
- package/dist/server/index.js +594 -335
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +595 -335
- 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/utils/metadata.d.ts +16 -1
- package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
- package/dist/server/src/history/controllers/history-version.d.ts +1 -1
- package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
- package/dist/server/src/history/services/history.d.ts +3 -3
- 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 +6 -11
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +7 -6
- package/dist/server/src/index.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.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts +12 -10
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +7 -6
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/utils/populate.d.ts +2 -2
- 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 +3 -1
- 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/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 +17 -15
- package/dist/_chunks/EditViewPage-DiNFdFqP.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-Dk7Eaft4.js.map +0 -1
- package/dist/_chunks/Field-DH2OaqUP.js.map +0 -1
- package/dist/_chunks/Field-Dv_HTFTa.mjs.map +0 -1
- package/dist/_chunks/Form-B_dUDizM.js.map +0 -1
- package/dist/_chunks/Form-Dy6P4HgH.mjs.map +0 -1
- package/dist/_chunks/History-BT4w83Oa.js.map +0 -1
- package/dist/_chunks/History-DrwsD1Vc.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-BxIP0jRy.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-CuYrMcW3.js.map +0 -1
- package/dist/_chunks/ListViewPage-5a1vw-OK.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-BvpwNur7.js.map +0 -1
- package/dist/_chunks/Relations-C7fPyh5P.mjs.map +0 -1
- package/dist/_chunks/Relations-CznVF6LS.js.map +0 -1
- package/dist/_chunks/index-BJ6uTqLL.mjs.map +0 -1
- package/dist/_chunks/index-D9UmmBcM.js.map +0 -1
- package/dist/_chunks/relations-DKENrxko.js.map +0 -1
- package/dist/_chunks/relations-DiDufGSA.mjs.map +0 -1
- package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
- package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
- package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
- package/strapi-server.js +0 -3
@@ -5,19 +5,70 @@ const strapiAdmin = require("@strapi/admin/strapi-admin");
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
6
6
|
const pipe$1 = require("lodash/fp/pipe");
|
7
7
|
const reactIntl = require("react-intl");
|
8
|
-
const index = require("./index-
|
8
|
+
const index = require("./index-Ca7YWlAA.js");
|
9
9
|
const fractionalIndexing = require("fractional-indexing");
|
10
|
-
const Relations = require("./Relations-
|
10
|
+
const Relations = require("./Relations-CTGM7Hv5.js");
|
11
11
|
const Icons = require("@strapi/icons");
|
12
12
|
const styledComponents = require("styled-components");
|
13
|
-
const ComponentIcon = require("./ComponentIcon-
|
13
|
+
const ComponentIcon = require("./ComponentIcon-CRbtQEUV.js");
|
14
14
|
const reactDndHtml5Backend = require("react-dnd-html5-backend");
|
15
|
-
const useDragAndDrop = require("./useDragAndDrop-
|
16
|
-
const objects = require("./objects-
|
15
|
+
const useDragAndDrop = require("./useDragAndDrop-BMtgCYzL.js");
|
16
|
+
const objects = require("./objects-BcXOv6_9.js");
|
17
17
|
const slate = require("slate");
|
18
18
|
const slateHistory = require("slate-history");
|
19
19
|
const slateReact = require("slate-react");
|
20
|
-
const
|
20
|
+
const Prism = require("prismjs");
|
21
|
+
require("prismjs/themes/prism-solarizedlight.css");
|
22
|
+
require("prismjs/components/prism-asmatmel");
|
23
|
+
require("prismjs/components/prism-bash");
|
24
|
+
require("prismjs/components/prism-basic");
|
25
|
+
require("prismjs/components/prism-c");
|
26
|
+
require("prismjs/components/prism-clojure");
|
27
|
+
require("prismjs/components/prism-cobol");
|
28
|
+
require("prismjs/components/prism-cpp");
|
29
|
+
require("prismjs/components/prism-csharp");
|
30
|
+
require("prismjs/components/prism-dart");
|
31
|
+
require("prismjs/components/prism-docker");
|
32
|
+
require("prismjs/components/prism-elixir");
|
33
|
+
require("prismjs/components/prism-erlang");
|
34
|
+
require("prismjs/components/prism-fortran");
|
35
|
+
require("prismjs/components/prism-fsharp");
|
36
|
+
require("prismjs/components/prism-go");
|
37
|
+
require("prismjs/components/prism-graphql");
|
38
|
+
require("prismjs/components/prism-groovy");
|
39
|
+
require("prismjs/components/prism-haskell");
|
40
|
+
require("prismjs/components/prism-haxe");
|
41
|
+
require("prismjs/components/prism-ini");
|
42
|
+
require("prismjs/components/prism-java");
|
43
|
+
require("prismjs/components/prism-javascript");
|
44
|
+
require("prismjs/components/prism-jsx");
|
45
|
+
require("prismjs/components/prism-json");
|
46
|
+
require("prismjs/components/prism-julia");
|
47
|
+
require("prismjs/components/prism-kotlin");
|
48
|
+
require("prismjs/components/prism-latex");
|
49
|
+
require("prismjs/components/prism-lua");
|
50
|
+
require("prismjs/components/prism-markdown");
|
51
|
+
require("prismjs/components/prism-matlab");
|
52
|
+
require("prismjs/components/prism-makefile");
|
53
|
+
require("prismjs/components/prism-objectivec");
|
54
|
+
require("prismjs/components/prism-perl");
|
55
|
+
require("prismjs/components/prism-php");
|
56
|
+
require("prismjs/components/prism-powershell");
|
57
|
+
require("prismjs/components/prism-python");
|
58
|
+
require("prismjs/components/prism-r");
|
59
|
+
require("prismjs/components/prism-ruby");
|
60
|
+
require("prismjs/components/prism-rust");
|
61
|
+
require("prismjs/components/prism-sas");
|
62
|
+
require("prismjs/components/prism-scala");
|
63
|
+
require("prismjs/components/prism-scheme");
|
64
|
+
require("prismjs/components/prism-sql");
|
65
|
+
require("prismjs/components/prism-stata");
|
66
|
+
require("prismjs/components/prism-swift");
|
67
|
+
require("prismjs/components/prism-typescript");
|
68
|
+
require("prismjs/components/prism-tsx");
|
69
|
+
require("prismjs/components/prism-vbnet");
|
70
|
+
require("prismjs/components/prism-yaml");
|
71
|
+
const useDebounce = require("./useDebounce-CtcjDB3L.js");
|
21
72
|
const Toolbar = require("@radix-ui/react-toolbar");
|
22
73
|
const reactRouterDom = require("react-router-dom");
|
23
74
|
const CodeMirror = require("codemirror5");
|
@@ -37,8 +88,7 @@ require("highlight.js/styles/solarized-dark.css");
|
|
37
88
|
require("codemirror5/addon/display/placeholder");
|
38
89
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
39
90
|
function _interopNamespace(e) {
|
40
|
-
if (e && e.__esModule)
|
41
|
-
return e;
|
91
|
+
if (e && e.__esModule) return e;
|
42
92
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
43
93
|
if (e) {
|
44
94
|
for (const k in e) {
|
@@ -56,6 +106,7 @@ function _interopNamespace(e) {
|
|
56
106
|
}
|
57
107
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
58
108
|
const pipe__default = /* @__PURE__ */ _interopDefault(pipe$1);
|
109
|
+
const Prism__namespace = /* @__PURE__ */ _interopNamespace(Prism);
|
59
110
|
const Toolbar__namespace = /* @__PURE__ */ _interopNamespace(Toolbar);
|
60
111
|
const CodeMirror__default = /* @__PURE__ */ _interopDefault(CodeMirror);
|
61
112
|
const sanitizeHtml__default = /* @__PURE__ */ _interopDefault(sanitizeHtml);
|
@@ -197,7 +248,8 @@ const useLazyComponents = (componentUids = []) => {
|
|
197
248
|
const codeLanguages = [
|
198
249
|
{
|
199
250
|
value: "asm",
|
200
|
-
label: "Assembly"
|
251
|
+
label: "Assembly",
|
252
|
+
decorate: "asmatmel"
|
201
253
|
},
|
202
254
|
{
|
203
255
|
value: "bash",
|
@@ -233,7 +285,8 @@ const codeLanguages = [
|
|
233
285
|
},
|
234
286
|
{
|
235
287
|
value: "dockerfile",
|
236
|
-
label: "Dockerfile"
|
288
|
+
label: "Dockerfile",
|
289
|
+
decorate: "docker"
|
237
290
|
},
|
238
291
|
{
|
239
292
|
value: "elixir",
|
@@ -389,7 +442,8 @@ const codeLanguages = [
|
|
389
442
|
},
|
390
443
|
{
|
391
444
|
value: "typescript",
|
392
|
-
label: "TypeScript"
|
445
|
+
label: "TypeScript",
|
446
|
+
decorate: "ts"
|
393
447
|
},
|
394
448
|
{
|
395
449
|
value: "tsx",
|
@@ -405,7 +459,8 @@ const codeLanguages = [
|
|
405
459
|
},
|
406
460
|
{
|
407
461
|
value: "yaml",
|
408
|
-
label: "YAML"
|
462
|
+
label: "YAML",
|
463
|
+
decorate: "yml"
|
409
464
|
}
|
410
465
|
];
|
411
466
|
const baseHandleConvert = (editor, attributesToSet) => {
|
@@ -471,6 +526,29 @@ const pressEnterTwiceToExit = (editor) => {
|
|
471
526
|
});
|
472
527
|
}
|
473
528
|
};
|
529
|
+
const decorateCode = ([node, path]) => {
|
530
|
+
const ranges = [];
|
531
|
+
if (!slate.Element.isElement(node) || node.type !== "code") return ranges;
|
532
|
+
const text = slate.Node.string(node);
|
533
|
+
const language = codeLanguages.find((lang) => lang.value === node.language);
|
534
|
+
const decorateKey = language?.decorate ?? language?.value;
|
535
|
+
const selectedLanguage = Prism__namespace.languages[decorateKey || "plaintext"];
|
536
|
+
const tokens = Prism__namespace.tokenize(text, selectedLanguage);
|
537
|
+
let start = 0;
|
538
|
+
for (const token of tokens) {
|
539
|
+
const length = token.length;
|
540
|
+
const end = start + length;
|
541
|
+
if (typeof token !== "string") {
|
542
|
+
ranges.push({
|
543
|
+
anchor: { path, offset: start },
|
544
|
+
focus: { path, offset: end },
|
545
|
+
className: `token ${token.type}`
|
546
|
+
});
|
547
|
+
}
|
548
|
+
start = end;
|
549
|
+
}
|
550
|
+
return ranges;
|
551
|
+
};
|
474
552
|
const CodeBlock = styledComponents.styled.pre`
|
475
553
|
border-radius: ${({ theme }) => theme.borderRadius};
|
476
554
|
background-color: ${({ theme }) => theme.colors.neutral100};
|
@@ -542,7 +620,7 @@ const CodeEditor = (props) => {
|
|
542
620
|
const codeBlocks = {
|
543
621
|
code: {
|
544
622
|
renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeEditor, { ...props }),
|
545
|
-
icon: Icons.
|
623
|
+
icon: Icons.CodeBlock,
|
546
624
|
label: {
|
547
625
|
id: "components.Blocks.blocks.code",
|
548
626
|
defaultMessage: "Code block"
|
@@ -555,8 +633,7 @@ const codeBlocks = {
|
|
555
633
|
handleEnterKey(editor) {
|
556
634
|
pressEnterTwiceToExit(editor);
|
557
635
|
},
|
558
|
-
snippets: ["```"]
|
559
|
-
dragHandleTopMargin: "10px"
|
636
|
+
snippets: ["```"]
|
560
637
|
}
|
561
638
|
};
|
562
639
|
const H1 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h1" })`
|
@@ -731,8 +808,7 @@ const ImageDialog = () => {
|
|
731
808
|
const [isOpen, setIsOpen] = React__namespace.useState(true);
|
732
809
|
const { editor } = useBlocksEditorContext("ImageDialog");
|
733
810
|
const components = strapiAdmin.useStrapiApp("ImageDialog", (state) => state.components);
|
734
|
-
if (!components || !isOpen)
|
735
|
-
return null;
|
811
|
+
if (!components || !isOpen) return null;
|
736
812
|
const MediaLibraryDialog = components["media-library"];
|
737
813
|
const insertImages = (images) => {
|
738
814
|
slate.Transforms.unwrapNodes(editor, {
|
@@ -741,14 +817,12 @@ const ImageDialog = () => {
|
|
741
817
|
});
|
742
818
|
const nodeEntryBeingReplaced = slate.Editor.above(editor, {
|
743
819
|
match(node) {
|
744
|
-
if (slate.Editor.isEditor(node))
|
745
|
-
return false;
|
820
|
+
if (slate.Editor.isEditor(node)) return false;
|
746
821
|
const isInlineNode = ["text", "link"].includes(node.type);
|
747
822
|
return !isInlineNode;
|
748
823
|
}
|
749
824
|
});
|
750
|
-
if (!nodeEntryBeingReplaced)
|
751
|
-
return;
|
825
|
+
if (!nodeEntryBeingReplaced) return;
|
752
826
|
const [, pathToInsert] = nodeEntryBeingReplaced;
|
753
827
|
slate.Transforms.removeNodes(editor);
|
754
828
|
const nodesToInsert = images.map((image) => {
|
@@ -768,7 +842,7 @@ const ImageDialog = () => {
|
|
768
842
|
const nodeImage = {
|
769
843
|
...expectedImage,
|
770
844
|
alternativeText: expectedImage.alternativeText || expectedImage.name,
|
771
|
-
url:
|
845
|
+
url: useDebounce.prefixFileUrlWithBackendUrl(image.url)
|
772
846
|
};
|
773
847
|
return nodeImage;
|
774
848
|
});
|
@@ -926,8 +1000,7 @@ const LinkContent = React__namespace.forwardRef(
|
|
926
1000
|
slateReact.ReactEditor.focus(editor);
|
927
1001
|
};
|
928
1002
|
React__namespace.useEffect(() => {
|
929
|
-
if (popoverOpen)
|
930
|
-
linkInputRef.current?.focus();
|
1003
|
+
if (popoverOpen) linkInputRef.current?.focus();
|
931
1004
|
}, [popoverOpen]);
|
932
1005
|
const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
|
933
1006
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
|
@@ -997,11 +1070,11 @@ const LinkContent = React__namespace.forwardRef(
|
|
997
1070
|
),
|
998
1071
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
999
1072
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
|
1000
|
-
id: "
|
1073
|
+
id: "global.cancel",
|
1001
1074
|
defaultMessage: "Cancel"
|
1002
1075
|
}) }),
|
1003
1076
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
|
1004
|
-
id: "
|
1077
|
+
id: "global.save",
|
1005
1078
|
defaultMessage: "Save"
|
1006
1079
|
}) })
|
1007
1080
|
] })
|
@@ -1082,8 +1155,7 @@ const isText$1 = (node) => {
|
|
1082
1155
|
return slate.Node.isNode(node) && !slate.Editor.isEditor(node) && node.type === "text";
|
1083
1156
|
};
|
1084
1157
|
const handleBackspaceKeyOnList = (editor, event) => {
|
1085
|
-
if (!editor.selection)
|
1086
|
-
return;
|
1158
|
+
if (!editor.selection) return;
|
1087
1159
|
const [currentListItem, currentListItemPath] = slate.Editor.parent(editor, editor.selection.anchor);
|
1088
1160
|
const [currentList, currentListPath] = slate.Editor.parent(editor, currentListItemPath);
|
1089
1161
|
const isListEmpty = currentList.children.length === 1 && isText$1(currentListItem.children[0]) && currentListItem.children[0].text === "";
|
@@ -1192,8 +1264,7 @@ const handleEnterKeyOnList = (editor) => {
|
|
1192
1264
|
};
|
1193
1265
|
const handleConvertToList = (editor, format) => {
|
1194
1266
|
const convertedPath = baseHandleConvert(editor, { type: "list-item" });
|
1195
|
-
if (!convertedPath)
|
1196
|
-
return;
|
1267
|
+
if (!convertedPath) return;
|
1197
1268
|
slate.Transforms.wrapNodes(editor, { type: "list", format, children: [] }, { at: convertedPath });
|
1198
1269
|
};
|
1199
1270
|
const handleTabOnList = (editor) => {
|
@@ -1205,8 +1276,7 @@ const handleTabOnList = (editor) => {
|
|
1205
1276
|
}
|
1206
1277
|
const [currentListItem, currentListItemPath] = currentListItemEntry;
|
1207
1278
|
const [currentList] = slate.Editor.parent(editor, currentListItemPath);
|
1208
|
-
if (currentListItem === currentList.children[0])
|
1209
|
-
return;
|
1279
|
+
if (currentListItem === currentList.children[0]) return;
|
1210
1280
|
const currentListItemIndex = currentList.children.findIndex((item) => item === currentListItem);
|
1211
1281
|
const previousNode = currentList.children[currentListItemIndex - 1];
|
1212
1282
|
if (previousNode.type === "list") {
|
@@ -1342,13 +1412,13 @@ const quoteBlocks = {
|
|
1342
1412
|
handleEnterKey(editor) {
|
1343
1413
|
pressEnterTwiceToExit(editor);
|
1344
1414
|
},
|
1345
|
-
snippets: [">"]
|
1346
|
-
dragHandleTopMargin: "6px"
|
1415
|
+
snippets: [">"]
|
1347
1416
|
}
|
1348
1417
|
};
|
1349
1418
|
const ToolbarWrapper = styledComponents.styled(designSystem.Flex)`
|
1350
1419
|
&[aria-disabled='true'] {
|
1351
1420
|
cursor: not-allowed;
|
1421
|
+
background: ${({ theme }) => theme.colors.neutral150};
|
1352
1422
|
}
|
1353
1423
|
`;
|
1354
1424
|
const Separator = styledComponents.styled(Toolbar__namespace.Separator)`
|
@@ -1359,7 +1429,7 @@ const Separator = styledComponents.styled(Toolbar__namespace.Separator)`
|
|
1359
1429
|
const FlexButton = styledComponents.styled(designSystem.Flex)`
|
1360
1430
|
// Inherit the not-allowed cursor from ToolbarWrapper when disabled
|
1361
1431
|
&[aria-disabled] {
|
1362
|
-
cursor:
|
1432
|
+
cursor: not-allowed;
|
1363
1433
|
}
|
1364
1434
|
|
1365
1435
|
&[aria-disabled='false'] {
|
@@ -1573,8 +1643,7 @@ const isListNode = (node) => {
|
|
1573
1643
|
const ListButton = ({ block, format }) => {
|
1574
1644
|
const { editor, disabled, blocks } = useBlocksEditorContext("ListButton");
|
1575
1645
|
const isListActive = () => {
|
1576
|
-
if (!editor.selection)
|
1577
|
-
return false;
|
1646
|
+
if (!editor.selection) return false;
|
1578
1647
|
const currentListEntry = slate.Editor.above(editor, {
|
1579
1648
|
match: (node) => !slate.Editor.isEditor(node) && node.type === "list",
|
1580
1649
|
at: editor.selection.anchor
|
@@ -1648,8 +1717,7 @@ const LinkButton = ({ disabled }) => {
|
|
1648
1717
|
const { editor } = useBlocksEditorContext("LinkButton");
|
1649
1718
|
const isLinkActive = () => {
|
1650
1719
|
const { selection } = editor;
|
1651
|
-
if (!selection)
|
1652
|
-
return false;
|
1720
|
+
if (!selection) return false;
|
1653
1721
|
const [match] = Array.from(
|
1654
1722
|
slate.Editor.nodes(editor, {
|
1655
1723
|
at: slate.Editor.unhangRange(editor, selection),
|
@@ -1713,7 +1781,7 @@ const BlocksToolbar = () => {
|
|
1713
1781
|
return false;
|
1714
1782
|
};
|
1715
1783
|
const isButtonDisabled = checkButtonDisabled();
|
1716
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Toolbar__namespace.Root, { "aria-disabled": disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarWrapper, { gap: 2, padding: 2, children: [
|
1784
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Toolbar__namespace.Root, { "aria-disabled": disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarWrapper, { gap: 2, padding: 2, width: "100%", children: [
|
1717
1785
|
/* @__PURE__ */ jsxRuntime.jsx(BlocksDropdown, {}),
|
1718
1786
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
1719
1787
|
/* @__PURE__ */ jsxRuntime.jsx(Toolbar__namespace.ToggleGroup, { type: "multiple", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, children: [
|
@@ -1783,33 +1851,36 @@ const DragItem = styledComponents.styled(designSystem.Flex)`
|
|
1783
1851
|
}
|
1784
1852
|
`;
|
1785
1853
|
const DragIconButton = styledComponents.styled(designSystem.IconButton)`
|
1854
|
+
user-select: none;
|
1786
1855
|
display: flex;
|
1787
1856
|
align-items: center;
|
1788
1857
|
justify-content: center;
|
1858
|
+
border: none;
|
1789
1859
|
border-radius: ${({ theme }) => theme.borderRadius};
|
1790
|
-
|
1791
|
-
|
1860
|
+
padding-left: ${({ theme }) => theme.spaces[0]};
|
1861
|
+
padding-right: ${({ theme }) => theme.spaces[0]};
|
1862
|
+
padding-top: ${({ theme }) => theme.spaces[1]};
|
1863
|
+
padding-bottom: ${({ theme }) => theme.spaces[1]};
|
1792
1864
|
visibility: hidden;
|
1793
1865
|
cursor: grab;
|
1794
1866
|
opacity: inherit;
|
1795
1867
|
margin-top: ${(props) => props.$dragHandleTopMargin ?? 0};
|
1796
1868
|
|
1797
1869
|
&:hover {
|
1798
|
-
background: ${({ theme }) => theme.colors.
|
1870
|
+
background: ${({ theme }) => theme.colors.neutral100};
|
1799
1871
|
}
|
1800
1872
|
&:active {
|
1801
1873
|
cursor: grabbing;
|
1874
|
+
background: ${({ theme }) => theme.colors.neutral150};
|
1802
1875
|
}
|
1803
1876
|
&[aria-disabled='true'] {
|
1804
|
-
|
1805
|
-
background: transparent;
|
1877
|
+
visibility: hidden;
|
1806
1878
|
}
|
1807
1879
|
svg {
|
1808
|
-
height: auto;
|
1809
1880
|
min-width: ${({ theme }) => theme.spaces[3]};
|
1810
1881
|
|
1811
1882
|
path {
|
1812
|
-
fill: ${({ theme }) => theme.colors.
|
1883
|
+
fill: ${({ theme }) => theme.colors.neutral500};
|
1813
1884
|
}
|
1814
1885
|
}
|
1815
1886
|
`;
|
@@ -1854,8 +1925,7 @@ const DragAndDropElement = ({
|
|
1854
1925
|
displayedValue: children
|
1855
1926
|
},
|
1856
1927
|
onDropItem(currentIndex, newIndex) {
|
1857
|
-
if (newIndex)
|
1858
|
-
handleMoveBlock(newIndex, currentIndex);
|
1928
|
+
if (newIndex) handleMoveBlock(newIndex, currentIndex);
|
1859
1929
|
}
|
1860
1930
|
});
|
1861
1931
|
const composedBoxRefs = designSystem.useComposedRefs(blockRef, dropRef);
|
@@ -1911,6 +1981,7 @@ const DragAndDropElement = ({
|
|
1911
1981
|
DragIconButton,
|
1912
1982
|
{
|
1913
1983
|
tag: "div",
|
1984
|
+
contentEditable: false,
|
1914
1985
|
role: "button",
|
1915
1986
|
tabIndex: 0,
|
1916
1987
|
withTooltip: false,
|
@@ -1960,7 +2031,7 @@ const baseRenderLeaf = (props, modifiers2) => {
|
|
1960
2031
|
}
|
1961
2032
|
return currentChildren;
|
1962
2033
|
}, props.children);
|
1963
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props.attributes, children: wrappedChildren });
|
2034
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props.attributes, className: props.leaf.className, children: wrappedChildren });
|
1964
2035
|
};
|
1965
2036
|
const baseRenderElement = ({
|
1966
2037
|
props,
|
@@ -1998,8 +2069,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
1998
2069
|
[modifiers2]
|
1999
2070
|
);
|
2000
2071
|
const handleMoveBlocks = (editor2, event) => {
|
2001
|
-
if (!editor2.selection)
|
2002
|
-
return;
|
2072
|
+
if (!editor2.selection) return;
|
2003
2073
|
const start = slate.Range.start(editor2.selection);
|
2004
2074
|
const currentIndex = [start.path[0]];
|
2005
2075
|
let newIndexPosition = 0;
|
@@ -2136,8 +2206,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2136
2206
|
}
|
2137
2207
|
};
|
2138
2208
|
const handleScrollSelectionIntoView = () => {
|
2139
|
-
if (!editor.selection)
|
2140
|
-
return;
|
2209
|
+
if (!editor.selection) return;
|
2141
2210
|
const domRange = slateReact.ReactEditor.toDOMRange(editor, editor.selection);
|
2142
2211
|
const domRect = domRange.getBoundingClientRect();
|
2143
2212
|
const blocksInput = blocksRef.current;
|
@@ -2164,7 +2233,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2164
2233
|
background: "neutral0",
|
2165
2234
|
color: "neutral800",
|
2166
2235
|
lineHeight: 6,
|
2167
|
-
paddingRight:
|
2236
|
+
paddingRight: 7,
|
2168
2237
|
paddingTop: 6,
|
2169
2238
|
paddingBottom: 3,
|
2170
2239
|
children: [
|
@@ -2175,6 +2244,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2175
2244
|
readOnly: disabled,
|
2176
2245
|
placeholder,
|
2177
2246
|
isExpandedMode,
|
2247
|
+
decorate: decorateCode,
|
2178
2248
|
renderElement,
|
2179
2249
|
renderLeaf,
|
2180
2250
|
onKeyDown: handleKeyDown,
|
@@ -2331,8 +2401,7 @@ const InlineCode = styledComponents.styled.code`
|
|
2331
2401
|
`;
|
2332
2402
|
const baseCheckIsActive = (editor, name2) => {
|
2333
2403
|
const marks = slate.Editor.marks(editor);
|
2334
|
-
if (!marks)
|
2335
|
-
return false;
|
2404
|
+
if (!marks) return false;
|
2336
2405
|
return Boolean(marks[name2]);
|
2337
2406
|
};
|
2338
2407
|
const baseHandleToggle = (editor, name2) => {
|
@@ -2498,6 +2567,7 @@ const ExpandIconButton = styledComponents.styled(designSystem.IconButton)`
|
|
2498
2567
|
position: absolute;
|
2499
2568
|
bottom: 1.2rem;
|
2500
2569
|
right: 1.2rem;
|
2570
|
+
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
2501
2571
|
`;
|
2502
2572
|
function useResetKey(value) {
|
2503
2573
|
const slateUpdatesCount = React__namespace.useRef(0);
|
@@ -2656,7 +2726,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
2656
2726
|
designSystem.Box,
|
2657
2727
|
{
|
2658
2728
|
tag: "button",
|
2659
|
-
background: "neutral100",
|
2729
|
+
background: disabled ? "neutral150" : "neutral100",
|
2660
2730
|
borderColor: field.error ? "danger600" : "neutral200",
|
2661
2731
|
hasRadius: true,
|
2662
2732
|
disabled,
|
@@ -2664,32 +2734,32 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
2664
2734
|
paddingTop: 9,
|
2665
2735
|
paddingBottom: 9,
|
2666
2736
|
type: "button",
|
2737
|
+
style: { cursor: disabled ? "not-allowed" : "pointer" },
|
2667
2738
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
|
2668
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
2669
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
2670
|
-
|
2671
|
-
|
2672
|
-
|
2739
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", color: disabled ? "neutral500" : "primary600", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.PlusCircle, { width: "3.2rem", height: "3.2rem" }) }),
|
2740
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
2741
|
+
designSystem.Typography,
|
2742
|
+
{
|
2743
|
+
textColor: disabled ? "neutral600" : "primary600",
|
2744
|
+
variant: "pi",
|
2745
|
+
fontWeight: "bold",
|
2746
|
+
children: formatMessage({
|
2747
|
+
id: index.getTranslation("components.empty-repeatable"),
|
2748
|
+
defaultMessage: "No entry yet. Click to add one."
|
2749
|
+
})
|
2750
|
+
}
|
2751
|
+
) })
|
2673
2752
|
] })
|
2674
2753
|
}
|
2675
2754
|
) });
|
2676
2755
|
};
|
2677
|
-
const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
|
2678
|
-
width: 2.4rem;
|
2679
|
-
height: 2.4rem;
|
2680
|
-
> circle {
|
2681
|
-
fill: ${({ theme }) => theme.colors.primary200};
|
2682
|
-
}
|
2683
|
-
> path {
|
2684
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
2685
|
-
}
|
2686
|
-
`;
|
2687
2756
|
const NonRepeatableComponent = ({
|
2688
2757
|
attribute,
|
2689
2758
|
name: name2,
|
2690
2759
|
children,
|
2691
2760
|
layout
|
2692
2761
|
}) => {
|
2762
|
+
const { formatMessage } = reactIntl.useIntl();
|
2693
2763
|
const { value } = strapiAdmin.useField(name2);
|
2694
2764
|
const level = Relations.useComponent("NonRepeatableComponent", (state) => state.level);
|
2695
2765
|
const isNested = level > 0;
|
@@ -2706,6 +2776,10 @@ const NonRepeatableComponent = ({
|
|
2706
2776
|
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
|
2707
2777
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2708
2778
|
const completeFieldName = `${name2}.${field.name}`;
|
2779
|
+
const translatedLabel = formatMessage({
|
2780
|
+
id: `content-manager.components.${attribute.component}.${field.name}`,
|
2781
|
+
defaultMessage: field.label
|
2782
|
+
});
|
2709
2783
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
2710
2784
|
designSystem.Grid.Item,
|
2711
2785
|
{
|
@@ -2714,7 +2788,7 @@ const NonRepeatableComponent = ({
|
|
2714
2788
|
xs: 12,
|
2715
2789
|
direction: "column",
|
2716
2790
|
alignItems: "stretch",
|
2717
|
-
children: children({ ...field, name: completeFieldName })
|
2791
|
+
children: children({ ...field, label: translatedLabel, name: completeFieldName })
|
2718
2792
|
},
|
2719
2793
|
completeFieldName
|
2720
2794
|
);
|
@@ -2736,13 +2810,34 @@ const RepeatableComponent = ({
|
|
2736
2810
|
const { search: searchString } = reactRouterDom.useLocation();
|
2737
2811
|
const search = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
2738
2812
|
const { components } = index.useDoc();
|
2739
|
-
const {
|
2813
|
+
const {
|
2814
|
+
value = [],
|
2815
|
+
error,
|
2816
|
+
rawError
|
2817
|
+
} = strapiAdmin.useField(name2);
|
2740
2818
|
const addFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.addFieldRow);
|
2741
2819
|
const moveFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.moveFieldRow);
|
2742
2820
|
const removeFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.removeFieldRow);
|
2743
2821
|
const { max = Infinity } = attribute;
|
2744
2822
|
const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
|
2745
2823
|
const [liveText, setLiveText] = React__namespace.useState("");
|
2824
|
+
React__namespace.useEffect(() => {
|
2825
|
+
const hasNestedErrors = rawError && Array.isArray(rawError) && rawError.length > 0;
|
2826
|
+
const hasNestedValue = value && Array.isArray(value) && value.length > 0;
|
2827
|
+
if (hasNestedErrors && hasNestedValue) {
|
2828
|
+
const errorOpenItems = rawError.map((_, idx) => {
|
2829
|
+
return value[idx] ? value[idx].__temp_key__ : null;
|
2830
|
+
}).filter((value2) => !!value2);
|
2831
|
+
if (errorOpenItems && errorOpenItems.length > 0) {
|
2832
|
+
setCollapseToOpen((collapseToOpen2) => {
|
2833
|
+
if (!errorOpenItems.includes(collapseToOpen2)) {
|
2834
|
+
return errorOpenItems[0];
|
2835
|
+
}
|
2836
|
+
return collapseToOpen2;
|
2837
|
+
});
|
2838
|
+
}
|
2839
|
+
}
|
2840
|
+
}, [rawError, value]);
|
2746
2841
|
const componentTmpKeyWithFocussedField = React__namespace.useMemo(() => {
|
2747
2842
|
if (search.has("field")) {
|
2748
2843
|
const fieldParam = search.get("field");
|
@@ -2757,7 +2852,7 @@ const RepeatableComponent = ({
|
|
2757
2852
|
}
|
2758
2853
|
return void 0;
|
2759
2854
|
}, [search, name2, value]);
|
2760
|
-
const prevValue =
|
2855
|
+
const prevValue = useDebounce.usePrev(value);
|
2761
2856
|
React__namespace.useEffect(() => {
|
2762
2857
|
if (prevValue && prevValue.length < value.length) {
|
2763
2858
|
setCollapseToOpen(value[value.length - 1].__temp_key__);
|
@@ -2895,6 +2990,10 @@ const RepeatableComponent = ({
|
|
2895
2990
|
children: layout.map((row, index22) => {
|
2896
2991
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2897
2992
|
const completeFieldName = `${nameWithIndex}.${field.name}`;
|
2993
|
+
const translatedLabel = formatMessage({
|
2994
|
+
id: `content-manager.components.${attribute.component}.${field.name}`,
|
2995
|
+
defaultMessage: field.label
|
2996
|
+
});
|
2898
2997
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
2899
2998
|
designSystem.Grid.Item,
|
2900
2999
|
{
|
@@ -2903,7 +3002,11 @@ const RepeatableComponent = ({
|
|
2903
3002
|
xs: 12,
|
2904
3003
|
direction: "column",
|
2905
3004
|
alignItems: "stretch",
|
2906
|
-
children: children({
|
3005
|
+
children: children({
|
3006
|
+
...field,
|
3007
|
+
label: translatedLabel,
|
3008
|
+
name: completeFieldName
|
3009
|
+
})
|
2907
3010
|
},
|
2908
3011
|
completeFieldName
|
2909
3012
|
);
|
@@ -3118,11 +3221,11 @@ const AddComponentButton = ({
|
|
3118
3221
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
|
3119
3222
|
/* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
|
3120
3223
|
/* @__PURE__ */ jsxRuntime.jsx(
|
3121
|
-
|
3224
|
+
designSystem.Typography,
|
3122
3225
|
{
|
3123
3226
|
variant: "pi",
|
3124
3227
|
fontWeight: "bold",
|
3125
|
-
textColor: hasError && !isOpen ? "danger600" : "
|
3228
|
+
textColor: hasError && !isOpen ? "danger600" : "neutral600",
|
3126
3229
|
children
|
3127
3230
|
}
|
3128
3231
|
)
|
@@ -3139,43 +3242,14 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
|
|
3139
3242
|
fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger200 : theme.colors.neutral150};
|
3140
3243
|
}
|
3141
3244
|
> path {
|
3142
|
-
fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.
|
3245
|
+
fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral500};
|
3143
3246
|
}
|
3144
3247
|
`;
|
3145
|
-
const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
|
3146
3248
|
const StyledButton = styledComponents.styled(designSystem.Button)`
|
3249
|
+
padding-left: ${({ theme }) => theme.spaces[3]};
|
3147
3250
|
border-radius: 26px;
|
3148
|
-
border-color: ${({ theme }) => theme.colors.neutral150};
|
3149
3251
|
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
3150
3252
|
height: 5rem;
|
3151
|
-
|
3152
|
-
&:hover {
|
3153
|
-
${AddComponentTitle} {
|
3154
|
-
color: ${({ theme }) => theme.colors.primary600};
|
3155
|
-
}
|
3156
|
-
|
3157
|
-
${StyledAddIcon} {
|
3158
|
-
> circle {
|
3159
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
3160
|
-
}
|
3161
|
-
> path {
|
3162
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
3163
|
-
}
|
3164
|
-
}
|
3165
|
-
}
|
3166
|
-
&:active {
|
3167
|
-
${AddComponentTitle} {
|
3168
|
-
color: ${({ theme }) => theme.colors.primary600};
|
3169
|
-
}
|
3170
|
-
${StyledAddIcon} {
|
3171
|
-
> circle {
|
3172
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
3173
|
-
}
|
3174
|
-
> path {
|
3175
|
-
fill: ${({ theme }) => theme.colors.neutral100};
|
3176
|
-
}
|
3177
|
-
}
|
3178
|
-
}
|
3179
3253
|
`;
|
3180
3254
|
const ComponentCategory = ({
|
3181
3255
|
category,
|
@@ -3290,18 +3364,6 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
|
|
3290
3364
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
|
3291
3365
|
] });
|
3292
3366
|
};
|
3293
|
-
function useDebounce(value, delay) {
|
3294
|
-
const [debouncedValue, setDebouncedValue] = React.useState(value);
|
3295
|
-
React.useEffect(() => {
|
3296
|
-
const handler = setTimeout(() => {
|
3297
|
-
setDebouncedValue(value);
|
3298
|
-
}, delay);
|
3299
|
-
return () => {
|
3300
|
-
clearTimeout(handler);
|
3301
|
-
};
|
3302
|
-
}, [value, delay]);
|
3303
|
-
return debouncedValue;
|
3304
|
-
}
|
3305
3367
|
const uidApi = index.contentManagerApi.injectEndpoints({
|
3306
3368
|
endpoints: (builder) => ({
|
3307
3369
|
getDefaultUID: builder.query({
|
@@ -3353,7 +3415,7 @@ const UIDInput = React__namespace.forwardRef(
|
|
3353
3415
|
const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
|
3354
3416
|
const isCloning = reactRouterDom.useMatch(index.CLONE_PATH) !== null;
|
3355
3417
|
const field = strapiAdmin.useField(name2);
|
3356
|
-
const debouncedValue = useDebounce(field.value, 300);
|
3418
|
+
const debouncedValue = useDebounce.useDebounce(field.value, 300);
|
3357
3419
|
const hasChanged = debouncedValue !== field.initialValue;
|
3358
3420
|
const { toggleNotification } = strapiAdmin.useNotification();
|
3359
3421
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
|
@@ -3759,8 +3821,7 @@ const Wrapper = styledComponents.styled.div`
|
|
3759
3821
|
`;
|
3760
3822
|
var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
|
3761
3823
|
function newlineAndIndentContinueMarkdownList(cm) {
|
3762
|
-
if (cm.getOption("disableInput"))
|
3763
|
-
return CodeMirror__default.default.Pass;
|
3824
|
+
if (cm.getOption("disableInput")) return CodeMirror__default.default.Pass;
|
3764
3825
|
var ranges = cm.listSelections(), replacements = [];
|
3765
3826
|
for (var i = 0; i < ranges.length; i++) {
|
3766
3827
|
var pos = ranges[i].head;
|
@@ -3794,8 +3855,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
|
|
3794
3855
|
var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
|
3795
3856
|
var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
|
3796
3857
|
replacements[i] = "\n" + indent + bullet + after;
|
3797
|
-
if (numbered)
|
3798
|
-
incrementRemainingMarkdownListNumbers(cm, pos);
|
3858
|
+
if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
|
3799
3859
|
}
|
3800
3860
|
}
|
3801
3861
|
cm.replaceSelections(replacements);
|
@@ -3813,10 +3873,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
|
|
3813
3873
|
var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
|
3814
3874
|
var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
|
3815
3875
|
if (startIndent === nextIndent && !isNaN(nextNumber)) {
|
3816
|
-
if (newNumber === nextNumber)
|
3817
|
-
|
3818
|
-
if (newNumber > nextNumber)
|
3819
|
-
itemNumber = newNumber + 1;
|
3876
|
+
if (newNumber === nextNumber) itemNumber = nextNumber + 1;
|
3877
|
+
if (newNumber > nextNumber) itemNumber = newNumber + 1;
|
3820
3878
|
cm.replaceRange(
|
3821
3879
|
nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
|
3822
3880
|
{
|
@@ -3829,10 +3887,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
|
|
3829
3887
|
}
|
3830
3888
|
);
|
3831
3889
|
} else {
|
3832
|
-
if (startIndent.length > nextIndent.length)
|
3833
|
-
|
3834
|
-
if (startIndent.length < nextIndent.length && lookAhead === 1)
|
3835
|
-
return;
|
3890
|
+
if (startIndent.length > nextIndent.length) return;
|
3891
|
+
if (startIndent.length < nextIndent.length && lookAhead === 1) return;
|
3836
3892
|
skipCount += 1;
|
3837
3893
|
}
|
3838
3894
|
}
|
@@ -4910,7 +4966,7 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
4910
4966
|
const handleSelectAssets = (files) => {
|
4911
4967
|
const formattedFiles = files.map((f) => ({
|
4912
4968
|
alt: f.alternativeText || f.name,
|
4913
|
-
url:
|
4969
|
+
url: useDebounce.prefixFileUrlWithBackendUrl(f.url),
|
4914
4970
|
mime: f.mime
|
4915
4971
|
}));
|
4916
4972
|
insertFile(editorRef, formattedFiles);
|
@@ -4969,15 +5025,19 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
4969
5025
|
);
|
4970
5026
|
const MemoizedWysiwyg = React__namespace.memo(Wysiwyg);
|
4971
5027
|
const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
4972
|
-
const { id } = index.useDoc();
|
5028
|
+
const { id, document: document2, collectionType } = index.useDoc();
|
4973
5029
|
const isFormDisabled = strapiAdmin.useForm("InputRenderer", (state) => state.disabled);
|
4974
5030
|
const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
|
4975
5031
|
const canCreateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
|
4976
5032
|
const canReadFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
|
4977
5033
|
const canUpdateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
|
4978
5034
|
const canUserAction = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
|
4979
|
-
|
4980
|
-
|
5035
|
+
let idToCheck = id;
|
5036
|
+
if (collectionType === index.SINGLE_TYPES) {
|
5037
|
+
idToCheck = document2?.documentId;
|
5038
|
+
}
|
5039
|
+
const editableFields = idToCheck ? canUpdateFields : canCreateFields;
|
5040
|
+
const readableFields = idToCheck ? canReadFields : canCreateFields;
|
4981
5041
|
const canUserReadField = canUserAction(props.name, readableFields, props.type);
|
4982
5042
|
const canUserEditField = canUserAction(props.name, editableFields, props.type);
|
4983
5043
|
const fields = strapiAdmin.useStrapiApp("InputRenderer", (app) => app.fields);
|
@@ -4988,6 +5048,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
4988
5048
|
const {
|
4989
5049
|
edit: { components }
|
4990
5050
|
} = index.useDocLayout();
|
5051
|
+
const field = strapiAdmin.useField(props.name);
|
4991
5052
|
if (!visible) {
|
4992
5053
|
return null;
|
4993
5054
|
}
|
@@ -4998,7 +5059,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
4998
5059
|
if (attributeHasCustomFieldProperty(props.attribute)) {
|
4999
5060
|
const CustomInput = lazyComponentStore[props.attribute.customField];
|
5000
5061
|
if (CustomInput) {
|
5001
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
|
5062
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, ...field, hint, disabled: fieldIsDisabled });
|
5002
5063
|
}
|
5003
5064
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
5004
5065
|
strapiAdmin.InputRenderer,
|
@@ -5122,7 +5183,8 @@ const DynamicComponent = ({
|
|
5122
5183
|
onDropItem,
|
5123
5184
|
onCancel,
|
5124
5185
|
dynamicComponentsByCategory = {},
|
5125
|
-
onAddComponent
|
5186
|
+
onAddComponent,
|
5187
|
+
children
|
5126
5188
|
}) => {
|
5127
5189
|
const { formatMessage } = reactIntl.useIntl();
|
5128
5190
|
const formValues = strapiAdmin.useForm("DynamicComponent", (state) => state.values);
|
@@ -5159,6 +5221,14 @@ const DynamicComponent = ({
|
|
5159
5221
|
React__namespace.useEffect(() => {
|
5160
5222
|
dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
|
5161
5223
|
}, [dragPreviewRef, index$1]);
|
5224
|
+
const accordionValue = React__namespace.useId();
|
5225
|
+
const { value = [], rawError } = strapiAdmin.useField(`${name2}.${index$1}`);
|
5226
|
+
const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
|
5227
|
+
React__namespace.useEffect(() => {
|
5228
|
+
if (rawError && value) {
|
5229
|
+
setCollapseToOpen(accordionValue);
|
5230
|
+
}
|
5231
|
+
}, [rawError, value, accordionValue]);
|
5162
5232
|
const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
|
5163
5233
|
const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
5164
5234
|
/* @__PURE__ */ jsxRuntime.jsx(
|
@@ -5224,10 +5294,9 @@ const DynamicComponent = ({
|
|
5224
5294
|
] })
|
5225
5295
|
] });
|
5226
5296
|
const accordionTitle = title ? `${displayName} ${title}` : displayName;
|
5227
|
-
const accordionValue = React__namespace.useId();
|
5228
5297
|
return /* @__PURE__ */ jsxRuntime.jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
|
5229
5298
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Rectangle, { background: "neutral200" }) }),
|
5230
|
-
/* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: accordionValue, children: [
|
5299
|
+
/* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { value: collapseToOpen, onValueChange: setCollapseToOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: accordionValue, children: [
|
5231
5300
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Header, { children: [
|
5232
5301
|
/* @__PURE__ */ jsxRuntime.jsx(
|
5233
5302
|
designSystem.Accordion.Trigger,
|
@@ -5238,21 +5307,39 @@ const DynamicComponent = ({
|
|
5238
5307
|
),
|
5239
5308
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Actions, { children: accordionActions })
|
5240
5309
|
] }),
|
5241
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children:
|
5242
|
-
|
5243
|
-
|
5244
|
-
|
5245
|
-
|
5246
|
-
|
5247
|
-
|
5248
|
-
|
5249
|
-
|
5250
|
-
|
5251
|
-
|
5252
|
-
|
5253
|
-
|
5254
|
-
|
5255
|
-
|
5310
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(
|
5311
|
+
designSystem.Grid.Item,
|
5312
|
+
{
|
5313
|
+
col: 12,
|
5314
|
+
s: 12,
|
5315
|
+
xs: 12,
|
5316
|
+
direction: "column",
|
5317
|
+
alignItems: "stretch",
|
5318
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
5319
|
+
const fieldName = `${name2}.${index$1}.${field.name}`;
|
5320
|
+
const fieldWithTranslatedLabel = {
|
5321
|
+
...field,
|
5322
|
+
label: formatMessage({
|
5323
|
+
id: `content-manager.components.${componentUid}.${field.name}`,
|
5324
|
+
defaultMessage: field.label
|
5325
|
+
})
|
5326
|
+
};
|
5327
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
5328
|
+
designSystem.Grid.Item,
|
5329
|
+
{
|
5330
|
+
col: size,
|
5331
|
+
s: 12,
|
5332
|
+
xs: 12,
|
5333
|
+
direction: "column",
|
5334
|
+
alignItems: "stretch",
|
5335
|
+
children: children ? children({ ...fieldWithTranslatedLabel, name: fieldName }) : /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
|
5336
|
+
},
|
5337
|
+
fieldName
|
5338
|
+
);
|
5339
|
+
}) })
|
5340
|
+
},
|
5341
|
+
rowInd
|
5342
|
+
)) }) }) }) })
|
5256
5343
|
] }) }) })
|
5257
5344
|
] });
|
5258
5345
|
};
|
@@ -5331,7 +5418,8 @@ const DynamicZone = ({
|
|
5331
5418
|
label,
|
5332
5419
|
labelAction,
|
5333
5420
|
name: name2,
|
5334
|
-
required = false
|
5421
|
+
required = false,
|
5422
|
+
children
|
5335
5423
|
}) => {
|
5336
5424
|
const { max = Infinity, min = -Infinity } = attribute ?? {};
|
5337
5425
|
const [addComponentIsOpen, setAddComponentIsOpen] = React__namespace.useState(false);
|
@@ -5517,7 +5605,8 @@ const DynamicZone = ({
|
|
5517
5605
|
onDropItem: handleDropItem,
|
5518
5606
|
onGrabItem: handleGrabItem,
|
5519
5607
|
onAddComponent: handleAddComponent,
|
5520
|
-
dynamicComponentsByCategory
|
5608
|
+
dynamicComponentsByCategory,
|
5609
|
+
children
|
5521
5610
|
}
|
5522
5611
|
)
|
5523
5612
|
},
|
@@ -5558,4 +5647,4 @@ exports.transformDocument = transformDocument;
|
|
5558
5647
|
exports.useDynamicZone = useDynamicZone;
|
5559
5648
|
exports.useFieldHint = useFieldHint;
|
5560
5649
|
exports.useLazyComponents = useLazyComponents;
|
5561
|
-
//# sourceMappingURL=Field-
|
5650
|
+
//# sourceMappingURL=Field-DPIsQRre.js.map
|