@telia-ace/widget-types-grid 1.0.17 → 1.0.20

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,101 +1,70 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { asDescriptor, ComponentPlatform, createComponentModel, ComponentQuery, WidgetRenderState } from "@telia-ace/widget-core";
33
- import { Grid, useRouteData, useRouter, useProperties, useContext, useContainer, useComponentNode, useScroll, transitionComposer, paddedBorderTabStyle, useComponent, useComponentDescriptor, filterCssPropsStyle, useComponentPlatform, useIsMounted, useColumns, useLayout, ComponentNodeContext, ComponentPropertyContext, filterCssProps } from "@telia-ace/widget-ui";
34
- import React, { useState, forwardRef, useMemo, Suspense, useEffect, useContext as useContext$1 } from "react";
35
- import styled, { css, ThemeContext, ThemeProvider } from "styled-components";
36
- import { appendClassNames, notifyDataLoaded, lock, removeNullAndUndefinedValues, uuid } from "@telia-ace/widget-utilities";
37
- import { TransitionGroup, Transition } from "react-transition-group";
38
- import { Switch as Switch$1, Route } from "react-router";
39
- import { onWidgetUrl } from "@telia-ace/widget-routing";
40
- import { readStorage, StorageMedium, createStorageWriter, StorageCategory, StorageScope } from "@telia-ace/widget-services";
41
- import { supportBootstrapping } from "@webprovisions/bootstrapping";
42
- import { WidgetState, WidgetType } from "@webprovisions/platform";
43
- var SlideDirection = /* @__PURE__ */ ((SlideDirection2) => {
44
- SlideDirection2["back"] = "back";
45
- SlideDirection2["forth"] = "forth";
46
- return SlideDirection2;
47
- })(SlideDirection || {});
48
- const determineSlideDirection = (currentRouteName, nextRouteName, routeRanking) => {
49
- if (typeof routeRanking[currentRouteName] === "number" && typeof routeRanking[nextRouteName] === "number" && routeRanking[currentRouteName] > routeRanking[nextRouteName]) {
50
- return "back";
51
- }
52
- return "forth";
53
- };
54
- const Switch = ({ views, location, render }) => {
55
- return /* @__PURE__ */ React.createElement(Switch$1, {
56
- location: location ? __spreadProps(__spreadValues({}, location), {
57
- pathname: location.pathname.split("?")[0]
58
- }) : location
59
- }, [
60
- ...Object.keys(views).filter((key) => !!views[key].path),
61
- ...Object.keys(views).filter((key) => !views[key].path)
62
- ].map((name) => {
63
- const { path } = views[name];
64
- if (!path) {
65
- return /* @__PURE__ */ React.createElement(Route, {
66
- key: name,
67
- render: () => render(name)
68
- });
69
- }
70
- if (Array.isArray(path)) {
71
- return path.map((path2) => /* @__PURE__ */ React.createElement(Route, {
72
- key: name,
73
- exact: true,
74
- path: path2,
75
- render: () => render(name)
76
- }));
77
- }
78
- return /* @__PURE__ */ React.createElement(Route, {
79
- key: name,
80
- exact: true,
81
- path,
82
- render: () => render(name)
83
- });
84
- }));
1
+ var Oe = Object.defineProperty, Se = Object.defineProperties;
2
+ var xe = Object.getOwnPropertyDescriptors;
3
+ var W = Object.getOwnPropertySymbols;
4
+ var ce = Object.prototype.hasOwnProperty, le = Object.prototype.propertyIsEnumerable;
5
+ var ae = (t, e, n) => e in t ? Oe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, f = (t, e) => {
6
+ for (var n in e || (e = {}))
7
+ ce.call(e, n) && ae(t, n, e[n]);
8
+ if (W)
9
+ for (var n of W(e))
10
+ le.call(e, n) && ae(t, n, e[n]);
11
+ return t;
12
+ }, E = (t, e) => Se(t, xe(e));
13
+ var M = (t, e) => {
14
+ var n = {};
15
+ for (var i in t)
16
+ ce.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
17
+ if (t != null && W)
18
+ for (var i of W(t))
19
+ e.indexOf(i) < 0 && le.call(t, i) && (n[i] = t[i]);
20
+ return n;
85
21
  };
86
- const StyledViewContainer = styled.div`
22
+ import { asDescriptor as ue, ComponentPlatform as Ae, createComponentModel as De, ComponentQuery as Me, WidgetRenderState as C } from "@telia-ace/widget-core";
23
+ import { Grid as pe, useRouteData as Ne, useRouter as Le, useProperties as me, useContext as te, useContainer as j, useComponentNode as ne, useScroll as fe, transitionComposer as $e, paddedBorderTabStyle as ke, useComponent as Pe, useComponentDescriptor as Re, filterCssPropsStyle as Ve, Typography as _e, useComponentPlatform as ge, useIsMounted as Ie, useColumns as ze, useLayout as Te, ComponentNodeContext as Be, ComponentPropertyContext as je, filterCssProps as Ge } from "@telia-ace/widget-ui";
24
+ import d, { useState as T, forwardRef as ye, useMemo as He, Suspense as We, useEffect as B, useContext as Fe } from "react";
25
+ import R, { css as be, ThemeContext as we, ThemeProvider as Ke } from "styled-components";
26
+ import { appendClassNames as U, notifyDataLoaded as Ue, lock as Z, removeNullAndUndefinedValues as he, uuid as Ye } from "@telia-ace/widget-utilities";
27
+ import { TransitionGroup as qe, Transition as Qe } from "react-transition-group";
28
+ import { Switch as Ze, Route as J } from "react-router";
29
+ import { onWidgetUrl as Je } from "@telia-ace/widget-routing";
30
+ import { readStorage as N, StorageMedium as v, createStorageWriter as _, StorageCategory as I, StorageScope as Xe } from "@telia-ace/widget-services";
31
+ import { supportBootstrapping as et } from "@webprovisions/bootstrapping";
32
+ import { WidgetState as tt, WidgetType as nt } from "@webprovisions/platform";
33
+ var ee = /* @__PURE__ */ ((t) => (t.back = "back", t.forth = "forth", t))(ee || {});
34
+ const it = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[t] > n[e] ? "back" : "forth", ve = ({ views: t, location: e, render: n }) => /* @__PURE__ */ d.createElement(Ze, {
35
+ location: e && E(f({}, e), {
36
+ pathname: e.pathname.split("?")[0]
37
+ })
38
+ }, [
39
+ ...Object.keys(t).filter((i) => !!t[i].path),
40
+ ...Object.keys(t).filter((i) => !t[i].path)
41
+ ].map((i) => {
42
+ const { path: s } = t[i];
43
+ return s ? Array.isArray(s) ? s.map((o) => /* @__PURE__ */ d.createElement(J, {
44
+ key: i,
45
+ exact: !0,
46
+ path: o,
47
+ render: () => n(i)
48
+ })) : /* @__PURE__ */ d.createElement(J, {
49
+ key: i,
50
+ exact: !0,
51
+ path: s,
52
+ render: () => n(i)
53
+ }) : /* @__PURE__ */ d.createElement(J, {
54
+ key: i,
55
+ render: () => n(i)
56
+ });
57
+ })), st = R.div`
87
58
  position: relative;
88
59
  width: 100%;
89
60
  flex: 1;
90
- `;
91
- const StyledView$2 = styled(Grid)`
61
+ `, ot = R(pe)`
92
62
  position: absolute;
93
63
  left: 0;
94
64
  right: 0;
95
- ${(p) => !!p.animationCss && p.animationCss}
96
- ${(p) => !!p.scrollableCss && p.scrollableCss}
97
- `;
98
- const routeHierarchy = {
65
+ ${(t) => !!t.animationCss && t.animationCss}
66
+ ${(t) => !!t.scrollableCss && t.scrollableCss}
67
+ `, rt = {
99
68
  index: 1,
100
69
  search: 2,
101
70
  browse: 3,
@@ -103,234 +72,169 @@ const routeHierarchy = {
103
72
  contact: 5,
104
73
  "contact-method": 6,
105
74
  conversation: 7
106
- };
107
- const AnimatedView = (_a) => {
108
- var _b = _a, { className = "" } = _b, other = __objRest(_b, ["className"]);
109
- const [routeName, setRouteName] = useState("index");
110
- const [transitionDirection, setTransitionDirection] = useState(SlideDirection.forth);
111
- const nextRoute = useRouteData();
112
- const router = useRouter();
113
- const properties = useProperties();
114
- const context = useContext();
115
- const container = useContainer();
116
- const node = useComponentNode();
117
- const { gap = "0" } = context;
118
- const _a2 = properties, { columns = 1, animation = "none", scrollable = false } = _a2, areaProperties = __objRest(_a2, ["columns", "animation", "scrollable"]);
119
- const [scrollableCss, elem] = useScroll(scrollable);
120
- if (!node || !router) {
75
+ }, at = (n) => {
76
+ var i = n, { className: t = "" } = i, e = M(i, ["className"]);
77
+ const [s, o] = T("index"), [r, c] = T(ee.forth), a = Ne(), l = Le(), h = me(), u = te(), p = j(), g = ne(), { gap: m = "0" } = u, O = h, { columns: b = 1, animation: y = "none", scrollable: S = !1 } = O, L = M(O, ["columns", "animation", "scrollable"]), [x, $] = fe(S);
78
+ if (!g || !l)
121
79
  return null;
122
- }
123
- const { location } = router;
124
- if (nextRoute.name !== routeName && nextRoute.name !== "" && animation) {
125
- setTransitionDirection(determineSlideDirection(routeName, nextRoute.name, routeHierarchy));
126
- setRouteName(nextRoute.name);
127
- }
128
- const { views } = container.get("$settings");
129
- if (!Object.keys(views).length) {
80
+ const { location: q } = l;
81
+ a.name !== s && a.name !== "" && y && (c(it(s, a.name, rt)), o(a.name));
82
+ const { views: V } = p.get("$settings");
83
+ if (!Object.keys(V).length)
130
84
  return null;
131
- }
132
- const renderView = (name, transitionState, direction) => {
133
- const animationStyles = getAnimation(transitionState, direction);
134
- const childNode = node.getChildren(name)[0];
135
- return /* @__PURE__ */ React.createElement(StyledView$2, __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, other), areaProperties), {
136
- scrollableCss,
137
- ref: elem,
138
- columns,
139
- gap
140
- }), animationStyles), {
141
- className: appendClassNames(className, "humany-view")
142
- }), /* @__PURE__ */ React.createElement(Component, {
143
- id: childNode.id,
85
+ const oe = (w, k, z) => {
86
+ const G = D(k, z), H = g.getChildren(w)[0];
87
+ return /* @__PURE__ */ d.createElement(ot, E(f(E(f(f({}, e), L), {
88
+ scrollableCss: x,
89
+ ref: $,
90
+ columns: b,
91
+ gap: m
92
+ }), G), {
93
+ className: U(t, "humany-view")
94
+ }), /* @__PURE__ */ d.createElement(ie, {
95
+ id: H.id,
144
96
  branch: "default"
145
97
  }));
146
- };
147
- const getAnimation = (transitionState, direction) => {
148
- if (animation === "slide" || animation === "fade") {
98
+ }, D = (w, k) => {
99
+ if (y === "slide" || y === "fade")
149
100
  return {
150
- animationCss: transitionComposer.composeViewTransition(transitionState, animation, direction),
151
- ["data-state"]: transitionState
101
+ animationCss: $e.composeViewTransition(w, y, k),
102
+ ["data-state"]: w
152
103
  };
153
- }
154
- return;
155
104
  };
156
- return /* @__PURE__ */ React.createElement(StyledViewContainer, {
105
+ return /* @__PURE__ */ d.createElement(st, {
157
106
  className: "humany-animated-view"
158
- }, /* @__PURE__ */ React.createElement(TransitionGroup, {
107
+ }, /* @__PURE__ */ d.createElement(qe, {
159
108
  component: null,
160
- childFactory: (child) => React.cloneElement(child, { direction: transitionDirection })
161
- }, /* @__PURE__ */ React.createElement(Transition, {
162
- key: routeName,
109
+ childFactory: (w) => d.cloneElement(w, { direction: r })
110
+ }, /* @__PURE__ */ d.createElement(Qe, {
111
+ key: s,
163
112
  timeout: { enter: 500, exit: 500 },
164
- onEnter: (node2) => node2 == null ? void 0 : node2.clientHeight,
165
- unmountOnExit: true,
166
- direction: SlideDirection.forth
167
- }, (state, { direction }) => /* @__PURE__ */ React.createElement(Switch, {
168
- views,
169
- location,
170
- render: (name) => renderView(name, state, direction)
113
+ onEnter: (w) => w == null ? void 0 : w.clientHeight,
114
+ unmountOnExit: !0,
115
+ direction: ee.forth
116
+ }, (w, { direction: k }) => /* @__PURE__ */ d.createElement(ve, {
117
+ views: V,
118
+ location: q,
119
+ render: (z) => oe(z, w, k)
171
120
  }))));
172
- };
173
- const StyledView$1 = styled(Grid)`
174
- ${(p) => !!p.scrollableCss && p.scrollableCss}
175
- `;
176
- const View = (_c) => {
177
- var _d = _c, { className = "" } = _d, other = __objRest(_d, ["className"]);
178
- const properties = useProperties();
179
- const context = useContext();
180
- const container = useContainer();
181
- const node = useComponentNode();
182
- const { views } = container.get("$settings");
183
- const { gap = "0" } = context;
184
- const _a = properties, { columns = 1, animation = "none", scrollable = false } = _a, areaProperties = __objRest(_a, ["columns", "animation", "scrollable"]);
185
- const [scrollableCss, elem] = useScroll(scrollable);
186
- if (!node) {
187
- return null;
188
- }
189
- return /* @__PURE__ */ React.createElement(StyledView$1, __spreadProps(__spreadValues(__spreadValues({}, other), areaProperties), {
190
- scrollableCss,
191
- ref: elem,
192
- columns,
193
- gap,
194
- className: appendClassNames(className, "humany-view")
195
- }), /* @__PURE__ */ React.createElement(Switch, {
196
- views,
197
- render: (name) => {
198
- const childNode = node.getChildren(name)[0];
199
- return /* @__PURE__ */ React.createElement(Component, {
200
- id: childNode.id,
201
- node: childNode,
121
+ }, ct = R(pe)`
122
+ ${(t) => !!t.scrollableCss && t.scrollableCss}
123
+ `, lt = (n) => {
124
+ var i = n, { className: t = "" } = i, e = M(i, ["className"]);
125
+ const s = me(), o = te(), r = j(), c = ne(), { views: a } = r.get("$settings"), { gap: l = "0" } = o, y = s, { columns: h = 1, animation: u = "none", scrollable: p = !1 } = y, g = M(y, ["columns", "animation", "scrollable"]), [m, b] = fe(p);
126
+ return c ? /* @__PURE__ */ d.createElement(ct, E(f(f({}, e), g), {
127
+ scrollableCss: m,
128
+ ref: b,
129
+ columns: h,
130
+ gap: l,
131
+ className: U(t, "humany-view")
132
+ }), /* @__PURE__ */ d.createElement(ve, {
133
+ views: a,
134
+ render: (S) => {
135
+ const L = c.getChildren(S)[0];
136
+ return /* @__PURE__ */ d.createElement(ie, {
137
+ id: L.id,
138
+ node: L,
202
139
  branch: "default"
203
140
  });
204
141
  }
205
- }));
206
- };
207
- const styling = css`
142
+ })) : null;
143
+ }, Y = be`
208
144
  outline: none;
209
145
  box-sizing: border-box;
210
146
  * {
211
- ${(p) => {
212
- var _a;
213
- return !((_a = p.theme.accessibility) == null ? void 0 : _a.isTabbing) && "outline: none;";
147
+ ${(t) => {
148
+ var e;
149
+ return !((e = t.theme.accessibility) != null && e.isTabbing) && "outline: none;";
214
150
  }}
215
151
  box-sizing: border-box;
216
152
  }
217
153
 
218
- grid-column: ${(p) => p["data-indent"] ? `${p["data-indent"] + 1} / ${p["data-indent"] + p["data-width"] + 1}` : `span ${p["data-width"]}`};
154
+ grid-column: ${(t) => t["data-indent"] ? `${t["data-indent"] + 1} / ${t["data-indent"] + t["data-width"] + 1}` : `span ${t["data-width"]}`};
219
155
 
220
- ${(p) => {
221
- var _a;
222
- return ((_a = p.theme.fonts) == null ? void 0 : _a.type) && `
223
- font-family: ${p.theme.fonts.type};
156
+ ${(t) => {
157
+ var e;
158
+ return ((e = t.theme.fonts) == null ? void 0 : e.type) && `
159
+ font-family: ${t.theme.fonts.type};
224
160
 
225
161
  input, textarea {
226
- font-family: ${p.theme.fonts.type};
162
+ font-family: ${t.theme.fonts.type};
227
163
  }
228
164
  `;
229
165
  }}
230
166
 
231
- ${(p) => {
232
- var _a;
233
- return ((_a = p.theme.fonts) == null ? void 0 : _a.base) && `
234
- font-size: ${p.theme.fonts.base};
167
+ ${(t) => {
168
+ var e;
169
+ return ((e = t.theme.fonts) == null ? void 0 : e.base) && `
170
+ font-size: ${t.theme.fonts.base};
235
171
  `;
236
172
  }}
237
173
 
238
174
  &:focus {
239
- ${(p) => {
240
- var _a;
241
- return ((_a = p.theme.accessibility) == null ? void 0 : _a.isTabbing) && paddedBorderTabStyle;
175
+ ${(t) => {
176
+ var e;
177
+ return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && ke;
242
178
  }};
243
179
  }
244
- `;
245
- const StyledView = styled(View)`
246
- ${styling}
247
- `;
248
- const StyledAnimatedView = styled(AnimatedView)`
249
- ${styling}
250
- `;
251
- styled.div`
180
+ `, ut = R(lt)`
181
+ ${Y}
182
+ `, ht = R(at)`
183
+ ${Y}
184
+ `, dt = R.div`
252
185
  text-align: center;
253
- ${(p) => {
254
- var _a, _b, _c;
255
- return typeof ((_a = p.theme.colors) == null ? void 0 : _a.warning) !== "undefined" && css`
256
- color: ${(_b = p.theme.colors) == null ? void 0 : _b.warning};
257
- border: 2px dashed ${(_c = p.theme.colors) == null ? void 0 : _c.warning};
186
+ ${(t) => {
187
+ var e, n, i;
188
+ return typeof ((e = t.theme.colors) == null ? void 0 : e.warning) != "undefined" && be`
189
+ color: ${(n = t.theme.colors) == null ? void 0 : n.warning};
190
+ border: 2px dashed ${(i = t.theme.colors) == null ? void 0 : i.warning};
258
191
  `;
259
192
  }}
260
- ${(p) => typeof p.theme.borderRadius !== "undefined" && `border-radius: ${p.theme.borderRadius};`}
261
- ${styling}
262
- `;
263
- const ResolvableComponent = forwardRef((_e, ref) => {
264
- var _f = _e, { className = "", children } = _f, other = __objRest(_f, ["className", "children"]);
265
- const ResolvedComponent = useComponent();
266
- const { name, type, id } = useComponentDescriptor();
267
- const StyledResolvableComponent = useMemo(() => {
268
- if (ResolvedComponent) {
269
- return styled(ResolvedComponent)`
270
- ${styling}
271
- ${filterCssPropsStyle}
272
- `;
273
- }
274
- return null;
275
- }, [ResolvedComponent]);
276
- if (typeof ResolvedComponent === "undefined") {
277
- return null;
278
- }
279
- if (ResolvedComponent === null || StyledResolvableComponent === null) {
280
- return null;
281
- }
282
- return /* @__PURE__ */ React.createElement(Suspense, {
193
+ ${(t) => typeof t.theme.borderRadius != "undefined" && `border-radius: ${t.theme.borderRadius};`}
194
+ ${Y}
195
+ `, pt = ye((s, i) => {
196
+ var o = s, { className: t = "", children: e } = o, n = M(o, ["className", "children"]);
197
+ const r = Pe(), { name: c, type: a, id: l } = Re(), h = He(() => r ? R(r)`
198
+ ${Y}
199
+ ${Ve}
200
+ ` : null, [r]);
201
+ return typeof r == "undefined" ? null : r === null || h === null ? process.env.NODE_ENV !== "production" ? /* @__PURE__ */ d.createElement(dt, E(f({}, n), {
202
+ title: `type: ${a}, definition-id: ${c}, instance-id: ${l}`,
203
+ className: U(t, "humany-non-resolved-component")
204
+ }), /* @__PURE__ */ d.createElement(_e, {
205
+ variant: "h5"
206
+ }, "Non Resolved Component Type")) : null : /* @__PURE__ */ d.createElement(We, {
283
207
  fallback: null
284
- }, /* @__PURE__ */ React.createElement(StyledResolvableComponent, __spreadProps(__spreadValues({
285
- ref
286
- }, other), {
287
- className: appendClassNames(className, "humany-component", `humany-component-${name}`)
288
- }), children));
289
- });
290
- var useComponentNodeProperties = (id) => {
291
- const node = useComponentNode(id);
292
- const components = useComponentPlatform();
293
- const [properties, setProperties] = useState({});
294
- const isMounted = useIsMounted();
295
- useEffect(() => {
296
- if (node && isMounted.current) {
297
- setProperties(node.attributes.properties);
298
- }
299
- }, [node, id, isMounted]);
300
- useEffect(() => {
301
- if (components) {
302
- const unsubscribe = components.events.subscribe("components:properties-changed", (event, data) => {
303
- if (node === data.node && isMounted.current) {
304
- setProperties(data.node.attributes.properties);
305
- }
208
+ }, /* @__PURE__ */ d.createElement(h, E(f({
209
+ ref: i
210
+ }, n), {
211
+ className: U(t, "humany-component", `humany-component-${c}`)
212
+ }), e));
213
+ }), mt = (t) => {
214
+ const e = ne(t), n = ge(), [i, s] = T({}), o = Ie();
215
+ return B(() => {
216
+ e && o.current && s(e.attributes.properties);
217
+ }, [e, t, o]), B(() => {
218
+ if (n) {
219
+ const r = n.events.subscribe("components:properties-changed", (c, a) => {
220
+ e === a.node && o.current && s(a.node.attributes.properties);
306
221
  });
307
222
  return () => {
308
- unsubscribe();
223
+ r();
309
224
  };
310
225
  }
311
- }, [components, isMounted, id, node]);
312
- return properties;
313
- };
314
- const isVisible = (size, node) => {
315
- if (node) {
316
- return true;
317
- }
318
- if (typeof size === "string") {
319
- return size === "full";
320
- }
321
- return size > 0;
322
- };
323
- const Component = forwardRef((_g, ref) => {
324
- var _h = _g, {
325
- className = "",
326
- isTabbing = false,
327
- id,
328
- branch,
329
- node,
330
- ariaLabel,
331
- tabIndex,
332
- context: extraContext
333
- } = _h, other = __objRest(_h, [
226
+ }, [n, o, t, e]), i;
227
+ }, ft = (t, e) => e ? !0 : typeof t == "string" ? t === "full" : t > 0, ie = ye((h, l) => {
228
+ var u = h, {
229
+ className: t = "",
230
+ isTabbing: e = !1,
231
+ id: n,
232
+ branch: i,
233
+ node: s,
234
+ ariaLabel: o,
235
+ tabIndex: r,
236
+ context: c
237
+ } = u, a = M(u, [
334
238
  "className",
335
239
  "isTabbing",
336
240
  "id",
@@ -340,255 +244,160 @@ const Component = forwardRef((_g, ref) => {
340
244
  "tabIndex",
341
245
  "context"
342
246
  ]);
343
- var _b;
344
- const components = useComponentPlatform();
345
- const container = useContainer();
346
- const [descriptor, setDescriptor] = useState();
347
- const themeContext = React.useContext(ThemeContext) || {};
348
- const columns = useColumns();
349
- const context = useContext(id);
350
- const properties = useComponentNodeProperties(id);
351
- const { size = "none", indent = 0 } = useLayout(id);
352
- const visible = isVisible(size, node);
353
- useEffect(() => {
354
- if (components) {
355
- if (id && !node) {
356
- const componentNode = components.nodes.get(id);
357
- if (componentNode) {
358
- setDescriptor(asDescriptor(componentNode, branch));
359
- if (visible) {
360
- const unmount = componentNode.mount(container);
361
- return () => {
362
- unmount();
363
- };
364
- }
247
+ var re;
248
+ const p = ge(), g = j(), [m, b] = T(), y = d.useContext(we) || {}, S = ze(), L = te(n), x = mt(n), { size: $ = "none", indent: q = 0 } = Te(n), V = ft($, s);
249
+ if (B(() => {
250
+ if (p) {
251
+ if (n && !s) {
252
+ const A = p.nodes.get(n);
253
+ if (A && (b(ue(A, i)), V)) {
254
+ const Q = A.mount(g);
255
+ return () => {
256
+ Q();
257
+ };
365
258
  }
366
- } else if (node) {
367
- setDescriptor(asDescriptor(node, branch));
368
- const unmount = node.mount(container);
259
+ } else if (s) {
260
+ b(ue(s, i));
261
+ const A = s.mount(g);
369
262
  return () => {
370
- unmount();
263
+ A();
371
264
  };
372
265
  }
373
266
  }
374
- }, [components, id, node, visible]);
375
- if (!descriptor || !visible) {
267
+ }, [p, n, s, V]), !m || !V)
376
268
  return null;
377
- }
378
- const mergedContexts = __spreadValues(__spreadValues({}, context), extraContext || {});
379
- const _a = mergedContexts, {
380
- cardinal,
381
- fonts: contextFonts = {},
382
- accessibility = {}
383
- } = _a, restContext = __objRest(_a, [
269
+ const H = f(f({}, L), c || {}), {
270
+ cardinal: D,
271
+ fonts: O = {},
272
+ accessibility: w = {}
273
+ } = H, k = M(H, [
384
274
  "cardinal",
385
275
  "fonts",
386
276
  "accessibility"
387
- ]);
388
- const fonts = {
389
- type: contextFonts.type,
390
- base: contextFonts.base || "16px",
391
- small: contextFonts.small || "0.8em",
392
- normal: contextFonts.normal || "1em",
393
- medium: contextFonts.medium || "1.2em",
394
- large: contextFonts.large || "1.6em",
395
- huge: contextFonts.huge || "2.5em"
396
- };
397
- const theme = __spreadProps(__spreadValues({}, restContext), {
398
- fonts,
399
- accessibility: __spreadProps(__spreadValues({}, accessibility), {
400
- isTabbing: ((_b = themeContext.accessibility) == null ? void 0 : _b.isTabbing) || isTabbing
277
+ ]), z = {
278
+ type: O.type,
279
+ base: O.base || "16px",
280
+ small: O.small || "0.8em",
281
+ normal: O.normal || "1em",
282
+ medium: O.medium || "1.2em",
283
+ large: O.large || "1.6em",
284
+ huge: O.huge || "2.5em"
285
+ }, G = E(f({}, k), {
286
+ fonts: z,
287
+ accessibility: E(f({}, w), {
288
+ isTabbing: ((re = y.accessibility) == null ? void 0 : re.isTabbing) || e
401
289
  })
402
290
  });
403
- if (typeof cardinal === "number") {
404
- theme.sizes = {
405
- cardinal,
406
- small: `${cardinal}px`,
407
- normal: `${cardinal * 3}px`,
408
- medium: `${cardinal * 5}px`,
409
- large: `${cardinal * 8}px`
410
- };
411
- }
412
- return /* @__PURE__ */ React.createElement(ThemeProvider, {
413
- theme
414
- }, /* @__PURE__ */ React.createElement(ComponentNodeContext.Provider, {
415
- value: descriptor
416
- }, /* @__PURE__ */ React.createElement(ComponentPropertyContext.Provider, {
417
- value: properties
291
+ return typeof D == "number" && (G.sizes = {
292
+ cardinal: D,
293
+ small: `${D}px`,
294
+ normal: `${D * 3}px`,
295
+ medium: `${D * 5}px`,
296
+ large: `${D * 8}px`
297
+ }), /* @__PURE__ */ d.createElement(Ke, {
298
+ theme: G
299
+ }, /* @__PURE__ */ d.createElement(Be.Provider, {
300
+ value: m
301
+ }, /* @__PURE__ */ d.createElement(je.Provider, {
302
+ value: x
418
303
  }, (() => {
419
- const props = __spreadValues({
420
- "data-width": size === "full" ? columns : Math.min(size, columns),
421
- "data-indent": indent,
422
- "data-name": descriptor.name,
423
- "data-node-id": descriptor.id,
424
- "data-component-type": descriptor.type,
425
- "aria-label": ariaLabel,
426
- tabIndex,
427
- id: descriptor.id,
428
- role: properties && properties.role
429
- }, other);
430
- switch (descriptor.type) {
431
- case "view": {
432
- return typeof properties.animation === "string" && properties.animation !== "none" ? /* @__PURE__ */ React.createElement(StyledAnimatedView, __spreadProps(__spreadValues({}, props), {
433
- className
434
- })) : /* @__PURE__ */ React.createElement(StyledView, __spreadProps(__spreadValues({}, props), {
435
- className
304
+ const A = f({
305
+ "data-width": $ === "full" ? S : Math.min($, S),
306
+ "data-indent": q,
307
+ "data-name": m.name,
308
+ "data-node-id": m.id,
309
+ "data-component-type": m.type,
310
+ "aria-label": o,
311
+ tabIndex: r,
312
+ id: m.id,
313
+ role: x && x.role
314
+ }, a);
315
+ switch (m.type) {
316
+ case "view":
317
+ return typeof x.animation == "string" && x.animation !== "none" ? /* @__PURE__ */ d.createElement(ht, E(f({}, A), {
318
+ className: t
319
+ })) : /* @__PURE__ */ d.createElement(ut, E(f({}, A), {
320
+ className: t
436
321
  }));
437
- }
438
322
  default: {
439
- const cssProps = filterCssProps(properties);
440
- return /* @__PURE__ */ React.createElement(ResolvableComponent, __spreadProps(__spreadValues(__spreadValues({
441
- ref
442
- }, props), cssProps), {
443
- className
323
+ const Q = Ge(x);
324
+ return /* @__PURE__ */ d.createElement(pt, E(f(f({
325
+ ref: l
326
+ }, A), Q), {
327
+ className: t
444
328
  }));
445
329
  }
446
330
  }
447
331
  })())));
448
- });
449
- const DetachedComponent$1 = ({ builder }) => {
450
- const container = useContainer();
451
- const [node, setNode] = useState(null);
452
- useEffect(() => {
453
- container.getAsync("components").then((components) => {
454
- return builder(components).then((createdNode) => {
455
- setNode(createdNode);
456
- });
332
+ }), gt = ({ builder: t }) => {
333
+ const e = j(), [n, i] = T(null);
334
+ return B(() => {
335
+ e.getAsync("components").then((s) => t(s).then((o) => {
336
+ i(o);
337
+ }));
338
+ }, []), B(() => () => {
339
+ n && e.getAsync("components").then((s) => {
340
+ s.nodes.detached = s.nodes.detached.filter((o) => o.id !== n.id);
457
341
  });
458
- }, []);
459
- useEffect(() => {
460
- return () => {
461
- if (node) {
462
- container.getAsync("components").then((components) => {
463
- components.nodes.detached = components.nodes.detached.filter((n) => n.id !== node.id);
464
- });
465
- }
466
- };
467
- }, [node]);
468
- if (!node) {
469
- return null;
470
- }
471
- return /* @__PURE__ */ React.createElement(Component, {
472
- id: node.id,
473
- node,
342
+ }, [n]), n ? /* @__PURE__ */ d.createElement(ie, {
343
+ id: n.id,
344
+ node: n,
474
345
  branch: "default"
475
- });
476
- };
477
- var detachedComponent = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
346
+ }) : null;
347
+ }, yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
478
348
  __proto__: null,
479
- "default": DetachedComponent$1
480
- }, Symbol.toStringTag, { value: "Module" }));
481
- const DetachedComponent = React.lazy(() => Promise.resolve().then(function() {
482
- return detachedComponent;
483
- }));
484
- const NotFound = ({ showSearch = false }) => {
485
- const themeContext = useContext$1(ThemeContext);
486
- const container = useContainer();
487
- return /* @__PURE__ */ React.createElement(React.Suspense, {
349
+ default: gt
350
+ }, Symbol.toStringTag, { value: "Module" })), bt = d.lazy(() => Promise.resolve().then(() => yt)), qt = ({ showSearch: t = !1 }) => {
351
+ const e = Fe(we), n = j();
352
+ return /* @__PURE__ */ d.createElement(d.Suspense, {
488
353
  fallback: null
489
- }, /* @__PURE__ */ React.createElement(DetachedComponent, {
490
- builder: (components) => {
491
- return container.get("settings").then((settings) => {
492
- var _a;
493
- const { properties, context } = Object.keys(settings.components).reduce((acc, key) => {
494
- if (settings.components[key].type === "not-found") {
495
- acc.properties = settings.components[key].properties;
496
- acc.context = settings.components[key].context;
497
- }
498
- return acc;
499
- }, { properties: {}, context: {} });
500
- properties.showSearch = showSearch;
501
- const node = components.createNode("area", { detached: true });
502
- node.name = "not-found-area";
503
- node.writeLayout({
504
- size: "full"
505
- });
506
- if (showSearch) {
507
- const searchComponentProps = Object.keys(settings.components).reduce((acc, key) => {
508
- if (settings.components[key].type === "search") {
509
- return settings.components[key].properties;
510
- }
511
- return acc;
512
- }, {});
513
- const searchNode = components.createNode("search", { detached: true });
514
- searchNode.writeLayout({ size: "full" });
515
- searchNode.writeProperties(__spreadValues({
516
- "css-margin-bottom": ((_a = themeContext == null ? void 0 : themeContext.sizes) == null ? void 0 : _a.normal) || "15px"
517
- }, searchComponentProps));
518
- node.appendChild(searchNode);
519
- }
520
- const notFoundNode = components.createNode("not-found", { detached: true });
521
- notFoundNode.writeLayout({ size: "full" });
522
- notFoundNode.writeProperties(properties);
523
- notFoundNode.writeContext(context);
524
- node.appendChild(notFoundNode);
525
- return node;
526
- });
527
- }
354
+ }, /* @__PURE__ */ d.createElement(bt, {
355
+ builder: (i) => n.get("settings").then((s) => {
356
+ var l;
357
+ const { properties: o, context: r } = Object.keys(s.components).reduce((h, u) => (s.components[u].type === "not-found" && (h.properties = s.components[u].properties, h.context = s.components[u].context), h), { properties: {}, context: {} });
358
+ o.showSearch = t;
359
+ const c = i.createNode("area", { detached: !0 });
360
+ if (c.name = "not-found-area", c.writeLayout({
361
+ size: "full"
362
+ }), t) {
363
+ const h = Object.keys(s.components).reduce((p, g) => s.components[g].type === "search" ? s.components[g].properties : p, {}), u = i.createNode("search", { detached: !0 });
364
+ u.writeLayout({ size: "full" }), u.writeProperties(f({
365
+ "css-margin-bottom": ((l = e == null ? void 0 : e.sizes) == null ? void 0 : l.normal) || "15px"
366
+ }, h)), c.appendChild(u);
367
+ }
368
+ const a = i.createNode("not-found", { detached: !0 });
369
+ return a.writeLayout({ size: "full" }), a.writeProperties(o), a.writeContext(r), c.appendChild(a), c;
370
+ })
528
371
  }));
529
- };
530
- const renderSymbol = (symbol) => {
531
- if (symbol) {
532
- const { type, content } = symbol;
533
- switch (type) {
372
+ }, wt = (t) => {
373
+ if (t) {
374
+ const { type: e, content: n } = t;
375
+ switch (e) {
534
376
  case "FontAwesome":
535
- return `<i class="humany-icon fa fa-${content}"></i>`;
377
+ return `<i class="humany-icon fa fa-${n}"></i>`;
536
378
  case "Uri":
537
- return `<i class="humany-icon humany-custom-icon" style="background: url(${content}) no-repeat center center;background-size: contain;"></i>`;
379
+ return `<i class="humany-icon humany-custom-icon" style="background: url(${n}) no-repeat center center;background-size: contain;"></i>`;
538
380
  default:
539
381
  return "";
540
382
  }
541
383
  }
542
- };
543
- const triggerTabHandler = (triggerDOMElement) => {
544
- const toggleTabbing = (element, tabbing) => {
545
- if (!element) {
546
- return;
547
- }
548
- if (tabbing) {
549
- element.classList.add("humany-tabbing");
550
- } else {
551
- element.classList.remove("humany-tabbing");
552
- }
553
- };
554
- const handleKeydown = (e) => {
555
- if (e.key === "Tab") {
556
- toggleTabbing(triggerDOMElement, true);
557
- } else if (!(e.key === "Enter" && document.activeElement && document.activeElement.classList.contains("humany-trigger"))) {
558
- toggleTabbing(triggerDOMElement, false);
559
- }
560
- };
561
- const handleClick = (e) => {
562
- if (document.activeElement && document.activeElement.classList.contains("humany-trigger") && document.activeElement.classList.contains("humany-tabbing")) {
563
- return;
564
- }
565
- toggleTabbing(triggerDOMElement, false);
384
+ }, vt = (t) => {
385
+ const e = (s, o) => {
386
+ !s || (o ? s.classList.add("humany-tabbing") : s.classList.remove("humany-tabbing"));
387
+ }, n = (s) => {
388
+ s.key === "Tab" ? e(t, !0) : s.key === "Enter" && document.activeElement && document.activeElement.classList.contains("humany-trigger") || e(t, !1);
389
+ }, i = (s) => {
390
+ document.activeElement && document.activeElement.classList.contains("humany-trigger") && document.activeElement.classList.contains("humany-tabbing") || e(t, !1);
566
391
  };
567
- document.addEventListener("keydown", handleKeydown);
568
- document.addEventListener("click", handleClick);
569
- return () => {
570
- document.removeEventListener("keydown", handleKeydown);
571
- document.removeEventListener("click", handleClick);
392
+ return document.addEventListener("keydown", n), document.addEventListener("click", i), () => {
393
+ document.removeEventListener("keydown", n), document.removeEventListener("click", i);
572
394
  };
573
395
  };
574
- function createTriggerElement(element, options) {
575
- const { symbol, widgetName, label = "", ariaLabel = "", tooltip = "" } = options;
576
- element.classList.add("humany-trigger");
577
- element.classList.add(`humany_${widgetName}`);
578
- if (label.length) {
579
- element.classList.add("humany-has-text");
580
- }
581
- if (ariaLabel.length && !element.getAttribute("aria-label")) {
582
- element.setAttribute("aria-label", ariaLabel);
583
- }
584
- if (ariaLabel.length && !element.getAttribute("tabindex")) {
585
- element.setAttribute("tabindex", "0");
586
- }
587
- if (tooltip.length && !element.getAttribute("title")) {
588
- element.setAttribute("title", tooltip);
589
- }
590
- const symbolHtml = renderSymbol(symbol) || "";
591
- element.innerHTML = `${symbolHtml}
396
+ function Et(t, e) {
397
+ const { symbol: n, widgetName: i, label: s = "", ariaLabel: o = "", tooltip: r = "" } = e;
398
+ t.classList.add("humany-trigger"), t.classList.add(`humany_${i}`), s.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);
399
+ const c = wt(n) || "";
400
+ return t.innerHTML = `${c}
592
401
  <span class="humany-close">
593
402
  <svg width="18" height="9" viewBox="0 0 18 9" fill="none" xmlns="http://www.w3.org/2000/svg">
594
403
  <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"/>
@@ -606,594 +415,304 @@ function createTriggerElement(element, options) {
606
415
  stroke-miterlimit="10" />
607
416
  </svg>
608
417
  </span>
609
- ${label.length ? `<span>${label}</span>` : ""}`;
610
- setTimeout(() => element && element.classList.add("humany-rendered"));
611
- return triggerTabHandler(element);
418
+ ${s.length ? `<span>${s}</span>` : ""}`, setTimeout(() => t && t.classList.add("humany-rendered")), vt(t);
612
419
  }
613
- function setInactive(elements, title) {
614
- if (elements instanceof HTMLElement) {
615
- if (title) {
616
- elements.setAttribute("title", title);
617
- }
618
- elements.classList.remove("humany-active");
619
- elements.classList.remove("humany-loading");
620
- } else if (elements instanceof Array) {
621
- elements.forEach((e) => {
622
- if (title) {
623
- e.setAttribute("title", title);
624
- }
625
- e.classList.remove("humany-active");
626
- e.classList.remove("humany-loading");
627
- });
628
- }
420
+ function Ct(t, e) {
421
+ t instanceof HTMLElement ? (e && t.setAttribute("title", e), t.classList.remove("humany-active"), t.classList.remove("humany-loading")) : t instanceof Array && t.forEach((n) => {
422
+ e && n.setAttribute("title", e), n.classList.remove("humany-active"), n.classList.remove("humany-loading");
423
+ });
629
424
  }
630
- function setLoading(elements) {
631
- if (elements instanceof HTMLElement) {
632
- elements.classList.remove("humany-active");
633
- elements.classList.add("humany-loading");
634
- } else if (elements instanceof Array) {
635
- elements.forEach((e) => {
636
- e.classList.remove("humany-active");
637
- e.classList.add("humany-loading");
638
- });
639
- }
425
+ function Ot(t) {
426
+ t instanceof HTMLElement ? (t.classList.remove("humany-active"), t.classList.add("humany-loading")) : t instanceof Array && t.forEach((e) => {
427
+ e.classList.remove("humany-active"), e.classList.add("humany-loading");
428
+ });
640
429
  }
641
- function setActive(elements, title) {
642
- if (elements instanceof HTMLElement) {
643
- if (title) {
644
- elements.setAttribute("title", title);
645
- }
646
- elements.classList.add("humany-active");
647
- elements.classList.remove("humany-loading");
648
- } else if (elements instanceof Array) {
649
- elements.forEach((e) => {
650
- if (title) {
651
- e.setAttribute("title", title);
652
- }
653
- e.classList.add("humany-active");
654
- e.classList.remove("humany-loading");
655
- });
656
- }
430
+ function Ee(t, e) {
431
+ t instanceof HTMLElement ? (e && t.setAttribute("title", e), t.classList.add("humany-active"), t.classList.remove("humany-loading")) : t instanceof Array && t.forEach((n) => {
432
+ e && n.setAttribute("title", e), n.classList.add("humany-active"), n.classList.remove("humany-loading");
433
+ });
657
434
  }
658
- var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
659
- TriggerType2["Inline"] = "inline";
660
- TriggerType2["Link"] = "link";
661
- TriggerType2["Badge"] = "badge";
662
- TriggerType2["Unsupported"] = "unsupported";
663
- return TriggerType2;
664
- })(TriggerType || {});
665
- const determineProvidedElements = (widgetDOMElement, triggerDOMElement) => {
666
- if (widgetDOMElement && triggerDOMElement) {
667
- return "both";
668
- }
669
- if (widgetDOMElement) {
670
- return "widgetDOM";
671
- }
672
- if (triggerDOMElement) {
673
- return "triggerDOM";
674
- }
675
- return "none";
676
- };
677
- const determineTriggerType = (triggerDefinition) => {
678
- if (!triggerDefinition) {
679
- return "inline";
680
- }
681
- if (typeof triggerDefinition === "boolean" && triggerDefinition) {
682
- return "link";
683
- }
684
- if (typeof triggerDefinition === "object" && !Array.isArray(triggerDefinition)) {
685
- return "badge";
686
- }
687
- return "unsupported";
688
- };
689
- const prepareDOMElements = (name, providedWidgetElement, providedTriggerElement, triggerDefinition, waitWithReplace = false) => {
690
- var _a, _b;
691
- const providedElements = determineProvidedElements(providedWidgetElement, providedTriggerElement);
692
- const triggerType = determineTriggerType(triggerDefinition);
693
- const cachedOriginals = {
694
- widgetDOMElement: providedWidgetElement ? providedWidgetElement.cloneNode(true) : void 0,
695
- triggerDOMElement: providedTriggerElement ? providedTriggerElement.cloneNode(true) : void 0
696
- };
697
- const output = {
698
- triggerType,
699
- cachedOriginals,
435
+ var P = /* @__PURE__ */ ((t) => (t.Inline = "inline", t.Link = "link", t.Badge = "badge", t.Unsupported = "unsupported", t))(P || {});
436
+ const St = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "none", Ce = (t) => t ? typeof t == "boolean" && t ? "link" : typeof t == "object" && !Array.isArray(t) ? "badge" : "unsupported" : "inline", xt = (t, e, n, i, s = !1) => {
437
+ var l, h;
438
+ const o = St(e, n), r = Ce(i), c = {
439
+ widgetDOMElement: e ? e.cloneNode(!0) : void 0,
440
+ triggerDOMElement: n ? n.cloneNode(!0) : void 0
441
+ }, a = {
442
+ triggerType: r,
443
+ cachedOriginals: c,
700
444
  widgetDOMElement: document.createElement("div")
701
445
  };
702
- switch (providedElements) {
446
+ switch (o) {
703
447
  case "both": {
704
- output.widgetDOMElement = providedWidgetElement || document.createElement("div");
705
- if (triggerType !== "inline") {
706
- output.triggerDOMElement = providedTriggerElement;
707
- }
448
+ a.widgetDOMElement = e || document.createElement("div"), r !== "inline" && (a.triggerDOMElement = n);
708
449
  break;
709
450
  }
710
451
  case "widgetDOM": {
711
- output.widgetDOMElement = providedWidgetElement || document.createElement("div");
712
- if (triggerType !== "inline") {
713
- const triggerElement = document.body.appendChild(document.createElement("a"));
714
- if (triggerType === "link") {
715
- triggerElement.innerText = name;
716
- }
717
- output.triggerDOMElement = triggerElement;
452
+ if (a.widgetDOMElement = e || document.createElement("div"), r !== "inline") {
453
+ const u = document.body.appendChild(document.createElement("a"));
454
+ r === "link" && (u.innerText = t), a.triggerDOMElement = u;
718
455
  }
719
456
  break;
720
457
  }
721
458
  case "triggerDOM": {
722
- const widgetElement = document.createElement("div");
723
- output.widgetDOMElement = widgetElement;
724
- if (triggerType === "inline") {
725
- widgetElement.id = (providedTriggerElement == null ? void 0 : providedTriggerElement.id) || "";
726
- if (waitWithReplace) {
727
- widgetElement.style.display = "none";
728
- (_a = providedTriggerElement == null ? void 0 : providedTriggerElement.parentNode) == null ? void 0 : _a.appendChild(widgetElement);
729
- output.callback = () => {
730
- var _a2;
731
- (_a2 = providedTriggerElement == null ? void 0 : providedTriggerElement.parentNode) == null ? void 0 : _a2.replaceChild(widgetElement, providedTriggerElement);
732
- widgetElement.style.display = (providedTriggerElement == null ? void 0 : providedTriggerElement.style.display) || "block";
733
- };
734
- } else {
735
- (_b = providedTriggerElement == null ? void 0 : providedTriggerElement.parentNode) == null ? void 0 : _b.replaceChild(widgetElement, providedTriggerElement);
736
- }
737
- output.cachedOriginals.widgetDOMElement = providedTriggerElement;
738
- output.cachedOriginals.triggerDOMElement = void 0;
739
- } else {
740
- output.widgetDOMElement = document.body.appendChild(widgetElement);
741
- output.triggerDOMElement = providedTriggerElement;
742
- }
459
+ const u = document.createElement("div");
460
+ a.widgetDOMElement = u, r === "inline" ? (u.id = (n == null ? void 0 : n.id) || "", s ? (u.style.display = "none", (l = n == null ? void 0 : n.parentNode) == null || l.appendChild(u), a.callback = () => {
461
+ var p;
462
+ (p = n == null ? void 0 : n.parentNode) == null || p.replaceChild(u, n), u.style.display = (n == null ? void 0 : n.style.display) || "block";
463
+ }) : (h = n == null ? void 0 : n.parentNode) == null || h.replaceChild(u, n), a.cachedOriginals.widgetDOMElement = n, a.cachedOriginals.triggerDOMElement = void 0) : (a.widgetDOMElement = document.body.appendChild(u), a.triggerDOMElement = n);
743
464
  break;
744
465
  }
745
466
  case "none": {
746
- const widgetElement = document.body.appendChild(document.createElement("div"));
747
- output.widgetDOMElement = widgetElement;
748
- if (triggerType !== "inline") {
749
- const triggerElement = document.body.appendChild(document.createElement("a"));
750
- if (triggerType === "link") {
751
- triggerElement.innerText = name;
752
- }
753
- output.triggerDOMElement = triggerElement;
467
+ const u = document.body.appendChild(document.createElement("div"));
468
+ if (a.widgetDOMElement = u, r !== "inline") {
469
+ const p = document.body.appendChild(document.createElement("a"));
470
+ r === "link" && (p.innerText = t), a.triggerDOMElement = p;
754
471
  }
755
472
  break;
756
473
  }
757
474
  }
758
- return output;
759
- };
760
- const MODALS_STORAGE_KEY = "modals";
761
- class ViewOutlet {
762
- constructor(container, options) {
763
- this.options = options;
764
- this.unsubscribe = [];
765
- this.container = container.createChild(this);
766
- this.container.register("widgetDOMElement", this.options.widgetDOMElement);
767
- this.container.register("triggerDOMElement", this.options.triggerDOMElement);
768
- const widget = this.container.get("$widget");
769
- this.options.widgetDOMElement.classList.add("humany-widget");
770
- this.options.widgetDOMElement.classList.add(`humany_${widget.name}`);
771
- const widgetDOMElements = container.get("widgetDOMElements") || [];
772
- container.register("widgetDOMElements", [
773
- ...widgetDOMElements,
475
+ return a;
476
+ }, At = "modals";
477
+ class Dt {
478
+ constructor(e, n) {
479
+ this.options = n, this.unsubscribe = [], this.container = e.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register("triggerDOMElement", this.options.triggerDOMElement);
480
+ const i = this.container.get("$widget");
481
+ this.options.widgetDOMElement.classList.add("humany-widget"), this.options.widgetDOMElement.classList.add(`humany_${i.name}`);
482
+ const s = e.get("widgetDOMElements") || [];
483
+ e.register("widgetDOMElements", [
484
+ ...s,
774
485
  this.options.widgetDOMElement
775
486
  ]);
776
487
  }
777
488
  render() {
778
- const { widgetDOMElement, triggerDOMElement } = this.options;
779
- const widget = this.container.get("$widget");
780
- if (widgetDOMElement.getAttribute("data-rendered") === "true") {
781
- return Promise.resolve();
782
- }
783
- if (triggerDOMElement && this.options.triggerType === TriggerType.Badge) {
784
- setLoading(triggerDOMElement);
785
- }
786
- return import("./render.js").then((module) => module.default(this.container, widgetDOMElement)).then(() => {
787
- widgetDOMElement.setAttribute("data-rendered", "true");
788
- if (triggerDOMElement && this.options.triggerType === TriggerType.Badge) {
789
- const tooltip = this.options.triggerOptions.openTooltip;
790
- setActive(triggerDOMElement, tooltip);
489
+ const { widgetDOMElement: e, triggerDOMElement: n } = this.options, i = this.container.get("$widget");
490
+ return e.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === P.Badge && Ot(n), import("./render.7937414f.js").then((s) => s.default(this.container, e)).then(() => {
491
+ if (e.setAttribute("data-rendered", "true"), n && this.options.triggerType === P.Badge) {
492
+ const o = this.options.triggerOptions.openTooltip;
493
+ Ee(n, o);
791
494
  }
792
- notifyDataLoaded(this.container, widgetDOMElement);
793
- const widgets = this.container.get("$environment").widgets.all();
794
- readStorage(this.container, MODALS_STORAGE_KEY, StorageMedium.Session).then((modals) => {
795
- if (modals) {
796
- modals.forEach((modal) => {
797
- if (widgets.find((w) => w.name === modal.name && w.state === "activated")) {
798
- widget.events.dispatch("widget:modal-opened", modal);
799
- }
800
- });
801
- }
495
+ Ue(this.container, e);
496
+ const s = this.container.get("$environment").widgets.all();
497
+ N(this.container, At, v.Session).then((o) => {
498
+ o && o.forEach((r) => {
499
+ s.find((c) => c.name === r.name && c.state === "activated") && i.events.dispatch("widget:modal-opened", r);
500
+ });
802
501
  });
803
- });
502
+ }));
804
503
  }
805
- renderBadge(options) {
806
- const { triggerDOMElement } = this.options;
807
- if (!triggerDOMElement) {
504
+ renderBadge(e) {
505
+ const { triggerDOMElement: n } = this.options;
506
+ if (!n)
808
507
  return;
809
- }
810
- if (!triggerDOMElement.getAttribute("role")) {
811
- triggerDOMElement.setAttribute("role", "button");
812
- }
813
- const { name } = this.container.get("$widget");
814
- const { label, symbol, ariaLabel, closedTooltip, openTooltip } = options;
815
- const triggerOptions = { closedTooltip, openTooltip };
816
- this.options.triggerOptions = triggerOptions;
817
- const removeTriggerListeners = createTriggerElement(triggerDOMElement, {
818
- label,
819
- symbol,
820
- ariaLabel,
821
- widgetName: name,
822
- tooltip: closedTooltip
508
+ n.getAttribute("role") || n.setAttribute("role", "button");
509
+ const { name: i } = this.container.get("$widget"), { label: s, symbol: o, ariaLabel: r, closedTooltip: c, openTooltip: a } = e, l = { closedTooltip: c, openTooltip: a };
510
+ this.options.triggerOptions = l;
511
+ const h = Et(n, {
512
+ label: s,
513
+ symbol: o,
514
+ ariaLabel: r,
515
+ widgetName: i,
516
+ tooltip: c
823
517
  });
824
- this.unsubscribe.push(removeTriggerListeners);
518
+ this.unsubscribe.push(h);
825
519
  }
826
520
  dispose() {
827
- return import("./unmount.js").then((module) => {
828
- var _a, _b, _c, _d;
829
- const { triggerDOMElement, widgetDOMElement } = this.options;
830
- module.default(widgetDOMElement);
831
- if (this.options.cachedOriginals.widgetDOMElement) {
832
- if (widgetDOMElement) {
833
- (_a = widgetDOMElement.parentNode) == null ? void 0 : _a.replaceChild(this.options.cachedOriginals.widgetDOMElement, widgetDOMElement);
834
- }
835
- }
836
- if (this.options.cachedOriginals.triggerDOMElement) {
837
- if (triggerDOMElement) {
838
- (_b = triggerDOMElement.parentNode) == null ? void 0 : _b.replaceChild(this.options.cachedOriginals.triggerDOMElement, triggerDOMElement);
839
- }
840
- }
841
- this.unsubscribe.forEach((unsubscribe) => {
842
- unsubscribe();
843
- });
844
- (_c = widgetDOMElement.parentNode) == null ? void 0 : _c.removeChild(widgetDOMElement);
845
- (_d = triggerDOMElement == null ? void 0 : triggerDOMElement.parentNode) == null ? void 0 : _d.removeChild(triggerDOMElement);
521
+ return import("./unmount.b0816844.js").then((e) => {
522
+ var s, o, r, c;
523
+ const { triggerDOMElement: n, widgetDOMElement: i } = this.options;
524
+ e.default(i), this.options.cachedOriginals.widgetDOMElement && i && ((s = i.parentNode) == null || s.replaceChild(this.options.cachedOriginals.widgetDOMElement, i)), this.options.cachedOriginals.triggerDOMElement && n && ((o = n.parentNode) == null || o.replaceChild(this.options.cachedOriginals.triggerDOMElement, n)), this.unsubscribe.forEach((a) => {
525
+ a();
526
+ }), (r = i.parentNode) == null || r.removeChild(i), (c = n == null ? void 0 : n.parentNode) == null || c.removeChild(n);
846
527
  });
847
528
  }
848
529
  }
849
- const STORAGE_KEY = "changesets";
850
- const convertSettingsToAttributes = (settings) => {
851
- const attributes = { tags: settings.tags };
852
- if (settings.context && typeof settings.context !== "function") {
853
- attributes.context = settings.context;
854
- }
855
- if (settings.properties && typeof settings.properties !== "function") {
856
- attributes.properties = settings.properties;
857
- }
858
- if (settings.layout && typeof settings.layout !== "function") {
859
- attributes.layout = settings.layout;
860
- }
861
- return attributes;
530
+ const F = "changesets", Mt = (t) => {
531
+ const e = { tags: t.tags };
532
+ 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;
862
533
  };
863
- class LocalStorageChangesetProvider {
864
- constructor(container, storageWriter) {
865
- this.container = container;
866
- this.storageWriter = storageWriter;
867
- }
868
- static create(container) {
869
- return createStorageWriter(container, STORAGE_KEY, StorageCategory.Necessary, {
870
- medium: StorageMedium.Local
871
- }).then((storageWriter) => new LocalStorageChangesetProvider(container, storageWriter));
534
+ class se {
535
+ constructor(e, n) {
536
+ this.container = e, this.storageWriter = n;
537
+ }
538
+ static create(e) {
539
+ return _(e, F, I.Necessary, {
540
+ medium: v.Local
541
+ }).then((n) => new se(e, n));
542
+ }
543
+ write(e, n, i, s) {
544
+ return Z(this)(() => N(this.container, F, v.Local).then((o = {}) => {
545
+ const { keys: r = [], items: c = {} } = o, a = r.indexOf(e);
546
+ return a > -1 && r.splice(a, 1), r.push(e), c[e] = {
547
+ options: s,
548
+ attributes: Mt(i),
549
+ rules: n.rules
550
+ }, this.storageWriter({ keys: r, items: c });
551
+ }));
872
552
  }
873
- write(key, target, attributes, options) {
874
- return lock(this)(() => {
875
- return readStorage(this.container, STORAGE_KEY, StorageMedium.Local).then((bag = {}) => {
876
- const { keys = [], items = {} } = bag;
877
- const existingIndex = keys.indexOf(key);
878
- if (existingIndex > -1) {
879
- keys.splice(existingIndex, 1);
880
- }
881
- keys.push(key);
882
- items[key] = {
883
- options,
884
- attributes: convertSettingsToAttributes(attributes),
885
- rules: target.rules
886
- };
887
- return this.storageWriter({ keys, items });
888
- });
889
- });
553
+ remove(e) {
554
+ return Z(this)(() => N(this.container, F, v.Local).then((n = {}) => {
555
+ const { keys: i = [], items: s = {} } = n, o = i.indexOf(e);
556
+ if (o > -1)
557
+ return i.splice(o, 1), delete s[e], this.storageWriter(n);
558
+ }));
890
559
  }
891
- remove(key) {
892
- return lock(this)(() => {
893
- return readStorage(this.container, STORAGE_KEY, StorageMedium.Local).then((bag = {}) => {
894
- const { keys = [], items = {} } = bag;
895
- const indexToRemove = keys.indexOf(key);
896
- if (indexToRemove > -1) {
897
- keys.splice(indexToRemove, 1);
898
- delete items[key];
899
- return this.storageWriter(bag);
560
+ load(e) {
561
+ return Z(this)(() => N(this.container, F, v.Local).then((n = {}) => {
562
+ const { keys: i = [], items: s = {} } = n;
563
+ i.forEach((o) => {
564
+ const r = s[o];
565
+ if (r) {
566
+ const { rules: c, attributes: a, options: l } = r;
567
+ e.write({
568
+ attributes: a,
569
+ options: l,
570
+ target: new Me(e, c)
571
+ });
900
572
  }
901
573
  });
902
- });
903
- }
904
- load(platform) {
905
- return lock(this)(() => {
906
- return readStorage(this.container, STORAGE_KEY, StorageMedium.Local).then((bag = {}) => {
907
- const { keys = [], items = {} } = bag;
908
- keys.forEach((key) => {
909
- const item = items[key];
910
- if (item) {
911
- const { rules, attributes, options } = item;
912
- platform.write({
913
- attributes,
914
- options,
915
- target: new ComponentQuery(platform, rules)
916
- });
917
- }
918
- });
919
- });
920
- });
574
+ }));
921
575
  }
922
576
  }
923
- const createPlatform = (widget) => {
924
- const { container } = widget;
925
- return LocalStorageChangesetProvider.create(container).then((localStorage) => {
926
- const settings = container.get("$settings");
927
- const providers = { localStorage };
928
- const platform = new ComponentPlatform(widget, providers);
929
- const destructComponentModel = createComponentModel(platform, settings);
930
- widget.events.subscribe("widget:state-change", (event, data) => {
931
- if (data.state === WidgetState.Deactivating) {
932
- destructComponentModel();
933
- }
934
- });
935
- return platform;
577
+ const Nt = (t) => {
578
+ const { container: e } = t;
579
+ return se.create(e).then((n) => {
580
+ const i = e.get("$settings"), s = { localStorage: n }, o = new Ae(t, s), r = De(o, i);
581
+ return t.events.subscribe("widget:state-change", (c, a) => {
582
+ a.state === tt.Deactivating && r();
583
+ }), o;
936
584
  });
937
- };
938
- const createSiteProvider = (site, forceHttps) => {
939
- return () => {
940
- const parseLocation = (href) => {
941
- const link = document.createElement("a");
942
- link.href = href;
943
- return link;
944
- };
945
- let location = window.location;
946
- if (site === "referrer" && document.referrer) {
947
- location = parseLocation(document.referrer);
948
- }
949
- return [forceHttps ? "https:" : "", "//", location.host, location.pathname].join("");
585
+ }, Lt = (t, e) => () => {
586
+ const n = (s) => {
587
+ const o = document.createElement("a");
588
+ return o.href = s, o;
950
589
  };
951
- };
952
- const createRoutingService = (container) => {
953
- return import("@telia-ace/widget-routing").then(({ RoutingService, HistoryMode }) => {
954
- return container.get("settings").then((settings) => {
955
- const {
956
- routing: { initialPath = "/", mode = HistoryMode.scopedHash, basePath },
957
- views
958
- } = settings;
959
- const routingService = new RoutingService(container, {
960
- initialPath,
961
- mode,
962
- routes: Object.keys(views).map((name) => ({
963
- name,
964
- path: views[name].path
965
- })),
966
- basePath
967
- });
968
- return routingService;
969
- });
590
+ let i = window.location;
591
+ return t === "referrer" && document.referrer && (i = n(document.referrer)), [e ? "https:" : "", "//", i.host, i.pathname].join("");
592
+ }, $t = (t) => import("@telia-ace/widget-routing").then(({ RoutingService: e, HistoryMode: n }) => t.get("settings").then((i) => {
593
+ const {
594
+ routing: { initialPath: s = "/", mode: o = n.scopedHash, basePath: r },
595
+ views: c
596
+ } = i;
597
+ return new e(t, {
598
+ initialPath: s,
599
+ mode: o,
600
+ routes: Object.keys(c).map((l) => ({
601
+ name: l,
602
+ path: c[l].path
603
+ })),
604
+ basePath: r
970
605
  });
971
- };
972
- const createStorageService = (container) => {
973
- return import("@telia-ace/widget-services").then(({ StorageProvider }) => {
974
- return new StorageProvider();
606
+ })), kt = (t) => import("@telia-ace/widget-services").then(({ StorageProvider: e }) => new e()), Pt = (t) => import("@telia-ace/knowledge-serviceclient").then(({ ServiceClient: e, ServiceProxy: n }) => t.get("settings").then((i) => {
607
+ const { name: s, events: o } = t.get("$widget"), {
608
+ data: { projection: r = "", site: c = "current", forceHttps: a = !1 }
609
+ } = i, l = new n(r, { credentials: "same-origin" }), h = new e(l, {
610
+ funnel: s.replace("_contact-method", "").replace("_contact", ""),
611
+ site: Lt(c, a)
975
612
  });
976
- };
977
- const createServiceClient = (container) => {
978
- return import("@telia-ace/knowledge-serviceclient").then(({ ServiceClient, ServiceProxy }) => {
979
- return container.get("settings").then((settings) => {
980
- const { name, events } = container.get("$widget");
981
- const {
982
- data: { projection = "", site = "current", forceHttps = false }
983
- } = settings;
984
- const proxy = new ServiceProxy(projection, { credentials: "same-origin" });
985
- const client = new ServiceClient(proxy, {
986
- funnel: name.replace("_contact-method", "").replace("_contact", ""),
987
- site: createSiteProvider(site, forceHttps)
988
- });
989
- events.subscribe("widget:settings-updated", (event, { data }) => {
990
- if (data && data.projection !== projection) {
991
- client.proxy.setBaseUrl(data.projection);
992
- }
993
- });
994
- return client;
995
- });
996
- });
997
- };
998
- const createActionResolver = (container) => {
999
- return import("@telia-ace/widget-core").then(({ ActionResolver }) => {
1000
- return new ActionResolver(container);
1001
- });
1002
- };
1003
- const createComponentResolver = (container) => {
1004
- return import("@telia-ace/widget-core").then(({ ComponentResolver }) => {
1005
- return new ComponentResolver(container);
1006
- });
1007
- };
1008
- const createComponentPlatform = (container) => {
1009
- return import("@telia-ace/widget-core").then(({ ComponentPlatform: ComponentPlatform2, createComponentModel: createComponentModel2 }) => {
1010
- return createPlatform(container.get("$widget"));
1011
- });
1012
- };
1013
- const SETTINGS_STORAGE_KEY = "$settings";
1014
- const OPEN_STORAGE_KEY = "open";
1015
- const STICKY_WIDGET_STORAGE_KEY = "activeStickyWidget";
1016
- class Widget extends WidgetType {
1017
- constructor(container) {
1018
- super(container);
1019
- this.outlets = /* @__PURE__ */ new Map();
1020
- this.activated = void 0;
1021
- this.subs = [];
1022
- this.handleBootstrapping = (activationData) => {
1023
- const options = {
1024
- triggerDOMElement: activationData.sourceDOMElement,
613
+ return o.subscribe("widget:settings-updated", (u, { data: p }) => {
614
+ p && p.projection !== r && h.proxy.setBaseUrl(p.projection);
615
+ }), h;
616
+ })), Rt = (t) => import("@telia-ace/widget-core").then(({ ActionResolver: e }) => new e(t)), Vt = (t) => import("@telia-ace/widget-core").then(({ ComponentResolver: e }) => new e(t)), _t = (t) => import("@telia-ace/widget-core").then(({ ComponentPlatform: e, createComponentModel: n }) => Nt(t.get("$widget"))), X = "$settings", K = "open", de = "activeStickyWidget";
617
+ class Qt extends nt {
618
+ constructor(e) {
619
+ super(e), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (n) => {
620
+ const i = {
621
+ triggerDOMElement: n.sourceDOMElement,
1025
622
  withRenderState: "storage"
1026
623
  };
1027
- this.container.get("settings").then((settings) => {
1028
- const { activate } = settings;
1029
- const shouldActivate = typeof activate === "undefined" || activate === null || activate === true;
1030
- if (shouldActivate) {
1031
- this.activated = (this.activated || this.widget.activate()).then(() => this.attach(options));
1032
- }
1033
- });
1034
- };
1035
- this.container.registerAsync("storage", () => createStorageService(this.container));
1036
- this.container.registerFactory("settings", () => {
1037
- return readStorage(this.container, SETTINGS_STORAGE_KEY, StorageMedium.Local).then((settings = {}) => {
1038
- return __spreadValues(__spreadValues({}, this.container.get("$settings")), settings);
624
+ this.container.get("settings").then((s) => {
625
+ const { activate: o } = s;
626
+ (typeof o == "undefined" || o === null || o === !0) && (this.activated = (this.activated || this.widget.activate()).then(() => this.attach(i)));
1039
627
  });
1040
- });
1041
- supportBootstrapping(this, "load", this.handleBootstrapping);
1042
- this.container.registerAsync("componentResolver", () => createComponentResolver(this.container));
1043
- this.container.registerAsync("matchingClient", () => createServiceClient(this.container));
1044
- this.container.registerAsync("router", () => createRoutingService(this.container));
1045
- this.container.registerAsync("actionResolver", () => createActionResolver(this.container));
1046
- this.container.register("matchMedia", window.matchMedia);
1047
- this.container.registerAsync("components", () => createComponentPlatform(this.container));
628
+ }, this.container.registerAsync("storage", () => kt(this.container)), this.container.registerFactory("settings", () => N(this.container, X, v.Local).then((n = {}) => f(f({}, this.container.get("$settings")), n))), et(this, "load", this.handleBootstrapping), this.container.registerAsync("componentResolver", () => Vt(this.container)), this.container.registerAsync("matchingClient", () => Pt(this.container)), this.container.registerAsync("router", () => $t(this.container)), this.container.registerAsync("actionResolver", () => Rt(this.container)), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync("components", () => _t(this.container));
1048
629
  }
1049
630
  initialize() {
1050
- const promises = this.container.getManyAsync("actionResolver", "router", "components");
1051
- return Promise.all([promises, this.container.get("settings")]).then(([{ actionResolver, router, components }, settings]) => {
1052
- var _a;
1053
- actionResolver.subscribe(this.widget.name, (origin, action, value) => this.onAction(action, value));
1054
- const switchViewNodes = (routeName) => {
1055
- components.nodes.query({ type: "view" }).forEach((viewNode) => {
1056
- components.setSwitch(viewNode, routeName);
631
+ const e = this.container.getManyAsync("actionResolver", "router", "components");
632
+ return Promise.all([e, this.container.get("settings")]).then(([{ actionResolver: n, router: i, components: s }, o]) => {
633
+ var a;
634
+ n.subscribe(this.widget.name, (l, h, u) => this.onAction(h, u));
635
+ const r = (l) => {
636
+ s.nodes.query({ type: "view" }).forEach((h) => {
637
+ s.setSwitch(h, l);
1057
638
  });
1058
- };
1059
- const initialRoute = ((_a = router.getInitialRoute()) == null ? void 0 : _a.name) || "index";
1060
- switchViewNodes(initialRoute);
1061
- this.events.subscribe("widget:data-loaded", (e, { element }) => {
1062
- if (this.widget.container.get("seoConfiguration")) {
1063
- this.events.dispatch("widget:preloaded-replaced", {
1064
- element
1065
- });
1066
- }
1067
- });
1068
- this.events.subscribe("router:change", (e, { previous = { routeData: {} }, next = { routeData: {} } }) => {
1069
- const { routeData: prevData } = previous;
1070
- const { routeData: nextData } = next;
1071
- const notFoundView = Object.keys(settings.views).reduce((acc, key) => {
1072
- const view = settings.views[key];
1073
- if (typeof view.path === "undefined") {
1074
- return key;
1075
- }
1076
- return acc;
1077
- }, "");
1078
- if (!nextData.name && notFoundView) {
1079
- switchViewNodes(notFoundView);
1080
- } else {
1081
- switchViewNodes(nextData.name);
1082
- }
1083
- removeNullAndUndefinedValues(prevData && prevData.params);
1084
- removeNullAndUndefinedValues(nextData && nextData.params);
1085
- this.container.getAsync("actionResolver").then((actionResolver2) => {
1086
- actionResolver2.action(this.widget.name, "routeChange", {
1087
- next: nextData,
1088
- previous: prevData
639
+ }, c = ((a = i.getInitialRoute()) == null ? void 0 : a.name) || "index";
640
+ return r(c), this.events.subscribe("widget:data-loaded", (l, { element: h }) => {
641
+ this.widget.container.get("seoConfiguration") && this.events.dispatch("widget:preloaded-replaced", {
642
+ element: h
643
+ });
644
+ }), this.events.subscribe("router:change", (l, { previous: h = { routeData: {} }, next: u = { routeData: {} } }) => {
645
+ const { routeData: p } = h, { routeData: g } = u, m = Object.keys(o.views).reduce((b, y) => typeof o.views[y].path == "undefined" ? y : b, "");
646
+ !g.name && m ? r(m) : r(g.name), he(p && p.params), he(g && g.params), this.container.getAsync("actionResolver").then((b) => {
647
+ b.action(this.widget.name, "routeChange", {
648
+ next: g,
649
+ previous: p
1089
650
  });
1090
651
  });
1091
- });
1092
- return router.initialize();
652
+ }), i.initialize();
1093
653
  });
1094
654
  }
1095
- attach(attachData = {}) {
1096
- return this.container.get("settings").then(({ trigger }) => {
1097
- var _a, _b;
655
+ attach(e = {}) {
656
+ return this.container.get("settings").then(({ trigger: n }) => {
657
+ var p, g;
1098
658
  const {
1099
- widgetDOMElement,
1100
- key = uuid(),
1101
- triggerDOMElement,
1102
- withRenderState
1103
- } = attachData;
1104
- const triggerType = determineTriggerType(trigger);
1105
- const waitWithReplace = triggerType === TriggerType.Inline && ((triggerDOMElement == null ? void 0 : triggerDOMElement.childElementCount) || 0) > 0;
1106
- const outletOptions = prepareDOMElements(this.widget.name, widgetDOMElement, triggerDOMElement, trigger, waitWithReplace);
1107
- if (this.outlets.size < 1 && !withRenderState) {
1108
- this.setRenderState("unset");
1109
- }
1110
- const swap = () => {
1111
- const isReady = () => widgetDOMElement2.querySelectorAll("[data-loading=true]").length === 0;
1112
- const [widgetDOMElement2] = this.widget.container.get("widgetDOMElements");
1113
- const watcher = (mutations, observer2) => {
1114
- if (isReady()) {
1115
- if (outletOptions.callback) {
1116
- outletOptions.callback();
1117
- }
1118
- observer2.disconnect();
1119
- }
1120
- };
1121
- const options = {
1122
- attributes: true,
1123
- subtree: true
659
+ widgetDOMElement: i,
660
+ key: s = Ye(),
661
+ triggerDOMElement: o,
662
+ withRenderState: r
663
+ } = e, a = Ce(n) === P.Inline && ((o == null ? void 0 : o.childElementCount) || 0) > 0, l = xt(this.widget.name, i, o, n, a);
664
+ this.outlets.size < 1 && !r && this.setRenderState("unset");
665
+ const h = () => {
666
+ const m = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), y = (x, $) => {
667
+ m() && (l.callback && l.callback(), $.disconnect());
668
+ }, S = {
669
+ attributes: !0,
670
+ subtree: !0,
671
+ childList: !0
1124
672
  };
1125
- if (isReady()) {
1126
- outletOptions.callback && outletOptions.callback();
1127
- }
1128
- const observer = new MutationObserver(watcher);
1129
- observer.observe(widgetDOMElement2, options);
673
+ m() && l.callback && l.callback(), new MutationObserver(y).observe(b, S);
1130
674
  };
1131
- if (waitWithReplace) {
1132
- this.widget.container.getAsync("dataClient").then(({ events }) => {
1133
- events.subscribe("data-client:fetched", (event, data) => {
1134
- if (data.unresolvedQueries === 0) {
1135
- swap();
1136
- }
1137
- });
675
+ a && this.widget.container.getAsync("dataClient").then(({ events: m }) => {
676
+ m.subscribe("data-client:fetched", (b, y) => {
677
+ y.unresolvedQueries === 0 && h();
1138
678
  });
1139
- }
1140
- const outlet = this.getOrCreateViewOutlet(key, outletOptions);
1141
- this.outlets.set(key, outlet);
1142
- this.widget.events.dispatch("widget:attached", {}, { bubbles: true });
1143
- if (outletOptions.triggerType === TriggerType.Badge && trigger) {
1144
- (_a = outletOptions.triggerDOMElement) == null ? void 0 : _a.setAttribute("aria-expanded", "false");
1145
- outlet == null ? void 0 : outlet.renderBadge(trigger);
1146
- }
1147
- if (outletOptions.triggerType !== TriggerType.Inline) {
1148
- (_b = outletOptions.triggerDOMElement) == null ? void 0 : _b.addEventListener("click", (event) => {
1149
- event.preventDefault();
1150
- this.container.get("settings").then(({ trigger: updatedTrigger }) => {
1151
- outlet.render().then(() => this.renderState()).then((renderState) => {
1152
- if (updatedTrigger && updatedTrigger.action && updatedTrigger.action === "hide") {
1153
- return renderState === WidgetRenderState.open ? this.hide() : this.open();
1154
- }
1155
- return renderState === WidgetRenderState.open ? this.close() : this.open();
1156
- });
1157
- });
679
+ });
680
+ const u = this.getOrCreateViewOutlet(s, l);
681
+ if (this.outlets.set(s, u), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), l.triggerType === P.Badge && n && ((p = l.triggerDOMElement) == null || p.setAttribute("aria-expanded", "false"), u == null || u.renderBadge(n)), l.triggerType !== P.Inline && ((g = l.triggerDOMElement) == null || g.addEventListener("click", (m) => {
682
+ m.preventDefault(), this.container.get("settings").then(({ trigger: b }) => {
683
+ u.render().then(() => this.renderState()).then((y) => b && b.action && b.action === "hide" ? y === C.open ? this.hide() : this.open() : y === C.open ? this.close() : this.open());
1158
684
  });
1159
- }
1160
- if (this.outlets.size > 1) {
1161
- return this.renderState().then((state) => {
1162
- this.triggerStateIfApplicable(state);
685
+ })), this.outlets.size > 1)
686
+ return this.renderState().then((m) => {
687
+ this.triggerStateIfApplicable(m);
1163
688
  });
1164
- }
1165
- if (withRenderState) {
1166
- if (withRenderState === "storage") {
1167
- return this.renderState().then((state) => {
1168
- if (outletOptions.triggerType === TriggerType.Inline) {
1169
- this.triggerStateIfApplicable("open");
1170
- return;
1171
- }
1172
- this.triggerStateIfApplicable(state);
1173
- });
1174
- }
1175
- return this.triggerStateIfApplicable(withRenderState);
1176
- }
689
+ if (r)
690
+ return r === "storage" ? this.renderState().then((m) => {
691
+ if (l.triggerType === P.Inline) {
692
+ this.triggerStateIfApplicable("open");
693
+ return;
694
+ }
695
+ this.triggerStateIfApplicable(m);
696
+ }) : this.triggerStateIfApplicable(r);
1177
697
  });
1178
698
  }
1179
- detach(key) {
1180
- if (key) {
1181
- if (this.outlets.has(key)) {
1182
- const outlet = this.outlets.get(key);
1183
- outlet == null ? void 0 : outlet.dispose();
1184
- this.outlets.delete(key);
699
+ detach(e) {
700
+ if (e) {
701
+ if (this.outlets.has(e)) {
702
+ const n = this.outlets.get(e);
703
+ n == null || n.dispose(), this.outlets.delete(e);
1185
704
  return;
1186
705
  }
706
+ process.env.NODE_ENV !== "production" && console.warn(`detach(): Could not find View Outlet with key ${e}`);
1187
707
  return;
1188
708
  }
1189
- this.outlets.forEach((outlet) => {
1190
- outlet.dispose();
1191
- });
1192
- this.outlets.clear();
709
+ this.outlets.forEach((n) => {
710
+ n.dispose();
711
+ }), this.outlets.clear();
1193
712
  }
1194
- triggerStateIfApplicable(input) {
1195
- return this.container.getAsync("router").then((router) => {
1196
- switch (input) {
713
+ triggerStateIfApplicable(e) {
714
+ return this.container.getAsync("router").then((n) => {
715
+ switch (e) {
1197
716
  case "closed":
1198
717
  this.close();
1199
718
  break;
@@ -1201,216 +720,151 @@ class Widget extends WidgetType {
1201
720
  this.open();
1202
721
  break;
1203
722
  case "hidden":
1204
- this.hide();
1205
- router.start();
723
+ this.hide(), n.start();
1206
724
  break;
1207
725
  default:
1208
726
  return;
1209
727
  }
1210
728
  });
1211
729
  }
1212
- getOrCreateViewOutlet(key, options) {
1213
- return this.outlets.has(key) ? this.outlets.get(key) : new ViewOutlet(this.container, options);
730
+ getOrCreateViewOutlet(e, n) {
731
+ return this.outlets.has(e) ? this.outlets.get(e) : new Dt(this.container, n);
1214
732
  }
1215
- render(renderData = {}) {
1216
- if (renderData.open) {
1217
- const options = __spreadProps(__spreadValues({}, renderData), {
733
+ render(e = {}) {
734
+ if (process.env.NODE_ENV !== "production" && console.warn("widget.render() is deprecated. Use widget.attach() instead."), e.open) {
735
+ const n = E(f({}, e), {
1218
736
  withRenderState: "open"
1219
737
  });
1220
- return this.attach(options);
738
+ return this.attach(n);
1221
739
  }
1222
- return this.attach(renderData);
740
+ return this.attach(e);
1223
741
  }
1224
- activate(data) {
1225
- if (data == null ? void 0 : data.override) {
1226
- this.setSettings(() => data.override);
1227
- }
1228
- if (data == null ? void 0 : data.apiNotificationPriorityBy) {
1229
- this.container.register("apiNotificationPriorityBy", data.apiNotificationPriorityBy);
1230
- }
742
+ activate(e) {
743
+ e != null && e.override && this.setSettings(() => e.override), e != null && e.apiNotificationPriorityBy && this.container.register("apiNotificationPriorityBy", e.apiNotificationPriorityBy);
1231
744
  }
1232
- setSettings(fn) {
745
+ setSettings(e) {
1233
746
  return Promise.all([
1234
747
  this.container.get("settings"),
1235
- createStorageWriter(this.container, SETTINGS_STORAGE_KEY, StorageCategory.Necessary, {
1236
- medium: StorageMedium.Local
748
+ _(this.container, X, I.Necessary, {
749
+ medium: v.Local
1237
750
  })
1238
- ]).then(([settings, write]) => {
1239
- return Promise.resolve(fn(settings)).then((override) => {
1240
- return write(override).then(() => {
1241
- const updated = __spreadValues(__spreadValues({}, settings), override);
1242
- this.widget.events.dispatch("widget:settings-updated", updated);
1243
- return updated;
1244
- });
1245
- });
1246
- });
751
+ ]).then(([n, i]) => Promise.resolve(e(n)).then((s) => i(s).then(() => {
752
+ const o = f(f({}, n), s);
753
+ return this.widget.events.dispatch("widget:settings-updated", o), o;
754
+ })));
1247
755
  }
1248
756
  clearSettings() {
1249
- return createStorageWriter(this.container, SETTINGS_STORAGE_KEY, StorageCategory.Necessary, { medium: StorageMedium.Local }).then((write) => write()).then(() => this.container.get("settings")).then((settings) => {
1250
- this.widget.events.dispatch("widget:settings-updated", settings);
757
+ return _(this.container, X, I.Necessary, { medium: v.Local }).then((e) => e()).then(() => this.container.get("settings")).then((e) => {
758
+ this.widget.events.dispatch("widget:settings-updated", e);
1251
759
  });
1252
760
  }
1253
- action({ action, value }) {
1254
- return this.container.getAsync("actionResolver").then((actionResolver) => {
1255
- actionResolver.action(this.widget.name, action, value);
761
+ action({ action: e, value: n }) {
762
+ return this.container.getAsync("actionResolver").then((i) => {
763
+ i.action(this.widget.name, e, n);
1256
764
  });
1257
765
  }
1258
766
  renderState() {
1259
- if (onWidgetUrl(this.container)) {
1260
- return Promise.resolve(WidgetRenderState.open);
1261
- }
1262
- const readSessionOpen = () => readStorage(this.container, OPEN_STORAGE_KEY, StorageMedium.Session).then((value = WidgetRenderState.closed) => value);
1263
- const readLocalOpen = () => readStorage(this.container, OPEN_STORAGE_KEY, StorageMedium.Session).then((value = WidgetRenderState.closed) => value);
1264
- return this.container.getAsync("router").then((routing) => {
1265
- if (routing.isSticky()) {
1266
- return readLocalOpen().then((localOpen) => {
1267
- return localOpen === WidgetRenderState.open ? localOpen : readSessionOpen();
1268
- });
1269
- }
1270
- return readSessionOpen();
1271
- });
767
+ if (Je(this.container))
768
+ return Promise.resolve(C.open);
769
+ const e = () => N(this.container, K, v.Session).then((i = C.closed) => i), n = () => N(this.container, K, v.Session).then((i = C.closed) => i);
770
+ return this.container.getAsync("router").then((i) => i.isSticky() ? n().then((s) => s === C.open ? s : e()) : e());
1272
771
  }
1273
772
  hide() {
1274
- if (this.outlets.size < 1) {
1275
- return Promise.resolve();
1276
- }
1277
- this.outlets.forEach((outlet) => outlet.render());
1278
- return this.action({ action: "hide" }).then(() => {
1279
- this.setTriggerState(false);
1280
- });
773
+ return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn("hide(): No-op as no view outlets are registered. Invoke the attach() command first."), Promise.resolve()) : (this.outlets.forEach((e) => e.render()), this.action({ action: "hide" }).then(() => {
774
+ this.setTriggerState(!1);
775
+ }));
1281
776
  }
1282
777
  open() {
1283
- if (this.outlets.size < 1) {
1284
- return Promise.resolve();
1285
- }
1286
- this.outlets.forEach((outlet) => outlet.render());
1287
- return this.action({ action: "open" }).then(() => {
1288
- this.widget.events.dispatch("tracking:widget-rendered", {});
1289
- return this.onOpen();
1290
- });
778
+ return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn("open(): No-op as no view outlets are registered. Invoke the attach() command first."), Promise.resolve()) : (this.outlets.forEach((e) => e.render()), this.action({ action: "open" }).then(() => (this.widget.events.dispatch("tracking:widget-rendered", {}), this.onOpen())));
1291
779
  }
1292
780
  close() {
1293
- if (this.outlets.size < 1) {
1294
- return Promise.resolve();
1295
- }
1296
- return this.action({ action: "close" }).then(() => this.onClose());
781
+ return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn("close(): No-op as no view outlets are registered. Invoke the attach() command first."), Promise.resolve()) : this.action({ action: "close" }).then(() => this.onClose());
1297
782
  }
1298
783
  show() {
1299
- return this.open();
784
+ return process.env.NODE_ENV !== "production" && console.warn("show(): Command is deprecated and will be removed in the future. Use open() instead."), this.open();
1300
785
  }
1301
- onAction(action, value) {
1302
- switch (action) {
786
+ onAction(e, n) {
787
+ switch (e) {
1303
788
  case "close":
1304
789
  case "open":
1305
790
  case "hide":
1306
- const newState = action === "open" ? WidgetRenderState.open : action === "close" ? WidgetRenderState.closed : WidgetRenderState.hidden;
1307
- return this.setRenderState(newState).then(() => {
1308
- this.setTriggerState(newState === WidgetRenderState.open);
1309
- if (newState !== WidgetRenderState.hidden) {
1310
- newState === WidgetRenderState.open ? this.onOpen() : this.onClose();
1311
- } else {
1312
- this.outlets.forEach((outlet) => {
1313
- var _a;
1314
- return (_a = outlet.options.triggerDOMElement) == null ? void 0 : _a.setAttribute("aria-expanded", "false");
1315
- });
1316
- }
791
+ const i = e === "open" ? C.open : e === "close" ? C.closed : C.hidden;
792
+ return this.setRenderState(i).then(() => {
793
+ this.setTriggerState(i === C.open), i !== C.hidden ? i === C.open ? this.onOpen() : this.onClose() : this.outlets.forEach((s) => {
794
+ var o;
795
+ return (o = s.options.triggerDOMElement) == null ? void 0 : o.setAttribute("aria-expanded", "false");
796
+ });
1317
797
  });
1318
798
  }
1319
799
  }
1320
- setRenderState(newState) {
1321
- const { invoke, events } = this.container.get("$widget");
800
+ setRenderState(e) {
801
+ const { invoke: n, events: i } = this.container.get("$widget");
1322
802
  return Promise.all([
1323
- createStorageWriter(this.container, OPEN_STORAGE_KEY, StorageCategory.Necessary, {
1324
- medium: StorageMedium.Session
803
+ _(this.container, K, I.Necessary, {
804
+ medium: v.Session
1325
805
  }),
1326
- createStorageWriter(this.container, OPEN_STORAGE_KEY, StorageCategory.Necessary, {
1327
- medium: StorageMedium.Local,
806
+ _(this.container, K, I.Necessary, {
807
+ medium: v.Local,
1328
808
  duration: { minutes: 5 }
1329
809
  }),
1330
810
  this.container.getAsync("router"),
1331
- invoke("renderState")
1332
- ]).then(([writeSessionOpen, writeLocalOpen, routing, previousRenderState]) => {
1333
- if (newState === "unset" || !newState) {
1334
- writeLocalOpen();
1335
- writeSessionOpen();
1336
- } else {
1337
- if (routing.isSticky()) {
1338
- writeLocalOpen(newState);
1339
- }
1340
- writeSessionOpen(newState);
1341
- }
1342
- events.dispatch("widget:render-state-changed", {
1343
- previous: previousRenderState,
1344
- next: newState
811
+ n("renderState")
812
+ ]).then(([s, o, r, c]) => {
813
+ e === "unset" || !e ? (o(), s()) : (r.isSticky() && o(e), s(e)), i.dispatch("widget:render-state-changed", {
814
+ previous: c,
815
+ next: e
1345
816
  });
1346
817
  });
1347
818
  }
1348
819
  onOpen() {
1349
- return this.container.getAsync("router").then((router) => {
1350
- this.outlets.forEach((outlet) => {
1351
- var _a;
1352
- return (_a = outlet.options.triggerDOMElement) == null ? void 0 : _a.setAttribute("aria-expanded", "true");
1353
- });
1354
- return router.start();
1355
- });
820
+ return this.container.getAsync("router").then((e) => (this.outlets.forEach((n) => {
821
+ var i;
822
+ return (i = n.options.triggerDOMElement) == null ? void 0 : i.setAttribute("aria-expanded", "true");
823
+ }), e.start()));
1356
824
  }
1357
825
  onClose() {
1358
- const services = this.container.getManyAsync("router", "components");
1359
- const resetActivateProp = () => {
1360
- return this.container.get("settings").then((widgetSettings) => {
1361
- const { activate } = this.container.get("$settings");
1362
- if (widgetSettings.activate !== activate) {
1363
- return this.setSettings(() => Promise.resolve({ activate }));
1364
- }
1365
- return Promise.resolve();
1366
- });
1367
- };
1368
- return resetActivateProp().then(() => {
1369
- return services;
1370
- }).then(({
1371
- router,
1372
- components
826
+ const e = this.container.getManyAsync("router", "components");
827
+ return (() => this.container.get("settings").then((i) => {
828
+ const { activate: s } = this.container.get("$settings");
829
+ return i.activate !== s ? this.setSettings(() => Promise.resolve({ activate: s })) : Promise.resolve();
830
+ }))().then(() => e).then(({
831
+ router: i,
832
+ components: s
1373
833
  }) => {
1374
- const visibleNodes = components.nodes.visible;
1375
- this.outlets.forEach((outlet) => {
1376
- var _a;
1377
- return (_a = outlet.options.triggerDOMElement) == null ? void 0 : _a.setAttribute("aria-expanded", "false");
1378
- });
1379
- if (visibleNodes.filter((c) => c.attributes.properties.animation && c.attributes.properties.animation !== "none").length) {
1380
- return new Promise((resolve) => {
1381
- setTimeout(() => {
1382
- resolve(router);
1383
- }, 200);
1384
- });
1385
- }
1386
- return Promise.resolve(router);
1387
- }).then((router) => router.stop());
1388
- }
1389
- setTriggerState(open) {
1390
- this.outlets.forEach((outlet) => {
834
+ const o = s.nodes.visible;
835
+ return this.outlets.forEach((r) => {
836
+ var c;
837
+ return (c = r.options.triggerDOMElement) == null ? void 0 : c.setAttribute("aria-expanded", "false");
838
+ }), o.filter((r) => r.attributes.properties.animation && r.attributes.properties.animation !== "none").length ? new Promise((r) => {
839
+ setTimeout(() => {
840
+ r(i);
841
+ }, 200);
842
+ }) : Promise.resolve(i);
843
+ }).then((i) => i.stop());
844
+ }
845
+ setTriggerState(e) {
846
+ this.outlets.forEach((n) => {
1391
847
  const {
1392
- options: { triggerDOMElement, triggerOptions }
1393
- } = outlet;
1394
- const { openTooltip, closedTooltip } = triggerOptions || {};
1395
- if (triggerDOMElement) {
1396
- open ? setActive(triggerDOMElement, openTooltip) : setInactive(triggerDOMElement, closedTooltip);
1397
- }
848
+ options: { triggerDOMElement: i, triggerOptions: s }
849
+ } = n, { openTooltip: o, closedTooltip: r } = s || {};
850
+ i && (e ? Ee(i, o) : Ct(i, r));
1398
851
  });
1399
852
  }
1400
853
  deactivate() {
1401
- this.subs.forEach((s) => s());
1402
- const promises = [];
1403
- this.outlets.forEach((outlet) => promises.push(outlet.dispose()));
1404
- return readStorage(this.container, STICKY_WIDGET_STORAGE_KEY, StorageMedium.Local).then((value) => {
1405
- if (value === this.widget.name) {
1406
- return createStorageWriter(this.container, STICKY_WIDGET_STORAGE_KEY, StorageCategory.Necessary, {
1407
- medium: StorageMedium.Local,
1408
- scope: StorageScope.Implementation
1409
- }).then((write) => write()).then(() => Promise.all(promises));
1410
- }
1411
- return Promise.all(promises);
1412
- });
854
+ this.subs.forEach((n) => n());
855
+ const e = [];
856
+ return this.outlets.forEach((n) => e.push(n.dispose())), N(this.container, de, v.Local).then((n) => n === this.widget.name ? _(this.container, de, I.Necessary, {
857
+ medium: v.Local,
858
+ scope: Xe.Implementation
859
+ }).then((i) => i()).then(() => Promise.all(e)) : Promise.all(e));
1413
860
  }
1414
861
  }
1415
- export { Component, DetachedComponent$1 as DetachedComponent, Widget as GridWidget, NotFound, Widget, styling as genericComponentStyling };
862
+ export {
863
+ ie as Component,
864
+ gt as DetachedComponent,
865
+ Qt as GridWidget,
866
+ qt as NotFound,
867
+ Qt as Widget,
868
+ Y as genericComponentStyling
869
+ };
1416
870
  //# sourceMappingURL=index.js.map