@internetarchive/collection-browser 2.4.1-e2e-test-2 → 2.5.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +29 -29
- package/.husky/pre-commit +4 -4
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/index.d.ts +12 -12
- package/dist/index.js +12 -12
- package/dist/src/app-root.d.ts +91 -91
- package/dist/src/app-root.js +487 -487
- package/dist/src/assets/img/icons/arrow-left.d.ts +2 -2
- package/dist/src/assets/img/icons/arrow-left.js +2 -2
- package/dist/src/assets/img/icons/arrow-right.d.ts +2 -2
- package/dist/src/assets/img/icons/arrow-right.js +2 -2
- package/dist/src/assets/img/icons/chevron.d.ts +2 -2
- package/dist/src/assets/img/icons/chevron.js +2 -2
- package/dist/src/assets/img/icons/contract.d.ts +2 -2
- package/dist/src/assets/img/icons/contract.js +2 -2
- package/dist/src/assets/img/icons/empty-query.d.ts +2 -2
- package/dist/src/assets/img/icons/empty-query.js +2 -2
- package/dist/src/assets/img/icons/expand.d.ts +2 -2
- package/dist/src/assets/img/icons/expand.js +2 -2
- package/dist/src/assets/img/icons/eye-closed.d.ts +2 -2
- package/dist/src/assets/img/icons/eye-closed.js +2 -2
- package/dist/src/assets/img/icons/eye.d.ts +2 -2
- package/dist/src/assets/img/icons/eye.js +2 -2
- package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
- package/dist/src/assets/img/icons/favorite-filled.js +2 -2
- package/dist/src/assets/img/icons/favorite-unfilled.d.ts +1 -1
- package/dist/src/assets/img/icons/favorite-unfilled.js +2 -2
- package/dist/src/assets/img/icons/login-required.d.ts +1 -1
- package/dist/src/assets/img/icons/login-required.js +2 -2
- package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/account.js +2 -2
- package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/audio.js +2 -2
- package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/collection.js +2 -2
- package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/data.js +2 -2
- package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/etree.js +2 -2
- package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/film.js +2 -2
- package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/images.js +2 -2
- package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/radio.js +2 -2
- package/dist/src/assets/img/icons/mediatype/search.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/search.js +2 -2
- package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/software.js +2 -2
- package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/texts.js +2 -2
- package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/tv.js +2 -2
- package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/video.js +2 -2
- package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
- package/dist/src/assets/img/icons/mediatype/web.js +2 -2
- package/dist/src/assets/img/icons/null-result.d.ts +2 -2
- package/dist/src/assets/img/icons/null-result.js +2 -2
- package/dist/src/assets/img/icons/restricted.d.ts +1 -1
- package/dist/src/assets/img/icons/restricted.js +2 -2
- package/dist/src/assets/img/icons/reviews.d.ts +1 -1
- package/dist/src/assets/img/icons/reviews.js +2 -2
- package/dist/src/assets/img/icons/upload.d.ts +1 -1
- package/dist/src/assets/img/icons/upload.js +2 -2
- package/dist/src/assets/img/icons/views.d.ts +1 -1
- package/dist/src/assets/img/icons/views.js +2 -2
- package/dist/src/circular-activity-indicator.d.ts +5 -5
- package/dist/src/circular-activity-indicator.js +17 -17
- package/dist/src/collection-browser.d.ts +564 -466
- package/dist/src/collection-browser.js +1568 -1479
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.d.ts +30 -30
- package/dist/src/collection-facets/facet-row.js +117 -116
- package/dist/src/collection-facets/facet-row.js.map +1 -1
- package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -5
- package/dist/src/collection-facets/facet-tombstone-row.js +15 -15
- package/dist/src/collection-facets/facets-template.d.ts +14 -17
- package/dist/src/collection-facets/facets-template.js +47 -144
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +106 -74
- package/dist/src/collection-facets/more-facets-content.js +425 -377
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -36
- package/dist/src/collection-facets/more-facets-pagination.js +196 -196
- package/dist/src/collection-facets/toggle-switch.d.ts +41 -41
- package/dist/src/collection-facets/toggle-switch.js +94 -94
- package/dist/src/collection-facets.d.ts +103 -103
- package/dist/src/collection-facets.js +514 -514
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +241 -241
- package/dist/src/data-source/collection-browser-data-source-interface.js +1 -1
- package/dist/src/data-source/collection-browser-data-source.d.ts +378 -378
- package/dist/src/data-source/collection-browser-data-source.js +985 -985
- package/dist/src/data-source/collection-browser-query-state.d.ts +43 -43
- package/dist/src/data-source/collection-browser-query-state.js +1 -1
- package/dist/src/data-source/models.d.ts +28 -28
- package/dist/src/data-source/models.js +8 -8
- package/dist/src/empty-placeholder.d.ts +23 -23
- package/dist/src/empty-placeholder.js +74 -74
- package/dist/src/expanded-date-picker.d.ts +43 -43
- package/dist/src/expanded-date-picker.js +109 -109
- package/dist/src/language-code-handler/language-code-handler.d.ts +37 -37
- package/dist/src/language-code-handler/language-code-handler.js +26 -26
- package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -1
- package/dist/src/language-code-handler/language-code-mapping.js +562 -562
- package/dist/src/manage/manage-bar.d.ts +30 -30
- package/dist/src/manage/manage-bar.js +61 -61
- package/dist/src/mediatype/mediatype-config.d.ts +3 -3
- package/dist/src/mediatype/mediatype-config.js +91 -91
- package/dist/src/models.d.ts +209 -209
- package/dist/src/models.js +381 -381
- package/dist/src/restoration-state-handler.d.ts +70 -70
- package/dist/src/restoration-state-handler.js +357 -357
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +6 -6
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.js +24 -24
- package/dist/src/sort-filter-bar/alpha-bar.d.ts +21 -21
- package/dist/src/sort-filter-bar/alpha-bar.js +128 -128
- package/dist/src/sort-filter-bar/img/compact.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/compact.js +2 -2
- package/dist/src/sort-filter-bar/img/list.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/list.js +2 -2
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js +2 -2
- package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-down.js +2 -2
- package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-up.js +2 -2
- package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/sort-triangle.js +2 -2
- package/dist/src/sort-filter-bar/img/tile.d.ts +1 -1
- package/dist/src/sort-filter-bar/img/tile.js +2 -2
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +222 -222
- package/dist/src/sort-filter-bar/sort-filter-bar.js +696 -696
- package/dist/src/styles/ia-button.d.ts +2 -2
- package/dist/src/styles/ia-button.js +16 -16
- package/dist/src/styles/item-image-styles.d.ts +8 -8
- package/dist/src/styles/item-image-styles.js +9 -9
- package/dist/src/styles/sr-only.d.ts +1 -1
- package/dist/src/styles/sr-only.js +2 -2
- package/dist/src/tiles/base-tile-component.d.ts +19 -19
- package/dist/src/tiles/base-tile-component.js +63 -63
- package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -5
- package/dist/src/tiles/collection-browser-loading-tile.js +15 -15
- package/dist/src/tiles/grid/account-tile.d.ts +18 -18
- package/dist/src/tiles/grid/account-tile.js +72 -72
- package/dist/src/tiles/grid/collection-tile.d.ts +15 -15
- package/dist/src/tiles/grid/collection-tile.js +80 -80
- package/dist/src/tiles/grid/item-tile.d.ts +30 -30
- package/dist/src/tiles/grid/item-tile.js +149 -149
- package/dist/src/tiles/grid/search-tile.d.ts +10 -10
- package/dist/src/tiles/grid/search-tile.js +51 -51
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +8 -8
- package/dist/src/tiles/grid/tile-stats.d.ts +11 -11
- package/dist/src/tiles/grid/tile-stats.js +53 -53
- package/dist/src/tiles/hover/hover-pane-controller.d.ts +219 -219
- package/dist/src/tiles/hover/hover-pane-controller.js +352 -352
- package/dist/src/tiles/hover/tile-hover-pane.d.ts +18 -18
- package/dist/src/tiles/hover/tile-hover-pane.js +69 -69
- package/dist/src/tiles/image-block.d.ts +17 -17
- package/dist/src/tiles/image-block.js +73 -73
- package/dist/src/tiles/item-image.d.ts +39 -39
- package/dist/src/tiles/item-image.js +154 -154
- package/dist/src/tiles/list/tile-list-compact-header.d.ts +6 -6
- package/dist/src/tiles/list/tile-list-compact-header.js +38 -38
- package/dist/src/tiles/list/tile-list-compact.d.ts +15 -15
- package/dist/src/tiles/list/tile-list-compact.js +114 -114
- package/dist/src/tiles/list/tile-list.d.ts +50 -50
- package/dist/src/tiles/list/tile-list.js +315 -315
- package/dist/src/tiles/mediatype-icon.d.ts +9 -9
- package/dist/src/tiles/mediatype-icon.js +47 -47
- package/dist/src/tiles/overlay/icon-overlay.d.ts +10 -10
- package/dist/src/tiles/overlay/icon-overlay.js +40 -40
- package/dist/src/tiles/overlay/icon-text-overlay.d.ts +9 -9
- package/dist/src/tiles/overlay/icon-text-overlay.js +38 -38
- package/dist/src/tiles/overlay/text-overlay.d.ts +10 -10
- package/dist/src/tiles/overlay/text-overlay.js +42 -42
- package/dist/src/tiles/review-block.d.ts +12 -12
- package/dist/src/tiles/review-block.js +56 -56
- package/dist/src/tiles/text-snippet-block.d.ts +27 -27
- package/dist/src/tiles/text-snippet-block.js +73 -73
- package/dist/src/tiles/tile-dispatcher.d.ts +64 -64
- package/dist/src/tiles/tile-dispatcher.js +229 -229
- package/dist/src/tiles/tile-display-value-provider.d.ts +47 -47
- package/dist/src/tiles/tile-display-value-provider.js +94 -94
- package/dist/src/utils/analytics-events.d.ts +28 -28
- package/dist/src/utils/analytics-events.js +30 -30
- package/dist/src/utils/array-equals.d.ts +4 -4
- package/dist/src/utils/array-equals.js +10 -10
- package/dist/src/utils/collapse-repeated-quotes.d.ts +11 -11
- package/dist/src/utils/collapse-repeated-quotes.js +13 -13
- package/dist/src/utils/facet-utils.d.ts +83 -0
- package/dist/src/utils/facet-utils.js +147 -0
- package/dist/src/utils/facet-utils.js.map +1 -0
- package/dist/src/utils/format-count.d.ts +7 -7
- package/dist/src/utils/format-count.js +76 -76
- package/dist/src/utils/format-date.d.ts +2 -2
- package/dist/src/utils/format-date.js +25 -25
- package/dist/src/utils/format-unit-size.d.ts +2 -2
- package/dist/src/utils/format-unit-size.js +33 -33
- package/dist/src/utils/local-date-from-utc.d.ts +9 -9
- package/dist/src/utils/local-date-from-utc.js +15 -15
- package/dist/src/utils/log.d.ts +7 -7
- package/dist/src/utils/log.js +15 -15
- package/dist/src/utils/resolve-mediatype.d.ts +8 -8
- package/dist/src/utils/resolve-mediatype.js +23 -23
- package/dist/src/utils/sha1.d.ts +2 -2
- package/dist/src/utils/sha1.js +8 -8
- package/dist/test/collection-browser.test.d.ts +1 -1
- package/dist/test/collection-browser.test.js +1294 -1293
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/facet-row.test.d.ts +1 -1
- package/dist/test/collection-facets/facet-row.test.js +227 -203
- package/dist/test/collection-facets/facet-row.test.js.map +1 -1
- package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
- package/dist/test/collection-facets/facets-template.test.js +91 -114
- package/dist/test/collection-facets/facets-template.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +150 -141
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +117 -117
- package/dist/test/collection-facets/toggle-switch.test.d.ts +1 -1
- package/dist/test/collection-facets/toggle-switch.test.js +73 -73
- package/dist/test/collection-facets.test.d.ts +2 -2
- package/dist/test/collection-facets.test.js +652 -652
- package/dist/test/data-source/collection-browser-data-source.test.d.ts +1 -1
- package/dist/test/data-source/collection-browser-data-source.test.js +89 -89
- package/dist/test/empty-placeholder.test.d.ts +1 -1
- package/dist/test/empty-placeholder.test.js +63 -63
- package/dist/test/expanded-date-picker.test.d.ts +1 -1
- package/dist/test/expanded-date-picker.test.js +95 -95
- package/dist/test/icon-overlay.test.d.ts +1 -1
- package/dist/test/icon-overlay.test.js +24 -24
- package/dist/test/image-block.test.d.ts +1 -1
- package/dist/test/image-block.test.js +48 -48
- package/dist/test/item-image.test.d.ts +1 -1
- package/dist/test/item-image.test.js +85 -85
- package/dist/test/manage/manage-bar.test.d.ts +1 -1
- package/dist/test/manage/manage-bar.test.js +81 -81
- package/dist/test/mediatype-config.test.d.ts +1 -1
- package/dist/test/mediatype-config.test.js +16 -16
- package/dist/test/mocks/mock-analytics-handler.d.ts +10 -10
- package/dist/test/mocks/mock-analytics-handler.js +15 -15
- package/dist/test/mocks/mock-search-responses.d.ts +25 -24
- package/dist/test/mocks/mock-search-responses.js +942 -860
- package/dist/test/mocks/mock-search-responses.js.map +1 -1
- package/dist/test/mocks/mock-search-service.d.ts +15 -15
- package/dist/test/mocks/mock-search-service.js +54 -53
- package/dist/test/mocks/mock-search-service.js.map +1 -1
- package/dist/test/restoration-state-handler.test.d.ts +1 -1
- package/dist/test/restoration-state-handler.test.js +270 -270
- package/dist/test/review-block.test.d.ts +1 -1
- package/dist/test/review-block.test.js +44 -44
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +1 -1
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +12 -12
- package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -1
- package/dist/test/sort-filter-bar/alpha-bar.test.js +73 -73
- package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +426 -426
- package/dist/test/text-overlay.test.d.ts +1 -1
- package/dist/test/text-overlay.test.js +48 -48
- package/dist/test/text-snippet-block.test.d.ts +1 -1
- package/dist/test/text-snippet-block.test.js +57 -57
- package/dist/test/tile-stats.test.d.ts +1 -1
- package/dist/test/tile-stats.test.js +81 -81
- package/dist/test/tiles/grid/account-tile.test.d.ts +1 -1
- package/dist/test/tiles/grid/account-tile.test.js +76 -76
- package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -1
- package/dist/test/tiles/grid/collection-tile.test.js +73 -73
- package/dist/test/tiles/grid/item-tile.test.d.ts +1 -1
- package/dist/test/tiles/grid/item-tile.test.js +312 -312
- package/dist/test/tiles/grid/search-tile.test.d.ts +1 -1
- package/dist/test/tiles/grid/search-tile.test.js +51 -51
- package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +1 -1
- package/dist/test/tiles/hover/hover-pane-controller.test.js +259 -259
- package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +1 -1
- package/dist/test/tiles/hover/tile-hover-pane.test.js +56 -56
- package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -1
- package/dist/test/tiles/list/tile-list-compact.test.js +143 -143
- package/dist/test/tiles/list/tile-list.test.d.ts +1 -1
- package/dist/test/tiles/list/tile-list.test.js +297 -297
- package/dist/test/tiles/tile-dispatcher.test.d.ts +1 -1
- package/dist/test/tiles/tile-dispatcher.test.js +100 -100
- package/dist/test/tiles/tile-display-value-provider.test.d.ts +1 -1
- package/dist/test/tiles/tile-display-value-provider.test.js +141 -141
- package/dist/test/utils/array-equals.test.d.ts +1 -1
- package/dist/test/utils/array-equals.test.js +26 -26
- package/dist/test/utils/format-count.test.d.ts +1 -1
- package/dist/test/utils/format-count.test.js +23 -23
- package/dist/test/utils/format-date.test.d.ts +1 -1
- package/dist/test/utils/format-date.test.js +17 -17
- package/dist/test/utils/format-unit-size.test.d.ts +1 -1
- package/dist/test/utils/format-unit-size.test.js +17 -17
- package/dist/test/utils/local-date-from-utc.test.d.ts +1 -1
- package/dist/test/utils/local-date-from-utc.test.js +26 -26
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +1 -1
- package/renovate.json +6 -6
- package/src/collection-browser.ts +106 -19
- package/src/collection-facets/facet-row.ts +5 -4
- package/src/collection-facets/facets-template.ts +12 -114
- package/src/collection-facets/more-facets-content.ts +220 -144
- package/src/collection-facets.ts +24 -12
- package/src/utils/facet-utils.ts +182 -0
- package/test/collection-browser.test.ts +1 -0
- package/test/collection-facets/facet-row.test.ts +30 -6
- package/test/collection-facets/facets-template.test.ts +6 -32
- package/test/collection-facets/more-facets-content.test.ts +46 -35
- package/test/mocks/mock-search-responses.ts +86 -0
- package/test/mocks/mock-search-service.ts +2 -0
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
/* eslint-disable import/no-duplicates */
|
|
3
|
-
import { css, html, LitElement, nothing, } from 'lit';
|
|
4
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
5
|
-
import { map } from 'lit/directives/map.js';
|
|
6
|
-
import { ref } from 'lit/directives/ref.js';
|
|
7
|
-
import { msg } from '@lit/localize';
|
|
8
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
9
|
-
import '@internetarchive/histogram-date-range';
|
|
10
|
-
import '@internetarchive/feature-feedback';
|
|
11
|
-
import { ModalConfig, } from '@internetarchive/modal-manager';
|
|
12
|
-
import chevronIcon from './assets/img/icons/chevron';
|
|
13
|
-
import expandIcon from './assets/img/icons/expand';
|
|
14
|
-
import { facetDisplayOrder, facetTitles, lendingFacetDisplayNames, lendingFacetKeysVisibility, suppressedCollections, defaultFacetSort, } from './models';
|
|
15
|
-
import './collection-facets/more-facets-content';
|
|
16
|
-
import './collection-facets/facets-template';
|
|
17
|
-
import './collection-facets/facet-tombstone-row';
|
|
18
|
-
import './expanded-date-picker';
|
|
19
|
-
import { analyticsActions, analyticsCategories, } from './utils/analytics-events';
|
|
20
|
-
import { srOnlyStyle } from './styles/sr-only';
|
|
21
|
-
import { ExpandedDatePicker } from './expanded-date-picker';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
/* eslint-disable import/no-duplicates */
|
|
3
|
+
import { css, html, LitElement, nothing, } from 'lit';
|
|
4
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
5
|
+
import { map } from 'lit/directives/map.js';
|
|
6
|
+
import { ref } from 'lit/directives/ref.js';
|
|
7
|
+
import { msg } from '@lit/localize';
|
|
8
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
9
|
+
import '@internetarchive/histogram-date-range';
|
|
10
|
+
import '@internetarchive/feature-feedback';
|
|
11
|
+
import { ModalConfig, } from '@internetarchive/modal-manager';
|
|
12
|
+
import chevronIcon from './assets/img/icons/chevron';
|
|
13
|
+
import expandIcon from './assets/img/icons/expand';
|
|
14
|
+
import { facetDisplayOrder, facetTitles, lendingFacetDisplayNames, lendingFacetKeysVisibility, suppressedCollections, defaultFacetSort, } from './models';
|
|
15
|
+
import './collection-facets/more-facets-content';
|
|
16
|
+
import './collection-facets/facets-template';
|
|
17
|
+
import './collection-facets/facet-tombstone-row';
|
|
18
|
+
import './expanded-date-picker';
|
|
19
|
+
import { analyticsActions, analyticsCategories, } from './utils/analytics-events';
|
|
20
|
+
import { srOnlyStyle } from './styles/sr-only';
|
|
21
|
+
import { ExpandedDatePicker } from './expanded-date-picker';
|
|
22
|
+
import { sortBucketsBySelectionState, updateSelectedFacetBucket, } from './utils/facet-utils';
|
|
23
|
+
let CollectionFacets = class CollectionFacets extends LitElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.moreLinksVisible = true;
|
|
27
|
+
this.facetsLoading = false;
|
|
28
|
+
this.fullYearAggregationLoading = false;
|
|
29
|
+
this.collapsableFacets = false;
|
|
30
|
+
this.showHistogramDatePicker = false;
|
|
31
|
+
this.allowExpandingDatePicker = false;
|
|
32
|
+
this.parentCollections = [];
|
|
33
|
+
this.collectionPagePath = '/details/';
|
|
34
|
+
this.isManageView = false;
|
|
35
|
+
this.openFacets = {
|
|
36
|
+
subject: false,
|
|
37
|
+
lending: false,
|
|
38
|
+
mediatype: false,
|
|
39
|
+
language: false,
|
|
40
|
+
creator: false,
|
|
41
|
+
collection: false,
|
|
42
|
+
year: false,
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Maximum # of facet buckets to render per facet group
|
|
46
|
+
*/
|
|
47
|
+
this.allowedFacetCount = 6;
|
|
48
|
+
this.handleExpandedDatePickerClosed = () => {
|
|
49
|
+
var _a;
|
|
50
|
+
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.remove('expanded-date-picker');
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Dispatches a `histogramDateRangeUpdated` event with the date range copied from the
|
|
54
|
+
* input event.
|
|
55
|
+
*
|
|
56
|
+
* Arrow function to ensure `this` is always bound to the current component.
|
|
57
|
+
*/
|
|
58
|
+
this.histogramDateRangeUpdated = (e) => {
|
|
59
|
+
const { minDate, maxDate } = e.detail;
|
|
60
|
+
const event = new CustomEvent('histogramDateRangeUpdated', {
|
|
61
|
+
detail: { minDate, maxDate },
|
|
62
|
+
});
|
|
63
|
+
this.dispatchEvent(event);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
const containerClasses = classMap({
|
|
68
|
+
loading: this.facetsLoading,
|
|
69
|
+
managing: this.isManageView,
|
|
70
|
+
});
|
|
71
|
+
const datePickerLabelId = 'date-picker-label';
|
|
71
72
|
return html `
|
|
72
73
|
<div id="container" class=${containerClasses}>
|
|
73
|
-
${this.showHistogramDatePicker &&
|
|
74
|
-
(this.fullYearsHistogramAggregation || this.fullYearAggregationLoading)
|
|
74
|
+
${this.showHistogramDatePicker &&
|
|
75
|
+
(this.fullYearsHistogramAggregation || this.fullYearAggregationLoading)
|
|
75
76
|
? html `
|
|
76
77
|
<section class="facet-group" aria-labelledby=${datePickerLabelId}>
|
|
77
78
|
<h3 id=${datePickerLabelId}>
|
|
@@ -80,32 +81,31 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
80
81
|
</h3>
|
|
81
82
|
${this.histogramTemplate}
|
|
82
83
|
</section>
|
|
83
|
-
`
|
|
84
|
+
`
|
|
84
85
|
: nothing}
|
|
85
86
|
${this.collectionPartOfTemplate}
|
|
86
87
|
${this.mergedFacets.map(facetGroup => this.getFacetGroupTemplate(facetGroup))}
|
|
87
88
|
</div>
|
|
88
|
-
`;
|
|
89
|
-
}
|
|
90
|
-
get collectionPartOfTemplate() {
|
|
91
|
-
var _a;
|
|
92
|
-
// We only display the "Part Of" section on collection pages
|
|
93
|
-
if (!((_a = this.parentCollections) === null || _a === void 0 ? void 0 : _a.length))
|
|
94
|
-
return nothing;
|
|
95
|
-
const headingId = 'partof-heading';
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
get collectionPartOfTemplate() {
|
|
92
|
+
var _a;
|
|
93
|
+
// We only display the "Part Of" section on collection pages
|
|
94
|
+
if (!((_a = this.parentCollections) === null || _a === void 0 ? void 0 : _a.length))
|
|
95
|
+
return nothing;
|
|
96
|
+
const headingId = 'partof-heading';
|
|
96
97
|
return html `
|
|
97
98
|
<section
|
|
98
99
|
class="facet-group partof-collections"
|
|
99
100
|
aria-labelledby=${headingId}
|
|
100
|
-
data-testid="facet-group-partof-collections"
|
|
101
101
|
>
|
|
102
102
|
<div class="facet-group-header">
|
|
103
103
|
<h3 id=${headingId}>${msg('Part Of')}</h3>
|
|
104
104
|
</div>
|
|
105
105
|
<ul>
|
|
106
|
-
${map(this.parentCollections, collxn => {
|
|
107
|
-
var _a, _b;
|
|
108
|
-
const collectionURL = `${this.baseNavigationUrl}${this.collectionPagePath}${collxn}`;
|
|
106
|
+
${map(this.parentCollections, collxn => {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
const collectionURL = `${this.baseNavigationUrl}${this.collectionPagePath}${collxn}`;
|
|
109
109
|
return html ` <li>
|
|
110
110
|
<a
|
|
111
111
|
href=${collectionURL}
|
|
@@ -114,44 +114,44 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
114
114
|
>
|
|
115
115
|
${(_b = (_a = this.collectionTitles) === null || _a === void 0 ? void 0 : _a.get(collxn)) !== null && _b !== void 0 ? _b : collxn}
|
|
116
116
|
</a>
|
|
117
|
-
</li>`;
|
|
117
|
+
</li>`;
|
|
118
118
|
})}
|
|
119
119
|
</ul>
|
|
120
120
|
</section>
|
|
121
|
-
`;
|
|
122
|
-
}
|
|
123
|
-
partOfCollectionClicked(e) {
|
|
124
|
-
var _a;
|
|
125
|
-
(_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
|
|
126
|
-
category: analyticsCategories.default,
|
|
127
|
-
action: analyticsActions.partOfCollectionClicked,
|
|
128
|
-
label: e.target.dataset.id,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Opens a modal dialog containing an enlarged version of the date picker.
|
|
133
|
-
*/
|
|
134
|
-
showDatePickerModal() {
|
|
135
|
-
var _a, _b, _c;
|
|
136
|
-
const { fullYearsHistogramAggregation } = this;
|
|
137
|
-
const minDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.first_bucket_key;
|
|
138
|
-
const maxDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.last_bucket_key;
|
|
139
|
-
const buckets = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.buckets;
|
|
140
|
-
// Because the modal manager does not clear its DOM content after being closed,
|
|
141
|
-
// it may try to render the exact same date picker template when it is reopened.
|
|
142
|
-
// And because it isn't actually a descendent of this collection-facets component,
|
|
143
|
-
// changes to the template defined here may not trigger a reactive update to the date
|
|
144
|
-
// picker, resulting in it displaying a stale date range.
|
|
145
|
-
// This ref callback ensures that every time the date picker modal is opened, it will
|
|
146
|
-
// always propagate the most recent date range into the date picker regardless of
|
|
147
|
-
// whether Lit thinks the update is necessary.
|
|
148
|
-
const expandedDatePickerChanged = (elmt) => {
|
|
149
|
-
if (elmt && elmt instanceof ExpandedDatePicker) {
|
|
150
|
-
const expandedDatePicker = elmt;
|
|
151
|
-
expandedDatePicker.minSelectedDate = this.minSelectedDate;
|
|
152
|
-
expandedDatePicker.maxSelectedDate = this.maxSelectedDate;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
partOfCollectionClicked(e) {
|
|
124
|
+
var _a;
|
|
125
|
+
(_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
|
|
126
|
+
category: analyticsCategories.default,
|
|
127
|
+
action: analyticsActions.partOfCollectionClicked,
|
|
128
|
+
label: e.target.dataset.id,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Opens a modal dialog containing an enlarged version of the date picker.
|
|
133
|
+
*/
|
|
134
|
+
showDatePickerModal() {
|
|
135
|
+
var _a, _b, _c;
|
|
136
|
+
const { fullYearsHistogramAggregation } = this;
|
|
137
|
+
const minDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.first_bucket_key;
|
|
138
|
+
const maxDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.last_bucket_key;
|
|
139
|
+
const buckets = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.buckets;
|
|
140
|
+
// Because the modal manager does not clear its DOM content after being closed,
|
|
141
|
+
// it may try to render the exact same date picker template when it is reopened.
|
|
142
|
+
// And because it isn't actually a descendent of this collection-facets component,
|
|
143
|
+
// changes to the template defined here may not trigger a reactive update to the date
|
|
144
|
+
// picker, resulting in it displaying a stale date range.
|
|
145
|
+
// This ref callback ensures that every time the date picker modal is opened, it will
|
|
146
|
+
// always propagate the most recent date range into the date picker regardless of
|
|
147
|
+
// whether Lit thinks the update is necessary.
|
|
148
|
+
const expandedDatePickerChanged = (elmt) => {
|
|
149
|
+
if (elmt && elmt instanceof ExpandedDatePicker) {
|
|
150
|
+
const expandedDatePicker = elmt;
|
|
151
|
+
expandedDatePicker.minSelectedDate = this.minSelectedDate;
|
|
152
|
+
expandedDatePicker.maxSelectedDate = this.maxSelectedDate;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
155
|
const customModalContent = html `
|
|
156
156
|
<expanded-date-picker
|
|
157
157
|
${ref(expandedDatePickerChanged)}
|
|
@@ -165,60 +165,60 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
165
165
|
@histogramDateRangeApplied=${this.histogramDateRangeUpdated}
|
|
166
166
|
@modalClosed=${this.handleExpandedDatePickerClosed}
|
|
167
167
|
></expanded-date-picker>
|
|
168
|
-
`;
|
|
169
|
-
const config = new ModalConfig({
|
|
170
|
-
bodyColor: '#fff',
|
|
171
|
-
headerColor: '#194880',
|
|
172
|
-
showHeaderLogo: false,
|
|
173
|
-
closeOnBackdropClick: true,
|
|
174
|
-
title: html `Select a date range`,
|
|
175
|
-
});
|
|
176
|
-
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.add('expanded-date-picker');
|
|
177
|
-
(_b = this.modalManager) === null || _b === void 0 ? void 0 : _b.showModal({
|
|
178
|
-
config,
|
|
179
|
-
customModalContent,
|
|
180
|
-
userClosedModalCallback: this.handleExpandedDatePickerClosed,
|
|
181
|
-
});
|
|
182
|
-
(_c = this.analyticsHandler) === null || _c === void 0 ? void 0 : _c.sendEvent({
|
|
183
|
-
category: analyticsCategories.default,
|
|
184
|
-
action: analyticsActions.histogramExpanded,
|
|
185
|
-
label: window.location.href,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
updated(changed) {
|
|
189
|
-
if (changed.has('selectedFacets')) {
|
|
190
|
-
this.dispatchFacetsChangedEvent();
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
// TODO: want to fire analytics?
|
|
194
|
-
dispatchFacetsChangedEvent() {
|
|
195
|
-
const event = new CustomEvent('facetsChanged', {
|
|
196
|
-
detail: this.selectedFacets,
|
|
197
|
-
});
|
|
198
|
-
this.dispatchEvent(event);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Template for the "Expand" button to show the date picker modal, or
|
|
202
|
-
* `nothing` if that button should currently not be shown.
|
|
203
|
-
*/
|
|
204
|
-
get expandDatePickerBtnTemplate() {
|
|
205
|
-
return this.allowExpandingDatePicker && !this.facetsLoading
|
|
168
|
+
`;
|
|
169
|
+
const config = new ModalConfig({
|
|
170
|
+
bodyColor: '#fff',
|
|
171
|
+
headerColor: '#194880',
|
|
172
|
+
showHeaderLogo: false,
|
|
173
|
+
closeOnBackdropClick: true,
|
|
174
|
+
title: html `Select a date range`,
|
|
175
|
+
});
|
|
176
|
+
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.add('expanded-date-picker');
|
|
177
|
+
(_b = this.modalManager) === null || _b === void 0 ? void 0 : _b.showModal({
|
|
178
|
+
config,
|
|
179
|
+
customModalContent,
|
|
180
|
+
userClosedModalCallback: this.handleExpandedDatePickerClosed,
|
|
181
|
+
});
|
|
182
|
+
(_c = this.analyticsHandler) === null || _c === void 0 ? void 0 : _c.sendEvent({
|
|
183
|
+
category: analyticsCategories.default,
|
|
184
|
+
action: analyticsActions.histogramExpanded,
|
|
185
|
+
label: window.location.href,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
updated(changed) {
|
|
189
|
+
if (changed.has('selectedFacets')) {
|
|
190
|
+
this.dispatchFacetsChangedEvent();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// TODO: want to fire analytics?
|
|
194
|
+
dispatchFacetsChangedEvent() {
|
|
195
|
+
const event = new CustomEvent('facetsChanged', {
|
|
196
|
+
detail: this.selectedFacets,
|
|
197
|
+
});
|
|
198
|
+
this.dispatchEvent(event);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Template for the "Expand" button to show the date picker modal, or
|
|
202
|
+
* `nothing` if that button should currently not be shown.
|
|
203
|
+
*/
|
|
204
|
+
get expandDatePickerBtnTemplate() {
|
|
205
|
+
return this.allowExpandingDatePicker && !this.facetsLoading
|
|
206
206
|
? html `<button
|
|
207
207
|
class="expand-date-picker-btn"
|
|
208
208
|
aria-hidden="true"
|
|
209
209
|
@click=${this.showDatePickerModal}
|
|
210
210
|
>
|
|
211
211
|
${expandIcon}
|
|
212
|
-
</button>`
|
|
213
|
-
: nothing;
|
|
214
|
-
}
|
|
215
|
-
get histogramTemplate() {
|
|
216
|
-
var _a, _b;
|
|
217
|
-
const { fullYearsHistogramAggregation } = this;
|
|
218
|
-
const minDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.first_bucket_key;
|
|
219
|
-
const maxDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.last_bucket_key;
|
|
220
|
-
return this.fullYearAggregationLoading
|
|
221
|
-
? html `<div class="histogram-loading-indicator">…</div>` // Ellipsis block
|
|
212
|
+
</button>`
|
|
213
|
+
: nothing;
|
|
214
|
+
}
|
|
215
|
+
get histogramTemplate() {
|
|
216
|
+
var _a, _b;
|
|
217
|
+
const { fullYearsHistogramAggregation } = this;
|
|
218
|
+
const minDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.first_bucket_key;
|
|
219
|
+
const maxDate = fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.last_bucket_key;
|
|
220
|
+
return this.fullYearAggregationLoading
|
|
221
|
+
? html `<div class="histogram-loading-indicator">…</div>` // Ellipsis block
|
|
222
222
|
: html `
|
|
223
223
|
<histogram-date-range
|
|
224
224
|
.minDate=${minDate}
|
|
@@ -227,185 +227,187 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
227
227
|
.maxSelectedDate=${(_b = this.maxSelectedDate) !== null && _b !== void 0 ? _b : maxDate}
|
|
228
228
|
.updateDelay=${100}
|
|
229
229
|
missingDataMessage="..."
|
|
230
|
-
.width=${this.collapsableFacets && this.contentWidth
|
|
231
|
-
? this.contentWidth
|
|
230
|
+
.width=${this.collapsableFacets && this.contentWidth
|
|
231
|
+
? this.contentWidth
|
|
232
232
|
: 180}
|
|
233
233
|
.bins=${fullYearsHistogramAggregation === null || fullYearsHistogramAggregation === void 0 ? void 0 : fullYearsHistogramAggregation.buckets}
|
|
234
234
|
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
235
235
|
></histogram-date-range>
|
|
236
|
-
`;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Combines the selected facets with the aggregations to create a single list of facets
|
|
240
|
-
*/
|
|
241
|
-
get mergedFacets() {
|
|
242
|
-
const facetGroups = [];
|
|
243
|
-
facetDisplayOrder.forEach(facetKey => {
|
|
244
|
-
var _a, _b;
|
|
245
|
-
const selectedFacetGroup = this.selectedFacetGroups.find(group => group.key === facetKey);
|
|
246
|
-
const aggregateFacetGroup = this.aggregationFacetGroups.find(group => group.key === facetKey);
|
|
247
|
-
// if the user selected a facet, but it's not in the aggregation, we add it as-is
|
|
248
|
-
if (selectedFacetGroup && !aggregateFacetGroup) {
|
|
249
|
-
facetGroups.push(selectedFacetGroup);
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
// if we don't have an aggregate facet group, don't add this to the list
|
|
253
|
-
if (!aggregateFacetGroup)
|
|
254
|
-
return;
|
|
255
|
-
// start with either the selected group if we have one, or the aggregate group
|
|
256
|
-
const facetGroup = selectedFacetGroup !== null && selectedFacetGroup !== void 0 ? selectedFacetGroup : aggregateFacetGroup;
|
|
257
|
-
// attach the counts to the selected buckets
|
|
258
|
-
let bucketsWithCount = (_a = selectedFacetGroup === null || selectedFacetGroup === void 0 ? void 0 : selectedFacetGroup.buckets.map(bucket => {
|
|
259
|
-
const selectedBucket = aggregateFacetGroup.buckets.find(b => b.key === bucket.key);
|
|
260
|
-
return selectedBucket
|
|
261
|
-
? {
|
|
262
|
-
...bucket,
|
|
263
|
-
count: selectedBucket.count,
|
|
264
|
-
}
|
|
265
|
-
: bucket;
|
|
266
|
-
})) !== null && _a !== void 0 ? _a : [];
|
|
267
|
-
// append any additional buckets that were not selected
|
|
268
|
-
aggregateFacetGroup.buckets.forEach(bucket => {
|
|
269
|
-
const existingBucket = bucketsWithCount.find(b => b.key === bucket.key);
|
|
270
|
-
if (existingBucket)
|
|
271
|
-
return;
|
|
272
|
-
bucketsWithCount.push(bucket);
|
|
273
|
-
});
|
|
274
|
-
/**
|
|
275
|
-
* render limited facet items on page facet area
|
|
276
|
-
*
|
|
277
|
-
* - by-default we are showing 6 items
|
|
278
|
-
* - additionally want to show all items (selected/suppressed) in page facet area
|
|
279
|
-
*/
|
|
280
|
-
let allowedFacetCount = (_b = Object.keys((selectedFacetGroup === null || selectedFacetGroup === void 0 ? void 0 : selectedFacetGroup.buckets) || [])) === null || _b === void 0 ? void 0 : _b.length;
|
|
281
|
-
if (allowedFacetCount < this.allowedFacetCount) {
|
|
282
|
-
allowedFacetCount = this.allowedFacetCount; // splice start index from 0th
|
|
283
|
-
}
|
|
284
|
-
// For lending facets, only include a specific subset of buckets
|
|
285
|
-
if (facetKey === 'lending') {
|
|
286
|
-
bucketsWithCount = bucketsWithCount.filter(bucket => lendingFacetKeysVisibility[bucket.key]);
|
|
287
|
-
}
|
|
288
|
-
//
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
if (
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
236
|
+
`;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Combines the selected facets with the aggregations to create a single list of facets
|
|
240
|
+
*/
|
|
241
|
+
get mergedFacets() {
|
|
242
|
+
const facetGroups = [];
|
|
243
|
+
facetDisplayOrder.forEach(facetKey => {
|
|
244
|
+
var _a, _b;
|
|
245
|
+
const selectedFacetGroup = this.selectedFacetGroups.find(group => group.key === facetKey);
|
|
246
|
+
const aggregateFacetGroup = this.aggregationFacetGroups.find(group => group.key === facetKey);
|
|
247
|
+
// if the user selected a facet, but it's not in the aggregation, we add it as-is
|
|
248
|
+
if (selectedFacetGroup && !aggregateFacetGroup) {
|
|
249
|
+
facetGroups.push(selectedFacetGroup);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
// if we don't have an aggregate facet group, don't add this to the list
|
|
253
|
+
if (!aggregateFacetGroup)
|
|
254
|
+
return;
|
|
255
|
+
// start with either the selected group if we have one, or the aggregate group
|
|
256
|
+
const facetGroup = selectedFacetGroup !== null && selectedFacetGroup !== void 0 ? selectedFacetGroup : aggregateFacetGroup;
|
|
257
|
+
// attach the counts to the selected buckets
|
|
258
|
+
let bucketsWithCount = (_a = selectedFacetGroup === null || selectedFacetGroup === void 0 ? void 0 : selectedFacetGroup.buckets.map(bucket => {
|
|
259
|
+
const selectedBucket = aggregateFacetGroup.buckets.find(b => b.key === bucket.key);
|
|
260
|
+
return selectedBucket
|
|
261
|
+
? {
|
|
262
|
+
...bucket,
|
|
263
|
+
count: selectedBucket.count,
|
|
264
|
+
}
|
|
265
|
+
: bucket;
|
|
266
|
+
})) !== null && _a !== void 0 ? _a : [];
|
|
267
|
+
// append any additional buckets that were not selected
|
|
268
|
+
aggregateFacetGroup.buckets.forEach(bucket => {
|
|
269
|
+
const existingBucket = bucketsWithCount.find(b => b.key === bucket.key);
|
|
270
|
+
if (existingBucket)
|
|
271
|
+
return;
|
|
272
|
+
bucketsWithCount.push(bucket);
|
|
273
|
+
});
|
|
274
|
+
/**
|
|
275
|
+
* render limited facet items on page facet area
|
|
276
|
+
*
|
|
277
|
+
* - by-default we are showing 6 items
|
|
278
|
+
* - additionally want to show all items (selected/suppressed) in page facet area
|
|
279
|
+
*/
|
|
280
|
+
let allowedFacetCount = (_b = Object.keys((selectedFacetGroup === null || selectedFacetGroup === void 0 ? void 0 : selectedFacetGroup.buckets) || [])) === null || _b === void 0 ? void 0 : _b.length;
|
|
281
|
+
if (allowedFacetCount < this.allowedFacetCount) {
|
|
282
|
+
allowedFacetCount = this.allowedFacetCount; // splice start index from 0th
|
|
283
|
+
}
|
|
284
|
+
// For lending facets, only include a specific subset of buckets
|
|
285
|
+
if (facetKey === 'lending') {
|
|
286
|
+
bucketsWithCount = bucketsWithCount.filter(bucket => lendingFacetKeysVisibility[bucket.key]);
|
|
287
|
+
}
|
|
288
|
+
// Sort the FacetBuckets so that selected and hidden buckets come before the rest
|
|
289
|
+
sortBucketsBySelectionState(bucketsWithCount);
|
|
290
|
+
// For mediatype facets, ensure the collection bucket is always shown if present
|
|
291
|
+
if (facetKey === 'mediatype') {
|
|
292
|
+
const collectionIndex = bucketsWithCount.findIndex(bucket => bucket.key === 'collection');
|
|
293
|
+
if (collectionIndex >= allowedFacetCount) {
|
|
294
|
+
const [collectionBucket] = bucketsWithCount.splice(collectionIndex, 1);
|
|
295
|
+
// If we're showing lots of selected facets, ensure we're not cutting off the last one
|
|
296
|
+
if (allowedFacetCount > this.allowedFacetCount) {
|
|
297
|
+
allowedFacetCount += 1;
|
|
298
|
+
}
|
|
299
|
+
bucketsWithCount.splice(allowedFacetCount - 1, 0, collectionBucket);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// slice off how many items we want to show in page facet area
|
|
303
|
+
facetGroup.buckets = bucketsWithCount.slice(0, allowedFacetCount);
|
|
304
|
+
facetGroups.push(facetGroup);
|
|
305
|
+
});
|
|
306
|
+
return facetGroups;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Converts the selected facets to a `FacetGroup` array,
|
|
310
|
+
* which is easier to work with
|
|
311
|
+
*/
|
|
312
|
+
get selectedFacetGroups() {
|
|
313
|
+
if (!this.selectedFacets)
|
|
314
|
+
return [];
|
|
315
|
+
const facetGroups = Object.entries(this.selectedFacets).map(([key, selectedFacets]) => {
|
|
316
|
+
const option = key;
|
|
317
|
+
const title = facetTitles[option];
|
|
318
|
+
const buckets = Object.entries(selectedFacets).map(([value, facetData]) => {
|
|
319
|
+
var _a;
|
|
320
|
+
let displayText = value;
|
|
321
|
+
// for lending facets, convert the key to a readable format
|
|
322
|
+
if (option === 'lending') {
|
|
323
|
+
displayText =
|
|
324
|
+
(_a = lendingFacetDisplayNames[value]) !== null && _a !== void 0 ? _a : value;
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
displayText,
|
|
328
|
+
key: value,
|
|
329
|
+
count: facetData.count,
|
|
330
|
+
state: facetData.state,
|
|
331
|
+
};
|
|
332
|
+
});
|
|
333
|
+
return {
|
|
334
|
+
title,
|
|
335
|
+
key: option,
|
|
336
|
+
buckets,
|
|
337
|
+
};
|
|
338
|
+
});
|
|
339
|
+
return facetGroups;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Converts the raw `aggregations` to `FacetGroups`, which are easier to use
|
|
343
|
+
*/
|
|
344
|
+
get aggregationFacetGroups() {
|
|
345
|
+
var _a;
|
|
346
|
+
const facetGroups = [];
|
|
347
|
+
Object.entries((_a = this.aggregations) !== null && _a !== void 0 ? _a : []).forEach(([key, aggregation]) => {
|
|
348
|
+
// the year_histogram data is in a different format so can't be handled here
|
|
349
|
+
if (key === 'year_histogram')
|
|
350
|
+
return;
|
|
351
|
+
const option = key;
|
|
352
|
+
const title = facetTitles[option];
|
|
353
|
+
if (!title)
|
|
354
|
+
return;
|
|
355
|
+
let castedBuckets = aggregation.getSortedBuckets(defaultFacetSort[option]);
|
|
356
|
+
if (option === 'collection') {
|
|
357
|
+
// we are not showing fav- collections or certain deemphasized collections in facets
|
|
358
|
+
castedBuckets = castedBuckets === null || castedBuckets === void 0 ? void 0 : castedBuckets.filter(bucket => {
|
|
359
|
+
var _a;
|
|
360
|
+
const bucketKey = (_a = bucket === null || bucket === void 0 ? void 0 : bucket.key) === null || _a === void 0 ? void 0 : _a.toString();
|
|
361
|
+
return (!suppressedCollections[bucketKey] && !(bucketKey === null || bucketKey === void 0 ? void 0 : bucketKey.startsWith('fav-')));
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
const facetBuckets = castedBuckets.map(bucket => {
|
|
365
|
+
var _a;
|
|
366
|
+
const bucketKey = bucket.key;
|
|
367
|
+
let displayText = `${bucket.key}`;
|
|
368
|
+
// for lending facets, convert the bucket key to a readable format
|
|
369
|
+
if (option === 'lending') {
|
|
370
|
+
displayText =
|
|
371
|
+
(_a = lendingFacetDisplayNames[bucket.key]) !== null && _a !== void 0 ? _a : `${bucket.key}`;
|
|
372
|
+
}
|
|
373
|
+
return {
|
|
374
|
+
displayText,
|
|
375
|
+
key: `${bucketKey}`,
|
|
376
|
+
count: bucket.doc_count,
|
|
377
|
+
state: 'none',
|
|
378
|
+
};
|
|
379
|
+
});
|
|
380
|
+
const group = {
|
|
381
|
+
title,
|
|
382
|
+
key: option,
|
|
383
|
+
buckets: facetBuckets,
|
|
384
|
+
};
|
|
385
|
+
facetGroups.push(group);
|
|
386
|
+
});
|
|
387
|
+
return facetGroups;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Generate the template for a facet group with a header and the collapsible
|
|
391
|
+
* chevron for the mobile view
|
|
392
|
+
*/
|
|
393
|
+
getFacetGroupTemplate(facetGroup) {
|
|
394
|
+
if (!this.facetsLoading && facetGroup.buckets.length === 0)
|
|
395
|
+
return nothing;
|
|
396
|
+
const { key } = facetGroup;
|
|
397
|
+
const isOpen = this.openFacets[key];
|
|
395
398
|
const collapser = html `
|
|
396
399
|
<span class="collapser ${isOpen ? 'open' : ''}"> ${chevronIcon} </span>
|
|
397
|
-
`;
|
|
398
|
-
const toggleCollapsed = () => {
|
|
399
|
-
const newOpenFacets = { ...this.openFacets };
|
|
400
|
-
newOpenFacets[key] = !isOpen;
|
|
401
|
-
this.openFacets = newOpenFacets;
|
|
402
|
-
};
|
|
403
|
-
const headerId = `facet-group-header-label-${facetGroup.key}`;
|
|
400
|
+
`;
|
|
401
|
+
const toggleCollapsed = () => {
|
|
402
|
+
const newOpenFacets = { ...this.openFacets };
|
|
403
|
+
newOpenFacets[key] = !isOpen;
|
|
404
|
+
this.openFacets = newOpenFacets;
|
|
405
|
+
};
|
|
406
|
+
const headerId = `facet-group-header-label-${facetGroup.key}`;
|
|
404
407
|
return html `
|
|
405
408
|
<section
|
|
406
409
|
class="facet-group ${this.collapsableFacets ? 'mobile' : ''}"
|
|
407
410
|
aria-labelledby=${headerId}
|
|
408
|
-
data-testid=${headerId}
|
|
409
411
|
>
|
|
410
412
|
<div class="facet-group-header">
|
|
411
413
|
<h3
|
|
@@ -418,66 +420,64 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
418
420
|
</h3>
|
|
419
421
|
</div>
|
|
420
422
|
<div class="facet-group-content ${isOpen ? 'open' : ''}">
|
|
421
|
-
${this.facetsLoading
|
|
422
|
-
? this.getTombstoneFacetGroupTemplate()
|
|
423
|
+
${this.facetsLoading
|
|
424
|
+
? this.getTombstoneFacetGroupTemplate()
|
|
423
425
|
: html `
|
|
424
426
|
${this.getFacetTemplate(facetGroup)}
|
|
425
427
|
${this.searchMoreFacetsLink(facetGroup)}
|
|
426
428
|
`}
|
|
427
429
|
</div>
|
|
428
430
|
</section>
|
|
429
|
-
`;
|
|
430
|
-
}
|
|
431
|
-
getTombstoneFacetGroupTemplate() {
|
|
432
|
-
// Render five tombstone rows
|
|
431
|
+
`;
|
|
432
|
+
}
|
|
433
|
+
getTombstoneFacetGroupTemplate() {
|
|
434
|
+
// Render five tombstone rows
|
|
433
435
|
return html `
|
|
434
436
|
${map(Array(5).fill(null), () => html `<facet-tombstone-row></facet-tombstone-row>`)}
|
|
435
|
-
`;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Generate the More... link button just below the facets group
|
|
439
|
-
*
|
|
440
|
-
* TODO: want to fire analytics?
|
|
441
|
-
*/
|
|
442
|
-
searchMoreFacetsLink(facetGroup) {
|
|
443
|
-
// Don't render More... links for FTS searches
|
|
444
|
-
if (!this.moreLinksVisible) {
|
|
445
|
-
return nothing;
|
|
446
|
-
}
|
|
447
|
-
// Don't render More... links for lending facets
|
|
448
|
-
if (facetGroup.key === 'lending') {
|
|
449
|
-
return nothing;
|
|
450
|
-
}
|
|
451
|
-
// Don't render More... link if the number of facets < this.allowedFacetCount
|
|
452
|
-
if (Object.keys(facetGroup.buckets).length < this.allowedFacetCount) {
|
|
453
|
-
return nothing;
|
|
454
|
-
}
|
|
455
|
-
// We sort years in numeric order by default, rather than bucket count
|
|
456
|
-
const facetSort = defaultFacetSort[facetGroup.key];
|
|
437
|
+
`;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Generate the More... link button just below the facets group
|
|
441
|
+
*
|
|
442
|
+
* TODO: want to fire analytics?
|
|
443
|
+
*/
|
|
444
|
+
searchMoreFacetsLink(facetGroup) {
|
|
445
|
+
// Don't render More... links for FTS searches
|
|
446
|
+
if (!this.moreLinksVisible) {
|
|
447
|
+
return nothing;
|
|
448
|
+
}
|
|
449
|
+
// Don't render More... links for lending facets
|
|
450
|
+
if (facetGroup.key === 'lending') {
|
|
451
|
+
return nothing;
|
|
452
|
+
}
|
|
453
|
+
// Don't render More... link if the number of facets < this.allowedFacetCount
|
|
454
|
+
if (Object.keys(facetGroup.buckets).length < this.allowedFacetCount) {
|
|
455
|
+
return nothing;
|
|
456
|
+
}
|
|
457
|
+
// We sort years in numeric order by default, rather than bucket count
|
|
458
|
+
const facetSort = defaultFacetSort[facetGroup.key];
|
|
457
459
|
return html `<button
|
|
458
460
|
class="more-link"
|
|
459
|
-
@click=${() => {
|
|
460
|
-
var _a;
|
|
461
|
-
this.showMoreFacetsModal(facetGroup, facetSort);
|
|
462
|
-
(_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
|
|
463
|
-
category: analyticsCategories.default,
|
|
464
|
-
action: analyticsActions.showMoreFacetsModal,
|
|
465
|
-
label: facetGroup.key,
|
|
466
|
-
});
|
|
467
|
-
this.dispatchEvent(new CustomEvent('showMoreFacets', { detail: facetGroup.key }));
|
|
461
|
+
@click=${() => {
|
|
462
|
+
var _a;
|
|
463
|
+
this.showMoreFacetsModal(facetGroup, facetSort);
|
|
464
|
+
(_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
|
|
465
|
+
category: analyticsCategories.default,
|
|
466
|
+
action: analyticsActions.showMoreFacetsModal,
|
|
467
|
+
label: facetGroup.key,
|
|
468
|
+
});
|
|
469
|
+
this.dispatchEvent(new CustomEvent('showMoreFacets', { detail: facetGroup.key }));
|
|
468
470
|
}}
|
|
469
471
|
>
|
|
470
472
|
More...
|
|
471
|
-
</button>`;
|
|
472
|
-
}
|
|
473
|
-
async showMoreFacetsModal(facetGroup, sortedBy) {
|
|
474
|
-
var _a, _b;
|
|
475
|
-
const facetAggrKey = facetGroup.key;
|
|
473
|
+
</button>`;
|
|
474
|
+
}
|
|
475
|
+
async showMoreFacetsModal(facetGroup, sortedBy) {
|
|
476
|
+
var _a, _b;
|
|
476
477
|
const customModalContent = html `
|
|
477
478
|
<more-facets-content
|
|
478
479
|
.analyticsHandler=${this.analyticsHandler}
|
|
479
480
|
.facetKey=${facetGroup.key}
|
|
480
|
-
.facetAggregationKey=${facetAggrKey}
|
|
481
481
|
.query=${this.query}
|
|
482
482
|
.filterMap=${this.filterMap}
|
|
483
483
|
.pageSpecifierParams=${this.pageSpecifierParams}
|
|
@@ -487,59 +487,59 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
487
487
|
.collectionTitles=${this.collectionTitles}
|
|
488
488
|
.selectedFacets=${this.selectedFacets}
|
|
489
489
|
.sortedBy=${sortedBy}
|
|
490
|
-
@facetsChanged=${(e) => {
|
|
491
|
-
const event = new CustomEvent('facetsChanged', {
|
|
492
|
-
detail: e.detail,
|
|
493
|
-
bubbles: true,
|
|
494
|
-
composed: true,
|
|
495
|
-
});
|
|
496
|
-
this.dispatchEvent(event);
|
|
490
|
+
@facetsChanged=${(e) => {
|
|
491
|
+
const event = new CustomEvent('facetsChanged', {
|
|
492
|
+
detail: e.detail,
|
|
493
|
+
bubbles: true,
|
|
494
|
+
composed: true,
|
|
495
|
+
});
|
|
496
|
+
this.dispatchEvent(event);
|
|
497
497
|
}}
|
|
498
498
|
>
|
|
499
499
|
</more-facets-content>
|
|
500
|
-
`;
|
|
501
|
-
const config = new ModalConfig({
|
|
502
|
-
bodyColor: '#fff',
|
|
503
|
-
headerColor: '#194880',
|
|
504
|
-
showHeaderLogo: false,
|
|
505
|
-
closeOnBackdropClick: true,
|
|
506
|
-
title: html `Select filters`,
|
|
507
|
-
});
|
|
508
|
-
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.add('more-search-facets');
|
|
509
|
-
(_b = this.modalManager) === null || _b === void 0 ? void 0 : _b.showModal({
|
|
510
|
-
config,
|
|
511
|
-
customModalContent,
|
|
512
|
-
userClosedModalCallback: () => {
|
|
513
|
-
var _a;
|
|
514
|
-
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.remove('more-search-facets');
|
|
515
|
-
},
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Generate the list template for each bucket in a facet group
|
|
520
|
-
*/
|
|
521
|
-
getFacetTemplate(facetGroup) {
|
|
500
|
+
`;
|
|
501
|
+
const config = new ModalConfig({
|
|
502
|
+
bodyColor: '#fff',
|
|
503
|
+
headerColor: '#194880',
|
|
504
|
+
showHeaderLogo: false,
|
|
505
|
+
closeOnBackdropClick: true,
|
|
506
|
+
title: html `Select filters`,
|
|
507
|
+
});
|
|
508
|
+
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.add('more-search-facets');
|
|
509
|
+
(_b = this.modalManager) === null || _b === void 0 ? void 0 : _b.showModal({
|
|
510
|
+
config,
|
|
511
|
+
customModalContent,
|
|
512
|
+
userClosedModalCallback: () => {
|
|
513
|
+
var _a;
|
|
514
|
+
(_a = this.modalManager) === null || _a === void 0 ? void 0 : _a.classList.remove('more-search-facets');
|
|
515
|
+
},
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Generate the list template for each bucket in a facet group
|
|
520
|
+
*/
|
|
521
|
+
getFacetTemplate(facetGroup) {
|
|
522
522
|
return html `
|
|
523
523
|
<facets-template
|
|
524
524
|
.collectionPagePath=${this.collectionPagePath}
|
|
525
525
|
.facetGroup=${facetGroup}
|
|
526
526
|
.selectedFacets=${this.selectedFacets}
|
|
527
|
-
.renderOn=${'page'}
|
|
528
527
|
.collectionTitles=${this.collectionTitles}
|
|
529
|
-
@
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
528
|
+
@facetClick=${(e) => {
|
|
529
|
+
this.selectedFacets = updateSelectedFacetBucket(this.selectedFacets, facetGroup.key, e.detail.bucket, true);
|
|
530
|
+
const event = new CustomEvent('facetsChanged', {
|
|
531
|
+
detail: this.selectedFacets,
|
|
532
|
+
bubbles: true,
|
|
533
|
+
composed: true,
|
|
534
|
+
});
|
|
535
|
+
this.dispatchEvent(event);
|
|
536
536
|
}}
|
|
537
537
|
></facets-template>
|
|
538
|
-
`;
|
|
539
|
-
}
|
|
540
|
-
static get styles() {
|
|
541
|
-
return [
|
|
542
|
-
srOnlyStyle,
|
|
538
|
+
`;
|
|
539
|
+
}
|
|
540
|
+
static get styles() {
|
|
541
|
+
return [
|
|
542
|
+
srOnlyStyle,
|
|
543
543
|
css `
|
|
544
544
|
a:link {
|
|
545
545
|
text-decoration: none;
|
|
@@ -658,96 +658,96 @@ let CollectionFacets = class CollectionFacets extends LitElement {
|
|
|
658
658
|
height: 15px;
|
|
659
659
|
cursor: pointer;
|
|
660
660
|
}
|
|
661
|
-
`,
|
|
662
|
-
];
|
|
663
|
-
}
|
|
664
|
-
};
|
|
665
|
-
__decorate([
|
|
666
|
-
property({ type: Object })
|
|
667
|
-
], CollectionFacets.prototype, "searchService", void 0);
|
|
668
|
-
__decorate([
|
|
669
|
-
property({ type: String })
|
|
670
|
-
], CollectionFacets.prototype, "searchType", void 0);
|
|
671
|
-
__decorate([
|
|
672
|
-
property({ type: Object })
|
|
673
|
-
], CollectionFacets.prototype, "aggregations", void 0);
|
|
674
|
-
__decorate([
|
|
675
|
-
property({ type: Object })
|
|
676
|
-
], CollectionFacets.prototype, "fullYearsHistogramAggregation", void 0);
|
|
677
|
-
__decorate([
|
|
678
|
-
property({ type: String })
|
|
679
|
-
], CollectionFacets.prototype, "minSelectedDate", void 0);
|
|
680
|
-
__decorate([
|
|
681
|
-
property({ type: String })
|
|
682
|
-
], CollectionFacets.prototype, "maxSelectedDate", void 0);
|
|
683
|
-
__decorate([
|
|
684
|
-
property({ type: Boolean })
|
|
685
|
-
], CollectionFacets.prototype, "moreLinksVisible", void 0);
|
|
686
|
-
__decorate([
|
|
687
|
-
property({ type: Boolean })
|
|
688
|
-
], CollectionFacets.prototype, "facetsLoading", void 0);
|
|
689
|
-
__decorate([
|
|
690
|
-
property({ type: Boolean })
|
|
691
|
-
], CollectionFacets.prototype, "fullYearAggregationLoading", void 0);
|
|
692
|
-
__decorate([
|
|
693
|
-
property({ type: Object })
|
|
694
|
-
], CollectionFacets.prototype, "selectedFacets", void 0);
|
|
695
|
-
__decorate([
|
|
696
|
-
property({ type: Boolean })
|
|
697
|
-
], CollectionFacets.prototype, "collapsableFacets", void 0);
|
|
698
|
-
__decorate([
|
|
699
|
-
property({ type: Number })
|
|
700
|
-
], CollectionFacets.prototype, "contentWidth", void 0);
|
|
701
|
-
__decorate([
|
|
702
|
-
property({ type: Boolean })
|
|
703
|
-
], CollectionFacets.prototype, "showHistogramDatePicker", void 0);
|
|
704
|
-
__decorate([
|
|
705
|
-
property({ type: Boolean })
|
|
706
|
-
], CollectionFacets.prototype, "allowExpandingDatePicker", void 0);
|
|
707
|
-
__decorate([
|
|
708
|
-
property({ type: String })
|
|
709
|
-
], CollectionFacets.prototype, "query", void 0);
|
|
710
|
-
__decorate([
|
|
711
|
-
property({ type: Object })
|
|
712
|
-
], CollectionFacets.prototype, "pageSpecifierParams", void 0);
|
|
713
|
-
__decorate([
|
|
714
|
-
property({ type: Array })
|
|
715
|
-
], CollectionFacets.prototype, "parentCollections", void 0);
|
|
716
|
-
__decorate([
|
|
717
|
-
property({ type: Object })
|
|
718
|
-
], CollectionFacets.prototype, "filterMap", void 0);
|
|
719
|
-
__decorate([
|
|
720
|
-
property({ type: String })
|
|
721
|
-
], CollectionFacets.prototype, "baseNavigationUrl", void 0);
|
|
722
|
-
__decorate([
|
|
723
|
-
property({ type: String })
|
|
724
|
-
], CollectionFacets.prototype, "collectionPagePath", void 0);
|
|
725
|
-
__decorate([
|
|
726
|
-
property({ type: Boolean })
|
|
727
|
-
], CollectionFacets.prototype, "isManageView", void 0);
|
|
728
|
-
__decorate([
|
|
729
|
-
property({ type: Object, attribute: false })
|
|
730
|
-
], CollectionFacets.prototype, "modalManager", void 0);
|
|
731
|
-
__decorate([
|
|
732
|
-
property({ type: Object, attribute: false })
|
|
733
|
-
], CollectionFacets.prototype, "resizeObserver", void 0);
|
|
734
|
-
__decorate([
|
|
735
|
-
property({ type: Object, attribute: false })
|
|
736
|
-
], CollectionFacets.prototype, "featureFeedbackService", void 0);
|
|
737
|
-
__decorate([
|
|
738
|
-
property({ type: Object, attribute: false })
|
|
739
|
-
], CollectionFacets.prototype, "recaptchaManager", void 0);
|
|
740
|
-
__decorate([
|
|
741
|
-
property({ type: Object, attribute: false })
|
|
742
|
-
], CollectionFacets.prototype, "analyticsHandler", void 0);
|
|
743
|
-
__decorate([
|
|
744
|
-
property({ type: Object, attribute: false })
|
|
745
|
-
], CollectionFacets.prototype, "collectionTitles", void 0);
|
|
746
|
-
__decorate([
|
|
747
|
-
state()
|
|
748
|
-
], CollectionFacets.prototype, "openFacets", void 0);
|
|
749
|
-
CollectionFacets = __decorate([
|
|
750
|
-
customElement('collection-facets')
|
|
751
|
-
], CollectionFacets);
|
|
752
|
-
export { CollectionFacets };
|
|
661
|
+
`,
|
|
662
|
+
];
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
__decorate([
|
|
666
|
+
property({ type: Object })
|
|
667
|
+
], CollectionFacets.prototype, "searchService", void 0);
|
|
668
|
+
__decorate([
|
|
669
|
+
property({ type: String })
|
|
670
|
+
], CollectionFacets.prototype, "searchType", void 0);
|
|
671
|
+
__decorate([
|
|
672
|
+
property({ type: Object })
|
|
673
|
+
], CollectionFacets.prototype, "aggregations", void 0);
|
|
674
|
+
__decorate([
|
|
675
|
+
property({ type: Object })
|
|
676
|
+
], CollectionFacets.prototype, "fullYearsHistogramAggregation", void 0);
|
|
677
|
+
__decorate([
|
|
678
|
+
property({ type: String })
|
|
679
|
+
], CollectionFacets.prototype, "minSelectedDate", void 0);
|
|
680
|
+
__decorate([
|
|
681
|
+
property({ type: String })
|
|
682
|
+
], CollectionFacets.prototype, "maxSelectedDate", void 0);
|
|
683
|
+
__decorate([
|
|
684
|
+
property({ type: Boolean })
|
|
685
|
+
], CollectionFacets.prototype, "moreLinksVisible", void 0);
|
|
686
|
+
__decorate([
|
|
687
|
+
property({ type: Boolean })
|
|
688
|
+
], CollectionFacets.prototype, "facetsLoading", void 0);
|
|
689
|
+
__decorate([
|
|
690
|
+
property({ type: Boolean })
|
|
691
|
+
], CollectionFacets.prototype, "fullYearAggregationLoading", void 0);
|
|
692
|
+
__decorate([
|
|
693
|
+
property({ type: Object })
|
|
694
|
+
], CollectionFacets.prototype, "selectedFacets", void 0);
|
|
695
|
+
__decorate([
|
|
696
|
+
property({ type: Boolean })
|
|
697
|
+
], CollectionFacets.prototype, "collapsableFacets", void 0);
|
|
698
|
+
__decorate([
|
|
699
|
+
property({ type: Number })
|
|
700
|
+
], CollectionFacets.prototype, "contentWidth", void 0);
|
|
701
|
+
__decorate([
|
|
702
|
+
property({ type: Boolean })
|
|
703
|
+
], CollectionFacets.prototype, "showHistogramDatePicker", void 0);
|
|
704
|
+
__decorate([
|
|
705
|
+
property({ type: Boolean })
|
|
706
|
+
], CollectionFacets.prototype, "allowExpandingDatePicker", void 0);
|
|
707
|
+
__decorate([
|
|
708
|
+
property({ type: String })
|
|
709
|
+
], CollectionFacets.prototype, "query", void 0);
|
|
710
|
+
__decorate([
|
|
711
|
+
property({ type: Object })
|
|
712
|
+
], CollectionFacets.prototype, "pageSpecifierParams", void 0);
|
|
713
|
+
__decorate([
|
|
714
|
+
property({ type: Array })
|
|
715
|
+
], CollectionFacets.prototype, "parentCollections", void 0);
|
|
716
|
+
__decorate([
|
|
717
|
+
property({ type: Object })
|
|
718
|
+
], CollectionFacets.prototype, "filterMap", void 0);
|
|
719
|
+
__decorate([
|
|
720
|
+
property({ type: String })
|
|
721
|
+
], CollectionFacets.prototype, "baseNavigationUrl", void 0);
|
|
722
|
+
__decorate([
|
|
723
|
+
property({ type: String })
|
|
724
|
+
], CollectionFacets.prototype, "collectionPagePath", void 0);
|
|
725
|
+
__decorate([
|
|
726
|
+
property({ type: Boolean })
|
|
727
|
+
], CollectionFacets.prototype, "isManageView", void 0);
|
|
728
|
+
__decorate([
|
|
729
|
+
property({ type: Object, attribute: false })
|
|
730
|
+
], CollectionFacets.prototype, "modalManager", void 0);
|
|
731
|
+
__decorate([
|
|
732
|
+
property({ type: Object, attribute: false })
|
|
733
|
+
], CollectionFacets.prototype, "resizeObserver", void 0);
|
|
734
|
+
__decorate([
|
|
735
|
+
property({ type: Object, attribute: false })
|
|
736
|
+
], CollectionFacets.prototype, "featureFeedbackService", void 0);
|
|
737
|
+
__decorate([
|
|
738
|
+
property({ type: Object, attribute: false })
|
|
739
|
+
], CollectionFacets.prototype, "recaptchaManager", void 0);
|
|
740
|
+
__decorate([
|
|
741
|
+
property({ type: Object, attribute: false })
|
|
742
|
+
], CollectionFacets.prototype, "analyticsHandler", void 0);
|
|
743
|
+
__decorate([
|
|
744
|
+
property({ type: Object, attribute: false })
|
|
745
|
+
], CollectionFacets.prototype, "collectionTitles", void 0);
|
|
746
|
+
__decorate([
|
|
747
|
+
state()
|
|
748
|
+
], CollectionFacets.prototype, "openFacets", void 0);
|
|
749
|
+
CollectionFacets = __decorate([
|
|
750
|
+
customElement('collection-facets')
|
|
751
|
+
], CollectionFacets);
|
|
752
|
+
export { CollectionFacets };
|
|
753
753
|
//# sourceMappingURL=collection-facets.js.map
|