@internetarchive/collection-browser 1.14.17-beta.5 → 1.14.18-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +29 -29
- package/.husky/pre-commit +4 -4
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/index.d.ts +12 -11
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/src/app-root.d.ts +83 -83
- package/dist/src/app-root.js +438 -489
- package/dist/src/app-root.js.map +1 -1
- 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/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 +384 -406
- package/dist/src/collection-browser.js +1342 -1363
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.d.ts +30 -30
- package/dist/src/collection-facets/facet-row.js +114 -114
- 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 +17 -17
- package/dist/src/collection-facets/facets-template.js +114 -114
- package/dist/src/collection-facets/more-facets-content.d.ts +70 -70
- package/dist/src/collection-facets/more-facets-content.js +354 -369
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -36
- package/dist/src/collection-facets/more-facets-pagination.js +196 -196
- package/dist/src/collection-facets/toggle-switch.d.ts +41 -41
- package/dist/src/collection-facets/toggle-switch.js +94 -94
- package/dist/src/collection-facets.d.ts +103 -103
- package/dist/src/collection-facets.js +513 -510
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +217 -0
- package/dist/src/data-source/collection-browser-data-source-interface.js +2 -0
- package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -0
- package/dist/src/data-source/collection-browser-data-source.d.ts +352 -434
- package/dist/src/data-source/collection-browser-data-source.js +911 -800
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.d.ts +43 -0
- package/dist/src/data-source/collection-browser-query-state.js +2 -0
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -0
- package/dist/src/data-source/models.d.ts +28 -62
- package/dist/src/data-source/models.js +8 -1
- package/dist/src/data-source/models.js.map +1 -1
- package/dist/src/empty-placeholder.d.ts +23 -23
- package/dist/src/empty-placeholder.js +74 -74
- package/dist/src/expanded-date-picker.d.ts +43 -43
- package/dist/src/expanded-date-picker.js +109 -109
- package/dist/src/language-code-handler/language-code-handler.d.ts +37 -37
- package/dist/src/language-code-handler/language-code-handler.js +26 -26
- package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -1
- package/dist/src/language-code-handler/language-code-mapping.js +562 -562
- package/dist/src/manage/manage-bar.d.ts +26 -26
- package/dist/src/manage/manage-bar.js +53 -53
- package/dist/src/manage/manage-bar.js.map +1 -1
- 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 +197 -180
- package/dist/src/models.js +380 -269
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.d.ts +70 -70
- package/dist/src/restoration-state-handler.js +355 -355
- 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 +210 -210
- package/dist/src/sort-filter-bar/sort-filter-bar.js +653 -652
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/styles/item-image-styles.d.ts +8 -8
- package/dist/src/styles/item-image-styles.js +9 -9
- package/dist/src/styles/sr-only.d.ts +1 -1
- package/dist/src/styles/sr-only.js +2 -2
- package/dist/src/tiles/base-tile-component.d.ts +19 -19
- package/dist/src/tiles/base-tile-component.js +63 -63
- package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -5
- package/dist/src/tiles/collection-browser-loading-tile.js +15 -15
- package/dist/src/tiles/grid/account-tile.d.ts +18 -18
- package/dist/src/tiles/grid/account-tile.js +72 -72
- package/dist/src/tiles/grid/collection-tile.d.ts +15 -15
- package/dist/src/tiles/grid/collection-tile.js +80 -80
- package/dist/src/tiles/grid/item-tile.d.ts +28 -27
- package/dist/src/tiles/grid/item-tile.js +162 -135
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- 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 +58 -53
- package/dist/src/tiles/grid/tile-stats.js.map +1 -1
- 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 +15 -15
- package/dist/src/tiles/hover/tile-hover-pane.js +38 -38
- package/dist/src/tiles/image-block.d.ts +17 -17
- package/dist/src/tiles/image-block.js +73 -73
- package/dist/src/tiles/item-image.d.ts +39 -36
- package/dist/src/tiles/item-image.js +155 -127
- package/dist/src/tiles/item-image.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.d.ts +6 -6
- package/dist/src/tiles/list/tile-list-compact-header.js +38 -38
- package/dist/src/tiles/list/tile-list-compact.d.ts +15 -15
- package/dist/src/tiles/list/tile-list-compact.js +115 -115
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.d.ts +47 -46
- package/dist/src/tiles/list/tile-list.js +327 -296
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/mediatype-icon.d.ts +9 -9
- package/dist/src/tiles/mediatype-icon.js +47 -47
- package/dist/src/tiles/overlay/icon-overlay.d.ts +10 -10
- package/dist/src/tiles/overlay/icon-overlay.js +40 -40
- package/dist/src/tiles/overlay/icon-text-overlay.d.ts +9 -9
- package/dist/src/tiles/overlay/icon-text-overlay.js +38 -38
- package/dist/src/tiles/overlay/text-overlay.d.ts +10 -10
- package/dist/src/tiles/overlay/text-overlay.js +42 -42
- package/dist/src/tiles/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 +232 -231
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/tiles/tile-display-value-provider.d.ts +47 -43
- package/dist/src/tiles/tile-display-value-provider.js +94 -80
- package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
- package/dist/src/utils/analytics-events.d.ts +25 -25
- package/dist/src/utils/analytics-events.js +27 -27
- 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 -0
- package/dist/src/utils/collapse-repeated-quotes.js +14 -0
- package/dist/src/utils/collapse-repeated-quotes.js.map +1 -0
- package/dist/src/utils/format-count.d.ts +7 -7
- package/dist/src/utils/format-count.js +76 -76
- package/dist/src/utils/format-date.d.ts +2 -2
- package/dist/src/utils/format-date.js +25 -25
- package/dist/src/utils/format-unit-size.d.ts +2 -2
- package/dist/src/utils/format-unit-size.js +33 -33
- package/dist/src/utils/local-date-from-utc.d.ts +9 -9
- package/dist/src/utils/local-date-from-utc.js +15 -15
- package/dist/src/utils/log.d.ts +7 -0
- package/dist/src/utils/log.js +16 -0
- package/dist/src/utils/log.js.map +1 -0
- package/dist/src/utils/resolve-mediatype.d.ts +8 -0
- package/dist/src/utils/resolve-mediatype.js +24 -0
- package/dist/src/utils/resolve-mediatype.js.map +1 -0
- 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 +1211 -1149
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/facet-row.test.d.ts +1 -1
- package/dist/test/collection-facets/facet-row.test.js +203 -203
- package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
- package/dist/test/collection-facets/facets-template.test.js +105 -105
- package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +133 -133
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +117 -117
- package/dist/test/collection-facets/toggle-switch.test.d.ts +1 -1
- package/dist/test/collection-facets/toggle-switch.test.js +73 -73
- package/dist/test/collection-facets.test.d.ts +2 -2
- package/dist/test/collection-facets.test.js +653 -648
- package/dist/test/collection-facets.test.js.map +1 -1
- package/dist/test/data-source/collection-browser-data-source.test.d.ts +1 -0
- package/dist/test/data-source/collection-browser-data-source.test.js +80 -0
- package/dist/test/data-source/collection-browser-data-source.test.js.map +1 -0
- package/dist/test/empty-placeholder.test.d.ts +1 -1
- package/dist/test/empty-placeholder.test.js +63 -63
- package/dist/test/expanded-date-picker.test.d.ts +1 -1
- package/dist/test/expanded-date-picker.test.js +95 -95
- package/dist/test/icon-overlay.test.d.ts +1 -1
- package/dist/test/icon-overlay.test.js +24 -24
- package/dist/test/image-block.test.d.ts +1 -1
- package/dist/test/image-block.test.js +48 -48
- package/dist/test/item-image.test.d.ts +1 -1
- package/dist/test/item-image.test.js +85 -86
- package/dist/test/item-image.test.js.map +1 -1
- package/dist/test/manage/manage-bar.test.d.ts +1 -1
- package/dist/test/manage/manage-bar.test.js +72 -72
- 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 +24 -21
- package/dist/test/mocks/mock-search-responses.js +840 -709
- package/dist/test/mocks/mock-search-responses.js.map +1 -1
- package/dist/test/mocks/mock-search-service.d.ts +15 -15
- package/dist/test/mocks/mock-search-service.js +53 -50
- package/dist/test/mocks/mock-search-service.js.map +1 -1
- package/dist/test/restoration-state-handler.test.d.ts +1 -1
- package/dist/test/restoration-state-handler.test.js +270 -270
- package/dist/test/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 +418 -418
- package/dist/test/text-overlay.test.d.ts +1 -1
- package/dist/test/text-overlay.test.js +48 -48
- package/dist/test/text-snippet-block.test.d.ts +1 -1
- package/dist/test/text-snippet-block.test.js +57 -57
- package/dist/test/tile-stats.test.d.ts +1 -1
- package/dist/test/tile-stats.test.js +95 -33
- package/dist/test/tile-stats.test.js.map +1 -1
- 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 +298 -254
- package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
- 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 -258
- package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
- package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +1 -1
- package/dist/test/tiles/hover/tile-hover-pane.test.js +13 -13
- 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 +283 -239
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/dist/test/tiles/tile-dispatcher.test.d.ts +1 -1
- package/dist/test/tiles/tile-dispatcher.test.js +106 -94
- package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
- package/dist/test/tiles/tile-display-value-provider.test.d.ts +1 -1
- package/dist/test/tiles/tile-display-value-provider.test.js +141 -141
- package/dist/test/utils/array-equals.test.d.ts +1 -1
- package/dist/test/utils/array-equals.test.js +26 -26
- package/dist/test/utils/format-count.test.d.ts +1 -1
- package/dist/test/utils/format-count.test.js +23 -23
- package/dist/test/utils/format-date.test.d.ts +1 -1
- package/dist/test/utils/format-date.test.js +17 -17
- package/dist/test/utils/format-unit-size.test.d.ts +1 -1
- package/dist/test/utils/format-unit-size.test.js +17 -17
- package/dist/test/utils/local-date-from-utc.test.d.ts +1 -1
- package/dist/test/utils/local-date-from-utc.test.js +26 -26
- package/index.ts +3 -5
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +3 -4
- package/renovate.json +6 -6
- package/src/app-root.ts +30 -85
- package/src/collection-browser.ts +112 -139
- package/src/collection-facets/more-facets-content.ts +0 -19
- package/src/collection-facets.ts +6 -4
- package/src/data-source/collection-browser-data-source-interface.ts +272 -0
- package/src/data-source/collection-browser-data-source.ts +314 -379
- package/src/data-source/collection-browser-query-state.ts +54 -0
- package/src/data-source/models.ts +8 -45
- package/src/manage/manage-bar.ts +1 -1
- package/src/models.ts +164 -3
- package/src/sort-filter-bar/sort-filter-bar.ts +2 -1
- package/src/tiles/grid/item-tile.ts +36 -1
- package/src/tiles/grid/tile-stats.ts +12 -7
- package/src/tiles/item-image.ts +28 -0
- package/src/tiles/list/tile-list-compact.ts +1 -1
- package/src/tiles/list/tile-list.ts +43 -5
- package/src/tiles/tile-dispatcher.ts +2 -1
- package/src/tiles/tile-display-value-provider.ts +20 -2
- package/src/utils/collapse-repeated-quotes.ts +13 -0
- package/src/utils/log.ts +16 -0
- package/src/utils/resolve-mediatype.ts +26 -0
- package/test/collection-browser.test.ts +161 -50
- package/test/collection-facets/more-facets-content.test.ts +4 -2
- package/test/collection-facets.test.ts +5 -0
- package/test/data-source/collection-browser-data-source.test.ts +103 -0
- package/test/item-image.test.ts +34 -36
- package/test/mocks/mock-search-responses.ts +144 -0
- package/test/mocks/mock-search-service.ts +6 -0
- package/test/tile-stats.test.ts +104 -0
- package/test/tiles/grid/item-tile.test.ts +55 -0
- package/test/tiles/hover/hover-pane-controller.test.ts +19 -17
- package/test/tiles/list/tile-list.test.ts +55 -0
- package/test/tiles/tile-dispatcher.test.ts +13 -0
- package/tsconfig.json +21 -21
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
- package/types/sentry.d.ts +0 -1
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
SearchServiceError,
|
|
7
7
|
TextHit,
|
|
8
8
|
} from '@internetarchive/search-service';
|
|
9
|
+
import { WebArchiveHit } from '@internetarchive/search-service/dist/src/models/hit-types/web-archive-hit';
|
|
9
10
|
import { SearchServiceErrorType } from '@internetarchive/search-service/dist/src/search-service-error';
|
|
10
11
|
|
|
11
12
|
export const getMockSuccessSingleResult: () => Result<
|
|
@@ -49,6 +50,68 @@ export const getMockSuccessSingleResult: () => Result<
|
|
|
49
50
|
},
|
|
50
51
|
});
|
|
51
52
|
|
|
53
|
+
export const getMockSuccessManyFields: () => Result<
|
|
54
|
+
SearchResponse,
|
|
55
|
+
SearchServiceError
|
|
56
|
+
> = () => ({
|
|
57
|
+
success: {
|
|
58
|
+
request: {
|
|
59
|
+
kind: 'hits',
|
|
60
|
+
clientParameters: {
|
|
61
|
+
user_query: 'many-fields',
|
|
62
|
+
sort: [],
|
|
63
|
+
},
|
|
64
|
+
backendRequests: {
|
|
65
|
+
primary: {
|
|
66
|
+
kind: 'hits',
|
|
67
|
+
finalized_parameters: {
|
|
68
|
+
user_query: 'many-fields',
|
|
69
|
+
sort: [],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
rawResponse: {},
|
|
75
|
+
response: {
|
|
76
|
+
totalResults: 1,
|
|
77
|
+
returnedCount: 1,
|
|
78
|
+
results: [
|
|
79
|
+
new ItemHit({
|
|
80
|
+
fields: {
|
|
81
|
+
identifier: 'foo',
|
|
82
|
+
avg_rating: 3.5,
|
|
83
|
+
collection: ['foo', 'bar', 'no-preview', 'loggedin'],
|
|
84
|
+
collection_files_count: 123,
|
|
85
|
+
collection_size: 234,
|
|
86
|
+
creator: ['baz', 'boop'],
|
|
87
|
+
date: '2010-01-03T01:23:45Z',
|
|
88
|
+
addeddate: '2010-01-01T01:23:45Z',
|
|
89
|
+
publicdate: '2010-01-02T01:23:45Z',
|
|
90
|
+
reviewdate: '2010-01-04T01:23:45Z',
|
|
91
|
+
description: 'foo bar baz',
|
|
92
|
+
downloads: 246,
|
|
93
|
+
issue: 1,
|
|
94
|
+
item_count: 20,
|
|
95
|
+
mediatype: 'texts',
|
|
96
|
+
num_favorites: 12,
|
|
97
|
+
num_reviews: 23,
|
|
98
|
+
source: 'foo bar',
|
|
99
|
+
subject: ['baz', 'quux'],
|
|
100
|
+
title: 'Foo Bar',
|
|
101
|
+
volume: 2,
|
|
102
|
+
week: 50,
|
|
103
|
+
__href__: 'https://archive.org/details/foo',
|
|
104
|
+
},
|
|
105
|
+
}),
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
responseHeader: {
|
|
109
|
+
succeeded: true,
|
|
110
|
+
query_time: 0,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
52
115
|
export const getMockSuccessWithYearHistogramAggs: () => Result<
|
|
53
116
|
SearchResponse,
|
|
54
117
|
SearchServiceError
|
|
@@ -408,6 +471,10 @@ export const getMockSuccessWithCollectionAggregations: () => Result<
|
|
|
408
471
|
],
|
|
409
472
|
}),
|
|
410
473
|
},
|
|
474
|
+
collectionTitles: {
|
|
475
|
+
foo: 'Foo',
|
|
476
|
+
bar: 'Bar',
|
|
477
|
+
},
|
|
411
478
|
},
|
|
412
479
|
responseHeader: {
|
|
413
480
|
succeeded: true,
|
|
@@ -508,6 +575,40 @@ export const getMockSuccessMultipleResults: () => Result<
|
|
|
508
575
|
},
|
|
509
576
|
});
|
|
510
577
|
|
|
578
|
+
export const getMockSuccessNoResults: () => Result<
|
|
579
|
+
SearchResponse,
|
|
580
|
+
SearchServiceError
|
|
581
|
+
> = () => ({
|
|
582
|
+
success: {
|
|
583
|
+
request: {
|
|
584
|
+
kind: 'hits',
|
|
585
|
+
clientParameters: {
|
|
586
|
+
user_query: 'no-results',
|
|
587
|
+
sort: [],
|
|
588
|
+
},
|
|
589
|
+
backendRequests: {
|
|
590
|
+
primary: {
|
|
591
|
+
kind: 'hits',
|
|
592
|
+
finalized_parameters: {
|
|
593
|
+
user_query: 'no-results',
|
|
594
|
+
sort: [],
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
rawResponse: {},
|
|
600
|
+
response: {
|
|
601
|
+
totalResults: 0,
|
|
602
|
+
returnedCount: 0,
|
|
603
|
+
results: [],
|
|
604
|
+
},
|
|
605
|
+
responseHeader: {
|
|
606
|
+
succeeded: true,
|
|
607
|
+
query_time: 0,
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
});
|
|
611
|
+
|
|
511
612
|
export const getMockSuccessMultiLineDescription: () => Result<
|
|
512
613
|
SearchResponse,
|
|
513
614
|
SearchServiceError
|
|
@@ -776,6 +877,49 @@ export const getMockSuccessWithParentCollections: () => Result<
|
|
|
776
877
|
},
|
|
777
878
|
});
|
|
778
879
|
|
|
880
|
+
export const getMockSuccessWithWebArchiveHits: () => Result<
|
|
881
|
+
SearchResponse,
|
|
882
|
+
SearchServiceError
|
|
883
|
+
> = () => ({
|
|
884
|
+
success: {
|
|
885
|
+
request: {
|
|
886
|
+
kind: 'hits',
|
|
887
|
+
clientParameters: {
|
|
888
|
+
user_query: 'web-archive',
|
|
889
|
+
sort: [],
|
|
890
|
+
},
|
|
891
|
+
backendRequests: {
|
|
892
|
+
primary: {
|
|
893
|
+
kind: 'hits',
|
|
894
|
+
finalized_parameters: {
|
|
895
|
+
user_query: 'web-archive',
|
|
896
|
+
sort: [],
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
},
|
|
901
|
+
rawResponse: {},
|
|
902
|
+
response: {
|
|
903
|
+
totalResults: 1,
|
|
904
|
+
returnedCount: 1,
|
|
905
|
+
results: [
|
|
906
|
+
new WebArchiveHit({
|
|
907
|
+
fields: {
|
|
908
|
+
url: 'https://example.com',
|
|
909
|
+
capture_dates: ['2010-01-02T03:04:05Z'],
|
|
910
|
+
__href__:
|
|
911
|
+
'https://web.archive.org/web/20100102030405/https%3A%2F%2Fexample.com',
|
|
912
|
+
},
|
|
913
|
+
}),
|
|
914
|
+
],
|
|
915
|
+
},
|
|
916
|
+
responseHeader: {
|
|
917
|
+
succeeded: true,
|
|
918
|
+
query_time: 0,
|
|
919
|
+
},
|
|
920
|
+
},
|
|
921
|
+
});
|
|
922
|
+
|
|
779
923
|
export const getMockErrorResult: () => Result<
|
|
780
924
|
SearchResponse,
|
|
781
925
|
SearchServiceError
|
|
@@ -26,6 +26,9 @@ import {
|
|
|
26
26
|
getMockSuccessWithConciseDefaultSort,
|
|
27
27
|
getMockSuccessWithDefaultFavSort,
|
|
28
28
|
getMockSuccessWithParentCollections,
|
|
29
|
+
getMockSuccessManyFields,
|
|
30
|
+
getMockSuccessNoResults,
|
|
31
|
+
getMockSuccessWithWebArchiveHits,
|
|
29
32
|
} from './mock-search-responses';
|
|
30
33
|
|
|
31
34
|
const responses: Record<
|
|
@@ -47,6 +50,9 @@ const responses: Record<
|
|
|
47
50
|
'default-sort-concise': getMockSuccessWithConciseDefaultSort,
|
|
48
51
|
'fav-sort': getMockSuccessWithDefaultFavSort,
|
|
49
52
|
'parent-collections': getMockSuccessWithParentCollections,
|
|
53
|
+
'web-archive': getMockSuccessWithWebArchiveHits,
|
|
54
|
+
'many-fields': getMockSuccessManyFields,
|
|
55
|
+
'no-results': getMockSuccessNoResults,
|
|
50
56
|
error: getMockErrorResult,
|
|
51
57
|
malformed: getMockMalformedResult,
|
|
52
58
|
};
|
package/test/tile-stats.test.ts
CHANGED
|
@@ -54,4 +54,108 @@ describe('Tile Stats', () => {
|
|
|
54
54
|
expect(favoritesStatCount).to.equalSnapshot(2);
|
|
55
55
|
expect(reviewsStatCount).to.equalSnapshot(3);
|
|
56
56
|
});
|
|
57
|
+
|
|
58
|
+
it('should render view count for non-account items', async () => {
|
|
59
|
+
const el = await fixture<TileStats>(
|
|
60
|
+
html`
|
|
61
|
+
<tile-stats
|
|
62
|
+
.mediatype=${'texts'}
|
|
63
|
+
.viewCount=${4}
|
|
64
|
+
.favCount=${5}
|
|
65
|
+
.commentCount=${6}
|
|
66
|
+
>
|
|
67
|
+
</tile-stats>
|
|
68
|
+
`
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const statsRow = el.shadowRoot?.querySelector('#stats-row');
|
|
72
|
+
|
|
73
|
+
const mediatypeStat = statsRow?.children.item(0);
|
|
74
|
+
// get second column item in stats row
|
|
75
|
+
const viewStatCount = statsRow?.children
|
|
76
|
+
.item(1)
|
|
77
|
+
?.querySelector('.status-text')
|
|
78
|
+
?.textContent?.trim();
|
|
79
|
+
// get third column item in stats row
|
|
80
|
+
const favoritesStatCount = statsRow?.children
|
|
81
|
+
.item(2)
|
|
82
|
+
?.querySelector('.status-text')
|
|
83
|
+
?.textContent?.trim();
|
|
84
|
+
// get fourth column item in stats row
|
|
85
|
+
const reviewsStatCount = statsRow?.children
|
|
86
|
+
.item(3)
|
|
87
|
+
?.querySelector('.status-text')
|
|
88
|
+
?.textContent?.trim();
|
|
89
|
+
|
|
90
|
+
expect(mediatypeStat).to.exist;
|
|
91
|
+
expect(viewStatCount).to.match(/Views:\s+4/);
|
|
92
|
+
expect(favoritesStatCount).to.match(/Favorites:\s+5/);
|
|
93
|
+
expect(reviewsStatCount).to.match(/Reviews:\s+6/);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('handles missing counts gracefully', async () => {
|
|
97
|
+
const el = await fixture<TileStats>(
|
|
98
|
+
html`
|
|
99
|
+
<tile-stats .mediatype=${'texts'} .favCount=${5} .commentCount=${6}>
|
|
100
|
+
</tile-stats>
|
|
101
|
+
`
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const statsRow = el.shadowRoot?.querySelector('#stats-row');
|
|
105
|
+
|
|
106
|
+
const mediatypeStat = statsRow?.children.item(0);
|
|
107
|
+
// get second column item in stats row
|
|
108
|
+
const viewStatCount = statsRow?.children
|
|
109
|
+
.item(1)
|
|
110
|
+
?.querySelector('.status-text')
|
|
111
|
+
?.textContent?.trim();
|
|
112
|
+
// get third column item in stats row
|
|
113
|
+
const favoritesStatCount = statsRow?.children
|
|
114
|
+
.item(2)
|
|
115
|
+
?.querySelector('.status-text')
|
|
116
|
+
?.textContent?.trim();
|
|
117
|
+
// get fourth column item in stats row
|
|
118
|
+
const reviewsStatCount = statsRow?.children
|
|
119
|
+
.item(3)
|
|
120
|
+
?.querySelector('.status-text')
|
|
121
|
+
?.textContent?.trim();
|
|
122
|
+
|
|
123
|
+
expect(mediatypeStat).to.exist;
|
|
124
|
+
expect(viewStatCount).to.match(/Views:\s+0/);
|
|
125
|
+
expect(favoritesStatCount).to.match(/Favorites:\s+5/);
|
|
126
|
+
expect(reviewsStatCount).to.match(/Reviews:\s+6/);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it('handles missing counts gracefully for accounts', async () => {
|
|
130
|
+
const el = await fixture<TileStats>(
|
|
131
|
+
html`
|
|
132
|
+
<tile-stats .mediatype=${'account'} .favCount=${5} .commentCount=${6}>
|
|
133
|
+
</tile-stats>
|
|
134
|
+
`
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
const statsRow = el.shadowRoot?.querySelector('#stats-row');
|
|
138
|
+
|
|
139
|
+
const mediatypeStat = statsRow?.children.item(0);
|
|
140
|
+
// get second column item in stats row
|
|
141
|
+
const itemStatCount = statsRow?.children
|
|
142
|
+
.item(1)
|
|
143
|
+
?.querySelector('.status-text')
|
|
144
|
+
?.textContent?.trim();
|
|
145
|
+
// get third column item in stats row
|
|
146
|
+
const favoritesStatCount = statsRow?.children
|
|
147
|
+
.item(2)
|
|
148
|
+
?.querySelector('.status-text')
|
|
149
|
+
?.textContent?.trim();
|
|
150
|
+
// get fourth column item in stats row
|
|
151
|
+
const reviewsStatCount = statsRow?.children
|
|
152
|
+
.item(3)
|
|
153
|
+
?.querySelector('.status-text')
|
|
154
|
+
?.textContent?.trim();
|
|
155
|
+
|
|
156
|
+
expect(mediatypeStat).to.exist;
|
|
157
|
+
expect(itemStatCount).to.match(/Uploads:\s+0/);
|
|
158
|
+
expect(favoritesStatCount).to.match(/Favorites:\s+5/);
|
|
159
|
+
expect(reviewsStatCount).to.match(/Reviews:\s+6/);
|
|
160
|
+
});
|
|
57
161
|
});
|
|
@@ -374,4 +374,59 @@ describe('Item Tile', () => {
|
|
|
374
374
|
|
|
375
375
|
expect(volumeIssueBlock).to.not.exist;
|
|
376
376
|
});
|
|
377
|
+
|
|
378
|
+
it('should render web capture date links if present', async () => {
|
|
379
|
+
const captureDates = [
|
|
380
|
+
new Date('2010-01-02T12:34:56Z'),
|
|
381
|
+
new Date('2011-02-03T12:43:21Z'),
|
|
382
|
+
];
|
|
383
|
+
|
|
384
|
+
const el = await fixture<ItemTile>(html`
|
|
385
|
+
<item-tile
|
|
386
|
+
.model=${{
|
|
387
|
+
identifier: 'foo',
|
|
388
|
+
title: 'https://example.com/',
|
|
389
|
+
captureDates,
|
|
390
|
+
}}
|
|
391
|
+
></item-tile>
|
|
392
|
+
`);
|
|
393
|
+
|
|
394
|
+
const captureDatesUl = el.shadowRoot?.querySelector('.capture-dates');
|
|
395
|
+
expect(captureDatesUl, 'capture dates container').to.exist;
|
|
396
|
+
expect(captureDatesUl?.children.length).to.equal(2);
|
|
397
|
+
|
|
398
|
+
const firstDateLink = captureDatesUl?.children[0]?.querySelector('a[href]');
|
|
399
|
+
expect(firstDateLink, 'first date link').to.exist;
|
|
400
|
+
expect(firstDateLink?.getAttribute('href')).to.equal(
|
|
401
|
+
'https://web.archive.org/web/20100102123456/https%3A%2F%2Fexample.com%2F'
|
|
402
|
+
);
|
|
403
|
+
expect(firstDateLink?.textContent?.trim()).to.equal('Jan 02, 2010');
|
|
404
|
+
|
|
405
|
+
const secondDateLink =
|
|
406
|
+
captureDatesUl?.children[1]?.querySelector('a[href]');
|
|
407
|
+
expect(secondDateLink, 'second date link').to.exist;
|
|
408
|
+
expect(secondDateLink?.getAttribute('href')).to.equal(
|
|
409
|
+
'https://web.archive.org/web/20110203124321/https%3A%2F%2Fexample.com%2F'
|
|
410
|
+
);
|
|
411
|
+
expect(secondDateLink?.textContent?.trim()).to.equal('Feb 03, 2011');
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
it('should not render web captures if no title is present', async () => {
|
|
415
|
+
const captureDates = [
|
|
416
|
+
new Date('2010-01-02T12:34:56Z'),
|
|
417
|
+
new Date('2011-02-03T12:43:21Z'),
|
|
418
|
+
];
|
|
419
|
+
|
|
420
|
+
const el = await fixture<ItemTile>(html`
|
|
421
|
+
<item-tile
|
|
422
|
+
.model=${{
|
|
423
|
+
identifier: 'foo',
|
|
424
|
+
captureDates,
|
|
425
|
+
}}
|
|
426
|
+
></item-tile>
|
|
427
|
+
`);
|
|
428
|
+
|
|
429
|
+
const captureDatesUl = el.shadowRoot?.querySelector('.capture-dates');
|
|
430
|
+
expect(captureDatesUl).not.to.exist;
|
|
431
|
+
});
|
|
377
432
|
});
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
HoverPaneProviderInterface,
|
|
10
10
|
} from '../../../src/tiles/hover/hover-pane-controller';
|
|
11
11
|
import type { TileHoverPane } from '../../../src/tiles/hover/tile-hover-pane';
|
|
12
|
+
import { TileModel } from '../../../src/models';
|
|
12
13
|
|
|
13
14
|
@customElement('host-element')
|
|
14
15
|
class HostElement extends LitElement implements HoverPaneProviderInterface {
|
|
@@ -33,24 +34,25 @@ class HostElement extends LitElement implements HoverPaneProviderInterface {
|
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
getHoverPaneProps(): HoverPaneProperties {
|
|
37
|
+
const tileModel = new TileModel({});
|
|
38
|
+
tileModel.checked = false;
|
|
39
|
+
tileModel.collectionFilesCount = 1;
|
|
40
|
+
tileModel.collections = ['foo', 'bar'];
|
|
41
|
+
tileModel.collectionSize = 1;
|
|
42
|
+
tileModel.commentCount = 1;
|
|
43
|
+
tileModel.contentWarning = false;
|
|
44
|
+
tileModel.creators = ['foo', 'bar'];
|
|
45
|
+
tileModel.favCount = 1;
|
|
46
|
+
tileModel.identifier = 'foo';
|
|
47
|
+
tileModel.itemCount = 1;
|
|
48
|
+
tileModel.loginRequired = false;
|
|
49
|
+
tileModel.mediatype = 'data';
|
|
50
|
+
tileModel.subjects = ['foo', 'bar'];
|
|
51
|
+
tileModel.title = 'foo';
|
|
52
|
+
tileModel.viewCount = 1;
|
|
53
|
+
|
|
36
54
|
return {
|
|
37
|
-
model:
|
|
38
|
-
checked: false,
|
|
39
|
-
collectionFilesCount: 1,
|
|
40
|
-
collections: ['foo', 'bar'],
|
|
41
|
-
collectionSize: 1,
|
|
42
|
-
commentCount: 1,
|
|
43
|
-
contentWarning: false,
|
|
44
|
-
creators: ['foo', 'bar'],
|
|
45
|
-
favCount: 1,
|
|
46
|
-
identifier: 'foo',
|
|
47
|
-
itemCount: 1,
|
|
48
|
-
loginRequired: false,
|
|
49
|
-
mediatype: 'data',
|
|
50
|
-
subjects: ['foo', 'bar'],
|
|
51
|
-
title: 'foo',
|
|
52
|
-
viewCount: 1,
|
|
53
|
-
},
|
|
55
|
+
model: tileModel,
|
|
54
56
|
loggedIn: false,
|
|
55
57
|
sortParam: null,
|
|
56
58
|
};
|
|
@@ -392,4 +392,59 @@ describe('List Tile', () => {
|
|
|
392
392
|
expect(creatorBlock).to.exist;
|
|
393
393
|
expect(creatorBlock?.textContent?.trim()).to.equal('Archivist since 2015');
|
|
394
394
|
});
|
|
395
|
+
|
|
396
|
+
it('should render web capture date links if present', async () => {
|
|
397
|
+
const captureDates = [
|
|
398
|
+
new Date('2010-01-02T12:34:56Z'),
|
|
399
|
+
new Date('2011-02-03T12:43:21Z'),
|
|
400
|
+
];
|
|
401
|
+
|
|
402
|
+
const el = await fixture<TileList>(html`
|
|
403
|
+
<tile-list
|
|
404
|
+
.model=${{
|
|
405
|
+
identifier: 'foo',
|
|
406
|
+
title: 'https://example.com/',
|
|
407
|
+
captureDates,
|
|
408
|
+
}}
|
|
409
|
+
></tile-list>
|
|
410
|
+
`);
|
|
411
|
+
|
|
412
|
+
const captureDatesUl = el.shadowRoot?.querySelector('.capture-dates');
|
|
413
|
+
expect(captureDatesUl, 'capture dates container').to.exist;
|
|
414
|
+
expect(captureDatesUl?.children.length).to.equal(2);
|
|
415
|
+
|
|
416
|
+
const firstDateLink = captureDatesUl?.children[0]?.querySelector('a[href]');
|
|
417
|
+
expect(firstDateLink, 'first date link').to.exist;
|
|
418
|
+
expect(firstDateLink?.getAttribute('href')).to.equal(
|
|
419
|
+
'https://web.archive.org/web/20100102123456/https%3A%2F%2Fexample.com%2F'
|
|
420
|
+
);
|
|
421
|
+
expect(firstDateLink?.textContent?.trim()).to.equal('Jan 02, 2010');
|
|
422
|
+
|
|
423
|
+
const secondDateLink =
|
|
424
|
+
captureDatesUl?.children[1]?.querySelector('a[href]');
|
|
425
|
+
expect(secondDateLink, 'second date link').to.exist;
|
|
426
|
+
expect(secondDateLink?.getAttribute('href')).to.equal(
|
|
427
|
+
'https://web.archive.org/web/20110203124321/https%3A%2F%2Fexample.com%2F'
|
|
428
|
+
);
|
|
429
|
+
expect(secondDateLink?.textContent?.trim()).to.equal('Feb 03, 2011');
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
it('should not render web captures if no title is present', async () => {
|
|
433
|
+
const captureDates = [
|
|
434
|
+
new Date('2010-01-02T12:34:56Z'),
|
|
435
|
+
new Date('2011-02-03T12:43:21Z'),
|
|
436
|
+
];
|
|
437
|
+
|
|
438
|
+
const el = await fixture<TileList>(html`
|
|
439
|
+
<tile-list
|
|
440
|
+
.model=${{
|
|
441
|
+
identifier: 'foo',
|
|
442
|
+
captureDates,
|
|
443
|
+
}}
|
|
444
|
+
></tile-list>
|
|
445
|
+
`);
|
|
446
|
+
|
|
447
|
+
const captureDatesUl = el.shadowRoot?.querySelector('.capture-dates');
|
|
448
|
+
expect(captureDatesUl).not.to.exist;
|
|
449
|
+
});
|
|
395
450
|
});
|
|
@@ -48,6 +48,19 @@ describe('Tile Dispatcher', () => {
|
|
|
48
48
|
expect(accountTile).to.exist;
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
it('should render search-tile for grid mode and search mediatype', async () => {
|
|
52
|
+
const el = await fixture<TileDispatcher>(html`
|
|
53
|
+
<tile-dispatcher
|
|
54
|
+
.tileDisplayMode=${'grid'}
|
|
55
|
+
.model=${{ mediatype: 'search' }}
|
|
56
|
+
>
|
|
57
|
+
</tile-dispatcher>
|
|
58
|
+
`);
|
|
59
|
+
|
|
60
|
+
const searchTile = el.shadowRoot?.querySelector('search-tile');
|
|
61
|
+
expect(searchTile).to.exist;
|
|
62
|
+
});
|
|
63
|
+
|
|
51
64
|
it('should render tile-list for extended list mode', async () => {
|
|
52
65
|
const el = await fixture<TileDispatcher>(html`
|
|
53
66
|
<tile-dispatcher .tileDisplayMode=${'list-detail'} .model=${{}}>
|
package/tsconfig.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2018",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"noEmitOnError": true,
|
|
7
|
-
"lib": ["es2017", "dom"],
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": false,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"experimentalDecorators": true,
|
|
12
|
-
"importHelpers": true,
|
|
13
|
-
"outDir": "dist",
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"inlineSources": true,
|
|
16
|
-
"rootDir": "./",
|
|
17
|
-
"declaration": true,
|
|
18
|
-
"importsNotUsedAsValues": "error"
|
|
19
|
-
},
|
|
20
|
-
"include": ["src", "test", "index.ts", "types"],
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2018",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"noEmitOnError": true,
|
|
7
|
+
"lib": ["es2017", "dom"],
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": false,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"importHelpers": true,
|
|
13
|
+
"outDir": "dist",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"inlineSources": true,
|
|
16
|
+
"rootDir": "./",
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"importsNotUsedAsValues": "error"
|
|
19
|
+
},
|
|
20
|
+
"include": ["src", "test", "index.ts", "types"],
|
|
21
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
// import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
|
|
2
|
-
|
|
3
|
-
/** Use Hot Module replacement by adding --hmr to the start command */
|
|
4
|
-
const hmr = process.argv.includes('--hmr');
|
|
5
|
-
|
|
6
|
-
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
7
|
-
nodeResolve: true,
|
|
8
|
-
open: '/',
|
|
9
|
-
watch: !hmr,
|
|
10
|
-
|
|
11
|
-
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
12
|
-
// esbuildTarget: 'auto'
|
|
13
|
-
|
|
14
|
-
/** Set appIndex to enable SPA routing */
|
|
15
|
-
// appIndex: 'demo/index.html',
|
|
16
|
-
|
|
17
|
-
/** Confgure bare import resolve plugin */
|
|
18
|
-
// nodeResolve: {
|
|
19
|
-
// exportConditions: ['browser', 'development']
|
|
20
|
-
// },
|
|
21
|
-
|
|
22
|
-
plugins: [
|
|
23
|
-
/** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
|
|
24
|
-
// hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
http2: true,
|
|
28
|
-
sslCert: './local.archive.org.cert',
|
|
29
|
-
sslKey: './local.archive.org.key',
|
|
30
|
-
});
|
|
1
|
+
// import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
|
|
2
|
+
|
|
3
|
+
/** Use Hot Module replacement by adding --hmr to the start command */
|
|
4
|
+
const hmr = process.argv.includes('--hmr');
|
|
5
|
+
|
|
6
|
+
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
7
|
+
nodeResolve: true,
|
|
8
|
+
open: '/',
|
|
9
|
+
watch: !hmr,
|
|
10
|
+
|
|
11
|
+
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
12
|
+
// esbuildTarget: 'auto'
|
|
13
|
+
|
|
14
|
+
/** Set appIndex to enable SPA routing */
|
|
15
|
+
// appIndex: 'demo/index.html',
|
|
16
|
+
|
|
17
|
+
/** Confgure bare import resolve plugin */
|
|
18
|
+
// nodeResolve: {
|
|
19
|
+
// exportConditions: ['browser', 'development']
|
|
20
|
+
// },
|
|
21
|
+
|
|
22
|
+
plugins: [
|
|
23
|
+
/** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
|
|
24
|
+
// hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
|
|
25
|
+
],
|
|
26
|
+
|
|
27
|
+
http2: true,
|
|
28
|
+
sslCert: './local.archive.org.cert',
|
|
29
|
+
sslKey: './local.archive.org.key',
|
|
30
|
+
});
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
// import { playwrightLauncher } from '@web/test-runner-playwright';
|
|
2
|
-
|
|
3
|
-
const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
|
|
4
|
-
|
|
5
|
-
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
6
|
-
/** Test files to run */
|
|
7
|
-
files: 'dist/test/**/*.test.js',
|
|
8
|
-
|
|
9
|
-
/** Resolve bare module imports */
|
|
10
|
-
nodeResolve: {
|
|
11
|
-
exportConditions: ['browser', 'development'],
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
/** Filter out lit dev mode logs */
|
|
15
|
-
filterBrowserLogs(log) {
|
|
16
|
-
for (const arg of log.args) {
|
|
17
|
-
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return true;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
25
|
-
// esbuildTarget: 'auto',
|
|
26
|
-
|
|
27
|
-
/** Amount of browsers to run concurrently */
|
|
28
|
-
// concurrentBrowsers: 2,
|
|
29
|
-
|
|
30
|
-
/** Amount of test files per browser to test concurrently */
|
|
31
|
-
// concurrency: 1,
|
|
32
|
-
|
|
33
|
-
/** Browsers to run tests on */
|
|
34
|
-
// browsers: [
|
|
35
|
-
// playwrightLauncher({ product: 'chromium' }),
|
|
36
|
-
// playwrightLauncher({ product: 'firefox' }),
|
|
37
|
-
// playwrightLauncher({ product: 'webkit' }),
|
|
38
|
-
// ],
|
|
39
|
-
|
|
40
|
-
// See documentation for all available options
|
|
41
|
-
});
|
|
1
|
+
// import { playwrightLauncher } from '@web/test-runner-playwright';
|
|
2
|
+
|
|
3
|
+
const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
|
|
4
|
+
|
|
5
|
+
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
6
|
+
/** Test files to run */
|
|
7
|
+
files: 'dist/test/**/*.test.js',
|
|
8
|
+
|
|
9
|
+
/** Resolve bare module imports */
|
|
10
|
+
nodeResolve: {
|
|
11
|
+
exportConditions: ['browser', 'development'],
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
/** Filter out lit dev mode logs */
|
|
15
|
+
filterBrowserLogs(log) {
|
|
16
|
+
for (const arg of log.args) {
|
|
17
|
+
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
25
|
+
// esbuildTarget: 'auto',
|
|
26
|
+
|
|
27
|
+
/** Amount of browsers to run concurrently */
|
|
28
|
+
// concurrentBrowsers: 2,
|
|
29
|
+
|
|
30
|
+
/** Amount of test files per browser to test concurrently */
|
|
31
|
+
// concurrency: 1,
|
|
32
|
+
|
|
33
|
+
/** Browsers to run tests on */
|
|
34
|
+
// browsers: [
|
|
35
|
+
// playwrightLauncher({ product: 'chromium' }),
|
|
36
|
+
// playwrightLauncher({ product: 'firefox' }),
|
|
37
|
+
// playwrightLauncher({ product: 'webkit' }),
|
|
38
|
+
// ],
|
|
39
|
+
|
|
40
|
+
// See documentation for all available options
|
|
41
|
+
});
|
package/types/sentry.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'Sentry';
|