@bravostudioai/react 0.1.14 → 0.1.16
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/cli/commands/generate.js +90 -85
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/codegen/generator.js +218 -212
- package/dist/codegen/generator.js.map +1 -1
- package/dist/components/EncoreApp.js +34 -22
- package/dist/components/EncoreApp.js.map +1 -1
- package/dist/components.js +524 -537
- package/dist/components.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/packages/encore-lib/constants.js.map +1 -1
- package/dist/src/cli/commands/generate.d.ts.map +1 -1
- package/dist/src/codegen/generator.d.ts +5 -1
- package/dist/src/codegen/generator.d.ts.map +1 -1
- package/dist/src/components/EncoreApp.d.ts.map +1 -1
- package/dist/src/components.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/generate.ts +9 -1
- package/src/codegen/generator.ts +12 -1
- package/src/components/EncoreApp.tsx +9 -1
- package/src/components.tsx +11 -6
package/dist/components.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as p, jsxs as it, Fragment as ut } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import v, { useContext as N, useMemo as Ht, useState as Vt, useCallback as Nt } from "react";
|
|
3
3
|
import tt from "./contexts/EncoreBindingContext.js";
|
|
4
4
|
import k from "./stores/useEncoreState.js";
|
|
5
5
|
import lt from "./contexts/EncoreComponentIdContext.js";
|
|
6
6
|
import Ot from "axios";
|
|
7
|
-
import
|
|
7
|
+
import ht from "./contexts/EncoreActionContext.js";
|
|
8
8
|
import Mt from "./contexts/EncoreRepeatingContainerContext.js";
|
|
9
|
-
const ct =
|
|
9
|
+
const ct = v.createContext({}), V = v.createContext(
|
|
10
10
|
{}
|
|
11
11
|
), st = (t) => t.replace(/#(\w{2})(\w{6})/, "#$2$1"), Gt = (t) => t.slice(1, 3) === "00", jt = (t) => {
|
|
12
12
|
if (!Array.isArray(t)) return null;
|
|
@@ -15,78 +15,79 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
15
15
|
const e = r.split(":");
|
|
16
16
|
return e.length >= 3 ? { type: e[1], groupName: e[2] } : null;
|
|
17
17
|
}, rt = () => {
|
|
18
|
-
const [t, r] = Vt({ width: 0, height: 0 }), e =
|
|
19
|
-
return
|
|
18
|
+
const [t, r] = Vt({ width: 0, height: 0 }), e = v.useRef(null);
|
|
19
|
+
return v.useEffect(() => {
|
|
20
20
|
if (!e.current) return;
|
|
21
21
|
const o = e.current, i = () => {
|
|
22
|
-
const { width:
|
|
23
|
-
r({ width:
|
|
22
|
+
const { width: n, height: m } = o.getBoundingClientRect();
|
|
23
|
+
r({ width: n, height: m });
|
|
24
24
|
};
|
|
25
25
|
i(), requestAnimationFrame(() => {
|
|
26
26
|
i();
|
|
27
27
|
});
|
|
28
|
-
const
|
|
29
|
-
for (const
|
|
30
|
-
const
|
|
31
|
-
r({ width:
|
|
28
|
+
const l = new ResizeObserver((n) => {
|
|
29
|
+
for (const m of n) {
|
|
30
|
+
const s = m.contentRect;
|
|
31
|
+
r({ width: s.width, height: s.height });
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
return
|
|
34
|
+
return l.observe(o), () => l.disconnect();
|
|
35
35
|
}, []), { dimensions: t, ref: e };
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
const o = N(ct), i = N(V), c = {
|
|
36
|
+
}, L = (t, r = {}) => {
|
|
37
|
+
const e = N(ct), o = N(V), i = {
|
|
39
38
|
width: window.innerWidth,
|
|
40
39
|
height: window.innerHeight
|
|
41
|
-
},
|
|
42
|
-
(
|
|
43
|
-
[
|
|
40
|
+
}, l = Nt(
|
|
41
|
+
(a) => (o.dimensions?.width ?? 0) * 0.01 * a,
|
|
42
|
+
[o.dimensions?.width]
|
|
44
43
|
), n = {};
|
|
45
44
|
r = { debug: !1, ...r };
|
|
46
|
-
const
|
|
47
|
-
if (k((
|
|
48
|
-
const
|
|
49
|
-
if (t.layout?.layoutSizingHorizontal || t.layout?.layoutSizingVertical || (t.width &&
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
const m = k((a) => a.fontsById || {});
|
|
46
|
+
if (k((a) => a.fontsByIdFull || {}), !t || !t) return;
|
|
47
|
+
const s = o.dimensions?.width ?? i.width, y = o.dimensions?.height ?? i.height;
|
|
48
|
+
if (t.layout?.layoutSizingHorizontal || t.layout?.layoutSizingVertical || (t.width && s > 0 && (n.width = t.width * s * 0.01), t.aspectRatio && t.width ? s > 0 && (n.height = t.width * s * 0.01 / t.aspectRatio) : t.height && y > 0 && (n.height = t.height * y * 0.01)), !(o?.isFlex ?? !1) && t.positioning) {
|
|
49
|
+
const a = t.layout?.layoutSizingHorizontal === "FIXED" || t.layout?.layoutSizingVertical === "FIXED", u = a && t.positioning.top < 0 ? 0 : t.positioning.top, R = a && t.positioning.left < 0 ? 0 : t.positioning.left;
|
|
50
|
+
let w = !1;
|
|
51
|
+
if (t.horizontalPosition === "center" && (w = !0), !w && a && t.layout?.layoutSizingHorizontal === "FIXED" && t.layout?.size?.x) {
|
|
52
|
+
const B = t.layout.size.x, z = e.scaleFactor ?? 1, f = B * z, S = o?.dimensions?.width;
|
|
53
|
+
S && typeof S == "number" && S > 0 && f / S >= 0.95 && R >= 15 && R <= 35 && (w = !0);
|
|
54
54
|
}
|
|
55
|
-
n.top = `${
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
|
|
55
|
+
n.top = `${u}%`;
|
|
56
|
+
const x = !!t.inset;
|
|
57
|
+
if (w) {
|
|
58
|
+
if (x) {
|
|
59
|
+
const B = String(t.inset).split(/\s+/);
|
|
60
|
+
B.length === 3 ? n.inset = `${B[0]} 50% ${B[2]} auto` : B.length === 4 && (n.inset = `${B[0]} 50% ${B[2]} auto`), delete n.left, delete n.right;
|
|
61
61
|
} else
|
|
62
62
|
n.left = "50%", n.right = "auto";
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
n.transform = "translateX(-50%)";
|
|
64
|
+
} else
|
|
65
|
+
x ? n.inset = t.inset : n.left = `${R}%`;
|
|
66
|
+
a ? (n.right = "auto", n.bottom = "auto") : (t.positioning.bottom !== void 0 && (n.bottom = `${t.positioning.bottom}%`), t.positioning.right !== void 0 && (n.right = `${t.positioning.right}%`)), n.position = "absolute";
|
|
66
67
|
}
|
|
67
68
|
if (t.layout?.padding) {
|
|
68
|
-
const
|
|
69
|
-
|
|
69
|
+
const a = e.scaleFactor ?? 1, u = t.layout.padding;
|
|
70
|
+
u.top !== void 0 && (n.paddingTop = u.top * a), u.right !== void 0 && (n.paddingRight = u.right * a), u.bottom !== void 0 && (n.paddingBottom = u.bottom * a), u.left !== void 0 && (n.paddingLeft = u.left * a);
|
|
70
71
|
}
|
|
71
72
|
if (t.layout?.mode) {
|
|
72
73
|
n.display = "flex";
|
|
73
|
-
const
|
|
74
|
+
const a = (B) => B ? {
|
|
74
75
|
MIN: "flex-start",
|
|
75
76
|
MAX: "flex-end",
|
|
76
77
|
CENTER: "center",
|
|
77
78
|
SPACE_BETWEEN: "space-between",
|
|
78
79
|
SPACE_AROUND: "space-around",
|
|
79
80
|
SPACE_EVENLY: "space-evenly"
|
|
80
|
-
}[
|
|
81
|
-
t.layout.mode == "HORIZONTAL" ? (n.flexDirection = "row", t.layout.flexWrap && (n.flexWrap = t.layout.flexWrap), n.justifyContent =
|
|
81
|
+
}[B] || B.toLowerCase().replace(/_/g, "-") : void 0;
|
|
82
|
+
t.layout.mode == "HORIZONTAL" ? (n.flexDirection = "row", t.layout.flexWrap && (n.flexWrap = t.layout.flexWrap), n.justifyContent = a(
|
|
82
83
|
t.layout.primaryAxisAlignItems
|
|
83
|
-
), n.alignItems = t.layout.counterAxisAlignItems) : (n.flexDirection = "column", n.justifyContent =
|
|
84
|
+
), n.alignItems = t.layout.counterAxisAlignItems) : (n.flexDirection = "column", n.justifyContent = a(
|
|
84
85
|
t.layout.primaryAxisAlignItems
|
|
85
86
|
), n.alignItems = t.layout.counterAxisAlignItems), n.flexGrow = t.layout.grow, t.layout.wrap === "NO_WRAP" ? n.flexWrap = "nowrap" : t.layout.flexWrap ? n.flexWrap = t.layout.flexWrap : n.flexWrap = "wrap";
|
|
86
|
-
const
|
|
87
|
-
n.gap =
|
|
88
|
-
itemSpacing:
|
|
89
|
-
spacing:
|
|
87
|
+
const u = t.layout.itemSpacing, R = e.scaleFactor ?? 1, x = t.layout.primaryAxisAlignItems === "SPACE_BETWEEN" ? 0 : (u !== void 0 ? u : 0) * R;
|
|
88
|
+
n.gap = x === 0 ? "0px" : `${x}px`, n.rowGap = x === 0 ? "0px" : `${x}px`, n.columnGap = x === 0 ? "0px" : `${x}px`, (n.flexWrap === "wrap" || n.flexWrap === "wrap-reverse") && (n.alignContent = "flex-start"), r.debug || t.layout?.mode === "HORIZONTAL" && u === 0 ? console.log("[useEncoreStyle] Setting gap properties:", {
|
|
89
|
+
itemSpacing: u,
|
|
90
|
+
spacing: x,
|
|
90
91
|
gap: n.gap,
|
|
91
92
|
rowGap: n.rowGap,
|
|
92
93
|
columnGap: n.columnGap,
|
|
@@ -96,54 +97,40 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
96
97
|
"[useEncoreStyle] No gap properties set",
|
|
97
98
|
r.debug,
|
|
98
99
|
t.layout?.mode,
|
|
99
|
-
|
|
100
|
+
u
|
|
100
101
|
);
|
|
101
102
|
}
|
|
102
103
|
if (t.layout?.layoutSizingHorizontal === "FILL" && (n.width = "100%"), t.layout?.layoutSizingHorizontal === "FIXED") {
|
|
103
|
-
const
|
|
104
|
-
n.width = t.layout.size.x *
|
|
104
|
+
const a = e.scaleFactor ?? 1;
|
|
105
|
+
n.width = t.layout.size.x * a;
|
|
105
106
|
}
|
|
106
107
|
if (t.layout?.layoutSizingHorizontal, t.layout?.layoutSizingVertical === "FIXED") {
|
|
107
|
-
const
|
|
108
|
-
n.height = t.layout.size.y *
|
|
108
|
+
const a = e.scaleFactor ?? 1;
|
|
109
|
+
n.height = t.layout.size.y * a;
|
|
109
110
|
}
|
|
110
111
|
if (t.layout?.layoutSizingVertical === "FILL")
|
|
111
|
-
if (!(
|
|
112
|
-
const
|
|
113
|
-
n.height = `${
|
|
112
|
+
if (!(o?.isFlex ?? !1) && t.positioning && t.positioning?.top !== void 0) {
|
|
113
|
+
const w = 100 - t.positioning.top;
|
|
114
|
+
n.height = `${w}%`;
|
|
114
115
|
} else
|
|
115
116
|
n.height = "100%";
|
|
116
|
-
if (t.layout?.layoutSizingVertical, t.backgroundColor && !Gt(t.backgroundColor) && (n.backgroundColor = st(t.backgroundColor)), t.color && (n.color = st(t.color)), t.lineHeightPx && (n.lineHeight = (t.lineHeightPx * (
|
|
117
|
-
const
|
|
118
|
-
n.fontFamily = `"${
|
|
117
|
+
if (t.layout?.layoutSizingVertical, t.backgroundColor && !Gt(t.backgroundColor) && (n.backgroundColor = st(t.backgroundColor)), t.color && (n.color = st(t.color)), t.lineHeightPx && (n.lineHeight = (t.lineHeightPx * (e.scaleFactor ?? 1)).toString() + "px"), t.fontSize && (n.fontSize = t.fontSize * (e.scaleFactor ?? 1)), t.fontWeight && (n.fontWeight = `${t.fontWeight}`), t.opacity && (n.opacity = t.opacity * 0.01), t.fontId) {
|
|
118
|
+
const a = m[t.fontId] || "sans-serif";
|
|
119
|
+
n.fontFamily = `"${a}"`, console.log("[AG_DEBUG] [useEncoreStyle] Font Resolution:", {
|
|
119
120
|
fontId: t.fontId,
|
|
120
|
-
resolvedFamily:
|
|
121
|
+
resolvedFamily: a,
|
|
121
122
|
fontWeight: t.fontWeight,
|
|
122
123
|
finalStyle: n.fontFamily
|
|
123
124
|
});
|
|
124
125
|
}
|
|
125
|
-
if (t.borderRadius && (n.borderRadius =
|
|
126
|
-
const
|
|
127
|
-
n.borderTopLeftRadius =
|
|
126
|
+
if (t.borderRadius && (n.borderRadius = l(t.borderRadius)), t.cornerRadii) {
|
|
127
|
+
const a = t.cornerRadii.map(l);
|
|
128
|
+
n.borderTopLeftRadius = a[0], n.borderTopRightRadius = a[1], n.borderBottomRightRadius = a[2], n.borderBottomLeftRadius = a[3], delete n.borderRadius;
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
-
const s = n.transform || "";
|
|
131
|
-
if (n.transform = s ? `${s} translateX(-50%)` : "translateX(-50%)", n.inset) {
|
|
132
|
-
const f = String(n.inset).split(/\s+/);
|
|
133
|
-
f.length === 3 ? n.inset = `${f[0]} 50% ${f[2]} auto` : f.length === 4 && (n.inset = `${f[0]} 50% ${f[2]} auto`);
|
|
134
|
-
} else if (t.inset) {
|
|
135
|
-
const f = String(t.inset).split(/\s+/);
|
|
136
|
-
f.length === 3 ? n.inset = `${f[0]} 50% ${f[2]} auto` : f.length === 4 && (n.inset = `${f[0]} 50% ${f[2]} auto`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (t.textCase === "upper" && (n.textTransform = "uppercase"), t.textCase === "lower" && (n.textTransform = "lowercase"), t.letterSpacing && (n.letterSpacing = t.letterSpacing), t.textAlign && (n.textAlign = t.textAlign), r.debug && (n.borderWidth = 1, n.borderColor = "#FF0000FF", n.borderStyle = "solid"), e && (n.inset || t.inset)) {
|
|
140
|
-
const s = n.inset || t.inset, f = String(s).split(/\s+/);
|
|
141
|
-
f.length === 3 ? n.inset = `${f[0]} 50% ${f[2]} auto` : f.length === 4 && (n.inset = `${f[0]} 50% ${f[2]} auto`);
|
|
142
|
-
}
|
|
143
|
-
return n;
|
|
130
|
+
return t.borderWidth && (t.borderWidth > 5 ? n.borderWidth = t.borderWidth * 0.5 : n.borderWidth = t.borderWidth * 1.5), t.borderColor && (n.borderColor = st(t.borderColor)), (t.borderWidth || t.borderColor) && (n.borderStyle = "solid"), t.rotation && (n.transform = `rotate(${t.rotation}deg)`), t.textCase === "upper" && (n.textTransform = "uppercase"), t.textCase === "lower" && (n.textTransform = "lowercase"), t.letterSpacing && (n.letterSpacing = t.letterSpacing), t.textAlign && (n.textAlign = t.textAlign), r.debug && (n.borderWidth = 1, n.borderColor = "#FF0000FF", n.borderStyle = "solid"), n;
|
|
144
131
|
}, et = ({ id: t, nodeData: r }) => {
|
|
145
|
-
const e = N(tt), o = e?.nodeData?.[t], { patch: i, list:
|
|
146
|
-
let
|
|
132
|
+
const e = N(tt), o = e?.nodeData?.[t], { patch: i, list: l } = o ?? { list: null, patch: null }, m = Array.isArray(r?.tags) && (r.tags.includes("encore:data:array") || r.tags.includes("bravo:data:array")) && e?.arrayDataById && e.arrayDataById[t] && Array.isArray(e.arrayDataById[t]) ? e.arrayDataById[t] : null;
|
|
133
|
+
let s = i ? {
|
|
147
134
|
...r,
|
|
148
135
|
...i || {},
|
|
149
136
|
...i && i.data ? { data: { ...r?.data || {}, ...i.data } } : {},
|
|
@@ -151,56 +138,56 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
151
138
|
actions: i.actions && Array.isArray(i.actions) && i.actions.length > 0 ? i.actions : r.actions || i.actions || []
|
|
152
139
|
} : r;
|
|
153
140
|
const y = e?.textOverridesById && e.textOverridesById[t] !== void 0 ? e.textOverridesById[t] : void 0;
|
|
154
|
-
y !== void 0 && Array.isArray(r?.tags) && r.tags.includes("PROP:TEXT_VAR") && (
|
|
155
|
-
...
|
|
156
|
-
data: { ...
|
|
141
|
+
y !== void 0 && Array.isArray(r?.tags) && r.tags.includes("PROP:TEXT_VAR") && (s = {
|
|
142
|
+
...s,
|
|
143
|
+
data: { ...s?.data || {}, text: String(y) }
|
|
157
144
|
});
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
...
|
|
145
|
+
const I = Array.isArray(r?.tags) && (r.tags.includes("encore:data") || r.tags.includes("bravo:data")), h = e?.rootData;
|
|
146
|
+
h && h[t] && typeof h[t] == "object" && (s = {
|
|
147
|
+
...s,
|
|
161
148
|
data: {
|
|
162
|
-
...
|
|
163
|
-
...
|
|
149
|
+
...s.data || {},
|
|
150
|
+
...h[t]
|
|
164
151
|
}
|
|
165
152
|
});
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
...
|
|
153
|
+
const a = e?.nodeData && typeof e.nodeData == "object";
|
|
154
|
+
if (I || a) {
|
|
155
|
+
const u = e?.nodeData;
|
|
156
|
+
if (u && typeof u == "object") {
|
|
157
|
+
if (u[t] !== void 0) {
|
|
158
|
+
const w = u[t];
|
|
159
|
+
w && typeof w == "object" && s.data && (s = {
|
|
160
|
+
...s,
|
|
174
161
|
data: {
|
|
175
|
-
...
|
|
176
|
-
...
|
|
162
|
+
...s.data,
|
|
163
|
+
...w
|
|
177
164
|
}
|
|
178
165
|
});
|
|
179
|
-
} else if (
|
|
180
|
-
...
|
|
166
|
+
} else if (I && u.description && s.data && (s = {
|
|
167
|
+
...s,
|
|
181
168
|
data: {
|
|
182
|
-
...
|
|
183
|
-
text:
|
|
169
|
+
...s.data,
|
|
170
|
+
text: u.description
|
|
184
171
|
}
|
|
185
|
-
}),
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
...
|
|
172
|
+
}), u.image && s.data) {
|
|
173
|
+
const w = u.image.startsWith("//") ? `https:${u.image}` : u.image;
|
|
174
|
+
s = {
|
|
175
|
+
...s,
|
|
189
176
|
data: {
|
|
190
|
-
...
|
|
191
|
-
imageUrl:
|
|
177
|
+
...s.data,
|
|
178
|
+
imageUrl: w
|
|
192
179
|
}
|
|
193
180
|
};
|
|
194
181
|
}
|
|
195
|
-
|
|
182
|
+
s.encoreData = u;
|
|
196
183
|
}
|
|
197
184
|
}
|
|
198
185
|
return {
|
|
199
186
|
patch: i,
|
|
200
|
-
list:
|
|
187
|
+
list: l || m,
|
|
201
188
|
// Use arrayData if list is not provided
|
|
202
|
-
patchedNodeData:
|
|
203
|
-
arrayData:
|
|
189
|
+
patchedNodeData: s,
|
|
190
|
+
arrayData: m
|
|
204
191
|
// Also return separately for components that need it
|
|
205
192
|
};
|
|
206
193
|
}, Y = ({
|
|
@@ -209,39 +196,39 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
209
196
|
children: e,
|
|
210
197
|
_parentStatefulSetId: o,
|
|
211
198
|
_parentInputGroupInfo: i,
|
|
212
|
-
_parentName:
|
|
199
|
+
_parentName: l
|
|
213
200
|
}) => {
|
|
214
|
-
const
|
|
215
|
-
k((
|
|
216
|
-
const { onAction:
|
|
201
|
+
const n = k((f) => f.baseURL), m = k((f) => f.appId);
|
|
202
|
+
k((f) => f.pageId);
|
|
203
|
+
const { onAction: s } = v.useContext(ht), { statefulSetId: y } = v.useContext(
|
|
217
204
|
lt
|
|
218
|
-
),
|
|
219
|
-
(
|
|
220
|
-
),
|
|
221
|
-
(
|
|
222
|
-
),
|
|
223
|
-
|
|
224
|
-
const
|
|
205
|
+
), I = o || y, { patchedNodeData: h } = et({ id: t, nodeData: r }), a = k(
|
|
206
|
+
(f) => f.setStatefulSetVariant
|
|
207
|
+
), u = k(
|
|
208
|
+
(f) => f.setInputGroupValue
|
|
209
|
+
), R = k((f) => f.setAccessToken), { app: w } = k((f) => f.app);
|
|
210
|
+
w.data?.app?.startPageId, w.data?.app?.PageId;
|
|
211
|
+
const x = L(
|
|
225
212
|
{
|
|
226
213
|
positioning: r.style?.positioning
|
|
227
214
|
},
|
|
228
215
|
{ debug: !1 }
|
|
229
216
|
);
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
let
|
|
217
|
+
x.zIndex = 99999, x.backgroundColor = "transparent", x.position = "absolute", x.top = "0", x.left = "0", x.right = "0", x.bottom = "0", x.width = "100%", x.height = "100%", x.pointerEvents = "auto", x.isolation = "isolate";
|
|
218
|
+
const B = async (f) => {
|
|
219
|
+
let S = !1;
|
|
233
220
|
const O = () => {
|
|
234
|
-
|
|
221
|
+
S = !1;
|
|
235
222
|
};
|
|
236
|
-
if (typeof
|
|
223
|
+
if (typeof s == "function")
|
|
237
224
|
try {
|
|
238
|
-
await
|
|
225
|
+
await s({ bravo: { cancel: O, action: f, componentId: t } }), S = !0;
|
|
239
226
|
} catch {
|
|
240
227
|
}
|
|
241
228
|
else
|
|
242
|
-
|
|
243
|
-
if (
|
|
244
|
-
switch (
|
|
229
|
+
S = !0;
|
|
230
|
+
if (S)
|
|
231
|
+
switch (f.action) {
|
|
245
232
|
case "login":
|
|
246
233
|
// TODO firebase
|
|
247
234
|
// TODO oauth
|
|
@@ -251,7 +238,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
251
238
|
case "submit":
|
|
252
239
|
break;
|
|
253
240
|
case "email":
|
|
254
|
-
window.location.href = `mailto:${
|
|
241
|
+
window.location.href = `mailto:${f.params.email}`;
|
|
255
242
|
break;
|
|
256
243
|
case "goback":
|
|
257
244
|
break;
|
|
@@ -260,32 +247,32 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
260
247
|
case "homepage":
|
|
261
248
|
break;
|
|
262
249
|
case "logout":
|
|
263
|
-
|
|
250
|
+
R(void 0);
|
|
264
251
|
break;
|
|
265
252
|
case "none":
|
|
266
253
|
break;
|
|
267
254
|
case "openurl":
|
|
268
|
-
window.open(
|
|
255
|
+
window.open(f.params.url, "_blank");
|
|
269
256
|
break;
|
|
270
257
|
case "phone":
|
|
271
|
-
window.location.href = `tel:${
|
|
258
|
+
window.location.href = `tel:${f.params.phone}`;
|
|
272
259
|
break;
|
|
273
260
|
case "remote":
|
|
274
|
-
const M = btoa(JSON.stringify(
|
|
275
|
-
K.data?.action && await
|
|
261
|
+
const M = btoa(JSON.stringify(f.params?.data || {})), j = `${n}/devices/apps/${m}/node/${t}/trigger/${f.event}?params=${M}`, K = await Ot.post(j);
|
|
262
|
+
K.data?.action && await B(K.data);
|
|
276
263
|
break;
|
|
277
264
|
case "set-access-token":
|
|
278
|
-
f
|
|
265
|
+
R(f.params);
|
|
279
266
|
break;
|
|
280
267
|
case "set-state":
|
|
281
|
-
if (i &&
|
|
268
|
+
if (i && l)
|
|
282
269
|
if (console.log("🔵 Input group change:", {
|
|
283
270
|
groupName: i.groupName,
|
|
284
|
-
elementName:
|
|
285
|
-
hasOnAction: typeof
|
|
286
|
-
}),
|
|
271
|
+
elementName: l,
|
|
272
|
+
hasOnAction: typeof s == "function"
|
|
273
|
+
}), u(i.groupName, l), typeof s == "function")
|
|
287
274
|
try {
|
|
288
|
-
await
|
|
275
|
+
await s({
|
|
289
276
|
bravo: {
|
|
290
277
|
cancel: () => {
|
|
291
278
|
},
|
|
@@ -294,36 +281,36 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
294
281
|
params: {
|
|
295
282
|
groupName: i.groupName,
|
|
296
283
|
groupType: i.type,
|
|
297
|
-
value:
|
|
284
|
+
value: l
|
|
298
285
|
},
|
|
299
286
|
event: "tap"
|
|
300
287
|
},
|
|
301
288
|
componentId: t
|
|
302
289
|
}
|
|
303
290
|
}), console.log("✅ Input group change event fired");
|
|
304
|
-
} catch (
|
|
305
|
-
console.error("❌ Error in onAction callback:",
|
|
291
|
+
} catch (E) {
|
|
292
|
+
console.error("❌ Error in onAction callback:", E);
|
|
306
293
|
}
|
|
307
294
|
else
|
|
308
295
|
console.warn("⚠️ No onAction callback provided");
|
|
309
296
|
else {
|
|
310
|
-
let
|
|
311
|
-
if (!
|
|
297
|
+
let E = I || f.params?.stateSetId || h.data?.stateSetId;
|
|
298
|
+
if (!E) {
|
|
312
299
|
console.error("❌ No stateSetId found in action or nodeData!", {
|
|
313
|
-
actionParams:
|
|
314
|
-
nodeDataStateSetId:
|
|
315
|
-
parentStatefulSetId:
|
|
300
|
+
actionParams: f.params,
|
|
301
|
+
nodeDataStateSetId: h.data?.stateSetId,
|
|
302
|
+
parentStatefulSetId: I
|
|
316
303
|
});
|
|
317
304
|
break;
|
|
318
305
|
}
|
|
319
|
-
|
|
306
|
+
a(E, f.params.state);
|
|
320
307
|
}
|
|
321
308
|
break;
|
|
322
309
|
case "showalert":
|
|
323
|
-
alert(
|
|
310
|
+
alert(f.params.message);
|
|
324
311
|
break;
|
|
325
312
|
default:
|
|
326
|
-
console.log(
|
|
313
|
+
console.log(f), alert(f.action);
|
|
327
314
|
}
|
|
328
315
|
};
|
|
329
316
|
if (r.href)
|
|
@@ -332,13 +319,13 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
332
319
|
"button",
|
|
333
320
|
{
|
|
334
321
|
type: "button",
|
|
335
|
-
onClick: () =>
|
|
322
|
+
onClick: () => B({
|
|
336
323
|
action: "goto",
|
|
337
324
|
params: { href: r.href },
|
|
338
325
|
event: "tap"
|
|
339
326
|
}),
|
|
340
327
|
style: {
|
|
341
|
-
...
|
|
328
|
+
...x,
|
|
342
329
|
cursor: "pointer",
|
|
343
330
|
background: "transparent",
|
|
344
331
|
border: "none",
|
|
@@ -349,17 +336,17 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
349
336
|
),
|
|
350
337
|
e
|
|
351
338
|
] });
|
|
352
|
-
let
|
|
353
|
-
if (
|
|
354
|
-
...
|
|
339
|
+
let z = h.actions && h.actions.length > 0 ? h.actions : r.actions || [];
|
|
340
|
+
if (I && z.length > 0 && (z = z.map((f) => f.action === "set-state" ? (f.params?.stateSetId, {
|
|
341
|
+
...f,
|
|
355
342
|
params: {
|
|
356
|
-
...
|
|
357
|
-
stateSetId:
|
|
343
|
+
...f.params,
|
|
344
|
+
stateSetId: I
|
|
358
345
|
// Always use parent's id
|
|
359
346
|
}
|
|
360
|
-
}) :
|
|
361
|
-
if (i &&
|
|
362
|
-
|
|
347
|
+
}) : f)), z.length === 0 && (h.data?.stateSetId || I))
|
|
348
|
+
if (i && l)
|
|
349
|
+
z = [
|
|
363
350
|
{
|
|
364
351
|
action: "set-state",
|
|
365
352
|
params: {
|
|
@@ -370,13 +357,13 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
370
357
|
}
|
|
371
358
|
];
|
|
372
359
|
else {
|
|
373
|
-
const
|
|
374
|
-
|
|
360
|
+
const f = I || h.data.stateSetId;
|
|
361
|
+
f ? z = [
|
|
375
362
|
{
|
|
376
363
|
action: "set-state",
|
|
377
364
|
params: {
|
|
378
|
-
state: k.getState().statefulSetVariants[
|
|
379
|
-
stateSetId:
|
|
365
|
+
state: k.getState().statefulSetVariants[f] === "active" ? "default" : "active",
|
|
366
|
+
stateSetId: f
|
|
380
367
|
// Use parent's id or button's stateSetId
|
|
381
368
|
},
|
|
382
369
|
event: "tap"
|
|
@@ -386,26 +373,26 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
386
373
|
{ id: t, name: r.name }
|
|
387
374
|
);
|
|
388
375
|
}
|
|
389
|
-
if (
|
|
390
|
-
const
|
|
391
|
-
return
|
|
376
|
+
if (z && z.length > 0) {
|
|
377
|
+
const f = z[0];
|
|
378
|
+
return f.event !== "tap" ? e : /* @__PURE__ */ it(ut, { children: [
|
|
392
379
|
e,
|
|
393
380
|
/* @__PURE__ */ p(
|
|
394
381
|
"div",
|
|
395
382
|
{
|
|
396
|
-
onClick: (
|
|
397
|
-
|
|
383
|
+
onClick: (S) => {
|
|
384
|
+
S.stopPropagation(), B(f);
|
|
398
385
|
},
|
|
399
|
-
onMouseDown: (
|
|
400
|
-
onMouseUp: (
|
|
401
|
-
style: { ...
|
|
386
|
+
onMouseDown: (S) => S.stopPropagation(),
|
|
387
|
+
onMouseUp: (S) => S.stopPropagation(),
|
|
388
|
+
style: { ...x, cursor: "pointer", pointerEvents: "auto" }
|
|
402
389
|
}
|
|
403
390
|
)
|
|
404
391
|
] });
|
|
405
392
|
}
|
|
406
393
|
return e;
|
|
407
|
-
},
|
|
408
|
-
const o =
|
|
394
|
+
}, ft = ({ id: t, name: r, nodeData: e }) => {
|
|
395
|
+
const o = L(e.style, {
|
|
409
396
|
debug: !1
|
|
410
397
|
});
|
|
411
398
|
return /* @__PURE__ */ p(
|
|
@@ -419,61 +406,61 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
419
406
|
}
|
|
420
407
|
);
|
|
421
408
|
}, gt = ({ id: t, name: r, nodeData: e }) => {
|
|
422
|
-
const o =
|
|
409
|
+
const o = L(e.style, {
|
|
423
410
|
debug: !1
|
|
424
411
|
});
|
|
425
412
|
if (!o.backgroundColor && !o.borderColor)
|
|
426
413
|
return null;
|
|
427
414
|
if (o.borderColor && !o.backgroundColor && (o.backgroundColor = "transparent"), o.borderColor && o.borderWidth) {
|
|
428
|
-
const
|
|
429
|
-
(!o.width || typeof o.width == "number" && o.width === 0) && (o.width =
|
|
415
|
+
const I = Math.max(o.borderWidth || 0, 1);
|
|
416
|
+
(!o.width || typeof o.width == "number" && o.width === 0) && (o.width = I), (!o.height || typeof o.height == "number" && o.height === 0) && (o.height = I), o.boxSizing = "border-box";
|
|
430
417
|
}
|
|
431
|
-
const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"),
|
|
432
|
-
return
|
|
418
|
+
const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), l = N(V)?.isFlex ?? !1, n = e.style?.positioning, m = n && typeof n.top == "number" && typeof n.left == "number" && typeof n.right == "number" && typeof n.bottom == "number" && n.top === 0 && n.left === 0 && n.right === 0 && n.bottom === 0, s = i && (l || m), y = r && r.toLowerCase().startsWith("clip");
|
|
419
|
+
return s && (o.position = "absolute", o.top = 0, o.left = 0, o.right = 0, o.bottom = 0, o.zIndex = -1, o.width && typeof o.width == "string" && o.width.includes("%") && delete o.width, o.height && typeof o.height == "string" && o.height.includes("%") && delete o.height), y && (o.backgroundColor = "transparent"), /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p("div", { "data-name": r, "data-type": "ColorComponent", style: o }) });
|
|
433
420
|
}, mt = ({
|
|
434
421
|
id: t,
|
|
435
422
|
name: r,
|
|
436
423
|
nodeData: e
|
|
437
424
|
}) => {
|
|
438
|
-
const o =
|
|
425
|
+
const o = L(e.style, {
|
|
439
426
|
debug: !1
|
|
440
|
-
}), i = e.style,
|
|
441
|
-
if (!
|
|
442
|
-
const
|
|
443
|
-
if (typeof
|
|
444
|
-
const
|
|
445
|
-
return `${
|
|
427
|
+
}), i = e.style, l = Array.isArray(i?.gradientColorStops) ? i.gradientColorStops.map((n) => {
|
|
428
|
+
if (!n?.color) return null;
|
|
429
|
+
const m = st(n.color);
|
|
430
|
+
if (typeof n.position == "number") {
|
|
431
|
+
const s = n.position * 100;
|
|
432
|
+
return `${m} ${s}%`;
|
|
446
433
|
}
|
|
447
|
-
return
|
|
434
|
+
return m;
|
|
448
435
|
}).filter(Boolean).join(", ") : "";
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
o.backgroundImage =
|
|
436
|
+
if (l) {
|
|
437
|
+
const n = i?.gradientType || "linear";
|
|
438
|
+
o.backgroundImage = n === "radial" ? `radial-gradient(${l})` : `linear-gradient(${l})`, delete o.backgroundColor;
|
|
452
439
|
}
|
|
453
440
|
return /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p("div", { "data-name": r, "data-type": "GradientComponent", style: o }) });
|
|
454
441
|
}, yt = ({ id: t, name: r, nodeData: e }) => {
|
|
455
442
|
const { patchedNodeData: o } = et({ id: t, nodeData: e });
|
|
456
443
|
e = o;
|
|
457
|
-
const i =
|
|
444
|
+
const i = L(e.style, {
|
|
458
445
|
debug: !1
|
|
459
|
-
}),
|
|
460
|
-
|
|
461
|
-
let
|
|
462
|
-
!
|
|
463
|
-
const y = e.style?.positioning,
|
|
464
|
-
if (y &&
|
|
465
|
-
const
|
|
466
|
-
if (
|
|
467
|
-
const
|
|
468
|
-
if (
|
|
469
|
-
const
|
|
470
|
-
i.width =
|
|
446
|
+
}), l = N(V), n = k((u) => u.assetsById), m = e.style?.scaleMode || "fill";
|
|
447
|
+
m === "fill" ? i.objectFit = "cover" : m === "fit" && (i.objectFit = "contain"), i.objectPosition = "center";
|
|
448
|
+
let s = e.data?.imageUrl;
|
|
449
|
+
!s && e.encoreData?.image && (s = e.encoreData.image.startsWith("//") ? `https:${e.encoreData.image}` : e.encoreData.image), s || (s = n[e.assetId]?.url);
|
|
450
|
+
const y = e.style?.positioning, I = e.style?.aspectRatio, h = l.dimensions?.width || 0, a = l.dimensions?.height || 0;
|
|
451
|
+
if (y && I && h > 0) {
|
|
452
|
+
const u = typeof y.left == "number" && typeof y.right == "number", R = typeof y.top == "number" && typeof y.bottom == "number";
|
|
453
|
+
if (u) {
|
|
454
|
+
const w = 100 - y.left - y.right;
|
|
455
|
+
if (w > 0) {
|
|
456
|
+
const x = w * h / 100;
|
|
457
|
+
i.width = x, i.height = x / I, i.left = `${Math.max(0, y.left)}%`, i.top = `${Math.max(0, y.top)}%`, delete i.right, delete i.bottom;
|
|
471
458
|
}
|
|
472
|
-
} else if (
|
|
473
|
-
const
|
|
474
|
-
if (
|
|
475
|
-
const
|
|
476
|
-
i.height =
|
|
459
|
+
} else if (R && a > 0) {
|
|
460
|
+
const w = 100 - y.top - y.bottom;
|
|
461
|
+
if (w > 0) {
|
|
462
|
+
const x = w * a / 100;
|
|
463
|
+
i.height = x, i.width = x * I, i.left = `${Math.max(0, y.left)}%`, i.top = `${Math.max(0, y.top)}%`, delete i.right, delete i.bottom;
|
|
477
464
|
}
|
|
478
465
|
}
|
|
479
466
|
}
|
|
@@ -484,7 +471,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
484
471
|
"data-name": r,
|
|
485
472
|
"data-type": "ImageComponent",
|
|
486
473
|
style: i,
|
|
487
|
-
src:
|
|
474
|
+
src: s || n[e.assetId]?.url,
|
|
488
475
|
alt: r
|
|
489
476
|
}
|
|
490
477
|
) });
|
|
@@ -493,11 +480,11 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
493
480
|
name: r,
|
|
494
481
|
nodeData: e
|
|
495
482
|
}) => {
|
|
496
|
-
const o = k((
|
|
483
|
+
const o = k((l) => l.setFormInputValue), i = L(e.style, { debug: !1 });
|
|
497
484
|
return /* @__PURE__ */ p(
|
|
498
485
|
"input",
|
|
499
486
|
{
|
|
500
|
-
onChange: (
|
|
487
|
+
onChange: (l) => o(t, l.target.value),
|
|
501
488
|
"data-id": t,
|
|
502
489
|
"data-name": r,
|
|
503
490
|
"data-type": "EmailInputComponent",
|
|
@@ -511,7 +498,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
511
498
|
name: r,
|
|
512
499
|
nodeData: e
|
|
513
500
|
}) => {
|
|
514
|
-
const o =
|
|
501
|
+
const o = L(e.style);
|
|
515
502
|
return o.visibility = "hidden", /* @__PURE__ */ p(
|
|
516
503
|
"input",
|
|
517
504
|
{
|
|
@@ -527,7 +514,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
527
514
|
name: r,
|
|
528
515
|
nodeData: e
|
|
529
516
|
}) => {
|
|
530
|
-
const o = k((
|
|
517
|
+
const o = k((n) => n.setFormInputValue), i = L(e.style, { debug: !1 }), l = k((n) => n.assetsById);
|
|
531
518
|
return /* @__PURE__ */ it(ut, { children: [
|
|
532
519
|
/* @__PURE__ */ p(
|
|
533
520
|
"div",
|
|
@@ -539,12 +526,12 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
539
526
|
/* @__PURE__ */ p(
|
|
540
527
|
"img",
|
|
541
528
|
{
|
|
542
|
-
onChange: (
|
|
529
|
+
onChange: (n) => o(t, n.target.value),
|
|
543
530
|
style: i,
|
|
544
531
|
"data-id": t,
|
|
545
532
|
"data-name": r,
|
|
546
533
|
"data-type": "ImageInputComponent",
|
|
547
|
-
src:
|
|
534
|
+
src: l[e.assetId]?.url,
|
|
548
535
|
alt: r
|
|
549
536
|
}
|
|
550
537
|
)
|
|
@@ -554,11 +541,11 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
554
541
|
name: r,
|
|
555
542
|
nodeData: e
|
|
556
543
|
}) => {
|
|
557
|
-
const o = k((
|
|
544
|
+
const o = k((l) => l.setFormInputValue), i = L(e.style, { debug: !1 });
|
|
558
545
|
return /* @__PURE__ */ p(
|
|
559
546
|
"input",
|
|
560
547
|
{
|
|
561
|
-
onChange: (
|
|
548
|
+
onChange: (l) => o(t, l.target.value),
|
|
562
549
|
"data-id": t,
|
|
563
550
|
"data-name": r,
|
|
564
551
|
"data-type": "PasswordInputComponent",
|
|
@@ -572,20 +559,20 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
572
559
|
name: r,
|
|
573
560
|
nodeData: e
|
|
574
561
|
}) => {
|
|
575
|
-
const o = k((
|
|
576
|
-
|
|
577
|
-
const
|
|
562
|
+
const o = k((h) => h.setFormInputValue), { onAction: i } = v.useContext(ht), { patchedNodeData: l } = et({ id: t, nodeData: e }), n = L(l.style, { debug: !1 });
|
|
563
|
+
n.width = "100%", n.flex = "1", n.minWidth = "0", n.boxSizing = "border-box", n.borderColor = n.borderColor ?? "transparent";
|
|
564
|
+
const m = l.data?.value, s = l.data?.options, y = v.useMemo(() => !s || !Array.isArray(s) ? [] : s.map((h) => typeof h == "string" ? { value: h, label: h } : h), [s]);
|
|
578
565
|
return /* @__PURE__ */ it(
|
|
579
566
|
"select",
|
|
580
567
|
{
|
|
581
568
|
"data-id": t,
|
|
582
569
|
"data-name": r,
|
|
583
570
|
"data-type": "SelectInputComponent",
|
|
584
|
-
value:
|
|
585
|
-
style:
|
|
586
|
-
onChange: async (
|
|
587
|
-
const
|
|
588
|
-
if (o(t,
|
|
571
|
+
value: m ?? "",
|
|
572
|
+
style: n,
|
|
573
|
+
onChange: async (h) => {
|
|
574
|
+
const a = h.target.value;
|
|
575
|
+
if (o(t, a), console.log(`Select changed: ${a}`), typeof i == "function")
|
|
589
576
|
try {
|
|
590
577
|
await i({
|
|
591
578
|
bravo: {
|
|
@@ -594,7 +581,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
594
581
|
action: {
|
|
595
582
|
action: "select-change",
|
|
596
583
|
nodeId: t,
|
|
597
|
-
params: { value:
|
|
584
|
+
params: { value: a }
|
|
598
585
|
},
|
|
599
586
|
componentId: t
|
|
600
587
|
}
|
|
@@ -604,7 +591,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
604
591
|
},
|
|
605
592
|
children: [
|
|
606
593
|
y.length === 0 && /* @__PURE__ */ p("option", { value: "", disabled: !0, children: "Select an option..." }),
|
|
607
|
-
y.map((
|
|
594
|
+
y.map((h) => /* @__PURE__ */ p("option", { value: h.value, children: h.label }, h.value))
|
|
608
595
|
]
|
|
609
596
|
}
|
|
610
597
|
);
|
|
@@ -613,13 +600,13 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
613
600
|
name: r,
|
|
614
601
|
nodeData: e
|
|
615
602
|
}) => {
|
|
616
|
-
const o = k((
|
|
603
|
+
const o = k((l) => l.setFormInputValue), i = L(e.style, {
|
|
617
604
|
debug: !1
|
|
618
605
|
});
|
|
619
606
|
return /* @__PURE__ */ p(
|
|
620
607
|
"input",
|
|
621
608
|
{
|
|
622
|
-
onChange: (
|
|
609
|
+
onChange: (l) => o(t, l.target.value),
|
|
623
610
|
name: t,
|
|
624
611
|
"data-id": t,
|
|
625
612
|
"data-name": r,
|
|
@@ -630,7 +617,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
630
617
|
}
|
|
631
618
|
);
|
|
632
619
|
}, wt = ({ id: t, name: r, nodeData: e }) => {
|
|
633
|
-
const o =
|
|
620
|
+
const o = L(e.style);
|
|
634
621
|
return /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p(
|
|
635
622
|
"div",
|
|
636
623
|
{
|
|
@@ -642,9 +629,9 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
642
629
|
}
|
|
643
630
|
) });
|
|
644
631
|
}, At = ({ id: t, name: r, nodeData: e }) => {
|
|
645
|
-
const o =
|
|
632
|
+
const o = L(e.style, {
|
|
646
633
|
debug: !1
|
|
647
|
-
}), i = k((
|
|
634
|
+
}), i = k((l) => l.assetsById);
|
|
648
635
|
return /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p(
|
|
649
636
|
"img",
|
|
650
637
|
{
|
|
@@ -667,24 +654,24 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
667
654
|
style: e.style,
|
|
668
655
|
color: e.style?.color
|
|
669
656
|
});
|
|
670
|
-
const
|
|
657
|
+
const l = e.style, n = e.fontId ? { ...l, fontId: e.fontId } : l, m = L(n, {
|
|
671
658
|
debug: !1
|
|
672
659
|
});
|
|
673
|
-
|
|
660
|
+
m.display = "flex", m.flexDirection = "column", l.verticalPosition && (m.justifyContent = {
|
|
674
661
|
"from-top": "flex-start",
|
|
675
662
|
center: "center",
|
|
676
663
|
"from-bottom": "flex-end"
|
|
677
|
-
}[
|
|
678
|
-
const
|
|
664
|
+
}[l.verticalPosition]);
|
|
665
|
+
const s = i && (i.includes(`
|
|
679
666
|
`) || i.includes("\r"));
|
|
680
667
|
let y;
|
|
681
|
-
return
|
|
668
|
+
return s && m.flexDirection === "column" ? y = i.split(/\r?\n/).filter((h) => h.length > 0).map((h, a) => /* @__PURE__ */ p("div", { style: { lineHeight: "inherit" }, children: h }, a)) : y = i, /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p(
|
|
682
669
|
"div",
|
|
683
670
|
{
|
|
684
671
|
"data-id": t,
|
|
685
672
|
"data-name": r,
|
|
686
673
|
"data-type": "TextComponent",
|
|
687
|
-
style:
|
|
674
|
+
style: m,
|
|
688
675
|
children: y
|
|
689
676
|
}
|
|
690
677
|
) });
|
|
@@ -694,31 +681,31 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
694
681
|
nodeData: e,
|
|
695
682
|
children: o
|
|
696
683
|
}) => {
|
|
697
|
-
const i = N(tt), { patchedNodeData:
|
|
698
|
-
e =
|
|
699
|
-
const
|
|
684
|
+
const i = N(tt), { patchedNodeData: l } = et({ id: t, nodeData: e });
|
|
685
|
+
e = l;
|
|
686
|
+
const n = jt(e.tags), m = n ? k((w) => w.inputGroups[n.groupName]) : null, s = k((w) => w.statefulSetVariants[t]), y = L(e.style, {
|
|
700
687
|
debug: !1
|
|
701
688
|
});
|
|
702
|
-
let
|
|
703
|
-
|
|
704
|
-
const
|
|
689
|
+
let I;
|
|
690
|
+
n && m !== null ? I = m === r ? "active" : "default" : I = s || e.data.initialState || "default";
|
|
691
|
+
const h = v.Children.toArray(o).find((w) => v.isValidElement(w) ? w.props?.nodeData?.data?.state === I : !1), a = v.isValidElement(h) ? v.cloneElement(h, {
|
|
705
692
|
_parentStatefulSetId: t,
|
|
706
|
-
_parentInputGroupInfo:
|
|
693
|
+
_parentInputGroupInfo: n,
|
|
707
694
|
_parentName: r
|
|
708
695
|
// Pass the name so we can identify which element is active
|
|
709
|
-
}) :
|
|
696
|
+
}) : h, u = /* @__PURE__ */ p(
|
|
710
697
|
"div",
|
|
711
698
|
{
|
|
712
699
|
"data-id": t,
|
|
713
700
|
"data-name": r,
|
|
714
701
|
"data-type": "StatefulSetComponent",
|
|
715
702
|
style: y,
|
|
716
|
-
children:
|
|
703
|
+
children: a
|
|
717
704
|
}
|
|
718
705
|
);
|
|
719
706
|
if (e.type === "component:input-stateful-set")
|
|
720
|
-
return
|
|
721
|
-
const
|
|
707
|
+
return u;
|
|
708
|
+
const R = v.useContext(lt);
|
|
722
709
|
return /* @__PURE__ */ p(
|
|
723
710
|
tt.Provider,
|
|
724
711
|
{
|
|
@@ -726,8 +713,8 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
726
713
|
children: /* @__PURE__ */ p(
|
|
727
714
|
lt.Provider,
|
|
728
715
|
{
|
|
729
|
-
value: { ...
|
|
730
|
-
children:
|
|
716
|
+
value: { ...R, statefulSetId: t },
|
|
717
|
+
children: u
|
|
731
718
|
}
|
|
732
719
|
)
|
|
733
720
|
}
|
|
@@ -738,14 +725,14 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
738
725
|
nodeData: e,
|
|
739
726
|
children: o,
|
|
740
727
|
_parentStatefulSetId: i,
|
|
741
|
-
_parentInputGroupInfo:
|
|
742
|
-
_parentName:
|
|
728
|
+
_parentInputGroupInfo: l,
|
|
729
|
+
_parentName: n
|
|
743
730
|
}) => {
|
|
744
|
-
const
|
|
731
|
+
const m = L(e.style, {
|
|
745
732
|
debug: !1
|
|
746
|
-
}),
|
|
747
|
-
...
|
|
748
|
-
position:
|
|
733
|
+
}), s = {
|
|
734
|
+
...m,
|
|
735
|
+
position: m.position || "relative"
|
|
749
736
|
};
|
|
750
737
|
return /* @__PURE__ */ p(
|
|
751
738
|
"div",
|
|
@@ -753,15 +740,15 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
753
740
|
"data-id": t,
|
|
754
741
|
"data-name": r,
|
|
755
742
|
"data-type": "StatefulCompoundComponent",
|
|
756
|
-
style:
|
|
743
|
+
style: s,
|
|
757
744
|
children: /* @__PURE__ */ p(
|
|
758
745
|
Y,
|
|
759
746
|
{
|
|
760
747
|
id: t,
|
|
761
748
|
nodeData: e,
|
|
762
749
|
_parentStatefulSetId: i,
|
|
763
|
-
_parentInputGroupInfo:
|
|
764
|
-
_parentName:
|
|
750
|
+
_parentInputGroupInfo: l,
|
|
751
|
+
_parentName: n,
|
|
765
752
|
children: o
|
|
766
753
|
}
|
|
767
754
|
)
|
|
@@ -769,7 +756,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
769
756
|
);
|
|
770
757
|
}, Tt = ({ id: t, name: r, children: e }) => {
|
|
771
758
|
N(V);
|
|
772
|
-
const { dimensions: o, ref: i } = rt(),
|
|
759
|
+
const { dimensions: o, ref: i } = rt(), l = {
|
|
773
760
|
zIndex: 0,
|
|
774
761
|
flex: 1,
|
|
775
762
|
position: "absolute",
|
|
@@ -785,7 +772,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
785
772
|
"data-name": r,
|
|
786
773
|
"data-type": "BackgroundContainerComponent",
|
|
787
774
|
ref: i,
|
|
788
|
-
style:
|
|
775
|
+
style: l,
|
|
789
776
|
children: e
|
|
790
777
|
}
|
|
791
778
|
) });
|
|
@@ -795,50 +782,50 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
795
782
|
nodeData: e,
|
|
796
783
|
children: o,
|
|
797
784
|
_arrayItemIndex: i,
|
|
798
|
-
_arrayItemData:
|
|
785
|
+
_arrayItemData: l
|
|
799
786
|
}) => {
|
|
800
787
|
t === "01KB929X1KK5TX0K8VBNP6ZDPG" && console.log(
|
|
801
788
|
`[DEBUG] ContainerComponent ${t} (Hero) FULL nodeData:`,
|
|
802
789
|
JSON.stringify(e, null, 2)
|
|
803
790
|
);
|
|
804
|
-
const
|
|
791
|
+
const n = N(tt), { patchedNodeData: m, list: s, arrayData: y } = et({
|
|
805
792
|
id: t,
|
|
806
793
|
nodeData: e
|
|
807
794
|
});
|
|
808
|
-
e =
|
|
809
|
-
const { dimensions:
|
|
795
|
+
e = m;
|
|
796
|
+
const { dimensions: I, ref: h } = rt(), a = L(e.style, {
|
|
810
797
|
debug: !1
|
|
811
|
-
}),
|
|
812
|
-
if (!
|
|
813
|
-
const
|
|
798
|
+
}), u = !!e.style.layout?.mode, R = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", w = a.width !== void 0, x = a.height !== void 0, B = N(V), z = B?.isFlex ?? !1, f = B?.flexDirection, S = z && f === "row", O = !z && e.style.positioning, M = e.style.layout?.layoutSizingHorizontal === "FIXED" || e.style.layout?.layoutSizingVertical === "FIXED", j = e.style.layout?.layoutSizingHorizontal === "HUG" || e.style.layout?.layoutSizingVertical === "HUG";
|
|
799
|
+
if (!w && !S && !(O && (M || j)) && (a.width = "100%"), !x) {
|
|
800
|
+
const W = !z && e.style.positioning, Z = e.style.layout?.layoutSizingVertical === "FILL";
|
|
814
801
|
if (!(e.style.layout?.layoutSizingVertical === "HUG")) {
|
|
815
|
-
if (!
|
|
802
|
+
if (!u) if (W && Z && e.style.positioning?.top !== void 0) {
|
|
816
803
|
const D = 100 - e.style.positioning.top;
|
|
817
|
-
|
|
804
|
+
a.height = `${D}%`;
|
|
818
805
|
} else
|
|
819
|
-
|
|
806
|
+
a.height = "100%";
|
|
820
807
|
}
|
|
821
808
|
}
|
|
822
|
-
const K = e.style.layout?.layoutSizingHorizontal || e.style.layout?.layoutSizingVertical, H = e.style.positioning && !
|
|
823
|
-
width:
|
|
824
|
-
height:
|
|
809
|
+
const K = e.style.layout?.layoutSizingHorizontal || e.style.layout?.layoutSizingVertical, H = e.style.positioning && !u && (K || !0) ? { ...a, position: "absolute" } : a.position === "absolute" ? a : { ...a, position: a.position || "relative" }, U = (W) => typeof W == "number" ? W : typeof W == "string" && W.endsWith("px") && parseFloat(W) || 0, G = U(a.paddingLeft), g = U(a.paddingRight), q = U(a.paddingTop), X = U(a.paddingBottom), P = M && typeof a.width == "number" && typeof a.height == "number" ? {
|
|
810
|
+
width: a.width - G - g,
|
|
811
|
+
height: a.height - q - X
|
|
825
812
|
} : {
|
|
826
|
-
width:
|
|
827
|
-
height:
|
|
813
|
+
width: I.width - G - g,
|
|
814
|
+
height: I.height - q - X
|
|
828
815
|
};
|
|
829
|
-
if (i != null &&
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
832
|
-
const Z = typeof
|
|
833
|
-
nodeData:
|
|
834
|
-
arrayDataById:
|
|
835
|
-
textOverridesById:
|
|
836
|
-
rootData:
|
|
837
|
-
} : { nodeData:
|
|
816
|
+
if (i != null && s) {
|
|
817
|
+
const W = s[i];
|
|
818
|
+
if (W !== void 0) {
|
|
819
|
+
const Z = typeof W == "object" && W !== null ? {
|
|
820
|
+
nodeData: W,
|
|
821
|
+
arrayDataById: n?.arrayDataById,
|
|
822
|
+
textOverridesById: n?.textOverridesById,
|
|
823
|
+
rootData: n?.rootData
|
|
824
|
+
} : { nodeData: W };
|
|
838
825
|
return /* @__PURE__ */ p(tt.Provider, { value: Z, children: /* @__PURE__ */ p(
|
|
839
826
|
V.Provider,
|
|
840
827
|
{
|
|
841
|
-
value: { dimensions:
|
|
828
|
+
value: { dimensions: P, isFlex: u, flexDirection: R },
|
|
842
829
|
children: /* @__PURE__ */ p(
|
|
843
830
|
"div",
|
|
844
831
|
{
|
|
@@ -853,14 +840,14 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
853
840
|
) });
|
|
854
841
|
}
|
|
855
842
|
}
|
|
856
|
-
if (
|
|
857
|
-
const
|
|
858
|
-
return Ht(() =>
|
|
843
|
+
if (s) {
|
|
844
|
+
const W = y || s;
|
|
845
|
+
return Ht(() => W.map((J, nt) => {
|
|
859
846
|
const D = typeof J == "object" && J !== null ? {
|
|
860
847
|
nodeData: J,
|
|
861
|
-
arrayDataById:
|
|
862
|
-
textOverridesById:
|
|
863
|
-
rootData:
|
|
848
|
+
arrayDataById: n?.arrayDataById,
|
|
849
|
+
textOverridesById: n?.textOverridesById,
|
|
850
|
+
rootData: n?.rootData
|
|
864
851
|
} : { nodeData: J };
|
|
865
852
|
return /* @__PURE__ */ p(
|
|
866
853
|
tt.Provider,
|
|
@@ -869,7 +856,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
869
856
|
children: /* @__PURE__ */ p(
|
|
870
857
|
V.Provider,
|
|
871
858
|
{
|
|
872
|
-
value: { dimensions:
|
|
859
|
+
value: { dimensions: P, isFlex: u, flexDirection: R },
|
|
873
860
|
children: /* @__PURE__ */ p(
|
|
874
861
|
"div",
|
|
875
862
|
{
|
|
@@ -885,48 +872,48 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
885
872
|
},
|
|
886
873
|
`${t}:${nt}`
|
|
887
874
|
);
|
|
888
|
-
}), [
|
|
875
|
+
}), [W, t]);
|
|
889
876
|
}
|
|
890
|
-
let
|
|
891
|
-
!Array.isArray(
|
|
892
|
-
([
|
|
893
|
-
event:
|
|
877
|
+
let F = e.actions || [];
|
|
878
|
+
!Array.isArray(F) && typeof F == "object" && F !== null && (F = Object.entries(F).map(
|
|
879
|
+
([W, Z]) => ({
|
|
880
|
+
event: W,
|
|
894
881
|
...typeof Z == "object" && Z !== null ? Z : {}
|
|
895
882
|
})
|
|
896
883
|
));
|
|
897
|
-
const
|
|
884
|
+
const $ = Array.isArray(F) && F.length > 0;
|
|
898
885
|
return /* @__PURE__ */ p(
|
|
899
886
|
V.Provider,
|
|
900
887
|
{
|
|
901
|
-
value: { dimensions:
|
|
888
|
+
value: { dimensions: P, isFlex: u, flexDirection: R },
|
|
902
889
|
children: /* @__PURE__ */ p(
|
|
903
890
|
"div",
|
|
904
891
|
{
|
|
905
892
|
"data-id": t,
|
|
906
893
|
"data-name": r,
|
|
907
894
|
"data-type": "ContainerComponent",
|
|
908
|
-
ref:
|
|
895
|
+
ref: h,
|
|
909
896
|
style: H,
|
|
910
|
-
children:
|
|
897
|
+
children: $ ? /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: o }) : o
|
|
911
898
|
}
|
|
912
899
|
)
|
|
913
900
|
}
|
|
914
901
|
);
|
|
915
|
-
}, Pt = pt,
|
|
916
|
-
const { dimensions: i, ref:
|
|
902
|
+
}, Pt = pt, Wt = ({ id: t, name: r, nodeData: e, children: o }) => {
|
|
903
|
+
const { dimensions: i, ref: l } = rt(), n = L(e.style, {
|
|
917
904
|
debug: !1
|
|
918
|
-
}),
|
|
905
|
+
}), m = !!e.style.layout?.mode, s = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", y = n.position ? n : { ...n, position: "relative" };
|
|
919
906
|
return /* @__PURE__ */ p(
|
|
920
907
|
V.Provider,
|
|
921
908
|
{
|
|
922
|
-
value: { dimensions: i, isFlex:
|
|
909
|
+
value: { dimensions: i, isFlex: m, flexDirection: s },
|
|
923
910
|
children: /* @__PURE__ */ p(
|
|
924
911
|
"div",
|
|
925
912
|
{
|
|
926
913
|
"data-id": t,
|
|
927
914
|
"data-name": r,
|
|
928
915
|
"data-type": "TopBarContainerComponent",
|
|
929
|
-
ref:
|
|
916
|
+
ref: l,
|
|
930
917
|
style: y,
|
|
931
918
|
children: o
|
|
932
919
|
}
|
|
@@ -934,7 +921,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
934
921
|
}
|
|
935
922
|
);
|
|
936
923
|
}, Ut = ({ id: t, name: r, nodeData: e, children: o }) => {
|
|
937
|
-
const i =
|
|
924
|
+
const i = L(e.style, { debug: !1 });
|
|
938
925
|
return /* @__PURE__ */ p(
|
|
939
926
|
"div",
|
|
940
927
|
{
|
|
@@ -945,17 +932,17 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
945
932
|
children: o
|
|
946
933
|
}
|
|
947
934
|
);
|
|
948
|
-
},
|
|
935
|
+
}, Bt = ({ id: t, name: r, nodeData: e, children: o }) => /* @__PURE__ */ p(
|
|
949
936
|
"div",
|
|
950
937
|
{
|
|
951
938
|
"data-id": t,
|
|
952
939
|
"data-name": r,
|
|
953
940
|
"data-type": "TabsMenuComponent",
|
|
954
|
-
style:
|
|
941
|
+
style: L(e.style),
|
|
955
942
|
children: o
|
|
956
943
|
}
|
|
957
|
-
),
|
|
958
|
-
const i =
|
|
944
|
+
), Lt = ({ id: t, name: r, nodeData: e, children: o }) => {
|
|
945
|
+
const i = L(e.style, {
|
|
959
946
|
debug: !1
|
|
960
947
|
});
|
|
961
948
|
return /* @__PURE__ */ p(
|
|
@@ -973,197 +960,197 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
973
960
|
`[DEBUG] SliderComponent ${t} FULL nodeData:`,
|
|
974
961
|
JSON.stringify(e, null, 2)
|
|
975
962
|
);
|
|
976
|
-
const { dimensions: i, ref:
|
|
963
|
+
const { dimensions: i, ref: l } = rt(), n = v.useRef(null), m = v.useRef(null), s = v.useRef(!1), y = v.useRef(null), I = N(ct), h = N(Mt), { onAction: a } = N(ht), [u, R] = v.useState({
|
|
977
964
|
currentIndex: void 0,
|
|
978
965
|
onIndexChange: void 0
|
|
979
|
-
}), [
|
|
980
|
-
e =
|
|
981
|
-
const
|
|
982
|
-
let j = Array.isArray(e.tags) && e.tags.some((
|
|
983
|
-
if (!j &&
|
|
984
|
-
const
|
|
985
|
-
typeof
|
|
966
|
+
}), [w, x] = v.useState(0), B = v.useRef(null), { patchedNodeData: z } = et({ id: t, nodeData: e });
|
|
967
|
+
e = z;
|
|
968
|
+
const f = e.data?.params || {}, S = f.infinite === !0, O = f.automatic === !0;
|
|
969
|
+
let j = Array.isArray(e.tags) && e.tags.some((c) => c.includes("container:slider:vertical")) || e.name && e.name.includes("container:slider:vertical");
|
|
970
|
+
if (!j && f.animation === "default") {
|
|
971
|
+
const c = e.style?.width, d = e.style?.height;
|
|
972
|
+
typeof c == "number" && typeof d == "number" && d > c && (j = !0);
|
|
986
973
|
}
|
|
987
|
-
const K = j ? "vertical" :
|
|
974
|
+
const K = j ? "vertical" : f.animation === "default" ? "horizontal" : f.animation || "horizontal", E = L(e.style, {
|
|
988
975
|
debug: !1
|
|
989
|
-
}), H =
|
|
990
|
-
H || (
|
|
991
|
-
const G = N(tt),
|
|
992
|
-
const
|
|
993
|
-
return
|
|
994
|
-
if (
|
|
995
|
-
const
|
|
996
|
-
if (Array.isArray(C?.tags) && (C.tags.includes("encore:data:array") || C.tags.includes("bravo:data:array")) &&
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
key: `${
|
|
976
|
+
}), H = E.width !== void 0, U = E.height !== void 0;
|
|
977
|
+
H || (E.width = "100%"), U || (E.height = "100%"), E.position || (E.position = "relative");
|
|
978
|
+
const G = N(tt), g = v.useMemo(() => {
|
|
979
|
+
const c = [];
|
|
980
|
+
return v.Children.forEach(o, (d) => {
|
|
981
|
+
if (d == null) return;
|
|
982
|
+
const A = d?.props || {}, C = A.nodeData || {};
|
|
983
|
+
if (Array.isArray(C?.tags) && (C.tags.includes("encore:data:array") || C.tags.includes("bravo:data:array")) && A.id && G) {
|
|
984
|
+
const T = G?.arrayDataById && G.arrayDataById[A.id] && Array.isArray(G.arrayDataById[A.id]) ? G.arrayDataById[A.id] : null;
|
|
985
|
+
T && T.length > 0 ? T.forEach((Q, ot) => {
|
|
986
|
+
c.push(
|
|
987
|
+
v.cloneElement(d, {
|
|
988
|
+
key: `${A.id}:${ot}`,
|
|
1002
989
|
// ContainerComponent will use this to know which item to render
|
|
1003
990
|
_arrayItemIndex: ot,
|
|
1004
991
|
_arrayItemData: Q
|
|
1005
992
|
})
|
|
1006
993
|
);
|
|
1007
|
-
}) :
|
|
994
|
+
}) : c.push(d);
|
|
1008
995
|
} else
|
|
1009
|
-
|
|
1010
|
-
}),
|
|
1011
|
-
}, [o, t, G]), q =
|
|
1012
|
-
if (!
|
|
1013
|
-
return
|
|
1014
|
-
const
|
|
996
|
+
c.push(d);
|
|
997
|
+
}), c;
|
|
998
|
+
}, [o, t, G]), q = v.useMemo(() => {
|
|
999
|
+
if (!S || g.length === 0)
|
|
1000
|
+
return g;
|
|
1001
|
+
const c = g[0], d = g[g.length - 1];
|
|
1015
1002
|
return [
|
|
1016
|
-
|
|
1017
|
-
key: `clone-last-${
|
|
1003
|
+
v.cloneElement(d, {
|
|
1004
|
+
key: `clone-last-${d.key || d.props.id}`
|
|
1018
1005
|
}),
|
|
1019
|
-
...
|
|
1020
|
-
|
|
1021
|
-
key: `clone-first-${
|
|
1006
|
+
...g,
|
|
1007
|
+
v.cloneElement(c, {
|
|
1008
|
+
key: `clone-first-${c.key || c.props.id}`
|
|
1022
1009
|
})
|
|
1023
1010
|
];
|
|
1024
|
-
}, [
|
|
1025
|
-
if (
|
|
1026
|
-
const
|
|
1011
|
+
}, [g, S]), X = v.useMemo(() => {
|
|
1012
|
+
if (g.length === 0) return { width: 0, height: 0 };
|
|
1013
|
+
const d = g[0]?.props?.nodeData?.style, A = I.scaleFactor || 1;
|
|
1027
1014
|
let C = 0, b = 0;
|
|
1028
|
-
return
|
|
1029
|
-
}, [
|
|
1030
|
-
if (!
|
|
1015
|
+
return d?.layout?.layoutSizingHorizontal === "FIXED" && d?.layout?.size?.x ? C = d.layout.size.x * A : C = i.width || 0, d?.layout?.layoutSizingVertical === "FIXED" && d?.layout?.size?.y ? b = d.layout.size.y * A : b = i.height || 0, { width: C, height: b };
|
|
1016
|
+
}, [g, i.width, i.height, I.scaleFactor]), P = X.width, F = X.height, $ = K === "vertical", _ = v.useCallback(() => {
|
|
1017
|
+
if (!n.current || g.length === 0)
|
|
1031
1018
|
return 0;
|
|
1032
|
-
const
|
|
1033
|
-
if (
|
|
1034
|
-
if (
|
|
1035
|
-
const
|
|
1036
|
-
if (
|
|
1037
|
-
const C =
|
|
1038
|
-
let b = Math.round(C /
|
|
1039
|
-
return b < 0 && (b = 0), b >=
|
|
1019
|
+
const c = n.current;
|
|
1020
|
+
if ($) {
|
|
1021
|
+
if (F === 0) return 0;
|
|
1022
|
+
const d = c.scrollTop;
|
|
1023
|
+
if (S) {
|
|
1024
|
+
const C = d - F;
|
|
1025
|
+
let b = Math.round(C / F);
|
|
1026
|
+
return b < 0 && (b = 0), b >= g.length && (b = g.length - 1), b;
|
|
1040
1027
|
} else {
|
|
1041
|
-
const
|
|
1042
|
-
return
|
|
1028
|
+
const A = Math.round(d / F);
|
|
1029
|
+
return A < 0 ? 0 : A >= g.length ? g.length - 1 : A;
|
|
1043
1030
|
}
|
|
1044
1031
|
} else {
|
|
1045
|
-
if (
|
|
1046
|
-
const
|
|
1047
|
-
if (
|
|
1048
|
-
const C =
|
|
1049
|
-
let b = Math.round(C /
|
|
1050
|
-
return b < 0 && (b = 0), b >=
|
|
1032
|
+
if (P === 0) return 0;
|
|
1033
|
+
const d = c.scrollLeft;
|
|
1034
|
+
if (S) {
|
|
1035
|
+
const C = d - P;
|
|
1036
|
+
let b = Math.round(C / P);
|
|
1037
|
+
return b < 0 && (b = 0), b >= g.length && (b = g.length - 1), b;
|
|
1051
1038
|
} else {
|
|
1052
|
-
const
|
|
1053
|
-
return
|
|
1039
|
+
const A = Math.round(d / P);
|
|
1040
|
+
return A < 0 ? 0 : A >= g.length ? g.length - 1 : A;
|
|
1054
1041
|
}
|
|
1055
1042
|
}
|
|
1056
|
-
}, [
|
|
1057
|
-
(
|
|
1058
|
-
if (!
|
|
1059
|
-
const
|
|
1060
|
-
if (
|
|
1043
|
+
}, [S, g.length, P, F, $]), W = v.useCallback(
|
|
1044
|
+
(c, d = !0) => {
|
|
1045
|
+
if (!n.current || g.length === 0) return;
|
|
1046
|
+
const A = n.current;
|
|
1047
|
+
if ($) {
|
|
1061
1048
|
let C;
|
|
1062
|
-
|
|
1049
|
+
S ? C = F + c * F : C = c * F, A.scrollTo({
|
|
1063
1050
|
top: C,
|
|
1064
|
-
behavior:
|
|
1051
|
+
behavior: d ? "smooth" : "auto"
|
|
1065
1052
|
});
|
|
1066
1053
|
} else {
|
|
1067
1054
|
let C;
|
|
1068
|
-
|
|
1055
|
+
S ? C = P + c * P : C = c * P, A.scrollTo({
|
|
1069
1056
|
left: C,
|
|
1070
|
-
behavior:
|
|
1057
|
+
behavior: d ? "smooth" : "auto"
|
|
1071
1058
|
});
|
|
1072
1059
|
}
|
|
1073
1060
|
},
|
|
1074
|
-
[
|
|
1075
|
-
), Z =
|
|
1076
|
-
if (!
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
if (
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1061
|
+
[P, F, S, g.length, $]
|
|
1062
|
+
), Z = v.useCallback(() => {
|
|
1063
|
+
if (!S || !n.current || g.length === 0) return;
|
|
1064
|
+
const c = n.current, d = 1;
|
|
1065
|
+
if ($) {
|
|
1066
|
+
if (F === 0) return;
|
|
1067
|
+
const A = c.scrollTop, C = F, b = C, T = b + g.length * C;
|
|
1068
|
+
A >= T - d ? c.scrollTop = b : A <= d && (c.scrollTop = T - C);
|
|
1082
1069
|
} else {
|
|
1083
|
-
if (
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1070
|
+
if (P === 0) return;
|
|
1071
|
+
const A = c.scrollLeft, C = P, b = C, T = b + g.length * C;
|
|
1072
|
+
A >= T - d ? c.scrollLeft = b : A <= d && (c.scrollLeft = T - C);
|
|
1086
1073
|
}
|
|
1087
|
-
}, [
|
|
1088
|
-
|
|
1089
|
-
if (!O ||
|
|
1090
|
-
const
|
|
1091
|
-
if (
|
|
1092
|
-
const
|
|
1093
|
-
if (
|
|
1094
|
-
if (
|
|
1095
|
-
const
|
|
1074
|
+
}, [S, g.length, P, F, $]);
|
|
1075
|
+
v.useEffect(() => {
|
|
1076
|
+
if (!O || g.length <= 1 || P === 0) return;
|
|
1077
|
+
const c = () => {
|
|
1078
|
+
if (s.current || !n.current) return;
|
|
1079
|
+
const d = n.current;
|
|
1080
|
+
if ($) {
|
|
1081
|
+
if (F === 0) return;
|
|
1082
|
+
const A = d.scrollTop, C = F;
|
|
1096
1083
|
let b;
|
|
1097
|
-
if (
|
|
1098
|
-
const ot =
|
|
1099
|
-
b = Math.round(ot / C), b < 0 && (b = 0), b >=
|
|
1084
|
+
if (S) {
|
|
1085
|
+
const ot = A - C;
|
|
1086
|
+
b = Math.round(ot / C), b < 0 && (b = 0), b >= g.length && (b = g.length - 1);
|
|
1100
1087
|
} else
|
|
1101
|
-
b = Math.round(
|
|
1102
|
-
let
|
|
1103
|
-
if (
|
|
1104
|
-
|
|
1088
|
+
b = Math.round(A / C);
|
|
1089
|
+
let T = b + 1;
|
|
1090
|
+
if (S) {
|
|
1091
|
+
T >= g.length && (T = 0);
|
|
1105
1092
|
const Q = C;
|
|
1106
|
-
|
|
1107
|
-
top: Q +
|
|
1093
|
+
d.scrollTo({
|
|
1094
|
+
top: Q + T * C,
|
|
1108
1095
|
behavior: "smooth"
|
|
1109
1096
|
});
|
|
1110
1097
|
} else
|
|
1111
|
-
|
|
1098
|
+
T >= g.length && (T = 0), W(T);
|
|
1112
1099
|
} else {
|
|
1113
|
-
if (
|
|
1114
|
-
const
|
|
1100
|
+
if (P === 0) return;
|
|
1101
|
+
const A = d.scrollLeft, C = P;
|
|
1115
1102
|
let b;
|
|
1116
|
-
if (
|
|
1117
|
-
const ot =
|
|
1118
|
-
b = Math.round(ot / C), b < 0 && (b = 0), b >=
|
|
1103
|
+
if (S) {
|
|
1104
|
+
const ot = A - C;
|
|
1105
|
+
b = Math.round(ot / C), b < 0 && (b = 0), b >= g.length && (b = g.length - 1);
|
|
1119
1106
|
} else
|
|
1120
|
-
b = Math.round(
|
|
1121
|
-
let
|
|
1122
|
-
if (
|
|
1123
|
-
|
|
1107
|
+
b = Math.round(A / C);
|
|
1108
|
+
let T = b + 1;
|
|
1109
|
+
if (S) {
|
|
1110
|
+
T >= g.length && (T = 0);
|
|
1124
1111
|
const Q = C;
|
|
1125
|
-
|
|
1126
|
-
left: Q +
|
|
1112
|
+
d.scrollTo({
|
|
1113
|
+
left: Q + T * C,
|
|
1127
1114
|
behavior: "smooth"
|
|
1128
1115
|
});
|
|
1129
1116
|
} else
|
|
1130
|
-
|
|
1117
|
+
T >= g.length && (T = 0), W(T);
|
|
1131
1118
|
}
|
|
1132
1119
|
};
|
|
1133
|
-
return
|
|
1134
|
-
|
|
1120
|
+
return m.current = setInterval(c, 4e3), () => {
|
|
1121
|
+
m.current && (clearInterval(m.current), m.current = null);
|
|
1135
1122
|
};
|
|
1136
1123
|
}, [
|
|
1137
1124
|
O,
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
W,
|
|
1125
|
+
g.length,
|
|
1126
|
+
S,
|
|
1141
1127
|
P,
|
|
1142
|
-
|
|
1143
|
-
|
|
1128
|
+
F,
|
|
1129
|
+
$,
|
|
1130
|
+
W
|
|
1144
1131
|
]);
|
|
1145
|
-
const J =
|
|
1146
|
-
|
|
1147
|
-
|
|
1132
|
+
const J = v.useCallback(() => {
|
|
1133
|
+
s.current = !0, y.current && clearTimeout(y.current), y.current = setTimeout(() => {
|
|
1134
|
+
s.current = !1;
|
|
1148
1135
|
}, 3e3);
|
|
1149
|
-
}, []), nt =
|
|
1150
|
-
|
|
1151
|
-
nt.current =
|
|
1152
|
-
}, [
|
|
1153
|
-
const D =
|
|
1154
|
-
(
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1157
|
-
const
|
|
1158
|
-
if (
|
|
1136
|
+
}, []), nt = v.useRef(u);
|
|
1137
|
+
v.useEffect(() => {
|
|
1138
|
+
nt.current = u;
|
|
1139
|
+
}, [u]);
|
|
1140
|
+
const D = v.useCallback(
|
|
1141
|
+
(c) => {
|
|
1142
|
+
if (B.current === c) return;
|
|
1143
|
+
B.current = c;
|
|
1144
|
+
const d = nt.current;
|
|
1145
|
+
if (d.currentIndex === void 0 && x(c), d.onIndexChange && d.onIndexChange(c), typeof a == "function")
|
|
1159
1146
|
try {
|
|
1160
|
-
|
|
1147
|
+
a({
|
|
1161
1148
|
bravo: {
|
|
1162
1149
|
cancel: () => {
|
|
1163
1150
|
},
|
|
1164
1151
|
action: {
|
|
1165
1152
|
action: "index-change",
|
|
1166
|
-
params: { index:
|
|
1153
|
+
params: { index: c }
|
|
1167
1154
|
},
|
|
1168
1155
|
componentId: t
|
|
1169
1156
|
}
|
|
@@ -1171,88 +1158,88 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1171
1158
|
} catch {
|
|
1172
1159
|
}
|
|
1173
1160
|
},
|
|
1174
|
-
[
|
|
1161
|
+
[a, t]
|
|
1175
1162
|
// Depend on onAction to ensure we call the latest version
|
|
1176
1163
|
);
|
|
1177
|
-
|
|
1178
|
-
const
|
|
1179
|
-
if (!
|
|
1180
|
-
let
|
|
1181
|
-
const
|
|
1182
|
-
J(),
|
|
1164
|
+
v.useEffect(() => {
|
|
1165
|
+
const c = n.current;
|
|
1166
|
+
if (!c) return;
|
|
1167
|
+
let d = null;
|
|
1168
|
+
const A = () => {
|
|
1169
|
+
J(), S ? (d !== null && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1183
1170
|
Z();
|
|
1184
|
-
const
|
|
1185
|
-
D(
|
|
1186
|
-
})) : (
|
|
1187
|
-
const
|
|
1188
|
-
D(
|
|
1171
|
+
const T = _();
|
|
1172
|
+
D(T);
|
|
1173
|
+
})) : (d !== null && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1174
|
+
const T = _();
|
|
1175
|
+
D(T);
|
|
1189
1176
|
}));
|
|
1190
1177
|
}, C = () => J(), b = () => J();
|
|
1191
|
-
return
|
|
1178
|
+
return c.addEventListener("scroll", A, { passive: !0 }), c.addEventListener("touchstart", C, {
|
|
1192
1179
|
passive: !0
|
|
1193
|
-
}),
|
|
1194
|
-
|
|
1180
|
+
}), c.addEventListener("mousedown", b), () => {
|
|
1181
|
+
c.removeEventListener("scroll", A), c.removeEventListener("touchstart", C), c.removeEventListener("mousedown", b), y.current && clearTimeout(y.current), d !== null && cancelAnimationFrame(d);
|
|
1195
1182
|
};
|
|
1196
1183
|
}, [
|
|
1197
|
-
|
|
1184
|
+
S,
|
|
1198
1185
|
J,
|
|
1199
1186
|
Z,
|
|
1200
1187
|
_,
|
|
1201
1188
|
D
|
|
1202
|
-
]),
|
|
1203
|
-
if (
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1189
|
+
]), v.useEffect(() => {
|
|
1190
|
+
if (h) {
|
|
1191
|
+
const c = h.getControlProps(t);
|
|
1192
|
+
c && c !== u && R(c);
|
|
1206
1193
|
}
|
|
1207
|
-
}, [t,
|
|
1208
|
-
if (
|
|
1209
|
-
const
|
|
1194
|
+
}, [t, h, u]), v.useEffect(() => {
|
|
1195
|
+
if (u.currentIndex !== void 0 && n.current && g.length > 0 && P > 0) {
|
|
1196
|
+
const c = Math.max(
|
|
1210
1197
|
0,
|
|
1211
|
-
Math.min(
|
|
1212
|
-
),
|
|
1213
|
-
|
|
1198
|
+
Math.min(u.currentIndex, g.length - 1)
|
|
1199
|
+
), d = _();
|
|
1200
|
+
c !== d && W(c, !0);
|
|
1214
1201
|
}
|
|
1215
1202
|
}, [
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
W,
|
|
1203
|
+
u.currentIndex,
|
|
1204
|
+
g.length,
|
|
1205
|
+
g.length,
|
|
1220
1206
|
P,
|
|
1221
|
-
|
|
1222
|
-
|
|
1207
|
+
F,
|
|
1208
|
+
$,
|
|
1209
|
+
W,
|
|
1223
1210
|
_
|
|
1224
|
-
]),
|
|
1225
|
-
if (
|
|
1226
|
-
const
|
|
1211
|
+
]), v.useEffect(() => {
|
|
1212
|
+
if (S && n.current && g.length > 0 && g.length > 0 && ($ ? F > 0 : P > 0)) {
|
|
1213
|
+
const c = $ ? F : P;
|
|
1227
1214
|
setTimeout(() => {
|
|
1228
|
-
|
|
1215
|
+
n.current && ($ ? n.current.scrollTop = c : n.current.scrollLeft = c);
|
|
1229
1216
|
}, 0);
|
|
1230
1217
|
}
|
|
1231
|
-
}, [
|
|
1232
|
-
if (!
|
|
1233
|
-
const { registerContainer:
|
|
1218
|
+
}, [S, g.length, P, F, $]), v.useEffect(() => {
|
|
1219
|
+
if (!h) return;
|
|
1220
|
+
const { registerContainer: c, unregisterContainer: d } = h;
|
|
1234
1221
|
return () => {
|
|
1235
1222
|
};
|
|
1236
1223
|
}, [
|
|
1237
1224
|
t,
|
|
1238
|
-
|
|
1239
|
-
|
|
1225
|
+
h?.registerContainer,
|
|
1226
|
+
h?.unregisterContainer,
|
|
1240
1227
|
// controlProps, // REMOVED to break infinite loop
|
|
1241
|
-
|
|
1228
|
+
W,
|
|
1242
1229
|
_
|
|
1243
1230
|
]);
|
|
1244
1231
|
const kt = {
|
|
1245
1232
|
display: "flex",
|
|
1246
|
-
flexDirection:
|
|
1247
|
-
overflowX:
|
|
1248
|
-
overflowY:
|
|
1249
|
-
scrollSnapType:
|
|
1233
|
+
flexDirection: $ ? "column" : "row",
|
|
1234
|
+
overflowX: $ ? "hidden" : "auto",
|
|
1235
|
+
overflowY: $ ? "auto" : "hidden",
|
|
1236
|
+
scrollSnapType: $ ? "y mandatory" : "x mandatory",
|
|
1250
1237
|
scrollBehavior: "smooth",
|
|
1251
1238
|
width: "100%",
|
|
1252
1239
|
height: "100%",
|
|
1253
1240
|
WebkitOverflowScrolling: "touch"
|
|
1254
1241
|
// Smooth scrolling on iOS
|
|
1255
|
-
},
|
|
1242
|
+
}, $t = {
|
|
1256
1243
|
flexShrink: 0,
|
|
1257
1244
|
scrollSnapAlign: "start",
|
|
1258
1245
|
width: X.width > 0 ? X.width : void 0,
|
|
@@ -1265,9 +1252,9 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1265
1252
|
"data-id": t,
|
|
1266
1253
|
"data-name": r,
|
|
1267
1254
|
"data-type": "SliderComponent",
|
|
1268
|
-
ref:
|
|
1269
|
-
style:
|
|
1270
|
-
children: /* @__PURE__ */ p("div", { ref:
|
|
1255
|
+
ref: l,
|
|
1256
|
+
style: E,
|
|
1257
|
+
children: /* @__PURE__ */ p("div", { ref: n, style: kt, children: q.map((c, d) => /* @__PURE__ */ p(
|
|
1271
1258
|
V.Provider,
|
|
1272
1259
|
{
|
|
1273
1260
|
value: {
|
|
@@ -1277,32 +1264,32 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1277
1264
|
},
|
|
1278
1265
|
isFlex: !1
|
|
1279
1266
|
},
|
|
1280
|
-
children: /* @__PURE__ */ p("div", { style:
|
|
1267
|
+
children: /* @__PURE__ */ p("div", { style: $t, children: c })
|
|
1281
1268
|
},
|
|
1282
|
-
|
|
1269
|
+
c.key || `slide-${d}`
|
|
1283
1270
|
)) })
|
|
1284
1271
|
}
|
|
1285
1272
|
);
|
|
1286
|
-
},
|
|
1273
|
+
}, zt = (t, r) => {
|
|
1287
1274
|
const e = Array.isArray(t) ? t : [t];
|
|
1288
1275
|
for (const o of e)
|
|
1289
1276
|
if (!(!o || !o.props)) {
|
|
1290
1277
|
if (o.props.id === r)
|
|
1291
1278
|
return o;
|
|
1292
1279
|
if (o.props.children) {
|
|
1293
|
-
const i =
|
|
1280
|
+
const i = zt(o.props.children, r);
|
|
1294
1281
|
if (i) return i;
|
|
1295
1282
|
}
|
|
1296
1283
|
}
|
|
1297
1284
|
return null;
|
|
1298
|
-
},
|
|
1299
|
-
const { dimensions: i, ref:
|
|
1300
|
-
let
|
|
1301
|
-
i.width > 0 && i.height > 0 ? (
|
|
1302
|
-
const
|
|
1303
|
-
if (
|
|
1304
|
-
const
|
|
1305
|
-
return
|
|
1285
|
+
}, Rt = ({ id: t, name: r, nodeData: e, children: o }) => {
|
|
1286
|
+
const { dimensions: i, ref: l } = rt(), { componentId: n } = N(lt), m = N(V), s = e.style.originalSize?.[0] || 1, y = e.style.originalSize?.[1] || 1, I = m?.dimensions?.width, h = m?.dimensions?.height, a = window.innerWidth, u = window.innerHeight, R = I && I > 0 && I < a * 0.8;
|
|
1287
|
+
let w, x;
|
|
1288
|
+
i.width > 0 && i.height > 0 ? (w = i.width, x = i.height) : R && I && h || I && h && I > 0 && h > 0 ? (w = I, x = h) : (w = a, x = u);
|
|
1289
|
+
const z = { scaleFactor: Math.min(w / s, x / y) || 1 };
|
|
1290
|
+
if (n) {
|
|
1291
|
+
const E = zt(o, n);
|
|
1292
|
+
return E ? /* @__PURE__ */ p(ct.Provider, { value: z, children: /* @__PURE__ */ p(
|
|
1306
1293
|
V.Provider,
|
|
1307
1294
|
{
|
|
1308
1295
|
value: {
|
|
@@ -1311,14 +1298,14 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1311
1298
|
height: "100%"
|
|
1312
1299
|
}
|
|
1313
1300
|
},
|
|
1314
|
-
children:
|
|
1301
|
+
children: E
|
|
1315
1302
|
}
|
|
1316
|
-
) }) : (console.warn(`Child with id "${
|
|
1303
|
+
) }) : (console.warn(`Child with id "${n}" not found`), null);
|
|
1317
1304
|
}
|
|
1318
|
-
const
|
|
1319
|
-
(
|
|
1305
|
+
const f = Array.isArray(o) ? o : [o], { scrollableChildren: S, nonScrollableChildren: O } = f.reduce(
|
|
1306
|
+
(E, H) => {
|
|
1320
1307
|
const G = H.props.nodeData.type === "container:top-bar" ? "nonScrollableChildren" : "scrollableChildren";
|
|
1321
|
-
return
|
|
1308
|
+
return E[G].push(H), E;
|
|
1322
1309
|
},
|
|
1323
1310
|
{
|
|
1324
1311
|
scrollableChildren: [],
|
|
@@ -1327,19 +1314,19 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1327
1314
|
);
|
|
1328
1315
|
let M = e.style?.layout?.mode;
|
|
1329
1316
|
if (!M && t === "01KASW494V02Y8P5JVWV5XK62X" && (console.log("🔧 PATCHING missing layout for page", t), M = "HORIZONTAL"), !M && o) {
|
|
1330
|
-
const
|
|
1317
|
+
const E = Array.isArray(o) ? o : [o];
|
|
1331
1318
|
let H = 0, U = 0;
|
|
1332
|
-
|
|
1333
|
-
const q =
|
|
1319
|
+
E.forEach((g) => {
|
|
1320
|
+
const q = g?.props?.nodeData?.style?.width;
|
|
1334
1321
|
q && (H += q, q < 99 && U++);
|
|
1335
1322
|
}), U > 0 && H >= 99 && (console.log(
|
|
1336
1323
|
`[PATCH] Detected HORIZONTAL WRAP layout for page ${t} (Partial width children: ${U}, Total width: ${H})`
|
|
1337
1324
|
), M = "HORIZONTAL", e.style || (e.style = {}), e.style.layout || (e.style.layout = {}), e.style.layout.mode = "HORIZONTAL", e.style.layout.flexWrap = "wrap", e.style.layout.primaryAxisAlignItems = "flex-start", e.style.layout.counterAxisAlignItems = "flex-start");
|
|
1338
1325
|
}
|
|
1339
1326
|
const j = M === "HORIZONTAL" ? "row" : "column", K = O.some(
|
|
1340
|
-
(
|
|
1327
|
+
(E) => E?.props?.nodeData?.type !== "container:background"
|
|
1341
1328
|
);
|
|
1342
|
-
return /* @__PURE__ */ p(ct.Provider, { value:
|
|
1329
|
+
return /* @__PURE__ */ p(ct.Provider, { value: z, children: /* @__PURE__ */ it(
|
|
1343
1330
|
"div",
|
|
1344
1331
|
{
|
|
1345
1332
|
style: {
|
|
@@ -1356,11 +1343,11 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1356
1343
|
columnGap: 0
|
|
1357
1344
|
} : {}
|
|
1358
1345
|
},
|
|
1359
|
-
ref:
|
|
1346
|
+
ref: l,
|
|
1360
1347
|
children: [
|
|
1361
1348
|
O.filter(
|
|
1362
|
-
(
|
|
1363
|
-
).map((
|
|
1349
|
+
(E) => E?.props?.nodeData?.type === "container:background"
|
|
1350
|
+
).map((E, H) => /* @__PURE__ */ p(
|
|
1364
1351
|
V.Provider,
|
|
1365
1352
|
{
|
|
1366
1353
|
value: {
|
|
@@ -1369,13 +1356,13 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1369
1356
|
height: i.height
|
|
1370
1357
|
}
|
|
1371
1358
|
},
|
|
1372
|
-
children:
|
|
1359
|
+
children: E
|
|
1373
1360
|
},
|
|
1374
1361
|
`bg-${H}`
|
|
1375
1362
|
)),
|
|
1376
1363
|
K && O.filter(
|
|
1377
|
-
(
|
|
1378
|
-
).map((
|
|
1364
|
+
(E) => E?.props?.nodeData?.type !== "container:background"
|
|
1365
|
+
).map((E, H) => /* @__PURE__ */ p(
|
|
1379
1366
|
V.Provider,
|
|
1380
1367
|
{
|
|
1381
1368
|
value: {
|
|
@@ -1384,7 +1371,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1384
1371
|
height: i.height
|
|
1385
1372
|
}
|
|
1386
1373
|
},
|
|
1387
|
-
children:
|
|
1374
|
+
children: E
|
|
1388
1375
|
},
|
|
1389
1376
|
`non-scroll-${H}`
|
|
1390
1377
|
)),
|
|
@@ -1406,18 +1393,18 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1406
1393
|
},
|
|
1407
1394
|
// Remove overflow: auto in horizontal mode as it causes height collapse
|
|
1408
1395
|
...j === "column" && { overflow: "auto" },
|
|
1409
|
-
...
|
|
1396
|
+
...L(e.style, {
|
|
1410
1397
|
debug: !1
|
|
1411
1398
|
})
|
|
1412
1399
|
},
|
|
1413
|
-
children:
|
|
1400
|
+
children: S
|
|
1414
1401
|
}
|
|
1415
1402
|
) })
|
|
1416
1403
|
]
|
|
1417
1404
|
}
|
|
1418
1405
|
) });
|
|
1419
1406
|
}, Qt = {
|
|
1420
|
-
WebViewComponent:
|
|
1407
|
+
WebViewComponent: ft,
|
|
1421
1408
|
ColorComponent: gt,
|
|
1422
1409
|
GradientComponent: mt,
|
|
1423
1410
|
ImageComponent: yt,
|
|
@@ -1435,18 +1422,18 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1435
1422
|
BackgroundContainerComponent: Tt,
|
|
1436
1423
|
ContainerComponent: pt,
|
|
1437
1424
|
CompoundComponent: Pt,
|
|
1438
|
-
TopBarContainerComponent:
|
|
1425
|
+
TopBarContainerComponent: Wt,
|
|
1439
1426
|
DefaultLayerComponent: Ut,
|
|
1440
|
-
TabsMenuComponent:
|
|
1441
|
-
MenuSideComponent:
|
|
1427
|
+
TabsMenuComponent: Bt,
|
|
1428
|
+
MenuSideComponent: Lt,
|
|
1442
1429
|
SliderComponent: at,
|
|
1443
|
-
PageComponent:
|
|
1430
|
+
PageComponent: Rt,
|
|
1444
1431
|
// Type string mappings for dynamically loaded components
|
|
1445
|
-
"menu:side":
|
|
1446
|
-
"page:default":
|
|
1432
|
+
"menu:side": Lt,
|
|
1433
|
+
"page:default": Rt,
|
|
1447
1434
|
"container:background": Tt,
|
|
1448
1435
|
"container:default": pt,
|
|
1449
|
-
"container:top-bar":
|
|
1436
|
+
"container:top-bar": Wt,
|
|
1450
1437
|
"container:slider": at,
|
|
1451
1438
|
"component:text": Et,
|
|
1452
1439
|
"component:color": gt,
|
|
@@ -1458,7 +1445,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1458
1445
|
"component:stateful-set": dt,
|
|
1459
1446
|
"component:stateful-compound": Ft,
|
|
1460
1447
|
"component:slider": at,
|
|
1461
|
-
"component:webview":
|
|
1448
|
+
"component:webview": ft,
|
|
1462
1449
|
"component:lottie": wt,
|
|
1463
1450
|
"component:email-input": bt,
|
|
1464
1451
|
"component:text-input": It,
|
|
@@ -1466,7 +1453,7 @@ const ct = I.createContext({}), V = I.createContext(
|
|
|
1466
1453
|
"component:select-input": vt,
|
|
1467
1454
|
"component:image-input": St,
|
|
1468
1455
|
"component:hidden-input": Ct,
|
|
1469
|
-
"component:tabs-menu":
|
|
1456
|
+
"component:tabs-menu": Bt,
|
|
1470
1457
|
ContainerSliderComponent: at
|
|
1471
1458
|
};
|
|
1472
1459
|
export {
|