@internetarchive/collection-browser 0.4.3-alpha.9 → 0.4.4-alpha

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.
Files changed (250) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +26 -26
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/LICENSE +661 -661
  8. package/README.md +83 -83
  9. package/dist/index.d.ts +9 -9
  10. package/dist/index.js +9 -9
  11. package/dist/src/app-root.d.ts +50 -48
  12. package/dist/src/app-root.js +449 -412
  13. package/dist/src/app-root.js.map +1 -1
  14. package/dist/src/assets/img/icons/arrow-left.d.ts +2 -2
  15. package/dist/src/assets/img/icons/arrow-left.js +2 -2
  16. package/dist/src/assets/img/icons/arrow-right.d.ts +2 -2
  17. package/dist/src/assets/img/icons/arrow-right.js +2 -2
  18. package/dist/src/assets/img/icons/chevron.d.ts +2 -2
  19. package/dist/src/assets/img/icons/chevron.js +2 -2
  20. package/dist/src/assets/img/icons/empty-query.d.ts +2 -2
  21. package/dist/src/assets/img/icons/empty-query.js +2 -2
  22. package/dist/src/assets/img/icons/eye-closed.d.ts +2 -2
  23. package/dist/src/assets/img/icons/eye-closed.js +2 -2
  24. package/dist/src/assets/img/icons/eye.d.ts +2 -2
  25. package/dist/src/assets/img/icons/eye.js +2 -2
  26. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
  27. package/dist/src/assets/img/icons/favorite-filled.js +2 -2
  28. package/dist/src/assets/img/icons/login-required.d.ts +1 -1
  29. package/dist/src/assets/img/icons/login-required.js +2 -2
  30. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
  31. package/dist/src/assets/img/icons/mediatype/account.js +2 -2
  32. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
  33. package/dist/src/assets/img/icons/mediatype/audio.js +2 -2
  34. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
  35. package/dist/src/assets/img/icons/mediatype/collection.js +2 -2
  36. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
  37. package/dist/src/assets/img/icons/mediatype/data.js +2 -2
  38. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
  39. package/dist/src/assets/img/icons/mediatype/etree.js +2 -2
  40. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
  41. package/dist/src/assets/img/icons/mediatype/film.js +2 -2
  42. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
  43. package/dist/src/assets/img/icons/mediatype/images.js +2 -2
  44. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
  45. package/dist/src/assets/img/icons/mediatype/radio.js +2 -2
  46. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
  47. package/dist/src/assets/img/icons/mediatype/software.js +2 -2
  48. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
  49. package/dist/src/assets/img/icons/mediatype/texts.js +2 -2
  50. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
  51. package/dist/src/assets/img/icons/mediatype/tv.js +2 -2
  52. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
  53. package/dist/src/assets/img/icons/mediatype/video.js +2 -2
  54. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
  55. package/dist/src/assets/img/icons/mediatype/web.js +2 -2
  56. package/dist/src/assets/img/icons/null-result.d.ts +2 -2
  57. package/dist/src/assets/img/icons/null-result.js +2 -2
  58. package/dist/src/assets/img/icons/restricted.d.ts +1 -1
  59. package/dist/src/assets/img/icons/restricted.js +2 -2
  60. package/dist/src/assets/img/icons/reviews.d.ts +1 -1
  61. package/dist/src/assets/img/icons/reviews.js +2 -2
  62. package/dist/src/assets/img/icons/upload.d.ts +1 -1
  63. package/dist/src/assets/img/icons/upload.js +2 -2
  64. package/dist/src/assets/img/icons/views.d.ts +1 -1
  65. package/dist/src/assets/img/icons/views.js +2 -2
  66. package/dist/src/circular-activity-indicator.d.ts +5 -5
  67. package/dist/src/circular-activity-indicator.js +17 -17
  68. package/dist/src/collection-browser.d.ts +315 -276
  69. package/dist/src/collection-browser.js +1276 -1179
  70. package/dist/src/collection-browser.js.map +1 -1
  71. package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -5
  72. package/dist/src/collection-facets/facet-tombstone-row.js +15 -15
  73. package/dist/src/collection-facets/facets-template.d.ts +16 -16
  74. package/dist/src/collection-facets/facets-template.js +125 -125
  75. package/dist/src/collection-facets/more-facets-content.d.ts +77 -77
  76. package/dist/src/collection-facets/more-facets-content.js +357 -357
  77. package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -36
  78. package/dist/src/collection-facets/more-facets-pagination.js +192 -192
  79. package/dist/src/collection-facets.d.ts +78 -78
  80. package/dist/src/collection-facets.js +391 -391
  81. package/dist/src/empty-placeholder.d.ts +11 -11
  82. package/dist/src/empty-placeholder.js +42 -42
  83. package/dist/src/language-code-handler/language-code-handler.d.ts +37 -37
  84. package/dist/src/language-code-handler/language-code-handler.js +26 -26
  85. package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -1
  86. package/dist/src/language-code-handler/language-code-mapping.js +562 -562
  87. package/dist/src/mediatype/mediatype-config.d.ts +3 -3
  88. package/dist/src/mediatype/mediatype-config.js +85 -85
  89. package/dist/src/models.d.ts +114 -112
  90. package/dist/src/models.js +125 -125
  91. package/dist/src/models.js.map +1 -1
  92. package/dist/src/restoration-state-handler.d.ts +45 -45
  93. package/dist/src/restoration-state-handler.js +230 -230
  94. package/dist/src/sort-filter-bar/alpha-bar.d.ts +12 -12
  95. package/dist/src/sort-filter-bar/alpha-bar.js +52 -52
  96. package/dist/src/sort-filter-bar/img/compact.d.ts +1 -1
  97. package/dist/src/sort-filter-bar/img/compact.js +2 -2
  98. package/dist/src/sort-filter-bar/img/list.d.ts +1 -1
  99. package/dist/src/sort-filter-bar/img/list.js +2 -2
  100. package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -1
  101. package/dist/src/sort-filter-bar/img/sort-triangle.js +2 -2
  102. package/dist/src/sort-filter-bar/img/tile.d.ts +1 -1
  103. package/dist/src/sort-filter-bar/img/tile.js +2 -2
  104. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +108 -108
  105. package/dist/src/sort-filter-bar/sort-filter-bar.js +428 -428
  106. package/dist/src/styles/item-image-styles.d.ts +8 -8
  107. package/dist/src/styles/item-image-styles.js +22 -12
  108. package/dist/src/styles/item-image-styles.js.map +1 -1
  109. package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -5
  110. package/dist/src/tiles/collection-browser-loading-tile.js +16 -16
  111. package/dist/src/tiles/collection-browser-loading-tile.js.map +1 -1
  112. package/dist/src/tiles/grid/account-tile.d.ts +17 -17
  113. package/dist/src/tiles/grid/account-tile.js +48 -47
  114. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  115. package/dist/src/tiles/grid/collection-tile.d.ts +14 -7
  116. package/dist/src/tiles/grid/collection-tile.js +112 -146
  117. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  118. package/dist/src/tiles/grid/item-tile.d.ts +29 -29
  119. package/dist/src/tiles/grid/item-tile.js +110 -105
  120. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  121. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -1
  122. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +12 -8
  123. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  124. package/dist/src/tiles/grid/tile-stats.d.ts +10 -10
  125. package/dist/src/tiles/grid/tile-stats.js +41 -40
  126. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  127. package/dist/src/tiles/image-block.d.ts +17 -17
  128. package/dist/src/tiles/image-block.js +76 -72
  129. package/dist/src/tiles/image-block.js.map +1 -1
  130. package/dist/src/tiles/item-image.d.ts +35 -35
  131. package/dist/src/tiles/item-image.js +117 -116
  132. package/dist/src/tiles/item-image.js.map +1 -1
  133. package/dist/src/tiles/list/account-label.d.ts +1 -1
  134. package/dist/src/tiles/list/account-label.js +6 -6
  135. package/dist/src/tiles/list/date-label.d.ts +1 -1
  136. package/dist/src/tiles/list/date-label.js +12 -12
  137. package/dist/src/tiles/list/tile-list-compact-header.d.ts +12 -12
  138. package/dist/src/tiles/list/tile-list-compact-header.js +41 -41
  139. package/dist/src/tiles/list/tile-list-compact.d.ts +21 -21
  140. package/dist/src/tiles/list/tile-list-compact.js +93 -93
  141. package/dist/src/tiles/list/tile-list.d.ts +53 -53
  142. package/dist/src/tiles/list/tile-list.js +279 -279
  143. package/dist/src/tiles/mediatype-icon.d.ts +9 -9
  144. package/dist/src/tiles/mediatype-icon.js +47 -47
  145. package/dist/src/tiles/overlay/icon-overlay.d.ts +10 -10
  146. package/dist/src/tiles/overlay/icon-overlay.js +40 -40
  147. package/dist/src/tiles/overlay/icon-text-overlay.d.ts +9 -9
  148. package/dist/src/tiles/overlay/icon-text-overlay.js +38 -38
  149. package/dist/src/tiles/overlay/text-overlay.d.ts +10 -10
  150. package/dist/src/tiles/overlay/text-overlay.js +42 -42
  151. package/dist/src/tiles/text-snippet-block.d.ts +27 -27
  152. package/dist/src/tiles/text-snippet-block.js +73 -73
  153. package/dist/src/tiles/tile-dispatcher.d.ts +36 -36
  154. package/dist/src/tiles/tile-dispatcher.js +145 -128
  155. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  156. package/dist/src/utils/analytics-events.d.ts +22 -22
  157. package/dist/src/utils/analytics-events.js +24 -24
  158. package/dist/src/utils/format-count.d.ts +7 -7
  159. package/dist/src/utils/format-count.js +76 -76
  160. package/dist/src/utils/format-date.d.ts +2 -2
  161. package/dist/src/utils/format-date.js +23 -23
  162. package/dist/src/utils/format-unit-size.d.ts +2 -0
  163. package/dist/src/utils/format-unit-size.js +34 -0
  164. package/dist/src/utils/format-unit-size.js.map +1 -0
  165. package/dist/test/collection-browser.test.d.ts +1 -1
  166. package/dist/test/collection-browser.test.js +646 -646
  167. package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
  168. package/dist/test/collection-facets/facets-template.test.js +62 -62
  169. package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
  170. package/dist/test/collection-facets/more-facets-content.test.js +114 -114
  171. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -1
  172. package/dist/test/collection-facets/more-facets-pagination.test.js +117 -117
  173. package/dist/test/collection-facets.test.d.ts +2 -2
  174. package/dist/test/collection-facets.test.js +544 -544
  175. package/dist/test/empty-placeholder.test.d.ts +1 -1
  176. package/dist/test/empty-placeholder.test.js +33 -33
  177. package/dist/test/icon-overlay.test.d.ts +1 -1
  178. package/dist/test/icon-overlay.test.js +24 -24
  179. package/dist/test/image-block.test.d.ts +1 -1
  180. package/dist/test/image-block.test.js +48 -48
  181. package/dist/test/item-image.test.d.ts +1 -1
  182. package/dist/test/item-image.test.js +84 -80
  183. package/dist/test/item-image.test.js.map +1 -1
  184. package/dist/test/mediatype-config.test.d.ts +1 -1
  185. package/dist/test/mediatype-config.test.js +16 -16
  186. package/dist/test/mocks/mock-analytics-handler.d.ts +10 -10
  187. package/dist/test/mocks/mock-analytics-handler.js +15 -15
  188. package/dist/test/mocks/mock-collection-name-cache.d.ts +7 -7
  189. package/dist/test/mocks/mock-collection-name-cache.js +13 -13
  190. package/dist/test/mocks/mock-search-responses.d.ts +12 -12
  191. package/dist/test/mocks/mock-search-responses.js +341 -341
  192. package/dist/test/mocks/mock-search-service.d.ts +13 -13
  193. package/dist/test/mocks/mock-search-service.js +40 -40
  194. package/dist/test/restoration-state-handler.test.d.ts +1 -1
  195. package/dist/test/restoration-state-handler.test.js +125 -125
  196. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -1
  197. package/dist/test/sort-filter-bar/alpha-bar.test.js +43 -43
  198. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -1
  199. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +141 -141
  200. package/dist/test/text-overlay.test.d.ts +1 -1
  201. package/dist/test/text-overlay.test.js +48 -48
  202. package/dist/test/text-snippet-block.test.d.ts +1 -1
  203. package/dist/test/text-snippet-block.test.js +57 -57
  204. package/dist/test/tile-stats.test.d.ts +1 -1
  205. package/dist/test/tile-stats.test.js +33 -33
  206. package/dist/test/tiles/grid/account-tile.test.d.ts +1 -1
  207. package/dist/test/tiles/grid/account-tile.test.js +60 -60
  208. package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -0
  209. package/dist/test/tiles/grid/collection-tile.test.js +73 -0
  210. package/dist/test/tiles/grid/collection-tile.test.js.map +1 -0
  211. package/dist/test/tiles/grid/item-tile.test.d.ts +1 -1
  212. package/dist/test/tiles/grid/item-tile.test.js +142 -129
  213. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  214. package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -1
  215. package/dist/test/tiles/list/tile-list-compact.test.js +92 -92
  216. package/dist/test/tiles/list/tile-list.test.d.ts +1 -1
  217. package/dist/test/tiles/list/tile-list.test.js +123 -123
  218. package/dist/test/utils/format-count.test.d.ts +1 -1
  219. package/dist/test/utils/format-count.test.js +23 -23
  220. package/dist/test/utils/format-date.test.d.ts +1 -1
  221. package/dist/test/utils/format-date.test.js +17 -17
  222. package/dist/test/utils/format-unit-size.test.d.ts +1 -0
  223. package/dist/test/utils/format-unit-size.test.js +18 -0
  224. package/dist/test/utils/format-unit-size.test.js.map +1 -0
  225. package/index.html +24 -24
  226. package/local.archive.org.cert +86 -86
  227. package/local.archive.org.key +27 -27
  228. package/package.json +2 -2
  229. package/renovate.json +6 -6
  230. package/src/app-root.ts +214 -169
  231. package/src/collection-browser.ts +122 -3
  232. package/src/models.ts +2 -0
  233. package/src/styles/item-image-styles.ts +13 -3
  234. package/src/tiles/collection-browser-loading-tile.ts +1 -1
  235. package/src/tiles/grid/account-tile.ts +4 -2
  236. package/src/tiles/grid/collection-tile.ts +106 -136
  237. package/src/tiles/grid/item-tile.ts +8 -2
  238. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +6 -2
  239. package/src/tiles/grid/tile-stats.ts +1 -0
  240. package/src/tiles/image-block.ts +5 -2
  241. package/src/tiles/item-image.ts +4 -3
  242. package/src/tiles/tile-dispatcher.ts +17 -0
  243. package/src/utils/format-unit-size.ts +43 -0
  244. package/test/item-image.test.ts +4 -0
  245. package/test/tiles/grid/collection-tile.test.ts +85 -0
  246. package/test/tiles/grid/item-tile.test.ts +30 -4
  247. package/test/utils/format-unit-size.test.ts +21 -0
  248. package/tsconfig.json +21 -21
  249. package/web-dev-server.config.mjs +30 -30
  250. package/web-test-runner.config.mjs +41 -41
@@ -1,264 +1,264 @@
1
- import { __decorate } from "tslib";
2
- /* eslint-disable dot-notation */
3
- /* eslint-disable lit-a11y/click-events-have-key-events */
4
- import { css, html, LitElement, nothing, } from 'lit';
5
- import { customElement, property, state } from 'lit/decorators.js';
6
- import { AggregationSortType, } from '@internetarchive/search-service';
7
- import { facetTitles, suppressedCollections, } from '../models';
8
- import '@internetarchive/ia-activity-indicator/ia-activity-indicator';
9
- import './more-facets-pagination';
10
- import './facets-template';
11
- import { analyticsActions, analyticsCategories, } from '../utils/analytics-events';
12
- let MoreFacetsContent = class MoreFacetsContent extends LitElement {
13
- constructor() {
14
- super(...arguments);
15
- this.sortedBy = 'count';
16
- this.facetGroup = [];
17
- this.facetGroupTitle = '';
18
- this.pageNumber = 1;
19
- /**
20
- * Facets are loading on popup
21
- */
22
- this.facetsLoading = true;
23
- this.paginationSize = 0;
24
- this.facetsType = 'modal';
25
- this.facetsPerPage = 35;
26
- }
27
- updated(changed) {
28
- if (changed.has('facetKey')) {
29
- this.facetsLoading = true;
30
- this.pageNumber = 1;
31
- this.updateSpecificFacets();
32
- }
33
- if (changed.has('pageNumber')) {
34
- this.facetGroup = this.aggregationFacetGroups;
35
- }
36
- }
37
- firstUpdated() {
38
- this.setupEscapeListeners();
39
- }
40
- /**
41
- * Close more facets modal on Escape click
42
- */
43
- setupEscapeListeners() {
44
- if (this.modalManager) {
45
- document.addEventListener('keydown', (e) => {
46
- var _a;
47
- if (e.key === 'Escape') {
48
- (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
49
- }
50
- });
51
- }
52
- else {
53
- document.removeEventListener('keydown', () => { });
54
- }
55
- }
56
- /**
57
- * Get specific facets data from search-service API based of currently query params
58
- * - this.aggregations - hold result of search service and being used for further processing.
59
- */
60
- async updateSpecificFacets() {
61
- var _a, _b;
62
- const aggregations = {
63
- simpleParams: [this.facetAggregationKey],
64
- };
65
- const aggregationsSize = 65535; // todo - do we want to have all the records at once?
66
- const params = {
67
- query: this.query,
68
- filters: this.filterMap,
69
- aggregations,
70
- aggregationsSize,
71
- rows: 0, // todo - do we want server-side pagination with offset/page/limit flag?
72
- };
73
- const results = await ((_a = this.searchService) === null || _a === void 0 ? void 0 : _a.search(params, this.searchType));
74
- this.aggregations = (_b = results === null || results === void 0 ? void 0 : results.success) === null || _b === void 0 ? void 0 : _b.response.aggregations;
75
- this.facetGroup = this.aggregationFacetGroups;
76
- this.facetsLoading = false;
77
- }
78
- pageNumberClicked(e) {
79
- var _a, _b;
80
- const page = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.page;
81
- if (page) {
82
- this.pageNumber = Number(page);
83
- }
84
- (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
85
- category: analyticsCategories.default,
86
- action: analyticsActions.moreFacetsPageChange,
87
- label: `${this.pageNumber}`,
88
- });
89
- }
90
- /**
91
- * Combines the selected facets with the aggregations to create a single list of facets
92
- */
93
- get mergedFacets() {
94
- var _a;
95
- const facetGroups = [];
96
- const selectedFacetGroup = this.selectedFacetGroups.find(group => group.key === this.facetKey);
97
- const aggregateFacetGroup = this.aggregationFacetGroups.find(group => group.key === this.facetKey);
98
- // if the user selected a facet, but it's not in the aggregation, we add it as-is
99
- if (selectedFacetGroup && !aggregateFacetGroup) {
100
- facetGroups.push(selectedFacetGroup);
101
- return facetGroups;
102
- }
103
- // if we don't have an aggregate facet group, don't add this to the list
104
- if (!aggregateFacetGroup)
105
- return facetGroups;
106
- // start with either the selected group if we have one, or the aggregate group
107
- const facetGroup = selectedFacetGroup !== null && selectedFacetGroup !== void 0 ? selectedFacetGroup : aggregateFacetGroup;
108
- // attach the counts to the selected buckets
109
- const bucketsWithCount = (_a = selectedFacetGroup === null || selectedFacetGroup === void 0 ? void 0 : selectedFacetGroup.buckets.map(bucket => {
110
- const selectedBucket = aggregateFacetGroup.buckets.find(b => b.key === bucket.key);
111
- return selectedBucket
112
- ? {
113
- ...bucket,
114
- count: selectedBucket.count,
115
- }
116
- : bucket;
117
- })) !== null && _a !== void 0 ? _a : [];
118
- // append any additional buckets that were not selected
119
- aggregateFacetGroup.buckets.forEach(bucket => {
120
- const existingBucket = bucketsWithCount.find(b => b.key === bucket.key);
121
- if (existingBucket)
122
- return;
123
- bucketsWithCount.push(bucket);
124
- });
125
- facetGroup.buckets = bucketsWithCount;
126
- facetGroups.push(facetGroup);
127
- return facetGroups;
128
- }
129
- /**
130
- * Converts the selected facets to a `FacetGroup` array,
131
- * which is easier to work with
132
- */
133
- get selectedFacetGroups() {
134
- if (!this.selectedFacets)
135
- return [];
136
- const facetGroups = Object.entries(this.selectedFacets).map(([key, selectedFacets]) => {
137
- const option = key;
138
- const title = facetTitles[option];
139
- const buckets = Object.entries(selectedFacets).map(([value, data]) => {
140
- var _a, _b;
141
- let displayText = value;
142
- // for selected languages, we store the language code instead of the
143
- // display name, so look up the name from the mapping
144
- if (option === 'language') {
145
- displayText =
146
- (_b = (_a = this.languageCodeHandler) === null || _a === void 0 ? void 0 : _a.getLanguageNameFromCodeString(value)) !== null && _b !== void 0 ? _b : value;
147
- }
148
- return {
149
- displayText,
150
- key: value,
151
- count: data === null || data === void 0 ? void 0 : data.count,
152
- state: data === null || data === void 0 ? void 0 : data.state,
153
- };
154
- });
155
- return {
156
- title,
157
- key: option,
158
- buckets,
159
- };
160
- });
161
- return facetGroups;
162
- }
163
- /**
164
- * Converts the raw `aggregations` to `FacetGroups`, which are easier to use
165
- */
166
- get aggregationFacetGroups() {
167
- var _a;
168
- const facetGroups = [];
169
- Object.entries((_a = this.aggregations) !== null && _a !== void 0 ? _a : []).forEach(([key, aggregation]) => {
170
- // the year_histogram data is in a different format so can't be handled here
171
- if (key === 'year_histogram')
172
- return;
173
- const option = key;
174
- this.facetGroupTitle = facetTitles[option];
175
- // sort facets in specific order
176
- let castedBuckets = aggregation.getSortedBuckets(this.sortedBy === 'alpha'
177
- ? AggregationSortType.ALPHABETICAL
178
- : AggregationSortType.COUNT);
179
- if (option === 'collection') {
180
- // we are not showing fav- collections or certain deemphasized collections in facets
181
- castedBuckets = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.filter(bucket => {
182
- var _a;
183
- const bucketKey = (_a = bucket === null || bucket === void 0 ? void 0 : bucket.key) === null || _a === void 0 ? void 0 : _a.toString();
184
- return (!suppressedCollections[bucketKey] && !(bucketKey === null || bucketKey === void 0 ? void 0 : bucketKey.startsWith('fav-')));
185
- });
186
- // asynchronously load the collection name
187
- this.preloadCollectionNames(castedBuckets);
188
- }
189
- // find length and pagination size for modal pagination
190
- const { length } = Object.keys(castedBuckets);
191
- this.paginationSize = Math.ceil(length / this.facetsPerPage);
192
- // render only items which will be visible as per this.facetsPerPage
193
- const bucketsMaxSix = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.slice((this.pageNumber - 1) * this.facetsPerPage, this.pageNumber * this.facetsPerPage);
194
- const facetBucket = bucketsMaxSix.map(bucket => {
195
- var _a, _b;
196
- let bucketKey = bucket.key;
197
- // for languages, we need to search by language code instead of the
198
- // display name, which is what we get from the search engine result
199
- if (option === 'language') {
200
- bucketKey =
201
- (_b = (_a = this.languageCodeHandler) === null || _a === void 0 ? void 0 : _a.getCodeStringFromLanguageName(`${bucket.key}`)) !== null && _b !== void 0 ? _b : bucket.key;
202
- }
203
- return {
204
- displayText: `${bucket.key}`,
205
- key: `${bucketKey}`,
206
- count: bucket.doc_count,
207
- state: 'none',
208
- };
209
- });
210
- const group = {
211
- title: this.facetGroupTitle,
212
- key: option,
213
- buckets: facetBucket,
214
- };
215
- facetGroups.push(group);
216
- });
217
- return facetGroups;
218
- }
219
- /**
220
- * for collections, we need to asynchronously load the collection name
221
- * so we use the `async-collection-name` widget and for the rest, we have a static value to use
222
- *
223
- * @param castedBuckets
224
- */
225
- preloadCollectionNames(castedBuckets) {
226
- var _a;
227
- const collectionIds = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.map(option => option.key);
228
- const collectionIdsArray = Array.from(new Set(collectionIds));
229
- (_a = this.collectionNameCache) === null || _a === void 0 ? void 0 : _a.preloadIdentifiers(collectionIdsArray);
230
- }
231
- get getMoreFacetsTemplate() {
232
- var _a;
1
+ import { __decorate } from "tslib";
2
+ /* eslint-disable dot-notation */
3
+ /* eslint-disable lit-a11y/click-events-have-key-events */
4
+ import { css, html, LitElement, nothing, } from 'lit';
5
+ import { customElement, property, state } from 'lit/decorators.js';
6
+ import { AggregationSortType, } from '@internetarchive/search-service';
7
+ import { facetTitles, suppressedCollections, } from '../models';
8
+ import '@internetarchive/ia-activity-indicator/ia-activity-indicator';
9
+ import './more-facets-pagination';
10
+ import './facets-template';
11
+ import { analyticsActions, analyticsCategories, } from '../utils/analytics-events';
12
+ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.sortedBy = 'count';
16
+ this.facetGroup = [];
17
+ this.facetGroupTitle = '';
18
+ this.pageNumber = 1;
19
+ /**
20
+ * Facets are loading on popup
21
+ */
22
+ this.facetsLoading = true;
23
+ this.paginationSize = 0;
24
+ this.facetsType = 'modal';
25
+ this.facetsPerPage = 35;
26
+ }
27
+ updated(changed) {
28
+ if (changed.has('facetKey')) {
29
+ this.facetsLoading = true;
30
+ this.pageNumber = 1;
31
+ this.updateSpecificFacets();
32
+ }
33
+ if (changed.has('pageNumber')) {
34
+ this.facetGroup = this.aggregationFacetGroups;
35
+ }
36
+ }
37
+ firstUpdated() {
38
+ this.setupEscapeListeners();
39
+ }
40
+ /**
41
+ * Close more facets modal on Escape click
42
+ */
43
+ setupEscapeListeners() {
44
+ if (this.modalManager) {
45
+ document.addEventListener('keydown', (e) => {
46
+ var _a;
47
+ if (e.key === 'Escape') {
48
+ (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
49
+ }
50
+ });
51
+ }
52
+ else {
53
+ document.removeEventListener('keydown', () => { });
54
+ }
55
+ }
56
+ /**
57
+ * Get specific facets data from search-service API based of currently query params
58
+ * - this.aggregations - hold result of search service and being used for further processing.
59
+ */
60
+ async updateSpecificFacets() {
61
+ var _a, _b;
62
+ const aggregations = {
63
+ simpleParams: [this.facetAggregationKey],
64
+ };
65
+ const aggregationsSize = 65535; // todo - do we want to have all the records at once?
66
+ const params = {
67
+ query: this.query,
68
+ filters: this.filterMap,
69
+ aggregations,
70
+ aggregationsSize,
71
+ rows: 0, // todo - do we want server-side pagination with offset/page/limit flag?
72
+ };
73
+ const results = await ((_a = this.searchService) === null || _a === void 0 ? void 0 : _a.search(params, this.searchType));
74
+ this.aggregations = (_b = results === null || results === void 0 ? void 0 : results.success) === null || _b === void 0 ? void 0 : _b.response.aggregations;
75
+ this.facetGroup = this.aggregationFacetGroups;
76
+ this.facetsLoading = false;
77
+ }
78
+ pageNumberClicked(e) {
79
+ var _a, _b;
80
+ const page = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.page;
81
+ if (page) {
82
+ this.pageNumber = Number(page);
83
+ }
84
+ (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
85
+ category: analyticsCategories.default,
86
+ action: analyticsActions.moreFacetsPageChange,
87
+ label: `${this.pageNumber}`,
88
+ });
89
+ }
90
+ /**
91
+ * Combines the selected facets with the aggregations to create a single list of facets
92
+ */
93
+ get mergedFacets() {
94
+ var _a;
95
+ const facetGroups = [];
96
+ const selectedFacetGroup = this.selectedFacetGroups.find(group => group.key === this.facetKey);
97
+ const aggregateFacetGroup = this.aggregationFacetGroups.find(group => group.key === this.facetKey);
98
+ // if the user selected a facet, but it's not in the aggregation, we add it as-is
99
+ if (selectedFacetGroup && !aggregateFacetGroup) {
100
+ facetGroups.push(selectedFacetGroup);
101
+ return facetGroups;
102
+ }
103
+ // if we don't have an aggregate facet group, don't add this to the list
104
+ if (!aggregateFacetGroup)
105
+ return facetGroups;
106
+ // start with either the selected group if we have one, or the aggregate group
107
+ const facetGroup = selectedFacetGroup !== null && selectedFacetGroup !== void 0 ? selectedFacetGroup : aggregateFacetGroup;
108
+ // attach the counts to the selected buckets
109
+ const bucketsWithCount = (_a = selectedFacetGroup === null || selectedFacetGroup === void 0 ? void 0 : selectedFacetGroup.buckets.map(bucket => {
110
+ const selectedBucket = aggregateFacetGroup.buckets.find(b => b.key === bucket.key);
111
+ return selectedBucket
112
+ ? {
113
+ ...bucket,
114
+ count: selectedBucket.count,
115
+ }
116
+ : bucket;
117
+ })) !== null && _a !== void 0 ? _a : [];
118
+ // append any additional buckets that were not selected
119
+ aggregateFacetGroup.buckets.forEach(bucket => {
120
+ const existingBucket = bucketsWithCount.find(b => b.key === bucket.key);
121
+ if (existingBucket)
122
+ return;
123
+ bucketsWithCount.push(bucket);
124
+ });
125
+ facetGroup.buckets = bucketsWithCount;
126
+ facetGroups.push(facetGroup);
127
+ return facetGroups;
128
+ }
129
+ /**
130
+ * Converts the selected facets to a `FacetGroup` array,
131
+ * which is easier to work with
132
+ */
133
+ get selectedFacetGroups() {
134
+ if (!this.selectedFacets)
135
+ return [];
136
+ const facetGroups = Object.entries(this.selectedFacets).map(([key, selectedFacets]) => {
137
+ const option = key;
138
+ const title = facetTitles[option];
139
+ const buckets = Object.entries(selectedFacets).map(([value, data]) => {
140
+ var _a, _b;
141
+ let displayText = value;
142
+ // for selected languages, we store the language code instead of the
143
+ // display name, so look up the name from the mapping
144
+ if (option === 'language') {
145
+ displayText =
146
+ (_b = (_a = this.languageCodeHandler) === null || _a === void 0 ? void 0 : _a.getLanguageNameFromCodeString(value)) !== null && _b !== void 0 ? _b : value;
147
+ }
148
+ return {
149
+ displayText,
150
+ key: value,
151
+ count: data === null || data === void 0 ? void 0 : data.count,
152
+ state: data === null || data === void 0 ? void 0 : data.state,
153
+ };
154
+ });
155
+ return {
156
+ title,
157
+ key: option,
158
+ buckets,
159
+ };
160
+ });
161
+ return facetGroups;
162
+ }
163
+ /**
164
+ * Converts the raw `aggregations` to `FacetGroups`, which are easier to use
165
+ */
166
+ get aggregationFacetGroups() {
167
+ var _a;
168
+ const facetGroups = [];
169
+ Object.entries((_a = this.aggregations) !== null && _a !== void 0 ? _a : []).forEach(([key, aggregation]) => {
170
+ // the year_histogram data is in a different format so can't be handled here
171
+ if (key === 'year_histogram')
172
+ return;
173
+ const option = key;
174
+ this.facetGroupTitle = facetTitles[option];
175
+ // sort facets in specific order
176
+ let castedBuckets = aggregation.getSortedBuckets(this.sortedBy === 'alpha'
177
+ ? AggregationSortType.ALPHABETICAL
178
+ : AggregationSortType.COUNT);
179
+ if (option === 'collection') {
180
+ // we are not showing fav- collections or certain deemphasized collections in facets
181
+ castedBuckets = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.filter(bucket => {
182
+ var _a;
183
+ const bucketKey = (_a = bucket === null || bucket === void 0 ? void 0 : bucket.key) === null || _a === void 0 ? void 0 : _a.toString();
184
+ return (!suppressedCollections[bucketKey] && !(bucketKey === null || bucketKey === void 0 ? void 0 : bucketKey.startsWith('fav-')));
185
+ });
186
+ // asynchronously load the collection name
187
+ this.preloadCollectionNames(castedBuckets);
188
+ }
189
+ // find length and pagination size for modal pagination
190
+ const { length } = Object.keys(castedBuckets);
191
+ this.paginationSize = Math.ceil(length / this.facetsPerPage);
192
+ // render only items which will be visible as per this.facetsPerPage
193
+ const bucketsMaxSix = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.slice((this.pageNumber - 1) * this.facetsPerPage, this.pageNumber * this.facetsPerPage);
194
+ const facetBucket = bucketsMaxSix.map(bucket => {
195
+ var _a, _b;
196
+ let bucketKey = bucket.key;
197
+ // for languages, we need to search by language code instead of the
198
+ // display name, which is what we get from the search engine result
199
+ if (option === 'language') {
200
+ bucketKey =
201
+ (_b = (_a = this.languageCodeHandler) === null || _a === void 0 ? void 0 : _a.getCodeStringFromLanguageName(`${bucket.key}`)) !== null && _b !== void 0 ? _b : bucket.key;
202
+ }
203
+ return {
204
+ displayText: `${bucket.key}`,
205
+ key: `${bucketKey}`,
206
+ count: bucket.doc_count,
207
+ state: 'none',
208
+ };
209
+ });
210
+ const group = {
211
+ title: this.facetGroupTitle,
212
+ key: option,
213
+ buckets: facetBucket,
214
+ };
215
+ facetGroups.push(group);
216
+ });
217
+ return facetGroups;
218
+ }
219
+ /**
220
+ * for collections, we need to asynchronously load the collection name
221
+ * so we use the `async-collection-name` widget and for the rest, we have a static value to use
222
+ *
223
+ * @param castedBuckets
224
+ */
225
+ preloadCollectionNames(castedBuckets) {
226
+ var _a;
227
+ const collectionIds = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.map(option => option.key);
228
+ const collectionIdsArray = Array.from(new Set(collectionIds));
229
+ (_a = this.collectionNameCache) === null || _a === void 0 ? void 0 : _a.preloadIdentifiers(collectionIdsArray);
230
+ }
231
+ get getMoreFacetsTemplate() {
232
+ var _a;
233
233
  return html `
234
234
  <facets-template
235
235
  .facetGroup=${(_a = this.mergedFacets) === null || _a === void 0 ? void 0 : _a.shift()}
236
236
  .selectedFacets=${this.selectedFacets}
237
237
  .renderOn=${'modal'}
238
238
  .collectionNameCache=${this.collectionNameCache}
239
- @selectedFacetsChanged=${(e) => {
240
- this.selectedFacets = e.detail;
239
+ @selectedFacetsChanged=${(e) => {
240
+ this.selectedFacets = e.detail;
241
241
  }}
242
242
  ></facets-template>
243
- `;
244
- }
245
- get loaderTemplate() {
243
+ `;
244
+ }
245
+ get loaderTemplate() {
246
246
  return html `<div class="facets-loader">
247
247
  <ia-activity-indicator .mode=${'processing'}></ia-activity-indicator>
248
- </div> `;
249
- }
250
- // render pagination if more then 1 page
251
- get facetsPaginationTemplate() {
252
- return this.paginationSize > 1
248
+ </div> `;
249
+ }
250
+ // render pagination if more then 1 page
251
+ get facetsPaginationTemplate() {
252
+ return this.paginationSize > 1
253
253
  ? html `<more-facets-pagination
254
254
  .size=${this.paginationSize}
255
255
  .currentPage=${1}
256
256
  @pageNumberClicked=${this.pageNumberClicked}
257
- ></more-facets-pagination>`
258
- : nothing;
259
- }
260
- get footerTemplate() {
261
- if (this.paginationSize > 0) {
257
+ ></more-facets-pagination>`
258
+ : nothing;
259
+ }
260
+ get footerTemplate() {
261
+ if (this.paginationSize > 0) {
262
262
  return html `${this.facetsPaginationTemplate}
263
263
  <div class="footer">
264
264
  <button
@@ -275,19 +275,19 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
275
275
  >
276
276
  Apply filters
277
277
  </button>
278
- </div> `;
279
- }
280
- return nothing;
281
- }
282
- sortFacetAggregation() {
283
- this.sortedBy = this.sortedBy === 'count' ? 'alpha' : 'count';
284
- this.dispatchEvent(new CustomEvent('sortedFacets', { detail: this.sortedBy }));
285
- }
286
- get getModalHeaderTemplate() {
287
- const title = this.sortedBy === 'alpha' ? 'Sort by count' : 'Sort by alphabetically';
288
- const image = this.sortedBy === 'alpha'
289
- ? 'https://archive.org/images/filter-alpha.png'
290
- : 'https://archive.org/images/filter-count.png';
278
+ </div> `;
279
+ }
280
+ return nothing;
281
+ }
282
+ sortFacetAggregation() {
283
+ this.sortedBy = this.sortedBy === 'count' ? 'alpha' : 'count';
284
+ this.dispatchEvent(new CustomEvent('sortedFacets', { detail: this.sortedBy }));
285
+ }
286
+ get getModalHeaderTemplate() {
287
+ const title = this.sortedBy === 'alpha' ? 'Sort by count' : 'Sort by alphabetically';
288
+ const image = this.sortedBy === 'alpha'
289
+ ? 'https://archive.org/images/filter-alpha.png'
290
+ : 'https://archive.org/images/filter-count.png';
291
291
  return html `<span class="sr-only">More facets for:</span>
292
292
  <span class="title">
293
293
  ${this.facetGroupTitle}
@@ -299,12 +299,12 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
299
299
  title=${title}
300
300
  alt="sort facets"
301
301
  />
302
- </span> `;
303
- }
304
- render() {
302
+ </span> `;
303
+ }
304
+ render() {
305
305
  return html `
306
- ${this.facetsLoading
307
- ? this.loaderTemplate
306
+ ${this.facetsLoading
307
+ ? this.loaderTemplate
308
308
  : html `
309
309
  <section id="more-facets">
310
310
  <div class="header-content">${this.getModalHeaderTemplate}</div>
@@ -312,34 +312,34 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
312
312
  ${this.footerTemplate}
313
313
  </section>
314
314
  `}
315
- `;
316
- }
317
- applySearchFacetsClicked() {
318
- var _a, _b;
319
- const event = new CustomEvent('facetsChanged', {
320
- detail: this.selectedFacets,
321
- bubbles: true,
322
- composed: true,
323
- });
324
- this.dispatchEvent(event);
325
- (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
326
- (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
327
- category: analyticsCategories.default,
328
- action: `${analyticsActions.applyMoreFacetsModal}`,
329
- label: `${this.facetKey}`,
330
- });
331
- }
332
- cancelClick() {
333
- var _a, _b;
334
- (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
335
- (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
336
- category: analyticsCategories.default,
337
- action: analyticsActions.closeMoreFacetsModal,
338
- label: `${this.facetKey}`,
339
- });
340
- }
341
- static get styles() {
342
- const modalSubmitButton = css `var(--primaryButtonBGColor, #194880)`;
315
+ `;
316
+ }
317
+ applySearchFacetsClicked() {
318
+ var _a, _b;
319
+ const event = new CustomEvent('facetsChanged', {
320
+ detail: this.selectedFacets,
321
+ bubbles: true,
322
+ composed: true,
323
+ });
324
+ this.dispatchEvent(event);
325
+ (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
326
+ (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
327
+ category: analyticsCategories.default,
328
+ action: `${analyticsActions.applyMoreFacetsModal}`,
329
+ label: `${this.facetKey}`,
330
+ });
331
+ }
332
+ cancelClick() {
333
+ var _a, _b;
334
+ (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
335
+ (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
336
+ category: analyticsCategories.default,
337
+ action: analyticsActions.closeMoreFacetsModal,
338
+ label: `${this.facetKey}`,
339
+ });
340
+ }
341
+ static get styles() {
342
+ const modalSubmitButton = css `var(--primaryButtonBGColor, #194880)`;
343
343
  return css `
344
344
  @media (max-width: 560px) {
345
345
  section#more-facets {
@@ -425,68 +425,68 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
425
425
  vertical-align: baseline;
426
426
  cursor: pointer;
427
427
  }
428
- `;
429
- }
430
- };
431
- __decorate([
432
- property({ type: String })
433
- ], MoreFacetsContent.prototype, "facetKey", void 0);
434
- __decorate([
435
- property({ type: String })
436
- ], MoreFacetsContent.prototype, "facetAggregationKey", void 0);
437
- __decorate([
438
- property({ type: String })
439
- ], MoreFacetsContent.prototype, "query", void 0);
440
- __decorate([
441
- property({ type: Object })
442
- ], MoreFacetsContent.prototype, "filterMap", void 0);
443
- __decorate([
444
- property({ type: Object })
445
- ], MoreFacetsContent.prototype, "modalManager", void 0);
446
- __decorate([
447
- property({ type: Object })
448
- ], MoreFacetsContent.prototype, "searchService", void 0);
449
- __decorate([
450
- property({ type: String })
451
- ], MoreFacetsContent.prototype, "searchType", void 0);
452
- __decorate([
453
- property({ type: Object })
454
- ], MoreFacetsContent.prototype, "collectionNameCache", void 0);
455
- __decorate([
456
- property({ type: Object })
457
- ], MoreFacetsContent.prototype, "languageCodeHandler", void 0);
458
- __decorate([
459
- property({ type: Object })
460
- ], MoreFacetsContent.prototype, "selectedFacets", void 0);
461
- __decorate([
462
- property({ type: String })
463
- ], MoreFacetsContent.prototype, "sortedBy", void 0);
464
- __decorate([
465
- property({ type: Object, attribute: false })
466
- ], MoreFacetsContent.prototype, "analyticsHandler", void 0);
467
- __decorate([
468
- state()
469
- ], MoreFacetsContent.prototype, "aggregations", void 0);
470
- __decorate([
471
- state()
472
- ], MoreFacetsContent.prototype, "facetGroup", void 0);
473
- __decorate([
474
- state()
475
- ], MoreFacetsContent.prototype, "facetGroupTitle", void 0);
476
- __decorate([
477
- state()
478
- ], MoreFacetsContent.prototype, "pageNumber", void 0);
479
- __decorate([
480
- state()
481
- ], MoreFacetsContent.prototype, "facetsLoading", void 0);
482
- __decorate([
483
- state()
484
- ], MoreFacetsContent.prototype, "paginationSize", void 0);
485
- __decorate([
486
- state()
487
- ], MoreFacetsContent.prototype, "facetsType", void 0);
488
- MoreFacetsContent = __decorate([
489
- customElement('more-facets-content')
490
- ], MoreFacetsContent);
491
- export { MoreFacetsContent };
428
+ `;
429
+ }
430
+ };
431
+ __decorate([
432
+ property({ type: String })
433
+ ], MoreFacetsContent.prototype, "facetKey", void 0);
434
+ __decorate([
435
+ property({ type: String })
436
+ ], MoreFacetsContent.prototype, "facetAggregationKey", void 0);
437
+ __decorate([
438
+ property({ type: String })
439
+ ], MoreFacetsContent.prototype, "query", void 0);
440
+ __decorate([
441
+ property({ type: Object })
442
+ ], MoreFacetsContent.prototype, "filterMap", void 0);
443
+ __decorate([
444
+ property({ type: Object })
445
+ ], MoreFacetsContent.prototype, "modalManager", void 0);
446
+ __decorate([
447
+ property({ type: Object })
448
+ ], MoreFacetsContent.prototype, "searchService", void 0);
449
+ __decorate([
450
+ property({ type: String })
451
+ ], MoreFacetsContent.prototype, "searchType", void 0);
452
+ __decorate([
453
+ property({ type: Object })
454
+ ], MoreFacetsContent.prototype, "collectionNameCache", void 0);
455
+ __decorate([
456
+ property({ type: Object })
457
+ ], MoreFacetsContent.prototype, "languageCodeHandler", void 0);
458
+ __decorate([
459
+ property({ type: Object })
460
+ ], MoreFacetsContent.prototype, "selectedFacets", void 0);
461
+ __decorate([
462
+ property({ type: String })
463
+ ], MoreFacetsContent.prototype, "sortedBy", void 0);
464
+ __decorate([
465
+ property({ type: Object, attribute: false })
466
+ ], MoreFacetsContent.prototype, "analyticsHandler", void 0);
467
+ __decorate([
468
+ state()
469
+ ], MoreFacetsContent.prototype, "aggregations", void 0);
470
+ __decorate([
471
+ state()
472
+ ], MoreFacetsContent.prototype, "facetGroup", void 0);
473
+ __decorate([
474
+ state()
475
+ ], MoreFacetsContent.prototype, "facetGroupTitle", void 0);
476
+ __decorate([
477
+ state()
478
+ ], MoreFacetsContent.prototype, "pageNumber", void 0);
479
+ __decorate([
480
+ state()
481
+ ], MoreFacetsContent.prototype, "facetsLoading", void 0);
482
+ __decorate([
483
+ state()
484
+ ], MoreFacetsContent.prototype, "paginationSize", void 0);
485
+ __decorate([
486
+ state()
487
+ ], MoreFacetsContent.prototype, "facetsType", void 0);
488
+ MoreFacetsContent = __decorate([
489
+ customElement('more-facets-content')
490
+ ], MoreFacetsContent);
491
+ export { MoreFacetsContent };
492
492
  //# sourceMappingURL=more-facets-content.js.map