@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
@@ -2,12 +2,12 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
3
3
|
import { useState, useEffect, useCallback, memo } from "react";
|
4
4
|
import { useStrapiApp, createContext, useField, useNotification, useForm, useAPIErrorHandler, useQueryParams, useFocusInputField, InputRenderer as InputRenderer$1 } from "@strapi/admin/strapi-admin";
|
5
|
-
import { Box, SingleSelect, SingleSelectOption, Typography, Flex, BaseLink, Button, Popover, Field, Tooltip, IconButton, useComposedRefs, Portal, FocusTrap, Divider, VisuallyHidden, Grid as Grid$1, Accordion, TextButton,
|
5
|
+
import { Box, SingleSelect, SingleSelectOption, Typography, Flex, BaseLink, Button, Popover, Field, Tooltip, IconButton, useComposedRefs, Portal, FocusTrap, Divider, VisuallyHidden, Grid as Grid$1, Accordion, TextButton, TextInput, IconButtonGroup, Menu, MenuItem } from "@strapi/design-system";
|
6
6
|
import pipe$1 from "lodash/fp/pipe";
|
7
7
|
import { useIntl } from "react-intl";
|
8
|
-
import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, d as buildValidParams, f as useDocumentRBAC, n as useDocLayout } from "./index-
|
8
|
+
import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, d as buildValidParams, f as useDocumentRBAC, n as useDocLayout } from "./index-C9TJPyni.mjs";
|
9
9
|
import { generateNKeysBetween } from "fractional-indexing";
|
10
|
-
import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-
|
10
|
+
import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-CIYDdKU-.mjs";
|
11
11
|
import { Code, HeadingOne, HeadingTwo, HeadingThree, HeadingFour, HeadingFive, HeadingSix, Image as Image$1, NumberList, BulletList, Paragraph, Quotes, Link as Link$1, Drag, Collapse, Bold, Italic, Underline, StrikeThrough, Expand, PlusCircle, Plus, Trash, EyeStriked, CheckCircle, WarningCircle, Loader, ArrowClockwise, More } from "@strapi/icons";
|
12
12
|
import { styled, css, keyframes } from "styled-components";
|
13
13
|
import { C as ComponentIcon, a as COMPONENT_ICONS } from "./ComponentIcon-u4bIXTFY.mjs";
|
@@ -860,20 +860,8 @@ const LinkContent = React.forwardRef(
|
|
860
860
|
const [linkText, setLinkText] = React.useState(elementText);
|
861
861
|
const [linkUrl, setLinkUrl] = React.useState(link.url);
|
862
862
|
const linkInputRef = React.useRef(null);
|
863
|
-
const
|
863
|
+
const isLastInsertedLink = editor.lastInsertedLinkPath ? !Path.equals(path, editor.lastInsertedLinkPath) : true;
|
864
864
|
const [isSaveDisabled, setIsSaveDisabled] = React.useState(false);
|
865
|
-
const handleOpenChange = (isOpen) => {
|
866
|
-
if (isOpen) {
|
867
|
-
setPopoverOpen(isOpen);
|
868
|
-
setShowRemoveButton(isOpen);
|
869
|
-
} else {
|
870
|
-
setPopoverOpen(isOpen);
|
871
|
-
if (link.url === "") {
|
872
|
-
removeLink(editor);
|
873
|
-
}
|
874
|
-
ReactEditor.focus(editor);
|
875
|
-
}
|
876
|
-
};
|
877
865
|
const onLinkChange = (e) => {
|
878
866
|
setIsSaveDisabled(false);
|
879
867
|
setLinkUrl(e.target.value);
|
@@ -894,15 +882,33 @@ const LinkContent = React.forwardRef(
|
|
894
882
|
editLink(editor, { url: linkUrl, text: linkText });
|
895
883
|
setPopoverOpen(false);
|
896
884
|
editor.lastInsertedLinkPath = null;
|
885
|
+
ReactEditor.focus(editor);
|
886
|
+
};
|
887
|
+
const handleClose = () => {
|
888
|
+
if (link.url === "") {
|
889
|
+
removeLink(editor);
|
890
|
+
}
|
891
|
+
setPopoverOpen(false);
|
892
|
+
ReactEditor.focus(editor);
|
897
893
|
};
|
898
894
|
React.useEffect(() => {
|
899
895
|
if (popoverOpen)
|
900
896
|
linkInputRef.current?.focus();
|
901
897
|
}, [popoverOpen]);
|
902
898
|
const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
|
903
|
-
return /* @__PURE__ */ jsxs(Popover.Root, {
|
904
|
-
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(
|
905
|
-
|
899
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { open: popoverOpen, children: [
|
900
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(
|
901
|
+
StyledBaseLink,
|
902
|
+
{
|
903
|
+
...attributes,
|
904
|
+
ref: forwardedRef,
|
905
|
+
href: link.url,
|
906
|
+
onClick: () => setPopoverOpen(true),
|
907
|
+
color: "primary600",
|
908
|
+
children
|
909
|
+
}
|
910
|
+
) }),
|
911
|
+
/* @__PURE__ */ jsx(Popover.Content, { onPointerDownOutside: handleClose, children: /* @__PURE__ */ jsxs(Flex, { padding: 4, direction: "column", gap: 4, children: [
|
906
912
|
/* @__PURE__ */ jsx(Field.Root, { width: "368px", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
|
907
913
|
/* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
|
908
914
|
id: "components.Blocks.popover.text",
|
@@ -948,7 +954,7 @@ const LinkContent = React.forwardRef(
|
|
948
954
|
{
|
949
955
|
variant: "danger-light",
|
950
956
|
onClick: () => removeLink(editor),
|
951
|
-
$visible:
|
957
|
+
$visible: isLastInsertedLink,
|
952
958
|
children: formatMessage({
|
953
959
|
id: "components.Blocks.popover.remove",
|
954
960
|
defaultMessage: "Remove"
|
@@ -956,11 +962,11 @@ const LinkContent = React.forwardRef(
|
|
956
962
|
}
|
957
963
|
),
|
958
964
|
/* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
|
959
|
-
/* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick:
|
965
|
+
/* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
|
960
966
|
id: "components.Blocks.popover.cancel",
|
961
967
|
defaultMessage: "Cancel"
|
962
968
|
}) }),
|
963
|
-
/* @__PURE__ */ jsx(Button, {
|
969
|
+
/* @__PURE__ */ jsx(Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
|
964
970
|
id: "components.Blocks.popover.save",
|
965
971
|
defaultMessage: "Save"
|
966
972
|
}) })
|
@@ -1546,6 +1552,26 @@ const ListButton = ({ block, format }) => {
|
|
1546
1552
|
}
|
1547
1553
|
return false;
|
1548
1554
|
};
|
1555
|
+
const isListDisabled = () => {
|
1556
|
+
if (disabled) {
|
1557
|
+
return true;
|
1558
|
+
}
|
1559
|
+
if (!editor.selection) {
|
1560
|
+
return false;
|
1561
|
+
}
|
1562
|
+
const anchorNodeEntry = Editor$1.above(editor, {
|
1563
|
+
at: editor.selection.anchor,
|
1564
|
+
match: (node) => !Editor$1.isEditor(node) && node.type !== "text"
|
1565
|
+
});
|
1566
|
+
const focusNodeEntry = Editor$1.above(editor, {
|
1567
|
+
at: editor.selection.focus,
|
1568
|
+
match: (node) => !Editor$1.isEditor(node) && node.type !== "text"
|
1569
|
+
});
|
1570
|
+
if (!anchorNodeEntry || !focusNodeEntry) {
|
1571
|
+
return false;
|
1572
|
+
}
|
1573
|
+
return anchorNodeEntry[0] !== focusNodeEntry[0];
|
1574
|
+
};
|
1549
1575
|
const toggleList = (format2) => {
|
1550
1576
|
let currentListEntry;
|
1551
1577
|
if (editor.selection) {
|
@@ -1579,7 +1605,7 @@ const ListButton = ({ block, format }) => {
|
|
1579
1605
|
name: format,
|
1580
1606
|
label: block.label,
|
1581
1607
|
isActive: isListActive(),
|
1582
|
-
disabled,
|
1608
|
+
disabled: isListDisabled(),
|
1583
1609
|
handleClick: () => toggleList(format)
|
1584
1610
|
}
|
1585
1611
|
);
|
@@ -1746,7 +1772,7 @@ const DragIconButton = styled(IconButton)`
|
|
1746
1772
|
}
|
1747
1773
|
svg {
|
1748
1774
|
height: auto;
|
1749
|
-
width: ${({ theme }) => theme.spaces[3]};
|
1775
|
+
min-width: ${({ theme }) => theme.spaces[3]};
|
1750
1776
|
|
1751
1777
|
path {
|
1752
1778
|
fill: ${({ theme }) => theme.colors.neutral700};
|
@@ -1863,7 +1889,7 @@ const DragAndDropElement = ({
|
|
1863
1889
|
disabled,
|
1864
1890
|
draggable: true,
|
1865
1891
|
$dragHandleTopMargin: dragHandleTopMargin,
|
1866
|
-
children: /* @__PURE__ */ jsx(Drag, { color: "
|
1892
|
+
children: /* @__PURE__ */ jsx(Drag, { color: "primary500" })
|
1867
1893
|
}
|
1868
1894
|
),
|
1869
1895
|
children
|
@@ -2187,7 +2213,7 @@ const EditorLayout$1 = ({
|
|
2187
2213
|
/* @__PURE__ */ jsx(
|
2188
2214
|
CollapseIconButton,
|
2189
2215
|
{
|
2190
|
-
|
2216
|
+
label: formatMessage({
|
2191
2217
|
id: getTranslation("components.Blocks.collapse"),
|
2192
2218
|
defaultMessage: "Collapse"
|
2193
2219
|
}),
|
@@ -2526,7 +2552,7 @@ const BlocksEditor = React.forwardRef(
|
|
2526
2552
|
!isExpandedMode && /* @__PURE__ */ jsx(
|
2527
2553
|
ExpandIconButton,
|
2528
2554
|
{
|
2529
|
-
|
2555
|
+
label: formatMessage({
|
2530
2556
|
id: getTranslation("components.Blocks.expand"),
|
2531
2557
|
defaultMessage: "Expand"
|
2532
2558
|
}),
|
@@ -2592,30 +2618,27 @@ const createDefaultForm = (contentType, components = {}) => {
|
|
2592
2618
|
const Initializer = ({ disabled, name: name2, onClick }) => {
|
2593
2619
|
const { formatMessage } = useIntl();
|
2594
2620
|
const field = useField(name2);
|
2595
|
-
return /* @__PURE__ */
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
|
2615
|
-
|
2616
|
-
),
|
2617
|
-
field.error && /* @__PURE__ */ jsx(Typography, { textColor: "danger600", variant: "pi", children: field.error })
|
2618
|
-
] });
|
2621
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
2622
|
+
Box,
|
2623
|
+
{
|
2624
|
+
tag: "button",
|
2625
|
+
background: "neutral100",
|
2626
|
+
borderColor: field.error ? "danger600" : "neutral200",
|
2627
|
+
hasRadius: true,
|
2628
|
+
disabled,
|
2629
|
+
onClick,
|
2630
|
+
paddingTop: 9,
|
2631
|
+
paddingBottom: 9,
|
2632
|
+
type: "button",
|
2633
|
+
children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
|
2634
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(CircleIcon, {}) }),
|
2635
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
|
2636
|
+
id: getTranslation("components.empty-repeatable"),
|
2637
|
+
defaultMessage: "No entry yet. Click on the button below to add one."
|
2638
|
+
}) }) })
|
2639
|
+
] })
|
2640
|
+
}
|
2641
|
+
) });
|
2619
2642
|
};
|
2620
2643
|
const CircleIcon = styled(PlusCircle)`
|
2621
2644
|
width: 2.4rem;
|
@@ -2649,7 +2672,18 @@ const NonRepeatableComponent = ({
|
|
2649
2672
|
children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index) => {
|
2650
2673
|
return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2651
2674
|
const completeFieldName = `${name2}.${field.name}`;
|
2652
|
-
return /* @__PURE__ */ jsx(
|
2675
|
+
return /* @__PURE__ */ jsx(
|
2676
|
+
Grid$1.Item,
|
2677
|
+
{
|
2678
|
+
col: size,
|
2679
|
+
s: 12,
|
2680
|
+
xs: 12,
|
2681
|
+
direction: "column",
|
2682
|
+
alignItems: "stretch",
|
2683
|
+
children: children({ ...field, name: completeFieldName })
|
2684
|
+
},
|
2685
|
+
completeFieldName
|
2686
|
+
);
|
2653
2687
|
}) }, index);
|
2654
2688
|
}) })
|
2655
2689
|
}
|
@@ -2827,7 +2861,18 @@ const RepeatableComponent = ({
|
|
2827
2861
|
children: layout.map((row, index2) => {
|
2828
2862
|
return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2829
2863
|
const completeFieldName = `${nameWithIndex}.${field.name}`;
|
2830
|
-
return /* @__PURE__ */ jsx(
|
2864
|
+
return /* @__PURE__ */ jsx(
|
2865
|
+
Grid$1.Item,
|
2866
|
+
{
|
2867
|
+
col: size,
|
2868
|
+
s: 12,
|
2869
|
+
xs: 12,
|
2870
|
+
direction: "column",
|
2871
|
+
alignItems: "stretch",
|
2872
|
+
children: children({ ...field, name: completeFieldName })
|
2873
|
+
},
|
2874
|
+
completeFieldName
|
2875
|
+
);
|
2831
2876
|
}) }, index2);
|
2832
2877
|
})
|
2833
2878
|
}
|
@@ -2922,7 +2967,7 @@ const Component = ({
|
|
2922
2967
|
/* @__PURE__ */ jsx(
|
2923
2968
|
IconButton,
|
2924
2969
|
{
|
2925
|
-
|
2970
|
+
variant: "ghost",
|
2926
2971
|
onClick: onDeleteComponent,
|
2927
2972
|
label: formatMessage({
|
2928
2973
|
id: getTranslation("containers.Edit.delete"),
|
@@ -2935,7 +2980,7 @@ const Component = ({
|
|
2935
2980
|
IconButton,
|
2936
2981
|
{
|
2937
2982
|
ref: composedAccordionRefs,
|
2938
|
-
|
2983
|
+
variant: "ghost",
|
2939
2984
|
onClick: (e) => e.stopPropagation(),
|
2940
2985
|
"data-handler-id": handlerId,
|
2941
2986
|
label: formatMessage({
|
@@ -3005,7 +3050,7 @@ const ComponentInput = ({
|
|
3005
3050
|
id: getTranslation("components.reset-entry"),
|
3006
3051
|
defaultMessage: "Reset Entry"
|
3007
3052
|
}),
|
3008
|
-
|
3053
|
+
variant: "ghost",
|
3009
3054
|
onClick: () => {
|
3010
3055
|
field.onChange(name2, null);
|
3011
3056
|
},
|
@@ -3034,11 +3079,8 @@ const AddComponentButton = ({
|
|
3034
3079
|
onClick,
|
3035
3080
|
disabled: isDisabled,
|
3036
3081
|
background: "neutral0",
|
3037
|
-
paddingTop: 3,
|
3038
|
-
paddingBottom: 3,
|
3039
|
-
paddingLeft: 4,
|
3040
|
-
paddingRight: 4,
|
3041
3082
|
style: { cursor: isDisabled ? "not-allowed" : "pointer" },
|
3083
|
+
variant: "tertiary",
|
3042
3084
|
children: /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
|
3043
3085
|
/* @__PURE__ */ jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
|
3044
3086
|
/* @__PURE__ */ jsx(
|
@@ -3067,10 +3109,11 @@ const StyledAddIcon = styled(PlusCircle)`
|
|
3067
3109
|
}
|
3068
3110
|
`;
|
3069
3111
|
const AddComponentTitle = styled(Typography)``;
|
3070
|
-
const StyledButton = styled(
|
3112
|
+
const StyledButton = styled(Button)`
|
3071
3113
|
border-radius: 26px;
|
3072
3114
|
border-color: ${({ theme }) => theme.colors.neutral150};
|
3073
3115
|
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
3116
|
+
height: 5rem;
|
3074
3117
|
|
3075
3118
|
&:hover {
|
3076
3119
|
${AddComponentTitle} {
|
@@ -3082,7 +3125,7 @@ const StyledButton = styled(BaseButton)`
|
|
3082
3125
|
fill: ${({ theme }) => theme.colors.primary600};
|
3083
3126
|
}
|
3084
3127
|
> path {
|
3085
|
-
fill: ${({ theme }) => theme.colors.
|
3128
|
+
fill: ${({ theme }) => theme.colors.primary600};
|
3086
3129
|
}
|
3087
3130
|
}
|
3088
3131
|
}
|
@@ -4220,7 +4263,7 @@ const EditorLayout = ({
|
|
4220
4263
|
justifyContent: "flex-end",
|
4221
4264
|
shrink: 0,
|
4222
4265
|
width: "100%",
|
4223
|
-
children: /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: onCollapse, children: [
|
4266
|
+
children: /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
|
4224
4267
|
/* @__PURE__ */ jsx(Typography, { children: formatMessage({
|
4225
4268
|
id: "components.Wysiwyg.collapse",
|
4226
4269
|
defaultMessage: "Collapse"
|
@@ -4238,12 +4281,14 @@ const EditorLayout = ({
|
|
4238
4281
|
) }) });
|
4239
4282
|
}
|
4240
4283
|
return /* @__PURE__ */ jsx(
|
4241
|
-
|
4284
|
+
Flex,
|
4242
4285
|
{
|
4243
4286
|
borderColor: error ? "danger600" : "neutral200",
|
4244
4287
|
borderStyle: "solid",
|
4245
4288
|
borderWidth: "1px",
|
4246
4289
|
hasRadius: true,
|
4290
|
+
direction: "column",
|
4291
|
+
alignItems: "stretch",
|
4247
4292
|
children
|
4248
4293
|
}
|
4249
4294
|
);
|
@@ -4254,11 +4299,19 @@ const ExpandWrapper = styled(Flex)`
|
|
4254
4299
|
const BoxWithBorder = styled(Box)`
|
4255
4300
|
border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
|
4256
4301
|
`;
|
4257
|
-
const ExpandButton$1 = styled(
|
4302
|
+
const ExpandButton$1 = styled(Button)`
|
4258
4303
|
background-color: transparent;
|
4259
4304
|
border: none;
|
4260
4305
|
align-items: center;
|
4261
4306
|
|
4307
|
+
& > span {
|
4308
|
+
display: flex;
|
4309
|
+
justify-content: space-between;
|
4310
|
+
align-items: center;
|
4311
|
+
width: 100%;
|
4312
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
4313
|
+
}
|
4314
|
+
|
4262
4315
|
svg {
|
4263
4316
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
4264
4317
|
|
@@ -4554,11 +4607,19 @@ const MoreButton = styled(IconButton)`
|
|
4554
4607
|
const IconButtonGroupMargin = styled(IconButtonGroup)`
|
4555
4608
|
margin-right: ${({ theme }) => `${theme.spaces[2]}`};
|
4556
4609
|
`;
|
4557
|
-
const ExpandButton = styled(
|
4610
|
+
const ExpandButton = styled(Button)`
|
4558
4611
|
background-color: transparent;
|
4559
4612
|
border: none;
|
4560
4613
|
align-items: center;
|
4561
4614
|
|
4615
|
+
& > span {
|
4616
|
+
display: flex;
|
4617
|
+
justify-content: space-between;
|
4618
|
+
align-items: center;
|
4619
|
+
width: 100%;
|
4620
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
4621
|
+
}
|
4622
|
+
|
4562
4623
|
svg {
|
4563
4624
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
4564
4625
|
path {
|
@@ -4570,8 +4631,8 @@ const ExpandButton = styled(BaseButton)`
|
|
4570
4631
|
`;
|
4571
4632
|
const WysiwygFooter = ({ onToggleExpand }) => {
|
4572
4633
|
const { formatMessage } = useIntl();
|
4573
|
-
return /* @__PURE__ */ jsx(Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, children: [
|
4574
|
-
/* @__PURE__ */ jsx(Typography, { children: formatMessage({
|
4634
|
+
return /* @__PURE__ */ jsx(Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, variant: "tertiary", size: "M", children: [
|
4635
|
+
/* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: formatMessage({
|
4575
4636
|
id: "components.WysiwygBottomControls.fullscreen",
|
4576
4637
|
defaultMessage: "Expand"
|
4577
4638
|
}) }),
|
@@ -4607,14 +4668,23 @@ const WysiwygNav = ({
|
|
4607
4668
|
borderRadius: `0.4rem 0.4rem 0 0`,
|
4608
4669
|
children: [
|
4609
4670
|
/* @__PURE__ */ jsxs(Flex, { children: [
|
4610
|
-
/* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsxs(
|
4611
|
-
|
4612
|
-
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4616
|
-
|
4617
|
-
|
4671
|
+
/* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsxs(
|
4672
|
+
SingleSelect,
|
4673
|
+
{
|
4674
|
+
disabled: true,
|
4675
|
+
placeholder: selectPlaceholder,
|
4676
|
+
"aria-label": selectPlaceholder,
|
4677
|
+
size: "S",
|
4678
|
+
children: [
|
4679
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
|
4680
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
|
4681
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h3", children: "h3" }),
|
4682
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h4", children: "h4" }),
|
4683
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h5", children: "h5" }),
|
4684
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h6", children: "h6" })
|
4685
|
+
]
|
4686
|
+
}
|
4687
|
+
) }),
|
4618
4688
|
/* @__PURE__ */ jsxs(MainButtons, { children: [
|
4619
4689
|
/* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
|
4620
4690
|
/* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsx(Italic, {}) }),
|
@@ -4645,6 +4715,7 @@ const WysiwygNav = ({
|
|
4645
4715
|
placeholder: selectPlaceholder,
|
4646
4716
|
"aria-label": selectPlaceholder,
|
4647
4717
|
onChange: (value) => onActionClick(value, editorRef),
|
4718
|
+
size: "S",
|
4648
4719
|
children: [
|
4649
4720
|
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
|
4650
4721
|
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
|
@@ -4984,7 +5055,9 @@ const useFieldHint = (hint = void 0, attribute) => {
|
|
4984
5055
|
if (!maximum && !minimum) {
|
4985
5056
|
return hint;
|
4986
5057
|
}
|
4987
|
-
const units = !["biginteger", "integer", "number"].includes(
|
5058
|
+
const units = !["biginteger", "integer", "number", "dynamiczone", "component"].includes(
|
5059
|
+
attribute.type
|
5060
|
+
) ? formatMessage(
|
4988
5061
|
{
|
4989
5062
|
id: "content-manager.form.Input.hint.character.unit",
|
4990
5063
|
defaultMessage: "{maxValue, plural, one { character} other { characters}}"
|
@@ -5078,7 +5151,7 @@ const DynamicComponent = ({
|
|
5078
5151
|
/* @__PURE__ */ jsx(
|
5079
5152
|
IconButton,
|
5080
5153
|
{
|
5081
|
-
|
5154
|
+
variant: "ghost",
|
5082
5155
|
label: formatMessage(
|
5083
5156
|
{
|
5084
5157
|
id: getTranslation("components.DynamicZone.delete-label"),
|
@@ -5093,7 +5166,7 @@ const DynamicComponent = ({
|
|
5093
5166
|
/* @__PURE__ */ jsx(
|
5094
5167
|
IconButton,
|
5095
5168
|
{
|
5096
|
-
|
5169
|
+
variant: "ghost",
|
5097
5170
|
onClick: (e) => e.stopPropagation(),
|
5098
5171
|
"data-handler-id": handlerId,
|
5099
5172
|
ref: dragRef,
|
@@ -5154,7 +5227,18 @@ const DynamicComponent = ({
|
|
5154
5227
|
] }),
|
5155
5228
|
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsx(Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
5156
5229
|
const fieldName = `${name2}.${index}.${field.name}`;
|
5157
|
-
return /* @__PURE__ */ jsx(
|
5230
|
+
return /* @__PURE__ */ jsx(
|
5231
|
+
Grid$1.Item,
|
5232
|
+
{
|
5233
|
+
col: size,
|
5234
|
+
s: 12,
|
5235
|
+
xs: 12,
|
5236
|
+
direction: "column",
|
5237
|
+
alignItems: "stretch",
|
5238
|
+
children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...field, name: fieldName })
|
5239
|
+
},
|
5240
|
+
fieldName
|
5241
|
+
);
|
5158
5242
|
}) }, rowInd)) }) }) })
|
5159
5243
|
] }) }) })
|
5160
5244
|
] });
|
@@ -5347,7 +5431,7 @@ const DynamicZone = ({
|
|
5347
5431
|
const handleRemoveComponent = (name22, currentIndex) => () => {
|
5348
5432
|
removeFieldRow(name22, currentIndex);
|
5349
5433
|
};
|
5350
|
-
const hasError = error !== void 0
|
5434
|
+
const hasError = error !== void 0;
|
5351
5435
|
const renderButtonLabel = () => {
|
5352
5436
|
if (addComponentIsOpen) {
|
5353
5437
|
return formatMessage({ id: "app.utils.close-label", defaultMessage: "Close" });
|
@@ -5463,4 +5547,4 @@ export {
|
|
5463
5547
|
transformDocument as t,
|
5464
5548
|
useLazyComponents as u
|
5465
5549
|
};
|
5466
|
-
//# sourceMappingURL=Field-
|
5550
|
+
//# sourceMappingURL=Field-tHCw4lGA.mjs.map
|