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