@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.
Files changed (41) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/app-root.d.ts +0 -8
  4. package/dist/src/app-root.js +672 -698
  5. package/dist/src/app-root.js.map +1 -1
  6. package/dist/src/collection-browser.d.ts +0 -8
  7. package/dist/src/collection-browser.js +762 -779
  8. package/dist/src/collection-browser.js.map +1 -1
  9. package/dist/src/tiles/base-tile-component.d.ts +1 -17
  10. package/dist/src/tiles/base-tile-component.js +1 -48
  11. package/dist/src/tiles/base-tile-component.js.map +1 -1
  12. package/dist/src/tiles/grid/item-tile.js +138 -139
  13. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  14. package/dist/src/tiles/list/tile-list-compact-header.js +46 -66
  15. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  16. package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
  17. package/dist/src/tiles/list/tile-list-compact.js +100 -132
  18. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  19. package/dist/src/tiles/list/tile-list.d.ts +1 -1
  20. package/dist/src/tiles/list/tile-list.js +298 -316
  21. package/dist/src/tiles/list/tile-list.js.map +1 -1
  22. package/dist/src/tiles/models.d.ts +0 -14
  23. package/dist/src/tiles/models.js.map +1 -1
  24. package/dist/src/tiles/tile-dispatcher.d.ts +0 -14
  25. package/dist/src/tiles/tile-dispatcher.js +216 -319
  26. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  27. package/index.ts +28 -29
  28. package/package.json +2 -2
  29. package/src/app-root.ts +1251 -1281
  30. package/src/collection-browser.ts +3049 -3063
  31. package/src/tiles/base-tile-component.ts +65 -121
  32. package/src/tiles/grid/item-tile.ts +346 -347
  33. package/src/tiles/list/tile-list-compact-header.ts +86 -106
  34. package/src/tiles/list/tile-list-compact.ts +239 -273
  35. package/src/tiles/list/tile-list.ts +700 -718
  36. package/src/tiles/models.ts +8 -24
  37. package/src/tiles/tile-dispatcher.ts +527 -637
  38. package/dist/src/styles/tile-action-styles.d.ts +0 -14
  39. package/dist/src/styles/tile-action-styles.js +0 -52
  40. package/dist/src/styles/tile-action-styles.js.map +0 -1
  41. package/src/styles/tile-action-styles.ts +0 -52
@@ -1,106 +1,86 @@
1
- import { css, html, nothing } 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
- * - tileActions: TileAction[] = [];
12
- * - currentWidth?: number;
13
- * - currentHeight?: number;
14
- * - baseNavigationUrl?: string;
15
- * - baseImageUrl?: string;
16
- * - collectionPagePath?: string;
17
- * - sortParam: SortParam | null = null;
18
- * - creatorFilter?: string;
19
- * - mobileBreakpoint?: number;
20
- * - loggedIn = false;
21
- * - suppressBlurring = false;
22
- */
23
-
24
- render() {
25
- const hasActions = this.tileActions.length > 0;
26
- const headerClasses = `${this.classSize}${hasActions ? ' has-actions' : ''}`;
27
- return html`
28
- <div id="list-line-header" class="${headerClasses}">
29
- <div id="thumb"></div>
30
- ${hasActions ? html`<div id="actions-header"></div>` : nothing}
31
- <div id="title">${msg('Title')}</div>
32
- <div id="creator">${msg('Creator')}</div>
33
- <div id="date">
34
- ${this.displayValueProvider.dateLabel || msg('Published')}
35
- </div>
36
- <div id="icon">${msg('Type')}</div>
37
- <div id="views">${this.displayValueProvider.viewsLabel}</div>
38
- </div>
39
- `;
40
- }
41
-
42
- private get classSize(): string {
43
- if (
44
- this.mobileBreakpoint &&
45
- this.currentWidth &&
46
- this.currentWidth < this.mobileBreakpoint
47
- ) {
48
- return 'mobile';
49
- }
50
- return 'desktop';
51
- }
52
-
53
- static get styles() {
54
- return css`
55
- html {
56
- font-size: unset;
57
- }
58
-
59
- div {
60
- font-size: 14px;
61
- font-weight: bold;
62
- line-height: 20px;
63
- }
64
-
65
- .mobile #views {
66
- display: none;
67
- }
68
-
69
- #views {
70
- text-align: right;
71
- padding-right: 8px;
72
- }
73
-
74
- #list-line-header {
75
- display: grid;
76
- column-gap: 10px;
77
- align-items: flex-end;
78
- padding-bottom: 2px;
79
- }
80
-
81
- #list-line-header.mobile {
82
- grid-template-columns: 36px 3fr 2fr 68px 35px;
83
- }
84
-
85
- #list-line-header.desktop {
86
- grid-template-columns: 51px 3fr 2fr 95px 30px 115px;
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
+ }