@telia-ace/knowledge-widget-components-search 1.0.6 → 1.0.11

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.
File without changes
File without changes
package/dist/index.js ADDED
@@ -0,0 +1,234 @@
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
+ import { createEventSubscriber } from "@telia-ace/knowledge-widget-core";
21
+ import { DataType } from "@telia-ace/knowledge-widget-types-grid";
22
+ import { createReactComponent } from "@telia-ace/knowledge-widget-ui";
23
+ import { createParams, findCategoryById, deepClone, categoryTrail, getCategoryTrailAsObjects } from "@telia-ace/widget-utilities";
24
+ const hasActiveFilterBadge = (filters) => {
25
+ return !!filters.guideCategory || !!filters.tag;
26
+ };
27
+ const getTooltip = (categoryId, categories) => {
28
+ const trailIds = categoryTrail(categoryId, categories);
29
+ const categoryMap = getCategoryTrailAsObjects(trailIds, categories);
30
+ const trail = trailIds.map((id) => {
31
+ var _a;
32
+ return ((_a = categoryMap.get(id)) == null ? void 0 : _a.title) || "";
33
+ }).join(" / ");
34
+ return trail;
35
+ };
36
+ const sortRecursive = (items) => {
37
+ const clone = deepClone(items);
38
+ clone.sort((a, b) => {
39
+ if (a.title > b.title) {
40
+ return 1;
41
+ }
42
+ return -1;
43
+ });
44
+ clone.forEach((item) => {
45
+ if (item.items) {
46
+ item.items = sortRecursive(item.items);
47
+ }
48
+ });
49
+ return clone;
50
+ };
51
+ const SearchComponent = (container) => {
52
+ return createReactComponent(container, "search", import("./search.js"), (component) => {
53
+ const { events } = container.get("$widget");
54
+ const [subscribe, unsubscribe] = createEventSubscriber(events);
55
+ const load = (params) => {
56
+ var _a, _b;
57
+ const { activeFilterBadges } = component.properties();
58
+ if (((_a = activeFilterBadges == null ? void 0 : activeFilterBadges.guideCategory) == null ? void 0 : _a.id) !== params.guideCategory || ((_b = activeFilterBadges == null ? void 0 : activeFilterBadges.tag) == null ? void 0 : _b.id) !== params.tag) {
59
+ component.actions.dispatch("quick-filter:add", {
60
+ tag: params.tag,
61
+ category: params.guideCategory,
62
+ initial: true
63
+ });
64
+ }
65
+ };
66
+ component.actions.create("search", (data) => {
67
+ const { value, filters, filtersChanged } = data;
68
+ const { route = "search", patchParams = false } = component.properties();
69
+ if (value.length > 0 || (hasActiveFilterBadge(filters) || filtersChanged) && !(filters == null ? void 0 : filters.initial)) {
70
+ container.getAsync("router").then((router) => {
71
+ var _a, _b;
72
+ const { params } = router.getRouteData();
73
+ let searchParams = {
74
+ guide: void 0,
75
+ id: void 0,
76
+ accordion: void 0,
77
+ contactMethod: void 0
78
+ };
79
+ searchParams.phrase = value.length > 0 ? encodeURIComponent(value) : "";
80
+ if (patchParams) {
81
+ searchParams = __spreadValues(__spreadValues({}, params), searchParams);
82
+ }
83
+ if ((filters == null ? void 0 : filters.guideCategory) || filtersChanged) {
84
+ searchParams.guideCategory = ((_a = filters.guideCategory) == null ? void 0 : _a.id) || void 0;
85
+ }
86
+ if ((filters == null ? void 0 : filters.tag) || filtersChanged) {
87
+ searchParams.tag = ((_b = filters.tag) == null ? void 0 : _b.id) || void 0;
88
+ }
89
+ router.navigate(route, createParams(searchParams));
90
+ });
91
+ }
92
+ });
93
+ component.actions.create("clear", (data, options) => {
94
+ if (data.navigateToHome) {
95
+ container.getAsync("router").then((router) => {
96
+ const { name } = router.getInitialRoute();
97
+ router.navigate(name);
98
+ });
99
+ }
100
+ });
101
+ const getRouterParams = () => container.getAsync("router").then((router) => router.getRouteData().params);
102
+ component.actions.create("quick-filter:add", (data) => {
103
+ const { category, tag, initial } = data;
104
+ const { activeFilterBadges: previous } = component.properties();
105
+ const activeFilterBadges = previous || {
106
+ initial,
107
+ guideCategory: null,
108
+ tag: null,
109
+ tooltip: null
110
+ };
111
+ return Promise.resolve().then(() => {
112
+ if (category) {
113
+ return fetchCategories({}).then((categories) => {
114
+ const categoryItem = findCategoryById(category, categories) || null;
115
+ return __spreadProps(__spreadValues({}, activeFilterBadges), {
116
+ guideCategory: categoryItem,
117
+ tooltip: getTooltip(category, categories) || null
118
+ });
119
+ });
120
+ }
121
+ return __spreadProps(__spreadValues({}, activeFilterBadges), {
122
+ guideCategory: null,
123
+ tooltip: null
124
+ });
125
+ }).then((next) => {
126
+ if (tag) {
127
+ return fetchTags({}).then((tags) => {
128
+ return __spreadProps(__spreadValues({}, next), {
129
+ tag: tags.find((t) => t.id === tag) || null
130
+ });
131
+ });
132
+ }
133
+ return __spreadProps(__spreadValues({}, next), {
134
+ tag: null
135
+ });
136
+ }).then((next) => {
137
+ return component.writeProperties({
138
+ activeFilterBadges: __spreadProps(__spreadValues({}, next), { initial: !!initial })
139
+ });
140
+ });
141
+ });
142
+ component.actions.create("quick-filter:remove", ({ types }) => {
143
+ const { activeFilterBadges } = component.properties();
144
+ component.writeProperties({
145
+ activeFilterBadges: __spreadProps(__spreadValues({}, activeFilterBadges), {
146
+ initial: false,
147
+ guideCategory: types.indexOf("guideCategory") > -1 ? null : activeFilterBadges == null ? void 0 : activeFilterBadges.guideCategory,
148
+ tag: types.indexOf("tag") > -1 ? null : activeFilterBadges == null ? void 0 : activeFilterBadges.tag
149
+ })
150
+ });
151
+ });
152
+ component.actions.create("quick-filter:close", () => {
153
+ return component.writeProperties({
154
+ quickFilter: {
155
+ items: [],
156
+ loading: false,
157
+ open: false
158
+ }
159
+ });
160
+ });
161
+ component.actions.create("quick-filter:open", ({ symbol, type }) => {
162
+ component.writeProperties({
163
+ quickFilter: {
164
+ type,
165
+ symbol,
166
+ items: [],
167
+ loading: true,
168
+ open: true
169
+ }
170
+ });
171
+ return getRouterParams().then(({ tag, guideCategory, phrase }) => {
172
+ if (type === "guideCategory") {
173
+ return fetchCategories({
174
+ tagId: tag,
175
+ searchPhrase: phrase
176
+ }).then((items) => {
177
+ const clone = deepClone(items);
178
+ component.writeProperties({
179
+ quickFilter: {
180
+ items: sortRecursive(clone),
181
+ loading: false
182
+ }
183
+ });
184
+ });
185
+ }
186
+ if (type === "tag") {
187
+ return fetchTags({
188
+ categories: guideCategory,
189
+ searchPhrase: phrase
190
+ }).then((items) => {
191
+ const clone = deepClone(items);
192
+ component.writeProperties({
193
+ quickFilter: {
194
+ items: sortRecursive(clone),
195
+ loading: false
196
+ }
197
+ });
198
+ });
199
+ }
200
+ });
201
+ });
202
+ const fetchCategories = (params) => {
203
+ return container.getAsync("dataClient").then((dataClient) => dataClient.fetch(DataType.GuideCategories, params)).then((categoriesResult) => categoriesResult.categories || []);
204
+ };
205
+ const fetchTags = (params) => {
206
+ return container.getAsync("dataClient").then((dataClient) => dataClient.fetch(DataType.TagsOnGuides, params)).then((tags = []) => tags);
207
+ };
208
+ getRouterParams().then((params) => {
209
+ load(params);
210
+ });
211
+ subscribe("router:changed", (_, { current }) => {
212
+ const {
213
+ routeData: { params }
214
+ } = current;
215
+ load(params);
216
+ });
217
+ subscribe("data-client:fetched", (event, data) => {
218
+ const { filterBadges } = component.properties();
219
+ const showTag = typeof filterBadges === "object" ? !!filterBadges.tag : !!filterBadges;
220
+ if (data.type === "match" && showTag) {
221
+ getRouterParams().then(({ tag: tagId }) => {
222
+ const { tags = [] } = data.response;
223
+ const tag = tags.find((t) => t.id === tagId) || null;
224
+ component.writeProperties({ filters: { tag } });
225
+ });
226
+ }
227
+ });
228
+ return () => {
229
+ unsubscribe();
230
+ };
231
+ });
232
+ };
233
+ export { SearchComponent as default };
234
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/search-component.ts"],"sourcesContent":["import { Category, createEventSubscriber, Tag } from '@telia-ace/knowledge-widget-core';\r\nimport {\r\n CategoriesResult,\r\n DataClient,\r\n DataType,\r\n MatchResult,\r\n QueryParameters,\r\n TagsResult,\r\n} from '@telia-ace/knowledge-widget-types-grid';\r\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\r\nimport { RoutingService } from '@telia-ace/widget-routing';\r\nimport {\r\n categoryTrail,\r\n createParams,\r\n deepClone,\r\n findCategoryById,\r\n getCategoryTrailAsObjects,\r\n Params,\r\n} from '@telia-ace/widget-utilities';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type SearchComponentProps = {\r\n route?: string;\r\n role?: string;\r\n\r\n showSearchButton: boolean;\r\n showClearButton: boolean;\r\n showChildren: boolean;\r\n\r\n searchButtonLabel: string;\r\n clearButtonLabel: string;\r\n ariaLabel?: string;\r\n\r\n placeholder: string;\r\n autoFocus: boolean;\r\n incremental?: boolean | number;\r\n\r\n filterBadges?: FilterConfig | boolean;\r\n activeFilterBadges?: ActiveFilterBadges; // internal\r\n deleteFilterBadgeAriaLabel?: string;\r\n\r\n quickFilters?: FilterConfig | boolean;\r\n quickFilter?: Filter; // internal\r\n\r\n patchParams?: boolean;\r\n};\r\n\r\nexport type Filter = {\r\n items?: Category[] | Tag[];\r\n type?: 'guideCategory' | 'tag';\r\n symbol?: string;\r\n loading: boolean;\r\n open: boolean;\r\n};\r\n\r\nexport type ActiveFilterBadges = {\r\n guideCategory?: Category | null;\r\n tag?: Tag | null;\r\n tooltip?: string | null;\r\n initial?: boolean;\r\n};\r\n\r\nexport type FilterConfig = {\r\n autoSelect?: boolean;\r\n guideCategory?: boolean;\r\n tag?: boolean;\r\n position?: 'inside' | 'below';\r\n};\r\n\r\nconst hasActiveFilterBadge = (filters: ActiveFilterBadges) => {\r\n return !!filters.guideCategory || !!filters.tag;\r\n};\r\n\r\nconst getTooltip = (categoryId: string, categories: Category[]) => {\r\n const trailIds: string[] = categoryTrail(categoryId, categories);\r\n const categoryMap = getCategoryTrailAsObjects(trailIds, categories);\r\n const trail = trailIds.map((id) => categoryMap.get(id)?.title || '').join(' / ');\r\n return trail;\r\n};\r\n\r\nconst sortRecursive = (items: any[]) => {\r\n const clone = deepClone(items);\r\n\r\n clone.sort((a: any, b: any) => {\r\n if (a.title > b.title) {\r\n return 1;\r\n }\r\n return -1;\r\n });\r\n\r\n clone.forEach((item: any) => {\r\n if (item.items) {\r\n item.items = sortRecursive(item.items);\r\n }\r\n });\r\n\r\n return clone;\r\n};\r\n\r\nconst SearchComponent = (container: Container) => {\r\n return createReactComponent(container, 'search', import('./search'), (component) => {\r\n const { events } = container.get('$widget');\r\n const [subscribe, unsubscribe] = createEventSubscriber(events);\r\n\r\n const load = (params: Params) => {\r\n const { activeFilterBadges } = component.properties<SearchComponentProps>();\r\n\r\n if (\r\n activeFilterBadges?.guideCategory?.id !== params.guideCategory ||\r\n activeFilterBadges?.tag?.id !== params.tag\r\n ) {\r\n component.actions.dispatch('quick-filter:add', {\r\n tag: params.tag,\r\n category: params.guideCategory,\r\n initial: true,\r\n });\r\n }\r\n };\r\n\r\n component.actions.create('search', (data) => {\r\n const { value, filters, filtersChanged } = data;\r\n const { route = 'search', patchParams = false } =\r\n component.properties<SearchComponentProps>();\r\n\r\n if (\r\n value.length > 0 ||\r\n ((hasActiveFilterBadge(filters) || filtersChanged) && !filters?.initial)\r\n ) {\r\n container.getAsync('router').then((router: RoutingService) => {\r\n const { params } = router.getRouteData();\r\n\r\n let searchParams: { [key: string]: string | undefined } = {\r\n guide: undefined,\r\n id: undefined,\r\n accordion: undefined,\r\n contactMethod: undefined,\r\n };\r\n\r\n searchParams.phrase = value.length > 0 ? encodeURIComponent(value) : '';\r\n\r\n if (patchParams) {\r\n searchParams = {\r\n ...params,\r\n ...searchParams,\r\n };\r\n }\r\n\r\n if (filters?.guideCategory || filtersChanged) {\r\n searchParams.guideCategory = filters.guideCategory?.id || undefined;\r\n }\r\n\r\n if (filters?.tag || filtersChanged) {\r\n searchParams.tag = filters.tag?.id || undefined;\r\n }\r\n\r\n router.navigate(route, createParams(searchParams));\r\n });\r\n }\r\n });\r\n\r\n component.actions.create('clear', (data, options) => {\r\n if (data.navigateToHome) {\r\n container.getAsync('router').then((router: RoutingService) => {\r\n const { name }: any = router.getInitialRoute();\r\n router.navigate(name);\r\n });\r\n }\r\n });\r\n\r\n const getRouterParams: () => Promise<Params> = () =>\r\n container\r\n .getAsync('router')\r\n .then((router: RoutingService) => router.getRouteData().params);\r\n\r\n component.actions.create(\r\n 'quick-filter:add',\r\n (data: { category?: string; tag?: string; initial?: boolean }) => {\r\n const { category, tag, initial } = data;\r\n const { activeFilterBadges: previous } =\r\n component.properties<SearchComponentProps>();\r\n\r\n const activeFilterBadges: ActiveFilterBadges = previous || {\r\n initial,\r\n guideCategory: null,\r\n tag: null,\r\n tooltip: null,\r\n };\r\n\r\n return Promise.resolve()\r\n .then(() => {\r\n if (category) {\r\n return fetchCategories({}).then((categories) => {\r\n const categoryItem =\r\n <Category | null>findCategoryById(category, categories) || null;\r\n return {\r\n ...activeFilterBadges,\r\n guideCategory: categoryItem,\r\n tooltip: getTooltip(category, categories) || null,\r\n };\r\n });\r\n }\r\n return {\r\n ...activeFilterBadges,\r\n guideCategory: null,\r\n tooltip: null,\r\n };\r\n })\r\n .then((next) => {\r\n if (tag) {\r\n return fetchTags({}).then((tags) => {\r\n return {\r\n ...next,\r\n tag: tags.find((t) => t.id === tag) || null,\r\n };\r\n });\r\n }\r\n return {\r\n ...next,\r\n tag: null,\r\n };\r\n })\r\n .then((next) => {\r\n return component.writeProperties({\r\n activeFilterBadges: { ...next, initial: !!initial },\r\n });\r\n });\r\n }\r\n );\r\n\r\n component.actions.create('quick-filter:remove', ({ types }: { types: string[] }) => {\r\n const { activeFilterBadges } = component.properties<SearchComponentProps>();\r\n\r\n component.writeProperties({\r\n activeFilterBadges: {\r\n ...activeFilterBadges,\r\n initial: false,\r\n guideCategory:\r\n types.indexOf('guideCategory') > -1\r\n ? null\r\n : activeFilterBadges?.guideCategory,\r\n tag: types.indexOf('tag') > -1 ? null : activeFilterBadges?.tag,\r\n },\r\n });\r\n });\r\n\r\n component.actions.create('quick-filter:close', () => {\r\n return component.writeProperties({\r\n quickFilter: {\r\n items: [],\r\n loading: false,\r\n open: false,\r\n },\r\n });\r\n });\r\n\r\n component.actions.create('quick-filter:open', ({ symbol, type }) => {\r\n component.writeProperties({\r\n quickFilter: {\r\n type,\r\n symbol,\r\n items: [],\r\n loading: true,\r\n open: true,\r\n },\r\n });\r\n\r\n return getRouterParams().then(({ tag, guideCategory, phrase }) => {\r\n if (type === 'guideCategory') {\r\n return fetchCategories({\r\n tagId: tag,\r\n searchPhrase: phrase,\r\n }).then((items) => {\r\n const clone = deepClone(items);\r\n\r\n component.writeProperties({\r\n quickFilter: {\r\n items: sortRecursive(clone),\r\n loading: false,\r\n },\r\n });\r\n });\r\n }\r\n\r\n if (type === 'tag') {\r\n return fetchTags({\r\n categories: guideCategory,\r\n searchPhrase: phrase,\r\n }).then((items) => {\r\n const clone = deepClone(items);\r\n component.writeProperties({\r\n quickFilter: {\r\n items: sortRecursive(clone),\r\n loading: false,\r\n },\r\n });\r\n });\r\n }\r\n });\r\n });\r\n\r\n const fetchCategories = (params: QueryParameters) => {\r\n return container\r\n .getAsync('dataClient')\r\n .then((dataClient: DataClient) =>\r\n dataClient.fetch(DataType.GuideCategories, params)\r\n )\r\n .then((categoriesResult: CategoriesResult) => categoriesResult.categories || []);\r\n };\r\n\r\n const fetchTags = (params: QueryParameters) => {\r\n return container\r\n .getAsync('dataClient')\r\n .then((dataClient: DataClient) => dataClient.fetch(DataType.TagsOnGuides, params))\r\n .then((tags: TagsResult = []) => tags);\r\n };\r\n\r\n getRouterParams().then((params) => {\r\n load(params);\r\n });\r\n\r\n subscribe('router:changed', (_, { current }) => {\r\n const {\r\n routeData: { params },\r\n } = current;\r\n load(params);\r\n });\r\n\r\n subscribe('data-client:fetched', (event, data) => {\r\n const { filterBadges } = component.properties<SearchComponentProps>();\r\n\r\n const showTag = typeof filterBadges === 'object' ? !!filterBadges.tag : !!filterBadges;\r\n\r\n if (data.type === 'match' && showTag) {\r\n getRouterParams().then(({ tag: tagId }) => {\r\n const { tags = [] }: MatchResult = data.response;\r\n const tag = tags.find((t) => t.id === tagId) || null;\r\n component.writeProperties({ filters: { tag } });\r\n });\r\n }\r\n });\r\n\r\n return () => {\r\n unsubscribe();\r\n };\r\n });\r\n};\r\n\r\nexport default SearchComponent;\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAM,uBAAuB,CAAC,YAAgC;AAC1D,SAAO,CAAC,CAAC,QAAQ,iBAAiB,CAAC,CAAC,QAAQ;AAChD;AAEA,MAAM,aAAa,CAAC,YAAoB,eAA2B;AACzD,QAAA,WAAqB,cAAc,YAAY,UAAU;AACzD,QAAA,cAAc,0BAA0B,UAAU,UAAU;AAClE,QAAM,QAAQ,SAAS,IAAI,CAAC,OAAO;;AAAA,8BAAY,IAAI,EAAE,MAAlB,mBAAqB,UAAS;AAAA,GAAE,EAAE,KAAK,KAAK;AACxE,SAAA;AACX;AAEA,MAAM,gBAAgB,CAAC,UAAiB;AAC9B,QAAA,QAAQ,UAAU,KAAK;AAEvB,QAAA,KAAK,CAAC,GAAQ,MAAW;AACvB,QAAA,EAAE,QAAQ,EAAE,OAAO;AACZ,aAAA;AAAA,IACX;AACO,WAAA;AAAA,EAAA,CACV;AAEK,QAAA,QAAQ,CAAC,SAAc;AACzB,QAAI,KAAK,OAAO;AACP,WAAA,QAAQ,cAAc,KAAK,KAAK;AAAA,IACzC;AAAA,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