@internetarchive/collection-browser 1.1.1-alpha.5 → 1.2.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/dist/index.d.ts +9 -9
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/src/app-root.d.ts +1 -1
- package/dist/src/app-root.js +1 -1
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.d.ts +11 -13
- package/dist/src/collection-browser.js +16 -35
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facets-template.d.ts +1 -1
- package/dist/src/collection-facets/facets-template.js +3 -3
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +5 -5
- package/dist/src/collection-facets/more-facets-content.js +7 -7
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.js +3 -3
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.js +1 -1
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/src/collection-facets.d.ts +5 -5
- package/dist/src/collection-facets.js +10 -10
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/empty-placeholder.js +2 -2
- package/dist/src/empty-placeholder.js.map +1 -1
- package/dist/src/language-code-handler/language-code-handler.js +1 -1
- package/dist/src/language-code-handler/language-code-handler.js.map +1 -1
- package/dist/src/mediatype/mediatype-config.js +13 -13
- package/dist/src/mediatype/mediatype-config.js.map +1 -1
- package/dist/src/restoration-state-handler.d.ts +1 -1
- package/dist/src/restoration-state-handler.js +2 -2
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/sort-filter-bar/alpha-bar.d.ts +2 -2
- package/dist/src/sort-filter-bar/alpha-bar.js +1 -1
- package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +2 -2
- package/dist/src/sort-filter-bar/sort-filter-bar.js +9 -9
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/tiles/grid/account-tile.d.ts +3 -3
- package/dist/src/tiles/grid/account-tile.js +3 -3
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.d.ts +2 -2
- package/dist/src/tiles/grid/collection-tile.js +4 -4
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.d.ts +6 -6
- package/dist/src/tiles/grid/item-tile.js +8 -8
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
- package/dist/src/tiles/grid/tile-stats.js +6 -6
- package/dist/src/tiles/grid/tile-stats.js.map +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.d.ts +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
- package/dist/src/tiles/hover/tile-hover-pane.d.ts +2 -2
- package/dist/src/tiles/hover/tile-hover-pane.js +1 -1
- package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
- package/dist/src/tiles/image-block.d.ts +3 -3
- package/dist/src/tiles/image-block.js +2 -2
- package/dist/src/tiles/image-block.js.map +1 -1
- package/dist/src/tiles/item-image.d.ts +1 -1
- package/dist/src/tiles/item-image.js +1 -1
- package/dist/src/tiles/item-image.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.d.ts +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.d.ts +3 -3
- package/dist/src/tiles/list/tile-list-compact.js +6 -6
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.d.ts +3 -3
- package/dist/src/tiles/list/tile-list.js +8 -8
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/mediatype-icon.js +1 -1
- package/dist/src/tiles/mediatype-icon.js.map +1 -1
- package/dist/src/tiles/overlay/icon-overlay.js +2 -2
- package/dist/src/tiles/overlay/icon-overlay.js.map +1 -1
- package/dist/src/tiles/overlay/icon-text-overlay.js +2 -2
- package/dist/src/tiles/overlay/icon-text-overlay.js.map +1 -1
- package/dist/src/tiles/overlay/text-overlay.js +2 -2
- package/dist/src/tiles/overlay/text-overlay.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.d.ts +10 -11
- package/dist/src/tiles/tile-dispatcher.js +8 -14
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/utils/format-date.js +2 -3
- package/dist/src/utils/format-date.js.map +1 -1
- package/index.ts +9 -9
- package/package.json +13 -14
- package/src/app-root.ts +2 -2
- package/src/collection-browser.ts +16 -31
- package/src/collection-facets/facets-template.ts +3 -3
- package/src/collection-facets/more-facets-content.ts +7 -7
- package/src/collection-facets/more-facets-pagination.ts +3 -3
- package/src/collection-facets/toggle-switch.ts +1 -1
- package/src/collection-facets.ts +10 -10
- package/src/empty-placeholder.ts +2 -2
- package/src/language-code-handler/language-code-handler.ts +1 -1
- package/src/mediatype/mediatype-config.ts +13 -13
- package/src/restoration-state-handler.ts +2 -2
- package/src/sort-filter-bar/alpha-bar.ts +3 -3
- package/src/sort-filter-bar/sort-filter-bar.ts +10 -10
- package/src/tiles/grid/account-tile.ts +4 -4
- package/src/tiles/grid/collection-tile.ts +5 -5
- package/src/tiles/grid/item-tile.ts +10 -10
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +1 -1
- package/src/tiles/grid/tile-stats.ts +6 -6
- package/src/tiles/hover/hover-pane-controller.ts +1 -1
- package/src/tiles/hover/tile-hover-pane.ts +2 -2
- package/src/tiles/image-block.ts +3 -3
- package/src/tiles/item-image.ts +2 -2
- package/src/tiles/list/tile-list-compact-header.ts +2 -2
- package/src/tiles/list/tile-list-compact.ts +7 -7
- package/src/tiles/list/tile-list.ts +8 -8
- package/src/tiles/mediatype-icon.ts +1 -1
- package/src/tiles/overlay/icon-overlay.ts +2 -2
- package/src/tiles/overlay/icon-text-overlay.ts +2 -2
- package/src/tiles/overlay/text-overlay.ts +2 -2
- package/src/tiles/tile-dispatcher.ts +10 -13
- package/src/utils/format-date.ts +3 -3
package/src/empty-placeholder.ts
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
|
10
10
|
import { choose } from 'lit/directives/choose.js';
|
|
11
11
|
|
|
12
|
-
import emptyQueryIcon from './assets/img/icons/empty-query
|
|
13
|
-
import nullResultIcon from './assets/img/icons/null-result
|
|
12
|
+
import emptyQueryIcon from './assets/img/icons/empty-query';
|
|
13
|
+
import nullResultIcon from './assets/img/icons/null-result';
|
|
14
14
|
|
|
15
15
|
export type PlaceholderType =
|
|
16
16
|
| 'empty-query'
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { accountIcon } from '../assets/img/icons/mediatype/account
|
|
2
|
-
import { audioIcon } from '../assets/img/icons/mediatype/audio
|
|
3
|
-
import { collectionIcon } from '../assets/img/icons/mediatype/collection
|
|
4
|
-
import { dataIcon } from '../assets/img/icons/mediatype/data
|
|
5
|
-
import { etreeIcon } from '../assets/img/icons/mediatype/etree
|
|
6
|
-
import { imagesIcon } from '../assets/img/icons/mediatype/images
|
|
7
|
-
import { filmIcon } from '../assets/img/icons/mediatype/film
|
|
8
|
-
import { radioIcon } from '../assets/img/icons/mediatype/radio
|
|
9
|
-
import { softwareIcon } from '../assets/img/icons/mediatype/software
|
|
10
|
-
import { textsIcon } from '../assets/img/icons/mediatype/texts
|
|
11
|
-
import { tvIcon } from '../assets/img/icons/mediatype/tv
|
|
12
|
-
import { videoIcon } from '../assets/img/icons/mediatype/video
|
|
13
|
-
import { webIcon } from '../assets/img/icons/mediatype/web
|
|
1
|
+
import { accountIcon } from '../assets/img/icons/mediatype/account';
|
|
2
|
+
import { audioIcon } from '../assets/img/icons/mediatype/audio';
|
|
3
|
+
import { collectionIcon } from '../assets/img/icons/mediatype/collection';
|
|
4
|
+
import { dataIcon } from '../assets/img/icons/mediatype/data';
|
|
5
|
+
import { etreeIcon } from '../assets/img/icons/mediatype/etree';
|
|
6
|
+
import { imagesIcon } from '../assets/img/icons/mediatype/images';
|
|
7
|
+
import { filmIcon } from '../assets/img/icons/mediatype/film';
|
|
8
|
+
import { radioIcon } from '../assets/img/icons/mediatype/radio';
|
|
9
|
+
import { softwareIcon } from '../assets/img/icons/mediatype/software';
|
|
10
|
+
import { textsIcon } from '../assets/img/icons/mediatype/texts';
|
|
11
|
+
import { tvIcon } from '../assets/img/icons/mediatype/tv';
|
|
12
|
+
import { videoIcon } from '../assets/img/icons/mediatype/video';
|
|
13
|
+
import { webIcon } from '../assets/img/icons/mediatype/web';
|
|
14
14
|
|
|
15
15
|
export const mediatypeConfig: { [key: string]: any } = {
|
|
16
16
|
account: {
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
URLSortField,
|
|
18
18
|
getDefaultSelectedFacets,
|
|
19
19
|
MetadataFieldToURLField,
|
|
20
|
-
} from './models
|
|
21
|
-
import { arrayEquals } from './utils/array-equals
|
|
20
|
+
} from './models';
|
|
21
|
+
import { arrayEquals } from './utils/array-equals';
|
|
22
22
|
|
|
23
23
|
export interface RestorationState {
|
|
24
24
|
displayMode?: CollectionDisplayMode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LitElement, html, css, nothing, TemplateResult } from 'lit';
|
|
2
2
|
import { customElement, property, state, query } from 'lit/decorators.js';
|
|
3
|
-
import type { PrefixFilterCounts } from '../models
|
|
3
|
+
import type { PrefixFilterCounts } from '../models';
|
|
4
4
|
|
|
5
|
-
import './alpha-bar-tooltip
|
|
6
|
-
import type { AlphaBarTooltip } from './alpha-bar-tooltip
|
|
5
|
+
import './alpha-bar-tooltip';
|
|
6
|
+
import type { AlphaBarTooltip } from './alpha-bar-tooltip';
|
|
7
7
|
|
|
8
8
|
@customElement('alpha-bar')
|
|
9
9
|
export class AlphaBar extends LitElement {
|
|
@@ -21,16 +21,16 @@ import {
|
|
|
21
21
|
PrefixFilterType,
|
|
22
22
|
SortField,
|
|
23
23
|
SortFieldDisplayName,
|
|
24
|
-
} from '../models
|
|
25
|
-
import './alpha-bar
|
|
26
|
-
|
|
27
|
-
import { sortUpIcon } from './img/sort-toggle-up
|
|
28
|
-
import { sortDownIcon } from './img/sort-toggle-down
|
|
29
|
-
import { sortDisabledIcon } from './img/sort-toggle-disabled
|
|
30
|
-
import { tileIcon } from './img/tile
|
|
31
|
-
import { listIcon } from './img/list
|
|
32
|
-
import { compactIcon } from './img/compact
|
|
33
|
-
import { srOnlyStyle } from '../styles/sr-only
|
|
24
|
+
} from '../models';
|
|
25
|
+
import './alpha-bar';
|
|
26
|
+
|
|
27
|
+
import { sortUpIcon } from './img/sort-toggle-up';
|
|
28
|
+
import { sortDownIcon } from './img/sort-toggle-down';
|
|
29
|
+
import { sortDisabledIcon } from './img/sort-toggle-disabled';
|
|
30
|
+
import { tileIcon } from './img/tile';
|
|
31
|
+
import { listIcon } from './img/list';
|
|
32
|
+
import { compactIcon } from './img/compact';
|
|
33
|
+
import { srOnlyStyle } from '../styles/sr-only';
|
|
34
34
|
|
|
35
35
|
type AlphaSelector = 'creator' | 'title';
|
|
36
36
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { css, html, LitElement, nothing, TemplateResult } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
import type { TileModel } from '../../models
|
|
3
|
+
import type { TileModel } from '../../models';
|
|
4
4
|
|
|
5
|
-
import { baseTileStyles } from './styles/tile-grid-shared-styles
|
|
6
|
-
import '../image-block
|
|
7
|
-
import './tile-stats
|
|
5
|
+
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
6
|
+
import '../image-block';
|
|
7
|
+
import './tile-stats';
|
|
8
8
|
|
|
9
9
|
@customElement('account-tile')
|
|
10
10
|
export class AccountTile extends LitElement {
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
TemplateResult,
|
|
8
8
|
} from 'lit';
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
|
10
|
-
import { collectionIcon } from '../../assets/img/icons/mediatype/collection
|
|
11
|
-
import type { TileModel } from '../../models
|
|
12
|
-
import { formatUnitSize } from '../../utils/format-unit-size
|
|
13
|
-
import { baseTileStyles } from './styles/tile-grid-shared-styles
|
|
14
|
-
import '../image-block
|
|
10
|
+
import { collectionIcon } from '../../assets/img/icons/mediatype/collection';
|
|
11
|
+
import type { TileModel } from '../../models';
|
|
12
|
+
import { formatUnitSize } from '../../utils/format-unit-size';
|
|
13
|
+
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
14
|
+
import '../image-block';
|
|
15
15
|
|
|
16
16
|
@customElement('collection-tile')
|
|
17
17
|
export class CollectionTile extends LitElement {
|
|
@@ -11,16 +11,16 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
11
11
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
12
|
import type { SortParam } from '@internetarchive/search-service';
|
|
13
13
|
|
|
14
|
-
import { DateFormat, formatDate } from '../../utils/format-date
|
|
15
|
-
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc
|
|
16
|
-
import type { TileModel } from '../../models
|
|
17
|
-
|
|
18
|
-
import { baseTileStyles } from './styles/tile-grid-shared-styles
|
|
19
|
-
import '../image-block
|
|
20
|
-
import '../text-snippet-block
|
|
21
|
-
import '../item-image
|
|
22
|
-
import '../mediatype-icon
|
|
23
|
-
import './tile-stats
|
|
14
|
+
import { DateFormat, formatDate } from '../../utils/format-date';
|
|
15
|
+
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
|
|
16
|
+
import type { TileModel } from '../../models';
|
|
17
|
+
|
|
18
|
+
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
19
|
+
import '../image-block';
|
|
20
|
+
import '../text-snippet-block';
|
|
21
|
+
import '../item-image';
|
|
22
|
+
import '../mediatype-icon';
|
|
23
|
+
import './tile-stats';
|
|
24
24
|
|
|
25
25
|
@customElement('item-tile')
|
|
26
26
|
export class ItemTile extends LitElement {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { css, CSSResultGroup, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
|
|
4
|
-
import { favoriteFilledIcon } from '../../assets/img/icons/favorite-filled
|
|
5
|
-
import { reviewsIcon } from '../../assets/img/icons/reviews
|
|
6
|
-
import { uploadIcon } from '../../assets/img/icons/upload
|
|
7
|
-
import { viewsIcon } from '../../assets/img/icons/views
|
|
8
|
-
import { srOnlyStyle } from '../../styles/sr-only
|
|
4
|
+
import { favoriteFilledIcon } from '../../assets/img/icons/favorite-filled';
|
|
5
|
+
import { reviewsIcon } from '../../assets/img/icons/reviews';
|
|
6
|
+
import { uploadIcon } from '../../assets/img/icons/upload';
|
|
7
|
+
import { viewsIcon } from '../../assets/img/icons/views';
|
|
8
|
+
import { srOnlyStyle } from '../../styles/sr-only';
|
|
9
9
|
|
|
10
|
-
import { formatCount } from '../../utils/format-count
|
|
10
|
+
import { formatCount } from '../../utils/format-count';
|
|
11
11
|
|
|
12
12
|
@customElement('tile-stats')
|
|
13
13
|
export class TileStats extends LitElement {
|
|
@@ -2,8 +2,8 @@ import type { CollectionNameCacheInterface } from '@internetarchive/collection-n
|
|
|
2
2
|
import type { SortParam } from '@internetarchive/search-service';
|
|
3
3
|
import { css, CSSResultGroup, html, LitElement, TemplateResult } from 'lit';
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
-
import type { TileModel } from '../../models
|
|
6
|
-
import '../list/tile-list
|
|
5
|
+
import type { TileModel } from '../../models';
|
|
6
|
+
import '../list/tile-list';
|
|
7
7
|
|
|
8
8
|
@customElement('tile-hover-pane')
|
|
9
9
|
export class TileHoverPane extends LitElement {
|
package/src/tiles/image-block.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { css, CSSResultGroup, html, LitElement, nothing } from 'lit';
|
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import { ClassInfo, classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
5
|
-
import type { TileModel } from '../models
|
|
5
|
+
import type { TileModel } from '../models';
|
|
6
6
|
|
|
7
|
-
import './overlay/icon-overlay
|
|
8
|
-
import './overlay/text-overlay
|
|
7
|
+
import './overlay/icon-overlay';
|
|
8
|
+
import './overlay/text-overlay';
|
|
9
9
|
|
|
10
10
|
@customElement('image-block')
|
|
11
11
|
export class ImageBlock extends LitElement {
|
package/src/tiles/item-image.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { css, CSSResultGroup, html, LitElement, nothing } from 'lit';
|
|
|
2
2
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
3
3
|
import { ClassInfo, classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
5
|
-
import type { TileModel } from '../models
|
|
5
|
+
import type { TileModel } from '../models';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
baseItemImageStyles,
|
|
9
9
|
waveformGradientStyles,
|
|
10
|
-
} from '../styles/item-image-styles
|
|
10
|
+
} from '../styles/item-image-styles';
|
|
11
11
|
|
|
12
12
|
@customElement('item-image')
|
|
13
13
|
export class ItemImage extends LitElement {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import type { SortParam } from '@internetarchive/search-service';
|
|
4
|
-
import { dateLabel } from './date-label
|
|
5
|
-
import type { TileModel } from '../../models
|
|
4
|
+
import { dateLabel } from './date-label';
|
|
5
|
+
import type { TileModel } from '../../models';
|
|
6
6
|
|
|
7
7
|
@customElement('tile-list-compact-header')
|
|
8
8
|
export class TileListCompactHeader extends LitElement {
|
|
@@ -2,15 +2,15 @@ import { css, html, LitElement } from 'lit';
|
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import DOMPurify from 'dompurify';
|
|
4
4
|
import type { SortParam } from '@internetarchive/search-service';
|
|
5
|
-
import type { TileModel } from '../../models
|
|
5
|
+
import type { TileModel } from '../../models';
|
|
6
6
|
|
|
7
|
-
import { formatCount, NumberFormat } from '../../utils/format-count
|
|
8
|
-
import { formatDate, DateFormat } from '../../utils/format-date
|
|
9
|
-
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc
|
|
10
|
-
import { accountLabel } from './account-label
|
|
7
|
+
import { formatCount, NumberFormat } from '../../utils/format-count';
|
|
8
|
+
import { formatDate, DateFormat } from '../../utils/format-date';
|
|
9
|
+
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
|
|
10
|
+
import { accountLabel } from './account-label';
|
|
11
11
|
|
|
12
|
-
import '../image-block
|
|
13
|
-
import '../mediatype-icon
|
|
12
|
+
import '../image-block';
|
|
13
|
+
import '../mediatype-icon';
|
|
14
14
|
|
|
15
15
|
@customElement('tile-list-compact')
|
|
16
16
|
export class TileListCompact extends LitElement {
|
|
@@ -15,16 +15,16 @@ import DOMPurify from 'dompurify';
|
|
|
15
15
|
|
|
16
16
|
import type { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
|
|
17
17
|
import type { SortParam } from '@internetarchive/search-service';
|
|
18
|
-
import { suppressedCollections, TileModel } from '../../models
|
|
18
|
+
import { suppressedCollections, TileModel } from '../../models';
|
|
19
19
|
|
|
20
|
-
import { dateLabel } from './date-label
|
|
21
|
-
import { accountLabel } from './account-label
|
|
22
|
-
import { formatCount, NumberFormat } from '../../utils/format-count
|
|
23
|
-
import { formatDate, DateFormat } from '../../utils/format-date
|
|
24
|
-
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc
|
|
20
|
+
import { dateLabel } from './date-label';
|
|
21
|
+
import { accountLabel } from './account-label';
|
|
22
|
+
import { formatCount, NumberFormat } from '../../utils/format-count';
|
|
23
|
+
import { formatDate, DateFormat } from '../../utils/format-date';
|
|
24
|
+
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
|
|
25
25
|
|
|
26
|
-
import '../image-block
|
|
27
|
-
import '../mediatype-icon
|
|
26
|
+
import '../image-block';
|
|
27
|
+
import '../mediatype-icon';
|
|
28
28
|
|
|
29
29
|
@customElement('tile-list')
|
|
30
30
|
export class TileList extends LitElement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, CSSResultGroup, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
|
|
4
|
-
import { mediatypeConfig } from '../mediatype/mediatype-config
|
|
4
|
+
import { mediatypeConfig } from '../mediatype/mediatype-config';
|
|
5
5
|
|
|
6
6
|
@customElement('mediatype-icon')
|
|
7
7
|
export class MediatypeIcon extends LitElement {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css, CSSResultGroup, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
|
|
4
|
-
import { restrictedIcon } from '../../assets/img/icons/restricted
|
|
5
|
-
import { loginRequiredIcon } from '../../assets/img/icons/login-required
|
|
4
|
+
import { restrictedIcon } from '../../assets/img/icons/restricted';
|
|
5
|
+
import { loginRequiredIcon } from '../../assets/img/icons/login-required';
|
|
6
6
|
|
|
7
7
|
@customElement('icon-overlay')
|
|
8
8
|
export class IconOverlay extends LitElement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, CSSResultGroup, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
import { loginRequiredIcon } from '../../assets/img/icons/login-required
|
|
4
|
-
import { restrictedIcon } from '../../assets/img/icons/restricted
|
|
3
|
+
import { loginRequiredIcon } from '../../assets/img/icons/login-required';
|
|
4
|
+
import { restrictedIcon } from '../../assets/img/icons/restricted';
|
|
5
5
|
|
|
6
6
|
@customElement('icon-text-overlay')
|
|
7
7
|
export class IconTextOverlay extends LitElement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, CSSResultGroup, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
import { loginRequiredIcon } from '../../assets/img/icons/login-required
|
|
4
|
-
import { restrictedIcon } from '../../assets/img/icons/restricted
|
|
3
|
+
import { loginRequiredIcon } from '../../assets/img/icons/login-required';
|
|
4
|
+
import { restrictedIcon } from '../../assets/img/icons/restricted';
|
|
5
5
|
|
|
6
6
|
@customElement('text-overlay')
|
|
7
7
|
export class TextOverlay extends LitElement {
|
|
@@ -7,21 +7,21 @@ import type {
|
|
|
7
7
|
} from '@internetarchive/shared-resize-observer';
|
|
8
8
|
import type { CollectionNameCacheInterface } from '@internetarchive/collection-name-cache';
|
|
9
9
|
import type { SortParam } from '@internetarchive/search-service';
|
|
10
|
-
import type { TileDisplayMode, TileModel } from '../models
|
|
11
|
-
import './grid/collection-tile
|
|
12
|
-
import './grid/item-tile
|
|
13
|
-
import './grid/account-tile
|
|
14
|
-
import './hover/tile-hover-pane
|
|
15
|
-
import './list/tile-list
|
|
16
|
-
import './list/tile-list-compact
|
|
17
|
-
import './list/tile-list-compact-header
|
|
18
|
-
import type { TileHoverPane } from './hover/tile-hover-pane
|
|
10
|
+
import type { TileDisplayMode, TileModel } from '../models';
|
|
11
|
+
import './grid/collection-tile';
|
|
12
|
+
import './grid/item-tile';
|
|
13
|
+
import './grid/account-tile';
|
|
14
|
+
import './hover/tile-hover-pane';
|
|
15
|
+
import './list/tile-list';
|
|
16
|
+
import './list/tile-list-compact';
|
|
17
|
+
import './list/tile-list-compact-header';
|
|
18
|
+
import type { TileHoverPane } from './hover/tile-hover-pane';
|
|
19
19
|
import {
|
|
20
20
|
HoverPaneController,
|
|
21
21
|
HoverPaneControllerInterface,
|
|
22
22
|
HoverPaneProperties,
|
|
23
23
|
HoverPaneProviderInterface,
|
|
24
|
-
} from './hover/hover-pane-controller
|
|
24
|
+
} from './hover/hover-pane-controller';
|
|
25
25
|
|
|
26
26
|
@customElement('tile-dispatcher')
|
|
27
27
|
export class TileDispatcher
|
|
@@ -56,8 +56,6 @@ export class TileDispatcher
|
|
|
56
56
|
/** Whether this tile should include a hover pane at all (for applicable tile modes) */
|
|
57
57
|
@property({ type: Boolean }) enableHoverPane = false;
|
|
58
58
|
|
|
59
|
-
@property({ type: Boolean }) prerender = false;
|
|
60
|
-
|
|
61
59
|
private hoverPaneController?: HoverPaneControllerInterface;
|
|
62
60
|
|
|
63
61
|
@query('#container')
|
|
@@ -160,7 +158,6 @@ export class TileDispatcher
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
private get isHoverEnabled(): boolean {
|
|
163
|
-
if (this.prerender) return false;
|
|
164
161
|
return window.matchMedia('(hover: hover)').matches;
|
|
165
162
|
}
|
|
166
163
|
|
package/src/utils/format-date.ts
CHANGED
|
@@ -15,9 +15,9 @@ export function formatDate(
|
|
|
15
15
|
// Return blank if undefined
|
|
16
16
|
if (!date) return '';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
// the date is already in UTC timezone so we should not add timeZone here again.
|
|
19
|
+
const options: Intl.DateTimeFormatOptions = {};
|
|
20
|
+
|
|
21
21
|
switch (format) {
|
|
22
22
|
case 'year-only':
|
|
23
23
|
options.year = 'numeric';
|