@telia-ace/knowledge-widget-components-contact-list 1.0.15 → 1.0.18
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/contact-list.c6d26333.js +172 -0
- package/dist/contact-list.c6d26333.js.map +1 -0
- package/dist/index.js +61 -93
- package/dist/index.js.map +1 -1
- package/package.json +13 -9
- package/dist/contact-list.js +0 -201
- package/dist/contact-list.js.map +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var q = Object.defineProperty, J = Object.defineProperties;
|
|
2
|
+
var K = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var $ = Object.getOwnPropertySymbols;
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var U = (t, e, a) => e in t ? q(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, g = (t, e) => {
|
|
6
|
+
for (var a in e || (e = {}))
|
|
7
|
+
v.call(e, a) && U(t, a, e[a]);
|
|
8
|
+
if ($)
|
|
9
|
+
for (var a of $(e))
|
|
10
|
+
w.call(e, a) && U(t, a, e[a]);
|
|
11
|
+
return t;
|
|
12
|
+
}, p = (t, e) => J(t, K(e));
|
|
13
|
+
var B = (t, e) => {
|
|
14
|
+
var a = {};
|
|
15
|
+
for (var n in t)
|
|
16
|
+
v.call(t, n) && e.indexOf(n) < 0 && (a[n] = t[n]);
|
|
17
|
+
if (t != null && $)
|
|
18
|
+
for (var n of $(t))
|
|
19
|
+
e.indexOf(n) < 0 && w.call(t, n) && (a[n] = t[n]);
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
import { ContactList as Q, contactItemList as V, contactLink as W } from "@telia-ace/knowledge-widget-adapters";
|
|
23
|
+
import { GuideList as X, contentBox as A, loadingOpacity as M, useRouteData as z, useComponentDescriptor as Y, useContainer as F, useChildren as Z, useDispatch as H, AccordionListItem as _, createEmptyComponent as O, Loader as G, ItemList as tt, Link as et, borderTabStyle as nt, useProperties as at, SymbolBadge as ot, StyledText as ct } from "@telia-ace/knowledge-widget-ui";
|
|
24
|
+
import { formatUrl as T, appendClassNames as b, createParams as j, findCategoryById as rt } from "@telia-ace/widget-utilities";
|
|
25
|
+
import o, { useCallback as it } from "react";
|
|
26
|
+
import I from "styled-components";
|
|
27
|
+
import { Component as st } from "@telia-ace/knowledge-widget-types-grid";
|
|
28
|
+
const mt = (P) => {
|
|
29
|
+
var s = P, {
|
|
30
|
+
className: t,
|
|
31
|
+
guides: e,
|
|
32
|
+
header: a,
|
|
33
|
+
accordion: n,
|
|
34
|
+
loading: l,
|
|
35
|
+
route: k = "guide",
|
|
36
|
+
categoryTitle: y
|
|
37
|
+
} = s, f = B(s, [
|
|
38
|
+
"className",
|
|
39
|
+
"guides",
|
|
40
|
+
"header",
|
|
41
|
+
"accordion",
|
|
42
|
+
"loading",
|
|
43
|
+
"route",
|
|
44
|
+
"categoryTitle"
|
|
45
|
+
]);
|
|
46
|
+
const {
|
|
47
|
+
name: d,
|
|
48
|
+
params: { contactCategory: S = 0, guide: C }
|
|
49
|
+
} = z(), { name: r } = Y(), x = F(), h = Z(), N = H(), D = it((c, i, E, m) => {
|
|
50
|
+
const { id: u, title: L } = c;
|
|
51
|
+
return n && C === u ? /* @__PURE__ */ o.createElement(_, {
|
|
52
|
+
key: u,
|
|
53
|
+
id: u,
|
|
54
|
+
title: L,
|
|
55
|
+
route: d,
|
|
56
|
+
collapseUri: y && T(y)
|
|
57
|
+
}, h.map((R) => /* @__PURE__ */ o.createElement(st, {
|
|
58
|
+
key: R.id,
|
|
59
|
+
id: R.id,
|
|
60
|
+
branch: "default",
|
|
61
|
+
accordion: n
|
|
62
|
+
}))) : m ? m(c, i, E, m) : null;
|
|
63
|
+
}, [n, h, C]);
|
|
64
|
+
return !e.length && !l ? O(x, p(g({}, f), {
|
|
65
|
+
className: b(t, "humany-deflection-list")
|
|
66
|
+
})) : /* @__PURE__ */ o.createElement(lt, p(g({}, f), {
|
|
67
|
+
"data-loading": l,
|
|
68
|
+
className: b(t, "humany-deflection-list"),
|
|
69
|
+
items: e,
|
|
70
|
+
header: a,
|
|
71
|
+
expandable: !!n,
|
|
72
|
+
renderItem: D,
|
|
73
|
+
dispatch: N,
|
|
74
|
+
routing: {
|
|
75
|
+
guide: k
|
|
76
|
+
},
|
|
77
|
+
paramMappers: {
|
|
78
|
+
guide: ({ id: c, title: i }) => j({
|
|
79
|
+
contactCategory: S,
|
|
80
|
+
guide: c,
|
|
81
|
+
accordion: n ? r : void 0,
|
|
82
|
+
uriName: T(i)
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
}), /* @__PURE__ */ o.createElement(G, {
|
|
86
|
+
loading: l
|
|
87
|
+
}));
|
|
88
|
+
}, lt = I(X)`
|
|
89
|
+
${A}
|
|
90
|
+
${M}
|
|
91
|
+
`, dt = I(Q)`
|
|
92
|
+
${M}
|
|
93
|
+
${A}
|
|
94
|
+
`, ut = I(tt)`
|
|
95
|
+
${M}
|
|
96
|
+
${A}
|
|
97
|
+
${V}
|
|
98
|
+
|
|
99
|
+
&& {
|
|
100
|
+
i {
|
|
101
|
+
font-size: 25px;
|
|
102
|
+
width: 1.28571429em;
|
|
103
|
+
text-align: center;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`, gt = I(et)`
|
|
107
|
+
&:focus {
|
|
108
|
+
${(t) => {
|
|
109
|
+
var e;
|
|
110
|
+
return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && nt;
|
|
111
|
+
}};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
${W}
|
|
115
|
+
`, $t = (a) => {
|
|
116
|
+
var n = a, { className: t } = n, e = B(n, ["className"]);
|
|
117
|
+
const l = H(), k = F(), y = z(), {
|
|
118
|
+
deflectionHeader: f = "",
|
|
119
|
+
routes: P = {},
|
|
120
|
+
contactMethods: s = [],
|
|
121
|
+
categories: d = [],
|
|
122
|
+
guides: S = [],
|
|
123
|
+
deflectionAccordion: C = !1,
|
|
124
|
+
loading: r = !1
|
|
125
|
+
} = at(), { contactCategory: x, guide: h = "guide" } = P;
|
|
126
|
+
if (!d.length && !s.length && !r)
|
|
127
|
+
return O(k, p(g({}, e), {
|
|
128
|
+
className: b(t, "humany-contact-category-list")
|
|
129
|
+
}));
|
|
130
|
+
const {
|
|
131
|
+
name: N,
|
|
132
|
+
params: { contactCategory: D }
|
|
133
|
+
} = y, c = rt(D, d);
|
|
134
|
+
return s.length ? /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(mt, {
|
|
135
|
+
className: t,
|
|
136
|
+
guides: S,
|
|
137
|
+
categoryTitle: c && c.title,
|
|
138
|
+
header: f,
|
|
139
|
+
route: h,
|
|
140
|
+
accordion: C,
|
|
141
|
+
loading: r
|
|
142
|
+
}), /* @__PURE__ */ o.createElement(dt, {
|
|
143
|
+
"data-loading": r,
|
|
144
|
+
className: t,
|
|
145
|
+
contactMethods: s,
|
|
146
|
+
dispatch: l
|
|
147
|
+
}, /* @__PURE__ */ o.createElement(G, {
|
|
148
|
+
loading: r
|
|
149
|
+
}))) : /* @__PURE__ */ o.createElement(ut, p(g({}, e), {
|
|
150
|
+
"data-loading": r,
|
|
151
|
+
className: b(t, "humany-contact-category-list"),
|
|
152
|
+
items: c && c.items || d,
|
|
153
|
+
renderItem: ({ id: i, title: E, symbol: m, matches: u, items: L }) => !!u || L && !!L.length ? /* @__PURE__ */ o.createElement("li", {
|
|
154
|
+
key: i,
|
|
155
|
+
"data-contact-category": i
|
|
156
|
+
}, /* @__PURE__ */ o.createElement(gt, {
|
|
157
|
+
routeName: x || N,
|
|
158
|
+
params: j({
|
|
159
|
+
contactCategory: i,
|
|
160
|
+
uriName: T(E)
|
|
161
|
+
})
|
|
162
|
+
}, m && /* @__PURE__ */ o.createElement(ot, {
|
|
163
|
+
symbol: m
|
|
164
|
+
}), /* @__PURE__ */ o.createElement(ct, null, E))) : null
|
|
165
|
+
}), /* @__PURE__ */ o.createElement(G, {
|
|
166
|
+
loading: r
|
|
167
|
+
}));
|
|
168
|
+
};
|
|
169
|
+
export {
|
|
170
|
+
$t as default
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=contact-list.c6d26333.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-list.c6d26333.js","sources":["../src/deflection-list.tsx","../src/contact-list.tsx"],"sourcesContent":["import { Guide } from '@telia-ace/knowledge-widget-core';\r\nimport { Component } from '@telia-ace/knowledge-widget-types-grid';\r\nimport {\r\n AccordionListItem,\r\n contentBox,\r\n createEmptyComponent,\r\n GuideList,\r\n ItemRenderer,\r\n Loader,\r\n loadingOpacity,\r\n useChildren,\r\n useComponentDescriptor,\r\n useContainer,\r\n useDispatch,\r\n useRouteData,\r\n} from '@telia-ace/knowledge-widget-ui';\r\nimport { appendClassNames, createParams, formatUrl } from '@telia-ace/widget-utilities';\r\nimport React, { useCallback } from 'react';\r\nimport styled from 'styled-components';\r\n\r\ntype Props = {\r\n className: string;\r\n guides: Guide[];\r\n header: string;\r\n accordion?: boolean;\r\n route?: string;\r\n loading: boolean;\r\n categoryTitle?: string;\r\n};\r\n\r\nconst DeflectionList: React.SFC<Props> = ({\r\n className,\r\n guides,\r\n header,\r\n accordion,\r\n loading,\r\n route = 'guide',\r\n categoryTitle,\r\n ...other\r\n}) => {\r\n const {\r\n name: routeName,\r\n params: { contactCategory = 0, guide: currentGuideId },\r\n } = useRouteData();\r\n const { name: componentName } = useComponentDescriptor();\r\n const container = useContainer();\r\n const children = useChildren();\r\n const dispatch = useDispatch();\r\n\r\n const renderItem: ItemRenderer = useCallback(\r\n (guide, index, items, defaultRenderer) => {\r\n const { id, title } = guide;\r\n if (accordion && currentGuideId === id) {\r\n return (\r\n <AccordionListItem\r\n key={id}\r\n id={id}\r\n title={title}\r\n route={routeName}\r\n collapseUri={categoryTitle && formatUrl(categoryTitle)}\r\n >\r\n {children.map((child) => (\r\n <Component\r\n key={child.id}\r\n id={child.id}\r\n branch=\"default\"\r\n {...{ accordion }}\r\n />\r\n ))}\r\n </AccordionListItem>\r\n );\r\n }\r\n\r\n return defaultRenderer ? defaultRenderer(guide, index, items, defaultRenderer) : null;\r\n },\r\n [accordion, children, currentGuideId]\r\n );\r\n\r\n if (!guides.length && !loading) {\r\n return createEmptyComponent(container, {\r\n ...other,\r\n className: appendClassNames(className, 'humany-deflection-list'),\r\n });\r\n }\r\n\r\n return (\r\n <StyledGuideList\r\n {...other}\r\n data-loading={loading}\r\n className={appendClassNames(className, 'humany-deflection-list')}\r\n items={guides}\r\n header={header}\r\n expandable={!!accordion}\r\n renderItem={renderItem}\r\n dispatch={dispatch}\r\n routing={{\r\n guide: route,\r\n }}\r\n paramMappers={{\r\n guide: ({ id, title }: Guide) =>\r\n createParams({\r\n contactCategory,\r\n guide: id,\r\n accordion: accordion ? componentName : undefined,\r\n uriName: formatUrl(title),\r\n }),\r\n }}\r\n >\r\n <Loader loading={loading} />\r\n </StyledGuideList>\r\n );\r\n};\r\n\r\nconst StyledGuideList = styled(GuideList)<{ 'data-loading': boolean } & any>`\r\n ${contentBox}\r\n ${loadingOpacity}\r\n`;\r\n\r\nexport default DeflectionList;\r\n","import {\r\n contactItemList,\r\n contactLink,\r\n ContactList as ContactListUi,\r\n} from '@telia-ace/knowledge-widget-adapters';\r\nimport { Category } from '@telia-ace/knowledge-widget-core';\r\nimport {\r\n borderTabStyle,\r\n contentBox,\r\n createEmptyComponent,\r\n ItemList,\r\n Link,\r\n Loader,\r\n loadingOpacity,\r\n StyledText,\r\n SymbolBadge,\r\n useContainer,\r\n useDispatch,\r\n useProperties,\r\n useRouteData,\r\n} from '@telia-ace/knowledge-widget-ui';\r\nimport {\r\n appendClassNames,\r\n createParams,\r\n findCategoryById,\r\n formatUrl,\r\n} from '@telia-ace/widget-utilities';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { ContactListComponentProps } from './contact-list-component';\r\nimport DeflectionList from './deflection-list';\r\n\r\nconst StyledContactList = styled(ContactListUi)<any>`\r\n ${loadingOpacity}\r\n ${contentBox}\r\n`;\r\n\r\nconst StyledItemList = styled(ItemList)<any>`\r\n ${loadingOpacity}\r\n ${contentBox}\r\n ${contactItemList}\r\n\r\n && {\r\n i {\r\n font-size: 25px;\r\n width: 1.28571429em;\r\n text-align: center;\r\n }\r\n }\r\n`;\r\n\r\nconst StyledLink = styled(Link)<any>`\r\n &:focus {\r\n ${(p) => p.theme.accessibility?.isTabbing && borderTabStyle};\r\n }\r\n\r\n ${contactLink}\r\n`;\r\n\r\ntype Props = {\r\n className: string;\r\n};\r\n\r\nconst ContactList: React.SFC<Props> = ({ className, ...other }) => {\r\n const dispatch = useDispatch();\r\n const container = useContainer();\r\n const routeData = useRouteData();\r\n const {\r\n deflectionHeader = '',\r\n routes = {},\r\n contactMethods = [],\r\n categories = [],\r\n guides = [],\r\n deflectionAccordion = false,\r\n loading = false,\r\n } = useProperties<ContactListComponentProps>();\r\n\r\n const { contactCategory: contactCategoryRoute, guide: guideRoute = 'guide' } = routes;\r\n\r\n if (!categories.length && !contactMethods.length && !loading) {\r\n return createEmptyComponent(container, {\r\n ...other,\r\n className: appendClassNames(className, 'humany-contact-category-list'),\r\n });\r\n }\r\n\r\n const {\r\n name,\r\n params: { contactCategory },\r\n } = routeData;\r\n\r\n const selectedCategory: Category = findCategoryById(contactCategory, categories);\r\n\r\n return !contactMethods.length ? (\r\n <StyledItemList\r\n {...other}\r\n data-loading={loading}\r\n className={appendClassNames(className, 'humany-contact-category-list')}\r\n items={(selectedCategory && selectedCategory.items) || categories}\r\n renderItem={({ id, title, symbol, matches, items }: Category) =>\r\n !!matches || (items && !!items.length) ? (\r\n <li key={id} data-contact-category={id}>\r\n <StyledLink\r\n routeName={contactCategoryRoute || name}\r\n params={createParams({\r\n contactCategory: id,\r\n uriName: formatUrl(title),\r\n })}\r\n >\r\n {symbol && <SymbolBadge symbol={symbol} />}\r\n <StyledText>{title}</StyledText>\r\n </StyledLink>\r\n </li>\r\n ) : null\r\n }\r\n >\r\n <Loader loading={loading} />\r\n </StyledItemList>\r\n ) : (\r\n <>\r\n <DeflectionList\r\n className={className}\r\n guides={guides}\r\n categoryTitle={selectedCategory && selectedCategory.title}\r\n header={deflectionHeader}\r\n route={guideRoute}\r\n accordion={deflectionAccordion}\r\n loading={loading}\r\n />\r\n <StyledContactList\r\n data-loading={loading}\r\n className={className}\r\n contactMethods={contactMethods}\r\n dispatch={dispatch}\r\n >\r\n <Loader loading={loading} />\r\n </StyledContactList>\r\n </>\r\n );\r\n};\r\n\r\nexport default ContactList;\r\n"],"names":["ContactListUi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,KAAmC,CAAC,MASpC;AAToC,aACtC;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAQ;AAAA,IACR;AAAA,MAPsC,GAQnC,MARmC,GAQnC;AAAA,IAPH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGM,QAAA;AAAA,IACF,MAAM;AAAA,IACN,QAAQ,EAAE,qBAAkB,GAAG,OAAO;AAAA,MACtC,EAAa,GACX,EAAE,MAAM,MAAkB,EAAuB,GACjD,IAAY,KACZ,IAAW,KACX,IAAW,KAEX,IAA2B,GAC7B,CAAC,GAAO,GAAO,GAAO,MAAoB;AAChC,UAAA,EAAE,OAAI,aAAU;AAClB,WAAA,KAAa,MAAmB,IAE3B,kBAAA,cAAA,GAAA;AAAA,MACG,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP,aAAa,KAAiB,EAAU,CAAa;AAAA,IAAA,GAEpD,EAAS,IAAI,CAAC,MACV,kBAAA,cAAA,IAAA;AAAA,MACG,KAAK,EAAM;AAAA,MACX,IAAI,EAAM;AAAA,MACV,QAAO;AAAA,MACD;AAAA,IACV,CAAA,CACH,CACL,IAID,IAAkB,E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;AAAA,IAAA,GAEA,KAAW,kBAAA,cAAA,IAAA;AAAA,MAAY;AAAA,IAAA,CAAgB,GACvC,kBAAA,cAAA,IAAA,MAAY,CAAM,CACvB,CACJ,IACA;AAAA,EAAA,IAGP,kBAAA,cAAA,GAAA;AAAA,IAAO;AAAA,EAAA,CAAkB,CAC9B;AAsBR;"}
|
package/dist/index.js
CHANGED
|
@@ -1,101 +1,69 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import { DataType } from "@telia-ace/knowledge-widget-types-grid";
|
|
23
|
-
import { createReactComponent } from "@telia-ace/knowledge-widget-ui";
|
|
24
|
-
const ContactListComponent = (container) => {
|
|
25
|
-
const { events } = container.get("$widget");
|
|
26
|
-
const [subscribe, unsubscribe] = createEventSubscriber(events);
|
|
27
|
-
return createReactComponent(container, "contact-list", import("./contact-list.js"), (component) => {
|
|
28
|
-
const fetch = (params) => {
|
|
29
|
-
component.writeProperties({ loading: true, contactMethods: [], categories: [] });
|
|
30
|
-
component.actions.dispatch("fetch", { params });
|
|
1
|
+
var k = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
+
var E = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var P = Object.getOwnPropertySymbols;
|
|
4
|
+
var F = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var w = (t, e, c) => e in t ? k(t, e, { enumerable: !0, configurable: !0, writable: !0, value: c }) : t[e] = c, u = (t, e) => {
|
|
6
|
+
for (var c in e || (e = {}))
|
|
7
|
+
F.call(e, c) && w(t, c, e[c]);
|
|
8
|
+
if (P)
|
|
9
|
+
for (var c of P(e))
|
|
10
|
+
G.call(e, c) && w(t, c, e[c]);
|
|
11
|
+
return t;
|
|
12
|
+
}, d = (t, e) => x(t, E(e));
|
|
13
|
+
import { updateForm as I, useForm as L, useExpand as R, fetchAccordionGuideIfMissing as j } from "@telia-ace/knowledge-widget-component-utilities";
|
|
14
|
+
import { createEventSubscriber as z, extendComponent as B } from "@telia-ace/knowledge-widget-core";
|
|
15
|
+
import { DataType as M } from "@telia-ace/knowledge-widget-types-grid";
|
|
16
|
+
import { createReactComponent as K } from "@telia-ace/knowledge-widget-ui";
|
|
17
|
+
const J = (t) => {
|
|
18
|
+
const { events: e } = t.get("$widget"), [c, A] = z(e);
|
|
19
|
+
return K(t, "contact-list", import("./contact-list.c6d26333.js"), (r) => {
|
|
20
|
+
const a = (s) => {
|
|
21
|
+
r.writeProperties({ loading: !0, contactMethods: [], categories: [] }), r.actions.dispatch("fetch", { params: s });
|
|
31
22
|
};
|
|
32
|
-
|
|
33
|
-
const { submitButtonLabel = "Submit" } =
|
|
34
|
-
|
|
35
|
-
body: updateForm(cm, { submit: submitButtonLabel })
|
|
23
|
+
r.actions.create("fetch", (s) => {
|
|
24
|
+
const { submitButtonLabel: o = "Submit" } = r.properties(), h = (s.contactMethods || []).map((i) => d(u({}, i), {
|
|
25
|
+
body: I(i, { submit: o })
|
|
36
26
|
}));
|
|
37
|
-
return
|
|
38
|
-
contactMethods,
|
|
39
|
-
loading:
|
|
27
|
+
return r.actions.dispatch("fetched", d(u({}, s), {
|
|
28
|
+
contactMethods: h,
|
|
29
|
+
loading: !0
|
|
40
30
|
}));
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
}), r.actions.create("fetched", (s) => r.writeProperties(d(u({}, s), {
|
|
32
|
+
guides: s.guides || [],
|
|
33
|
+
loading: !1
|
|
34
|
+
}))), t.getAsync("router").then((s) => {
|
|
35
|
+
const { params: o } = s.getRouteData();
|
|
36
|
+
a(o);
|
|
37
|
+
}), c("router:changed", (s, { current: o }) => {
|
|
38
|
+
a(o.routeData.params);
|
|
39
|
+
}), L(t, r), R(r);
|
|
40
|
+
}).then(() => B(t, "contact-list", (r) => {
|
|
41
|
+
r.actions.watch("contact-list.fetch", (a, s) => {
|
|
42
|
+
const {
|
|
43
|
+
deflection: o = {},
|
|
44
|
+
deflectionPageSize: h = 5,
|
|
45
|
+
deflectionAccordion: i
|
|
46
|
+
} = r.properties(), { params: v = {} } = a, {
|
|
47
|
+
contactCategory: g,
|
|
48
|
+
guide: l,
|
|
49
|
+
accordion: D
|
|
50
|
+
} = v;
|
|
51
|
+
return t.getAsync("dataClient").then((f) => f.fetch(M.ContactMethodCategories, {
|
|
52
|
+
contactMethodCategoryId: g
|
|
53
|
+
}).then(({ contactMethods: m, categories: p }) => {
|
|
54
|
+
var C;
|
|
55
|
+
const b = Object.keys(o), y = b.length === 1 && !g ? b[0] : g;
|
|
56
|
+
return (C = o[y]) != null && C.length ? f.fetch(M.Guides, {
|
|
57
|
+
categories: o[y],
|
|
58
|
+
take: h
|
|
59
|
+
}).then((n) => i && l && D === r.node.name ? j(n, f, { guide: l }) : new Promise((S) => S(n))).then(({ guides: n }) => s({ guides: n, contactMethods: m, categories: p })) : s({ contactMethods: m, categories: p });
|
|
46
60
|
}));
|
|
47
61
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
fetch(params);
|
|
51
|
-
});
|
|
52
|
-
subscribe("router:changed", (event, { current }) => {
|
|
53
|
-
fetch(current.routeData.params);
|
|
54
|
-
});
|
|
55
|
-
useForm(container, component);
|
|
56
|
-
useExpand(component);
|
|
57
|
-
}).then(() => {
|
|
58
|
-
return extendComponent(container, "contact-list", (component) => {
|
|
59
|
-
component.actions.watch("contact-list.fetch", (input, next) => {
|
|
60
|
-
const {
|
|
61
|
-
deflection = {},
|
|
62
|
-
deflectionPageSize = 5,
|
|
63
|
-
deflectionAccordion
|
|
64
|
-
} = component.properties();
|
|
65
|
-
const { params = {} } = input;
|
|
66
|
-
const {
|
|
67
|
-
contactCategory,
|
|
68
|
-
guide: guideParam,
|
|
69
|
-
accordion: accordionParam
|
|
70
|
-
} = params;
|
|
71
|
-
return container.getAsync("dataClient").then((dataClient) => {
|
|
72
|
-
return dataClient.fetch(DataType.ContactMethodCategories, {
|
|
73
|
-
contactMethodCategoryId: contactCategory
|
|
74
|
-
}).then(({ contactMethods, categories }) => {
|
|
75
|
-
var _a;
|
|
76
|
-
const deflectionKeys = Object.keys(deflection);
|
|
77
|
-
const currentCategory = deflectionKeys.length === 1 && !contactCategory ? deflectionKeys[0] : contactCategory;
|
|
78
|
-
if ((_a = deflection[currentCategory]) == null ? void 0 : _a.length) {
|
|
79
|
-
return dataClient.fetch(DataType.Guides, {
|
|
80
|
-
categories: deflection[currentCategory],
|
|
81
|
-
take: deflectionPageSize
|
|
82
|
-
}).then((data) => {
|
|
83
|
-
if (deflectionAccordion && guideParam && accordionParam === component.node.name) {
|
|
84
|
-
return fetchAccordionGuideIfMissing(data, dataClient, { guide: guideParam });
|
|
85
|
-
}
|
|
86
|
-
return new Promise((resolve) => resolve(data));
|
|
87
|
-
}).then(({ guides }) => {
|
|
88
|
-
return next({ guides, contactMethods, categories });
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
return next({ contactMethods, categories });
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}).then(() => {
|
|
97
|
-
unsubscribe();
|
|
62
|
+
})).then(() => {
|
|
63
|
+
A();
|
|
98
64
|
});
|
|
99
65
|
};
|
|
100
|
-
export {
|
|
66
|
+
export {
|
|
67
|
+
J as default
|
|
68
|
+
};
|
|
101
69
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/contact-list-component.ts"],"sourcesContent":["import { ContactMethodType } from '@telia-ace/knowledge-widget-adapters';\r\nimport {\r\n fetchAccordionGuideIfMissing,\r\n updateForm,\r\n useExpand,\r\n useForm,\r\n} from '@telia-ace/knowledge-widget-component-utilities';\r\nimport {\r\n Category,\r\n createEventSubscriber,\r\n extendComponent,\r\n Guide,\r\n} from '@telia-ace/knowledge-widget-core';\r\nimport {\r\n ContactsResult,\r\n DataClient,\r\n DataType,\r\n MatchResult,\r\n} from '@telia-ace/knowledge-widget-types-grid';\r\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\r\nimport { FormComponentInstanceProperties } from '@telia-ace/widget-forms';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type ContactListComponentProps = {\r\n deflectionHeader?: string;\r\n deflection?: { [contactCategoryId: string]: string[] };\r\n deflectionPageSize?: number;\r\n routes?: {\r\n contactCategory?: string;\r\n guide?: string;\r\n };\r\n categories?: Category[]; // internal\r\n contactMethods?: ContactMethodType[]; // internal\r\n guides?: Guide[]; // internal\r\n deflectionAccordion?: boolean;\r\n} & FormComponentInstanceProperties;\r\n\r\nexport const ContactListComponent = (container: Container) => {\r\n const { events } = container.get('$widget');\r\n const [subscribe, unsubscribe] = createEventSubscriber(events);\r\n\r\n return createReactComponent(\r\n container,\r\n 'contact-list',\r\n import('./contact-list'),\r\n (component) => {\r\n const fetch = (params: { [key: string]: any }) => {\r\n component.writeProperties({ loading: true, contactMethods: [], categories: [] });\r\n component.actions.dispatch('fetch', { params });\r\n };\r\n\r\n component.actions.create('fetch', (data) => {\r\n const { submitButtonLabel = 'Submit' } =\r\n component.properties<ContactListComponentProps>();\r\n\r\n const contactMethods = (data.contactMethods || []).map((cm: ContactMethodType) => ({\r\n ...cm,\r\n body: updateForm(cm, { submit: submitButtonLabel }),\r\n }));\r\n\r\n return component.actions.dispatch('fetched', {\r\n ...data,\r\n contactMethods,\r\n loading: true,\r\n });\r\n });\r\n\r\n component.actions.create('fetched', (input) => {\r\n return component.writeProperties({\r\n ...input,\r\n guides: input.guides || [],\r\n loading: false,\r\n });\r\n });\r\n\r\n container.getAsync('router').then((router) => {\r\n const { params } = router.getRouteData();\r\n fetch(params);\r\n });\r\n\r\n subscribe('router:changed', (event: any, { current }: any) => {\r\n fetch(current.routeData.params);\r\n });\r\n\r\n useForm(container, component);\r\n useExpand(component);\r\n }\r\n )\r\n .then(() => {\r\n return extendComponent(container, 'contact-list', (component) => {\r\n component.actions.watch('contact-list.fetch', (input, next) => {\r\n const {\r\n deflection = {},\r\n deflectionPageSize = 5,\r\n deflectionAccordion,\r\n } = component.properties<ContactListComponentProps>();\r\n const { params = {} } = input;\r\n const {\r\n contactCategory,\r\n guide: guideParam,\r\n accordion: accordionParam,\r\n } = params;\r\n return container.getAsync('dataClient').then((dataClient: DataClient) => {\r\n return dataClient\r\n .fetch(DataType.ContactMethodCategories, {\r\n contactMethodCategoryId: contactCategory,\r\n })\r\n .then(({ contactMethods, categories }: ContactsResult) => {\r\n const deflectionKeys = Object.keys(deflection);\r\n const currentCategory =\r\n deflectionKeys.length === 1 && !contactCategory\r\n ? deflectionKeys[0]\r\n : contactCategory;\r\n\r\n if (deflection[currentCategory]?.length) {\r\n return dataClient\r\n .fetch(DataType.Guides, {\r\n categories: deflection[currentCategory],\r\n take: deflectionPageSize,\r\n })\r\n .then((data: MatchResult) => {\r\n if (\r\n deflectionAccordion &&\r\n guideParam &&\r\n accordionParam === component.node.name\r\n ) {\r\n return fetchAccordionGuideIfMissing(\r\n data,\r\n dataClient,\r\n { guide: guideParam }\r\n );\r\n }\r\n return new Promise<MatchResult>((resolve) =>\r\n resolve(data)\r\n );\r\n })\r\n .then(({ guides }: MatchResult) => {\r\n return next({ guides, contactMethods, categories });\r\n });\r\n }\r\n\r\n return next({ contactMethods, categories });\r\n });\r\n });\r\n });\r\n });\r\n })\r\n .then(() => {\r\n unsubscribe();\r\n });\r\n};\r\n\r\nexport default ContactListComponent;\r\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/contact-list-component.ts"],"sourcesContent":["import { ContactMethodType } from '@telia-ace/knowledge-widget-adapters';\r\nimport {\r\n fetchAccordionGuideIfMissing,\r\n updateForm,\r\n useExpand,\r\n useForm,\r\n} from '@telia-ace/knowledge-widget-component-utilities';\r\nimport {\r\n Category,\r\n createEventSubscriber,\r\n extendComponent,\r\n Guide,\r\n} from '@telia-ace/knowledge-widget-core';\r\nimport {\r\n ContactsResult,\r\n DataClient,\r\n DataType,\r\n MatchResult,\r\n} from '@telia-ace/knowledge-widget-types-grid';\r\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\r\nimport { FormComponentInstanceProperties } from '@telia-ace/widget-forms';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type ContactListComponentProps = {\r\n deflectionHeader?: string;\r\n deflection?: { [contactCategoryId: string]: string[] };\r\n deflectionPageSize?: number;\r\n routes?: {\r\n contactCategory?: string;\r\n guide?: string;\r\n };\r\n categories?: Category[]; // internal\r\n contactMethods?: ContactMethodType[]; // internal\r\n guides?: Guide[]; // internal\r\n deflectionAccordion?: boolean;\r\n} & FormComponentInstanceProperties;\r\n\r\nexport const ContactListComponent = (container: Container) => {\r\n const { events } = container.get('$widget');\r\n const [subscribe, unsubscribe] = createEventSubscriber(events);\r\n\r\n return createReactComponent(\r\n container,\r\n 'contact-list',\r\n import('./contact-list'),\r\n (component) => {\r\n const fetch = (params: { [key: string]: any }) => {\r\n component.writeProperties({ loading: true, contactMethods: [], categories: [] });\r\n component.actions.dispatch('fetch', { params });\r\n };\r\n\r\n component.actions.create('fetch', (data) => {\r\n const { submitButtonLabel = 'Submit' } =\r\n component.properties<ContactListComponentProps>();\r\n\r\n const contactMethods = (data.contactMethods || []).map((cm: ContactMethodType) => ({\r\n ...cm,\r\n body: updateForm(cm, { submit: submitButtonLabel }),\r\n }));\r\n\r\n return component.actions.dispatch('fetched', {\r\n ...data,\r\n contactMethods,\r\n loading: true,\r\n });\r\n });\r\n\r\n component.actions.create('fetched', (input) => {\r\n return component.writeProperties({\r\n ...input,\r\n guides: input.guides || [],\r\n loading: false,\r\n });\r\n });\r\n\r\n container.getAsync('router').then((router) => {\r\n const { params } = router.getRouteData();\r\n fetch(params);\r\n });\r\n\r\n subscribe('router:changed', (event: any, { current }: any) => {\r\n fetch(current.routeData.params);\r\n });\r\n\r\n useForm(container, component);\r\n useExpand(component);\r\n }\r\n )\r\n .then(() => {\r\n return extendComponent(container, 'contact-list', (component) => {\r\n component.actions.watch('contact-list.fetch', (input, next) => {\r\n const {\r\n deflection = {},\r\n deflectionPageSize = 5,\r\n deflectionAccordion,\r\n } = component.properties<ContactListComponentProps>();\r\n const { params = {} } = input;\r\n const {\r\n contactCategory,\r\n guide: guideParam,\r\n accordion: accordionParam,\r\n } = params;\r\n return container.getAsync('dataClient').then((dataClient: DataClient) => {\r\n return dataClient\r\n .fetch(DataType.ContactMethodCategories, {\r\n contactMethodCategoryId: contactCategory,\r\n })\r\n .then(({ contactMethods, categories }: ContactsResult) => {\r\n const deflectionKeys = Object.keys(deflection);\r\n const currentCategory =\r\n deflectionKeys.length === 1 && !contactCategory\r\n ? deflectionKeys[0]\r\n : contactCategory;\r\n\r\n if (deflection[currentCategory]?.length) {\r\n return dataClient\r\n .fetch(DataType.Guides, {\r\n categories: deflection[currentCategory],\r\n take: deflectionPageSize,\r\n })\r\n .then((data: MatchResult) => {\r\n if (\r\n deflectionAccordion &&\r\n guideParam &&\r\n accordionParam === component.node.name\r\n ) {\r\n return fetchAccordionGuideIfMissing(\r\n data,\r\n dataClient,\r\n { guide: guideParam }\r\n );\r\n }\r\n return new Promise<MatchResult>((resolve) =>\r\n resolve(data)\r\n );\r\n })\r\n .then(({ guides }: MatchResult) => {\r\n return next({ guides, contactMethods, categories });\r\n });\r\n }\r\n\r\n return next({ contactMethods, categories });\r\n });\r\n });\r\n });\r\n });\r\n })\r\n .then(() => {\r\n unsubscribe();\r\n });\r\n};\r\n\r\nexport default ContactListComponent;\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqCa,MAAA,IAAuB,C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AC;AAAA,QACd,wBAAqB;AAAA,QACrB;AAAA,UACA,EAAU,cACR,EAAE,YAAS,OAAO,GAClB;AAAA,QACF;AAAA,QACA,OAAO;AAAA,QACP,WAAW;AAAA,UACX;AACJ,aAAO,EAAU,SAAS,YAAY,EAAE,KAAK,CAAC,MACnC,EACF,MAAM,EAAS,yBAAyB;AAAA,QACrC,yBAAyB;AAAA,MAC5B,CAAA,EACA,KAAK,CAAC,EAAE,mBAAgB,oBAAiC;;AAChD,cAAA,IAAiB,OAAO,KAAK,CAAU,GACvC,IACF,EAAe,WAAW,KAAK,CAAC,IAC1B,EAAe,KACf;AAEN,eAAA,OAAW,OAAX,UAA6B,SACtB,EACF,MAAM,EAAS,QAAQ;AAAA,UACpB,YAAY,EAAW;AAAA,UACvB,MAAM;AAAA,QAAA,CACT,EACA,KAAK,CAAC,MAEC,KACA,KACA,MAAmB,EAAU,KAAK,OAE3B,EACH,GACA,GACA,EAAE,OAAO,GACb,IAEG,IAAI,QAAqB,CAAC,MAC7B,EAAQ,CAAI,CAChB,CACH,EACA,KAAK,CAAC,EAAE,gBACE,EAAK,EAAE,WAAQ,mBAAgB,cAAY,CAAA,CACrD,IAGF,EAAK,EAAE,mBAAgB,cAAY,CAAA;AAAA,MAAA,CAC7C,CACR;AAAA,IAAA,CACJ;AAAA,EAAA,CACJ,CACJ,EACA,KAAK,MAAM;AACI;EAAA,CACf;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-components-contact-list",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Contact list component for ACE Knowledge Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"telia"
|
|
9
9
|
],
|
|
10
|
-
"
|
|
10
|
+
"exports": {
|
|
11
|
+
"development": "./src/index.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
11
15
|
"types": "dist/index.d.ts",
|
|
12
16
|
"files": [
|
|
13
17
|
"LICENSE.txt",
|
|
@@ -24,12 +28,12 @@
|
|
|
24
28
|
},
|
|
25
29
|
"sideEffects": false,
|
|
26
30
|
"dependencies": {
|
|
27
|
-
"@telia-ace/knowledge-widget-adapters": "^1.0.
|
|
28
|
-
"@telia-ace/knowledge-widget-component-utilities": "^1.0.
|
|
29
|
-
"@telia-ace/knowledge-widget-core": "^1.0.
|
|
30
|
-
"@telia-ace/knowledge-widget-types-grid": "^1.0.
|
|
31
|
-
"@telia-ace/knowledge-widget-ui": "^1.0.
|
|
32
|
-
"@telia-ace/widget-forms": "^1.0.
|
|
31
|
+
"@telia-ace/knowledge-widget-adapters": "^1.0.25",
|
|
32
|
+
"@telia-ace/knowledge-widget-component-utilities": "^1.0.18",
|
|
33
|
+
"@telia-ace/knowledge-widget-core": "^1.0.16",
|
|
34
|
+
"@telia-ace/knowledge-widget-types-grid": "^1.0.25",
|
|
35
|
+
"@telia-ace/knowledge-widget-ui": "^1.0.22",
|
|
36
|
+
"@telia-ace/widget-forms": "^1.0.19",
|
|
33
37
|
"@telia-ace/widget-utilities": "^1.0.2",
|
|
34
38
|
"@webprovisions/platform": "^1.1.2"
|
|
35
39
|
},
|
|
@@ -43,5 +47,5 @@
|
|
|
43
47
|
"@types/react-dom": "^16.8.0",
|
|
44
48
|
"@types/styled-components": "^5.1.7"
|
|
45
49
|
},
|
|
46
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2bb53be0a4e6971998cc1d1c91f0e980df2ad485"
|
|
47
51
|
}
|
package/dist/contact-list.js
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import { ContactList as ContactList$1, contactItemList, contactLink } from "@telia-ace/knowledge-widget-adapters";
|
|
33
|
-
import { GuideList, contentBox, loadingOpacity, useRouteData, useComponentDescriptor, useContainer, useChildren, useDispatch, AccordionListItem, createEmptyComponent, Loader, ItemList, Link, borderTabStyle, useProperties, SymbolBadge, StyledText } from "@telia-ace/knowledge-widget-ui";
|
|
34
|
-
import { formatUrl, appendClassNames, createParams, findCategoryById } from "@telia-ace/widget-utilities";
|
|
35
|
-
import React, { useCallback } from "react";
|
|
36
|
-
import styled from "styled-components";
|
|
37
|
-
import { Component } from "@telia-ace/knowledge-widget-types-grid";
|
|
38
|
-
const DeflectionList = (_a) => {
|
|
39
|
-
var _b = _a, {
|
|
40
|
-
className,
|
|
41
|
-
guides,
|
|
42
|
-
header,
|
|
43
|
-
accordion,
|
|
44
|
-
loading,
|
|
45
|
-
route = "guide",
|
|
46
|
-
categoryTitle
|
|
47
|
-
} = _b, other = __objRest(_b, [
|
|
48
|
-
"className",
|
|
49
|
-
"guides",
|
|
50
|
-
"header",
|
|
51
|
-
"accordion",
|
|
52
|
-
"loading",
|
|
53
|
-
"route",
|
|
54
|
-
"categoryTitle"
|
|
55
|
-
]);
|
|
56
|
-
const {
|
|
57
|
-
name: routeName,
|
|
58
|
-
params: { contactCategory = 0, guide: currentGuideId }
|
|
59
|
-
} = useRouteData();
|
|
60
|
-
const { name: componentName } = useComponentDescriptor();
|
|
61
|
-
const container = useContainer();
|
|
62
|
-
const children = useChildren();
|
|
63
|
-
const dispatch = useDispatch();
|
|
64
|
-
const renderItem = useCallback((guide, index, items, defaultRenderer) => {
|
|
65
|
-
const { id, title } = guide;
|
|
66
|
-
if (accordion && currentGuideId === id) {
|
|
67
|
-
return /* @__PURE__ */ React.createElement(AccordionListItem, {
|
|
68
|
-
key: id,
|
|
69
|
-
id,
|
|
70
|
-
title,
|
|
71
|
-
route: routeName,
|
|
72
|
-
collapseUri: categoryTitle && formatUrl(categoryTitle)
|
|
73
|
-
}, children.map((child) => /* @__PURE__ */ React.createElement(Component, __spreadValues({
|
|
74
|
-
key: child.id,
|
|
75
|
-
id: child.id,
|
|
76
|
-
branch: "default"
|
|
77
|
-
}, { accordion }))));
|
|
78
|
-
}
|
|
79
|
-
return defaultRenderer ? defaultRenderer(guide, index, items, defaultRenderer) : null;
|
|
80
|
-
}, [accordion, children, currentGuideId]);
|
|
81
|
-
if (!guides.length && !loading) {
|
|
82
|
-
return createEmptyComponent(container, __spreadProps(__spreadValues({}, other), {
|
|
83
|
-
className: appendClassNames(className, "humany-deflection-list")
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
return /* @__PURE__ */ React.createElement(StyledGuideList, __spreadProps(__spreadValues({}, other), {
|
|
87
|
-
"data-loading": loading,
|
|
88
|
-
className: appendClassNames(className, "humany-deflection-list"),
|
|
89
|
-
items: guides,
|
|
90
|
-
header,
|
|
91
|
-
expandable: !!accordion,
|
|
92
|
-
renderItem,
|
|
93
|
-
dispatch,
|
|
94
|
-
routing: {
|
|
95
|
-
guide: route
|
|
96
|
-
},
|
|
97
|
-
paramMappers: {
|
|
98
|
-
guide: ({ id, title }) => createParams({
|
|
99
|
-
contactCategory,
|
|
100
|
-
guide: id,
|
|
101
|
-
accordion: accordion ? componentName : void 0,
|
|
102
|
-
uriName: formatUrl(title)
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
}), /* @__PURE__ */ React.createElement(Loader, {
|
|
106
|
-
loading
|
|
107
|
-
}));
|
|
108
|
-
};
|
|
109
|
-
const StyledGuideList = styled(GuideList)`
|
|
110
|
-
${contentBox}
|
|
111
|
-
${loadingOpacity}
|
|
112
|
-
`;
|
|
113
|
-
const StyledContactList = styled(ContactList$1)`
|
|
114
|
-
${loadingOpacity}
|
|
115
|
-
${contentBox}
|
|
116
|
-
`;
|
|
117
|
-
const StyledItemList = styled(ItemList)`
|
|
118
|
-
${loadingOpacity}
|
|
119
|
-
${contentBox}
|
|
120
|
-
${contactItemList}
|
|
121
|
-
|
|
122
|
-
&& {
|
|
123
|
-
i {
|
|
124
|
-
font-size: 25px;
|
|
125
|
-
width: 1.28571429em;
|
|
126
|
-
text-align: center;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
`;
|
|
130
|
-
const StyledLink = styled(Link)`
|
|
131
|
-
&:focus {
|
|
132
|
-
${(p) => {
|
|
133
|
-
var _a;
|
|
134
|
-
return ((_a = p.theme.accessibility) == null ? void 0 : _a.isTabbing) && borderTabStyle;
|
|
135
|
-
}};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
${contactLink}
|
|
139
|
-
`;
|
|
140
|
-
const ContactList = (_c) => {
|
|
141
|
-
var _d = _c, { className } = _d, other = __objRest(_d, ["className"]);
|
|
142
|
-
const dispatch = useDispatch();
|
|
143
|
-
const container = useContainer();
|
|
144
|
-
const routeData = useRouteData();
|
|
145
|
-
const {
|
|
146
|
-
deflectionHeader = "",
|
|
147
|
-
routes = {},
|
|
148
|
-
contactMethods = [],
|
|
149
|
-
categories = [],
|
|
150
|
-
guides = [],
|
|
151
|
-
deflectionAccordion = false,
|
|
152
|
-
loading = false
|
|
153
|
-
} = useProperties();
|
|
154
|
-
const { contactCategory: contactCategoryRoute, guide: guideRoute = "guide" } = routes;
|
|
155
|
-
if (!categories.length && !contactMethods.length && !loading) {
|
|
156
|
-
return createEmptyComponent(container, __spreadProps(__spreadValues({}, other), {
|
|
157
|
-
className: appendClassNames(className, "humany-contact-category-list")
|
|
158
|
-
}));
|
|
159
|
-
}
|
|
160
|
-
const {
|
|
161
|
-
name,
|
|
162
|
-
params: { contactCategory }
|
|
163
|
-
} = routeData;
|
|
164
|
-
const selectedCategory = findCategoryById(contactCategory, categories);
|
|
165
|
-
return !contactMethods.length ? /* @__PURE__ */ React.createElement(StyledItemList, __spreadProps(__spreadValues({}, other), {
|
|
166
|
-
"data-loading": loading,
|
|
167
|
-
className: appendClassNames(className, "humany-contact-category-list"),
|
|
168
|
-
items: selectedCategory && selectedCategory.items || categories,
|
|
169
|
-
renderItem: ({ id, title, symbol, matches, items }) => !!matches || items && !!items.length ? /* @__PURE__ */ React.createElement("li", {
|
|
170
|
-
key: id,
|
|
171
|
-
"data-contact-category": id
|
|
172
|
-
}, /* @__PURE__ */ React.createElement(StyledLink, {
|
|
173
|
-
routeName: contactCategoryRoute || name,
|
|
174
|
-
params: createParams({
|
|
175
|
-
contactCategory: id,
|
|
176
|
-
uriName: formatUrl(title)
|
|
177
|
-
})
|
|
178
|
-
}, symbol && /* @__PURE__ */ React.createElement(SymbolBadge, {
|
|
179
|
-
symbol
|
|
180
|
-
}), /* @__PURE__ */ React.createElement(StyledText, null, title))) : null
|
|
181
|
-
}), /* @__PURE__ */ React.createElement(Loader, {
|
|
182
|
-
loading
|
|
183
|
-
})) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DeflectionList, {
|
|
184
|
-
className,
|
|
185
|
-
guides,
|
|
186
|
-
categoryTitle: selectedCategory && selectedCategory.title,
|
|
187
|
-
header: deflectionHeader,
|
|
188
|
-
route: guideRoute,
|
|
189
|
-
accordion: deflectionAccordion,
|
|
190
|
-
loading
|
|
191
|
-
}), /* @__PURE__ */ React.createElement(StyledContactList, {
|
|
192
|
-
"data-loading": loading,
|
|
193
|
-
className,
|
|
194
|
-
contactMethods,
|
|
195
|
-
dispatch
|
|
196
|
-
}, /* @__PURE__ */ React.createElement(Loader, {
|
|
197
|
-
loading
|
|
198
|
-
})));
|
|
199
|
-
};
|
|
200
|
-
export { ContactList as default };
|
|
201
|
-
//# sourceMappingURL=contact-list.js.map
|
package/dist/contact-list.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact-list.js","sources":["../src/deflection-list.tsx","../src/contact-list.tsx"],"sourcesContent":["import { Guide } from '@telia-ace/knowledge-widget-core';\r\nimport { Component } from '@telia-ace/knowledge-widget-types-grid';\r\nimport {\r\n AccordionListItem,\r\n contentBox,\r\n createEmptyComponent,\r\n GuideList,\r\n ItemRenderer,\r\n Loader,\r\n loadingOpacity,\r\n useChildren,\r\n useComponentDescriptor,\r\n useContainer,\r\n useDispatch,\r\n useRouteData,\r\n} from '@telia-ace/knowledge-widget-ui';\r\nimport { appendClassNames, createParams, formatUrl } from '@telia-ace/widget-utilities';\r\nimport React, { useCallback } from 'react';\r\nimport styled from 'styled-components';\r\n\r\ntype Props = {\r\n className: string;\r\n guides: Guide[];\r\n header: string;\r\n accordion?: boolean;\r\n route?: string;\r\n loading: boolean;\r\n categoryTitle?: string;\r\n};\r\n\r\nconst DeflectionList: React.SFC<Props> = ({\r\n className,\r\n guides,\r\n header,\r\n accordion,\r\n loading,\r\n route = 'guide',\r\n categoryTitle,\r\n ...other\r\n}) => {\r\n const {\r\n name: routeName,\r\n params: { contactCategory = 0, guide: currentGuideId },\r\n } = useRouteData();\r\n const { name: componentName } = useComponentDescriptor();\r\n const container = useContainer();\r\n const children = useChildren();\r\n const dispatch = useDispatch();\r\n\r\n const renderItem: ItemRenderer = useCallback(\r\n (guide, index, items, defaultRenderer) => {\r\n const { id, title } = guide;\r\n if (accordion && currentGuideId === id) {\r\n return (\r\n <AccordionListItem\r\n key={id}\r\n id={id}\r\n title={title}\r\n route={routeName}\r\n collapseUri={categoryTitle && formatUrl(categoryTitle)}\r\n >\r\n {children.map((child) => (\r\n <Component\r\n key={child.id}\r\n id={child.id}\r\n branch=\"default\"\r\n {...{ accordion }}\r\n />\r\n ))}\r\n </AccordionListItem>\r\n );\r\n }\r\n\r\n return defaultRenderer ? defaultRenderer(guide, index, items, defaultRenderer) : null;\r\n },\r\n [accordion, children, currentGuideId]\r\n );\r\n\r\n if (!guides.length && !loading) {\r\n return createEmptyComponent(container, {\r\n ...other,\r\n className: appendClassNames(className, 'humany-deflection-list'),\r\n });\r\n }\r\n\r\n return (\r\n <StyledGuideList\r\n {...other}\r\n data-loading={loading}\r\n className={appendClassNames(className, 'humany-deflection-list')}\r\n items={guides}\r\n header={header}\r\n expandable={!!accordion}\r\n renderItem={renderItem}\r\n dispatch={dispatch}\r\n routing={{\r\n guide: route,\r\n }}\r\n paramMappers={{\r\n guide: ({ id, title }: Guide) =>\r\n createParams({\r\n contactCategory,\r\n guide: id,\r\n accordion: accordion ? componentName : undefined,\r\n uriName: formatUrl(title),\r\n }),\r\n }}\r\n >\r\n <Loader loading={loading} />\r\n </StyledGuideList>\r\n );\r\n};\r\n\r\nconst StyledGuideList = styled(GuideList)<{ 'data-loading': boolean } & any>`\r\n ${contentBox}\r\n ${loadingOpacity}\r\n`;\r\n\r\nexport default DeflectionList;\r\n","import {\r\n contactItemList,\r\n contactLink,\r\n ContactList as ContactListUi,\r\n} from '@telia-ace/knowledge-widget-adapters';\r\nimport { Category } from '@telia-ace/knowledge-widget-core';\r\nimport {\r\n borderTabStyle,\r\n contentBox,\r\n createEmptyComponent,\r\n ItemList,\r\n Link,\r\n Loader,\r\n loadingOpacity,\r\n StyledText,\r\n SymbolBadge,\r\n useContainer,\r\n useDispatch,\r\n useProperties,\r\n useRouteData,\r\n} from '@telia-ace/knowledge-widget-ui';\r\nimport {\r\n appendClassNames,\r\n createParams,\r\n findCategoryById,\r\n formatUrl,\r\n} from '@telia-ace/widget-utilities';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { ContactListComponentProps } from './contact-list-component';\r\nimport DeflectionList from './deflection-list';\r\n\r\nconst StyledContactList = styled(ContactListUi)<any>`\r\n ${loadingOpacity}\r\n ${contentBox}\r\n`;\r\n\r\nconst StyledItemList = styled(ItemList)<any>`\r\n ${loadingOpacity}\r\n ${contentBox}\r\n ${contactItemList}\r\n\r\n && {\r\n i {\r\n font-size: 25px;\r\n width: 1.28571429em;\r\n text-align: center;\r\n }\r\n }\r\n`;\r\n\r\nconst StyledLink = styled(Link)<any>`\r\n &:focus {\r\n ${(p) => p.theme.accessibility?.isTabbing && borderTabStyle};\r\n }\r\n\r\n ${contactLink}\r\n`;\r\n\r\ntype Props = {\r\n className: string;\r\n};\r\n\r\nconst ContactList: React.SFC<Props> = ({ className, ...other }) => {\r\n const dispatch = useDispatch();\r\n const container = useContainer();\r\n const routeData = useRouteData();\r\n const {\r\n deflectionHeader = '',\r\n routes = {},\r\n contactMethods = [],\r\n categories = [],\r\n guides = [],\r\n deflectionAccordion = false,\r\n loading = false,\r\n } = useProperties<ContactListComponentProps>();\r\n\r\n const { contactCategory: contactCategoryRoute, guide: guideRoute = 'guide' } = routes;\r\n\r\n if (!categories.length && !contactMethods.length && !loading) {\r\n return createEmptyComponent(container, {\r\n ...other,\r\n className: appendClassNames(className, 'humany-contact-category-list'),\r\n });\r\n }\r\n\r\n const {\r\n name,\r\n params: { contactCategory },\r\n } = routeData;\r\n\r\n const selectedCategory: Category = findCategoryById(contactCategory, categories);\r\n\r\n return !contactMethods.length ? (\r\n <StyledItemList\r\n {...other}\r\n data-loading={loading}\r\n className={appendClassNames(className, 'humany-contact-category-list')}\r\n items={(selectedCategory && selectedCategory.items) || categories}\r\n renderItem={({ id, title, symbol, matches, items }: Category) =>\r\n !!matches || (items && !!items.length) ? (\r\n <li key={id} data-contact-category={id}>\r\n <StyledLink\r\n routeName={contactCategoryRoute || name}\r\n params={createParams({\r\n contactCategory: id,\r\n uriName: formatUrl(title),\r\n })}\r\n >\r\n {symbol && <SymbolBadge symbol={symbol} />}\r\n <StyledText>{title}</StyledText>\r\n </StyledLink>\r\n </li>\r\n ) : null\r\n }\r\n >\r\n <Loader loading={loading} />\r\n </StyledItemList>\r\n ) : (\r\n <>\r\n <DeflectionList\r\n className={className}\r\n guides={guides}\r\n categoryTitle={selectedCategory && selectedCategory.title}\r\n header={deflectionHeader}\r\n route={guideRoute}\r\n accordion={deflectionAccordion}\r\n loading={loading}\r\n />\r\n <StyledContactList\r\n data-loading={loading}\r\n className={className}\r\n contactMethods={contactMethods}\r\n dispatch={dispatch}\r\n >\r\n <Loader loading={loading} />\r\n </StyledContactList>\r\n </>\r\n );\r\n};\r\n\r\nexport default ContactList;\r\n"],"names":["ContactListUi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,iBAAmC,CAAC,OASpC;AAToC,eACtC;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,MAPsC,IAQnC,kBARmC,IAQnC;AAAA,IAPH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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