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