@strapi/plugin-users-permissions 5.0.0-alpha.1 → 5.0.0-alpha.3
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/admin/src/pages/AdvancedSettings/index.jsx +1 -1
- package/admin/src/pages/EmailTemplates/index.jsx +7 -2
- package/admin/src/pages/Providers/index.jsx +7 -2
- package/admin/src/pages/Roles/pages/ListPage/index.jsx +2 -2
- package/dist/_chunks/{EditViewPage-kgrZ8rEg-6k5dfk_x.js → EditViewPage--KlNP7xz-qZQydloS.js} +212 -214
- package/dist/_chunks/EditViewPage--KlNP7xz-qZQydloS.js.map +1 -0
- package/dist/_chunks/{EditViewPage-kgrZ8rEg-GlayP0Uq.mjs → EditViewPage--KlNP7xz-uG_Cdw0b.mjs} +34 -34
- package/dist/_chunks/EditViewPage--KlNP7xz-uG_Cdw0b.mjs.map +1 -0
- package/dist/_chunks/{Helmet-kyJ1Zklj.mjs → Helmet-En-SEnNC.mjs} +3 -3
- package/dist/_chunks/{Helmet-kyJ1Zklj.mjs.map → Helmet-En-SEnNC.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-BNB0ptO7-TUQO_9Hj.js → ListViewPage-TJbHzMdV-02M2sPzu.js} +112 -134
- package/dist/_chunks/ListViewPage-TJbHzMdV-02M2sPzu.js.map +1 -0
- package/dist/_chunks/{ListViewPage-BNB0ptO7-t1ra9JlI.mjs → ListViewPage-TJbHzMdV-Rx9tWeSb.mjs} +14 -37
- package/dist/_chunks/ListViewPage-TJbHzMdV-Rx9tWeSb.mjs.map +1 -0
- package/dist/_chunks/{ReviewWorkflowsColumn-56Z6l-FH-mpkuW-HV.mjs → ReviewWorkflowsColumn-6zZJluSU-OxQnKLyn.mjs} +2 -2
- package/dist/_chunks/ReviewWorkflowsColumn-6zZJluSU-OxQnKLyn.mjs.map +1 -0
- package/dist/_chunks/{ReviewWorkflowsColumn-56Z6l-FH-3Dq1lGu9.js → ReviewWorkflowsColumn-6zZJluSU-kgZGsgKW.js} +5 -5
- package/dist/_chunks/ReviewWorkflowsColumn-6zZJluSU-kgZGsgKW.js.map +1 -0
- package/dist/_chunks/{constants-evLWZCaJ-dGs71EWl.js → constants-VMWcn5Dg-AljxaBIG.js} +18 -18
- package/dist/_chunks/constants-VMWcn5Dg-AljxaBIG.js.map +1 -0
- package/dist/_chunks/{constants-evLWZCaJ-0QLv9QPI.mjs → constants-VMWcn5Dg-z8ZNCCYd.mjs} +2 -2
- package/dist/_chunks/constants-VMWcn5Dg-z8ZNCCYd.mjs.map +1 -0
- package/dist/_chunks/{index-YFPS5vYF-cugkJcLS.mjs → index--h1ljeG8-PYl4iNtw.mjs} +14794 -14761
- package/dist/_chunks/index--h1ljeG8-PYl4iNtw.mjs.map +1 -0
- package/dist/_chunks/{index-YFPS5vYF-ZGkR3L1g.js → index--h1ljeG8-TLddt1Eo.js} +14443 -14410
- package/dist/_chunks/index--h1ljeG8-TLddt1Eo.js.map +1 -0
- package/dist/_chunks/{index-ylhaoJtw.js → index-16v7Dlxu.js} +5 -6
- package/dist/_chunks/index-16v7Dlxu.js.map +1 -0
- package/dist/_chunks/{index-LpFmy25n.js → index-6NC_epS-.js} +3 -4
- package/dist/_chunks/index-6NC_epS-.js.map +1 -0
- package/dist/_chunks/{index-BGIcvvEB.mjs → index-7se0hVon.mjs} +4 -5
- package/dist/_chunks/index-7se0hVon.mjs.map +1 -0
- package/dist/_chunks/{index-yKMi8hKt.js → index-FMaaApFE.js} +9 -10
- package/dist/_chunks/{index-yKMi8hKt.js.map → index-FMaaApFE.js.map} +1 -1
- package/dist/_chunks/{index-6E51D69B.js → index-OMVNJNU-.js} +4 -5
- package/dist/_chunks/{index-6E51D69B.js.map → index-OMVNJNU-.js.map} +1 -1
- package/dist/_chunks/{index-hG66XSuA.mjs → index-RgmqBr40.mjs} +5 -6
- package/dist/_chunks/{index-hG66XSuA.mjs.map → index-RgmqBr40.mjs.map} +1 -1
- package/dist/_chunks/{index-Bg2Rf_5y.js → index-lTUWz_Sg.js} +5 -6
- package/dist/_chunks/index-lTUWz_Sg.js.map +1 -0
- package/dist/_chunks/{index-xt3l4qU9.mjs → index-t3PVq5nA.mjs} +9 -10
- package/dist/_chunks/{index-xt3l4qU9.mjs.map → index-t3PVq5nA.mjs.map} +1 -1
- package/dist/_chunks/{index-aEKi1Qb9.mjs → index-xoDKvifY.mjs} +5 -6
- package/dist/_chunks/index-xoDKvifY.mjs.map +1 -0
- package/dist/_chunks/{index-R05CeNXG.mjs → index-xyd70Gjt.mjs} +5 -6
- package/dist/_chunks/index-xyd70Gjt.mjs.map +1 -0
- package/dist/_chunks/{useSyncRbac-83vFRiaG-ov11t-T1.mjs → useSyncRbac-Od0wrAnD-NsSU7-VV.mjs} +12 -6
- package/dist/_chunks/useSyncRbac-Od0wrAnD-NsSU7-VV.mjs.map +1 -0
- package/dist/_chunks/{useSyncRbac-83vFRiaG-YY4KQcAU.js → useSyncRbac-Od0wrAnD-_nmioRwh.js} +16 -10
- package/dist/_chunks/useSyncRbac-Od0wrAnD-_nmioRwh.js.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +5 -6
- package/dist/_chunks/EditViewPage-kgrZ8rEg-6k5dfk_x.js.map +0 -1
- package/dist/_chunks/EditViewPage-kgrZ8rEg-GlayP0Uq.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-BNB0ptO7-TUQO_9Hj.js.map +0 -1
- package/dist/_chunks/ListViewPage-BNB0ptO7-t1ra9JlI.mjs.map +0 -1
- package/dist/_chunks/ReviewWorkflowsColumn-56Z6l-FH-3Dq1lGu9.js.map +0 -1
- package/dist/_chunks/ReviewWorkflowsColumn-56Z6l-FH-mpkuW-HV.mjs.map +0 -1
- package/dist/_chunks/constants-evLWZCaJ-0QLv9QPI.mjs.map +0 -1
- package/dist/_chunks/constants-evLWZCaJ-dGs71EWl.js.map +0 -1
- package/dist/_chunks/index-BGIcvvEB.mjs.map +0 -1
- package/dist/_chunks/index-Bg2Rf_5y.js.map +0 -1
- package/dist/_chunks/index-LpFmy25n.js.map +0 -1
- package/dist/_chunks/index-R05CeNXG.mjs.map +0 -1
- package/dist/_chunks/index-YFPS5vYF-ZGkR3L1g.js.map +0 -1
- package/dist/_chunks/index-YFPS5vYF-cugkJcLS.mjs.map +0 -1
- package/dist/_chunks/index-aEKi1Qb9.mjs.map +0 -1
- package/dist/_chunks/index-ylhaoJtw.js.map +0 -1
- package/dist/_chunks/useSyncRbac-83vFRiaG-YY4KQcAU.js.map +0 -1
- package/dist/_chunks/useSyncRbac-83vFRiaG-ov11t-T1.mjs.map +0 -1
package/dist/_chunks/{EditViewPage-kgrZ8rEg-6k5dfk_x.js → EditViewPage--KlNP7xz-qZQydloS.js}
RENAMED
|
@@ -7,7 +7,7 @@ const Helmet = require("./Helmet-d9JljxUo.js");
|
|
|
7
7
|
const reactIntl = require("react-intl");
|
|
8
8
|
const reactRouterDom = require("react-router-dom");
|
|
9
9
|
const styled = require("styled-components");
|
|
10
|
-
const
|
|
10
|
+
const index_H1ljeG8 = require("./index--h1ljeG8-TLddt1Eo.js");
|
|
11
11
|
const Icons = require("@strapi/icons");
|
|
12
12
|
const createNextState2 = require("immer");
|
|
13
13
|
const debounce = require("lodash/debounce");
|
|
@@ -15,11 +15,11 @@ const throttle = require("lodash/throttle");
|
|
|
15
15
|
const ReactDOM = require("react-dom");
|
|
16
16
|
const pipe$1 = require("lodash/fp/pipe");
|
|
17
17
|
const v2 = require("@strapi/design-system/v2");
|
|
18
|
-
const require$$2
|
|
18
|
+
const require$$2 = require("path");
|
|
19
19
|
const require$$1$1 = require("url");
|
|
20
20
|
const require$$1 = require("fs");
|
|
21
21
|
const require$$8 = require("punycode");
|
|
22
|
-
const
|
|
22
|
+
const useSyncRbacOd0wrAnD = require("./useSyncRbac-Od0wrAnD-_nmioRwh.js");
|
|
23
23
|
const _interopDefault = (e2) => e2 && e2.__esModule ? e2 : { default: e2 };
|
|
24
24
|
function _interopNamespace(e2) {
|
|
25
25
|
if (e2 && e2.__esModule)
|
|
@@ -46,37 +46,12 @@ const debounce__default = /* @__PURE__ */ _interopDefault(debounce);
|
|
|
46
46
|
const throttle__default = /* @__PURE__ */ _interopDefault(throttle);
|
|
47
47
|
const ReactDOM__default = /* @__PURE__ */ _interopDefault(ReactDOM);
|
|
48
48
|
const pipe__default = /* @__PURE__ */ _interopDefault(pipe$1);
|
|
49
|
-
const require$$2__default = /* @__PURE__ */ _interopDefault(require$$2
|
|
49
|
+
const require$$2__default = /* @__PURE__ */ _interopDefault(require$$2);
|
|
50
50
|
const require$$1__default$1 = /* @__PURE__ */ _interopDefault(require$$1$1);
|
|
51
51
|
const require$$1__default = /* @__PURE__ */ _interopDefault(require$$1);
|
|
52
52
|
const require$$8__default = /* @__PURE__ */ _interopDefault(require$$8);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const placeholder = formatMessage({
|
|
56
|
-
id: "components.NotAllowedInput.text",
|
|
57
|
-
defaultMessage: "No permissions to see this field"
|
|
58
|
-
});
|
|
59
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
-
designSystem.TextInput,
|
|
61
|
-
{
|
|
62
|
-
disabled: true,
|
|
63
|
-
label: label2,
|
|
64
|
-
id: name2,
|
|
65
|
-
hint,
|
|
66
|
-
name: name2,
|
|
67
|
-
placeholder,
|
|
68
|
-
required,
|
|
69
|
-
startAction: /* @__PURE__ */ jsxRuntime.jsx(StyledIcon, {}),
|
|
70
|
-
type: "text",
|
|
71
|
-
value: ""
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
const StyledIcon = styled__default.default(Icons.EyeStriked)`
|
|
76
|
-
& > path {
|
|
77
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
|
78
|
-
}
|
|
79
|
-
`;
|
|
53
|
+
var isPlainObject$2 = {};
|
|
54
|
+
Object.defineProperty(isPlainObject$2, "__esModule", { value: true });
|
|
80
55
|
/*!
|
|
81
56
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
82
57
|
*
|
|
@@ -101,10 +76,7 @@ function isPlainObject$1(o3) {
|
|
|
101
76
|
}
|
|
102
77
|
return true;
|
|
103
78
|
}
|
|
104
|
-
|
|
105
|
-
__proto__: null,
|
|
106
|
-
isPlainObject: isPlainObject$1
|
|
107
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
79
|
+
var isPlainObject_2 = isPlainObject$2.isPlainObject = isPlainObject$1;
|
|
108
80
|
var PathRef = {
|
|
109
81
|
transform(ref, op) {
|
|
110
82
|
var {
|
|
@@ -781,7 +753,7 @@ var isDeepEqual = (node3, another) => {
|
|
|
781
753
|
for (var key2 in node3) {
|
|
782
754
|
var a2 = node3[key2];
|
|
783
755
|
var b2 = another[key2];
|
|
784
|
-
if (
|
|
756
|
+
if (isPlainObject_2(a2) && isPlainObject_2(b2)) {
|
|
785
757
|
if (!isDeepEqual(a2, b2))
|
|
786
758
|
return false;
|
|
787
759
|
} else if (Array.isArray(a2) && Array.isArray(b2)) {
|
|
@@ -941,7 +913,7 @@ var Range = {
|
|
|
941
913
|
return !Range.isBackward(range2);
|
|
942
914
|
},
|
|
943
915
|
isRange(value) {
|
|
944
|
-
return
|
|
916
|
+
return isPlainObject_2(value) && Point.isPoint(value.anchor) && Point.isPoint(value.focus);
|
|
945
917
|
},
|
|
946
918
|
*points(range2) {
|
|
947
919
|
yield [range2.anchor, "anchor"];
|
|
@@ -998,11 +970,11 @@ var Range = {
|
|
|
998
970
|
}
|
|
999
971
|
};
|
|
1000
972
|
var isElement$1 = (value) => {
|
|
1001
|
-
return
|
|
973
|
+
return isPlainObject_2(value) && Node$6.isNodeList(value.children) && !Editor$1.isEditor(value);
|
|
1002
974
|
};
|
|
1003
975
|
var Element$4 = {
|
|
1004
976
|
isAncestor(value) {
|
|
1005
|
-
return
|
|
977
|
+
return isPlainObject_2(value) && Node$6.isNodeList(value.children);
|
|
1006
978
|
},
|
|
1007
979
|
isElement: isElement$1,
|
|
1008
980
|
isElementList(value) {
|
|
@@ -1337,7 +1309,7 @@ var Operation = {
|
|
|
1337
1309
|
return Operation.isOperation(value) && value.type.endsWith("_node");
|
|
1338
1310
|
},
|
|
1339
1311
|
isOperation(value) {
|
|
1340
|
-
if (!
|
|
1312
|
+
if (!isPlainObject_2(value)) {
|
|
1341
1313
|
return false;
|
|
1342
1314
|
}
|
|
1343
1315
|
switch (value.type) {
|
|
@@ -1346,7 +1318,7 @@ var Operation = {
|
|
|
1346
1318
|
case "insert_text":
|
|
1347
1319
|
return typeof value.offset === "number" && typeof value.text === "string" && Path.isPath(value.path);
|
|
1348
1320
|
case "merge_node":
|
|
1349
|
-
return typeof value.position === "number" && Path.isPath(value.path) &&
|
|
1321
|
+
return typeof value.position === "number" && Path.isPath(value.path) && isPlainObject_2(value.properties);
|
|
1350
1322
|
case "move_node":
|
|
1351
1323
|
return Path.isPath(value.path) && Path.isPath(value.newPath);
|
|
1352
1324
|
case "remove_node":
|
|
@@ -1354,11 +1326,11 @@ var Operation = {
|
|
|
1354
1326
|
case "remove_text":
|
|
1355
1327
|
return typeof value.offset === "number" && typeof value.text === "string" && Path.isPath(value.path);
|
|
1356
1328
|
case "set_node":
|
|
1357
|
-
return Path.isPath(value.path) &&
|
|
1329
|
+
return Path.isPath(value.path) && isPlainObject_2(value.properties) && isPlainObject_2(value.newProperties);
|
|
1358
1330
|
case "set_selection":
|
|
1359
|
-
return value.properties === null && Range.isRange(value.newProperties) || value.newProperties === null && Range.isRange(value.properties) ||
|
|
1331
|
+
return value.properties === null && Range.isRange(value.newProperties) || value.newProperties === null && Range.isRange(value.properties) || isPlainObject_2(value.properties) && isPlainObject_2(value.newProperties);
|
|
1360
1332
|
case "split_node":
|
|
1361
|
-
return Path.isPath(value.path) && typeof value.position === "number" &&
|
|
1333
|
+
return Path.isPath(value.path) && typeof value.position === "number" && isPlainObject_2(value.properties);
|
|
1362
1334
|
default:
|
|
1363
1335
|
return false;
|
|
1364
1336
|
}
|
|
@@ -1468,10 +1440,10 @@ var isEditor = (value) => {
|
|
|
1468
1440
|
if (cachedIsEditor !== void 0) {
|
|
1469
1441
|
return cachedIsEditor;
|
|
1470
1442
|
}
|
|
1471
|
-
if (!
|
|
1443
|
+
if (!isPlainObject_2(value)) {
|
|
1472
1444
|
return false;
|
|
1473
1445
|
}
|
|
1474
|
-
var isEditor2 = typeof value.addMark === "function" && typeof value.apply === "function" && typeof value.deleteFragment === "function" && typeof value.insertBreak === "function" && typeof value.insertSoftBreak === "function" && typeof value.insertFragment === "function" && typeof value.insertNode === "function" && typeof value.insertText === "function" && typeof value.isElementReadOnly === "function" && typeof value.isInline === "function" && typeof value.isSelectable === "function" && typeof value.isVoid === "function" && typeof value.normalizeNode === "function" && typeof value.onChange === "function" && typeof value.removeMark === "function" && typeof value.getDirtyPaths === "function" && (value.marks === null ||
|
|
1446
|
+
var isEditor2 = typeof value.addMark === "function" && typeof value.apply === "function" && typeof value.deleteFragment === "function" && typeof value.insertBreak === "function" && typeof value.insertSoftBreak === "function" && typeof value.insertFragment === "function" && typeof value.insertNode === "function" && typeof value.insertText === "function" && typeof value.isElementReadOnly === "function" && typeof value.isInline === "function" && typeof value.isSelectable === "function" && typeof value.isVoid === "function" && typeof value.normalizeNode === "function" && typeof value.onChange === "function" && typeof value.removeMark === "function" && typeof value.getDirtyPaths === "function" && (value.marks === null || isPlainObject_2(value.marks)) && (value.selection === null || Range.isRange(value.selection)) && Node$6.isNodeList(value.children) && Operation.isOperationList(value.operations);
|
|
1475
1447
|
IS_EDITOR_CACHE.set(value, isEditor2);
|
|
1476
1448
|
return isEditor2;
|
|
1477
1449
|
};
|
|
@@ -1720,7 +1692,7 @@ var Point = {
|
|
|
1720
1692
|
return point3.offset === another.offset && Path.equals(point3.path, another.path);
|
|
1721
1693
|
},
|
|
1722
1694
|
isPoint(value) {
|
|
1723
|
-
return
|
|
1695
|
+
return isPlainObject_2(value) && typeof value.offset === "number" && Path.isPath(value.path);
|
|
1724
1696
|
},
|
|
1725
1697
|
transform(point3, op) {
|
|
1726
1698
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
@@ -1839,7 +1811,7 @@ var Text$2 = {
|
|
|
1839
1811
|
return isDeepEqual(loose ? omitText(text3) : text3, loose ? omitText(another) : another);
|
|
1840
1812
|
},
|
|
1841
1813
|
isText(value) {
|
|
1842
|
-
return
|
|
1814
|
+
return isPlainObject_2(value) && typeof value.text === "string";
|
|
1843
1815
|
},
|
|
1844
1816
|
isTextList(value) {
|
|
1845
1817
|
return Array.isArray(value) && value.every((val) => Text$2.isText(val));
|
|
@@ -5525,7 +5497,7 @@ var History = {
|
|
|
5525
5497
|
* Check if a value is a `History` object.
|
|
5526
5498
|
*/
|
|
5527
5499
|
isHistory(value) {
|
|
5528
|
-
return
|
|
5500
|
+
return isPlainObject_2(value) && Array.isArray(value.redos) && Array.isArray(value.undos) && (value.redos.length === 0 || Operation.isOperationList(value.redos[0].operations)) && (value.undos.length === 0 || Operation.isOperationList(value.undos[0].operations));
|
|
5529
5501
|
}
|
|
5530
5502
|
};
|
|
5531
5503
|
var SAVING = /* @__PURE__ */ new WeakMap();
|
|
@@ -10386,11 +10358,11 @@ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ React.forwardR
|
|
|
10386
10358
|
} else
|
|
10387
10359
|
return child2;
|
|
10388
10360
|
});
|
|
10389
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone,
|
|
10361
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, index_H1ljeG8._extends({}, slotProps, {
|
|
10390
10362
|
ref: forwardedRef
|
|
10391
10363
|
}), /* @__PURE__ */ React.isValidElement(newElement) ? /* @__PURE__ */ React.cloneElement(newElement, void 0, newChildren) : null);
|
|
10392
10364
|
}
|
|
10393
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone,
|
|
10365
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, index_H1ljeG8._extends({}, slotProps, {
|
|
10394
10366
|
ref: forwardedRef
|
|
10395
10367
|
}), children);
|
|
10396
10368
|
});
|
|
@@ -10445,7 +10417,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
|
10445
10417
|
}
|
|
10446
10418
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name2) {
|
|
10447
10419
|
const PROVIDER_NAME = name2 + "CollectionProvider";
|
|
10448
|
-
const [createCollectionContext, createCollectionScope] =
|
|
10420
|
+
const [createCollectionContext, createCollectionScope] = index_H1ljeG8.$c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
10449
10421
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
10450
10422
|
collectionRef: {
|
|
10451
10423
|
current: null
|
|
@@ -10559,7 +10531,7 @@ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.re
|
|
|
10559
10531
|
React.useEffect(() => {
|
|
10560
10532
|
window[Symbol.for("radix-ui")] = true;
|
|
10561
10533
|
}, []);
|
|
10562
|
-
return /* @__PURE__ */ React.createElement(Comp,
|
|
10534
|
+
return /* @__PURE__ */ React.createElement(Comp, index_H1ljeG8._extends({}, primitiveProps, {
|
|
10563
10535
|
ref: forwardedRef
|
|
10564
10536
|
}));
|
|
10565
10537
|
});
|
|
@@ -10639,7 +10611,7 @@ const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
|
10639
10611
|
};
|
|
10640
10612
|
const $d7bdfb9eb0fdf311$var$GROUP_NAME = "RovingFocusGroup";
|
|
10641
10613
|
const [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
10642
|
-
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] =
|
|
10614
|
+
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = index_H1ljeG8.$c512c27ab02ef895$export$50c7b4e9d9f19c1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
|
|
10643
10615
|
$d7bdfb9eb0fdf311$var$createCollectionScope
|
|
10644
10616
|
]);
|
|
10645
10617
|
const [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
@@ -10648,7 +10620,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ React.forwardR
|
|
|
10648
10620
|
scope: props.__scopeRovingFocusGroup
|
|
10649
10621
|
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
10650
10622
|
scope: props.__scopeRovingFocusGroup
|
|
10651
|
-
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl,
|
|
10623
|
+
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, index_H1ljeG8._extends({}, props, {
|
|
10652
10624
|
ref: forwardedRef
|
|
10653
10625
|
}))));
|
|
10654
10626
|
});
|
|
@@ -10704,7 +10676,7 @@ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ React.forward
|
|
|
10704
10676
|
),
|
|
10705
10677
|
[]
|
|
10706
10678
|
)
|
|
10707
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
10679
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_H1ljeG8._extends({
|
|
10708
10680
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
10709
10681
|
"data-orientation": orientation
|
|
10710
10682
|
}, groupProps, {
|
|
@@ -10774,7 +10746,7 @@ const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ React.forwardRe
|
|
|
10774
10746
|
id: id2,
|
|
10775
10747
|
focusable,
|
|
10776
10748
|
active
|
|
10777
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span,
|
|
10749
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, index_H1ljeG8._extends({
|
|
10778
10750
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
10779
10751
|
"data-orientation": context.orientation
|
|
10780
10752
|
}, itemProps, {
|
|
@@ -10881,7 +10853,7 @@ const $89eedd556c436f6a$export$1ff3c3f08ae963c0 = /* @__PURE__ */ React.forwardR
|
|
|
10881
10853
|
"aria-orientation": ariaOrientation,
|
|
10882
10854
|
role: "separator"
|
|
10883
10855
|
};
|
|
10884
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
10856
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_H1ljeG8._extends({
|
|
10885
10857
|
"data-orientation": orientation
|
|
10886
10858
|
}, semanticProps, domProps, {
|
|
10887
10859
|
ref: forwardedRef
|
|
@@ -10914,7 +10886,7 @@ const $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ React.forwardR
|
|
|
10914
10886
|
onChange: onPressedChange,
|
|
10915
10887
|
defaultProp: defaultPressed
|
|
10916
10888
|
});
|
|
10917
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,
|
|
10889
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, index_H1ljeG8._extends({
|
|
10918
10890
|
type: "button",
|
|
10919
10891
|
"aria-pressed": pressed,
|
|
10920
10892
|
"data-state": pressed ? "on" : "off",
|
|
@@ -10928,7 +10900,7 @@ const $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ React.forwardR
|
|
|
10928
10900
|
}));
|
|
10929
10901
|
});
|
|
10930
10902
|
const $6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME = "ToggleGroup";
|
|
10931
|
-
const [$6c1fd9e6a8969628$var$createToggleGroupContext, $6c1fd9e6a8969628$export$d1c7c4bcd9f26dd4] =
|
|
10903
|
+
const [$6c1fd9e6a8969628$var$createToggleGroupContext, $6c1fd9e6a8969628$export$d1c7c4bcd9f26dd4] = index_H1ljeG8.$c512c27ab02ef895$export$50c7b4e9d9f19c1($6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME, [
|
|
10932
10904
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
10933
10905
|
]);
|
|
10934
10906
|
const $6c1fd9e6a8969628$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
|
|
@@ -10936,13 +10908,13 @@ const $6c1fd9e6a8969628$export$af3ec21f6cfb5e30 = /* @__PURE__ */ React__namespa
|
|
|
10936
10908
|
const { type, ...toggleGroupProps } = props;
|
|
10937
10909
|
if (type === "single") {
|
|
10938
10910
|
const singleProps = toggleGroupProps;
|
|
10939
|
-
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplSingle,
|
|
10911
|
+
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplSingle, index_H1ljeG8._extends({}, singleProps, {
|
|
10940
10912
|
ref: forwardedRef
|
|
10941
10913
|
}));
|
|
10942
10914
|
}
|
|
10943
10915
|
if (type === "multiple") {
|
|
10944
10916
|
const multipleProps = toggleGroupProps;
|
|
10945
|
-
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplMultiple,
|
|
10917
|
+
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplMultiple, index_H1ljeG8._extends({}, multipleProps, {
|
|
10946
10918
|
ref: forwardedRef
|
|
10947
10919
|
}));
|
|
10948
10920
|
}
|
|
@@ -10970,7 +10942,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */ React__names
|
|
|
10970
10942
|
setValue
|
|
10971
10943
|
]
|
|
10972
10944
|
)
|
|
10973
|
-
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl,
|
|
10945
|
+
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, index_H1ljeG8._extends({}, toggleGroupSingleProps, {
|
|
10974
10946
|
ref: forwardedRef
|
|
10975
10947
|
})));
|
|
10976
10948
|
});
|
|
@@ -11009,7 +10981,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ React__nam
|
|
|
11009
10981
|
value: value1,
|
|
11010
10982
|
onItemActivate: handleButtonActivate,
|
|
11011
10983
|
onItemDeactivate: handleButtonDeactivate
|
|
11012
|
-
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl,
|
|
10984
|
+
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, index_H1ljeG8._extends({}, toggleGroupMultipleProps, {
|
|
11013
10985
|
ref: forwardedRef
|
|
11014
10986
|
})));
|
|
11015
10987
|
});
|
|
@@ -11027,15 +10999,15 @@ const $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */ React__namespace.d
|
|
|
11027
10999
|
scope: __scopeToggleGroup,
|
|
11028
11000
|
rovingFocus,
|
|
11029
11001
|
disabled
|
|
11030
|
-
}, rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9,
|
|
11002
|
+
}, rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, index_H1ljeG8._extends({
|
|
11031
11003
|
asChild: true
|
|
11032
11004
|
}, rovingFocusGroupScope, {
|
|
11033
11005
|
orientation,
|
|
11034
11006
|
dir: direction2,
|
|
11035
11007
|
loop: loop2
|
|
11036
|
-
}), /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
11008
|
+
}), /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_H1ljeG8._extends({}, commonProps, {
|
|
11037
11009
|
ref: forwardedRef
|
|
11038
|
-
}))) : /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
11010
|
+
}))) : /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_H1ljeG8._extends({}, commonProps, {
|
|
11039
11011
|
ref: forwardedRef
|
|
11040
11012
|
})));
|
|
11041
11013
|
});
|
|
@@ -11052,15 +11024,15 @@ const $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */ React__namespa
|
|
|
11052
11024
|
disabled
|
|
11053
11025
|
};
|
|
11054
11026
|
const ref = React__namespace.default.useRef(null);
|
|
11055
|
-
return context.rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2,
|
|
11027
|
+
return context.rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, index_H1ljeG8._extends({
|
|
11056
11028
|
asChild: true
|
|
11057
11029
|
}, rovingFocusGroupScope, {
|
|
11058
11030
|
focusable: !disabled,
|
|
11059
11031
|
active: pressed,
|
|
11060
11032
|
ref
|
|
11061
|
-
}), /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl,
|
|
11033
|
+
}), /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, index_H1ljeG8._extends({}, commonProps, {
|
|
11062
11034
|
ref: forwardedRef
|
|
11063
|
-
}))) : /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl,
|
|
11035
|
+
}))) : /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, index_H1ljeG8._extends({}, commonProps, {
|
|
11064
11036
|
ref: forwardedRef
|
|
11065
11037
|
}));
|
|
11066
11038
|
});
|
|
@@ -11073,7 +11045,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ React__namespa
|
|
|
11073
11045
|
"aria-pressed": void 0
|
|
11074
11046
|
};
|
|
11075
11047
|
const typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
11076
|
-
return /* @__PURE__ */ React__namespace.default.createElement($b3bbe2732c13b576$export$bea8ebba691c5813,
|
|
11048
|
+
return /* @__PURE__ */ React__namespace.default.createElement($b3bbe2732c13b576$export$bea8ebba691c5813, index_H1ljeG8._extends({}, typeProps, itemProps, {
|
|
11077
11049
|
ref: forwardedRef,
|
|
11078
11050
|
onPressedChange: (pressed) => {
|
|
11079
11051
|
if (pressed)
|
|
@@ -11086,7 +11058,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ React__namespa
|
|
|
11086
11058
|
const $6c1fd9e6a8969628$export$be92b6f5f03c0fe9 = $6c1fd9e6a8969628$export$af3ec21f6cfb5e30;
|
|
11087
11059
|
const $6c1fd9e6a8969628$export$6d08773d2e66f8f2 = $6c1fd9e6a8969628$export$b453109e13abe10b;
|
|
11088
11060
|
const $3dc4ded751c8bdfb$var$TOOLBAR_NAME = "Toolbar";
|
|
11089
|
-
const [$3dc4ded751c8bdfb$var$createToolbarContext, $3dc4ded751c8bdfb$export$233e637670877d91] =
|
|
11061
|
+
const [$3dc4ded751c8bdfb$var$createToolbarContext, $3dc4ded751c8bdfb$export$233e637670877d91] = index_H1ljeG8.$c512c27ab02ef895$export$50c7b4e9d9f19c1($3dc4ded751c8bdfb$var$TOOLBAR_NAME, [
|
|
11090
11062
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4,
|
|
11091
11063
|
$6c1fd9e6a8969628$export$d1c7c4bcd9f26dd4
|
|
11092
11064
|
]);
|
|
@@ -11101,13 +11073,13 @@ const $3dc4ded751c8bdfb$export$4c260019440d418f = /* @__PURE__ */ React.forwardR
|
|
|
11101
11073
|
scope: __scopeToolbar,
|
|
11102
11074
|
orientation,
|
|
11103
11075
|
dir: direction2
|
|
11104
|
-
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9,
|
|
11076
|
+
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, index_H1ljeG8._extends({
|
|
11105
11077
|
asChild: true
|
|
11106
11078
|
}, rovingFocusGroupScope, {
|
|
11107
11079
|
orientation,
|
|
11108
11080
|
dir: direction2,
|
|
11109
11081
|
loop: loop2
|
|
11110
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
11082
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_H1ljeG8._extends({
|
|
11111
11083
|
role: "toolbar",
|
|
11112
11084
|
"aria-orientation": orientation,
|
|
11113
11085
|
dir: direction2
|
|
@@ -11119,7 +11091,7 @@ const $3dc4ded751c8bdfb$var$SEPARATOR_NAME = "ToolbarSeparator";
|
|
|
11119
11091
|
const $3dc4ded751c8bdfb$export$291e1a31e8ec7868 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11120
11092
|
const { __scopeToolbar, ...separatorProps } = props;
|
|
11121
11093
|
const context = $3dc4ded751c8bdfb$var$useToolbarContext($3dc4ded751c8bdfb$var$SEPARATOR_NAME, __scopeToolbar);
|
|
11122
|
-
return /* @__PURE__ */ React.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9,
|
|
11094
|
+
return /* @__PURE__ */ React.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9, index_H1ljeG8._extends({
|
|
11123
11095
|
orientation: context.orientation === "horizontal" ? "vertical" : "horizontal"
|
|
11124
11096
|
}, separatorProps, {
|
|
11125
11097
|
ref: forwardedRef
|
|
@@ -11128,11 +11100,11 @@ const $3dc4ded751c8bdfb$export$291e1a31e8ec7868 = /* @__PURE__ */ React.forwardR
|
|
|
11128
11100
|
const $3dc4ded751c8bdfb$export$e5c1a33878e86e9e = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11129
11101
|
const { __scopeToolbar, ...buttonProps } = props;
|
|
11130
11102
|
const rovingFocusGroupScope = $3dc4ded751c8bdfb$var$useRovingFocusGroupScope(__scopeToolbar);
|
|
11131
|
-
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2,
|
|
11103
|
+
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, index_H1ljeG8._extends({
|
|
11132
11104
|
asChild: true
|
|
11133
11105
|
}, rovingFocusGroupScope, {
|
|
11134
11106
|
focusable: !props.disabled
|
|
11135
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,
|
|
11107
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, index_H1ljeG8._extends({
|
|
11136
11108
|
type: "button"
|
|
11137
11109
|
}, buttonProps, {
|
|
11138
11110
|
ref: forwardedRef
|
|
@@ -11143,7 +11115,7 @@ const $3dc4ded751c8bdfb$export$aeae28cb17562c0b = /* @__PURE__ */ React.forwardR
|
|
|
11143
11115
|
const { __scopeToolbar, ...toggleGroupProps } = props;
|
|
11144
11116
|
const context = $3dc4ded751c8bdfb$var$useToolbarContext($3dc4ded751c8bdfb$var$TOGGLE_GROUP_NAME, __scopeToolbar);
|
|
11145
11117
|
const toggleGroupScope = $3dc4ded751c8bdfb$var$useToggleGroupScope(__scopeToolbar);
|
|
11146
|
-
return /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$be92b6f5f03c0fe9,
|
|
11118
|
+
return /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$be92b6f5f03c0fe9, index_H1ljeG8._extends({
|
|
11147
11119
|
"data-orientation": context.orientation,
|
|
11148
11120
|
dir: context.dir
|
|
11149
11121
|
}, toggleGroupScope, toggleGroupProps, {
|
|
@@ -11157,9 +11129,9 @@ const $3dc4ded751c8bdfb$export$546b879b639844a1 = /* @__PURE__ */ React.forwardR
|
|
|
11157
11129
|
const scope = {
|
|
11158
11130
|
__scopeToolbar: props.__scopeToolbar
|
|
11159
11131
|
};
|
|
11160
|
-
return /* @__PURE__ */ React.createElement($3dc4ded751c8bdfb$export$e5c1a33878e86e9e,
|
|
11132
|
+
return /* @__PURE__ */ React.createElement($3dc4ded751c8bdfb$export$e5c1a33878e86e9e, index_H1ljeG8._extends({
|
|
11161
11133
|
asChild: true
|
|
11162
|
-
}, scope), /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$6d08773d2e66f8f2,
|
|
11134
|
+
}, scope), /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$6d08773d2e66f8f2, index_H1ljeG8._extends({}, toggleGroupScope, toggleItemProps, {
|
|
11163
11135
|
ref: forwardedRef
|
|
11164
11136
|
})));
|
|
11165
11137
|
});
|
|
@@ -11318,6 +11290,33 @@ const COMPONENT_ICONS = {
|
|
|
11318
11290
|
wheelchair: Icons__namespace.Wheelchair,
|
|
11319
11291
|
write: Icons__namespace.Write
|
|
11320
11292
|
};
|
|
11293
|
+
const NotAllowedInput = ({ hint, label: label2, required, name: name2 }) => {
|
|
11294
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
11295
|
+
const placeholder = formatMessage({
|
|
11296
|
+
id: "components.NotAllowedInput.text",
|
|
11297
|
+
defaultMessage: "No permissions to see this field"
|
|
11298
|
+
});
|
|
11299
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11300
|
+
designSystem.TextInput,
|
|
11301
|
+
{
|
|
11302
|
+
disabled: true,
|
|
11303
|
+
label: label2,
|
|
11304
|
+
id: name2,
|
|
11305
|
+
hint,
|
|
11306
|
+
name: name2,
|
|
11307
|
+
placeholder,
|
|
11308
|
+
required,
|
|
11309
|
+
startAction: /* @__PURE__ */ jsxRuntime.jsx(StyledIcon, {}),
|
|
11310
|
+
type: "text",
|
|
11311
|
+
value: ""
|
|
11312
|
+
}
|
|
11313
|
+
);
|
|
11314
|
+
};
|
|
11315
|
+
const StyledIcon = styled__default.default(Icons.EyeStriked)`
|
|
11316
|
+
& > path {
|
|
11317
|
+
fill: ${({ theme }) => theme.colors.neutral600};
|
|
11318
|
+
}
|
|
11319
|
+
`;
|
|
11321
11320
|
function useDebounce(value, delay) {
|
|
11322
11321
|
const [debouncedValue, setDebouncedValue] = React__namespace.useState(value);
|
|
11323
11322
|
React__namespace.useEffect(() => {
|
|
@@ -25345,7 +25344,6 @@ var escapeStringRegexp$1 = (string3) => {
|
|
|
25345
25344
|
}
|
|
25346
25345
|
return string3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
25347
25346
|
};
|
|
25348
|
-
const require$$2 = /* @__PURE__ */ Helmet.getAugmentedNamespace(isPlainObject$2);
|
|
25349
25347
|
var isMergeableObject = function isMergeableObject2(value) {
|
|
25350
25348
|
return isNonNullObject(value) && !isSpecial(value);
|
|
25351
25349
|
};
|
|
@@ -25607,7 +25605,7 @@ picocolors_browser.exports = create();
|
|
|
25607
25605
|
picocolors_browser.exports.createColors = create;
|
|
25608
25606
|
var picocolors_browserExports = picocolors_browser.exports;
|
|
25609
25607
|
let pico = picocolors_browserExports;
|
|
25610
|
-
let terminalHighlight$1 =
|
|
25608
|
+
let terminalHighlight$1 = index_H1ljeG8.require$$0;
|
|
25611
25609
|
let CssSyntaxError$3 = class CssSyntaxError extends Error {
|
|
25612
25610
|
constructor(message, line, column, source2, file, plugin2) {
|
|
25613
25611
|
super(message);
|
|
@@ -26379,7 +26377,7 @@ let nanoid$1 = (size2 = 21) => {
|
|
|
26379
26377
|
return id2;
|
|
26380
26378
|
};
|
|
26381
26379
|
var nonSecure = { nanoid: nanoid$1, customAlphabet };
|
|
26382
|
-
let { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$2 } =
|
|
26380
|
+
let { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$2 } = index_H1ljeG8.require$$0;
|
|
26383
26381
|
let { existsSync, readFileSync } = require$$1__default.default;
|
|
26384
26382
|
let { dirname: dirname$1, join: join$1 } = require$$2__default.default;
|
|
26385
26383
|
function fromBase64(str) {
|
|
@@ -26498,11 +26496,11 @@ let PreviousMap$2 = class PreviousMap {
|
|
|
26498
26496
|
};
|
|
26499
26497
|
var previousMap = PreviousMap$2;
|
|
26500
26498
|
PreviousMap$2.default = PreviousMap$2;
|
|
26501
|
-
let { SourceMapConsumer: SourceMapConsumer$1, SourceMapGenerator: SourceMapGenerator$1 } =
|
|
26499
|
+
let { SourceMapConsumer: SourceMapConsumer$1, SourceMapGenerator: SourceMapGenerator$1 } = index_H1ljeG8.require$$0;
|
|
26502
26500
|
let { fileURLToPath, pathToFileURL: pathToFileURL$1 } = require$$1__default$1.default;
|
|
26503
26501
|
let { isAbsolute, resolve: resolve$1 } = require$$2__default.default;
|
|
26504
26502
|
let { nanoid } = nonSecure;
|
|
26505
|
-
let terminalHighlight =
|
|
26503
|
+
let terminalHighlight = index_H1ljeG8.require$$0;
|
|
26506
26504
|
let CssSyntaxError$1 = cssSyntaxError;
|
|
26507
26505
|
let PreviousMap$1 = previousMap;
|
|
26508
26506
|
let fromOffsetCache = Symbol("fromOffsetCache");
|
|
@@ -26704,7 +26702,7 @@ Input$4.default = Input$4;
|
|
|
26704
26702
|
if (terminalHighlight && terminalHighlight.registerInput) {
|
|
26705
26703
|
terminalHighlight.registerInput(Input$4);
|
|
26706
26704
|
}
|
|
26707
|
-
let { SourceMapConsumer, SourceMapGenerator } =
|
|
26705
|
+
let { SourceMapConsumer, SourceMapGenerator } = index_H1ljeG8.require$$0;
|
|
26708
26706
|
let { dirname, relative, resolve, sep } = require$$2__default.default;
|
|
26709
26707
|
let { pathToFileURL } = require$$1__default$1.default;
|
|
26710
26708
|
let Input$3 = input;
|
|
@@ -29188,7 +29186,7 @@ var postcss_1 = postcss;
|
|
|
29188
29186
|
postcss.default = postcss;
|
|
29189
29187
|
const htmlparser = lib$7;
|
|
29190
29188
|
const escapeStringRegexp = escapeStringRegexp$1;
|
|
29191
|
-
const { isPlainObject } =
|
|
29189
|
+
const { isPlainObject } = isPlainObject$2;
|
|
29192
29190
|
const deepmerge = cjs;
|
|
29193
29191
|
const parseSrcset = parseSrcsetExports;
|
|
29194
29192
|
const { parse: postcssParse } = postcss_1;
|
|
@@ -79010,7 +79008,7 @@ const useLazyComponents = (componentUids = []) => {
|
|
|
79010
79008
|
const [lazyComponentStore, setLazyComponentStore] = React.useState(Object.fromEntries(componentStore));
|
|
79011
79009
|
const newUids = componentUids.filter((uid) => !componentStore.get(uid));
|
|
79012
79010
|
const [loading, setLoading] = React.useState(() => !!newUids.length);
|
|
79013
|
-
const getCustomField =
|
|
79011
|
+
const getCustomField = index_H1ljeG8.useStrapiApp("useLazyComponents", (state) => state.customFields.get);
|
|
79014
79012
|
React.useEffect(() => {
|
|
79015
79013
|
const setStore = (store) => {
|
|
79016
79014
|
setLazyComponentStore(store);
|
|
@@ -79312,7 +79310,7 @@ const Image = ({ attributes, children, element }) => {
|
|
|
79312
79310
|
const ImageDialog = () => {
|
|
79313
79311
|
const [isOpen, setIsOpen] = React__namespace.useState(true);
|
|
79314
79312
|
const { editor } = useBlocksEditorContext("ImageDialog");
|
|
79315
|
-
const components =
|
|
79313
|
+
const components = index_H1ljeG8.useStrapiApp("ImageDialog", (state) => state.components);
|
|
79316
79314
|
if (!components || !isOpen)
|
|
79317
79315
|
return null;
|
|
79318
79316
|
const MediaLibraryDialog = components["media-library"];
|
|
@@ -79350,7 +79348,7 @@ const ImageDialog = () => {
|
|
|
79350
79348
|
const nodeImage = {
|
|
79351
79349
|
...expectedImage,
|
|
79352
79350
|
alternativeText: expectedImage.alternativeText || expectedImage.name,
|
|
79353
|
-
url:
|
|
79351
|
+
url: index_H1ljeG8.prefixFileUrlWithBackendUrl(image3.url)
|
|
79354
79352
|
};
|
|
79355
79353
|
return nodeImage;
|
|
79356
79354
|
});
|
|
@@ -80329,8 +80327,8 @@ const DropPlaceholder = styled__default.default(designSystem.Box)`
|
|
|
80329
80327
|
|
|
80330
80328
|
// Show drop placeholder 8px above or below the drop target
|
|
80331
80329
|
${({ dragDirection, theme, placeholderMargin }) => styled.css`
|
|
80332
|
-
top: ${dragDirection ===
|
|
80333
|
-
bottom: ${dragDirection ===
|
|
80330
|
+
top: ${dragDirection === index_H1ljeG8.DIRECTIONS.UPWARD && `-${theme.spaces[placeholderMargin]}`};
|
|
80331
|
+
bottom: ${dragDirection === index_H1ljeG8.DIRECTIONS.DOWNWARD && `-${theme.spaces[placeholderMargin]}`};
|
|
80334
80332
|
`}
|
|
80335
80333
|
`;
|
|
80336
80334
|
const DragItem = styled__default.default(designSystem.Flex)`
|
|
@@ -80401,7 +80399,7 @@ const DragAndDropElement = ({
|
|
|
80401
80399
|
setLiveText(
|
|
80402
80400
|
formatMessage(
|
|
80403
80401
|
{
|
|
80404
|
-
id:
|
|
80402
|
+
id: index_H1ljeG8.getTranslation("components.Blocks.dnd.reorder"),
|
|
80405
80403
|
defaultMessage: "{item}, moved. New position in the editor: {position}."
|
|
80406
80404
|
},
|
|
80407
80405
|
{
|
|
@@ -80413,8 +80411,8 @@ const DragAndDropElement = ({
|
|
|
80413
80411
|
},
|
|
80414
80412
|
[editor, formatMessage, name2, setLiveText]
|
|
80415
80413
|
);
|
|
80416
|
-
const [{ handlerId, isDragging, isOverDropTarget, direction: direction2 }, blockRef, dropRef, dragRef] =
|
|
80417
|
-
type: `${
|
|
80414
|
+
const [{ handlerId, isDragging, isOverDropTarget, direction: direction2 }, blockRef, dropRef, dragRef] = index_H1ljeG8.useDragAndDrop(!disabled, {
|
|
80415
|
+
type: `${index_H1ljeG8.ItemTypes.BLOCKS}_${name2}`,
|
|
80418
80416
|
index,
|
|
80419
80417
|
item: {
|
|
80420
80418
|
index,
|
|
@@ -80481,7 +80479,7 @@ const DragAndDropElement = ({
|
|
|
80481
80479
|
role: "button",
|
|
80482
80480
|
tabIndex: 0,
|
|
80483
80481
|
"aria-label": formatMessage({
|
|
80484
|
-
id:
|
|
80482
|
+
id: index_H1ljeG8.getTranslation("components.DragHandle-label"),
|
|
80485
80483
|
defaultMessage: "Drag"
|
|
80486
80484
|
}),
|
|
80487
80485
|
onClick: (e2) => e2.stopPropagation(),
|
|
@@ -80507,7 +80505,7 @@ const CloneDragItem = ({ children, dragHandleTopMargin }) => {
|
|
|
80507
80505
|
forwardedAs: "div",
|
|
80508
80506
|
role: "button",
|
|
80509
80507
|
"aria-label": formatMessage({
|
|
80510
|
-
id:
|
|
80508
|
+
id: index_H1ljeG8.getTranslation("components.DragHandle-label"),
|
|
80511
80509
|
defaultMessage: "Drag"
|
|
80512
80510
|
}),
|
|
80513
80511
|
dragHandleTopMargin,
|
|
@@ -80582,7 +80580,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
|
80582
80580
|
setLiveText(
|
|
80583
80581
|
formatMessage(
|
|
80584
80582
|
{
|
|
80585
|
-
id:
|
|
80583
|
+
id: index_H1ljeG8.getTranslation("components.Blocks.dnd.reorder"),
|
|
80586
80584
|
defaultMessage: "{item}, moved. New position in the editor: {position}."
|
|
80587
80585
|
},
|
|
80588
80586
|
{
|
|
@@ -80813,7 +80811,7 @@ const EditorLayout$1 = ({
|
|
|
80813
80811
|
CollapseIconButton,
|
|
80814
80812
|
{
|
|
80815
80813
|
"aria-label": formatMessage({
|
|
80816
|
-
id:
|
|
80814
|
+
id: index_H1ljeG8.getTranslation("components.Blocks.collapse"),
|
|
80817
80815
|
defaultMessage: "Collapse"
|
|
80818
80816
|
}),
|
|
80819
80817
|
onClick: onCollapse,
|
|
@@ -80935,7 +80933,7 @@ const withImages = (editor) => {
|
|
|
80935
80933
|
return editor;
|
|
80936
80934
|
};
|
|
80937
80935
|
const withLinks = (editor) => {
|
|
80938
|
-
const { isInline, apply: apply2, insertText:
|
|
80936
|
+
const { isInline, apply: apply2, insertText: insertText3, insertData } = editor;
|
|
80939
80937
|
editor.isInline = (element) => {
|
|
80940
80938
|
return element.type === "link" ? true : isInline(element);
|
|
80941
80939
|
};
|
|
@@ -80971,7 +80969,7 @@ const withLinks = (editor) => {
|
|
|
80971
80969
|
return;
|
|
80972
80970
|
}
|
|
80973
80971
|
}
|
|
80974
|
-
|
|
80972
|
+
insertText3(text3);
|
|
80975
80973
|
};
|
|
80976
80974
|
editor.insertData = (data) => {
|
|
80977
80975
|
const pastedText = data.getData("text/plain");
|
|
@@ -81020,7 +81018,7 @@ const selectorBlockKeys = [
|
|
|
81020
81018
|
const isSelectorBlockKey = (key2) => {
|
|
81021
81019
|
return typeof key2 === "string" && selectorBlockKeys.includes(key2);
|
|
81022
81020
|
};
|
|
81023
|
-
const [BlocksEditorProvider, usePartialBlocksEditorContext] =
|
|
81021
|
+
const [BlocksEditorProvider, usePartialBlocksEditorContext] = index_H1ljeG8.$c512c27ab02ef895$export$fd42f52fd3ae1109("BlocksEditor");
|
|
81024
81022
|
function useBlocksEditorContext(consumerName) {
|
|
81025
81023
|
const context = usePartialBlocksEditorContext(consumerName);
|
|
81026
81024
|
const editor = useSlate();
|
|
@@ -81091,7 +81089,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
|
81091
81089
|
};
|
|
81092
81090
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
81093
81091
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { id: ariaDescriptionId, children: formatMessage({
|
|
81094
|
-
id:
|
|
81092
|
+
id: index_H1ljeG8.getTranslation("components.Blocks.dnd.instruction"),
|
|
81095
81093
|
defaultMessage: `To reorder blocks, press Command or Control along with Shift and the Up or Down arrow keys`
|
|
81096
81094
|
}) }),
|
|
81097
81095
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
|
|
@@ -81125,7 +81123,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
|
81125
81123
|
ExpandIconButton,
|
|
81126
81124
|
{
|
|
81127
81125
|
"aria-label": formatMessage({
|
|
81128
|
-
id:
|
|
81126
|
+
id: index_H1ljeG8.getTranslation("components.Blocks.expand"),
|
|
81129
81127
|
defaultMessage: "Expand"
|
|
81130
81128
|
}),
|
|
81131
81129
|
onClick: handleToggleExpand,
|
|
@@ -81146,7 +81144,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
|
81146
81144
|
const BlocksInput = React__namespace.forwardRef(
|
|
81147
81145
|
({ label: label2, name: name2, required = false, hint, ...editorProps }, forwardedRef) => {
|
|
81148
81146
|
const id2 = React__namespace.useId();
|
|
81149
|
-
const field =
|
|
81147
|
+
const field = index_H1ljeG8.useField(name2);
|
|
81150
81148
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field, { id: id2, name: name2, hint, error: field.error, required, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
81151
81149
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: label2 }),
|
|
81152
81150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -81215,7 +81213,7 @@ const prepareTempKeys = traverseData(
|
|
|
81215
81213
|
(attribute2) => attribute2.type === "component" && attribute2.repeatable || attribute2.type === "dynamiczone",
|
|
81216
81214
|
(data) => {
|
|
81217
81215
|
if (Array.isArray(data) && data.length > 0) {
|
|
81218
|
-
const keys =
|
|
81216
|
+
const keys = index_H1ljeG8.generateNKeysBetween(void 0, void 0, data.length);
|
|
81219
81217
|
return data.map((datum, index) => ({
|
|
81220
81218
|
...datum,
|
|
81221
81219
|
__temp_key__: keys[index]
|
|
@@ -81228,7 +81226,7 @@ const removeFieldsThatDontExistOnSchema = (schema) => (data) => {
|
|
|
81228
81226
|
const schemaKeys = Object.keys(schema.attributes);
|
|
81229
81227
|
const dataKeys = Object.keys(data);
|
|
81230
81228
|
const keysToRemove = dataKeys.filter((key2) => !schemaKeys.includes(key2));
|
|
81231
|
-
const revisedData = [...keysToRemove, ...
|
|
81229
|
+
const revisedData = [...keysToRemove, ...index_H1ljeG8.DOCUMENT_META_FIELDS].reduce((acc, key2) => {
|
|
81232
81230
|
delete acc[key2];
|
|
81233
81231
|
return acc;
|
|
81234
81232
|
}, structuredClone(data));
|
|
@@ -81275,7 +81273,7 @@ const createDefaultForm = (contentType, components = {}) => {
|
|
|
81275
81273
|
};
|
|
81276
81274
|
const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
81277
81275
|
const { formatMessage } = reactIntl.useIntl();
|
|
81278
|
-
const field =
|
|
81276
|
+
const field = index_H1ljeG8.useField(name2);
|
|
81279
81277
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
81280
81278
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
81281
81279
|
designSystem.Box,
|
|
@@ -81292,7 +81290,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
|
81292
81290
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
|
|
81293
81291
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
|
|
81294
81292
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
|
|
81295
|
-
id:
|
|
81293
|
+
id: index_H1ljeG8.getTranslation("components.empty-repeatable"),
|
|
81296
81294
|
defaultMessage: "No entry yet. Click on the button below to add one."
|
|
81297
81295
|
}) }) })
|
|
81298
81296
|
] })
|
|
@@ -81314,12 +81312,12 @@ const CircleIcon = styled__default.default(Icons.PlusCircle)`
|
|
|
81314
81312
|
const NonRepeatableComponent = ({ attribute: attribute2, name: name2 }) => {
|
|
81315
81313
|
const {
|
|
81316
81314
|
edit: { components }
|
|
81317
|
-
} =
|
|
81318
|
-
const { value } =
|
|
81319
|
-
const level =
|
|
81315
|
+
} = index_H1ljeG8.useDocLayout();
|
|
81316
|
+
const { value } = index_H1ljeG8.useField(name2);
|
|
81317
|
+
const level = index_H1ljeG8.useComponent("NonRepeatableComponent", (state) => state.level);
|
|
81320
81318
|
const { layout } = components[attribute2.component];
|
|
81321
81319
|
const isNested = level > 0;
|
|
81322
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
81320
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.ComponentProvider, { id: value?.id, uid: attribute2.component, level: level + 1, type: "component", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
81323
81321
|
designSystem.Box,
|
|
81324
81322
|
{
|
|
81325
81323
|
background: "neutral100",
|
|
@@ -81344,15 +81342,15 @@ const RepeatableComponent = ({
|
|
|
81344
81342
|
name: name2,
|
|
81345
81343
|
mainField
|
|
81346
81344
|
}) => {
|
|
81347
|
-
const { toggleNotification } =
|
|
81345
|
+
const { toggleNotification } = index_H1ljeG8.useNotification();
|
|
81348
81346
|
const { formatMessage } = reactIntl.useIntl();
|
|
81349
81347
|
const { search: searchString } = reactRouterDom.useLocation();
|
|
81350
81348
|
const search = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
81351
|
-
const { components } =
|
|
81352
|
-
const { value = [], error: error2 } =
|
|
81353
|
-
const addFieldRow =
|
|
81354
|
-
const moveFieldRow =
|
|
81355
|
-
const removeFieldRow =
|
|
81349
|
+
const { components } = index_H1ljeG8.useDoc();
|
|
81350
|
+
const { value = [], error: error2 } = index_H1ljeG8.useField(name2);
|
|
81351
|
+
const addFieldRow = index_H1ljeG8.useForm("RepeatableComponent", (state) => state.addFieldRow);
|
|
81352
|
+
const moveFieldRow = index_H1ljeG8.useForm("RepeatableComponent", (state) => state.moveFieldRow);
|
|
81353
|
+
const removeFieldRow = index_H1ljeG8.useForm("RepeatableComponent", (state) => state.removeFieldRow);
|
|
81356
81354
|
const { max = Infinity } = attribute2;
|
|
81357
81355
|
const [collapseToOpen, setCollapseToOpen] = React__namespace.useState(null);
|
|
81358
81356
|
const [liveText, setLiveText] = React__namespace.useState("");
|
|
@@ -81363,9 +81361,9 @@ const RepeatableComponent = ({
|
|
|
81363
81361
|
return void 0;
|
|
81364
81362
|
}
|
|
81365
81363
|
const [, path3] = fieldParam.split(`${name2}.`);
|
|
81366
|
-
if (
|
|
81364
|
+
if (index_H1ljeG8.getIn(value, path3, void 0) !== void 0) {
|
|
81367
81365
|
const [subpath] = path3.split(".");
|
|
81368
|
-
return
|
|
81366
|
+
return index_H1ljeG8.getIn(value, subpath, void 0)?.__temp_key__;
|
|
81369
81367
|
}
|
|
81370
81368
|
}
|
|
81371
81369
|
return void 0;
|
|
@@ -81388,7 +81386,7 @@ const RepeatableComponent = ({
|
|
|
81388
81386
|
toggleNotification({
|
|
81389
81387
|
type: "info",
|
|
81390
81388
|
message: formatMessage({
|
|
81391
|
-
id:
|
|
81389
|
+
id: index_H1ljeG8.getTranslation("components.notification.info.maximum-requirement")
|
|
81392
81390
|
})
|
|
81393
81391
|
});
|
|
81394
81392
|
}
|
|
@@ -81397,7 +81395,7 @@ const RepeatableComponent = ({
|
|
|
81397
81395
|
setLiveText(
|
|
81398
81396
|
formatMessage(
|
|
81399
81397
|
{
|
|
81400
|
-
id:
|
|
81398
|
+
id: index_H1ljeG8.getTranslation("dnd.reorder"),
|
|
81401
81399
|
defaultMessage: "{item}, moved. New position in list: {position}."
|
|
81402
81400
|
},
|
|
81403
81401
|
{
|
|
@@ -81420,7 +81418,7 @@ const RepeatableComponent = ({
|
|
|
81420
81418
|
setLiveText(
|
|
81421
81419
|
formatMessage(
|
|
81422
81420
|
{
|
|
81423
|
-
id:
|
|
81421
|
+
id: index_H1ljeG8.getTranslation("dnd.cancel-item"),
|
|
81424
81422
|
defaultMessage: "{item}, dropped. Re-order cancelled."
|
|
81425
81423
|
},
|
|
81426
81424
|
{
|
|
@@ -81433,7 +81431,7 @@ const RepeatableComponent = ({
|
|
|
81433
81431
|
setLiveText(
|
|
81434
81432
|
formatMessage(
|
|
81435
81433
|
{
|
|
81436
|
-
id:
|
|
81434
|
+
id: index_H1ljeG8.getTranslation("dnd.grab-item"),
|
|
81437
81435
|
defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`
|
|
81438
81436
|
},
|
|
81439
81437
|
{
|
|
@@ -81447,7 +81445,7 @@ const RepeatableComponent = ({
|
|
|
81447
81445
|
setLiveText(
|
|
81448
81446
|
formatMessage(
|
|
81449
81447
|
{
|
|
81450
|
-
id:
|
|
81448
|
+
id: index_H1ljeG8.getTranslation("dnd.drop-item"),
|
|
81451
81449
|
defaultMessage: `{item}, dropped. Final position in list: {position}.`
|
|
81452
81450
|
},
|
|
81453
81451
|
{
|
|
@@ -81458,20 +81456,20 @@ const RepeatableComponent = ({
|
|
|
81458
81456
|
);
|
|
81459
81457
|
};
|
|
81460
81458
|
const ariaDescriptionId = React__namespace.useId();
|
|
81461
|
-
const level =
|
|
81459
|
+
const level = index_H1ljeG8.useComponent("RepeatableComponent", (state) => state.level);
|
|
81462
81460
|
if (value.length === 0) {
|
|
81463
81461
|
return /* @__PURE__ */ jsxRuntime.jsx(Initializer, { disabled, name: name2, onClick: handleClick });
|
|
81464
81462
|
}
|
|
81465
81463
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { hasRadius: true, children: [
|
|
81466
81464
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { id: ariaDescriptionId, children: formatMessage({
|
|
81467
|
-
id:
|
|
81465
|
+
id: index_H1ljeG8.getTranslation("dnd.instructions"),
|
|
81468
81466
|
defaultMessage: `Press spacebar to grab and re-order`
|
|
81469
81467
|
}) }),
|
|
81470
81468
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
|
|
81471
81469
|
/* @__PURE__ */ jsxRuntime.jsxs(AccordionGroup, { error: error2, children: [
|
|
81472
81470
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { "aria-describedby": ariaDescriptionId, children: value.map(({ __temp_key__: key2, id: id2 }, index) => {
|
|
81473
81471
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
81474
|
-
|
|
81472
|
+
index_H1ljeG8.ComponentProvider,
|
|
81475
81473
|
{
|
|
81476
81474
|
id: id2,
|
|
81477
81475
|
uid: attribute2.component,
|
|
@@ -81503,7 +81501,7 @@ const RepeatableComponent = ({
|
|
|
81503
81501
|
);
|
|
81504
81502
|
}) }),
|
|
81505
81503
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", height: "48px", background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(TextButtonCustom, { disabled, onClick: handleClick, startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Plus, {}), children: formatMessage({
|
|
81506
|
-
id:
|
|
81504
|
+
id: index_H1ljeG8.getTranslation("containers.EditView.add.new-entry"),
|
|
81507
81505
|
defaultMessage: "Add an entry"
|
|
81508
81506
|
}) }) }) })
|
|
81509
81507
|
] })
|
|
@@ -81618,15 +81616,15 @@ const Component = ({
|
|
|
81618
81616
|
const { formatMessage } = reactIntl.useIntl();
|
|
81619
81617
|
const {
|
|
81620
81618
|
edit: { components }
|
|
81621
|
-
} =
|
|
81619
|
+
} = index_H1ljeG8.useDocLayout();
|
|
81622
81620
|
const { layout } = components[attribute2.component];
|
|
81623
|
-
const displayValue =
|
|
81624
|
-
return
|
|
81621
|
+
const displayValue = index_H1ljeG8.useForm("RepeatableComponent", (state) => {
|
|
81622
|
+
return index_H1ljeG8.getIn(state.values, [...name2.split("."), mainField.name]);
|
|
81625
81623
|
});
|
|
81626
81624
|
const accordionRef = React__namespace.useRef(null);
|
|
81627
81625
|
const componentKey = name2.split(".").slice(0, -1).join(".");
|
|
81628
|
-
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] =
|
|
81629
|
-
type: `${
|
|
81626
|
+
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] = index_H1ljeG8.useDragAndDrop(!disabled, {
|
|
81627
|
+
type: `${index_H1ljeG8.ItemTypes.COMPONENT}_${componentKey}`,
|
|
81630
81628
|
index,
|
|
81631
81629
|
item: {
|
|
81632
81630
|
index,
|
|
@@ -81638,7 +81636,7 @@ const Component = ({
|
|
|
81638
81636
|
...dragProps
|
|
81639
81637
|
});
|
|
81640
81638
|
React__namespace.useEffect(() => {
|
|
81641
|
-
dragPreviewRef(
|
|
81639
|
+
dragPreviewRef(index_H1ljeG8.getEmptyImage(), { captureDraggingState: false });
|
|
81642
81640
|
}, [dragPreviewRef, index]);
|
|
81643
81641
|
const composedAccordionRefs = designSystem.useComposedRefs(accordionRef, dragRef);
|
|
81644
81642
|
const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
|
|
@@ -81654,7 +81652,7 @@ const Component = ({
|
|
|
81654
81652
|
borderWidth: 0,
|
|
81655
81653
|
onClick: onDeleteComponent,
|
|
81656
81654
|
label: formatMessage({
|
|
81657
|
-
id:
|
|
81655
|
+
id: index_H1ljeG8.getTranslation("containers.Edit.delete"),
|
|
81658
81656
|
defaultMessage: "Delete"
|
|
81659
81657
|
}),
|
|
81660
81658
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
|
|
@@ -81672,7 +81670,7 @@ const Component = ({
|
|
|
81672
81670
|
onClick: (e2) => e2.stopPropagation(),
|
|
81673
81671
|
"data-handler-id": handlerId,
|
|
81674
81672
|
label: formatMessage({
|
|
81675
|
-
id:
|
|
81673
|
+
id: index_H1ljeG8.getTranslation("components.DragHandle-label"),
|
|
81676
81674
|
defaultMessage: "Drag"
|
|
81677
81675
|
}),
|
|
81678
81676
|
onKeyDown: handleKeyDown,
|
|
@@ -81719,9 +81717,9 @@ const ComponentInput = ({
|
|
|
81719
81717
|
...props
|
|
81720
81718
|
}) => {
|
|
81721
81719
|
const { formatMessage } = reactIntl.useIntl();
|
|
81722
|
-
const field =
|
|
81720
|
+
const field = index_H1ljeG8.useField(name2);
|
|
81723
81721
|
const showResetComponent = !attribute2.repeatable && field.value && !disabled;
|
|
81724
|
-
const { components } =
|
|
81722
|
+
const { components } = index_H1ljeG8.useDoc();
|
|
81725
81723
|
const handleInitialisationClick = () => {
|
|
81726
81724
|
const schema = components[attribute2.component];
|
|
81727
81725
|
const form = createDefaultForm(schema, components);
|
|
@@ -81753,7 +81751,7 @@ const ComponentInput = ({
|
|
|
81753
81751
|
designSystem.IconButton,
|
|
81754
81752
|
{
|
|
81755
81753
|
label: formatMessage({
|
|
81756
|
-
id:
|
|
81754
|
+
id: index_H1ljeG8.getTranslation("components.reset-entry"),
|
|
81757
81755
|
defaultMessage: "Reset Entry"
|
|
81758
81756
|
}),
|
|
81759
81757
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {}),
|
|
@@ -81958,7 +81956,7 @@ const ComponentPicker = ({
|
|
|
81958
81956
|
hasRadius: true,
|
|
81959
81957
|
children: [
|
|
81960
81958
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral600", children: formatMessage({
|
|
81961
|
-
id:
|
|
81959
|
+
id: index_H1ljeG8.getTranslation("components.DynamicZone.ComponentPicker-label"),
|
|
81962
81960
|
defaultMessage: "Pick one component"
|
|
81963
81961
|
}) }) }),
|
|
81964
81962
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.KeyboardNavigable, { attributeName: "data-strapi-accordion-toggle", children: Object.entries(dynamicComponentsByCategory).map(([category, components], index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -81992,13 +81990,13 @@ const DynamicComponent = ({
|
|
|
81992
81990
|
}) => {
|
|
81993
81991
|
const [isOpen, setIsOpen] = React__namespace.useState(true);
|
|
81994
81992
|
const { formatMessage } = reactIntl.useIntl();
|
|
81995
|
-
const formValues =
|
|
81993
|
+
const formValues = index_H1ljeG8.useForm("DynamicComponent", (state) => state.values);
|
|
81996
81994
|
const {
|
|
81997
81995
|
edit: { components }
|
|
81998
|
-
} =
|
|
81996
|
+
} = index_H1ljeG8.useDocLayout();
|
|
81999
81997
|
const title = React__namespace.useMemo(() => {
|
|
82000
81998
|
const { mainField } = components[componentUid]?.settings ?? { mainField: "id" };
|
|
82001
|
-
const mainFieldValue =
|
|
81999
|
+
const mainFieldValue = index_H1ljeG8.getIn(formValues, `${name2}.${index}.${mainField}`);
|
|
82002
82000
|
const displayedValue = mainField === "id" ? "" : String(mainFieldValue).trim();
|
|
82003
82001
|
const mainValue = displayedValue.length > 0 ? `- ${displayedValue}` : displayedValue;
|
|
82004
82002
|
return mainValue;
|
|
@@ -82013,8 +82011,8 @@ const DynamicComponent = ({
|
|
|
82013
82011
|
const handleToggle = () => {
|
|
82014
82012
|
setIsOpen((s) => !s);
|
|
82015
82013
|
};
|
|
82016
|
-
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] =
|
|
82017
|
-
type: `${
|
|
82014
|
+
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] = index_H1ljeG8.useDragAndDrop(!disabled, {
|
|
82015
|
+
type: `${index_H1ljeG8.ItemTypes.DYNAMIC_ZONE}_${name2}`,
|
|
82018
82016
|
index,
|
|
82019
82017
|
item: {
|
|
82020
82018
|
index,
|
|
@@ -82027,7 +82025,7 @@ const DynamicComponent = ({
|
|
|
82027
82025
|
onCancel
|
|
82028
82026
|
});
|
|
82029
82027
|
React__namespace.useEffect(() => {
|
|
82030
|
-
dragPreviewRef(
|
|
82028
|
+
dragPreviewRef(index_H1ljeG8.getEmptyImage(), { captureDraggingState: false });
|
|
82031
82029
|
}, [dragPreviewRef, index]);
|
|
82032
82030
|
const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
|
|
82033
82031
|
const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(ActionsFlex, { gap: 0, children: [
|
|
@@ -82037,7 +82035,7 @@ const DynamicComponent = ({
|
|
|
82037
82035
|
borderWidth: 0,
|
|
82038
82036
|
label: formatMessage(
|
|
82039
82037
|
{
|
|
82040
|
-
id:
|
|
82038
|
+
id: index_H1ljeG8.getTranslation("components.DynamicZone.delete-label"),
|
|
82041
82039
|
defaultMessage: "Delete {name}"
|
|
82042
82040
|
},
|
|
82043
82041
|
{ name: title }
|
|
@@ -82057,7 +82055,7 @@ const DynamicComponent = ({
|
|
|
82057
82055
|
"data-handler-id": handlerId,
|
|
82058
82056
|
ref: dragRef,
|
|
82059
82057
|
label: formatMessage({
|
|
82060
|
-
id:
|
|
82058
|
+
id: index_H1ljeG8.getTranslation("components.DragHandle-label"),
|
|
82061
82059
|
defaultMessage: "Drag"
|
|
82062
82060
|
}),
|
|
82063
82061
|
onKeyDown: handleKeyDown,
|
|
@@ -82068,14 +82066,14 @@ const DynamicComponent = ({
|
|
|
82068
82066
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.Trigger, { size: "S", endIcon: null, paddingLeft: 2, paddingRight: 2, children: [
|
|
82069
82067
|
/* @__PURE__ */ jsxRuntime.jsx(Icons.More, { "aria-hidden": true, focusable: false }),
|
|
82070
82068
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { as: "span", children: formatMessage({
|
|
82071
|
-
id:
|
|
82069
|
+
id: index_H1ljeG8.getTranslation("components.DynamicZone.more-actions"),
|
|
82072
82070
|
defaultMessage: "More actions"
|
|
82073
82071
|
}) })
|
|
82074
82072
|
] }),
|
|
82075
82073
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.Content, { children: [
|
|
82076
82074
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.SubRoot, { children: [
|
|
82077
82075
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubTrigger, { children: formatMessage({
|
|
82078
|
-
id:
|
|
82076
|
+
id: index_H1ljeG8.getTranslation("components.DynamicZone.add-item-above"),
|
|
82079
82077
|
defaultMessage: "Add component above"
|
|
82080
82078
|
}) }),
|
|
82081
82079
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubContent, { children: Object.entries(dynamicComponentsByCategory).map(([category, components2]) => /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
|
@@ -82085,7 +82083,7 @@ const DynamicComponent = ({
|
|
|
82085
82083
|
] }),
|
|
82086
82084
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.SubRoot, { children: [
|
|
82087
82085
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubTrigger, { children: formatMessage({
|
|
82088
|
-
id:
|
|
82086
|
+
id: index_H1ljeG8.getTranslation("components.DynamicZone.add-item-below"),
|
|
82089
82087
|
defaultMessage: "Add component below"
|
|
82090
82088
|
}) }),
|
|
82091
82089
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubContent, { children: Object.entries(dynamicComponentsByCategory).map(([category, components2]) => /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
|
@@ -82194,7 +82192,7 @@ const DynamicZoneLabel = ({
|
|
|
82194
82192
|
}
|
|
82195
82193
|
) });
|
|
82196
82194
|
};
|
|
82197
|
-
const [DynamicZoneProvider, useDynamicZone] =
|
|
82195
|
+
const [DynamicZoneProvider, useDynamicZone] = index_H1ljeG8.createContext(
|
|
82198
82196
|
"DynamicZone",
|
|
82199
82197
|
{
|
|
82200
82198
|
isInDynamicZone: false
|
|
@@ -82211,8 +82209,8 @@ const DynamicZone = ({
|
|
|
82211
82209
|
const { max = Infinity, min = -Infinity } = attribute2 ?? {};
|
|
82212
82210
|
const [addComponentIsOpen, setAddComponentIsOpen] = React__namespace.useState(false);
|
|
82213
82211
|
const [liveText, setLiveText] = React__namespace.useState("");
|
|
82214
|
-
const { components } =
|
|
82215
|
-
const { addFieldRow, removeFieldRow, moveFieldRow } =
|
|
82212
|
+
const { components } = index_H1ljeG8.useDoc();
|
|
82213
|
+
const { addFieldRow, removeFieldRow, moveFieldRow } = index_H1ljeG8.useForm(
|
|
82216
82214
|
"DynamicZone",
|
|
82217
82215
|
({ addFieldRow: addFieldRow2, removeFieldRow: removeFieldRow2, moveFieldRow: moveFieldRow2 }) => ({
|
|
82218
82216
|
addFieldRow: addFieldRow2,
|
|
@@ -82220,7 +82218,7 @@ const DynamicZone = ({
|
|
|
82220
82218
|
moveFieldRow: moveFieldRow2
|
|
82221
82219
|
})
|
|
82222
82220
|
);
|
|
82223
|
-
const { value = [], error: error2 } =
|
|
82221
|
+
const { value = [], error: error2 } = index_H1ljeG8.useField(
|
|
82224
82222
|
name2
|
|
82225
82223
|
);
|
|
82226
82224
|
const dynamicComponentsByCategory = React__namespace.useMemo(() => {
|
|
@@ -82235,7 +82233,7 @@ const DynamicZone = ({
|
|
|
82235
82233
|
}, {});
|
|
82236
82234
|
}, [attribute2.components, components]);
|
|
82237
82235
|
const { formatMessage } = reactIntl.useIntl();
|
|
82238
|
-
const { toggleNotification } =
|
|
82236
|
+
const { toggleNotification } = index_H1ljeG8.useNotification();
|
|
82239
82237
|
const dynamicDisplayedComponentsLength = value.length;
|
|
82240
82238
|
const handleAddComponent = (uid, position) => {
|
|
82241
82239
|
setAddComponentIsOpen(false);
|
|
@@ -82255,7 +82253,7 @@ const DynamicZone = ({
|
|
|
82255
82253
|
toggleNotification({
|
|
82256
82254
|
type: "info",
|
|
82257
82255
|
message: formatMessage({
|
|
82258
|
-
id:
|
|
82256
|
+
id: index_H1ljeG8.getTranslation("components.notification.info.maximum-requirement")
|
|
82259
82257
|
})
|
|
82260
82258
|
});
|
|
82261
82259
|
}
|
|
@@ -82264,7 +82262,7 @@ const DynamicZone = ({
|
|
|
82264
82262
|
setLiveText(
|
|
82265
82263
|
formatMessage(
|
|
82266
82264
|
{
|
|
82267
|
-
id:
|
|
82265
|
+
id: index_H1ljeG8.getTranslation("dnd.reorder"),
|
|
82268
82266
|
defaultMessage: "{item}, moved. New position in list: {position}."
|
|
82269
82267
|
},
|
|
82270
82268
|
{
|
|
@@ -82280,7 +82278,7 @@ const DynamicZone = ({
|
|
|
82280
82278
|
setLiveText(
|
|
82281
82279
|
formatMessage(
|
|
82282
82280
|
{
|
|
82283
|
-
id:
|
|
82281
|
+
id: index_H1ljeG8.getTranslation("dnd.cancel-item"),
|
|
82284
82282
|
defaultMessage: "{item}, dropped. Re-order cancelled."
|
|
82285
82283
|
},
|
|
82286
82284
|
{
|
|
@@ -82293,7 +82291,7 @@ const DynamicZone = ({
|
|
|
82293
82291
|
setLiveText(
|
|
82294
82292
|
formatMessage(
|
|
82295
82293
|
{
|
|
82296
|
-
id:
|
|
82294
|
+
id: index_H1ljeG8.getTranslation("dnd.grab-item"),
|
|
82297
82295
|
defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`
|
|
82298
82296
|
},
|
|
82299
82297
|
{
|
|
@@ -82307,7 +82305,7 @@ const DynamicZone = ({
|
|
|
82307
82305
|
setLiveText(
|
|
82308
82306
|
formatMessage(
|
|
82309
82307
|
{
|
|
82310
|
-
id:
|
|
82308
|
+
id: index_H1ljeG8.getTranslation("dnd.drop-item"),
|
|
82311
82309
|
defaultMessage: `{item}, dropped. Final position in list: {position}.`
|
|
82312
82310
|
},
|
|
82313
82311
|
{
|
|
@@ -82328,7 +82326,7 @@ const DynamicZone = ({
|
|
|
82328
82326
|
if (hasError && dynamicDisplayedComponentsLength > max) {
|
|
82329
82327
|
return formatMessage(
|
|
82330
82328
|
{
|
|
82331
|
-
id:
|
|
82329
|
+
id: index_H1ljeG8.getTranslation(`components.DynamicZone.extra-components`),
|
|
82332
82330
|
defaultMessage: "There {number, plural, =0 {are # extra components} one {is # extra component} other {are # extra components}}"
|
|
82333
82331
|
},
|
|
82334
82332
|
{
|
|
@@ -82339,7 +82337,7 @@ const DynamicZone = ({
|
|
|
82339
82337
|
if (hasError && dynamicDisplayedComponentsLength < min) {
|
|
82340
82338
|
return formatMessage(
|
|
82341
82339
|
{
|
|
82342
|
-
id:
|
|
82340
|
+
id: index_H1ljeG8.getTranslation(`components.DynamicZone.missing-components`),
|
|
82343
82341
|
defaultMessage: "There {number, plural, =0 {are # missing components} one {is # missing component} other {are # missing components}}"
|
|
82344
82342
|
},
|
|
82345
82343
|
{ number: min - dynamicDisplayedComponentsLength }
|
|
@@ -82347,13 +82345,13 @@ const DynamicZone = ({
|
|
|
82347
82345
|
}
|
|
82348
82346
|
return formatMessage(
|
|
82349
82347
|
{
|
|
82350
|
-
id:
|
|
82348
|
+
id: index_H1ljeG8.getTranslation("components.DynamicZone.add-component"),
|
|
82351
82349
|
defaultMessage: "Add a component to {componentName}"
|
|
82352
82350
|
},
|
|
82353
82351
|
{ componentName: label2 || name2 }
|
|
82354
82352
|
);
|
|
82355
82353
|
};
|
|
82356
|
-
const level =
|
|
82354
|
+
const level = index_H1ljeG8.useComponent("DynamicZone", (state) => state.level);
|
|
82357
82355
|
const ariaDescriptionId = React__namespace.useId();
|
|
82358
82356
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicZoneProvider, { isInDynamicZone: true, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
82359
82357
|
dynamicDisplayedComponentsLength > 0 && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
@@ -82368,12 +82366,12 @@ const DynamicZone = ({
|
|
|
82368
82366
|
}
|
|
82369
82367
|
),
|
|
82370
82368
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { id: ariaDescriptionId, children: formatMessage({
|
|
82371
|
-
id:
|
|
82369
|
+
id: index_H1ljeG8.getTranslation("dnd.instructions"),
|
|
82372
82370
|
defaultMessage: `Press spacebar to grab and re-order`
|
|
82373
82371
|
}) }),
|
|
82374
82372
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
|
|
82375
82373
|
/* @__PURE__ */ jsxRuntime.jsx("ol", { "aria-describedby": ariaDescriptionId, children: value.map((field, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
82376
|
-
|
|
82374
|
+
index_H1ljeG8.ComponentProvider,
|
|
82377
82375
|
{
|
|
82378
82376
|
level: level + 1,
|
|
82379
82377
|
uid: field.__component,
|
|
@@ -82419,7 +82417,7 @@ const DynamicZone = ({
|
|
|
82419
82417
|
)
|
|
82420
82418
|
] }) });
|
|
82421
82419
|
};
|
|
82422
|
-
const uidApi =
|
|
82420
|
+
const uidApi = index_H1ljeG8.contentManagerApi.injectEndpoints({
|
|
82423
82421
|
endpoints: (builder) => ({
|
|
82424
82422
|
getDefaultUID: builder.query({
|
|
82425
82423
|
query: ({ params, ...data }) => {
|
|
@@ -82461,17 +82459,17 @@ const { useGenerateUIDMutation, useGetDefaultUIDQuery, useGetAvailabilityQuery }
|
|
|
82461
82459
|
const UID_REGEX = /^[A-Za-z0-9-_.~]*$/;
|
|
82462
82460
|
const UIDInput = React__namespace.forwardRef(
|
|
82463
82461
|
({ hint, disabled, label: label2, name: name2, placeholder, required }, ref) => {
|
|
82464
|
-
const { model, id: id2 } =
|
|
82465
|
-
const allFormValues =
|
|
82462
|
+
const { model, id: id2 } = index_H1ljeG8.useDoc();
|
|
82463
|
+
const allFormValues = index_H1ljeG8.useForm("InputUID", (form) => form.values);
|
|
82466
82464
|
const [availability, setAvailability] = React__namespace.useState();
|
|
82467
82465
|
const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
|
|
82468
|
-
const field =
|
|
82466
|
+
const field = index_H1ljeG8.useField(name2);
|
|
82469
82467
|
const debouncedValue = useDebounce(field.value, 300);
|
|
82470
|
-
const { toggleNotification } =
|
|
82471
|
-
const { _unstableFormatAPIError: formatAPIError } =
|
|
82468
|
+
const { toggleNotification } = index_H1ljeG8.useNotification();
|
|
82469
|
+
const { _unstableFormatAPIError: formatAPIError } = index_H1ljeG8.useAPIErrorHandler();
|
|
82472
82470
|
const { formatMessage } = reactIntl.useIntl();
|
|
82473
|
-
const [{ query }] =
|
|
82474
|
-
const params = React__namespace.useMemo(() =>
|
|
82471
|
+
const [{ query }] = index_H1ljeG8.useQueryParams();
|
|
82472
|
+
const params = React__namespace.useMemo(() => index_H1ljeG8.buildValidParams(query), [query]);
|
|
82475
82473
|
const {
|
|
82476
82474
|
data: defaultGeneratedUID,
|
|
82477
82475
|
isLoading: isGeneratingDefaultUID,
|
|
@@ -82570,7 +82568,7 @@ const UIDInput = React__namespace.forwardRef(
|
|
|
82570
82568
|
};
|
|
82571
82569
|
}, [availabilityData]);
|
|
82572
82570
|
const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
|
|
82573
|
-
const fieldRef =
|
|
82571
|
+
const fieldRef = index_H1ljeG8.useFocusInputField(name2);
|
|
82574
82572
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
82575
82573
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
82576
82574
|
designSystem.TextInput,
|
|
@@ -83983,7 +83981,7 @@ const StyledFlex = styled__default.default(designSystem.Flex)`
|
|
|
83983
83981
|
`;
|
|
83984
83982
|
const Wysiwyg = React__namespace.forwardRef(
|
|
83985
83983
|
({ hint, disabled, label: label2, name: name2, placeholder, required }, forwardedRef) => {
|
|
83986
|
-
const field =
|
|
83984
|
+
const field = index_H1ljeG8.useField(name2);
|
|
83987
83985
|
const textareaRef = React__namespace.useRef(null);
|
|
83988
83986
|
const editorRef = React__namespace.useRef(
|
|
83989
83987
|
null
|
|
@@ -83991,7 +83989,7 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
|
83991
83989
|
const [isPreviewMode, setIsPreviewMode] = React__namespace.useState(false);
|
|
83992
83990
|
const [mediaLibVisible, setMediaLibVisible] = React__namespace.useState(false);
|
|
83993
83991
|
const [isExpandMode, setIsExpandMode] = React__namespace.useState(false);
|
|
83994
|
-
const components =
|
|
83992
|
+
const components = index_H1ljeG8.useStrapiApp("ImageDialog", (state) => state.components);
|
|
83995
83993
|
const MediaLibraryDialog = components["media-library"];
|
|
83996
83994
|
const handleToggleMediaLib = () => setMediaLibVisible((prev) => !prev);
|
|
83997
83995
|
const handleTogglePreviewMode = () => setIsPreviewMode((prev) => !prev);
|
|
@@ -84039,7 +84037,7 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
|
84039
84037
|
const handleSelectAssets = (files) => {
|
|
84040
84038
|
const formattedFiles = files.map((f) => ({
|
|
84041
84039
|
alt: f.alternativeText || f.name,
|
|
84042
|
-
url:
|
|
84040
|
+
url: index_H1ljeG8.prefixFileUrlWithBackendUrl(f.url),
|
|
84043
84041
|
mime: f.mime
|
|
84044
84042
|
}));
|
|
84045
84043
|
insertFile(editorRef, formattedFiles);
|
|
@@ -84097,18 +84095,18 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
|
84097
84095
|
}
|
|
84098
84096
|
);
|
|
84099
84097
|
const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
84100
|
-
const { id: id2 } =
|
|
84101
|
-
const isFormDisabled =
|
|
84098
|
+
const { id: id2 } = index_H1ljeG8.useDoc();
|
|
84099
|
+
const isFormDisabled = index_H1ljeG8.useForm("InputRenderer", (state) => state.disabled);
|
|
84102
84100
|
const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
|
|
84103
|
-
const canCreateFields =
|
|
84104
|
-
const canReadFields =
|
|
84105
|
-
const canUpdateFields =
|
|
84106
|
-
const canUserAction =
|
|
84101
|
+
const canCreateFields = index_H1ljeG8.useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
|
|
84102
|
+
const canReadFields = index_H1ljeG8.useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
|
|
84103
|
+
const canUpdateFields = index_H1ljeG8.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
|
|
84104
|
+
const canUserAction = index_H1ljeG8.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
|
|
84107
84105
|
const editableFields = id2 ? canUpdateFields : canCreateFields;
|
|
84108
84106
|
const readableFields = id2 ? canReadFields : canCreateFields;
|
|
84109
84107
|
const canUserReadField = canUserAction(props.name, readableFields, props.type);
|
|
84110
84108
|
const canUserEditField = canUserAction(props.name, editableFields, props.type);
|
|
84111
|
-
const fields =
|
|
84109
|
+
const fields = index_H1ljeG8.useStrapiApp("InputRenderer", (app) => app.fields);
|
|
84112
84110
|
const { lazyComponentStore } = useLazyComponents(
|
|
84113
84111
|
attributeHasCustomFieldProperty(props.attribute) ? [props.attribute.customField] : void 0
|
|
84114
84112
|
);
|
|
@@ -84126,7 +84124,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
|
84126
84124
|
return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
|
|
84127
84125
|
} else {
|
|
84128
84126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84129
|
-
|
|
84127
|
+
index_H1ljeG8.InputRenderer,
|
|
84130
84128
|
{
|
|
84131
84129
|
...props,
|
|
84132
84130
|
hint,
|
|
@@ -84149,14 +84147,14 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
|
84149
84147
|
case "dynamiczone":
|
|
84150
84148
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicZone, { ...props, hint, disabled: fieldIsDisabled });
|
|
84151
84149
|
case "relation":
|
|
84152
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84150
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.RelationsField, { ...props, hint, disabled: fieldIsDisabled });
|
|
84153
84151
|
case "richtext":
|
|
84154
84152
|
return /* @__PURE__ */ jsxRuntime.jsx(Wysiwyg, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
|
|
84155
84153
|
case "uid":
|
|
84156
84154
|
return /* @__PURE__ */ jsxRuntime.jsx(UIDInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
|
|
84157
84155
|
case "enumeration":
|
|
84158
84156
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84159
|
-
|
|
84157
|
+
index_H1ljeG8.InputRenderer,
|
|
84160
84158
|
{
|
|
84161
84159
|
...props,
|
|
84162
84160
|
hint,
|
|
@@ -84168,7 +84166,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
|
84168
84166
|
default:
|
|
84169
84167
|
const { unique: _unique, mainField: _mainField, ...restProps } = props;
|
|
84170
84168
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84171
|
-
|
|
84169
|
+
index_H1ljeG8.InputRenderer,
|
|
84172
84170
|
{
|
|
84173
84171
|
...restProps,
|
|
84174
84172
|
hint,
|
|
@@ -84260,9 +84258,9 @@ const EditViewPage = () => {
|
|
|
84260
84258
|
query: { status }
|
|
84261
84259
|
},
|
|
84262
84260
|
setQuery
|
|
84263
|
-
] =
|
|
84261
|
+
] = index_H1ljeG8.useQueryParams();
|
|
84264
84262
|
const { formatMessage } = reactIntl.useIntl();
|
|
84265
|
-
const { toggleNotification } =
|
|
84263
|
+
const { toggleNotification } = index_H1ljeG8.useNotification();
|
|
84266
84264
|
const tabApi = React__namespace.useRef(null);
|
|
84267
84265
|
const {
|
|
84268
84266
|
document: document2,
|
|
@@ -84273,7 +84271,7 @@ const EditViewPage = () => {
|
|
|
84273
84271
|
collectionType,
|
|
84274
84272
|
id: id2,
|
|
84275
84273
|
model
|
|
84276
|
-
} =
|
|
84274
|
+
} = index_H1ljeG8.useDoc();
|
|
84277
84275
|
const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
|
|
84278
84276
|
React__namespace.useEffect(() => {
|
|
84279
84277
|
if (tabApi.current && hasDraftAndPublished) {
|
|
@@ -84289,8 +84287,8 @@ const EditViewPage = () => {
|
|
|
84289
84287
|
});
|
|
84290
84288
|
}
|
|
84291
84289
|
});
|
|
84292
|
-
const isLoadingActionsRBAC =
|
|
84293
|
-
const isSingleType = collectionType ===
|
|
84290
|
+
const isLoadingActionsRBAC = index_H1ljeG8.useDocumentRBAC("EditViewPage", (state) => state.isLoading);
|
|
84291
|
+
const isSingleType = collectionType === index_H1ljeG8.SINGLE_TYPES;
|
|
84294
84292
|
const isCreatingDocument = !id2 && !isSingleType;
|
|
84295
84293
|
const {
|
|
84296
84294
|
isLoading: isLoadingLayout,
|
|
@@ -84298,7 +84296,7 @@ const EditViewPage = () => {
|
|
|
84298
84296
|
layout,
|
|
84299
84297
|
settings: { mainField }
|
|
84300
84298
|
}
|
|
84301
|
-
} =
|
|
84299
|
+
} = index_H1ljeG8.useDocumentLayout(model);
|
|
84302
84300
|
const { isLazyLoading } = useLazyComponents([]);
|
|
84303
84301
|
const isLoading = isLoadingActionsRBAC || isLoadingDocument || isLoadingLayout || isLazyLoading;
|
|
84304
84302
|
const initialValues = React__namespace.useMemo(() => {
|
|
@@ -84309,10 +84307,10 @@ const EditViewPage = () => {
|
|
|
84309
84307
|
return transformDocument(schema, components)(form);
|
|
84310
84308
|
}, [document2, isCreatingDocument, isSingleType, schema, components]);
|
|
84311
84309
|
if (isLoading && !document2?.documentId) {
|
|
84312
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84310
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Page.Loading, {});
|
|
84313
84311
|
}
|
|
84314
84312
|
if (!initialValues) {
|
|
84315
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84313
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Page.Error, {});
|
|
84316
84314
|
}
|
|
84317
84315
|
const handleTabChange = (index, { resetForm }) => {
|
|
84318
84316
|
if (index === 0) {
|
|
@@ -84326,15 +84324,15 @@ const EditViewPage = () => {
|
|
|
84326
84324
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { paddingLeft: 10, paddingRight: 10, children: [
|
|
84327
84325
|
/* @__PURE__ */ jsxRuntime.jsx(Helmet.HelmetExport, { title: `${documentTitle} | Strapi` }),
|
|
84328
84326
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84329
|
-
|
|
84327
|
+
index_H1ljeG8.Form,
|
|
84330
84328
|
{
|
|
84331
84329
|
disabled: hasDraftAndPublished && status === "published",
|
|
84332
84330
|
initialValues,
|
|
84333
84331
|
method: isCreatingDocument ? "POST" : "PUT",
|
|
84334
|
-
validationSchema:
|
|
84332
|
+
validationSchema: index_H1ljeG8.createYupSchema(schema?.attributes, components),
|
|
84335
84333
|
children: ({ resetForm }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
84336
84334
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84337
|
-
|
|
84335
|
+
index_H1ljeG8.Header,
|
|
84338
84336
|
{
|
|
84339
84337
|
isCreating: isCreatingDocument,
|
|
84340
84338
|
status: hasDraftAndPublished ? getDocumentStatus(document2, meta) : void 0,
|
|
@@ -84347,7 +84345,7 @@ const EditViewPage = () => {
|
|
|
84347
84345
|
ref: tabApi,
|
|
84348
84346
|
variant: "simple",
|
|
84349
84347
|
label: formatMessage({
|
|
84350
|
-
id:
|
|
84348
|
+
id: index_H1ljeG8.getTranslation("containers.edit.tabs.label"),
|
|
84351
84349
|
defaultMessage: "Document status"
|
|
84352
84350
|
}),
|
|
84353
84351
|
initialSelectedTabIndex: hasDraftAndPublished && status === "published" ? 1 : 0,
|
|
@@ -84357,11 +84355,11 @@ const EditViewPage = () => {
|
|
|
84357
84355
|
children: [
|
|
84358
84356
|
hasDraftAndPublished ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tabs, { children: [
|
|
84359
84357
|
/* @__PURE__ */ jsxRuntime.jsx(StatusTab, { children: formatMessage({
|
|
84360
|
-
id:
|
|
84358
|
+
id: index_H1ljeG8.getTranslation("containers.edit.tabs.draft"),
|
|
84361
84359
|
defaultMessage: "draft"
|
|
84362
84360
|
}) }),
|
|
84363
84361
|
/* @__PURE__ */ jsxRuntime.jsx(StatusTab, { disabled: !meta || meta.availableStatus.length === 0, children: formatMessage({
|
|
84364
|
-
id:
|
|
84362
|
+
id: index_H1ljeG8.getTranslation("containers.edit.tabs.published"),
|
|
84365
84363
|
defaultMessage: "published"
|
|
84366
84364
|
}) })
|
|
84367
84365
|
] }) : null,
|
|
@@ -84370,12 +84368,12 @@ const EditViewPage = () => {
|
|
|
84370
84368
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.TabPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(FormLayout, { layout }) }),
|
|
84371
84369
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.TabPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(FormLayout, { layout }) })
|
|
84372
84370
|
] }) }),
|
|
84373
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 3, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
84371
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 3, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Panels, {}) })
|
|
84374
84372
|
] })
|
|
84375
84373
|
]
|
|
84376
84374
|
}
|
|
84377
84375
|
),
|
|
84378
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84376
|
+
/* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Blocker, {})
|
|
84379
84377
|
] })
|
|
84380
84378
|
}
|
|
84381
84379
|
)
|
|
@@ -84397,16 +84395,16 @@ const getDocumentStatus = (document2, meta) => {
|
|
|
84397
84395
|
};
|
|
84398
84396
|
const ProtectedEditViewPage = () => {
|
|
84399
84397
|
const { slug } = reactRouterDom.useParams();
|
|
84400
|
-
const [{ query }] =
|
|
84401
|
-
const { permissions = [], isLoading, isError } =
|
|
84398
|
+
const [{ query }] = index_H1ljeG8.useQueryParams();
|
|
84399
|
+
const { permissions = [], isLoading, isError } = useSyncRbacOd0wrAnD.useSyncRbac(slug ?? "", query, "editView");
|
|
84402
84400
|
if (isLoading) {
|
|
84403
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Page.Loading, {});
|
|
84404
84402
|
}
|
|
84405
84403
|
if (!isLoading && isError || !slug) {
|
|
84406
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84404
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Page.Error, {});
|
|
84407
84405
|
}
|
|
84408
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84406
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.Page.Protect, { permissions, children: ({ permissions: permissions2 }) => /* @__PURE__ */ jsxRuntime.jsx(index_H1ljeG8.DocumentRBAC, { permissions: permissions2, children: /* @__PURE__ */ jsxRuntime.jsx(EditViewPage, {}) }) });
|
|
84409
84407
|
};
|
|
84410
84408
|
exports.EditViewPage = EditViewPage;
|
|
84411
84409
|
exports.ProtectedEditViewPage = ProtectedEditViewPage;
|
|
84412
|
-
//# sourceMappingURL=EditViewPage-
|
|
84410
|
+
//# sourceMappingURL=EditViewPage--KlNP7xz-qZQydloS.js.map
|