@strapi/content-manager 0.0.0-experimental.cb311d9fcfbd8e441f790aea232f0a39bdd90e16 → 0.0.0-experimental.cb74730ce5154c26404d4dccca14976a22319002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -1
- package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-D0dyDTwq.mjs → ComponentConfigurationPage-BgCLcjXO.mjs} +4 -4
- package/dist/_chunks/{ComponentConfigurationPage-D0dyDTwq.mjs.map → ComponentConfigurationPage-BgCLcjXO.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-DL1MHO8i.js → ComponentConfigurationPage-DywpTZeV.js} +5 -6
- package/dist/_chunks/{ComponentConfigurationPage-DL1MHO8i.js.map → ComponentConfigurationPage-DywpTZeV.js.map} +1 -1
- package/dist/_chunks/{ComponentIcon-BXdiCGQp.js → ComponentIcon-CRbtQEUV.js} +2 -3
- package/dist/_chunks/{ComponentIcon-BXdiCGQp.js.map → ComponentIcon-CRbtQEUV.js.map} +1 -1
- package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -1
- package/dist/_chunks/{EditConfigurationPage-13b7S5Cq.mjs → EditConfigurationPage-BNjOAHNS.mjs} +4 -4
- package/dist/_chunks/{EditConfigurationPage-13b7S5Cq.mjs.map → EditConfigurationPage-BNjOAHNS.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CMaOf-A-.js → EditConfigurationPage-CxRlP5if.js} +5 -6
- package/dist/_chunks/{EditConfigurationPage-CMaOf-A-.js.map → EditConfigurationPage-CxRlP5if.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-BSVmMpRd.js → EditViewPage-BRewdTqE.js} +63 -13
- package/dist/_chunks/EditViewPage-BRewdTqE.js.map +1 -0
- package/dist/_chunks/{EditViewPage-C3tIZ8F5.mjs → EditViewPage-CD_hqc1J.mjs} +63 -12
- package/dist/_chunks/EditViewPage-CD_hqc1J.mjs.map +1 -0
- package/dist/_chunks/{Field-BvuT8cGL.mjs → Field-BPkQ-3Ku.mjs} +230 -158
- package/dist/_chunks/Field-BPkQ-3Ku.mjs.map +1 -0
- package/dist/_chunks/{Field-DUCVth4C.js → Field-DwvmENVf.js} +233 -162
- package/dist/_chunks/Field-DwvmENVf.js.map +1 -0
- package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
- package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
- package/dist/_chunks/{Form-Cpl4W1ak.js → Form-C_Gwv8P_.js} +39 -21
- package/dist/_chunks/Form-C_Gwv8P_.js.map +1 -0
- package/dist/_chunks/{Form-BZmDNVr9.mjs → Form-Czi0cf_2.mjs} +37 -18
- package/dist/_chunks/Form-Czi0cf_2.mjs.map +1 -0
- package/dist/_chunks/{History-D4U2YISB.js → History-C1TKAig-.js} +42 -100
- package/dist/_chunks/History-C1TKAig-.js.map +1 -0
- package/dist/_chunks/{History-Cq_Hrzuu.mjs → History-CIQHyi4T.mjs} +43 -100
- package/dist/_chunks/History-CIQHyi4T.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-Bny6CdWe.js → ListConfigurationPage-D-NGRLYu.js} +19 -9
- package/dist/_chunks/ListConfigurationPage-D-NGRLYu.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-W-KQHmBv.mjs → ListConfigurationPage-DcZsfyEL.mjs} +19 -8
- package/dist/_chunks/ListConfigurationPage-DcZsfyEL.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-HBBnJa8K.mjs → ListViewPage-C10McTK1.mjs} +99 -72
- package/dist/_chunks/ListViewPage-C10McTK1.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-O8F1pBJo.js → ListViewPage-xv5IQoZp.js} +103 -77
- package/dist/_chunks/ListViewPage-xv5IQoZp.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-B-gIhHWM.mjs → NoContentTypePage-CPc0Cd3S.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-B-gIhHWM.mjs.map → NoContentTypePage-CPc0Cd3S.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CQWChGPw.js → NoContentTypePage-Dzw5Yj5u.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-CQWChGPw.js.map → NoContentTypePage-Dzw5Yj5u.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CY46zxnM.js → NoPermissionsPage-DAe5CDCC.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CY46zxnM.js.map → NoPermissionsPage-DAe5CDCC.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-XhOPl8wx.mjs → NoPermissionsPage-wfPBh2_0.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-XhOPl8wx.mjs.map → NoPermissionsPage-wfPBh2_0.mjs.map} +1 -1
- package/dist/_chunks/Preview-B7LyGT_b.js +290 -0
- package/dist/_chunks/Preview-B7LyGT_b.js.map +1 -0
- package/dist/_chunks/Preview-BVFFm7uB.mjs +272 -0
- package/dist/_chunks/Preview-BVFFm7uB.mjs.map +1 -0
- package/dist/_chunks/{Relations-C4gGfZRv.js → Relations-BmYR1AjY.js} +76 -43
- package/dist/_chunks/Relations-BmYR1AjY.js.map +1 -0
- package/dist/_chunks/{Relations-vFZ6Wasg.mjs → Relations-JPhWxk-s.mjs} +76 -42
- package/dist/_chunks/Relations-JPhWxk-s.mjs.map +1 -0
- package/dist/_chunks/{en-uOUIxfcQ.js → en-BK8Xyl5I.js} +28 -15
- package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BK8Xyl5I.js.map} +1 -1
- package/dist/_chunks/{en-BrCTWlZv.mjs → en-Dtk_ot79.mjs} +28 -15
- package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-Dtk_ot79.mjs.map} +1 -1
- package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
- package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
- package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
- package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
- package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
- package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
- package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
- package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
- package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
- package/dist/_chunks/{index-5EMXLEM_.js → index-C2Q_PLWj.js} +1199 -927
- package/dist/_chunks/index-C2Q_PLWj.js.map +1 -0
- package/dist/_chunks/{index-Dpxg3ctD.mjs → index-DLIkNVnQ.mjs} +1217 -945
- package/dist/_chunks/index-DLIkNVnQ.mjs.map +1 -0
- package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
- package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
- package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
- package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
- package/dist/_chunks/{layout-P3eKO1Qy.js → layout-7AsWJzZJ.js} +10 -10
- package/dist/_chunks/layout-7AsWJzZJ.js.map +1 -0
- package/dist/_chunks/{layout-C0INpKap.mjs → layout-qE8qkNH_.mjs} +9 -8
- package/dist/_chunks/layout-qE8qkNH_.mjs.map +1 -0
- package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
- package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
- package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
- package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
- package/dist/_chunks/{relations-FBRRBWeO.mjs → relations-BjHH_1Am.mjs} +6 -7
- package/dist/_chunks/relations-BjHH_1Am.mjs.map +1 -0
- package/dist/_chunks/{relations-B1y0K6LE.js → relations-EifVzf_2.js} +6 -7
- package/dist/_chunks/relations-EifVzf_2.js.map +1 -0
- package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
- package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
- package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
- package/dist/admin/index.js +2 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +5 -4
- package/dist/admin/src/exports.d.ts +1 -1
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/hooks/useDocument.d.ts +32 -1
- package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
- package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
- 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 +4 -48
- package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
- package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
- package/dist/admin/src/preview/constants.d.ts +1 -0
- package/dist/admin/src/preview/index.d.ts +4 -0
- package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
- package/dist/admin/src/preview/routes.d.ts +3 -0
- package/dist/admin/src/preview/services/preview.d.ts +3 -0
- package/dist/admin/src/router.d.ts +1 -1
- package/dist/admin/src/services/api.d.ts +1 -1
- package/dist/admin/src/services/components.d.ts +2 -2
- package/dist/admin/src/services/contentTypes.d.ts +3 -3
- package/dist/admin/src/services/documents.d.ts +19 -20
- package/dist/admin/src/services/init.d.ts +1 -1
- package/dist/admin/src/services/relations.d.ts +2 -2
- package/dist/admin/src/services/uid.d.ts +3 -3
- package/dist/admin/src/utils/validation.d.ts +4 -1
- package/dist/server/index.js +486 -219
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +486 -218
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
- package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
- package/dist/server/src/history/services/history.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 +3 -3
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +4 -4
- package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
- package/dist/server/src/preview/constants.d.ts +2 -0
- package/dist/server/src/preview/constants.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/index.d.ts +2 -0
- package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/preview.d.ts +13 -0
- package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
- package/dist/server/src/preview/index.d.ts +4 -0
- package/dist/server/src/preview/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/index.d.ts +8 -0
- package/dist/server/src/preview/routes/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/preview.d.ts +4 -0
- package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
- package/dist/server/src/preview/services/index.d.ts +16 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview-config.d.ts +32 -0
- package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview.d.ts +12 -0
- package/dist/server/src/preview/services/preview.d.ts.map +1 -0
- package/dist/server/src/preview/utils.d.ts +19 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -0
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/routes/index.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 +8 -8
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +4 -4
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/permission-checker.d.ts.map +1 -1
- package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
- package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
- package/dist/server/src/utils/index.d.ts +2 -0
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/dist/shared/contracts/collection-types.d.ts +3 -1
- package/dist/shared/contracts/collection-types.d.ts.map +1 -1
- package/dist/shared/contracts/index.d.ts +1 -0
- package/dist/shared/contracts/index.d.ts.map +1 -1
- package/dist/shared/contracts/preview.d.ts +27 -0
- package/dist/shared/contracts/preview.d.ts.map +1 -0
- package/dist/shared/index.js +4 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs +4 -0
- package/dist/shared/index.mjs.map +1 -1
- package/package.json +15 -15
- package/dist/_chunks/EditViewPage-BSVmMpRd.js.map +0 -1
- package/dist/_chunks/EditViewPage-C3tIZ8F5.mjs.map +0 -1
- package/dist/_chunks/Field-BvuT8cGL.mjs.map +0 -1
- package/dist/_chunks/Field-DUCVth4C.js.map +0 -1
- package/dist/_chunks/Form-BZmDNVr9.mjs.map +0 -1
- package/dist/_chunks/Form-Cpl4W1ak.js.map +0 -1
- package/dist/_chunks/History-Cq_Hrzuu.mjs.map +0 -1
- package/dist/_chunks/History-D4U2YISB.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-Bny6CdWe.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-W-KQHmBv.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-HBBnJa8K.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-O8F1pBJo.js.map +0 -1
- package/dist/_chunks/Relations-C4gGfZRv.js.map +0 -1
- package/dist/_chunks/Relations-vFZ6Wasg.mjs.map +0 -1
- package/dist/_chunks/index-5EMXLEM_.js.map +0 -1
- package/dist/_chunks/index-Dpxg3ctD.mjs.map +0 -1
- package/dist/_chunks/layout-C0INpKap.mjs.map +0 -1
- package/dist/_chunks/layout-P3eKO1Qy.js.map +0 -1
- package/dist/_chunks/relations-B1y0K6LE.js.map +0 -1
- package/dist/_chunks/relations-FBRRBWeO.mjs.map +0 -1
- package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
- package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
- package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
- package/strapi-server.js +0 -3
@@ -2,24 +2,24 @@ 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,
|
8
|
+
import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, n as CLONE_PATH, d as buildValidParams, f as useDocumentRBAC, S as SINGLE_TYPES, o as useDocLayout } from "./index-DLIkNVnQ.mjs";
|
9
9
|
import { generateNKeysBetween } from "fractional-indexing";
|
10
|
-
import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-
|
11
|
-
import {
|
10
|
+
import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-JPhWxk-s.mjs";
|
11
|
+
import { CodeBlock as CodeBlock$1, HeadingOne, HeadingTwo, HeadingThree, HeadingFour, HeadingFive, HeadingSix, Image as Image$1, NumberList, BulletList, Paragraph, Quotes, Link as Link$1, Drag, Collapse, Bold, Italic, Underline, StrikeThrough, Code, 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";
|
14
14
|
import { getEmptyImage } from "react-dnd-html5-backend";
|
15
|
-
import { a as DIRECTIONS, u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-
|
16
|
-
import { g as getIn } from "./objects-
|
15
|
+
import { a as DIRECTIONS, u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-DJ6jqvZN.mjs";
|
16
|
+
import { g as getIn } from "./objects-D6yBsdmx.mjs";
|
17
17
|
import { Editor as Editor$1, Transforms, Node, Element, Range, Path, Point, createEditor } from "slate";
|
18
18
|
import { withHistory } from "slate-history";
|
19
19
|
import { useFocused, useSelected, ReactEditor, Editable, useSlate, Slate, withReact } from "slate-react";
|
20
|
-
import { p as prefixFileUrlWithBackendUrl, u as usePrev } from "./
|
20
|
+
import { p as prefixFileUrlWithBackendUrl, u as usePrev, a as useDebounce } from "./useDebounce-DmuSJIF3.mjs";
|
21
21
|
import * as Toolbar from "@radix-ui/react-toolbar";
|
22
|
-
import { useLocation } from "react-router-dom";
|
22
|
+
import { useLocation, useMatch } from "react-router-dom";
|
23
23
|
import CodeMirror from "codemirror5";
|
24
24
|
import sanitizeHtml from "sanitize-html";
|
25
25
|
import { getLanguage, highlight, highlightAuto } from "highlight.js";
|
@@ -508,7 +508,7 @@ const CodeEditor = (props) => {
|
|
508
508
|
const codeBlocks = {
|
509
509
|
code: {
|
510
510
|
renderElement: (props) => /* @__PURE__ */ jsx(CodeEditor, { ...props }),
|
511
|
-
icon:
|
511
|
+
icon: CodeBlock$1,
|
512
512
|
label: {
|
513
513
|
id: "components.Blocks.blocks.code",
|
514
514
|
defaultMessage: "Code block"
|
@@ -697,8 +697,7 @@ const ImageDialog = () => {
|
|
697
697
|
const [isOpen, setIsOpen] = React.useState(true);
|
698
698
|
const { editor } = useBlocksEditorContext("ImageDialog");
|
699
699
|
const components = useStrapiApp("ImageDialog", (state) => state.components);
|
700
|
-
if (!components || !isOpen)
|
701
|
-
return null;
|
700
|
+
if (!components || !isOpen) return null;
|
702
701
|
const MediaLibraryDialog = components["media-library"];
|
703
702
|
const insertImages = (images) => {
|
704
703
|
Transforms.unwrapNodes(editor, {
|
@@ -707,14 +706,12 @@ const ImageDialog = () => {
|
|
707
706
|
});
|
708
707
|
const nodeEntryBeingReplaced = Editor$1.above(editor, {
|
709
708
|
match(node) {
|
710
|
-
if (Editor$1.isEditor(node))
|
711
|
-
return false;
|
709
|
+
if (Editor$1.isEditor(node)) return false;
|
712
710
|
const isInlineNode = ["text", "link"].includes(node.type);
|
713
711
|
return !isInlineNode;
|
714
712
|
}
|
715
713
|
});
|
716
|
-
if (!nodeEntryBeingReplaced)
|
717
|
-
return;
|
714
|
+
if (!nodeEntryBeingReplaced) return;
|
718
715
|
const [, pathToInsert] = nodeEntryBeingReplaced;
|
719
716
|
Transforms.removeNodes(editor);
|
720
717
|
const nodesToInsert = images.map((image) => {
|
@@ -892,8 +889,7 @@ const LinkContent = React.forwardRef(
|
|
892
889
|
ReactEditor.focus(editor);
|
893
890
|
};
|
894
891
|
React.useEffect(() => {
|
895
|
-
if (popoverOpen)
|
896
|
-
linkInputRef.current?.focus();
|
892
|
+
if (popoverOpen) linkInputRef.current?.focus();
|
897
893
|
}, [popoverOpen]);
|
898
894
|
const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
|
899
895
|
return /* @__PURE__ */ jsxs(Popover.Root, { open: popoverOpen, children: [
|
@@ -1048,8 +1044,7 @@ const isText$1 = (node) => {
|
|
1048
1044
|
return Node.isNode(node) && !Editor$1.isEditor(node) && node.type === "text";
|
1049
1045
|
};
|
1050
1046
|
const handleBackspaceKeyOnList = (editor, event) => {
|
1051
|
-
if (!editor.selection)
|
1052
|
-
return;
|
1047
|
+
if (!editor.selection) return;
|
1053
1048
|
const [currentListItem, currentListItemPath] = Editor$1.parent(editor, editor.selection.anchor);
|
1054
1049
|
const [currentList, currentListPath] = Editor$1.parent(editor, currentListItemPath);
|
1055
1050
|
const isListEmpty = currentList.children.length === 1 && isText$1(currentListItem.children[0]) && currentListItem.children[0].text === "";
|
@@ -1158,8 +1153,7 @@ const handleEnterKeyOnList = (editor) => {
|
|
1158
1153
|
};
|
1159
1154
|
const handleConvertToList = (editor, format) => {
|
1160
1155
|
const convertedPath = baseHandleConvert(editor, { type: "list-item" });
|
1161
|
-
if (!convertedPath)
|
1162
|
-
return;
|
1156
|
+
if (!convertedPath) return;
|
1163
1157
|
Transforms.wrapNodes(editor, { type: "list", format, children: [] }, { at: convertedPath });
|
1164
1158
|
};
|
1165
1159
|
const handleTabOnList = (editor) => {
|
@@ -1171,8 +1165,7 @@ const handleTabOnList = (editor) => {
|
|
1171
1165
|
}
|
1172
1166
|
const [currentListItem, currentListItemPath] = currentListItemEntry;
|
1173
1167
|
const [currentList] = Editor$1.parent(editor, currentListItemPath);
|
1174
|
-
if (currentListItem === currentList.children[0])
|
1175
|
-
return;
|
1168
|
+
if (currentListItem === currentList.children[0]) return;
|
1176
1169
|
const currentListItemIndex = currentList.children.findIndex((item) => item === currentListItem);
|
1177
1170
|
const previousNode = currentList.children[currentListItemIndex - 1];
|
1178
1171
|
if (previousNode.type === "list") {
|
@@ -1407,7 +1400,7 @@ const ToolbarButton = ({
|
|
1407
1400
|
width: 7,
|
1408
1401
|
height: 7,
|
1409
1402
|
hasRadius: true,
|
1410
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
1403
|
+
children: /* @__PURE__ */ jsx(Icon, { fill: disabled ? "neutral300" : enabledColor })
|
1411
1404
|
}
|
1412
1405
|
)
|
1413
1406
|
}
|
@@ -1539,8 +1532,7 @@ const isListNode = (node) => {
|
|
1539
1532
|
const ListButton = ({ block, format }) => {
|
1540
1533
|
const { editor, disabled, blocks } = useBlocksEditorContext("ListButton");
|
1541
1534
|
const isListActive = () => {
|
1542
|
-
if (!editor.selection)
|
1543
|
-
return false;
|
1535
|
+
if (!editor.selection) return false;
|
1544
1536
|
const currentListEntry = Editor$1.above(editor, {
|
1545
1537
|
match: (node) => !Editor$1.isEditor(node) && node.type === "list",
|
1546
1538
|
at: editor.selection.anchor
|
@@ -1614,8 +1606,7 @@ const LinkButton = ({ disabled }) => {
|
|
1614
1606
|
const { editor } = useBlocksEditorContext("LinkButton");
|
1615
1607
|
const isLinkActive = () => {
|
1616
1608
|
const { selection } = editor;
|
1617
|
-
if (!selection)
|
1618
|
-
return false;
|
1609
|
+
if (!selection) return false;
|
1619
1610
|
const [match] = Array.from(
|
1620
1611
|
Editor$1.nodes(editor, {
|
1621
1612
|
at: Editor$1.unhangRange(editor, selection),
|
@@ -1749,6 +1740,7 @@ const DragItem = styled(Flex)`
|
|
1749
1740
|
}
|
1750
1741
|
`;
|
1751
1742
|
const DragIconButton = styled(IconButton)`
|
1743
|
+
user-select: none;
|
1752
1744
|
display: flex;
|
1753
1745
|
align-items: center;
|
1754
1746
|
justify-content: center;
|
@@ -1820,8 +1812,7 @@ const DragAndDropElement = ({
|
|
1820
1812
|
displayedValue: children
|
1821
1813
|
},
|
1822
1814
|
onDropItem(currentIndex, newIndex) {
|
1823
|
-
if (newIndex)
|
1824
|
-
handleMoveBlock(newIndex, currentIndex);
|
1815
|
+
if (newIndex) handleMoveBlock(newIndex, currentIndex);
|
1825
1816
|
}
|
1826
1817
|
});
|
1827
1818
|
const composedBoxRefs = useComposedRefs(blockRef, dropRef);
|
@@ -1877,6 +1868,7 @@ const DragAndDropElement = ({
|
|
1877
1868
|
DragIconButton,
|
1878
1869
|
{
|
1879
1870
|
tag: "div",
|
1871
|
+
contentEditable: false,
|
1880
1872
|
role: "button",
|
1881
1873
|
tabIndex: 0,
|
1882
1874
|
withTooltip: false,
|
@@ -1964,8 +1956,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
1964
1956
|
[modifiers2]
|
1965
1957
|
);
|
1966
1958
|
const handleMoveBlocks = (editor2, event) => {
|
1967
|
-
if (!editor2.selection)
|
1968
|
-
return;
|
1959
|
+
if (!editor2.selection) return;
|
1969
1960
|
const start = Range.start(editor2.selection);
|
1970
1961
|
const currentIndex = [start.path[0]];
|
1971
1962
|
let newIndexPosition = 0;
|
@@ -2102,8 +2093,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
|
|
2102
2093
|
}
|
2103
2094
|
};
|
2104
2095
|
const handleScrollSelectionIntoView = () => {
|
2105
|
-
if (!editor.selection)
|
2106
|
-
return;
|
2096
|
+
if (!editor.selection) return;
|
2107
2097
|
const domRange = ReactEditor.toDOMRange(editor, editor.selection);
|
2108
2098
|
const domRect = domRange.getBoundingClientRect();
|
2109
2099
|
const blocksInput = blocksRef.current;
|
@@ -2297,8 +2287,7 @@ const InlineCode = styled.code`
|
|
2297
2287
|
`;
|
2298
2288
|
const baseCheckIsActive = (editor, name2) => {
|
2299
2289
|
const marks = Editor$1.marks(editor);
|
2300
|
-
if (!marks)
|
2301
|
-
return false;
|
2290
|
+
if (!marks) return false;
|
2302
2291
|
return Boolean(marks[name2]);
|
2303
2292
|
};
|
2304
2293
|
const baseHandleToggle = (editor, name2) => {
|
@@ -2622,7 +2611,7 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
2622
2611
|
Box,
|
2623
2612
|
{
|
2624
2613
|
tag: "button",
|
2625
|
-
background: "neutral100",
|
2614
|
+
background: disabled ? "neutral150" : "neutral100",
|
2626
2615
|
borderColor: field.error ? "danger600" : "neutral200",
|
2627
2616
|
hasRadius: true,
|
2628
2617
|
disabled,
|
@@ -2630,32 +2619,32 @@ const Initializer = ({ disabled, name: name2, onClick }) => {
|
|
2630
2619
|
paddingTop: 9,
|
2631
2620
|
paddingBottom: 9,
|
2632
2621
|
type: "button",
|
2622
|
+
style: { cursor: disabled ? "not-allowed" : "pointer" },
|
2633
2623
|
children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
|
2634
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(
|
2635
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(
|
2636
|
-
|
2637
|
-
|
2638
|
-
|
2624
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", color: disabled ? "neutral500" : "primary600", children: /* @__PURE__ */ jsx(PlusCircle, { width: "3.2rem", height: "3.2rem" }) }),
|
2625
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(
|
2626
|
+
Typography,
|
2627
|
+
{
|
2628
|
+
textColor: disabled ? "neutral600" : "primary600",
|
2629
|
+
variant: "pi",
|
2630
|
+
fontWeight: "bold",
|
2631
|
+
children: formatMessage({
|
2632
|
+
id: getTranslation("components.empty-repeatable"),
|
2633
|
+
defaultMessage: "No entry yet. Click to add one."
|
2634
|
+
})
|
2635
|
+
}
|
2636
|
+
) })
|
2639
2637
|
] })
|
2640
2638
|
}
|
2641
2639
|
) });
|
2642
2640
|
};
|
2643
|
-
const CircleIcon = styled(PlusCircle)`
|
2644
|
-
width: 2.4rem;
|
2645
|
-
height: 2.4rem;
|
2646
|
-
> circle {
|
2647
|
-
fill: ${({ theme }) => theme.colors.primary200};
|
2648
|
-
}
|
2649
|
-
> path {
|
2650
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
2651
|
-
}
|
2652
|
-
`;
|
2653
2641
|
const NonRepeatableComponent = ({
|
2654
2642
|
attribute,
|
2655
2643
|
name: name2,
|
2656
2644
|
children,
|
2657
2645
|
layout
|
2658
2646
|
}) => {
|
2647
|
+
const { formatMessage } = useIntl();
|
2659
2648
|
const { value } = useField(name2);
|
2660
2649
|
const level = useComponent("NonRepeatableComponent", (state) => state.level);
|
2661
2650
|
const isNested = level > 0;
|
@@ -2672,7 +2661,22 @@ const NonRepeatableComponent = ({
|
|
2672
2661
|
children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index) => {
|
2673
2662
|
return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2674
2663
|
const completeFieldName = `${name2}.${field.name}`;
|
2675
|
-
|
2664
|
+
const translatedLabel = formatMessage({
|
2665
|
+
id: `content-manager.components.${attribute.component}.${field.name}`,
|
2666
|
+
defaultMessage: field.label
|
2667
|
+
});
|
2668
|
+
return /* @__PURE__ */ jsx(
|
2669
|
+
Grid$1.Item,
|
2670
|
+
{
|
2671
|
+
col: size,
|
2672
|
+
s: 12,
|
2673
|
+
xs: 12,
|
2674
|
+
direction: "column",
|
2675
|
+
alignItems: "stretch",
|
2676
|
+
children: children({ ...field, label: translatedLabel, name: completeFieldName })
|
2677
|
+
},
|
2678
|
+
completeFieldName
|
2679
|
+
);
|
2676
2680
|
}) }, index);
|
2677
2681
|
}) })
|
2678
2682
|
}
|
@@ -2691,13 +2695,34 @@ const RepeatableComponent = ({
|
|
2691
2695
|
const { search: searchString } = useLocation();
|
2692
2696
|
const search = React.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
2693
2697
|
const { components } = useDoc();
|
2694
|
-
const {
|
2698
|
+
const {
|
2699
|
+
value = [],
|
2700
|
+
error,
|
2701
|
+
rawError
|
2702
|
+
} = useField(name2);
|
2695
2703
|
const addFieldRow = useForm("RepeatableComponent", (state) => state.addFieldRow);
|
2696
2704
|
const moveFieldRow = useForm("RepeatableComponent", (state) => state.moveFieldRow);
|
2697
2705
|
const removeFieldRow = useForm("RepeatableComponent", (state) => state.removeFieldRow);
|
2698
2706
|
const { max = Infinity } = attribute;
|
2699
2707
|
const [collapseToOpen, setCollapseToOpen] = React.useState("");
|
2700
2708
|
const [liveText, setLiveText] = React.useState("");
|
2709
|
+
React.useEffect(() => {
|
2710
|
+
const hasNestedErrors = rawError && Array.isArray(rawError) && rawError.length > 0;
|
2711
|
+
const hasNestedValue = value && Array.isArray(value) && value.length > 0;
|
2712
|
+
if (hasNestedErrors && hasNestedValue) {
|
2713
|
+
const errorOpenItems = rawError.map((_, idx) => {
|
2714
|
+
return value[idx] ? value[idx].__temp_key__ : null;
|
2715
|
+
}).filter((value2) => !!value2);
|
2716
|
+
if (errorOpenItems && errorOpenItems.length > 0) {
|
2717
|
+
setCollapseToOpen((collapseToOpen2) => {
|
2718
|
+
if (!errorOpenItems.includes(collapseToOpen2)) {
|
2719
|
+
return errorOpenItems[0];
|
2720
|
+
}
|
2721
|
+
return collapseToOpen2;
|
2722
|
+
});
|
2723
|
+
}
|
2724
|
+
}
|
2725
|
+
}, [rawError, value]);
|
2701
2726
|
const componentTmpKeyWithFocussedField = React.useMemo(() => {
|
2702
2727
|
if (search.has("field")) {
|
2703
2728
|
const fieldParam = search.get("field");
|
@@ -2850,7 +2875,26 @@ const RepeatableComponent = ({
|
|
2850
2875
|
children: layout.map((row, index2) => {
|
2851
2876
|
return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
2852
2877
|
const completeFieldName = `${nameWithIndex}.${field.name}`;
|
2853
|
-
|
2878
|
+
const translatedLabel = formatMessage({
|
2879
|
+
id: `content-manager.components.${attribute.component}.${field.name}`,
|
2880
|
+
defaultMessage: field.label
|
2881
|
+
});
|
2882
|
+
return /* @__PURE__ */ jsx(
|
2883
|
+
Grid$1.Item,
|
2884
|
+
{
|
2885
|
+
col: size,
|
2886
|
+
s: 12,
|
2887
|
+
xs: 12,
|
2888
|
+
direction: "column",
|
2889
|
+
alignItems: "stretch",
|
2890
|
+
children: children({
|
2891
|
+
...field,
|
2892
|
+
label: translatedLabel,
|
2893
|
+
name: completeFieldName
|
2894
|
+
})
|
2895
|
+
},
|
2896
|
+
completeFieldName
|
2897
|
+
);
|
2854
2898
|
}) }, index2);
|
2855
2899
|
})
|
2856
2900
|
}
|
@@ -2945,7 +2989,7 @@ const Component = ({
|
|
2945
2989
|
/* @__PURE__ */ jsx(
|
2946
2990
|
IconButton,
|
2947
2991
|
{
|
2948
|
-
|
2992
|
+
variant: "ghost",
|
2949
2993
|
onClick: onDeleteComponent,
|
2950
2994
|
label: formatMessage({
|
2951
2995
|
id: getTranslation("containers.Edit.delete"),
|
@@ -2958,7 +3002,7 @@ const Component = ({
|
|
2958
3002
|
IconButton,
|
2959
3003
|
{
|
2960
3004
|
ref: composedAccordionRefs,
|
2961
|
-
|
3005
|
+
variant: "ghost",
|
2962
3006
|
onClick: (e) => e.stopPropagation(),
|
2963
3007
|
"data-handler-id": handlerId,
|
2964
3008
|
label: formatMessage({
|
@@ -3028,7 +3072,7 @@ const ComponentInput = ({
|
|
3028
3072
|
id: getTranslation("components.reset-entry"),
|
3029
3073
|
defaultMessage: "Reset Entry"
|
3030
3074
|
}),
|
3031
|
-
|
3075
|
+
variant: "ghost",
|
3032
3076
|
onClick: () => {
|
3033
3077
|
field.onChange(name2, null);
|
3034
3078
|
},
|
@@ -3057,11 +3101,8 @@ const AddComponentButton = ({
|
|
3057
3101
|
onClick,
|
3058
3102
|
disabled: isDisabled,
|
3059
3103
|
background: "neutral0",
|
3060
|
-
paddingTop: 3,
|
3061
|
-
paddingBottom: 3,
|
3062
|
-
paddingLeft: 4,
|
3063
|
-
paddingRight: 4,
|
3064
3104
|
style: { cursor: isDisabled ? "not-allowed" : "pointer" },
|
3105
|
+
variant: "tertiary",
|
3065
3106
|
children: /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
|
3066
3107
|
/* @__PURE__ */ jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
|
3067
3108
|
/* @__PURE__ */ jsx(
|
@@ -3090,10 +3131,11 @@ const StyledAddIcon = styled(PlusCircle)`
|
|
3090
3131
|
}
|
3091
3132
|
`;
|
3092
3133
|
const AddComponentTitle = styled(Typography)``;
|
3093
|
-
const StyledButton = styled(
|
3134
|
+
const StyledButton = styled(Button)`
|
3094
3135
|
border-radius: 26px;
|
3095
3136
|
border-color: ${({ theme }) => theme.colors.neutral150};
|
3096
3137
|
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
|
3138
|
+
height: 5rem;
|
3097
3139
|
|
3098
3140
|
&:hover {
|
3099
3141
|
${AddComponentTitle} {
|
@@ -3105,7 +3147,7 @@ const StyledButton = styled(BaseButton)`
|
|
3105
3147
|
fill: ${({ theme }) => theme.colors.primary600};
|
3106
3148
|
}
|
3107
3149
|
> path {
|
3108
|
-
fill: ${({ theme }) => theme.colors.
|
3150
|
+
fill: ${({ theme }) => theme.colors.primary600};
|
3109
3151
|
}
|
3110
3152
|
}
|
3111
3153
|
}
|
@@ -3236,18 +3278,6 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
|
|
3236
3278
|
/* @__PURE__ */ jsx(Field.Hint, {})
|
3237
3279
|
] });
|
3238
3280
|
};
|
3239
|
-
function useDebounce(value, delay) {
|
3240
|
-
const [debouncedValue, setDebouncedValue] = useState(value);
|
3241
|
-
useEffect(() => {
|
3242
|
-
const handler = setTimeout(() => {
|
3243
|
-
setDebouncedValue(value);
|
3244
|
-
}, delay);
|
3245
|
-
return () => {
|
3246
|
-
clearTimeout(handler);
|
3247
|
-
};
|
3248
|
-
}, [value, delay]);
|
3249
|
-
return debouncedValue;
|
3250
|
-
}
|
3251
3281
|
const uidApi = contentManagerApi.injectEndpoints({
|
3252
3282
|
endpoints: (builder) => ({
|
3253
3283
|
getDefaultUID: builder.query({
|
@@ -3282,7 +3312,10 @@ const uidApi = contentManagerApi.injectEndpoints({
|
|
3282
3312
|
config: {
|
3283
3313
|
params
|
3284
3314
|
}
|
3285
|
-
})
|
3315
|
+
}),
|
3316
|
+
providesTags: (_res, _error, params) => [
|
3317
|
+
{ type: "UidAvailability", id: params.contentTypeUID }
|
3318
|
+
]
|
3286
3319
|
})
|
3287
3320
|
})
|
3288
3321
|
});
|
@@ -3294,8 +3327,10 @@ const UIDInput = React.forwardRef(
|
|
3294
3327
|
const allFormValues = useForm("InputUID", (form) => form.values);
|
3295
3328
|
const [availability, setAvailability] = React.useState();
|
3296
3329
|
const [showRegenerate, setShowRegenerate] = React.useState(false);
|
3330
|
+
const isCloning = useMatch(CLONE_PATH) !== null;
|
3297
3331
|
const field = useField(name2);
|
3298
3332
|
const debouncedValue = useDebounce(field.value, 300);
|
3333
|
+
const hasChanged = debouncedValue !== field.initialValue;
|
3299
3334
|
const { toggleNotification } = useNotification();
|
3300
3335
|
const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
|
3301
3336
|
const { formatMessage } = useIntl();
|
@@ -3371,8 +3406,9 @@ const UIDInput = React.forwardRef(
|
|
3371
3406
|
params
|
3372
3407
|
},
|
3373
3408
|
{
|
3409
|
+
// Don't check availability if the value is empty or wasn't changed
|
3374
3410
|
skip: !Boolean(
|
3375
|
-
|
3411
|
+
(hasChanged || isCloning) && debouncedValue && UID_REGEX.test(debouncedValue.trim())
|
3376
3412
|
)
|
3377
3413
|
}
|
3378
3414
|
);
|
@@ -3401,6 +3437,7 @@ const UIDInput = React.forwardRef(
|
|
3401
3437
|
const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
|
3402
3438
|
const fieldRef = useFocusInputField(name2);
|
3403
3439
|
const composedRefs = useComposedRefs(ref, fieldRef);
|
3440
|
+
const shouldShowAvailability = (hasChanged || isCloning) && debouncedValue != null && availability && !showRegenerate;
|
3404
3441
|
return /* @__PURE__ */ jsxs(Field.Root, { hint, name: name2, error: field.error, required, children: [
|
3405
3442
|
/* @__PURE__ */ jsx(Field.Label, { action: labelAction, children: label }),
|
3406
3443
|
/* @__PURE__ */ jsx(
|
@@ -3409,7 +3446,7 @@ const UIDInput = React.forwardRef(
|
|
3409
3446
|
ref: composedRefs,
|
3410
3447
|
disabled: props.disabled,
|
3411
3448
|
endAction: /* @__PURE__ */ jsxs(Flex, { position: "relative", gap: 1, children: [
|
3412
|
-
|
3449
|
+
shouldShowAvailability && /* @__PURE__ */ jsxs(
|
3413
3450
|
TextValidation,
|
3414
3451
|
{
|
3415
3452
|
alignItems: "center",
|
@@ -3698,8 +3735,7 @@ const Wrapper = styled.div`
|
|
3698
3735
|
`;
|
3699
3736
|
var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
|
3700
3737
|
function newlineAndIndentContinueMarkdownList(cm) {
|
3701
|
-
if (cm.getOption("disableInput"))
|
3702
|
-
return CodeMirror.Pass;
|
3738
|
+
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
3703
3739
|
var ranges = cm.listSelections(), replacements = [];
|
3704
3740
|
for (var i = 0; i < ranges.length; i++) {
|
3705
3741
|
var pos = ranges[i].head;
|
@@ -3733,8 +3769,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
|
|
3733
3769
|
var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
|
3734
3770
|
var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
|
3735
3771
|
replacements[i] = "\n" + indent + bullet + after;
|
3736
|
-
if (numbered)
|
3737
|
-
incrementRemainingMarkdownListNumbers(cm, pos);
|
3772
|
+
if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
|
3738
3773
|
}
|
3739
3774
|
}
|
3740
3775
|
cm.replaceSelections(replacements);
|
@@ -3752,10 +3787,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
|
|
3752
3787
|
var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
|
3753
3788
|
var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
|
3754
3789
|
if (startIndent === nextIndent && !isNaN(nextNumber)) {
|
3755
|
-
if (newNumber === nextNumber)
|
3756
|
-
|
3757
|
-
if (newNumber > nextNumber)
|
3758
|
-
itemNumber = newNumber + 1;
|
3790
|
+
if (newNumber === nextNumber) itemNumber = nextNumber + 1;
|
3791
|
+
if (newNumber > nextNumber) itemNumber = newNumber + 1;
|
3759
3792
|
cm.replaceRange(
|
3760
3793
|
nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
|
3761
3794
|
{
|
@@ -3768,10 +3801,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
|
|
3768
3801
|
}
|
3769
3802
|
);
|
3770
3803
|
} else {
|
3771
|
-
if (startIndent.length > nextIndent.length)
|
3772
|
-
|
3773
|
-
if (startIndent.length < nextIndent.length && lookAhead === 1)
|
3774
|
-
return;
|
3804
|
+
if (startIndent.length > nextIndent.length) return;
|
3805
|
+
if (startIndent.length < nextIndent.length && lookAhead === 1) return;
|
3775
3806
|
skipCount += 1;
|
3776
3807
|
}
|
3777
3808
|
}
|
@@ -4243,7 +4274,7 @@ const EditorLayout = ({
|
|
4243
4274
|
justifyContent: "flex-end",
|
4244
4275
|
shrink: 0,
|
4245
4276
|
width: "100%",
|
4246
|
-
children: /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: onCollapse, children: [
|
4277
|
+
children: /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
|
4247
4278
|
/* @__PURE__ */ jsx(Typography, { children: formatMessage({
|
4248
4279
|
id: "components.Wysiwyg.collapse",
|
4249
4280
|
defaultMessage: "Collapse"
|
@@ -4261,12 +4292,14 @@ const EditorLayout = ({
|
|
4261
4292
|
) }) });
|
4262
4293
|
}
|
4263
4294
|
return /* @__PURE__ */ jsx(
|
4264
|
-
|
4295
|
+
Flex,
|
4265
4296
|
{
|
4266
4297
|
borderColor: error ? "danger600" : "neutral200",
|
4267
4298
|
borderStyle: "solid",
|
4268
4299
|
borderWidth: "1px",
|
4269
4300
|
hasRadius: true,
|
4301
|
+
direction: "column",
|
4302
|
+
alignItems: "stretch",
|
4270
4303
|
children
|
4271
4304
|
}
|
4272
4305
|
);
|
@@ -4277,11 +4310,19 @@ const ExpandWrapper = styled(Flex)`
|
|
4277
4310
|
const BoxWithBorder = styled(Box)`
|
4278
4311
|
border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
|
4279
4312
|
`;
|
4280
|
-
const ExpandButton$1 = styled(
|
4313
|
+
const ExpandButton$1 = styled(Button)`
|
4281
4314
|
background-color: transparent;
|
4282
4315
|
border: none;
|
4283
4316
|
align-items: center;
|
4284
4317
|
|
4318
|
+
& > span {
|
4319
|
+
display: flex;
|
4320
|
+
justify-content: space-between;
|
4321
|
+
align-items: center;
|
4322
|
+
width: 100%;
|
4323
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
4324
|
+
}
|
4325
|
+
|
4285
4326
|
svg {
|
4286
4327
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
4287
4328
|
|
@@ -4548,40 +4589,28 @@ const quoteAndCodeHandler = (editor, markdownType) => {
|
|
4548
4589
|
insertWithoutTextToEdit(editor, markdownType, line, contentLength);
|
4549
4590
|
}
|
4550
4591
|
};
|
4551
|
-
const CustomIconButton = styled(IconButton)`
|
4552
|
-
padding: ${({ theme }) => theme.spaces[2]};
|
4553
|
-
|
4554
|
-
svg {
|
4555
|
-
width: 1.8rem;
|
4556
|
-
height: 1.8rem;
|
4557
|
-
}
|
4558
|
-
`;
|
4559
|
-
const CustomLinkIconButton = styled(CustomIconButton)`
|
4560
|
-
svg {
|
4561
|
-
width: 0.8rem;
|
4562
|
-
height: 0.8rem;
|
4563
|
-
}
|
4564
|
-
`;
|
4565
4592
|
const MainButtons = styled(IconButtonGroup)`
|
4566
4593
|
margin-left: ${({ theme }) => theme.spaces[4]};
|
4567
4594
|
`;
|
4568
4595
|
const MoreButton = styled(IconButton)`
|
4569
4596
|
margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
|
4570
|
-
padding: ${({ theme }) => theme.spaces[2]};
|
4571
|
-
|
4572
|
-
svg {
|
4573
|
-
width: 1.8rem;
|
4574
|
-
height: 1.8rem;
|
4575
|
-
}
|
4576
4597
|
`;
|
4577
4598
|
const IconButtonGroupMargin = styled(IconButtonGroup)`
|
4578
4599
|
margin-right: ${({ theme }) => `${theme.spaces[2]}`};
|
4579
4600
|
`;
|
4580
|
-
const ExpandButton = styled(
|
4601
|
+
const ExpandButton = styled(Button)`
|
4581
4602
|
background-color: transparent;
|
4582
4603
|
border: none;
|
4583
4604
|
align-items: center;
|
4584
4605
|
|
4606
|
+
& > span {
|
4607
|
+
display: flex;
|
4608
|
+
justify-content: space-between;
|
4609
|
+
align-items: center;
|
4610
|
+
width: 100%;
|
4611
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
4612
|
+
}
|
4613
|
+
|
4585
4614
|
svg {
|
4586
4615
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
4587
4616
|
path {
|
@@ -4593,7 +4622,7 @@ const ExpandButton = styled(BaseButton)`
|
|
4593
4622
|
`;
|
4594
4623
|
const WysiwygFooter = ({ onToggleExpand }) => {
|
4595
4624
|
const { formatMessage } = useIntl();
|
4596
|
-
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: [
|
4625
|
+
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: [
|
4597
4626
|
/* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: formatMessage({
|
4598
4627
|
id: "components.WysiwygBottomControls.fullscreen",
|
4599
4628
|
defaultMessage: "Expand"
|
@@ -4630,18 +4659,27 @@ const WysiwygNav = ({
|
|
4630
4659
|
borderRadius: `0.4rem 0.4rem 0 0`,
|
4631
4660
|
children: [
|
4632
4661
|
/* @__PURE__ */ jsxs(Flex, { children: [
|
4633
|
-
/* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsxs(
|
4634
|
-
|
4635
|
-
|
4636
|
-
|
4637
|
-
|
4638
|
-
|
4639
|
-
|
4640
|
-
|
4662
|
+
/* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsxs(
|
4663
|
+
SingleSelect,
|
4664
|
+
{
|
4665
|
+
disabled: true,
|
4666
|
+
placeholder: selectPlaceholder,
|
4667
|
+
"aria-label": selectPlaceholder,
|
4668
|
+
size: "S",
|
4669
|
+
children: [
|
4670
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
|
4671
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
|
4672
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h3", children: "h3" }),
|
4673
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h4", children: "h4" }),
|
4674
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h5", children: "h5" }),
|
4675
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h6", children: "h6" })
|
4676
|
+
]
|
4677
|
+
}
|
4678
|
+
) }),
|
4641
4679
|
/* @__PURE__ */ jsxs(MainButtons, { children: [
|
4642
|
-
/* @__PURE__ */ jsx(
|
4643
|
-
/* @__PURE__ */ jsx(
|
4644
|
-
/* @__PURE__ */ jsx(
|
4680
|
+
/* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
|
4681
|
+
/* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsx(Italic, {}) }),
|
4682
|
+
/* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsx(Underline, {}) })
|
4645
4683
|
] }),
|
4646
4684
|
/* @__PURE__ */ jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsx(More, {}) })
|
4647
4685
|
] }),
|
@@ -4668,6 +4706,7 @@ const WysiwygNav = ({
|
|
4668
4706
|
placeholder: selectPlaceholder,
|
4669
4707
|
"aria-label": selectPlaceholder,
|
4670
4708
|
onChange: (value) => onActionClick(value, editorRef),
|
4709
|
+
size: "S",
|
4671
4710
|
children: [
|
4672
4711
|
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
|
4673
4712
|
/* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
|
@@ -4679,17 +4718,9 @@ const WysiwygNav = ({
|
|
4679
4718
|
}
|
4680
4719
|
) }),
|
4681
4720
|
/* @__PURE__ */ jsxs(MainButtons, { children: [
|
4721
|
+
/* @__PURE__ */ jsx(IconButton, { onClick: () => onActionClick("Bold", editorRef), label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
|
4682
4722
|
/* @__PURE__ */ jsx(
|
4683
|
-
|
4684
|
-
{
|
4685
|
-
onClick: () => onActionClick("Bold", editorRef),
|
4686
|
-
label: "Bold",
|
4687
|
-
name: "Bold",
|
4688
|
-
children: /* @__PURE__ */ jsx(Bold, {})
|
4689
|
-
}
|
4690
|
-
),
|
4691
|
-
/* @__PURE__ */ jsx(
|
4692
|
-
CustomIconButton,
|
4723
|
+
IconButton,
|
4693
4724
|
{
|
4694
4725
|
onClick: () => onActionClick("Italic", editorRef),
|
4695
4726
|
label: "Italic",
|
@@ -4698,7 +4729,7 @@ const WysiwygNav = ({
|
|
4698
4729
|
}
|
4699
4730
|
),
|
4700
4731
|
/* @__PURE__ */ jsx(
|
4701
|
-
|
4732
|
+
IconButton,
|
4702
4733
|
{
|
4703
4734
|
onClick: () => onActionClick("Underline", editorRef),
|
4704
4735
|
label: "Underline",
|
@@ -4712,7 +4743,7 @@ const WysiwygNav = ({
|
|
4712
4743
|
/* @__PURE__ */ jsx(Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxs(Flex, { padding: 2, children: [
|
4713
4744
|
/* @__PURE__ */ jsxs(IconButtonGroupMargin, { children: [
|
4714
4745
|
/* @__PURE__ */ jsx(
|
4715
|
-
|
4746
|
+
IconButton,
|
4716
4747
|
{
|
4717
4748
|
onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
|
4718
4749
|
label: "Strikethrough",
|
@@ -4721,7 +4752,7 @@ const WysiwygNav = ({
|
|
4721
4752
|
}
|
4722
4753
|
),
|
4723
4754
|
/* @__PURE__ */ jsx(
|
4724
|
-
|
4755
|
+
IconButton,
|
4725
4756
|
{
|
4726
4757
|
onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
|
4727
4758
|
label: "BulletList",
|
@@ -4730,7 +4761,7 @@ const WysiwygNav = ({
|
|
4730
4761
|
}
|
4731
4762
|
),
|
4732
4763
|
/* @__PURE__ */ jsx(
|
4733
|
-
|
4764
|
+
IconButton,
|
4734
4765
|
{
|
4735
4766
|
onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
|
4736
4767
|
label: "NumberList",
|
@@ -4741,7 +4772,7 @@ const WysiwygNav = ({
|
|
4741
4772
|
] }),
|
4742
4773
|
/* @__PURE__ */ jsxs(IconButtonGroup, { children: [
|
4743
4774
|
/* @__PURE__ */ jsx(
|
4744
|
-
|
4775
|
+
IconButton,
|
4745
4776
|
{
|
4746
4777
|
onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
|
4747
4778
|
label: "Code",
|
@@ -4750,7 +4781,7 @@ const WysiwygNav = ({
|
|
4750
4781
|
}
|
4751
4782
|
),
|
4752
4783
|
/* @__PURE__ */ jsx(
|
4753
|
-
|
4784
|
+
IconButton,
|
4754
4785
|
{
|
4755
4786
|
onClick: () => {
|
4756
4787
|
handleTogglePopover();
|
@@ -4762,7 +4793,7 @@ const WysiwygNav = ({
|
|
4762
4793
|
}
|
4763
4794
|
),
|
4764
4795
|
/* @__PURE__ */ jsx(
|
4765
|
-
|
4796
|
+
IconButton,
|
4766
4797
|
{
|
4767
4798
|
onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
|
4768
4799
|
label: "Link",
|
@@ -4771,7 +4802,7 @@ const WysiwygNav = ({
|
|
4771
4802
|
}
|
4772
4803
|
),
|
4773
4804
|
/* @__PURE__ */ jsx(
|
4774
|
-
|
4805
|
+
IconButton,
|
4775
4806
|
{
|
4776
4807
|
onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
|
4777
4808
|
label: "Quote",
|
@@ -4908,15 +4939,19 @@ const Wysiwyg = React.forwardRef(
|
|
4908
4939
|
);
|
4909
4940
|
const MemoizedWysiwyg = React.memo(Wysiwyg);
|
4910
4941
|
const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
4911
|
-
const { id } = useDoc();
|
4942
|
+
const { id, document: document2, collectionType } = useDoc();
|
4912
4943
|
const isFormDisabled = useForm("InputRenderer", (state) => state.disabled);
|
4913
4944
|
const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
|
4914
4945
|
const canCreateFields = useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
|
4915
4946
|
const canReadFields = useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
|
4916
4947
|
const canUpdateFields = useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
|
4917
4948
|
const canUserAction = useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
|
4918
|
-
|
4919
|
-
|
4949
|
+
let idToCheck = id;
|
4950
|
+
if (collectionType === SINGLE_TYPES) {
|
4951
|
+
idToCheck = document2?.documentId;
|
4952
|
+
}
|
4953
|
+
const editableFields = idToCheck ? canUpdateFields : canCreateFields;
|
4954
|
+
const readableFields = idToCheck ? canReadFields : canCreateFields;
|
4920
4955
|
const canUserReadField = canUserAction(props.name, readableFields, props.type);
|
4921
4956
|
const canUserEditField = canUserAction(props.name, editableFields, props.type);
|
4922
4957
|
const fields = useStrapiApp("InputRenderer", (app) => app.fields);
|
@@ -4927,6 +4962,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
4927
4962
|
const {
|
4928
4963
|
edit: { components }
|
4929
4964
|
} = useDocLayout();
|
4965
|
+
const field = useField(props.name);
|
4930
4966
|
if (!visible) {
|
4931
4967
|
return null;
|
4932
4968
|
}
|
@@ -4937,7 +4973,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
|
|
4937
4973
|
if (attributeHasCustomFieldProperty(props.attribute)) {
|
4938
4974
|
const CustomInput = lazyComponentStore[props.attribute.customField];
|
4939
4975
|
if (CustomInput) {
|
4940
|
-
return /* @__PURE__ */ jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
|
4976
|
+
return /* @__PURE__ */ jsx(CustomInput, { ...props, ...field, hint, disabled: fieldIsDisabled });
|
4941
4977
|
}
|
4942
4978
|
return /* @__PURE__ */ jsx(
|
4943
4979
|
InputRenderer$1,
|
@@ -5098,12 +5134,20 @@ const DynamicComponent = ({
|
|
5098
5134
|
React.useEffect(() => {
|
5099
5135
|
dragPreviewRef(getEmptyImage(), { captureDraggingState: false });
|
5100
5136
|
}, [dragPreviewRef, index]);
|
5137
|
+
const accordionValue = React.useId();
|
5138
|
+
const { value = [], rawError } = useField(`${name2}.${index}`);
|
5139
|
+
const [collapseToOpen, setCollapseToOpen] = React.useState("");
|
5140
|
+
React.useEffect(() => {
|
5141
|
+
if (rawError && value) {
|
5142
|
+
setCollapseToOpen(accordionValue);
|
5143
|
+
}
|
5144
|
+
}, [rawError, value, accordionValue]);
|
5101
5145
|
const composedBoxRefs = useComposedRefs(boxRef, dropRef);
|
5102
5146
|
const accordionActions = disabled ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
5103
5147
|
/* @__PURE__ */ jsx(
|
5104
5148
|
IconButton,
|
5105
5149
|
{
|
5106
|
-
|
5150
|
+
variant: "ghost",
|
5107
5151
|
label: formatMessage(
|
5108
5152
|
{
|
5109
5153
|
id: getTranslation("components.DynamicZone.delete-label"),
|
@@ -5118,7 +5162,7 @@ const DynamicComponent = ({
|
|
5118
5162
|
/* @__PURE__ */ jsx(
|
5119
5163
|
IconButton,
|
5120
5164
|
{
|
5121
|
-
|
5165
|
+
variant: "ghost",
|
5122
5166
|
onClick: (e) => e.stopPropagation(),
|
5123
5167
|
"data-handler-id": handlerId,
|
5124
5168
|
ref: dragRef,
|
@@ -5163,10 +5207,9 @@ const DynamicComponent = ({
|
|
5163
5207
|
] })
|
5164
5208
|
] });
|
5165
5209
|
const accordionTitle = title ? `${displayName} ${title}` : displayName;
|
5166
|
-
const accordionValue = React.useId();
|
5167
5210
|
return /* @__PURE__ */ jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
|
5168
5211
|
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Rectangle, { background: "neutral200" }) }),
|
5169
|
-
/* @__PURE__ */ jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsx(Preview, {}) : /* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsxs(Accordion.Item, { value: accordionValue, children: [
|
5212
|
+
/* @__PURE__ */ jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsx(Preview, {}) : /* @__PURE__ */ jsx(Accordion.Root, { value: collapseToOpen, onValueChange: setCollapseToOpen, children: /* @__PURE__ */ jsxs(Accordion.Item, { value: accordionValue, children: [
|
5170
5213
|
/* @__PURE__ */ jsxs(Accordion.Header, { children: [
|
5171
5214
|
/* @__PURE__ */ jsx(
|
5172
5215
|
Accordion.Trigger,
|
@@ -5177,10 +5220,39 @@ const DynamicComponent = ({
|
|
5177
5220
|
),
|
5178
5221
|
/* @__PURE__ */ jsx(Accordion.Actions, { children: accordionActions })
|
5179
5222
|
] }),
|
5180
|
-
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsx(Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children:
|
5181
|
-
|
5182
|
-
|
5183
|
-
|
5223
|
+
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsx(Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsx(
|
5224
|
+
Grid$1.Item,
|
5225
|
+
{
|
5226
|
+
col: 12,
|
5227
|
+
s: 12,
|
5228
|
+
xs: 12,
|
5229
|
+
direction: "column",
|
5230
|
+
alignItems: "stretch",
|
5231
|
+
children: /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
|
5232
|
+
const fieldName = `${name2}.${index}.${field.name}`;
|
5233
|
+
const fieldWithTranslatedLabel = {
|
5234
|
+
...field,
|
5235
|
+
label: formatMessage({
|
5236
|
+
id: `content-manager.components.${componentUid}.${field.name}`,
|
5237
|
+
defaultMessage: field.label
|
5238
|
+
})
|
5239
|
+
};
|
5240
|
+
return /* @__PURE__ */ jsx(
|
5241
|
+
Grid$1.Item,
|
5242
|
+
{
|
5243
|
+
col: size,
|
5244
|
+
s: 12,
|
5245
|
+
xs: 12,
|
5246
|
+
direction: "column",
|
5247
|
+
alignItems: "stretch",
|
5248
|
+
children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
|
5249
|
+
},
|
5250
|
+
fieldName
|
5251
|
+
);
|
5252
|
+
}) })
|
5253
|
+
},
|
5254
|
+
rowInd
|
5255
|
+
)) }) }) }) })
|
5184
5256
|
] }) }) })
|
5185
5257
|
] });
|
5186
5258
|
};
|
@@ -5488,4 +5560,4 @@ export {
|
|
5488
5560
|
transformDocument as t,
|
5489
5561
|
useLazyComponents as u
|
5490
5562
|
};
|
5491
|
-
//# sourceMappingURL=Field-
|
5563
|
+
//# sourceMappingURL=Field-BPkQ-3Ku.mjs.map
|