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