@bravostudioai/react 0.1.31 → 0.1.34
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/download.js +22 -39
- package/dist/cli/commands/download.js.map +1 -1
- package/dist/cli/commands/generate.js +130 -147
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli.js +21 -24
- package/dist/cli.js.map +1 -1
- package/dist/codegen/generator.js +126 -125
- package/dist/codegen/generator.js.map +1 -1
- package/dist/codegen/parser.js +256 -593
- package/dist/codegen/parser.js.map +1 -1
- package/dist/codegen/propQualification.js +117 -0
- package/dist/codegen/propQualification.js.map +1 -0
- package/dist/components/DynamicComponent.js.map +1 -1
- package/dist/components/EncoreApp.js +156 -265
- package/dist/components/EncoreApp.js.map +1 -1
- package/dist/components/EncoreContextProviders.js +24 -0
- package/dist/components/EncoreContextProviders.js.map +1 -0
- package/dist/components.js +179 -174
- package/dist/components.js.map +1 -1
- package/dist/hooks/useFontLoader.js +41 -0
- package/dist/hooks/useFontLoader.js.map +1 -0
- package/dist/hooks/usePusherUpdates.js +41 -45
- package/dist/hooks/usePusherUpdates.js.map +1 -1
- package/dist/hooks/useRepeatingContainers.js +79 -0
- package/dist/hooks/useRepeatingContainers.js.map +1 -0
- package/dist/index.js +13 -14
- package/dist/index.js.map +1 -1
- package/dist/lib/dataPatching.js +24 -0
- package/dist/lib/dataPatching.js.map +1 -0
- package/dist/lib/dynamicModules.js +44 -45
- package/dist/lib/dynamicModules.js.map +1 -1
- package/dist/lib/fetcher.js +6 -13
- package/dist/lib/fetcher.js.map +1 -1
- package/dist/lib/logger.js +35 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/moduleRegistry.js +9 -8
- package/dist/lib/moduleRegistry.js.map +1 -1
- package/dist/src/cli/commands/download.d.ts +1 -1
- package/dist/src/cli/commands/download.d.ts.map +1 -1
- package/dist/src/cli/commands/generate.d.ts +1 -1
- package/dist/src/cli/commands/generate.d.ts.map +1 -1
- package/dist/src/codegen/generator.d.ts +75 -1
- package/dist/src/codegen/generator.d.ts.map +1 -1
- package/dist/src/codegen/parser.d.ts +39 -0
- package/dist/src/codegen/parser.d.ts.map +1 -1
- package/dist/src/codegen/propQualification.d.ts +42 -0
- package/dist/src/codegen/propQualification.d.ts.map +1 -0
- package/dist/src/components/DynamicComponent.d.ts +1 -1
- package/dist/src/components/DynamicComponent.d.ts.map +1 -1
- package/dist/src/components/EncoreApp.d.ts +58 -3
- package/dist/src/components/EncoreApp.d.ts.map +1 -1
- package/dist/src/components/EncoreContextProviders.d.ts +34 -0
- package/dist/src/components/EncoreContextProviders.d.ts.map +1 -0
- package/dist/src/components.d.ts.map +1 -1
- package/dist/src/hooks/useFontLoader.d.ts +17 -0
- package/dist/src/hooks/useFontLoader.d.ts.map +1 -0
- package/dist/src/hooks/usePusherUpdates.d.ts.map +1 -1
- package/dist/src/hooks/useRepeatingContainers.d.ts +31 -0
- package/dist/src/hooks/useRepeatingContainers.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/dataPatching.d.ts +18 -0
- package/dist/src/lib/dataPatching.d.ts.map +1 -0
- package/dist/src/lib/dynamicModules.d.ts.map +1 -1
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/logger.d.ts +33 -0
- package/dist/src/lib/logger.d.ts.map +1 -0
- package/dist/src/lib/moduleRegistry.d.ts.map +1 -1
- package/dist/src/stores/useEncoreState.d.ts +43 -1
- package/dist/src/stores/useEncoreState.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/stores/useEncoreState.js.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +2 -1
- package/src/cli/commands/download.ts +8 -28
- package/src/cli/commands/generate.ts +44 -45
- package/src/cli/index.ts +49 -32
- package/src/codegen/generator.ts +6 -3
- package/src/components/DynamicComponent.tsx +1 -1
- package/src/components/EncoreApp.tsx +111 -21
- package/src/hooks/useRepeatingContainers.ts +1 -1
- package/src/version.ts +1 -1
package/dist/codegen/parser.js
CHANGED
|
@@ -1,720 +1,383 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { qualifyPropNames as E } from "./propQualification.js";
|
|
2
|
+
function g(i) {
|
|
3
|
+
const c = i.replace(/[^a-zA-Z0-9\s]/g, "").trim();
|
|
4
|
+
return c ? c.split(/\s+/).map((s, y) => {
|
|
5
|
+
if (!s) return "";
|
|
6
|
+
const t = s === s.toUpperCase() && s.length > 1 ? s.toLowerCase() : s, o = t.charAt(0), r = t.slice(1);
|
|
7
|
+
return y === 0 ? o.toLowerCase() + r : o.toUpperCase() + r;
|
|
7
8
|
}).join("").replace(/^[0-9]/, "_$&") : "item";
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
if (
|
|
12
|
-
return
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
(
|
|
16
|
-
).map((
|
|
10
|
+
function F(i, c) {
|
|
11
|
+
const s = g(i);
|
|
12
|
+
if (c.length === 0)
|
|
13
|
+
return s;
|
|
14
|
+
const y = c.filter((r) => r && r.trim()).reverse();
|
|
15
|
+
return y.length === 0 ? s : y.map(
|
|
16
|
+
(r) => g(r)
|
|
17
|
+
).map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join("") + s;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
19
|
+
function S(i, c) {
|
|
20
|
+
if (c.length === 0)
|
|
20
21
|
return [];
|
|
21
|
-
let
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
...
|
|
22
|
+
let s = 0;
|
|
23
|
+
const y = Math.min(
|
|
24
|
+
i.length,
|
|
25
|
+
...c.map((o) => o.length)
|
|
25
26
|
);
|
|
26
|
-
for (let
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
|
|
27
|
+
for (let o = 0; o < y; o++) {
|
|
28
|
+
const r = i[o];
|
|
29
|
+
if (c.every((f) => f[o] === r))
|
|
30
|
+
s++;
|
|
30
31
|
else
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
33
|
-
const t =
|
|
34
|
-
for (let
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
if (
|
|
34
|
+
const t = i.slice(s);
|
|
35
|
+
for (let o = 1; o <= t.length; o++) {
|
|
36
|
+
const r = t.slice(0, o);
|
|
37
|
+
if (c.every((f) => {
|
|
38
|
+
if (f.length < s + o)
|
|
38
39
|
return !0;
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const a = f.slice(
|
|
41
|
+
s,
|
|
42
|
+
s + o
|
|
42
43
|
);
|
|
43
|
-
return !
|
|
44
|
+
return !W(r, a);
|
|
44
45
|
}))
|
|
45
|
-
return
|
|
46
|
+
return r;
|
|
46
47
|
}
|
|
47
48
|
return t;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
50
|
+
function W(i, c) {
|
|
51
|
+
return i.length !== c.length ? !1 : i.every((s, y) => s === c[y]);
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
53
|
+
function P(i, c) {
|
|
54
|
+
return i === "component:image" || i === "component:text" || i?.startsWith("component:input-") ? "string" : "any";
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
56
|
+
function j(i) {
|
|
57
|
+
return i === "component:image" ? "imageUrl" : i === "component:text" ? "text" : "value";
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
function
|
|
59
|
+
function x(i) {
|
|
60
|
+
const c = [];
|
|
61
|
+
function s(t, o = []) {
|
|
61
62
|
if (!(!t || typeof t != "object")) {
|
|
62
63
|
if (t.type === "container:slider") {
|
|
63
|
-
const
|
|
64
|
+
const r = {
|
|
64
65
|
id: t.id,
|
|
65
66
|
name: t.name || "Slider",
|
|
66
67
|
arrayContainer: null
|
|
67
68
|
};
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
71
|
-
if (Array.isArray(
|
|
72
|
-
|
|
69
|
+
let p = null;
|
|
70
|
+
const f = (a) => {
|
|
71
|
+
if (!p && !(!a || typeof a != "object")) {
|
|
72
|
+
if (Array.isArray(a.tags) && (a.tags.includes("encore:data:array") || a.tags.includes("bravo:data:array"))) {
|
|
73
|
+
p = a;
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
+
a.body && Array.isArray(a.body) && a.body.forEach(f), a.containers && Array.isArray(a.containers) && a.containers.forEach(f), a.components && Array.isArray(a.components) && a.components.forEach(f);
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
|
-
if (t.containers && Array.isArray(t.containers) && t.containers.forEach(
|
|
79
|
-
const
|
|
80
|
-
let
|
|
81
|
-
const
|
|
82
|
-
if (!
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
id:
|
|
87
|
-
name:
|
|
88
|
-
type:
|
|
89
|
-
tags:
|
|
90
|
-
propName:
|
|
79
|
+
if (t.containers && Array.isArray(t.containers) && t.containers.forEach(f), !p && t.components && Array.isArray(t.components) && t.components.forEach(f), p) {
|
|
80
|
+
const a = p;
|
|
81
|
+
let u = [];
|
|
82
|
+
const n = [], l = (e, b = []) => {
|
|
83
|
+
if (!e || typeof e != "object") return;
|
|
84
|
+
if (e.type === "component:image" && n.push(e), Array.isArray(e.tags) && (e.tags.includes("encore:data") || e.tags.includes("bravo:data"))) {
|
|
85
|
+
const A = g(e.name || "item"), C = P(e.type, e.name);
|
|
86
|
+
u.push({
|
|
87
|
+
id: e.id,
|
|
88
|
+
name: e.name || "Unnamed",
|
|
89
|
+
type: e.type,
|
|
90
|
+
tags: e.tags || [],
|
|
91
|
+
propName: A,
|
|
91
92
|
// Will be qualified later if needed
|
|
92
|
-
propType:
|
|
93
|
+
propType: C,
|
|
93
94
|
// Store parent path for later qualification
|
|
94
|
-
_parentPath: [...
|
|
95
|
+
_parentPath: [...b]
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
const
|
|
100
|
-
|
|
98
|
+
const h = [...b];
|
|
99
|
+
if (e.name && (e.type?.startsWith("container:") || e.type?.startsWith("component:"))) {
|
|
100
|
+
const A = e.name.trim(), C = /^frame\s*\d*$/i.test(A) || A.toUpperCase() === "FRAME";
|
|
101
|
+
A && !C && h.push(e.name);
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
-
(
|
|
104
|
-
),
|
|
105
|
-
(
|
|
106
|
-
),
|
|
107
|
-
(
|
|
103
|
+
e.body && Array.isArray(e.body) && e.body.forEach(
|
|
104
|
+
(A) => l(A, h)
|
|
105
|
+
), e.containers && Array.isArray(e.containers) && e.containers.forEach(
|
|
106
|
+
(A) => l(A, h)
|
|
107
|
+
), e.components && Array.isArray(e.components) && e.components.forEach(
|
|
108
|
+
(A) => l(A, h)
|
|
108
109
|
);
|
|
109
110
|
};
|
|
110
|
-
if (
|
|
111
|
-
(
|
|
112
|
-
), !
|
|
113
|
-
(
|
|
114
|
-
) &&
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
id:
|
|
118
|
-
name:
|
|
119
|
-
type:
|
|
120
|
-
tags:
|
|
121
|
-
propName:
|
|
111
|
+
if (a.components && Array.isArray(a.components) && a.components.forEach(
|
|
112
|
+
(e) => l(e, [])
|
|
113
|
+
), !u.some(
|
|
114
|
+
(e) => e.type === "component:image"
|
|
115
|
+
) && n.length > 0) {
|
|
116
|
+
const e = n[0], h = (e.name || "image").toLowerCase().includes("image") ? "imageUrl" : g(e.name || "image");
|
|
117
|
+
u.push({
|
|
118
|
+
id: e.id,
|
|
119
|
+
name: e.name || "Image",
|
|
120
|
+
type: e.type,
|
|
121
|
+
tags: e.tags || [],
|
|
122
|
+
propName: h,
|
|
122
123
|
// Will be qualified later if needed
|
|
123
124
|
propType: "string",
|
|
124
125
|
// imageUrl is always string
|
|
125
126
|
_parentPath: []
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
s.forEach((b) => {
|
|
136
|
-
const _ = s.filter((E) => E.id !== b.id).map((E) => E._parentPath || []), N = L(
|
|
137
|
-
b._parentPath || [],
|
|
138
|
-
_
|
|
139
|
-
);
|
|
140
|
-
b.propName = U(
|
|
141
|
-
b.name || "item",
|
|
142
|
-
N
|
|
143
|
-
);
|
|
144
|
-
});
|
|
145
|
-
let g = !0, P = 0;
|
|
146
|
-
const v = 10;
|
|
147
|
-
for (; g && P < v; ) {
|
|
148
|
-
P++;
|
|
149
|
-
const b = /* @__PURE__ */ new Map();
|
|
150
|
-
s.forEach((_) => {
|
|
151
|
-
b.has(_.propName) || b.set(_.propName, []), b.get(_.propName).push(_);
|
|
152
|
-
}), g = !1, b.forEach((_, N) => {
|
|
153
|
-
_.length > 1 && (g = !0, _.forEach((E) => {
|
|
154
|
-
const x = E._parentPath || [], W = _.filter((M) => M.id !== E.id).map((M) => M._parentPath || []);
|
|
155
|
-
let S = 0;
|
|
156
|
-
const I = Math.min(
|
|
157
|
-
x.length,
|
|
158
|
-
...W.map((M) => M.length)
|
|
159
|
-
);
|
|
160
|
-
for (let M = 0; M < I; M++) {
|
|
161
|
-
const w = x[M];
|
|
162
|
-
if (W.every((z) => z[M] === w))
|
|
163
|
-
S++;
|
|
164
|
-
else
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
const q = x.slice(S);
|
|
168
|
-
let k = !1;
|
|
169
|
-
for (let M = 1; M <= q.length; M++) {
|
|
170
|
-
const w = q.slice(
|
|
171
|
-
0,
|
|
172
|
-
M
|
|
173
|
-
), j = U(
|
|
174
|
-
E.name || "item",
|
|
175
|
-
w
|
|
176
|
-
);
|
|
177
|
-
if (h.every((F) => {
|
|
178
|
-
if (F.id === E.id) return !0;
|
|
179
|
-
if (_.some(($) => $.id === F.id)) {
|
|
180
|
-
const $ = F._parentPath || [], R = Math.min(
|
|
181
|
-
S,
|
|
182
|
-
$.length
|
|
183
|
-
), T = $.slice(
|
|
184
|
-
R
|
|
185
|
-
).slice(0, M), Z = U(
|
|
186
|
-
F.name || "item",
|
|
187
|
-
T
|
|
188
|
-
);
|
|
189
|
-
return j !== Z;
|
|
190
|
-
}
|
|
191
|
-
return j !== F.propName;
|
|
192
|
-
})) {
|
|
193
|
-
E.propName = j, k = !0;
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
k || (E.propName = U(
|
|
198
|
-
E.name || "item",
|
|
199
|
-
q.length > 0 ? q : []
|
|
200
|
-
));
|
|
201
|
-
}));
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
const d = /* @__PURE__ */ new Map();
|
|
205
|
-
s.forEach((b) => {
|
|
206
|
-
d.has(b.propName) || d.set(b.propName, []), d.get(b.propName).push(b);
|
|
207
|
-
}), d.forEach(
|
|
208
|
-
(b, _) => {
|
|
209
|
-
if (b.length > 1 && b.every((E) => {
|
|
210
|
-
const x = E._parentPath || [];
|
|
211
|
-
return b.every((W) => {
|
|
212
|
-
if (W.id === E.id) return !0;
|
|
213
|
-
const S = W._parentPath || [];
|
|
214
|
-
return Q(x, S);
|
|
215
|
-
});
|
|
216
|
-
})) {
|
|
217
|
-
let E = 0;
|
|
218
|
-
b.forEach((x) => {
|
|
219
|
-
E > 0 && (x.propName = `${_}${E + 1}`), E++;
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
), s.forEach((b) => {
|
|
224
|
-
delete b._parentPath;
|
|
225
|
-
});
|
|
226
|
-
}), o.length > 0) {
|
|
227
|
-
const l = (o[0].name || "").toLowerCase();
|
|
228
|
-
h = h.filter((g) => {
|
|
229
|
-
if (g.type === "component:image") return !0;
|
|
230
|
-
if (g.type === "component:color") {
|
|
231
|
-
const P = (g.name || "").toLowerCase();
|
|
232
|
-
if (l.includes(P) || P.includes("image"))
|
|
129
|
+
if (E(u), n.length > 0) {
|
|
130
|
+
const b = (n[0].name || "").toLowerCase();
|
|
131
|
+
u = u.filter((h) => {
|
|
132
|
+
if (h.type === "component:image") return !0;
|
|
133
|
+
if (h.type === "component:color") {
|
|
134
|
+
const A = (h.name || "").toLowerCase();
|
|
135
|
+
if (b.includes(A) || A.includes("image"))
|
|
233
136
|
return !1;
|
|
234
137
|
}
|
|
235
138
|
return !0;
|
|
236
139
|
});
|
|
237
140
|
}
|
|
238
|
-
|
|
239
|
-
id:
|
|
240
|
-
name:
|
|
241
|
-
propName:
|
|
242
|
-
components:
|
|
141
|
+
r.arrayContainer = {
|
|
142
|
+
id: a.id,
|
|
143
|
+
name: a.name || "Item",
|
|
144
|
+
propName: g(a.name || "items"),
|
|
145
|
+
components: u
|
|
243
146
|
};
|
|
244
147
|
}
|
|
245
|
-
|
|
148
|
+
c.push(r);
|
|
246
149
|
}
|
|
247
|
-
t.body && Array.isArray(t.body) && t.body.forEach((
|
|
248
|
-
(
|
|
150
|
+
t.body && Array.isArray(t.body) && t.body.forEach((r) => s(r, [...o, "body"])), t.containers && Array.isArray(t.containers) && t.containers.forEach(
|
|
151
|
+
(r) => s(r, [...o, "containers"])
|
|
249
152
|
), t.components && Array.isArray(t.components) && t.components.forEach(
|
|
250
|
-
(
|
|
153
|
+
(r) => s(r, [...o, "components"])
|
|
251
154
|
);
|
|
252
155
|
}
|
|
253
156
|
}
|
|
254
|
-
const
|
|
255
|
-
return Array.isArray(
|
|
157
|
+
const y = i.data?.body || i.body || i.data?.body || [];
|
|
158
|
+
return Array.isArray(y) && y.length > 0 && y.forEach((t) => s(t)), c;
|
|
256
159
|
}
|
|
257
|
-
function
|
|
258
|
-
const
|
|
259
|
-
function
|
|
260
|
-
!
|
|
160
|
+
function N(i) {
|
|
161
|
+
const c = [], s = /* @__PURE__ */ new Set();
|
|
162
|
+
function y(r) {
|
|
163
|
+
!r || typeof r != "object" || (r.type === "container:slider" && s.add(r.id), r.body && Array.isArray(r.body) && r.body.forEach(y), r.containers && Array.isArray(r.containers) && r.containers.forEach(y));
|
|
261
164
|
}
|
|
262
|
-
function t(
|
|
263
|
-
if (!
|
|
264
|
-
if (Array.isArray(
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
id:
|
|
268
|
-
name:
|
|
269
|
-
type:
|
|
270
|
-
tags:
|
|
271
|
-
propName:
|
|
165
|
+
function t(r, p, f = []) {
|
|
166
|
+
if (!r || typeof r != "object" || p && s.has(p)) return;
|
|
167
|
+
if (Array.isArray(r.tags) && (r.tags.includes("encore:data") || r.tags.includes("bravo:data")) && (r.type === "component:text" || r.type === "component:image")) {
|
|
168
|
+
const n = g(r.name || "item"), l = P(r.type, r.name);
|
|
169
|
+
c.push({
|
|
170
|
+
id: r.id,
|
|
171
|
+
name: r.name || "Unnamed",
|
|
172
|
+
type: r.type,
|
|
173
|
+
tags: r.tags || [],
|
|
174
|
+
propName: n,
|
|
272
175
|
// Will be qualified later if needed
|
|
273
|
-
propType:
|
|
176
|
+
propType: l,
|
|
274
177
|
// Store parent path for later qualification
|
|
275
|
-
_parentPath: [...
|
|
178
|
+
_parentPath: [...f]
|
|
276
179
|
});
|
|
277
180
|
}
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
const
|
|
281
|
-
|
|
181
|
+
const a = [...f];
|
|
182
|
+
if (r.name && (r.type?.startsWith("container:") || r.type?.startsWith("component:"))) {
|
|
183
|
+
const n = r.name.trim(), l = /^frame\s*\d*$/i.test(n) || n.toUpperCase() === "FRAME";
|
|
184
|
+
n && !l && a.push(r.name);
|
|
282
185
|
}
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
(
|
|
286
|
-
),
|
|
287
|
-
(
|
|
288
|
-
),
|
|
289
|
-
(
|
|
186
|
+
const u = r.id;
|
|
187
|
+
r.body && Array.isArray(r.body) && r.body.forEach(
|
|
188
|
+
(n) => t(n, u, a)
|
|
189
|
+
), r.containers && Array.isArray(r.containers) && r.containers.forEach(
|
|
190
|
+
(n) => t(n, u, a)
|
|
191
|
+
), r.components && Array.isArray(r.components) && r.components.forEach(
|
|
192
|
+
(n) => t(n, u, a)
|
|
290
193
|
);
|
|
291
194
|
}
|
|
292
|
-
const
|
|
293
|
-
Array.isArray(
|
|
294
|
-
const a = /* @__PURE__ */ new Map();
|
|
295
|
-
return f.forEach((e) => {
|
|
296
|
-
const y = e, r = e.propName;
|
|
297
|
-
a.has(r) || a.set(r, []), a.get(r).push(y);
|
|
298
|
-
}), a.forEach((e, y) => {
|
|
299
|
-
if (e.length === 1)
|
|
300
|
-
return;
|
|
301
|
-
e.forEach((i) => {
|
|
302
|
-
const A = e.filter((l) => l.id !== i.id).map((l) => l._parentPath || []), s = L(
|
|
303
|
-
i._parentPath || [],
|
|
304
|
-
A
|
|
305
|
-
);
|
|
306
|
-
i.propName = U(
|
|
307
|
-
i.name || "item",
|
|
308
|
-
s
|
|
309
|
-
);
|
|
310
|
-
});
|
|
311
|
-
let r = !0, h = 0;
|
|
312
|
-
const o = 10;
|
|
313
|
-
for (; r && h < o; ) {
|
|
314
|
-
h++;
|
|
315
|
-
const i = /* @__PURE__ */ new Map();
|
|
316
|
-
e.forEach((A) => {
|
|
317
|
-
i.has(A.propName) || i.set(A.propName, []), i.get(A.propName).push(A);
|
|
318
|
-
}), r = !1, i.forEach((A, s) => {
|
|
319
|
-
A.length > 1 && (r = !0, A.forEach((l) => {
|
|
320
|
-
const g = l._parentPath || [], P = A.filter((N) => N.id !== l.id).map((N) => N._parentPath || []);
|
|
321
|
-
let v = 0;
|
|
322
|
-
const d = Math.min(
|
|
323
|
-
g.length,
|
|
324
|
-
...P.map((N) => N.length)
|
|
325
|
-
);
|
|
326
|
-
for (let N = 0; N < d; N++) {
|
|
327
|
-
const E = g[N];
|
|
328
|
-
if (P.every((W) => W[N] === E))
|
|
329
|
-
v++;
|
|
330
|
-
else
|
|
331
|
-
break;
|
|
332
|
-
}
|
|
333
|
-
const b = g.slice(v);
|
|
334
|
-
let _ = !1;
|
|
335
|
-
for (let N = 1; N <= b.length; N++) {
|
|
336
|
-
const E = b.slice(0, N), x = U(
|
|
337
|
-
l.name || "item",
|
|
338
|
-
E
|
|
339
|
-
);
|
|
340
|
-
if (f.every((S) => {
|
|
341
|
-
if (S.id === l.id) return !0;
|
|
342
|
-
if (A.some((I) => I.id === S.id)) {
|
|
343
|
-
const I = S._parentPath || [], q = Math.min(
|
|
344
|
-
v,
|
|
345
|
-
I.length
|
|
346
|
-
), M = I.slice(
|
|
347
|
-
q
|
|
348
|
-
).slice(
|
|
349
|
-
0,
|
|
350
|
-
N
|
|
351
|
-
), w = U(
|
|
352
|
-
S.name || "item",
|
|
353
|
-
M
|
|
354
|
-
);
|
|
355
|
-
return x !== w;
|
|
356
|
-
}
|
|
357
|
-
return x !== S.propName;
|
|
358
|
-
})) {
|
|
359
|
-
l.propName = x, _ = !0;
|
|
360
|
-
break;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
_ || (l.propName = U(
|
|
364
|
-
l.name || "item",
|
|
365
|
-
g
|
|
366
|
-
));
|
|
367
|
-
}));
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
const u = /* @__PURE__ */ new Map();
|
|
371
|
-
e.forEach((i) => {
|
|
372
|
-
u.has(i.propName) || u.set(i.propName, []), u.get(i.propName).push(i);
|
|
373
|
-
}), u.forEach((i, A) => {
|
|
374
|
-
if (i.length > 1 && i.every((l) => {
|
|
375
|
-
const g = l._parentPath || [];
|
|
376
|
-
return i.every((P) => {
|
|
377
|
-
if (P.id === l.id) return !0;
|
|
378
|
-
const v = P._parentPath || [];
|
|
379
|
-
return Q(g, v);
|
|
380
|
-
});
|
|
381
|
-
})) {
|
|
382
|
-
let l = 0;
|
|
383
|
-
i.forEach((g) => {
|
|
384
|
-
l > 0 && (g.propName = `${A}${l + 1}`), l++;
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
}), e.forEach((i) => {
|
|
388
|
-
delete i._parentPath;
|
|
389
|
-
});
|
|
390
|
-
}), f;
|
|
195
|
+
const o = i.data?.body || i.body || i.data?.body || [];
|
|
196
|
+
return Array.isArray(o) && o.length > 0 && (o.forEach(y), o.forEach((r) => t(r))), E(c), c;
|
|
391
197
|
}
|
|
392
|
-
function
|
|
393
|
-
const
|
|
394
|
-
function
|
|
198
|
+
function d(i) {
|
|
199
|
+
const c = /* @__PURE__ */ new Map();
|
|
200
|
+
function s(t) {
|
|
395
201
|
if (!(!t || typeof t != "object")) {
|
|
396
202
|
if (t.type === "component:input-stateful-set" && Array.isArray(t.tags)) {
|
|
397
|
-
const
|
|
398
|
-
(
|
|
203
|
+
const o = t.tags.find(
|
|
204
|
+
(r) => r.startsWith("input-group:")
|
|
399
205
|
);
|
|
400
|
-
if (
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
groupName:
|
|
406
|
-
groupType:
|
|
206
|
+
if (o) {
|
|
207
|
+
const r = o.split(":");
|
|
208
|
+
if (r.length >= 3) {
|
|
209
|
+
const p = r[1], f = r[2];
|
|
210
|
+
c.has(f) || c.set(f, {
|
|
211
|
+
groupName: f,
|
|
212
|
+
groupType: p,
|
|
407
213
|
elements: []
|
|
408
|
-
}),
|
|
214
|
+
}), c.get(f).elements.push({
|
|
409
215
|
id: t.id,
|
|
410
216
|
name: t.name || "Unnamed"
|
|
411
217
|
});
|
|
412
218
|
}
|
|
413
219
|
}
|
|
414
220
|
}
|
|
415
|
-
t.body && Array.isArray(t.body) && t.body.forEach(
|
|
221
|
+
t.body && Array.isArray(t.body) && t.body.forEach(s), t.containers && Array.isArray(t.containers) && t.containers.forEach(s), t.components && Array.isArray(t.components) && t.components.forEach(s);
|
|
416
222
|
}
|
|
417
223
|
}
|
|
418
|
-
const
|
|
419
|
-
return Array.isArray(
|
|
224
|
+
const y = i.data?.body || i.body || i.data?.body || [];
|
|
225
|
+
return Array.isArray(y) && y.length > 0 && y.forEach((t) => s(t)), Array.from(c.values());
|
|
420
226
|
}
|
|
421
|
-
function
|
|
422
|
-
const
|
|
423
|
-
function
|
|
227
|
+
function M(i) {
|
|
228
|
+
const c = [];
|
|
229
|
+
function s(t, o) {
|
|
424
230
|
if (!t || typeof t != "object") return;
|
|
425
|
-
const
|
|
426
|
-
let
|
|
427
|
-
function
|
|
428
|
-
if (!(!
|
|
429
|
-
if (Array.isArray(
|
|
430
|
-
|
|
231
|
+
const r = t.type?.startsWith("container:") || t.type === "container:default", p = t.name?.toLowerCase().includes("form") || Array.isArray(t.tags) && t.tags.includes("form");
|
|
232
|
+
let f = !1, a;
|
|
233
|
+
function u(n) {
|
|
234
|
+
if (!(!n || typeof n != "object")) {
|
|
235
|
+
if (Array.isArray(n.tags) && (n.tags.includes("action:submit") || n.tags.includes("submit"))) {
|
|
236
|
+
f = !0, a = n.id;
|
|
431
237
|
return;
|
|
432
238
|
}
|
|
433
|
-
if (
|
|
434
|
-
|
|
239
|
+
if (n.actions?.tap?.action === "submit") {
|
|
240
|
+
f = !0, a = n.id;
|
|
435
241
|
return;
|
|
436
242
|
}
|
|
437
|
-
|
|
243
|
+
n.components && Array.isArray(n.components) && n.components.forEach(u), n.body && Array.isArray(n.body) && n.body.forEach(u);
|
|
438
244
|
}
|
|
439
245
|
}
|
|
440
|
-
if (
|
|
441
|
-
const
|
|
442
|
-
if (!
|
|
443
|
-
if (
|
|
444
|
-
const
|
|
445
|
-
|
|
446
|
-
id:
|
|
447
|
-
name:
|
|
448
|
-
type:
|
|
449
|
-
propName:
|
|
246
|
+
if (r && (p || o === void 0) && u(t), r && (f || p)) {
|
|
247
|
+
const n = [], l = (m, e = []) => {
|
|
248
|
+
if (!m || typeof m != "object") return;
|
|
249
|
+
if (m.type?.startsWith("component:input-") || m.type === "component:input-text" || m.type === "component:input-image" || m.type === "component:input-email" || m.type === "component:input-password" || m.type === "component:input-select") {
|
|
250
|
+
const h = g(m.name || "Unnamed input");
|
|
251
|
+
n.push({
|
|
252
|
+
id: m.id,
|
|
253
|
+
name: m.name || "Unnamed input",
|
|
254
|
+
type: m.type,
|
|
255
|
+
propName: h,
|
|
450
256
|
// Will be qualified later if needed
|
|
451
|
-
_parentPath: [...
|
|
257
|
+
_parentPath: [...e]
|
|
452
258
|
// Store parent path for qualification
|
|
453
259
|
});
|
|
454
260
|
}
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
261
|
+
const b = [...e];
|
|
262
|
+
if (m.name && (m.type?.startsWith("container:") || m.type?.startsWith("component:"))) {
|
|
263
|
+
const h = m.name.trim(), A = /^frame\s*\d*$/i.test(h) || h.toUpperCase() === "FRAME";
|
|
264
|
+
h && !A && b.push(m.name);
|
|
459
265
|
}
|
|
460
|
-
|
|
461
|
-
(
|
|
462
|
-
),
|
|
266
|
+
m.components && Array.isArray(m.components) && m.components.forEach(
|
|
267
|
+
(h) => l(h, b)
|
|
268
|
+
), m.body && Array.isArray(m.body) && m.body.forEach((h) => l(h, b));
|
|
463
269
|
};
|
|
464
|
-
|
|
270
|
+
l(t, []), n.length > 0 && c.push({
|
|
465
271
|
formId: t.id,
|
|
466
272
|
formName: t.name || "Form",
|
|
467
|
-
submitButtonId:
|
|
468
|
-
inputs:
|
|
273
|
+
submitButtonId: a,
|
|
274
|
+
inputs: n
|
|
469
275
|
});
|
|
470
276
|
}
|
|
471
277
|
t.body && Array.isArray(t.body) && t.body.forEach(
|
|
472
|
-
(
|
|
278
|
+
(n) => s(n, r ? t : o)
|
|
473
279
|
), t.containers && Array.isArray(t.containers) && t.containers.forEach(
|
|
474
|
-
(
|
|
280
|
+
(n) => s(n, r ? t : o)
|
|
475
281
|
), t.components && Array.isArray(t.components) && t.components.forEach(
|
|
476
|
-
(
|
|
282
|
+
(n) => s(n, r ? t : o)
|
|
477
283
|
);
|
|
478
284
|
}
|
|
479
|
-
const
|
|
480
|
-
return Array.isArray(
|
|
285
|
+
const y = i.data?.body || i.body || i.data?.body || [];
|
|
286
|
+
return Array.isArray(y) && y.length > 0 && y.forEach((t) => s(t)), c;
|
|
481
287
|
}
|
|
482
|
-
function
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
288
|
+
function L(i, c) {
|
|
289
|
+
const s = [], y = /* @__PURE__ */ new Set();
|
|
290
|
+
c.forEach((r) => {
|
|
291
|
+
r.inputs.forEach((p) => {
|
|
292
|
+
y.add(p.id);
|
|
487
293
|
});
|
|
488
294
|
});
|
|
489
|
-
function t(
|
|
490
|
-
if (!
|
|
491
|
-
if (
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
id:
|
|
495
|
-
name:
|
|
496
|
-
propName:
|
|
497
|
-
_parentPath: [...
|
|
295
|
+
function t(r, p = []) {
|
|
296
|
+
if (!r || typeof r != "object") return;
|
|
297
|
+
if (r.type === "component:input-select" && !y.has(r.id)) {
|
|
298
|
+
const a = g(r.name || "selectInput");
|
|
299
|
+
s.push({
|
|
300
|
+
id: r.id,
|
|
301
|
+
name: r.name || "Select Input",
|
|
302
|
+
propName: a,
|
|
303
|
+
_parentPath: [...p]
|
|
498
304
|
});
|
|
499
305
|
}
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
|
|
306
|
+
const f = [...p];
|
|
307
|
+
if (r.name && (r.type?.startsWith("container:") || r.type?.startsWith("component:"))) {
|
|
308
|
+
const a = r.name.trim(), u = /^frame\s*\d*$/i.test(a) || a.toUpperCase() === "FRAME";
|
|
309
|
+
a && !u && f.push(r.name);
|
|
504
310
|
}
|
|
505
|
-
|
|
506
|
-
(
|
|
507
|
-
),
|
|
508
|
-
(
|
|
311
|
+
r.body && Array.isArray(r.body) && r.body.forEach((a) => t(a, f)), r.containers && Array.isArray(r.containers) && r.containers.forEach(
|
|
312
|
+
(a) => t(a, f)
|
|
313
|
+
), r.components && Array.isArray(r.components) && r.components.forEach(
|
|
314
|
+
(a) => t(a, f)
|
|
509
315
|
);
|
|
510
316
|
}
|
|
511
|
-
const
|
|
512
|
-
return Array.isArray(
|
|
317
|
+
const o = i.data?.body || i.body || i.data?.body || [];
|
|
318
|
+
return Array.isArray(o) && o.length > 0 && o.forEach((r) => t(r)), I(s), s;
|
|
513
319
|
}
|
|
514
|
-
function
|
|
515
|
-
|
|
516
|
-
c.forEach((n) => {
|
|
517
|
-
const p = n, t = n.propName;
|
|
518
|
-
f.has(t) || f.set(t, []), f.get(t).push(p);
|
|
519
|
-
}), f.forEach((n, p) => {
|
|
520
|
-
if (n.length === 1) {
|
|
521
|
-
delete n[0]._parentPath;
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
n.forEach((t) => {
|
|
525
|
-
const m = n.filter((e) => e.id !== t.id).map((e) => e._parentPath || []), a = L(
|
|
526
|
-
t._parentPath || [],
|
|
527
|
-
m
|
|
528
|
-
);
|
|
529
|
-
t.propName = U(
|
|
530
|
-
t.name || "input",
|
|
531
|
-
a
|
|
532
|
-
);
|
|
533
|
-
}), n.forEach((t) => {
|
|
534
|
-
delete t._parentPath;
|
|
535
|
-
});
|
|
536
|
-
});
|
|
320
|
+
function I(i) {
|
|
321
|
+
E(i);
|
|
537
322
|
}
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
function
|
|
323
|
+
function _(i) {
|
|
324
|
+
const c = [];
|
|
325
|
+
function s(t, o = []) {
|
|
541
326
|
if (!t || typeof t != "object") return;
|
|
542
|
-
const
|
|
543
|
-
if (
|
|
544
|
-
let
|
|
327
|
+
const r = Array.isArray(t.tags) && t.tags.some((a) => a.startsWith("action:")), p = t.actions && typeof t.actions == "object";
|
|
328
|
+
if (r || p) {
|
|
329
|
+
let a = "tap";
|
|
545
330
|
if (Array.isArray(t.tags)) {
|
|
546
|
-
const
|
|
547
|
-
(
|
|
331
|
+
const n = t.tags.find(
|
|
332
|
+
(l) => l.startsWith("action:")
|
|
548
333
|
);
|
|
549
|
-
|
|
334
|
+
n && (a = n.replace("action:", ""));
|
|
550
335
|
}
|
|
551
|
-
t.actions?.tap?.action && (
|
|
552
|
-
const
|
|
553
|
-
|
|
336
|
+
t.actions?.tap?.action && (a = t.actions.tap.action);
|
|
337
|
+
const u = g(t.name || "button");
|
|
338
|
+
c.push({
|
|
554
339
|
id: t.id,
|
|
555
340
|
name: t.name || "Button",
|
|
556
|
-
propName:
|
|
557
|
-
actionType:
|
|
558
|
-
_parentPath: [...
|
|
341
|
+
propName: u,
|
|
342
|
+
actionType: a,
|
|
343
|
+
_parentPath: [...o]
|
|
559
344
|
});
|
|
560
345
|
}
|
|
561
|
-
const
|
|
346
|
+
const f = [...o];
|
|
562
347
|
if (t.name && (t.type?.startsWith("container:") || t.type?.startsWith("component:"))) {
|
|
563
|
-
const
|
|
564
|
-
|
|
348
|
+
const a = t.name.trim(), u = /^frame\s*\d*$/i.test(a) || a.toUpperCase() === "FRAME";
|
|
349
|
+
a && !u && f.push(t.name);
|
|
565
350
|
}
|
|
566
|
-
t.body && Array.isArray(t.body) && t.body.forEach((
|
|
567
|
-
(
|
|
351
|
+
t.body && Array.isArray(t.body) && t.body.forEach((a) => s(a, f)), t.containers && Array.isArray(t.containers) && t.containers.forEach(
|
|
352
|
+
(a) => s(a, f)
|
|
568
353
|
), t.components && Array.isArray(t.components) && t.components.forEach(
|
|
569
|
-
(
|
|
354
|
+
(a) => s(a, f)
|
|
570
355
|
);
|
|
571
356
|
}
|
|
572
|
-
const
|
|
573
|
-
return Array.isArray(
|
|
357
|
+
const y = i.data?.body || i.body || i.data?.body || [];
|
|
358
|
+
return Array.isArray(y) && y.length > 0 && y.forEach((t) => s(t)), v(c), c;
|
|
574
359
|
}
|
|
575
|
-
function
|
|
576
|
-
|
|
577
|
-
c.forEach((n) => {
|
|
578
|
-
const p = n, t = n.propName;
|
|
579
|
-
f.has(t) || f.set(t, []), f.get(t).push(p);
|
|
580
|
-
}), f.forEach((n, p) => {
|
|
581
|
-
if (n.length === 1) {
|
|
582
|
-
delete n[0]._parentPath;
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
n.forEach((t) => {
|
|
586
|
-
const m = n.filter((e) => e.id !== t.id).map((e) => e._parentPath || []), a = L(
|
|
587
|
-
t._parentPath || [],
|
|
588
|
-
m
|
|
589
|
-
);
|
|
590
|
-
t.propName = U(
|
|
591
|
-
t.name || "button",
|
|
592
|
-
a
|
|
593
|
-
);
|
|
594
|
-
}), n.forEach((t) => {
|
|
595
|
-
delete t._parentPath;
|
|
596
|
-
});
|
|
597
|
-
});
|
|
360
|
+
function v(i) {
|
|
361
|
+
E(i);
|
|
598
362
|
}
|
|
599
|
-
function
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
n.forEach((t) => {
|
|
603
|
-
const m = t, a = t.propName;
|
|
604
|
-
p.has(a) || p.set(a, []), p.get(a).push(m);
|
|
605
|
-
}), p.forEach((t, m) => {
|
|
606
|
-
if (t.length === 1) {
|
|
607
|
-
delete t[0]._parentPath;
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
t.forEach((h) => {
|
|
611
|
-
const o = t.filter((i) => i.id !== h.id).map((i) => i._parentPath || []), u = L(
|
|
612
|
-
h._parentPath || [],
|
|
613
|
-
o
|
|
614
|
-
);
|
|
615
|
-
h.propName = U(
|
|
616
|
-
h.name || "input",
|
|
617
|
-
u
|
|
618
|
-
);
|
|
619
|
-
});
|
|
620
|
-
let a = !0, e = 0;
|
|
621
|
-
const y = 10;
|
|
622
|
-
for (; a && e < y; ) {
|
|
623
|
-
e++;
|
|
624
|
-
const h = /* @__PURE__ */ new Map();
|
|
625
|
-
t.forEach((o) => {
|
|
626
|
-
h.has(o.propName) || h.set(o.propName, []), h.get(o.propName).push(o);
|
|
627
|
-
}), a = !1, h.forEach((o, u) => {
|
|
628
|
-
o.length > 1 && (a = !0, o.forEach((i) => {
|
|
629
|
-
const A = i._parentPath || [], s = o.filter((d) => d.id !== i.id).map((d) => d._parentPath || []);
|
|
630
|
-
let l = 0;
|
|
631
|
-
const g = Math.min(
|
|
632
|
-
A.length,
|
|
633
|
-
...s.map((d) => d.length)
|
|
634
|
-
);
|
|
635
|
-
for (let d = 0; d < g; d++) {
|
|
636
|
-
const b = A[d];
|
|
637
|
-
if (s.every((N) => N[d] === b))
|
|
638
|
-
l++;
|
|
639
|
-
else
|
|
640
|
-
break;
|
|
641
|
-
}
|
|
642
|
-
const P = A.slice(l);
|
|
643
|
-
let v = !1;
|
|
644
|
-
for (let d = 1; d <= P.length; d++) {
|
|
645
|
-
const b = P.slice(
|
|
646
|
-
0,
|
|
647
|
-
d
|
|
648
|
-
), _ = U(
|
|
649
|
-
i.name || "input",
|
|
650
|
-
b
|
|
651
|
-
);
|
|
652
|
-
if (n.every((E) => {
|
|
653
|
-
if (E.id === i.id) return !0;
|
|
654
|
-
if (o.some((x) => x.id === E.id)) {
|
|
655
|
-
const x = E._parentPath || [], W = Math.min(
|
|
656
|
-
l,
|
|
657
|
-
x.length
|
|
658
|
-
), I = x.slice(
|
|
659
|
-
W
|
|
660
|
-
).slice(
|
|
661
|
-
0,
|
|
662
|
-
d
|
|
663
|
-
), q = U(
|
|
664
|
-
E.name || "input",
|
|
665
|
-
I
|
|
666
|
-
);
|
|
667
|
-
return _ !== q;
|
|
668
|
-
}
|
|
669
|
-
return _ !== E.propName;
|
|
670
|
-
})) {
|
|
671
|
-
i.propName = _, v = !0;
|
|
672
|
-
break;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
v || (i.propName = U(
|
|
676
|
-
i.name || "input",
|
|
677
|
-
P.length > 0 ? P : []
|
|
678
|
-
));
|
|
679
|
-
}));
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
const r = /* @__PURE__ */ new Map();
|
|
683
|
-
t.forEach((h) => {
|
|
684
|
-
r.has(h.propName) || r.set(h.propName, []), r.get(h.propName).push(h);
|
|
685
|
-
}), r.forEach((h, o) => {
|
|
686
|
-
if (h.length > 1 && h.every((i) => {
|
|
687
|
-
const A = i._parentPath || [];
|
|
688
|
-
return h.every((s) => {
|
|
689
|
-
if (s.id === i.id) return !0;
|
|
690
|
-
const l = s._parentPath || [];
|
|
691
|
-
return Q(A, l);
|
|
692
|
-
});
|
|
693
|
-
})) {
|
|
694
|
-
let i = 0;
|
|
695
|
-
h.forEach((A) => {
|
|
696
|
-
i > 0 && (A.propName = `${o}${i + 1}`), i++;
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
}), t.forEach((h) => {
|
|
700
|
-
delete h._parentPath;
|
|
701
|
-
});
|
|
702
|
-
});
|
|
363
|
+
function q(i) {
|
|
364
|
+
i.forEach((c) => {
|
|
365
|
+
E(c.inputs);
|
|
703
366
|
});
|
|
704
367
|
}
|
|
705
368
|
export {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
369
|
+
W as arraysEqual,
|
|
370
|
+
_ as findActionButtons,
|
|
371
|
+
M as findForms,
|
|
372
|
+
d as findInputGroups,
|
|
373
|
+
S as findMinimalDistinguishingPath,
|
|
374
|
+
x as findSlidersAndDataBindings,
|
|
375
|
+
N as findStandaloneComponents,
|
|
376
|
+
L as findStandaloneSelectInputs,
|
|
377
|
+
F as generateQualifiedPropName,
|
|
378
|
+
j as getComponentPropName,
|
|
379
|
+
P as getComponentPropType,
|
|
380
|
+
q as qualifyFormInputs,
|
|
381
|
+
g as sanitizePropName
|
|
719
382
|
};
|
|
720
383
|
//# sourceMappingURL=parser.js.map
|