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