@internetarchive/collection-browser 0.4.6 → 0.4.8-alpha.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.
Files changed (231) 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 -50
  12. package/dist/src/app-root.js +278 -278
  13. package/dist/src/assets/img/icons/arrow-left.d.ts +2 -2
  14. package/dist/src/assets/img/icons/arrow-left.js +2 -2
  15. package/dist/src/assets/img/icons/arrow-right.d.ts +2 -2
  16. package/dist/src/assets/img/icons/arrow-right.js +2 -2
  17. package/dist/src/assets/img/icons/chevron.d.ts +2 -2
  18. package/dist/src/assets/img/icons/chevron.js +2 -2
  19. package/dist/src/assets/img/icons/empty-query.d.ts +2 -2
  20. package/dist/src/assets/img/icons/empty-query.js +2 -2
  21. package/dist/src/assets/img/icons/eye-closed.d.ts +2 -2
  22. package/dist/src/assets/img/icons/eye-closed.js +2 -2
  23. package/dist/src/assets/img/icons/eye.d.ts +2 -2
  24. package/dist/src/assets/img/icons/eye.js +2 -2
  25. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
  26. package/dist/src/assets/img/icons/favorite-filled.js +2 -2
  27. package/dist/src/assets/img/icons/login-required.d.ts +1 -1
  28. package/dist/src/assets/img/icons/login-required.js +2 -2
  29. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
  30. package/dist/src/assets/img/icons/mediatype/account.js +2 -2
  31. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
  32. package/dist/src/assets/img/icons/mediatype/audio.js +2 -2
  33. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
  34. package/dist/src/assets/img/icons/mediatype/collection.js +2 -2
  35. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
  36. package/dist/src/assets/img/icons/mediatype/data.js +2 -2
  37. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
  38. package/dist/src/assets/img/icons/mediatype/etree.js +2 -2
  39. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
  40. package/dist/src/assets/img/icons/mediatype/film.js +2 -2
  41. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
  42. package/dist/src/assets/img/icons/mediatype/images.js +2 -2
  43. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
  44. package/dist/src/assets/img/icons/mediatype/radio.js +2 -2
  45. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
  46. package/dist/src/assets/img/icons/mediatype/software.js +2 -2
  47. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
  48. package/dist/src/assets/img/icons/mediatype/texts.js +2 -2
  49. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
  50. package/dist/src/assets/img/icons/mediatype/tv.js +2 -2
  51. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
  52. package/dist/src/assets/img/icons/mediatype/video.js +2 -2
  53. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
  54. package/dist/src/assets/img/icons/mediatype/web.js +2 -2
  55. package/dist/src/assets/img/icons/null-result.d.ts +2 -2
  56. package/dist/src/assets/img/icons/null-result.js +2 -2
  57. package/dist/src/assets/img/icons/restricted.d.ts +1 -1
  58. package/dist/src/assets/img/icons/restricted.js +2 -2
  59. package/dist/src/assets/img/icons/reviews.d.ts +1 -1
  60. package/dist/src/assets/img/icons/reviews.js +2 -2
  61. package/dist/src/assets/img/icons/upload.d.ts +1 -1
  62. package/dist/src/assets/img/icons/upload.js +2 -2
  63. package/dist/src/assets/img/icons/views.d.ts +1 -1
  64. package/dist/src/assets/img/icons/views.js +2 -2
  65. package/dist/src/circular-activity-indicator.d.ts +5 -5
  66. package/dist/src/circular-activity-indicator.js +17 -17
  67. package/dist/src/collection-browser.d.ts +277 -277
  68. package/dist/src/collection-browser.js +1195 -1194
  69. package/dist/src/collection-browser.js.map +1 -1
  70. package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -5
  71. package/dist/src/collection-facets/facet-tombstone-row.js +15 -15
  72. package/dist/src/collection-facets/facets-template.d.ts +16 -16
  73. package/dist/src/collection-facets/facets-template.js +125 -125
  74. package/dist/src/collection-facets/more-facets-content.d.ts +77 -77
  75. package/dist/src/collection-facets/more-facets-content.js +376 -365
  76. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  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 +77 -78
  80. package/dist/src/collection-facets.js +383 -400
  81. package/dist/src/collection-facets.js.map +1 -1
  82. package/dist/src/empty-placeholder.d.ts +11 -11
  83. package/dist/src/empty-placeholder.js +42 -42
  84. package/dist/src/language-code-handler/language-code-handler.d.ts +37 -37
  85. package/dist/src/language-code-handler/language-code-handler.js +26 -26
  86. package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -1
  87. package/dist/src/language-code-handler/language-code-mapping.js +562 -562
  88. package/dist/src/mediatype/mediatype-config.d.ts +3 -3
  89. package/dist/src/mediatype/mediatype-config.js +85 -85
  90. package/dist/src/models.d.ts +114 -114
  91. package/dist/src/models.js +125 -125
  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 +438 -438
  106. package/dist/src/styles/item-image-styles.d.ts +8 -8
  107. package/dist/src/styles/item-image-styles.js +9 -9
  108. package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -5
  109. package/dist/src/tiles/collection-browser-loading-tile.js +15 -15
  110. package/dist/src/tiles/grid/account-tile.d.ts +17 -17
  111. package/dist/src/tiles/grid/account-tile.js +46 -46
  112. package/dist/src/tiles/grid/collection-tile.d.ts +14 -14
  113. package/dist/src/tiles/grid/collection-tile.js +53 -53
  114. package/dist/src/tiles/grid/item-tile.d.ts +29 -29
  115. package/dist/src/tiles/grid/item-tile.js +108 -108
  116. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -1
  117. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +7 -7
  118. package/dist/src/tiles/grid/tile-stats.d.ts +10 -10
  119. package/dist/src/tiles/grid/tile-stats.js +40 -40
  120. package/dist/src/tiles/hover/hover-pane-controller.d.ts +197 -197
  121. package/dist/src/tiles/hover/hover-pane-controller.js +331 -331
  122. package/dist/src/tiles/hover/tile-hover-pane.d.ts +15 -15
  123. package/dist/src/tiles/hover/tile-hover-pane.js +38 -38
  124. package/dist/src/tiles/image-block.d.ts +17 -17
  125. package/dist/src/tiles/image-block.js +72 -72
  126. package/dist/src/tiles/item-image.d.ts +35 -35
  127. package/dist/src/tiles/item-image.js +117 -117
  128. package/dist/src/tiles/list/account-label.d.ts +1 -1
  129. package/dist/src/tiles/list/account-label.js +6 -6
  130. package/dist/src/tiles/list/date-label.d.ts +1 -1
  131. package/dist/src/tiles/list/date-label.js +12 -12
  132. package/dist/src/tiles/list/tile-list-compact-header.d.ts +12 -12
  133. package/dist/src/tiles/list/tile-list-compact-header.js +41 -41
  134. package/dist/src/tiles/list/tile-list-compact.d.ts +21 -21
  135. package/dist/src/tiles/list/tile-list-compact.js +99 -99
  136. package/dist/src/tiles/list/tile-list.d.ts +55 -55
  137. package/dist/src/tiles/list/tile-list.js +297 -296
  138. package/dist/src/tiles/list/tile-list.js.map +1 -1
  139. package/dist/src/tiles/mediatype-icon.d.ts +9 -9
  140. package/dist/src/tiles/mediatype-icon.js +47 -47
  141. package/dist/src/tiles/overlay/icon-overlay.d.ts +10 -10
  142. package/dist/src/tiles/overlay/icon-overlay.js +40 -40
  143. package/dist/src/tiles/overlay/icon-text-overlay.d.ts +9 -9
  144. package/dist/src/tiles/overlay/icon-text-overlay.js +38 -38
  145. package/dist/src/tiles/overlay/text-overlay.d.ts +10 -10
  146. package/dist/src/tiles/overlay/text-overlay.js +42 -42
  147. package/dist/src/tiles/text-snippet-block.d.ts +27 -27
  148. package/dist/src/tiles/text-snippet-block.js +73 -73
  149. package/dist/src/tiles/tile-dispatcher.d.ts +55 -55
  150. package/dist/src/tiles/tile-dispatcher.js +176 -176
  151. package/dist/src/utils/analytics-events.d.ts +22 -22
  152. package/dist/src/utils/analytics-events.js +24 -24
  153. package/dist/src/utils/format-count.d.ts +7 -7
  154. package/dist/src/utils/format-count.js +76 -76
  155. package/dist/src/utils/format-date.d.ts +2 -2
  156. package/dist/src/utils/format-date.js +23 -23
  157. package/dist/src/utils/format-unit-size.d.ts +2 -2
  158. package/dist/src/utils/format-unit-size.js +33 -33
  159. package/dist/test/collection-browser.test.d.ts +1 -1
  160. package/dist/test/collection-browser.test.js +584 -584
  161. package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
  162. package/dist/test/collection-facets/facets-template.test.js +62 -62
  163. package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
  164. package/dist/test/collection-facets/more-facets-content.test.js +114 -114
  165. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -1
  166. package/dist/test/collection-facets/more-facets-pagination.test.js +117 -117
  167. package/dist/test/collection-facets.test.d.ts +2 -2
  168. package/dist/test/collection-facets.test.js +508 -544
  169. package/dist/test/collection-facets.test.js.map +1 -1
  170. package/dist/test/empty-placeholder.test.d.ts +1 -1
  171. package/dist/test/empty-placeholder.test.js +33 -33
  172. package/dist/test/icon-overlay.test.d.ts +1 -1
  173. package/dist/test/icon-overlay.test.js +24 -24
  174. package/dist/test/image-block.test.d.ts +1 -1
  175. package/dist/test/image-block.test.js +48 -48
  176. package/dist/test/item-image.test.d.ts +1 -1
  177. package/dist/test/item-image.test.js +84 -84
  178. package/dist/test/mediatype-config.test.d.ts +1 -1
  179. package/dist/test/mediatype-config.test.js +16 -16
  180. package/dist/test/mocks/mock-analytics-handler.d.ts +10 -10
  181. package/dist/test/mocks/mock-analytics-handler.js +15 -15
  182. package/dist/test/mocks/mock-collection-name-cache.d.ts +7 -7
  183. package/dist/test/mocks/mock-collection-name-cache.js +13 -13
  184. package/dist/test/mocks/mock-search-responses.d.ts +12 -12
  185. package/dist/test/mocks/mock-search-responses.js +341 -341
  186. package/dist/test/mocks/mock-search-service.d.ts +13 -13
  187. package/dist/test/mocks/mock-search-service.js +40 -40
  188. package/dist/test/restoration-state-handler.test.d.ts +1 -1
  189. package/dist/test/restoration-state-handler.test.js +125 -125
  190. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -1
  191. package/dist/test/sort-filter-bar/alpha-bar.test.js +43 -43
  192. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -1
  193. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +197 -197
  194. package/dist/test/text-overlay.test.d.ts +1 -1
  195. package/dist/test/text-overlay.test.js +48 -48
  196. package/dist/test/text-snippet-block.test.d.ts +1 -1
  197. package/dist/test/text-snippet-block.test.js +57 -57
  198. package/dist/test/tile-stats.test.d.ts +1 -1
  199. package/dist/test/tile-stats.test.js +33 -33
  200. package/dist/test/tiles/grid/account-tile.test.d.ts +1 -1
  201. package/dist/test/tiles/grid/account-tile.test.js +60 -60
  202. package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -1
  203. package/dist/test/tiles/grid/collection-tile.test.js +57 -57
  204. package/dist/test/tiles/grid/item-tile.test.d.ts +1 -1
  205. package/dist/test/tiles/grid/item-tile.test.js +142 -142
  206. package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +1 -1
  207. package/dist/test/tiles/hover/hover-pane-controller.test.js +257 -257
  208. package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +1 -1
  209. package/dist/test/tiles/hover/tile-hover-pane.test.js +13 -13
  210. package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -1
  211. package/dist/test/tiles/list/tile-list-compact.test.js +92 -92
  212. package/dist/test/tiles/list/tile-list.test.d.ts +1 -1
  213. package/dist/test/tiles/list/tile-list.test.js +153 -153
  214. package/dist/test/utils/format-count.test.d.ts +1 -1
  215. package/dist/test/utils/format-count.test.js +23 -23
  216. package/dist/test/utils/format-date.test.d.ts +1 -1
  217. package/dist/test/utils/format-date.test.js +17 -17
  218. package/dist/test/utils/format-unit-size.test.d.ts +1 -1
  219. package/dist/test/utils/format-unit-size.test.js +17 -17
  220. package/local.archive.org.cert +86 -86
  221. package/local.archive.org.key +27 -27
  222. package/package.json +1 -1
  223. package/renovate.json +6 -6
  224. package/src/collection-browser.ts +1 -0
  225. package/src/collection-facets/more-facets-content.ts +24 -16
  226. package/src/collection-facets.ts +0 -20
  227. package/src/tiles/list/tile-list.ts +3 -1
  228. package/test/collection-facets.test.ts +0 -46
  229. package/tsconfig.json +21 -21
  230. package/web-dev-server.config.mjs +30 -30
  231. 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,36 +275,34 @@ 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 value';
291
288
  return html `<span class="sr-only">More facets for:</span>
292
289
  <span class="title">
293
290
  ${this.facetGroupTitle}
294
- <input
295
- class="sorting-icon"
296
- type="image"
297
- @click=${() => this.sortFacetAggregation()}
298
- src="${image}"
299
- title=${title}
300
- alt="sort facets"
301
- />
302
- </span> `;
303
- }
304
- render() {
291
+ <button
292
+ class="sort-button"
293
+ @click=${(e) => {
294
+ e.preventDefault();
295
+ this.sortFacetAggregation();
296
+ }}
297
+ >
298
+ ${title}
299
+ </button>
300
+ </span>`;
301
+ }
302
+ render() {
305
303
  return html `
306
- ${this.facetsLoading
307
- ? this.loaderTemplate
304
+ ${this.facetsLoading
305
+ ? this.loaderTemplate
308
306
  : html `
309
307
  <section id="more-facets">
310
308
  <div class="header-content">${this.getModalHeaderTemplate}</div>
@@ -312,34 +310,34 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
312
310
  ${this.footerTemplate}
313
311
  </section>
314
312
  `}
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)`;
313
+ `;
314
+ }
315
+ applySearchFacetsClicked() {
316
+ var _a, _b;
317
+ const event = new CustomEvent('facetsChanged', {
318
+ detail: this.selectedFacets,
319
+ bubbles: true,
320
+ composed: true,
321
+ });
322
+ this.dispatchEvent(event);
323
+ (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
324
+ (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
325
+ category: analyticsCategories.default,
326
+ action: `${analyticsActions.applyMoreFacetsModal}`,
327
+ label: `${this.facetKey}`,
328
+ });
329
+ }
330
+ cancelClick() {
331
+ var _a, _b;
332
+ (_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.closeModal();
333
+ (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
334
+ category: analyticsCategories.default,
335
+ action: analyticsActions.closeMoreFacetsModal,
336
+ label: `${this.facetKey}`,
337
+ });
338
+ }
339
+ static get styles() {
340
+ const modalSubmitButton = css `var(--primaryButtonBGColor, #194880)`;
343
341
  return css `
344
342
  @media (max-width: 560px) {
345
343
  section#more-facets {
@@ -361,6 +359,19 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
361
359
  padding: 0 10px;
362
360
  font-weight: bold;
363
361
  }
362
+ .sort-button {
363
+ margin-left: 0.7rem;
364
+ padding: 0;
365
+ border: none;
366
+ background: transparent;
367
+ color: var(--ia-theme-link-color, #4b64ff);
368
+ font-size: 1.3rem;
369
+ font-weight: normal;
370
+ cursor: pointer;
371
+ }
372
+ .sort-button:hover {
373
+ text-decoration: underline;
374
+ }
364
375
  .facets-content {
365
376
  font-size: 1.2rem;
366
377
  max-height: 300px;
@@ -425,68 +436,68 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
425
436
  vertical-align: baseline;
426
437
  cursor: pointer;
427
438
  }
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 };
439
+ `;
440
+ }
441
+ };
442
+ __decorate([
443
+ property({ type: String })
444
+ ], MoreFacetsContent.prototype, "facetKey", void 0);
445
+ __decorate([
446
+ property({ type: String })
447
+ ], MoreFacetsContent.prototype, "facetAggregationKey", void 0);
448
+ __decorate([
449
+ property({ type: String })
450
+ ], MoreFacetsContent.prototype, "query", void 0);
451
+ __decorate([
452
+ property({ type: Object })
453
+ ], MoreFacetsContent.prototype, "filterMap", void 0);
454
+ __decorate([
455
+ property({ type: Object })
456
+ ], MoreFacetsContent.prototype, "modalManager", void 0);
457
+ __decorate([
458
+ property({ type: Object })
459
+ ], MoreFacetsContent.prototype, "searchService", void 0);
460
+ __decorate([
461
+ property({ type: String })
462
+ ], MoreFacetsContent.prototype, "searchType", void 0);
463
+ __decorate([
464
+ property({ type: Object })
465
+ ], MoreFacetsContent.prototype, "collectionNameCache", void 0);
466
+ __decorate([
467
+ property({ type: Object })
468
+ ], MoreFacetsContent.prototype, "languageCodeHandler", void 0);
469
+ __decorate([
470
+ property({ type: Object })
471
+ ], MoreFacetsContent.prototype, "selectedFacets", void 0);
472
+ __decorate([
473
+ property({ type: String })
474
+ ], MoreFacetsContent.prototype, "sortedBy", void 0);
475
+ __decorate([
476
+ property({ type: Object, attribute: false })
477
+ ], MoreFacetsContent.prototype, "analyticsHandler", void 0);
478
+ __decorate([
479
+ state()
480
+ ], MoreFacetsContent.prototype, "aggregations", void 0);
481
+ __decorate([
482
+ state()
483
+ ], MoreFacetsContent.prototype, "facetGroup", void 0);
484
+ __decorate([
485
+ state()
486
+ ], MoreFacetsContent.prototype, "facetGroupTitle", void 0);
487
+ __decorate([
488
+ state()
489
+ ], MoreFacetsContent.prototype, "pageNumber", void 0);
490
+ __decorate([
491
+ state()
492
+ ], MoreFacetsContent.prototype, "facetsLoading", void 0);
493
+ __decorate([
494
+ state()
495
+ ], MoreFacetsContent.prototype, "paginationSize", void 0);
496
+ __decorate([
497
+ state()
498
+ ], MoreFacetsContent.prototype, "facetsType", void 0);
499
+ MoreFacetsContent = __decorate([
500
+ customElement('more-facets-content')
501
+ ], MoreFacetsContent);
502
+ export { MoreFacetsContent };
492
503
  //# sourceMappingURL=more-facets-content.js.map