@telia-ace/widget-types-grid 1.0.30-experimental.1 → 1.0.30-experimental.11

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,62 +1,82 @@
1
- var we = Object.defineProperty, ve = Object.defineProperties;
2
- var Ee = Object.getOwnPropertyDescriptors;
3
- var W = Object.getOwnPropertySymbols;
4
- var oe = Object.prototype.hasOwnProperty, re = Object.prototype.propertyIsEnumerable;
5
- var ie = (t, e, n) => e in t ? we(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, p = (t, e) => {
6
- for (var n in e || (e = {}))
7
- oe.call(e, n) && ie(t, n, e[n]);
8
- if (W)
9
- for (var n of W(e))
10
- re.call(e, n) && ie(t, n, e[n]);
11
- return t;
12
- }, C = (t, e) => ve(t, Ee(e));
13
- var N = (t, e) => {
1
+ var St = Object.defineProperty, At = Object.defineProperties;
2
+ var Dt = Object.getOwnPropertyDescriptors;
3
+ var H = Object.getOwnPropertySymbols;
4
+ var lt = Object.prototype.hasOwnProperty, ut = Object.prototype.propertyIsEnumerable;
5
+ var ct = (e, t, n) => t in e ? St(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, f = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ lt.call(t, n) && ct(e, n, t[n]);
8
+ if (H)
9
+ for (var n of H(t))
10
+ ut.call(t, n) && ct(e, n, t[n]);
11
+ return e;
12
+ }, C = (e, t) => At(e, Dt(t));
13
+ var N = (e, t) => {
14
14
  var n = {};
15
- for (var s in t)
16
- oe.call(t, s) && e.indexOf(s) < 0 && (n[s] = t[s]);
17
- if (t != null && W)
18
- for (var s of W(t))
19
- e.indexOf(s) < 0 && re.call(t, s) && (n[s] = t[s]);
15
+ for (var s in e)
16
+ lt.call(e, s) && t.indexOf(s) < 0 && (n[s] = e[s]);
17
+ if (e != null && H)
18
+ for (var s of H(e))
19
+ t.indexOf(s) < 0 && ut.call(e, s) && (n[s] = e[s]);
20
20
  return n;
21
21
  };
22
- import { Grid as ue, useRouteData as Ce, useRouter as Oe, useProperties as de, useContext as X, useContainer as T, useComponentNode as ee, useScroll as he, transitionComposer as Se, paddedBorderTabStyle as Ae, useComponent as xe, useComponentDescriptor as De, filterCssPropsStyle as Me, Typography as Ne, useComponentPlatform as me, useIsMounted as $e, useColumns as Le, useLayout as ke, ComponentNodeContext as Pe, ComponentPropertyContext as Re, filterCssProps as Ve } from "@telia-ace/widget-ui";
23
- import h, { useState as z, forwardRef as pe, useMemo as _e, Suspense as Ie, useEffect as B } from "react";
24
- import { css as fe, ThemeProvider as ze, useTheme as Be } from "@emotion/react";
25
- import { asDescriptor as ae, ComponentPlatform as Te, createComponentModel as je, ComponentQuery as Ge, WidgetRenderState as O } from "@telia-ace/widget-core";
26
- import P from "@emotion/styled";
27
- import { appendClassNames as K, notifyDataLoaded as We, lock as q, removeNullAndUndefinedValues as ce, uuid as Fe } from "@telia-ace/widget-utilities";
28
- import { TransitionGroup as He, Transition as Ke } from "react-transition-group";
29
- import { Switch as Ue, Route as Q } from "react-router";
30
- import { onWidgetUrl as Ye } from "@telia-ace/widget-routing";
31
- import { readStorage as $, StorageMedium as v, createStorageWriter as V, StorageCategory as _, StorageScope as qe } from "@telia-ace/widget-services";
32
- import { supportBootstrapping as Qe } from "@webprovisions/bootstrapping";
33
- import { WidgetState as Ze, WidgetType as Je } from "@webprovisions/platform";
34
- var J = /* @__PURE__ */ ((t) => (t.back = "back", t.forth = "forth", t))(J || {});
35
- const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[t] > n[e] ? "back" : "forth", et = ({ views: t, location: e, render: n }) => /* @__PURE__ */ h.createElement(
36
- Ue,
22
+ var dt = (e, t, n) => new Promise((s, o) => {
23
+ var i = (a) => {
24
+ try {
25
+ c(n.next(a));
26
+ } catch (u) {
27
+ o(u);
28
+ }
29
+ }, r = (a) => {
30
+ try {
31
+ c(n.throw(a));
32
+ } catch (u) {
33
+ o(u);
34
+ }
35
+ }, c = (a) => a.done ? s(a.value) : Promise.resolve(a.value).then(i, r);
36
+ c((n = n.apply(e, t)).next());
37
+ });
38
+ import { Grid as ft, useRouteData as Mt, useRouter as Nt, useProperties as gt, useContext as st, useContainer as W, useComponentNode as ot, useScroll as yt, transitionComposer as Pt, paddedBorderTabStyle as Lt, useComponent as _t, useComponentDescriptor as kt, filterCssPropsStyle as Rt, Typography as Vt, useComponentPlatform as bt, useIsMounted as It, useColumns as Tt, useLayout as zt, ComponentNodeContext as Bt, ComponentPropertyContext as jt, filterCssProps as Wt } from "@telia-ace/widget-ui";
39
+ import p, { useState as B, forwardRef as wt, useMemo as Ft, Suspense as Gt, useEffect as j } from "react";
40
+ import { css as vt, ThemeProvider as Ht, useTheme as qt } from "@emotion/react";
41
+ import { asDescriptor as U, ComponentPlatform as Et, createComponentModel as Kt, ComponentQuery as Ut, WidgetRenderState as O } from "@telia-ace/widget-core";
42
+ import k from "@emotion/styled";
43
+ import { appendClassNames as Y, notifyDataLoaded as Yt, lock as X, removeNullAndUndefinedValues as ht, uuid as Qt } from "@telia-ace/widget-utilities";
44
+ import { TransitionGroup as Zt, Transition as Jt } from "react-transition-group";
45
+ import { Switch as Xt, Route as tt } from "react-router";
46
+ import { spread as te } from "@open-wc/lit-helpers";
47
+ import { nothing as ee, css as ne, LitElement as se } from "lit";
48
+ import { property as Ct, state as Q, customElement as oe } from "lit/decorators.js";
49
+ import { html as ie, unsafeStatic as re } from "lit/static-html.js";
50
+ import { onWidgetUrl as ae } from "@telia-ace/widget-routing";
51
+ import { readStorage as P, StorageMedium as v, createStorageWriter as I, StorageCategory as T, StorageScope as ce } from "@telia-ace/widget-services";
52
+ import { supportBootstrapping as le } from "@webprovisions/bootstrapping";
53
+ import { WidgetState as ue, WidgetType as de } from "@webprovisions/platform";
54
+ var nt = /* @__PURE__ */ ((e) => (e.back = "back", e.forth = "forth", e))(nt || {});
55
+ const he = (e, t, n) => typeof n[e] == "number" && typeof n[t] == "number" && n[e] > n[t] ? "back" : "forth", pe = ({ views: e, location: t, render: n }) => /* @__PURE__ */ p.createElement(
56
+ Xt,
37
57
  {
38
- location: e && C(p({}, e), {
39
- pathname: e.pathname.split("?")[0]
58
+ location: t && C(f({}, t), {
59
+ pathname: t.pathname.split("?")[0]
40
60
  })
41
61
  },
42
62
  [
43
- ...Object.keys(t).filter((s) => !!t[s].path),
44
- ...Object.keys(t).filter((s) => !t[s].path)
63
+ ...Object.keys(e).filter((s) => !!e[s].path),
64
+ ...Object.keys(e).filter((s) => !e[s].path)
45
65
  ].map((s) => {
46
- const { path: i } = t[s];
47
- return i ? Array.isArray(i) ? i.map((o) => /* @__PURE__ */ h.createElement(Q, { key: s, exact: !0, path: o, render: () => n(s) })) : /* @__PURE__ */ h.createElement(Q, { key: s, exact: !0, path: i, render: () => n(s) }) : /* @__PURE__ */ h.createElement(Q, { key: s, render: () => n(s) });
66
+ const { path: o } = e[s];
67
+ return o ? Array.isArray(o) ? o.map((i) => /* @__PURE__ */ p.createElement(tt, { key: s, exact: !0, path: i, render: () => n(s) })) : /* @__PURE__ */ p.createElement(tt, { key: s, exact: !0, path: o, render: () => n(s) }) : /* @__PURE__ */ p.createElement(tt, { key: s, render: () => n(s) });
48
68
  })
49
- ), ge = et, tt = P.div`
69
+ ), Ot = pe, me = k.div`
50
70
  position: relative;
51
71
  width: 100%;
52
72
  flex: 1;
53
- `, nt = P(ue)`
73
+ `, fe = k(ft)`
54
74
  position: absolute;
55
75
  left: 0;
56
76
  right: 0;
57
- ${(t) => !!t.animationCss && t.animationCss}
58
- ${(t) => !!t.scrollableCss && t.scrollableCss}
59
- `, st = {
77
+ ${(e) => !!e.animationCss && e.animationCss}
78
+ ${(e) => !!e.scrollableCss && e.scrollableCss}
79
+ `, ge = {
60
80
  index: 1,
61
81
  search: 2,
62
82
  browse: 3,
@@ -64,34 +84,34 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
64
84
  contact: 5,
65
85
  "contact-method": 6,
66
86
  conversation: 7
67
- }, it = (n) => {
68
- var s = n, { className: t = "" } = s, e = N(s, ["className"]);
69
- const [i, o] = z("index"), [r, c] = z(J.forth), a = Ce(), u = Oe(), d = de(), l = X(), f = T(), m = ee(), { gap: g = "0" } = l, G = d, { columns: b = 1, animation: y = "none", scrollable: E = !1 } = G, A = N(G, ["columns", "animation", "scrollable"]), [j, L] = he(E);
87
+ }, ye = (n) => {
88
+ var s = n, { className: e = "" } = s, t = N(s, ["className"]);
89
+ const [o, i] = B("index"), [r, c] = B(nt.forth), a = Mt(), u = Nt(), d = gt(), l = st(), h = W(), m = ot(), { gap: g = "0" } = l, G = d, { columns: b = 1, animation: y = "none", scrollable: E = !1 } = G, $ = N(G, ["columns", "animation", "scrollable"]), [F, L] = yt(E);
70
90
  if (!m || !u)
71
91
  return null;
72
- const { location: se } = u;
73
- a.name !== i && a.name !== "" && y && (c(Xe(i, a.name, st)), o(a.name));
74
- const { views: x } = f.get("$settings");
75
- if (!Object.keys(x).length)
92
+ const { location: at } = u;
93
+ a.name !== o && a.name !== "" && y && (c(he(o, a.name, ge)), i(a.name));
94
+ const { views: S } = h.get("$settings");
95
+ if (!Object.keys(S).length)
76
96
  return null;
77
- const D = (w, M, R) => {
78
- const S = Y(M, R), I = m.getChildren(w)[0];
79
- return /* @__PURE__ */ h.createElement(
80
- nt,
81
- C(p(C(p(p({}, e), A), {
82
- scrollableCss: j,
97
+ const A = (w, M, V) => {
98
+ const x = J(M, V), z = m.getChildren(w)[0];
99
+ return /* @__PURE__ */ p.createElement(
100
+ fe,
101
+ C(f(C(f(f({}, t), $), {
102
+ scrollableCss: F,
83
103
  ref: L,
84
104
  columns: b,
85
105
  gap: g
86
- }), S), {
87
- className: K(t, "humany-view")
106
+ }), x), {
107
+ className: Y(e, "humany-view")
88
108
  }),
89
- /* @__PURE__ */ h.createElement(te, { id: I.id, branch: "default" })
109
+ /* @__PURE__ */ p.createElement(it, { id: z.id, branch: "default" })
90
110
  );
91
- }, Y = (w, M) => {
111
+ }, J = (w, M) => {
92
112
  if (y === "slide" || y === "fade")
93
113
  return {
94
- animationCss: Se.composeViewTransition(
114
+ animationCss: Pt.composeViewTransition(
95
115
  w,
96
116
  y,
97
117
  M
@@ -99,59 +119,59 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
99
119
  ["data-state"]: w
100
120
  };
101
121
  };
102
- return /* @__PURE__ */ h.createElement(tt, { className: "humany-animated-view" }, /* @__PURE__ */ h.createElement(
103
- He,
122
+ return /* @__PURE__ */ p.createElement(me, { className: "humany-animated-view" }, /* @__PURE__ */ p.createElement(
123
+ Zt,
104
124
  {
105
125
  component: null,
106
- childFactory: (w) => h.cloneElement(w, { direction: r })
126
+ childFactory: (w) => p.cloneElement(w, { direction: r })
107
127
  },
108
- /* @__PURE__ */ h.createElement(
109
- Ke,
128
+ /* @__PURE__ */ p.createElement(
129
+ Jt,
110
130
  {
111
- key: i,
131
+ key: o,
112
132
  timeout: { enter: 500, exit: 500 },
113
133
  onEnter: (w) => w == null ? void 0 : w.clientHeight,
114
134
  unmountOnExit: !0,
115
- direction: J.forth
135
+ direction: nt.forth
116
136
  },
117
- (w, { direction: M }) => /* @__PURE__ */ h.createElement(
118
- ge,
137
+ (w, { direction: M }) => /* @__PURE__ */ p.createElement(
138
+ Ot,
119
139
  {
120
- views: x,
121
- location: se,
122
- render: (R) => D(R, w, M)
140
+ views: S,
141
+ location: at,
142
+ render: (V) => A(V, w, M)
123
143
  }
124
144
  )
125
145
  )
126
146
  ));
127
- }, ot = it, rt = P(ue)`
128
- ${(t) => !!t.scrollableCss && t.scrollableCss}
129
- `, at = (n) => {
130
- var s = n, { className: t = "" } = s, e = N(s, ["className"]);
131
- const i = de(), o = X(), r = T(), c = ee(), { views: a } = r.get("$settings"), { gap: u = "0" } = o, y = i, { columns: d = 1, animation: l = "none", scrollable: f = !1 } = y, m = N(y, ["columns", "animation", "scrollable"]), [g, b] = he(f);
132
- return c ? /* @__PURE__ */ h.createElement(
133
- rt,
134
- C(p(p({}, e), m), {
147
+ }, be = ye, we = k(ft)`
148
+ ${(e) => !!e.scrollableCss && e.scrollableCss}
149
+ `, ve = (n) => {
150
+ var s = n, { className: e = "" } = s, t = N(s, ["className"]);
151
+ const o = gt(), i = st(), r = W(), c = ot(), { views: a } = r.get("$settings"), { gap: u = "0" } = i, y = o, { columns: d = 1, animation: l = "none", scrollable: h = !1 } = y, m = N(y, ["columns", "animation", "scrollable"]), [g, b] = yt(h);
152
+ return c ? /* @__PURE__ */ p.createElement(
153
+ we,
154
+ C(f(f({}, t), m), {
135
155
  scrollableCss: g,
136
156
  ref: b,
137
157
  columns: d,
138
158
  gap: u,
139
- className: K(t, "humany-view")
159
+ className: Y(e, "humany-view")
140
160
  }),
141
- /* @__PURE__ */ h.createElement(
142
- ge,
161
+ /* @__PURE__ */ p.createElement(
162
+ Ot,
143
163
  {
144
164
  views: a,
145
165
  render: (E) => {
146
- const A = c.getChildren(E)[0];
147
- return /* @__PURE__ */ h.createElement(te, { id: A.id, node: A, branch: "default" });
166
+ const $ = c.getChildren(E)[0];
167
+ return /* @__PURE__ */ p.createElement(it, { id: $.id, node: $, branch: "default" });
148
168
  }
149
169
  }
150
170
  )
151
171
  ) : null;
152
- }, ct = at, U = (t) => {
153
- var e, n;
154
- return fe`
172
+ }, Ee = ve, Z = (e) => {
173
+ var t, n;
174
+ return vt`
155
175
  outline: none;
156
176
  box-sizing: border-box;
157
177
  * {
@@ -159,212 +179,388 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
159
179
  outline: none;
160
180
  }
161
181
 
162
- grid-column: ${t["data-indent"] ? `${t["data-indent"] + 1} / ${t["data-indent"] + (t["data-width"] || 0) + 1}` : `span ${t["data-width"]}`};
182
+ grid-column: ${e["data-indent"] ? `${e["data-indent"] + 1} / ${e["data-indent"] + (e["data-width"] || 0) + 1}` : `span ${e["data-width"]}`};
163
183
 
164
- ${((e = t.theme.fonts) == null ? void 0 : e.type) && `
165
- font-family: ${t.theme.fonts.type};
184
+ ${((t = e.theme.fonts) == null ? void 0 : t.type) && `
185
+ font-family: ${e.theme.fonts.type};
166
186
 
167
187
  input, textarea {
168
- font-family: ${t.theme.fonts.type};
188
+ font-family: ${e.theme.fonts.type};
169
189
  }
170
190
  `}
171
191
 
172
- ${((n = t.theme.fonts) == null ? void 0 : n.base) && `
173
- font-size: ${t.theme.fonts.base};
192
+ ${((n = e.theme.fonts) == null ? void 0 : n.base) && `
193
+ font-size: ${e.theme.fonts.base};
174
194
  `}
175
195
 
176
196
  &:focus-visible {
177
- ${Ae(t)};
197
+ ${Lt(e)};
178
198
  }
179
199
  `;
180
- }, lt = P(ct)`
181
- ${(t) => U(t)}
182
- `, ut = P(ot)`
183
- ${(t) => U(t)}
184
- `, dt = P.div`
200
+ }, Ce = k(Ee)`
201
+ ${(e) => Z(e)}
202
+ `, Oe = k(be)`
203
+ ${(e) => Z(e)}
204
+ `, xe = k.div`
185
205
  text-align: center;
186
- ${(t) => {
187
- var e, n, s;
188
- return typeof ((e = t.theme.colors) == null ? void 0 : e.warning) != "undefined" && fe`
189
- color: ${(n = t.theme.colors) == null ? void 0 : n.warning};
190
- border: 2px dashed ${(s = t.theme.colors) == null ? void 0 : s.warning};
206
+ ${(e) => {
207
+ var t, n, s;
208
+ return typeof ((t = e.theme.colors) == null ? void 0 : t.warning) != "undefined" && vt`
209
+ color: ${(n = e.theme.colors) == null ? void 0 : n.warning};
210
+ border: 2px dashed ${(s = e.theme.colors) == null ? void 0 : s.warning};
191
211
  `;
192
212
  }}
193
- ${(t) => typeof t.theme.borderRadius != "undefined" && `border-radius: ${t.theme.borderRadius};`}
194
- ${(t) => U(t)}
195
- `, ht = pe(
196
- (i, s) => {
197
- var o = i, { className: t = "", children: e } = o, n = N(o, ["className", "children"]);
198
- const r = xe(), { name: c, type: a, id: u } = De(), d = _e(() => r ? P(r)`
199
- ${U}
200
- ${Me}
213
+ ${(e) => typeof e.theme.borderRadius != "undefined" && `border-radius: ${e.theme.borderRadius};`}
214
+ ${(e) => Z(e)}
215
+ `, $e = wt(
216
+ (o, s) => {
217
+ var i = o, { className: e = "", children: t } = i, n = N(i, ["className", "children"]);
218
+ const r = _t(), { name: c, type: a, id: u } = kt(), d = Ft(() => r ? k(r)`
219
+ ${Z}
220
+ ${Rt}
201
221
  ` : null, [r]);
202
- return typeof r == "undefined" ? null : r === null || d === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ h.createElement(
203
- dt,
204
- C(p({}, n), {
222
+ return typeof r == "undefined" ? null : r === null || d === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ p.createElement(
223
+ xe,
224
+ C(f({}, n), {
205
225
  title: `type: ${a}, definition-id: ${c}, instance-id: ${u}`,
206
- className: K(t, "humany-non-resolved-component")
226
+ className: Y(e, "humany-non-resolved-component")
207
227
  }),
208
- /* @__PURE__ */ h.createElement(Ne, { variant: "h5" }, "Non Resolved Component Type")
209
- ) : null : /* @__PURE__ */ h.createElement(Ie, { fallback: null }, /* @__PURE__ */ h.createElement(
228
+ /* @__PURE__ */ p.createElement(Vt, { variant: "h5" }, "Non Resolved Component Type")
229
+ ) : null : /* @__PURE__ */ p.createElement(Gt, { fallback: null }, /* @__PURE__ */ p.createElement(
210
230
  d,
211
- C(p({
231
+ C(f({
212
232
  ref: s
213
233
  }, n), {
214
- className: K(
215
- t,
234
+ className: Y(
235
+ e,
216
236
  "humany-component",
217
237
  `humany-component-${c}`
218
238
  )
219
239
  }),
220
- e
240
+ t
221
241
  ));
222
242
  }
223
- ), mt = ht, pt = (t) => {
224
- const e = ee(t), n = me(), [s, i] = z({}), o = $e();
225
- return B(() => {
226
- e && o.current && i(e.attributes.properties);
227
- }, [e, t, o]), B(() => {
243
+ ), Se = $e, Ae = (e) => {
244
+ const t = ot(e), n = bt(), [s, o] = B({}), i = It();
245
+ return j(() => {
246
+ t && i.current && o(t.attributes.properties);
247
+ }, [t, e, i]), j(() => {
228
248
  if (n) {
229
249
  const r = n.events.subscribe(
230
250
  "components:properties-changed",
231
251
  (c, a) => {
232
- e === a.node && o.current && i(a.node.attributes.properties);
252
+ t === a.node && i.current && o(a.node.attributes.properties);
233
253
  }
234
254
  );
235
255
  return () => {
236
256
  r();
237
257
  };
238
258
  }
239
- }, [n, o, t, e]), s;
240
- }, ft = (t, e) => e ? !0 : typeof t == "string" ? t === "full" : t > 0, gt = pe(
259
+ }, [n, i, e, t]), s;
260
+ }, De = (e, t) => t ? !0 : typeof e == "string" ? e === "full" : e > 0, Me = wt(
241
261
  (u, a) => {
242
- var d = u, { className: t = "", id: e, branch: n, node: s, ariaLabel: i, tabIndex: o, context: r } = d, c = N(d, ["className", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
243
- const l = me(), f = T(), [m, g] = z(), b = Le(), y = X(e), E = pt(e), { size: A = "none", indent: j = 0 } = ke(e), L = ft(A, s);
244
- if (B(() => {
262
+ var d = u, { className: e = "", id: t, branch: n, node: s, ariaLabel: o, tabIndex: i, context: r } = d, c = N(d, ["className", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
263
+ const l = bt(), h = W(), [m, g] = B(), b = Tt(), y = st(t), E = Ae(t), { size: $ = "none", indent: F = 0 } = zt(t), L = De($, s);
264
+ if (j(() => {
245
265
  if (l) {
246
- if (e && !s) {
247
- const S = l.nodes.get(e);
248
- if (S && (g(ae(S, n)), L)) {
249
- const I = S.mount(f);
266
+ if (t && !s) {
267
+ const x = l.nodes.get(t);
268
+ if (x && (g(U(x, n)), L)) {
269
+ const z = x.mount(h);
250
270
  return () => {
251
- I();
271
+ z();
252
272
  };
253
273
  }
254
274
  } else if (s) {
255
- g(ae(s, n));
256
- const S = s.mount(f);
275
+ g(U(s, n));
276
+ const x = s.mount(h);
257
277
  return () => {
258
- S();
278
+ x();
259
279
  };
260
280
  }
261
281
  }
262
- }, [l, e, s, L]), !m || !L)
282
+ }, [l, t, s, L]), !m || !L)
263
283
  return null;
264
- const R = p(p({}, y), r || {}), {
265
- cardinal: x,
266
- fonts: D = {},
267
- accessibility: Y = {}
268
- } = R, G = N(R, [
284
+ const V = f(f({}, y), r || {}), {
285
+ cardinal: S,
286
+ fonts: A = {},
287
+ accessibility: J = {}
288
+ } = V, G = N(V, [
269
289
  "cardinal",
270
290
  "fonts",
271
291
  "accessibility"
272
292
  ]), w = {
273
- type: D.type,
274
- base: D.base || "16px",
275
- small: D.small || "0.8em",
276
- normal: D.normal || "1em",
277
- medium: D.medium || "1.2em",
278
- large: D.large || "1.6em",
279
- huge: D.huge || "2.5em"
280
- }, M = C(p({}, G), {
293
+ type: A.type,
294
+ base: A.base || "16px",
295
+ small: A.small || "0.8em",
296
+ normal: A.normal || "1em",
297
+ medium: A.medium || "1.2em",
298
+ large: A.large || "1.6em",
299
+ huge: A.huge || "2.5em"
300
+ }, M = C(f({}, G), {
281
301
  fonts: w,
282
- accessibility: p({}, Y)
302
+ accessibility: f({}, J)
283
303
  });
284
- return typeof x == "number" && (M.sizes = {
285
- cardinal: x,
286
- small: `${x}px`,
287
- normal: `${x * 3}px`,
288
- medium: `${x * 5}px`,
289
- large: `${x * 8}px`
290
- }), /* @__PURE__ */ h.createElement(ze, { theme: M }, /* @__PURE__ */ h.createElement(Pe.Provider, { value: m }, /* @__PURE__ */ h.createElement(Re.Provider, { value: E }, (() => {
291
- const S = p({
292
- "data-width": A === "full" ? b : Math.min(A, b),
293
- "data-indent": j,
304
+ return typeof S == "number" && (M.sizes = {
305
+ cardinal: S,
306
+ small: `${S}px`,
307
+ normal: `${S * 3}px`,
308
+ medium: `${S * 5}px`,
309
+ large: `${S * 8}px`
310
+ }), /* @__PURE__ */ p.createElement(Ht, { theme: M }, /* @__PURE__ */ p.createElement(Bt.Provider, { value: m }, /* @__PURE__ */ p.createElement(jt.Provider, { value: E }, (() => {
311
+ const x = f({
312
+ "data-width": $ === "full" ? b : Math.min($, b),
313
+ "data-indent": F,
294
314
  "data-name": m.name,
295
315
  "data-node-id": m.id,
296
316
  "data-component-type": m.type,
297
- "aria-label": i,
298
- tabIndex: o,
317
+ "aria-label": o,
318
+ tabIndex: i,
299
319
  id: m.id,
300
320
  role: E && E.role
301
321
  }, c);
302
322
  switch (m.type) {
303
323
  case "view":
304
- return typeof E.animation == "string" && E.animation !== "none" ? /* @__PURE__ */ h.createElement(ut, C(p({}, S), { className: t })) : /* @__PURE__ */ h.createElement(lt, C(p({}, S), { className: t }));
324
+ return typeof E.animation == "string" && E.animation !== "none" ? /* @__PURE__ */ p.createElement(Oe, C(f({}, x), { className: e })) : /* @__PURE__ */ p.createElement(Ce, C(f({}, x), { className: e }));
305
325
  default: {
306
- const I = Ve(E);
307
- return /* @__PURE__ */ h.createElement(
308
- mt,
309
- C(p(p({
326
+ const z = Wt(E);
327
+ return /* @__PURE__ */ p.createElement(
328
+ Se,
329
+ C(f(f({
310
330
  ref: a
311
- }, S), I), {
312
- className: t
331
+ }, x), z), {
332
+ className: e
313
333
  })
314
334
  );
315
335
  }
316
336
  }
317
337
  })())));
318
338
  }
319
- ), te = gt, yt = ({ builder: t }) => {
320
- const e = T(), [n, s] = z(null);
321
- return B(() => {
322
- e.getAsync("components").then((i) => t(i).then((o) => {
323
- s(o);
339
+ ), it = Me, Ne = ({ builder: e }) => {
340
+ const t = W(), [n, s] = B(null);
341
+ return j(() => {
342
+ t.getAsync("components").then((o) => e(o).then((i) => {
343
+ s(i);
324
344
  }));
325
- }, []), B(() => () => {
326
- n && e.getAsync("components").then((i) => {
327
- i.nodes.detached = i.nodes.detached.filter(
328
- (o) => o.id !== n.id
345
+ }, []), j(() => () => {
346
+ n && t.getAsync("components").then((o) => {
347
+ o.nodes.detached = o.nodes.detached.filter(
348
+ (i) => i.id !== n.id
329
349
  );
330
350
  });
331
- }, [n]), n ? /* @__PURE__ */ h.createElement(te, { id: n.id, node: n, branch: "default" }) : null;
332
- }, bt = yt, wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
351
+ }, [n]), n ? /* @__PURE__ */ p.createElement(it, { id: n.id, node: n, branch: "default" }) : null;
352
+ }, Pe = Ne, Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
333
353
  __proto__: null,
334
- default: bt
335
- }, Symbol.toStringTag, { value: "Module" })), vt = h.lazy(() => Promise.resolve().then(() => wt)), Et = ({ showSearch: t = !1 }) => {
336
- const e = Be(), n = T();
337
- return /* @__PURE__ */ h.createElement(h.Suspense, { fallback: null }, /* @__PURE__ */ h.createElement(
338
- vt,
354
+ default: Pe
355
+ }, Symbol.toStringTag, { value: "Module" })), _e = p.lazy(() => Promise.resolve().then(() => Le)), ke = ({ showSearch: e = !1 }) => {
356
+ const t = qt(), n = W();
357
+ return /* @__PURE__ */ p.createElement(p.Suspense, { fallback: null }, /* @__PURE__ */ p.createElement(
358
+ _e,
339
359
  {
340
- builder: (s) => n.get("settings").then((i) => {
360
+ builder: (s) => n.get("settings").then((o) => {
341
361
  var u;
342
- const { properties: o, context: r } = Object.keys(i.components).reduce(
343
- (d, l) => (i.components[l].type === "not-found" && (d.properties = i.components[l].properties, d.context = i.components[l].context), d),
362
+ const { properties: i, context: r } = Object.keys(o.components).reduce(
363
+ (d, l) => (o.components[l].type === "not-found" && (d.properties = o.components[l].properties, d.context = o.components[l].context), d),
344
364
  { properties: {}, context: {} }
345
365
  );
346
- o.showSearch = t;
366
+ i.showSearch = e;
347
367
  const c = s.createNode("area", { detached: !0 });
348
368
  if (c.name = "not-found-area", c.writeLayout({
349
369
  size: "full"
350
- }), t) {
351
- const d = Object.keys(i.components).reduce(
352
- (f, m) => i.components[m].type === "search" ? i.components[m].properties : f,
370
+ }), e) {
371
+ const d = Object.keys(o.components).reduce(
372
+ (h, m) => o.components[m].type === "search" ? o.components[m].properties : h,
353
373
  {}
354
374
  ), l = s.createNode("search", { detached: !0 });
355
- l.writeLayout({ size: "full" }), l.writeProperties(p({
356
- "css-margin-bottom": ((u = e == null ? void 0 : e.sizes) == null ? void 0 : u.normal) || "15px"
375
+ l.writeLayout({ size: "full" }), l.writeProperties(f({
376
+ "css-margin-bottom": ((u = t == null ? void 0 : t.sizes) == null ? void 0 : u.normal) || "15px"
357
377
  }, d)), c.appendChild(l);
358
378
  }
359
379
  const a = s.createNode("not-found", { detached: !0 });
360
- return a.writeLayout({ size: "full" }), a.writeProperties(o), a.writeContext(r), c.appendChild(a), c;
380
+ return a.writeLayout({ size: "full" }), a.writeProperties(i), a.writeContext(r), c.appendChild(a), c;
361
381
  })
362
382
  }
363
383
  ));
364
- }, Zt = Et, Ct = (t) => {
365
- if (t) {
366
- const { type: e, content: n } = t;
367
- switch (e) {
384
+ }, vn = ke, Re = (e) => {
385
+ class t extends e {
386
+ requestInstance(s) {
387
+ const o = new CustomEvent("request-instance", {
388
+ detail: { key: s },
389
+ bubbles: !0,
390
+ composed: !0,
391
+ cancelable: !0
392
+ });
393
+ return this.dispatchEvent(o), o.detail.instance;
394
+ }
395
+ }
396
+ return t;
397
+ };
398
+ var Ve = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, R = (e, t, n, s) => {
399
+ for (var o = s > 1 ? void 0 : s ? Ie(t, n) : t, i = e.length - 1, r; i >= 0; i--)
400
+ (r = e[i]) && (o = (s ? r(t, n, o) : r(o)) || o);
401
+ return s && o && Ve(t, n, o), o;
402
+ };
403
+ const Te = (e) => `w-${e}`, pt = (e = "none", t = 1) => e === "full" ? t : Math.min(e, t);
404
+ let D = class extends Re(se) {
405
+ constructor() {
406
+ super(...arguments), this.listeners = [], this.branch = "default", this._descriptor = null, this._properties = {}, this._context = {}, this._layout = {};
407
+ }
408
+ connectedCallback() {
409
+ super.connectedCallback(), this.container = this.requestInstance("container"), this.container && Promise.all([
410
+ Et.getInstance(this.container),
411
+ this.container.getAsync("componentResolver")
412
+ ]).then((e) => {
413
+ const t = e[0], n = e[1], s = t.nodes.get(this.nodeId || "");
414
+ if (s) {
415
+ this._descriptor = U(s, this.branch), this._properties = s.attributes.properties, this._context = s.attributes.context, this._layout = s.attributes.layout;
416
+ const o = this.style.getPropertyValue("--columns") ? +this.style.getPropertyValue("--columns") : 1, i = pt(this._layout.size, o), r = typeof this._layout.indent != "undefined" ? `${this._layout.indent + 1} / ${this._layout.indent + (i || 0) + 1}` : `span ${i}`;
417
+ this.style.setProperty("--gridColumn", r), this.listeners.push(
418
+ t.events.subscribe(
419
+ "components:properties-changed",
420
+ (d, l) => {
421
+ var h;
422
+ this.nodeId === ((h = l.node) == null ? void 0 : h.id) && (this._properties = l.node.attributes.properties);
423
+ }
424
+ )
425
+ ), this.listeners.push(
426
+ t.events.subscribe("components:context-changed", (d, l) => {
427
+ var h;
428
+ this.nodeId === ((h = l.node) == null ? void 0 : h.id) && (this._context = l.node.attributes.context);
429
+ })
430
+ ), this.listeners.push(
431
+ t.events.subscribe("components:layout-changed", (d, l) => {
432
+ var h;
433
+ this.nodeId === ((h = l.node) == null ? void 0 : h.id) && (this._layout = l.node.attributes.layout);
434
+ })
435
+ );
436
+ const c = s.mount(this.container);
437
+ if (this.listeners.push(c), !n) {
438
+ console.warn(
439
+ "Could not find resolver. Make sure it is registered on the container."
440
+ );
441
+ return;
442
+ }
443
+ const a = Te(this._descriptor.type);
444
+ if (customElements.get(a))
445
+ return;
446
+ const u = n.getComponent(this._descriptor.type);
447
+ if (!u) {
448
+ console.warn("Component is missing or using incorrect import.");
449
+ return;
450
+ }
451
+ return u().then((d) => {
452
+ customElements.get(a) || customElements.define(a, d.default);
453
+ });
454
+ }
455
+ });
456
+ }
457
+ disconnectedCallback() {
458
+ this.listeners.forEach((e) => {
459
+ e();
460
+ });
461
+ }
462
+ mapProps() {
463
+ var t;
464
+ const e = this.style.getPropertyValue("--columns") ? +this.style.getPropertyValue("--columns") : 1;
465
+ return Object.entries(this._properties).reduce(
466
+ (n, [s, o]) => (typeof o == "object" ? n[`.${s}`] = o : n[s] = o, n),
467
+ {
468
+ "data-width": pt(this._layout.size, e),
469
+ "data-indent": (t = this._layout.indent) != null ? t : 0,
470
+ id: this._descriptor.id,
471
+ "data-name": this._descriptor.name,
472
+ "data-component-type": this._descriptor.type,
473
+ "data-node-id": this.nodeId
474
+ }
475
+ );
476
+ }
477
+ render() {
478
+ if (!this._descriptor)
479
+ return ee;
480
+ const e = `w-${this._descriptor.type}`, t = this.mapProps();
481
+ return ie`
482
+ <${re(e)}
483
+ ${te(t)}
484
+ .layout=${this._layout}
485
+ .context=${this._context}
486
+ />
487
+ `;
488
+ }
489
+ };
490
+ D.styles = [
491
+ ne`
492
+ :host {
493
+ outline: none;
494
+ box-sizing: border-box;
495
+ }
496
+
497
+ * {
498
+ box-sizing: border-box;
499
+ outline: none;
500
+ }
501
+
502
+ grid-column: var(--gridColumn);
503
+ `
504
+ ];
505
+ R([
506
+ Ct({ type: String })
507
+ ], D.prototype, "nodeId", 2);
508
+ R([
509
+ Ct({ type: String })
510
+ ], D.prototype, "branch", 2);
511
+ R([
512
+ Q()
513
+ ], D.prototype, "_descriptor", 2);
514
+ R([
515
+ Q()
516
+ ], D.prototype, "_properties", 2);
517
+ R([
518
+ Q()
519
+ ], D.prototype, "_context", 2);
520
+ R([
521
+ Q()
522
+ ], D.prototype, "_layout", 2);
523
+ D = R([
524
+ oe("widget-component")
525
+ ], D);
526
+ const ze = (e) => `w-${e}`, En = (e, t, n) => dt(void 0, null, function* () {
527
+ const s = n.nodes.get(e);
528
+ if (!t) {
529
+ console.warn("Could not find resolver. Make sure it is registered on the container.");
530
+ return;
531
+ }
532
+ if (!s) {
533
+ console.warn(`Unable to find node with id: ${e}`);
534
+ return;
535
+ }
536
+ const o = U(s);
537
+ if (!(o != null && o.type)) {
538
+ console.warn(`Could not get descriptor for: ${s.name}`);
539
+ return;
540
+ }
541
+ const i = ze(o.type);
542
+ if (customElements.get(i))
543
+ return;
544
+ const r = t.getComponent(o.type);
545
+ if (!r) {
546
+ console.warn("Component is missing or using incorrect import.");
547
+ return;
548
+ }
549
+ const c = yield r();
550
+ if (!customElements.get(i))
551
+ try {
552
+ customElements.define(i, c.default);
553
+ } catch (a) {
554
+ console.log("error", a);
555
+ }
556
+ return customElements.whenDefined(i).then(() => ({
557
+ nodeId: e,
558
+ tag: i
559
+ }));
560
+ }), Be = (e) => {
561
+ if (e) {
562
+ const { type: t, content: n } = e;
563
+ switch (t) {
368
564
  case "FontAwesome":
369
565
  return `<i class="humany-icon fa fa-${n}"></i>`;
370
566
  case "Uri":
@@ -373,23 +569,23 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
373
569
  return "";
374
570
  }
375
571
  }
376
- }, Ot = (t) => {
377
- const e = (i, o) => {
378
- !i || (o ? i.classList.add("humany-tabbing") : i.classList.remove("humany-tabbing"));
379
- }, n = (i) => {
380
- i.key === "Tab" ? e(t, !0) : i.key === "Enter" && document.activeElement && document.activeElement.classList.contains("humany-trigger") || e(t, !1);
381
- }, s = (i) => {
382
- document.activeElement && document.activeElement.classList.contains("humany-trigger") && document.activeElement.classList.contains("humany-tabbing") || e(t, !1);
572
+ }, je = (e) => {
573
+ const t = (o, i) => {
574
+ !o || (i ? o.classList.add("humany-tabbing") : o.classList.remove("humany-tabbing"));
575
+ }, n = (o) => {
576
+ o.key === "Tab" ? t(e, !0) : o.key === "Enter" && document.activeElement && document.activeElement.classList.contains("humany-trigger") || t(e, !1);
577
+ }, s = (o) => {
578
+ document.activeElement && document.activeElement.classList.contains("humany-trigger") && document.activeElement.classList.contains("humany-tabbing") || t(e, !1);
383
579
  };
384
580
  return document.addEventListener("keydown", n), document.addEventListener("click", s), () => {
385
581
  document.removeEventListener("keydown", n), document.removeEventListener("click", s);
386
582
  };
387
583
  };
388
- function St(t, e) {
389
- const { symbol: n, widgetName: s, label: i = "", ariaLabel: o = "", tooltip: r = "" } = e;
390
- t.classList.add("humany-trigger"), t.classList.add(`humany_${s}`), i.length && t.classList.add("humany-has-text"), o.length && !t.getAttribute("aria-label") && t.setAttribute("aria-label", o), o.length && !t.getAttribute("tabindex") && t.setAttribute("tabindex", "0"), r.length && !t.getAttribute("title") && t.setAttribute("title", r);
391
- const c = Ct(n) || "";
392
- return t.innerHTML = `${c}
584
+ function We(e, t) {
585
+ const { symbol: n, widgetName: s, label: o = "", ariaLabel: i = "", tooltip: r = "" } = t;
586
+ e.classList.add("humany-trigger"), e.classList.add(`humany_${s}`), o.length && e.classList.add("humany-has-text"), i.length && !e.getAttribute("aria-label") && e.setAttribute("aria-label", i), i.length && !e.getAttribute("tabindex") && e.setAttribute("tabindex", "0"), r.length && !e.getAttribute("title") && e.setAttribute("title", r);
587
+ const c = Be(n) || "";
588
+ return e.innerHTML = `${c}
393
589
  <span class="humany-close">
394
590
  <svg width="18" height="9" viewBox="0 0 18 9" fill="none" xmlns="http://www.w3.org/2000/svg">
395
591
  <path d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z" fill="white"/>
@@ -407,54 +603,54 @@ function St(t, e) {
407
603
  stroke-miterlimit="10" />
408
604
  </svg>
409
605
  </span>
410
- ${i.length ? `<span>${i}</span>` : ""}`, setTimeout(() => t && t.classList.add("humany-rendered")), Ot(t);
606
+ ${o.length ? `<span>${o}</span>` : ""}`, setTimeout(() => e && e.classList.add("humany-rendered")), je(e);
411
607
  }
412
- function At(t, e) {
413
- t instanceof HTMLElement ? (e && t.setAttribute("title", e), t.classList.remove("humany-active"), t.classList.remove("humany-loading")) : t instanceof Array && t.forEach((n) => {
414
- e && n.setAttribute("title", e), n.classList.remove("humany-active"), n.classList.remove("humany-loading");
608
+ function Fe(e, t) {
609
+ e instanceof HTMLElement ? (t && e.setAttribute("title", t), e.classList.remove("humany-active"), e.classList.remove("humany-loading")) : e instanceof Array && e.forEach((n) => {
610
+ t && n.setAttribute("title", t), n.classList.remove("humany-active"), n.classList.remove("humany-loading");
415
611
  });
416
612
  }
417
- function xt(t) {
418
- t instanceof HTMLElement ? (t.classList.remove("humany-active"), t.classList.add("humany-loading")) : t instanceof Array && t.forEach((e) => {
419
- e.classList.remove("humany-active"), e.classList.add("humany-loading");
613
+ function Ge(e) {
614
+ e instanceof HTMLElement ? (e.classList.remove("humany-active"), e.classList.add("humany-loading")) : e instanceof Array && e.forEach((t) => {
615
+ t.classList.remove("humany-active"), t.classList.add("humany-loading");
420
616
  });
421
617
  }
422
- function ye(t, e) {
423
- t instanceof HTMLElement ? (e && t.setAttribute("title", e), t.classList.add("humany-active"), t.classList.remove("humany-loading")) : t instanceof Array && t.forEach((n) => {
424
- e && n.setAttribute("title", e), n.classList.add("humany-active"), n.classList.remove("humany-loading");
618
+ function xt(e, t) {
619
+ e instanceof HTMLElement ? (t && e.setAttribute("title", t), e.classList.add("humany-active"), e.classList.remove("humany-loading")) : e instanceof Array && e.forEach((n) => {
620
+ t && n.setAttribute("title", t), n.classList.add("humany-active"), n.classList.remove("humany-loading");
425
621
  });
426
622
  }
427
- var k = /* @__PURE__ */ ((t) => (t.Inline = "inline", t.Link = "link", t.Badge = "badge", t.Unsupported = "unsupported", t))(k || {});
428
- const Dt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "none", be = (t) => t ? typeof t == "boolean" && t ? "link" : typeof t == "object" && !Array.isArray(t) ? "badge" : "unsupported" : "inline", Mt = (t, e, n, s, i = !1) => {
623
+ var _ = /* @__PURE__ */ ((e) => (e.Inline = "inline", e.Link = "link", e.Badge = "badge", e.Unsupported = "unsupported", e))(_ || {});
624
+ const He = (e, t) => e && t ? "both" : e ? "widgetDOM" : t ? "triggerDOM" : "none", $t = (e) => e ? typeof e == "boolean" && e ? "link" : typeof e == "object" && !Array.isArray(e) ? "badge" : "unsupported" : "inline", qe = (e, t, n, s, o = !1) => {
429
625
  var u, d;
430
- const o = Dt(
431
- e,
626
+ const i = He(
627
+ t,
432
628
  n
433
- ), r = be(s), c = {
434
- widgetDOMElement: e ? e.cloneNode(!0) : void 0,
629
+ ), r = $t(s), c = {
630
+ widgetDOMElement: t ? t.cloneNode(!0) : void 0,
435
631
  triggerDOMElement: n ? n.cloneNode(!0) : void 0
436
632
  }, a = {
437
633
  triggerType: r,
438
634
  cachedOriginals: c,
439
635
  widgetDOMElement: document.createElement("div")
440
636
  };
441
- switch (o) {
637
+ switch (i) {
442
638
  case "both": {
443
- a.widgetDOMElement = e || document.createElement("div"), r !== "inline" && (a.triggerDOMElement = n);
639
+ a.widgetDOMElement = t || document.createElement("div"), r !== "inline" && (a.triggerDOMElement = n);
444
640
  break;
445
641
  }
446
642
  case "widgetDOM": {
447
- if (a.widgetDOMElement = e || document.createElement("div"), r !== "inline") {
643
+ if (a.widgetDOMElement = t || document.createElement("div"), r !== "inline") {
448
644
  const l = document.body.appendChild(document.createElement("a"));
449
- r === "link" && (l.innerText = t), a.triggerDOMElement = l;
645
+ r === "link" && (l.innerText = e), a.triggerDOMElement = l;
450
646
  }
451
647
  break;
452
648
  }
453
649
  case "triggerDOM": {
454
650
  const l = document.createElement("div");
455
- a.widgetDOMElement = l, r === "inline" ? (l.id = (n == null ? void 0 : n.id) || "", i ? (l.style.display = "none", (u = n == null ? void 0 : n.parentNode) == null || u.appendChild(l), a.callback = () => {
456
- var f;
457
- (f = n == null ? void 0 : n.parentNode) == null || f.replaceChild(
651
+ a.widgetDOMElement = l, r === "inline" ? (l.id = (n == null ? void 0 : n.id) || "", o ? (l.style.display = "none", (u = n == null ? void 0 : n.parentNode) == null || u.appendChild(l), a.callback = () => {
652
+ var h;
653
+ (h = n == null ? void 0 : n.parentNode) == null || h.replaceChild(
458
654
  l,
459
655
  n
460
656
  ), l.style.display = (n == null ? void 0 : n.style.display) || "block";
@@ -467,57 +663,57 @@ const Dt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "non
467
663
  case "none": {
468
664
  const l = document.body.appendChild(document.createElement("div"));
469
665
  if (a.widgetDOMElement = l, r !== "inline") {
470
- const f = document.body.appendChild(document.createElement("a"));
471
- r === "link" && (f.innerText = t), a.triggerDOMElement = f;
666
+ const h = document.body.appendChild(document.createElement("a"));
667
+ r === "link" && (h.innerText = e), a.triggerDOMElement = h;
472
668
  }
473
669
  break;
474
670
  }
475
671
  }
476
672
  return a;
477
- }, Nt = "modals";
478
- class $t {
479
- constructor(e, n) {
480
- this.options = n, this.unsubscribe = [], this.container = e.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register("triggerDOMElement", this.options.triggerDOMElement);
673
+ }, Ke = "modals";
674
+ class Ue {
675
+ constructor(t, n) {
676
+ this.options = n, this.unsubscribe = [], this.container = t.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register("triggerDOMElement", this.options.triggerDOMElement);
481
677
  const s = this.container.get("$widget");
482
678
  this.options.widgetDOMElement.classList.add("humany-widget"), this.options.widgetDOMElement.classList.add(`humany_${s.name}`);
483
- const i = e.get("widgetDOMElements") || [];
484
- e.register("widgetDOMElements", [
485
- ...i,
679
+ const o = t.get("widgetDOMElements") || [];
680
+ t.register("widgetDOMElements", [
681
+ ...o,
486
682
  this.options.widgetDOMElement
487
683
  ]);
488
684
  }
489
685
  render() {
490
- const { widgetDOMElement: e, triggerDOMElement: n } = this.options, s = this.container.get("$widget");
491
- return e.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === k.Badge && xt(n), import("./render.9ebba652.js").then((i) => i.default(s.name, this.container, e)).then(() => {
492
- if (e.setAttribute("data-rendered", "true"), n && this.options.triggerType === k.Badge) {
493
- const o = this.options.triggerOptions.openTooltip;
494
- ye(n, o);
686
+ const { widgetDOMElement: t, triggerDOMElement: n } = this.options, s = this.container.get("$widget");
687
+ return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === _.Badge && Ge(n), import("./render.4f979aa1.js").then((o) => o.default(s.name, this.container, t)).then(() => {
688
+ if (t.setAttribute("data-rendered", "true"), n && this.options.triggerType === _.Badge) {
689
+ const i = this.options.triggerOptions.openTooltip;
690
+ xt(n, i);
495
691
  }
496
- We(this.container, e);
497
- const i = this.container.get("$environment").widgets.all();
498
- $(
692
+ Yt(this.container, t);
693
+ const o = this.container.get("$environment").widgets.all();
694
+ P(
499
695
  this.container,
500
- Nt,
696
+ Ke,
501
697
  v.Session
502
- ).then((o) => {
503
- o && o.forEach((r) => {
504
- i.find(
698
+ ).then((i) => {
699
+ i && i.forEach((r) => {
700
+ o.find(
505
701
  (c) => c.name === r.name && c.state === "activated"
506
702
  ) && s.events.dispatch("widget:modal-opened", r);
507
703
  });
508
704
  });
509
705
  }));
510
706
  }
511
- renderBadge(e) {
707
+ renderBadge(t) {
512
708
  const { triggerDOMElement: n } = this.options;
513
709
  if (!n)
514
710
  return;
515
711
  n.getAttribute("role") || n.setAttribute("role", "button");
516
- const { name: s } = this.container.get("$widget"), { label: i, symbol: o, ariaLabel: r, closedTooltip: c, openTooltip: a } = e, u = { closedTooltip: c, openTooltip: a };
712
+ const { name: s } = this.container.get("$widget"), { label: o, symbol: i, ariaLabel: r, closedTooltip: c, openTooltip: a } = t, u = { closedTooltip: c, openTooltip: a };
517
713
  this.options.triggerOptions = u;
518
- const d = St(n, {
519
- label: i,
520
- symbol: o,
714
+ const d = We(n, {
715
+ label: o,
716
+ symbol: i,
521
717
  ariaLabel: r,
522
718
  widgetName: s,
523
719
  tooltip: c
@@ -525,13 +721,13 @@ class $t {
525
721
  this.unsubscribe.push(d);
526
722
  }
527
723
  dispose() {
528
- return import("./unmount.b0816844.js").then((e) => {
529
- var i, o, r, c;
724
+ return import("./unmount.b0816844.js").then((t) => {
725
+ var o, i, r, c;
530
726
  const { triggerDOMElement: n, widgetDOMElement: s } = this.options;
531
- e.default(s), this.options.cachedOriginals.widgetDOMElement && s && ((i = s.parentNode) == null || i.replaceChild(
727
+ t.default(s), this.options.cachedOriginals.widgetDOMElement && s && ((o = s.parentNode) == null || o.replaceChild(
532
728
  this.options.cachedOriginals.widgetDOMElement,
533
729
  s
534
- )), this.options.cachedOriginals.triggerDOMElement && n && ((o = n.parentNode) == null || o.replaceChild(
730
+ )), this.options.cachedOriginals.triggerDOMElement && n && ((i = n.parentNode) == null || i.replaceChild(
535
731
  this.options.cachedOriginals.triggerDOMElement,
536
732
  n
537
733
  )), this.unsubscribe.forEach((a) => {
@@ -540,128 +736,126 @@ class $t {
540
736
  });
541
737
  }
542
738
  }
543
- const F = "changesets", Lt = (t) => {
544
- const e = { tags: t.tags };
545
- return t.context && typeof t.context != "function" && (e.context = t.context), t.properties && typeof t.properties != "function" && (e.properties = t.properties), t.layout && typeof t.layout != "function" && (e.layout = t.layout), e;
739
+ const q = "changesets", Ye = (e) => {
740
+ const t = { tags: e.tags };
741
+ return e.context && typeof e.context != "function" && (t.context = e.context), e.properties && typeof e.properties != "function" && (t.properties = e.properties), e.layout && typeof e.layout != "function" && (t.layout = e.layout), t;
546
742
  };
547
- class ne {
548
- constructor(e, n) {
549
- this.container = e, this.storageWriter = n;
743
+ class rt {
744
+ constructor(t, n) {
745
+ this.container = t, this.storageWriter = n;
550
746
  }
551
- static create(e) {
552
- return V(e, F, _.Necessary, {
747
+ static create(t) {
748
+ return I(t, q, T.Necessary, {
553
749
  medium: v.Local
554
- }).then((n) => new ne(e, n));
750
+ }).then((n) => new rt(t, n));
555
751
  }
556
- write(e, n, s, i) {
557
- return q(this)(() => $(
752
+ write(t, n, s, o) {
753
+ return X(this)(() => P(
558
754
  this.container,
559
- F,
755
+ q,
560
756
  v.Local
561
- ).then((o = {}) => {
562
- const { keys: r = [], items: c = {} } = o, a = r.indexOf(e);
563
- return a > -1 && r.splice(a, 1), r.push(e), c[e] = {
564
- options: i,
565
- attributes: Lt(s),
757
+ ).then((i = {}) => {
758
+ const { keys: r = [], items: c = {} } = i, a = r.indexOf(t);
759
+ return a > -1 && r.splice(a, 1), r.push(t), c[t] = {
760
+ options: o,
761
+ attributes: Ye(s),
566
762
  rules: n.rules
567
763
  }, this.storageWriter({ keys: r, items: c });
568
764
  }));
569
765
  }
570
- remove(e) {
571
- return q(this)(() => $(
766
+ remove(t) {
767
+ return X(this)(() => P(
572
768
  this.container,
573
- F,
769
+ q,
574
770
  v.Local
575
771
  ).then((n = {}) => {
576
- const { keys: s = [], items: i = {} } = n, o = s.indexOf(e);
577
- if (o > -1)
578
- return s.splice(o, 1), delete i[e], this.storageWriter(n);
772
+ const { keys: s = [], items: o = {} } = n, i = s.indexOf(t);
773
+ if (i > -1)
774
+ return s.splice(i, 1), delete o[t], this.storageWriter(n);
579
775
  }));
580
776
  }
581
- load(e) {
582
- return q(this)(() => $(
777
+ load(t) {
778
+ return X(this)(() => P(
583
779
  this.container,
584
- F,
780
+ q,
585
781
  v.Local
586
782
  ).then((n = {}) => {
587
- const { keys: s = [], items: i = {} } = n;
588
- s.forEach((o) => {
589
- const r = i[o];
783
+ const { keys: s = [], items: o = {} } = n;
784
+ s.forEach((i) => {
785
+ const r = o[i];
590
786
  if (r) {
591
787
  const { rules: c, attributes: a, options: u } = r;
592
- e.write({
788
+ t.write({
593
789
  attributes: a,
594
790
  options: u,
595
- target: new Ge(e, c)
791
+ target: new Ut(t, c)
596
792
  });
597
793
  }
598
794
  });
599
795
  }));
600
796
  }
601
797
  }
602
- const kt = (t) => {
603
- const { container: e } = t;
604
- return ne.create(e).then((n) => {
605
- const s = e.get("$settings"), i = { localStorage: n }, o = new Te(t, i), r = je(o, s);
606
- return t.events.subscribe("widget:state-change", (c, a) => {
607
- a.state === Ze.Deactivating && r();
608
- }), o;
798
+ const Qe = (e) => {
799
+ const { container: t } = e;
800
+ return rt.create(t).then((n) => {
801
+ const s = t.get("$settings"), o = { localStorage: n }, i = new Et(e, o), r = Kt(i, s);
802
+ return e.events.subscribe("widget:state-change", (c, a) => {
803
+ a.state === ue.Deactivating && r();
804
+ }), i;
609
805
  });
610
- }, Pt = (t) => import("@telia-ace/widget-routing").then(({ RoutingService: e, HistoryMode: n }) => t.get("settings").then((s) => {
806
+ }, Ze = (e) => import("@telia-ace/widget-routing").then(({ RoutingService: t, HistoryMode: n }) => e.get("settings").then((s) => {
611
807
  const {
612
- routing: { initialPath: i = "/", mode: o = n.scopedHash, basePath: r },
808
+ routing: { initialPath: o = "/", mode: i = n.scopedHash, basePath: r },
613
809
  views: c
614
810
  } = s;
615
- return new e(t, {
616
- initialPath: i,
617
- mode: o,
811
+ return new t(e, {
812
+ initialPath: o,
813
+ mode: i,
618
814
  routes: Object.keys(c).map((u) => ({
619
815
  name: u,
620
816
  path: c[u].path
621
817
  })),
622
818
  basePath: r
623
819
  });
624
- })), Rt = (t) => import("@telia-ace/widget-services").then(({ StorageProvider: e }) => new e()), Vt = (t) => import("@telia-ace/widget-core").then(({ ActionResolver: e }) => new e(t)), _t = (t) => import("@telia-ace/widget-core").then(({ ComponentResolver: e }) => new e(t)), It = (t) => import("@telia-ace/widget-core").then(({ ComponentPlatform: e, createComponentModel: n }) => kt(t.get("$widget"))), Z = "$settings", H = "open", le = "activeStickyWidget";
625
- class Jt extends Je {
626
- constructor(e) {
627
- super(e), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (n) => {
820
+ })), Je = (e) => import("@telia-ace/widget-services").then(({ StorageProvider: t }) => new t()), Xe = (e) => import("@telia-ace/widget-core").then(({ ActionResolver: t }) => new t(e)), tn = (e) => import("@telia-ace/widget-core").then(({ ComponentResolver: t }) => new t(e)), en = (e) => import("@telia-ace/widget-core").then(({ ComponentPlatform: t, createComponentModel: n }) => Qe(e.get("$widget"))), et = "$settings", K = "open", mt = "activeStickyWidget";
821
+ class Cn extends de {
822
+ constructor(t) {
823
+ super(t), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (n) => {
628
824
  const s = {
629
825
  triggerDOMElement: n.sourceDOMElement,
630
826
  withRenderState: "storage"
631
827
  };
632
- this.container.get("settings").then((i) => {
633
- const { activate: o } = i;
634
- (typeof o == "undefined" || o === null || o === !0) && (this.activated = (this.activated || this.widget.activate()).then(
828
+ this.container.get("settings").then((o) => {
829
+ const { activate: i } = o;
830
+ (typeof i == "undefined" || i === null || i === !0) && (this.activated = (this.activated || this.widget.activate()).then(
635
831
  () => this.attach(s)
636
832
  ));
637
833
  });
638
- }, this.container.registerAsync("storage", () => Rt(this.container)), this.container.registerFactory("settings", () => $(
834
+ }, this.container.registerAsync("storage", () => Je(this.container)), this.container.registerFactory("settings", () => P(
639
835
  this.container,
640
- Z,
836
+ et,
641
837
  v.Local
642
- ).then((n = {}) => p(p({}, this.container.get("$settings")), n))), Qe(this, "load", this.handleBootstrapping), this.container.registerAsync(
838
+ ).then((n = {}) => f(f({}, this.container.get("$settings")), n))), le(this, "load", this.handleBootstrapping), this.container.registerAsync(
643
839
  "componentResolver",
644
- () => _t(this.container)
645
- ), this.container.registerAsync("router", () => Pt(this.container)), this.container.registerAsync("actionResolver", () => Vt(this.container)), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync("components", () => It(this.container));
840
+ () => tn(this.container)
841
+ ), this.container.registerAsync("router", () => Ze(this.container)), this.container.registerAsync("actionResolver", () => Xe(this.container)), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync("components", () => en(this.container));
646
842
  }
647
843
  initialize() {
648
- console.log("experimental abc123");
649
- debugger;
650
- const e = this.container.getManyAsync(
844
+ const t = this.container.getManyAsync(
651
845
  "actionResolver",
652
846
  "router",
653
847
  "components"
654
848
  );
655
- return Promise.all([e, this.container.get("settings")]).then(
656
- ([{ actionResolver: n, router: s, components: i }, o]) => {
849
+ return Promise.all([t, this.container.get("settings")]).then(
850
+ ([{ actionResolver: n, router: s, components: o }, i]) => {
657
851
  var a;
658
852
  n.subscribe(
659
853
  this.widget.name,
660
854
  (u, d, l) => this.onAction(d, l)
661
855
  );
662
856
  const r = (u) => {
663
- i.nodes.query({ type: "view" }).forEach((d) => {
664
- i.setSwitch(d, u);
857
+ o.nodes.query({ type: "view" }).forEach((d) => {
858
+ o.setSwitch(d, u);
665
859
  });
666
860
  }, c = ((a = s.getInitialRoute()) == null ? void 0 : a.name) || "index";
667
861
  return r(c), this.events.subscribe("widget:data-loaded", (u, { element: d }) => {
@@ -671,11 +865,11 @@ class Jt extends Je {
671
865
  }), this.events.subscribe(
672
866
  "router:change",
673
867
  (u, { previous: d = { routeData: {} }, next: l = { routeData: {} } }) => {
674
- const { routeData: f } = d, { routeData: m } = l, g = Object.keys(o.views).reduce((b, y) => typeof o.views[y].path == "undefined" ? y : b, "");
675
- !m.name && g ? r(g) : r(m.name), ce(f && f.params), ce(m && m.params), this.container.getAsync("actionResolver").then((b) => {
868
+ const { routeData: h } = d, { routeData: m } = l, g = Object.keys(i.views).reduce((b, y) => typeof i.views[y].path == "undefined" ? y : b, "");
869
+ !m.name && g ? r(g) : r(m.name), ht(h && h.params), ht(m && m.params), this.container.getAsync("actionResolver").then((b) => {
676
870
  b.action(this.widget.name, "routeChange", {
677
871
  next: m,
678
- previous: f
872
+ previous: h
679
873
  });
680
874
  });
681
875
  }
@@ -683,24 +877,24 @@ class Jt extends Je {
683
877
  }
684
878
  );
685
879
  }
686
- attach(e = {}) {
880
+ attach(t = {}) {
687
881
  return this.container.get("settings").then(({ trigger: n }) => {
688
- var f, m;
882
+ var h, m;
689
883
  const {
690
884
  widgetDOMElement: s,
691
- key: i = Fe(),
692
- triggerDOMElement: o,
885
+ key: o = Qt(),
886
+ triggerDOMElement: i,
693
887
  withRenderState: r
694
- } = e, a = be(n) === k.Inline && ((o == null ? void 0 : o.childElementCount) || 0) > 0, u = Mt(
888
+ } = t, a = $t(n) === _.Inline && ((i == null ? void 0 : i.childElementCount) || 0) > 0, u = qe(
695
889
  this.widget.name,
696
890
  s,
697
- o,
891
+ i,
698
892
  n,
699
893
  a
700
894
  );
701
895
  this.outlets.size < 1 && !r && this.setRenderState("unset");
702
896
  const d = () => {
703
- const g = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), y = (j, L) => {
897
+ const g = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), y = (F, L) => {
704
898
  g() && (u.callback && u.callback(), L.disconnect());
705
899
  }, E = {
706
900
  attributes: !0,
@@ -714,8 +908,8 @@ class Jt extends Je {
714
908
  y.unresolvedQueries === 0 && d();
715
909
  });
716
910
  });
717
- const l = this.getOrCreateViewOutlet(i, u);
718
- if (this.outlets.set(i, l), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), u.triggerType === k.Badge && n && ((f = u.triggerDOMElement) == null || f.setAttribute("aria-expanded", "false"), l == null || l.renderBadge(n)), u.triggerType !== k.Inline && ((m = u.triggerDOMElement) == null || m.addEventListener("click", (g) => {
911
+ const l = this.getOrCreateViewOutlet(o, u);
912
+ if (this.outlets.set(o, l), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), u.triggerType === _.Badge && n && ((h = u.triggerDOMElement) == null || h.setAttribute("aria-expanded", "false"), l == null || l.renderBadge(n)), u.triggerType !== _.Inline && ((m = u.triggerDOMElement) == null || m.addEventListener("click", (g) => {
719
913
  g.preventDefault(), this.container.get("settings").then(({ trigger: b }) => {
720
914
  l.render().then(() => this.renderState()).then((y) => b && b.action && b.action === "hide" ? y === O.open ? this.hide() : this.open() : y === O.open ? this.close() : this.open());
721
915
  });
@@ -725,7 +919,7 @@ class Jt extends Je {
725
919
  });
726
920
  if (r)
727
921
  return r === "storage" ? this.renderState().then((g) => {
728
- if (u.triggerType === k.Inline) {
922
+ if (u.triggerType === _.Inline) {
729
923
  this.triggerStateIfApplicable("open");
730
924
  return;
731
925
  }
@@ -733,23 +927,23 @@ class Jt extends Je {
733
927
  }) : this.triggerStateIfApplicable(r);
734
928
  });
735
929
  }
736
- detach(e) {
737
- if (e) {
738
- if (this.outlets.has(e)) {
739
- const n = this.outlets.get(e);
740
- n == null || n.dispose(), this.outlets.delete(e);
930
+ detach(t) {
931
+ if (t) {
932
+ if (this.outlets.has(t)) {
933
+ const n = this.outlets.get(t);
934
+ n == null || n.dispose(), this.outlets.delete(t);
741
935
  return;
742
936
  }
743
- process.env.NODE_ENV !== "production" && console.warn(`detach(): Could not find View Outlet with key ${e}`);
937
+ process.env.NODE_ENV !== "production" && console.warn(`detach(): Could not find View Outlet with key ${t}`);
744
938
  return;
745
939
  }
746
940
  this.outlets.forEach((n) => {
747
941
  n.dispose();
748
942
  }), this.outlets.clear();
749
943
  }
750
- triggerStateIfApplicable(e) {
944
+ triggerStateIfApplicable(t) {
751
945
  return this.container.getAsync("router").then((n) => {
752
- switch (e) {
946
+ switch (t) {
753
947
  case "closed":
754
948
  this.close();
755
949
  break;
@@ -764,72 +958,72 @@ class Jt extends Je {
764
958
  }
765
959
  });
766
960
  }
767
- getOrCreateViewOutlet(e, n) {
768
- return this.outlets.has(e) ? this.outlets.get(e) : new $t(this.container, n);
961
+ getOrCreateViewOutlet(t, n) {
962
+ return this.outlets.has(t) ? this.outlets.get(t) : new Ue(this.container, n);
769
963
  }
770
- render(e = {}) {
771
- if (process.env.NODE_ENV !== "production" && console.warn("widget.render() is deprecated. Use widget.attach() instead."), e.open) {
772
- const n = C(p({}, e), {
964
+ render(t = {}) {
965
+ if (process.env.NODE_ENV !== "production" && console.warn("widget.render() is deprecated. Use widget.attach() instead."), t.open) {
966
+ const n = C(f({}, t), {
773
967
  withRenderState: "open"
774
968
  });
775
969
  return this.attach(n);
776
970
  }
777
- return this.attach(e);
971
+ return this.attach(t);
778
972
  }
779
- activate(e) {
780
- e != null && e.override && this.setSettings(() => e.override), e != null && e.apiNotificationPriorityBy && this.container.register("apiNotificationPriorityBy", e.apiNotificationPriorityBy);
973
+ activate(t) {
974
+ t != null && t.override && this.setSettings(() => t.override), t != null && t.apiNotificationPriorityBy && this.container.register("apiNotificationPriorityBy", t.apiNotificationPriorityBy);
781
975
  }
782
- setSettings(e) {
976
+ setSettings(t) {
783
977
  return Promise.all([
784
978
  this.container.get("settings"),
785
- V(this.container, Z, _.Necessary, {
979
+ I(this.container, et, T.Necessary, {
786
980
  medium: v.Local
787
981
  })
788
- ]).then(([n, s]) => Promise.resolve(e(n)).then((i) => s(i).then(() => {
789
- const o = p(p({}, n), i);
790
- return this.widget.events.dispatch("widget:settings-updated", o), o;
982
+ ]).then(([n, s]) => Promise.resolve(t(n)).then((o) => s(o).then(() => {
983
+ const i = f(f({}, n), o);
984
+ return this.widget.events.dispatch("widget:settings-updated", i), i;
791
985
  })));
792
986
  }
793
987
  clearSettings() {
794
- return V(
988
+ return I(
795
989
  this.container,
796
- Z,
797
- _.Necessary,
990
+ et,
991
+ T.Necessary,
798
992
  { medium: v.Local }
799
- ).then((e) => e()).then(() => this.container.get("settings")).then((e) => {
800
- this.widget.events.dispatch("widget:settings-updated", e);
993
+ ).then((t) => t()).then(() => this.container.get("settings")).then((t) => {
994
+ this.widget.events.dispatch("widget:settings-updated", t);
801
995
  });
802
996
  }
803
- action({ action: e, value: n }) {
997
+ action({ action: t, value: n }) {
804
998
  return this.container.getAsync("actionResolver").then((s) => {
805
- s.action(this.widget.name, e, n);
999
+ s.action(this.widget.name, t, n);
806
1000
  });
807
1001
  }
808
1002
  renderState() {
809
- if (Ye(this.container))
1003
+ if (ae(this.container))
810
1004
  return Promise.resolve(O.open);
811
- const e = () => $(
1005
+ const t = () => P(
812
1006
  this.container,
813
- H,
1007
+ K,
814
1008
  v.Session
815
- ).then((s = O.closed) => s), n = () => $(
1009
+ ).then((s = O.closed) => s), n = () => P(
816
1010
  this.container,
817
- H,
1011
+ K,
818
1012
  v.Session
819
1013
  ).then((s = O.closed) => s);
820
- return this.container.getAsync("router").then((s) => s.isSticky() ? n().then((i) => i === O.open ? i : e()) : e());
1014
+ return this.container.getAsync("router").then((s) => s.isSticky() ? n().then((o) => o === O.open ? o : t()) : t());
821
1015
  }
822
1016
  hide() {
823
1017
  return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
824
1018
  "hide(): No-op as no view outlets are registered. Invoke the attach() command first."
825
- ), Promise.resolve()) : (this.outlets.forEach((e) => e.render()), this.action({ action: "hide" }).then(() => {
1019
+ ), Promise.resolve()) : (this.outlets.forEach((t) => t.render()), this.action({ action: "hide" }).then(() => {
826
1020
  this.setTriggerState(!1);
827
1021
  }));
828
1022
  }
829
1023
  open() {
830
1024
  return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
831
1025
  "open(): No-op as no view outlets are registered. Invoke the attach() command first."
832
- ), Promise.resolve()) : (this.outlets.forEach((e) => e.render()), this.action({ action: "open" }).then(() => (this.widget.events.dispatch("tracking:widget-rendered", {}), this.onOpen())));
1026
+ ), Promise.resolve()) : (this.outlets.forEach((t) => t.render()), this.action({ action: "open" }).then(() => (this.widget.events.dispatch("tracking:widget-rendered", {}), this.onOpen())));
833
1027
  }
834
1028
  close() {
835
1029
  return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
@@ -841,66 +1035,66 @@ class Jt extends Je {
841
1035
  "show(): Command is deprecated and will be removed in the future. Use open() instead."
842
1036
  ), this.open();
843
1037
  }
844
- onAction(e, n) {
845
- switch (e) {
1038
+ onAction(t, n) {
1039
+ switch (t) {
846
1040
  case "close":
847
1041
  case "open":
848
1042
  case "hide":
849
- const s = e === "open" ? O.open : e === "close" ? O.closed : O.hidden;
1043
+ const s = t === "open" ? O.open : t === "close" ? O.closed : O.hidden;
850
1044
  return this.setRenderState(s).then(() => {
851
1045
  this.setTriggerState(s === O.open), s !== O.hidden ? s === O.open ? this.onOpen() : this.onClose() : this.outlets.forEach(
852
- (i) => {
853
- var o;
854
- return (o = i.options.triggerDOMElement) == null ? void 0 : o.setAttribute("aria-expanded", "false");
1046
+ (o) => {
1047
+ var i;
1048
+ return (i = o.options.triggerDOMElement) == null ? void 0 : i.setAttribute("aria-expanded", "false");
855
1049
  }
856
1050
  );
857
1051
  });
858
1052
  }
859
1053
  }
860
- setRenderState(e) {
1054
+ setRenderState(t) {
861
1055
  const { invoke: n, events: s } = this.container.get("$widget");
862
1056
  return Promise.all([
863
- V(this.container, H, _.Necessary, {
1057
+ I(this.container, K, T.Necessary, {
864
1058
  medium: v.Session
865
1059
  }),
866
- V(this.container, H, _.Necessary, {
1060
+ I(this.container, K, T.Necessary, {
867
1061
  medium: v.Local,
868
1062
  duration: { minutes: 5 }
869
1063
  }),
870
1064
  this.container.getAsync("router"),
871
1065
  n("renderState")
872
- ]).then(([i, o, r, c]) => {
873
- e === "unset" || !e ? (o(), i()) : (r.isSticky() && o(e), i(e)), s.dispatch("widget:render-state-changed", {
1066
+ ]).then(([o, i, r, c]) => {
1067
+ t === "unset" || !t ? (i(), o()) : (r.isSticky() && i(t), o(t)), s.dispatch("widget:render-state-changed", {
874
1068
  previous: c,
875
- next: e
1069
+ next: t
876
1070
  });
877
1071
  });
878
1072
  }
879
1073
  onOpen() {
880
- return this.container.getAsync("router").then((e) => (this.outlets.forEach(
1074
+ return this.container.getAsync("router").then((t) => (this.outlets.forEach(
881
1075
  (n) => {
882
1076
  var s;
883
1077
  return (s = n.options.triggerDOMElement) == null ? void 0 : s.setAttribute("aria-expanded", "true");
884
1078
  }
885
- ), e.start()));
1079
+ ), t.start()));
886
1080
  }
887
1081
  onClose() {
888
- const e = this.container.getManyAsync("router", "components");
1082
+ const t = this.container.getManyAsync("router", "components");
889
1083
  return (() => this.container.get("settings").then((s) => {
890
- const { activate: i } = this.container.get("$settings");
891
- return s.activate !== i ? this.setSettings(() => Promise.resolve({ activate: i })) : Promise.resolve();
892
- }))().then(() => e).then(
1084
+ const { activate: o } = this.container.get("$settings");
1085
+ return s.activate !== o ? this.setSettings(() => Promise.resolve({ activate: o })) : Promise.resolve();
1086
+ }))().then(() => t).then(
893
1087
  ({
894
1088
  router: s,
895
- components: i
1089
+ components: o
896
1090
  }) => {
897
- const o = i.nodes.visible;
1091
+ const i = o.nodes.visible;
898
1092
  return this.outlets.forEach(
899
1093
  (r) => {
900
1094
  var c;
901
1095
  return (c = r.options.triggerDOMElement) == null ? void 0 : c.setAttribute("aria-expanded", "false");
902
1096
  }
903
- ), o.filter(
1097
+ ), i.filter(
904
1098
  (r) => r.attributes.properties.animation && r.attributes.properties.animation !== "none"
905
1099
  ).length ? new Promise((r) => {
906
1100
  setTimeout(() => {
@@ -910,38 +1104,40 @@ class Jt extends Je {
910
1104
  }
911
1105
  ).then((s) => s.stop());
912
1106
  }
913
- setTriggerState(e) {
1107
+ setTriggerState(t) {
914
1108
  this.outlets.forEach((n) => {
915
1109
  const {
916
- options: { triggerDOMElement: s, triggerOptions: i }
917
- } = n, { openTooltip: o, closedTooltip: r } = i || {};
918
- s && (e ? ye(s, o) : At(s, r));
1110
+ options: { triggerDOMElement: s, triggerOptions: o }
1111
+ } = n, { openTooltip: i, closedTooltip: r } = o || {};
1112
+ s && (t ? xt(s, i) : Fe(s, r));
919
1113
  });
920
1114
  }
921
1115
  deactivate() {
922
1116
  this.subs.forEach((n) => n());
923
- const e = [];
924
- return this.outlets.forEach((n) => e.push(n.dispose())), $(
1117
+ const t = [];
1118
+ return this.outlets.forEach((n) => t.push(n.dispose())), P(
925
1119
  this.container,
926
- le,
1120
+ mt,
927
1121
  v.Local
928
- ).then((n) => n === this.widget.name ? V(
1122
+ ).then((n) => n === this.widget.name ? I(
929
1123
  this.container,
930
- le,
931
- _.Necessary,
1124
+ mt,
1125
+ T.Necessary,
932
1126
  {
933
1127
  medium: v.Local,
934
- scope: qe.Implementation
1128
+ scope: ce.Implementation
935
1129
  }
936
- ).then((s) => s()).then(() => Promise.all(e)) : Promise.all(e));
1130
+ ).then((s) => s()).then(() => Promise.all(t)) : Promise.all(t));
937
1131
  }
938
1132
  }
939
1133
  export {
940
- te as Component,
941
- bt as DetachedComponent,
942
- Jt as GridWidget,
943
- Zt as NotFound,
944
- Jt as Widget,
945
- U as genericComponentStyling
1134
+ it as Component,
1135
+ Pe as DetachedComponent,
1136
+ Cn as GridWidget,
1137
+ vn as NotFound,
1138
+ Cn as Widget,
1139
+ D as WidgetComponent,
1140
+ Z as genericComponentStyling,
1141
+ En as resolveComponent
946
1142
  };
947
1143
  //# sourceMappingURL=index.js.map