@telia-ace/widget-types-grid 1.0.35-next.5 → 1.0.35

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
@@ -2,7 +2,7 @@ var we = Object.defineProperty, ve = Object.defineProperties;
2
2
  var Ee = Object.getOwnPropertyDescriptors;
3
3
  var W = Object.getOwnPropertySymbols;
4
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, m = (t, e) => {
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
6
  for (var n in e || (e = {}))
7
7
  oe.call(e, n) && ie(t, n, e[n]);
8
8
  if (W)
@@ -10,7 +10,7 @@ var ie = (t, e, n) => e in t ? we(t, e, { enumerable: !0, configurable: !0, writ
10
10
  re.call(e, n) && ie(t, n, e[n]);
11
11
  return t;
12
12
  }, C = (t, e) => ve(t, Ee(e));
13
- var N = (t, e) => {
13
+ var M = (t, e) => {
14
14
  var n = {};
15
15
  for (var s in t)
16
16
  oe.call(t, s) && e.indexOf(s) < 0 && (n[s] = t[s]);
@@ -21,21 +21,21 @@ var N = (t, e) => {
21
21
  };
22
22
  import { css as ue, ThemeProvider as Ce, useTheme as Oe } from "@emotion/react";
23
23
  import { asDescriptor as ae, ComponentPlatform as Se, createComponentModel as Ae, ComponentQuery as De, WidgetRenderState as O } from "@telia-ace/widget-core";
24
- import { Grid as de, useRouteData as xe, useRouter as Me, useProperties as he, useContext as X, useContainer as T, useComponentNode as ee, useScroll as pe, transitionComposer as Ne, paddedBorderTabStyle as $e, useComponent as Le, useComponentDescriptor as ke, filterCssPropsStyle as Pe, Typography as Re, useComponentPlatform as me, useIsMounted as Ve, useColumns as _e, useLayout as Ie, ComponentNodeContext as ze, ComponentPropertyContext as Be, filterCssProps as Te } from "@telia-ace/widget-ui";
25
- import h, { useState as z, forwardRef as fe, useMemo as je, Suspense as Ge, useEffect as B } from "react";
24
+ import { Grid as de, useRouteData as Ne, useRouter as xe, useProperties as he, useContext as X, useContainer as T, useComponentNode as ee, useScroll as pe, transitionComposer as Me, paddedBorderTabStyle as $e, useComponent as Le, useComponentDescriptor as ke, filterCssPropsStyle as Pe, Typography as Re, useComponentPlatform as me, useIsMounted as Ve, useColumns as _e, useLayout as Ie, ComponentNodeContext as ze, ComponentPropertyContext as Be, filterCssProps as Te } from "@telia-ace/widget-ui";
25
+ import d, { useState as z, forwardRef as fe, useMemo as je, Suspense as Ge, useEffect as B } from "react";
26
26
  import P from "@emotion/styled";
27
27
  import { appendClassNames as K, notifyDataLoaded as We, lock as q, removeNullAndUndefinedValues as ce, uuid as Fe } from "@telia-ace/widget-utilities";
28
28
  import { TransitionGroup as He, Transition as Ke } from "react-transition-group";
29
29
  import { Switch as Ue, Route as Q } from "react-router";
30
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";
31
+ import { readStorage as $, StorageMedium as E, createStorageWriter as V, StorageCategory as _, StorageScope as qe } from "@telia-ace/widget-services";
32
32
  import { supportBootstrapping as Qe } from "@webprovisions/bootstrapping";
33
33
  import { WidgetState as Ze, WidgetType as Je } from "@webprovisions/platform";
34
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(
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__ */ d.createElement(
36
36
  Ue,
37
37
  {
38
- location: e && C(m({}, e), {
38
+ location: e && C(p({}, e), {
39
39
  pathname: e.pathname.split("?")[0]
40
40
  })
41
41
  },
@@ -44,7 +44,7 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
44
44
  ...Object.keys(t).filter((s) => !t[s].path)
45
45
  ].map((s) => {
46
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) });
47
+ return i ? Array.isArray(i) ? i.map((o) => /* @__PURE__ */ d.createElement(Q, { key: s, exact: !0, path: o, render: () => n(s) })) : /* @__PURE__ */ d.createElement(Q, { key: s, exact: !0, path: i, render: () => n(s) }) : /* @__PURE__ */ d.createElement(Q, { key: s, render: () => n(s) });
48
48
  })
49
49
  ), ge = et, tt = P.div`
50
50
  position: relative;
@@ -65,61 +65,61 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
65
65
  "contact-method": 6,
66
66
  conversation: 7
67
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 = xe(), u = Me(), d = he(), l = X(), f = T(), p = 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] = pe(E);
70
- if (!p || !u)
68
+ var s = n, { className: t = "" } = s, e = M(s, ["className"]);
69
+ const [i, o] = z("index"), [r, c] = z(J.forth), a = Ne(), u = xe(), h = he(), l = X(), g = T(), f = ee(), { gap: m = "0" } = l, G = h, { columns: y = 1, animation: b = "none", scrollable: w = !1 } = G, A = M(G, ["columns", "animation", "scrollable"]), [j, L] = pe(w);
70
+ if (!f || !u)
71
71
  return null;
72
72
  const { location: se } = u;
73
- a.name !== i && a.name !== "" && y && (c(Xe(i, a.name, st)), o(a.name));
74
- const { views: D } = f.get("$settings");
73
+ a.name !== i && a.name !== "" && b && (c(Xe(i, a.name, st)), o(a.name));
74
+ const { views: D } = g.get("$settings");
75
75
  if (!Object.keys(D).length)
76
76
  return null;
77
- const x = (w, M, R) => {
78
- const S = Y(M, R), I = p.getChildren(w)[0];
79
- return /* @__PURE__ */ h.createElement(
77
+ const N = (v, x, R) => {
78
+ const S = Y(x, R), I = f.getChildren(v)[0];
79
+ return /* @__PURE__ */ d.createElement(
80
80
  nt,
81
- C(m(C(m(m({}, e), A), {
81
+ C(p(C(p(p({}, e), A), {
82
82
  scrollableCss: j,
83
83
  ref: L,
84
- columns: b,
85
- gap: g
84
+ columns: y,
85
+ gap: m
86
86
  }), S), {
87
87
  className: K(t, "humany-view")
88
88
  }),
89
- /* @__PURE__ */ h.createElement(te, { id: I.id, branch: "default" })
89
+ /* @__PURE__ */ d.createElement(te, { id: I.id, branch: "default" })
90
90
  );
91
- }, Y = (w, M) => {
92
- if (y === "slide" || y === "fade")
91
+ }, Y = (v, x) => {
92
+ if (b === "slide" || b === "fade")
93
93
  return {
94
- animationCss: Ne.composeViewTransition(
95
- w,
96
- y,
97
- M
94
+ animationCss: Me.composeViewTransition(
95
+ v,
96
+ b,
97
+ x
98
98
  ),
99
- ["data-state"]: w
99
+ ["data-state"]: v
100
100
  };
101
101
  };
102
- return /* @__PURE__ */ h.createElement(tt, { className: "humany-animated-view" }, /* @__PURE__ */ h.createElement(
102
+ return /* @__PURE__ */ d.createElement(tt, { className: "humany-animated-view" }, /* @__PURE__ */ d.createElement(
103
103
  He,
104
104
  {
105
105
  component: null,
106
- childFactory: (w) => h.cloneElement(w, { direction: r })
106
+ childFactory: (v) => d.cloneElement(v, { direction: r })
107
107
  },
108
- /* @__PURE__ */ h.createElement(
108
+ /* @__PURE__ */ d.createElement(
109
109
  Ke,
110
110
  {
111
111
  key: i,
112
112
  timeout: { enter: 500, exit: 500 },
113
- onEnter: (w) => w == null ? void 0 : w.clientHeight,
113
+ onEnter: (v) => v == null ? void 0 : v.clientHeight,
114
114
  unmountOnExit: !0,
115
115
  direction: J.forth
116
116
  },
117
- (w, { direction: M }) => /* @__PURE__ */ h.createElement(
117
+ (v, { direction: x }) => /* @__PURE__ */ d.createElement(
118
118
  ge,
119
119
  {
120
120
  views: D,
121
121
  location: se,
122
- render: (R) => x(R, w, M)
122
+ render: (R) => N(R, v, x)
123
123
  }
124
124
  )
125
125
  )
@@ -127,24 +127,24 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
127
127
  }, ot = it, rt = P(de)`
128
128
  ${(t) => !!t.scrollableCss && t.scrollableCss}
129
129
  `, at = (n) => {
130
- var s = n, { className: t = "" } = s, e = N(s, ["className"]);
131
- const i = he(), 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, p = N(y, ["columns", "animation", "scrollable"]), [g, b] = pe(f);
132
- return c ? /* @__PURE__ */ h.createElement(
130
+ var s = n, { className: t = "" } = s, e = M(s, ["className"]);
131
+ const i = he(), o = X(), r = T(), c = ee(), { views: a } = r.get("$settings"), { gap: u = "0" } = o, b = i, { columns: h = 1, animation: l = "none", scrollable: g = !1 } = b, f = M(b, ["columns", "animation", "scrollable"]), [m, y] = pe(g);
132
+ return c ? /* @__PURE__ */ d.createElement(
133
133
  rt,
134
- C(m(m({}, e), p), {
135
- scrollableCss: g,
136
- ref: b,
137
- columns: d,
134
+ C(p(p({}, e), f), {
135
+ scrollableCss: m,
136
+ ref: y,
137
+ columns: h,
138
138
  gap: u,
139
139
  className: K(t, "humany-view")
140
140
  }),
141
- /* @__PURE__ */ h.createElement(
141
+ /* @__PURE__ */ d.createElement(
142
142
  ge,
143
143
  {
144
144
  views: a,
145
- render: (E) => {
146
- const A = c.getChildren(E)[0];
147
- return /* @__PURE__ */ h.createElement(te, { id: A.id, node: A, branch: "default" });
145
+ render: (w) => {
146
+ const A = c.getChildren(w)[0];
147
+ return /* @__PURE__ */ d.createElement(te, { id: A.id, node: A, branch: "default" });
148
148
  }
149
149
  }
150
150
  )
@@ -194,21 +194,21 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
194
194
  ${(t) => U(t)}
195
195
  `, ht = fe(
196
196
  (i, s) => {
197
- var o = i, { className: t = "", children: e } = o, n = N(o, ["className", "children"]);
198
- const r = Le(), { name: c, type: a, id: u } = ke(), d = je(() => r ? P(r)`
197
+ var o = i, { className: t = "", children: e } = o, n = M(o, ["className", "children"]);
198
+ const r = Le(), { name: c, type: a, id: u } = ke(), h = je(() => r ? P(r)`
199
199
  ${U}
200
200
  ${Pe}
201
201
  ` : null, [r]);
202
- return typeof r == "undefined" ? null : r === null || d === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ h.createElement(
202
+ return typeof r == "undefined" ? null : r === null || h === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ d.createElement(
203
203
  dt,
204
- C(m({}, n), {
204
+ C(p({}, n), {
205
205
  title: `type: ${a}, definition-id: ${c}, instance-id: ${u}`,
206
206
  className: K(t, "humany-non-resolved-component")
207
207
  }),
208
- /* @__PURE__ */ h.createElement(Re, { variant: "h5" }, "Non Resolved Component Type")
209
- ) : null : /* @__PURE__ */ h.createElement(Ge, { fallback: null }, /* @__PURE__ */ h.createElement(
210
- d,
211
- C(m({
208
+ /* @__PURE__ */ d.createElement(Re, { variant: "h5" }, "Non Resolved Component Type")
209
+ ) : null : /* @__PURE__ */ d.createElement(Ge, { fallback: null }, /* @__PURE__ */ d.createElement(
210
+ h,
211
+ C(p({
212
212
  ref: s
213
213
  }, n), {
214
214
  className: K(
@@ -239,74 +239,74 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
239
239
  }, [n, o, t, e]), s;
240
240
  }, ft = (t, e) => e ? !0 : typeof t == "string" ? t === "full" : t > 0, gt = fe(
241
241
  (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(), [p, g] = z(), b = _e(), y = X(e), E = mt(e), { size: A = "none", indent: j = 0 } = Ie(e), L = ft(A, s);
242
+ var h = u, { className: t = "", id: e, branch: n, node: s, ariaLabel: i, tabIndex: o, context: r } = h, c = M(h, ["className", "id", "branch", "node", "ariaLabel", "tabIndex", "context"]);
243
+ const l = me(), g = T(), [f, m] = z(), y = _e(), b = X(e), w = mt(e), { size: A = "none", indent: j = 0 } = Ie(e), L = ft(A, s);
244
244
  if (B(() => {
245
245
  if (l) {
246
246
  if (e && !s) {
247
247
  const S = l.nodes.get(e);
248
- if (S && (g(ae(S, n)), L)) {
249
- const I = S.mount(f);
248
+ if (S && (m(ae(S, n)), L)) {
249
+ const I = S.mount(g);
250
250
  return () => {
251
251
  I();
252
252
  };
253
253
  }
254
254
  } else if (s) {
255
- g(ae(s, n));
256
- const S = s.mount(f);
255
+ m(ae(s, n));
256
+ const S = s.mount(g);
257
257
  return () => {
258
258
  S();
259
259
  };
260
260
  }
261
261
  }
262
- }, [l, e, s, L]), !p || !L)
262
+ }, [l, e, s, L]), !f || !L)
263
263
  return null;
264
- const R = m(m({}, y), r || {}), {
264
+ const R = p(p({}, b), r || {}), {
265
265
  cardinal: D,
266
- fonts: x = {},
266
+ fonts: N = {},
267
267
  accessibility: Y = {}
268
- } = R, G = N(R, [
268
+ } = R, G = M(R, [
269
269
  "cardinal",
270
270
  "fonts",
271
271
  "accessibility"
272
- ]), w = {
273
- type: x.type,
274
- base: x.base || "16px",
275
- small: x.small || "0.8em",
276
- normal: x.normal || "1em",
277
- medium: x.medium || "1.2em",
278
- large: x.large || "1.6em",
279
- huge: x.huge || "2.5em"
280
- }, M = C(m({}, G), {
281
- fonts: w,
282
- accessibility: m({}, Y)
272
+ ]), v = {
273
+ type: N.type,
274
+ base: N.base || "16px",
275
+ small: N.small || "0.8em",
276
+ normal: N.normal || "1em",
277
+ medium: N.medium || "1.2em",
278
+ large: N.large || "1.6em",
279
+ huge: N.huge || "2.5em"
280
+ }, x = C(p({}, G), {
281
+ fonts: v,
282
+ accessibility: p({}, Y)
283
283
  });
284
- return typeof D == "number" && (M.sizes = {
284
+ return typeof D == "number" && (x.sizes = {
285
285
  cardinal: D,
286
286
  small: `${D}px`,
287
287
  normal: `${D * 3}px`,
288
288
  medium: `${D * 5}px`,
289
289
  large: `${D * 8}px`
290
- }), /* @__PURE__ */ h.createElement(Ce, { theme: M }, /* @__PURE__ */ h.createElement(ze.Provider, { value: p }, /* @__PURE__ */ h.createElement(Be.Provider, { value: E }, (() => {
291
- const S = m({
292
- "data-width": A === "full" ? b : Math.min(A, b),
290
+ }), /* @__PURE__ */ d.createElement(Ce, { theme: x }, /* @__PURE__ */ d.createElement(ze.Provider, { value: f }, /* @__PURE__ */ d.createElement(Be.Provider, { value: w }, (() => {
291
+ const S = p({
292
+ "data-width": A === "full" ? y : Math.min(A, y),
293
293
  "data-indent": j,
294
- "data-name": p.name,
295
- "data-node-id": p.id,
296
- "data-component-type": p.type,
294
+ "data-name": f.name,
295
+ "data-node-id": f.id,
296
+ "data-component-type": f.type,
297
297
  "aria-label": i,
298
298
  tabIndex: o,
299
- id: p.id,
300
- role: E && E.role
299
+ id: f.id,
300
+ role: w && w.role
301
301
  }, c);
302
- switch (p.type) {
302
+ switch (f.type) {
303
303
  case "view":
304
- return typeof E.animation == "string" && E.animation !== "none" ? /* @__PURE__ */ h.createElement(ut, C(m({}, S), { className: t })) : /* @__PURE__ */ h.createElement(lt, C(m({}, S), { className: t }));
304
+ return typeof w.animation == "string" && w.animation !== "none" ? /* @__PURE__ */ d.createElement(ut, C(p({}, S), { className: t })) : /* @__PURE__ */ d.createElement(lt, C(p({}, S), { className: t }));
305
305
  default: {
306
- const I = Te(E);
307
- return /* @__PURE__ */ h.createElement(
306
+ const I = Te(w);
307
+ return /* @__PURE__ */ d.createElement(
308
308
  pt,
309
- C(m(m({
309
+ C(p(p({
310
310
  ref: a
311
311
  }, S), I), {
312
312
  className: t
@@ -316,7 +316,7 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
316
316
  }
317
317
  })())));
318
318
  }
319
- ), te = gt, yt = ({ builder: t }) => {
319
+ ), te = gt, bt = ({ builder: t }) => {
320
320
  const e = T(), [n, s] = z(null);
321
321
  return B(() => {
322
322
  e.getAsync("components").then((i) => t(i).then((o) => {
@@ -328,19 +328,19 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
328
328
  (o) => o.id !== n.id
329
329
  );
330
330
  });
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({
331
+ }, [n]), n ? /* @__PURE__ */ d.createElement(te, { id: n.id, node: n, branch: "default" }) : null;
332
+ }, yt = bt, wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
333
333
  __proto__: null,
334
- default: bt
335
- }, Symbol.toStringTag, { value: "Module" })), vt = h.lazy(() => Promise.resolve().then(() => wt)), Et = ({ showSearch: t = !1 }) => {
334
+ default: yt
335
+ }, Symbol.toStringTag, { value: "Module" })), vt = d.lazy(() => Promise.resolve().then(() => wt)), Et = ({ showSearch: t = !1 }) => {
336
336
  const e = Oe(), n = T();
337
- return /* @__PURE__ */ h.createElement(h.Suspense, { fallback: null }, /* @__PURE__ */ h.createElement(
337
+ return /* @__PURE__ */ d.createElement(d.Suspense, { fallback: null }, /* @__PURE__ */ d.createElement(
338
338
  vt,
339
339
  {
340
340
  builder: (s) => n.get("settings").then((i) => {
341
341
  var u;
342
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),
343
+ (h, l) => (i.components[l].type === "not-found" && (h.properties = i.components[l].properties, h.context = i.components[l].context), h),
344
344
  { properties: {}, context: {} }
345
345
  );
346
346
  o.showSearch = t;
@@ -348,13 +348,13 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
348
348
  if (c.name = "not-found-area", c.writeLayout({
349
349
  size: "full"
350
350
  }), t) {
351
- const d = Object.keys(i.components).reduce(
352
- (f, p) => i.components[p].type === "search" ? i.components[p].properties : f,
351
+ const h = Object.keys(i.components).reduce(
352
+ (g, f) => i.components[f].type === "search" ? i.components[f].properties : g,
353
353
  {}
354
354
  ), l = s.createNode("search", { detached: !0 });
355
- l.writeLayout({ size: "full" }), l.writeProperties(m({
355
+ l.writeLayout({ size: "full" }), l.writeProperties(p({
356
356
  "css-margin-bottom": ((u = e == null ? void 0 : e.sizes) == null ? void 0 : u.normal) || "15px"
357
- }, d)), c.appendChild(l);
357
+ }, h)), c.appendChild(l);
358
358
  }
359
359
  const a = s.createNode("not-found", { detached: !0 });
360
360
  return a.writeLayout({ size: "full" }), a.writeProperties(o), a.writeContext(r), c.appendChild(a), c;
@@ -419,18 +419,18 @@ function Dt(t) {
419
419
  e.classList.remove("humany-active"), e.classList.add("humany-loading");
420
420
  });
421
421
  }
422
- function ye(t, e) {
422
+ function be(t, e) {
423
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
424
  e && n.setAttribute("title", e), n.classList.add("humany-active"), n.classList.remove("humany-loading");
425
425
  });
426
426
  }
427
427
  var k = /* @__PURE__ */ ((t) => (t.Inline = "inline", t.Link = "link", t.Badge = "badge", t.Unsupported = "unsupported", t))(k || {});
428
- const xt = (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) => {
429
- var u, d;
430
- const o = xt(
428
+ const Nt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "none", ye = (t) => t ? typeof t == "boolean" && t ? "link" : typeof t == "object" && !Array.isArray(t) ? "badge" : "unsupported" : "inline", xt = (t, e, n, s, i = !1) => {
429
+ var u, h;
430
+ const o = Nt(
431
431
  e,
432
432
  n
433
- ), r = be(s), c = {
433
+ ), r = ye(s), c = {
434
434
  widgetDOMElement: e ? e.cloneNode(!0) : void 0,
435
435
  triggerDOMElement: n ? n.cloneNode(!0) : void 0
436
436
  }, a = {
@@ -453,12 +453,12 @@ const xt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "non
453
453
  case "triggerDOM": {
454
454
  const l = document.createElement("div");
455
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(
456
+ var g;
457
+ (g = n == null ? void 0 : n.parentNode) == null || g.replaceChild(
458
458
  l,
459
459
  n
460
460
  ), l.style.display = (n == null ? void 0 : n.style.display) || "block";
461
- }) : (d = n == null ? void 0 : n.parentNode) == null || d.replaceChild(
461
+ }) : (h = n == null ? void 0 : n.parentNode) == null || h.replaceChild(
462
462
  l,
463
463
  n
464
464
  ), a.cachedOriginals.widgetDOMElement = n, a.cachedOriginals.triggerDOMElement = void 0) : (a.widgetDOMElement = document.body.appendChild(l), a.triggerDOMElement = n);
@@ -467,14 +467,14 @@ const xt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "non
467
467
  case "none": {
468
468
  const l = document.body.appendChild(document.createElement("div"));
469
469
  if (a.widgetDOMElement = l, r !== "inline") {
470
- const f = document.body.appendChild(document.createElement("a"));
471
- r === "link" && (f.innerText = t), a.triggerDOMElement = f;
470
+ const g = document.body.appendChild(document.createElement("a"));
471
+ r === "link" && (g.innerText = t), a.triggerDOMElement = g;
472
472
  }
473
473
  break;
474
474
  }
475
475
  }
476
476
  return a;
477
- }, Nt = "modals";
477
+ }, Mt = "modals";
478
478
  class $t {
479
479
  constructor(e, n) {
480
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);
@@ -494,14 +494,14 @@ class $t {
494
494
  return e.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === k.Badge && Dt(n), import("./render-668e4aa4.js").then((i) => i.default(this.container, e)).then(() => {
495
495
  if (e.setAttribute("data-rendered", "true"), n && this.options.triggerType === k.Badge) {
496
496
  const o = this.options.triggerOptions.openTooltip;
497
- ye(n, o);
497
+ be(n, o);
498
498
  }
499
499
  We(this.container, e);
500
500
  const i = this.container.get("$environment").widgets.all();
501
501
  $(
502
502
  this.container,
503
- Nt,
504
- v.Session
503
+ Mt,
504
+ E.Session
505
505
  ).then((o) => {
506
506
  o && o.forEach((r) => {
507
507
  i.find(
@@ -518,14 +518,14 @@ class $t {
518
518
  n.getAttribute("role") || n.setAttribute("role", "button");
519
519
  const { name: s } = this.container.get("$widget"), { label: i, symbol: o, ariaLabel: r, closedTooltip: c, openTooltip: a } = e, u = { closedTooltip: c, openTooltip: a };
520
520
  this.options.triggerOptions = u;
521
- const d = St(n, {
521
+ const h = St(n, {
522
522
  label: i,
523
523
  symbol: o,
524
524
  ariaLabel: r,
525
525
  widgetName: s,
526
526
  tooltip: c
527
527
  });
528
- this.unsubscribe.push(d);
528
+ this.unsubscribe.push(h);
529
529
  }
530
530
  dispose() {
531
531
  return import("./unmount-063d8ea3.js").then((e) => {
@@ -553,14 +553,14 @@ class ne {
553
553
  }
554
554
  static create(e) {
555
555
  return V(e, F, _.Necessary, {
556
- medium: v.Local
556
+ medium: E.Local
557
557
  }).then((n) => new ne(e, n));
558
558
  }
559
559
  write(e, n, s, i) {
560
560
  return q(this)(() => $(
561
561
  this.container,
562
562
  F,
563
- v.Local
563
+ E.Local
564
564
  ).then((o = {}) => {
565
565
  const { keys: r = [], items: c = {} } = o, a = r.indexOf(e);
566
566
  return a > -1 && r.splice(a, 1), r.push(e), c[e] = {
@@ -574,7 +574,7 @@ class ne {
574
574
  return q(this)(() => $(
575
575
  this.container,
576
576
  F,
577
- v.Local
577
+ E.Local
578
578
  ).then((n = {}) => {
579
579
  const { keys: s = [], items: i = {} } = n, o = s.indexOf(e);
580
580
  if (o > -1)
@@ -585,7 +585,7 @@ class ne {
585
585
  return q(this)(() => $(
586
586
  this.container,
587
587
  F,
588
- v.Local
588
+ E.Local
589
589
  ).then((n = {}) => {
590
590
  const { keys: s = [], items: i = {} } = n;
591
591
  s.forEach((o) => {
@@ -642,8 +642,8 @@ class Jt extends Je {
642
642
  }, this.container.registerAsync("storage", () => Rt(this.container)), this.container.registerFactory("settings", () => $(
643
643
  this.container,
644
644
  Z,
645
- v.Local
646
- ).then((n = {}) => m(m({}, this.container.get("$settings")), n))), Qe(this, "load", this.handleBootstrapping), this.container.registerAsync(
645
+ E.Local
646
+ ).then((n = {}) => p(p({}, this.container.get("$settings")), n))), Qe(this, "load", this.handleBootstrapping), this.container.registerAsync(
647
647
  "componentResolver",
648
648
  () => _t(this.container)
649
649
  ), 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));
@@ -653,47 +653,47 @@ class Jt extends Je {
653
653
  "actionResolver",
654
654
  "router",
655
655
  "components"
656
- );
657
- return Promise.all([e, this.container.get("settings")]).then(
658
- ([{ actionResolver: n, router: s, components: i }, o]) => {
659
- var a;
660
- n.subscribe(
656
+ ), n = this.container.get("csp");
657
+ return n && (window.webprovisionsEnvironmentVariables || (window.webprovisionsEnvironmentVariables = {}), window.webprovisionsEnvironmentVariables.cspNonce = n.cspNonce), Promise.all([e, this.container.get("settings")]).then(
658
+ ([{ actionResolver: s, router: i, components: o }, r]) => {
659
+ var u;
660
+ s.subscribe(
661
661
  this.widget.name,
662
- (u, d, l) => this.onAction(d, l)
662
+ (h, l, g) => this.onAction(l, g)
663
663
  );
664
- const r = (u) => {
665
- i.nodes.query({ type: "view" }).forEach((d) => {
666
- i.setSwitch(d, u);
664
+ const c = (h) => {
665
+ o.nodes.query({ type: "view" }).forEach((l) => {
666
+ o.setSwitch(l, h);
667
667
  });
668
- }, c = ((a = s.getInitialRoute()) == null ? void 0 : a.name) || "index";
669
- return r(c), this.events.subscribe("widget:data-loaded", (u, { element: d }) => {
668
+ }, a = ((u = i.getInitialRoute()) == null ? void 0 : u.name) || "index";
669
+ return c(a), this.events.subscribe("widget:data-loaded", (h, { element: l }) => {
670
670
  this.widget.container.get("seoConfiguration") && this.events.dispatch("widget:preloaded-replaced", {
671
- element: d
671
+ element: l
672
672
  });
673
673
  }), this.events.subscribe(
674
674
  "router:change",
675
- (u, { previous: d = { routeData: {} }, next: l = { routeData: {} } }) => {
676
- const { routeData: f } = d, { routeData: p } = l, g = Object.keys(o.views).reduce((b, y) => typeof o.views[y].path == "undefined" ? y : b, "");
677
- !p.name && g ? r(g) : r(p.name), ce(f && f.params), ce(p && p.params), this.container.getAsync("actionResolver").then((b) => {
675
+ (h, { previous: l = { routeData: {} }, next: g = { routeData: {} } }) => {
676
+ const { routeData: f } = l, { routeData: m } = g, y = Object.keys(r.views).reduce((b, w) => typeof r.views[w].path == "undefined" ? w : b, "");
677
+ !m.name && y ? c(y) : c(m.name), ce(f && f.params), ce(m && m.params), this.container.getAsync("actionResolver").then((b) => {
678
678
  b.action(this.widget.name, "routeChange", {
679
- next: p,
679
+ next: m,
680
680
  previous: f
681
681
  });
682
682
  });
683
683
  }
684
- ), s.initialize();
684
+ ), i.initialize();
685
685
  }
686
686
  );
687
687
  }
688
688
  attach(e = {}) {
689
689
  return this.container.get("settings").then(({ trigger: n }) => {
690
- var f, p;
690
+ var g, f;
691
691
  const {
692
692
  widgetDOMElement: s,
693
693
  key: i = Fe(),
694
694
  triggerDOMElement: o,
695
695
  withRenderState: r
696
- } = e, a = be(n) === k.Inline && ((o == null ? void 0 : o.childElementCount) || 0) > 0, u = Mt(
696
+ } = e, a = ye(n) === k.Inline && ((o == null ? void 0 : o.childElementCount) || 0) > 0, u = xt(
697
697
  this.widget.name,
698
698
  s,
699
699
  o,
@@ -701,37 +701,37 @@ class Jt extends Je {
701
701
  a
702
702
  );
703
703
  this.outlets.size < 1 && !r && this.setRenderState("unset");
704
- const d = () => {
705
- const g = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), y = (j, L) => {
706
- g() && (u.callback && u.callback(), L.disconnect());
707
- }, E = {
704
+ const h = () => {
705
+ const m = () => y.querySelectorAll("[data-loading=true]").length === 0, [y] = this.widget.container.get("widgetDOMElements"), b = (j, L) => {
706
+ m() && (u.callback && u.callback(), L.disconnect());
707
+ }, w = {
708
708
  attributes: !0,
709
709
  subtree: !0,
710
710
  childList: !0
711
711
  };
712
- g() && u.callback && u.callback(), new MutationObserver(y).observe(b, E);
712
+ m() && u.callback && u.callback(), new MutationObserver(b).observe(y, w);
713
713
  };
714
- a && this.widget.container.getAsync("dataClient").then(({ events: g }) => {
715
- g.subscribe("data-client:fetched", (b, y) => {
716
- y.unresolvedQueries === 0 && d();
714
+ a && this.widget.container.getAsync("dataClient").then(({ events: m }) => {
715
+ m.subscribe("data-client:fetched", (y, b) => {
716
+ b.unresolvedQueries === 0 && h();
717
717
  });
718
718
  });
719
719
  const l = this.getOrCreateViewOutlet(i, u);
720
- 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 && ((p = u.triggerDOMElement) == null || p.addEventListener("click", (g) => {
721
- g.preventDefault(), this.container.get("settings").then(({ trigger: b }) => {
722
- 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());
720
+ if (this.outlets.set(i, l), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), u.triggerType === k.Badge && n && ((g = u.triggerDOMElement) == null || g.setAttribute("aria-expanded", "false"), l == null || l.renderBadge(n)), u.triggerType !== k.Inline && ((f = u.triggerDOMElement) == null || f.addEventListener("click", (m) => {
721
+ m.preventDefault(), this.container.get("settings").then(({ trigger: y }) => {
722
+ l.render().then(() => this.renderState()).then((b) => y && y.action && y.action === "hide" ? b === O.open ? this.hide() : this.open() : b === O.open ? this.close() : this.open());
723
723
  });
724
724
  })), this.outlets.size > 1)
725
- return this.renderState().then((g) => {
726
- this.triggerStateIfApplicable(g);
725
+ return this.renderState().then((m) => {
726
+ this.triggerStateIfApplicable(m);
727
727
  });
728
728
  if (r)
729
- return r === "storage" ? this.renderState().then((g) => {
729
+ return r === "storage" ? this.renderState().then((m) => {
730
730
  if (u.triggerType === k.Inline) {
731
731
  this.triggerStateIfApplicable("open");
732
732
  return;
733
733
  }
734
- this.triggerStateIfApplicable(g);
734
+ this.triggerStateIfApplicable(m);
735
735
  }) : this.triggerStateIfApplicable(r);
736
736
  });
737
737
  }
@@ -771,7 +771,7 @@ class Jt extends Je {
771
771
  }
772
772
  render(e = {}) {
773
773
  if (process.env.NODE_ENV !== "production" && console.warn("widget.render() is deprecated. Use widget.attach() instead."), e.open) {
774
- const n = C(m({}, e), {
774
+ const n = C(p({}, e), {
775
775
  withRenderState: "open"
776
776
  /* Open */
777
777
  });
@@ -786,10 +786,10 @@ class Jt extends Je {
786
786
  return Promise.all([
787
787
  this.container.get("settings"),
788
788
  V(this.container, Z, _.Necessary, {
789
- medium: v.Local
789
+ medium: E.Local
790
790
  })
791
791
  ]).then(([n, s]) => Promise.resolve(e(n)).then((i) => s(i).then(() => {
792
- const o = m(m({}, n), i);
792
+ const o = p(p({}, n), i);
793
793
  return this.widget.events.dispatch("widget:settings-updated", o), o;
794
794
  })));
795
795
  }
@@ -798,7 +798,7 @@ class Jt extends Je {
798
798
  this.container,
799
799
  Z,
800
800
  _.Necessary,
801
- { medium: v.Local }
801
+ { medium: E.Local }
802
802
  ).then((e) => e()).then(() => this.container.get("settings")).then((e) => {
803
803
  this.widget.events.dispatch("widget:settings-updated", e);
804
804
  });
@@ -814,11 +814,11 @@ class Jt extends Je {
814
814
  const e = () => $(
815
815
  this.container,
816
816
  H,
817
- v.Session
817
+ E.Session
818
818
  ).then((s = O.closed) => s), n = () => $(
819
819
  this.container,
820
820
  H,
821
- v.Session
821
+ E.Session
822
822
  ).then((s = O.closed) => s);
823
823
  return this.container.getAsync("router").then((s) => s.isSticky() ? n().then((i) => i === O.open ? i : e()) : e());
824
824
  }
@@ -864,10 +864,10 @@ class Jt extends Je {
864
864
  const { invoke: n, events: s } = this.container.get("$widget");
865
865
  return Promise.all([
866
866
  V(this.container, H, _.Necessary, {
867
- medium: v.Session
867
+ medium: E.Session
868
868
  }),
869
869
  V(this.container, H, _.Necessary, {
870
- medium: v.Local,
870
+ medium: E.Local,
871
871
  duration: { minutes: 5 }
872
872
  }),
873
873
  this.container.getAsync("router"),
@@ -918,7 +918,7 @@ class Jt extends Je {
918
918
  const {
919
919
  options: { triggerDOMElement: s, triggerOptions: i }
920
920
  } = n, { openTooltip: o, closedTooltip: r } = i || {};
921
- s && (e ? ye(s, o) : At(s, r));
921
+ s && (e ? be(s, o) : At(s, r));
922
922
  });
923
923
  }
924
924
  deactivate() {
@@ -927,13 +927,13 @@ class Jt extends Je {
927
927
  return this.outlets.forEach((n) => e.push(n.dispose())), $(
928
928
  this.container,
929
929
  le,
930
- v.Local
930
+ E.Local
931
931
  ).then((n) => n === this.widget.name ? V(
932
932
  this.container,
933
933
  le,
934
934
  _.Necessary,
935
935
  {
936
- medium: v.Local,
936
+ medium: E.Local,
937
937
  scope: qe.Implementation
938
938
  }
939
939
  ).then((s) => s()).then(() => Promise.all(e)) : Promise.all(e));
@@ -941,7 +941,7 @@ class Jt extends Je {
941
941
  }
942
942
  export {
943
943
  te as Component,
944
- bt as DetachedComponent,
944
+ yt as DetachedComponent,
945
945
  Jt as GridWidget,
946
946
  Zt as NotFound,
947
947
  Jt as Widget,