@telia-ace/widget-runtime-flamingo 1.0.8 → 1.0.10

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-bdbdefc7.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-4d519c2d.js";
2
2
  export {
3
3
  a as ActionsController,
4
4
  r as DataProvider,
@@ -11,6 +11,7 @@ export declare class NodeMixinInterface {
11
11
  descriptor?: ComponentDescriptor;
12
12
  component?: any;
13
13
  layout: Record<string, any>;
14
+ context: Record<string, any>;
14
15
  container?: Container;
15
16
  _contextProvider: ContextProvider<typeof contextCtx>;
16
17
  _propertiesProvider: ContextProvider<typeof propertiesCtx>;
@@ -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,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,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,2FA6IrB,CAAC"}
@@ -10,31 +10,31 @@ var z = (e, t, s) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writab
10
10
  F.call(t, s) && z(e, s, t[s]);
11
11
  return e;
12
12
  }, D = (e, t) => W(e, Y(t));
13
- var y = (e, t, s) => new Promise((r, o) => {
14
- var i = (c) => {
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 (h) {
18
+ o(h);
19
19
  }
20
20
  }, n = (c) => {
21
21
  try {
22
22
  a(s.throw(c));
23
- } catch (d) {
24
- o(d);
23
+ } catch (h) {
24
+ o(h);
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 M, 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-bdbdefc7.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, x as _, 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-4d519c2d.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) } : D(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 g = 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;
@@ -162,45 +162,45 @@ const g = (e, t) => {
162
162
  break;
163
163
  s = t._$AN, s.delete(e), e = t;
164
164
  } while ((s == null ? void 0 : s.size) === 0);
165
- }, V = (e) => {
165
+ }, M = (e) => {
166
166
  for (let t; t = e._$AM; e = t) {
167
167
  let s = t._$AN;
168
168
  if (s === void 0)
169
169
  t._$AN = s = /* @__PURE__ */ new Set();
170
170
  else if (s.has(e))
171
171
  break;
172
- s.add(e), ht(t);
172
+ s.add(e), dt(t);
173
173
  }
174
174
  };
175
- function lt(e) {
176
- this._$AN !== void 0 ? ($(this), this._$AM = e, V(this)) : this._$AM = e;
175
+ function ht(e) {
176
+ this._$AN !== void 0 ? ($(this), this._$AM = e, M(this)) : this._$AM = e;
177
177
  }
178
- function dt(e, t = !1, s = 0) {
179
- const r = this._$AH, o = this._$AN;
178
+ function lt(e, t = !1, s = 0) {
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
- 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));
190
+ const dt = (e) => {
191
+ var t, s, i, o;
192
+ e.type == J.CHILD && ((t = (i = e)._$AP) !== null && t !== void 0 || (i._$AP = lt), (s = (o = e)._$AQ) !== null && s !== void 0 || (o._$AQ = ht));
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), V(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))
@@ -229,15 +229,15 @@ const P = /* @__PURE__ */ new WeakMap(), vt = X(class extends pt {
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,49 +251,49 @@ 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((h) => a.includes(h)) ? 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, xt = Object.getOwnPropertyDescriptor, v = (e, t, s, i) => {
268
+ for (var o = i > 1 ? void 0 : i ? xt(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 g(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":
283
- this.renderState = t === "open" ? _.open : _.closed;
283
+ this.renderState = t === "open" ? x.open : x.closed;
284
284
  break;
285
285
  case "hide":
286
- this.renderState = _.hidden;
286
+ this.renderState = x.hidden;
287
287
  }
288
288
  }).then((e) => {
289
289
  this._unsubscribeRenderState = e;
290
- }), M.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,25 +303,25 @@ 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`
324
+ return this.renderState && (this.renderState === x.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"))), _`
325
325
  <div class="widget-container" ${vt(this.wrapperRef)}>
326
326
  <ace-area entry=${this.entry}></ace-area>
327
327
  <!-- <widget-component entry=${this.entry}></widget-component> -->
@@ -329,7 +329,7 @@ let h = class extends k {
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,105 @@ 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 _t = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, b = (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 && _t(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 g(
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 g(this, tt, []), this._propertiesProvider = new g(this, et, {}), this._contextProvider = new g(this, st, {}), this._layoutProvider = new g(this, ot, {}), this.context = {}, this.layout = {};
420
420
  }
421
421
  connectedCallback() {
422
- super.connectedCallback(), this.container && M.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
+ (h, l) => {
429
+ o.id === l.node.id && this._propertiesProvider.setValue(
430
+ l.node.attributes.properties
431
431
  );
432
432
  }
433
+ ), this._contextChangeListener = i.events.subscribe(
434
+ "components:context-changed",
435
+ (h, l) => {
436
+ console.log("context changed!", l), o.id === l.node.id && (this._contextProvider.setValue(
437
+ l.node.attributes.context
438
+ ), this.context = f({}, l.node.attributes.context));
439
+ }
440
+ ), this._layoutChangeListener = i.events.subscribe(
441
+ "components:layout-changed",
442
+ (h, l) => {
443
+ console.log("layout changed!", l), o.id === l.node.id && (this._layoutProvider.setValue(l.node.attributes.layout), this.layout = f({}, l.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
- ), 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));
449
+ ), this._contextProvider.setValue(o.attributes.context), this.context = o.attributes.context, this.layout = o.attributes.layout, this._layoutProvider.setValue(this.layout);
450
+ const n = o.getChildren(r).map((h) => G(h));
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((h) => {
456
+ this.component = h.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
466
  return b([
455
- at({ context: N }),
467
+ at({ context: V }),
456
468
  C({ attribute: !1 })
457
469
  ], t.prototype, "container", 2), b([
458
470
  C()
459
471
  ], t.prototype, "entry", 2), b([
460
- p()
472
+ u()
461
473
  ], t.prototype, "descriptor", 2), b([
462
- p()
474
+ u()
463
475
  ], t.prototype, "component", 2), b([
464
- p()
476
+ u()
477
+ ], t.prototype, "context", 2), b([
478
+ u()
465
479
  ], t.prototype, "layout", 2), t;
466
- }, l = (e, t, s) => {
480
+ }, d = (e, t, s) => {
467
481
  e && s.style.setProperty(t, e);
468
482
  }, T = (e, t) => {
469
- var s, r, o, i, n, a, c, d, m, L, j;
470
- console.log("Map branding", e, t), 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);
483
+ var s, i, o, r, n, a, c, h, l, L, j;
484
+ 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((h = e.spacing) == null ? void 0 : h.sm, "--spacing-sm", t), d((l = e.spacing) == null ? void 0 : l.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
485
  }, $t = (e) => {
472
486
  const t = {};
473
487
  return Object.keys(e).forEach((s) => {
@@ -475,14 +489,14 @@ const H = (e) => {
475
489
  }), t;
476
490
  }, I = (e, t) => {
477
491
  const s = $t(t);
478
- Object.entries(s).forEach(([r, o]) => {
479
- e.style.setProperty(r.replace("css-", ""), o);
492
+ Object.entries(s).forEach(([i, o]) => {
493
+ e.style.setProperty(i.replace("css-", ""), o);
480
494
  });
481
495
  };
482
- var Pt = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, At = (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;
496
+ var Pt = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, At = (e, t, s, i) => {
497
+ for (var o = i > 1 ? void 0 : i ? Ct(t, s) : t, r = e.length - 1, n; r >= 0; r--)
498
+ (n = e[r]) && (o = (i ? n(t, s, o) : n(o)) || o);
499
+ return i && o && Pt(t, s, o), o;
486
500
  };
487
501
  let A = class extends H(k) {
488
502
  render() {
@@ -531,15 +545,15 @@ A.styles = O`
531
545
  A = At([
532
546
  S("widget-component")
533
547
  ], A);
534
- var Rt = 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 && Rt(t, s, o), o;
548
+ var Rt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, Ot = (e, t, s, i) => {
549
+ for (var o = i > 1 ? void 0 : i ? kt(t, s) : t, r = e.length - 1, n; r >= 0; r--)
550
+ (n = e[r]) && (o = (i ? n(t, s, o) : n(o)) || o);
551
+ return i && o && Rt(t, s, o), o;
538
552
  };
539
553
  let R = class extends H(k) {
540
554
  render() {
541
555
  var e, t;
542
- 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(
556
+ return ((e = this.descriptor) == null ? void 0 : e.name) === "root-area" && console.log("AREA:render:", this.context), T(this.context, this.renderRoot.host), this.renderRoot.host.style.setProperty(
543
557
  "--width",
544
558
  this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
545
559
  ), this.renderRoot.host.style.setProperty(
@@ -548,9 +562,9 @@ let R = class extends H(k) {
548
562
  ), I(
549
563
  this.renderRoot.host,
550
564
  this._propertiesProvider.value
551
- ), x`
565
+ ), _`
552
566
  ${this._childrenProvider.value.map(
553
- (s) => s.type === "area" ? x`<ace-area entry=${s.id}></ace-area>` : x`<widget-component entry=${s.id}></widget-component>`
567
+ (s) => s.type === "area" ? _`<ace-area entry=${s.id}></ace-area>` : _`<widget-component entry=${s.id}></widget-component>`
554
568
  )}
555
569
  `;
556
570
  }
@@ -595,10 +609,10 @@ R = Ot([
595
609
  S("ace-area")
596
610
  ], R);
597
611
  const zt = (e, t) => {
598
- const s = new h();
612
+ const s = new p();
599
613
  s.container = e, t.appendChild(s);
600
614
  };
601
615
  export {
602
616
  zt as default
603
617
  };
604
- //# sourceMappingURL=render-2ead7806.js.map
618
+ //# sourceMappingURL=render-6c71b694.js.map