@internetarchive/collection-browser 3.2.0 → 3.3.1-alpha1
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 +27 -27
- 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/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/collection-browser.d.ts +4 -0
- package/dist/src/collection-browser.js +702 -682
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.js +118 -118
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets.js +266 -266
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
- package/dist/src/data-source/models.js.map +1 -1
- package/dist/src/tiles/base-tile-component.d.ts +7 -0
- package/dist/src/tiles/base-tile-component.js +13 -0
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/account-tile.js +37 -36
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +78 -77
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.d.ts +1 -1
- package/dist/src/tiles/grid/item-tile.js +139 -140
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +100 -98
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +300 -300
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +204 -200
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/utils/format-date.d.ts +15 -1
- package/dist/src/utils/format-date.js +8 -3
- package/dist/src/utils/format-date.js.map +1 -1
- package/dist/test/collection-browser.test.js +189 -189
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/tiles/grid/item-tile.test.js +115 -64
- package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list-compact.test.js +108 -57
- package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +164 -113
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/dist/test/utils/format-date.test.js +31 -1
- package/dist/test/utils/format-date.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +117 -117
- package/renovate.json +6 -6
- package/src/collection-browser.ts +2829 -2804
- package/src/collection-facets/more-facets-content.ts +639 -639
- package/src/collection-facets.ts +995 -995
- package/src/data-source/collection-browser-data-source.ts +1401 -1401
- package/src/data-source/collection-browser-query-state.ts +65 -65
- package/src/data-source/models.ts +43 -43
- package/src/tiles/base-tile-component.ts +65 -53
- package/src/tiles/grid/account-tile.ts +113 -112
- package/src/tiles/grid/collection-tile.ts +163 -162
- package/src/tiles/grid/item-tile.ts +340 -339
- package/src/tiles/list/tile-list-compact.ts +239 -236
- package/src/tiles/list/tile-list.ts +700 -696
- package/src/tiles/tile-dispatcher.ts +490 -486
- package/src/utils/format-date.ts +62 -42
- package/test/collection-browser.test.ts +2403 -2403
- package/test/tiles/grid/item-tile.test.ts +520 -464
- package/test/tiles/list/tile-list-compact.test.ts +282 -228
- package/test/tiles/list/tile-list.test.ts +552 -497
- package/test/utils/format-date.test.ts +89 -39
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-tile.js","sourceRoot":"","sources":["../../../../src/tiles/grid/account-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE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CACF,CAAA;AArF8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDAAwB;AAjBzC,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAsGvB","sourcesContent":["import { css, html, nothing, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { msg } from '@lit/localize';\nimport { BaseTileComponent } from '../base-tile-component';\n\nimport { baseTileStyles } from './styles/tile-grid-shared-styles';\nimport '../image-block';\nimport './tile-stats';\n\n@customElement('account-tile')\nexport class AccountTile extends BaseTileComponent {\n /*\n * Reactive properties inherited from BaseTileComponent:\n * - model?: TileModel;\n * - currentWidth?: number;\n * - currentHeight?: number;\n * - baseNavigationUrl?: string;\n * - baseImageUrl?: string;\n * - collectionPagePath?: string;\n * - sortParam: SortParam | null = null;\n * - creatorFilter?: string;\n * - mobileBreakpoint?: number;\n * - loggedIn = false;\n * - suppressBlurring = false;\n * - useLocalTime = false;\n */\n\n @property({ type: Boolean }) showInfoButton = false;\n\n render() {\n return html`\n <div class=\"container\">\n ${this.infoButtonTemplate}\n <div class=\"tile-details\">\n <div class=\"item-info\">\n ${this.getAvatarTemplate} ${this.getTitleTemplate}\n ${this.getArchivistTemplate}\n </div>\n ${this.getTileStatsTemplate}\n </div>\n </div>\n `;\n }\n\n private get getAvatarTemplate(): TemplateResult {\n return html`\n <image-block\n .model=${this.model}\n .baseImageUrl=${this.baseImageUrl}\n .viewSize=${'grid'}\n .suppressBlurring=${this.suppressBlurring}\n >\n </image-block>\n `;\n }\n\n private get getTitleTemplate() {\n return html`<div id=\"title\">\n <h4 class=\"truncated\">${this.model?.identifier}</h4>\n </div>`;\n }\n\n private get getArchivistTemplate() {\n return html`<div class=\"archivist-since\">\n <span>${this.displayValueProvider.accountLabel}</span>\n </div>`;\n }\n\n private get getTileStatsTemplate() {\n return html`<tile-stats\n .mediatype=${this.model?.mediatype}\n .itemCount=${this.model?.itemCount}\n .favCount=${this.model?.favCount}\n .commentCount=${this.model?.commentCount}\n >\n </tile-stats>`;\n }\n\n private get infoButtonTemplate(): TemplateResult | typeof nothing {\n // ⓘ is an information icon\n return this.showInfoButton\n ? html`<button class=\"info-button\" @click=${this.infoButtonPressed}>\n ⓘ\n <span class=\"sr-only\">${msg('More info')}</span>\n </button>`\n : nothing;\n }\n\n private infoButtonPressed(e: PointerEvent) {\n e.preventDefault();\n const event = new CustomEvent<{ x: number; y: number }>(\n 'infoButtonPressed',\n { detail: { x: e.clientX, y: e.clientY } },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * CSS\n */\n static get styles() {\n const tileBorderColor = css`var(--tileBorderColor, #dddddd)`;\n\n return [\n baseTileStyles,\n css`\n .container {\n border: 1px solid ${tileBorderColor};\n }\n `,\n ];\n }\n}\n"]}
|
|
@@ -22,57 +22,58 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
22
22
|
* - mobileBreakpoint?: number;
|
|
23
23
|
* - loggedIn = false;
|
|
24
24
|
* - suppressBlurring = false;
|
|
25
|
+
* - useLocalTime = false;
|
|
25
26
|
*/
|
|
26
27
|
super(...arguments);
|
|
27
28
|
this.showInfoButton = false;
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return html `
|
|
31
|
-
<div class="container">
|
|
32
|
-
${this.infoButtonTemplate}
|
|
33
|
-
<div class="tile-details">
|
|
34
|
-
<div class="item-info">
|
|
35
|
-
${this.getImageBlockTemplate} ${this.getTitleTemplate}
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
${this.getTileStatsTemplate}
|
|
40
|
-
</div>
|
|
31
|
+
return html `
|
|
32
|
+
<div class="container">
|
|
33
|
+
${this.infoButtonTemplate}
|
|
34
|
+
<div class="tile-details">
|
|
35
|
+
<div class="item-info">
|
|
36
|
+
${this.getImageBlockTemplate} ${this.getTitleTemplate}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
${this.getTileStatsTemplate}
|
|
41
|
+
</div>
|
|
41
42
|
`;
|
|
42
43
|
}
|
|
43
44
|
get getImageBlockTemplate() {
|
|
44
|
-
return html `
|
|
45
|
-
<image-block
|
|
46
|
-
.model=${this.model}
|
|
47
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
48
|
-
.viewSize=${'grid'}
|
|
49
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
50
|
-
>
|
|
51
|
-
</image-block>
|
|
45
|
+
return html `
|
|
46
|
+
<image-block
|
|
47
|
+
.model=${this.model}
|
|
48
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
49
|
+
.viewSize=${'grid'}
|
|
50
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
51
|
+
>
|
|
52
|
+
</image-block>
|
|
52
53
|
`;
|
|
53
54
|
}
|
|
54
55
|
get getTitleTemplate() {
|
|
55
56
|
var _a;
|
|
56
|
-
return html `<div id="title">
|
|
57
|
-
<h3 class="truncated">${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}</h3>
|
|
57
|
+
return html `<div id="title">
|
|
58
|
+
<h3 class="truncated">${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}</h3>
|
|
58
59
|
</div>`;
|
|
59
60
|
}
|
|
60
61
|
get getTileStatsTemplate() {
|
|
61
|
-
return html `
|
|
62
|
-
<div id="item-stats">
|
|
63
|
-
<div id="item-mediatype">${collectionIcon}</div>
|
|
64
|
-
|
|
65
|
-
<div id="stats-row">
|
|
66
|
-
${this.getItemsTemplate} ${this.getSizeTemplate}
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
62
|
+
return html `
|
|
63
|
+
<div id="item-stats">
|
|
64
|
+
<div id="item-mediatype">${collectionIcon}</div>
|
|
65
|
+
|
|
66
|
+
<div id="stats-row">
|
|
67
|
+
${this.getItemsTemplate} ${this.getSizeTemplate}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
69
70
|
`;
|
|
70
71
|
}
|
|
71
72
|
get getItemsTemplate() {
|
|
72
73
|
var _a, _b;
|
|
73
74
|
const collectionItems = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.itemCount) === null || _b === void 0 ? void 0 : _b.toLocaleString();
|
|
74
|
-
return html `<span id="item-count"
|
|
75
|
-
>${collectionItems} item${Number(collectionItems) !== 1 ? 's' : ''}</span
|
|
75
|
+
return html `<span id="item-count"
|
|
76
|
+
>${collectionItems} item${Number(collectionItems) !== 1 ? 's' : ''}</span
|
|
76
77
|
>`;
|
|
77
78
|
}
|
|
78
79
|
get getSizeTemplate() {
|
|
@@ -85,9 +86,9 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
85
86
|
get infoButtonTemplate() {
|
|
86
87
|
// ⓘ is an information icon
|
|
87
88
|
return this.showInfoButton
|
|
88
|
-
? html `<button class="info-button" @click=${this.infoButtonPressed}>
|
|
89
|
-
ⓘ
|
|
90
|
-
<span class="sr-only">${msg('More info')}</span>
|
|
89
|
+
? html `<button class="info-button" @click=${this.infoButtonPressed}>
|
|
90
|
+
ⓘ
|
|
91
|
+
<span class="sr-only">${msg('More info')}</span>
|
|
91
92
|
</button>`
|
|
92
93
|
: nothing;
|
|
93
94
|
}
|
|
@@ -102,49 +103,49 @@ let CollectionTile = class CollectionTile extends BaseTileComponent {
|
|
|
102
103
|
const whiteColor = css `#fff`;
|
|
103
104
|
return [
|
|
104
105
|
baseTileStyles,
|
|
105
|
-
css `
|
|
106
|
-
.container {
|
|
107
|
-
background-color: ${tileBackgroundColor};
|
|
108
|
-
border: 1px solid ${tileBorderColor};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.item-info {
|
|
112
|
-
flex-grow: initial;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
h4.truncated,
|
|
116
|
-
h3.truncated {
|
|
117
|
-
color: ${whiteColor};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
#item-mediatype svg {
|
|
121
|
-
filter: invert(100%);
|
|
122
|
-
height: 2.5rem;
|
|
123
|
-
align-items: baseline;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.container:hover > #title {
|
|
127
|
-
text-decoration: underline;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* this is a workaround for Safari 15 where the hover effects are not working */
|
|
131
|
-
image-block:hover > #title {
|
|
132
|
-
text-decoration: underline;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
#item-stats {
|
|
136
|
-
display: flex;
|
|
137
|
-
padding: 0 5px 5px;
|
|
138
|
-
align-items: center;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
#stats-row {
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: baseline;
|
|
144
|
-
color: ${whiteColor};
|
|
145
|
-
flex-direction: column;
|
|
146
|
-
margin-left: 10px;
|
|
147
|
-
}
|
|
106
|
+
css `
|
|
107
|
+
.container {
|
|
108
|
+
background-color: ${tileBackgroundColor};
|
|
109
|
+
border: 1px solid ${tileBorderColor};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.item-info {
|
|
113
|
+
flex-grow: initial;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
h4.truncated,
|
|
117
|
+
h3.truncated {
|
|
118
|
+
color: ${whiteColor};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
#item-mediatype svg {
|
|
122
|
+
filter: invert(100%);
|
|
123
|
+
height: 2.5rem;
|
|
124
|
+
align-items: baseline;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.container:hover > #title {
|
|
128
|
+
text-decoration: underline;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* this is a workaround for Safari 15 where the hover effects are not working */
|
|
132
|
+
image-block:hover > #title {
|
|
133
|
+
text-decoration: underline;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#item-stats {
|
|
137
|
+
display: flex;
|
|
138
|
+
padding: 0 5px 5px;
|
|
139
|
+
align-items: center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#stats-row {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: baseline;
|
|
145
|
+
color: ${whiteColor};
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
margin-left: 10px;
|
|
148
|
+
}
|
|
148
149
|
`,
|
|
149
150
|
];
|
|
150
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-tile.js","sourceRoot":"","sources":["../../../../src/tiles/grid/collection-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,gBAAgB,CAAC;AAGjB,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,iBAAiB;IAA9C;QACL
|
|
1
|
+
{"version":3,"file":"collection-tile.js","sourceRoot":"","sources":["../../../../src/tiles/grid/collection-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OA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,CAAC,cAAc,EAAE,CAAC,CAAC,SAAS;YACxE,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IAED,IAAY,kBAAkB;QAC5B,iCAAiC;QACjC,OAAO,IAAI,CAAC,cAAc;YACxB,CAAC,CAAC,IAAI,CAAA,sCAAsC,IAAI,CAAC,iBAAiB;;kCAEtC,GAAG,CAAC,WAAW,CAAC;kBAChC;YACZ,CAAC,CAAC,OAAO,CAAC;IACd,CAAC;IAEO,iBAAiB,CAAC,CAAe;QACvC,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,KAAK,GAAG,IAAI,WAAW,CAC3B,mBAAmB,EACnB,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAC3C,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,KAAK,MAAM;QACf,MAAM,eAAe,GAAG,GAAG,CAAA,iCAAiC,CAAC;QAC7D,MAAM,mBAAmB,GAAG,GAAG,CAAA,qCAAqC,CAAC;QACrE,MAAM,UAAU,GAAG,GAAG,CAAA,MAAM,CAAC;QAE7B,OAAO;YACL,cAAc;YACd,GAAG,CAAA;;8BAEqB,mBAAmB;8BACnB,eAAe;;;;;;;;;mBAS1B,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BV,UAAU;;;;OAItB;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAvI8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDAAwB;AAjBzC,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAwJ1B","sourcesContent":["import { css, CSSResultGroup, html, nothing, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { msg } from '@lit/localize';\nimport { collectionIcon } from '../../assets/img/icons/mediatype/collection';\nimport { formatUnitSize } from '../../utils/format-unit-size';\nimport { baseTileStyles } from './styles/tile-grid-shared-styles';\nimport { BaseTileComponent } from '../base-tile-component';\nimport '../image-block';\n\n@customElement('collection-tile')\nexport class CollectionTile extends BaseTileComponent {\n /*\n * Reactive properties inherited from BaseTileComponent:\n * - model?: TileModel;\n * - currentWidth?: number;\n * - currentHeight?: number;\n * - baseNavigationUrl?: string;\n * - baseImageUrl?: string;\n * - collectionPagePath?: string;\n * - sortParam: SortParam | null = null;\n * - creatorFilter?: string;\n * - mobileBreakpoint?: number;\n * - loggedIn = false;\n * - suppressBlurring = false;\n * - useLocalTime = false;\n */\n\n @property({ type: Boolean }) showInfoButton = false;\n\n render() {\n return html`\n <div class=\"container\">\n ${this.infoButtonTemplate}\n <div class=\"tile-details\">\n <div class=\"item-info\">\n ${this.getImageBlockTemplate} ${this.getTitleTemplate}\n </div>\n </div>\n\n ${this.getTileStatsTemplate}\n </div>\n `;\n }\n\n private get getImageBlockTemplate(): TemplateResult {\n return html`\n <image-block\n .model=${this.model}\n .baseImageUrl=${this.baseImageUrl}\n .viewSize=${'grid'}\n .suppressBlurring=${this.suppressBlurring}\n >\n </image-block>\n `;\n }\n\n private get getTitleTemplate() {\n return html`<div id=\"title\">\n <h3 class=\"truncated\">${this.model?.title}</h3>\n </div>`;\n }\n\n private get getTileStatsTemplate() {\n return html`\n <div id=\"item-stats\">\n <div id=\"item-mediatype\">${collectionIcon}</div>\n\n <div id=\"stats-row\">\n ${this.getItemsTemplate} ${this.getSizeTemplate}\n </div>\n </div>\n `;\n }\n\n private get getItemsTemplate() {\n const collectionItems = this.model?.itemCount?.toLocaleString();\n\n return html`<span id=\"item-count\"\n >${collectionItems} item${Number(collectionItems) !== 1 ? 's' : ''}</span\n >`;\n }\n\n private get getSizeTemplate() {\n const collectionSize = this.model?.collectionSize ?? 0;\n\n return collectionSize\n ? html`<span id=\"item-size\">${formatUnitSize(collectionSize, 1)}</span>`\n : ``;\n }\n\n private get infoButtonTemplate(): TemplateResult | typeof nothing {\n // ⓘ is an information icon\n return this.showInfoButton\n ? html`<button class=\"info-button\" @click=${this.infoButtonPressed}>\n ⓘ\n <span class=\"sr-only\">${msg('More info')}</span>\n </button>`\n : nothing;\n }\n\n private infoButtonPressed(e: PointerEvent) {\n e.preventDefault();\n const event = new CustomEvent<{ x: number; y: number }>(\n 'infoButtonPressed',\n { detail: { x: e.clientX, y: e.clientY } },\n );\n this.dispatchEvent(event);\n }\n\n static get styles(): CSSResultGroup {\n const tileBorderColor = css`var(--tileBorderColor, #555555)`;\n const tileBackgroundColor = css`var(--tileBackgroundColor, #666666)`;\n const whiteColor = css`#fff`;\n\n return [\n baseTileStyles,\n css`\n .container {\n background-color: ${tileBackgroundColor};\n border: 1px solid ${tileBorderColor};\n }\n\n .item-info {\n flex-grow: initial;\n }\n\n h4.truncated,\n h3.truncated {\n color: ${whiteColor};\n }\n\n #item-mediatype svg {\n filter: invert(100%);\n height: 2.5rem;\n align-items: baseline;\n }\n\n .container:hover > #title {\n text-decoration: underline;\n }\n\n /* this is a workaround for Safari 15 where the hover effects are not working */\n image-block:hover > #title {\n text-decoration: underline;\n }\n\n #item-stats {\n display: flex;\n padding: 0 5px 5px;\n align-items: center;\n }\n\n #stats-row {\n display: flex;\n align-items: baseline;\n color: ${whiteColor};\n flex-direction: column;\n margin-left: 10px;\n }\n `,\n ];\n }\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
2
|
import { BaseTileComponent } from '../base-tile-component';
|
|
3
|
+
import { SimpleLayoutType } from '../models';
|
|
3
4
|
import '../image-block';
|
|
4
5
|
import '../review-block';
|
|
5
6
|
import '../text-snippet-block';
|
|
6
7
|
import '../item-image';
|
|
7
8
|
import '../tile-mediatype-icon';
|
|
8
9
|
import './tile-stats';
|
|
9
|
-
import { SimpleLayoutType } from '../models';
|
|
10
10
|
export declare class ItemTile extends BaseTileComponent {
|
|
11
11
|
showInfoButton: boolean;
|
|
12
12
|
showTvClips: boolean;
|
|
@@ -5,7 +5,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
5
5
|
import { map } from 'lit/directives/map.js';
|
|
6
6
|
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { msg } from '@lit/localize';
|
|
8
|
-
import { formatDate } from '../../utils/format-date';
|
|
9
8
|
import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
|
|
10
9
|
import { BaseTileComponent } from '../base-tile-component';
|
|
11
10
|
import { baseTileStyles } from './styles/tile-grid-shared-styles';
|
|
@@ -31,6 +30,7 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
31
30
|
* - mobileBreakpoint?: number;
|
|
32
31
|
* - loggedIn = false;
|
|
33
32
|
* - suppressBlurring = false;
|
|
33
|
+
* - useLocalTime = false;
|
|
34
34
|
*/
|
|
35
35
|
super(...arguments);
|
|
36
36
|
this.showInfoButton = false;
|
|
@@ -46,30 +46,30 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
46
46
|
'stats-only': this.simpleLayoutType === 'stats-only',
|
|
47
47
|
'snippets-only': this.simpleLayoutType === 'snippets-only',
|
|
48
48
|
});
|
|
49
|
-
return html `
|
|
50
|
-
<div class=${containerClasses}>
|
|
51
|
-
${this.infoButtonTemplate}
|
|
52
|
-
<div class="tile-details">
|
|
53
|
-
<div class="item-info">
|
|
54
|
-
${this.imageBlockTemplate}
|
|
55
|
-
|
|
56
|
-
<div id="title">
|
|
57
|
-
<h3 class="truncated" title=${ifDefined(itemTitle)}>
|
|
58
|
-
${itemTitle}
|
|
59
|
-
</h3>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
${this.volumeIssueTemplate}
|
|
49
|
+
return html `
|
|
50
|
+
<div class=${containerClasses}>
|
|
51
|
+
${this.infoButtonTemplate}
|
|
52
|
+
<div class="tile-details">
|
|
53
|
+
<div class="item-info">
|
|
54
|
+
${this.imageBlockTemplate}
|
|
55
|
+
|
|
56
|
+
<div id="title">
|
|
57
|
+
<h3 class="truncated" title=${ifDefined(itemTitle)}>
|
|
58
|
+
${itemTitle}
|
|
59
|
+
</h3>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
${this.volumeIssueTemplate}
|
|
63
63
|
${this.isSortedByDate
|
|
64
64
|
? this.sortedDateInfoTemplate
|
|
65
|
-
: this.creatorTemplate}
|
|
66
|
-
${this.webArchivesCaptureDatesTemplate} ${this.textSnippetsTemplate}
|
|
67
|
-
${this.reviewBlockTemplate}
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
${this.tileStatsTemplate}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
65
|
+
: this.creatorTemplate}
|
|
66
|
+
${this.webArchivesCaptureDatesTemplate} ${this.textSnippetsTemplate}
|
|
67
|
+
${this.reviewBlockTemplate}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
${this.tileStatsTemplate}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
@@ -79,26 +79,26 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
79
79
|
const displayedCreator = this.displayValueProvider.firstCreatorMatchingFilter;
|
|
80
80
|
if (!displayedCreator)
|
|
81
81
|
return nothing;
|
|
82
|
-
return html `
|
|
83
|
-
<div class="created-by">
|
|
84
|
-
<span class="truncated" title=${displayedCreator}>
|
|
85
|
-
by ${displayedCreator}
|
|
86
|
-
</span>
|
|
87
|
-
</div>
|
|
82
|
+
return html `
|
|
83
|
+
<div class="created-by">
|
|
84
|
+
<span class="truncated" title=${displayedCreator}>
|
|
85
|
+
by ${displayedCreator}
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
88
|
`;
|
|
89
89
|
}
|
|
90
90
|
get imageBlockTemplate() {
|
|
91
|
-
return html `
|
|
92
|
-
<image-block
|
|
93
|
-
.model=${this.model}
|
|
94
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
95
|
-
.loggedIn=${this.loggedIn}
|
|
96
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
97
|
-
.isCompactTile=${false}
|
|
98
|
-
.isListTile=${false}
|
|
99
|
-
.viewSize=${'grid'}
|
|
100
|
-
>
|
|
101
|
-
</image-block>
|
|
91
|
+
return html `
|
|
92
|
+
<image-block
|
|
93
|
+
.model=${this.model}
|
|
94
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
95
|
+
.loggedIn=${this.loggedIn}
|
|
96
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
97
|
+
.isCompactTile=${false}
|
|
98
|
+
.isListTile=${false}
|
|
99
|
+
.viewSize=${'grid'}
|
|
100
|
+
>
|
|
101
|
+
</image-block>
|
|
102
102
|
`;
|
|
103
103
|
}
|
|
104
104
|
get sortedDateInfoTemplate() {
|
|
@@ -129,20 +129,19 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
129
129
|
if (!(sortedValue === null || sortedValue === void 0 ? void 0 : sortedValue.value)) {
|
|
130
130
|
return nothing;
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
</div>
|
|
132
|
+
const formattedDate = this.getFormattedDate(sortedValue.value, format);
|
|
133
|
+
return html `
|
|
134
|
+
<div class="date-sorted-by truncated">
|
|
135
|
+
<span>${sortedValue.field} ${formattedDate}</span>
|
|
136
|
+
</div>
|
|
138
137
|
`;
|
|
139
138
|
}
|
|
140
139
|
get infoButtonTemplate() {
|
|
141
140
|
// ⓘ is an information icon
|
|
142
141
|
return this.showInfoButton
|
|
143
|
-
? html `<button class="info-button" @click=${this.infoButtonPressed}>
|
|
144
|
-
ⓘ
|
|
145
|
-
<span class="sr-only">${msg('More info')}</span>
|
|
142
|
+
? html `<button class="info-button" @click=${this.infoButtonPressed}>
|
|
143
|
+
ⓘ
|
|
144
|
+
<span class="sr-only">${msg('More info')}</span>
|
|
146
145
|
</button>`
|
|
147
146
|
: nothing;
|
|
148
147
|
}
|
|
@@ -151,47 +150,47 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
151
150
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
|
|
152
151
|
return nothing;
|
|
153
152
|
const { reviewtitle, reviewbody, stars } = this.model.review;
|
|
154
|
-
return html `
|
|
155
|
-
<review-block
|
|
156
|
-
viewsize="grid"
|
|
157
|
-
title=${ifDefined(reviewtitle)}
|
|
158
|
-
body=${ifDefined(reviewbody)}
|
|
159
|
-
starRating=${ifDefined(stars)}
|
|
160
|
-
>
|
|
161
|
-
</review-block>
|
|
153
|
+
return html `
|
|
154
|
+
<review-block
|
|
155
|
+
viewsize="grid"
|
|
156
|
+
title=${ifDefined(reviewtitle)}
|
|
157
|
+
body=${ifDefined(reviewbody)}
|
|
158
|
+
starRating=${ifDefined(stars)}
|
|
159
|
+
>
|
|
160
|
+
</review-block>
|
|
162
161
|
`;
|
|
163
162
|
}
|
|
164
163
|
get textSnippetsTemplate() {
|
|
165
164
|
var _a;
|
|
166
165
|
if (!this.hasSnippets || this.simpleLayoutType === 'stats-only')
|
|
167
166
|
return nothing;
|
|
168
|
-
return html `
|
|
169
|
-
<text-snippet-block viewsize="grid" .snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}>
|
|
170
|
-
</text-snippet-block>
|
|
167
|
+
return html `
|
|
168
|
+
<text-snippet-block viewsize="grid" .snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}>
|
|
169
|
+
</text-snippet-block>
|
|
171
170
|
`;
|
|
172
171
|
}
|
|
173
172
|
get volumeIssueTemplate() {
|
|
174
173
|
var _a, _b, _c, _d;
|
|
175
174
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.volume) || !((_b = this.model) === null || _b === void 0 ? void 0 : _b.issue))
|
|
176
175
|
return nothing;
|
|
177
|
-
return html `
|
|
178
|
-
<div class="volume-issue">
|
|
179
|
-
<span class="truncated" title="volume|issue">
|
|
180
|
-
Volume ${(_c = this.model) === null || _c === void 0 ? void 0 : _c.volume}, Issue ${(_d = this.model) === null || _d === void 0 ? void 0 : _d.issue}
|
|
181
|
-
</span>
|
|
182
|
-
</div>
|
|
176
|
+
return html `
|
|
177
|
+
<div class="volume-issue">
|
|
178
|
+
<span class="truncated" title="volume|issue">
|
|
179
|
+
Volume ${(_c = this.model) === null || _c === void 0 ? void 0 : _c.volume}, Issue ${(_d = this.model) === null || _d === void 0 ? void 0 : _d.issue}
|
|
180
|
+
</span>
|
|
181
|
+
</div>
|
|
183
182
|
`;
|
|
184
183
|
}
|
|
185
184
|
get webArchivesCaptureDatesTemplate() {
|
|
186
185
|
var _a;
|
|
187
186
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
|
|
188
187
|
return nothing;
|
|
189
|
-
return html `
|
|
190
|
-
<ul class="capture-dates">
|
|
191
|
-
${map(this.model.captureDates, date => html `<li>
|
|
192
|
-
${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
|
|
193
|
-
</li>`)}
|
|
194
|
-
</ul>
|
|
188
|
+
return html `
|
|
189
|
+
<ul class="capture-dates">
|
|
190
|
+
${map(this.model.captureDates, date => html `<li>
|
|
191
|
+
${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
|
|
192
|
+
</li>`)}
|
|
193
|
+
</ul>
|
|
195
194
|
`;
|
|
196
195
|
}
|
|
197
196
|
/**
|
|
@@ -205,18 +204,18 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
205
204
|
const [viewCount, viewLabel] = (effectiveSort === null || effectiveSort === void 0 ? void 0 : effectiveSort.field) === 'week'
|
|
206
205
|
? [(_b = this.model) === null || _b === void 0 ? void 0 : _b.weeklyViewCount, 'weekly views']
|
|
207
206
|
: [(_c = this.model) === null || _c === void 0 ? void 0 : _c.viewCount, 'all-time views'];
|
|
208
|
-
return html `
|
|
209
|
-
<tile-stats
|
|
210
|
-
.model=${this.model}
|
|
211
|
-
.mediatype=${(_d = this.model) === null || _d === void 0 ? void 0 : _d.mediatype}
|
|
212
|
-
.viewCount=${viewCount}
|
|
213
|
-
.viewLabel=${viewLabel}
|
|
214
|
-
.favCount=${(_e = this.model) === null || _e === void 0 ? void 0 : _e.favCount}
|
|
215
|
-
.commentCount=${(_f = this.model) === null || _f === void 0 ? void 0 : _f.commentCount}
|
|
216
|
-
.tvClipCount=${(_g = this.model) === null || _g === void 0 ? void 0 : _g.tvClipCount}
|
|
217
|
-
.showTvClips=${this.showTvClips}
|
|
218
|
-
>
|
|
219
|
-
</tile-stats>
|
|
207
|
+
return html `
|
|
208
|
+
<tile-stats
|
|
209
|
+
.model=${this.model}
|
|
210
|
+
.mediatype=${(_d = this.model) === null || _d === void 0 ? void 0 : _d.mediatype}
|
|
211
|
+
.viewCount=${viewCount}
|
|
212
|
+
.viewLabel=${viewLabel}
|
|
213
|
+
.favCount=${(_e = this.model) === null || _e === void 0 ? void 0 : _e.favCount}
|
|
214
|
+
.commentCount=${(_f = this.model) === null || _f === void 0 ? void 0 : _f.commentCount}
|
|
215
|
+
.tvClipCount=${(_g = this.model) === null || _g === void 0 ? void 0 : _g.tvClipCount}
|
|
216
|
+
.showTvClips=${this.showTvClips}
|
|
217
|
+
>
|
|
218
|
+
</tile-stats>
|
|
220
219
|
`;
|
|
221
220
|
}
|
|
222
221
|
get isSortedByDate() {
|
|
@@ -246,62 +245,62 @@ let ItemTile = class ItemTile extends BaseTileComponent {
|
|
|
246
245
|
const tileBorderColor = css `var(--tileBorderColor, #dddddd)`;
|
|
247
246
|
return [
|
|
248
247
|
baseTileStyles,
|
|
249
|
-
css `
|
|
250
|
-
a:link {
|
|
251
|
-
text-decoration: none;
|
|
252
|
-
color: var(--ia-theme-link-color, #4b64ff);
|
|
253
|
-
}
|
|
254
|
-
a:hover {
|
|
255
|
-
text-decoration: underline;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.container {
|
|
259
|
-
border: 1px solid ${tileBorderColor};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.simple #title > .truncated {
|
|
263
|
-
-webkit-line-clamp: 2;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.simple .created-by > .truncated,
|
|
267
|
-
.simple .date-sorted-by > .truncated,
|
|
268
|
-
.simple .volume-issue > .truncated {
|
|
269
|
-
-webkit-line-clamp: 1;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.simple.snippets-only .item-info {
|
|
273
|
-
padding-bottom: 5px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.simple.snippets-only text-snippet-block {
|
|
277
|
-
margin-top: auto; /* Force the snippets to the bottom of the tile */
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.capture-dates {
|
|
281
|
-
margin: 0;
|
|
282
|
-
padding: 0 5px;
|
|
283
|
-
list-style-type: none;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
review-block,
|
|
287
|
-
text-snippet-block {
|
|
288
|
-
--containerLeftMargin: 5px;
|
|
289
|
-
--containerTopMargin: 5px;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* iOS Safari long-press on tiles (to bring up hover pane)
|
|
294
|
-
* gets messy without this
|
|
295
|
-
*/
|
|
296
|
-
@media screen and (pointer: coarse) and (hover: none) {
|
|
297
|
-
.container {
|
|
298
|
-
-webkit-touch-callout: none;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.truncated {
|
|
302
|
-
-webkit-touch-callout: default;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
248
|
+
css `
|
|
249
|
+
a:link {
|
|
250
|
+
text-decoration: none;
|
|
251
|
+
color: var(--ia-theme-link-color, #4b64ff);
|
|
252
|
+
}
|
|
253
|
+
a:hover {
|
|
254
|
+
text-decoration: underline;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.container {
|
|
258
|
+
border: 1px solid ${tileBorderColor};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.simple #title > .truncated {
|
|
262
|
+
-webkit-line-clamp: 2;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.simple .created-by > .truncated,
|
|
266
|
+
.simple .date-sorted-by > .truncated,
|
|
267
|
+
.simple .volume-issue > .truncated {
|
|
268
|
+
-webkit-line-clamp: 1;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.simple.snippets-only .item-info {
|
|
272
|
+
padding-bottom: 5px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.simple.snippets-only text-snippet-block {
|
|
276
|
+
margin-top: auto; /* Force the snippets to the bottom of the tile */
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.capture-dates {
|
|
280
|
+
margin: 0;
|
|
281
|
+
padding: 0 5px;
|
|
282
|
+
list-style-type: none;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
review-block,
|
|
286
|
+
text-snippet-block {
|
|
287
|
+
--containerLeftMargin: 5px;
|
|
288
|
+
--containerTopMargin: 5px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* iOS Safari long-press on tiles (to bring up hover pane)
|
|
293
|
+
* gets messy without this
|
|
294
|
+
*/
|
|
295
|
+
@media screen and (pointer: coarse) and (hover: none) {
|
|
296
|
+
.container {
|
|
297
|
+
-webkit-touch-callout: none;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.truncated {
|
|
301
|
+
-webkit-touch-callout: default;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
305
304
|
`,
|
|
306
305
|
];
|
|
307
306
|
}
|