@telia-ace/knowledge-widget-components-contact-list 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +6 -0
- package/README.md +3 -0
- package/lib/contact-list-component.d.ts +21 -0
- package/lib/contact-list-component.js +135 -0
- package/lib/contact-list.d.ts +6 -0
- package/lib/contact-list.js +69 -0
- package/lib/deflection-list.d.ts +13 -0
- package/lib/deflection-list.js +94 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib-esm/contact-list-component.d.ts +21 -0
- package/lib-esm/contact-list-component.js +108 -0
- package/lib-esm/contact-list.d.ts +6 -0
- package/lib-esm/contact-list.js +64 -0
- package/lib-esm/deflection-list.d.ts +13 -0
- package/lib-esm/deflection-list.js +66 -0
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +2 -0
- package/package.json +46 -0
package/LICENSE.txt
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ContactMethodType } from '@telia-ace/knowledge-widget-adapters';
|
|
2
|
+
import { Category, Guide } from '@telia-ace/knowledge-widget-core';
|
|
3
|
+
import { FormComponentInstanceProperties } from '@telia-ace/widget-forms';
|
|
4
|
+
import { Container } from '@webprovisions/platform';
|
|
5
|
+
export declare type ContactListComponentProps = {
|
|
6
|
+
deflectionHeader?: string;
|
|
7
|
+
deflection?: {
|
|
8
|
+
[contactCategoryId: string]: string[];
|
|
9
|
+
};
|
|
10
|
+
deflectionPageSize?: number;
|
|
11
|
+
routes?: {
|
|
12
|
+
contactCategory?: string;
|
|
13
|
+
guide?: string;
|
|
14
|
+
};
|
|
15
|
+
categories?: Category[];
|
|
16
|
+
contactMethods?: ContactMethodType[];
|
|
17
|
+
guides?: Guide[];
|
|
18
|
+
deflectionAccordion?: boolean;
|
|
19
|
+
} & FormComponentInstanceProperties;
|
|
20
|
+
export declare const ContactListComponent: (container: Container) => Promise<void>;
|
|
21
|
+
export default ContactListComponent;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
37
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
|
+
if (!m) return o;
|
|
39
|
+
var i = m.call(o), r, ar = [], e;
|
|
40
|
+
try {
|
|
41
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42
|
+
}
|
|
43
|
+
catch (error) { e = { error: error }; }
|
|
44
|
+
finally {
|
|
45
|
+
try {
|
|
46
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
47
|
+
}
|
|
48
|
+
finally { if (e) throw e.error; }
|
|
49
|
+
}
|
|
50
|
+
return ar;
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.ContactListComponent = void 0;
|
|
54
|
+
var knowledge_widget_component_utilities_1 = require("@telia-ace/knowledge-widget-component-utilities");
|
|
55
|
+
var knowledge_widget_core_1 = require("@telia-ace/knowledge-widget-core");
|
|
56
|
+
var knowledge_widget_types_grid_1 = require("@telia-ace/knowledge-widget-types-grid");
|
|
57
|
+
var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
|
|
58
|
+
var ContactListComponent = function (container) {
|
|
59
|
+
var events = container.get('$widget').events;
|
|
60
|
+
var _a = __read((0, knowledge_widget_core_1.createEventSubscriber)(events), 2), subscribe = _a[0], unsubscribe = _a[1];
|
|
61
|
+
return (0, knowledge_widget_ui_1.createReactComponent)(container, 'contact-list', Promise.resolve().then(function () { return __importStar(require('./contact-list')); }), function (component) {
|
|
62
|
+
var fetch = function (params) {
|
|
63
|
+
component.writeProperties({ loading: true, contactMethods: [], categories: [] });
|
|
64
|
+
component.actions.dispatch('fetch', { params: params });
|
|
65
|
+
};
|
|
66
|
+
component.actions.create('fetch', function (data) {
|
|
67
|
+
var _a = component.properties().submitButtonLabel, submitButtonLabel = _a === void 0 ? 'Submit' : _a;
|
|
68
|
+
var contactMethods = (data.contactMethods || []).map(function (cm) { return (__assign(__assign({}, cm), { body: (0, knowledge_widget_component_utilities_1.updateForm)(cm, { submit: submitButtonLabel }) })); });
|
|
69
|
+
return component.actions.dispatch('fetched', __assign(__assign({}, data), { contactMethods: contactMethods, loading: true }));
|
|
70
|
+
});
|
|
71
|
+
component.actions.create('fetched', function (input) {
|
|
72
|
+
return component.writeProperties(__assign(__assign({}, input), { guides: input.guides || [], loading: false }));
|
|
73
|
+
});
|
|
74
|
+
container.getAsync('router').then(function (router) {
|
|
75
|
+
var params = router.getRouteData().params;
|
|
76
|
+
fetch(params);
|
|
77
|
+
});
|
|
78
|
+
subscribe('router:changed', function (event, _a) {
|
|
79
|
+
var current = _a.current;
|
|
80
|
+
fetch(current.routeData.params);
|
|
81
|
+
});
|
|
82
|
+
(0, knowledge_widget_component_utilities_1.useForm)(container, component);
|
|
83
|
+
(0, knowledge_widget_component_utilities_1.useExpand)(component);
|
|
84
|
+
})
|
|
85
|
+
.then(function () {
|
|
86
|
+
return (0, knowledge_widget_core_1.extendComponent)(container, 'contact-list', function (component) {
|
|
87
|
+
component.actions.watch('contact-list.fetch', function (input, next) {
|
|
88
|
+
var _a = component.properties(), _b = _a.deflection, deflection = _b === void 0 ? {} : _b, _c = _a.deflectionPageSize, deflectionPageSize = _c === void 0 ? 5 : _c, deflectionAccordion = _a.deflectionAccordion;
|
|
89
|
+
var _d = input.params, params = _d === void 0 ? {} : _d;
|
|
90
|
+
var contactCategory = params.contactCategory, guideParam = params.guide, accordionParam = params.accordion;
|
|
91
|
+
return container.getAsync('dataClient').then(function (dataClient) {
|
|
92
|
+
return dataClient
|
|
93
|
+
.fetch(knowledge_widget_types_grid_1.DataType.ContactMethodCategories, {
|
|
94
|
+
contactMethodCategoryId: contactCategory,
|
|
95
|
+
})
|
|
96
|
+
.then(function (_a) {
|
|
97
|
+
var _b;
|
|
98
|
+
var contactMethods = _a.contactMethods, categories = _a.categories;
|
|
99
|
+
var deflectionKeys = Object.keys(deflection);
|
|
100
|
+
var currentCategory = deflectionKeys.length === 1 && !contactCategory
|
|
101
|
+
? deflectionKeys[0]
|
|
102
|
+
: contactCategory;
|
|
103
|
+
if ((_b = deflection[currentCategory]) === null || _b === void 0 ? void 0 : _b.length) {
|
|
104
|
+
return dataClient
|
|
105
|
+
.fetch(knowledge_widget_types_grid_1.DataType.Guides, {
|
|
106
|
+
categories: deflection[currentCategory],
|
|
107
|
+
take: deflectionPageSize,
|
|
108
|
+
})
|
|
109
|
+
.then(function (data) {
|
|
110
|
+
if (deflectionAccordion &&
|
|
111
|
+
guideParam &&
|
|
112
|
+
accordionParam === component.node.name) {
|
|
113
|
+
return (0, knowledge_widget_component_utilities_1.fetchAccordionGuideIfMissing)(data, dataClient, { guide: guideParam });
|
|
114
|
+
}
|
|
115
|
+
return new Promise(function (resolve) {
|
|
116
|
+
return resolve(data);
|
|
117
|
+
});
|
|
118
|
+
})
|
|
119
|
+
.then(function (_a) {
|
|
120
|
+
var guides = _a.guides;
|
|
121
|
+
return next({ guides: guides, contactMethods: contactMethods, categories: categories });
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
return next({ contactMethods: contactMethods, categories: categories });
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
})
|
|
130
|
+
.then(function () {
|
|
131
|
+
unsubscribe();
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
exports.ContactListComponent = ContactListComponent;
|
|
135
|
+
exports.default = exports.ContactListComponent;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
+
t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var knowledge_widget_adapters_1 = require("@telia-ace/knowledge-widget-adapters");
|
|
33
|
+
var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
|
|
34
|
+
var widget_utilities_1 = require("@telia-ace/widget-utilities");
|
|
35
|
+
var react_1 = __importDefault(require("react"));
|
|
36
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
37
|
+
var deflection_list_1 = __importDefault(require("./deflection-list"));
|
|
38
|
+
var StyledContactList = (0, styled_components_1.default)(knowledge_widget_adapters_1.ContactList)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), knowledge_widget_ui_1.loadingOpacity, knowledge_widget_ui_1.contentBox);
|
|
39
|
+
var StyledItemList = (0, styled_components_1.default)(knowledge_widget_ui_1.ItemList)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n\n && {\n i {\n font-size: 25px;\n width: 1.28571429em;\n text-align: center;\n }\n }\n"], ["\n ", "\n ", "\n ", "\n\n && {\n i {\n font-size: 25px;\n width: 1.28571429em;\n text-align: center;\n }\n }\n"])), knowledge_widget_ui_1.loadingOpacity, knowledge_widget_ui_1.contentBox, knowledge_widget_adapters_1.contactItemList);
|
|
40
|
+
var StyledLink = (0, styled_components_1.default)(knowledge_widget_ui_1.Link)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &:focus {\n ", ";\n }\n\n ", "\n"], ["\n &:focus {\n ", ";\n }\n\n ", "\n"])), function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && knowledge_widget_ui_1.borderTabStyle; }, knowledge_widget_adapters_1.contactLink);
|
|
41
|
+
var ContactList = function (_a) {
|
|
42
|
+
var className = _a.className, other = __rest(_a, ["className"]);
|
|
43
|
+
var dispatch = (0, knowledge_widget_ui_1.useDispatch)();
|
|
44
|
+
var container = (0, knowledge_widget_ui_1.useContainer)();
|
|
45
|
+
var routeData = (0, knowledge_widget_ui_1.useRouteData)();
|
|
46
|
+
var _b = (0, knowledge_widget_ui_1.useProperties)(), _c = _b.deflectionHeader, deflectionHeader = _c === void 0 ? '' : _c, _d = _b.routes, routes = _d === void 0 ? {} : _d, _e = _b.contactMethods, contactMethods = _e === void 0 ? [] : _e, _f = _b.categories, categories = _f === void 0 ? [] : _f, _g = _b.guides, guides = _g === void 0 ? [] : _g, _h = _b.deflectionAccordion, deflectionAccordion = _h === void 0 ? false : _h, _j = _b.loading, loading = _j === void 0 ? false : _j;
|
|
47
|
+
var contactCategoryRoute = routes.contactCategory, _k = routes.guide, guideRoute = _k === void 0 ? 'guide' : _k;
|
|
48
|
+
if (!categories.length && !contactMethods.length && !loading) {
|
|
49
|
+
return (0, knowledge_widget_ui_1.createEmptyComponent)(container, __assign(__assign({}, other), { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-category-list') }));
|
|
50
|
+
}
|
|
51
|
+
var name = routeData.name, contactCategory = routeData.params.contactCategory;
|
|
52
|
+
var selectedCategory = (0, widget_utilities_1.findCategoryById)(contactCategory, categories);
|
|
53
|
+
return !contactMethods.length ? (react_1.default.createElement(StyledItemList, __assign({}, other, { "data-loading": loading, className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-category-list'), items: (selectedCategory && selectedCategory.items) || categories, renderItem: function (_a) {
|
|
54
|
+
var id = _a.id, title = _a.title, symbol = _a.symbol, matches = _a.matches, items = _a.items;
|
|
55
|
+
return !!matches || (items && !!items.length) ? (react_1.default.createElement("li", { key: id, "data-contact-category": id },
|
|
56
|
+
react_1.default.createElement(StyledLink, { routeName: contactCategoryRoute || name, params: (0, widget_utilities_1.createParams)({
|
|
57
|
+
contactCategory: id,
|
|
58
|
+
uriName: (0, widget_utilities_1.formatUrl)(title),
|
|
59
|
+
}) },
|
|
60
|
+
symbol && react_1.default.createElement(knowledge_widget_ui_1.SymbolBadge, { symbol: symbol }),
|
|
61
|
+
react_1.default.createElement(knowledge_widget_ui_1.StyledText, null, title)))) : null;
|
|
62
|
+
} }),
|
|
63
|
+
react_1.default.createElement(knowledge_widget_ui_1.Loader, { loading: loading }))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
64
|
+
react_1.default.createElement(deflection_list_1.default, { className: className, guides: guides, categoryTitle: selectedCategory && selectedCategory.title, header: deflectionHeader, route: guideRoute, accordion: deflectionAccordion, loading: loading }),
|
|
65
|
+
react_1.default.createElement(StyledContactList, { "data-loading": loading, className: className, contactMethods: contactMethods, dispatch: dispatch },
|
|
66
|
+
react_1.default.createElement(knowledge_widget_ui_1.Loader, { loading: loading }))));
|
|
67
|
+
};
|
|
68
|
+
exports.default = ContactList;
|
|
69
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Guide } from '@telia-ace/knowledge-widget-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
className: string;
|
|
5
|
+
guides: Guide[];
|
|
6
|
+
header: string;
|
|
7
|
+
accordion?: boolean;
|
|
8
|
+
route?: string;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
categoryTitle?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const DeflectionList: React.SFC<Props>;
|
|
13
|
+
export default DeflectionList;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
|
+
var t = {};
|
|
42
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
+
t[p] = s[p];
|
|
44
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
+
t[p[i]] = s[p[i]];
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
};
|
|
51
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
+
var knowledge_widget_types_grid_1 = require("@telia-ace/knowledge-widget-types-grid");
|
|
56
|
+
var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
|
|
57
|
+
var widget_utilities_1 = require("@telia-ace/widget-utilities");
|
|
58
|
+
var react_1 = __importStar(require("react"));
|
|
59
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
60
|
+
var DeflectionList = function (_a) {
|
|
61
|
+
var className = _a.className, guides = _a.guides, header = _a.header, accordion = _a.accordion, loading = _a.loading, _b = _a.route, route = _b === void 0 ? 'guide' : _b, categoryTitle = _a.categoryTitle, other = __rest(_a, ["className", "guides", "header", "accordion", "loading", "route", "categoryTitle"]);
|
|
62
|
+
var _c = (0, knowledge_widget_ui_1.useRouteData)(), routeName = _c.name, _d = _c.params, _e = _d.contactCategory, contactCategory = _e === void 0 ? 0 : _e, currentGuideId = _d.guide;
|
|
63
|
+
var componentName = (0, knowledge_widget_ui_1.useComponentDescriptor)().name;
|
|
64
|
+
var container = (0, knowledge_widget_ui_1.useContainer)();
|
|
65
|
+
var children = (0, knowledge_widget_ui_1.useChildren)();
|
|
66
|
+
var dispatch = (0, knowledge_widget_ui_1.useDispatch)();
|
|
67
|
+
var renderItem = (0, react_1.useCallback)(function (guide, index, items, defaultRenderer) {
|
|
68
|
+
var id = guide.id, title = guide.title;
|
|
69
|
+
if (accordion && currentGuideId === id) {
|
|
70
|
+
return (react_1.default.createElement(knowledge_widget_ui_1.AccordionListItem, { key: id, id: id, title: title, route: routeName, collapseUri: categoryTitle && (0, widget_utilities_1.formatUrl)(categoryTitle) }, children.map(function (child) { return (react_1.default.createElement(knowledge_widget_types_grid_1.Component, __assign({ key: child.id, id: child.id, branch: "default" }, { accordion: accordion }))); })));
|
|
71
|
+
}
|
|
72
|
+
return defaultRenderer ? defaultRenderer(guide, index, items, defaultRenderer) : null;
|
|
73
|
+
}, [accordion, children, currentGuideId]);
|
|
74
|
+
if (!guides.length && !loading) {
|
|
75
|
+
return (0, knowledge_widget_ui_1.createEmptyComponent)(container, __assign(__assign({}, other), { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-deflection-list') }));
|
|
76
|
+
}
|
|
77
|
+
return (react_1.default.createElement(StyledGuideList, __assign({}, other, { "data-loading": loading, className: (0, widget_utilities_1.appendClassNames)(className, 'humany-deflection-list'), items: guides, header: header, expandable: !!accordion, renderItem: renderItem, dispatch: dispatch, routing: {
|
|
78
|
+
guide: route,
|
|
79
|
+
}, paramMappers: {
|
|
80
|
+
guide: function (_a) {
|
|
81
|
+
var id = _a.id, title = _a.title;
|
|
82
|
+
return (0, widget_utilities_1.createParams)({
|
|
83
|
+
contactCategory: contactCategory,
|
|
84
|
+
guide: id,
|
|
85
|
+
accordion: accordion ? componentName : undefined,
|
|
86
|
+
uriName: (0, widget_utilities_1.formatUrl)(title),
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
} }),
|
|
90
|
+
react_1.default.createElement(knowledge_widget_ui_1.Loader, { loading: loading })));
|
|
91
|
+
};
|
|
92
|
+
var StyledGuideList = (0, styled_components_1.default)(knowledge_widget_ui_1.GuideList)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), knowledge_widget_ui_1.contentBox, knowledge_widget_ui_1.loadingOpacity);
|
|
93
|
+
exports.default = DeflectionList;
|
|
94
|
+
var templateObject_1;
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var contact_list_component_1 = __importDefault(require("./contact-list-component"));
|
|
7
|
+
exports.default = contact_list_component_1.default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ContactMethodType } from '@telia-ace/knowledge-widget-adapters';
|
|
2
|
+
import { Category, Guide } from '@telia-ace/knowledge-widget-core';
|
|
3
|
+
import { FormComponentInstanceProperties } from '@telia-ace/widget-forms';
|
|
4
|
+
import { Container } from '@webprovisions/platform';
|
|
5
|
+
export declare type ContactListComponentProps = {
|
|
6
|
+
deflectionHeader?: string;
|
|
7
|
+
deflection?: {
|
|
8
|
+
[contactCategoryId: string]: string[];
|
|
9
|
+
};
|
|
10
|
+
deflectionPageSize?: number;
|
|
11
|
+
routes?: {
|
|
12
|
+
contactCategory?: string;
|
|
13
|
+
guide?: string;
|
|
14
|
+
};
|
|
15
|
+
categories?: Category[];
|
|
16
|
+
contactMethods?: ContactMethodType[];
|
|
17
|
+
guides?: Guide[];
|
|
18
|
+
deflectionAccordion?: boolean;
|
|
19
|
+
} & FormComponentInstanceProperties;
|
|
20
|
+
export declare const ContactListComponent: (container: Container) => Promise<void>;
|
|
21
|
+
export default ContactListComponent;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { fetchAccordionGuideIfMissing, updateForm, useExpand, useForm, } from '@telia-ace/knowledge-widget-component-utilities';
|
|
29
|
+
import { createEventSubscriber, extendComponent, } from '@telia-ace/knowledge-widget-core';
|
|
30
|
+
import { DataType, } from '@telia-ace/knowledge-widget-types-grid';
|
|
31
|
+
import { createReactComponent } from '@telia-ace/knowledge-widget-ui';
|
|
32
|
+
export var ContactListComponent = function (container) {
|
|
33
|
+
var events = container.get('$widget').events;
|
|
34
|
+
var _a = __read(createEventSubscriber(events), 2), subscribe = _a[0], unsubscribe = _a[1];
|
|
35
|
+
return createReactComponent(container, 'contact-list', import('./contact-list'), function (component) {
|
|
36
|
+
var fetch = function (params) {
|
|
37
|
+
component.writeProperties({ loading: true, contactMethods: [], categories: [] });
|
|
38
|
+
component.actions.dispatch('fetch', { params: params });
|
|
39
|
+
};
|
|
40
|
+
component.actions.create('fetch', function (data) {
|
|
41
|
+
var _a = component.properties().submitButtonLabel, submitButtonLabel = _a === void 0 ? 'Submit' : _a;
|
|
42
|
+
var contactMethods = (data.contactMethods || []).map(function (cm) { return (__assign(__assign({}, cm), { body: updateForm(cm, { submit: submitButtonLabel }) })); });
|
|
43
|
+
return component.actions.dispatch('fetched', __assign(__assign({}, data), { contactMethods: contactMethods, loading: true }));
|
|
44
|
+
});
|
|
45
|
+
component.actions.create('fetched', function (input) {
|
|
46
|
+
return component.writeProperties(__assign(__assign({}, input), { guides: input.guides || [], loading: false }));
|
|
47
|
+
});
|
|
48
|
+
container.getAsync('router').then(function (router) {
|
|
49
|
+
var params = router.getRouteData().params;
|
|
50
|
+
fetch(params);
|
|
51
|
+
});
|
|
52
|
+
subscribe('router:changed', function (event, _a) {
|
|
53
|
+
var current = _a.current;
|
|
54
|
+
fetch(current.routeData.params);
|
|
55
|
+
});
|
|
56
|
+
useForm(container, component);
|
|
57
|
+
useExpand(component);
|
|
58
|
+
})
|
|
59
|
+
.then(function () {
|
|
60
|
+
return extendComponent(container, 'contact-list', function (component) {
|
|
61
|
+
component.actions.watch('contact-list.fetch', function (input, next) {
|
|
62
|
+
var _a = component.properties(), _b = _a.deflection, deflection = _b === void 0 ? {} : _b, _c = _a.deflectionPageSize, deflectionPageSize = _c === void 0 ? 5 : _c, deflectionAccordion = _a.deflectionAccordion;
|
|
63
|
+
var _d = input.params, params = _d === void 0 ? {} : _d;
|
|
64
|
+
var contactCategory = params.contactCategory, guideParam = params.guide, accordionParam = params.accordion;
|
|
65
|
+
return container.getAsync('dataClient').then(function (dataClient) {
|
|
66
|
+
return dataClient
|
|
67
|
+
.fetch(DataType.ContactMethodCategories, {
|
|
68
|
+
contactMethodCategoryId: contactCategory,
|
|
69
|
+
})
|
|
70
|
+
.then(function (_a) {
|
|
71
|
+
var _b;
|
|
72
|
+
var contactMethods = _a.contactMethods, categories = _a.categories;
|
|
73
|
+
var deflectionKeys = Object.keys(deflection);
|
|
74
|
+
var currentCategory = deflectionKeys.length === 1 && !contactCategory
|
|
75
|
+
? deflectionKeys[0]
|
|
76
|
+
: contactCategory;
|
|
77
|
+
if ((_b = deflection[currentCategory]) === null || _b === void 0 ? void 0 : _b.length) {
|
|
78
|
+
return dataClient
|
|
79
|
+
.fetch(DataType.Guides, {
|
|
80
|
+
categories: deflection[currentCategory],
|
|
81
|
+
take: deflectionPageSize,
|
|
82
|
+
})
|
|
83
|
+
.then(function (data) {
|
|
84
|
+
if (deflectionAccordion &&
|
|
85
|
+
guideParam &&
|
|
86
|
+
accordionParam === component.node.name) {
|
|
87
|
+
return fetchAccordionGuideIfMissing(data, dataClient, { guide: guideParam });
|
|
88
|
+
}
|
|
89
|
+
return new Promise(function (resolve) {
|
|
90
|
+
return resolve(data);
|
|
91
|
+
});
|
|
92
|
+
})
|
|
93
|
+
.then(function (_a) {
|
|
94
|
+
var guides = _a.guides;
|
|
95
|
+
return next({ guides: guides, contactMethods: contactMethods, categories: categories });
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return next({ contactMethods: contactMethods, categories: categories });
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
})
|
|
104
|
+
.then(function () {
|
|
105
|
+
unsubscribe();
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
export default ContactListComponent;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import { contactItemList, contactLink, ContactList as ContactListUi, } from '@telia-ace/knowledge-widget-adapters';
|
|
28
|
+
import { borderTabStyle, contentBox, createEmptyComponent, ItemList, Link, Loader, loadingOpacity, StyledText, SymbolBadge, useContainer, useDispatch, useProperties, useRouteData, } from '@telia-ace/knowledge-widget-ui';
|
|
29
|
+
import { appendClassNames, createParams, findCategoryById, formatUrl, } from '@telia-ace/widget-utilities';
|
|
30
|
+
import React from 'react';
|
|
31
|
+
import styled from 'styled-components';
|
|
32
|
+
import DeflectionList from './deflection-list';
|
|
33
|
+
var StyledContactList = styled(ContactListUi)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), loadingOpacity, contentBox);
|
|
34
|
+
var StyledItemList = styled(ItemList)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n\n && {\n i {\n font-size: 25px;\n width: 1.28571429em;\n text-align: center;\n }\n }\n"], ["\n ", "\n ", "\n ", "\n\n && {\n i {\n font-size: 25px;\n width: 1.28571429em;\n text-align: center;\n }\n }\n"])), loadingOpacity, contentBox, contactItemList);
|
|
35
|
+
var StyledLink = styled(Link)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &:focus {\n ", ";\n }\n\n ", "\n"], ["\n &:focus {\n ", ";\n }\n\n ", "\n"])), function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && borderTabStyle; }, contactLink);
|
|
36
|
+
var ContactList = function (_a) {
|
|
37
|
+
var className = _a.className, other = __rest(_a, ["className"]);
|
|
38
|
+
var dispatch = useDispatch();
|
|
39
|
+
var container = useContainer();
|
|
40
|
+
var routeData = useRouteData();
|
|
41
|
+
var _b = useProperties(), _c = _b.deflectionHeader, deflectionHeader = _c === void 0 ? '' : _c, _d = _b.routes, routes = _d === void 0 ? {} : _d, _e = _b.contactMethods, contactMethods = _e === void 0 ? [] : _e, _f = _b.categories, categories = _f === void 0 ? [] : _f, _g = _b.guides, guides = _g === void 0 ? [] : _g, _h = _b.deflectionAccordion, deflectionAccordion = _h === void 0 ? false : _h, _j = _b.loading, loading = _j === void 0 ? false : _j;
|
|
42
|
+
var contactCategoryRoute = routes.contactCategory, _k = routes.guide, guideRoute = _k === void 0 ? 'guide' : _k;
|
|
43
|
+
if (!categories.length && !contactMethods.length && !loading) {
|
|
44
|
+
return createEmptyComponent(container, __assign(__assign({}, other), { className: appendClassNames(className, 'humany-contact-category-list') }));
|
|
45
|
+
}
|
|
46
|
+
var name = routeData.name, contactCategory = routeData.params.contactCategory;
|
|
47
|
+
var selectedCategory = findCategoryById(contactCategory, categories);
|
|
48
|
+
return !contactMethods.length ? (React.createElement(StyledItemList, __assign({}, other, { "data-loading": loading, className: appendClassNames(className, 'humany-contact-category-list'), items: (selectedCategory && selectedCategory.items) || categories, renderItem: function (_a) {
|
|
49
|
+
var id = _a.id, title = _a.title, symbol = _a.symbol, matches = _a.matches, items = _a.items;
|
|
50
|
+
return !!matches || (items && !!items.length) ? (React.createElement("li", { key: id, "data-contact-category": id },
|
|
51
|
+
React.createElement(StyledLink, { routeName: contactCategoryRoute || name, params: createParams({
|
|
52
|
+
contactCategory: id,
|
|
53
|
+
uriName: formatUrl(title),
|
|
54
|
+
}) },
|
|
55
|
+
symbol && React.createElement(SymbolBadge, { symbol: symbol }),
|
|
56
|
+
React.createElement(StyledText, null, title)))) : null;
|
|
57
|
+
} }),
|
|
58
|
+
React.createElement(Loader, { loading: loading }))) : (React.createElement(React.Fragment, null,
|
|
59
|
+
React.createElement(DeflectionList, { className: className, guides: guides, categoryTitle: selectedCategory && selectedCategory.title, header: deflectionHeader, route: guideRoute, accordion: deflectionAccordion, loading: loading }),
|
|
60
|
+
React.createElement(StyledContactList, { "data-loading": loading, className: className, contactMethods: contactMethods, dispatch: dispatch },
|
|
61
|
+
React.createElement(Loader, { loading: loading }))));
|
|
62
|
+
};
|
|
63
|
+
export default ContactList;
|
|
64
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Guide } from '@telia-ace/knowledge-widget-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
className: string;
|
|
5
|
+
guides: Guide[];
|
|
6
|
+
header: string;
|
|
7
|
+
accordion?: boolean;
|
|
8
|
+
route?: string;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
categoryTitle?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const DeflectionList: React.SFC<Props>;
|
|
13
|
+
export default DeflectionList;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import { Component } from '@telia-ace/knowledge-widget-types-grid';
|
|
28
|
+
import { AccordionListItem, contentBox, createEmptyComponent, GuideList, Loader, loadingOpacity, useChildren, useComponentDescriptor, useContainer, useDispatch, useRouteData, } from '@telia-ace/knowledge-widget-ui';
|
|
29
|
+
import { appendClassNames, createParams, formatUrl } from '@telia-ace/widget-utilities';
|
|
30
|
+
import React, { useCallback } from 'react';
|
|
31
|
+
import styled from 'styled-components';
|
|
32
|
+
var DeflectionList = function (_a) {
|
|
33
|
+
var className = _a.className, guides = _a.guides, header = _a.header, accordion = _a.accordion, loading = _a.loading, _b = _a.route, route = _b === void 0 ? 'guide' : _b, categoryTitle = _a.categoryTitle, other = __rest(_a, ["className", "guides", "header", "accordion", "loading", "route", "categoryTitle"]);
|
|
34
|
+
var _c = useRouteData(), routeName = _c.name, _d = _c.params, _e = _d.contactCategory, contactCategory = _e === void 0 ? 0 : _e, currentGuideId = _d.guide;
|
|
35
|
+
var componentName = useComponentDescriptor().name;
|
|
36
|
+
var container = useContainer();
|
|
37
|
+
var children = useChildren();
|
|
38
|
+
var dispatch = useDispatch();
|
|
39
|
+
var renderItem = useCallback(function (guide, index, items, defaultRenderer) {
|
|
40
|
+
var id = guide.id, title = guide.title;
|
|
41
|
+
if (accordion && currentGuideId === id) {
|
|
42
|
+
return (React.createElement(AccordionListItem, { key: id, id: id, title: title, route: routeName, collapseUri: categoryTitle && formatUrl(categoryTitle) }, children.map(function (child) { return (React.createElement(Component, __assign({ key: child.id, id: child.id, branch: "default" }, { accordion: accordion }))); })));
|
|
43
|
+
}
|
|
44
|
+
return defaultRenderer ? defaultRenderer(guide, index, items, defaultRenderer) : null;
|
|
45
|
+
}, [accordion, children, currentGuideId]);
|
|
46
|
+
if (!guides.length && !loading) {
|
|
47
|
+
return createEmptyComponent(container, __assign(__assign({}, other), { className: appendClassNames(className, 'humany-deflection-list') }));
|
|
48
|
+
}
|
|
49
|
+
return (React.createElement(StyledGuideList, __assign({}, other, { "data-loading": loading, className: appendClassNames(className, 'humany-deflection-list'), items: guides, header: header, expandable: !!accordion, renderItem: renderItem, dispatch: dispatch, routing: {
|
|
50
|
+
guide: route,
|
|
51
|
+
}, paramMappers: {
|
|
52
|
+
guide: function (_a) {
|
|
53
|
+
var id = _a.id, title = _a.title;
|
|
54
|
+
return createParams({
|
|
55
|
+
contactCategory: contactCategory,
|
|
56
|
+
guide: id,
|
|
57
|
+
accordion: accordion ? componentName : undefined,
|
|
58
|
+
uriName: formatUrl(title),
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
} }),
|
|
62
|
+
React.createElement(Loader, { loading: loading })));
|
|
63
|
+
};
|
|
64
|
+
var StyledGuideList = styled(GuideList)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), contentBox, loadingOpacity);
|
|
65
|
+
export default DeflectionList;
|
|
66
|
+
var templateObject_1;
|
package/lib-esm/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telia-ace/knowledge-widget-components-contact-list",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Contact list component for ACE Knowledge Widgets.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"author": "Telia Company AB",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"telia"
|
|
9
|
+
],
|
|
10
|
+
"main": "lib/index.js",
|
|
11
|
+
"module": "lib-esm/index.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"LICENSE.txt",
|
|
14
|
+
"README.md",
|
|
15
|
+
"lib/",
|
|
16
|
+
"lib-esm/"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "cleandir lib && cleandir lib-esm",
|
|
23
|
+
"compile": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json"
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"typings": "lib/index.d.ts",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@telia-ace/knowledge-widget-adapters": "^1.0.1",
|
|
29
|
+
"@telia-ace/knowledge-widget-component-utilities": "^1.0.1",
|
|
30
|
+
"@telia-ace/knowledge-widget-core": "^1.0.1",
|
|
31
|
+
"@telia-ace/knowledge-widget-types-grid": "^1.0.1",
|
|
32
|
+
"@telia-ace/knowledge-widget-ui": "^1.0.1",
|
|
33
|
+
"@telia-ace/widget-forms": "^1.0.1",
|
|
34
|
+
"@telia-ace/widget-utilities": "^1.0.1",
|
|
35
|
+
"@webprovisions/platform": "^1.1.2",
|
|
36
|
+
"react": "^17.0.2",
|
|
37
|
+
"react-dom": "^17.0.2",
|
|
38
|
+
"styled-components": "^4.3.2"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/react": "^17.0.39",
|
|
42
|
+
"@types/react-dom": "^17.0.13",
|
|
43
|
+
"@types/styled-components": "^5.1.7"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "58b00b80f6a1e4a3c13f4291cb29b9422ea1aa4a"
|
|
46
|
+
}
|