@internetarchive/collection-browser 0.4.11 → 0.4.12
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/.github/workflows/ci.yml +26 -26
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +4 -4
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -9
- package/dist/src/app-root.d.ts +50 -50
- package/dist/src/app-root.js +278 -278
- 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/empty-query.d.ts +2 -2
- package/dist/src/assets/img/icons/empty-query.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/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 +280 -279
- package/dist/src/collection-browser.js +1175 -1156
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -5
- package/dist/src/collection-facets/facet-tombstone-row.js +15 -15
- package/dist/src/collection-facets/facets-template.d.ts +16 -16
- package/dist/src/collection-facets/facets-template.js +125 -125
- package/dist/src/collection-facets/more-facets-content.d.ts +76 -75
- package/dist/src/collection-facets/more-facets-content.js +354 -377
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -36
- package/dist/src/collection-facets/more-facets-pagination.js +197 -195
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.d.ts +41 -0
- package/dist/src/collection-facets/toggle-switch.js +184 -0
- package/dist/src/collection-facets/toggle-switch.js.map +1 -0
- package/dist/src/collection-facets.d.ts +81 -81
- package/dist/src/collection-facets.js +375 -375
- package/dist/src/empty-placeholder.d.ts +13 -11
- package/dist/src/empty-placeholder.js +80 -44
- package/dist/src/empty-placeholder.js.map +1 -1
- 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/mediatype/mediatype-config.d.ts +3 -3
- package/dist/src/mediatype/mediatype-config.js +85 -85
- package/dist/src/models.d.ts +115 -115
- package/dist/src/models.js +125 -125
- package/dist/src/restoration-state-handler.d.ts +45 -45
- package/dist/src/restoration-state-handler.js +230 -230
- 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 +20 -20
- 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-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 +108 -108
- package/dist/src/sort-filter-bar/sort-filter-bar.js +438 -438
- package/dist/src/styles/item-image-styles.d.ts +8 -8
- package/dist/src/styles/item-image-styles.js +9 -9
- 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 +20 -20
- package/dist/src/tiles/grid/account-tile.js +64 -64
- package/dist/src/tiles/grid/collection-tile.d.ts +17 -17
- package/dist/src/tiles/grid/collection-tile.js +71 -71
- package/dist/src/tiles/grid/item-tile.d.ts +32 -32
- package/dist/src/tiles/grid/item-tile.js +122 -122
- 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 +7 -7
- package/dist/src/tiles/grid/tile-stats.d.ts +10 -10
- package/dist/src/tiles/grid/tile-stats.js +40 -40
- 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 +72 -72
- package/dist/src/tiles/item-image.d.ts +35 -35
- package/dist/src/tiles/item-image.js +117 -117
- package/dist/src/tiles/list/account-label.d.ts +1 -1
- package/dist/src/tiles/list/account-label.js +6 -6
- package/dist/src/tiles/list/date-label.d.ts +1 -1
- package/dist/src/tiles/list/date-label.js +12 -12
- package/dist/src/tiles/list/tile-list-compact-header.d.ts +12 -12
- package/dist/src/tiles/list/tile-list-compact-header.js +41 -41
- package/dist/src/tiles/list/tile-list-compact.d.ts +22 -21
- package/dist/src/tiles/list/tile-list-compact.js +114 -101
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.d.ts +55 -55
- package/dist/src/tiles/list/tile-list.js +304 -301
- 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 +58 -58
- package/dist/src/tiles/tile-dispatcher.js +194 -194
- package/dist/src/utils/analytics-events.d.ts +22 -22
- package/dist/src/utils/analytics-events.js +24 -24
- 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 +23 -23
- package/dist/src/utils/format-unit-size.d.ts +2 -2
- package/dist/src/utils/format-unit-size.js +33 -33
- package/dist/test/collection-browser.test.d.ts +1 -1
- package/dist/test/collection-browser.test.js +584 -584
- package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
- package/dist/test/collection-facets/facets-template.test.js +62 -62
- package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +114 -114
- 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 -0
- package/dist/test/collection-facets/toggle-switch.test.js +87 -0
- package/dist/test/collection-facets/toggle-switch.test.js.map +1 -0
- package/dist/test/collection-facets.test.d.ts +2 -2
- package/dist/test/collection-facets.test.js +460 -460
- package/dist/test/empty-placeholder.test.d.ts +1 -1
- package/dist/test/empty-placeholder.test.js +33 -33
- 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 +84 -84
- 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-collection-name-cache.d.ts +7 -7
- package/dist/test/mocks/mock-collection-name-cache.js +13 -13
- package/dist/test/mocks/mock-search-responses.d.ts +12 -12
- package/dist/test/mocks/mock-search-responses.js +341 -341
- package/dist/test/mocks/mock-search-service.d.ts +13 -13
- package/dist/test/mocks/mock-search-service.js +40 -40
- package/dist/test/restoration-state-handler.test.d.ts +1 -1
- package/dist/test/restoration-state-handler.test.js +125 -125
- 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 +197 -197
- 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 +33 -33
- 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 +158 -158
- package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +1 -1
- package/dist/test/tiles/hover/hover-pane-controller.test.js +257 -257
- 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 +104 -92
- package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.d.ts +1 -1
- package/dist/test/tiles/list/tile-list.test.js +175 -163
- 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 +67 -67
- 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/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +3 -3
- package/renovate.json +6 -6
- package/src/collection-browser.ts +25 -1
- package/src/collection-facets/more-facets-content.ts +25 -48
- package/src/collection-facets/more-facets-pagination.ts +5 -3
- package/src/collection-facets/toggle-switch.ts +184 -0
- package/src/empty-placeholder.ts +53 -7
- package/src/tiles/list/tile-list-compact.ts +15 -2
- package/src/tiles/list/tile-list.ts +3 -0
- package/test/collection-facets/toggle-switch.test.ts +154 -0
- package/test/tiles/list/tile-list-compact.test.ts +14 -0
- package/test/tiles/list/tile-list.test.ts +14 -0
- package/tsconfig.json +21 -21
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
var TileDispatcher_1;
|
|
2
|
-
import { __decorate } from "tslib";
|
|
3
|
-
import { css, html, LitElement, nothing } from 'lit';
|
|
4
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
|
5
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
|
-
import './grid/collection-tile';
|
|
7
|
-
import './grid/item-tile';
|
|
8
|
-
import './grid/account-tile';
|
|
9
|
-
import './hover/tile-hover-pane';
|
|
10
|
-
import './list/tile-list';
|
|
11
|
-
import './list/tile-list-compact';
|
|
12
|
-
import './list/tile-list-compact-header';
|
|
13
|
-
import { HoverPaneController, } from './hover/hover-pane-controller';
|
|
14
|
-
let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.sortParam = null;
|
|
18
|
-
this.loggedIn = false;
|
|
19
|
-
/** Whether this tile should include a hover pane at all (for applicable tile modes) */
|
|
20
|
-
this.enableHoverPane = false;
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
const isGridMode = this.tileDisplayMode === 'grid';
|
|
25
|
-
const hoverPaneTemplate = (_b = (_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.getTemplate()) !== null && _b !== void 0 ? _b : nothing;
|
|
1
|
+
var TileDispatcher_1;
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import { css, html, LitElement, nothing } from 'lit';
|
|
4
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
|
+
import './grid/collection-tile';
|
|
7
|
+
import './grid/item-tile';
|
|
8
|
+
import './grid/account-tile';
|
|
9
|
+
import './hover/tile-hover-pane';
|
|
10
|
+
import './list/tile-list';
|
|
11
|
+
import './list/tile-list-compact';
|
|
12
|
+
import './list/tile-list-compact-header';
|
|
13
|
+
import { HoverPaneController, } from './hover/hover-pane-controller';
|
|
14
|
+
let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.sortParam = null;
|
|
18
|
+
this.loggedIn = false;
|
|
19
|
+
/** Whether this tile should include a hover pane at all (for applicable tile modes) */
|
|
20
|
+
this.enableHoverPane = false;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const isGridMode = this.tileDisplayMode === 'grid';
|
|
25
|
+
const hoverPaneTemplate = (_b = (_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.getTemplate()) !== null && _b !== void 0 ? _b : nothing;
|
|
26
26
|
return html `
|
|
27
27
|
<div id="container" class=${isGridMode ? 'hoverable' : nothing}>
|
|
28
|
-
${this.tileDisplayMode === 'list-header'
|
|
29
|
-
? this.headerTemplate
|
|
28
|
+
${this.tileDisplayMode === 'list-header'
|
|
29
|
+
? this.headerTemplate
|
|
30
30
|
: this.tileTemplate}
|
|
31
31
|
${hoverPaneTemplate}
|
|
32
32
|
</div>
|
|
33
|
-
`;
|
|
34
|
-
}
|
|
35
|
-
firstUpdated() {
|
|
36
|
-
if (this.shouldPrepareHoverPane) {
|
|
37
|
-
this.hoverPaneController = new HoverPaneController(this, {
|
|
38
|
-
mobileBreakpoint: this.mobileBreakpoint,
|
|
39
|
-
enableLongPress: false,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
get headerTemplate() {
|
|
44
|
-
const { currentWidth, sortParam, mobileBreakpoint } = this;
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
firstUpdated() {
|
|
36
|
+
if (this.shouldPrepareHoverPane) {
|
|
37
|
+
this.hoverPaneController = new HoverPaneController(this, {
|
|
38
|
+
mobileBreakpoint: this.mobileBreakpoint,
|
|
39
|
+
enableLongPress: false,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
get headerTemplate() {
|
|
44
|
+
const { currentWidth, sortParam, mobileBreakpoint } = this;
|
|
45
45
|
return html `
|
|
46
46
|
<tile-list-compact-header
|
|
47
47
|
class="header"
|
|
@@ -50,100 +50,100 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
50
50
|
.mobileBreakpoint=${mobileBreakpoint}
|
|
51
51
|
>
|
|
52
52
|
</tile-list-compact-header>
|
|
53
|
-
`;
|
|
54
|
-
}
|
|
55
|
-
get tileTemplate() {
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
get tileTemplate() {
|
|
56
56
|
return html `
|
|
57
|
-
${this.tileDisplayMode === 'list-detail'
|
|
58
|
-
? this.tile
|
|
57
|
+
${this.tileDisplayMode === 'list-detail'
|
|
58
|
+
? this.tile
|
|
59
59
|
: this.linkTileTemplate}
|
|
60
|
-
`;
|
|
61
|
-
}
|
|
62
|
-
get linkTileTemplate() {
|
|
63
|
-
var _a;
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
get linkTileTemplate() {
|
|
63
|
+
var _a;
|
|
64
64
|
return html `
|
|
65
65
|
<a
|
|
66
66
|
href="${this.linkTileHref}"
|
|
67
|
-
title=${this.shouldPrepareHoverPane
|
|
68
|
-
? nothing // Don't show title tooltips when we have the tile info popups
|
|
67
|
+
title=${this.shouldPrepareHoverPane
|
|
68
|
+
? nothing // Don't show title tooltips when we have the tile info popups
|
|
69
69
|
: ifDefined((_a = this.model) === null || _a === void 0 ? void 0 : _a.title)}
|
|
70
70
|
@click=${() => this.dispatchEvent(new CustomEvent('resultSelected', { detail: this.model }))}
|
|
71
71
|
>
|
|
72
72
|
${this.tile}
|
|
73
73
|
</a>
|
|
74
|
-
`;
|
|
75
|
-
}
|
|
76
|
-
get linkTileHref() {
|
|
77
|
-
var _a, _b, _c;
|
|
78
|
-
// Use the server-specified href if available.
|
|
79
|
-
// Otherwise, construct a details page URL from the item identifier.
|
|
80
|
-
return ((_a = this.model) === null || _a === void 0 ? void 0 : _a.href)
|
|
81
|
-
? `${this.baseNavigationUrl}${(_b = this.model) === null || _b === void 0 ? void 0 : _b.href}`
|
|
82
|
-
: `${this.baseNavigationUrl}/details/${(_c = this.model) === null || _c === void 0 ? void 0 : _c.identifier}`;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Whether hover pane behavior should be prepared for this tile
|
|
86
|
-
* (e.g., whether mouse listeners should be attached, etc.)
|
|
87
|
-
*/
|
|
88
|
-
get shouldPrepareHoverPane() {
|
|
89
|
-
return (this.enableHoverPane &&
|
|
90
|
-
!!this.tileDisplayMode &&
|
|
91
|
-
TileDispatcher_1.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode]);
|
|
92
|
-
}
|
|
93
|
-
get isHoverEnabled() {
|
|
94
|
-
return window.matchMedia('(hover: hover)').matches;
|
|
95
|
-
}
|
|
96
|
-
/** @inheritdoc */
|
|
97
|
-
getHoverPane() {
|
|
98
|
-
return this.hoverPane;
|
|
99
|
-
}
|
|
100
|
-
/** @inheritdoc */
|
|
101
|
-
getHoverPaneProps() {
|
|
102
|
-
return this;
|
|
103
|
-
}
|
|
104
|
-
handleResize(entry) {
|
|
105
|
-
this.currentWidth = entry.contentRect.width;
|
|
106
|
-
this.currentHeight = entry.contentRect.height;
|
|
107
|
-
}
|
|
108
|
-
disconnectedCallback() {
|
|
109
|
-
this.stopResizeObservation(this.resizeObserver);
|
|
110
|
-
}
|
|
111
|
-
stopResizeObservation(observer) {
|
|
112
|
-
observer === null || observer === void 0 ? void 0 : observer.removeObserver({
|
|
113
|
-
handler: this,
|
|
114
|
-
target: this.container,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
startResizeObservation() {
|
|
118
|
-
var _a;
|
|
119
|
-
this.stopResizeObservation(this.resizeObserver);
|
|
120
|
-
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.addObserver({
|
|
121
|
-
handler: this,
|
|
122
|
-
target: this.container,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
updated(props) {
|
|
126
|
-
if (props.has('resizeObserver')) {
|
|
127
|
-
const previousObserver = props.get('resizeObserver');
|
|
128
|
-
this.stopResizeObservation(previousObserver);
|
|
129
|
-
this.startResizeObservation();
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
tileInfoButtonPressed(e) {
|
|
133
|
-
var _a;
|
|
134
|
-
(_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.toggleHoverPane({
|
|
135
|
-
coords: e.detail,
|
|
136
|
-
enableTouchBackdrop: true,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
get tile() {
|
|
140
|
-
const { model, baseNavigationUrl, currentWidth, currentHeight, sortParam, mobileBreakpoint, } = this;
|
|
141
|
-
if (!model)
|
|
142
|
-
return nothing;
|
|
143
|
-
switch (this.tileDisplayMode) {
|
|
144
|
-
case 'grid':
|
|
145
|
-
switch (model.mediatype) {
|
|
146
|
-
case 'collection':
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
get linkTileHref() {
|
|
77
|
+
var _a, _b, _c;
|
|
78
|
+
// Use the server-specified href if available.
|
|
79
|
+
// Otherwise, construct a details page URL from the item identifier.
|
|
80
|
+
return ((_a = this.model) === null || _a === void 0 ? void 0 : _a.href)
|
|
81
|
+
? `${this.baseNavigationUrl}${(_b = this.model) === null || _b === void 0 ? void 0 : _b.href}`
|
|
82
|
+
: `${this.baseNavigationUrl}/details/${(_c = this.model) === null || _c === void 0 ? void 0 : _c.identifier}`;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Whether hover pane behavior should be prepared for this tile
|
|
86
|
+
* (e.g., whether mouse listeners should be attached, etc.)
|
|
87
|
+
*/
|
|
88
|
+
get shouldPrepareHoverPane() {
|
|
89
|
+
return (this.enableHoverPane &&
|
|
90
|
+
!!this.tileDisplayMode &&
|
|
91
|
+
TileDispatcher_1.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode]);
|
|
92
|
+
}
|
|
93
|
+
get isHoverEnabled() {
|
|
94
|
+
return window.matchMedia('(hover: hover)').matches;
|
|
95
|
+
}
|
|
96
|
+
/** @inheritdoc */
|
|
97
|
+
getHoverPane() {
|
|
98
|
+
return this.hoverPane;
|
|
99
|
+
}
|
|
100
|
+
/** @inheritdoc */
|
|
101
|
+
getHoverPaneProps() {
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
handleResize(entry) {
|
|
105
|
+
this.currentWidth = entry.contentRect.width;
|
|
106
|
+
this.currentHeight = entry.contentRect.height;
|
|
107
|
+
}
|
|
108
|
+
disconnectedCallback() {
|
|
109
|
+
this.stopResizeObservation(this.resizeObserver);
|
|
110
|
+
}
|
|
111
|
+
stopResizeObservation(observer) {
|
|
112
|
+
observer === null || observer === void 0 ? void 0 : observer.removeObserver({
|
|
113
|
+
handler: this,
|
|
114
|
+
target: this.container,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
startResizeObservation() {
|
|
118
|
+
var _a;
|
|
119
|
+
this.stopResizeObservation(this.resizeObserver);
|
|
120
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.addObserver({
|
|
121
|
+
handler: this,
|
|
122
|
+
target: this.container,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
updated(props) {
|
|
126
|
+
if (props.has('resizeObserver')) {
|
|
127
|
+
const previousObserver = props.get('resizeObserver');
|
|
128
|
+
this.stopResizeObservation(previousObserver);
|
|
129
|
+
this.startResizeObservation();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
tileInfoButtonPressed(e) {
|
|
133
|
+
var _a;
|
|
134
|
+
(_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.toggleHoverPane({
|
|
135
|
+
coords: e.detail,
|
|
136
|
+
enableTouchBackdrop: true,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
get tile() {
|
|
140
|
+
const { model, baseNavigationUrl, currentWidth, currentHeight, sortParam, mobileBreakpoint, } = this;
|
|
141
|
+
if (!model)
|
|
142
|
+
return nothing;
|
|
143
|
+
switch (this.tileDisplayMode) {
|
|
144
|
+
case 'grid':
|
|
145
|
+
switch (model.mediatype) {
|
|
146
|
+
case 'collection':
|
|
147
147
|
return html `<collection-tile
|
|
148
148
|
.model=${model}
|
|
149
149
|
.baseImageUrl=${this.baseImageUrl}
|
|
@@ -152,8 +152,8 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
152
152
|
?showInfoButton=${!this.isHoverEnabled}
|
|
153
153
|
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
154
154
|
>
|
|
155
|
-
</collection-tile>`;
|
|
156
|
-
case 'account':
|
|
155
|
+
</collection-tile>`;
|
|
156
|
+
case 'account':
|
|
157
157
|
return html `<account-tile
|
|
158
158
|
.model=${model}
|
|
159
159
|
.baseImageUrl=${this.baseImageUrl}
|
|
@@ -162,8 +162,8 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
162
162
|
?showInfoButton=${!this.isHoverEnabled}
|
|
163
163
|
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
164
164
|
>
|
|
165
|
-
</account-tile>`;
|
|
166
|
-
default:
|
|
165
|
+
</account-tile>`;
|
|
166
|
+
default:
|
|
167
167
|
return html `<item-tile
|
|
168
168
|
.model=${model}
|
|
169
169
|
.currentWidth=${this.currentWidth}
|
|
@@ -175,9 +175,9 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
175
175
|
?showInfoButton=${!this.isHoverEnabled}
|
|
176
176
|
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
177
177
|
>
|
|
178
|
-
</item-tile>`;
|
|
179
|
-
}
|
|
180
|
-
case 'list-compact':
|
|
178
|
+
</item-tile>`;
|
|
179
|
+
}
|
|
180
|
+
case 'list-compact':
|
|
181
181
|
return html `<tile-list-compact
|
|
182
182
|
.model=${model}
|
|
183
183
|
.currentWidth=${currentWidth}
|
|
@@ -188,8 +188,8 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
188
188
|
.baseImageUrl=${this.baseImageUrl}
|
|
189
189
|
.loggedIn=${this.loggedIn}
|
|
190
190
|
>
|
|
191
|
-
</tile-list-compact>`;
|
|
192
|
-
case 'list-detail':
|
|
191
|
+
</tile-list-compact>`;
|
|
192
|
+
case 'list-detail':
|
|
193
193
|
return html `<tile-list
|
|
194
194
|
.model=${model}
|
|
195
195
|
.collectionNameCache=${this.collectionNameCache}
|
|
@@ -201,12 +201,12 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
201
201
|
.baseImageUrl=${this.baseImageUrl}
|
|
202
202
|
.loggedIn=${this.loggedIn}
|
|
203
203
|
>
|
|
204
|
-
</tile-list>`;
|
|
205
|
-
default:
|
|
206
|
-
return nothing;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
static get styles() {
|
|
204
|
+
</tile-list>`;
|
|
205
|
+
default:
|
|
206
|
+
return nothing;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
static get styles() {
|
|
210
210
|
return css `
|
|
211
211
|
:host {
|
|
212
212
|
display: block;
|
|
@@ -269,60 +269,60 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends LitElement
|
|
|
269
269
|
left: -9999px;
|
|
270
270
|
z-index: 2;
|
|
271
271
|
}
|
|
272
|
-
`;
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
/** Maps each display mode to whether hover panes should appear in that mode */
|
|
276
|
-
TileDispatcher.HOVER_PANE_DISPLAY_MODES = {
|
|
277
|
-
grid: true,
|
|
278
|
-
'list-compact': true,
|
|
279
|
-
'list-detail': false,
|
|
280
|
-
'list-header': false,
|
|
281
|
-
};
|
|
282
|
-
__decorate([
|
|
283
|
-
property({ type: String })
|
|
284
|
-
], TileDispatcher.prototype, "tileDisplayMode", void 0);
|
|
285
|
-
__decorate([
|
|
286
|
-
property({ type: Object })
|
|
287
|
-
], TileDispatcher.prototype, "model", void 0);
|
|
288
|
-
__decorate([
|
|
289
|
-
property({ type: String })
|
|
290
|
-
], TileDispatcher.prototype, "baseNavigationUrl", void 0);
|
|
291
|
-
__decorate([
|
|
292
|
-
property({ type: Number })
|
|
293
|
-
], TileDispatcher.prototype, "currentWidth", void 0);
|
|
294
|
-
__decorate([
|
|
295
|
-
property({ type: Number })
|
|
296
|
-
], TileDispatcher.prototype, "currentHeight", void 0);
|
|
297
|
-
__decorate([
|
|
298
|
-
property({ type: Object })
|
|
299
|
-
], TileDispatcher.prototype, "resizeObserver", void 0);
|
|
300
|
-
__decorate([
|
|
301
|
-
property({ type: Object })
|
|
302
|
-
], TileDispatcher.prototype, "collectionNameCache", void 0);
|
|
303
|
-
__decorate([
|
|
304
|
-
property({ type: Object })
|
|
305
|
-
], TileDispatcher.prototype, "sortParam", void 0);
|
|
306
|
-
__decorate([
|
|
307
|
-
property({ type: Number })
|
|
308
|
-
], TileDispatcher.prototype, "mobileBreakpoint", void 0);
|
|
309
|
-
__decorate([
|
|
310
|
-
property({ type: String })
|
|
311
|
-
], TileDispatcher.prototype, "baseImageUrl", void 0);
|
|
312
|
-
__decorate([
|
|
313
|
-
property({ type: Boolean })
|
|
314
|
-
], TileDispatcher.prototype, "loggedIn", void 0);
|
|
315
|
-
__decorate([
|
|
316
|
-
property({ type: Boolean })
|
|
317
|
-
], TileDispatcher.prototype, "enableHoverPane", void 0);
|
|
318
|
-
__decorate([
|
|
319
|
-
query('#container')
|
|
320
|
-
], TileDispatcher.prototype, "container", void 0);
|
|
321
|
-
__decorate([
|
|
322
|
-
query('tile-hover-pane')
|
|
323
|
-
], TileDispatcher.prototype, "hoverPane", void 0);
|
|
324
|
-
TileDispatcher = TileDispatcher_1 = __decorate([
|
|
325
|
-
customElement('tile-dispatcher')
|
|
326
|
-
], TileDispatcher);
|
|
327
|
-
export { TileDispatcher };
|
|
272
|
+
`;
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
/** Maps each display mode to whether hover panes should appear in that mode */
|
|
276
|
+
TileDispatcher.HOVER_PANE_DISPLAY_MODES = {
|
|
277
|
+
grid: true,
|
|
278
|
+
'list-compact': true,
|
|
279
|
+
'list-detail': false,
|
|
280
|
+
'list-header': false,
|
|
281
|
+
};
|
|
282
|
+
__decorate([
|
|
283
|
+
property({ type: String })
|
|
284
|
+
], TileDispatcher.prototype, "tileDisplayMode", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
property({ type: Object })
|
|
287
|
+
], TileDispatcher.prototype, "model", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property({ type: String })
|
|
290
|
+
], TileDispatcher.prototype, "baseNavigationUrl", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
property({ type: Number })
|
|
293
|
+
], TileDispatcher.prototype, "currentWidth", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
property({ type: Number })
|
|
296
|
+
], TileDispatcher.prototype, "currentHeight", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ type: Object })
|
|
299
|
+
], TileDispatcher.prototype, "resizeObserver", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
property({ type: Object })
|
|
302
|
+
], TileDispatcher.prototype, "collectionNameCache", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
property({ type: Object })
|
|
305
|
+
], TileDispatcher.prototype, "sortParam", void 0);
|
|
306
|
+
__decorate([
|
|
307
|
+
property({ type: Number })
|
|
308
|
+
], TileDispatcher.prototype, "mobileBreakpoint", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
property({ type: String })
|
|
311
|
+
], TileDispatcher.prototype, "baseImageUrl", void 0);
|
|
312
|
+
__decorate([
|
|
313
|
+
property({ type: Boolean })
|
|
314
|
+
], TileDispatcher.prototype, "loggedIn", void 0);
|
|
315
|
+
__decorate([
|
|
316
|
+
property({ type: Boolean })
|
|
317
|
+
], TileDispatcher.prototype, "enableHoverPane", void 0);
|
|
318
|
+
__decorate([
|
|
319
|
+
query('#container')
|
|
320
|
+
], TileDispatcher.prototype, "container", void 0);
|
|
321
|
+
__decorate([
|
|
322
|
+
query('tile-hover-pane')
|
|
323
|
+
], TileDispatcher.prototype, "hoverPane", void 0);
|
|
324
|
+
TileDispatcher = TileDispatcher_1 = __decorate([
|
|
325
|
+
customElement('tile-dispatcher')
|
|
326
|
+
], TileDispatcher);
|
|
327
|
+
export { TileDispatcher };
|
|
328
328
|
//# sourceMappingURL=tile-dispatcher.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics categories and events. Used when building actions in
|
|
3
|
-
*/
|
|
4
|
-
export declare enum analyticsCategories {
|
|
5
|
-
default = "collection-browser"
|
|
6
|
-
}
|
|
7
|
-
export declare enum analyticsActions {
|
|
8
|
-
sortBy = "sortBy",
|
|
9
|
-
filterByCreator = "filterByCreator",
|
|
10
|
-
filterByTitle = "filterByTitle",
|
|
11
|
-
displayMode = "displayMode",
|
|
12
|
-
facetSelected = "facetSelected",
|
|
13
|
-
facetDeselected = "facetDeselected",
|
|
14
|
-
facetNegativeSelected = "facetNegativeSelected",
|
|
15
|
-
facetNegativeDeselected = "facetNegativeDeselected",
|
|
16
|
-
histogramChanged = "histogramChanged",
|
|
17
|
-
resultSelected = "resultSelected",
|
|
18
|
-
moreFacetsPageChange = "moreFacetsPageChange",
|
|
19
|
-
showMoreFacetsModal = "showMoreFacetsModal",
|
|
20
|
-
closeMoreFacetsModal = "closeMoreFacetsModal",
|
|
21
|
-
applyMoreFacetsModal = "applyMoreFacetsModal"
|
|
22
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Analytics categories and events. Used when building actions in
|
|
3
|
+
*/
|
|
4
|
+
export declare enum analyticsCategories {
|
|
5
|
+
default = "collection-browser"
|
|
6
|
+
}
|
|
7
|
+
export declare enum analyticsActions {
|
|
8
|
+
sortBy = "sortBy",
|
|
9
|
+
filterByCreator = "filterByCreator",
|
|
10
|
+
filterByTitle = "filterByTitle",
|
|
11
|
+
displayMode = "displayMode",
|
|
12
|
+
facetSelected = "facetSelected",
|
|
13
|
+
facetDeselected = "facetDeselected",
|
|
14
|
+
facetNegativeSelected = "facetNegativeSelected",
|
|
15
|
+
facetNegativeDeselected = "facetNegativeDeselected",
|
|
16
|
+
histogramChanged = "histogramChanged",
|
|
17
|
+
resultSelected = "resultSelected",
|
|
18
|
+
moreFacetsPageChange = "moreFacetsPageChange",
|
|
19
|
+
showMoreFacetsModal = "showMoreFacetsModal",
|
|
20
|
+
closeMoreFacetsModal = "closeMoreFacetsModal",
|
|
21
|
+
applyMoreFacetsModal = "applyMoreFacetsModal"
|
|
22
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics categories and events. Used when building actions in
|
|
3
|
-
*/
|
|
4
|
-
export var analyticsCategories;
|
|
5
|
-
(function (analyticsCategories) {
|
|
6
|
-
analyticsCategories["default"] = "collection-browser";
|
|
7
|
-
})(analyticsCategories || (analyticsCategories = {}));
|
|
8
|
-
export var analyticsActions;
|
|
9
|
-
(function (analyticsActions) {
|
|
10
|
-
analyticsActions["sortBy"] = "sortBy";
|
|
11
|
-
analyticsActions["filterByCreator"] = "filterByCreator";
|
|
12
|
-
analyticsActions["filterByTitle"] = "filterByTitle";
|
|
13
|
-
analyticsActions["displayMode"] = "displayMode";
|
|
14
|
-
analyticsActions["facetSelected"] = "facetSelected";
|
|
15
|
-
analyticsActions["facetDeselected"] = "facetDeselected";
|
|
16
|
-
analyticsActions["facetNegativeSelected"] = "facetNegativeSelected";
|
|
17
|
-
analyticsActions["facetNegativeDeselected"] = "facetNegativeDeselected";
|
|
18
|
-
analyticsActions["histogramChanged"] = "histogramChanged";
|
|
19
|
-
analyticsActions["resultSelected"] = "resultSelected";
|
|
20
|
-
analyticsActions["moreFacetsPageChange"] = "moreFacetsPageChange";
|
|
21
|
-
analyticsActions["showMoreFacetsModal"] = "showMoreFacetsModal";
|
|
22
|
-
analyticsActions["closeMoreFacetsModal"] = "closeMoreFacetsModal";
|
|
23
|
-
analyticsActions["applyMoreFacetsModal"] = "applyMoreFacetsModal";
|
|
24
|
-
})(analyticsActions || (analyticsActions = {}));
|
|
1
|
+
/**
|
|
2
|
+
* Analytics categories and events. Used when building actions in
|
|
3
|
+
*/
|
|
4
|
+
export var analyticsCategories;
|
|
5
|
+
(function (analyticsCategories) {
|
|
6
|
+
analyticsCategories["default"] = "collection-browser";
|
|
7
|
+
})(analyticsCategories || (analyticsCategories = {}));
|
|
8
|
+
export var analyticsActions;
|
|
9
|
+
(function (analyticsActions) {
|
|
10
|
+
analyticsActions["sortBy"] = "sortBy";
|
|
11
|
+
analyticsActions["filterByCreator"] = "filterByCreator";
|
|
12
|
+
analyticsActions["filterByTitle"] = "filterByTitle";
|
|
13
|
+
analyticsActions["displayMode"] = "displayMode";
|
|
14
|
+
analyticsActions["facetSelected"] = "facetSelected";
|
|
15
|
+
analyticsActions["facetDeselected"] = "facetDeselected";
|
|
16
|
+
analyticsActions["facetNegativeSelected"] = "facetNegativeSelected";
|
|
17
|
+
analyticsActions["facetNegativeDeselected"] = "facetNegativeDeselected";
|
|
18
|
+
analyticsActions["histogramChanged"] = "histogramChanged";
|
|
19
|
+
analyticsActions["resultSelected"] = "resultSelected";
|
|
20
|
+
analyticsActions["moreFacetsPageChange"] = "moreFacetsPageChange";
|
|
21
|
+
analyticsActions["showMoreFacetsModal"] = "showMoreFacetsModal";
|
|
22
|
+
analyticsActions["closeMoreFacetsModal"] = "closeMoreFacetsModal";
|
|
23
|
+
analyticsActions["applyMoreFacetsModal"] = "applyMoreFacetsModal";
|
|
24
|
+
})(analyticsActions || (analyticsActions = {}));
|
|
25
25
|
//# sourceMappingURL=analytics-events.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare type NumberFormat = 'short' | 'long';
|
|
2
|
-
export declare type LabelFormat = 'short' | 'long';
|
|
3
|
-
/**
|
|
4
|
-
* Format a "count" number into short "icon" or longer text string.
|
|
5
|
-
* For positive numbers only.
|
|
6
|
-
*/
|
|
7
|
-
export declare function formatCount(count: number | undefined, numberFormat?: NumberFormat, labelFormat?: LabelFormat, locale?: string): string;
|
|
1
|
+
export declare type NumberFormat = 'short' | 'long';
|
|
2
|
+
export declare type LabelFormat = 'short' | 'long';
|
|
3
|
+
/**
|
|
4
|
+
* Format a "count" number into short "icon" or longer text string.
|
|
5
|
+
* For positive numbers only.
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatCount(count: number | undefined, numberFormat?: NumberFormat, labelFormat?: LabelFormat, locale?: string): string;
|