@telia-ace/widget-runtime-flamingo 1.1.110-rc.2 → 1.1.110
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/index-C7Sm0jBi.js +198 -0
- package/{index-BpOmXqng.mjs → index-hvD4rZ3z.mjs} +844 -845
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/{render-DPn5L-ek.mjs → render-Cedew0H6.mjs} +133 -133
- package/render-ENE9aPcF.js +120 -0
- package/index-Cb43X4KG.js +0 -198
- package/render-CDXkSh_X.js +0 -120
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-C7Sm0jBi.js");exports.ActionsController=t.ActionsController;exports.DataProvider=t.DataProvider;exports.GridWidget=t.Widget;exports.GuideProviderPlugin=t.GuideProviderPlugin;exports.Widget=t.Widget;exports.WidgetComponent=t.WidgetComponent;exports.childrenContext=t.childrenContext;exports.containerContext=t.containerContext;exports.contextCtx=t.contextCtx;exports.createDataProvider=t.createDataProvider;exports.createWebComponent=t.createLitComponent;exports.descriptorContext=t.descriptorContext;exports.layoutCtx=t.layoutCtx;exports.propertiesCtx=t.propertiesCtx;
|
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as a, D as o, h as r, G as s, h as i, W as n, j as d, c as C, l as c, s as x, u as p, k as l, p as W, q as g } from "./index-
|
|
1
|
+
import { A as a, D as o, h as r, G as s, h as i, W as n, j as d, c as C, l as c, s as x, u as p, k as l, p as W, q as g } from "./index-hvD4rZ3z.mjs";
|
|
2
2
|
export {
|
|
3
3
|
a as ActionsController,
|
|
4
4
|
o as DataProvider,
|
package/package.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { i as L, t as D, e as
|
|
1
|
+
import { i as L, t as D, e as A, E as _, r as P, a as z, c as E, b as M, m as N, o as f, x as g, d as R, n as T, f as u, T as v, W as j, g as W } from "./index-hvD4rZ3z.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const S = (
|
|
7
|
+
const S = (e) => (t, s) => {
|
|
8
8
|
s !== void 0 ? s.addInitializer(() => {
|
|
9
|
-
customElements.define(
|
|
10
|
-
}) : customElements.define(
|
|
9
|
+
customElements.define(e, t);
|
|
10
|
+
}) : customElements.define(e, t);
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2020 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const I = (
|
|
17
|
+
const I = (e) => e === null || typeof e != "object" && typeof e != "function", q = (e) => e.strings === void 0;
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const p = (
|
|
23
|
+
const p = (e, t) => {
|
|
24
24
|
var n;
|
|
25
|
-
const s =
|
|
25
|
+
const s = e._$AN;
|
|
26
26
|
if (s === void 0) return !1;
|
|
27
|
-
for (const i of s) (n = i._$AO) == null || n.call(i,
|
|
27
|
+
for (const i of s) (n = i._$AO) == null || n.call(i, t, !1), p(i, t);
|
|
28
28
|
return !0;
|
|
29
|
-
},
|
|
30
|
-
let
|
|
29
|
+
}, m = (e) => {
|
|
30
|
+
let t, s;
|
|
31
31
|
do {
|
|
32
|
-
if ((
|
|
33
|
-
s =
|
|
32
|
+
if ((t = e._$AM) === void 0) break;
|
|
33
|
+
s = t._$AN, s.delete(e), e = t;
|
|
34
34
|
} while ((s == null ? void 0 : s.size) === 0);
|
|
35
|
-
},
|
|
36
|
-
for (let
|
|
37
|
-
let s =
|
|
38
|
-
if (s === void 0)
|
|
39
|
-
else if (s.has(
|
|
40
|
-
s.add(
|
|
35
|
+
}, k = (e) => {
|
|
36
|
+
for (let t; t = e._$AM; e = t) {
|
|
37
|
+
let s = t._$AN;
|
|
38
|
+
if (s === void 0) t._$AN = s = /* @__PURE__ */ new Set();
|
|
39
|
+
else if (s.has(e)) break;
|
|
40
|
+
s.add(e), X(t);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
function H(
|
|
44
|
-
this._$AN !== void 0 ? (
|
|
43
|
+
function H(e) {
|
|
44
|
+
this._$AN !== void 0 ? (m(this), this._$AM = e, k(this)) : this._$AM = e;
|
|
45
45
|
}
|
|
46
|
-
function K(
|
|
46
|
+
function K(e, t = !1, s = 0) {
|
|
47
47
|
const n = this._$AH, i = this._$AN;
|
|
48
|
-
if (i !== void 0 && i.size !== 0) if (
|
|
49
|
-
else n != null && (p(n, !1),
|
|
50
|
-
else p(this,
|
|
48
|
+
if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(n)) for (let r = s; r < n.length; r++) p(n[r], !1), m(n[r]);
|
|
49
|
+
else n != null && (p(n, !1), m(n));
|
|
50
|
+
else p(this, e);
|
|
51
51
|
}
|
|
52
|
-
const X = (
|
|
53
|
-
|
|
52
|
+
const X = (e) => {
|
|
53
|
+
e.type == D.CHILD && (e._$AP ?? (e._$AP = K), e._$AQ ?? (e._$AQ = H));
|
|
54
54
|
};
|
|
55
|
-
class
|
|
55
|
+
class Y extends L {
|
|
56
56
|
constructor() {
|
|
57
57
|
super(...arguments), this._$AN = void 0;
|
|
58
58
|
}
|
|
59
|
-
_$AT(
|
|
60
|
-
super._$AT(
|
|
59
|
+
_$AT(t, s, n) {
|
|
60
|
+
super._$AT(t, s, n), k(this), this.isConnected = t._$AU;
|
|
61
61
|
}
|
|
62
|
-
_$AO(
|
|
62
|
+
_$AO(t, s = !0) {
|
|
63
63
|
var n, i;
|
|
64
|
-
|
|
64
|
+
t !== this.isConnected && (this.isConnected = t, t ? (n = this.reconnected) == null || n.call(this) : (i = this.disconnected) == null || i.call(this)), s && (p(this, t), m(this));
|
|
65
65
|
}
|
|
66
|
-
setValue(
|
|
67
|
-
if (q(this._$Ct)) this._$Ct._$AI(
|
|
66
|
+
setValue(t) {
|
|
67
|
+
if (q(this._$Ct)) this._$Ct._$AI(t, this);
|
|
68
68
|
else {
|
|
69
69
|
const s = [...this._$Ct._$AH];
|
|
70
|
-
s[this._$Ci] =
|
|
70
|
+
s[this._$Ci] = t, this._$Ct._$AI(s, this, 0);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
disconnected() {
|
|
@@ -83,25 +83,25 @@ class k extends L {
|
|
|
83
83
|
const Z = () => new B();
|
|
84
84
|
let B = class {
|
|
85
85
|
};
|
|
86
|
-
const
|
|
87
|
-
render(
|
|
86
|
+
const b = /* @__PURE__ */ new WeakMap(), U = A(class extends Y {
|
|
87
|
+
render(e) {
|
|
88
88
|
return _;
|
|
89
89
|
}
|
|
90
|
-
update(
|
|
90
|
+
update(e, [t]) {
|
|
91
91
|
var n;
|
|
92
|
-
const s =
|
|
93
|
-
return s && this.Y !== void 0 && this.rt(void 0), (s || this.lt !== this.ct) && (this.Y =
|
|
92
|
+
const s = t !== this.Y;
|
|
93
|
+
return s && this.Y !== void 0 && this.rt(void 0), (s || this.lt !== this.ct) && (this.Y = t, this.ht = (n = e.options) == null ? void 0 : n.host, this.rt(this.ct = e.element)), _;
|
|
94
94
|
}
|
|
95
|
-
rt(
|
|
96
|
-
if (this.isConnected || (
|
|
97
|
-
const
|
|
98
|
-
let s =
|
|
99
|
-
s === void 0 && (s = /* @__PURE__ */ new WeakMap(),
|
|
100
|
-
} else this.Y.value =
|
|
95
|
+
rt(e) {
|
|
96
|
+
if (this.isConnected || (e = void 0), typeof this.Y == "function") {
|
|
97
|
+
const t = this.ht ?? globalThis;
|
|
98
|
+
let s = b.get(t);
|
|
99
|
+
s === void 0 && (s = /* @__PURE__ */ new WeakMap(), b.set(t, s)), s.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), s.set(this.Y, e), e !== void 0 && this.Y.call(this.ht, e);
|
|
100
|
+
} else this.Y.value = e;
|
|
101
101
|
}
|
|
102
102
|
get lt() {
|
|
103
|
-
var
|
|
104
|
-
return typeof this.Y == "function" ? (
|
|
103
|
+
var e, t;
|
|
104
|
+
return typeof this.Y == "function" ? (e = b.get(this.ht ?? globalThis)) == null ? void 0 : e.get(this.Y) : (t = this.Y) == null ? void 0 : t.value;
|
|
105
105
|
}
|
|
106
106
|
disconnected() {
|
|
107
107
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -109,46 +109,46 @@ const $ = /* @__PURE__ */ new WeakMap(), U = P(class extends k {
|
|
|
109
109
|
reconnected() {
|
|
110
110
|
this.rt(this.ct);
|
|
111
111
|
}
|
|
112
|
-
}), V = async (
|
|
113
|
-
const s =
|
|
114
|
-
return (await
|
|
112
|
+
}), V = async (e) => await e.get("$widget").invoke("renderState"), F = async (e, t) => {
|
|
113
|
+
const s = e.get("$widget");
|
|
114
|
+
return (await e.getAsync(
|
|
115
115
|
"actionResolver"
|
|
116
|
-
)).subscribe(s.name,
|
|
117
|
-
}, G = (
|
|
118
|
-
const n =
|
|
119
|
-
(o, { breakpoints: a = [], values: h }) => a.length ?
|
|
116
|
+
)).subscribe(s.name, t);
|
|
117
|
+
}, G = (e, t, s = !1) => {
|
|
118
|
+
const n = e.reduce(
|
|
119
|
+
(o, { breakpoints: a = [], values: h }) => a.length ? t.some((y) => a.includes(y)) ? { ...o, ...h } : o : { ...o, ...h },
|
|
120
120
|
{}
|
|
121
121
|
), i = {}, r = n.type;
|
|
122
122
|
return i.height = n.height || "", i.width = n.width || "", n.type === "floating" || n.type === "inline" && s && (i.height = "calc(100vh - 120px)"), { type: r, styles: i };
|
|
123
123
|
};
|
|
124
|
-
var Q = Object.defineProperty, J = Object.getOwnPropertyDescriptor,
|
|
125
|
-
for (var i = n > 1 ? void 0 : n ? J(
|
|
126
|
-
(o =
|
|
127
|
-
return n && i && Q(
|
|
124
|
+
var Q = Object.defineProperty, J = Object.getOwnPropertyDescriptor, d = (e, t, s, n) => {
|
|
125
|
+
for (var i = n > 1 ? void 0 : n ? J(t, s) : t, r = e.length - 1, o; r >= 0; r--)
|
|
126
|
+
(o = e[r]) && (i = (n ? o(t, s, i) : o(i)) || i);
|
|
127
|
+
return n && i && Q(t, s, i), i;
|
|
128
128
|
};
|
|
129
|
-
let c = class extends
|
|
129
|
+
let c = class extends P {
|
|
130
130
|
constructor() {
|
|
131
131
|
super(), this._provider = new z(this, E, void 0), this.wrapperRef = Z(), this.breakpoints = [], this.breakpointsSet = !1;
|
|
132
132
|
}
|
|
133
133
|
connectedCallback() {
|
|
134
|
-
super.connectedCallback(), this._provider.setValue(this.container), this.container && (V(this.container).then((
|
|
135
|
-
this.renderState =
|
|
136
|
-
}), F(this.container, (
|
|
137
|
-
switch (
|
|
134
|
+
super.connectedCallback(), this._provider.setValue(this.container), this.container && (V(this.container).then((e) => {
|
|
135
|
+
this.renderState = e;
|
|
136
|
+
}), F(this.container, (e, t) => {
|
|
137
|
+
switch (t) {
|
|
138
138
|
case "close":
|
|
139
139
|
case "open":
|
|
140
|
-
this.renderState =
|
|
140
|
+
this.renderState = t === "open" ? f.open : f.closed;
|
|
141
141
|
break;
|
|
142
142
|
case "hide":
|
|
143
143
|
this.renderState = f.hidden;
|
|
144
144
|
}
|
|
145
|
-
}).then((
|
|
146
|
-
this._unsubscribeRenderState =
|
|
145
|
+
}).then((e) => {
|
|
146
|
+
this._unsubscribeRenderState = e;
|
|
147
147
|
}), M.getInstance(this.container).then(
|
|
148
|
-
(
|
|
149
|
-
this.componentPlatform =
|
|
148
|
+
(e) => {
|
|
149
|
+
this.componentPlatform = e, this.breakpoints = this.componentPlatform.breakpoints, this.breakpointsSet = !0, this._unsubscribePropChange = this.componentPlatform.events.subscribe(
|
|
150
150
|
"components:properties-changed",
|
|
151
|
-
(
|
|
151
|
+
(t, s) => {
|
|
152
152
|
var n, i;
|
|
153
153
|
((n = s == null ? void 0 : s.node) == null ? void 0 : n.type) === "root" && (this.breakpoints = (i = this.componentPlatform) != null && i.breakpoints ? [...this.componentPlatform.breakpoints] : []);
|
|
154
154
|
}
|
|
@@ -160,15 +160,15 @@ let c = class extends A {
|
|
|
160
160
|
super.disconnectedCallback(), this._unsubscribeRenderState && this._unsubscribeRenderState(), this._unsubscribePropChange && this._unsubscribePropChange();
|
|
161
161
|
}
|
|
162
162
|
applyBranding() {
|
|
163
|
-
var
|
|
163
|
+
var e;
|
|
164
164
|
if (this.wrapperRef.value) {
|
|
165
|
-
const
|
|
166
|
-
|
|
165
|
+
const t = (e = this.container) == null ? void 0 : e.get("$settings");
|
|
166
|
+
t != null && t.branding && N(t.branding, this.wrapperRef.value);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
render() {
|
|
170
|
-
var
|
|
171
|
-
let
|
|
170
|
+
var t, s, n, i;
|
|
171
|
+
let e;
|
|
172
172
|
if (!this.entry || !this.breakpointsSet)
|
|
173
173
|
return _;
|
|
174
174
|
if (this.container && this.renderState) {
|
|
@@ -177,15 +177,15 @@ let c = class extends A {
|
|
|
177
177
|
}
|
|
178
178
|
if (this.container) {
|
|
179
179
|
const r = this.container.get("$settings");
|
|
180
|
-
r != null && r.layout && (
|
|
180
|
+
r != null && r.layout && (e = G(
|
|
181
181
|
r.layout,
|
|
182
182
|
this.breakpoints,
|
|
183
183
|
!!r.trigger
|
|
184
|
-
),
|
|
184
|
+
), e.type === "floating" ? (this.renderRoot.host.classList.add("floating"), this.renderRoot.host.classList.remove("inline")) : (this.renderRoot.host.classList.add("inline"), this.renderRoot.host.classList.remove("floating")), Object.entries(e.styles).forEach(([o, a]) => {
|
|
185
185
|
this.renderRoot.host.style.setProperty(o, a);
|
|
186
186
|
}));
|
|
187
187
|
}
|
|
188
|
-
return this.renderState && (this.renderState === f.hidden ? ((
|
|
188
|
+
return this.renderState && (this.renderState === f.hidden ? ((t = this.wrapperRef.value) == null || t.classList.add("hidden"), (s = this.wrapperRef.value) == null || s.classList.remove("expanded")) : ((n = this.wrapperRef.value) == null || n.classList.remove("hidden"), (i = this.wrapperRef.value) == null || i.classList.add("expanded"))), this.applyBranding(), g`
|
|
189
189
|
<div class="widget-container" ${U(this.wrapperRef)}>
|
|
190
190
|
<ace-area entry=${this.entry}></ace-area>
|
|
191
191
|
</div>
|
|
@@ -271,25 +271,25 @@ c.styles = R`
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
`;
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
d([
|
|
275
|
+
T({ attribute: !1 })
|
|
276
276
|
], c.prototype, "container", 2);
|
|
277
|
-
|
|
277
|
+
d([
|
|
278
278
|
u()
|
|
279
279
|
], c.prototype, "componentPlatform", 2);
|
|
280
|
-
|
|
280
|
+
d([
|
|
281
281
|
u()
|
|
282
282
|
], c.prototype, "renderState", 2);
|
|
283
|
-
|
|
283
|
+
d([
|
|
284
284
|
u()
|
|
285
285
|
], c.prototype, "breakpoints", 2);
|
|
286
|
-
|
|
286
|
+
d([
|
|
287
287
|
u()
|
|
288
288
|
], c.prototype, "breakpointsSet", 2);
|
|
289
|
-
|
|
289
|
+
d([
|
|
290
290
|
u()
|
|
291
291
|
], c.prototype, "entry", 2);
|
|
292
|
-
c =
|
|
292
|
+
c = d([
|
|
293
293
|
S("ace-widget-wrapper")
|
|
294
294
|
], c);
|
|
295
295
|
/**
|
|
@@ -297,21 +297,21 @@ c = l([
|
|
|
297
297
|
* Copyright 2021 Google LLC
|
|
298
298
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
299
299
|
*/
|
|
300
|
-
class
|
|
301
|
-
constructor(
|
|
302
|
-
this.Y =
|
|
300
|
+
class ee {
|
|
301
|
+
constructor(t) {
|
|
302
|
+
this.Y = t;
|
|
303
303
|
}
|
|
304
304
|
disconnect() {
|
|
305
305
|
this.Y = void 0;
|
|
306
306
|
}
|
|
307
|
-
reconnect(
|
|
308
|
-
this.Y =
|
|
307
|
+
reconnect(t) {
|
|
308
|
+
this.Y = t;
|
|
309
309
|
}
|
|
310
310
|
deref() {
|
|
311
311
|
return this.Y;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
class
|
|
314
|
+
class te {
|
|
315
315
|
constructor() {
|
|
316
316
|
this.Z = void 0, this.q = void 0;
|
|
317
317
|
}
|
|
@@ -319,11 +319,11 @@ class et {
|
|
|
319
319
|
return this.Z;
|
|
320
320
|
}
|
|
321
321
|
pause() {
|
|
322
|
-
this.Z ?? (this.Z = new Promise((
|
|
322
|
+
this.Z ?? (this.Z = new Promise((t) => this.q = t));
|
|
323
323
|
}
|
|
324
324
|
resume() {
|
|
325
|
-
var
|
|
326
|
-
(
|
|
325
|
+
var t;
|
|
326
|
+
(t = this.q) == null || t.call(this), this.Z = this.q = void 0;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
@@ -331,15 +331,15 @@ class et {
|
|
|
331
331
|
* Copyright 2017 Google LLC
|
|
332
332
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
333
333
|
*/
|
|
334
|
-
const C = (
|
|
335
|
-
class
|
|
334
|
+
const C = (e) => !I(e) && typeof e.then == "function", x = 1073741823;
|
|
335
|
+
class se extends Y {
|
|
336
336
|
constructor() {
|
|
337
|
-
super(...arguments), this._$Cwt = x, this._$Cbt = [], this._$CK = new
|
|
337
|
+
super(...arguments), this._$Cwt = x, this._$Cbt = [], this._$CK = new ee(this), this._$CX = new te();
|
|
338
338
|
}
|
|
339
|
-
render(...
|
|
340
|
-
return
|
|
339
|
+
render(...t) {
|
|
340
|
+
return t.find((s) => !C(s)) ?? v;
|
|
341
341
|
}
|
|
342
|
-
update(
|
|
342
|
+
update(t, s) {
|
|
343
343
|
const n = this._$Cbt;
|
|
344
344
|
let i = n.length;
|
|
345
345
|
this._$Cbt = s;
|
|
@@ -348,16 +348,16 @@ class st extends k {
|
|
|
348
348
|
for (let a = 0; a < s.length && !(a > this._$Cwt); a++) {
|
|
349
349
|
const h = s[a];
|
|
350
350
|
if (!C(h)) return this._$Cwt = a, h;
|
|
351
|
-
a < i && h === n[a] || (this._$Cwt = x, i = 0, Promise.resolve(h).then(async (
|
|
351
|
+
a < i && h === n[a] || (this._$Cwt = x, i = 0, Promise.resolve(h).then(async (y) => {
|
|
352
352
|
for (; o.get(); ) await o.get();
|
|
353
|
-
const
|
|
354
|
-
if (
|
|
355
|
-
const
|
|
356
|
-
|
|
353
|
+
const l = r.deref();
|
|
354
|
+
if (l !== void 0) {
|
|
355
|
+
const $ = l._$Cbt.indexOf(h);
|
|
356
|
+
$ > -1 && $ < l._$Cwt && (l._$Cwt = $, l.setValue(y));
|
|
357
357
|
}
|
|
358
358
|
}));
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return v;
|
|
361
361
|
}
|
|
362
362
|
disconnected() {
|
|
363
363
|
this._$CK.disconnect(), this._$CX.pause();
|
|
@@ -366,49 +366,49 @@ class st extends k {
|
|
|
366
366
|
this._$CK.reconnect(this), this._$CX.resume();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
const
|
|
370
|
-
var
|
|
371
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
372
|
-
(o =
|
|
373
|
-
return
|
|
369
|
+
const ne = A(se);
|
|
370
|
+
var ie = Object.getOwnPropertyDescriptor, re = (e, t, s, n) => {
|
|
371
|
+
for (var i = n > 1 ? void 0 : n ? ie(t, s) : t, r = e.length - 1, o; r >= 0; r--)
|
|
372
|
+
(o = e[r]) && (i = o(i) || i);
|
|
373
|
+
return i;
|
|
374
374
|
};
|
|
375
|
-
const O =
|
|
376
|
-
let
|
|
375
|
+
const O = j(P);
|
|
376
|
+
let w = class extends O {
|
|
377
377
|
constructor() {
|
|
378
|
-
super(...arguments), this._resolveChildComponent = async (
|
|
378
|
+
super(...arguments), this._resolveChildComponent = async (e) => {
|
|
379
379
|
const s = (await this.container.getAsync(
|
|
380
380
|
"componentResolver"
|
|
381
|
-
)).getComponent(
|
|
381
|
+
)).getComponent(e);
|
|
382
382
|
if (s.then)
|
|
383
383
|
return s.then((n) => n.default);
|
|
384
|
-
}, this._resolveAllChildren = async (
|
|
385
|
-
|
|
386
|
-
let s = customElements.get(`ace-${
|
|
387
|
-
return s || (s = await this._resolveChildComponent(
|
|
388
|
-
...
|
|
384
|
+
}, this._resolveAllChildren = async (e) => Promise.all(
|
|
385
|
+
e.map(async (t) => {
|
|
386
|
+
let s = customElements.get(`ace-${t.type}`);
|
|
387
|
+
return s || (s = await this._resolveChildComponent(t.type || "")), {
|
|
388
|
+
...t,
|
|
389
389
|
component: s
|
|
390
390
|
};
|
|
391
391
|
})
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
394
|
render() {
|
|
395
|
-
var
|
|
395
|
+
var e;
|
|
396
396
|
return this.renderRoot.host.style.setProperty(
|
|
397
397
|
"--width",
|
|
398
398
|
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
|
399
399
|
), this.renderRoot.host.style.setProperty(
|
|
400
400
|
"--columns",
|
|
401
|
-
((
|
|
401
|
+
((e = this._propertiesProvider.value.columns) == null ? void 0 : e.toString()) || "1"
|
|
402
402
|
), W(
|
|
403
403
|
this.renderRoot.host,
|
|
404
404
|
this._propertiesProvider.value
|
|
405
|
-
),
|
|
406
|
-
${
|
|
405
|
+
), g`
|
|
406
|
+
${ne(
|
|
407
407
|
this._resolveAllChildren(this._childrenProvider.value).then(
|
|
408
|
-
(
|
|
409
|
-
${
|
|
408
|
+
(t) => g`
|
|
409
|
+
${t.map((s) => {
|
|
410
410
|
if (s.type === "area")
|
|
411
|
-
return
|
|
411
|
+
return g`<ace-area entry=${s.id}></ace-area>`;
|
|
412
412
|
const n = new s.component();
|
|
413
413
|
return n.entry = s.id, n;
|
|
414
414
|
})}
|
|
@@ -418,7 +418,7 @@ let b = class extends O {
|
|
|
418
418
|
`;
|
|
419
419
|
}
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
w.styles = [
|
|
422
422
|
O.styles || [],
|
|
423
423
|
R`
|
|
424
424
|
:host {
|
|
@@ -431,13 +431,13 @@ b.styles = [
|
|
|
431
431
|
}
|
|
432
432
|
`
|
|
433
433
|
];
|
|
434
|
-
|
|
434
|
+
w = re([
|
|
435
435
|
S("ace-area")
|
|
436
|
-
],
|
|
437
|
-
const
|
|
436
|
+
], w);
|
|
437
|
+
const ce = (e, t) => {
|
|
438
438
|
const s = new c();
|
|
439
|
-
s.container =
|
|
439
|
+
s.container = e, t.appendChild(s);
|
|
440
440
|
};
|
|
441
441
|
export {
|
|
442
|
-
|
|
442
|
+
ce as default
|
|
443
443
|
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-C7Sm0jBi.js");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const v=e=>(t,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2020 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const A=e=>e===null||typeof e!="object"&&typeof e!="function",P=e=>e.strings===void 0;/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const u=(e,t)=>{var n;const s=e._$AN;if(s===void 0)return!1;for(const i of s)(n=i._$AO)==null||n.call(i,t,!1),u(i,t);return!0},f=e=>{let t,s;do{if((t=e._$AM)===void 0)break;s=t._$AN,s.delete(e),e=t}while((s==null?void 0:s.size)===0)},w=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),k(t)}};function R(e){this._$AN!==void 0?(f(this),this._$AM=e,w(this)):this._$AM=e}function S(e,t=!1,s=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(n))for(let o=s;o<n.length;o++)u(n[o],!1),f(n[o]);else n!=null&&(u(n,!1),f(n));else u(this,e)}const k=e=>{e.type==r.t.CHILD&&(e._$AP??(e._$AP=S),e._$AQ??(e._$AQ=R))};class C extends r.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,n){super._$AT(t,s,n),w(this),this.isConnected=t._$AU}_$AO(t,s=!0){var n,i;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.call(this)),s&&(u(this,t),f(this))}setValue(t){if(P(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2020 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/const Y=()=>new O;let O=class{};const y=new WeakMap,L=r.e(class extends C{render(e){return r.E}update(e,[t]){var n;const s=t!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=t,this.ht=(n=e.options)==null?void 0:n.host,this.rt(this.ct=e.element)),r.E}rt(e){if(this.isConnected||(e=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let s=y.get(t);s===void 0&&(s=new WeakMap,y.set(t,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=y.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),E=async e=>await e.get("$widget").invoke("renderState"),D=async(e,t)=>{const s=e.get("$widget");return(await e.getAsync("actionResolver")).subscribe(s.name,t)},M=(e,t,s=!1)=>{const n=e.reduce((a,{breakpoints:c=[],values:d})=>c.length?t.some(g=>c.includes(g))?{...a,...d}:a:{...a,...d},{}),i={},o=n.type;return i.height=n.height||"",i.width=n.width||"",n.type==="floating"||n.type==="inline"&&s&&(i.height="calc(100vh - 120px)"),{type:o,styles:i}};var T=Object.defineProperty,z=Object.getOwnPropertyDescriptor,l=(e,t,s,n)=>{for(var i=n>1?void 0:n?z(t,s):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,s,i):a(i))||i);return n&&i&&T(t,s,i),i};let h=class extends r.r{constructor(){super(),this._provider=new r.i$1(this,r.containerContext,void 0),this.wrapperRef=Y(),this.breakpoints=[],this.breakpointsSet=!1}connectedCallback(){super.connectedCallback(),this._provider.setValue(this.container),this.container&&(E(this.container).then(e=>{this.renderState=e}),D(this.container,(e,t)=>{switch(t){case"close":case"open":this.renderState=t==="open"?r.ot.open:r.ot.closed;break;case"hide":this.renderState=r.ot.hidden}}).then(e=>{this._unsubscribeRenderState=e}),r.et.getInstance(this.container).then(e=>{this.componentPlatform=e,this.breakpoints=this.componentPlatform.breakpoints,this.breakpointsSet=!0,this._unsubscribePropChange=this.componentPlatform.events.subscribe("components:properties-changed",(t,s)=>{var n,i;((n=s==null?void 0:s.node)==null?void 0:n.type)==="root"&&(this.breakpoints=(i=this.componentPlatform)!=null&&i.breakpoints?[...this.componentPlatform.breakpoints]:[])}),this.entry=this.componentPlatform.nodes.root.children.default[0].id||void 0}))}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeRenderState&&this._unsubscribeRenderState(),this._unsubscribePropChange&&this._unsubscribePropChange()}applyBranding(){var e;if(this.wrapperRef.value){const t=(e=this.container)==null?void 0:e.get("$settings");t!=null&&t.branding&&r.mapBranding(t.branding,this.wrapperRef.value)}}render(){var t,s,n,i;let e;if(!this.entry||!this.breakpointsSet)return r.E;if(this.container&&this.renderState){const[o]=this.container.get("widgetDOMElements");o&&o.setAttribute("data-state",this.renderState)}if(this.container){const o=this.container.get("$settings");o!=null&&o.layout&&(e=M(o.layout,this.breakpoints,!!o.trigger),e.type==="floating"?(this.renderRoot.host.classList.add("floating"),this.renderRoot.host.classList.remove("inline")):(this.renderRoot.host.classList.add("inline"),this.renderRoot.host.classList.remove("floating")),Object.entries(e.styles).forEach(([a,c])=>{this.renderRoot.host.style.setProperty(a,c)}))}return this.renderState&&(this.renderState===r.ot.hidden?((t=this.wrapperRef.value)==null||t.classList.add("hidden"),(s=this.wrapperRef.value)==null||s.classList.remove("expanded")):((n=this.wrapperRef.value)==null||n.classList.remove("hidden"),(i=this.wrapperRef.value)==null||i.classList.add("expanded"))),this.applyBranding(),r.x`
|
|
18
|
+
<div class="widget-container" ${L(this.wrapperRef)}>
|
|
19
|
+
<ace-area entry=${this.entry}></ace-area>
|
|
20
|
+
</div>
|
|
21
|
+
`}};h.styles=r.i$2`
|
|
22
|
+
:host {
|
|
23
|
+
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
24
|
+
--spacing-xs: 0.2rem;
|
|
25
|
+
--spacing-sm: 0.5rem;
|
|
26
|
+
--spacing-md: 1rem;
|
|
27
|
+
--spacing-lg: 1.2rem;
|
|
28
|
+
--spacing-xl: 1.8rem;
|
|
29
|
+
|
|
30
|
+
/* --primary-color: #29003e; */
|
|
31
|
+
/* --secondary-color: #00558f; */
|
|
32
|
+
--text-color: #222222;
|
|
33
|
+
--link-color: #990ae3;
|
|
34
|
+
--gray-color: #f3f3f8;
|
|
35
|
+
--gray-dark-color: #a6a6a6;
|
|
36
|
+
|
|
37
|
+
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
|
38
|
+
--border-radius: var(--spacing-sm);
|
|
39
|
+
--border-radius-sm: var(--spacing-sm);
|
|
40
|
+
}
|
|
41
|
+
:host {
|
|
42
|
+
--voca-rem-multiplier: 0.625;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host(.floating) {
|
|
48
|
+
position: fixed;
|
|
49
|
+
z-index: 6;
|
|
50
|
+
inset: auto 20px 95px auto;
|
|
51
|
+
max-height: calc(100vh - 120px);
|
|
52
|
+
}
|
|
53
|
+
:host(.floating) .widget-container {
|
|
54
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
55
|
+
border-radius: 0.7rem;
|
|
56
|
+
}
|
|
57
|
+
:host(.inline) {
|
|
58
|
+
height: 100%;
|
|
59
|
+
position: fixed;
|
|
60
|
+
inset: 0 0 0 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
* {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
}
|
|
66
|
+
.widget-container {
|
|
67
|
+
height: 100%;
|
|
68
|
+
background-color: var(--primary-background);
|
|
69
|
+
padding: 0 var(--spacing-sm);
|
|
70
|
+
}
|
|
71
|
+
.widget-container.expanded {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
animation: slideUp 0.5s;
|
|
74
|
+
}
|
|
75
|
+
.widget-container.hidden {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
animation: slideDown 0.5s;
|
|
78
|
+
}
|
|
79
|
+
@keyframes slideDown {
|
|
80
|
+
from {
|
|
81
|
+
transform: translateY(0);
|
|
82
|
+
opacity: 1;
|
|
83
|
+
}
|
|
84
|
+
to {
|
|
85
|
+
transform: translateY(100%);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
@keyframes slideUp {
|
|
90
|
+
from {
|
|
91
|
+
transform: translateY(100%);
|
|
92
|
+
opacity: 0;
|
|
93
|
+
}
|
|
94
|
+
to {
|
|
95
|
+
transform: translateY(0);
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`;l([r.n({attribute:!1})],h.prototype,"container",2);l([r.r$1()],h.prototype,"componentPlatform",2);l([r.r$1()],h.prototype,"renderState",2);l([r.r$1()],h.prototype,"breakpoints",2);l([r.r$1()],h.prototype,"breakpointsSet",2);l([r.r$1()],h.prototype,"entry",2);h=l([v("ace-widget-wrapper")],h);/**
|
|
100
|
+
* @license
|
|
101
|
+
* Copyright 2021 Google LLC
|
|
102
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
|
+
*/class j{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class N{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??(this.Z=new Promise(t=>this.q=t))}resume(){var t;(t=this.q)==null||t.call(this),this.Z=this.q=void 0}}/**
|
|
104
|
+
* @license
|
|
105
|
+
* Copyright 2017 Google LLC
|
|
106
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
+
*/const b=e=>!A(e)&&typeof e.then=="function",_=1073741823;class q extends C{constructor(){super(...arguments),this._$Cwt=_,this._$Cbt=[],this._$CK=new j(this),this._$CX=new N}render(...t){return t.find(s=>!b(s))??r.T}update(t,s){const n=this._$Cbt;let i=n.length;this._$Cbt=s;const o=this._$CK,a=this._$CX;this.isConnected||this.disconnected();for(let c=0;c<s.length&&!(c>this._$Cwt);c++){const d=s[c];if(!b(d))return this._$Cwt=c,d;c<i&&d===n[c]||(this._$Cwt=_,i=0,Promise.resolve(d).then(async g=>{for(;a.get();)await a.get();const p=o.deref();if(p!==void 0){const m=p._$Cbt.indexOf(d);m>-1&&m<p._$Cwt&&(p._$Cwt=m,p.setValue(g))}}))}return r.T}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const I=r.e(q);var W=Object.getOwnPropertyDescriptor,H=(e,t,s,n)=>{for(var i=n>1?void 0:n?W(t,s):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i};const x=r.WidgetComponent(r.r);let $=class extends x{constructor(){super(...arguments),this._resolveChildComponent=async e=>{const s=(await this.container.getAsync("componentResolver")).getComponent(e);if(s.then)return s.then(n=>n.default)},this._resolveAllChildren=async e=>Promise.all(e.map(async t=>{let s=customElements.get(`ace-${t.type}`);return s||(s=await this._resolveChildComponent(t.type||"")),{...t,component:s}}))}render(){var e;return this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),this.renderRoot.host.style.setProperty("--columns",((e=this._propertiesProvider.value.columns)==null?void 0:e.toString())||"1"),r.appendStyleFromProperties(this.renderRoot.host,this._propertiesProvider.value),r.x`
|
|
108
|
+
${I(this._resolveAllChildren(this._childrenProvider.value).then(t=>r.x`
|
|
109
|
+
${t.map(s=>{if(s.type==="area")return r.x`<ace-area entry=${s.id}></ace-area>`;const n=new s.component;return n.entry=s.id,n})}
|
|
110
|
+
`))}
|
|
111
|
+
`}};$.styles=[x.styles||[],r.i$2`
|
|
112
|
+
:host {
|
|
113
|
+
height: 100%;
|
|
114
|
+
display: grid;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
grid-auto-rows: max-content;
|
|
117
|
+
grid-template-rows: auto;
|
|
118
|
+
grid-template-columns: repeat(var(--columns), 1fr);
|
|
119
|
+
}
|
|
120
|
+
`];$=H([v("ace-area")],$);const K=(e,t)=>{const s=new h;s.container=e,t.appendChild(s)};exports.default=K;
|