@plitzi/sdk-elements 0.32.5 → 0.32.6
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 +15 -0
- package/dist/Element/ElementContext.d.ts +1 -0
- package/dist/Element/hocs/withElement.mjs +5 -3
- package/dist/Element/hooks/useElementDataSource.mjs +6 -1
- package/dist/Element/hooks/useElementState.mjs +1 -1
- package/dist/Element/hooks/useRootElementInteractions.mjs +29 -29
- package/dist/dataSource/getSourcesByElementId.mjs +1 -1
- package/dist/elements/advanced/Reference/Reference.mjs +2 -0
- package/dist/elements/form/Form/Form.mjs +77 -75
- package/dist/elements/internal/Page/Page.mjs +12 -11
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +70 -68
- package/dist/elements/provider/CollectionContainer/CollectionContainer.mjs +35 -32
- package/dist/elements/structure/DialogContainer/DialogContainer.mjs +93 -91
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +28 -26
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.mjs +23 -21
- package/dist/elements/structure/ModalContainer/ModalContainer.mjs +72 -70
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @plitzi/sdk-elements
|
|
2
2
|
|
|
3
|
+
## 0.32.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- v0.32.6
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @plitzi/nexus@0.32.6
|
|
10
|
+
- @plitzi/sdk-auth@0.32.6
|
|
11
|
+
- @plitzi/sdk-dev-tools@0.32.6
|
|
12
|
+
- @plitzi/sdk-event-bridge@0.32.6
|
|
13
|
+
- @plitzi/sdk-interactions@0.32.6
|
|
14
|
+
- @plitzi/sdk-navigation@0.32.6
|
|
15
|
+
- @plitzi/sdk-schema@0.32.6
|
|
16
|
+
- @plitzi/sdk-shared@0.32.6
|
|
17
|
+
|
|
3
18
|
## 0.32.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -2,6 +2,7 @@ import { Element, ElementLayout } from '@plitzi/sdk-shared';
|
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
export type ElementContextValue<T extends 'skipHOC' | 'full' = 'full'> = {
|
|
4
4
|
id: string;
|
|
5
|
+
idRef?: string;
|
|
5
6
|
rootId?: string;
|
|
6
7
|
} & (T extends 'skipHOC' ? {
|
|
7
8
|
plitziJsxSkipHOC: true;
|
|
@@ -29,9 +29,10 @@ var m = (m) => {
|
|
|
29
29
|
previewMode: S
|
|
30
30
|
}), { attributes: k, definition: A, style: j, plitziElementLayout: M, elementState: N, setElementState: P } = E;
|
|
31
31
|
c("element", o(() => ({ [`${v}_setState`]: P }), [v, P]));
|
|
32
|
-
let F = /* @__PURE__ */ p(e, {
|
|
32
|
+
let F = T.idRef, I = /* @__PURE__ */ p(e, {
|
|
33
33
|
value: o(() => ({
|
|
34
34
|
id: v,
|
|
35
|
+
idRef: F,
|
|
35
36
|
rootId: y,
|
|
36
37
|
attributes: k,
|
|
37
38
|
definition: A,
|
|
@@ -44,6 +45,7 @@ var m = (m) => {
|
|
|
44
45
|
A,
|
|
45
46
|
N,
|
|
46
47
|
v,
|
|
48
|
+
F,
|
|
47
49
|
M,
|
|
48
50
|
y,
|
|
49
51
|
j,
|
|
@@ -98,10 +100,10 @@ var m = (m) => {
|
|
|
98
100
|
return f.recordProps(v, d(_.current, e)), _.current = e, /* @__PURE__ */ p(i, {
|
|
99
101
|
id: v,
|
|
100
102
|
onRender: f.onRender,
|
|
101
|
-
children:
|
|
103
|
+
children: I
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
|
-
return
|
|
106
|
+
return I;
|
|
105
107
|
};
|
|
106
108
|
return g.displayName = `withElement(${h})`, g;
|
|
107
109
|
};
|
|
@@ -4,7 +4,12 @@ import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
|
4
4
|
var n = ({ bindings: n, sources: r }) => {
|
|
5
5
|
let i = e(() => {
|
|
6
6
|
let e = new Set(r ?? []);
|
|
7
|
-
for (let t of Object.values(n ?? {})) if (Array.isArray(t))
|
|
7
|
+
for (let t of Object.values(n ?? {})) if (Array.isArray(t)) {
|
|
8
|
+
for (let { source: n } of t) if (n) {
|
|
9
|
+
let t = n.indexOf(".");
|
|
10
|
+
e.add(t > -1 ? n.substring(0, t) : n);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
8
13
|
return e.size > 0 && !e.has("variables") && e.add("variables"), [...e];
|
|
9
14
|
}, [n, r]), [a] = t(e(() => i.map((e) => `runtime.sources.${e}`), [i]));
|
|
10
15
|
return e(() => {
|
|
@@ -4,7 +4,7 @@ import { get as a, omit as o } from "@plitzi/plitzi-ui/helpers";
|
|
|
4
4
|
import { useStoreById as s } from "@plitzi/nexus/react";
|
|
5
5
|
//#region src/Element/hooks/useElementState.ts
|
|
6
6
|
var c = {}, l = (e, t) => t ? `runtime.elements.${e}.${t}` : `runtime.elements.${e}`, u = ({ id: u, bindings: d, previewMode: f }) => {
|
|
7
|
-
let { scopePath: p } = s(), m = n(() => l(u, p), [u, p]), [h] = r(m), g = h ?? c, _ = i(), v = n(() => (d?.attributes && Array.isArray(d.attributes) ? d.attributes : []).filter((e) => e.enabled !== !1).map((e) => a(e, "
|
|
7
|
+
let { scopePath: p } = s(), m = n(() => l(u, p), [u, p]), [h] = r(m), g = h ?? c, _ = i(), v = n(() => (d?.attributes && Array.isArray(d.attributes) ? d.attributes : []).filter((e) => e.enabled !== !1).map((e) => a(e, "to", "")), [d]), y = e((e) => f ? (_(m, (t) => {
|
|
8
8
|
if (!e) return {};
|
|
9
9
|
let n = typeof e == "function" ? e(t ?? c) : e;
|
|
10
10
|
return v.length && (n = o(n, v)), n;
|
|
@@ -9,60 +9,60 @@ import f from "clsx";
|
|
|
9
9
|
import { pConsole as p } from "@plitzi/sdk-shared/devTools/utils/PlitziConsole";
|
|
10
10
|
//#region src/Element/hooks/useRootElementInteractions.ts
|
|
11
11
|
var m = ({ elementContext: m, InteractionsContext: h, previewMode: g, debugMode: _, baseElementId: v, className: y, interactionTriggers: b, interactionCallbacks: x, otherProps: S }) => {
|
|
12
|
-
let { id: C,
|
|
13
|
-
i || e.preventDefault(), r && r(e),
|
|
14
|
-
}, [
|
|
12
|
+
let { id: C, idRef: w, className: T, attributes: E, definition: D, definition: { interactions: O }, plitziElementLayout: k, elementState: A, setElementState: j } = m, { interactionsManager: M, useInteractions: N } = i(h), P = a((e, t, n, r, i = !1) => {
|
|
13
|
+
i || e.preventDefault(), r && r(e), M.interactionTrigger(t, n, { event: e });
|
|
14
|
+
}, [M]), F = s(() => !g || !O || !w ? {} : Object.values(O).filter((e) => e.type === "trigger" && e.action && r.includes(e.action) && e.enabled).reduce((e, t) => {
|
|
15
15
|
let n = u(t, "params.propagateEvent", !1);
|
|
16
16
|
return {
|
|
17
17
|
...e,
|
|
18
|
-
[t.action]: (e) =>
|
|
18
|
+
[t.action]: (e) => P(e, w, t.action, S[t.action], n)
|
|
19
19
|
};
|
|
20
20
|
}, {}), [
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
w,
|
|
22
|
+
O,
|
|
23
23
|
S,
|
|
24
24
|
g,
|
|
25
|
-
|
|
26
|
-
]), [
|
|
27
|
-
|
|
28
|
-
let
|
|
25
|
+
P
|
|
26
|
+
]), [I = d] = l("runtime.sources", { enabled: _ || !!(O && Object.keys(O).length) }), L = c({});
|
|
27
|
+
L.current = I;
|
|
28
|
+
let R = a(() => ({ dataSource: L.current }), [L]), z = s(() => ({
|
|
29
29
|
...n,
|
|
30
30
|
...b
|
|
31
|
-
}), [b]),
|
|
32
|
-
attributes:
|
|
33
|
-
definition:
|
|
34
|
-
setElementState:
|
|
31
|
+
}), [b]), B = e({
|
|
32
|
+
attributes: E,
|
|
33
|
+
definition: D,
|
|
34
|
+
setElementState: j
|
|
35
35
|
});
|
|
36
|
-
return
|
|
37
|
-
id:
|
|
38
|
-
interactions:
|
|
39
|
-
triggers:
|
|
36
|
+
return N({
|
|
37
|
+
id: w,
|
|
38
|
+
interactions: O,
|
|
39
|
+
triggers: z,
|
|
40
40
|
callbacks: s(() => ({
|
|
41
41
|
...x,
|
|
42
|
-
...
|
|
43
|
-
}), [x,
|
|
44
|
-
getAdditionalParams:
|
|
42
|
+
...B
|
|
43
|
+
}), [x, B]),
|
|
44
|
+
getAdditionalParams: R
|
|
45
45
|
}), o(() => {
|
|
46
|
-
!g || !
|
|
46
|
+
!g || !w || !O || !Object.keys(O).length || M.interactionTrigger(w, "onLoad", {});
|
|
47
47
|
}, []), o(() => {
|
|
48
|
-
if (_) return p.addProviderMethod(`getElementDataSource-${C}`, () =>
|
|
48
|
+
if (_) return p.addProviderMethod(`getElementDataSource-${C}`, () => L.current), () => {
|
|
49
49
|
p.removeProviderMethod(`getElementDataSource-${C}`);
|
|
50
50
|
};
|
|
51
51
|
}, [
|
|
52
52
|
_,
|
|
53
|
-
|
|
53
|
+
L,
|
|
54
54
|
C
|
|
55
55
|
]), {
|
|
56
|
-
className: f(
|
|
56
|
+
className: f(T, t({
|
|
57
57
|
id: C,
|
|
58
58
|
className: y,
|
|
59
59
|
previewMode: g,
|
|
60
60
|
baseElementId: v,
|
|
61
|
-
definition:
|
|
62
|
-
elementState:
|
|
63
|
-
plitziElementLayout:
|
|
61
|
+
definition: D,
|
|
62
|
+
elementState: A,
|
|
63
|
+
plitziElementLayout: k
|
|
64
64
|
})),
|
|
65
|
-
events:
|
|
65
|
+
events: F
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
//#endregion
|
|
@@ -3,7 +3,7 @@ import e from "@plitzi/sdk-schema/helpers/FlatMap";
|
|
|
3
3
|
var t = (t = {}, n, r) => {
|
|
4
4
|
if (!r || !n) return {};
|
|
5
5
|
let i = e.parentTree(n, r);
|
|
6
|
-
return Object.values(t).filter((e) => e.meta.id
|
|
6
|
+
return Object.values(t).filter((e) => e.meta.id === "global" || !!e.meta.id && i.includes(e.meta.id)).reduce((e, t) => ({
|
|
7
7
|
...e,
|
|
8
8
|
[t.id]: t
|
|
9
9
|
}), {});
|
|
@@ -105,6 +105,7 @@ var _ = ({ ref: r, children: _, className: v = "", referenceType: y = "element",
|
|
|
105
105
|
});
|
|
106
106
|
let { element: z, elementType: B, referenceContextData: V } = P;
|
|
107
107
|
return T && z && y === "element" ? /* @__PURE__ */ m(p, {
|
|
108
|
+
name: `Reference:${S}`,
|
|
108
109
|
value: V,
|
|
109
110
|
children: /* @__PURE__ */ m(n, {
|
|
110
111
|
type: B,
|
|
@@ -116,6 +117,7 @@ var _ = ({ ref: r, children: _, className: v = "", referenceType: y = "element",
|
|
|
116
117
|
className: g("plitzi-component__reference", v, { "reference--build-mode": !T }),
|
|
117
118
|
children: [
|
|
118
119
|
/* @__PURE__ */ m(p, {
|
|
120
|
+
name: `Reference:${S}`,
|
|
119
121
|
value: V,
|
|
120
122
|
children: z && /* @__PURE__ */ m(n, {
|
|
121
123
|
type: B,
|
|
@@ -9,22 +9,23 @@ import { emptyObject as d } from "@plitzi/sdk-shared/helpers/utils";
|
|
|
9
9
|
import { jsx as f } from "react/jsx-runtime";
|
|
10
10
|
import p from "clsx";
|
|
11
11
|
import { produce as m } from "immer";
|
|
12
|
-
import h from "@plitzi/sdk-shared/dataSource/
|
|
12
|
+
import h from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
|
|
13
|
+
import g from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
|
|
13
14
|
//#region src/elements/form/Form/Form.tsx
|
|
14
|
-
var
|
|
15
|
-
let [
|
|
15
|
+
var _ = ({ ref: n, className: _ = "", children: v, method: y = "get", actionUrl: b = "", managedByInteractions: x = !1, errors: S = d, values: C = d }) => {
|
|
16
|
+
let [w, T] = o({}), { id: E, idRef: D, definition: { label: O = "Form" }, setElementState: k } = e(), A = h("apiContainer", { idRef: D }), { settings: { previewMode: j }, contexts: { InteractionsContext: M } } = s(), { interactionsManager: N } = r(M), P = i((e) => T((t) => ({
|
|
16
17
|
...t,
|
|
17
18
|
[e.name]: e
|
|
18
|
-
})), [
|
|
19
|
-
|
|
19
|
+
})), [T]), F = i((e) => {
|
|
20
|
+
T((t) => m(t, (t) => {
|
|
20
21
|
t[e] && delete t[e];
|
|
21
|
-
})), e &&
|
|
22
|
+
})), e && k((t) => ({
|
|
22
23
|
...t,
|
|
23
24
|
values: l(t, `values.${e}`),
|
|
24
25
|
errors: l(t, `errors.${e}`)
|
|
25
26
|
}));
|
|
26
|
-
}, [
|
|
27
|
-
e && (t === null && (t = ""),
|
|
27
|
+
}, [k]), I = i((e, t = "") => {
|
|
28
|
+
e && (t === null && (t = ""), k((n) => n.errors && n.errors[e] ? {
|
|
28
29
|
...n,
|
|
29
30
|
values: {
|
|
30
31
|
...n.values,
|
|
@@ -38,8 +39,8 @@ var g = ({ ref: n, className: g = "", children: _, method: v = "get", actionUrl:
|
|
|
38
39
|
[e]: t
|
|
39
40
|
}
|
|
40
41
|
}));
|
|
41
|
-
}, [
|
|
42
|
-
e &&
|
|
42
|
+
}, [k]), L = i((e, t) => {
|
|
43
|
+
e && k((n) => !t && !c(n, `errors.${e}`) ? n : !t && n.errors && n.errors[e] ? {
|
|
43
44
|
...n,
|
|
44
45
|
errors: l(n, [`errors.${e}`])
|
|
45
46
|
} : {
|
|
@@ -49,7 +50,7 @@ var g = ({ ref: n, className: g = "", children: _, method: v = "get", actionUrl:
|
|
|
49
50
|
[e]: t
|
|
50
51
|
}
|
|
51
52
|
});
|
|
52
|
-
}, [
|
|
53
|
+
}, [k]), R = i(() => Object.values(w).filter((e) => !!e.name).reduce((e, t) => [
|
|
53
54
|
...e,
|
|
54
55
|
{
|
|
55
56
|
path: `fields.${t.name}.id`,
|
|
@@ -63,96 +64,96 @@ var g = ({ ref: n, className: g = "", children: _, method: v = "get", actionUrl:
|
|
|
63
64
|
path: `errors.${t.name}`,
|
|
64
65
|
name: `${t.name} Error Message`
|
|
65
66
|
}
|
|
66
|
-
], []), [
|
|
67
|
-
errors:
|
|
68
|
-
values:
|
|
69
|
-
registerField:
|
|
70
|
-
unregisterField:
|
|
71
|
-
setFieldValue:
|
|
72
|
-
setFieldError:
|
|
67
|
+
], []), [w]), z = a(() => ({ runtime: { sources: { form: {
|
|
68
|
+
errors: S,
|
|
69
|
+
values: C,
|
|
70
|
+
registerField: P,
|
|
71
|
+
unregisterField: F,
|
|
72
|
+
setFieldValue: I,
|
|
73
|
+
setFieldError: L
|
|
73
74
|
} } } }), [
|
|
74
|
-
x,
|
|
75
75
|
S,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
C,
|
|
77
|
+
P,
|
|
78
|
+
F,
|
|
79
|
+
I,
|
|
80
|
+
L
|
|
80
81
|
]);
|
|
81
|
-
|
|
82
|
-
id:
|
|
83
|
-
source:
|
|
84
|
-
name:
|
|
85
|
-
fields:
|
|
82
|
+
g({
|
|
83
|
+
id: E,
|
|
84
|
+
source: A,
|
|
85
|
+
name: O || `Form - ${E}`,
|
|
86
|
+
fields: R
|
|
86
87
|
});
|
|
87
|
-
let
|
|
88
|
+
let B = a(() => ({ onSubmit: {
|
|
88
89
|
action: "onSubmit",
|
|
89
90
|
title: "On Form Submit",
|
|
90
91
|
type: "trigger",
|
|
91
92
|
params: {},
|
|
92
93
|
preview: {
|
|
93
|
-
values: Object.values(
|
|
94
|
+
values: Object.values(w).reduce((e, t) => ({
|
|
94
95
|
...e,
|
|
95
96
|
[t.name]: ""
|
|
96
97
|
}), {}),
|
|
97
98
|
actionUrl: "",
|
|
98
99
|
method: ""
|
|
99
100
|
}
|
|
100
|
-
} }), [
|
|
101
|
-
if (
|
|
101
|
+
} }), [w]), V = i((e) => {
|
|
102
|
+
if (k((e) => ({
|
|
102
103
|
...e,
|
|
103
104
|
errors: {}
|
|
104
|
-
})), !
|
|
105
|
-
let t = Object.values(
|
|
105
|
+
})), !x || (e.stopPropagation(), e.preventDefault(), !j)) return;
|
|
106
|
+
let t = Object.values(w).reduce((e, { name: t }) => ({
|
|
106
107
|
...e,
|
|
107
|
-
[t]:
|
|
108
|
+
[t]: C[t]
|
|
108
109
|
}), {});
|
|
109
|
-
|
|
110
|
+
N.interactionTrigger(D, "onSubmit", {
|
|
110
111
|
values: t,
|
|
111
|
-
actionUrl:
|
|
112
|
-
method:
|
|
112
|
+
actionUrl: b,
|
|
113
|
+
method: y
|
|
113
114
|
});
|
|
114
115
|
}, [
|
|
116
|
+
k,
|
|
117
|
+
x,
|
|
118
|
+
j,
|
|
119
|
+
w,
|
|
120
|
+
N,
|
|
115
121
|
D,
|
|
116
122
|
b,
|
|
117
|
-
O,
|
|
118
|
-
C,
|
|
119
|
-
A,
|
|
120
|
-
T,
|
|
121
123
|
y,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
b && (e instanceof Event && (e.stopPropagation(), e.preventDefault()), D((e) => ({
|
|
124
|
+
C
|
|
125
|
+
]), H = i((e) => {
|
|
126
|
+
x && (e instanceof Event && (e.stopPropagation(), e.preventDefault()), k((e) => ({
|
|
126
127
|
...e,
|
|
127
128
|
values: {},
|
|
128
129
|
errors: {}
|
|
129
130
|
})));
|
|
130
|
-
}, [
|
|
131
|
+
}, [k, x]), U = i((e) => {
|
|
131
132
|
let { name: t, value: n } = e;
|
|
132
|
-
|
|
133
|
-
}, [
|
|
133
|
+
I(t, n);
|
|
134
|
+
}, [I]), W = i((e) => {
|
|
134
135
|
let { name: t, error: n } = e;
|
|
135
|
-
|
|
136
|
-
}, [
|
|
136
|
+
L(t, n);
|
|
137
|
+
}, [L]), G = a(() => ({
|
|
137
138
|
performReset: {
|
|
138
139
|
action: "performReset",
|
|
139
|
-
title: `Reset ${
|
|
140
|
+
title: `Reset ${O}`,
|
|
140
141
|
type: "callback",
|
|
141
|
-
callback:
|
|
142
|
+
callback: H,
|
|
142
143
|
params: {}
|
|
143
144
|
},
|
|
144
145
|
setFieldValue: {
|
|
145
146
|
action: "setFieldValue",
|
|
146
|
-
title: `Set Field Value ${
|
|
147
|
+
title: `Set Field Value ${O}`,
|
|
147
148
|
type: "callback",
|
|
148
|
-
callback:
|
|
149
|
+
callback: U,
|
|
149
150
|
preview: {},
|
|
150
151
|
params: {
|
|
151
152
|
name: {
|
|
152
153
|
label: "Field Name",
|
|
153
154
|
defaultValue: void 0,
|
|
154
155
|
type: "select",
|
|
155
|
-
options: Object.values(
|
|
156
|
+
options: Object.values(w).map((e) => ({
|
|
156
157
|
value: e.name,
|
|
157
158
|
label: e.name
|
|
158
159
|
}))
|
|
@@ -165,16 +166,16 @@ var g = ({ ref: n, className: g = "", children: _, method: v = "get", actionUrl:
|
|
|
165
166
|
},
|
|
166
167
|
setFieldError: {
|
|
167
168
|
action: "setFieldError",
|
|
168
|
-
title: `Set Field Error ${
|
|
169
|
+
title: `Set Field Error ${O}`,
|
|
169
170
|
type: "callback",
|
|
170
|
-
callback:
|
|
171
|
+
callback: W,
|
|
171
172
|
preview: {},
|
|
172
173
|
params: {
|
|
173
174
|
name: {
|
|
174
175
|
label: "Field Name",
|
|
175
176
|
defaultValue: void 0,
|
|
176
177
|
type: "select",
|
|
177
|
-
options: Object.values(
|
|
178
|
+
options: Object.values(w).map((e) => ({
|
|
178
179
|
value: e.name,
|
|
179
180
|
label: e.name
|
|
180
181
|
}))
|
|
@@ -186,28 +187,29 @@ var g = ({ ref: n, className: g = "", children: _, method: v = "get", actionUrl:
|
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
}), [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
O,
|
|
191
|
+
H,
|
|
192
|
+
U,
|
|
193
|
+
w,
|
|
194
|
+
W
|
|
194
195
|
]);
|
|
195
196
|
return /* @__PURE__ */ f(t, {
|
|
196
197
|
tag: "form",
|
|
197
198
|
ref: n,
|
|
198
|
-
method:
|
|
199
|
-
className: p("plitzi-component__form",
|
|
200
|
-
interactionTriggers:
|
|
201
|
-
interactionCallbacks:
|
|
202
|
-
onSubmit:
|
|
203
|
-
onReset:
|
|
204
|
-
action:
|
|
199
|
+
method: y,
|
|
200
|
+
className: p("plitzi-component__form", _),
|
|
201
|
+
interactionTriggers: B,
|
|
202
|
+
interactionCallbacks: G,
|
|
203
|
+
onSubmit: V,
|
|
204
|
+
onReset: H,
|
|
205
|
+
action: b,
|
|
205
206
|
children: /* @__PURE__ */ f(u, {
|
|
206
207
|
inherit: "live",
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
name: `Form:${E}`,
|
|
209
|
+
value: z,
|
|
210
|
+
children: v
|
|
209
211
|
})
|
|
210
212
|
});
|
|
211
|
-
},
|
|
213
|
+
}, v = n(_);
|
|
212
214
|
//#endregion
|
|
213
|
-
export {
|
|
215
|
+
export { _ as Form, v as default };
|
|
@@ -8,7 +8,7 @@ import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
|
8
8
|
import u from "clsx";
|
|
9
9
|
//#region src/elements/internal/Page/Page.tsx
|
|
10
10
|
var d = ({ ref: r, seoEnabled: d = !1, seoPageTitle: f = "Title", seoPageDescription: p = "Description", className: m = "", layout: h = "", layoutContainer: g = "", children: _ }) => {
|
|
11
|
-
let { id: v } = e(), { settings: { previewMode:
|
|
11
|
+
let { id: v, idRef: y } = e(), { settings: { previewMode: b }, contexts: { NavigationContext: x, InteractionsContext: S } } = s(), { interactionsManager: C } = i(S), { Helmet: w, routeParams: T, queryParams: E } = i(x), D = o(() => ({
|
|
12
12
|
id: h,
|
|
13
13
|
rootId: v,
|
|
14
14
|
plitziElementLayout: {
|
|
@@ -23,7 +23,7 @@ var d = ({ ref: r, seoEnabled: d = !1, seoPageTitle: f = "Title", seoPageDescrip
|
|
|
23
23
|
h,
|
|
24
24
|
v,
|
|
25
25
|
_
|
|
26
|
-
]),
|
|
26
|
+
]), O = o(() => ({ onPageLoad: {
|
|
27
27
|
action: "onPageLoad",
|
|
28
28
|
title: "On Page Load",
|
|
29
29
|
type: "trigger",
|
|
@@ -35,26 +35,27 @@ var d = ({ ref: r, seoEnabled: d = !1, seoPageTitle: f = "Title", seoPageDescrip
|
|
|
35
35
|
}
|
|
36
36
|
} }), []);
|
|
37
37
|
return a(() => {
|
|
38
|
-
|
|
38
|
+
C.interactionTrigger(y, "onPageLoad", {
|
|
39
39
|
pageId: v,
|
|
40
|
-
routeParams:
|
|
41
|
-
queryParams:
|
|
40
|
+
routeParams: T,
|
|
41
|
+
queryParams: E
|
|
42
42
|
});
|
|
43
43
|
}, [
|
|
44
44
|
v,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
y,
|
|
46
|
+
C,
|
|
47
|
+
E,
|
|
48
|
+
T
|
|
48
49
|
]), /* @__PURE__ */ l(t, {
|
|
49
50
|
ref: r,
|
|
50
51
|
className: u("plitzi-component__page", m),
|
|
51
|
-
interactionTriggers:
|
|
52
|
+
interactionTriggers: O,
|
|
52
53
|
children: [
|
|
53
|
-
d &&
|
|
54
|
+
d && b && w && /* @__PURE__ */ l(w, { children: [!!f && /* @__PURE__ */ c("title", { children: f }), !!p && /* @__PURE__ */ c("meta", {
|
|
54
55
|
name: "description",
|
|
55
56
|
content: p
|
|
56
57
|
})] }),
|
|
57
|
-
h && /* @__PURE__ */ c(n, { internalProps:
|
|
58
|
+
h && /* @__PURE__ */ c(n, { internalProps: D }),
|
|
58
59
|
!h && _
|
|
59
60
|
]
|
|
60
61
|
});
|