@internetarchive/collection-browser 3.3.1 → 3.3.2
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/package.json +1 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.js.map +0 -1
- package/dist/src/app-root.d.ts +0 -105
- package/dist/src/app-root.js +0 -1076
- package/dist/src/app-root.js.map +0 -1
- package/dist/src/assets/img/icons/arrow-left.d.ts +0 -2
- package/dist/src/assets/img/icons/arrow-left.js +0 -10
- package/dist/src/assets/img/icons/arrow-left.js.map +0 -1
- package/dist/src/assets/img/icons/arrow-right.d.ts +0 -2
- package/dist/src/assets/img/icons/arrow-right.js +0 -10
- package/dist/src/assets/img/icons/arrow-right.js.map +0 -1
- package/dist/src/assets/img/icons/chevron.d.ts +0 -2
- package/dist/src/assets/img/icons/chevron.js +0 -4
- package/dist/src/assets/img/icons/chevron.js.map +0 -1
- package/dist/src/assets/img/icons/close-circle-dark.d.ts +0 -2
- package/dist/src/assets/img/icons/close-circle-dark.js +0 -5
- package/dist/src/assets/img/icons/close-circle-dark.js.map +0 -1
- package/dist/src/assets/img/icons/contract.d.ts +0 -2
- package/dist/src/assets/img/icons/contract.js +0 -9
- package/dist/src/assets/img/icons/contract.js.map +0 -1
- package/dist/src/assets/img/icons/empty-query.d.ts +0 -2
- package/dist/src/assets/img/icons/empty-query.js +0 -5
- package/dist/src/assets/img/icons/empty-query.js.map +0 -1
- package/dist/src/assets/img/icons/expand.d.ts +0 -2
- package/dist/src/assets/img/icons/expand.js +0 -9
- package/dist/src/assets/img/icons/expand.js.map +0 -1
- package/dist/src/assets/img/icons/eye-closed.d.ts +0 -2
- package/dist/src/assets/img/icons/eye-closed.js +0 -5
- package/dist/src/assets/img/icons/eye-closed.js.map +0 -1
- package/dist/src/assets/img/icons/eye.d.ts +0 -2
- package/dist/src/assets/img/icons/eye.js +0 -5
- package/dist/src/assets/img/icons/eye.js.map +0 -1
- package/dist/src/assets/img/icons/favorite-filled.d.ts +0 -1
- package/dist/src/assets/img/icons/favorite-filled.js +0 -10
- package/dist/src/assets/img/icons/favorite-filled.js.map +0 -1
- package/dist/src/assets/img/icons/favorite-unfilled.d.ts +0 -1
- package/dist/src/assets/img/icons/favorite-unfilled.js +0 -9
- package/dist/src/assets/img/icons/favorite-unfilled.js.map +0 -1
- package/dist/src/assets/img/icons/filter.d.ts +0 -2
- package/dist/src/assets/img/icons/filter.js +0 -10
- package/dist/src/assets/img/icons/filter.js.map +0 -1
- package/dist/src/assets/img/icons/login-required.d.ts +0 -1
- package/dist/src/assets/img/icons/login-required.js +0 -18
- package/dist/src/assets/img/icons/login-required.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/account.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/account.js +0 -14
- package/dist/src/assets/img/icons/mediatype/account.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/audio.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/audio.js +0 -14
- package/dist/src/assets/img/icons/mediatype/audio.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/collection.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/collection.js +0 -12
- package/dist/src/assets/img/icons/mediatype/collection.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/data.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/data.js +0 -15
- package/dist/src/assets/img/icons/mediatype/data.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/etree.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/etree.js +0 -14
- package/dist/src/assets/img/icons/mediatype/etree.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/film.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/film.js +0 -14
- package/dist/src/assets/img/icons/mediatype/film.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/images.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/images.js +0 -13
- package/dist/src/assets/img/icons/mediatype/images.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/radio.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/radio.js +0 -15
- package/dist/src/assets/img/icons/mediatype/radio.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/search.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/search.js +0 -14
- package/dist/src/assets/img/icons/mediatype/search.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/software.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/software.js +0 -13
- package/dist/src/assets/img/icons/mediatype/software.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/texts.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/texts.js +0 -13
- package/dist/src/assets/img/icons/mediatype/texts.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/tv-commercial.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/tv-commercial.js +0 -12
- package/dist/src/assets/img/icons/mediatype/tv-commercial.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/tv-fact-check.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/tv-fact-check.js +0 -12
- package/dist/src/assets/img/icons/mediatype/tv-fact-check.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/tv-quote.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/tv-quote.js +0 -12
- package/dist/src/assets/img/icons/mediatype/tv-quote.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/tv.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/tv.js +0 -14
- package/dist/src/assets/img/icons/mediatype/tv.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/video.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/video.js +0 -14
- package/dist/src/assets/img/icons/mediatype/video.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/web.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/web.js +0 -13
- package/dist/src/assets/img/icons/mediatype/web.js.map +0 -1
- package/dist/src/assets/img/icons/null-result.d.ts +0 -2
- package/dist/src/assets/img/icons/null-result.js +0 -5
- package/dist/src/assets/img/icons/null-result.js.map +0 -1
- package/dist/src/assets/img/icons/quote.d.ts +0 -1
- package/dist/src/assets/img/icons/quote.js +0 -7
- package/dist/src/assets/img/icons/quote.js.map +0 -1
- package/dist/src/assets/img/icons/restricted.d.ts +0 -1
- package/dist/src/assets/img/icons/restricted.js +0 -13
- package/dist/src/assets/img/icons/restricted.js.map +0 -1
- package/dist/src/assets/img/icons/reviews.d.ts +0 -1
- package/dist/src/assets/img/icons/reviews.js +0 -11
- package/dist/src/assets/img/icons/reviews.js.map +0 -1
- package/dist/src/assets/img/icons/upload.d.ts +0 -1
- package/dist/src/assets/img/icons/upload.js +0 -12
- package/dist/src/assets/img/icons/upload.js.map +0 -1
- package/dist/src/assets/img/icons/views.d.ts +0 -1
- package/dist/src/assets/img/icons/views.js +0 -11
- package/dist/src/assets/img/icons/views.js.map +0 -1
- package/dist/src/circular-activity-indicator.d.ts +0 -5
- package/dist/src/circular-activity-indicator.js +0 -66
- package/dist/src/circular-activity-indicator.js.map +0 -1
- package/dist/src/collection-browser.d.ts +0 -684
- package/dist/src/collection-browser.js +0 -2567
- package/dist/src/collection-browser.js.map +0 -1
- package/dist/src/collection-facets/facet-row.d.ts +0 -30
- package/dist/src/collection-facets/facet-row.js +0 -265
- package/dist/src/collection-facets/facet-row.js.map +0 -1
- package/dist/src/collection-facets/facet-tombstone-row.d.ts +0 -5
- package/dist/src/collection-facets/facet-tombstone-row.js +0 -43
- package/dist/src/collection-facets/facet-tombstone-row.js.map +0 -1
- package/dist/src/collection-facets/facets-template.d.ts +0 -13
- package/dist/src/collection-facets/facets-template.js +0 -68
- package/dist/src/collection-facets/facets-template.js.map +0 -1
- package/dist/src/collection-facets/models.d.ts +0 -9
- package/dist/src/collection-facets/models.js +0 -10
- package/dist/src/collection-facets/models.js.map +0 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +0 -109
- package/dist/src/collection-facets/more-facets-content.js +0 -547
- package/dist/src/collection-facets/more-facets-content.js.map +0 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +0 -36
- package/dist/src/collection-facets/more-facets-pagination.js +0 -264
- package/dist/src/collection-facets/more-facets-pagination.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/dedupe.d.ts +0 -10
- package/dist/src/collection-facets/smart-facets/dedupe.js +0 -35
- package/dist/src/collection-facets/smart-facets/dedupe.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.d.ts +0 -5
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js +0 -24
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/heuristics/index.d.ts +0 -3
- package/dist/src/collection-facets/smart-facets/heuristics/index.js +0 -4
- package/dist/src/collection-facets/smart-facets/heuristics/index.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.d.ts +0 -4
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js +0 -14
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.d.ts +0 -6
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js +0 -68
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.d.ts +0 -9
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js +0 -69
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.d.ts +0 -21
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js +0 -76
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/models.d.ts +0 -30
- package/dist/src/collection-facets/smart-facets/models.js +0 -2
- package/dist/src/collection-facets/smart-facets/models.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.d.ts +0 -54
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +0 -383
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +0 -11
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js +0 -133
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.d.ts +0 -28
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +0 -172
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.d.ts +0 -2
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js +0 -13
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js.map +0 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.d.ts +0 -5
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +0 -18
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +0 -1
- package/dist/src/collection-facets/toggle-switch.d.ts +0 -41
- package/dist/src/collection-facets/toggle-switch.js +0 -174
- package/dist/src/collection-facets/toggle-switch.js.map +0 -1
- package/dist/src/collection-facets.d.ts +0 -113
- package/dist/src/collection-facets.js +0 -873
- package/dist/src/collection-facets.js.map +0 -1
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +0 -261
- package/dist/src/data-source/collection-browser-data-source-interface.js +0 -2
- package/dist/src/data-source/collection-browser-data-source-interface.js.map +0 -1
- package/dist/src/data-source/collection-browser-data-source.d.ts +0 -400
- package/dist/src/data-source/collection-browser-data-source.js +0 -1103
- package/dist/src/data-source/collection-browser-data-source.js.map +0 -1
- package/dist/src/data-source/collection-browser-query-state.d.ts +0 -49
- package/dist/src/data-source/collection-browser-query-state.js +0 -2
- package/dist/src/data-source/collection-browser-query-state.js.map +0 -1
- package/dist/src/data-source/models.d.ts +0 -32
- package/dist/src/data-source/models.js +0 -9
- package/dist/src/data-source/models.js.map +0 -1
- package/dist/src/empty-placeholder.d.ts +0 -23
- package/dist/src/empty-placeholder.js +0 -165
- package/dist/src/empty-placeholder.js.map +0 -1
- package/dist/src/expanded-date-picker.d.ts +0 -50
- package/dist/src/expanded-date-picker.js +0 -182
- package/dist/src/expanded-date-picker.js.map +0 -1
- package/dist/src/language-code-handler/language-code-handler.d.ts +0 -37
- package/dist/src/language-code-handler/language-code-handler.js +0 -27
- package/dist/src/language-code-handler/language-code-handler.js.map +0 -1
- package/dist/src/language-code-handler/language-code-mapping.d.ts +0 -1
- package/dist/src/language-code-handler/language-code-mapping.js +0 -563
- package/dist/src/language-code-handler/language-code-mapping.js.map +0 -1
- package/dist/src/manage/manage-bar.d.ts +0 -58
- package/dist/src/manage/manage-bar.js +0 -237
- package/dist/src/manage/manage-bar.js.map +0 -1
- package/dist/src/manage/remove-items-modal-content.d.ts +0 -9
- package/dist/src/manage/remove-items-modal-content.js +0 -104
- package/dist/src/manage/remove-items-modal-content.js.map +0 -1
- package/dist/src/mediatype/mediatype-config.d.ts +0 -11
- package/dist/src/mediatype/mediatype-config.js +0 -116
- package/dist/src/mediatype/mediatype-config.js.map +0 -1
- package/dist/src/models.d.ts +0 -302
- package/dist/src/models.js +0 -511
- package/dist/src/models.js.map +0 -1
- package/dist/src/restoration-state-handler.d.ts +0 -75
- package/dist/src/restoration-state-handler.js +0 -403
- package/dist/src/restoration-state-handler.js.map +0 -1
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +0 -6
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.js +0 -60
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.js.map +0 -1
- package/dist/src/sort-filter-bar/alpha-bar.d.ts +0 -21
- package/dist/src/sort-filter-bar/alpha-bar.js +0 -241
- package/dist/src/sort-filter-bar/alpha-bar.js.map +0 -1
- package/dist/src/sort-filter-bar/img/compact.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/compact.js +0 -5
- package/dist/src/sort-filter-bar/img/compact.js.map +0 -1
- package/dist/src/sort-filter-bar/img/list.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/list.js +0 -5
- package/dist/src/sort-filter-bar/img/list.js.map +0 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js +0 -15
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js.map +0 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-down.js +0 -17
- package/dist/src/sort-filter-bar/img/sort-toggle-down.js.map +0 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/sort-toggle-up.js +0 -17
- package/dist/src/sort-filter-bar/img/sort-toggle-up.js.map +0 -1
- package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/sort-triangle.js +0 -5
- package/dist/src/sort-filter-bar/img/sort-triangle.js.map +0 -1
- package/dist/src/sort-filter-bar/img/tile.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/tile.js +0 -5
- package/dist/src/sort-filter-bar/img/tile.js.map +0 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +0 -278
- package/dist/src/sort-filter-bar/sort-filter-bar.js +0 -1161
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +0 -1
- package/dist/src/styles/ia-button.d.ts +0 -2
- package/dist/src/styles/ia-button.js +0 -134
- package/dist/src/styles/ia-button.js.map +0 -1
- package/dist/src/styles/item-image-styles.d.ts +0 -8
- package/dist/src/styles/item-image-styles.js +0 -123
- package/dist/src/styles/item-image-styles.js.map +0 -1
- package/dist/src/styles/sr-only.d.ts +0 -1
- package/dist/src/styles/sr-only.js +0 -18
- package/dist/src/styles/sr-only.js.map +0 -1
- package/dist/src/tiles/base-tile-component.d.ts +0 -27
- package/dist/src/tiles/base-tile-component.js +0 -82
- package/dist/src/tiles/base-tile-component.js.map +0 -1
- package/dist/src/tiles/collection-browser-loading-tile.d.ts +0 -5
- package/dist/src/tiles/collection-browser-loading-tile.js +0 -29
- package/dist/src/tiles/collection-browser-loading-tile.js.map +0 -1
- package/dist/src/tiles/grid/account-tile.d.ts +0 -18
- package/dist/src/tiles/grid/account-tile.js +0 -111
- package/dist/src/tiles/grid/account-tile.js.map +0 -1
- package/dist/src/tiles/grid/collection-tile.d.ts +0 -15
- package/dist/src/tiles/grid/collection-tile.js +0 -160
- package/dist/src/tiles/grid/collection-tile.js.map +0 -1
- package/dist/src/tiles/grid/item-tile.d.ts +0 -41
- package/dist/src/tiles/grid/item-tile.js +0 -321
- package/dist/src/tiles/grid/item-tile.js.map +0 -1
- package/dist/src/tiles/grid/search-tile.d.ts +0 -10
- package/dist/src/tiles/grid/search-tile.js +0 -95
- package/dist/src/tiles/grid/search-tile.js.map +0 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +0 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +0 -128
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +0 -1
- package/dist/src/tiles/grid/tile-stats.d.ts +0 -58
- package/dist/src/tiles/grid/tile-stats.js +0 -204
- package/dist/src/tiles/grid/tile-stats.js.map +0 -1
- package/dist/src/tiles/hover/hover-pane-controller.d.ts +0 -220
- package/dist/src/tiles/hover/hover-pane-controller.js +0 -378
- package/dist/src/tiles/hover/hover-pane-controller.js.map +0 -1
- package/dist/src/tiles/hover/tile-hover-pane.d.ts +0 -19
- package/dist/src/tiles/hover/tile-hover-pane.js +0 -182
- package/dist/src/tiles/hover/tile-hover-pane.js.map +0 -1
- package/dist/src/tiles/image-block.d.ts +0 -19
- package/dist/src/tiles/image-block.js +0 -175
- package/dist/src/tiles/image-block.js.map +0 -1
- package/dist/src/tiles/item-image.d.ts +0 -40
- package/dist/src/tiles/item-image.js +0 -191
- package/dist/src/tiles/item-image.js.map +0 -1
- package/dist/src/tiles/list/tile-list-compact-header.d.ts +0 -6
- package/dist/src/tiles/list/tile-list-compact-header.js +0 -85
- package/dist/src/tiles/list/tile-list-compact-header.js.map +0 -1
- package/dist/src/tiles/list/tile-list-compact.d.ts +0 -19
- package/dist/src/tiles/list/tile-list-compact.js +0 -223
- package/dist/src/tiles/list/tile-list-compact.js.map +0 -1
- package/dist/src/tiles/list/tile-list.d.ts +0 -54
- package/dist/src/tiles/list/tile-list.js +0 -621
- package/dist/src/tiles/list/tile-list.js.map +0 -1
- package/dist/src/tiles/models.d.ts +0 -1
- package/dist/src/tiles/models.js +0 -2
- package/dist/src/tiles/models.js.map +0 -1
- package/dist/src/tiles/overlay/icon-overlay.d.ts +0 -8
- package/dist/src/tiles/overlay/icon-overlay.js +0 -55
- package/dist/src/tiles/overlay/icon-overlay.js.map +0 -1
- package/dist/src/tiles/overlay/text-overlay.d.ts +0 -9
- package/dist/src/tiles/overlay/text-overlay.js +0 -74
- package/dist/src/tiles/overlay/text-overlay.js.map +0 -1
- package/dist/src/tiles/review-block.d.ts +0 -12
- package/dist/src/tiles/review-block.js +0 -134
- package/dist/src/tiles/review-block.js.map +0 -1
- package/dist/src/tiles/text-snippet-block.d.ts +0 -27
- package/dist/src/tiles/text-snippet-block.js +0 -132
- package/dist/src/tiles/text-snippet-block.js.map +0 -1
- package/dist/src/tiles/tile-dispatcher.d.ts +0 -68
- package/dist/src/tiles/tile-dispatcher.js +0 -445
- package/dist/src/tiles/tile-dispatcher.js.map +0 -1
- package/dist/src/tiles/tile-display-value-provider.d.ts +0 -47
- package/dist/src/tiles/tile-display-value-provider.js +0 -95
- package/dist/src/tiles/tile-display-value-provider.js.map +0 -1
- package/dist/src/tiles/tile-mediatype-icon.d.ts +0 -27
- package/dist/src/tiles/tile-mediatype-icon.js +0 -130
- package/dist/src/tiles/tile-mediatype-icon.js.map +0 -1
- package/dist/src/utils/analytics-events.d.ts +0 -28
- package/dist/src/utils/analytics-events.js +0 -31
- package/dist/src/utils/analytics-events.js.map +0 -1
- package/dist/src/utils/array-equals.d.ts +0 -4
- package/dist/src/utils/array-equals.js +0 -11
- package/dist/src/utils/array-equals.js.map +0 -1
- package/dist/src/utils/collapse-repeated-quotes.d.ts +0 -11
- package/dist/src/utils/collapse-repeated-quotes.js +0 -14
- package/dist/src/utils/collapse-repeated-quotes.js.map +0 -1
- package/dist/src/utils/facet-utils.d.ts +0 -83
- package/dist/src/utils/facet-utils.js +0 -152
- package/dist/src/utils/facet-utils.js.map +0 -1
- package/dist/src/utils/format-count.d.ts +0 -7
- package/dist/src/utils/format-count.js +0 -76
- package/dist/src/utils/format-count.js.map +0 -1
- package/dist/src/utils/format-date.d.ts +0 -16
- package/dist/src/utils/format-date.js +0 -33
- package/dist/src/utils/format-date.js.map +0 -1
- package/dist/src/utils/format-unit-size.d.ts +0 -2
- package/dist/src/utils/format-unit-size.js +0 -34
- package/dist/src/utils/format-unit-size.js.map +0 -1
- package/dist/src/utils/local-date-from-utc.d.ts +0 -9
- package/dist/src/utils/local-date-from-utc.js +0 -16
- package/dist/src/utils/local-date-from-utc.js.map +0 -1
- package/dist/src/utils/log.d.ts +0 -7
- package/dist/src/utils/log.js +0 -14
- package/dist/src/utils/log.js.map +0 -1
- package/dist/src/utils/resolve-mediatype.d.ts +0 -8
- package/dist/src/utils/resolve-mediatype.js +0 -24
- package/dist/src/utils/resolve-mediatype.js.map +0 -1
- package/dist/src/utils/sha1.d.ts +0 -2
- package/dist/src/utils/sha1.js +0 -9
- package/dist/src/utils/sha1.js.map +0 -1
- package/dist/test/collection-browser.test.d.ts +0 -1
- package/dist/test/collection-browser.test.js +0 -1711
- package/dist/test/collection-browser.test.js.map +0 -1
- package/dist/test/collection-facets/facet-row.test.d.ts +0 -1
- package/dist/test/collection-facets/facet-row.test.js +0 -274
- package/dist/test/collection-facets/facet-row.test.js.map +0 -1
- package/dist/test/collection-facets/facets-template.test.d.ts +0 -1
- package/dist/test/collection-facets/facets-template.test.js +0 -101
- package/dist/test/collection-facets/facets-template.test.js.map +0 -1
- package/dist/test/collection-facets/more-facets-content.test.d.ts +0 -1
- package/dist/test/collection-facets/more-facets-content.test.js +0 -169
- package/dist/test/collection-facets/more-facets-content.test.js.map +0 -1
- package/dist/test/collection-facets/more-facets-pagination.test.d.ts +0 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +0 -132
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +0 -1
- package/dist/test/collection-facets/toggle-switch.test.d.ts +0 -1
- package/dist/test/collection-facets/toggle-switch.test.js +0 -96
- package/dist/test/collection-facets/toggle-switch.test.js.map +0 -1
- package/dist/test/collection-facets.test.d.ts +0 -2
- package/dist/test/collection-facets.test.js +0 -745
- package/dist/test/collection-facets.test.js.map +0 -1
- package/dist/test/data-source/collection-browser-data-source.test.d.ts +0 -1
- package/dist/test/data-source/collection-browser-data-source.test.js +0 -102
- package/dist/test/data-source/collection-browser-data-source.test.js.map +0 -1
- package/dist/test/empty-placeholder.test.d.ts +0 -1
- package/dist/test/empty-placeholder.test.js +0 -63
- package/dist/test/empty-placeholder.test.js.map +0 -1
- package/dist/test/expanded-date-picker.test.d.ts +0 -1
- package/dist/test/expanded-date-picker.test.js +0 -130
- package/dist/test/expanded-date-picker.test.js.map +0 -1
- package/dist/test/icon-overlay.test.d.ts +0 -1
- package/dist/test/icon-overlay.test.js +0 -30
- package/dist/test/icon-overlay.test.js.map +0 -1
- package/dist/test/image-block.test.d.ts +0 -1
- package/dist/test/image-block.test.js +0 -218
- package/dist/test/image-block.test.js.map +0 -1
- package/dist/test/item-image.test.d.ts +0 -1
- package/dist/test/item-image.test.js +0 -196
- package/dist/test/item-image.test.js.map +0 -1
- package/dist/test/manage/manage-bar.test.d.ts +0 -2
- package/dist/test/manage/manage-bar.test.js +0 -106
- package/dist/test/manage/manage-bar.test.js.map +0 -1
- package/dist/test/manage/remove-items-modal-content.test.d.ts +0 -1
- package/dist/test/manage/remove-items-modal-content.test.js +0 -65
- package/dist/test/manage/remove-items-modal-content.test.js.map +0 -1
- package/dist/test/mediatype-config.test.d.ts +0 -1
- package/dist/test/mediatype-config.test.js +0 -11
- package/dist/test/mediatype-config.test.js.map +0 -1
- package/dist/test/mocks/mock-analytics-handler.d.ts +0 -10
- package/dist/test/mocks/mock-analytics-handler.js +0 -16
- package/dist/test/mocks/mock-analytics-handler.js.map +0 -1
- package/dist/test/mocks/mock-search-responses.d.ts +0 -31
- package/dist/test/mocks/mock-search-responses.js +0 -1241
- package/dist/test/mocks/mock-search-responses.js.map +0 -1
- package/dist/test/mocks/mock-search-service.d.ts +0 -16
- package/dist/test/mocks/mock-search-service.js +0 -65
- package/dist/test/mocks/mock-search-service.js.map +0 -1
- package/dist/test/restoration-state-handler.test.d.ts +0 -1
- package/dist/test/restoration-state-handler.test.js +0 -375
- package/dist/test/restoration-state-handler.test.js.map +0 -1
- package/dist/test/review-block.test.d.ts +0 -1
- package/dist/test/review-block.test.js +0 -48
- package/dist/test/review-block.test.js.map +0 -1
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +0 -1
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +0 -13
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +0 -1
- package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +0 -1
- package/dist/test/sort-filter-bar/alpha-bar.test.js +0 -74
- package/dist/test/sort-filter-bar/alpha-bar.test.js.map +0 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +0 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +0 -609
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +0 -1
- package/dist/test/text-overlay.test.d.ts +0 -1
- package/dist/test/text-overlay.test.js +0 -42
- package/dist/test/text-overlay.test.js.map +0 -1
- package/dist/test/text-snippet-block.test.d.ts +0 -1
- package/dist/test/text-snippet-block.test.js +0 -63
- package/dist/test/text-snippet-block.test.js.map +0 -1
- package/dist/test/tile-stats.test.d.ts +0 -1
- package/dist/test/tile-stats.test.js +0 -128
- package/dist/test/tile-stats.test.js.map +0 -1
- package/dist/test/tiles/grid/account-tile.test.d.ts +0 -1
- package/dist/test/tiles/grid/account-tile.test.js +0 -96
- package/dist/test/tiles/grid/account-tile.test.js.map +0 -1
- package/dist/test/tiles/grid/collection-tile.test.d.ts +0 -1
- package/dist/test/tiles/grid/collection-tile.test.js +0 -96
- package/dist/test/tiles/grid/collection-tile.test.js.map +0 -1
- package/dist/test/tiles/grid/item-tile.test.d.ts +0 -1
- package/dist/test/tiles/grid/item-tile.test.js +0 -427
- package/dist/test/tiles/grid/item-tile.test.js.map +0 -1
- package/dist/test/tiles/grid/search-tile.test.d.ts +0 -1
- package/dist/test/tiles/grid/search-tile.test.js +0 -66
- package/dist/test/tiles/grid/search-tile.test.js.map +0 -1
- package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +0 -1
- package/dist/test/tiles/hover/hover-pane-controller.test.js +0 -282
- package/dist/test/tiles/hover/hover-pane-controller.test.js.map +0 -1
- package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +0 -1
- package/dist/test/tiles/hover/tile-hover-pane.test.js +0 -57
- package/dist/test/tiles/hover/tile-hover-pane.test.js.map +0 -1
- package/dist/test/tiles/list/tile-list-compact.test.d.ts +0 -1
- package/dist/test/tiles/list/tile-list-compact.test.js +0 -251
- package/dist/test/tiles/list/tile-list-compact.test.js.map +0 -1
- package/dist/test/tiles/list/tile-list.test.d.ts +0 -1
- package/dist/test/tiles/list/tile-list.test.js +0 -469
- package/dist/test/tiles/list/tile-list.test.js.map +0 -1
- package/dist/test/tiles/tile-dispatcher.test.d.ts +0 -1
- package/dist/test/tiles/tile-dispatcher.test.js +0 -153
- package/dist/test/tiles/tile-dispatcher.test.js.map +0 -1
- package/dist/test/tiles/tile-display-value-provider.test.d.ts +0 -1
- package/dist/test/tiles/tile-display-value-provider.test.js +0 -142
- package/dist/test/tiles/tile-display-value-provider.test.js.map +0 -1
- package/dist/test/tiles/tile-mediatype-icon.test.d.ts +0 -1
- package/dist/test/tiles/tile-mediatype-icon.test.js +0 -145
- package/dist/test/tiles/tile-mediatype-icon.test.js.map +0 -1
- package/dist/test/utils/array-equals.test.d.ts +0 -1
- package/dist/test/utils/array-equals.test.js +0 -27
- package/dist/test/utils/array-equals.test.js.map +0 -1
- package/dist/test/utils/format-count.test.d.ts +0 -1
- package/dist/test/utils/format-count.test.js +0 -24
- package/dist/test/utils/format-count.test.js.map +0 -1
- package/dist/test/utils/format-date.test.d.ts +0 -1
- package/dist/test/utils/format-date.test.js +0 -61
- package/dist/test/utils/format-date.test.js.map +0 -1
- package/dist/test/utils/format-unit-size.test.d.ts +0 -1
- package/dist/test/utils/format-unit-size.test.js +0 -18
- package/dist/test/utils/format-unit-size.test.js.map +0 -1
- package/dist/test/utils/local-date-from-utc.test.d.ts +0 -1
- package/dist/test/utils/local-date-from-utc.test.js +0 -27
- package/dist/test/utils/local-date-from-utc.test.js.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { SortParam } from '@internetarchive/search-service';
|
|
2
|
-
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
3
|
-
import { type TileModel } from '../../models';
|
|
4
|
-
import type { CollectionTitles } from '../../data-source/models';
|
|
5
|
-
import '../list/tile-list';
|
|
6
|
-
export declare class TileHoverPane extends LitElement {
|
|
7
|
-
model?: TileModel;
|
|
8
|
-
baseNavigationUrl?: string;
|
|
9
|
-
baseImageUrl?: string;
|
|
10
|
-
loggedIn: boolean;
|
|
11
|
-
suppressBlurring: boolean;
|
|
12
|
-
sortParam?: SortParam;
|
|
13
|
-
mobileBreakpoint?: number;
|
|
14
|
-
currentWidth?: number;
|
|
15
|
-
collectionTitles?: CollectionTitles;
|
|
16
|
-
protected render(): TemplateResult;
|
|
17
|
-
private get headerTemplate();
|
|
18
|
-
static get styles(): CSSResultGroup;
|
|
19
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { css, html, LitElement, nothing, } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { suppressedCollections } from '../../models';
|
|
5
|
-
import '../list/tile-list';
|
|
6
|
-
let TileHoverPane = class TileHoverPane extends LitElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.loggedIn = false;
|
|
10
|
-
this.suppressBlurring = false;
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return html `
|
|
14
|
-
<div id="container">
|
|
15
|
-
${this.headerTemplate}
|
|
16
|
-
<div id="hover-tile-list">
|
|
17
|
-
<tile-list
|
|
18
|
-
.model=${this.model}
|
|
19
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
20
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
21
|
-
.loggedIn=${this.loggedIn}
|
|
22
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
23
|
-
.sortParam=${this.sortParam}
|
|
24
|
-
.collectionTitles=${this.collectionTitles}
|
|
25
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
26
|
-
.currentWidth=${this.currentWidth}
|
|
27
|
-
></tile-list>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
get headerTemplate() {
|
|
33
|
-
var _a, _b, _c, _d;
|
|
34
|
-
// early return if item does't have parent collection
|
|
35
|
-
if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.collections.length) === 0)
|
|
36
|
-
return nothing;
|
|
37
|
-
let collectionTitle = '';
|
|
38
|
-
let collectionIdentifier = '';
|
|
39
|
-
for (const collection of ((_b = this.model) === null || _b === void 0 ? void 0 : _b.collections) || []) {
|
|
40
|
-
if (!suppressedCollections[collection] &&
|
|
41
|
-
!collection.startsWith('fav-')) {
|
|
42
|
-
collectionTitle = (_d = (_c = this.collectionTitles) === null || _c === void 0 ? void 0 : _c.get(collection)) !== null && _d !== void 0 ? _d : collection;
|
|
43
|
-
collectionIdentifier = collection;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// sometimes item does have collections but they are in suppressed or favorite list,
|
|
48
|
-
// let's not render that
|
|
49
|
-
if (!collectionIdentifier)
|
|
50
|
-
return nothing;
|
|
51
|
-
return html `
|
|
52
|
-
<div id="list-line-header">
|
|
53
|
-
<a href="${this.baseNavigationUrl}/details/${collectionIdentifier}">
|
|
54
|
-
<img
|
|
55
|
-
src="${this.baseImageUrl}/services/img/${collectionIdentifier}"
|
|
56
|
-
alt=""
|
|
57
|
-
/><span>${collectionTitle}</span>
|
|
58
|
-
</a>
|
|
59
|
-
</div>
|
|
60
|
-
`;
|
|
61
|
-
}
|
|
62
|
-
static get styles() {
|
|
63
|
-
const hoverPaneHeaderBGColor = css `var(--hoverPaneHeaderBGColor, #edf0ff)`;
|
|
64
|
-
const iaLinkColor = css `var(--ia-theme-link-color, #4b64ff)`;
|
|
65
|
-
const iaFontFamily = css `var(--ia-theme-base-font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);`;
|
|
66
|
-
return css `
|
|
67
|
-
:host {
|
|
68
|
-
margin: 0;
|
|
69
|
-
border: 0;
|
|
70
|
-
padding: 0;
|
|
71
|
-
overflow: visible;
|
|
72
|
-
color: inherit;
|
|
73
|
-
background: none;
|
|
74
|
-
visibility: hidden;
|
|
75
|
-
opacity: 0;
|
|
76
|
-
transform: translateY(8px);
|
|
77
|
-
transition:
|
|
78
|
-
opacity 0.1s ease-in,
|
|
79
|
-
transform 0.1s ease-in;
|
|
80
|
-
--image-width: auto;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host(.visible) {
|
|
84
|
-
visibility: visible;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:host(.fade-in) {
|
|
88
|
-
opacity: 1;
|
|
89
|
-
transform: translateY(0);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@media (prefers-reduced-motion: reduce) {
|
|
93
|
-
:host {
|
|
94
|
-
transition-duration: 0.001s !important; /* Imperceptibly fast */
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
#container {
|
|
99
|
-
width: max-content;
|
|
100
|
-
max-width: min(45vw, 600px);
|
|
101
|
-
border: 1px solid #ddd;
|
|
102
|
-
border-radius: 4px;
|
|
103
|
-
box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.8);
|
|
104
|
-
background: white;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@media screen and (max-width: 600px) {
|
|
108
|
-
#container {
|
|
109
|
-
max-width: 80vw;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* main tile-list container */
|
|
114
|
-
#hover-tile-list {
|
|
115
|
-
padding: 10px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* header on hover panel to show collection icon and title */
|
|
119
|
-
#list-line-header {
|
|
120
|
-
background: ${hoverPaneHeaderBGColor};
|
|
121
|
-
}
|
|
122
|
-
#list-line-header a {
|
|
123
|
-
display: flex;
|
|
124
|
-
align-items: center;
|
|
125
|
-
column-gap: 5px;
|
|
126
|
-
height: 3.4rem;
|
|
127
|
-
padding: 0 10px;
|
|
128
|
-
border-radius: 4px 4px 0 0;
|
|
129
|
-
width: fit-content;
|
|
130
|
-
font-size: 1.4rem;
|
|
131
|
-
color: ${iaLinkColor};
|
|
132
|
-
font-family: ${iaFontFamily};
|
|
133
|
-
text-decoration: none;
|
|
134
|
-
width: auto;
|
|
135
|
-
}
|
|
136
|
-
#list-line-header a span {
|
|
137
|
-
white-space: nowrap;
|
|
138
|
-
overflow: hidden;
|
|
139
|
-
text-overflow: ellipsis;
|
|
140
|
-
}
|
|
141
|
-
#list-line-header a:hover {
|
|
142
|
-
text-decoration: underline;
|
|
143
|
-
}
|
|
144
|
-
#list-line-header a img {
|
|
145
|
-
width: 30px;
|
|
146
|
-
max-height: 30px;
|
|
147
|
-
}
|
|
148
|
-
`;
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ type: Object })
|
|
153
|
-
], TileHoverPane.prototype, "model", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
property({ type: String })
|
|
156
|
-
], TileHoverPane.prototype, "baseNavigationUrl", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
property({ type: String })
|
|
159
|
-
], TileHoverPane.prototype, "baseImageUrl", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
property({ type: Boolean })
|
|
162
|
-
], TileHoverPane.prototype, "loggedIn", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
property({ type: Boolean })
|
|
165
|
-
], TileHoverPane.prototype, "suppressBlurring", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
property({ type: Object })
|
|
168
|
-
], TileHoverPane.prototype, "sortParam", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
property({ type: Number })
|
|
171
|
-
], TileHoverPane.prototype, "mobileBreakpoint", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
property({ type: Number })
|
|
174
|
-
], TileHoverPane.prototype, "currentWidth", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
property({ type: Object })
|
|
177
|
-
], TileHoverPane.prototype, "collectionTitles", void 0);
|
|
178
|
-
TileHoverPane = __decorate([
|
|
179
|
-
customElement('tile-hover-pane')
|
|
180
|
-
], TileHoverPane);
|
|
181
|
-
export { TileHoverPane };
|
|
182
|
-
//# sourceMappingURL=tile-hover-pane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tile-hover-pane.js","sourceRoot":"","sources":["../../../../src/tiles/hover/tile-hover-pane.ts"],"names":[],"mappings":";AACA,OAAO,EACL,GAAG,EAEH,IAAI,EACJ,UAAU,EACV,OAAO,GAER,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAkB,MAAM,cAAc,CAAC;AAErE,OAAO,mBAAmB,CAAC;AAGpB,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAOwB,aAAQ,GAAY,KAAK,CAAC;QAE1B,qBAAgB,GAAY,KAAK,CAAC;IA2JjE,CAAC;IAhJW,MAAM;QACd,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,cAAc;;;qBAGR,IAAI,CAAC,KAAK;iCACE,IAAI,CAAC,iBAAiB;4BAC3B,IAAI,CAAC,YAAY;wBACrB,IAAI,CAAC,QAAQ;gCACL,IAAI,CAAC,gBAAgB;yBAC5B,IAAI,CAAC,SAAS;gCACP,IAAI,CAAC,gBAAgB;gCACrB,IAAI,CAAC,gBAAgB;4BACzB,IAAI,CAAC,YAAY;;;;KAIxC,CAAC;IACJ,CAAC;IAED,IAAY,cAAc;;QACxB,qDAAqD;QACrD,IAAI,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW,CAAC,MAAM,MAAK,CAAC;YAAE,OAAO,OAAO,CAAC;QAEzD,IAAI,eAAe,GAAG,EAAE,CAAC;QACzB,IAAI,oBAAoB,GAAG,EAAE,CAAC;QAE9B,KAAK,MAAM,UAAU,IAAI,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW,KAAI,EAAE,EAAE,CAAC;YACvD,IACE,CAAC,qBAAqB,CAAC,UAAU,CAAC;gBAClC,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,EAC9B,CAAC;gBACD,eAAe,GAAG,MAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,GAAG,CAAC,UAAU,CAAC,mCAAI,UAAU,CAAC;gBACvE,oBAAoB,GAAG,UAAU,CAAC;gBAClC,MAAM;YACR,CAAC;QACH,CAAC;QAED,oFAAoF;QACpF,wBAAwB;QACxB,IAAI,CAAC,oBAAoB;YAAE,OAAO,OAAO,CAAC;QAE1C,OAAO,IAAI,CAAA;;mBAEI,IAAI,CAAC,iBAAiB,YAAY,oBAAoB;;mBAEtD,IAAI,CAAC,YAAY,iBAAiB,oBAAoB;;oBAErD,eAAe;;;KAG9B,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,MAAM,sBAAsB,GAAG,GAAG,CAAA,wCAAwC,CAAC;QAC3E,MAAM,WAAW,GAAG,GAAG,CAAA,qCAAqC,CAAC;QAC7D,MAAM,YAAY,GAAG,GAAG,CAAA,mFAAmF,CAAC;QAE5G,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAsDQ,sBAAsB;;;;;;;;;;;iBAW3B,WAAW;uBACL,YAAY;;;;;;;;;;;;;;;;KAgB9B,CAAC;IACJ,CAAC;CACF,CAAA;AAnK6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAmB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAA4B;AAE3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AAErB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CAA2B;AAE1B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDAAmC;AAEnC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAuB;AAEtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAA2B;AAE1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AAGlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACS;AAlBzB,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAoKzB","sourcesContent":["import type { SortParam } from '@internetarchive/search-service';\nimport {\n css,\n CSSResultGroup,\n html,\n LitElement,\n nothing,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { suppressedCollections, type TileModel } from '../../models';\nimport type { CollectionTitles } from '../../data-source/models';\nimport '../list/tile-list';\n\n@customElement('tile-hover-pane')\nexport class TileHoverPane extends LitElement {\n @property({ type: Object }) model?: TileModel;\n\n @property({ type: String }) baseNavigationUrl?: string;\n\n @property({ type: String }) baseImageUrl?: string;\n\n @property({ type: Boolean }) loggedIn: boolean = false;\n\n @property({ type: Boolean }) suppressBlurring: boolean = false;\n\n @property({ type: Object }) sortParam?: SortParam;\n\n @property({ type: Number }) mobileBreakpoint?: number;\n\n @property({ type: Number }) currentWidth?: number;\n\n @property({ type: Object })\n collectionTitles?: CollectionTitles;\n\n protected render(): TemplateResult {\n return html`\n <div id=\"container\">\n ${this.headerTemplate}\n <div id=\"hover-tile-list\">\n <tile-list\n .model=${this.model}\n .baseNavigationUrl=${this.baseNavigationUrl}\n .baseImageUrl=${this.baseImageUrl}\n .loggedIn=${this.loggedIn}\n .suppressBlurring=${this.suppressBlurring}\n .sortParam=${this.sortParam}\n .collectionTitles=${this.collectionTitles}\n .mobileBreakpoint=${this.mobileBreakpoint}\n .currentWidth=${this.currentWidth}\n ></tile-list>\n </div>\n </div>\n `;\n }\n\n private get headerTemplate(): TemplateResult | typeof nothing {\n // early return if item does't have parent collection\n if (this.model?.collections.length === 0) return nothing;\n\n let collectionTitle = '';\n let collectionIdentifier = '';\n\n for (const collection of this.model?.collections || []) {\n if (\n !suppressedCollections[collection] &&\n !collection.startsWith('fav-')\n ) {\n collectionTitle = this.collectionTitles?.get(collection) ?? collection;\n collectionIdentifier = collection;\n break;\n }\n }\n\n // sometimes item does have collections but they are in suppressed or favorite list,\n // let's not render that\n if (!collectionIdentifier) return nothing;\n\n return html`\n <div id=\"list-line-header\">\n <a href=\"${this.baseNavigationUrl}/details/${collectionIdentifier}\">\n <img\n src=\"${this.baseImageUrl}/services/img/${collectionIdentifier}\"\n alt=\"\"\n /><span>${collectionTitle}</span>\n </a>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n const hoverPaneHeaderBGColor = css`var(--hoverPaneHeaderBGColor, #edf0ff)`;\n const iaLinkColor = css`var(--ia-theme-link-color, #4b64ff)`;\n const iaFontFamily = css`var(--ia-theme-base-font-family, \"Helvetica Neue\", Helvetica, Arial, sans-serif);`;\n\n return css`\n :host {\n margin: 0;\n border: 0;\n padding: 0;\n overflow: visible;\n color: inherit;\n background: none;\n visibility: hidden;\n opacity: 0;\n transform: translateY(8px);\n transition:\n opacity 0.1s ease-in,\n transform 0.1s ease-in;\n --image-width: auto;\n }\n\n :host(.visible) {\n visibility: visible;\n }\n\n :host(.fade-in) {\n opacity: 1;\n transform: translateY(0);\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition-duration: 0.001s !important; /* Imperceptibly fast */\n }\n }\n\n #container {\n width: max-content;\n max-width: min(45vw, 600px);\n border: 1px solid #ddd;\n border-radius: 4px;\n box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.8);\n background: white;\n }\n\n @media screen and (max-width: 600px) {\n #container {\n max-width: 80vw;\n }\n }\n\n /* main tile-list container */\n #hover-tile-list {\n padding: 10px;\n }\n\n /* header on hover panel to show collection icon and title */\n #list-line-header {\n background: ${hoverPaneHeaderBGColor};\n }\n #list-line-header a {\n display: flex;\n align-items: center;\n column-gap: 5px;\n height: 3.4rem;\n padding: 0 10px;\n border-radius: 4px 4px 0 0;\n width: fit-content;\n font-size: 1.4rem;\n color: ${iaLinkColor};\n font-family: ${iaFontFamily};\n text-decoration: none;\n width: auto;\n }\n #list-line-header a span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n #list-line-header a:hover {\n text-decoration: underline;\n }\n #list-line-header a img {\n width: 30px;\n max-height: 30px;\n }\n `;\n }\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CSSResultGroup, LitElement, nothing } from 'lit';
|
|
2
|
-
import type { TileModel } from '../models';
|
|
3
|
-
import './overlay/icon-overlay';
|
|
4
|
-
import './overlay/text-overlay';
|
|
5
|
-
export declare class ImageBlock extends LitElement {
|
|
6
|
-
baseImageUrl?: string;
|
|
7
|
-
isCompactTile: boolean;
|
|
8
|
-
isListTile: boolean;
|
|
9
|
-
loggedIn: boolean;
|
|
10
|
-
suppressBlurring: boolean;
|
|
11
|
-
model?: TileModel;
|
|
12
|
-
viewSize: string;
|
|
13
|
-
render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
14
|
-
private get baseClass();
|
|
15
|
-
private get iconOverlayTemplate();
|
|
16
|
-
private get textOverlayTemplate();
|
|
17
|
-
private get overlayType();
|
|
18
|
-
static get styles(): CSSResultGroup;
|
|
19
|
-
}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { css, html, LitElement, nothing } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import './overlay/icon-overlay';
|
|
6
|
-
import './overlay/text-overlay';
|
|
7
|
-
let ImageBlock = class ImageBlock extends LitElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.isCompactTile = false;
|
|
11
|
-
this.isListTile = false;
|
|
12
|
-
this.loggedIn = false;
|
|
13
|
-
this.suppressBlurring = false;
|
|
14
|
-
this.viewSize = 'desktop';
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
var _a;
|
|
18
|
-
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.identifier))
|
|
19
|
-
return nothing;
|
|
20
|
-
return html `
|
|
21
|
-
<div class=${classMap(this.baseClass)}>
|
|
22
|
-
<item-image
|
|
23
|
-
.model=${this.model}
|
|
24
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
25
|
-
.isListTile=${this.isListTile}
|
|
26
|
-
.isCompactTile=${this.isCompactTile}
|
|
27
|
-
.loggedIn=${this.loggedIn}
|
|
28
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
29
|
-
style="--imgHeight: 100%; --imgWidth: 100%"
|
|
30
|
-
>
|
|
31
|
-
</item-image>
|
|
32
|
-
${this.textOverlayTemplate} ${this.iconOverlayTemplate}
|
|
33
|
-
</div>
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
36
|
-
get baseClass() {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
return {
|
|
39
|
-
container: true,
|
|
40
|
-
list: this.isListTile && !this.isCompactTile,
|
|
41
|
-
'list-compact': this.isListTile && this.isCompactTile,
|
|
42
|
-
collection: ((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'collection', // fill the image in container
|
|
43
|
-
[this.viewSize]: true,
|
|
44
|
-
'search-image': ((_b = this.model) === null || _b === void 0 ? void 0 : _b.mediatype) === 'search',
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
get iconOverlayTemplate() {
|
|
48
|
-
// Only list tiles use the icon overlay
|
|
49
|
-
if (!this.isListTile)
|
|
50
|
-
return nothing;
|
|
51
|
-
const { overlayType } = this;
|
|
52
|
-
if (!overlayType)
|
|
53
|
-
return nothing;
|
|
54
|
-
return html `
|
|
55
|
-
<icon-overlay
|
|
56
|
-
class=${this.isCompactTile ? 'list-compact' : 'list-detail'}
|
|
57
|
-
.type=${this.overlayType}
|
|
58
|
-
>
|
|
59
|
-
</icon-overlay>
|
|
60
|
-
`;
|
|
61
|
-
}
|
|
62
|
-
get textOverlayTemplate() {
|
|
63
|
-
// List tiles do not require the text overlay
|
|
64
|
-
if (this.isListTile)
|
|
65
|
-
return nothing;
|
|
66
|
-
const { overlayType } = this;
|
|
67
|
-
if (!overlayType)
|
|
68
|
-
return nothing;
|
|
69
|
-
return html ` <text-overlay .type=${this.overlayType}></text-overlay> `;
|
|
70
|
-
}
|
|
71
|
-
get overlayType() {
|
|
72
|
-
var _a, _b;
|
|
73
|
-
if (this.suppressBlurring)
|
|
74
|
-
return undefined;
|
|
75
|
-
// Prioritize showing the login-required overlay if needed.
|
|
76
|
-
// Otherwise, if a content warning is required, show that overlay instead.
|
|
77
|
-
// If neither flag is present, no overlay should be shown.
|
|
78
|
-
if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.loginRequired) && !this.loggedIn) {
|
|
79
|
-
return 'login-required';
|
|
80
|
-
}
|
|
81
|
-
if ((_b = this.model) === null || _b === void 0 ? void 0 : _b.contentWarning) {
|
|
82
|
-
return 'content-warning';
|
|
83
|
-
}
|
|
84
|
-
return undefined;
|
|
85
|
-
}
|
|
86
|
-
static get styles() {
|
|
87
|
-
const imageBlockBackgroundColor = css `var(--imageBlockBackgroundColor, #f1f1f4)`;
|
|
88
|
-
return css `
|
|
89
|
-
div {
|
|
90
|
-
display: flex;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
position: relative;
|
|
93
|
-
background-color: ${imageBlockBackgroundColor};
|
|
94
|
-
border-radius: 4px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.grid {
|
|
98
|
-
height: var(--imgBlockHeight, 16rem);
|
|
99
|
-
flex: 1;
|
|
100
|
-
position: initial;
|
|
101
|
-
padding: 5px;
|
|
102
|
-
border-radius: 4px 4px 0 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.collection.grid,
|
|
106
|
-
.grid.search-image {
|
|
107
|
-
display: block;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/** tile-list view */
|
|
111
|
-
.list {
|
|
112
|
-
border-radius: 0;
|
|
113
|
-
background-color: var(--imageBlockListBackgroundColor, #ebebee);
|
|
114
|
-
box-shadow: 1px 1px 2px rgb(0, 0, 0, 0.2);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.list.desktop {
|
|
118
|
-
width: 100px;
|
|
119
|
-
max-width: 100%;
|
|
120
|
-
height: 100px;
|
|
121
|
-
max-width: 100%;
|
|
122
|
-
display: inline-block;
|
|
123
|
-
position: relative;
|
|
124
|
-
text-align: center;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.list.mobile {
|
|
128
|
-
width: var(--image-width, 90px);
|
|
129
|
-
height: 90px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** tile-list-compact view */
|
|
133
|
-
.container.list-compact {
|
|
134
|
-
display: block;
|
|
135
|
-
text-align: center;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.list-compact.desktop {
|
|
139
|
-
width: 45px;
|
|
140
|
-
height: 45px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.list-compact.mobile {
|
|
144
|
-
width: 30px;
|
|
145
|
-
height: 30px;
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
__decorate([
|
|
151
|
-
property({ type: String })
|
|
152
|
-
], ImageBlock.prototype, "baseImageUrl", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
property({ type: Boolean })
|
|
155
|
-
], ImageBlock.prototype, "isCompactTile", void 0);
|
|
156
|
-
__decorate([
|
|
157
|
-
property({ type: Boolean })
|
|
158
|
-
], ImageBlock.prototype, "isListTile", void 0);
|
|
159
|
-
__decorate([
|
|
160
|
-
property({ type: Boolean })
|
|
161
|
-
], ImageBlock.prototype, "loggedIn", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
property({ type: Boolean })
|
|
164
|
-
], ImageBlock.prototype, "suppressBlurring", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
property({ type: Object })
|
|
167
|
-
], ImageBlock.prototype, "model", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
property({ type: String })
|
|
170
|
-
], ImageBlock.prototype, "viewSize", void 0);
|
|
171
|
-
ImageBlock = __decorate([
|
|
172
|
-
customElement('image-block')
|
|
173
|
-
], ImageBlock);
|
|
174
|
-
export { ImageBlock };
|
|
175
|
-
//# sourceMappingURL=image-block.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image-block.js","sourceRoot":"","sources":["../../../src/tiles/image-block.ts"],"names":[],"mappings":"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","sourcesContent":["import { css, CSSResultGroup, html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ClassInfo, classMap } from 'lit/directives/class-map.js';\n\nimport type { TileModel, TileOverlayType } from '../models';\n\nimport './overlay/icon-overlay';\nimport './overlay/text-overlay';\n\n@customElement('image-block')\nexport class ImageBlock extends LitElement {\n @property({ type: String }) baseImageUrl?: string;\n\n @property({ type: Boolean }) isCompactTile = false;\n\n @property({ type: Boolean }) isListTile = false;\n\n @property({ type: Boolean }) loggedIn = false;\n\n @property({ type: Boolean }) suppressBlurring = false;\n\n @property({ type: Object }) model?: TileModel;\n\n @property({ type: String }) viewSize: string = 'desktop';\n\n render() {\n if (!this.model?.identifier) return nothing;\n\n return html`\n <div class=${classMap(this.baseClass)}>\n <item-image\n .model=${this.model}\n .baseImageUrl=${this.baseImageUrl}\n .isListTile=${this.isListTile}\n .isCompactTile=${this.isCompactTile}\n .loggedIn=${this.loggedIn}\n .suppressBlurring=${this.suppressBlurring}\n style=\"--imgHeight: 100%; --imgWidth: 100%\"\n >\n </item-image>\n ${this.textOverlayTemplate} ${this.iconOverlayTemplate}\n </div>\n `;\n }\n\n private get baseClass(): ClassInfo {\n return {\n container: true,\n list: this.isListTile && !this.isCompactTile,\n 'list-compact': this.isListTile && this.isCompactTile,\n collection: this.model?.mediatype === 'collection', // fill the image in container\n [this.viewSize]: true,\n 'search-image': this.model?.mediatype === 'search',\n };\n }\n\n private get iconOverlayTemplate() {\n // Only list tiles use the icon overlay\n if (!this.isListTile) return nothing;\n\n const { overlayType } = this;\n if (!overlayType) return nothing;\n\n return html`\n <icon-overlay\n class=${this.isCompactTile ? 'list-compact' : 'list-detail'}\n .type=${this.overlayType}\n >\n </icon-overlay>\n `;\n }\n\n private get textOverlayTemplate() {\n // List tiles do not require the text overlay\n if (this.isListTile) return nothing;\n\n const { overlayType } = this;\n if (!overlayType) return nothing;\n\n return html` <text-overlay .type=${this.overlayType}></text-overlay> `;\n }\n\n private get overlayType(): TileOverlayType | undefined {\n if (this.suppressBlurring) return undefined;\n\n // Prioritize showing the login-required overlay if needed.\n // Otherwise, if a content warning is required, show that overlay instead.\n // If neither flag is present, no overlay should be shown.\n if (this.model?.loginRequired && !this.loggedIn) {\n return 'login-required';\n }\n if (this.model?.contentWarning) {\n return 'content-warning';\n }\n return undefined;\n }\n\n static get styles(): CSSResultGroup {\n const imageBlockBackgroundColor = css`var(--imageBlockBackgroundColor, #f1f1f4)`;\n\n return css`\n div {\n display: flex;\n justify-content: center;\n position: relative;\n background-color: ${imageBlockBackgroundColor};\n border-radius: 4px;\n }\n\n .grid {\n height: var(--imgBlockHeight, 16rem);\n flex: 1;\n position: initial;\n padding: 5px;\n border-radius: 4px 4px 0 0;\n }\n\n .collection.grid,\n .grid.search-image {\n display: block;\n }\n\n /** tile-list view */\n .list {\n border-radius: 0;\n background-color: var(--imageBlockListBackgroundColor, #ebebee);\n box-shadow: 1px 1px 2px rgb(0, 0, 0, 0.2);\n }\n\n .list.desktop {\n width: 100px;\n max-width: 100%;\n height: 100px;\n max-width: 100%;\n display: inline-block;\n position: relative;\n text-align: center;\n }\n\n .list.mobile {\n width: var(--image-width, 90px);\n height: 90px;\n }\n\n /** tile-list-compact view */\n .container.list-compact {\n display: block;\n text-align: center;\n }\n\n .list-compact.desktop {\n width: 45px;\n height: 45px;\n }\n\n .list-compact.mobile {\n width: 30px;\n height: 30px;\n }\n `;\n }\n}\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CSSResultGroup, LitElement } from 'lit';
|
|
2
|
-
import type { TileModel } from '../models';
|
|
3
|
-
export declare class ItemImage extends LitElement {
|
|
4
|
-
model?: TileModel;
|
|
5
|
-
baseImageUrl?: string;
|
|
6
|
-
isListTile: boolean;
|
|
7
|
-
isCompactTile: boolean;
|
|
8
|
-
loggedIn: boolean;
|
|
9
|
-
suppressBlurring: boolean;
|
|
10
|
-
private isWaveform;
|
|
11
|
-
private isNotFound;
|
|
12
|
-
private baseImage;
|
|
13
|
-
render(): import("lit").TemplateResult<1>;
|
|
14
|
-
private get imageTemplate();
|
|
15
|
-
/**
|
|
16
|
-
* Helpers
|
|
17
|
-
*/
|
|
18
|
-
private get imageSrc();
|
|
19
|
-
private get notFoundSrc();
|
|
20
|
-
private get hashBasedGradient();
|
|
21
|
-
private hashStrToInt;
|
|
22
|
-
/**
|
|
23
|
-
* Classes
|
|
24
|
-
*/
|
|
25
|
-
private get itemBaseClass();
|
|
26
|
-
private get itemImageClass();
|
|
27
|
-
/**
|
|
28
|
-
* Helper function to determine if account tile image
|
|
29
|
-
*/
|
|
30
|
-
private get isAccountImage();
|
|
31
|
-
/**
|
|
32
|
-
* Event listener sets isWaveform true if image is waveform
|
|
33
|
-
*/
|
|
34
|
-
private onLoad;
|
|
35
|
-
private onError;
|
|
36
|
-
/**
|
|
37
|
-
* CSS
|
|
38
|
-
*/
|
|
39
|
-
static get styles(): CSSResultGroup;
|
|
40
|
-
}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { css, html, LitElement, nothing } from 'lit';
|
|
3
|
-
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import { baseItemImageStyles, waveformGradientStyles, } from '../styles/item-image-styles';
|
|
6
|
-
import { searchIcon } from '../assets/img/icons/mediatype/search';
|
|
7
|
-
let ItemImage = class ItemImage extends LitElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.isListTile = false;
|
|
11
|
-
this.isCompactTile = false;
|
|
12
|
-
this.loggedIn = false;
|
|
13
|
-
this.suppressBlurring = false;
|
|
14
|
-
this.isWaveform = false;
|
|
15
|
-
this.isNotFound = false;
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return html `
|
|
19
|
-
<div class=${classMap(this.itemBaseClass)}>${this.imageTemplate}</div>
|
|
20
|
-
`;
|
|
21
|
-
}
|
|
22
|
-
get imageTemplate() {
|
|
23
|
-
var _a;
|
|
24
|
-
if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'search') {
|
|
25
|
-
return html `${searchIcon}`;
|
|
26
|
-
}
|
|
27
|
-
return html `
|
|
28
|
-
<img
|
|
29
|
-
class=${classMap(this.itemImageClass)}
|
|
30
|
-
src="${this.imageSrc}"
|
|
31
|
-
alt=""
|
|
32
|
-
@load=${this.onLoad}
|
|
33
|
-
@error=${this.onError}
|
|
34
|
-
/>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Helpers
|
|
39
|
-
*/
|
|
40
|
-
get imageSrc() {
|
|
41
|
-
var _a, _b, _c;
|
|
42
|
-
if (this.isNotFound)
|
|
43
|
-
return this.notFoundSrc;
|
|
44
|
-
// Use the correct image for web capture tiles, if possible
|
|
45
|
-
if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) && this.model.identifier) {
|
|
46
|
-
try {
|
|
47
|
-
const url = new URL(this.model.identifier);
|
|
48
|
-
const domain = encodeURIComponent(url.hostname);
|
|
49
|
-
return this.baseImageUrl
|
|
50
|
-
? `https://web.archive.org/thumb/${domain}?generate=1`
|
|
51
|
-
: nothing;
|
|
52
|
-
}
|
|
53
|
-
catch (_d) {
|
|
54
|
-
return `${this.baseImageUrl}/images/notfound.png`;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
// Use the thumbnail URL specified in the model if it exists
|
|
58
|
-
if ((_b = this.model) === null || _b === void 0 ? void 0 : _b.thumbnailUrl)
|
|
59
|
-
return this.model.thumbnailUrl;
|
|
60
|
-
// Don't try to load invalid image URLs
|
|
61
|
-
return this.baseImageUrl && ((_c = this.model) === null || _c === void 0 ? void 0 : _c.identifier)
|
|
62
|
-
? `${this.baseImageUrl}/services/img/${this.model.identifier}`
|
|
63
|
-
: nothing;
|
|
64
|
-
}
|
|
65
|
-
get notFoundSrc() {
|
|
66
|
-
return this.baseImageUrl
|
|
67
|
-
? `${this.baseImageUrl}/images/notfound.png`
|
|
68
|
-
: nothing;
|
|
69
|
-
}
|
|
70
|
-
get hashBasedGradient() {
|
|
71
|
-
var _a;
|
|
72
|
-
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.identifier)) {
|
|
73
|
-
return 'waveform-grad0';
|
|
74
|
-
}
|
|
75
|
-
const gradient = this.hashStrToInt(this.model.identifier) % 6; // returns 0-5
|
|
76
|
-
return `waveform-grad${gradient}`;
|
|
77
|
-
}
|
|
78
|
-
hashStrToInt(str) {
|
|
79
|
-
return str
|
|
80
|
-
.split('')
|
|
81
|
-
.reduce((acc, char) => acc + char.charCodeAt(0), 0);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Classes
|
|
85
|
-
*/
|
|
86
|
-
get itemBaseClass() {
|
|
87
|
-
var _a;
|
|
88
|
-
return {
|
|
89
|
-
'drop-shadow': true,
|
|
90
|
-
'list-box': this.isListTile,
|
|
91
|
-
'search-image': ((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'search',
|
|
92
|
-
[this.hashBasedGradient]: this.isWaveform,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
get itemImageClass() {
|
|
96
|
-
var _a, _b, _c;
|
|
97
|
-
const hasSensitiveContent = !!(((_a = this.model) === null || _a === void 0 ? void 0 : _a.contentWarning) || ((_b = this.model) === null || _b === void 0 ? void 0 : _b.loginRequired));
|
|
98
|
-
const shouldBlur = hasSensitiveContent && !this.suppressBlurring;
|
|
99
|
-
return {
|
|
100
|
-
contain: !this.isCompactTile && !this.isWaveform,
|
|
101
|
-
cover: this.isCompactTile,
|
|
102
|
-
blur: shouldBlur,
|
|
103
|
-
waveform: this.isWaveform,
|
|
104
|
-
'account-image': this.isAccountImage, // for account tile image
|
|
105
|
-
'collection-image': ((_c = this.model) === null || _c === void 0 ? void 0 : _c.mediatype) === 'collection', // for collection tile image
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Helper function to determine if account tile image
|
|
110
|
-
*/
|
|
111
|
-
get isAccountImage() {
|
|
112
|
-
var _a;
|
|
113
|
-
return (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'account' &&
|
|
114
|
-
!this.isCompactTile &&
|
|
115
|
-
!this.isListTile);
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Event listener sets isWaveform true if image is waveform
|
|
119
|
-
*/
|
|
120
|
-
onLoad() {
|
|
121
|
-
var _a, _b;
|
|
122
|
-
if ((((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'audio' ||
|
|
123
|
-
((_b = this.model) === null || _b === void 0 ? void 0 : _b.mediatype) === 'etree') &&
|
|
124
|
-
this.baseImage.naturalWidth / this.baseImage.naturalHeight === 4) {
|
|
125
|
-
this.isWaveform = true;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
onError() {
|
|
129
|
-
this.isNotFound = true;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* CSS
|
|
133
|
-
*/
|
|
134
|
-
static get styles() {
|
|
135
|
-
return [
|
|
136
|
-
baseItemImageStyles,
|
|
137
|
-
waveformGradientStyles,
|
|
138
|
-
css `
|
|
139
|
-
img {
|
|
140
|
-
height: var(--imgHeight, 16rem);
|
|
141
|
-
width: var(--imgWidth, 16rem);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.search-image {
|
|
145
|
-
display: flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
background: rgb(245, 245, 247);
|
|
149
|
-
border-radius: 4px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
svg {
|
|
153
|
-
height: 10rem;
|
|
154
|
-
width: 10rem;
|
|
155
|
-
}
|
|
156
|
-
`,
|
|
157
|
-
];
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
__decorate([
|
|
161
|
-
property({ type: Object })
|
|
162
|
-
], ItemImage.prototype, "model", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
property({ type: String })
|
|
165
|
-
], ItemImage.prototype, "baseImageUrl", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
property({ type: Boolean })
|
|
168
|
-
], ItemImage.prototype, "isListTile", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
property({ type: Boolean })
|
|
171
|
-
], ItemImage.prototype, "isCompactTile", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
property({ type: Boolean })
|
|
174
|
-
], ItemImage.prototype, "loggedIn", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
property({ type: Boolean })
|
|
177
|
-
], ItemImage.prototype, "suppressBlurring", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
state()
|
|
180
|
-
], ItemImage.prototype, "isWaveform", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
state()
|
|
183
|
-
], ItemImage.prototype, "isNotFound", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
query('img')
|
|
186
|
-
], ItemImage.prototype, "baseImage", void 0);
|
|
187
|
-
ItemImage = __decorate([
|
|
188
|
-
customElement('item-image')
|
|
189
|
-
], ItemImage);
|
|
190
|
-
export { ItemImage };
|
|
191
|
-
//# sourceMappingURL=item-image.js.map
|