@plitzi/sdk-elements 0.38.16 → 0.38.17
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/CHANGELOG.md +49 -0
- package/dist/Component/ComponentProvider.mjs +3 -3
- package/dist/Element/ElementContext.mjs +1 -1
- package/dist/Element/ElementParentContext.mjs +1 -1
- package/dist/Element/JsxManager.mjs +2 -2
- package/dist/Element/LayoutBody.mjs +1 -1
- package/dist/Element/PluginManager.mjs +2 -2
- package/dist/Element/PluginRemote.mjs +4 -4
- package/dist/Element/ReplicaProvider.mjs +1 -1
- package/dist/Element/RootElement.mjs +4 -4
- package/dist/Element/helpers/declaredAttributes.mjs +1 -1
- package/dist/Element/helpers/getInteractions.mjs +4 -5
- package/dist/Element/hocs/withElement.mjs +2 -2
- package/dist/Element/hooks/useEditableContent.mjs +2 -2
- package/dist/Element/hooks/useElementDataSource.mjs +1 -1
- package/dist/Element/hooks/useElementInternal.mjs +2 -2
- package/dist/Element/hooks/useElementVisible.mjs +1 -1
- package/dist/Element/hooks/useInternalClassName.mjs +1 -1
- package/dist/Element/hooks/useInternalItems.mjs +2 -2
- package/dist/Element/hooks/useIntervalTriggers.mjs +1 -1
- package/dist/Element/hooks/useKeyTriggers.mjs +1 -1
- package/dist/Element/hooks/useLayoutChain.d.ts +1 -1
- package/dist/Element/hooks/useLayoutChain.mjs +4 -4
- package/dist/Element/hooks/usePluginTrigger.mjs +2 -2
- package/dist/Element/hooks/useRootElementInteractions.mjs +26 -27
- package/dist/Element/hooks/useRscData.d.ts +1 -1
- package/dist/Element/hooks/useRscData.mjs +1 -2
- package/dist/Element/hooks/useScrollInteractions.mjs +20 -21
- package/dist/builder/index.d.ts +5 -0
- package/dist/builder/index.mjs +1 -0
- package/dist/canvas/useAnimationFrame.mjs +1 -1
- package/dist/components/ElementAdvancedEditor.mjs +30 -30
- package/dist/components/IconField/index.mjs +1 -2
- package/dist/components/IconPicker/index.mjs +1 -2
- package/dist/components/MarkdownDocument/components/CodeBlock/CodeBlock.mjs +13 -13
- package/dist/dataSource/GlobalSources.mjs +44 -45
- package/dist/dataSource/getSourcesByElementId.mjs +1 -1
- package/dist/dataSource/index.d.ts +3 -0
- package/dist/dataSource/index.mjs +6 -3
- package/dist/dataSource/pathFields.mjs +1 -1
- package/dist/dataSource/sourceStore.mjs +1 -1
- package/dist/dataSource/useRegisterSource.d.ts +9 -0
- package/dist/dataSource/useRegisterSource.mjs +40 -0
- package/dist/dataSource/useResolvedVariables.d.ts +12 -0
- package/dist/dataSource/useResolvedVariables.mjs +27 -0
- package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +1 -1
- package/dist/elements/advanced/BlockHtml/BlockHtml.mjs +1 -1
- package/dist/elements/advanced/BlockHtml/declaration.d.ts +2 -2
- package/dist/elements/advanced/BlockHtml/declaration.mjs +1 -1
- package/dist/elements/advanced/BlockHtml/index.d.ts +3 -3
- package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/Settings.mjs +25 -29
- package/dist/elements/advanced/BlockJsx/declaration.d.ts +2 -2
- package/dist/elements/advanced/BlockJsx/declaration.mjs +1 -1
- package/dist/elements/advanced/BlockJsx/index.d.ts +3 -3
- package/dist/elements/advanced/Custom/Custom.d.ts +1 -1
- package/dist/elements/advanced/Custom/Custom.mjs +2 -2
- package/dist/elements/advanced/Custom/Settings.mjs +3 -6
- package/dist/elements/advanced/Custom/declaration.d.ts +2 -2
- package/dist/elements/advanced/Custom/declaration.mjs +1 -1
- package/dist/elements/advanced/Custom/index.d.ts +3 -3
- package/dist/elements/advanced/NodeHtml/NodeHtml.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/declaration.d.ts +2 -2
- package/dist/elements/advanced/NodeHtml/declaration.mjs +1 -1
- package/dist/elements/advanced/NodeHtml/index.d.ts +3 -3
- package/dist/elements/advanced/PlitziSdk/declaration.d.ts +1 -1
- package/dist/elements/advanced/PlitziSdk/declaration.mjs +1 -1
- package/dist/elements/advanced/Reference/Reference.d.ts +1 -1
- package/dist/elements/advanced/Reference/Reference.mjs +3 -3
- package/dist/elements/advanced/Reference/declaration.d.ts +2 -2
- package/dist/elements/advanced/Reference/declaration.mjs +1 -1
- package/dist/elements/advanced/Reference/index.d.ts +3 -3
- package/dist/elements/basic/Button/Button.d.ts +1 -1
- package/dist/elements/basic/Button/Button.mjs +1 -1
- package/dist/elements/basic/Button/declaration.d.ts +3 -3
- package/dist/elements/basic/Button/declaration.mjs +1 -1
- package/dist/elements/basic/Button/index.d.ts +4 -4
- package/dist/elements/basic/Dropdown/Dropdown.d.ts +1 -1
- package/dist/elements/basic/Dropdown/Dropdown.mjs +12 -12
- package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/declaration.d.ts +2 -2
- package/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +3 -3
- package/dist/elements/basic/Dropdown/declaration.d.ts +2 -2
- package/dist/elements/basic/Dropdown/declaration.mjs +1 -1
- package/dist/elements/basic/Dropdown/index.d.ts +5 -5
- package/dist/elements/basic/Dropdown/useDropdown.mjs +1 -5
- package/dist/elements/basic/Dropdown/useDropdownTrigger.mjs +1 -7
- package/dist/elements/basic/Heading/Heading.d.ts +1 -1
- package/dist/elements/basic/Heading/declaration.d.ts +2 -2
- package/dist/elements/basic/Heading/declaration.mjs +1 -1
- package/dist/elements/basic/Heading/index.d.ts +3 -3
- package/dist/elements/basic/Link/Link.d.ts +1 -1
- package/dist/elements/basic/Link/Link.mjs +2 -2
- package/dist/elements/basic/Link/Settings.mjs +2 -2
- package/dist/elements/basic/Link/declaration.d.ts +3 -3
- package/dist/elements/basic/Link/declaration.mjs +1 -1
- package/dist/elements/basic/Link/index.d.ts +4 -4
- package/dist/elements/basic/Markdown/Markdown.d.ts +1 -1
- package/dist/elements/basic/Markdown/Markdown.mjs +8 -8
- package/dist/elements/basic/Markdown/declaration.d.ts +2 -2
- package/dist/elements/basic/Markdown/declaration.mjs +1 -1
- package/dist/elements/basic/Markdown/hooks/useMarkdownClassNames.mjs +1 -1
- package/dist/elements/basic/Markdown/index.d.ts +3 -3
- package/dist/elements/basic/Paragraph/Paragraph.d.ts +1 -1
- package/dist/elements/basic/Paragraph/declaration.d.ts +2 -2
- package/dist/elements/basic/Paragraph/declaration.mjs +1 -1
- package/dist/elements/basic/Paragraph/index.d.ts +3 -3
- package/dist/elements/basic/RichText/RichText.d.ts +1 -1
- package/dist/elements/basic/RichText/RichText.mjs +14 -14
- package/dist/elements/basic/RichText/declaration.d.ts +2 -2
- package/dist/elements/basic/RichText/declaration.mjs +1 -1
- package/dist/elements/basic/RichText/index.d.ts +3 -3
- package/dist/elements/basic/Text/Text.d.ts +1 -1
- package/dist/elements/basic/Text/declaration.d.ts +2 -2
- package/dist/elements/basic/Text/declaration.mjs +1 -1
- package/dist/elements/basic/Text/index.d.ts +3 -3
- package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +1 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +3 -3
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +2 -2
- package/dist/elements/basic/ThemeToggle/declaration.mjs +1 -1
- package/dist/elements/basic/ThemeToggle/index.d.ts +3 -3
- package/dist/elements/declarations/index.d.ts +66 -52
- package/dist/elements/declarations/index.mjs +45 -42
- package/dist/elements/form/Form/Form.d.ts +1 -1
- package/dist/elements/form/Form/Form.mjs +37 -37
- package/dist/elements/form/Form/declaration.d.ts +2 -2
- package/dist/elements/form/Form/declaration.mjs +1 -1
- package/dist/elements/form/Form/index.d.ts +1 -1
- package/dist/elements/form/FormControl/FormControl.d.ts +1 -1
- package/dist/elements/form/FormControl/FormControl.mjs +2 -2
- package/dist/elements/form/FormControl/Settings.mjs +1 -5
- package/dist/elements/form/FormControl/declaration.d.ts +2 -2
- package/dist/elements/form/FormControl/declaration.mjs +1 -1
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +12 -16
- package/dist/elements/form/FormControl/index.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.mjs +1 -1
- package/dist/elements/internal/LayoutContainer/declaration.d.ts +2 -2
- package/dist/elements/internal/LayoutContainer/declaration.mjs +1 -1
- package/dist/elements/internal/LayoutContainer/index.d.ts +3 -3
- package/dist/elements/internal/LayoutPicker/LayoutPicker.mjs +7 -7
- package/dist/elements/internal/Loading/Loading.d.ts +1 -1
- package/dist/elements/internal/Loading/declaration.d.ts +2 -2
- package/dist/elements/internal/Loading/declaration.mjs +1 -1
- package/dist/elements/internal/Loading/index.d.ts +3 -3
- package/dist/elements/internal/NotFound/NotFound.d.ts +1 -1
- package/dist/elements/internal/NotFound/NotFound.mjs +1 -1
- package/dist/elements/internal/NotFound/declaration.d.ts +2 -2
- package/dist/elements/internal/NotFound/declaration.mjs +1 -1
- package/dist/elements/internal/NotFound/index.d.ts +3 -3
- package/dist/elements/internal/Page/Page.d.ts +1 -1
- package/dist/elements/internal/Page/Page.mjs +2 -2
- package/dist/elements/internal/Page/PageHead.mjs +7 -7
- package/dist/elements/internal/Page/Settings.mjs +1 -1
- package/dist/elements/internal/Page/declaration.d.ts +2 -2
- package/dist/elements/internal/Page/declaration.mjs +1 -1
- package/dist/elements/internal/Page/index.d.ts +3 -3
- package/dist/elements/media/Embed/Embed.d.ts +1 -1
- package/dist/elements/media/Embed/Embed.mjs +1 -1
- package/dist/elements/media/Embed/declaration.d.ts +2 -2
- package/dist/elements/media/Embed/declaration.mjs +1 -1
- package/dist/elements/media/Embed/index.d.ts +3 -3
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +1 -1
- package/dist/elements/media/FontAwesome/declaration.d.ts +2 -2
- package/dist/elements/media/FontAwesome/declaration.mjs +1 -1
- package/dist/elements/media/FontAwesome/index.d.ts +3 -3
- package/dist/elements/media/Image/Image.d.ts +1 -1
- package/dist/elements/media/Image/Image.mjs +12 -12
- package/dist/elements/media/Image/declaration.d.ts +2 -2
- package/dist/elements/media/Image/declaration.mjs +1 -1
- package/dist/elements/media/Image/index.d.ts +3 -3
- package/dist/elements/media/Svg/Svg.d.ts +1 -1
- package/dist/elements/media/Svg/Svg.mjs +11 -11
- package/dist/elements/media/Svg/declaration.d.ts +2 -2
- package/dist/elements/media/Svg/declaration.mjs +1 -1
- package/dist/elements/media/Svg/index.d.ts +3 -3
- package/dist/elements/media/Video/Video.d.ts +1 -1
- package/dist/elements/media/Video/Video.mjs +1 -1
- package/dist/elements/media/Video/declaration.d.ts +2 -2
- package/dist/elements/media/Video/declaration.mjs +1 -1
- package/dist/elements/media/Video/index.d.ts +3 -3
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +40 -48
- package/dist/elements/provider/ApiContainer/Settings.mjs +6 -10
- package/dist/elements/provider/ApiContainer/declaration.d.ts +2 -2
- package/dist/elements/provider/ApiContainer/declaration.mjs +1 -1
- package/dist/elements/provider/ApiContainer/helpers/serverMock.mjs +1 -1
- package/dist/elements/provider/ApiContainer/hooks/useApi.mjs +5 -5
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.mjs +3 -12
- package/dist/elements/provider/ApiContainer/index.d.ts +3 -3
- package/dist/elements/provider/Channel/Channel.d.ts +1 -1
- package/dist/elements/provider/Channel/Channel.mjs +24 -24
- package/dist/elements/provider/Channel/declaration.d.ts +2 -2
- package/dist/elements/provider/Channel/declaration.mjs +1 -1
- package/dist/elements/provider/Channel/index.d.ts +3 -3
- package/dist/elements/settings.mjs +84 -85
- package/dist/elements/structure/Carousel/Carousel.d.ts +1 -1
- package/dist/elements/structure/Carousel/Carousel.mjs +27 -39
- package/dist/elements/structure/Carousel/CarouselTrack/CarouselTrack.d.ts +1 -1
- package/dist/elements/structure/Carousel/CarouselTrack/components/CarouselSlide/index.mjs +1 -2
- package/dist/elements/structure/Carousel/CarouselTrack/components/MarqueeTrack/index.mjs +1 -2
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/index.mjs +1 -2
- package/dist/elements/structure/Carousel/CarouselTrack/declaration.d.ts +2 -2
- package/dist/elements/structure/Carousel/CarouselTrack/declaration.mjs +1 -1
- package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +3 -3
- package/dist/elements/structure/Carousel/declaration.d.ts +2 -2
- package/dist/elements/structure/Carousel/declaration.mjs +1 -1
- package/dist/elements/structure/Carousel/index.d.ts +5 -5
- package/dist/elements/structure/Container/Container.d.ts +1 -1
- package/dist/elements/structure/Container/declaration.d.ts +2 -2
- package/dist/elements/structure/Container/declaration.mjs +1 -1
- package/dist/elements/structure/Container/index.d.ts +3 -3
- package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/declaration.d.ts +2 -2
- package/dist/elements/structure/DialogContainer/declaration.mjs +1 -1
- package/dist/elements/structure/DialogContainer/index.d.ts +3 -3
- package/dist/elements/structure/List/List.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/ListItem.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/declaration.d.ts +2 -2
- package/dist/elements/structure/List/ListItem/declaration.mjs +1 -1
- package/dist/elements/structure/List/ListItem/index.d.ts +3 -3
- package/dist/elements/structure/List/declaration.d.ts +2 -2
- package/dist/elements/structure/List/declaration.mjs +1 -1
- package/dist/elements/structure/List/index.d.ts +5 -5
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +23 -23
- package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -2
- package/dist/elements/structure/ModalContainer/declaration.mjs +1 -1
- package/dist/elements/structure/ModalContainer/index.d.ts +3 -3
- package/dist/elements/structure/Overlay/metadataOf.mjs +1 -1
- package/dist/elements/structure/Overlay/useOverlay.mjs +19 -19
- package/dist/elements/structure/Pagination/Pagination.d.ts +1 -1
- package/dist/elements/structure/Pagination/Pagination.mjs +3 -3
- package/dist/elements/structure/Pagination/declaration.d.ts +2 -2
- package/dist/elements/structure/Pagination/declaration.mjs +1 -1
- package/dist/elements/structure/Pagination/index.d.ts +3 -3
- package/dist/elements/structure/TabContainer/TabContainer.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/declaration.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerBody/declaration.mjs +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +3 -3
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/declaration.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerHeader/declaration.mjs +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +3 -3
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.mjs +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +3 -3
- package/dist/elements/structure/TabContainer/declaration.d.ts +2 -2
- package/dist/elements/structure/TabContainer/declaration.mjs +1 -1
- package/dist/elements/structure/TabContainer/index.d.ts +11 -11
- package/dist/index.d.ts +133 -121
- package/dist/index.mjs +85 -76
- package/package.json +18 -1408
|
@@ -2,46 +2,46 @@ import e from "./declaration.mjs";
|
|
|
2
2
|
import t from "../../../Element/hocs/withElement.mjs";
|
|
3
3
|
import n from "../../../Element/hooks/useElement.mjs";
|
|
4
4
|
import { RootElement as r } from "../../../Element/RootElement.mjs";
|
|
5
|
-
import
|
|
6
|
-
import u from "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import g from "
|
|
12
|
-
import _ from "
|
|
13
|
-
import {
|
|
14
|
-
import y from "
|
|
15
|
-
import b from "@plitzi/sdk-shared/dataSource/
|
|
5
|
+
import i from "../../../dataSource/useRegisterSource.mjs";
|
|
6
|
+
import { use as a, useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
7
|
+
import { usePlitzi as d } from "@plitzi/sdk-shared/hooks";
|
|
8
|
+
import { emptyObject as f } from "@plitzi/sdk-shared/helpers";
|
|
9
|
+
import { get as p, omit as m } from "@plitzi/plitzi-ui/helpers";
|
|
10
|
+
import { StoreProvider as h } from "@plitzi/nexus/react";
|
|
11
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
12
|
+
import _ from "clsx";
|
|
13
|
+
import { InteractionsContext as v } from "@plitzi/sdk-interactions";
|
|
14
|
+
import { produce as y } from "immer";
|
|
15
|
+
import { getSourceName as b } from "@plitzi/sdk-shared/dataSource/helpers";
|
|
16
16
|
//#region src/elements/form/Form/Form.tsx
|
|
17
|
-
var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl: w = "", managedByInteractions: T = !1, noValidate: E = !1, errors: D =
|
|
18
|
-
let [k, A] =
|
|
17
|
+
var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl: w = "", managedByInteractions: T = !1, noValidate: E = !1, errors: D = f, values: O = f }) => {
|
|
18
|
+
let [k, A] = u({}), j = l(/* @__PURE__ */ new Map()), M = l(!1), { id: N, definition: { label: P = "Form" }, setElementState: F } = n(), I = b(e.sourceType, N), { settings: { previewMode: L } } = d(), { interactionsManager: R } = a(v), z = o((e) => A((t) => ({
|
|
19
19
|
...t,
|
|
20
20
|
[e.name]: e
|
|
21
21
|
})), [A]);
|
|
22
|
-
|
|
22
|
+
s(() => (M.current = !1, () => {
|
|
23
23
|
M.current = !0;
|
|
24
24
|
}), []);
|
|
25
|
-
let B =
|
|
26
|
-
M.current || (A((t) =>
|
|
25
|
+
let B = o((e) => {
|
|
26
|
+
M.current || (A((t) => y(t, (t) => {
|
|
27
27
|
t[e] && delete t[e];
|
|
28
28
|
})), e && F((t) => ({
|
|
29
29
|
...t,
|
|
30
|
-
values:
|
|
31
|
-
errors:
|
|
30
|
+
values: m(t, `values.${e}`),
|
|
31
|
+
errors: m(t, `errors.${e}`)
|
|
32
32
|
})));
|
|
33
|
-
}, [F]), V =
|
|
33
|
+
}, [F]), V = o((e, t) => {
|
|
34
34
|
j.current.set(e, t);
|
|
35
|
-
}, []), H =
|
|
35
|
+
}, []), H = o((e) => {
|
|
36
36
|
j.current.delete(e);
|
|
37
|
-
}, []), U =
|
|
37
|
+
}, []), U = o((e, t = "") => {
|
|
38
38
|
e && (t === null && (t = ""), F((n) => n.errors && n.errors[e] ? {
|
|
39
39
|
...n,
|
|
40
40
|
values: {
|
|
41
41
|
...n.values,
|
|
42
42
|
[e]: t
|
|
43
43
|
},
|
|
44
|
-
errors:
|
|
44
|
+
errors: m(n.errors, [e])
|
|
45
45
|
} : {
|
|
46
46
|
...n,
|
|
47
47
|
values: {
|
|
@@ -49,10 +49,10 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
49
49
|
[e]: t
|
|
50
50
|
}
|
|
51
51
|
}));
|
|
52
|
-
}, [F]), W =
|
|
53
|
-
e && F((n) => !t && !
|
|
52
|
+
}, [F]), W = o((e, t) => {
|
|
53
|
+
e && F((n) => !t && !p(n, `errors.${e}`) ? n : !t && n.errors && n.errors[e] ? {
|
|
54
54
|
...n,
|
|
55
|
-
errors:
|
|
55
|
+
errors: m(n, [`errors.${e}`])
|
|
56
56
|
} : {
|
|
57
57
|
...n,
|
|
58
58
|
errors: {
|
|
@@ -60,7 +60,7 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
60
60
|
[e]: t
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
}, [F]), G =
|
|
63
|
+
}, [F]), G = o(() => Object.values(k).filter((e) => !!e.name).reduce((e, t) => [
|
|
64
64
|
...e,
|
|
65
65
|
{
|
|
66
66
|
path: `fields.${t.name}.id`,
|
|
@@ -74,7 +74,7 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
74
74
|
path: `errors.${t.name}`,
|
|
75
75
|
name: `${t.name} Error Message`
|
|
76
76
|
}
|
|
77
|
-
], []), [k]), K =
|
|
77
|
+
], []), [k]), K = c(() => ({ runtime: { sources: {
|
|
78
78
|
form: {
|
|
79
79
|
errors: D,
|
|
80
80
|
values: O,
|
|
@@ -100,13 +100,13 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
100
100
|
U,
|
|
101
101
|
W
|
|
102
102
|
]);
|
|
103
|
-
|
|
103
|
+
i({
|
|
104
104
|
id: N,
|
|
105
105
|
source: I,
|
|
106
106
|
name: P || `Form - ${N}`,
|
|
107
107
|
fields: G
|
|
108
108
|
});
|
|
109
|
-
let q =
|
|
109
|
+
let q = c(() => ({ onSubmit: {
|
|
110
110
|
...e.triggers.onSubmit,
|
|
111
111
|
preview: {
|
|
112
112
|
...e.triggers.onSubmit.preview,
|
|
@@ -115,7 +115,7 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
115
115
|
[t.name]: ""
|
|
116
116
|
}), {})
|
|
117
117
|
}
|
|
118
|
-
} }), [k]), J =
|
|
118
|
+
} }), [k]), J = o((e) => {
|
|
119
119
|
let t = [...j.current].reduce((e, [t, n]) => {
|
|
120
120
|
let r = n(O);
|
|
121
121
|
return r ? {
|
|
@@ -150,19 +150,19 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
150
150
|
w,
|
|
151
151
|
C,
|
|
152
152
|
O
|
|
153
|
-
]), Y =
|
|
153
|
+
]), Y = o((e) => {
|
|
154
154
|
T && (e instanceof Event && (e.stopPropagation(), e.preventDefault()), F((e) => ({
|
|
155
155
|
...e,
|
|
156
156
|
values: {},
|
|
157
157
|
errors: {}
|
|
158
158
|
})));
|
|
159
|
-
}, [F, T]), X =
|
|
159
|
+
}, [F, T]), X = o((e) => {
|
|
160
160
|
let { name: t, value: n } = e;
|
|
161
161
|
U(t, n);
|
|
162
|
-
}, [U]), Z =
|
|
162
|
+
}, [U]), Z = o((e) => {
|
|
163
163
|
let { name: t, error: n } = e;
|
|
164
164
|
W(t, n);
|
|
165
|
-
}, [W]), Q =
|
|
165
|
+
}, [W]), Q = c(() => {
|
|
166
166
|
let { performReset: t, setFieldValue: n, setFieldError: r } = e.callbacks, i = Object.values(k).map((e) => ({
|
|
167
167
|
value: e.name,
|
|
168
168
|
label: e.name
|
|
@@ -205,18 +205,18 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
205
205
|
k,
|
|
206
206
|
Z
|
|
207
207
|
]);
|
|
208
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ g(r, {
|
|
209
209
|
tag: "form",
|
|
210
210
|
ref: t,
|
|
211
211
|
noValidate: E,
|
|
212
212
|
method: C,
|
|
213
|
-
className:
|
|
213
|
+
className: _("plitzi-component__form", x),
|
|
214
214
|
interactionTriggers: q,
|
|
215
215
|
interactionCallbacks: Q,
|
|
216
216
|
onSubmit: J,
|
|
217
217
|
onReset: Y,
|
|
218
218
|
action: w,
|
|
219
|
-
children: /* @__PURE__ */ h
|
|
219
|
+
children: /* @__PURE__ */ g(h, {
|
|
220
220
|
inherit: "live",
|
|
221
221
|
name: `Form:${N}`,
|
|
222
222
|
value: K,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormProps } from './Form';
|
|
2
|
-
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring
|
|
2
|
+
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
3
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
4
4
|
export type FormAttributes = AuthorableAttributes<FormProps>;
|
|
5
|
-
declare const declaration: import('@plitzi/sdk-shared/authoring
|
|
5
|
+
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "form";
|
|
7
7
|
readonly attributeValues: {
|
|
8
8
|
readonly method: readonly string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Form: {
|
|
2
|
-
(props: import('
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Form').FormProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
content: {
|
|
@@ -64,7 +64,7 @@ export type FormControlProps = {
|
|
|
64
64
|
};
|
|
65
65
|
declare const FormControl: ({ ref, className, subType, name, label, hideLabel, placeholder, autoComplete, autoFocus, disabled, options, required, maxLength, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import('react').JSX.Element;
|
|
66
66
|
declare const _default: {
|
|
67
|
-
(props: import('
|
|
67
|
+
(props: import('../../..').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<FormControlProps>>): import('react').JSX.Element;
|
|
68
68
|
displayName: string;
|
|
69
69
|
};
|
|
70
70
|
export default _default;
|
|
@@ -12,11 +12,11 @@ import l from "./inputs/Input.mjs";
|
|
|
12
12
|
import u from "./inputs/Select.mjs";
|
|
13
13
|
import d from "./inputs/Textarea.mjs";
|
|
14
14
|
import { use as f, useCallback as p, useEffect as m } from "react";
|
|
15
|
-
import h from "@plitzi/sdk-shared/hooks
|
|
15
|
+
import { usePlitzi as h } from "@plitzi/sdk-shared/hooks";
|
|
16
16
|
import { createStoreHook as g } from "@plitzi/nexus/react";
|
|
17
17
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
18
18
|
import y from "clsx";
|
|
19
|
-
import b from "@plitzi/sdk-interactions
|
|
19
|
+
import { InteractionsContext as b } from "@plitzi/sdk-interactions";
|
|
20
20
|
//#region src/elements/form/FormControl/FormControl.tsx
|
|
21
21
|
var x = ({ ref: t, className: o = "", subType: x = "text", name: S = "", label: C = "Label", hideLabel: w = !1, placeholder: T = "", autoComplete: E = !0, autoFocus: D = !1, disabled: O = !1, options: k = [], required: A = !1, maxLength: j = 0, readOnly: M = !1, value: N = "", error: P = "", handleChange: F, handleValidate: I }) => {
|
|
22
22
|
let { id: L, rootId: R, visible: z, definition: { styleSelectors: B } } = n(), { settings: { previewMode: V } } = h(), { interactionsManager: H } = f(b), { useStore: U } = g(), [W] = U("runtime.sources.form"), G = p((e) => {
|
|
@@ -22,11 +22,7 @@ var l = (e) => {
|
|
|
22
22
|
].includes(u), F = t((e) => N?.("name", e), [N]), I = t((e) => N?.("label", e), [N]), L = t((e) => N?.("hideLabel", e.target.checked), [N]), ee = t((e) => N?.("placeholder", e), [N]), R = t((e) => {
|
|
23
23
|
N?.("subType", e), N?.("defaultValue", "");
|
|
24
24
|
}, [N]), z = t((e) => N?.("defaultValue", e), [N]), B = t((e) => N?.("autoFocus", e.target.checked), [N]), V = t((e) => N?.("autoComplete", e.target.checked), [N]), H = t((e) => N?.("required", e.target.checked), [N]), U = t((e) => N?.("requiredMessage", e), [N]), W = t((e) => N?.("minLength", l(e)), [N]), G = t((e) => N?.("minLengthMessage", e), [N]), K = t((e) => N?.("maxLength", l(e)), [N]), q = t((e) => N?.("maxLengthMessage", e), [N]), J = t((e) => N?.("formatMessage", e), [N]), Y = t((e) => N?.("pattern", e), [N]), X = t((e) => N?.("patternMessage", e), [N]), Z = t((e) => N?.("matches", e), [N]), Q = t((e) => N?.("matchesMessage", e), [N]), $ = t((e) => N?.("readOnly", e.target.checked), [N]), te = t((e) => N?.("disabled", e.target.checked), [N]), ne = t((e) => N?.("previewError", e.target.checked), [N]), re = t((e) => {
|
|
25
|
-
|
|
26
|
-
N?.("options", []);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
N?.("options", e.split("\n"));
|
|
25
|
+
e ? N?.("options", e.split("\n")) : N?.("options", []);
|
|
30
26
|
}, [N]), ie = n(() => Array.isArray(v) ? v.join("\n") : "", [v]);
|
|
31
27
|
return /* @__PURE__ */ i("div", {
|
|
32
28
|
className: "flex h-full flex-col gap-4 py-2",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FormControlProps } from './FormControl';
|
|
2
|
-
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring
|
|
2
|
+
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
3
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
4
4
|
export type FormControlAttributes = AuthorableAttributes<FormControlProps, 'value' | 'error' | 'handleChange' | 'handleValidate'> & {
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
/** Read by `withFieldValue`, not by the component: shows the control in its error state while editing. */
|
|
7
7
|
previewError?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const declaration: import('@plitzi/sdk-shared/authoring
|
|
9
|
+
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
10
10
|
readonly type: "formControl";
|
|
11
11
|
readonly attributeValues: {
|
|
12
12
|
readonly subType: readonly string[];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { validateField as e } from "../helpers/validateField.mjs";
|
|
2
2
|
import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
|
|
3
|
-
import a from "@plitzi/sdk-shared/hooks
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { usePlitzi as a } from "@plitzi/sdk-shared/hooks";
|
|
4
|
+
import { getDisplayName as o } from "@plitzi/sdk-shared/helpers";
|
|
5
|
+
import { get as s } from "@plitzi/plitzi-ui/helpers";
|
|
6
|
+
import { createStoreHook as c } from "@plitzi/nexus/react";
|
|
7
7
|
import { jsx as l } from "react/jsx-runtime";
|
|
8
8
|
//#region src/elements/form/FormControl/hocs/withFieldValue.tsx
|
|
9
9
|
var u = (u) => {
|
|
10
|
-
let d = (
|
|
11
|
-
let { ref: d, name: f = "", subType: p = "text", defaultValue: m = "", required: h = !0, requiredMessage: g = "", minLength: _ = 0, minLengthMessage: v = "", maxLength: y = 0, maxLengthMessage: b = "", formatMessage: x = "", pattern: S = "", patternMessage: C = "", matches: w = "", matchesMessage: T = "", previewError: E = !1 } =
|
|
10
|
+
let d = (o) => {
|
|
11
|
+
let { ref: d, name: f = "", subType: p = "text", defaultValue: m = "", required: h = !0, requiredMessage: g = "", minLength: _ = 0, minLengthMessage: v = "", maxLength: y = 0, maxLengthMessage: b = "", formatMessage: x = "", pattern: S = "", patternMessage: C = "", matches: w = "", matchesMessage: T = "", previewError: E = !1 } = o, { settings: { previewMode: D } } = a(), { useStore: O } = c(), [k] = O("runtime.sources.form"), [A, j] = i(m), [M, N] = i(m);
|
|
12
12
|
!k && M !== m && (N(m), j(m));
|
|
13
|
-
let P = k?.values, F = r(() => k ?
|
|
13
|
+
let P = k?.values, F = r(() => k ? s(P, f, m) : A, [
|
|
14
14
|
k,
|
|
15
15
|
P,
|
|
16
16
|
f,
|
|
@@ -49,7 +49,7 @@ var u = (u) => {
|
|
|
49
49
|
T
|
|
50
50
|
]), R = k?.registerValidator, z = k?.unregisterValidator, B = k?.setFieldValue, V = k?.setFieldError;
|
|
51
51
|
n(() => {
|
|
52
|
-
if (f && R && z) return R(f, (t) => e(
|
|
52
|
+
if (f && R && z) return R(f, (t) => e(s(t, f, m), L, t)), () => z(f);
|
|
53
53
|
}, [
|
|
54
54
|
f,
|
|
55
55
|
m,
|
|
@@ -66,11 +66,7 @@ var u = (u) => {
|
|
|
66
66
|
]);
|
|
67
67
|
let H = t((e) => {
|
|
68
68
|
let t = e.target.type === "radio" || e.target.type === "checkbox";
|
|
69
|
-
|
|
70
|
-
j(t ? String(e.target.checked) : e.target.value);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
B(f, t ? e.target.checked : e.target.value);
|
|
69
|
+
B ? B(f, t ? e.target.checked : e.target.value) : j(t ? String(e.target.checked) : e.target.value);
|
|
74
70
|
}, [B, f]), U = t(() => V?.(f, e(F, L, P ?? {})), [
|
|
75
71
|
F,
|
|
76
72
|
L,
|
|
@@ -79,14 +75,14 @@ var u = (u) => {
|
|
|
79
75
|
V
|
|
80
76
|
]);
|
|
81
77
|
return r(() => /* @__PURE__ */ l(u, {
|
|
82
|
-
...
|
|
78
|
+
...o,
|
|
83
79
|
ref: d,
|
|
84
80
|
value: F,
|
|
85
81
|
error: I,
|
|
86
82
|
handleChange: H,
|
|
87
83
|
handleValidate: U
|
|
88
84
|
}), [
|
|
89
|
-
|
|
85
|
+
o,
|
|
90
86
|
d,
|
|
91
87
|
I,
|
|
92
88
|
F,
|
|
@@ -94,7 +90,7 @@ var u = (u) => {
|
|
|
94
90
|
U
|
|
95
91
|
]);
|
|
96
92
|
};
|
|
97
|
-
return d.displayName = `withFieldValue(${
|
|
93
|
+
return d.displayName = `withFieldValue(${o(u)})`, d;
|
|
98
94
|
};
|
|
99
95
|
//#endregion
|
|
100
96
|
export { u as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const FormControl: {
|
|
2
|
-
(props: import('
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<import('./FormControl').FormControlProps>>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
content: {
|
|
@@ -13,7 +13,7 @@ export type LayoutContainerProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const LayoutContainer: ({ ref, className, children, subType }: LayoutContainerProps) => import('react').JSX.Element;
|
|
15
15
|
declare const _default: {
|
|
16
|
-
(props: import('
|
|
16
|
+
(props: import('../../..').WithElementProps<LayoutContainerProps>): import('react').JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import t from "../../../Element/hooks/useElement.mjs";
|
|
|
3
3
|
import { RootElement as n } from "../../../Element/RootElement.mjs";
|
|
4
4
|
import { boxOf as r, maskFrameOf as i } from "./mask.mjs";
|
|
5
5
|
import { useCallback as a, useEffect as o } from "react";
|
|
6
|
-
import s from "@plitzi/sdk-shared/hooks
|
|
6
|
+
import { usePlitzi as s } from "@plitzi/sdk-shared/hooks";
|
|
7
7
|
import { throttle as c } from "@plitzi/plitzi-ui/helpers";
|
|
8
8
|
import { jsx as l } from "react/jsx-runtime";
|
|
9
9
|
import u from "clsx";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutContainerProps } from './LayoutContainer';
|
|
2
|
-
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring
|
|
2
|
+
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
3
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
4
4
|
export type LayoutContainerAttributes = AuthorableAttributes<LayoutContainerProps>;
|
|
5
|
-
declare const declaration: import('@plitzi/sdk-shared/authoring
|
|
5
|
+
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "layoutContainer";
|
|
7
7
|
readonly attributeValues: {
|
|
8
8
|
readonly subType: readonly string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/authoring
|
|
1
|
+
import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/authoring";
|
|
2
2
|
//#region src/elements/internal/LayoutContainer/declaration.ts
|
|
3
3
|
var n = e()({
|
|
4
4
|
type: "layoutContainer",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const LayoutContainer: {
|
|
2
|
-
(props: import('
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./LayoutContainer').LayoutContainerProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "layoutContainer";
|
|
@@ -32,8 +32,8 @@ declare const LayoutContainer: {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
} & {
|
|
35
|
-
content: import('@plitzi/sdk-shared/authoring
|
|
36
|
-
} & import('@plitzi/sdk-shared/authoring
|
|
35
|
+
content: import('@plitzi/sdk-shared/authoring').ElementContentDefaults;
|
|
36
|
+
} & import('@plitzi/sdk-shared/authoring').ElementAttributesBrand<Partial<{
|
|
37
37
|
layout?: string | undefined;
|
|
38
38
|
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | undefined;
|
|
39
39
|
layoutContainer?: string | undefined;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { useCallback as e, useMemo as t } from "react";
|
|
2
2
|
import { useCommonStore as n } from "@plitzi/sdk-shared/store";
|
|
3
3
|
import { get as r } from "@plitzi/plitzi-ui/helpers";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { resolveLayoutChain as i } from "@plitzi/sdk-shared/schema";
|
|
5
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import c from "@plitzi/plitzi-ui/Select";
|
|
7
7
|
//#region src/elements/internal/LayoutPicker/LayoutPicker.tsx
|
|
8
8
|
var l = ({ layout: l = "", layoutContainer: u = "", ownLayoutId: d, onUpdate: f }) => {
|
|
9
|
-
let [p] = n("schema.flat"), m = t(() => Object.values(p).filter((e) => r(e, "definition.type", "") === "layoutContainer" && (!d || !
|
|
9
|
+
let [p] = n("schema.flat"), m = t(() => Object.values(p).filter((e) => r(e, "definition.type", "") === "layoutContainer" && (!d || !i((e) => p[e], e.id, "").some((e) => e.layout === d))), [p, d]), h = t(() => l ? Object.values(p).filter((e) => r(e, "definition.type", "") === "container" && r(e, "definition.rootId", "") === l) : [], [p, l]), g = e((e) => {
|
|
10
10
|
f?.("layout", e), f?.("layoutContainer", "");
|
|
11
11
|
}, [f]), _ = e((e) => f?.("layoutContainer", e), [f]);
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(c, {
|
|
13
13
|
value: l,
|
|
14
14
|
placeholder: "None",
|
|
15
15
|
label: "Layout",
|
|
16
16
|
onChange: g,
|
|
17
17
|
size: "xs",
|
|
18
|
-
children: m.map(({ id: e, definition: { label: t } }) => /* @__PURE__ */
|
|
18
|
+
children: m.map(({ id: e, definition: { label: t } }) => /* @__PURE__ */ o("option", {
|
|
19
19
|
value: e,
|
|
20
20
|
children: t
|
|
21
21
|
}, e))
|
|
22
|
-
}), l && /* @__PURE__ */
|
|
22
|
+
}), l && /* @__PURE__ */ o(c, {
|
|
23
23
|
value: u,
|
|
24
24
|
placeholder: "None",
|
|
25
25
|
label: "Layout Container Body",
|
|
26
26
|
onChange: _,
|
|
27
27
|
size: "xs",
|
|
28
|
-
children: h.map(({ id: e, definition: { label: t } }) => /* @__PURE__ */
|
|
28
|
+
children: h.map(({ id: e, definition: { label: t } }) => /* @__PURE__ */ o("option", {
|
|
29
29
|
value: e,
|
|
30
30
|
children: t
|
|
31
31
|
}, e))
|
|
@@ -5,7 +5,7 @@ export type LoadingProps = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const Loading: ({ ref, className }: LoadingProps) => import('react').JSX.Element;
|
|
7
7
|
declare const _default: {
|
|
8
|
-
(props: import('
|
|
8
|
+
(props: import('../../..').WithElementProps<LoadingProps>): import('react').JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LoadingProps } from './Loading';
|
|
2
|
-
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring
|
|
2
|
+
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
3
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
4
4
|
export type LoadingAttributes = AuthorableAttributes<LoadingProps>;
|
|
5
|
-
declare const declaration: import('@plitzi/sdk-shared/authoring
|
|
5
|
+
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "loading";
|
|
7
7
|
readonly content: {
|
|
8
8
|
readonly attributes: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Loading: {
|
|
2
|
-
(props: import('
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Loading').LoadingProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "loading";
|
|
@@ -25,6 +25,6 @@ declare const Loading: {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
} & {
|
|
28
|
-
content: import('@plitzi/sdk-shared/authoring
|
|
29
|
-
} & import('@plitzi/sdk-shared/authoring
|
|
28
|
+
content: import('@plitzi/sdk-shared/authoring').ElementContentDefaults;
|
|
29
|
+
} & import('@plitzi/sdk-shared/authoring').ElementAttributesBrand<unknown>;
|
|
30
30
|
export default Loading;
|
|
@@ -5,7 +5,7 @@ export type NotFoundProps = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const NotFound: ({ ref, className }: NotFoundProps) => import('react').JSX.Element | undefined;
|
|
7
7
|
declare const _default: {
|
|
8
|
-
(props: import('
|
|
8
|
+
(props: import('../../..').WithElementProps<NotFoundProps>): import('react').JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../../../Element/hocs/withElement.mjs";
|
|
2
2
|
import t from "../../../Element/hooks/useElement.mjs";
|
|
3
3
|
import { RootElement as n } from "../../../Element/RootElement.mjs";
|
|
4
|
-
import r from "@plitzi/sdk-shared/hooks
|
|
4
|
+
import { usePlitzi as r } from "@plitzi/sdk-shared/hooks";
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
import s from "clsx";
|
|
7
7
|
//#region src/elements/internal/NotFound/NotFound.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NotFoundProps } from './NotFound';
|
|
2
|
-
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring
|
|
2
|
+
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
3
|
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
4
4
|
export type NotFoundAttributes = AuthorableAttributes<NotFoundProps>;
|
|
5
|
-
declare const declaration: import('@plitzi/sdk-shared/authoring
|
|
5
|
+
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "notFound";
|
|
7
7
|
readonly content: {
|
|
8
8
|
readonly attributes: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const NotFound: {
|
|
2
|
-
(props: import('
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./NotFound').NotFoundProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "notFound";
|
|
@@ -29,7 +29,7 @@ declare const NotFound: {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
} & {
|
|
32
|
-
content: import('@plitzi/sdk-shared/authoring
|
|
33
|
-
} & import('@plitzi/sdk-shared/authoring
|
|
32
|
+
content: import('@plitzi/sdk-shared/authoring').ElementContentDefaults;
|
|
33
|
+
} & import('@plitzi/sdk-shared/authoring').ElementAttributesBrand<unknown>;
|
|
34
34
|
export default NotFound;
|
|
35
35
|
export { NotFound };
|
|
@@ -27,7 +27,7 @@ export type PageProps = {
|
|
|
27
27
|
};
|
|
28
28
|
declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, documentScroll, className, layout, layoutContainer, children }: PageProps) => import('react').JSX.Element;
|
|
29
29
|
declare const _default: {
|
|
30
|
-
(props: import('
|
|
30
|
+
(props: import('../../..').WithElementProps<PageProps>): import('react').JSX.Element;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
33
|
export default _default;
|
|
@@ -7,11 +7,11 @@ import a from "../LayoutContainer/index.mjs";
|
|
|
7
7
|
import o from "../../../Element/hooks/useLayoutChain.mjs";
|
|
8
8
|
import s from "./PageHead.mjs";
|
|
9
9
|
import { use as c, useEffect as l, useMemo as u } from "react";
|
|
10
|
-
import d from "@plitzi/sdk-shared/hooks
|
|
10
|
+
import { usePlitzi as d } from "@plitzi/sdk-shared/hooks";
|
|
11
11
|
import { useRenderSettings as f, useSdkStore as p } from "@plitzi/sdk-shared/store";
|
|
12
12
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
13
13
|
import g from "clsx";
|
|
14
|
-
import _ from "@plitzi/sdk-interactions
|
|
14
|
+
import { InteractionsContext as _ } from "@plitzi/sdk-interactions";
|
|
15
15
|
//#region src/elements/internal/Page/Page.tsx
|
|
16
16
|
var v = {
|
|
17
17
|
locked: "html,body{height:100%;overflow:hidden;overscroll-behavior:none}",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo as e } from "react";
|
|
2
2
|
import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
3
|
-
import { isRecord as n } from "@plitzi/sdk-shared/helpers
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { isRecord as n } from "@plitzi/sdk-shared/helpers";
|
|
4
|
+
import { collectServerElements as r, pageSeoText as i, pageServerContext as a } from "@plitzi/sdk-shared/schema";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { Helmet as c } from "@dr.pogodin/react-helmet";
|
|
7
7
|
//#region src/elements/internal/Page/PageHead.tsx
|
|
8
8
|
var l = ({ pageId: l, title: u, description: d }) => {
|
|
9
9
|
let [[f, p, m, h]] = t([
|
|
@@ -11,7 +11,7 @@ var l = ({ pageId: l, title: u, description: d }) => {
|
|
|
11
11
|
"rsc.data",
|
|
12
12
|
"navigation.routeParams",
|
|
13
13
|
"navigation.queryParams"
|
|
14
|
-
]), g = e(() => n(f) ?
|
|
14
|
+
]), g = e(() => n(f) ? r({ flat: f }, l) : [], [f, l]), _ = e(() => a(g, p ?? {}, {
|
|
15
15
|
routeParams: m,
|
|
16
16
|
queryParams: h
|
|
17
17
|
}), [
|
|
@@ -19,8 +19,8 @@ var l = ({ pageId: l, title: u, description: d }) => {
|
|
|
19
19
|
p,
|
|
20
20
|
m,
|
|
21
21
|
h
|
|
22
|
-
]), v =
|
|
23
|
-
return /* @__PURE__ */
|
|
22
|
+
]), v = i(u, _), y = i(d, _);
|
|
23
|
+
return /* @__PURE__ */ s(c, { children: [!!v && /* @__PURE__ */ o("title", { children: v }), !!y && /* @__PURE__ */ o("meta", {
|
|
24
24
|
name: "description",
|
|
25
25
|
content: y
|
|
26
26
|
})] });
|
|
@@ -4,7 +4,7 @@ import { useCallback as n, useMemo as r } from "react";
|
|
|
4
4
|
import { useCommonStore as i } from "@plitzi/sdk-shared/store";
|
|
5
5
|
import { get as a, pick as o } from "@plitzi/plitzi-ui/helpers";
|
|
6
6
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
import { getPageFullPath as u } from "@plitzi/sdk-navigation
|
|
7
|
+
import { getPageFullPath as u } from "@plitzi/sdk-navigation";
|
|
8
8
|
import d from "@plitzi/plitzi-ui/Alert";
|
|
9
9
|
import f from "@plitzi/plitzi-ui/Checkbox";
|
|
10
10
|
import p from "@plitzi/plitzi-ui/Input";
|