@telia-ace/widget-core 1.0.21-experimental.9 → 1.0.21
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/component-resolver.d.ts +3 -4
- package/dist/index.js +408 -372
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var q = Object.defineProperty, z = Object.defineProperties;
|
|
2
|
+
var Q = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var H = Object.getOwnPropertySymbols;
|
|
4
|
+
var F = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var C = (n, t, e) => t in n ? q(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, x = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
7
|
+
F.call(t, e) && C(n, e, t[e]);
|
|
8
|
+
if (H)
|
|
9
|
+
for (var e of H(t))
|
|
10
|
+
G.call(t, e) && C(n, e, t[e]);
|
|
11
|
+
return n;
|
|
12
|
+
}, B = (n, t) => z(n, Q(t));
|
|
13
|
+
var u = (n, t, e) => (C(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
import { bootstrapImplementation as K, ConfigurationApi as U } from "@webprovisions/bootstrapping";
|
|
15
|
+
import { selectImplementations as W, createConfigurationApi as Y, Environment as J, version as X, Implementation as Z, Plugin as tt, WidgetType as et } from "@webprovisions/platform";
|
|
16
|
+
import { uuid as k, Logger as $ } from "@telia-ace/widget-utilities";
|
|
17
|
+
class xt {
|
|
17
18
|
constructor(t) {
|
|
19
|
+
u(this, "events");
|
|
18
20
|
const { events: e } = t.get("$widget");
|
|
19
21
|
this.events = e.createChild(this);
|
|
20
22
|
}
|
|
21
|
-
action(t, e,
|
|
22
|
-
this.events.dispatch("data:action", { action: e, value:
|
|
23
|
+
action(t, e, s) {
|
|
24
|
+
this.events.dispatch("data:action", { action: e, value: s, target: t }, { bubbles: !0 });
|
|
23
25
|
}
|
|
24
26
|
subscribe(t, e) {
|
|
25
27
|
return this.events.subscribe(
|
|
26
28
|
"data:action",
|
|
27
|
-
(
|
|
29
|
+
(s, { action: i, value: c, target: o }) => t === o && e(t, i, c)
|
|
28
30
|
);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const wt = (n, t, e = {}) => K(
|
|
34
|
+
n,
|
|
35
|
+
n.bindings,
|
|
34
36
|
() => {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
if (typeof
|
|
38
|
-
return
|
|
39
|
-
if (
|
|
37
|
+
const s = n.container.get("$runtimecfg").map((i) => {
|
|
38
|
+
const c = i[0];
|
|
39
|
+
if (typeof c == "function")
|
|
40
|
+
return c;
|
|
41
|
+
if (W(c)(n))
|
|
40
42
|
return i[1];
|
|
41
43
|
}).filter((i) => !!i);
|
|
42
|
-
return (t ? [t] : []).concat(
|
|
44
|
+
return (t ? [t] : []).concat(s);
|
|
43
45
|
},
|
|
44
46
|
e.rootElementResolver || (() => document.body)
|
|
45
|
-
),
|
|
47
|
+
), st = (n) => {
|
|
46
48
|
const t = [];
|
|
47
49
|
return [
|
|
48
|
-
(
|
|
49
|
-
t.push(
|
|
50
|
+
(s, i) => {
|
|
51
|
+
t.push(n.subscribe(s, i));
|
|
50
52
|
},
|
|
51
53
|
() => {
|
|
52
|
-
t.forEach((
|
|
53
|
-
|
|
54
|
+
t.forEach((s) => {
|
|
55
|
+
s();
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
58
|
];
|
|
57
59
|
};
|
|
58
|
-
class
|
|
60
|
+
class R {
|
|
59
61
|
constructor(t, e = []) {
|
|
60
62
|
this.platform = t, this.rules = e;
|
|
61
63
|
}
|
|
@@ -69,30 +71,33 @@ class N {
|
|
|
69
71
|
return this.rules.push({ id: t }), this;
|
|
70
72
|
}
|
|
71
73
|
select() {
|
|
72
|
-
return new
|
|
74
|
+
return new nt(this.platform, this);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
|
-
class
|
|
76
|
-
constructor(t, e,
|
|
77
|
-
this
|
|
77
|
+
class V {
|
|
78
|
+
constructor(t, e, s) {
|
|
79
|
+
u(this, "actions");
|
|
80
|
+
u(this, "subscribe");
|
|
81
|
+
u(this, "unsubscribe");
|
|
82
|
+
this.platform = t, this.node = e, this.actions = new A(
|
|
78
83
|
t,
|
|
79
|
-
new
|
|
80
|
-
|
|
84
|
+
new R(t).withId(e.id),
|
|
85
|
+
s
|
|
81
86
|
);
|
|
82
|
-
const [i,
|
|
83
|
-
this.subscribe = i, this.unsubscribe =
|
|
87
|
+
const [i, c] = st(this.platform.events);
|
|
88
|
+
this.subscribe = i, this.unsubscribe = c;
|
|
84
89
|
}
|
|
85
90
|
properties(t) {
|
|
86
91
|
return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
|
|
87
92
|
}
|
|
88
93
|
context(t) {
|
|
89
|
-
return t && this.subscribe("components:context-changed", (e, { node:
|
|
90
|
-
|
|
94
|
+
return t && this.subscribe("components:context-changed", (e, { node: s }) => {
|
|
95
|
+
s === this.node && t(this.node.attributes.context);
|
|
91
96
|
}), this.node.attributes.context;
|
|
92
97
|
}
|
|
93
98
|
layout(t) {
|
|
94
|
-
return t && this.subscribe("components:layout-changed", (e, { node:
|
|
95
|
-
|
|
99
|
+
return t && this.subscribe("components:layout-changed", (e, { node: s }) => {
|
|
100
|
+
s === this.node && t(this.node.attributes.layout);
|
|
96
101
|
}), this.node.attributes.layout;
|
|
97
102
|
}
|
|
98
103
|
writeProperties(t, e) {
|
|
@@ -108,9 +113,11 @@ class H {
|
|
|
108
113
|
this.unsubscribe(), this.actions.dispose();
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
|
-
class
|
|
112
|
-
constructor(t, e,
|
|
113
|
-
this
|
|
116
|
+
class nt {
|
|
117
|
+
constructor(t, e, s = !0) {
|
|
118
|
+
u(this, "actions");
|
|
119
|
+
u(this, "removes", []);
|
|
120
|
+
this.platform = t, this.target = e, this.clearOnDispose = s, this.actions = new A(this.platform, this.target);
|
|
114
121
|
}
|
|
115
122
|
writeProperties(t, e) {
|
|
116
123
|
this.removes.push(
|
|
@@ -148,62 +155,63 @@ class et {
|
|
|
148
155
|
}), this.actions.dispose();
|
|
149
156
|
}
|
|
150
157
|
}
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
let
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
return Promise.resolve(
|
|
157
|
-
cancelled:
|
|
158
|
+
const it = (n, t, e) => {
|
|
159
|
+
const s = n.concat(), i = (c, o, h) => {
|
|
160
|
+
let l = !0;
|
|
161
|
+
if (s.length) {
|
|
162
|
+
const a = s.shift(), r = (p, d) => (l = !1, i(p, Object.assign({}, o, d), h));
|
|
163
|
+
return Promise.resolve(a(c, r, h)).then((p) => B(x({}, p), {
|
|
164
|
+
cancelled: l
|
|
158
165
|
}));
|
|
159
166
|
}
|
|
160
|
-
return Promise.resolve({ data:
|
|
167
|
+
return Promise.resolve({ data: c, cancelled: !1, options: o });
|
|
161
168
|
};
|
|
162
169
|
return i(t, {}, e);
|
|
163
170
|
};
|
|
164
|
-
class
|
|
165
|
-
constructor(t, e,
|
|
166
|
-
this
|
|
171
|
+
class A {
|
|
172
|
+
constructor(t, e, s) {
|
|
173
|
+
u(this, "subscriptions", []);
|
|
174
|
+
this.platform = t, this.target = e, this.ns = s, this.create = this.create.bind(this);
|
|
167
175
|
}
|
|
168
176
|
create(t, e = () => {
|
|
169
177
|
}) {
|
|
170
|
-
const
|
|
178
|
+
const s = {
|
|
171
179
|
key: t,
|
|
172
180
|
fn: e,
|
|
173
181
|
target: this.target,
|
|
174
182
|
ns: this.ns
|
|
175
183
|
};
|
|
176
|
-
this.platform.actionsState.handlers.push(
|
|
184
|
+
this.platform.actionsState.handlers.push(s);
|
|
177
185
|
const i = () => {
|
|
178
|
-
const
|
|
179
|
-
|
|
186
|
+
const c = this.platform.actionsState.handlers.indexOf(s);
|
|
187
|
+
c > -1 && this.platform.actionsState.handlers.splice(c, 1);
|
|
180
188
|
};
|
|
181
189
|
return this.subscriptions.push(i), i;
|
|
182
190
|
}
|
|
183
191
|
dispatch(t, e) {
|
|
184
|
-
const
|
|
192
|
+
const s = this.platform.nodes.all.concat(
|
|
185
193
|
this.platform.nodes.detached
|
|
186
|
-
), i = {},
|
|
187
|
-
(
|
|
194
|
+
), i = {}, c = this.platform.actionsState.handlers.filter(
|
|
195
|
+
(o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
|
|
188
196
|
);
|
|
189
197
|
return Promise.all(
|
|
190
|
-
|
|
191
|
-
const
|
|
192
|
-
(
|
|
193
|
-
),
|
|
198
|
+
c.map((o) => {
|
|
199
|
+
const h = s.filter(
|
|
200
|
+
(a) => o.target.match(a) && this.target.match(a)
|
|
201
|
+
), l = this.platform.actionsState.watchers.filter((a) => a.key === t && (!a.ns || !this.ns || a.ns === this.ns) && h.some((r) => a.target.match(r))).map((a) => a.fn);
|
|
194
202
|
return Promise.all(
|
|
195
|
-
|
|
196
|
-
const
|
|
203
|
+
h.map((a) => {
|
|
204
|
+
const r = new V(
|
|
197
205
|
this.platform,
|
|
198
|
-
|
|
206
|
+
a,
|
|
199
207
|
this.ns
|
|
200
208
|
);
|
|
201
|
-
return
|
|
202
|
-
const { data:
|
|
209
|
+
return it(l, e, r).then((p) => {
|
|
210
|
+
const { data: d = {}, options: f, cancelled: g } = p;
|
|
203
211
|
return Promise.resolve(
|
|
204
|
-
|
|
205
|
-
).then((
|
|
206
|
-
i[
|
|
212
|
+
g ? {} : o.fn(d, f, r)
|
|
213
|
+
).then((y) => {
|
|
214
|
+
i[a.id] = y;
|
|
207
215
|
});
|
|
208
216
|
});
|
|
209
217
|
})
|
|
@@ -212,38 +220,47 @@ class P {
|
|
|
212
220
|
).then(() => i);
|
|
213
221
|
}
|
|
214
222
|
watch(t, e) {
|
|
215
|
-
let
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
const
|
|
223
|
+
let s = t, i = this.ns;
|
|
224
|
+
const c = t.split(".");
|
|
225
|
+
c.length > 1 && (i = c[0], s = c.splice(1).join("."));
|
|
226
|
+
const o = {
|
|
219
227
|
fn: e,
|
|
220
228
|
target: this.target,
|
|
221
|
-
key:
|
|
229
|
+
key: s,
|
|
222
230
|
ns: i
|
|
223
231
|
};
|
|
224
|
-
this.platform.actionsState.watchers.push(
|
|
225
|
-
const
|
|
226
|
-
const
|
|
227
|
-
|
|
232
|
+
this.platform.actionsState.watchers.push(o);
|
|
233
|
+
const h = () => {
|
|
234
|
+
const l = this.platform.actionsState.watchers.indexOf(o);
|
|
235
|
+
l > -1 && this.platform.actionsState.watchers.splice(l, 1);
|
|
228
236
|
};
|
|
229
|
-
return this.subscriptions.push(
|
|
237
|
+
return this.subscriptions.push(h), h;
|
|
230
238
|
}
|
|
231
239
|
dispose() {
|
|
232
240
|
this.subscriptions.forEach((t) => t());
|
|
233
241
|
}
|
|
234
242
|
}
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
t.events.subscribeOnce("components:platform-created", (
|
|
238
|
-
e.handlers && e.handlers.forEach(([
|
|
239
|
-
i.addComponentHandler(
|
|
243
|
+
const Ct = Y((n) => {
|
|
244
|
+
n.createCommand("components", (t) => (e) => {
|
|
245
|
+
t.events.subscribeOnce("components:platform-created", (s, { platform: i }) => {
|
|
246
|
+
e.handlers && e.handlers.forEach(([c, o]) => {
|
|
247
|
+
i.addComponentHandler(c, o);
|
|
240
248
|
});
|
|
241
249
|
});
|
|
242
250
|
});
|
|
243
251
|
});
|
|
244
|
-
class
|
|
252
|
+
class M {
|
|
245
253
|
constructor(t, e) {
|
|
246
|
-
this
|
|
254
|
+
u(this, "id");
|
|
255
|
+
u(this, "type");
|
|
256
|
+
u(this, "name");
|
|
257
|
+
u(this, "parent");
|
|
258
|
+
u(this, "tags", []);
|
|
259
|
+
u(this, "children", {});
|
|
260
|
+
u(this, "changesets", []);
|
|
261
|
+
u(this, "attributes");
|
|
262
|
+
u(this, "mountCount", 0);
|
|
263
|
+
this.events = t, this.id = k(), this.type = e, this.attributes = {
|
|
247
264
|
context: {},
|
|
248
265
|
properties: {},
|
|
249
266
|
layout: {},
|
|
@@ -251,10 +268,10 @@ class L {
|
|
|
251
268
|
}, this.writeLayout({ size: "full", indent: 0 });
|
|
252
269
|
}
|
|
253
270
|
mount(t, e) {
|
|
254
|
-
let
|
|
255
|
-
return
|
|
271
|
+
let s = t.get("mounted-nodes");
|
|
272
|
+
return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && $.error("Trying to mount an already mounted component node.", this), () => {
|
|
256
273
|
}) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
|
|
257
|
-
|
|
274
|
+
s.delete(this), this.events.dispatch("components:node-unmounted", { node: this }), this.mountCount = this.mountCount - 1, this.mountCount === 0 && this.events.dispatch("components:node-exit", { node: this });
|
|
258
275
|
});
|
|
259
276
|
}
|
|
260
277
|
appendChild(t, e = "default") {
|
|
@@ -273,47 +290,47 @@ class L {
|
|
|
273
290
|
}
|
|
274
291
|
t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
|
|
275
292
|
}
|
|
276
|
-
touchProperties(t, e = {},
|
|
277
|
-
const
|
|
278
|
-
return this.changesets.push(
|
|
279
|
-
if (
|
|
280
|
-
const
|
|
281
|
-
|
|
293
|
+
touchProperties(t, e = {}, s) {
|
|
294
|
+
const c = [{ properties: t }, e];
|
|
295
|
+
return this.changesets.push(c), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
296
|
+
if (s) {
|
|
297
|
+
const o = this.changesets.indexOf(c);
|
|
298
|
+
o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
282
299
|
}
|
|
283
300
|
};
|
|
284
301
|
}
|
|
285
|
-
writeProperties(t, e = {},
|
|
286
|
-
const
|
|
287
|
-
return this.changesets.push(
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
|
|
302
|
+
writeProperties(t, e = {}, s) {
|
|
303
|
+
const c = [{ properties: t }, e];
|
|
304
|
+
return this.changesets.push(c), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
305
|
+
if (s) {
|
|
306
|
+
const o = this.changesets.indexOf(c);
|
|
307
|
+
o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
291
308
|
}
|
|
292
309
|
};
|
|
293
310
|
}
|
|
294
|
-
writeLayout(t, e = {},
|
|
295
|
-
const
|
|
296
|
-
return this.changesets.push(
|
|
297
|
-
if (!
|
|
311
|
+
writeLayout(t, e = {}, s) {
|
|
312
|
+
const c = [{ layout: t }, e];
|
|
313
|
+
return this.changesets.push(c), this.events.dispatch("components:set-layout", { node: this }), () => {
|
|
314
|
+
if (!s)
|
|
298
315
|
return;
|
|
299
|
-
const
|
|
300
|
-
|
|
316
|
+
const o = this.changesets.indexOf(c);
|
|
317
|
+
o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-layout", { node: this }));
|
|
301
318
|
};
|
|
302
319
|
}
|
|
303
|
-
writeContext(t, e = {},
|
|
304
|
-
const
|
|
305
|
-
return this.changesets.push(
|
|
306
|
-
if (!
|
|
320
|
+
writeContext(t, e = {}, s) {
|
|
321
|
+
const c = [{ context: t }, e];
|
|
322
|
+
return this.changesets.push(c), this.events.dispatch("components:set-context", { node: this }), () => {
|
|
323
|
+
if (!s)
|
|
307
324
|
return;
|
|
308
|
-
const
|
|
309
|
-
|
|
325
|
+
const o = this.changesets.indexOf(c);
|
|
326
|
+
o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-context", { node: this }));
|
|
310
327
|
};
|
|
311
328
|
}
|
|
312
329
|
getChildren(t = "default") {
|
|
313
330
|
const e = this.children[t] || [];
|
|
314
|
-
return e.reduce((
|
|
315
|
-
const { order:
|
|
316
|
-
return
|
|
331
|
+
return e.reduce((s, i, c) => {
|
|
332
|
+
const { order: o = c } = i.attributes.layout;
|
|
333
|
+
return s[o] ? s.splice(o, 0, i) : s[o] = i, s;
|
|
317
334
|
}, Array(e.length));
|
|
318
335
|
}
|
|
319
336
|
remove() {
|
|
@@ -321,57 +338,60 @@ class L {
|
|
|
321
338
|
}
|
|
322
339
|
removeChild(t) {
|
|
323
340
|
Object.keys(this.children).forEach((e) => {
|
|
324
|
-
const
|
|
325
|
-
i > -1 && (
|
|
341
|
+
const s = this.children[e], i = s.indexOf(t);
|
|
342
|
+
i > -1 && (s.splice(i, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
|
|
326
343
|
}), delete t.parent;
|
|
327
344
|
}
|
|
328
345
|
}
|
|
329
|
-
const
|
|
330
|
-
for (let
|
|
331
|
-
const
|
|
332
|
-
|
|
346
|
+
const j = (n, t, e) => {
|
|
347
|
+
for (let s = 0, i = n.length; s < i && e(n[s]) !== !0; s++) {
|
|
348
|
+
const c = t[n[s].id] || "default", o = n[s].getChildren(c);
|
|
349
|
+
j(o, t, e);
|
|
333
350
|
}
|
|
334
|
-
},
|
|
335
|
-
if (e(
|
|
336
|
-
const
|
|
337
|
-
|
|
351
|
+
}, T = (n, t, e) => {
|
|
352
|
+
if (e(n) !== !0) {
|
|
353
|
+
const s = t[n.id] || "default", i = n.children[s];
|
|
354
|
+
j(i, t, e);
|
|
338
355
|
}
|
|
339
|
-
},
|
|
356
|
+
}, E = (n, t) => {
|
|
340
357
|
const e = [];
|
|
341
|
-
return
|
|
342
|
-
e.push(
|
|
358
|
+
return T(n, t, (s) => {
|
|
359
|
+
e.push(s);
|
|
343
360
|
}), e;
|
|
344
|
-
},
|
|
345
|
-
let
|
|
346
|
-
return
|
|
361
|
+
}, ot = (n, t, e) => {
|
|
362
|
+
let s;
|
|
363
|
+
return T(n, t, (i) => {
|
|
347
364
|
if (e(i))
|
|
348
|
-
return
|
|
349
|
-
}),
|
|
365
|
+
return s = i, !0;
|
|
366
|
+
}), s;
|
|
350
367
|
};
|
|
351
|
-
class
|
|
352
|
-
constructor(t, e,
|
|
353
|
-
this
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}),
|
|
359
|
-
|
|
368
|
+
class rt {
|
|
369
|
+
constructor(t, e, s) {
|
|
370
|
+
u(this, "all", []);
|
|
371
|
+
u(this, "visible", []);
|
|
372
|
+
u(this, "detached", []);
|
|
373
|
+
this.root = t, this.switches = e, s.subscribe("components:node-appended", (i, c) => {
|
|
374
|
+
this.all.push(c.node), this.visible = E(t, e);
|
|
375
|
+
}), s.subscribe("components:node-removed", (i, c) => {
|
|
376
|
+
let o = this.all.indexOf(c.node);
|
|
377
|
+
o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(c.node), o > -1 && this.visible.splice(o, 1), this.visible = E(t, e);
|
|
378
|
+
}), s.subscribe("components:node-switched", (i, c) => {
|
|
379
|
+
this.visible = E(t, e);
|
|
360
380
|
});
|
|
361
381
|
}
|
|
362
382
|
query(t = {}) {
|
|
363
383
|
const e = [];
|
|
364
|
-
return
|
|
365
|
-
Object.keys(t).every((
|
|
384
|
+
return T(this.root, this.switches, (s) => {
|
|
385
|
+
Object.keys(t).every((c) => t[c] === s[c]) && e.push(s);
|
|
366
386
|
}), e;
|
|
367
387
|
}
|
|
368
388
|
get(t) {
|
|
369
|
-
return
|
|
389
|
+
return ot(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
|
|
370
390
|
}
|
|
371
391
|
}
|
|
372
|
-
class
|
|
392
|
+
class ct {
|
|
373
393
|
constructor() {
|
|
374
|
-
this
|
|
394
|
+
u(this, "handlers", /* @__PURE__ */ new Map());
|
|
375
395
|
}
|
|
376
396
|
add(t, e) {
|
|
377
397
|
this.handlers.set(t, e);
|
|
@@ -380,134 +400,143 @@ class ot {
|
|
|
380
400
|
return this.handlers.get(t);
|
|
381
401
|
}
|
|
382
402
|
}
|
|
383
|
-
const
|
|
384
|
-
let t =
|
|
403
|
+
const at = (n) => {
|
|
404
|
+
let t = n, e = 0;
|
|
385
405
|
for (; t.parent; )
|
|
386
406
|
e = e + 1, t = t.parent;
|
|
387
407
|
return e;
|
|
388
|
-
},
|
|
408
|
+
}, ht = (n) => n.map(([e, s]) => [at(e), e, s]).sort(([e], [s]) => e - s).map(([, e, s]) => [e, s]), O = (n) => n instanceof Date ? !1 : n && typeof n == "object" && !Array.isArray(n), v = (n, ...t) => {
|
|
389
409
|
if (!t.length)
|
|
390
|
-
return
|
|
410
|
+
return n;
|
|
391
411
|
const e = t.shift();
|
|
392
|
-
if (
|
|
393
|
-
for (const
|
|
394
|
-
|
|
395
|
-
return v(
|
|
396
|
-
},
|
|
397
|
-
let e = [],
|
|
398
|
-
const
|
|
412
|
+
if (O(n) && O(e))
|
|
413
|
+
for (const s in e)
|
|
414
|
+
O(e[s]) ? (n[s] || Object.assign(n, { [s]: {} }), v(n[s], e[s])) : Object.assign(n, { [s]: e[s] });
|
|
415
|
+
return v(n, ...t);
|
|
416
|
+
}, pt = (n, t) => !n || n === "all" ? !0 : n.some((e) => t.indexOf(e) > -1), ut = (n, t) => {
|
|
417
|
+
let e = [], s = [], i;
|
|
418
|
+
const c = () => {
|
|
399
419
|
process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
|
|
400
|
-
const
|
|
401
|
-
var
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
context:
|
|
405
|
-
properties:
|
|
406
|
-
layout:
|
|
407
|
-
}),
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
const [m,
|
|
411
|
-
|
|
420
|
+
const h = /* @__PURE__ */ new Map(), l = ht(e.map((r, p) => [r, s[p]])), a = (r, p) => {
|
|
421
|
+
var _;
|
|
422
|
+
const d = h.get(r) || {}, f = p.context && !d.context, g = p.properties && !d.properties, y = p.layout && !d.layout;
|
|
423
|
+
h.set(r, {
|
|
424
|
+
context: d.context || f,
|
|
425
|
+
properties: d.properties || g,
|
|
426
|
+
layout: d.layout || y
|
|
427
|
+
}), g && (r.attributes.properties = {}), y && (r.attributes.layout = {}), f && (r.attributes.context = v({}, (_ = r.parent) == null ? void 0 : _.attributes.context));
|
|
428
|
+
const D = [], S = [], L = [];
|
|
429
|
+
if (r.changesets.forEach((b) => {
|
|
430
|
+
const [m, w] = b;
|
|
431
|
+
pt(w.breakpoints, n.breakpoints) && (g && (typeof m.properties == "function" ? D.push(
|
|
412
432
|
m.properties
|
|
413
|
-
) : v(
|
|
414
|
-
}),
|
|
415
|
-
v(
|
|
416
|
-
}),
|
|
417
|
-
v(
|
|
418
|
-
}),
|
|
419
|
-
v(
|
|
420
|
-
}),
|
|
421
|
-
const
|
|
422
|
-
context: !!
|
|
433
|
+
) : v(r.attributes.properties, m.properties)), y && (typeof m.layout == "function" ? S.push(m.layout) : v(r.attributes.layout, m.layout)), f && (typeof m.context == "function" ? L.push(m.context) : v(r.attributes.context, m.context)));
|
|
434
|
+
}), D.forEach((b) => {
|
|
435
|
+
v(r.attributes.properties, b(r.attributes.properties));
|
|
436
|
+
}), S.forEach((b) => {
|
|
437
|
+
v(r.attributes.layout, b(r.attributes.layout));
|
|
438
|
+
}), L.forEach((b) => {
|
|
439
|
+
v(r.attributes.context, b(r.attributes.context));
|
|
440
|
+
}), f || p.recursive) {
|
|
441
|
+
const b = n.getBranch(r), m = p.recursive ? p : {
|
|
442
|
+
context: !!f
|
|
423
443
|
};
|
|
424
|
-
|
|
425
|
-
|
|
444
|
+
r.getChildren(b).forEach((w) => {
|
|
445
|
+
a(w, m);
|
|
426
446
|
});
|
|
427
447
|
}
|
|
428
448
|
};
|
|
429
|
-
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"),
|
|
430
|
-
|
|
431
|
-
}), e = [],
|
|
432
|
-
},
|
|
433
|
-
clearTimeout(i), i = setTimeout(
|
|
449
|
+
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), l.forEach(([r, p]) => {
|
|
450
|
+
a(r, p);
|
|
451
|
+
}), e = [], s = [], t(h);
|
|
452
|
+
}, o = () => {
|
|
453
|
+
clearTimeout(i), i = setTimeout(c, 0);
|
|
434
454
|
};
|
|
435
|
-
return (
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
const
|
|
439
|
-
return
|
|
455
|
+
return (h, l) => {
|
|
456
|
+
const a = e.indexOf(h);
|
|
457
|
+
if (a > -1) {
|
|
458
|
+
const r = s[a];
|
|
459
|
+
return l.context && (r.context = !0), l.properties && (r.properties = !0), l.layout && (r.layout = !0), l.recursive && (r.recursive = !0), o();
|
|
440
460
|
}
|
|
441
|
-
return e.push(
|
|
461
|
+
return e.push(h), s.push(l), o();
|
|
442
462
|
};
|
|
443
463
|
};
|
|
444
|
-
class
|
|
464
|
+
class lt {
|
|
445
465
|
constructor(t, e = {}) {
|
|
446
|
-
this
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
466
|
+
u(this, "events");
|
|
467
|
+
u(this, "breakpoints", []);
|
|
468
|
+
u(this, "nodes");
|
|
469
|
+
u(this, "actionsState", { handlers: [], watchers: [] });
|
|
470
|
+
u(this, "switches", {});
|
|
471
|
+
u(this, "changesets", []);
|
|
472
|
+
u(this, "subscriptions", []);
|
|
473
|
+
u(this, "processNode");
|
|
474
|
+
u(this, "customComponentHandler", new ct());
|
|
475
|
+
this.providers = e, this.events = t.events.createChild(this);
|
|
476
|
+
const s = new M(this.events, "root");
|
|
477
|
+
s.name = `root-${t.name}`, this.nodes = new rt(s, this.switches, this.events);
|
|
478
|
+
const i = this.processNode = ut(this, (c) => {
|
|
479
|
+
const o = Array.from(c.keys());
|
|
480
|
+
process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
481
|
+
${o.map(
|
|
482
|
+
(h) => `${h.name || "<no name>"} (${h.id})
|
|
454
483
|
`
|
|
455
|
-
)}`),
|
|
456
|
-
const
|
|
457
|
-
|
|
484
|
+
)}`), o.forEach((h) => {
|
|
485
|
+
const l = c.get(h);
|
|
486
|
+
h.parent && h.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: h }), l != null && l.context && this.events.dispatch("components:context-changed", { node: h }), l != null && l.properties && this.events.dispatch("components:properties-changed", { node: h }), l != null && l.layout && this.events.dispatch("components:layout-changed", { node: h });
|
|
458
487
|
}), this.events.dispatch("components:component-model-initialized", {}, { bubbles: !0 });
|
|
459
488
|
});
|
|
460
489
|
Promise.all(
|
|
461
|
-
Object.keys(e).map((
|
|
490
|
+
Object.keys(e).map((c) => e[c].load(this))
|
|
462
491
|
), this.subscriptions.push(
|
|
463
492
|
this.events.subscribe(
|
|
464
493
|
"components:node-appended",
|
|
465
|
-
(
|
|
466
|
-
const { node:
|
|
467
|
-
this.changesets.forEach((
|
|
468
|
-
const { changeset:
|
|
469
|
-
|
|
494
|
+
(c, o) => {
|
|
495
|
+
const { node: h } = o;
|
|
496
|
+
this.changesets.forEach((l) => {
|
|
497
|
+
const { changeset: a, target: r, removes: p } = l, [d, f] = a;
|
|
498
|
+
r.match(o.node) && (d.properties && p.push(h.writeProperties(d.properties, f)), d.context && p.push(h.writeContext(d.context, f)), d.layout && p.push(h.writeLayout(d.layout, f)));
|
|
470
499
|
});
|
|
471
500
|
}
|
|
472
501
|
)
|
|
473
502
|
), this.subscriptions.push(
|
|
474
503
|
this.events.subscribe(
|
|
475
504
|
"components:node-appended",
|
|
476
|
-
(
|
|
477
|
-
i(
|
|
505
|
+
(c, o) => {
|
|
506
|
+
i(o.node, { properties: !0, context: !0 });
|
|
478
507
|
}
|
|
479
508
|
)
|
|
480
509
|
), this.subscriptions.push(
|
|
481
510
|
this.events.subscribe(
|
|
482
511
|
"components:set-properties",
|
|
483
|
-
(
|
|
484
|
-
i(
|
|
512
|
+
(c, o) => {
|
|
513
|
+
i(o.node, { properties: !0 });
|
|
485
514
|
}
|
|
486
515
|
)
|
|
487
516
|
), this.subscriptions.push(
|
|
488
517
|
this.events.subscribe(
|
|
489
518
|
"components:set-context",
|
|
490
|
-
(
|
|
491
|
-
i(
|
|
519
|
+
(c, o) => {
|
|
520
|
+
i(o.node, { properties: !0, context: !0 });
|
|
492
521
|
}
|
|
493
522
|
)
|
|
494
523
|
), this.subscriptions.push(
|
|
495
524
|
this.events.subscribe(
|
|
496
525
|
"components:set-indent",
|
|
497
|
-
(
|
|
498
|
-
i(
|
|
526
|
+
(c, o) => {
|
|
527
|
+
i(o.node, { layout: !0 });
|
|
499
528
|
}
|
|
500
529
|
)
|
|
501
530
|
), this.subscriptions.push(
|
|
502
531
|
this.events.subscribe(
|
|
503
532
|
"components:set-layout",
|
|
504
|
-
(
|
|
505
|
-
i(
|
|
533
|
+
(c, o) => {
|
|
534
|
+
i(o.node, { layout: !0 });
|
|
506
535
|
}
|
|
507
536
|
)
|
|
508
537
|
), this.subscriptions.push(
|
|
509
|
-
this.events.subscribe("components:node-switched", (
|
|
510
|
-
i(
|
|
538
|
+
this.events.subscribe("components:node-switched", (c, { node: o, branch: h }) => {
|
|
539
|
+
i(o, {
|
|
511
540
|
layout: !0,
|
|
512
541
|
recursive: !0,
|
|
513
542
|
properties: !0,
|
|
@@ -515,8 +544,8 @@ ${c.map(
|
|
|
515
544
|
});
|
|
516
545
|
})
|
|
517
546
|
), this.subscriptions.push(
|
|
518
|
-
this.events.subscribe("components:node-removed", (
|
|
519
|
-
i(
|
|
547
|
+
this.events.subscribe("components:node-removed", (c, { parentNode: o }) => {
|
|
548
|
+
i(o, { properties: !0 });
|
|
520
549
|
})
|
|
521
550
|
), this.events.parent && this.events.parent.dispatch("components:platform-created", { platform: this });
|
|
522
551
|
}
|
|
@@ -547,34 +576,34 @@ ${c.map(
|
|
|
547
576
|
return this.switches[t.id];
|
|
548
577
|
}
|
|
549
578
|
createNode(t, e = {}) {
|
|
550
|
-
const
|
|
551
|
-
return e.detached && this.nodes.detached.push(
|
|
579
|
+
const s = new M(this.events, t);
|
|
580
|
+
return e.detached && this.nodes.detached.push(s), s;
|
|
552
581
|
}
|
|
553
582
|
components() {
|
|
554
|
-
return new
|
|
583
|
+
return new R(this);
|
|
555
584
|
}
|
|
556
585
|
actions(t, e) {
|
|
557
|
-
return new
|
|
586
|
+
return new A(this, t, e);
|
|
558
587
|
}
|
|
559
588
|
write(t) {
|
|
560
|
-
const { provider: e, target:
|
|
589
|
+
const { provider: e, target: s, attributes: i, options: c = {}, removable: o } = t, h = t.key || k(), a = { changeset: [i, c], target: s, removes: [] };
|
|
561
590
|
if (e) {
|
|
562
|
-
const
|
|
563
|
-
|
|
564
|
-
|
|
591
|
+
const r = this.providers[e];
|
|
592
|
+
r.write(h, s, i, c), a.removes.push(() => {
|
|
593
|
+
r.remove(h);
|
|
565
594
|
});
|
|
566
595
|
}
|
|
567
|
-
return this.changesets.push(
|
|
568
|
-
if (
|
|
596
|
+
return this.changesets.push(a), this.nodes.all.forEach((r) => {
|
|
597
|
+
if (s.match(r)) {
|
|
569
598
|
let p = () => {
|
|
570
599
|
};
|
|
571
|
-
i.properties && (p =
|
|
600
|
+
i.properties && (p = r.writeProperties(i.properties, c, o)), i.context && (p = r.writeContext(i.context, c, o)), i.layout && (p = r.writeContext(i.layout, c, o)), a.removes.push(p);
|
|
572
601
|
}
|
|
573
602
|
}), () => {
|
|
574
|
-
if (
|
|
575
|
-
|
|
576
|
-
const
|
|
577
|
-
|
|
603
|
+
if (o) {
|
|
604
|
+
a.removes.forEach((p) => p());
|
|
605
|
+
const r = this.changesets.indexOf(a);
|
|
606
|
+
r > -1 && this.changesets.splice(r, 1);
|
|
578
607
|
}
|
|
579
608
|
};
|
|
580
609
|
}
|
|
@@ -588,113 +617,119 @@ ${c.map(
|
|
|
588
617
|
this.subscriptions.forEach((t) => t());
|
|
589
618
|
}
|
|
590
619
|
}
|
|
591
|
-
const
|
|
592
|
-
if (Array.isArray(
|
|
593
|
-
const [t, ...e] =
|
|
620
|
+
const dt = (n) => {
|
|
621
|
+
if (Array.isArray(n)) {
|
|
622
|
+
const [t, ...e] = n;
|
|
594
623
|
return {
|
|
595
624
|
definitionId: t,
|
|
596
625
|
overrides: e
|
|
597
626
|
};
|
|
598
627
|
}
|
|
599
628
|
return {
|
|
600
|
-
definitionId:
|
|
629
|
+
definitionId: n,
|
|
601
630
|
overrides: []
|
|
602
631
|
};
|
|
603
|
-
},
|
|
604
|
-
e.forEach((
|
|
605
|
-
const
|
|
606
|
-
if (
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
const p = i[
|
|
610
|
-
|
|
611
|
-
}), t.appendChild(
|
|
612
|
-
|
|
613
|
-
breakpoints:
|
|
614
|
-
}),
|
|
632
|
+
}, P = (n, t, e, s, i, c) => {
|
|
633
|
+
e.forEach((o) => {
|
|
634
|
+
const h = dt(o), l = s[h.definitionId];
|
|
635
|
+
if (h.definitionId === "view") {
|
|
636
|
+
const a = n.createNode("view");
|
|
637
|
+
a.name = "view", Object.keys(i).forEach((r) => {
|
|
638
|
+
const p = i[r];
|
|
639
|
+
P(n, a, [p.entry], s, i, r);
|
|
640
|
+
}), t.appendChild(a), h.overrides.forEach((r) => {
|
|
641
|
+
r.properties && a.writeProperties(r.properties, {
|
|
642
|
+
breakpoints: r.breakpoints
|
|
643
|
+
}), r.context && a.writeContext(r.context, { breakpoints: r.breakpoints }), r.layout && a.writeLayout(r.layout, { breakpoints: r.breakpoints });
|
|
615
644
|
});
|
|
616
|
-
} else if (
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
platform:
|
|
645
|
+
} else if (n.getComponentHandler(l.type)) {
|
|
646
|
+
const a = n.getComponentHandler(l.type);
|
|
647
|
+
a && a(h, {
|
|
648
|
+
platform: n,
|
|
620
649
|
node: t,
|
|
621
650
|
references: e,
|
|
622
|
-
definitions:
|
|
651
|
+
definitions: s,
|
|
623
652
|
views: i,
|
|
624
|
-
branch:
|
|
653
|
+
branch: c
|
|
625
654
|
});
|
|
626
655
|
} else {
|
|
627
|
-
const
|
|
628
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
629
|
-
|
|
630
|
-
`No definition found for component type '${
|
|
656
|
+
const a = s[h.definitionId];
|
|
657
|
+
if (process.env.NODE_ENV !== "production" && !a) {
|
|
658
|
+
$.error(
|
|
659
|
+
`No definition found for component type '${h.definitionId}'.`
|
|
631
660
|
);
|
|
632
661
|
return;
|
|
633
662
|
}
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
const
|
|
637
|
-
p.properties &&
|
|
638
|
-
}),
|
|
663
|
+
const r = n.createNode(a.type);
|
|
664
|
+
r.name = h.definitionId, r.tags = a.tags || [], a.properties && r.writeProperties(a.properties), a.context && r.writeContext(a.context), a.layout && r.writeLayout(a.layout), t.appendChild(r, c), h.overrides.forEach((p) => {
|
|
665
|
+
const d = { breakpoints: p.breakpoints };
|
|
666
|
+
p.properties && r.writeProperties(p.properties, d), p.context && r.writeContext(p.context, d), p.layout && r.writeLayout(p.layout, d);
|
|
667
|
+
}), a.children && P(n, r, a.children, s, i);
|
|
639
668
|
}
|
|
640
669
|
});
|
|
641
|
-
},
|
|
642
|
-
const { entry: e, components:
|
|
643
|
-
return Object.keys(i).forEach((
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
const
|
|
647
|
-
p.matches ?
|
|
670
|
+
}, Et = (n, t) => {
|
|
671
|
+
const { entry: e, components: s, breakpoints: i, views: c } = t, o = [];
|
|
672
|
+
return Object.keys(i).forEach((h) => {
|
|
673
|
+
const l = i[h], a = window.matchMedia(l);
|
|
674
|
+
a.matches && n.breakpoints.push(h);
|
|
675
|
+
const r = (p) => {
|
|
676
|
+
p.matches ? n.addBreakpoint(h) : n.removeBreakpoint(h);
|
|
648
677
|
};
|
|
649
|
-
|
|
650
|
-
}),
|
|
651
|
-
|
|
678
|
+
a.addListener(r), o.push(() => a.removeListener(r));
|
|
679
|
+
}), P(n, n.nodes.root, [e], s, c), () => o.forEach((h) => {
|
|
680
|
+
h();
|
|
652
681
|
});
|
|
653
|
-
},
|
|
654
|
-
id:
|
|
655
|
-
type:
|
|
656
|
-
name:
|
|
682
|
+
}, Ot = (n, t) => ({
|
|
683
|
+
id: n.id,
|
|
684
|
+
type: n.type,
|
|
685
|
+
name: n.name,
|
|
657
686
|
branch: t || "default"
|
|
658
|
-
}),
|
|
659
|
-
let
|
|
687
|
+
}), Nt = (n, t, e, s = k(), i = {}) => n.getAsync("components").then((c) => {
|
|
688
|
+
let o;
|
|
660
689
|
if (typeof t == "string") {
|
|
661
|
-
const
|
|
662
|
-
|
|
690
|
+
const a = new R(c);
|
|
691
|
+
a.ofType(t), o = a;
|
|
663
692
|
} else
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
const
|
|
667
|
-
return
|
|
693
|
+
o = t;
|
|
694
|
+
const h = {}, l = (a) => {
|
|
695
|
+
const r = h[a.id];
|
|
696
|
+
return r ? Promise.resolve(r.controller) : lt.getInstance(n).then((p) => new V(p, a, s));
|
|
668
697
|
};
|
|
669
|
-
|
|
698
|
+
c.events.subscribe(
|
|
670
699
|
"components:node-enter",
|
|
671
|
-
(
|
|
672
|
-
|
|
673
|
-
Promise.resolve(e(p)).then((
|
|
674
|
-
|
|
675
|
-
dispose:
|
|
700
|
+
(a, { node: r }) => {
|
|
701
|
+
o.match(r) && l(r).then((p) => {
|
|
702
|
+
Promise.resolve(e(p)).then((d) => {
|
|
703
|
+
h[r.id] = {
|
|
704
|
+
dispose: d,
|
|
676
705
|
controller: p
|
|
677
706
|
};
|
|
678
707
|
});
|
|
679
708
|
});
|
|
680
709
|
}
|
|
681
|
-
),
|
|
710
|
+
), c.events.subscribe(
|
|
682
711
|
"components:node-exit",
|
|
683
|
-
(
|
|
684
|
-
const p =
|
|
685
|
-
p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete
|
|
712
|
+
(a, { node: r }) => {
|
|
713
|
+
const p = h[r.id];
|
|
714
|
+
p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete h[r.id]));
|
|
686
715
|
}
|
|
687
716
|
);
|
|
688
717
|
});
|
|
689
|
-
class
|
|
718
|
+
class Pt {
|
|
690
719
|
constructor(t) {
|
|
691
|
-
this
|
|
720
|
+
u(this, "aliases", /* @__PURE__ */ new Map());
|
|
721
|
+
u(this, "components", /* @__PURE__ */ new Map());
|
|
722
|
+
u(this, "events");
|
|
723
|
+
u(this, "logger", new $());
|
|
692
724
|
const { events: e } = t.get("$widget");
|
|
693
725
|
this.events = e;
|
|
694
726
|
}
|
|
695
727
|
getComponent(t) {
|
|
696
|
-
const e = this.aliases.get(t);
|
|
697
|
-
return
|
|
728
|
+
const e = this.aliases.get(t), s = this.components.get(e || t) || null;
|
|
729
|
+
return process.env.NODE_ENV !== "production" && (s || this.logger.warn(
|
|
730
|
+
e || t,
|
|
731
|
+
`Unable to resolve component: "${e || t}". You most likely forgot to register the required plugin for: ${e || t}.`
|
|
732
|
+
)), s;
|
|
698
733
|
}
|
|
699
734
|
registerComponent(t, e) {
|
|
700
735
|
return this.components.set(t, e), this.events.dispatch("component-resolver:resolve", t), () => {
|
|
@@ -702,10 +737,10 @@ class kt {
|
|
|
702
737
|
};
|
|
703
738
|
}
|
|
704
739
|
registerResolver(t, e) {
|
|
705
|
-
return this.events.subscribe("component-resolver:resolve", (
|
|
740
|
+
return this.events.subscribe("component-resolver:resolve", (s, i) => {
|
|
706
741
|
if (i === t) {
|
|
707
|
-
const
|
|
708
|
-
e(
|
|
742
|
+
const c = this.getComponent(t);
|
|
743
|
+
e(c);
|
|
709
744
|
}
|
|
710
745
|
});
|
|
711
746
|
}
|
|
@@ -715,81 +750,82 @@ class kt {
|
|
|
715
750
|
};
|
|
716
751
|
}
|
|
717
752
|
}
|
|
718
|
-
const
|
|
719
|
-
constructor(
|
|
720
|
-
super(
|
|
721
|
-
transformPluginSettings: (
|
|
722
|
-
const
|
|
723
|
-
return
|
|
753
|
+
const ft = "7270eae", I = class extends J {
|
|
754
|
+
constructor(t, e = []) {
|
|
755
|
+
super(t, e, {
|
|
756
|
+
transformPluginSettings: (s, i, c) => {
|
|
757
|
+
const o = c.get("$settings"), h = o.plugins && i ? o.plugins[i] || {} : {};
|
|
758
|
+
return x(x({}, h), s);
|
|
724
759
|
}
|
|
725
760
|
});
|
|
726
761
|
}
|
|
727
|
-
createImplementation(
|
|
728
|
-
const
|
|
729
|
-
return
|
|
762
|
+
createImplementation(t) {
|
|
763
|
+
const e = super.createImplementation(t);
|
|
764
|
+
return e.bindings = t.bindings, e;
|
|
730
765
|
}
|
|
731
|
-
navigate(
|
|
732
|
-
this.widgets.query(
|
|
766
|
+
navigate(t, e, s) {
|
|
767
|
+
this.widgets.query(t).forEach((i) => i.invoke("navigate", { route: e, params: s }));
|
|
733
768
|
}
|
|
734
|
-
static create(
|
|
735
|
-
const
|
|
736
|
-
|
|
769
|
+
static create(t = {}) {
|
|
770
|
+
const e = [U].concat(
|
|
771
|
+
t.configurationApiExtensions || []
|
|
737
772
|
);
|
|
738
|
-
return new
|
|
773
|
+
return new I("humany", e);
|
|
739
774
|
}
|
|
740
|
-
static createFromGlobal(
|
|
741
|
-
if (this.isRuntime(
|
|
742
|
-
return
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
const
|
|
746
|
-
return
|
|
775
|
+
static createFromGlobal(t, e = {}) {
|
|
776
|
+
if (this.isRuntime(t))
|
|
777
|
+
return t.patch(e), t;
|
|
778
|
+
const s = [], i = t && t._c;
|
|
779
|
+
i && i.forEach((o) => s.push(o));
|
|
780
|
+
const c = this.create(e);
|
|
781
|
+
return c.container.register("$runtimecfg", s), c;
|
|
747
782
|
}
|
|
748
|
-
static isRuntime(
|
|
749
|
-
return !!(
|
|
783
|
+
static isRuntime(t) {
|
|
784
|
+
return !!(t && typeof t == "object" && t.container && typeof t.container.get == "function" && t.container.get("$environment") === t && t.container.owner === t);
|
|
750
785
|
}
|
|
751
786
|
};
|
|
752
|
-
let
|
|
753
|
-
|
|
754
|
-
class
|
|
787
|
+
let N = I;
|
|
788
|
+
u(N, "version", `${ft} (${X})`);
|
|
789
|
+
class kt extends Z {
|
|
755
790
|
constructor() {
|
|
756
|
-
super(...arguments)
|
|
791
|
+
super(...arguments);
|
|
792
|
+
u(this, "bindings", []);
|
|
757
793
|
}
|
|
758
794
|
}
|
|
759
|
-
class
|
|
795
|
+
class $t extends tt {
|
|
760
796
|
constructor(t, e) {
|
|
761
797
|
super(t, e);
|
|
762
798
|
}
|
|
763
799
|
}
|
|
764
|
-
var mt = /* @__PURE__ */ ((
|
|
765
|
-
class Rt extends
|
|
800
|
+
var mt = /* @__PURE__ */ ((n) => (n.open = "open", n.closed = "closed", n.hidden = "hidden", n))(mt || {});
|
|
801
|
+
class Rt extends et {
|
|
766
802
|
constructor(t) {
|
|
767
803
|
super(t);
|
|
768
804
|
}
|
|
769
805
|
}
|
|
770
806
|
export {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
807
|
+
xt as ActionResolver,
|
|
808
|
+
A as ActionsController,
|
|
809
|
+
M as ComponentNode,
|
|
810
|
+
V as ComponentNodeController,
|
|
811
|
+
lt as ComponentPlatform,
|
|
812
|
+
R as ComponentQuery,
|
|
813
|
+
Pt as ComponentResolver,
|
|
814
|
+
N as Environment,
|
|
815
|
+
kt as Implementation,
|
|
816
|
+
$t as Plugin,
|
|
781
817
|
mt as WidgetRenderState,
|
|
782
818
|
Rt as WidgetType,
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
819
|
+
Ot as asDescriptor,
|
|
820
|
+
wt as bootstrap,
|
|
821
|
+
Ct as componentConfigurationApi,
|
|
822
|
+
P as createChildren,
|
|
823
|
+
Et as createComponentModel,
|
|
824
|
+
st as createEventSubscriber,
|
|
825
|
+
Nt as extendComponent,
|
|
826
|
+
ot as findComponent,
|
|
827
|
+
E as findVisibleComponents,
|
|
828
|
+
T as traverseComponents,
|
|
829
|
+
ft as version
|
|
794
830
|
};
|
|
795
831
|
//# sourceMappingURL=index.js.map
|