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

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-53eef382.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-7657bfd2.js";
2
2
  export {
3
3
  a as ActionsController,
4
4
  r as DataProvider,
@@ -1 +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"}
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,2FAuIrB,CAAC"}
@@ -1,40 +1,40 @@
1
1
  var q = Object.defineProperty, W = Object.defineProperties;
2
2
  var Y = Object.getOwnPropertyDescriptors;
3
- var z = Object.getOwnPropertySymbols;
3
+ var E = Object.getOwnPropertySymbols;
4
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) => {
5
+ var z = (e, t, s) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, f = (e, t) => {
6
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]);
7
+ U.call(t, s) && z(e, s, t[s]);
8
+ if (E)
9
+ for (var s of E(t))
10
+ F.call(t, s) && z(e, s, t[s]);
11
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) => {
12
+ }, D = (e, t) => W(e, Y(t));
13
+ var y = (e, t, s) => new Promise((i, o) => {
14
+ var r = (c) => {
15
15
  try {
16
16
  a(s.next(c));
17
- } catch (d) {
18
- o(d);
17
+ } catch (l) {
18
+ o(l);
19
19
  }
20
20
  }, n = (c) => {
21
21
  try {
22
22
  a(s.throw(c));
23
- } catch (d) {
24
- o(d);
23
+ } catch (l) {
24
+ o(l);
25
25
  }
26
- }, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(i, n);
26
+ }, a = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(r, n);
27
27
  a((s = s.apply(e, t)).next());
28
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";
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 V, p as N, m as _, x, d as O, n as C, f as u, g as Z, h as tt, j as et, k as st, l as ot, E as G } from "./index-7657bfd2.js";
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
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) {
35
+ const S = (e) => (t) => typeof t == "function" ? ((s, i) => (customElements.define(s, i), i))(e, t) : ((s, i) => {
36
+ const { kind: o, elements: r } = i;
37
+ return { kind: o, elements: r, finisher(n) {
38
38
  customElements.define(s, n);
39
39
  } };
40
40
  })(e, t);
@@ -43,17 +43,17 @@ const S = (e) => (t) => typeof t == "function" ? ((s, r) => (customElements.defi
43
43
  * Copyright 2017 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
45
  */
46
- const rt = ({ finisher: e, descriptor: t }) => (s, r) => {
46
+ const it = ({ finisher: e, descriptor: t }) => (s, i) => {
47
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 });
48
+ if (i === void 0) {
49
+ const r = (o = s.originalKey) !== null && o !== void 0 ? o : s.key, n = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(s.key) } : D(f({}, s), { key: r });
50
50
  return e != null && (n.finisher = function(a) {
51
- e(a, i);
51
+ e(a, r);
52
52
  }), n;
53
53
  }
54
54
  {
55
- const i = s.constructor;
56
- t !== void 0 && Object.defineProperty(s, r, t(r)), e == null || e(i, r);
55
+ const r = s.constructor;
56
+ t !== void 0 && Object.defineProperty(s, i, t(i)), e == null || e(r, i);
57
57
  }
58
58
  };
59
59
  /**
@@ -61,11 +61,11 @@ const rt = ({ finisher: e, descriptor: t }) => (s, r) => {
61
61
  * Copyright 2021 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
63
  */
64
- let it = class {
64
+ let rt = class {
65
65
  constructor(t) {
66
66
  this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
67
- for (const [s, { disposer: r }] of this.subscriptions)
68
- s(this.o, r);
67
+ for (const [s, { disposer: i }] of this.subscriptions)
68
+ s(this.o, i);
69
69
  }, t !== void 0 && (this.value = t);
70
70
  }
71
71
  get value() {
@@ -75,11 +75,11 @@ let it = class {
75
75
  this.setValue(t);
76
76
  }
77
77
  setValue(t, s = !1) {
78
- const r = s || !Object.is(t, this.o);
79
- this.o = t, r && this.updateObservers();
78
+ const i = s || !Object.is(t, this.o);
79
+ this.o = t, i && this.updateObservers();
80
80
  }
81
- addCallback(t, s, r) {
82
- if (!r)
81
+ addCallback(t, s, i) {
82
+ if (!i)
83
83
  return void t(this.value);
84
84
  this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
85
85
  this.subscriptions.delete(t);
@@ -101,14 +101,14 @@ class nt extends Event {
101
101
  super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
102
102
  }
103
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));
104
+ let b = class extends rt {
105
+ constructor(t, s, i) {
106
+ super(s.context !== void 0 ? s.initialValue : i), this.onContextRequest = (o) => {
107
+ const r = o.composedPath()[0];
108
+ o.context === this.context && r !== this.host && (o.stopPropagation(), this.addCallback(o.callback, r, o.subscribe));
109
109
  }, this.onProviderRequest = (o) => {
110
- const i = o.composedPath()[0];
111
- if (o.context === this.context && i !== this.host) {
110
+ const r = o.composedPath()[0];
111
+ if (o.context === this.context && r !== this.host) {
112
112
  for (const [n, { consumerHost: a }] of this.subscriptions)
113
113
  a.dispatchEvent(new Q(this.context, n, !0));
114
114
  o.stopPropagation();
@@ -128,10 +128,10 @@ let v = class extends it {
128
128
  * SPDX-License-Identifier: BSD-3-Clause
129
129
  */
130
130
  function at({ context: e, subscribe: t }) {
131
- return rt({ finisher: (s, r) => {
131
+ return it({ finisher: (s, i) => {
132
132
  s.addInitializer((o) => {
133
- new B(o, { context: e, callback: (i) => {
134
- o[r] = i;
133
+ new B(o, { context: e, callback: (r) => {
134
+ o[i] = r;
135
135
  }, subscribe: t });
136
136
  });
137
137
  } });
@@ -147,13 +147,13 @@ const ct = (e) => e.strings === void 0;
147
147
  * Copyright 2017 Google LLC
148
148
  * SPDX-License-Identifier: BSD-3-Clause
149
149
  */
150
- const g = (e, t) => {
151
- var s, r;
150
+ const m = (e, t) => {
151
+ var s, i;
152
152
  const o = e._$AN;
153
153
  if (o === void 0)
154
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);
155
+ for (const r of o)
156
+ (i = (s = r)._$AO) === null || i === void 0 || i.call(s, t, !1), m(r, t);
157
157
  return !0;
158
158
  }, $ = (e) => {
159
159
  let t, s;
@@ -176,31 +176,31 @@ function lt(e) {
176
176
  this._$AN !== void 0 ? ($(this), this._$AM = e, M(this)) : this._$AM = e;
177
177
  }
178
178
  function dt(e, t = !1, s = 0) {
179
- const r = this._$AH, o = this._$AN;
179
+ const i = this._$AH, o = this._$AN;
180
180
  if (o !== void 0 && o.size !== 0)
181
181
  if (t)
182
- if (Array.isArray(r))
183
- for (let i = s; i < r.length; i++)
184
- g(r[i], !1), $(r[i]);
182
+ if (Array.isArray(i))
183
+ for (let r = s; r < i.length; r++)
184
+ m(i[r], !1), $(i[r]);
185
185
  else
186
- r != null && (g(r, !1), $(r));
186
+ i != null && (m(i, !1), $(i));
187
187
  else
188
- g(this, e);
188
+ m(this, e);
189
189
  }
190
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));
191
+ var t, s, i, o;
192
+ e.type == J.CHILD && ((t = (i = e)._$AP) !== null && t !== void 0 || (i._$AP = dt), (s = (o = e)._$AQ) !== null && s !== void 0 || (o._$AQ = lt));
193
193
  };
194
194
  class pt extends K {
195
195
  constructor() {
196
196
  super(...arguments), this._$AN = void 0;
197
197
  }
198
- _$AT(t, s, r) {
199
- super._$AT(t, s, r), M(this), this.isConnected = t._$AU;
198
+ _$AT(t, s, i) {
199
+ super._$AT(t, s, i), M(this), this.isConnected = t._$AU;
200
200
  }
201
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));
202
+ var i, o;
203
+ t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) === null || i === void 0 || i.call(this) : (o = this.disconnected) === null || o === void 0 || o.call(this)), s && (m(this, t), $(this));
204
204
  }
205
205
  setValue(t) {
206
206
  if (ct(this._$Ct))
@@ -220,24 +220,24 @@ class pt extends K {
220
220
  * Copyright 2020 Google LLC
221
221
  * SPDX-License-Identifier: BSD-3-Clause
222
222
  */
223
- const ut = () => new ft();
224
- class ft {
223
+ const ut = () => new vt();
224
+ class vt {
225
225
  }
226
- const P = /* @__PURE__ */ new WeakMap(), vt = X(class extends pt {
226
+ const P = /* @__PURE__ */ new WeakMap(), ft = X(class extends pt {
227
227
  render(e) {
228
228
  return w;
229
229
  }
230
230
  update(e, [t]) {
231
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;
232
+ const i = t !== this.G;
233
+ return i && this.G !== void 0 && this.ot(void 0), (i || 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
234
  }
235
235
  ot(e) {
236
236
  var t;
237
237
  if (typeof this.G == "function") {
238
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);
239
+ let i = P.get(s);
240
+ i === void 0 && (i = /* @__PURE__ */ new WeakMap(), P.set(s, i)), i.get(this.G) !== void 0 && this.G.call(this.dt, void 0), i.set(this.G, e), e !== void 0 && this.G.call(this.dt, e);
241
241
  } else
242
242
  this.G.value = e;
243
243
  }
@@ -251,32 +251,32 @@ const P = /* @__PURE__ */ new WeakMap(), vt = X(class extends pt {
251
251
  reconnected() {
252
252
  this.ot(this.lt);
253
253
  }
254
- }), mt = (e) => y(void 0, null, function* () {
254
+ }), bt = (e) => y(void 0, null, function* () {
255
255
  return yield e.get("$widget").invoke("renderState");
256
- }), bt = (e, t) => y(void 0, null, function* () {
256
+ }), gt = (e, t) => y(void 0, null, function* () {
257
257
  const s = e.get("$widget");
258
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),
259
+ }), mt = (e, t, s = !1) => {
260
+ const i = e.reduce(
261
+ (n, { breakpoints: a = [], values: c }) => a.length ? t.some((l) => a.includes(l)) ? f(f({}, n), c) : n : f(f({}, n), c),
262
262
  {}
263
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 };
264
+ let r = i.type;
265
+ return o.height = i.height || "", o.width = i.width || "", i.type === "floating" || i.type === "inline" && s && (o.height = "calc(100vh - 120px)"), { type: r, styles: o };
266
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;
267
+ var yt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, v = (e, t, s, i) => {
268
+ for (var o = i > 1 ? void 0 : i ? _t(t, s) : t, r = e.length - 1, n; r >= 0; r--)
269
+ (n = e[r]) && (o = (i ? n(t, s, o) : n(o)) || o);
270
+ return i && o && yt(t, s, o), o;
271
271
  };
272
- let h = class extends k {
272
+ let p = class extends k {
273
273
  constructor() {
274
- super(), this._provider = new v(this, N, void 0), this.wrapperRef = ut(), this.breakpoints = [], this.breakpointsSet = !1;
274
+ super(), this._provider = new b(this, V, void 0), this.wrapperRef = ut(), this.breakpoints = [], this.breakpointsSet = !1;
275
275
  }
276
276
  connectedCallback() {
277
- super.connectedCallback(), this._provider.setValue(this.container), this.container && (mt(this.container).then((e) => {
277
+ super.connectedCallback(), this._provider.setValue(this.container), this.container && (bt(this.container).then((e) => {
278
278
  this.renderState = e;
279
- }), bt(this.container, (e, t) => {
279
+ }), gt(this.container, (e, t) => {
280
280
  switch (t) {
281
281
  case "close":
282
282
  case "open":
@@ -287,13 +287,13 @@ let h = class extends k {
287
287
  }
288
288
  }).then((e) => {
289
289
  this._unsubscribeRenderState = e;
290
- }), V.getInstance(this.container).then(
290
+ }), N.getInstance(this.container).then(
291
291
  (e) => {
292
292
  this.componentPlatform = e, this.breakpoints = this.componentPlatform.breakpoints, this.breakpointsSet = !0, this._unsubscribePropChange = this.componentPlatform.events.subscribe(
293
293
  "components:properties-changed",
294
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] : []);
295
+ var i, o;
296
+ ((i = s == null ? void 0 : s.node) == null ? void 0 : i.type) === "root" && (this.breakpoints = (o = this.componentPlatform) != null && o.breakpoints ? [...this.componentPlatform.breakpoints] : []);
297
297
  }
298
298
  ), this.entry = this.componentPlatform.nodes.root.children.default[0].id || void 0;
299
299
  }
@@ -303,33 +303,33 @@ let h = class extends k {
303
303
  super.disconnectedCallback(), this._unsubscribeRenderState && this._unsubscribeRenderState(), this._unsubscribePropChange && this._unsubscribePropChange();
304
304
  }
305
305
  render() {
306
- var t, s, r, o;
306
+ var t, s, i, o;
307
307
  let e;
308
308
  if (!this.entry || !this.breakpointsSet)
309
309
  return w;
310
310
  if (this.container && this.renderState) {
311
- const [i] = this.container.get("widgetDOMElements");
312
- i && i.setAttribute("data-state", this.renderState);
311
+ const [r] = this.container.get("widgetDOMElements");
312
+ r && r.setAttribute("data-state", this.renderState);
313
313
  }
314
314
  if (this.container) {
315
- const i = this.container.get("$settings");
316
- i != null && i.layout && (e = gt(
317
- i.layout,
315
+ const r = this.container.get("$settings");
316
+ r != null && r.layout && (e = mt(
317
+ r.layout,
318
318
  this.breakpoints,
319
- !!i.trigger
319
+ !!r.trigger
320
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
321
  this.renderRoot.host.style.setProperty(n, a);
322
322
  }));
323
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)}>
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")) : ((i = this.wrapperRef.value) == null || i.classList.remove("hidden"), (o = this.wrapperRef.value) == null || o.classList.add("expanded"))), x`
325
+ <div class="widget-container" ${ft(this.wrapperRef)}>
326
326
  <ace-area entry=${this.entry}></ace-area>
327
327
  <!-- <widget-component entry=${this.entry}></widget-component> -->
328
328
  </div>
329
329
  `;
330
330
  }
331
331
  };
332
- h.styles = O`
332
+ p.styles = O`
333
333
  :host {
334
334
  --voca-rem-multiplier: 0.625;
335
335
  box-sizing: border-box;
@@ -383,91 +383,103 @@ h.styles = O`
383
383
  }
384
384
  }
385
385
  `;
386
- u([
386
+ v([
387
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([
388
+ ], p.prototype, "container", 2);
389
+ v([
390
+ u()
391
+ ], p.prototype, "componentPlatform", 2);
392
+ v([
393
+ u()
394
+ ], p.prototype, "renderState", 2);
395
+ v([
396
+ u()
397
+ ], p.prototype, "breakpoints", 2);
398
+ v([
399
+ u()
400
+ ], p.prototype, "breakpointsSet", 2);
401
+ v([
402
+ u()
403
+ ], p.prototype, "entry", 2);
404
+ p = v([
405
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;
406
+ ], p);
407
+ var xt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, g = (e, t, s, i) => {
408
+ for (var o = i > 1 ? void 0 : i ? wt(t, s) : t, r = e.length - 1, n; r >= 0; r--)
409
+ (n = e[r]) && (o = (i ? n(t, s, o) : n(o)) || o);
410
+ return i && o && xt(t, s, o), o;
411
411
  };
412
412
  const H = (e) => {
413
413
  class t extends e {
414
414
  constructor() {
415
- super(...arguments), this.entry = "", this._descriptorProvider = new v(
415
+ super(...arguments), this.entry = "", this._descriptorProvider = new b(
416
416
  this,
417
417
  Z,
418
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 = {};
419
+ ), this._childrenProvider = new b(this, tt, []), this._propertiesProvider = new b(this, et, {}), this._contextProvider = new b(this, st, {}), this._layoutProvider = new b(this, ot, {}), this.layout = {};
420
420
  }
421
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);
422
+ super.connectedCallback(), this.container && N.getInstance(this.container).then(
423
+ (i) => y(this, null, function* () {
424
+ const o = i.nodes.get(this.entry);
425
425
  if (o) {
426
- this._propertyChangeListener = r.events.subscribe(
426
+ this._propertyChangeListener = i.events.subscribe(
427
427
  "components:properties-changed",
428
- (d, m) => {
429
- o.id === m.node.id && this._propertiesProvider.setValue(
430
- m.node.attributes.properties
428
+ (l, h) => {
429
+ o.id === h.node.id && this._propertiesProvider.setValue(
430
+ h.node.attributes.properties
431
431
  );
432
432
  }
433
+ ), this._contextChangeListener = i.events.subscribe(
434
+ "components:context-changed",
435
+ (l, h) => {
436
+ console.log("context changed!", h), o.id === h.node.id && this._contextProvider.setValue(
437
+ h.node.attributes.context
438
+ );
439
+ }
440
+ ), this._layoutChangeListener = i.events.subscribe(
441
+ "components:layout-changed",
442
+ (l, h) => {
443
+ console.log("layout changed!", h), o.id === h.node.id && this._layoutProvider.setValue(h.node.attributes.layout);
444
+ }
433
445
  );
434
- const i = "default";
435
- this.descriptor = G(o, i), this._unmountNode = o.mount(this.container), this._descriptorProvider.setValue(this.descriptor), this._propertiesProvider.setValue(
446
+ const r = "default";
447
+ this.descriptor = G(o, r), this._unmountNode = o.mount(this.container), this._descriptorProvider.setValue(this.descriptor), this._propertiesProvider.setValue(
436
448
  o.attributes.properties
437
449
  ), 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));
450
+ const n = o.getChildren(r).map((l) => G(l));
439
451
  this._childrenProvider.setValue(n);
440
452
  const c = (yield this.container.getAsync("componentResolver")).getComponent(
441
453
  this.descriptor.type || ""
442
454
  );
443
- c.then && c.then((d) => {
444
- this.component = d.default;
455
+ c.then && c.then((l) => {
456
+ this.component = l.default;
445
457
  });
446
458
  }
447
459
  })
448
460
  );
449
461
  }
450
462
  disconnectedCallback() {
451
- super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._unmountNode && this._unmountNode();
463
+ super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._contextChangeListener && this._contextChangeListener(), this._layoutChangeListener && this._layoutChangeListener(), this._unmountNode && this._unmountNode();
452
464
  }
453
465
  }
454
- return b([
455
- at({ context: N }),
466
+ return g([
467
+ at({ context: V }),
456
468
  C({ attribute: !1 })
457
- ], t.prototype, "container", 2), b([
469
+ ], t.prototype, "container", 2), g([
458
470
  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()
471
+ ], t.prototype, "entry", 2), g([
472
+ u()
473
+ ], t.prototype, "descriptor", 2), g([
474
+ u()
475
+ ], t.prototype, "component", 2), g([
476
+ u()
465
477
  ], t.prototype, "layout", 2), t;
466
- }, l = (e, t, s) => {
478
+ }, d = (e, t, s) => {
467
479
  e && s.style.setProperty(t, e);
468
480
  }, 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);
481
+ var s, i, o, r, n, a, c, l, h, L, j;
482
+ console.log("Map branding", e, t), d((s = e.colors) == null ? void 0 : s.primary, "--primary-color", t), d((i = e.colors) == null ? void 0 : i.secondary, "--secondary-color", t), d((o = e.colors) == null ? void 0 : o.text, "--text-color", t), d((r = e.colors) == null ? void 0 : r.link, "--link-color", t), d((n = e.colors) == null ? void 0 : n.gray, "--gray-color", t), d((a = e.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), d((c = e.spacing) == null ? void 0 : c.xs, "--spacing-xs", t), d((l = e.spacing) == null ? void 0 : l.sm, "--spacing-sm", t), d((h = e.spacing) == null ? void 0 : h.md, "--spacing-md", t), d((L = e.spacing) == null ? void 0 : L.lg, "--spacing-lg", t), d((j = e.spacing) == null ? void 0 : j.xl, "--spacing-xl", t), d(e.boxShadow, "--box-shadow", t), d(e.borderRadius, "--border-radius", t), d(e.borderRadiusSm, "--border-radius-sm", t), d(e.fontFamily, "--font-family", t);
471
483
  }, $t = (e) => {
472
484
  const t = {};
473
485
  return Object.keys(e).forEach((s) => {
@@ -475,16 +487,16 @@ const H = (e) => {
475
487
  }), t;
476
488
  }, I = (e, t) => {
477
489
  const s = $t(t);
478
- Object.entries(s).forEach(([r, o]) => {
479
- e.style.setProperty(r.replace("css-", ""), o);
490
+ Object.entries(s).forEach(([i, o]) => {
491
+ e.style.setProperty(i.replace("css-", ""), o);
480
492
  });
481
493
  };
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;
494
+ var Pt = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, At = (e, t, s, i) => {
495
+ for (var o = i > 1 ? void 0 : i ? Ct(t, s) : t, r = e.length - 1, n; r >= 0; r--)
496
+ (n = e[r]) && (o = (i ? n(t, s, o) : n(o)) || o);
497
+ return i && o && Pt(t, s, o), o;
486
498
  };
487
- let R = class extends H(k) {
499
+ let A = class extends H(k) {
488
500
  render() {
489
501
  if (!this.component)
490
502
  return w;
@@ -498,7 +510,7 @@ let R = class extends H(k) {
498
510
  ), e;
499
511
  }
500
512
  };
501
- R.styles = O`
513
+ A.styles = O`
502
514
  :host {
503
515
  grid-column: span var(--width);
504
516
  max-width: 100%;
@@ -528,34 +540,34 @@ R.styles = O`
528
540
  box-sizing: border-box;
529
541
  }
530
542
  `;
531
- R = Rt([
543
+ A = At([
532
544
  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;
545
+ ], A);
546
+ var Rt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, Ot = (e, t, s, i) => {
547
+ for (var o = i > 1 ? void 0 : i ? kt(t, s) : t, r = e.length - 1, n; r >= 0; r--)
548
+ (n = e[r]) && (o = (i ? n(t, s, o) : n(o)) || o);
549
+ return i && o && Rt(t, s, o), o;
538
550
  };
539
- let A = class extends H(k) {
551
+ let R = class extends H(k) {
540
552
  render() {
541
- var e;
542
- return T(this._contextProvider.value, this.renderRoot.host), this.renderRoot.host.style.setProperty(
553
+ var e, t;
554
+ return ((e = this.descriptor) == null ? void 0 : e.name) === "root-area" && console.log("AREA:render:", this._contextProvider.value), T(this._contextProvider.value, this.renderRoot.host), this.renderRoot.host.style.setProperty(
543
555
  "--width",
544
556
  this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
545
557
  ), this.renderRoot.host.style.setProperty(
546
558
  "--columns",
547
- ((e = this._propertiesProvider.value.columns) == null ? void 0 : e.toString()) || "1"
559
+ ((t = this._propertiesProvider.value.columns) == null ? void 0 : t.toString()) || "1"
548
560
  ), I(
549
561
  this.renderRoot.host,
550
562
  this._propertiesProvider.value
551
563
  ), x`
552
564
  ${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>`
565
+ (s) => s.type === "area" ? x`<ace-area entry=${s.id}></ace-area>` : x`<widget-component entry=${s.id}></widget-component>`
554
566
  )}
555
567
  `;
556
568
  }
557
569
  };
558
- A.styles = O`
570
+ R.styles = O`
559
571
  :host {
560
572
  grid-column: span var(--width);
561
573
  max-width: 100%;
@@ -591,14 +603,14 @@ A.styles = O`
591
603
  box-sizing: border-box;
592
604
  }
593
605
  `;
594
- A = Ot([
606
+ R = Ot([
595
607
  S("ace-area")
596
- ], A);
597
- const Dt = (e, t) => {
598
- const s = new h();
608
+ ], R);
609
+ const zt = (e, t) => {
610
+ const s = new p();
599
611
  s.container = e, t.appendChild(s);
600
612
  };
601
613
  export {
602
- Dt as default
614
+ zt as default
603
615
  };
604
- //# sourceMappingURL=render-33d3aace.js.map
616
+ //# sourceMappingURL=render-500e6f90.js.map