@strapi/plugin-users-permissions 5.0.0-alpha.0 → 5.0.0-alpha.2
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/index.js +1 -2
- package/admin/src/pages/AdvancedSettings/index.jsx +4 -6
- package/admin/src/pages/EmailTemplates/components/EmailTable.jsx +4 -5
- package/admin/src/pages/EmailTemplates/index.jsx +5 -7
- package/admin/src/pages/Providers/index.jsx +6 -18
- package/admin/src/pages/Roles/hooks/usePlugins.js +1 -2
- package/admin/src/pages/Roles/pages/CreatePage.jsx +1 -2
- package/admin/src/pages/Roles/pages/EditPage.jsx +7 -2
- package/admin/src/pages/Roles/pages/ListPage/components/TableBody.jsx +2 -3
- package/admin/src/pages/Roles/pages/ListPage/index.jsx +33 -6
- package/admin/src/utils/prefixPluginTranslations.js +13 -0
- package/dist/_chunks/{EditViewPage-xYzUSAwS-wpHlxdkC.js → EditViewPage-JFzIJClS-9jnyNYlZ.js} +181 -167
- package/dist/_chunks/{EditViewPage-xYzUSAwS-wpHlxdkC.js.map → EditViewPage-JFzIJClS-9jnyNYlZ.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-xYzUSAwS-5mOQ_-nB.mjs → EditViewPage-JFzIJClS-SluImrzz.mjs} +44 -32
- package/dist/_chunks/EditViewPage-JFzIJClS-SluImrzz.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-xOVa04T_-elahT0e9.js → ListViewPage-1VNVP9Rw-94jqnla4.js} +104 -105
- package/dist/_chunks/ListViewPage-1VNVP9Rw-94jqnla4.js.map +1 -0
- package/dist/_chunks/{ListViewPage-xOVa04T_-lbfb219V.mjs → ListViewPage-1VNVP9Rw-Ce-HkFp1.mjs} +9 -10
- package/dist/_chunks/ListViewPage-1VNVP9Rw-Ce-HkFp1.mjs.map +1 -0
- package/dist/_chunks/{ReviewWorkflowsColumn-FDxVKdto-IWfB3WVH.mjs → ReviewWorkflowsColumn-sPZxvFUd-Cd4JhTlj.mjs} +2 -2
- package/dist/_chunks/{ReviewWorkflowsColumn-FDxVKdto-IWfB3WVH.mjs.map → ReviewWorkflowsColumn-sPZxvFUd-Cd4JhTlj.mjs.map} +1 -1
- package/dist/_chunks/{ReviewWorkflowsColumn-FDxVKdto-m8hslkeI.js → ReviewWorkflowsColumn-sPZxvFUd-S2eFi9Dy.js} +5 -5
- package/dist/_chunks/{ReviewWorkflowsColumn-FDxVKdto-m8hslkeI.js.map → ReviewWorkflowsColumn-sPZxvFUd-S2eFi9Dy.js.map} +1 -1
- package/dist/_chunks/{constants-WjN6I3sL-7e3gpx4b.mjs → constants-0OGkpIzK-R5N7-OUr.mjs} +2 -2
- package/dist/_chunks/{constants-WjN6I3sL-7e3gpx4b.mjs.map → constants-0OGkpIzK-R5N7-OUr.mjs.map} +1 -1
- package/dist/_chunks/{constants-WjN6I3sL-cDZPE6ED.js → constants-0OGkpIzK-f_M9PDKN.js} +18 -18
- package/dist/_chunks/{constants-WjN6I3sL-cDZPE6ED.js.map → constants-0OGkpIzK-f_M9PDKN.js.map} +1 -1
- package/dist/_chunks/{index-VgvlwVA7.js → index-6X9XaLjS.js} +10 -11
- package/dist/_chunks/index-6X9XaLjS.js.map +1 -0
- package/dist/_chunks/{index-5ZvCaCyY-06DLg5eU.mjs → index-GIVuHJgC-_q6V7_2B.mjs} +2822 -2710
- package/dist/_chunks/index-GIVuHJgC-_q6V7_2B.mjs.map +1 -0
- package/dist/_chunks/{index-5ZvCaCyY-JgYo3Jws.js → index-GIVuHJgC-tj2acNbO.js} +2791 -2679
- package/dist/_chunks/index-GIVuHJgC-tj2acNbO.js.map +1 -0
- package/dist/_chunks/{index-TJUxOCtJ.js → index-Q5NQ4RI9.js} +20 -12
- package/dist/_chunks/index-Q5NQ4RI9.js.map +1 -0
- package/dist/_chunks/{index-MEUac_4V.js → index-RT4MW9Nr.js} +35 -37
- package/dist/_chunks/index-RT4MW9Nr.js.map +1 -0
- package/dist/_chunks/{index-A3oJlPcE.mjs → index-av_iGW-0.mjs} +31 -33
- package/dist/_chunks/index-av_iGW-0.mjs.map +1 -0
- package/dist/_chunks/{index-bRuKnVcH.js → index-heeE_h30.js} +8 -12
- package/dist/_chunks/index-heeE_h30.js.map +1 -0
- package/dist/_chunks/{index-53jX2hhF.mjs → index-iaIILeuQ.mjs} +19 -11
- package/dist/_chunks/index-iaIILeuQ.mjs.map +1 -0
- package/dist/_chunks/{index-vXywiVeM.mjs → index-pDvppjQG.mjs} +11 -12
- package/dist/_chunks/index-pDvppjQG.mjs.map +1 -0
- package/dist/_chunks/{index-mzJ2Vb5u.js → index-tFzYCM9l.js} +4 -5
- package/dist/_chunks/index-tFzYCM9l.js.map +1 -0
- package/dist/_chunks/{index-ee_14Ldw.mjs → index-vvcDunmb.mjs} +9 -13
- package/dist/_chunks/index-vvcDunmb.mjs.map +1 -0
- package/dist/_chunks/{index-N-GcFWtg.mjs → index-whB2wk2v.mjs} +6 -7
- package/dist/_chunks/index-whB2wk2v.mjs.map +1 -0
- package/dist/_chunks/{useSyncRbac-Kt8Li0Yf-Z54sMEPM.mjs → useSyncRbac-JNQibLFa-D0RzXrU4.mjs} +2 -2
- package/dist/_chunks/{useSyncRbac-Kt8Li0Yf-Z54sMEPM.mjs.map → useSyncRbac-JNQibLFa-D0RzXrU4.mjs.map} +1 -1
- package/dist/_chunks/{useSyncRbac-Kt8Li0Yf-h8HqtZ6y.js → useSyncRbac-JNQibLFa-G2N9BPgu.js} +7 -7
- package/dist/_chunks/{useSyncRbac-Kt8Li0Yf-h8HqtZ6y.js.map → useSyncRbac-JNQibLFa-G2N9BPgu.js.map} +1 -1
- package/dist/admin/index.js +1 -2
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +1 -2
- package/dist/admin/index.mjs.map +1 -1
- package/package.json +6 -6
- package/admin/src/pages/Roles/pages/ListPage/utils/api.js +0 -30
- package/dist/_chunks/EditViewPage-xYzUSAwS-5mOQ_-nB.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-xOVa04T_-elahT0e9.js.map +0 -1
- package/dist/_chunks/ListViewPage-xOVa04T_-lbfb219V.mjs.map +0 -1
- package/dist/_chunks/index-53jX2hhF.mjs.map +0 -1
- package/dist/_chunks/index-5ZvCaCyY-06DLg5eU.mjs.map +0 -1
- package/dist/_chunks/index-5ZvCaCyY-JgYo3Jws.js.map +0 -1
- package/dist/_chunks/index-A3oJlPcE.mjs.map +0 -1
- package/dist/_chunks/index-MEUac_4V.js.map +0 -1
- package/dist/_chunks/index-N-GcFWtg.mjs.map +0 -1
- package/dist/_chunks/index-TJUxOCtJ.js.map +0 -1
- package/dist/_chunks/index-VgvlwVA7.js.map +0 -1
- package/dist/_chunks/index-bRuKnVcH.js.map +0 -1
- package/dist/_chunks/index-ee_14Ldw.mjs.map +0 -1
- package/dist/_chunks/index-mzJ2Vb5u.js.map +0 -1
- package/dist/_chunks/index-vXywiVeM.mjs.map +0 -1
package/dist/_chunks/{EditViewPage-xYzUSAwS-wpHlxdkC.js → EditViewPage-JFzIJClS-9jnyNYlZ.js}
RENAMED
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
|
6
|
-
const helperPlugin = require("@strapi/helper-plugin");
|
|
7
6
|
const Helmet = require("./Helmet-d9JljxUo.js");
|
|
8
7
|
const reactIntl = require("react-intl");
|
|
9
8
|
const reactRouterDom = require("react-router-dom");
|
|
10
9
|
const styled = require("styled-components");
|
|
11
|
-
const
|
|
10
|
+
const indexGIVuHJgC = require("./index-GIVuHJgC-tj2acNbO.js");
|
|
12
11
|
const Icons = require("@strapi/icons");
|
|
13
12
|
const createNextState2 = require("immer");
|
|
14
13
|
const debounce = require("lodash/debounce");
|
|
@@ -20,7 +19,7 @@ const require$$2$1 = require("path");
|
|
|
20
19
|
const require$$1$1 = require("url");
|
|
21
20
|
const require$$1 = require("fs");
|
|
22
21
|
const require$$8 = require("punycode");
|
|
23
|
-
const
|
|
22
|
+
const useSyncRbacJNQibLFa = require("./useSyncRbac-JNQibLFa-G2N9BPgu.js");
|
|
24
23
|
const _interopDefault = (e2) => e2 && e2.__esModule ? e2 : { default: e2 };
|
|
25
24
|
function _interopNamespace(e2) {
|
|
26
25
|
if (e2 && e2.__esModule)
|
|
@@ -10387,11 +10386,11 @@ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ React.forwardR
|
|
|
10387
10386
|
} else
|
|
10388
10387
|
return child2;
|
|
10389
10388
|
});
|
|
10390
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone,
|
|
10389
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, indexGIVuHJgC._extends({}, slotProps, {
|
|
10391
10390
|
ref: forwardedRef
|
|
10392
10391
|
}), /* @__PURE__ */ React.isValidElement(newElement) ? /* @__PURE__ */ React.cloneElement(newElement, void 0, newChildren) : null);
|
|
10393
10392
|
}
|
|
10394
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone,
|
|
10393
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, indexGIVuHJgC._extends({}, slotProps, {
|
|
10395
10394
|
ref: forwardedRef
|
|
10396
10395
|
}), children);
|
|
10397
10396
|
});
|
|
@@ -10446,7 +10445,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
|
10446
10445
|
}
|
|
10447
10446
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name2) {
|
|
10448
10447
|
const PROVIDER_NAME = name2 + "CollectionProvider";
|
|
10449
|
-
const [createCollectionContext, createCollectionScope] =
|
|
10448
|
+
const [createCollectionContext, createCollectionScope] = indexGIVuHJgC.$c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
10450
10449
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
10451
10450
|
collectionRef: {
|
|
10452
10451
|
current: null
|
|
@@ -10560,7 +10559,7 @@ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.re
|
|
|
10560
10559
|
React.useEffect(() => {
|
|
10561
10560
|
window[Symbol.for("radix-ui")] = true;
|
|
10562
10561
|
}, []);
|
|
10563
|
-
return /* @__PURE__ */ React.createElement(Comp,
|
|
10562
|
+
return /* @__PURE__ */ React.createElement(Comp, indexGIVuHJgC._extends({}, primitiveProps, {
|
|
10564
10563
|
ref: forwardedRef
|
|
10565
10564
|
}));
|
|
10566
10565
|
});
|
|
@@ -10640,7 +10639,7 @@ const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
|
10640
10639
|
};
|
|
10641
10640
|
const $d7bdfb9eb0fdf311$var$GROUP_NAME = "RovingFocusGroup";
|
|
10642
10641
|
const [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
10643
|
-
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] =
|
|
10642
|
+
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = indexGIVuHJgC.$c512c27ab02ef895$export$50c7b4e9d9f19c1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
|
|
10644
10643
|
$d7bdfb9eb0fdf311$var$createCollectionScope
|
|
10645
10644
|
]);
|
|
10646
10645
|
const [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
@@ -10649,7 +10648,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ React.forwardR
|
|
|
10649
10648
|
scope: props.__scopeRovingFocusGroup
|
|
10650
10649
|
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
10651
10650
|
scope: props.__scopeRovingFocusGroup
|
|
10652
|
-
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl,
|
|
10651
|
+
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, indexGIVuHJgC._extends({}, props, {
|
|
10653
10652
|
ref: forwardedRef
|
|
10654
10653
|
}))));
|
|
10655
10654
|
});
|
|
@@ -10705,7 +10704,7 @@ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ React.forward
|
|
|
10705
10704
|
),
|
|
10706
10705
|
[]
|
|
10707
10706
|
)
|
|
10708
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
10707
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, indexGIVuHJgC._extends({
|
|
10709
10708
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
10710
10709
|
"data-orientation": orientation
|
|
10711
10710
|
}, groupProps, {
|
|
@@ -10775,7 +10774,7 @@ const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ React.forwardRe
|
|
|
10775
10774
|
id: id2,
|
|
10776
10775
|
focusable,
|
|
10777
10776
|
active
|
|
10778
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span,
|
|
10777
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, indexGIVuHJgC._extends({
|
|
10779
10778
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
10780
10779
|
"data-orientation": context.orientation
|
|
10781
10780
|
}, itemProps, {
|
|
@@ -10882,7 +10881,7 @@ const $89eedd556c436f6a$export$1ff3c3f08ae963c0 = /* @__PURE__ */ React.forwardR
|
|
|
10882
10881
|
"aria-orientation": ariaOrientation,
|
|
10883
10882
|
role: "separator"
|
|
10884
10883
|
};
|
|
10885
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
10884
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, indexGIVuHJgC._extends({
|
|
10886
10885
|
"data-orientation": orientation
|
|
10887
10886
|
}, semanticProps, domProps, {
|
|
10888
10887
|
ref: forwardedRef
|
|
@@ -10915,7 +10914,7 @@ const $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ React.forwardR
|
|
|
10915
10914
|
onChange: onPressedChange,
|
|
10916
10915
|
defaultProp: defaultPressed
|
|
10917
10916
|
});
|
|
10918
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,
|
|
10917
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, indexGIVuHJgC._extends({
|
|
10919
10918
|
type: "button",
|
|
10920
10919
|
"aria-pressed": pressed,
|
|
10921
10920
|
"data-state": pressed ? "on" : "off",
|
|
@@ -10929,7 +10928,7 @@ const $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ React.forwardR
|
|
|
10929
10928
|
}));
|
|
10930
10929
|
});
|
|
10931
10930
|
const $6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME = "ToggleGroup";
|
|
10932
|
-
const [$6c1fd9e6a8969628$var$createToggleGroupContext, $6c1fd9e6a8969628$export$d1c7c4bcd9f26dd4] =
|
|
10931
|
+
const [$6c1fd9e6a8969628$var$createToggleGroupContext, $6c1fd9e6a8969628$export$d1c7c4bcd9f26dd4] = indexGIVuHJgC.$c512c27ab02ef895$export$50c7b4e9d9f19c1($6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME, [
|
|
10933
10932
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
10934
10933
|
]);
|
|
10935
10934
|
const $6c1fd9e6a8969628$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
|
|
@@ -10937,13 +10936,13 @@ const $6c1fd9e6a8969628$export$af3ec21f6cfb5e30 = /* @__PURE__ */ React__namespa
|
|
|
10937
10936
|
const { type, ...toggleGroupProps } = props;
|
|
10938
10937
|
if (type === "single") {
|
|
10939
10938
|
const singleProps = toggleGroupProps;
|
|
10940
|
-
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplSingle,
|
|
10939
|
+
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplSingle, indexGIVuHJgC._extends({}, singleProps, {
|
|
10941
10940
|
ref: forwardedRef
|
|
10942
10941
|
}));
|
|
10943
10942
|
}
|
|
10944
10943
|
if (type === "multiple") {
|
|
10945
10944
|
const multipleProps = toggleGroupProps;
|
|
10946
|
-
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplMultiple,
|
|
10945
|
+
return /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplMultiple, indexGIVuHJgC._extends({}, multipleProps, {
|
|
10947
10946
|
ref: forwardedRef
|
|
10948
10947
|
}));
|
|
10949
10948
|
}
|
|
@@ -10971,7 +10970,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */ React__names
|
|
|
10971
10970
|
setValue
|
|
10972
10971
|
]
|
|
10973
10972
|
)
|
|
10974
|
-
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl,
|
|
10973
|
+
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, indexGIVuHJgC._extends({}, toggleGroupSingleProps, {
|
|
10975
10974
|
ref: forwardedRef
|
|
10976
10975
|
})));
|
|
10977
10976
|
});
|
|
@@ -11010,7 +11009,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ React__nam
|
|
|
11010
11009
|
value: value1,
|
|
11011
11010
|
onItemActivate: handleButtonActivate,
|
|
11012
11011
|
onItemDeactivate: handleButtonDeactivate
|
|
11013
|
-
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl,
|
|
11012
|
+
}, /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, indexGIVuHJgC._extends({}, toggleGroupMultipleProps, {
|
|
11014
11013
|
ref: forwardedRef
|
|
11015
11014
|
})));
|
|
11016
11015
|
});
|
|
@@ -11028,15 +11027,15 @@ const $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */ React__namespace.d
|
|
|
11028
11027
|
scope: __scopeToggleGroup,
|
|
11029
11028
|
rovingFocus,
|
|
11030
11029
|
disabled
|
|
11031
|
-
}, rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9,
|
|
11030
|
+
}, rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, indexGIVuHJgC._extends({
|
|
11032
11031
|
asChild: true
|
|
11033
11032
|
}, rovingFocusGroupScope, {
|
|
11034
11033
|
orientation,
|
|
11035
11034
|
dir: direction2,
|
|
11036
11035
|
loop: loop2
|
|
11037
|
-
}), /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
11036
|
+
}), /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, indexGIVuHJgC._extends({}, commonProps, {
|
|
11038
11037
|
ref: forwardedRef
|
|
11039
|
-
}))) : /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
11038
|
+
}))) : /* @__PURE__ */ React__namespace.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, indexGIVuHJgC._extends({}, commonProps, {
|
|
11040
11039
|
ref: forwardedRef
|
|
11041
11040
|
})));
|
|
11042
11041
|
});
|
|
@@ -11053,15 +11052,15 @@ const $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */ React__namespa
|
|
|
11053
11052
|
disabled
|
|
11054
11053
|
};
|
|
11055
11054
|
const ref = React__namespace.default.useRef(null);
|
|
11056
|
-
return context.rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2,
|
|
11055
|
+
return context.rovingFocus ? /* @__PURE__ */ React__namespace.default.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, indexGIVuHJgC._extends({
|
|
11057
11056
|
asChild: true
|
|
11058
11057
|
}, rovingFocusGroupScope, {
|
|
11059
11058
|
focusable: !disabled,
|
|
11060
11059
|
active: pressed,
|
|
11061
11060
|
ref
|
|
11062
|
-
}), /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl,
|
|
11061
|
+
}), /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, indexGIVuHJgC._extends({}, commonProps, {
|
|
11063
11062
|
ref: forwardedRef
|
|
11064
|
-
}))) : /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl,
|
|
11063
|
+
}))) : /* @__PURE__ */ React__namespace.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, indexGIVuHJgC._extends({}, commonProps, {
|
|
11065
11064
|
ref: forwardedRef
|
|
11066
11065
|
}));
|
|
11067
11066
|
});
|
|
@@ -11074,7 +11073,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ React__namespa
|
|
|
11074
11073
|
"aria-pressed": void 0
|
|
11075
11074
|
};
|
|
11076
11075
|
const typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
11077
|
-
return /* @__PURE__ */ React__namespace.default.createElement($b3bbe2732c13b576$export$bea8ebba691c5813,
|
|
11076
|
+
return /* @__PURE__ */ React__namespace.default.createElement($b3bbe2732c13b576$export$bea8ebba691c5813, indexGIVuHJgC._extends({}, typeProps, itemProps, {
|
|
11078
11077
|
ref: forwardedRef,
|
|
11079
11078
|
onPressedChange: (pressed) => {
|
|
11080
11079
|
if (pressed)
|
|
@@ -11087,7 +11086,7 @@ const $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ React__namespa
|
|
|
11087
11086
|
const $6c1fd9e6a8969628$export$be92b6f5f03c0fe9 = $6c1fd9e6a8969628$export$af3ec21f6cfb5e30;
|
|
11088
11087
|
const $6c1fd9e6a8969628$export$6d08773d2e66f8f2 = $6c1fd9e6a8969628$export$b453109e13abe10b;
|
|
11089
11088
|
const $3dc4ded751c8bdfb$var$TOOLBAR_NAME = "Toolbar";
|
|
11090
|
-
const [$3dc4ded751c8bdfb$var$createToolbarContext, $3dc4ded751c8bdfb$export$233e637670877d91] =
|
|
11089
|
+
const [$3dc4ded751c8bdfb$var$createToolbarContext, $3dc4ded751c8bdfb$export$233e637670877d91] = indexGIVuHJgC.$c512c27ab02ef895$export$50c7b4e9d9f19c1($3dc4ded751c8bdfb$var$TOOLBAR_NAME, [
|
|
11091
11090
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4,
|
|
11092
11091
|
$6c1fd9e6a8969628$export$d1c7c4bcd9f26dd4
|
|
11093
11092
|
]);
|
|
@@ -11102,13 +11101,13 @@ const $3dc4ded751c8bdfb$export$4c260019440d418f = /* @__PURE__ */ React.forwardR
|
|
|
11102
11101
|
scope: __scopeToolbar,
|
|
11103
11102
|
orientation,
|
|
11104
11103
|
dir: direction2
|
|
11105
|
-
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9,
|
|
11104
|
+
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, indexGIVuHJgC._extends({
|
|
11106
11105
|
asChild: true
|
|
11107
11106
|
}, rovingFocusGroupScope, {
|
|
11108
11107
|
orientation,
|
|
11109
11108
|
dir: direction2,
|
|
11110
11109
|
loop: loop2
|
|
11111
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,
|
|
11110
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, indexGIVuHJgC._extends({
|
|
11112
11111
|
role: "toolbar",
|
|
11113
11112
|
"aria-orientation": orientation,
|
|
11114
11113
|
dir: direction2
|
|
@@ -11120,7 +11119,7 @@ const $3dc4ded751c8bdfb$var$SEPARATOR_NAME = "ToolbarSeparator";
|
|
|
11120
11119
|
const $3dc4ded751c8bdfb$export$291e1a31e8ec7868 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11121
11120
|
const { __scopeToolbar, ...separatorProps } = props;
|
|
11122
11121
|
const context = $3dc4ded751c8bdfb$var$useToolbarContext($3dc4ded751c8bdfb$var$SEPARATOR_NAME, __scopeToolbar);
|
|
11123
|
-
return /* @__PURE__ */ React.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9,
|
|
11122
|
+
return /* @__PURE__ */ React.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9, indexGIVuHJgC._extends({
|
|
11124
11123
|
orientation: context.orientation === "horizontal" ? "vertical" : "horizontal"
|
|
11125
11124
|
}, separatorProps, {
|
|
11126
11125
|
ref: forwardedRef
|
|
@@ -11129,11 +11128,11 @@ const $3dc4ded751c8bdfb$export$291e1a31e8ec7868 = /* @__PURE__ */ React.forwardR
|
|
|
11129
11128
|
const $3dc4ded751c8bdfb$export$e5c1a33878e86e9e = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11130
11129
|
const { __scopeToolbar, ...buttonProps } = props;
|
|
11131
11130
|
const rovingFocusGroupScope = $3dc4ded751c8bdfb$var$useRovingFocusGroupScope(__scopeToolbar);
|
|
11132
|
-
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2,
|
|
11131
|
+
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, indexGIVuHJgC._extends({
|
|
11133
11132
|
asChild: true
|
|
11134
11133
|
}, rovingFocusGroupScope, {
|
|
11135
11134
|
focusable: !props.disabled
|
|
11136
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,
|
|
11135
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, indexGIVuHJgC._extends({
|
|
11137
11136
|
type: "button"
|
|
11138
11137
|
}, buttonProps, {
|
|
11139
11138
|
ref: forwardedRef
|
|
@@ -11144,7 +11143,7 @@ const $3dc4ded751c8bdfb$export$aeae28cb17562c0b = /* @__PURE__ */ React.forwardR
|
|
|
11144
11143
|
const { __scopeToolbar, ...toggleGroupProps } = props;
|
|
11145
11144
|
const context = $3dc4ded751c8bdfb$var$useToolbarContext($3dc4ded751c8bdfb$var$TOGGLE_GROUP_NAME, __scopeToolbar);
|
|
11146
11145
|
const toggleGroupScope = $3dc4ded751c8bdfb$var$useToggleGroupScope(__scopeToolbar);
|
|
11147
|
-
return /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$be92b6f5f03c0fe9,
|
|
11146
|
+
return /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$be92b6f5f03c0fe9, indexGIVuHJgC._extends({
|
|
11148
11147
|
"data-orientation": context.orientation,
|
|
11149
11148
|
dir: context.dir
|
|
11150
11149
|
}, toggleGroupScope, toggleGroupProps, {
|
|
@@ -11158,9 +11157,9 @@ const $3dc4ded751c8bdfb$export$546b879b639844a1 = /* @__PURE__ */ React.forwardR
|
|
|
11158
11157
|
const scope = {
|
|
11159
11158
|
__scopeToolbar: props.__scopeToolbar
|
|
11160
11159
|
};
|
|
11161
|
-
return /* @__PURE__ */ React.createElement($3dc4ded751c8bdfb$export$e5c1a33878e86e9e,
|
|
11160
|
+
return /* @__PURE__ */ React.createElement($3dc4ded751c8bdfb$export$e5c1a33878e86e9e, indexGIVuHJgC._extends({
|
|
11162
11161
|
asChild: true
|
|
11163
|
-
}, scope), /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$6d08773d2e66f8f2,
|
|
11162
|
+
}, scope), /* @__PURE__ */ React.createElement($6c1fd9e6a8969628$export$6d08773d2e66f8f2, indexGIVuHJgC._extends({}, toggleGroupScope, toggleItemProps, {
|
|
11164
11163
|
ref: forwardedRef
|
|
11165
11164
|
})));
|
|
11166
11165
|
});
|
|
@@ -25608,7 +25607,7 @@ picocolors_browser.exports = create();
|
|
|
25608
25607
|
picocolors_browser.exports.createColors = create;
|
|
25609
25608
|
var picocolors_browserExports = picocolors_browser.exports;
|
|
25610
25609
|
let pico = picocolors_browserExports;
|
|
25611
|
-
let terminalHighlight$1 =
|
|
25610
|
+
let terminalHighlight$1 = indexGIVuHJgC.require$$0;
|
|
25612
25611
|
let CssSyntaxError$3 = class CssSyntaxError extends Error {
|
|
25613
25612
|
constructor(message, line, column, source2, file, plugin2) {
|
|
25614
25613
|
super(message);
|
|
@@ -26380,7 +26379,7 @@ let nanoid$1 = (size2 = 21) => {
|
|
|
26380
26379
|
return id2;
|
|
26381
26380
|
};
|
|
26382
26381
|
var nonSecure = { nanoid: nanoid$1, customAlphabet };
|
|
26383
|
-
let { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$2 } =
|
|
26382
|
+
let { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$2 } = indexGIVuHJgC.require$$0;
|
|
26384
26383
|
let { existsSync, readFileSync } = require$$1__default.default;
|
|
26385
26384
|
let { dirname: dirname$1, join: join$1 } = require$$2__default.default;
|
|
26386
26385
|
function fromBase64(str) {
|
|
@@ -26499,11 +26498,11 @@ let PreviousMap$2 = class PreviousMap {
|
|
|
26499
26498
|
};
|
|
26500
26499
|
var previousMap = PreviousMap$2;
|
|
26501
26500
|
PreviousMap$2.default = PreviousMap$2;
|
|
26502
|
-
let { SourceMapConsumer: SourceMapConsumer$1, SourceMapGenerator: SourceMapGenerator$1 } =
|
|
26501
|
+
let { SourceMapConsumer: SourceMapConsumer$1, SourceMapGenerator: SourceMapGenerator$1 } = indexGIVuHJgC.require$$0;
|
|
26503
26502
|
let { fileURLToPath, pathToFileURL: pathToFileURL$1 } = require$$1__default$1.default;
|
|
26504
26503
|
let { isAbsolute, resolve: resolve$1 } = require$$2__default.default;
|
|
26505
26504
|
let { nanoid } = nonSecure;
|
|
26506
|
-
let terminalHighlight =
|
|
26505
|
+
let terminalHighlight = indexGIVuHJgC.require$$0;
|
|
26507
26506
|
let CssSyntaxError$1 = cssSyntaxError;
|
|
26508
26507
|
let PreviousMap$1 = previousMap;
|
|
26509
26508
|
let fromOffsetCache = Symbol("fromOffsetCache");
|
|
@@ -26705,7 +26704,7 @@ Input$4.default = Input$4;
|
|
|
26705
26704
|
if (terminalHighlight && terminalHighlight.registerInput) {
|
|
26706
26705
|
terminalHighlight.registerInput(Input$4);
|
|
26707
26706
|
}
|
|
26708
|
-
let { SourceMapConsumer, SourceMapGenerator } =
|
|
26707
|
+
let { SourceMapConsumer, SourceMapGenerator } = indexGIVuHJgC.require$$0;
|
|
26709
26708
|
let { dirname, relative, resolve, sep } = require$$2__default.default;
|
|
26710
26709
|
let { pathToFileURL } = require$$1__default$1.default;
|
|
26711
26710
|
let Input$3 = input;
|
|
@@ -79011,7 +79010,7 @@ const useLazyComponents = (componentUids = []) => {
|
|
|
79011
79010
|
const [lazyComponentStore, setLazyComponentStore] = React.useState(Object.fromEntries(componentStore));
|
|
79012
79011
|
const newUids = componentUids.filter((uid) => !componentStore.get(uid));
|
|
79013
79012
|
const [loading, setLoading] = React.useState(() => !!newUids.length);
|
|
79014
|
-
const getCustomField =
|
|
79013
|
+
const getCustomField = indexGIVuHJgC.useStrapiApp("useLazyComponents", (state) => state.customFields.get);
|
|
79015
79014
|
React.useEffect(() => {
|
|
79016
79015
|
const setStore = (store) => {
|
|
79017
79016
|
setLazyComponentStore(store);
|
|
@@ -79313,7 +79312,7 @@ const Image = ({ attributes, children, element }) => {
|
|
|
79313
79312
|
const ImageDialog = () => {
|
|
79314
79313
|
const [isOpen, setIsOpen] = React__namespace.useState(true);
|
|
79315
79314
|
const { editor } = useBlocksEditorContext("ImageDialog");
|
|
79316
|
-
const components =
|
|
79315
|
+
const components = indexGIVuHJgC.useStrapiApp("ImageDialog", (state) => state.components);
|
|
79317
79316
|
if (!components || !isOpen)
|
|
79318
79317
|
return null;
|
|
79319
79318
|
const MediaLibraryDialog = components["media-library"];
|
|
@@ -79351,7 +79350,7 @@ const ImageDialog = () => {
|
|
|
79351
79350
|
const nodeImage = {
|
|
79352
79351
|
...expectedImage,
|
|
79353
79352
|
alternativeText: expectedImage.alternativeText || expectedImage.name,
|
|
79354
|
-
url:
|
|
79353
|
+
url: indexGIVuHJgC.prefixFileUrlWithBackendUrl(image3.url)
|
|
79355
79354
|
};
|
|
79356
79355
|
return nodeImage;
|
|
79357
79356
|
});
|
|
@@ -80330,8 +80329,8 @@ const DropPlaceholder = styled__default.default(designSystem.Box)`
|
|
|
80330
80329
|
|
|
80331
80330
|
// Show drop placeholder 8px above or below the drop target
|
|
80332
80331
|
${({ dragDirection, theme, placeholderMargin }) => styled.css`
|
|
80333
|
-
top: ${dragDirection ===
|
|
80334
|
-
bottom: ${dragDirection ===
|
|
80332
|
+
top: ${dragDirection === indexGIVuHJgC.DIRECTIONS.UPWARD && `-${theme.spaces[placeholderMargin]}`};
|
|
80333
|
+
bottom: ${dragDirection === indexGIVuHJgC.DIRECTIONS.DOWNWARD && `-${theme.spaces[placeholderMargin]}`};
|
|
80335
80334
|
`}
|
|
80336
80335
|
`;
|
|
80337
80336
|
const DragItem = styled__default.default(designSystem.Flex)`
|
|
@@ -80402,7 +80401,7 @@ const DragAndDropElement = ({
|
|
|
80402
80401
|
setLiveText(
|
|
80403
80402
|
formatMessage(
|
|
80404
80403
|
{
|
|
80405
|
-
id:
|
|
80404
|
+
id: indexGIVuHJgC.getTranslation("components.Blocks.dnd.reorder"),
|
|
80406
80405
|
defaultMessage: "{item}, moved. New position in the editor: {position}."
|
|
80407
80406
|
},
|
|
80408
80407
|
{
|
|
@@ -80414,8 +80413,8 @@ const DragAndDropElement = ({
|
|
|
80414
80413
|
},
|
|
80415
80414
|
[editor, formatMessage, name2, setLiveText]
|
|
80416
80415
|
);
|
|
80417
|
-
const [{ handlerId, isDragging, isOverDropTarget, direction: direction2 }, blockRef, dropRef, dragRef] =
|
|
80418
|
-
type: `${
|
|
80416
|
+
const [{ handlerId, isDragging, isOverDropTarget, direction: direction2 }, blockRef, dropRef, dragRef] = indexGIVuHJgC.useDragAndDrop(!disabled, {
|
|
80417
|
+
type: `${indexGIVuHJgC.ItemTypes.BLOCKS}_${name2}`,
|
|
80419
80418
|
index,
|
|
80420
80419
|
item: {
|
|
80421
80420
|
index,
|
|
@@ -80482,7 +80481,7 @@ const DragAndDropElement = ({
|
|
|
80482
80481
|
role: "button",
|
|
80483
80482
|
tabIndex: 0,
|
|
80484
80483
|
"aria-label": formatMessage({
|
|
80485
|
-
id:
|
|
80484
|
+
id: indexGIVuHJgC.getTranslation("components.DragHandle-label"),
|
|
80486
80485
|
defaultMessage: "Drag"
|
|
80487
80486
|
}),
|
|
80488
80487
|
onClick: (e2) => e2.stopPropagation(),
|
|
@@ -80508,7 +80507,7 @@ const CloneDragItem = ({ children, dragHandleTopMargin }) => {
|
|
|
80508
80507
|
forwardedAs: "div",
|
|
80509
80508
|
role: "button",
|
|
80510
80509
|
"aria-label": formatMessage({
|
|
80511
|
-
id:
|
|
80510
|
+
id: indexGIVuHJgC.getTranslation("components.DragHandle-label"),
|
|
80512
80511
|
defaultMessage: "Drag"
|
|
80513
80512
|
}),
|
|
80514
80513
|
dragHandleTopMargin,
|
|
@@ -80583,7 +80582,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
|
80583
80582
|
setLiveText(
|
|
80584
80583
|
formatMessage(
|
|
80585
80584
|
{
|
|
80586
|
-
id:
|
|
80585
|
+
id: indexGIVuHJgC.getTranslation("components.Blocks.dnd.reorder"),
|
|
80587
80586
|
defaultMessage: "{item}, moved. New position in the editor: {position}."
|
|
80588
80587
|
},
|
|
80589
80588
|
{
|
|
@@ -80776,7 +80775,14 @@ const EditorLayout$1 = ({
|
|
|
80776
80775
|
}) => {
|
|
80777
80776
|
const { formatMessage } = reactIntl.useIntl();
|
|
80778
80777
|
const { isExpandedMode } = useBlocksEditorContext("editorLayout");
|
|
80779
|
-
|
|
80778
|
+
React__namespace.useEffect(() => {
|
|
80779
|
+
if (isExpandedMode) {
|
|
80780
|
+
document.body.classList.add("lock-body-scroll");
|
|
80781
|
+
}
|
|
80782
|
+
return () => {
|
|
80783
|
+
document.body.classList.remove("lock-body-scroll");
|
|
80784
|
+
};
|
|
80785
|
+
}, [isExpandedMode]);
|
|
80780
80786
|
if (isExpandedMode) {
|
|
80781
80787
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Portal, { role: "dialog", "aria-modal": false, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.FocusTrap, { onEscape: onCollapse, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
80782
80788
|
ExpandWrapper$1,
|
|
@@ -80807,7 +80813,7 @@ const EditorLayout$1 = ({
|
|
|
80807
80813
|
CollapseIconButton,
|
|
80808
80814
|
{
|
|
80809
80815
|
"aria-label": formatMessage({
|
|
80810
|
-
id:
|
|
80816
|
+
id: indexGIVuHJgC.getTranslation("components.Blocks.collapse"),
|
|
80811
80817
|
defaultMessage: "Collapse"
|
|
80812
80818
|
}),
|
|
80813
80819
|
onClick: onCollapse,
|
|
@@ -81014,7 +81020,7 @@ const selectorBlockKeys = [
|
|
|
81014
81020
|
const isSelectorBlockKey = (key2) => {
|
|
81015
81021
|
return typeof key2 === "string" && selectorBlockKeys.includes(key2);
|
|
81016
81022
|
};
|
|
81017
|
-
const [BlocksEditorProvider, usePartialBlocksEditorContext] =
|
|
81023
|
+
const [BlocksEditorProvider, usePartialBlocksEditorContext] = indexGIVuHJgC.$c512c27ab02ef895$export$fd42f52fd3ae1109("BlocksEditor");
|
|
81018
81024
|
function useBlocksEditorContext(consumerName) {
|
|
81019
81025
|
const context = usePartialBlocksEditorContext(consumerName);
|
|
81020
81026
|
const editor = useSlate();
|
|
@@ -81085,7 +81091,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
|
81085
81091
|
};
|
|
81086
81092
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
81087
81093
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { id: ariaDescriptionId, children: formatMessage({
|
|
81088
|
-
id:
|
|
81094
|
+
id: indexGIVuHJgC.getTranslation("components.Blocks.dnd.instruction"),
|
|
81089
81095
|
defaultMessage: `To reorder blocks, press Command or Control along with Shift and the Up or Down arrow keys`
|
|
81090
81096
|
}) }),
|
|
81091
81097
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
|
|
@@ -81119,7 +81125,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
|
81119
81125
|
ExpandIconButton,
|
|
81120
81126
|
{
|
|
81121
81127
|
"aria-label": formatMessage({
|
|
81122
|
-
id:
|
|
81128
|
+
id: indexGIVuHJgC.getTranslation("components.Blocks.expand"),
|
|
81123
81129
|
defaultMessage: "Expand"
|
|
81124
81130
|
}),
|
|
81125
81131
|
onClick: handleToggleExpand,
|
|
@@ -81140,7 +81146,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
|
81140
81146
|
const BlocksInput = React__namespace.forwardRef(
|
|
81141
81147
|
({ label: label2, name: name2, required = false, hint, ...editorProps }, forwardedRef) => {
|
|
81142
81148
|
const id2 = React__namespace.useId();
|
|
81143
|
-
const field =
|
|
81149
|
+
const field = indexGIVuHJgC.useField(name2);
|
|
81144
81150
|
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: [
|
|
81145
81151
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: label2 }),
|
|
81146
81152
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -81209,7 +81215,7 @@ const prepareTempKeys = traverseData(
|
|
|
81209
81215
|
(attribute2) => attribute2.type === "component" && attribute2.repeatable || attribute2.type === "dynamiczone",
|
|
81210
81216
|
(data) => {
|
|
81211
81217
|
if (Array.isArray(data) && data.length > 0) {
|
|
81212
|
-
const keys =
|
|
81218
|
+
const keys = indexGIVuHJgC.generateNKeysBetween(void 0, void 0, data.length);
|
|
81213
81219
|
return data.map((datum, index) => ({
|
|
81214
81220
|
...datum,
|
|
81215
81221
|
__temp_key__: keys[index]
|
|
@@ -81222,7 +81228,7 @@ const removeFieldsThatDontExistOnSchema = (schema) => (data) => {
|
|
|
81222
81228
|
const schemaKeys = Object.keys(schema.attributes);
|
|
81223
81229
|
const dataKeys = Object.keys(data);
|
|
81224
81230
|
const keysToRemove = dataKeys.filter((key2) => !schemaKeys.includes(key2));
|
|
81225
|
-
const revisedData = [...keysToRemove, ...
|
|
81231
|
+
const revisedData = [...keysToRemove, ...indexGIVuHJgC.DOCUMENT_META_FIELDS].reduce((acc, key2) => {
|
|
81226
81232
|
delete acc[key2];
|
|
81227
81233
|
return acc;
|
|
81228
81234
|
}, structuredClone(data));
|
|
@@ -81269,7 +81275,7 @@ const createDefaultForm = (contentType, components = {}) => {
|
|
|
81269
81275
|
};
|
|
81270
81276
|
const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
81271
81277
|
const { formatMessage } = reactIntl.useIntl();
|
|
81272
|
-
const field =
|
|
81278
|
+
const field = indexGIVuHJgC.useField(name2);
|
|
81273
81279
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
81274
81280
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
81275
81281
|
designSystem.Box,
|
|
@@ -81286,7 +81292,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
|
81286
81292
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
|
|
81287
81293
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
|
|
81288
81294
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
|
|
81289
|
-
id:
|
|
81295
|
+
id: indexGIVuHJgC.getTranslation("components.empty-repeatable"),
|
|
81290
81296
|
defaultMessage: "No entry yet. Click on the button below to add one."
|
|
81291
81297
|
}) }) })
|
|
81292
81298
|
] })
|
|
@@ -81308,12 +81314,12 @@ const CircleIcon = styled__default.default(Icons.PlusCircle)`
|
|
|
81308
81314
|
const NonRepeatableComponent = ({ attribute: attribute2, name: name2 }) => {
|
|
81309
81315
|
const {
|
|
81310
81316
|
edit: { components }
|
|
81311
|
-
} =
|
|
81312
|
-
const { value } =
|
|
81313
|
-
const level =
|
|
81317
|
+
} = indexGIVuHJgC.useDocLayout();
|
|
81318
|
+
const { value } = indexGIVuHJgC.useField(name2);
|
|
81319
|
+
const level = indexGIVuHJgC.useComponent("NonRepeatableComponent", (state) => state.level);
|
|
81314
81320
|
const { layout } = components[attribute2.component];
|
|
81315
81321
|
const isNested = level > 0;
|
|
81316
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
81322
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.ComponentProvider, { id: value?.id, uid: attribute2.component, level: level + 1, type: "component", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
81317
81323
|
designSystem.Box,
|
|
81318
81324
|
{
|
|
81319
81325
|
background: "neutral100",
|
|
@@ -81338,17 +81344,18 @@ const RepeatableComponent = ({
|
|
|
81338
81344
|
name: name2,
|
|
81339
81345
|
mainField
|
|
81340
81346
|
}) => {
|
|
81341
|
-
const { toggleNotification } =
|
|
81347
|
+
const { toggleNotification } = indexGIVuHJgC.useNotification();
|
|
81342
81348
|
const { formatMessage } = reactIntl.useIntl();
|
|
81343
|
-
const {
|
|
81344
|
-
const
|
|
81345
|
-
const
|
|
81346
|
-
const
|
|
81347
|
-
const
|
|
81349
|
+
const { search: searchString } = reactRouterDom.useLocation();
|
|
81350
|
+
const search = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
81351
|
+
const { components } = indexGIVuHJgC.useDoc();
|
|
81352
|
+
const { value = [], error: error2 } = indexGIVuHJgC.useField(name2);
|
|
81353
|
+
const addFieldRow = indexGIVuHJgC.useForm("RepeatableComponent", (state) => state.addFieldRow);
|
|
81354
|
+
const moveFieldRow = indexGIVuHJgC.useForm("RepeatableComponent", (state) => state.moveFieldRow);
|
|
81355
|
+
const removeFieldRow = indexGIVuHJgC.useForm("RepeatableComponent", (state) => state.removeFieldRow);
|
|
81348
81356
|
const { max = Infinity } = attribute2;
|
|
81349
81357
|
const [collapseToOpen, setCollapseToOpen] = React__namespace.useState(null);
|
|
81350
81358
|
const [liveText, setLiveText] = React__namespace.useState("");
|
|
81351
|
-
const search = helperPlugin.useQuery();
|
|
81352
81359
|
const componentTmpKeyWithFocussedField = React__namespace.useMemo(() => {
|
|
81353
81360
|
if (search.has("field")) {
|
|
81354
81361
|
const fieldParam = search.get("field");
|
|
@@ -81356,9 +81363,9 @@ const RepeatableComponent = ({
|
|
|
81356
81363
|
return void 0;
|
|
81357
81364
|
}
|
|
81358
81365
|
const [, path3] = fieldParam.split(`${name2}.`);
|
|
81359
|
-
if (
|
|
81366
|
+
if (indexGIVuHJgC.getIn(value, path3, void 0) !== void 0) {
|
|
81360
81367
|
const [subpath] = path3.split(".");
|
|
81361
|
-
return
|
|
81368
|
+
return indexGIVuHJgC.getIn(value, subpath, void 0)?.__temp_key__;
|
|
81362
81369
|
}
|
|
81363
81370
|
}
|
|
81364
81371
|
return void 0;
|
|
@@ -81381,7 +81388,7 @@ const RepeatableComponent = ({
|
|
|
81381
81388
|
toggleNotification({
|
|
81382
81389
|
type: "info",
|
|
81383
81390
|
message: formatMessage({
|
|
81384
|
-
id:
|
|
81391
|
+
id: indexGIVuHJgC.getTranslation("components.notification.info.maximum-requirement")
|
|
81385
81392
|
})
|
|
81386
81393
|
});
|
|
81387
81394
|
}
|
|
@@ -81390,7 +81397,7 @@ const RepeatableComponent = ({
|
|
|
81390
81397
|
setLiveText(
|
|
81391
81398
|
formatMessage(
|
|
81392
81399
|
{
|
|
81393
|
-
id:
|
|
81400
|
+
id: indexGIVuHJgC.getTranslation("dnd.reorder"),
|
|
81394
81401
|
defaultMessage: "{item}, moved. New position in list: {position}."
|
|
81395
81402
|
},
|
|
81396
81403
|
{
|
|
@@ -81413,7 +81420,7 @@ const RepeatableComponent = ({
|
|
|
81413
81420
|
setLiveText(
|
|
81414
81421
|
formatMessage(
|
|
81415
81422
|
{
|
|
81416
|
-
id:
|
|
81423
|
+
id: indexGIVuHJgC.getTranslation("dnd.cancel-item"),
|
|
81417
81424
|
defaultMessage: "{item}, dropped. Re-order cancelled."
|
|
81418
81425
|
},
|
|
81419
81426
|
{
|
|
@@ -81426,7 +81433,7 @@ const RepeatableComponent = ({
|
|
|
81426
81433
|
setLiveText(
|
|
81427
81434
|
formatMessage(
|
|
81428
81435
|
{
|
|
81429
|
-
id:
|
|
81436
|
+
id: indexGIVuHJgC.getTranslation("dnd.grab-item"),
|
|
81430
81437
|
defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`
|
|
81431
81438
|
},
|
|
81432
81439
|
{
|
|
@@ -81440,7 +81447,7 @@ const RepeatableComponent = ({
|
|
|
81440
81447
|
setLiveText(
|
|
81441
81448
|
formatMessage(
|
|
81442
81449
|
{
|
|
81443
|
-
id:
|
|
81450
|
+
id: indexGIVuHJgC.getTranslation("dnd.drop-item"),
|
|
81444
81451
|
defaultMessage: `{item}, dropped. Final position in list: {position}.`
|
|
81445
81452
|
},
|
|
81446
81453
|
{
|
|
@@ -81451,20 +81458,20 @@ const RepeatableComponent = ({
|
|
|
81451
81458
|
);
|
|
81452
81459
|
};
|
|
81453
81460
|
const ariaDescriptionId = React__namespace.useId();
|
|
81454
|
-
const level =
|
|
81461
|
+
const level = indexGIVuHJgC.useComponent("RepeatableComponent", (state) => state.level);
|
|
81455
81462
|
if (value.length === 0) {
|
|
81456
81463
|
return /* @__PURE__ */ jsxRuntime.jsx(Initializer, { disabled, name: name2, onClick: handleClick });
|
|
81457
81464
|
}
|
|
81458
81465
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { hasRadius: true, children: [
|
|
81459
81466
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { id: ariaDescriptionId, children: formatMessage({
|
|
81460
|
-
id:
|
|
81467
|
+
id: indexGIVuHJgC.getTranslation("dnd.instructions"),
|
|
81461
81468
|
defaultMessage: `Press spacebar to grab and re-order`
|
|
81462
81469
|
}) }),
|
|
81463
81470
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
|
|
81464
81471
|
/* @__PURE__ */ jsxRuntime.jsxs(AccordionGroup, { error: error2, children: [
|
|
81465
81472
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { "aria-describedby": ariaDescriptionId, children: value.map(({ __temp_key__: key2, id: id2 }, index) => {
|
|
81466
81473
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
81467
|
-
|
|
81474
|
+
indexGIVuHJgC.ComponentProvider,
|
|
81468
81475
|
{
|
|
81469
81476
|
id: id2,
|
|
81470
81477
|
uid: attribute2.component,
|
|
@@ -81496,7 +81503,7 @@ const RepeatableComponent = ({
|
|
|
81496
81503
|
);
|
|
81497
81504
|
}) }),
|
|
81498
81505
|
/* @__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({
|
|
81499
|
-
id:
|
|
81506
|
+
id: indexGIVuHJgC.getTranslation("containers.EditView.add.new-entry"),
|
|
81500
81507
|
defaultMessage: "Add an entry"
|
|
81501
81508
|
}) }) }) })
|
|
81502
81509
|
] })
|
|
@@ -81611,15 +81618,15 @@ const Component = ({
|
|
|
81611
81618
|
const { formatMessage } = reactIntl.useIntl();
|
|
81612
81619
|
const {
|
|
81613
81620
|
edit: { components }
|
|
81614
|
-
} =
|
|
81621
|
+
} = indexGIVuHJgC.useDocLayout();
|
|
81615
81622
|
const { layout } = components[attribute2.component];
|
|
81616
|
-
const displayValue =
|
|
81617
|
-
return
|
|
81623
|
+
const displayValue = indexGIVuHJgC.useForm("RepeatableComponent", (state) => {
|
|
81624
|
+
return indexGIVuHJgC.getIn(state.values, [...name2.split("."), mainField.name]);
|
|
81618
81625
|
});
|
|
81619
81626
|
const accordionRef = React__namespace.useRef(null);
|
|
81620
81627
|
const componentKey = name2.split(".").slice(0, -1).join(".");
|
|
81621
|
-
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] =
|
|
81622
|
-
type: `${
|
|
81628
|
+
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] = indexGIVuHJgC.useDragAndDrop(!disabled, {
|
|
81629
|
+
type: `${indexGIVuHJgC.ItemTypes.COMPONENT}_${componentKey}`,
|
|
81623
81630
|
index,
|
|
81624
81631
|
item: {
|
|
81625
81632
|
index,
|
|
@@ -81631,7 +81638,7 @@ const Component = ({
|
|
|
81631
81638
|
...dragProps
|
|
81632
81639
|
});
|
|
81633
81640
|
React__namespace.useEffect(() => {
|
|
81634
|
-
dragPreviewRef(
|
|
81641
|
+
dragPreviewRef(indexGIVuHJgC.getEmptyImage(), { captureDraggingState: false });
|
|
81635
81642
|
}, [dragPreviewRef, index]);
|
|
81636
81643
|
const composedAccordionRefs = designSystem.useComposedRefs(accordionRef, dragRef);
|
|
81637
81644
|
const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
|
|
@@ -81647,7 +81654,7 @@ const Component = ({
|
|
|
81647
81654
|
borderWidth: 0,
|
|
81648
81655
|
onClick: onDeleteComponent,
|
|
81649
81656
|
label: formatMessage({
|
|
81650
|
-
id:
|
|
81657
|
+
id: indexGIVuHJgC.getTranslation("containers.Edit.delete"),
|
|
81651
81658
|
defaultMessage: "Delete"
|
|
81652
81659
|
}),
|
|
81653
81660
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
|
|
@@ -81665,7 +81672,7 @@ const Component = ({
|
|
|
81665
81672
|
onClick: (e2) => e2.stopPropagation(),
|
|
81666
81673
|
"data-handler-id": handlerId,
|
|
81667
81674
|
label: formatMessage({
|
|
81668
|
-
id:
|
|
81675
|
+
id: indexGIVuHJgC.getTranslation("components.DragHandle-label"),
|
|
81669
81676
|
defaultMessage: "Drag"
|
|
81670
81677
|
}),
|
|
81671
81678
|
onKeyDown: handleKeyDown,
|
|
@@ -81712,9 +81719,9 @@ const ComponentInput = ({
|
|
|
81712
81719
|
...props
|
|
81713
81720
|
}) => {
|
|
81714
81721
|
const { formatMessage } = reactIntl.useIntl();
|
|
81715
|
-
const field =
|
|
81722
|
+
const field = indexGIVuHJgC.useField(name2);
|
|
81716
81723
|
const showResetComponent = !attribute2.repeatable && field.value && !disabled;
|
|
81717
|
-
const { components } =
|
|
81724
|
+
const { components } = indexGIVuHJgC.useDoc();
|
|
81718
81725
|
const handleInitialisationClick = () => {
|
|
81719
81726
|
const schema = components[attribute2.component];
|
|
81720
81727
|
const form = createDefaultForm(schema, components);
|
|
@@ -81746,7 +81753,7 @@ const ComponentInput = ({
|
|
|
81746
81753
|
designSystem.IconButton,
|
|
81747
81754
|
{
|
|
81748
81755
|
label: formatMessage({
|
|
81749
|
-
id:
|
|
81756
|
+
id: indexGIVuHJgC.getTranslation("components.reset-entry"),
|
|
81750
81757
|
defaultMessage: "Reset Entry"
|
|
81751
81758
|
}),
|
|
81752
81759
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {}),
|
|
@@ -81951,7 +81958,7 @@ const ComponentPicker = ({
|
|
|
81951
81958
|
hasRadius: true,
|
|
81952
81959
|
children: [
|
|
81953
81960
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral600", children: formatMessage({
|
|
81954
|
-
id:
|
|
81961
|
+
id: indexGIVuHJgC.getTranslation("components.DynamicZone.ComponentPicker-label"),
|
|
81955
81962
|
defaultMessage: "Pick one component"
|
|
81956
81963
|
}) }) }),
|
|
81957
81964
|
/* @__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(
|
|
@@ -81985,13 +81992,13 @@ const DynamicComponent = ({
|
|
|
81985
81992
|
}) => {
|
|
81986
81993
|
const [isOpen, setIsOpen] = React__namespace.useState(true);
|
|
81987
81994
|
const { formatMessage } = reactIntl.useIntl();
|
|
81988
|
-
const formValues =
|
|
81995
|
+
const formValues = indexGIVuHJgC.useForm("DynamicComponent", (state) => state.values);
|
|
81989
81996
|
const {
|
|
81990
81997
|
edit: { components }
|
|
81991
|
-
} =
|
|
81998
|
+
} = indexGIVuHJgC.useDocLayout();
|
|
81992
81999
|
const title = React__namespace.useMemo(() => {
|
|
81993
82000
|
const { mainField } = components[componentUid]?.settings ?? { mainField: "id" };
|
|
81994
|
-
const mainFieldValue =
|
|
82001
|
+
const mainFieldValue = indexGIVuHJgC.getIn(formValues, `${name2}.${index}.${mainField}`);
|
|
81995
82002
|
const displayedValue = mainField === "id" ? "" : String(mainFieldValue).trim();
|
|
81996
82003
|
const mainValue = displayedValue.length > 0 ? `- ${displayedValue}` : displayedValue;
|
|
81997
82004
|
return mainValue;
|
|
@@ -82006,8 +82013,8 @@ const DynamicComponent = ({
|
|
|
82006
82013
|
const handleToggle = () => {
|
|
82007
82014
|
setIsOpen((s) => !s);
|
|
82008
82015
|
};
|
|
82009
|
-
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] =
|
|
82010
|
-
type: `${
|
|
82016
|
+
const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] = indexGIVuHJgC.useDragAndDrop(!disabled, {
|
|
82017
|
+
type: `${indexGIVuHJgC.ItemTypes.DYNAMIC_ZONE}_${name2}`,
|
|
82011
82018
|
index,
|
|
82012
82019
|
item: {
|
|
82013
82020
|
index,
|
|
@@ -82020,7 +82027,7 @@ const DynamicComponent = ({
|
|
|
82020
82027
|
onCancel
|
|
82021
82028
|
});
|
|
82022
82029
|
React__namespace.useEffect(() => {
|
|
82023
|
-
dragPreviewRef(
|
|
82030
|
+
dragPreviewRef(indexGIVuHJgC.getEmptyImage(), { captureDraggingState: false });
|
|
82024
82031
|
}, [dragPreviewRef, index]);
|
|
82025
82032
|
const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
|
|
82026
82033
|
const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(ActionsFlex, { gap: 0, children: [
|
|
@@ -82030,7 +82037,7 @@ const DynamicComponent = ({
|
|
|
82030
82037
|
borderWidth: 0,
|
|
82031
82038
|
label: formatMessage(
|
|
82032
82039
|
{
|
|
82033
|
-
id:
|
|
82040
|
+
id: indexGIVuHJgC.getTranslation("components.DynamicZone.delete-label"),
|
|
82034
82041
|
defaultMessage: "Delete {name}"
|
|
82035
82042
|
},
|
|
82036
82043
|
{ name: title }
|
|
@@ -82050,7 +82057,7 @@ const DynamicComponent = ({
|
|
|
82050
82057
|
"data-handler-id": handlerId,
|
|
82051
82058
|
ref: dragRef,
|
|
82052
82059
|
label: formatMessage({
|
|
82053
|
-
id:
|
|
82060
|
+
id: indexGIVuHJgC.getTranslation("components.DragHandle-label"),
|
|
82054
82061
|
defaultMessage: "Drag"
|
|
82055
82062
|
}),
|
|
82056
82063
|
onKeyDown: handleKeyDown,
|
|
@@ -82061,14 +82068,14 @@ const DynamicComponent = ({
|
|
|
82061
82068
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.Trigger, { size: "S", endIcon: null, paddingLeft: 2, paddingRight: 2, children: [
|
|
82062
82069
|
/* @__PURE__ */ jsxRuntime.jsx(Icons.More, { "aria-hidden": true, focusable: false }),
|
|
82063
82070
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { as: "span", children: formatMessage({
|
|
82064
|
-
id:
|
|
82071
|
+
id: indexGIVuHJgC.getTranslation("components.DynamicZone.more-actions"),
|
|
82065
82072
|
defaultMessage: "More actions"
|
|
82066
82073
|
}) })
|
|
82067
82074
|
] }),
|
|
82068
82075
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.Content, { children: [
|
|
82069
82076
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.SubRoot, { children: [
|
|
82070
82077
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubTrigger, { children: formatMessage({
|
|
82071
|
-
id:
|
|
82078
|
+
id: indexGIVuHJgC.getTranslation("components.DynamicZone.add-item-above"),
|
|
82072
82079
|
defaultMessage: "Add component above"
|
|
82073
82080
|
}) }),
|
|
82074
82081
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubContent, { children: Object.entries(dynamicComponentsByCategory).map(([category, components2]) => /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
|
@@ -82078,7 +82085,7 @@ const DynamicComponent = ({
|
|
|
82078
82085
|
] }),
|
|
82079
82086
|
/* @__PURE__ */ jsxRuntime.jsxs(v2.Menu.SubRoot, { children: [
|
|
82080
82087
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubTrigger, { children: formatMessage({
|
|
82081
|
-
id:
|
|
82088
|
+
id: indexGIVuHJgC.getTranslation("components.DynamicZone.add-item-below"),
|
|
82082
82089
|
defaultMessage: "Add component below"
|
|
82083
82090
|
}) }),
|
|
82084
82091
|
/* @__PURE__ */ jsxRuntime.jsx(v2.Menu.SubContent, { children: Object.entries(dynamicComponentsByCategory).map(([category, components2]) => /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
|
@@ -82187,7 +82194,7 @@ const DynamicZoneLabel = ({
|
|
|
82187
82194
|
}
|
|
82188
82195
|
) });
|
|
82189
82196
|
};
|
|
82190
|
-
const [DynamicZoneProvider, useDynamicZone] =
|
|
82197
|
+
const [DynamicZoneProvider, useDynamicZone] = indexGIVuHJgC.createContext(
|
|
82191
82198
|
"DynamicZone",
|
|
82192
82199
|
{
|
|
82193
82200
|
isInDynamicZone: false
|
|
@@ -82204,8 +82211,8 @@ const DynamicZone = ({
|
|
|
82204
82211
|
const { max = Infinity, min = -Infinity } = attribute2 ?? {};
|
|
82205
82212
|
const [addComponentIsOpen, setAddComponentIsOpen] = React__namespace.useState(false);
|
|
82206
82213
|
const [liveText, setLiveText] = React__namespace.useState("");
|
|
82207
|
-
const { components } =
|
|
82208
|
-
const { addFieldRow, removeFieldRow, moveFieldRow } =
|
|
82214
|
+
const { components } = indexGIVuHJgC.useDoc();
|
|
82215
|
+
const { addFieldRow, removeFieldRow, moveFieldRow } = indexGIVuHJgC.useForm(
|
|
82209
82216
|
"DynamicZone",
|
|
82210
82217
|
({ addFieldRow: addFieldRow2, removeFieldRow: removeFieldRow2, moveFieldRow: moveFieldRow2 }) => ({
|
|
82211
82218
|
addFieldRow: addFieldRow2,
|
|
@@ -82213,7 +82220,7 @@ const DynamicZone = ({
|
|
|
82213
82220
|
moveFieldRow: moveFieldRow2
|
|
82214
82221
|
})
|
|
82215
82222
|
);
|
|
82216
|
-
const { value = [], error: error2 } =
|
|
82223
|
+
const { value = [], error: error2 } = indexGIVuHJgC.useField(
|
|
82217
82224
|
name2
|
|
82218
82225
|
);
|
|
82219
82226
|
const dynamicComponentsByCategory = React__namespace.useMemo(() => {
|
|
@@ -82228,7 +82235,7 @@ const DynamicZone = ({
|
|
|
82228
82235
|
}, {});
|
|
82229
82236
|
}, [attribute2.components, components]);
|
|
82230
82237
|
const { formatMessage } = reactIntl.useIntl();
|
|
82231
|
-
const { toggleNotification } =
|
|
82238
|
+
const { toggleNotification } = indexGIVuHJgC.useNotification();
|
|
82232
82239
|
const dynamicDisplayedComponentsLength = value.length;
|
|
82233
82240
|
const handleAddComponent = (uid, position) => {
|
|
82234
82241
|
setAddComponentIsOpen(false);
|
|
@@ -82248,7 +82255,7 @@ const DynamicZone = ({
|
|
|
82248
82255
|
toggleNotification({
|
|
82249
82256
|
type: "info",
|
|
82250
82257
|
message: formatMessage({
|
|
82251
|
-
id:
|
|
82258
|
+
id: indexGIVuHJgC.getTranslation("components.notification.info.maximum-requirement")
|
|
82252
82259
|
})
|
|
82253
82260
|
});
|
|
82254
82261
|
}
|
|
@@ -82257,7 +82264,7 @@ const DynamicZone = ({
|
|
|
82257
82264
|
setLiveText(
|
|
82258
82265
|
formatMessage(
|
|
82259
82266
|
{
|
|
82260
|
-
id:
|
|
82267
|
+
id: indexGIVuHJgC.getTranslation("dnd.reorder"),
|
|
82261
82268
|
defaultMessage: "{item}, moved. New position in list: {position}."
|
|
82262
82269
|
},
|
|
82263
82270
|
{
|
|
@@ -82273,7 +82280,7 @@ const DynamicZone = ({
|
|
|
82273
82280
|
setLiveText(
|
|
82274
82281
|
formatMessage(
|
|
82275
82282
|
{
|
|
82276
|
-
id:
|
|
82283
|
+
id: indexGIVuHJgC.getTranslation("dnd.cancel-item"),
|
|
82277
82284
|
defaultMessage: "{item}, dropped. Re-order cancelled."
|
|
82278
82285
|
},
|
|
82279
82286
|
{
|
|
@@ -82286,7 +82293,7 @@ const DynamicZone = ({
|
|
|
82286
82293
|
setLiveText(
|
|
82287
82294
|
formatMessage(
|
|
82288
82295
|
{
|
|
82289
|
-
id:
|
|
82296
|
+
id: indexGIVuHJgC.getTranslation("dnd.grab-item"),
|
|
82290
82297
|
defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`
|
|
82291
82298
|
},
|
|
82292
82299
|
{
|
|
@@ -82300,7 +82307,7 @@ const DynamicZone = ({
|
|
|
82300
82307
|
setLiveText(
|
|
82301
82308
|
formatMessage(
|
|
82302
82309
|
{
|
|
82303
|
-
id:
|
|
82310
|
+
id: indexGIVuHJgC.getTranslation("dnd.drop-item"),
|
|
82304
82311
|
defaultMessage: `{item}, dropped. Final position in list: {position}.`
|
|
82305
82312
|
},
|
|
82306
82313
|
{
|
|
@@ -82321,7 +82328,7 @@ const DynamicZone = ({
|
|
|
82321
82328
|
if (hasError && dynamicDisplayedComponentsLength > max) {
|
|
82322
82329
|
return formatMessage(
|
|
82323
82330
|
{
|
|
82324
|
-
id:
|
|
82331
|
+
id: indexGIVuHJgC.getTranslation(`components.DynamicZone.extra-components`),
|
|
82325
82332
|
defaultMessage: "There {number, plural, =0 {are # extra components} one {is # extra component} other {are # extra components}}"
|
|
82326
82333
|
},
|
|
82327
82334
|
{
|
|
@@ -82332,7 +82339,7 @@ const DynamicZone = ({
|
|
|
82332
82339
|
if (hasError && dynamicDisplayedComponentsLength < min) {
|
|
82333
82340
|
return formatMessage(
|
|
82334
82341
|
{
|
|
82335
|
-
id:
|
|
82342
|
+
id: indexGIVuHJgC.getTranslation(`components.DynamicZone.missing-components`),
|
|
82336
82343
|
defaultMessage: "There {number, plural, =0 {are # missing components} one {is # missing component} other {are # missing components}}"
|
|
82337
82344
|
},
|
|
82338
82345
|
{ number: min - dynamicDisplayedComponentsLength }
|
|
@@ -82340,13 +82347,13 @@ const DynamicZone = ({
|
|
|
82340
82347
|
}
|
|
82341
82348
|
return formatMessage(
|
|
82342
82349
|
{
|
|
82343
|
-
id:
|
|
82350
|
+
id: indexGIVuHJgC.getTranslation("components.DynamicZone.add-component"),
|
|
82344
82351
|
defaultMessage: "Add a component to {componentName}"
|
|
82345
82352
|
},
|
|
82346
82353
|
{ componentName: label2 || name2 }
|
|
82347
82354
|
);
|
|
82348
82355
|
};
|
|
82349
|
-
const level =
|
|
82356
|
+
const level = indexGIVuHJgC.useComponent("DynamicZone", (state) => state.level);
|
|
82350
82357
|
const ariaDescriptionId = React__namespace.useId();
|
|
82351
82358
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicZoneProvider, { isInDynamicZone: true, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
82352
82359
|
dynamicDisplayedComponentsLength > 0 && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
@@ -82361,12 +82368,12 @@ const DynamicZone = ({
|
|
|
82361
82368
|
}
|
|
82362
82369
|
),
|
|
82363
82370
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { id: ariaDescriptionId, children: formatMessage({
|
|
82364
|
-
id:
|
|
82371
|
+
id: indexGIVuHJgC.getTranslation("dnd.instructions"),
|
|
82365
82372
|
defaultMessage: `Press spacebar to grab and re-order`
|
|
82366
82373
|
}) }),
|
|
82367
82374
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
|
|
82368
82375
|
/* @__PURE__ */ jsxRuntime.jsx("ol", { "aria-describedby": ariaDescriptionId, children: value.map((field, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
82369
|
-
|
|
82376
|
+
indexGIVuHJgC.ComponentProvider,
|
|
82370
82377
|
{
|
|
82371
82378
|
level: level + 1,
|
|
82372
82379
|
uid: field.__component,
|
|
@@ -82412,7 +82419,7 @@ const DynamicZone = ({
|
|
|
82412
82419
|
)
|
|
82413
82420
|
] }) });
|
|
82414
82421
|
};
|
|
82415
|
-
const uidApi =
|
|
82422
|
+
const uidApi = indexGIVuHJgC.contentManagerApi.injectEndpoints({
|
|
82416
82423
|
endpoints: (builder) => ({
|
|
82417
82424
|
getDefaultUID: builder.query({
|
|
82418
82425
|
query: ({ params, ...data }) => {
|
|
@@ -82454,17 +82461,17 @@ const { useGenerateUIDMutation, useGetDefaultUIDQuery, useGetAvailabilityQuery }
|
|
|
82454
82461
|
const UID_REGEX = /^[A-Za-z0-9-_.~]*$/;
|
|
82455
82462
|
const UIDInput = React__namespace.forwardRef(
|
|
82456
82463
|
({ hint, disabled, label: label2, name: name2, placeholder, required }, ref) => {
|
|
82457
|
-
const { model, id: id2 } =
|
|
82458
|
-
const allFormValues =
|
|
82464
|
+
const { model, id: id2 } = indexGIVuHJgC.useDoc();
|
|
82465
|
+
const allFormValues = indexGIVuHJgC.useForm("InputUID", (form) => form.values);
|
|
82459
82466
|
const [availability, setAvailability] = React__namespace.useState();
|
|
82460
82467
|
const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
|
|
82461
|
-
const field =
|
|
82468
|
+
const field = indexGIVuHJgC.useField(name2);
|
|
82462
82469
|
const debouncedValue = useDebounce(field.value, 300);
|
|
82463
|
-
const { toggleNotification } =
|
|
82464
|
-
const { _unstableFormatAPIError: formatAPIError } =
|
|
82470
|
+
const { toggleNotification } = indexGIVuHJgC.useNotification();
|
|
82471
|
+
const { _unstableFormatAPIError: formatAPIError } = indexGIVuHJgC.useAPIErrorHandler();
|
|
82465
82472
|
const { formatMessage } = reactIntl.useIntl();
|
|
82466
|
-
const [{ query }] =
|
|
82467
|
-
const params = React__namespace.useMemo(() =>
|
|
82473
|
+
const [{ query }] = indexGIVuHJgC.useQueryParams();
|
|
82474
|
+
const params = React__namespace.useMemo(() => indexGIVuHJgC.buildValidParams(query), [query]);
|
|
82468
82475
|
const {
|
|
82469
82476
|
data: defaultGeneratedUID,
|
|
82470
82477
|
isLoading: isGeneratingDefaultUID,
|
|
@@ -82563,7 +82570,7 @@ const UIDInput = React__namespace.forwardRef(
|
|
|
82563
82570
|
};
|
|
82564
82571
|
}, [availabilityData]);
|
|
82565
82572
|
const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
|
|
82566
|
-
const fieldRef =
|
|
82573
|
+
const fieldRef = indexGIVuHJgC.useFocusInputField(name2);
|
|
82567
82574
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
82568
82575
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
82569
82576
|
designSystem.TextInput,
|
|
@@ -83363,7 +83370,14 @@ const EditorLayout = ({
|
|
|
83363
83370
|
onCollapse
|
|
83364
83371
|
}) => {
|
|
83365
83372
|
const { formatMessage } = reactIntl.useIntl();
|
|
83366
|
-
|
|
83373
|
+
React__namespace.useEffect(() => {
|
|
83374
|
+
if (isExpandMode) {
|
|
83375
|
+
document.body.classList.add("lock-body-scroll");
|
|
83376
|
+
}
|
|
83377
|
+
return () => {
|
|
83378
|
+
document.body.classList.remove("lock-body-scroll");
|
|
83379
|
+
};
|
|
83380
|
+
}, [isExpandMode]);
|
|
83367
83381
|
if (isExpandMode) {
|
|
83368
83382
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Portal, { role: "dialog", "aria-modal": false, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.FocusTrap, { onEscape: onCollapse, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
83369
83383
|
ExpandWrapper,
|
|
@@ -83969,7 +83983,7 @@ const StyledFlex = styled__default.default(designSystem.Flex)`
|
|
|
83969
83983
|
`;
|
|
83970
83984
|
const Wysiwyg = React__namespace.forwardRef(
|
|
83971
83985
|
({ hint, disabled, label: label2, name: name2, placeholder, required }, forwardedRef) => {
|
|
83972
|
-
const field =
|
|
83986
|
+
const field = indexGIVuHJgC.useField(name2);
|
|
83973
83987
|
const textareaRef = React__namespace.useRef(null);
|
|
83974
83988
|
const editorRef = React__namespace.useRef(
|
|
83975
83989
|
null
|
|
@@ -83977,7 +83991,7 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
|
83977
83991
|
const [isPreviewMode, setIsPreviewMode] = React__namespace.useState(false);
|
|
83978
83992
|
const [mediaLibVisible, setMediaLibVisible] = React__namespace.useState(false);
|
|
83979
83993
|
const [isExpandMode, setIsExpandMode] = React__namespace.useState(false);
|
|
83980
|
-
const components =
|
|
83994
|
+
const components = indexGIVuHJgC.useStrapiApp("ImageDialog", (state) => state.components);
|
|
83981
83995
|
const MediaLibraryDialog = components["media-library"];
|
|
83982
83996
|
const handleToggleMediaLib = () => setMediaLibVisible((prev) => !prev);
|
|
83983
83997
|
const handleTogglePreviewMode = () => setIsPreviewMode((prev) => !prev);
|
|
@@ -84025,7 +84039,7 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
|
84025
84039
|
const handleSelectAssets = (files) => {
|
|
84026
84040
|
const formattedFiles = files.map((f) => ({
|
|
84027
84041
|
alt: f.alternativeText || f.name,
|
|
84028
|
-
url:
|
|
84042
|
+
url: indexGIVuHJgC.prefixFileUrlWithBackendUrl(f.url),
|
|
84029
84043
|
mime: f.mime
|
|
84030
84044
|
}));
|
|
84031
84045
|
insertFile(editorRef, formattedFiles);
|
|
@@ -84083,18 +84097,18 @@ const Wysiwyg = React__namespace.forwardRef(
|
|
|
84083
84097
|
}
|
|
84084
84098
|
);
|
|
84085
84099
|
const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
84086
|
-
const { id: id2 } =
|
|
84087
|
-
const isFormDisabled =
|
|
84100
|
+
const { id: id2 } = indexGIVuHJgC.useDoc();
|
|
84101
|
+
const isFormDisabled = indexGIVuHJgC.useForm("InputRenderer", (state) => state.disabled);
|
|
84088
84102
|
const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
|
|
84089
|
-
const canCreateFields =
|
|
84090
|
-
const canReadFields =
|
|
84091
|
-
const canUpdateFields =
|
|
84092
|
-
const canUserAction =
|
|
84103
|
+
const canCreateFields = indexGIVuHJgC.useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
|
|
84104
|
+
const canReadFields = indexGIVuHJgC.useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
|
|
84105
|
+
const canUpdateFields = indexGIVuHJgC.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
|
|
84106
|
+
const canUserAction = indexGIVuHJgC.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
|
|
84093
84107
|
const editableFields = id2 ? canUpdateFields : canCreateFields;
|
|
84094
84108
|
const readableFields = id2 ? canReadFields : canCreateFields;
|
|
84095
84109
|
const canUserReadField = canUserAction(props.name, readableFields, props.type);
|
|
84096
84110
|
const canUserEditField = canUserAction(props.name, editableFields, props.type);
|
|
84097
|
-
const fields =
|
|
84111
|
+
const fields = indexGIVuHJgC.useStrapiApp("InputRenderer", (app) => app.fields);
|
|
84098
84112
|
const { lazyComponentStore } = useLazyComponents(
|
|
84099
84113
|
attributeHasCustomFieldProperty(props.attribute) ? [props.attribute.customField] : void 0
|
|
84100
84114
|
);
|
|
@@ -84112,7 +84126,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
|
84112
84126
|
return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
|
|
84113
84127
|
} else {
|
|
84114
84128
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84115
|
-
|
|
84129
|
+
indexGIVuHJgC.InputRenderer,
|
|
84116
84130
|
{
|
|
84117
84131
|
...props,
|
|
84118
84132
|
hint,
|
|
@@ -84135,14 +84149,14 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
|
84135
84149
|
case "dynamiczone":
|
|
84136
84150
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicZone, { ...props, hint, disabled: fieldIsDisabled });
|
|
84137
84151
|
case "relation":
|
|
84138
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.RelationsField, { ...props, hint, disabled: fieldIsDisabled });
|
|
84139
84153
|
case "richtext":
|
|
84140
84154
|
return /* @__PURE__ */ jsxRuntime.jsx(Wysiwyg, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
|
|
84141
84155
|
case "uid":
|
|
84142
84156
|
return /* @__PURE__ */ jsxRuntime.jsx(UIDInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
|
|
84143
84157
|
case "enumeration":
|
|
84144
84158
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84145
|
-
|
|
84159
|
+
indexGIVuHJgC.InputRenderer,
|
|
84146
84160
|
{
|
|
84147
84161
|
...props,
|
|
84148
84162
|
hint,
|
|
@@ -84154,7 +84168,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
|
84154
84168
|
default:
|
|
84155
84169
|
const { unique: _unique, mainField: _mainField, ...restProps } = props;
|
|
84156
84170
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84157
|
-
|
|
84171
|
+
indexGIVuHJgC.InputRenderer,
|
|
84158
84172
|
{
|
|
84159
84173
|
...restProps,
|
|
84160
84174
|
hint,
|
|
@@ -84246,9 +84260,9 @@ const EditViewPage = () => {
|
|
|
84246
84260
|
query: { status }
|
|
84247
84261
|
},
|
|
84248
84262
|
setQuery
|
|
84249
|
-
] =
|
|
84263
|
+
] = indexGIVuHJgC.useQueryParams();
|
|
84250
84264
|
const { formatMessage } = reactIntl.useIntl();
|
|
84251
|
-
const { toggleNotification } =
|
|
84265
|
+
const { toggleNotification } = indexGIVuHJgC.useNotification();
|
|
84252
84266
|
const tabApi = React__namespace.useRef(null);
|
|
84253
84267
|
const {
|
|
84254
84268
|
document: document2,
|
|
@@ -84259,7 +84273,7 @@ const EditViewPage = () => {
|
|
|
84259
84273
|
collectionType,
|
|
84260
84274
|
id: id2,
|
|
84261
84275
|
model
|
|
84262
|
-
} =
|
|
84276
|
+
} = indexGIVuHJgC.useDoc();
|
|
84263
84277
|
const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
|
|
84264
84278
|
React__namespace.useEffect(() => {
|
|
84265
84279
|
if (tabApi.current && hasDraftAndPublished) {
|
|
@@ -84275,8 +84289,8 @@ const EditViewPage = () => {
|
|
|
84275
84289
|
});
|
|
84276
84290
|
}
|
|
84277
84291
|
});
|
|
84278
|
-
const isLoadingActionsRBAC =
|
|
84279
|
-
const isSingleType = collectionType ===
|
|
84292
|
+
const isLoadingActionsRBAC = indexGIVuHJgC.useDocumentRBAC("EditViewPage", (state) => state.isLoading);
|
|
84293
|
+
const isSingleType = collectionType === indexGIVuHJgC.SINGLE_TYPES;
|
|
84280
84294
|
const isCreatingDocument = !id2 && !isSingleType;
|
|
84281
84295
|
const {
|
|
84282
84296
|
isLoading: isLoadingLayout,
|
|
@@ -84284,7 +84298,7 @@ const EditViewPage = () => {
|
|
|
84284
84298
|
layout,
|
|
84285
84299
|
settings: { mainField }
|
|
84286
84300
|
}
|
|
84287
|
-
} =
|
|
84301
|
+
} = indexGIVuHJgC.useDocumentLayout(model);
|
|
84288
84302
|
const { isLazyLoading } = useLazyComponents([]);
|
|
84289
84303
|
const isLoading = isLoadingActionsRBAC || isLoadingDocument || isLoadingLayout || isLazyLoading;
|
|
84290
84304
|
const initialValues = React__namespace.useMemo(() => {
|
|
@@ -84295,10 +84309,10 @@ const EditViewPage = () => {
|
|
|
84295
84309
|
return transformDocument(schema, components)(form);
|
|
84296
84310
|
}, [document2, isCreatingDocument, isSingleType, schema, components]);
|
|
84297
84311
|
if (isLoading && !document2?.documentId) {
|
|
84298
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84312
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Page.Loading, {});
|
|
84299
84313
|
}
|
|
84300
84314
|
if (!initialValues) {
|
|
84301
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84315
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Page.Error, {});
|
|
84302
84316
|
}
|
|
84303
84317
|
const handleTabChange = (index, { resetForm }) => {
|
|
84304
84318
|
if (index === 0) {
|
|
@@ -84312,15 +84326,15 @@ const EditViewPage = () => {
|
|
|
84312
84326
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { paddingLeft: 10, paddingRight: 10, children: [
|
|
84313
84327
|
/* @__PURE__ */ jsxRuntime.jsx(Helmet.HelmetExport, { title: `${documentTitle} | Strapi` }),
|
|
84314
84328
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84315
|
-
|
|
84329
|
+
indexGIVuHJgC.Form,
|
|
84316
84330
|
{
|
|
84317
84331
|
disabled: hasDraftAndPublished && status === "published",
|
|
84318
84332
|
initialValues,
|
|
84319
84333
|
method: isCreatingDocument ? "POST" : "PUT",
|
|
84320
|
-
validationSchema:
|
|
84334
|
+
validationSchema: indexGIVuHJgC.createYupSchema(schema?.attributes, components),
|
|
84321
84335
|
children: ({ resetForm }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
84322
84336
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84323
|
-
|
|
84337
|
+
indexGIVuHJgC.Header,
|
|
84324
84338
|
{
|
|
84325
84339
|
isCreating: isCreatingDocument,
|
|
84326
84340
|
status: hasDraftAndPublished ? getDocumentStatus(document2, meta) : void 0,
|
|
@@ -84333,7 +84347,7 @@ const EditViewPage = () => {
|
|
|
84333
84347
|
ref: tabApi,
|
|
84334
84348
|
variant: "simple",
|
|
84335
84349
|
label: formatMessage({
|
|
84336
|
-
id:
|
|
84350
|
+
id: indexGIVuHJgC.getTranslation("containers.edit.tabs.label"),
|
|
84337
84351
|
defaultMessage: "Document status"
|
|
84338
84352
|
}),
|
|
84339
84353
|
initialSelectedTabIndex: hasDraftAndPublished && status === "published" ? 1 : 0,
|
|
@@ -84343,11 +84357,11 @@ const EditViewPage = () => {
|
|
|
84343
84357
|
children: [
|
|
84344
84358
|
hasDraftAndPublished ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tabs, { children: [
|
|
84345
84359
|
/* @__PURE__ */ jsxRuntime.jsx(StatusTab, { children: formatMessage({
|
|
84346
|
-
id:
|
|
84360
|
+
id: indexGIVuHJgC.getTranslation("containers.edit.tabs.draft"),
|
|
84347
84361
|
defaultMessage: "draft"
|
|
84348
84362
|
}) }),
|
|
84349
84363
|
/* @__PURE__ */ jsxRuntime.jsx(StatusTab, { disabled: !meta || meta.availableStatus.length === 0, children: formatMessage({
|
|
84350
|
-
id:
|
|
84364
|
+
id: indexGIVuHJgC.getTranslation("containers.edit.tabs.published"),
|
|
84351
84365
|
defaultMessage: "published"
|
|
84352
84366
|
}) })
|
|
84353
84367
|
] }) : null,
|
|
@@ -84356,12 +84370,12 @@ const EditViewPage = () => {
|
|
|
84356
84370
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.TabPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(FormLayout, { layout }) }),
|
|
84357
84371
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.TabPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(FormLayout, { layout }) })
|
|
84358
84372
|
] }) }),
|
|
84359
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 3, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
84373
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 3, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Panels, {}) })
|
|
84360
84374
|
] })
|
|
84361
84375
|
]
|
|
84362
84376
|
}
|
|
84363
84377
|
),
|
|
84364
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84378
|
+
/* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Blocker, {})
|
|
84365
84379
|
] })
|
|
84366
84380
|
}
|
|
84367
84381
|
)
|
|
@@ -84383,16 +84397,16 @@ const getDocumentStatus = (document2, meta) => {
|
|
|
84383
84397
|
};
|
|
84384
84398
|
const ProtectedEditViewPage = () => {
|
|
84385
84399
|
const { slug } = reactRouterDom.useParams();
|
|
84386
|
-
const [{ query }] =
|
|
84387
|
-
const { permissions = [], isLoading, isError } =
|
|
84400
|
+
const [{ query }] = indexGIVuHJgC.useQueryParams();
|
|
84401
|
+
const { permissions = [], isLoading, isError } = useSyncRbacJNQibLFa.useSyncRbac(slug ?? "", query, "editView");
|
|
84388
84402
|
if (isLoading) {
|
|
84389
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84403
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Page.Loading, {});
|
|
84390
84404
|
}
|
|
84391
84405
|
if (!isLoading && isError || !slug) {
|
|
84392
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84406
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Page.Error, {});
|
|
84393
84407
|
}
|
|
84394
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84408
|
+
return /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.Page.Protect, { permissions, children: ({ permissions: permissions2 }) => /* @__PURE__ */ jsxRuntime.jsx(indexGIVuHJgC.DocumentRBAC, { permissions: permissions2, children: /* @__PURE__ */ jsxRuntime.jsx(EditViewPage, {}) }) });
|
|
84395
84409
|
};
|
|
84396
84410
|
exports.EditViewPage = EditViewPage;
|
|
84397
84411
|
exports.ProtectedEditViewPage = ProtectedEditViewPage;
|
|
84398
|
-
//# sourceMappingURL=EditViewPage-
|
|
84412
|
+
//# sourceMappingURL=EditViewPage-JFzIJClS-9jnyNYlZ.js.map
|