@internetarchive/collection-browser 2.7.12 → 2.7.13
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 +13 -13
- package/dist/index.js +13 -13
- package/dist/src/app-root.d.ts +107 -107
- package/dist/src/app-root.js +531 -531
- 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/filter.d.ts +2 -2
- package/dist/src/assets/img/icons/filter.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 +606 -606
- package/dist/src/collection-browser.js +1677 -1677
- package/dist/src/collection-facets/facet-row.d.ts +30 -30
- package/dist/src/collection-facets/facet-row.js +118 -118
- 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 +13 -13
- package/dist/src/collection-facets/facets-template.js +44 -44
- package/dist/src/collection-facets/more-facets-content.d.ts +106 -106
- package/dist/src/collection-facets/more-facets-content.js +407 -407
- 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/smart-facets/dedupe.d.ts +10 -10
- package/dist/src/collection-facets/smart-facets/dedupe.js +33 -33
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.d.ts +5 -5
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.js +23 -23
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.d.ts +5 -5
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.js +44 -44
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.d.ts +5 -5
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js +172 -172
- package/dist/src/collection-facets/smart-facets/models.d.ts +26 -26
- package/dist/src/collection-facets/smart-facets/models.js +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.d.ts +31 -31
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +240 -240
- package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +11 -11
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js +86 -86
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.d.ts +16 -16
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +100 -100
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.d.ts +2 -2
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js +12 -12
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.d.ts +5 -5
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +15 -15
- 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 +522 -522
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +245 -245
- package/dist/src/data-source/collection-browser-data-source-interface.js +1 -1
- package/dist/src/data-source/collection-browser-data-source.d.ts +377 -377
- package/dist/src/data-source/collection-browser-data-source.js +1004 -1001
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.d.ts +44 -44
- 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 +79 -79
- 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 +58 -58
- package/dist/src/manage/manage-bar.js +159 -159
- package/dist/src/manage/remove-items-modal-content.d.ts +9 -9
- package/dist/src/manage/remove-items-modal-content.js +34 -34
- 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 +228 -228
- package/dist/src/models.js +401 -401
- package/dist/src/restoration-state-handler.d.ts +70 -70
- package/dist/src/restoration-state-handler.js +363 -363
- 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 +223 -223
- package/dist/src/sort-filter-bar/sort-filter-bar.js +697 -697
- package/dist/src/styles/ia-button.d.ts +2 -2
- package/dist/src/styles/ia-button.js +17 -17
- 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 +64 -64
- 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 +34 -34
- package/dist/src/tiles/grid/item-tile.js +158 -158
- 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 +18 -18
- package/dist/src/tiles/image-block.js +89 -89
- 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 +19 -19
- package/dist/src/tiles/list/tile-list-compact.js +122 -122
- package/dist/src/tiles/list/tile-list.d.ts +54 -54
- package/dist/src/tiles/list/tile-list.js +323 -323
- 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 +8 -8
- package/dist/src/tiles/overlay/icon-overlay.js +25 -25
- package/dist/src/tiles/overlay/text-overlay.d.ts +9 -9
- package/dist/src/tiles/overlay/text-overlay.js +31 -31
- 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 +230 -230
- 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 -83
- package/dist/src/utils/facet-utils.js +145 -145
- 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 +27 -27
- 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 +1308 -1308
- package/dist/test/collection-facets/facet-row.test.d.ts +1 -1
- package/dist/test/collection-facets/facet-row.test.js +227 -227
- package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
- package/dist/test/collection-facets/facets-template.test.js +91 -91
- package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +141 -141
- 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 +690 -690
- 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 +107 -107
- 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 +2 -2
- package/dist/test/manage/manage-bar.test.js +100 -100
- package/dist/test/manage/remove-items-modal-content.test.d.ts +1 -1
- package/dist/test/manage/remove-items-modal-content.test.js +45 -45
- 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 -25
- package/dist/test/mocks/mock-search-responses.js +942 -942
- package/dist/test/mocks/mock-search-service.d.ts +15 -15
- package/dist/test/mocks/mock-search-service.js +54 -54
- 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 +38 -38
- 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 +30 -30
- 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/data-source/collection-browser-data-source.ts +5 -1
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { css, html, nothing } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { msg } from '@lit/localize';
|
|
5
|
-
import { collectionIcon } from '../../assets/img/icons/mediatype/collection';
|
|
6
|
-
import { formatUnitSize } from '../../utils/format-unit-size';
|
|
7
|
-
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
8
|
-
import { BaseTileComponent } from '../base-tile-component';
|
|
9
|
-
import '../image-block';
|
|
10
|
-
let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
11
|
-
constructor() {
|
|
12
|
-
/*
|
|
13
|
-
* Reactive properties inherited from BaseTileComponent:
|
|
14
|
-
* - model?: TileModel;
|
|
15
|
-
* - currentWidth?: number;
|
|
16
|
-
* - currentHeight?: number;
|
|
17
|
-
* - baseNavigationUrl?: string;
|
|
18
|
-
* - baseImageUrl?: string;
|
|
19
|
-
* - collectionPagePath?: string;
|
|
20
|
-
* - sortParam: SortParam | null = null;
|
|
21
|
-
* - creatorFilter?: string;
|
|
22
|
-
* - mobileBreakpoint?: number;
|
|
23
|
-
* - loggedIn = false;
|
|
24
|
-
*/
|
|
25
|
-
super(...arguments);
|
|
26
|
-
this.showInfoButton = false;
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, html, nothing } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { msg } from '@lit/localize';
|
|
5
|
+
import { collectionIcon } from '../../assets/img/icons/mediatype/collection';
|
|
6
|
+
import { formatUnitSize } from '../../utils/format-unit-size';
|
|
7
|
+
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
8
|
+
import { BaseTileComponent } from '../base-tile-component';
|
|
9
|
+
import '../image-block';
|
|
10
|
+
let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
/*
|
|
13
|
+
* Reactive properties inherited from BaseTileComponent:
|
|
14
|
+
* - model?: TileModel;
|
|
15
|
+
* - currentWidth?: number;
|
|
16
|
+
* - currentHeight?: number;
|
|
17
|
+
* - baseNavigationUrl?: string;
|
|
18
|
+
* - baseImageUrl?: string;
|
|
19
|
+
* - collectionPagePath?: string;
|
|
20
|
+
* - sortParam: SortParam | null = null;
|
|
21
|
+
* - creatorFilter?: string;
|
|
22
|
+
* - mobileBreakpoint?: number;
|
|
23
|
+
* - loggedIn = false;
|
|
24
|
+
*/
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.showInfoButton = false;
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
29
|
return html `
|
|
30
30
|
<div class="container">
|
|
31
31
|
${this.infoButtonTemplate}
|
|
@@ -37,9 +37,9 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
37
37
|
|
|
38
38
|
${this.getTileStatsTemplate}
|
|
39
39
|
</div>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
get getImageBlockTemplate() {
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
get getImageBlockTemplate() {
|
|
43
43
|
return html `
|
|
44
44
|
<image-block
|
|
45
45
|
.model=${this.model}
|
|
@@ -47,15 +47,15 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
47
47
|
.viewSize=${'grid'}
|
|
48
48
|
>
|
|
49
49
|
</image-block>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
|
-
get getTitleTemplate() {
|
|
53
|
-
var _a;
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
get getTitleTemplate() {
|
|
53
|
+
var _a;
|
|
54
54
|
return html `<div id="title">
|
|
55
55
|
<h4 class="truncated">${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}</h4>
|
|
56
|
-
</div>`;
|
|
57
|
-
}
|
|
58
|
-
get getTileStatsTemplate() {
|
|
56
|
+
</div>`;
|
|
57
|
+
}
|
|
58
|
+
get getTileStatsTemplate() {
|
|
59
59
|
return html `
|
|
60
60
|
<div id="item-stats">
|
|
61
61
|
<div id="item-mediatype">${collectionIcon}</div>
|
|
@@ -64,42 +64,42 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
64
64
|
${this.getItemsTemplate} ${this.getSizeTemplate}
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
get getItemsTemplate() {
|
|
70
|
-
var _a, _b;
|
|
71
|
-
const collectionItems = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.itemCount) === null || _b === void 0 ? void 0 : _b.toLocaleString();
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
get getItemsTemplate() {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
const collectionItems = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.itemCount) === null || _b === void 0 ? void 0 : _b.toLocaleString();
|
|
72
72
|
return html `<span id="item-count"
|
|
73
73
|
>${collectionItems} item${Number(collectionItems) !== 1 ? 's' : ''}</span
|
|
74
|
-
>`;
|
|
75
|
-
}
|
|
76
|
-
get getSizeTemplate() {
|
|
77
|
-
var _a, _b;
|
|
78
|
-
const collectionSize = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.collectionSize) !== null && _b !== void 0 ? _b : 0;
|
|
79
|
-
return collectionSize
|
|
80
|
-
? html `<span id="item-size">${formatUnitSize(collectionSize, 1)}</span>`
|
|
81
|
-
: ``;
|
|
82
|
-
}
|
|
83
|
-
get infoButtonTemplate() {
|
|
84
|
-
// ⓘ is an information icon
|
|
85
|
-
return this.showInfoButton
|
|
74
|
+
>`;
|
|
75
|
+
}
|
|
76
|
+
get getSizeTemplate() {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
const collectionSize = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.collectionSize) !== null && _b !== void 0 ? _b : 0;
|
|
79
|
+
return collectionSize
|
|
80
|
+
? html `<span id="item-size">${formatUnitSize(collectionSize, 1)}</span>`
|
|
81
|
+
: ``;
|
|
82
|
+
}
|
|
83
|
+
get infoButtonTemplate() {
|
|
84
|
+
// ⓘ is an information icon
|
|
85
|
+
return this.showInfoButton
|
|
86
86
|
? html `<button class="info-button" @click=${this.infoButtonPressed}>
|
|
87
87
|
ⓘ
|
|
88
88
|
<span class="sr-only">${msg('More info')}</span>
|
|
89
|
-
</button>`
|
|
90
|
-
: nothing;
|
|
91
|
-
}
|
|
92
|
-
infoButtonPressed(e) {
|
|
93
|
-
e.preventDefault();
|
|
94
|
-
const event = new CustomEvent('infoButtonPressed', { detail: { x: e.clientX, y: e.clientY } });
|
|
95
|
-
this.dispatchEvent(event);
|
|
96
|
-
}
|
|
97
|
-
static get styles() {
|
|
98
|
-
const tileBorderColor = css `var(--tileBorderColor, #555555)`;
|
|
99
|
-
const tileBackgroundColor = css `var(--tileBackgroundColor, #666666)`;
|
|
100
|
-
const whiteColor = css `#fff`;
|
|
101
|
-
return [
|
|
102
|
-
baseTileStyles,
|
|
89
|
+
</button>`
|
|
90
|
+
: nothing;
|
|
91
|
+
}
|
|
92
|
+
infoButtonPressed(e) {
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
const event = new CustomEvent('infoButtonPressed', { detail: { x: e.clientX, y: e.clientY } });
|
|
95
|
+
this.dispatchEvent(event);
|
|
96
|
+
}
|
|
97
|
+
static get styles() {
|
|
98
|
+
const tileBorderColor = css `var(--tileBorderColor, #555555)`;
|
|
99
|
+
const tileBackgroundColor = css `var(--tileBackgroundColor, #666666)`;
|
|
100
|
+
const whiteColor = css `#fff`;
|
|
101
|
+
return [
|
|
102
|
+
baseTileStyles,
|
|
103
103
|
css `
|
|
104
104
|
.container {
|
|
105
105
|
background-color: ${tileBackgroundColor};
|
|
@@ -142,15 +142,15 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
142
142
|
flex-direction: column;
|
|
143
143
|
margin-left: 10px;
|
|
144
144
|
}
|
|
145
|
-
`,
|
|
146
|
-
];
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
__decorate([
|
|
150
|
-
property({ type: Boolean })
|
|
151
|
-
], CollectionTile.prototype, "showInfoButton", void 0);
|
|
152
|
-
CollectionTile = __decorate([
|
|
153
|
-
customElement('collection-tile')
|
|
154
|
-
], CollectionTile);
|
|
155
|
-
export { CollectionTile };
|
|
145
|
+
`,
|
|
146
|
+
];
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
__decorate([
|
|
150
|
+
property({ type: Boolean })
|
|
151
|
+
], CollectionTile.prototype, "showInfoButton", void 0);
|
|
152
|
+
CollectionTile = __decorate([
|
|
153
|
+
customElement('collection-tile')
|
|
154
|
+
], CollectionTile);
|
|
155
|
+
export { CollectionTile };
|
|
156
156
|
//# sourceMappingURL=collection-tile.js.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
|
-
import { BaseTileComponent } from '../base-tile-component';
|
|
3
|
-
import '../image-block';
|
|
4
|
-
import '../review-block';
|
|
5
|
-
import '../text-snippet-block';
|
|
6
|
-
import '../item-image';
|
|
7
|
-
import '../mediatype-icon';
|
|
8
|
-
import './tile-stats';
|
|
9
|
-
export declare class ItemTile extends BaseTileComponent {
|
|
10
|
-
showInfoButton: boolean;
|
|
11
|
-
render(): TemplateResult<1>;
|
|
12
|
-
/**
|
|
13
|
-
* Templates
|
|
14
|
-
*/
|
|
15
|
-
private get creatorTemplate();
|
|
16
|
-
private get imageBlockTemplate();
|
|
17
|
-
private get sortedDateInfoTemplate();
|
|
18
|
-
private get infoButtonTemplate();
|
|
19
|
-
private get reviewBlockTemplate();
|
|
20
|
-
private get textSnippetsTemplate();
|
|
21
|
-
private get volumeIssueTemplate();
|
|
22
|
-
private get webArchivesCaptureDatesTemplate();
|
|
23
|
-
private get isSortedByDate();
|
|
24
|
-
/**
|
|
25
|
-
* Returns the active sort param if one is set, or the default sort param otherwise.
|
|
26
|
-
*/
|
|
27
|
-
private get effectiveSort();
|
|
28
|
-
private get hasSnippets();
|
|
29
|
-
private infoButtonPressed;
|
|
30
|
-
/**
|
|
31
|
-
* CSS
|
|
32
|
-
*/
|
|
33
|
-
static get styles(): CSSResultGroup;
|
|
34
|
-
}
|
|
1
|
+
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
|
+
import { BaseTileComponent } from '../base-tile-component';
|
|
3
|
+
import '../image-block';
|
|
4
|
+
import '../review-block';
|
|
5
|
+
import '../text-snippet-block';
|
|
6
|
+
import '../item-image';
|
|
7
|
+
import '../mediatype-icon';
|
|
8
|
+
import './tile-stats';
|
|
9
|
+
export declare class ItemTile extends BaseTileComponent {
|
|
10
|
+
showInfoButton: boolean;
|
|
11
|
+
render(): TemplateResult<1>;
|
|
12
|
+
/**
|
|
13
|
+
* Templates
|
|
14
|
+
*/
|
|
15
|
+
private get creatorTemplate();
|
|
16
|
+
private get imageBlockTemplate();
|
|
17
|
+
private get sortedDateInfoTemplate();
|
|
18
|
+
private get infoButtonTemplate();
|
|
19
|
+
private get reviewBlockTemplate();
|
|
20
|
+
private get textSnippetsTemplate();
|
|
21
|
+
private get volumeIssueTemplate();
|
|
22
|
+
private get webArchivesCaptureDatesTemplate();
|
|
23
|
+
private get isSortedByDate();
|
|
24
|
+
/**
|
|
25
|
+
* Returns the active sort param if one is set, or the default sort param otherwise.
|
|
26
|
+
*/
|
|
27
|
+
private get effectiveSort();
|
|
28
|
+
private get hasSnippets();
|
|
29
|
+
private infoButtonPressed;
|
|
30
|
+
/**
|
|
31
|
+
* CSS
|
|
32
|
+
*/
|
|
33
|
+
static get styles(): CSSResultGroup;
|
|
34
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
/* eslint-disable import/no-duplicates */
|
|
3
|
-
import { css, html, nothing } from 'lit';
|
|
4
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
|
-
import { msg } from '@lit/localize';
|
|
7
|
-
import { map } from 'lit/directives/map.js';
|
|
8
|
-
import { formatDate } from '../../utils/format-date';
|
|
9
|
-
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
|
|
10
|
-
import { BaseTileComponent } from '../base-tile-component';
|
|
11
|
-
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
12
|
-
import '../image-block';
|
|
13
|
-
import '../review-block';
|
|
14
|
-
import '../text-snippet-block';
|
|
15
|
-
import '../item-image';
|
|
16
|
-
import '../mediatype-icon';
|
|
17
|
-
import './tile-stats';
|
|
18
|
-
let ItemTile = class ItemTile extends BaseTileComponent {
|
|
19
|
-
constructor() {
|
|
20
|
-
/*
|
|
21
|
-
* Reactive properties inherited from BaseTileComponent:
|
|
22
|
-
* - model?: TileModel;
|
|
23
|
-
* - currentWidth?: number;
|
|
24
|
-
* - currentHeight?: number;
|
|
25
|
-
* - baseNavigationUrl?: string;
|
|
26
|
-
* - baseImageUrl?: string;
|
|
27
|
-
* - collectionPagePath?: string;
|
|
28
|
-
* - sortParam: SortParam | null = null;
|
|
29
|
-
* - defaultSortParam: SortParam | null = null;
|
|
30
|
-
* - creatorFilter?: string;
|
|
31
|
-
* - mobileBreakpoint?: number;
|
|
32
|
-
* - loggedIn = false;
|
|
33
|
-
*/
|
|
34
|
-
super(...arguments);
|
|
35
|
-
this.showInfoButton = false;
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
39
|
-
const itemTitle = (_a = this.model) === null || _a === void 0 ? void 0 : _a.title;
|
|
40
|
-
const effectiveSort = (_b = this.sortParam) !== null && _b !== void 0 ? _b : this.defaultSortParam;
|
|
41
|
-
const [viewCount, viewLabel] = (effectiveSort === null || effectiveSort === void 0 ? void 0 : effectiveSort.field) === 'week'
|
|
42
|
-
? [(_c = this.model) === null || _c === void 0 ? void 0 : _c.weeklyViewCount, 'weekly views']
|
|
43
|
-
: [(_d = this.model) === null || _d === void 0 ? void 0 : _d.viewCount, 'all-time views'];
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
/* eslint-disable import/no-duplicates */
|
|
3
|
+
import { css, html, nothing } from 'lit';
|
|
4
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
|
+
import { msg } from '@lit/localize';
|
|
7
|
+
import { map } from 'lit/directives/map.js';
|
|
8
|
+
import { formatDate } from '../../utils/format-date';
|
|
9
|
+
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
|
|
10
|
+
import { BaseTileComponent } from '../base-tile-component';
|
|
11
|
+
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
12
|
+
import '../image-block';
|
|
13
|
+
import '../review-block';
|
|
14
|
+
import '../text-snippet-block';
|
|
15
|
+
import '../item-image';
|
|
16
|
+
import '../mediatype-icon';
|
|
17
|
+
import './tile-stats';
|
|
18
|
+
let ItemTile = class ItemTile extends BaseTileComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
/*
|
|
21
|
+
* Reactive properties inherited from BaseTileComponent:
|
|
22
|
+
* - model?: TileModel;
|
|
23
|
+
* - currentWidth?: number;
|
|
24
|
+
* - currentHeight?: number;
|
|
25
|
+
* - baseNavigationUrl?: string;
|
|
26
|
+
* - baseImageUrl?: string;
|
|
27
|
+
* - collectionPagePath?: string;
|
|
28
|
+
* - sortParam: SortParam | null = null;
|
|
29
|
+
* - defaultSortParam: SortParam | null = null;
|
|
30
|
+
* - creatorFilter?: string;
|
|
31
|
+
* - mobileBreakpoint?: number;
|
|
32
|
+
* - loggedIn = false;
|
|
33
|
+
*/
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.showInfoButton = false;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
39
|
+
const itemTitle = (_a = this.model) === null || _a === void 0 ? void 0 : _a.title;
|
|
40
|
+
const effectiveSort = (_b = this.sortParam) !== null && _b !== void 0 ? _b : this.defaultSortParam;
|
|
41
|
+
const [viewCount, viewLabel] = (effectiveSort === null || effectiveSort === void 0 ? void 0 : effectiveSort.field) === 'week'
|
|
42
|
+
? [(_c = this.model) === null || _c === void 0 ? void 0 : _c.weeklyViewCount, 'weekly views']
|
|
43
|
+
: [(_d = this.model) === null || _d === void 0 ? void 0 : _d.viewCount, 'all-time views'];
|
|
44
44
|
return html `
|
|
45
45
|
<div class="container">
|
|
46
46
|
${this.infoButtonTemplate}
|
|
@@ -55,8 +55,8 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
57
|
${this.volumeIssueTemplate}
|
|
58
|
-
${this.isSortedByDate
|
|
59
|
-
? this.sortedDateInfoTemplate
|
|
58
|
+
${this.isSortedByDate
|
|
59
|
+
? this.sortedDateInfoTemplate
|
|
60
60
|
: this.creatorTemplate}
|
|
61
61
|
${this.webArchivesCaptureDatesTemplate} ${this.textSnippetsTemplate}
|
|
62
62
|
${this.reviewBlockTemplate}
|
|
@@ -72,24 +72,24 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
72
72
|
</tile-stats>
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
75
|
-
`;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Templates
|
|
79
|
-
*/
|
|
80
|
-
get creatorTemplate() {
|
|
81
|
-
const displayedCreator = this.displayValueProvider.firstCreatorMatchingFilter;
|
|
82
|
-
if (!displayedCreator)
|
|
83
|
-
return nothing;
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Templates
|
|
79
|
+
*/
|
|
80
|
+
get creatorTemplate() {
|
|
81
|
+
const displayedCreator = this.displayValueProvider.firstCreatorMatchingFilter;
|
|
82
|
+
if (!displayedCreator)
|
|
83
|
+
return nothing;
|
|
84
84
|
return html `
|
|
85
85
|
<div class="created-by">
|
|
86
86
|
<span class="truncated" title=${displayedCreator}>
|
|
87
87
|
by ${displayedCreator}
|
|
88
88
|
</span>
|
|
89
89
|
</div>
|
|
90
|
-
`;
|
|
91
|
-
}
|
|
92
|
-
get imageBlockTemplate() {
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
get imageBlockTemplate() {
|
|
93
93
|
return html `
|
|
94
94
|
<image-block
|
|
95
95
|
.model=${this.model}
|
|
@@ -100,58 +100,58 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
100
100
|
.viewSize=${'grid'}
|
|
101
101
|
>
|
|
102
102
|
</image-block>
|
|
103
|
-
`;
|
|
104
|
-
}
|
|
105
|
-
get sortedDateInfoTemplate() {
|
|
106
|
-
var _a, _b, _c, _d, _e;
|
|
107
|
-
let sortedValue;
|
|
108
|
-
let format = 'long';
|
|
109
|
-
switch ((_a = this.effectiveSort) === null || _a === void 0 ? void 0 : _a.field) {
|
|
110
|
-
case 'date': {
|
|
111
|
-
const datePublished = (_b = this.model) === null || _b === void 0 ? void 0 : _b.datePublished;
|
|
112
|
-
sortedValue = { field: 'published', value: datePublished };
|
|
113
|
-
if (isFirstMillisecondOfUTCYear(datePublished)) {
|
|
114
|
-
format = 'year-only';
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
case 'reviewdate':
|
|
119
|
-
sortedValue = { field: 'reviewed', value: (_c = this.model) === null || _c === void 0 ? void 0 : _c.dateReviewed };
|
|
120
|
-
break;
|
|
121
|
-
case 'addeddate':
|
|
122
|
-
sortedValue = { field: 'added', value: (_d = this.model) === null || _d === void 0 ? void 0 : _d.dateAdded };
|
|
123
|
-
break;
|
|
124
|
-
case 'publicdate':
|
|
125
|
-
sortedValue = { field: 'archived', value: (_e = this.model) === null || _e === void 0 ? void 0 : _e.dateArchived };
|
|
126
|
-
break;
|
|
127
|
-
default:
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
if (!(sortedValue === null || sortedValue === void 0 ? void 0 : sortedValue.value)) {
|
|
131
|
-
return nothing;
|
|
132
|
-
}
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
get sortedDateInfoTemplate() {
|
|
106
|
+
var _a, _b, _c, _d, _e;
|
|
107
|
+
let sortedValue;
|
|
108
|
+
let format = 'long';
|
|
109
|
+
switch ((_a = this.effectiveSort) === null || _a === void 0 ? void 0 : _a.field) {
|
|
110
|
+
case 'date': {
|
|
111
|
+
const datePublished = (_b = this.model) === null || _b === void 0 ? void 0 : _b.datePublished;
|
|
112
|
+
sortedValue = { field: 'published', value: datePublished };
|
|
113
|
+
if (isFirstMillisecondOfUTCYear(datePublished)) {
|
|
114
|
+
format = 'year-only';
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case 'reviewdate':
|
|
119
|
+
sortedValue = { field: 'reviewed', value: (_c = this.model) === null || _c === void 0 ? void 0 : _c.dateReviewed };
|
|
120
|
+
break;
|
|
121
|
+
case 'addeddate':
|
|
122
|
+
sortedValue = { field: 'added', value: (_d = this.model) === null || _d === void 0 ? void 0 : _d.dateAdded };
|
|
123
|
+
break;
|
|
124
|
+
case 'publicdate':
|
|
125
|
+
sortedValue = { field: 'archived', value: (_e = this.model) === null || _e === void 0 ? void 0 : _e.dateArchived };
|
|
126
|
+
break;
|
|
127
|
+
default:
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
if (!(sortedValue === null || sortedValue === void 0 ? void 0 : sortedValue.value)) {
|
|
131
|
+
return nothing;
|
|
132
|
+
}
|
|
133
133
|
return html `
|
|
134
134
|
<div class="date-sorted-by truncated">
|
|
135
135
|
<span>
|
|
136
136
|
${sortedValue === null || sortedValue === void 0 ? void 0 : sortedValue.field} ${formatDate(sortedValue === null || sortedValue === void 0 ? void 0 : sortedValue.value, format)}
|
|
137
137
|
</span>
|
|
138
138
|
</div>
|
|
139
|
-
`;
|
|
140
|
-
}
|
|
141
|
-
get infoButtonTemplate() {
|
|
142
|
-
// ⓘ is an information icon
|
|
143
|
-
return this.showInfoButton
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
get infoButtonTemplate() {
|
|
142
|
+
// ⓘ is an information icon
|
|
143
|
+
return this.showInfoButton
|
|
144
144
|
? html `<button class="info-button" @click=${this.infoButtonPressed}>
|
|
145
145
|
ⓘ
|
|
146
146
|
<span class="sr-only">${msg('More info')}</span>
|
|
147
|
-
</button>`
|
|
148
|
-
: nothing;
|
|
149
|
-
}
|
|
150
|
-
get reviewBlockTemplate() {
|
|
151
|
-
var _a;
|
|
152
|
-
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
|
|
153
|
-
return nothing;
|
|
154
|
-
const { title, body, stars } = this.model.review;
|
|
147
|
+
</button>`
|
|
148
|
+
: nothing;
|
|
149
|
+
}
|
|
150
|
+
get reviewBlockTemplate() {
|
|
151
|
+
var _a;
|
|
152
|
+
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
|
|
153
|
+
return nothing;
|
|
154
|
+
const { title, body, stars } = this.model.review;
|
|
155
155
|
return html `
|
|
156
156
|
<review-block
|
|
157
157
|
viewsize="grid"
|
|
@@ -160,68 +160,68 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
160
160
|
.starRating=${stars}
|
|
161
161
|
>
|
|
162
162
|
</review-block>
|
|
163
|
-
`;
|
|
164
|
-
}
|
|
165
|
-
get textSnippetsTemplate() {
|
|
166
|
-
var _a;
|
|
167
|
-
if (!this.hasSnippets)
|
|
168
|
-
return nothing;
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
165
|
+
get textSnippetsTemplate() {
|
|
166
|
+
var _a;
|
|
167
|
+
if (!this.hasSnippets)
|
|
168
|
+
return nothing;
|
|
169
169
|
return html `
|
|
170
170
|
<text-snippet-block viewsize="grid" .snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}>
|
|
171
171
|
</text-snippet-block>
|
|
172
|
-
`;
|
|
173
|
-
}
|
|
174
|
-
get volumeIssueTemplate() {
|
|
175
|
-
var _a, _b, _c, _d;
|
|
176
|
-
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.volume) || !((_b = this.model) === null || _b === void 0 ? void 0 : _b.issue))
|
|
177
|
-
return nothing;
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
get volumeIssueTemplate() {
|
|
175
|
+
var _a, _b, _c, _d;
|
|
176
|
+
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.volume) || !((_b = this.model) === null || _b === void 0 ? void 0 : _b.issue))
|
|
177
|
+
return nothing;
|
|
178
178
|
return html `
|
|
179
179
|
<div class="volume-issue">
|
|
180
180
|
<span class="truncated" title="volume|issue">
|
|
181
181
|
Volume ${(_c = this.model) === null || _c === void 0 ? void 0 : _c.volume}, Issue ${(_d = this.model) === null || _d === void 0 ? void 0 : _d.issue}
|
|
182
182
|
</span>
|
|
183
183
|
</div>
|
|
184
|
-
`;
|
|
185
|
-
}
|
|
186
|
-
get webArchivesCaptureDatesTemplate() {
|
|
187
|
-
var _a;
|
|
188
|
-
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
|
|
189
|
-
return nothing;
|
|
184
|
+
`;
|
|
185
|
+
}
|
|
186
|
+
get webArchivesCaptureDatesTemplate() {
|
|
187
|
+
var _a;
|
|
188
|
+
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
|
|
189
|
+
return nothing;
|
|
190
190
|
return html `
|
|
191
191
|
<ul class="capture-dates">
|
|
192
192
|
${map(this.model.captureDates, date => html `<li>
|
|
193
193
|
${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
|
|
194
194
|
</li>`)}
|
|
195
195
|
</ul>
|
|
196
|
-
`;
|
|
197
|
-
}
|
|
198
|
-
get isSortedByDate() {
|
|
199
|
-
var _a;
|
|
200
|
-
return ['date', 'reviewdate', 'addeddate', 'publicdate'].includes((_a = this.effectiveSort) === null || _a === void 0 ? void 0 : _a.field);
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Returns the active sort param if one is set, or the default sort param otherwise.
|
|
204
|
-
*/
|
|
205
|
-
get effectiveSort() {
|
|
206
|
-
var _a;
|
|
207
|
-
return (_a = this.sortParam) !== null && _a !== void 0 ? _a : this.defaultSortParam;
|
|
208
|
-
}
|
|
209
|
-
get hasSnippets() {
|
|
210
|
-
var _a, _b;
|
|
211
|
-
return !!((_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets) === null || _b === void 0 ? void 0 : _b.length);
|
|
212
|
-
}
|
|
213
|
-
infoButtonPressed(e) {
|
|
214
|
-
e.preventDefault();
|
|
215
|
-
const event = new CustomEvent('infoButtonPressed', { detail: { x: e.clientX, y: e.clientY } });
|
|
216
|
-
this.dispatchEvent(event);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* CSS
|
|
220
|
-
*/
|
|
221
|
-
static get styles() {
|
|
222
|
-
const tileBorderColor = css `var(--tileBorderColor, #dddddd)`;
|
|
223
|
-
return [
|
|
224
|
-
baseTileStyles,
|
|
196
|
+
`;
|
|
197
|
+
}
|
|
198
|
+
get isSortedByDate() {
|
|
199
|
+
var _a;
|
|
200
|
+
return ['date', 'reviewdate', 'addeddate', 'publicdate'].includes((_a = this.effectiveSort) === null || _a === void 0 ? void 0 : _a.field);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Returns the active sort param if one is set, or the default sort param otherwise.
|
|
204
|
+
*/
|
|
205
|
+
get effectiveSort() {
|
|
206
|
+
var _a;
|
|
207
|
+
return (_a = this.sortParam) !== null && _a !== void 0 ? _a : this.defaultSortParam;
|
|
208
|
+
}
|
|
209
|
+
get hasSnippets() {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
return !!((_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets) === null || _b === void 0 ? void 0 : _b.length);
|
|
212
|
+
}
|
|
213
|
+
infoButtonPressed(e) {
|
|
214
|
+
e.preventDefault();
|
|
215
|
+
const event = new CustomEvent('infoButtonPressed', { detail: { x: e.clientX, y: e.clientY } });
|
|
216
|
+
this.dispatchEvent(event);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* CSS
|
|
220
|
+
*/
|
|
221
|
+
static get styles() {
|
|
222
|
+
const tileBorderColor = css `var(--tileBorderColor, #dddddd)`;
|
|
223
|
+
return [
|
|
224
|
+
baseTileStyles,
|
|
225
225
|
css `
|
|
226
226
|
a:link {
|
|
227
227
|
text-decoration: none;
|
|
@@ -260,15 +260,15 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
260
260
|
-webkit-touch-callout: default;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
`,
|
|
264
|
-
];
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
__decorate([
|
|
268
|
-
property({ type: Boolean })
|
|
269
|
-
], ItemTile.prototype, "showInfoButton", void 0);
|
|
270
|
-
ItemTile = __decorate([
|
|
271
|
-
customElement('item-tile')
|
|
272
|
-
], ItemTile);
|
|
273
|
-
export { ItemTile };
|
|
263
|
+
`,
|
|
264
|
+
];
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
__decorate([
|
|
268
|
+
property({ type: Boolean })
|
|
269
|
+
], ItemTile.prototype, "showInfoButton", void 0);
|
|
270
|
+
ItemTile = __decorate([
|
|
271
|
+
customElement('item-tile')
|
|
272
|
+
], ItemTile);
|
|
273
|
+
export { ItemTile };
|
|
274
274
|
//# sourceMappingURL=item-tile.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
|
-
import { BaseTileComponent } from '../base-tile-component';
|
|
3
|
-
import '../image-block';
|
|
4
|
-
export declare class SearchTile extends BaseTileComponent {
|
|
5
|
-
showInfoButton: boolean;
|
|
6
|
-
render(): TemplateResult<1>;
|
|
7
|
-
private get getImageBlockTemplate();
|
|
8
|
-
private get getTitleTemplate();
|
|
9
|
-
static get styles(): CSSResultGroup;
|
|
10
|
-
}
|
|
1
|
+
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
|
+
import { BaseTileComponent } from '../base-tile-component';
|
|
3
|
+
import '../image-block';
|
|
4
|
+
export declare class SearchTile extends BaseTileComponent {
|
|
5
|
+
showInfoButton: boolean;
|
|
6
|
+
render(): TemplateResult<1>;
|
|
7
|
+
private get getImageBlockTemplate();
|
|
8
|
+
private get getTitleTemplate();
|
|
9
|
+
static get styles(): CSSResultGroup;
|
|
10
|
+
}
|