@strapi/content-manager 0.0.0-experimental.5b211b38912691ee2eab22d47b5095ea2fcfec76 → 0.0.0-experimental.5e04dee5c96cd68273df3b3cadf4635e19dc2afc
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/LICENSE +18 -3
- package/dist/_chunks/{ComponentConfigurationPage-DmwmiFQy.mjs → ComponentConfigurationPage-B3yDbeU1.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DmwmiFQy.mjs.map → ComponentConfigurationPage-B3yDbeU1.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-C-49MccQ.js → ComponentConfigurationPage-KXSuLnQD.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-C-49MccQ.js.map → ComponentConfigurationPage-KXSuLnQD.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DjFJw56M.js → EditConfigurationPage-BQ17--5R.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-DjFJw56M.js.map → EditConfigurationPage-BQ17--5R.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-JT3E7NZy.mjs → EditConfigurationPage-D7PrLO8j.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-JT3E7NZy.mjs.map → EditConfigurationPage-D7PrLO8j.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-CPj61RMh.mjs → EditViewPage-B7VgwJaG.mjs} +18 -7
- package/dist/_chunks/EditViewPage-B7VgwJaG.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-zT3fBr4Y.js → EditViewPage-BgjdnGz2.js} +18 -7
- package/dist/_chunks/EditViewPage-BgjdnGz2.js.map +1 -0
- package/dist/_chunks/{Field-Boxf9Ajp.js → Field-CdK7ZLmv.js} +165 -81
- package/dist/_chunks/Field-CdK7ZLmv.js.map +1 -0
- package/dist/_chunks/{Field-dha5VnIQ.mjs → Field-tHCw4lGA.mjs} +166 -82
- package/dist/_chunks/Field-tHCw4lGA.mjs.map +1 -0
- package/dist/_chunks/{Form-DHrru2AV.mjs → Form-BJxdTv3Q.mjs} +22 -11
- package/dist/_chunks/Form-BJxdTv3Q.mjs.map +1 -0
- package/dist/_chunks/{Form-y5g1SRsh.js → Form-C_0KTVvV.js} +22 -11
- package/dist/_chunks/Form-C_0KTVvV.js.map +1 -0
- package/dist/_chunks/{History-Bru_KoeP.mjs → History-DR2txJLE.mjs} +44 -19
- package/dist/_chunks/History-DR2txJLE.mjs.map +1 -0
- package/dist/_chunks/{History-CqN6K7SX.js → History-nuEzM5qm.js} +44 -19
- package/dist/_chunks/History-nuEzM5qm.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-R_p-SbHZ.js → ListConfigurationPage-CnB86Psm.js} +20 -8
- package/dist/_chunks/ListConfigurationPage-CnB86Psm.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-D8wGABj0.mjs → ListConfigurationPage-voFVtXu6.mjs} +20 -8
- package/dist/_chunks/ListConfigurationPage-voFVtXu6.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-SID6TRb9.mjs → ListViewPage-B_GaWgRH.mjs} +22 -8
- package/dist/_chunks/ListViewPage-B_GaWgRH.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-pEw_zug9.js → ListViewPage-SXIXm-RM.js} +21 -7
- package/dist/_chunks/ListViewPage-SXIXm-RM.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-C5dcQojD.js → NoContentTypePage-BzsQ3hLZ.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-C5dcQojD.js.map → NoContentTypePage-BzsQ3hLZ.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CJ7UXwrQ.mjs → NoContentTypePage-CYiGpsbj.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-CJ7UXwrQ.mjs.map → NoContentTypePage-CYiGpsbj.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-B7syEq5E.mjs → NoPermissionsPage-B5baIHal.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-B7syEq5E.mjs.map → NoPermissionsPage-B5baIHal.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BtPrImPP.js → NoPermissionsPage-IGkId4C5.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BtPrImPP.js.map → NoPermissionsPage-IGkId4C5.js.map} +1 -1
- package/dist/_chunks/{Relations-B9Crnhnn.mjs → Relations-CIYDdKU-.mjs} +4 -4
- package/dist/_chunks/Relations-CIYDdKU-.mjs.map +1 -0
- package/dist/_chunks/{Relations-DjTQ5kGB.js → Relations-Dhuurpx2.js} +4 -4
- package/dist/_chunks/Relations-Dhuurpx2.js.map +1 -0
- package/dist/_chunks/{en-Ux26r5pl.mjs → en-BrCTWlZv.mjs} +5 -4
- package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-BrCTWlZv.mjs.map} +1 -1
- package/dist/_chunks/{en-fbKQxLGn.js → en-uOUIxfcQ.js} +5 -4
- package/dist/_chunks/{en-fbKQxLGn.js.map → en-uOUIxfcQ.js.map} +1 -1
- package/dist/_chunks/{index-DJXJw9V5.mjs → index-C9TJPyni.mjs} +317 -138
- package/dist/_chunks/index-C9TJPyni.mjs.map +1 -0
- package/dist/_chunks/{index-DVPWZkbS.js → index-CdT0kHZ8.js} +314 -135
- package/dist/_chunks/index-CdT0kHZ8.js.map +1 -0
- package/dist/_chunks/{layout-Bau7ZfLV.mjs → layout-BNqvLR_b.mjs} +23 -11
- package/dist/_chunks/layout-BNqvLR_b.mjs.map +1 -0
- package/dist/_chunks/{layout-Dm6fbiQj.js → layout-C6dxWYT7.js} +22 -10
- package/dist/_chunks/layout-C6dxWYT7.js.map +1 -0
- package/dist/_chunks/{relations-BH_kBSJ0.mjs → relations-CkKqKw65.mjs} +2 -2
- package/dist/_chunks/{relations-BH_kBSJ0.mjs.map → relations-CkKqKw65.mjs.map} +1 -1
- package/dist/_chunks/{relations-CKnpRgrN.js → relations-DtFaDnP1.js} +2 -2
- package/dist/_chunks/{relations-CKnpRgrN.js.map → relations-DtFaDnP1.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/history/index.d.ts +3 -0
- package/dist/admin/src/index.d.ts +1 -0
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +10 -22
- package/dist/server/index.js +134 -85
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +135 -86
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/uid.d.ts.map +1 -1
- package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
- package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/history/services/utils.d.ts +1 -1
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/services/document-manager.d.ts.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/utils/populate.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/_chunks/EditViewPage-CPj61RMh.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-zT3fBr4Y.js.map +0 -1
- package/dist/_chunks/Field-Boxf9Ajp.js.map +0 -1
- package/dist/_chunks/Field-dha5VnIQ.mjs.map +0 -1
- package/dist/_chunks/Form-DHrru2AV.mjs.map +0 -1
- package/dist/_chunks/Form-y5g1SRsh.js.map +0 -1
- package/dist/_chunks/History-Bru_KoeP.mjs.map +0 -1
- package/dist/_chunks/History-CqN6K7SX.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-D8wGABj0.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-R_p-SbHZ.js.map +0 -1
- package/dist/_chunks/ListViewPage-SID6TRb9.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-pEw_zug9.js.map +0 -1
- package/dist/_chunks/Relations-B9Crnhnn.mjs.map +0 -1
- package/dist/_chunks/Relations-DjTQ5kGB.js.map +0 -1
- package/dist/_chunks/index-DJXJw9V5.mjs.map +0 -1
- package/dist/_chunks/index-DVPWZkbS.js.map +0 -1
- package/dist/_chunks/layout-Bau7ZfLV.mjs.map +0 -1
- package/dist/_chunks/layout-Dm6fbiQj.js.map +0 -1
@@ -5,9 +5,9 @@ const strapiAdmin = require("@strapi/admin/strapi-admin");
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
6
6
|
const pipe$1 = require("lodash/fp/pipe");
|
7
7
|
const reactIntl = require("react-intl");
|
8
|
-
const index = require("./index-
|
8
|
+
const index = require("./index-CdT0kHZ8.js");
|
9
9
|
const fractionalIndexing = require("fractional-indexing");
|
10
|
-
const Relations = require("./Relations-
|
10
|
+
const Relations = require("./Relations-Dhuurpx2.js");
|
11
11
|
const Icons = require("@strapi/icons");
|
12
12
|
const styledComponents = require("styled-components");
|
13
13
|
const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
|
@@ -894,20 +894,8 @@ const LinkContent = React__namespace.forwardRef(
|
|
894
894
|
const [linkText, setLinkText] = React__namespace.useState(elementText);
|
895
895
|
const [linkUrl, setLinkUrl] = React__namespace.useState(link.url);
|
896
896
|
const linkInputRef = React__namespace.useRef(null);
|
897
|
-
const
|
897
|
+
const isLastInsertedLink = editor.lastInsertedLinkPath ? !slate.Path.equals(path, editor.lastInsertedLinkPath) : true;
|
898
898
|
const [isSaveDisabled, setIsSaveDisabled] = React__namespace.useState(false);
|
899
|
-
const handleOpenChange = (isOpen) => {
|
900
|
-
if (isOpen) {
|
901
|
-
setPopoverOpen(isOpen);
|
902
|
-
setShowRemoveButton(isOpen);
|
903
|
-
} else {
|
904
|
-
setPopoverOpen(isOpen);
|
905
|
-
if (link.url === "") {
|
906
|
-
removeLink(editor);
|
907
|
-
}
|
908
|
-
slateReact.ReactEditor.focus(editor);
|
909
|
-
}
|
910
|
-
};
|
911
899
|
const onLinkChange = (e) => {
|
912
900
|
setIsSaveDisabled(false);
|
913
901
|
setLinkUrl(e.target.value);
|
@@ -928,15 +916,33 @@ const LinkContent = React__namespace.forwardRef(
|
|
928
916
|
editLink(editor, { url: linkUrl, text: linkText });
|
929
917
|
setPopoverOpen(false);
|
930
918
|
editor.lastInsertedLinkPath = null;
|
919
|
+
slateReact.ReactEditor.focus(editor);
|
920
|
+
};
|
921
|
+
const handleClose = () => {
|
922
|
+
if (link.url === "") {
|
923
|
+
removeLink(editor);
|
924
|
+
}
|
925
|
+
setPopoverOpen(false);
|
926
|
+
slateReact.ReactEditor.focus(editor);
|
931
927
|
};
|
932
928
|
React__namespace.useEffect(() => {
|
933
929
|
if (popoverOpen)
|
934
930
|
linkInputRef.current?.focus();
|
935
931
|
}, [popoverOpen]);
|
936
932
|
const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
|
937
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, {
|
938
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
939
|
-
|
933
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
|
934
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
935
|
+
StyledBaseLink,
|
936
|
+
{
|
937
|
+
...attributes,
|
938
|
+
ref: forwardedRef,
|
939
|
+
href: link.url,
|
940
|
+
onClick: () => setPopoverOpen(true),
|
941
|
+
color: "primary600",
|
942
|
+
children
|
943
|
+
}
|
944
|
+
) }),
|
945
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { onPointerDownOutside: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, direction: "column", gap: 4, children: [
|
940
946
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
|
941
947
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
942
948
|
id: "components.Blocks.popover.text",
|
@@ -982,7 +988,7 @@ const LinkContent = React__namespace.forwardRef(
|
|
982
988
|
{
|
983
989
|
variant: "danger-light",
|
984
990
|
onClick: () => removeLink(editor),
|
985
|
-
$visible:
|
991
|
+
$visible: isLastInsertedLink,
|
986
992
|
children: formatMessage({
|
987
993
|
id: "components.Blocks.popover.remove",
|
988
994
|
defaultMessage: "Remove"
|
@@ -990,11 +996,11 @@ const LinkContent = React__namespace.forwardRef(
|
|
990
996
|
}
|
991
997
|
),
|
992
998
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
993
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick:
|
999
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
|
994
1000
|
id: "components.Blocks.popover.cancel",
|
995
1001
|
defaultMessage: "Cancel"
|
996
1002
|
}) }),
|
997
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, {
|
1003
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
|
998
1004
|
id: "components.Blocks.popover.save",
|
999
1005
|
defaultMessage: "Save"
|
1000
1006
|
}) })
|
@@ -1580,6 +1586,26 @@ const ListButton = ({ block, format }) => {
|
|
1580
1586
|
}
|
1581
1587
|
return false;
|
1582
1588
|
};
|
1589
|
+
const isListDisabled = () => {
|
1590
|
+
if (disabled) {
|
1591
|
+
return true;
|
1592
|
+
}
|
1593
|
+
if (!editor.selection) {
|
1594
|
+
return false;
|
1595
|
+
}
|
1596
|
+
const anchorNodeEntry = slate.Editor.above(editor, {
|
1597
|
+
at: editor.selection.anchor,
|
1598
|
+
match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
|
1599
|
+
});
|
1600
|
+
const focusNodeEntry = slate.Editor.above(editor, {
|
1601
|
+
at: editor.selection.focus,
|
1602
|
+
match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
|
1603
|
+
});
|
1604
|
+
if (!anchorNodeEntry || !focusNodeEntry) {
|
1605
|
+
return false;
|
1606
|
+
}
|
1607
|
+
return anchorNodeEntry[0] !== focusNodeEntry[0];
|
1608
|
+
};
|
1583
1609
|
const toggleList = (format2) => {
|
1584
1610
|
let currentListEntry;
|
1585
1611
|
if (editor.selection) {
|
@@ -1613,7 +1639,7 @@ const ListButton = ({ block, format }) => {
|
|
1613
1639
|
name: format,
|
1614
1640
|
label: block.label,
|
1615
1641
|
isActive: isListActive(),
|
1616
|
-
disabled,
|
1642
|
+
disabled: isListDisabled(),
|
1617
1643
|
handleClick: () => toggleList(format)
|
1618
1644
|
}
|
1619
1645
|
);
|
@@ -1780,7 +1806,7 @@ const DragIconButton = styledComponents.styled(designSystem.IconButton)`
|
|
1780
1806
|
}
|
1781
1807
|
svg {
|
1782
1808
|
height: auto;
|
1783
|
-
width: ${({ theme }) => theme.spaces[3]};
|
1809
|
+
min-width: ${({ theme }) => theme.spaces[3]};
|
1784
1810
|
|
1785
1811
|
path {
|
1786
1812
|
fill: ${({ theme }) => theme.colors.neutral700};
|
@@ -1897,7 +1923,7 @@ const DragAndDropElement = ({
|
|
1897
1923
|
disabled,
|
1898
1924
|
draggable: true,
|
1899
1925
|
$dragHandleTopMargin: dragHandleTopMargin,
|
1900
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "
|
1926
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "primary500" })
|
1901
1927
|
}
|
1902
1928
|
),
|
1903
1929
|
children
|
@@ -2221,7 +2247,7 @@ const EditorLayout$1 = ({
|
|
2221
2247
|
/* @__PURE__ */ jsxRuntime.jsx(
|
2222
2248
|
CollapseIconButton,
|
2223
2249
|
{
|
2224
|
-
|
2250
|
+
label: formatMessage({
|
2225
2251
|
id: index.getTranslation("components.Blocks.collapse"),
|
2226
2252
|
defaultMessage: "Collapse"
|
2227
2253
|
}),
|
@@ -2560,7 +2586,7 @@ const BlocksEditor = React__namespace.forwardRef(
|
|
2560
2586
|
!isExpandedMode && /* @__PURE__ */ jsxRuntime.jsx(
|
2561
2587
|
ExpandIconButton,
|
2562
2588
|
{
|
2563
|
-
|
2589
|
+
label: formatMessage({
|
2564
2590
|
id: index.getTranslation("components.Blocks.expand"),
|
2565
2591
|
defaultMessage: "Expand"
|
2566
2592
|
}),
|
@@ -2626,30 +2652,27 @@ const createDefaultForm = (contentType, components = {}) => {
|
|
2626
2652
|
const Initializer = ({ disabled, name: name2, onClick }) => {
|
2627
2653
|
const { formatMessage } = reactIntl.useIntl();
|
2628
2654
|
const field = strapiAdmin.useField(name2);
|
2629
|
-
return /* @__PURE__ */ jsxRuntime.
|
2630
|
-
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2637
|
-
|
2638
|
-
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2642
|
-
|
2643
|
-
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
|
2650
|
-
),
|
2651
|
-
field.error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", variant: "pi", children: field.error })
|
2652
|
-
] });
|
2655
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
2656
|
+
designSystem.Box,
|
2657
|
+
{
|
2658
|
+
tag: "button",
|
2659
|
+
background: "neutral100",
|
2660
|
+
borderColor: field.error ? "danger600" : "neutral200",
|
2661
|
+
hasRadius: true,
|
2662
|
+
disabled,
|
2663
|
+
onClick,
|
2664
|
+
paddingTop: 9,
|
2665
|
+
paddingBottom: 9,
|
2666
|
+
type: "button",
|
2667
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
|
2668
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
|
2669
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
|
2670
|
+
id: index.getTranslation("components.empty-repeatable"),
|
2671
|
+
defaultMessage: "No entry yet. Click on the button below to add one."
|
2672
|
+
}) }) })
|
2673
|
+
] })
|
2674
|
+
}
|
2675
|
+
) });
|
2653
2676
|
};
|
2654
2677
|
const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
|
2655
2678
|
width: 2.4rem;
|
@@ -2683,7 +2706,18 @@ const NonRepeatableComponent = ({
|
|
2683
2706
|
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
|
2684
2707
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2685
2708
|
const completeFieldName = `${name2}.${field.name}`;
|
2686
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
2709
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
2710
|
+
designSystem.Grid.Item,
|
2711
|
+
{
|
2712
|
+
col: size,
|
2713
|
+
s: 12,
|
2714
|
+
xs: 12,
|
2715
|
+
direction: "column",
|
2716
|
+
alignItems: "stretch",
|
2717
|
+
children: children({ ...field, name: completeFieldName })
|
2718
|
+
},
|
2719
|
+
completeFieldName
|
2720
|
+
);
|
2687
2721
|
}) }, index2);
|
2688
2722
|
}) })
|
2689
2723
|
}
|
@@ -2861,7 +2895,18 @@ const RepeatableComponent = ({
|
|
2861
2895
|
children: layout.map((row, index22) => {
|
2862
2896
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2863
2897
|
const completeFieldName = `${nameWithIndex}.${field.name}`;
|
2864
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
2898
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
2899
|
+
designSystem.Grid.Item,
|
2900
|
+
{
|
2901
|
+
col: size,
|
2902
|
+
s: 12,
|
2903
|
+
xs: 12,
|
2904
|
+
direction: "column",
|
2905
|
+
alignItems: "stretch",
|
2906
|
+
children: children({ ...field, name: completeFieldName })
|
2907
|
+
},
|
2908
|
+
completeFieldName
|
2909
|
+
);
|
2865
2910
|
}) }, index22);
|
2866
2911
|
})
|
2867
2912
|
}
|
@@ -2956,7 +3001,7 @@ const Component = ({
|
|
2956
3001
|
/* @__PURE__ */ jsxRuntime.jsx(
|
2957
3002
|
designSystem.IconButton,
|
2958
3003
|
{
|
2959
|
-
|
3004
|
+
variant: "ghost",
|
2960
3005
|
onClick: onDeleteComponent,
|
2961
3006
|
label: formatMessage({
|
2962
3007
|
id: index.getTranslation("containers.Edit.delete"),
|
@@ -2969,7 +3014,7 @@ const Component = ({
|
|
2969
3014
|
designSystem.IconButton,
|
2970
3015
|
{
|
2971
3016
|
ref: composedAccordionRefs,
|
2972
|
-
|
3017
|
+
variant: "ghost",
|
2973
3018
|
onClick: (e) => e.stopPropagation(),
|
2974
3019
|
"data-handler-id": handlerId,
|
2975
3020
|
label: formatMessage({
|
@@ -3039,7 +3084,7 @@ const ComponentInput = ({
|
|
3039
3084
|
id: index.getTranslation("components.reset-entry"),
|
3040
3085
|
defaultMessage: "Reset Entry"
|
3041
3086
|
}),
|
3042
|
-
|
3087
|
+
variant: "ghost",
|
3043
3088
|
onClick: () => {
|
3044
3089
|
field.onChange(name2, null);
|
3045
3090
|
},
|
@@ -3068,11 +3113,8 @@ const AddComponentButton = ({
|
|
3068
3113
|
onClick,
|
3069
3114
|
disabled: isDisabled,
|
3070
3115
|
background: "neutral0",
|
3071
|
-
paddingTop: 3,
|
3072
|
-
paddingBottom: 3,
|
3073
|
-
paddingLeft: 4,
|
3074
|
-
paddingRight: 4,
|
3075
3116
|
style: { cursor: isDisabled ? "not-allowed" : "pointer" },
|
3117
|
+
variant: "tertiary",
|
3076
3118
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
|
3077
3119
|
/* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
|
3078
3120
|
/* @__PURE__ */ jsxRuntime.jsx(
|
@@ -3101,10 +3143,11 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
|
|
3101
3143
|
}
|
3102
3144
|
`;
|
3103
3145
|
const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
|
3104
|
-
const StyledButton = styledComponents.styled(designSystem.
|
3146
|
+
const StyledButton = styledComponents.styled(designSystem.Button)`
|
3105
3147
|
border-radius: 26px;
|
3106
3148
|
border-color: ${({ theme }) => theme.colors.neutral150};
|
3107
3149
|
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
3150
|
+
height: 5rem;
|
3108
3151
|
|
3109
3152
|
&:hover {
|
3110
3153
|
${AddComponentTitle} {
|
@@ -3116,7 +3159,7 @@ const StyledButton = styledComponents.styled(designSystem.BaseButton)`
|
|
3116
3159
|
fill: ${({ theme }) => theme.colors.primary600};
|
3117
3160
|
}
|
3118
3161
|
> path {
|
3119
|
-
fill: ${({ theme }) => theme.colors.
|
3162
|
+
fill: ${({ theme }) => theme.colors.primary600};
|
3120
3163
|
}
|
3121
3164
|
}
|
3122
3165
|
}
|
@@ -4254,7 +4297,7 @@ const EditorLayout = ({
|
|
4254
4297
|
justifyContent: "flex-end",
|
4255
4298
|
shrink: 0,
|
4256
4299
|
width: "100%",
|
4257
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, children: [
|
4300
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
|
4258
4301
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
|
4259
4302
|
id: "components.Wysiwyg.collapse",
|
4260
4303
|
defaultMessage: "Collapse"
|
@@ -4272,12 +4315,14 @@ const EditorLayout = ({
|
|
4272
4315
|
) }) });
|
4273
4316
|
}
|
4274
4317
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
4275
|
-
designSystem.
|
4318
|
+
designSystem.Flex,
|
4276
4319
|
{
|
4277
4320
|
borderColor: error ? "danger600" : "neutral200",
|
4278
4321
|
borderStyle: "solid",
|
4279
4322
|
borderWidth: "1px",
|
4280
4323
|
hasRadius: true,
|
4324
|
+
direction: "column",
|
4325
|
+
alignItems: "stretch",
|
4281
4326
|
children
|
4282
4327
|
}
|
4283
4328
|
);
|
@@ -4288,11 +4333,19 @@ const ExpandWrapper = styledComponents.styled(designSystem.Flex)`
|
|
4288
4333
|
const BoxWithBorder = styledComponents.styled(designSystem.Box)`
|
4289
4334
|
border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
|
4290
4335
|
`;
|
4291
|
-
const ExpandButton$1 = styledComponents.styled(designSystem.
|
4336
|
+
const ExpandButton$1 = styledComponents.styled(designSystem.Button)`
|
4292
4337
|
background-color: transparent;
|
4293
4338
|
border: none;
|
4294
4339
|
align-items: center;
|
4295
4340
|
|
4341
|
+
& > span {
|
4342
|
+
display: flex;
|
4343
|
+
justify-content: space-between;
|
4344
|
+
align-items: center;
|
4345
|
+
width: 100%;
|
4346
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
4347
|
+
}
|
4348
|
+
|
4296
4349
|
svg {
|
4297
4350
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
4298
4351
|
|
@@ -4588,11 +4641,19 @@ const MoreButton = styledComponents.styled(designSystem.IconButton)`
|
|
4588
4641
|
const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
|
4589
4642
|
margin-right: ${({ theme }) => `${theme.spaces[2]}`};
|
4590
4643
|
`;
|
4591
|
-
const ExpandButton = styledComponents.styled(designSystem.
|
4644
|
+
const ExpandButton = styledComponents.styled(designSystem.Button)`
|
4592
4645
|
background-color: transparent;
|
4593
4646
|
border: none;
|
4594
4647
|
align-items: center;
|
4595
4648
|
|
4649
|
+
& > span {
|
4650
|
+
display: flex;
|
4651
|
+
justify-content: space-between;
|
4652
|
+
align-items: center;
|
4653
|
+
width: 100%;
|
4654
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
4655
|
+
}
|
4656
|
+
|
4596
4657
|
svg {
|
4597
4658
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
4598
4659
|
path {
|
@@ -4604,8 +4665,8 @@ const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
|
|
4604
4665
|
`;
|
4605
4666
|
const WysiwygFooter = ({ onToggleExpand }) => {
|
4606
4667
|
const { formatMessage } = reactIntl.useIntl();
|
4607
|
-
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, children: [
|
4608
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
|
4668
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, variant: "tertiary", size: "M", children: [
|
4669
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
|
4609
4670
|
id: "components.WysiwygBottomControls.fullscreen",
|
4610
4671
|
defaultMessage: "Expand"
|
4611
4672
|
}) }),
|
@@ -4641,14 +4702,23 @@ const WysiwygNav = ({
|
|
4641
4702
|
borderRadius: `0.4rem 0.4rem 0 0`,
|
4642
4703
|
children: [
|
4643
4704
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
|
4644
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4648
|
-
|
4649
|
-
|
4650
|
-
|
4651
|
-
|
4705
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
4706
|
+
designSystem.SingleSelect,
|
4707
|
+
{
|
4708
|
+
disabled: true,
|
4709
|
+
placeholder: selectPlaceholder,
|
4710
|
+
"aria-label": selectPlaceholder,
|
4711
|
+
size: "S",
|
4712
|
+
children: [
|
4713
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
|
4714
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
|
4715
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
|
4716
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
|
4717
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
|
4718
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
|
4719
|
+
]
|
4720
|
+
}
|
4721
|
+
) }),
|
4652
4722
|
/* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
|
4653
4723
|
/* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
|
4654
4724
|
/* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
|
@@ -4679,6 +4749,7 @@ const WysiwygNav = ({
|
|
4679
4749
|
placeholder: selectPlaceholder,
|
4680
4750
|
"aria-label": selectPlaceholder,
|
4681
4751
|
onChange: (value) => onActionClick(value, editorRef),
|
4752
|
+
size: "S",
|
4682
4753
|
children: [
|
4683
4754
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
|
4684
4755
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
|
@@ -5018,7 +5089,9 @@ const useFieldHint = (hint = void 0, attribute) => {
|
|
5018
5089
|
if (!maximum && !minimum) {
|
5019
5090
|
return hint;
|
5020
5091
|
}
|
5021
|
-
const units = !["biginteger", "integer", "number"].includes(
|
5092
|
+
const units = !["biginteger", "integer", "number", "dynamiczone", "component"].includes(
|
5093
|
+
attribute.type
|
5094
|
+
) ? formatMessage(
|
5022
5095
|
{
|
5023
5096
|
id: "content-manager.form.Input.hint.character.unit",
|
5024
5097
|
defaultMessage: "{maxValue, plural, one { character} other { characters}}"
|
@@ -5112,7 +5185,7 @@ const DynamicComponent = ({
|
|
5112
5185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
5113
5186
|
designSystem.IconButton,
|
5114
5187
|
{
|
5115
|
-
|
5188
|
+
variant: "ghost",
|
5116
5189
|
label: formatMessage(
|
5117
5190
|
{
|
5118
5191
|
id: index.getTranslation("components.DynamicZone.delete-label"),
|
@@ -5127,7 +5200,7 @@ const DynamicComponent = ({
|
|
5127
5200
|
/* @__PURE__ */ jsxRuntime.jsx(
|
5128
5201
|
designSystem.IconButton,
|
5129
5202
|
{
|
5130
|
-
|
5203
|
+
variant: "ghost",
|
5131
5204
|
onClick: (e) => e.stopPropagation(),
|
5132
5205
|
"data-handler-id": handlerId,
|
5133
5206
|
ref: dragRef,
|
@@ -5188,7 +5261,18 @@ const DynamicComponent = ({
|
|
5188
5261
|
] }),
|
5189
5262
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
5190
5263
|
const fieldName = `${name2}.${index$1}.${field.name}`;
|
5191
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
5264
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
5265
|
+
designSystem.Grid.Item,
|
5266
|
+
{
|
5267
|
+
col: size,
|
5268
|
+
s: 12,
|
5269
|
+
xs: 12,
|
5270
|
+
direction: "column",
|
5271
|
+
alignItems: "stretch",
|
5272
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName })
|
5273
|
+
},
|
5274
|
+
fieldName
|
5275
|
+
);
|
5192
5276
|
}) }, rowInd)) }) }) })
|
5193
5277
|
] }) }) })
|
5194
5278
|
] });
|
@@ -5381,7 +5465,7 @@ const DynamicZone = ({
|
|
5381
5465
|
const handleRemoveComponent = (name22, currentIndex) => () => {
|
5382
5466
|
removeFieldRow(name22, currentIndex);
|
5383
5467
|
};
|
5384
|
-
const hasError = error !== void 0
|
5468
|
+
const hasError = error !== void 0;
|
5385
5469
|
const renderButtonLabel = () => {
|
5386
5470
|
if (addComponentIsOpen) {
|
5387
5471
|
return formatMessage({ id: "app.utils.close-label", defaultMessage: "Close" });
|
@@ -5495,4 +5579,4 @@ exports.transformDocument = transformDocument;
|
|
5495
5579
|
exports.useDynamicZone = useDynamicZone;
|
5496
5580
|
exports.useFieldHint = useFieldHint;
|
5497
5581
|
exports.useLazyComponents = useLazyComponents;
|
5498
|
-
//# sourceMappingURL=Field-
|
5582
|
+
//# sourceMappingURL=Field-CdK7ZLmv.js.map
|