@telia-ace/widget-runtime-flamingo 1.0.6 → 1.0.7

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { o as a, D as r, W as o, G as s, W as i, h as n, c as d, k as c, q as x, r as C, g as l, l as p, j as W } from "./index-e248f756.js";
1
+ import { o as a, D as r, W as o, G as s, W as i, h as n, c as d, k as c, q as x, r as C, g as l, l as p, j as W } from "./index-53eef382.js";
2
2
  export {
3
3
  a as ActionsController,
4
4
  r as DataProvider,
@@ -0,0 +1,21 @@
1
+ import { LitElement } from 'lit';
2
+ import { childrenContext } from '../context/children.context';
3
+ import { propertiesCtx } from '../context/properties.context';
4
+ import { contextCtx } from '../context/context.context';
5
+ import { ContextProvider } from '@lit-labs/context';
6
+ import { Container } from '@webprovisions/platform';
7
+ import { ComponentDescriptor } from '@telia-ace/widget-core';
8
+ type Constructor<T = {}> = new (...args: any[]) => T;
9
+ export declare class NodeMixinInterface {
10
+ entry: string;
11
+ descriptor?: ComponentDescriptor;
12
+ component?: any;
13
+ layout: Record<string, any>;
14
+ container?: Container;
15
+ _contextProvider: ContextProvider<typeof contextCtx>;
16
+ _propertiesProvider: ContextProvider<typeof propertiesCtx>;
17
+ _childrenProvider: ContextProvider<typeof childrenContext>;
18
+ }
19
+ export declare const NodeMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<NodeMixinInterface> & T;
20
+ export {};
21
+ //# sourceMappingURL=node.mixin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.mixin.d.ts","sourceRoot":"","sources":["../../src/mixins/node.mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,eAAe,EAAW,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EACL,SAAS,EAEV,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,mBAAmB,EAIpB,MAAM,wBAAwB,CAAC;AAGhC,KAAK,WAAW,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAGrD,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gBAAgB,EAAE,eAAe,CAAC,OAAO,UAAU,CAAC,CAAC;IACrD,mBAAmB,EAAE,eAAe,CAAC,OAAO,aAAa,CAAC,CAAC;IAC3D,iBAAiB,EAAE,eAAe,CAAC,OAAO,eAAe,CAAC,CAAC;CAC5D;AAED,eAAO,MAAM,SAAS,2FAuGrB,CAAC"}
@@ -0,0 +1,604 @@
1
+ var q = Object.defineProperty, W = Object.defineProperties;
2
+ var Y = Object.getOwnPropertyDescriptors;
3
+ var z = Object.getOwnPropertySymbols;
4
+ var U = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
5
+ var D = (e, t, s) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, f = (e, t) => {
6
+ for (var s in t || (t = {}))
7
+ U.call(t, s) && D(e, s, t[s]);
8
+ if (z)
9
+ for (var s of z(t))
10
+ F.call(t, s) && D(e, s, t[s]);
11
+ return e;
12
+ }, E = (e, t) => W(e, Y(t));
13
+ var y = (e, t, s) => new Promise((r, o) => {
14
+ var i = (c) => {
15
+ try {
16
+ a(s.next(c));
17
+ } catch (d) {
18
+ o(d);
19
+ }
20
+ }, n = (c) => {
21
+ try {
22
+ a(s.throw(c));
23
+ } catch (d) {
24
+ o(d);
25
+ }
26
+ }, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(i, n);
27
+ a((s = s.apply(e, t)).next());
28
+ });
29
+ import { s as Q, a as B, i as K, t as J, e as X, A as w, b as k, c as N, p as V, m as _, x, d as O, n as C, f as p, g as Z, h as tt, j as et, k as st, l as ot, E as G } from "./index-53eef382.js";
30
+ /**
31
+ * @license
32
+ * Copyright 2017 Google LLC
33
+ * SPDX-License-Identifier: BSD-3-Clause
34
+ */
35
+ const S = (e) => (t) => typeof t == "function" ? ((s, r) => (customElements.define(s, r), r))(e, t) : ((s, r) => {
36
+ const { kind: o, elements: i } = r;
37
+ return { kind: o, elements: i, finisher(n) {
38
+ customElements.define(s, n);
39
+ } };
40
+ })(e, t);
41
+ /**
42
+ * @license
43
+ * Copyright 2017 Google LLC
44
+ * SPDX-License-Identifier: BSD-3-Clause
45
+ */
46
+ const rt = ({ finisher: e, descriptor: t }) => (s, r) => {
47
+ var o;
48
+ if (r === void 0) {
49
+ const i = (o = s.originalKey) !== null && o !== void 0 ? o : s.key, n = t != null ? { kind: "method", placement: "prototype", key: i, descriptor: t(s.key) } : E(f({}, s), { key: i });
50
+ return e != null && (n.finisher = function(a) {
51
+ e(a, i);
52
+ }), n;
53
+ }
54
+ {
55
+ const i = s.constructor;
56
+ t !== void 0 && Object.defineProperty(s, r, t(r)), e == null || e(i, r);
57
+ }
58
+ };
59
+ /**
60
+ * @license
61
+ * Copyright 2021 Google LLC
62
+ * SPDX-License-Identifier: BSD-3-Clause
63
+ */
64
+ let it = class {
65
+ constructor(t) {
66
+ this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
67
+ for (const [s, { disposer: r }] of this.subscriptions)
68
+ s(this.o, r);
69
+ }, t !== void 0 && (this.value = t);
70
+ }
71
+ get value() {
72
+ return this.o;
73
+ }
74
+ set value(t) {
75
+ this.setValue(t);
76
+ }
77
+ setValue(t, s = !1) {
78
+ const r = s || !Object.is(t, this.o);
79
+ this.o = t, r && this.updateObservers();
80
+ }
81
+ addCallback(t, s, r) {
82
+ if (!r)
83
+ return void t(this.value);
84
+ this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
85
+ this.subscriptions.delete(t);
86
+ }, consumerHost: s });
87
+ const { disposer: o } = this.subscriptions.get(t);
88
+ t(this.value, o);
89
+ }
90
+ clearCallbacks() {
91
+ this.subscriptions.clear();
92
+ }
93
+ };
94
+ /**
95
+ * @license
96
+ * Copyright 2021 Google LLC
97
+ * SPDX-License-Identifier: BSD-3-Clause
98
+ */
99
+ class nt extends Event {
100
+ constructor(t) {
101
+ super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
102
+ }
103
+ }
104
+ let v = class extends it {
105
+ constructor(t, s, r) {
106
+ super(s.context !== void 0 ? s.initialValue : r), this.onContextRequest = (o) => {
107
+ const i = o.composedPath()[0];
108
+ o.context === this.context && i !== this.host && (o.stopPropagation(), this.addCallback(o.callback, i, o.subscribe));
109
+ }, this.onProviderRequest = (o) => {
110
+ const i = o.composedPath()[0];
111
+ if (o.context === this.context && i !== this.host) {
112
+ for (const [n, { consumerHost: a }] of this.subscriptions)
113
+ a.dispatchEvent(new Q(this.context, n, !0));
114
+ o.stopPropagation();
115
+ }
116
+ }, this.host = t, s.context !== void 0 ? this.context = s.context : this.context = s, this.attachListeners(), this.host.addController(this);
117
+ }
118
+ attachListeners() {
119
+ this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
120
+ }
121
+ hostConnected() {
122
+ this.host.dispatchEvent(new nt(this.context));
123
+ }
124
+ };
125
+ /**
126
+ * @license
127
+ * Copyright 2022 Google LLC
128
+ * SPDX-License-Identifier: BSD-3-Clause
129
+ */
130
+ function at({ context: e, subscribe: t }) {
131
+ return rt({ finisher: (s, r) => {
132
+ s.addInitializer((o) => {
133
+ new B(o, { context: e, callback: (i) => {
134
+ o[r] = i;
135
+ }, subscribe: t });
136
+ });
137
+ } });
138
+ }
139
+ /**
140
+ * @license
141
+ * Copyright 2020 Google LLC
142
+ * SPDX-License-Identifier: BSD-3-Clause
143
+ */
144
+ const ct = (e) => e.strings === void 0;
145
+ /**
146
+ * @license
147
+ * Copyright 2017 Google LLC
148
+ * SPDX-License-Identifier: BSD-3-Clause
149
+ */
150
+ const g = (e, t) => {
151
+ var s, r;
152
+ const o = e._$AN;
153
+ if (o === void 0)
154
+ return !1;
155
+ for (const i of o)
156
+ (r = (s = i)._$AO) === null || r === void 0 || r.call(s, t, !1), g(i, t);
157
+ return !0;
158
+ }, $ = (e) => {
159
+ let t, s;
160
+ do {
161
+ if ((t = e._$AM) === void 0)
162
+ break;
163
+ s = t._$AN, s.delete(e), e = t;
164
+ } while ((s == null ? void 0 : s.size) === 0);
165
+ }, M = (e) => {
166
+ for (let t; t = e._$AM; e = t) {
167
+ let s = t._$AN;
168
+ if (s === void 0)
169
+ t._$AN = s = /* @__PURE__ */ new Set();
170
+ else if (s.has(e))
171
+ break;
172
+ s.add(e), ht(t);
173
+ }
174
+ };
175
+ function lt(e) {
176
+ this._$AN !== void 0 ? ($(this), this._$AM = e, M(this)) : this._$AM = e;
177
+ }
178
+ function dt(e, t = !1, s = 0) {
179
+ const r = this._$AH, o = this._$AN;
180
+ if (o !== void 0 && o.size !== 0)
181
+ if (t)
182
+ if (Array.isArray(r))
183
+ for (let i = s; i < r.length; i++)
184
+ g(r[i], !1), $(r[i]);
185
+ else
186
+ r != null && (g(r, !1), $(r));
187
+ else
188
+ g(this, e);
189
+ }
190
+ const ht = (e) => {
191
+ var t, s, r, o;
192
+ e.type == J.CHILD && ((t = (r = e)._$AP) !== null && t !== void 0 || (r._$AP = dt), (s = (o = e)._$AQ) !== null && s !== void 0 || (o._$AQ = lt));
193
+ };
194
+ class pt extends K {
195
+ constructor() {
196
+ super(...arguments), this._$AN = void 0;
197
+ }
198
+ _$AT(t, s, r) {
199
+ super._$AT(t, s, r), M(this), this.isConnected = t._$AU;
200
+ }
201
+ _$AO(t, s = !0) {
202
+ var r, o;
203
+ t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) === null || r === void 0 || r.call(this) : (o = this.disconnected) === null || o === void 0 || o.call(this)), s && (g(this, t), $(this));
204
+ }
205
+ setValue(t) {
206
+ if (ct(this._$Ct))
207
+ this._$Ct._$AI(t, this);
208
+ else {
209
+ const s = [...this._$Ct._$AH];
210
+ s[this._$Ci] = t, this._$Ct._$AI(s, this, 0);
211
+ }
212
+ }
213
+ disconnected() {
214
+ }
215
+ reconnected() {
216
+ }
217
+ }
218
+ /**
219
+ * @license
220
+ * Copyright 2020 Google LLC
221
+ * SPDX-License-Identifier: BSD-3-Clause
222
+ */
223
+ const ut = () => new ft();
224
+ class ft {
225
+ }
226
+ const P = /* @__PURE__ */ new WeakMap(), vt = X(class extends pt {
227
+ render(e) {
228
+ return w;
229
+ }
230
+ update(e, [t]) {
231
+ var s;
232
+ const r = t !== this.G;
233
+ return r && this.G !== void 0 && this.ot(void 0), (r || this.rt !== this.lt) && (this.G = t, this.dt = (s = e.options) === null || s === void 0 ? void 0 : s.host, this.ot(this.lt = e.element)), w;
234
+ }
235
+ ot(e) {
236
+ var t;
237
+ if (typeof this.G == "function") {
238
+ const s = (t = this.dt) !== null && t !== void 0 ? t : globalThis;
239
+ let r = P.get(s);
240
+ r === void 0 && (r = /* @__PURE__ */ new WeakMap(), P.set(s, r)), r.get(this.G) !== void 0 && this.G.call(this.dt, void 0), r.set(this.G, e), e !== void 0 && this.G.call(this.dt, e);
241
+ } else
242
+ this.G.value = e;
243
+ }
244
+ get rt() {
245
+ var e, t, s;
246
+ return typeof this.G == "function" ? (t = P.get((e = this.dt) !== null && e !== void 0 ? e : globalThis)) === null || t === void 0 ? void 0 : t.get(this.G) : (s = this.G) === null || s === void 0 ? void 0 : s.value;
247
+ }
248
+ disconnected() {
249
+ this.rt === this.lt && this.ot(void 0);
250
+ }
251
+ reconnected() {
252
+ this.ot(this.lt);
253
+ }
254
+ }), mt = (e) => y(void 0, null, function* () {
255
+ return yield e.get("$widget").invoke("renderState");
256
+ }), bt = (e, t) => y(void 0, null, function* () {
257
+ const s = e.get("$widget");
258
+ return (yield e.getAsync("actionResolver")).subscribe(s.name, t);
259
+ }), gt = (e, t, s = !1) => {
260
+ const r = e.reduce(
261
+ (n, { breakpoints: a = [], values: c }) => a.length ? t.some((d) => a.includes(d)) ? f(f({}, n), c) : n : f(f({}, n), c),
262
+ {}
263
+ ), o = {};
264
+ let i = r.type;
265
+ return o.height = r.height || "", o.width = r.width || "", r.type === "floating" || r.type === "inline" && s && (o.height = "calc(100vh - 120px)"), { type: i, styles: o };
266
+ };
267
+ var yt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, u = (e, t, s, r) => {
268
+ for (var o = r > 1 ? void 0 : r ? _t(t, s) : t, i = e.length - 1, n; i >= 0; i--)
269
+ (n = e[i]) && (o = (r ? n(t, s, o) : n(o)) || o);
270
+ return r && o && yt(t, s, o), o;
271
+ };
272
+ let h = class extends k {
273
+ constructor() {
274
+ super(), this._provider = new v(this, N, void 0), this.wrapperRef = ut(), this.breakpoints = [], this.breakpointsSet = !1;
275
+ }
276
+ connectedCallback() {
277
+ super.connectedCallback(), this._provider.setValue(this.container), this.container && (mt(this.container).then((e) => {
278
+ this.renderState = e;
279
+ }), bt(this.container, (e, t) => {
280
+ switch (t) {
281
+ case "close":
282
+ case "open":
283
+ this.renderState = t === "open" ? _.open : _.closed;
284
+ break;
285
+ case "hide":
286
+ this.renderState = _.hidden;
287
+ }
288
+ }).then((e) => {
289
+ this._unsubscribeRenderState = e;
290
+ }), V.getInstance(this.container).then(
291
+ (e) => {
292
+ this.componentPlatform = e, this.breakpoints = this.componentPlatform.breakpoints, this.breakpointsSet = !0, this._unsubscribePropChange = this.componentPlatform.events.subscribe(
293
+ "components:properties-changed",
294
+ (t, s) => {
295
+ var r, o;
296
+ ((r = s == null ? void 0 : s.node) == null ? void 0 : r.type) === "root" && (this.breakpoints = (o = this.componentPlatform) != null && o.breakpoints ? [...this.componentPlatform.breakpoints] : []);
297
+ }
298
+ ), this.entry = this.componentPlatform.nodes.root.children.default[0].id || void 0;
299
+ }
300
+ ));
301
+ }
302
+ disconnectedCallback() {
303
+ super.disconnectedCallback(), this._unsubscribeRenderState && this._unsubscribeRenderState(), this._unsubscribePropChange && this._unsubscribePropChange();
304
+ }
305
+ render() {
306
+ var t, s, r, o;
307
+ let e;
308
+ if (!this.entry || !this.breakpointsSet)
309
+ return w;
310
+ if (this.container && this.renderState) {
311
+ const [i] = this.container.get("widgetDOMElements");
312
+ i && i.setAttribute("data-state", this.renderState);
313
+ }
314
+ if (this.container) {
315
+ const i = this.container.get("$settings");
316
+ i != null && i.layout && (e = gt(
317
+ i.layout,
318
+ this.breakpoints,
319
+ !!i.trigger
320
+ ), 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(([n, a]) => {
321
+ this.renderRoot.host.style.setProperty(n, a);
322
+ }));
323
+ }
324
+ return this.renderState && (this.renderState === _.hidden ? ((t = this.wrapperRef.value) == null || t.classList.add("hidden"), (s = this.wrapperRef.value) == null || s.classList.remove("expanded")) : ((r = this.wrapperRef.value) == null || r.classList.remove("hidden"), (o = this.wrapperRef.value) == null || o.classList.add("expanded"))), x`
325
+ <div class="widget-container" ${vt(this.wrapperRef)}>
326
+ <ace-area entry=${this.entry}></ace-area>
327
+ <!-- <widget-component entry=${this.entry}></widget-component> -->
328
+ </div>
329
+ `;
330
+ }
331
+ };
332
+ h.styles = O`
333
+ :host {
334
+ --voca-rem-multiplier: 0.625;
335
+ box-sizing: border-box;
336
+ display: block;
337
+ }
338
+
339
+ :host(.floating) {
340
+ position: fixed;
341
+ z-index: 6;
342
+ inset: auto 20px 95px auto;
343
+ max-height: calc(100vh - 120px);
344
+ }
345
+ :host(.floating) .widget-container {
346
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
347
+ border-radius: 0.7rem;
348
+ }
349
+ :host(.inline) {
350
+ position: fixed;
351
+ inset: 0 0 0 0;
352
+ }
353
+
354
+ * {
355
+ box-sizing: border-box;
356
+ }
357
+ .widget-container.expanded {
358
+ opacity: 1;
359
+ animation: slideUp 0.5s;
360
+ }
361
+ .widget-container.hidden {
362
+ opacity: 0;
363
+ animation: slideDown 0.5s;
364
+ }
365
+ @keyframes slideDown {
366
+ from {
367
+ transform: translateY(0);
368
+ opacity: 1;
369
+ }
370
+ to {
371
+ transform: translateY(100%);
372
+ opacity: 0;
373
+ }
374
+ }
375
+ @keyframes slideUp {
376
+ from {
377
+ transform: translateY(100%);
378
+ opacity: 0;
379
+ }
380
+ to {
381
+ transform: translateY(0);
382
+ opacity: 1;
383
+ }
384
+ }
385
+ `;
386
+ u([
387
+ C({ attribute: !1 })
388
+ ], h.prototype, "container", 2);
389
+ u([
390
+ p()
391
+ ], h.prototype, "componentPlatform", 2);
392
+ u([
393
+ p()
394
+ ], h.prototype, "renderState", 2);
395
+ u([
396
+ p()
397
+ ], h.prototype, "breakpoints", 2);
398
+ u([
399
+ p()
400
+ ], h.prototype, "breakpointsSet", 2);
401
+ u([
402
+ p()
403
+ ], h.prototype, "entry", 2);
404
+ h = u([
405
+ S("wrapper-component")
406
+ ], h);
407
+ var xt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, b = (e, t, s, r) => {
408
+ for (var o = r > 1 ? void 0 : r ? wt(t, s) : t, i = e.length - 1, n; i >= 0; i--)
409
+ (n = e[i]) && (o = (r ? n(t, s, o) : n(o)) || o);
410
+ return r && o && xt(t, s, o), o;
411
+ };
412
+ const H = (e) => {
413
+ class t extends e {
414
+ constructor() {
415
+ super(...arguments), this.entry = "", this._descriptorProvider = new v(
416
+ this,
417
+ Z,
418
+ void 0
419
+ ), this._childrenProvider = new v(this, tt, []), this._propertiesProvider = new v(this, et, {}), this._contextProvider = new v(this, st, {}), this._layoutProvider = new v(this, ot, {}), this.layout = {};
420
+ }
421
+ connectedCallback() {
422
+ super.connectedCallback(), this.container && V.getInstance(this.container).then(
423
+ (r) => y(this, null, function* () {
424
+ const o = r.nodes.get(this.entry);
425
+ if (o) {
426
+ this._propertyChangeListener = r.events.subscribe(
427
+ "components:properties-changed",
428
+ (d, m) => {
429
+ o.id === m.node.id && this._propertiesProvider.setValue(
430
+ m.node.attributes.properties
431
+ );
432
+ }
433
+ );
434
+ const i = "default";
435
+ this.descriptor = G(o, i), this._unmountNode = o.mount(this.container), this._descriptorProvider.setValue(this.descriptor), this._propertiesProvider.setValue(
436
+ o.attributes.properties
437
+ ), this._contextProvider.setValue(o.attributes.context), this.layout = o.attributes.layout, this._layoutProvider.setValue(this.layout);
438
+ const n = o.getChildren(i).map((d) => G(d));
439
+ this._childrenProvider.setValue(n);
440
+ const c = (yield this.container.getAsync("componentResolver")).getComponent(
441
+ this.descriptor.type || ""
442
+ );
443
+ c.then && c.then((d) => {
444
+ this.component = d.default;
445
+ });
446
+ }
447
+ })
448
+ );
449
+ }
450
+ disconnectedCallback() {
451
+ super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._unmountNode && this._unmountNode();
452
+ }
453
+ }
454
+ return b([
455
+ at({ context: N }),
456
+ C({ attribute: !1 })
457
+ ], t.prototype, "container", 2), b([
458
+ C()
459
+ ], t.prototype, "entry", 2), b([
460
+ p()
461
+ ], t.prototype, "descriptor", 2), b([
462
+ p()
463
+ ], t.prototype, "component", 2), b([
464
+ p()
465
+ ], t.prototype, "layout", 2), t;
466
+ }, l = (e, t, s) => {
467
+ e && s.style.setProperty(t, e);
468
+ }, T = (e, t) => {
469
+ var s, r, o, i, n, a, c, d, m, L, j;
470
+ l((s = e.colors) == null ? void 0 : s.primary, "--primary-color", t), l((r = e.colors) == null ? void 0 : r.secondary, "--secondary-color", t), l((o = e.colors) == null ? void 0 : o.text, "--text-color", t), l((i = e.colors) == null ? void 0 : i.link, "--link-color", t), l((n = e.colors) == null ? void 0 : n.gray, "--gray-color", t), l((a = e.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), l((c = e.spacing) == null ? void 0 : c.xs, "--spacing-xs", t), l((d = e.spacing) == null ? void 0 : d.sm, "--spacing-sm", t), l((m = e.spacing) == null ? void 0 : m.md, "--spacing-md", t), l((L = e.spacing) == null ? void 0 : L.lg, "--spacing-lg", t), l((j = e.spacing) == null ? void 0 : j.xl, "--spacing-xl", t), l(e.boxShadow, "--box-shadow", t), l(e.borderRadius, "--border-radius", t), l(e.borderRadiusSm, "--border-radius-sm", t), l(e.fontFamily, "--font-family", t);
471
+ }, $t = (e) => {
472
+ const t = {};
473
+ return Object.keys(e).forEach((s) => {
474
+ s.indexOf("css-") > -1 && (t[s] = e[s]);
475
+ }), t;
476
+ }, I = (e, t) => {
477
+ const s = $t(t);
478
+ Object.entries(s).forEach(([r, o]) => {
479
+ e.style.setProperty(r.replace("css-", ""), o);
480
+ });
481
+ };
482
+ var Pt = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, Rt = (e, t, s, r) => {
483
+ for (var o = r > 1 ? void 0 : r ? Ct(t, s) : t, i = e.length - 1, n; i >= 0; i--)
484
+ (n = e[i]) && (o = (r ? n(t, s, o) : n(o)) || o);
485
+ return r && o && Pt(t, s, o), o;
486
+ };
487
+ let R = class extends H(k) {
488
+ render() {
489
+ if (!this.component)
490
+ return w;
491
+ const e = new this.component(), t = this._contextProvider.value;
492
+ return T(t, this.renderRoot.host), this.renderRoot.host.style.setProperty(
493
+ "--width",
494
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
495
+ ), I(
496
+ this.renderRoot.host,
497
+ this._propertiesProvider.value
498
+ ), e;
499
+ }
500
+ };
501
+ R.styles = O`
502
+ :host {
503
+ grid-column: span var(--width);
504
+ max-width: 100%;
505
+ overflow: hidden;
506
+ box-sizing: border-box;
507
+ display: block;
508
+
509
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
510
+ --spacing-xs: 0.2rem;
511
+ --spacing-sm: 0.5rem;
512
+ --spacing-md: 1rem;
513
+ --spacing-lg: 1.2rem;
514
+ --spacing-xl: 1.8rem;
515
+
516
+ --primary-color: #29003e;
517
+ --secondary-color: #00558f;
518
+ --text-color: #222222;
519
+ --link-color: #990ae3;
520
+ --gray-color: #efefef;
521
+ --gray-dark-color: #a6a6a6;
522
+
523
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
524
+ --border-radius: 1rem;
525
+ --border-radius-sm: 0.3rem;
526
+ }
527
+ * {
528
+ box-sizing: border-box;
529
+ }
530
+ `;
531
+ R = Rt([
532
+ S("widget-component")
533
+ ], R);
534
+ var At = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, Ot = (e, t, s, r) => {
535
+ for (var o = r > 1 ? void 0 : r ? kt(t, s) : t, i = e.length - 1, n; i >= 0; i--)
536
+ (n = e[i]) && (o = (r ? n(t, s, o) : n(o)) || o);
537
+ return r && o && At(t, s, o), o;
538
+ };
539
+ let A = class extends H(k) {
540
+ render() {
541
+ var e;
542
+ return T(this._contextProvider.value, this.renderRoot.host), this.renderRoot.host.style.setProperty(
543
+ "--width",
544
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
545
+ ), this.renderRoot.host.style.setProperty(
546
+ "--columns",
547
+ ((e = this._propertiesProvider.value.columns) == null ? void 0 : e.toString()) || "1"
548
+ ), I(
549
+ this.renderRoot.host,
550
+ this._propertiesProvider.value
551
+ ), x`
552
+ ${this._childrenProvider.value.map(
553
+ (t) => t.type === "area" ? x`<ace-area entry=${t.id}></ace-area>` : x`<widget-component entry=${t.id}></widget-component>`
554
+ )}
555
+ `;
556
+ }
557
+ };
558
+ A.styles = O`
559
+ :host {
560
+ grid-column: span var(--width);
561
+ max-width: 100%;
562
+ overflow: hidden;
563
+ box-sizing: border-box;
564
+
565
+ height: 100%;
566
+ display: grid;
567
+ justify-content: center;
568
+ grid-auto-rows: max-content;
569
+ grid-template-rows: auto;
570
+ grid-template-columns: repeat(var(--columns), 1fr);
571
+
572
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
573
+ --spacing-xs: 0.2rem;
574
+ --spacing-sm: 0.5rem;
575
+ --spacing-md: 1rem;
576
+ --spacing-lg: 1.2rem;
577
+ --spacing-xl: 1.8rem;
578
+
579
+ --primary-color: #29003e;
580
+ --secondary-color: #00558f;
581
+ --text-color: #222222;
582
+ --link-color: #990ae3;
583
+ --gray-color: #efefef;
584
+ --gray-dark-color: #a6a6a6;
585
+
586
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
587
+ --border-radius: 1rem;
588
+ --border-radius-sm: 0.3rem;
589
+ }
590
+ * {
591
+ box-sizing: border-box;
592
+ }
593
+ `;
594
+ A = Ot([
595
+ S("ace-area")
596
+ ], A);
597
+ const Dt = (e, t) => {
598
+ const s = new h();
599
+ s.container = e, t.appendChild(s);
600
+ };
601
+ export {
602
+ Dt as default
603
+ };
604
+ //# sourceMappingURL=render-33d3aace.js.map