@strapi/content-manager 0.0.0-next.973df62640087231761ffaeb1c2b5d0d706346d8 → 0.0.0-next.a4bb06d54b493ab973659d0200e0e42937988850
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-BCCTDNe1.js → ComponentConfigurationPage-BLWQy8ru.js} +4 -5
- package/dist/_chunks/{ComponentConfigurationPage-BCCTDNe1.js.map → ComponentConfigurationPage-BLWQy8ru.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CsMNJw_0.mjs → ComponentConfigurationPage-CtIa3aa2.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CsMNJw_0.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-BkEV5bFT.mjs → EditConfigurationPage-DsPR2DVk.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BkEV5bFT.mjs.map → EditConfigurationPage-DsPR2DVk.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DC1Bpfr1.js → EditConfigurationPage-RQkymxCy.js} +4 -5
- package/dist/_chunks/{EditConfigurationPage-DC1Bpfr1.js.map → EditConfigurationPage-RQkymxCy.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-B_Gr-2r6.js → EditViewPage-B-kExt8C.js} +4 -5
- package/dist/_chunks/{EditViewPage-B_Gr-2r6.js.map → EditViewPage-B-kExt8C.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-Bc97GGF4.mjs → EditViewPage-BPyVuPfM.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-Bc97GGF4.mjs.map → EditViewPage-BPyVuPfM.mjs.map} +1 -1
- package/dist/_chunks/{Field-CqmTpeRt.js → Field-DPIsQRre.js} +155 -120
- package/dist/_chunks/Field-DPIsQRre.js.map +1 -0
- package/dist/_chunks/{Field-CIuPhh1m.mjs → Field-Dltnt1km.mjs} +153 -118
- 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-BRlXI9Ey.js → Form-BFi4MXMT.js} +5 -6
- package/dist/_chunks/{Form-BRlXI9Ey.js.map → Form-BFi4MXMT.js.map} +1 -1
- package/dist/_chunks/{Form-C22QTzNy.mjs → Form-C1IcWm1u.mjs} +3 -3
- package/dist/_chunks/{Form-C22QTzNy.mjs.map → Form-C1IcWm1u.mjs.map} +1 -1
- package/dist/_chunks/{History-nFKCaE9Y.mjs → History-04ChQ4pl.mjs} +37 -60
- package/dist/_chunks/History-04ChQ4pl.mjs.map +1 -0
- package/dist/_chunks/{History-mYpwx4Rh.js → History-wjcK4L0C.js} +37 -61
- package/dist/_chunks/History-wjcK4L0C.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-vjQ_UKxh.mjs → ListConfigurationPage-BYqPYLSU.mjs} +6 -5
- package/dist/_chunks/ListConfigurationPage-BYqPYLSU.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-CXwjTP1m.js → ListConfigurationPage-CRbxIC3J.js} +6 -6
- package/dist/_chunks/ListConfigurationPage-CRbxIC3J.js.map +1 -0
- package/dist/_chunks/{ListViewPage-DFq-_rFt.js → ListViewPage-D5NY9183.js} +51 -51
- package/dist/_chunks/ListViewPage-D5NY9183.js.map +1 -0
- package/dist/_chunks/{ListViewPage-Cf1E8F2V.mjs → ListViewPage-FU2LBuhl.mjs} +50 -49
- package/dist/_chunks/ListViewPage-FU2LBuhl.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-BUnPLdSC.js → NoContentTypePage-BgQVE_Qb.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-BUnPLdSC.js.map → NoContentTypePage-BgQVE_Qb.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CpFh_nLX.mjs → NoContentTypePage-DCKUkwb8.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-CpFh_nLX.mjs.map → NoContentTypePage-DCKUkwb8.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DlEaSUxx.js → NoPermissionsPage-C5jwn70o.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DlEaSUxx.js.map → NoPermissionsPage-C5jwn70o.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-GgY8yEd6.mjs → NoPermissionsPage-jqve7C8l.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-GgY8yEd6.mjs.map → NoPermissionsPage-jqve7C8l.mjs.map} +1 -1
- package/dist/_chunks/{Preview-BbRS-OKT.mjs → Preview-BMYN548c.mjs} +78 -72
- package/dist/_chunks/Preview-BMYN548c.mjs.map +1 -0
- package/dist/_chunks/{Preview-BPBvJI2O.js → Preview-DaOihysv.js} +77 -72
- package/dist/_chunks/Preview-DaOihysv.js.map +1 -0
- package/dist/_chunks/{Relations-C1HdkZyt.js → Relations-CTGM7Hv5.js} +7 -10
- package/dist/_chunks/{Relations-C1HdkZyt.js.map → Relations-CTGM7Hv5.js.map} +1 -1
- package/dist/_chunks/{Relations-CkIXcHbJ.mjs → Relations-gscPkxjF.mjs} +6 -8
- package/dist/_chunks/{Relations-CkIXcHbJ.mjs.map → Relations-gscPkxjF.mjs.map} +1 -1
- package/dist/_chunks/{en-CHOp_xJv.js → en-BzQmavmK.js} +11 -3
- package/dist/_chunks/{en-CHOp_xJv.js.map → en-BzQmavmK.js.map} +1 -1
- package/dist/_chunks/{en-D_BMf0hT.mjs → en-CSxLmrh1.mjs} +11 -3
- package/dist/_chunks/{en-D_BMf0hT.mjs.map → en-CSxLmrh1.mjs.map} +1 -1
- package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
- package/dist/_chunks/{index-BL9NYW88.js → index-Ca7YWlAA.js} +279 -165
- package/dist/_chunks/index-Ca7YWlAA.js.map +1 -0
- package/dist/_chunks/{index-C_KAytfk.mjs → index-DqasUQ6Q.mjs} +279 -164
- package/dist/_chunks/index-DqasUQ6Q.mjs.map +1 -0
- package/dist/_chunks/{layout-_a2iPFa6.js → layout-BW80JSCd.js} +5 -6
- package/dist/_chunks/{layout-_a2iPFa6.js.map → layout-BW80JSCd.js.map} +1 -1
- package/dist/_chunks/{layout-D6QIbKn7.mjs → layout-W3clJSCy.mjs} +4 -4
- package/dist/_chunks/{layout-D6QIbKn7.mjs.map → layout-W3clJSCy.mjs.map} +1 -1
- package/dist/_chunks/objects-BcXOv6_9.js.map +1 -1
- package/dist/_chunks/objects-D6yBsdmx.mjs.map +1 -1
- package/dist/_chunks/{relations-BIejV2xk.mjs → relations-BlDkoeWh.mjs} +2 -2
- package/dist/_chunks/{relations-BIejV2xk.mjs.map → relations-BlDkoeWh.mjs.map} +1 -1
- package/dist/_chunks/{relations-BX-k1SIX.js → relations-C9Usz9k5.js} +2 -2
- package/dist/_chunks/{relations-BX-k1SIX.js.map → relations-C9Usz9k5.js.map} +1 -1
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -1
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -1
- 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 +2 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +2 -1
- package/dist/admin/src/content-manager.d.ts +3 -2
- package/dist/admin/src/exports.d.ts +1 -0
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -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/preview/services/preview.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 +16 -19
- 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 +230 -187
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +231 -187
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/utils/metadata.d.ts +1 -0
- 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/utils.d.ts +6 -10
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +3 -2
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -1
- package/dist/server/src/preview/index.d.ts.map +1 -1
- package/dist/server/src/preview/services/index.d.ts +1 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -1
- package/dist/server/src/preview/services/preview-config.d.ts +2 -0
- package/dist/server/src/preview/services/preview-config.d.ts.map +1 -1
- package/dist/server/src/preview/utils.d.ts +1 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -1
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts +4 -2
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +3 -2
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
- package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
- package/dist/server/src/services/utils/populate.d.ts +2 -2
- package/dist/server/src/services/utils/populate.d.ts.map +1 -1
- package/package.json +12 -11
- package/dist/_chunks/Field-CIuPhh1m.mjs.map +0 -1
- package/dist/_chunks/Field-CqmTpeRt.js.map +0 -1
- package/dist/_chunks/History-mYpwx4Rh.js.map +0 -1
- package/dist/_chunks/History-nFKCaE9Y.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-CXwjTP1m.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-vjQ_UKxh.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-Cf1E8F2V.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-DFq-_rFt.js.map +0 -1
- package/dist/_chunks/Preview-BPBvJI2O.js.map +0 -1
- package/dist/_chunks/Preview-BbRS-OKT.mjs.map +0 -1
- package/dist/_chunks/index-BL9NYW88.js.map +0 -1
- package/dist/_chunks/index-C_KAytfk.mjs.map +0 -1
- package/dist/admin/src/preview/constants.d.ts +0 -1
- package/dist/server/src/preview/constants.d.ts +0 -2
- package/dist/server/src/preview/constants.d.ts.map +0 -1
@@ -5,18 +5,69 @@ 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-
|
15
|
+
const useDragAndDrop = require("./useDragAndDrop-BMtgCYzL.js");
|
16
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 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");
|
20
71
|
const useDebounce = require("./useDebounce-CtcjDB3L.js");
|
21
72
|
const Toolbar = require("@radix-ui/react-toolbar");
|
22
73
|
const reactRouterDom = require("react-router-dom");
|
@@ -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) => {
|
@@ -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: [
|
@@ -1787,30 +1855,32 @@ const DragIconButton = styledComponents.styled(designSystem.IconButton)`
|
|
1787
1855
|
display: flex;
|
1788
1856
|
align-items: center;
|
1789
1857
|
justify-content: center;
|
1858
|
+
border: none;
|
1790
1859
|
border-radius: ${({ theme }) => theme.borderRadius};
|
1791
|
-
|
1792
|
-
|
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]};
|
1793
1864
|
visibility: hidden;
|
1794
1865
|
cursor: grab;
|
1795
1866
|
opacity: inherit;
|
1796
1867
|
margin-top: ${(props) => props.$dragHandleTopMargin ?? 0};
|
1797
1868
|
|
1798
1869
|
&:hover {
|
1799
|
-
background: ${({ theme }) => theme.colors.
|
1870
|
+
background: ${({ theme }) => theme.colors.neutral100};
|
1800
1871
|
}
|
1801
1872
|
&:active {
|
1802
1873
|
cursor: grabbing;
|
1874
|
+
background: ${({ theme }) => theme.colors.neutral150};
|
1803
1875
|
}
|
1804
1876
|
&[aria-disabled='true'] {
|
1805
|
-
|
1806
|
-
background: transparent;
|
1877
|
+
visibility: hidden;
|
1807
1878
|
}
|
1808
1879
|
svg {
|
1809
|
-
height: auto;
|
1810
1880
|
min-width: ${({ theme }) => theme.spaces[3]};
|
1811
1881
|
|
1812
1882
|
path {
|
1813
|
-
fill: ${({ theme }) => theme.colors.
|
1883
|
+
fill: ${({ theme }) => theme.colors.neutral500};
|
1814
1884
|
}
|
1815
1885
|
}
|
1816
1886
|
`;
|
@@ -1855,8 +1925,7 @@ const DragAndDropElement = ({
|
|
1855
1925
|
displayedValue: children
|
1856
1926
|
},
|
1857
1927
|
onDropItem(currentIndex, newIndex) {
|
1858
|
-
if (newIndex)
|
1859
|
-
handleMoveBlock(newIndex, currentIndex);
|
1928
|
+
if (newIndex) handleMoveBlock(newIndex, currentIndex);
|
1860
1929
|
}
|
1861
1930
|
});
|
1862
1931
|
const composedBoxRefs = designSystem.useComposedRefs(blockRef, dropRef);
|
@@ -1962,7 +2031,7 @@ const baseRenderLeaf = (props, modifiers2) => {
|
|
1962
2031
|
}
|
1963
2032
|
return currentChildren;
|
1964
2033
|
}, props.children);
|
1965
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props.attributes, children: wrappedChildren });
|
2034
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props.attributes, className: props.leaf.className, children: wrappedChildren });
|
1966
2035
|
};
|
1967
2036
|
const baseRenderElement = ({
|
1968
2037
|
props,
|
@@ -2000,8 +2069,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2000
2069
|
[modifiers2]
|
2001
2070
|
);
|
2002
2071
|
const handleMoveBlocks = (editor2, event) => {
|
2003
|
-
if (!editor2.selection)
|
2004
|
-
return;
|
2072
|
+
if (!editor2.selection) return;
|
2005
2073
|
const start = slate.Range.start(editor2.selection);
|
2006
2074
|
const currentIndex = [start.path[0]];
|
2007
2075
|
let newIndexPosition = 0;
|
@@ -2138,8 +2206,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2138
2206
|
}
|
2139
2207
|
};
|
2140
2208
|
const handleScrollSelectionIntoView = () => {
|
2141
|
-
if (!editor.selection)
|
2142
|
-
return;
|
2209
|
+
if (!editor.selection) return;
|
2143
2210
|
const domRange = slateReact.ReactEditor.toDOMRange(editor, editor.selection);
|
2144
2211
|
const domRect = domRange.getBoundingClientRect();
|
2145
2212
|
const blocksInput = blocksRef.current;
|
@@ -2166,7 +2233,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2166
2233
|
background: "neutral0",
|
2167
2234
|
color: "neutral800",
|
2168
2235
|
lineHeight: 6,
|
2169
|
-
paddingRight:
|
2236
|
+
paddingRight: 7,
|
2170
2237
|
paddingTop: 6,
|
2171
2238
|
paddingBottom: 3,
|
2172
2239
|
children: [
|
@@ -2177,6 +2244,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2177
2244
|
readOnly: disabled,
|
2178
2245
|
placeholder,
|
2179
2246
|
isExpandedMode,
|
2247
|
+
decorate: decorateCode,
|
2180
2248
|
renderElement,
|
2181
2249
|
renderLeaf,
|
2182
2250
|
onKeyDown: handleKeyDown,
|
@@ -2333,8 +2401,7 @@ const InlineCode = styledComponents.styled.code`
|
|
2333
2401
|
`;
|
2334
2402
|
const baseCheckIsActive = (editor, name2) => {
|
2335
2403
|
const marks = slate.Editor.marks(editor);
|
2336
|
-
if (!marks)
|
2337
|
-
return false;
|
2404
|
+
if (!marks) return false;
|
2338
2405
|
return Boolean(marks[name2]);
|
2339
2406
|
};
|
2340
2407
|
const baseHandleToggle = (editor, name2) => {
|
@@ -2500,6 +2567,7 @@ const ExpandIconButton = styledComponents.styled(designSystem.IconButton)`
|
|
2500
2567
|
position: absolute;
|
2501
2568
|
bottom: 1.2rem;
|
2502
2569
|
right: 1.2rem;
|
2570
|
+
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
2503
2571
|
`;
|
2504
2572
|
function useResetKey(value) {
|
2505
2573
|
const slateUpdatesCount = React__namespace.useRef(0);
|
@@ -2658,7 +2726,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
2658
2726
|
designSystem.Box,
|
2659
2727
|
{
|
2660
2728
|
tag: "button",
|
2661
|
-
background: "neutral100",
|
2729
|
+
background: disabled ? "neutral150" : "neutral100",
|
2662
2730
|
borderColor: field.error ? "danger600" : "neutral200",
|
2663
2731
|
hasRadius: true,
|
2664
2732
|
disabled,
|
@@ -2666,26 +2734,25 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
2666
2734
|
paddingTop: 9,
|
2667
2735
|
paddingBottom: 9,
|
2668
2736
|
type: "button",
|
2737
|
+
style: { cursor: disabled ? "not-allowed" : "pointer" },
|
2669
2738
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
|
2670
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
2671
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
2672
|
-
|
2673
|
-
|
2674
|
-
|
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
|
+
) })
|
2675
2752
|
] })
|
2676
2753
|
}
|
2677
2754
|
) });
|
2678
2755
|
};
|
2679
|
-
const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
|
2680
|
-
width: 2.4rem;
|
2681
|
-
height: 2.4rem;
|
2682
|
-
> circle {
|
2683
|
-
fill: ${({ theme }) => theme.colors.primary200};
|
2684
|
-
}
|
2685
|
-
> path {
|
2686
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
2687
|
-
}
|
2688
|
-
`;
|
2689
2756
|
const NonRepeatableComponent = ({
|
2690
2757
|
attribute,
|
2691
2758
|
name: name2,
|
@@ -3154,11 +3221,11 @@ const AddComponentButton = ({
|
|
3154
3221
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
|
3155
3222
|
/* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
|
3156
3223
|
/* @__PURE__ */ jsxRuntime.jsx(
|
3157
|
-
|
3224
|
+
designSystem.Typography,
|
3158
3225
|
{
|
3159
3226
|
variant: "pi",
|
3160
3227
|
fontWeight: "bold",
|
3161
|
-
textColor: hasError && !isOpen ? "danger600" : "
|
3228
|
+
textColor: hasError && !isOpen ? "danger600" : "neutral600",
|
3162
3229
|
children
|
3163
3230
|
}
|
3164
3231
|
)
|
@@ -3175,43 +3242,14 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
|
|
3175
3242
|
fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger200 : theme.colors.neutral150};
|
3176
3243
|
}
|
3177
3244
|
> path {
|
3178
|
-
fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.
|
3245
|
+
fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral500};
|
3179
3246
|
}
|
3180
3247
|
`;
|
3181
|
-
const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
|
3182
3248
|
const StyledButton = styledComponents.styled(designSystem.Button)`
|
3249
|
+
padding-left: ${({ theme }) => theme.spaces[3]};
|
3183
3250
|
border-radius: 26px;
|
3184
|
-
border-color: ${({ theme }) => theme.colors.neutral150};
|
3185
3251
|
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
3186
3252
|
height: 5rem;
|
3187
|
-
|
3188
|
-
&:hover {
|
3189
|
-
${AddComponentTitle} {
|
3190
|
-
color: ${({ theme }) => theme.colors.primary600};
|
3191
|
-
}
|
3192
|
-
|
3193
|
-
${StyledAddIcon} {
|
3194
|
-
> circle {
|
3195
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
3196
|
-
}
|
3197
|
-
> path {
|
3198
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
3199
|
-
}
|
3200
|
-
}
|
3201
|
-
}
|
3202
|
-
&:active {
|
3203
|
-
${AddComponentTitle} {
|
3204
|
-
color: ${({ theme }) => theme.colors.primary600};
|
3205
|
-
}
|
3206
|
-
${StyledAddIcon} {
|
3207
|
-
> circle {
|
3208
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
3209
|
-
}
|
3210
|
-
> path {
|
3211
|
-
fill: ${({ theme }) => theme.colors.neutral100};
|
3212
|
-
}
|
3213
|
-
}
|
3214
|
-
}
|
3215
3253
|
`;
|
3216
3254
|
const ComponentCategory = ({
|
3217
3255
|
category,
|
@@ -3783,8 +3821,7 @@ const Wrapper = styledComponents.styled.div`
|
|
3783
3821
|
`;
|
3784
3822
|
var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
|
3785
3823
|
function newlineAndIndentContinueMarkdownList(cm) {
|
3786
|
-
if (cm.getOption("disableInput"))
|
3787
|
-
return CodeMirror__default.default.Pass;
|
3824
|
+
if (cm.getOption("disableInput")) return CodeMirror__default.default.Pass;
|
3788
3825
|
var ranges = cm.listSelections(), replacements = [];
|
3789
3826
|
for (var i = 0; i < ranges.length; i++) {
|
3790
3827
|
var pos = ranges[i].head;
|
@@ -3818,8 +3855,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
|
|
3818
3855
|
var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
|
3819
3856
|
var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
|
3820
3857
|
replacements[i] = "\n" + indent + bullet + after;
|
3821
|
-
if (numbered)
|
3822
|
-
incrementRemainingMarkdownListNumbers(cm, pos);
|
3858
|
+
if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
|
3823
3859
|
}
|
3824
3860
|
}
|
3825
3861
|
cm.replaceSelections(replacements);
|
@@ -3837,10 +3873,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
|
|
3837
3873
|
var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
|
3838
3874
|
var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
|
3839
3875
|
if (startIndent === nextIndent && !isNaN(nextNumber)) {
|
3840
|
-
if (newNumber === nextNumber)
|
3841
|
-
|
3842
|
-
if (newNumber > nextNumber)
|
3843
|
-
itemNumber = newNumber + 1;
|
3876
|
+
if (newNumber === nextNumber) itemNumber = nextNumber + 1;
|
3877
|
+
if (newNumber > nextNumber) itemNumber = newNumber + 1;
|
3844
3878
|
cm.replaceRange(
|
3845
3879
|
nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
|
3846
3880
|
{
|
@@ -3853,10 +3887,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
|
|
3853
3887
|
}
|
3854
3888
|
);
|
3855
3889
|
} else {
|
3856
|
-
if (startIndent.length > nextIndent.length)
|
3857
|
-
|
3858
|
-
if (startIndent.length < nextIndent.length && lookAhead === 1)
|
3859
|
-
return;
|
3890
|
+
if (startIndent.length > nextIndent.length) return;
|
3891
|
+
if (startIndent.length < nextIndent.length && lookAhead === 1) return;
|
3860
3892
|
skipCount += 1;
|
3861
3893
|
}
|
3862
3894
|
}
|
@@ -5151,7 +5183,8 @@ const DynamicComponent = ({
|
|
5151
5183
|
onDropItem,
|
5152
5184
|
onCancel,
|
5153
5185
|
dynamicComponentsByCategory = {},
|
5154
|
-
onAddComponent
|
5186
|
+
onAddComponent,
|
5187
|
+
children
|
5155
5188
|
}) => {
|
5156
5189
|
const { formatMessage } = reactIntl.useIntl();
|
5157
5190
|
const formValues = strapiAdmin.useForm("DynamicComponent", (state) => state.values);
|
@@ -5299,7 +5332,7 @@ const DynamicComponent = ({
|
|
5299
5332
|
xs: 12,
|
5300
5333
|
direction: "column",
|
5301
5334
|
alignItems: "stretch",
|
5302
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
|
5335
|
+
children: children ? children({ ...fieldWithTranslatedLabel, name: fieldName }) : /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
|
5303
5336
|
},
|
5304
5337
|
fieldName
|
5305
5338
|
);
|
@@ -5385,7 +5418,8 @@ const DynamicZone = ({
|
|
5385
5418
|
label,
|
5386
5419
|
labelAction,
|
5387
5420
|
name: name2,
|
5388
|
-
required = false
|
5421
|
+
required = false,
|
5422
|
+
children
|
5389
5423
|
}) => {
|
5390
5424
|
const { max = Infinity, min = -Infinity } = attribute ?? {};
|
5391
5425
|
const [addComponentIsOpen, setAddComponentIsOpen] = React__namespace.useState(false);
|
@@ -5571,7 +5605,8 @@ const DynamicZone = ({
|
|
5571
5605
|
onDropItem: handleDropItem,
|
5572
5606
|
onGrabItem: handleGrabItem,
|
5573
5607
|
onAddComponent: handleAddComponent,
|
5574
|
-
dynamicComponentsByCategory
|
5608
|
+
dynamicComponentsByCategory,
|
5609
|
+
children
|
5575
5610
|
}
|
5576
5611
|
)
|
5577
5612
|
},
|
@@ -5612,4 +5647,4 @@ exports.transformDocument = transformDocument;
|
|
5612
5647
|
exports.useDynamicZone = useDynamicZone;
|
5613
5648
|
exports.useFieldHint = useFieldHint;
|
5614
5649
|
exports.useLazyComponents = useLazyComponents;
|
5615
|
-
//# sourceMappingURL=Field-
|
5650
|
+
//# sourceMappingURL=Field-DPIsQRre.js.map
|