@telia-ace/knowledge-widget-components-contact-list 1.1.1-rc.1 → 1.1.1-rc.3
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/contact-list-05301ab8.js +31 -0
- package/contact-list-300090b9.mjs +190 -0
- package/index.js +1 -1
- package/index.mjs +76 -5
- package/package.json +9 -9
- package/contact-list-ab646287.js +0 -188
- package/contact-list-fc4972a6.mjs +0 -1074
- package/detached-component-61ba6bf4.js +0 -1
- package/detached-component-f0fff886.mjs +0 -22
- package/index-0264775f.js +0 -1757
- package/index-373df3a5.js +0 -6
- package/index-5c9c2abf.mjs +0 -883
- package/index-6a1b7325.mjs +0 -11383
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("@emotion/styled"),q=require("@telia-ace/knowledge-widget-adapters"),e=require("@telia-ace/knowledge-widget-ui"),a=require("@telia-ace/widget-utilities"),D=require("@telia-ace/widget-types-grid"),k=require("react"),w=({className:n,guides:s,header:L,accordion:c,loading:g,route:S="guide",categoryTitle:x,...l})=>{const{name:p,params:{contactCategory:I=0,guide:C}}=e.useRouteData(),{name:r}=e.useComponentDescriptor(),$=e.useContainer(),f=e.useChildren(),b=e.useDispatch(),N=k.useCallback((o,i,y,u)=>{const{id:h,title:j}=o;return c&&C===h?t.jsx(e.AccordionListItem,{id:h,title:j,route:p,collapseUri:x&&a.formatUrl(x),children:f.map(d=>t.jsx(D.Component,{id:d.id,branch:"default",accordion:c},d.id))},h):u?u(o,i,y,u):null},[c,f,C]);return!s.length&&!g?e.createEmptyComponent($,{...l,className:a.appendClassNames(n,"humany-deflection-list")}):t.jsx(T,{...l,"data-loading":g,className:a.appendClassNames(n,"humany-deflection-list"),items:s,header:L,expandable:!!c,renderItem:N,dispatch:b,routing:{guide:S},paramMappers:{guide:({id:o,title:i})=>a.createParams({contactCategory:I,guide:o,accordion:c?r:void 0,uriName:a.formatUrl(i)})},children:t.jsx(e.Loader,{loading:g})})},T=m(e.GuideList)`
|
|
2
|
+
${e.contentBox}
|
|
3
|
+
${e.loadingOpacity}
|
|
4
|
+
`,U=m(q.ContactList)`
|
|
5
|
+
${e.loadingOpacity}
|
|
6
|
+
${e.contentBox}
|
|
7
|
+
`,B=m(e.ItemList)`
|
|
8
|
+
${n=>e.loadingOpacity(n)}
|
|
9
|
+
${e.contentBox}
|
|
10
|
+
${q.contactItemList}
|
|
11
|
+
|
|
12
|
+
&& {
|
|
13
|
+
i {
|
|
14
|
+
font-size: 25px;
|
|
15
|
+
width: 1.28571429em;
|
|
16
|
+
text-align: center;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`,v=m(e.Link)`
|
|
20
|
+
&:focus-visible {
|
|
21
|
+
${e.borderTabStyle};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
${q.contactLink}
|
|
25
|
+
`,G=m.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: ${n=>{var s;return(s=n.theme.sizes)==null?void 0:s.normal}};
|
|
29
|
+
`,O=m(e.StyledText)`
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
`,P=({className:n,...s})=>{const L=e.useDispatch(),c=e.useContainer(),g=e.useRouteData(),{deflectionHeader:S="",routes:x={},contactMethods:l=[],categories:p=[],guides:I=[],deflectionAccordion:C=!1,loading:r=!1}=e.useProperties(),{contactCategory:$,guide:f="guide"}=x;if(!p.length&&!l.length&&!r)return e.createEmptyComponent(c,{...s,className:a.appendClassNames(n,"humany-contact-category-list")});const{name:b,params:{contactCategory:N}}=g,o=a.findCategoryById(N,p);return l.length?t.jsxs(t.Fragment,{children:[t.jsx(w,{className:n,guides:I,categoryTitle:o&&o.title,header:S,route:f,accordion:C,loading:r}),t.jsx(U,{"data-loading":r,className:n,contactMethods:l,dispatch:L,children:t.jsx(e.Loader,{loading:r})})]}):t.jsx(B,{...s,"data-loading":r,className:a.appendClassNames(n,"humany-contact-category-list"),items:o&&o.items||p,renderItem:({id:i,title:y,symbol:u,matches:h,items:j,description:d})=>h||j&&j.length?t.jsx("li",{"data-contact-category":i,children:t.jsxs(v,{routeName:$||b,params:a.createParams({contactCategory:i,uriName:a.formatUrl(y)}),children:[u&&t.jsx(e.SymbolBadge,{symbol:u}),d!=null&&d.length?t.jsxs(G,{children:[t.jsx(O,{children:y}),t.jsx(e.StyledText,{children:d})]}):t.jsx(e.StyledText,{children:y})]})},i):null,children:t.jsx(e.Loader,{loading:r})})};exports.default=P;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsx as t, jsxs as D, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import d from "@emotion/styled";
|
|
3
|
+
import { ContactList as T, contactItemList as U, contactLink as E } from "@telia-ace/knowledge-widget-adapters";
|
|
4
|
+
import { GuideList as F, contentBox as G, loadingOpacity as j, useRouteData as w, useComponentDescriptor as O, useContainer as z, useChildren as R, useDispatch as A, AccordionListItem as q, createEmptyComponent as H, Loader as k, ItemList as J, Link as K, borderTabStyle as Q, StyledText as v, useProperties as V, SymbolBadge as W } from "@telia-ace/knowledge-widget-ui";
|
|
5
|
+
import { formatUrl as B, appendClassNames as L, createParams as M, findCategoryById as X } from "@telia-ace/widget-utilities";
|
|
6
|
+
import { Component as Y } from "@telia-ace/widget-types-grid";
|
|
7
|
+
import { useCallback as Z } from "react";
|
|
8
|
+
const _ = ({
|
|
9
|
+
className: e,
|
|
10
|
+
guides: o,
|
|
11
|
+
header: $,
|
|
12
|
+
accordion: r,
|
|
13
|
+
loading: m,
|
|
14
|
+
route: x = "guide",
|
|
15
|
+
categoryTitle: p,
|
|
16
|
+
...s
|
|
17
|
+
}) => {
|
|
18
|
+
const {
|
|
19
|
+
name: u,
|
|
20
|
+
params: { contactCategory: I = 0, guide: y }
|
|
21
|
+
} = w(), { name: a } = O(), b = z(), f = R(), S = A(), N = Z(
|
|
22
|
+
(n, c, g, l) => {
|
|
23
|
+
const { id: h, title: C } = n;
|
|
24
|
+
return r && y === h ? /* @__PURE__ */ t(
|
|
25
|
+
q,
|
|
26
|
+
{
|
|
27
|
+
id: h,
|
|
28
|
+
title: C,
|
|
29
|
+
route: u,
|
|
30
|
+
collapseUri: p && B(p),
|
|
31
|
+
children: f.map((i) => /* @__PURE__ */ t(
|
|
32
|
+
Y,
|
|
33
|
+
{
|
|
34
|
+
id: i.id,
|
|
35
|
+
branch: "default",
|
|
36
|
+
accordion: r
|
|
37
|
+
},
|
|
38
|
+
i.id
|
|
39
|
+
))
|
|
40
|
+
},
|
|
41
|
+
h
|
|
42
|
+
) : l ? l(n, c, g, l) : null;
|
|
43
|
+
},
|
|
44
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
|
+
[r, f, y]
|
|
46
|
+
);
|
|
47
|
+
return !o.length && !m ? H(b, {
|
|
48
|
+
...s,
|
|
49
|
+
className: L(e, "humany-deflection-list")
|
|
50
|
+
}) : /* @__PURE__ */ t(
|
|
51
|
+
tt,
|
|
52
|
+
{
|
|
53
|
+
...s,
|
|
54
|
+
"data-loading": m,
|
|
55
|
+
className: L(e, "humany-deflection-list"),
|
|
56
|
+
items: o,
|
|
57
|
+
header: $,
|
|
58
|
+
expandable: !!r,
|
|
59
|
+
renderItem: N,
|
|
60
|
+
dispatch: S,
|
|
61
|
+
routing: {
|
|
62
|
+
guide: x
|
|
63
|
+
},
|
|
64
|
+
paramMappers: {
|
|
65
|
+
guide: ({ id: n, title: c }) => M({
|
|
66
|
+
contactCategory: I,
|
|
67
|
+
guide: n,
|
|
68
|
+
accordion: r ? a : void 0,
|
|
69
|
+
uriName: B(c)
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
children: /* @__PURE__ */ t(k, { loading: m })
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}, tt = d(F)`
|
|
76
|
+
${G}
|
|
77
|
+
${j}
|
|
78
|
+
`, et = d(T)`
|
|
79
|
+
${j}
|
|
80
|
+
${G}
|
|
81
|
+
`, nt = d(J)`
|
|
82
|
+
${(e) => j(e)}
|
|
83
|
+
${G}
|
|
84
|
+
${U}
|
|
85
|
+
|
|
86
|
+
&& {
|
|
87
|
+
i {
|
|
88
|
+
font-size: 25px;
|
|
89
|
+
width: 1.28571429em;
|
|
90
|
+
text-align: center;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`, ot = d(K)`
|
|
94
|
+
&:focus-visible {
|
|
95
|
+
${Q};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${E}
|
|
99
|
+
`, at = d.div`
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
gap: ${(e) => {
|
|
103
|
+
var o;
|
|
104
|
+
return (o = e.theme.sizes) == null ? void 0 : o.normal;
|
|
105
|
+
}};
|
|
106
|
+
`, rt = d(v)`
|
|
107
|
+
font-weight: bold;
|
|
108
|
+
`, gt = ({ className: e, ...o }) => {
|
|
109
|
+
const $ = A(), r = z(), m = w(), {
|
|
110
|
+
deflectionHeader: x = "",
|
|
111
|
+
routes: p = {},
|
|
112
|
+
contactMethods: s = [],
|
|
113
|
+
categories: u = [],
|
|
114
|
+
guides: I = [],
|
|
115
|
+
deflectionAccordion: y = !1,
|
|
116
|
+
loading: a = !1
|
|
117
|
+
} = V(), { contactCategory: b, guide: f = "guide" } = p;
|
|
118
|
+
if (!u.length && !s.length && !a)
|
|
119
|
+
return H(r, {
|
|
120
|
+
...o,
|
|
121
|
+
className: L(e, "humany-contact-category-list")
|
|
122
|
+
});
|
|
123
|
+
const {
|
|
124
|
+
name: S,
|
|
125
|
+
params: { contactCategory: N }
|
|
126
|
+
} = m, n = X(
|
|
127
|
+
N,
|
|
128
|
+
u
|
|
129
|
+
);
|
|
130
|
+
return s.length ? /* @__PURE__ */ D(P, { children: [
|
|
131
|
+
/* @__PURE__ */ t(
|
|
132
|
+
_,
|
|
133
|
+
{
|
|
134
|
+
className: e,
|
|
135
|
+
guides: I,
|
|
136
|
+
categoryTitle: n && n.title,
|
|
137
|
+
header: x,
|
|
138
|
+
route: f,
|
|
139
|
+
accordion: y,
|
|
140
|
+
loading: a
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ t(
|
|
144
|
+
et,
|
|
145
|
+
{
|
|
146
|
+
"data-loading": a,
|
|
147
|
+
className: e,
|
|
148
|
+
contactMethods: s,
|
|
149
|
+
dispatch: $,
|
|
150
|
+
children: /* @__PURE__ */ t(k, { loading: a })
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
] }) : /* @__PURE__ */ t(
|
|
154
|
+
nt,
|
|
155
|
+
{
|
|
156
|
+
...o,
|
|
157
|
+
"data-loading": a,
|
|
158
|
+
className: L(e, "humany-contact-category-list"),
|
|
159
|
+
items: n && n.items || u,
|
|
160
|
+
renderItem: ({
|
|
161
|
+
id: c,
|
|
162
|
+
title: g,
|
|
163
|
+
symbol: l,
|
|
164
|
+
matches: h,
|
|
165
|
+
items: C,
|
|
166
|
+
description: i
|
|
167
|
+
}) => h || C && C.length ? /* @__PURE__ */ t("li", { "data-contact-category": c, children: /* @__PURE__ */ D(
|
|
168
|
+
ot,
|
|
169
|
+
{
|
|
170
|
+
routeName: b || S,
|
|
171
|
+
params: M({
|
|
172
|
+
contactCategory: c,
|
|
173
|
+
uriName: B(g)
|
|
174
|
+
}),
|
|
175
|
+
children: [
|
|
176
|
+
l && /* @__PURE__ */ t(W, { symbol: l }),
|
|
177
|
+
i != null && i.length ? /* @__PURE__ */ D(at, { children: [
|
|
178
|
+
/* @__PURE__ */ t(rt, { children: g }),
|
|
179
|
+
/* @__PURE__ */ t(v, { children: i })
|
|
180
|
+
] }) : /* @__PURE__ */ t(v, { children: g })
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
) }, c) : null,
|
|
184
|
+
children: /* @__PURE__ */ t(k, { loading: a })
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
gt as default
|
|
190
|
+
};
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const g=require("@telia-ace/knowledge-data-client"),n=require("@telia-ace/knowledge-widget-component-utilities"),w=require("@telia-ace/knowledge-widget-core"),M=require("@telia-ace/knowledge-widget-ui"),v=s=>{const{events:y}=s.get("$widget"),[m,P]=w.createEventSubscriber(y);return M.createReactComponent(s,"contact-list",Promise.resolve().then(()=>require("./contact-list-05301ab8.js")),e=>{const c=t=>{e.writeProperties({loading:!0,contactMethods:[],categories:[]}),e.actions.dispatch("fetch",{params:t})};e.actions.create("fetch",t=>{const{submitButtonLabel:r="Submit"}=e.properties(),a=(t.contactMethods||[]).map(o=>({...o,body:n.updateForm(o,{submit:r})}));return e.actions.dispatch("fetched",{...t,contactMethods:a,loading:!0})}),e.actions.create("fetched",t=>e.writeProperties({...t,guides:t.guides||[],loading:!1})),s.getAsync("router").then(t=>{const{params:r}=t.getRouteData();c(r)}),m("router:changed",(t,{current:r})=>{c(r.routeData.params)}),n.useForm(s,e),n.useExpand(e)}).then(()=>w.extendComponent(s,"contact-list",e=>{e.actions.watch("contact-list.fetch",(c,t)=>{const{deflection:r={},deflectionPageSize:a=5,deflectionAccordion:o}=e.properties(),{params:k={}}=c,{contactCategory:u,guide:h,accordion:D}=k;return g.DataClient.getInstance(s).then(d=>d.fetch(g.DataType.ContactMethodCategories,{contactMethodCategoryId:u}).then(({contactMethods:l,categories:f})=>{var p;const b=Object.keys(r),C=b.length===1&&!u?b[0]:u;return(p=r[C])!=null&&p.length?d.fetch(g.DataType.Guides,{categories:r[C],take:a}).then(i=>o&&h&&D===e.node.name?n.fetchAccordionGuideIfMissing(i,d,{guide:h}):new Promise(q=>q(i))).then(({guides:i})=>t({guides:i,contactMethods:l,categories:f})):t({contactMethods:l,categories:f})}))})})).then(()=>{P()})};module.exports=v;
|
package/index.mjs
CHANGED
|
@@ -1,7 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
1
|
+
import { DataClient as D, DataType as p } from "@telia-ace/knowledge-data-client";
|
|
2
|
+
import { updateForm as v, useForm as A, useExpand as I, fetchAccordionGuideIfMissing as S } from "@telia-ace/knowledge-widget-component-utilities";
|
|
3
|
+
import { createEventSubscriber as k, extendComponent as x } from "@telia-ace/knowledge-widget-core";
|
|
4
|
+
import { createReactComponent as E } from "@telia-ace/knowledge-widget-ui";
|
|
5
|
+
const j = (s) => {
|
|
6
|
+
const { events: b } = s.get("$widget"), [y, C] = k(b);
|
|
7
|
+
return E(
|
|
8
|
+
s,
|
|
9
|
+
"contact-list",
|
|
10
|
+
import("./contact-list-300090b9.mjs"),
|
|
11
|
+
(t) => {
|
|
12
|
+
const c = (e) => {
|
|
13
|
+
t.writeProperties({
|
|
14
|
+
loading: !0,
|
|
15
|
+
contactMethods: [],
|
|
16
|
+
categories: []
|
|
17
|
+
}), t.actions.dispatch("fetch", { params: e });
|
|
18
|
+
};
|
|
19
|
+
t.actions.create("fetch", (e) => {
|
|
20
|
+
const { submitButtonLabel: r = "Submit" } = t.properties(), i = (e.contactMethods || []).map(
|
|
21
|
+
(o) => ({
|
|
22
|
+
...o,
|
|
23
|
+
body: v(o, { submit: r })
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
return t.actions.dispatch("fetched", {
|
|
27
|
+
...e,
|
|
28
|
+
contactMethods: i,
|
|
29
|
+
loading: !0
|
|
30
|
+
});
|
|
31
|
+
}), t.actions.create("fetched", (e) => t.writeProperties({
|
|
32
|
+
...e,
|
|
33
|
+
guides: e.guides || [],
|
|
34
|
+
loading: !1
|
|
35
|
+
})), s.getAsync("router").then((e) => {
|
|
36
|
+
const { params: r } = e.getRouteData();
|
|
37
|
+
c(r);
|
|
38
|
+
}), y("router:changed", (e, { current: r }) => {
|
|
39
|
+
c(r.routeData.params);
|
|
40
|
+
}), A(s, t), I(t);
|
|
41
|
+
}
|
|
42
|
+
).then(() => x(s, "contact-list", (t) => {
|
|
43
|
+
t.actions.watch("contact-list.fetch", (c, e) => {
|
|
44
|
+
const {
|
|
45
|
+
deflection: r = {},
|
|
46
|
+
deflectionPageSize: i = 5,
|
|
47
|
+
deflectionAccordion: o
|
|
48
|
+
} = t.properties(), { params: P = {} } = c, {
|
|
49
|
+
contactCategory: n,
|
|
50
|
+
guide: d,
|
|
51
|
+
accordion: w
|
|
52
|
+
} = P;
|
|
53
|
+
return D.getInstance(s).then(
|
|
54
|
+
(u) => u.fetch(p.ContactMethodCategories, {
|
|
55
|
+
contactMethodCategoryId: n
|
|
56
|
+
}).then(({ contactMethods: h, categories: g }) => {
|
|
57
|
+
var m;
|
|
58
|
+
const f = Object.keys(r), l = f.length === 1 && !n ? f[0] : n;
|
|
59
|
+
return (m = r[l]) != null && m.length ? u.fetch(p.Guides, {
|
|
60
|
+
categories: r[l],
|
|
61
|
+
take: i
|
|
62
|
+
}).then((a) => o && d && w === t.node.name ? S(
|
|
63
|
+
a,
|
|
64
|
+
u,
|
|
65
|
+
{ guide: d }
|
|
66
|
+
) : new Promise(
|
|
67
|
+
(M) => M(a)
|
|
68
|
+
)).then(({ guides: a }) => e({ guides: a, contactMethods: h, categories: g })) : e({ contactMethods: h, categories: g });
|
|
69
|
+
})
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
})).then(() => {
|
|
73
|
+
C();
|
|
74
|
+
});
|
|
75
|
+
};
|
|
5
76
|
export {
|
|
6
|
-
|
|
77
|
+
j as default
|
|
7
78
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-components-contact-list",
|
|
3
|
-
"version": "1.1.1-rc.
|
|
3
|
+
"version": "1.1.1-rc.3",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/knowledge-widget-adapters": "^1.1.1-rc.
|
|
14
|
-
"@telia-ace/knowledge-widget-component-utilities": "^1.1.1-rc.
|
|
15
|
-
"@telia-ace/knowledge-widget-core": "^1.1.1-rc.
|
|
16
|
-
"@telia-ace/knowledge-widget-ui": "^1.1.1-rc.
|
|
17
|
-
"@telia-ace/widget-forms": "^1.1.1-rc.
|
|
18
|
-
"@telia-ace/widget-utilities": "^1.1.1-rc.
|
|
19
|
-
"@telia-ace/widget-types-grid": "^1.1.1-rc.
|
|
20
|
-
"@telia-ace/knowledge-data-client": "^1.1.1-rc.
|
|
13
|
+
"@telia-ace/knowledge-widget-adapters": "^1.1.1-rc.3",
|
|
14
|
+
"@telia-ace/knowledge-widget-component-utilities": "^1.1.1-rc.3",
|
|
15
|
+
"@telia-ace/knowledge-widget-core": "^1.1.1-rc.3",
|
|
16
|
+
"@telia-ace/knowledge-widget-ui": "^1.1.1-rc.3",
|
|
17
|
+
"@telia-ace/widget-forms": "^1.1.1-rc.3",
|
|
18
|
+
"@telia-ace/widget-utilities": "^1.1.1-rc.3",
|
|
19
|
+
"@telia-ace/widget-types-grid": "^1.1.1-rc.3",
|
|
20
|
+
"@telia-ace/knowledge-data-client": "^1.1.1-rc.3",
|
|
21
21
|
"@webprovisions/platform": "^1.1.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
package/contact-list-ab646287.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("react/jsx-runtime"),t=require("./index-0264775f.js"),m=require("react");require("react-dom");function*B(e){if(e)for(let n=0;n<e.length;n++){const o=e[n];yield o,o.items&&(yield*B(o.items))}}const Y=(e,n)=>{const o=B(n);let s=o.next(),r=null;for(;!s.done;)s.value.id===e&&(r=s.value),s=o.next();return r},k=(e,n)=>({id:e.id,type:e.type,name:e.name,branch:n||"default"}),Q=e=>e==="entering"||e==="entered",J=e=>e==="exiting"||e==="exited",T={fade:{in:"opacity: 1;",out:"opacity: 0;"},"slide-left":{in:"transform: translateX(0);",out:"transform: translateX(-100%);"},"slide-right":{in:"transform: translateX(0);",out:"transform: translateX(100%);"},"slide-up":{in:"transform: translateY(0);",out:"transform: translateY(100%);"},"slide-down":{in:"transform: translateY(0);",out:"transform: translateY(-100%);"},scale:{in:"transform: scale(1);",out:"transform: scale(0);"}},Z=["slide-up","slide-down","slide-left","slide-right","scale"],O={compose:(e="exited",n)=>{const{enter:o,exit:s}=n,r=o.transitionKeys.split(" "),i=Z.indexOf(r[0])>-1?"transform":"opacity";if(Q(e))return r&&r.length>0?t.css`
|
|
2
|
-
${r&&r.length>0&&r.map(l=>T[l]?T[l].in:"")}
|
|
3
|
-
transition: ${i} ${o.duration}ms ${o.easing};
|
|
4
|
-
`:"";const a=r&&r.length>0&&t.css`
|
|
5
|
-
${r.map(l=>T[l]?T[l].out:"")}
|
|
6
|
-
`;if(J(e)){const l=s.transitionKeys.split(" ");return l&&l.length>0&&e==="exiting"?t.css`
|
|
7
|
-
${a};
|
|
8
|
-
${l.map(c=>T[c]?T[c].out:"")}
|
|
9
|
-
transition: ${i} ${s.duration}ms ${s.easing};
|
|
10
|
-
`:a}},composeViewTransition:(e,n,o)=>{if(n==="slide")return O.compose(e,{enter:{transitionKeys:o==="forth"?"slide-right":"slide-left",duration:500},exit:{transitionKeys:o==="forth"?"slide-left":"slide-right",duration:500}});if(n==="fade")return O.compose(e,{enter:{transitionKeys:"fade",duration:500},exit:{transitionKeys:"fade",duration:500}})},get:e=>T[e]},U=(e,n)=>e.get("seoConfiguration")?d.jsx(t.Empty,{...n}):null;function ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e,n){var o=function(i){return n&&m.isValidElement(i)?n(i):i},s=Object.create(null);return e&&m.Children.map(e,function(r){return r}).forEach(function(r){s[r.key]=o(r)}),s}function te(e,n){e=e||{},n=n||{};function o(f){return f in n?n[f]:e[f]}var s=Object.create(null),r=[];for(var i in e)i in n?r.length&&(s[i]=r,r=[]):r.push(i);var a,l={};for(var c in n){if(s[c])for(a=0;a<s[c].length;a++){var u=s[c][a];l[s[c][a]]=o(u)}l[c]=o(c)}for(a=0;a<r.length;a++)l[r[a]]=o(r[a]);return l}function L(e,n,o){return o[n]!=null?o[n]:e.props[n]}function ne(e,n){return F(e.children,function(o){return m.cloneElement(o,{onExited:n.bind(null,o),in:!0,appear:L(o,"appear",e),enter:L(o,"enter",e),exit:L(o,"exit",e)})})}function oe(e,n,o){var s=F(e.children),r=te(n,s);return Object.keys(r).forEach(function(i){var a=r[i];if(m.isValidElement(a)){var l=i in n,c=i in s,u=n[i],f=m.isValidElement(u)&&!u.props.in;c&&(!l||f)?r[i]=m.cloneElement(a,{onExited:o.bind(null,a),in:!0,exit:L(a,"exit",e),enter:L(a,"enter",e)}):!c&&l&&!f?r[i]=m.cloneElement(a,{in:!1}):c&&l&&m.isValidElement(u)&&(r[i]=m.cloneElement(a,{onExited:o.bind(null,a),in:u.props.in,exit:L(a,"exit",e),enter:L(a,"enter",e)}))}}),r}var re=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},se={component:"div",childFactory:function(n){return n}},_=function(e){t._inheritsLoose(n,e);function n(s,r){var i;i=e.call(this,s,r)||this;var a=i.handleExited.bind(ee(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var o=n.prototype;return o.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},o.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(r,i){var a=i.children,l=i.handleExited,c=i.firstRender;return{children:c?ne(r,l):oe(r,a,l),firstRender:!1}},o.handleExited=function(r,i){var a=F(this.props.children);r.key in a||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(l){var c=t._extends({},l.children);return delete c[r.key],{children:c}}))},o.render=function(){var r=this.props,i=r.component,a=r.childFactory,l=t._objectWithoutPropertiesLoose(r,["component","childFactory"]),c=this.state.contextValue,u=re(this.state.children).map(a);return delete l.appear,delete l.enter,delete l.exit,i===null?m.createElement(t.TransitionGroupContext.Provider,{value:c},u):m.createElement(t.TransitionGroupContext.Provider,{value:c},m.createElement(i,l,u))},n}(m.Component);_.propTypes=process.env.NODE_ENV!=="production"?{component:t.PropTypes.any,children:t.PropTypes.node,appear:t.PropTypes.bool,enter:t.PropTypes.bool,exit:t.PropTypes.bool,childFactory:t.PropTypes.func}:{};_.defaultProps=se;const ie=_,D=()=>m.useContext(t.ComponentNodeContext),ae=()=>{const e=t.useComponentNode(),n=t.useComponentPlatform(),[o,s]=m.useState([]),r=t.useIsMounted(),i=m.useCallback(a=>{if(n&&r.current&&a){const l=n.getBranch(a),c=a.getChildren(l).map(u=>k(u));s(c)}},[r,n,s,e]);return m.useEffect(()=>{e&&i(e)},[e,n]),m.useEffect(()=>{if(n){const[a,l]=t.createEventSubscriber(n.events);return a("components:set-layout",(c,u)=>{(e===u.node.parent||u.node.parent===n.nodes.root)&&i(u.node.parent)}),a("components:node-appended",(c,u)=>{(e===u.node.parent||u.node.parent===n.nodes.root)&&i(u.node.parent)}),a("components:node-removed",(c,{parentNode:u})=>{(u===e||u===n.nodes.root)&&i(u)}),()=>{l()}}},[e,n,i]),o},ce=()=>m.useContext(t.ColumnContext),q=(e,n)=>{const o=D(),s=t.useContainer(),[r,i]=m.useState(void 0),a=t.useIsMounted(),l=e||o.type||"";return m.useEffect(()=>{if(l){let c;return(n||s).getAsync("componentResolver").then(u=>{if(a.current){const f=u.getComponent(l);i(f)}c=u.registerResolver(l,f=>{a.current&&i(f)})}),()=>{c&&c()}}},[a,l,n,s]),r},H=()=>{const e=t.useComponentPlatform(),n=D(),[o,s]=m.useState([]),[r,i]=m.useState();return m.useEffect(()=>{if(e&&n){const a=new t.ComponentQuery(e).withId(n.id),l=e.actions(a,n.type||t.uuid());i(l),o!==null&&(o.forEach(c=>{l.dispatch(c.key,c.data).then(u=>c.resolve(u)).catch(u=>c.reject(u))}),s(null))}},[e,n.id]),(a,l)=>o!==null?new Promise((c,u)=>{o.push({key:a,data:l,resolve:c,reject:u})}):r.dispatch(a,l)},le=e=>{const n=t.useComponentNode(e),o=t.useComponentPlatform(),[s,r]=m.useState({}),i=t.useIsMounted();return m.useEffect(()=>{n&&i.current&&r(n.attributes.layout)},[n,i]),m.useEffect(()=>{if(o){const a=o.events.subscribe("components:layout-changed",(l,c)=>{n===c.node&&i.current&&r(c.node.attributes.layout)});return()=>{a()}}},[o,i,n]),s},G=()=>m.useContext(t.ComponentPropertyContext);t.newStyled(t.Paragraph)`
|
|
11
|
-
${e=>{var n;return t.headingElement(e)("h1",t.css`
|
|
12
|
-
font-weight: normal;
|
|
13
|
-
font-size: ${(n=e.theme.fonts)==null?void 0:n.medium};
|
|
14
|
-
`)}}
|
|
15
|
-
`;const de=t.newStyled(t.Html)`
|
|
16
|
-
${t.genericHtml}
|
|
17
|
-
font-weight: 300;
|
|
18
|
-
line-height: 1.5em;
|
|
19
|
-
button:focus-visible {
|
|
20
|
-
${t.borderTabStyle};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
a:focus-visible {
|
|
24
|
-
${t.linkTabStyle};
|
|
25
|
-
}
|
|
26
|
-
`,ue=e=>{const n=q(e.clientName),{params:{contactCategory:o,guideCategory:s,phrase:r}}=t.useRouteData();if(typeof n>"u")return null;if(n===null)return process.env.NODE_ENV!=="production"?d.jsx(fe,{title:`client-name: ${e.clientName}, id: ${e.id}`,className:"humany-non-resolved-contact-method",children:d.jsx(t.Typography,{variant:"h5",children:"Non resolved Contact Method type"})}):null;const i=(a={})=>{const l={...e,...a},{id:c,title:u,clientName:f,symbol:p,inline:E,onClick:v=()=>{},description:b,htmlParseInstruction:g,className:x,disabled:S,guideId:j,dispatch:w=()=>{},expanded:y}=l,C=E?{onKeyDown:h=>{h.key&&h.key==="Enter"&&(v(h,l),h.defaultPrevented||!y&&w("expand",c))},onClick:h=>{v(h,l),h.defaultPrevented||!y&&w("expand",c)}}:{onClick:h=>v(h,l),routeName:"contact-method",params:t.createParams({contactCategory:o,guideId:j,guideCategory:s,phrase:r,contactMethod:c,uriName:t.formatUrl(u)})};return d.jsxs(me,{title:u,"aria-label":u,className:x,disabled:S,description:b,"data-client-name":f,...a,...C,children:[p&&d.jsx(t.SymbolBadge,{symbol:p}),b?d.jsxs("div",{className:"humany-contact-link-rich-content",children:[d.jsx(A,{children:u}),d.jsx(de,{html:b,htmlParseInstruction:g})]}):d.jsx(A,{children:u})]})};return e.expanded?d.jsx(m.Suspense,{fallback:null,children:d.jsx(n,{...e,renderDefault:i})}):i()},K=e=>{var n,o,s,r,i,a,l,c;return t.css`
|
|
27
|
-
display: flex;
|
|
28
|
-
padding: ${(n=e.theme.sizes)==null?void 0:n.large};
|
|
29
|
-
${e.description?"":"align-items: center;"}
|
|
30
|
-
text-decoration: none;
|
|
31
|
-
span {
|
|
32
|
-
display: inline-block;
|
|
33
|
-
color: ${(o=e.theme.colors)==null?void 0:o.text};
|
|
34
|
-
}
|
|
35
|
-
i {
|
|
36
|
-
font-size: ${(s=e.theme.fonts)==null?void 0:s.large};
|
|
37
|
-
margin: 0 ${(r=e.theme.sizes)==null?void 0:r.large} 0 0;
|
|
38
|
-
min-height: ${(i=e.theme.fonts)==null?void 0:i.large};
|
|
39
|
-
min-width: ${(a=e.theme.fonts)==null?void 0:a.large};
|
|
40
|
-
line-height: ${(l=e.theme.fonts)==null?void 0:l.large};
|
|
41
|
-
display: inline-block;
|
|
42
|
-
vertical-align: bottom;
|
|
43
|
-
color: ${(c=e.theme.colors)==null?void 0:c.text};
|
|
44
|
-
}
|
|
45
|
-
`},A=t.newStyled(t.StyledText)`
|
|
46
|
-
line-height: ${e=>{var n;return(n=e.theme.fonts)==null?void 0:n.large}};
|
|
47
|
-
`,me=t.newStyled(t.Link)`
|
|
48
|
-
${e=>K(e)}
|
|
49
|
-
|
|
50
|
-
&:focus-visible {
|
|
51
|
-
${t.borderTabStyle};
|
|
52
|
-
}
|
|
53
|
-
`,fe=t.newStyled.div`
|
|
54
|
-
text-align: center;
|
|
55
|
-
display: block;
|
|
56
|
-
${e=>{var n,o;return typeof((n=e.theme.colors)==null?void 0:n.warning)<"u"&&`color: ${(o=e.theme.colors)==null?void 0:o.warning};`}}
|
|
57
|
-
`,W=e=>{var n,o,s;return t.css`
|
|
58
|
-
${t.itemList(e)}
|
|
59
|
-
|
|
60
|
-
> div {
|
|
61
|
-
padding: ${(n=e.theme.sizes)==null?void 0:n.large};
|
|
62
|
-
|
|
63
|
-
${t.headingElement(e)("h1",t.css`
|
|
64
|
-
margin: 0;
|
|
65
|
-
`)}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
> ul {
|
|
69
|
-
&:not(:first-child) {
|
|
70
|
-
border-top: ${e.theme.border};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
> li {
|
|
74
|
-
margin: 0;
|
|
75
|
-
white-space: normal;
|
|
76
|
-
|
|
77
|
-
> a {
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:first-child > a {
|
|
82
|
-
border-radius: ${`${e.theme.borderRadius} ${e.theme.borderRadius} 0 0`};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&:last-child:not(:first-child) > a {
|
|
86
|
-
border-radius: ${`0 0 ${e.theme.borderRadius} ${e.theme.borderRadius}`};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&:not(:last-child) {
|
|
90
|
-
border-bottom: ${e.theme.border};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
> div {
|
|
94
|
-
padding: ${(o=e.theme.sizes)==null?void 0:o.large};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@media (hover: hover) {
|
|
100
|
-
a:hover {
|
|
101
|
-
background-color: ${(s=e.theme.colors)==null?void 0:s.accent};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`},pe=t.newStyled(t.ItemList)`
|
|
105
|
-
${e=>W(e)}
|
|
106
|
-
`,he=({contactMethods:e,children:n,guideId:o,dispatch:s,className:r="",itemRenderer:i,action:a=()=>{},header:l=""})=>e.length?d.jsx(pe,{header:l,className:t.appendClassNames(r,"humany-contact-list"),items:e,renderItem:i?c=>d.jsx("li",{"data-contact-method":c.id,children:i(c,{action:a,dispatch:s,guideId:o})},c.id):c=>d.jsx("li",{"data-contact-method":c.id,children:d.jsx(ue,{...c,action:a,dispatch:s,guideId:o})},c.id),children:n}):null;var z=(e=>(e.back="back",e.forth="forth",e))(z||{});const ye=(e,n,o)=>typeof o[e]=="number"&&typeof o[n]=="number"&&o[e]>o[n]?"back":"forth",X=({views:e,location:n,render:o})=>d.jsx(t.Switch,{location:n&&{...n,pathname:n.pathname.split("?")[0]},children:[...Object.keys(e).filter(s=>!!e[s].path),...Object.keys(e).filter(s=>!e[s].path)].map(s=>{const{path:r}=e[s];return r?Array.isArray(r)?r.map(i=>d.jsx(t.Route,{exact:!0,path:i,render:()=>o(s)},s)):d.jsx(t.Route,{exact:!0,path:r,render:()=>o(s)},s):d.jsx(t.Route,{render:()=>o(s)},s)})}),ge=t.newStyled.div`
|
|
107
|
-
position: relative;
|
|
108
|
-
width: 100%;
|
|
109
|
-
flex: 1;
|
|
110
|
-
`,xe=t.newStyled(t.Grid)`
|
|
111
|
-
position: absolute;
|
|
112
|
-
left: 0;
|
|
113
|
-
right: 0;
|
|
114
|
-
${e=>!!e.animationCss&&e.animationCss}
|
|
115
|
-
${e=>!!e.scrollableCss&&e.scrollableCss}
|
|
116
|
-
`,be={index:1,search:2,browse:3,guide:4,contact:5,"contact-method":6,conversation:7},Ce=({className:e="",...n})=>{const[o,s]=m.useState("index"),[r,i]=m.useState(z.forth),a=t.useRouteData(),l=t.useRouter(),c=G(),u=t.useContext(),f=t.useContainer(),p=t.useComponentNode(),{gap:E="0"}=u,{columns:v=1,animation:b="none",scrollable:g=!1,...x}=c,[S,j]=t.useScroll(g);if(!p||!l)return null;const{location:w}=l;a.name!==o&&a.name!==""&&b&&(i(ye(o,a.name,be)),s(a.name));const{views:y}=f.get("$settings");if(!Object.keys(y).length)return null;const C=($,P,R)=>{const N=h(P,R),M=p.getChildren($)[0];return d.jsx(xe,{...n,...x,scrollableCss:S,ref:j,columns:v,gap:E,...N,className:t.appendClassNames(e,"humany-view"),children:d.jsx(I,{id:M.id,branch:"default"})})},h=($,P)=>{if(b==="slide"||b==="fade")return{animationCss:O.composeViewTransition($,b,P),"data-state":$}};return d.jsx(ge,{className:"humany-animated-view",children:d.jsx(ie,{component:null,childFactory:$=>m.cloneElement($,{direction:r}),children:d.jsx(t.Transition,{timeout:{enter:500,exit:500},onEnter:$=>$==null?void 0:$.clientHeight,unmountOnExit:!0,direction:z.forth,children:($,{direction:P})=>d.jsx(X,{views:y,location:w,render:R=>C(R,$,P)})},o)})})},ve=t.newStyled(t.Grid)`
|
|
117
|
-
${e=>!!e.scrollableCss&&e.scrollableCss}
|
|
118
|
-
`,$e=({className:e="",...n})=>{const o=G(),s=t.useContext(),r=t.useContainer(),i=t.useComponentNode(),{views:a}=r.get("$settings"),{gap:l="0"}=s,{columns:c=1,animation:u="none",scrollable:f=!1,...p}=o,[E,v]=t.useScroll(f);return i?d.jsx(ve,{...n,...p,scrollableCss:E,ref:v,columns:c,gap:l,className:t.appendClassNames(e,"humany-view"),children:d.jsx(X,{views:a,render:b=>{const g=i.getChildren(b)[0];return d.jsx(I,{id:g.id,node:g,branch:"default"})}})}):null},V=e=>{var n,o;return t.css`
|
|
119
|
-
outline: none;
|
|
120
|
-
box-sizing: border-box;
|
|
121
|
-
* {
|
|
122
|
-
box-sizing: border-box;
|
|
123
|
-
outline: none;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
grid-column: ${e["data-indent"]?`${e["data-indent"]+1} / ${e["data-indent"]+(e["data-width"]||0)+1}`:`span ${e["data-width"]}`};
|
|
127
|
-
|
|
128
|
-
${((n=e.theme.fonts)==null?void 0:n.type)&&`
|
|
129
|
-
font-family: ${e.theme.fonts.type};
|
|
130
|
-
|
|
131
|
-
input, textarea {
|
|
132
|
-
font-family: ${e.theme.fonts.type};
|
|
133
|
-
}
|
|
134
|
-
`}
|
|
135
|
-
|
|
136
|
-
${((o=e.theme.fonts)==null?void 0:o.base)&&`
|
|
137
|
-
font-size: ${e.theme.fonts.base};
|
|
138
|
-
`}
|
|
139
|
-
|
|
140
|
-
&:focus-visible {
|
|
141
|
-
${t.paddedBorderTabStyle(e)};
|
|
142
|
-
}
|
|
143
|
-
`},Se=t.newStyled($e)`
|
|
144
|
-
${e=>V(e)}
|
|
145
|
-
`,je=t.newStyled(Ce)`
|
|
146
|
-
${e=>V(e)}
|
|
147
|
-
`,we=t.newStyled.div`
|
|
148
|
-
text-align: center;
|
|
149
|
-
${e=>{var n,o,s;return typeof((n=e.theme.colors)==null?void 0:n.warning)<"u"&&t.css`
|
|
150
|
-
color: ${(o=e.theme.colors)==null?void 0:o.warning};
|
|
151
|
-
border: 2px dashed ${(s=e.theme.colors)==null?void 0:s.warning};
|
|
152
|
-
`}}
|
|
153
|
-
${e=>typeof e.theme.borderRadius<"u"&&`border-radius: ${e.theme.borderRadius};`}
|
|
154
|
-
${e=>V(e)}
|
|
155
|
-
`,Ee=m.forwardRef(({className:e="",children:n,...o},s)=>{const r=q(),{name:i,type:a,id:l}=D(),c=m.useMemo(()=>r?t.newStyled(r)`
|
|
156
|
-
${V}
|
|
157
|
-
${t.filterCssPropsStyle}
|
|
158
|
-
`:null,[r]);return typeof r>"u"?null:r===null||c===null?process.env.NODE_ENV!=="production"?d.jsx(we,{...o,title:`type: ${a}, definition-id: ${i}, instance-id: ${l}`,className:t.appendClassNames(e,"humany-non-resolved-component"),children:d.jsx(t.Typography,{variant:"h5",children:"Non Resolved Component Type"})}):null:d.jsx(m.Suspense,{fallback:null,children:d.jsx(c,{ref:s,...o,className:t.appendClassNames(e,"humany-component",`humany-component-${i}`),children:n})})}),Ne=e=>{const n=t.useComponentNode(e),o=t.useComponentPlatform(),[s,r]=m.useState({}),i=t.useIsMounted();return m.useEffect(()=>{n&&i.current&&r(n.attributes.properties)},[n,e,i]),m.useEffect(()=>{if(o){const a=o.events.subscribe("components:properties-changed",(l,c)=>{n===c.node&&i.current&&r(c.node.attributes.properties)});return()=>{a()}}},[o,i,e,n]),s},Pe=(e,n)=>n?!0:typeof e=="string"?e==="full":e>0,I=m.forwardRef(({className:e="",id:n,branch:o,node:s,ariaLabel:r,tabIndex:i,context:a,...l},c)=>{const u=t.useComponentPlatform(),f=t.useContainer(),[p,E]=m.useState(),v=ce(),b=t.useContext(n),g=Ne(n),{size:x="none",indent:S=0}=le(n),j=Pe(x,s);if(m.useEffect(()=>{if(u){if(n&&!s){const N=u.nodes.get(n);if(N&&(E(k(N,o)),j)){const M=N.mount(f);return()=>{M()}}}else if(s){E(k(s,o));const N=s.mount(f);return()=>{N()}}}},[u,n,s,j]),!p||!j)return null;const w={...b,...a||{}},{cardinal:y,fonts:C={},accessibility:h={},...$}=w,P={type:C.type,base:C.base||"16px",small:C.small||"0.8em",normal:C.normal||"1em",medium:C.medium||"1.2em",large:C.large||"1.6em",huge:C.huge||"2.5em"},R={...$,fonts:P,accessibility:{...h}};return typeof y=="number"&&(R.sizes={cardinal:y,small:`${y}px`,normal:`${y*3}px`,medium:`${y*5}px`,large:`${y*8}px`}),d.jsx(t.ThemeProvider,{theme:R,children:d.jsx(t.ComponentNodeContext.Provider,{value:p,children:d.jsx(t.ComponentPropertyContext.Provider,{value:g,children:(()=>{const N={"data-width":x==="full"?v:Math.min(x,v),"data-indent":S,"data-name":p.name,"data-node-id":p.id,"data-component-type":p.type,"aria-label":r,tabIndex:i,id:p.id,role:g&&g.role,...l};switch(p.type){case"view":return typeof g.animation=="string"&&g.animation!=="none"?d.jsx(je,{...N,className:e}):d.jsx(Se,{...N,className:e});default:{const M=t.filterCssProps(g);return d.jsx(Ee,{ref:c,...N,...M,className:e})}}})()})})})});m.lazy(()=>Promise.resolve().then(()=>require("./detached-component-61ba6bf4.js")));const Te=({className:e,guides:n,header:o,accordion:s,loading:r,route:i="guide",categoryTitle:a,...l})=>{const{name:c,params:{contactCategory:u=0,guide:f}}=t.useRouteData(),{name:p}=D(),E=t.useContainer(),v=ae(),b=H(),g=m.useCallback((x,S,j,w)=>{const{id:y,title:C}=x;return s&&f===y?d.jsx(t.AccordionListItem,{id:y,title:C,route:c,collapseUri:a&&t.formatUrl(a),children:v.map(h=>d.jsx(I,{id:h.id,branch:"default",accordion:s},h.id))},y):w?w(x,S,j,w):null},[s,v,f]);return!n.length&&!r?U(E,{...l,className:t.appendClassNames(e,"humany-deflection-list")}):d.jsx(Le,{...l,"data-loading":r,className:t.appendClassNames(e,"humany-deflection-list"),items:n,header:o,expandable:!!s,renderItem:g,dispatch:b,routing:{guide:i},paramMappers:{guide:({id:x,title:S})=>t.createParams({contactCategory:u,guide:x,accordion:s?p:void 0,uriName:t.formatUrl(S)})},children:d.jsx(t.Loader,{loading:r})})},Le=t.newStyled(t.GuideList)`
|
|
159
|
-
${t.contentBox}
|
|
160
|
-
${t.loadingOpacity}
|
|
161
|
-
`,Re=t.newStyled(he)`
|
|
162
|
-
${t.loadingOpacity}
|
|
163
|
-
${t.contentBox}
|
|
164
|
-
`,Me=t.newStyled(t.ItemList)`
|
|
165
|
-
${e=>t.loadingOpacity(e)}
|
|
166
|
-
${t.contentBox}
|
|
167
|
-
${W}
|
|
168
|
-
|
|
169
|
-
&& {
|
|
170
|
-
i {
|
|
171
|
-
font-size: 25px;
|
|
172
|
-
width: 1.28571429em;
|
|
173
|
-
text-align: center;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
`,De=t.newStyled(t.Link)`
|
|
177
|
-
&:focus-visible {
|
|
178
|
-
${t.borderTabStyle};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
${K}
|
|
182
|
-
`,Ve=t.newStyled.div`
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-direction: column;
|
|
185
|
-
gap: ${e=>{var n;return(n=e.theme.sizes)==null?void 0:n.normal}};
|
|
186
|
-
`,Ie=t.newStyled(t.StyledText)`
|
|
187
|
-
font-weight: bold;
|
|
188
|
-
`,ke=({className:e,...n})=>{const o=H(),s=t.useContainer(),r=t.useRouteData(),{deflectionHeader:i="",routes:a={},contactMethods:l=[],categories:c=[],guides:u=[],deflectionAccordion:f=!1,loading:p=!1}=G(),{contactCategory:E,guide:v="guide"}=a;if(!c.length&&!l.length&&!p)return U(s,{...n,className:t.appendClassNames(e,"humany-contact-category-list")});const{name:b,params:{contactCategory:g}}=r,x=Y(g,c);return l.length?d.jsxs(d.Fragment,{children:[d.jsx(Te,{className:e,guides:u,categoryTitle:x&&x.title,header:i,route:v,accordion:f,loading:p}),d.jsx(Re,{"data-loading":p,className:e,contactMethods:l,dispatch:o,children:d.jsx(t.Loader,{loading:p})})]}):d.jsx(Me,{...n,"data-loading":p,className:t.appendClassNames(e,"humany-contact-category-list"),items:x&&x.items||c,renderItem:({id:S,title:j,symbol:w,matches:y,items:C,description:h})=>y||C&&C.length?d.jsx("li",{"data-contact-category":S,children:d.jsxs(De,{routeName:E||b,params:t.createParams({contactCategory:S,uriName:t.formatUrl(j)}),children:[w&&d.jsx(t.SymbolBadge,{symbol:w}),h!=null&&h.length?d.jsxs(Ve,{children:[d.jsx(Ie,{children:j}),d.jsx(t.StyledText,{children:h})]}):d.jsx(t.StyledText,{children:j})]})},S):null,children:d.jsx(t.Loader,{loading:p})})},Oe=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));exports.Component=I;exports.contactList=Oe;
|