@internetarchive/collection-browser 4.3.1-alpha-webdev8257.0 → 4.3.1
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 +0 -1
- package/dist/index.js.map +1 -1
- package/dist/src/app-root.d.ts +0 -8
- package/dist/src/app-root.js +672 -698
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.d.ts +0 -8
- package/dist/src/collection-browser.js +762 -779
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/tiles/base-tile-component.d.ts +1 -17
- package/dist/src/tiles/base-tile-component.js +1 -48
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +138 -139
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +46 -66
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +100 -132
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.d.ts +1 -1
- package/dist/src/tiles/list/tile-list.js +298 -316
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/models.d.ts +0 -14
- package/dist/src/tiles/models.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.d.ts +0 -14
- package/dist/src/tiles/tile-dispatcher.js +216 -319
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/index.ts +28 -29
- package/package.json +2 -2
- package/src/app-root.ts +1251 -1281
- package/src/collection-browser.ts +3049 -3063
- package/src/tiles/base-tile-component.ts +65 -121
- package/src/tiles/grid/item-tile.ts +346 -347
- package/src/tiles/list/tile-list-compact-header.ts +86 -106
- package/src/tiles/list/tile-list-compact.ts +239 -273
- package/src/tiles/list/tile-list.ts +700 -718
- package/src/tiles/models.ts +8 -24
- package/src/tiles/tile-dispatcher.ts +527 -637
- package/dist/src/styles/tile-action-styles.d.ts +0 -14
- package/dist/src/styles/tile-action-styles.js +0 -52
- package/dist/src/styles/tile-action-styles.js.map +0 -1
- package/src/styles/tile-action-styles.ts +0 -52
|
@@ -1,106 +1,86 @@
|
|
|
1
|
-
import { css, html
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
import { msg } from '@lit/localize';
|
|
4
|
-
import { BaseTileComponent } from '../base-tile-component';
|
|
5
|
-
|
|
6
|
-
@customElement('tile-list-compact-header')
|
|
7
|
-
export class TileListCompactHeader extends BaseTileComponent {
|
|
8
|
-
/*
|
|
9
|
-
* Reactive properties inherited from BaseTileComponent:
|
|
10
|
-
* - model?: TileModel;
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
20
|
-
* -
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<div id="
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div id="
|
|
33
|
-
<div id="
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
font-size:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
#list-line-header.
|
|
82
|
-
grid-template-columns:
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/*
|
|
90
|
-
* When tile actions are present in the rows below, reserve a matching
|
|
91
|
-
* column here so the columns stay aligned with each row.
|
|
92
|
-
*/
|
|
93
|
-
#list-line-header.mobile.has-actions {
|
|
94
|
-
grid-template-columns:
|
|
95
|
-
36px var(--tileActionColumnWidth, 90px) 3fr 2fr
|
|
96
|
-
68px 35px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
#list-line-header.desktop.has-actions {
|
|
100
|
-
grid-template-columns:
|
|
101
|
-
51px var(--tileActionColumnWidth, 100px) 3fr 2fr
|
|
102
|
-
95px 30px 115px;
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
1
|
+
import { css, html } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import { msg } from '@lit/localize';
|
|
4
|
+
import { BaseTileComponent } from '../base-tile-component';
|
|
5
|
+
|
|
6
|
+
@customElement('tile-list-compact-header')
|
|
7
|
+
export class TileListCompactHeader extends BaseTileComponent {
|
|
8
|
+
/*
|
|
9
|
+
* Reactive properties inherited from BaseTileComponent:
|
|
10
|
+
* - model?: TileModel;
|
|
11
|
+
* - currentWidth?: number;
|
|
12
|
+
* - currentHeight?: number;
|
|
13
|
+
* - baseNavigationUrl?: string;
|
|
14
|
+
* - baseImageUrl?: string;
|
|
15
|
+
* - collectionPagePath?: string;
|
|
16
|
+
* - sortParam: SortParam | null = null;
|
|
17
|
+
* - creatorFilter?: string;
|
|
18
|
+
* - mobileBreakpoint?: number;
|
|
19
|
+
* - loggedIn = false;
|
|
20
|
+
* - suppressBlurring = false;
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
render() {
|
|
24
|
+
return html`
|
|
25
|
+
<div id="list-line-header" class="${this.classSize}">
|
|
26
|
+
<div id="thumb"></div>
|
|
27
|
+
<div id="title">${msg('Title')}</div>
|
|
28
|
+
<div id="creator">${msg('Creator')}</div>
|
|
29
|
+
<div id="date">
|
|
30
|
+
${this.displayValueProvider.dateLabel || msg('Published')}
|
|
31
|
+
</div>
|
|
32
|
+
<div id="icon">${msg('Type')}</div>
|
|
33
|
+
<div id="views">${this.displayValueProvider.viewsLabel}</div>
|
|
34
|
+
</div>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private get classSize(): string {
|
|
39
|
+
if (
|
|
40
|
+
this.mobileBreakpoint &&
|
|
41
|
+
this.currentWidth &&
|
|
42
|
+
this.currentWidth < this.mobileBreakpoint
|
|
43
|
+
) {
|
|
44
|
+
return 'mobile';
|
|
45
|
+
}
|
|
46
|
+
return 'desktop';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static get styles() {
|
|
50
|
+
return css`
|
|
51
|
+
html {
|
|
52
|
+
font-size: unset;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
div {
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
font-weight: bold;
|
|
58
|
+
line-height: 20px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.mobile #views {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#views {
|
|
66
|
+
text-align: right;
|
|
67
|
+
padding-right: 8px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#list-line-header {
|
|
71
|
+
display: grid;
|
|
72
|
+
column-gap: 10px;
|
|
73
|
+
align-items: flex-end;
|
|
74
|
+
padding-bottom: 2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
#list-line-header.mobile {
|
|
78
|
+
grid-template-columns: 36px 3fr 2fr 68px 35px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#list-line-header.desktop {
|
|
82
|
+
grid-template-columns: 51px 3fr 2fr 95px 30px 115px;
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
}
|