@internetarchive/collection-browser 4.5.1-alpha-webdev8221.0 → 4.5.2

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 (69) hide show
  1. package/dist/index.js.map +1 -1
  2. package/dist/src/app-root.js +683 -683
  3. package/dist/src/app-root.js.map +1 -1
  4. package/dist/src/collection-browser.js +766 -766
  5. package/dist/src/collection-browser.js.map +1 -1
  6. package/dist/src/collection-facets/facet-row.js +143 -143
  7. package/dist/src/collection-facets/facet-row.js.map +1 -1
  8. package/dist/src/collection-facets/facets-template.js +24 -24
  9. package/dist/src/collection-facets/facets-template.js.map +1 -1
  10. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
  11. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  12. package/dist/src/restoration-state-handler.js.map +1 -1
  13. package/dist/src/styles/tile-action-styles.js +43 -43
  14. package/dist/src/styles/tile-action-styles.js.map +1 -1
  15. package/dist/src/tiles/base-tile-component.js +11 -11
  16. package/dist/src/tiles/base-tile-component.js.map +1 -1
  17. package/dist/src/tiles/grid/item-tile.js +138 -138
  18. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  19. package/dist/src/tiles/hover/hover-pane-controller.js +31 -29
  20. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  21. package/dist/src/tiles/list/tile-list-compact-header.js +62 -62
  22. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  23. package/dist/src/tiles/list/tile-list-compact.js +123 -123
  24. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  25. package/dist/src/tiles/list/tile-list.js +310 -310
  26. package/dist/src/tiles/list/tile-list.js.map +1 -1
  27. package/dist/src/tiles/models.js.map +1 -1
  28. package/dist/src/tiles/tile-dispatcher.js +286 -286
  29. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  30. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  31. package/dist/src/utils/date-filter-field.js.map +1 -1
  32. package/dist/test/collection-browser.test.js +203 -203
  33. package/dist/test/collection-browser.test.js.map +1 -1
  34. package/dist/test/collection-facets/facet-row.test.js +31 -31
  35. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  36. package/dist/test/tiles/grid/item-tile.test.js +77 -77
  37. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  38. package/dist/test/tiles/hover/hover-pane-controller.test.js +54 -27
  39. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
  40. package/dist/test/tiles/list/tile-list.test.js +134 -134
  41. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  42. package/dist/test/tiles/tile-dispatcher.test.js +92 -92
  43. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  44. package/index.ts +29 -29
  45. package/package.json +1 -1
  46. package/src/app-root.ts +1284 -1284
  47. package/src/collection-browser.ts +3165 -3165
  48. package/src/collection-facets/facet-row.ts +309 -309
  49. package/src/collection-facets/facets-template.ts +85 -85
  50. package/src/data-source/collection-browser-data-source-interface.ts +351 -351
  51. package/src/data-source/collection-browser-data-source.ts +1474 -1474
  52. package/src/restoration-state-handler.ts +550 -550
  53. package/src/styles/tile-action-styles.ts +59 -59
  54. package/src/tiles/base-tile-component.ts +124 -124
  55. package/src/tiles/grid/item-tile.ts +347 -347
  56. package/src/tiles/hover/hover-pane-controller.ts +630 -628
  57. package/src/tiles/list/tile-list-compact-header.ts +112 -112
  58. package/src/tiles/list/tile-list-compact.ts +278 -278
  59. package/src/tiles/list/tile-list.ts +718 -718
  60. package/src/tiles/models.ts +21 -21
  61. package/src/tiles/tile-dispatcher.ts +637 -637
  62. package/src/tiles/tile-display-value-provider.ts +133 -133
  63. package/src/utils/date-filter-field.ts +11 -11
  64. package/test/collection-browser.test.ts +2639 -2639
  65. package/test/collection-facets/facet-row.test.ts +421 -421
  66. package/test/tiles/grid/item-tile.test.ts +520 -520
  67. package/test/tiles/hover/hover-pane-controller.test.ts +454 -418
  68. package/test/tiles/list/tile-list.test.ts +576 -576
  69. package/test/tiles/tile-dispatcher.test.ts +320 -320
@@ -1,112 +1,112 @@
1
- import { css, html, nothing } from 'lit';
2
- import { customElement } from 'lit/decorators.js';
3
- import { classMap } from 'lit/directives/class-map.js';
4
- import { msg } from '@lit/localize';
5
- import { BaseTileComponent } from '../base-tile-component';
6
-
7
- @customElement('tile-list-compact-header')
8
- export class TileListCompactHeader extends BaseTileComponent {
9
- /*
10
- * Reactive properties inherited from BaseTileComponent:
11
- * - model?: TileModel;
12
- * - tileActions: TileAction[] = [];
13
- * - currentWidth?: number;
14
- * - currentHeight?: number;
15
- * - baseNavigationUrl?: string;
16
- * - baseImageUrl?: string;
17
- * - collectionPagePath?: string;
18
- * - sortParam: SortParam | null = null;
19
- * - creatorFilter?: string;
20
- * - mobileBreakpoint?: number;
21
- * - loggedIn = false;
22
- * - suppressBlurring = false;
23
- */
24
-
25
- render() {
26
- const hasActions = this.tileActions.length > 0;
27
- const headerClasses = classMap({
28
- mobile: this.classSize === 'mobile',
29
- desktop: this.classSize === 'desktop',
30
- 'has-actions': hasActions,
31
- });
32
-
33
- return html`
34
- <div id="list-line-header" class=${headerClasses}>
35
- <div id="thumb"></div>
36
- ${hasActions ? html`<div id="actions-header"></div>` : nothing}
37
- <div id="title">${msg('Title')}</div>
38
- <div id="creator">${msg('Creator')}</div>
39
- <div id="date">
40
- ${this.displayValueProvider.dateLabel || msg('Published')}
41
- </div>
42
- <div id="icon">${msg('Type')}</div>
43
- <div id="views">${this.displayValueProvider.viewsLabel}</div>
44
- </div>
45
- `;
46
- }
47
-
48
- private get classSize(): string {
49
- if (
50
- this.mobileBreakpoint &&
51
- this.currentWidth &&
52
- this.currentWidth < this.mobileBreakpoint
53
- ) {
54
- return 'mobile';
55
- }
56
- return 'desktop';
57
- }
58
-
59
- static get styles() {
60
- return css`
61
- html {
62
- font-size: unset;
63
- }
64
-
65
- div {
66
- font-size: 14px;
67
- font-weight: bold;
68
- line-height: 20px;
69
- }
70
-
71
- .mobile #views {
72
- display: none;
73
- }
74
-
75
- #views {
76
- text-align: right;
77
- padding-right: 8px;
78
- }
79
-
80
- #list-line-header {
81
- display: grid;
82
- column-gap: 10px;
83
- align-items: flex-end;
84
- padding-bottom: 2px;
85
- }
86
-
87
- #list-line-header.mobile {
88
- grid-template-columns: 36px 3fr 2fr 68px 35px;
89
- }
90
-
91
- #list-line-header.desktop {
92
- grid-template-columns: 51px 3fr 2fr 95px 30px 115px;
93
- }
94
-
95
- /*
96
- * When tile actions are present in the rows below, reserve a matching
97
- * column here so the columns stay aligned with each row.
98
- */
99
- #list-line-header.mobile.has-actions {
100
- grid-template-columns:
101
- 36px var(--tileActionColumnWidth, 90px) 3fr 2fr
102
- 68px 35px;
103
- }
104
-
105
- #list-line-header.desktop.has-actions {
106
- grid-template-columns:
107
- 51px var(--tileActionColumnWidth, 100px) 3fr 2fr
108
- 95px 30px 115px;
109
- }
110
- `;
111
- }
112
- }
1
+ import { css, html, nothing } from 'lit';
2
+ import { customElement } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import { msg } from '@lit/localize';
5
+ import { BaseTileComponent } from '../base-tile-component';
6
+
7
+ @customElement('tile-list-compact-header')
8
+ export class TileListCompactHeader extends BaseTileComponent {
9
+ /*
10
+ * Reactive properties inherited from BaseTileComponent:
11
+ * - model?: TileModel;
12
+ * - tileActions: TileAction[] = [];
13
+ * - currentWidth?: number;
14
+ * - currentHeight?: number;
15
+ * - baseNavigationUrl?: string;
16
+ * - baseImageUrl?: string;
17
+ * - collectionPagePath?: string;
18
+ * - sortParam: SortParam | null = null;
19
+ * - creatorFilter?: string;
20
+ * - mobileBreakpoint?: number;
21
+ * - loggedIn = false;
22
+ * - suppressBlurring = false;
23
+ */
24
+
25
+ render() {
26
+ const hasActions = this.tileActions.length > 0;
27
+ const headerClasses = classMap({
28
+ mobile: this.classSize === 'mobile',
29
+ desktop: this.classSize === 'desktop',
30
+ 'has-actions': hasActions,
31
+ });
32
+
33
+ return html`
34
+ <div id="list-line-header" class=${headerClasses}>
35
+ <div id="thumb"></div>
36
+ ${hasActions ? html`<div id="actions-header"></div>` : nothing}
37
+ <div id="title">${msg('Title')}</div>
38
+ <div id="creator">${msg('Creator')}</div>
39
+ <div id="date">
40
+ ${this.displayValueProvider.dateLabel || msg('Published')}
41
+ </div>
42
+ <div id="icon">${msg('Type')}</div>
43
+ <div id="views">${this.displayValueProvider.viewsLabel}</div>
44
+ </div>
45
+ `;
46
+ }
47
+
48
+ private get classSize(): string {
49
+ if (
50
+ this.mobileBreakpoint &&
51
+ this.currentWidth &&
52
+ this.currentWidth < this.mobileBreakpoint
53
+ ) {
54
+ return 'mobile';
55
+ }
56
+ return 'desktop';
57
+ }
58
+
59
+ static get styles() {
60
+ return css`
61
+ html {
62
+ font-size: unset;
63
+ }
64
+
65
+ div {
66
+ font-size: 14px;
67
+ font-weight: bold;
68
+ line-height: 20px;
69
+ }
70
+
71
+ .mobile #views {
72
+ display: none;
73
+ }
74
+
75
+ #views {
76
+ text-align: right;
77
+ padding-right: 8px;
78
+ }
79
+
80
+ #list-line-header {
81
+ display: grid;
82
+ column-gap: 10px;
83
+ align-items: flex-end;
84
+ padding-bottom: 2px;
85
+ }
86
+
87
+ #list-line-header.mobile {
88
+ grid-template-columns: 36px 3fr 2fr 68px 35px;
89
+ }
90
+
91
+ #list-line-header.desktop {
92
+ grid-template-columns: 51px 3fr 2fr 95px 30px 115px;
93
+ }
94
+
95
+ /*
96
+ * When tile actions are present in the rows below, reserve a matching
97
+ * column here so the columns stay aligned with each row.
98
+ */
99
+ #list-line-header.mobile.has-actions {
100
+ grid-template-columns:
101
+ 36px var(--tileActionColumnWidth, 90px) 3fr 2fr
102
+ 68px 35px;
103
+ }
104
+
105
+ #list-line-header.desktop.has-actions {
106
+ grid-template-columns:
107
+ 51px var(--tileActionColumnWidth, 100px) 3fr 2fr
108
+ 95px 30px 115px;
109
+ }
110
+ `;
111
+ }
112
+ }