@internetarchive/collection-browser 3.3.3 → 3.3.4-alpha-webdev7761.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.
Files changed (55) hide show
  1. package/dist/src/collection-browser.d.ts +10 -2
  2. package/dist/src/collection-browser.js +112 -10
  3. package/dist/src/collection-browser.js.map +1 -1
  4. package/dist/src/collection-facets/facet-row.js +141 -140
  5. package/dist/src/collection-facets/facet-row.js.map +1 -1
  6. package/dist/src/collection-facets/models.js.map +1 -1
  7. package/dist/src/collection-facets.js +12 -0
  8. package/dist/src/collection-facets.js.map +1 -1
  9. package/dist/src/data-source/collection-browser-data-source-interface.d.ts +10 -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.d.ts +19 -1
  12. package/dist/src/data-source/collection-browser-data-source.js +36 -18
  13. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  14. package/dist/src/data-source/collection-browser-query-state.d.ts +1 -2
  15. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  16. package/dist/src/data-source/models.d.ts +11 -0
  17. package/dist/src/data-source/models.js.map +1 -1
  18. package/dist/src/manage/manage-bar.js +77 -77
  19. package/dist/src/manage/manage-bar.js.map +1 -1
  20. package/dist/src/models.d.ts +2 -6
  21. package/dist/src/models.js +8 -12
  22. package/dist/src/models.js.map +1 -1
  23. package/dist/src/restoration-state-handler.d.ts +1 -2
  24. package/dist/src/restoration-state-handler.js +3 -9
  25. package/dist/src/restoration-state-handler.js.map +1 -1
  26. package/dist/src/tiles/grid/search-tile.js +42 -42
  27. package/dist/src/tiles/grid/search-tile.js.map +1 -1
  28. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +119 -119
  29. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  30. package/dist/test/collection-browser.test.js +19 -9
  31. package/dist/test/collection-browser.test.js.map +1 -1
  32. package/dist/test/collection-facets/facet-row.test.js +23 -23
  33. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  34. package/dist/test/collection-facets.test.js +20 -20
  35. package/dist/test/collection-facets.test.js.map +1 -1
  36. package/dist/test/restoration-state-handler.test.js +5 -37
  37. package/dist/test/restoration-state-handler.test.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/collection-browser.ts +132 -7
  40. package/src/collection-facets/facet-row.ts +299 -296
  41. package/src/collection-facets/models.ts +10 -10
  42. package/src/collection-facets.ts +11 -0
  43. package/src/data-source/collection-browser-data-source-interface.ts +345 -333
  44. package/src/data-source/collection-browser-data-source.ts +59 -19
  45. package/src/data-source/collection-browser-query-state.ts +1 -7
  46. package/src/data-source/models.ts +13 -0
  47. package/src/manage/manage-bar.ts +247 -247
  48. package/src/models.ts +866 -870
  49. package/src/restoration-state-handler.ts +542 -544
  50. package/src/tiles/grid/search-tile.ts +90 -90
  51. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -130
  52. package/test/collection-browser.test.ts +21 -11
  53. package/test/collection-facets/facet-row.test.ts +375 -375
  54. package/test/collection-facets.test.ts +928 -928
  55. package/test/restoration-state-handler.test.ts +480 -510
@@ -24,31 +24,31 @@ let SearchTile = class SearchTile extends BaseTileComponent {
24
24
  this.showInfoButton = false;
25
25
  }
26
26
  render() {
27
- return html `
28
- <div class="container">
29
- <div class="tile-details">
30
- <div class="item-info">
31
- ${this.getImageBlockTemplate} ${this.getTitleTemplate}
32
- </div>
33
- </div>
34
- </div>
27
+ return html `
28
+ <div class="container">
29
+ <div class="tile-details">
30
+ <div class="item-info">
31
+ ${this.getImageBlockTemplate} ${this.getTitleTemplate}
32
+ </div>
33
+ </div>
34
+ </div>
35
35
  `;
36
36
  }
37
37
  get getImageBlockTemplate() {
38
- return html `
39
- <image-block
40
- .model=${this.model}
41
- .baseImageUrl=${this.baseImageUrl}
42
- .viewSize=${'grid'}
43
- .suppressBlurring=${this.suppressBlurring}
44
- >
45
- </image-block>
38
+ return html `
39
+ <image-block
40
+ .model=${this.model}
41
+ .baseImageUrl=${this.baseImageUrl}
42
+ .viewSize=${'grid'}
43
+ .suppressBlurring=${this.suppressBlurring}
44
+ >
45
+ </image-block>
46
46
  `;
47
47
  }
48
48
  get getTitleTemplate() {
49
49
  var _a;
50
- return html `<div id="title">
51
- <h3 class="truncated">${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}</h3>
50
+ return html `<div id="title">
51
+ <h3 class="truncated">${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}</h3>
52
52
  </div>`;
53
53
  }
54
54
  static get styles() {
@@ -57,30 +57,30 @@ let SearchTile = class SearchTile extends BaseTileComponent {
57
57
  const whiteColor = css `#fff`;
58
58
  return [
59
59
  baseTileStyles,
60
- css `
61
- .container {
62
- background-color: ${tileBackgroundColor};
63
- border: 1px solid ${tileBorderColor};
64
- }
65
-
66
- .item-info {
67
- flex-grow: initial;
68
- }
69
-
70
- h4.truncated,
71
- h3.truncated {
72
- color: ${whiteColor};
73
- -webkit-line-clamp: 4;
74
- }
75
-
76
- .container:hover > #title {
77
- text-decoration: underline;
78
- }
79
-
80
- /* this is a workaround for Safari 15 where the hover effects are not working */
81
- image-block:hover > #title {
82
- text-decoration: underline;
83
- }
60
+ css `
61
+ .container {
62
+ background-color: ${tileBackgroundColor};
63
+ border: 1px solid ${tileBorderColor};
64
+ }
65
+
66
+ .item-info {
67
+ flex-grow: initial;
68
+ }
69
+
70
+ h4.truncated,
71
+ h3.truncated {
72
+ color: ${whiteColor};
73
+ -webkit-line-clamp: 4;
74
+ }
75
+
76
+ .container:hover > #title {
77
+ text-decoration: underline;
78
+ }
79
+
80
+ /* this is a workaround for Safari 15 where the hover effects are not working */
81
+ image-block:hover > #title {
82
+ text-decoration: underline;
83
+ }
84
84
  `,
85
85
  ];
86
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"search-tile.js","sourceRoot":"","sources":["../../../../src/tiles/grid/search-tile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GA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sourcesContent":["import { css, CSSResultGroup, html, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { baseTileStyles } from './styles/tile-grid-shared-styles';\nimport { BaseTileComponent } from '../base-tile-component';\nimport '../image-block';\n\n@customElement('search-tile')\nexport class SearchTile 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 */\n\n @property({ type: Boolean }) showInfoButton = false;\n\n render() {\n return html`\n <div class=\"container\">\n <div class=\"tile-details\">\n <div class=\"item-info\">\n ${this.getImageBlockTemplate} ${this.getTitleTemplate}\n </div>\n </div>\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 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 -webkit-line-clamp: 4;\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 ];\n }\n}\n"]}
1
+ {"version":3,"file":"search-tile.js","s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;kDAAwB;AAhBzC,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAkFtB","sourcesContent":["import { css, CSSResultGroup, html, TemplateResult } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { baseTileStyles } from './styles/tile-grid-shared-styles';\r\nimport { BaseTileComponent } from '../base-tile-component';\r\nimport '../image-block';\r\n\r\n@customElement('search-tile')\r\nexport class SearchTile extends BaseTileComponent {\r\n /*\r\n * Reactive properties inherited from BaseTileComponent:\r\n * - model?: TileModel;\r\n * - currentWidth?: number;\r\n * - currentHeight?: number;\r\n * - baseNavigationUrl?: string;\r\n * - baseImageUrl?: string;\r\n * - collectionPagePath?: string;\r\n * - sortParam: SortParam | null = null;\r\n * - creatorFilter?: string;\r\n * - mobileBreakpoint?: number;\r\n * - loggedIn = false;\r\n * - suppressBlurring = false;\r\n */\r\n\r\n @property({ type: Boolean }) showInfoButton = false;\r\n\r\n render() {\r\n return html`\r\n <div class=\"container\">\r\n <div class=\"tile-details\">\r\n <div class=\"item-info\">\r\n ${this.getImageBlockTemplate} ${this.getTitleTemplate}\r\n </div>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n\r\n private get getImageBlockTemplate(): TemplateResult {\r\n return html`\r\n <image-block\r\n .model=${this.model}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .viewSize=${'grid'}\r\n .suppressBlurring=${this.suppressBlurring}\r\n >\r\n </image-block>\r\n `;\r\n }\r\n\r\n private get getTitleTemplate() {\r\n return html`<div id=\"title\">\r\n <h3 class=\"truncated\">${this.model?.title}</h3>\r\n </div>`;\r\n }\r\n\r\n static get styles(): CSSResultGroup {\r\n const tileBorderColor = css`var(--tileBorderColor, #555555)`;\r\n const tileBackgroundColor = css`var(--tileBackgroundColor, #666666)`;\r\n const whiteColor = css`#fff`;\r\n\r\n return [\r\n baseTileStyles,\r\n css`\r\n .container {\r\n background-color: ${tileBackgroundColor};\r\n border: 1px solid ${tileBorderColor};\r\n }\r\n\r\n .item-info {\r\n flex-grow: initial;\r\n }\r\n\r\n h4.truncated,\r\n h3.truncated {\r\n color: ${whiteColor};\r\n -webkit-line-clamp: 4;\r\n }\r\n\r\n .container:hover > #title {\r\n text-decoration: underline;\r\n }\r\n\r\n /* this is a workaround for Safari 15 where the hover effects are not working */\r\n image-block:hover > #title {\r\n text-decoration: underline;\r\n }\r\n `,\r\n ];\r\n }\r\n}\r\n"]}
@@ -5,124 +5,124 @@ import { srOnlyStyle } from '../../../styles/sr-only';
5
5
  */
6
6
  const tileBackgroundColor = css `var(--tileBackgroundColor, #ffffff)`;
7
7
  const tileCornerRadius = css `var(--tileCornerRadius, 4px)`;
8
- export const baseTileStyles = css `
9
- /* Include .sr-only styles for all tiles */
10
- ${srOnlyStyle}
11
-
12
- .container {
13
- background-color: ${tileBackgroundColor};
14
- border: 1px #2c2c2c;
15
- border-radius: ${tileCornerRadius};
16
- box-shadow: var(--tileBoxShadow, 1px 1px 2px 0);
17
- box-sizing: border-box;
18
- height: 100%;
19
- display: flex;
20
- flex-direction: column;
21
- width: 100%;
22
- }
23
-
24
- image-block {
25
- display: block;
26
- position: relative;
27
- text-align: center;
28
- }
29
-
30
- .tile-details {
31
- display: flex;
32
- flex-direction: column;
33
- height: 100%;
34
- row-gap: 10px;
35
- font-family: 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;
36
- }
37
-
38
- .item-info {
39
- display: flex;
40
- flex-direction: column;
41
- row-gap: 5px;
42
- flex-grow: 1;
43
- }
44
-
45
- #title {
46
- padding: 0 5px;
47
- }
48
-
49
- .created-by,
50
- .date-sorted-by,
51
- .volume-issue,
52
- .archivist-since {
53
- display: flex;
54
- justify-content: left;
55
- align-items: flex-start;
56
- padding: 0 5px;
57
- }
58
-
59
- .truncated {
60
- flex: 1;
61
- color: #2c2c2c;
62
- min-width: 0; /* Important for long words! */
63
- text-align: left;
64
- line-height: 15px;
65
- text-overflow: ellipsis;
66
- overflow: hidden;
67
- word-wrap: break-word;
68
- -webkit-line-clamp: 3;
69
- -webkit-box-orient: vertical;
70
- }
71
-
72
- h4.truncated,
73
- h3.truncated {
74
- display: -webkit-box;
75
- margin: 0px;
76
- line-height: 15px;
77
- font-size: 14px;
78
- font-weight: 500;
79
- padding-bottom: 1px;
80
- }
81
-
82
- span {
83
- display: -webkit-box;
84
- font-size: 1.4rem;
85
- line-height: 15px;
86
- overflow: hidden;
87
- word-wrap: break-word;
88
- -webkit-line-clamp: 1;
89
- -webkit-box-orient: vertical;
90
- padding-bottom: 1px;
91
- }
92
-
93
- .container:hover > .tile-details > .item-info > #title > .truncated {
94
- text-decoration: underline;
95
- }
96
-
97
- /** this is a workaround for Safari 15 where the hover effects are not working */
98
- #title:hover > .truncated {
99
- text-decoration: underline;
100
- }
101
-
102
- .info-button {
103
- position: absolute;
104
- right: 10px;
105
- top: 10px;
106
- margin: 0;
107
- padding: 0;
108
- border: none;
109
- border-radius: 50%;
110
- display: flex;
111
- justify-content: center;
112
- align-items: center;
113
- background: rgba(220, 220, 220, 0.5);
114
- color: white;
115
- font-size: 2.4rem;
116
- font-weight: bold;
117
- line-height: 1;
118
- text-shadow: black 1px 1px 3px;
119
- overflow: visible;
120
- aspect-ratio: 1 / 1;
121
- z-index: 1;
122
- }
123
-
124
- .hidden {
125
- display: none;
126
- }
8
+ export const baseTileStyles = css `
9
+ /* Include .sr-only styles for all tiles */
10
+ ${srOnlyStyle}
11
+
12
+ .container {
13
+ background-color: ${tileBackgroundColor};
14
+ border: 1px #2c2c2c;
15
+ border-radius: ${tileCornerRadius};
16
+ box-shadow: var(--tileBoxShadow, 1px 1px 2px 0);
17
+ box-sizing: border-box;
18
+ height: 100%;
19
+ display: flex;
20
+ flex-direction: column;
21
+ width: 100%;
22
+ }
23
+
24
+ image-block {
25
+ display: block;
26
+ position: relative;
27
+ text-align: center;
28
+ }
29
+
30
+ .tile-details {
31
+ display: flex;
32
+ flex-direction: column;
33
+ height: 100%;
34
+ row-gap: 10px;
35
+ font-family: 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;
36
+ }
37
+
38
+ .item-info {
39
+ display: flex;
40
+ flex-direction: column;
41
+ row-gap: 5px;
42
+ flex-grow: 1;
43
+ }
44
+
45
+ #title {
46
+ padding: 0 5px;
47
+ }
48
+
49
+ .created-by,
50
+ .date-sorted-by,
51
+ .volume-issue,
52
+ .archivist-since {
53
+ display: flex;
54
+ justify-content: left;
55
+ align-items: flex-start;
56
+ padding: 0 5px;
57
+ }
58
+
59
+ .truncated {
60
+ flex: 1;
61
+ color: #2c2c2c;
62
+ min-width: 0; /* Important for long words! */
63
+ text-align: left;
64
+ line-height: 15px;
65
+ text-overflow: ellipsis;
66
+ overflow: hidden;
67
+ word-wrap: break-word;
68
+ -webkit-line-clamp: 3;
69
+ -webkit-box-orient: vertical;
70
+ }
71
+
72
+ h4.truncated,
73
+ h3.truncated {
74
+ display: -webkit-box;
75
+ margin: 0px;
76
+ line-height: 15px;
77
+ font-size: 14px;
78
+ font-weight: 500;
79
+ padding-bottom: 1px;
80
+ }
81
+
82
+ span {
83
+ display: -webkit-box;
84
+ font-size: 1.4rem;
85
+ line-height: 15px;
86
+ overflow: hidden;
87
+ word-wrap: break-word;
88
+ -webkit-line-clamp: 1;
89
+ -webkit-box-orient: vertical;
90
+ padding-bottom: 1px;
91
+ }
92
+
93
+ .container:hover > .tile-details > .item-info > #title > .truncated {
94
+ text-decoration: underline;
95
+ }
96
+
97
+ /** this is a workaround for Safari 15 where the hover effects are not working */
98
+ #title:hover > .truncated {
99
+ text-decoration: underline;
100
+ }
101
+
102
+ .info-button {
103
+ position: absolute;
104
+ right: 10px;
105
+ top: 10px;
106
+ margin: 0;
107
+ padding: 0;
108
+ border: none;
109
+ border-radius: 50%;
110
+ display: flex;
111
+ justify-content: center;
112
+ align-items: center;
113
+ background: rgba(220, 220, 220, 0.5);
114
+ color: white;
115
+ font-size: 2.4rem;
116
+ font-weight: bold;
117
+ line-height: 1;
118
+ text-shadow: black 1px 1px 3px;
119
+ overflow: visible;
120
+ aspect-ratio: 1 / 1;
121
+ z-index: 1;
122
+ }
123
+
124
+ .hidden {
125
+ display: none;
126
+ }
127
127
  `;
128
128
  //# sourceMappingURL=tile-grid-shared-styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tile-grid-shared-styles.js","sourceRoot":"","sources":["../../../../../src/tiles/grid/styles/tile-grid-shared-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;GAEG;AAEH,MAAM,mBAAmB,GAAG,GAAG,CAAA,qCAAqC,CAAC;AACrE,MAAM,gBAAgB,GAAG,GAAG,CAAA,8BAA8B,CAAC;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;IAE7B,WAAW;;;wBAGS,mBAAmB;;qBAEtB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHpC,CAAC","sourcesContent":["import { css } from 'lit';\nimport { srOnlyStyle } from '../../../styles/sr-only';\n\n/**\n * Base tile styles\n */\n\nconst tileBackgroundColor = css`var(--tileBackgroundColor, #ffffff)`;\nconst tileCornerRadius = css`var(--tileCornerRadius, 4px)`;\n\nexport const baseTileStyles = css`\n /* Include .sr-only styles for all tiles */\n ${srOnlyStyle}\n\n .container {\n background-color: ${tileBackgroundColor};\n border: 1px #2c2c2c;\n border-radius: ${tileCornerRadius};\n box-shadow: var(--tileBoxShadow, 1px 1px 2px 0);\n box-sizing: border-box;\n height: 100%;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n image-block {\n display: block;\n position: relative;\n text-align: center;\n }\n\n .tile-details {\n display: flex;\n flex-direction: column;\n height: 100%;\n row-gap: 10px;\n font-family: 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;\n }\n\n .item-info {\n display: flex;\n flex-direction: column;\n row-gap: 5px;\n flex-grow: 1;\n }\n\n #title {\n padding: 0 5px;\n }\n\n .created-by,\n .date-sorted-by,\n .volume-issue,\n .archivist-since {\n display: flex;\n justify-content: left;\n align-items: flex-start;\n padding: 0 5px;\n }\n\n .truncated {\n flex: 1;\n color: #2c2c2c;\n min-width: 0; /* Important for long words! */\n text-align: left;\n line-height: 15px;\n text-overflow: ellipsis;\n overflow: hidden;\n word-wrap: break-word;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n }\n\n h4.truncated,\n h3.truncated {\n display: -webkit-box;\n margin: 0px;\n line-height: 15px;\n font-size: 14px;\n font-weight: 500;\n padding-bottom: 1px;\n }\n\n span {\n display: -webkit-box;\n font-size: 1.4rem;\n line-height: 15px;\n overflow: hidden;\n word-wrap: break-word;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n padding-bottom: 1px;\n }\n\n .container:hover > .tile-details > .item-info > #title > .truncated {\n text-decoration: underline;\n }\n\n /** this is a workaround for Safari 15 where the hover effects are not working */\n #title:hover > .truncated {\n text-decoration: underline;\n }\n\n .info-button {\n position: absolute;\n right: 10px;\n top: 10px;\n margin: 0;\n padding: 0;\n border: none;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: rgba(220, 220, 220, 0.5);\n color: white;\n font-size: 2.4rem;\n font-weight: bold;\n line-height: 1;\n text-shadow: black 1px 1px 3px;\n overflow: visible;\n aspect-ratio: 1 / 1;\n z-index: 1;\n }\n\n .hidden {\n display: none;\n }\n`;\n"]}
1
+ {"version":3,"file":"tile-grid-shared-styles.js","sourceRoot":"","sources":["../../../../../src/tiles/grid/styles/tile-grid-shared-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;GAEG;AAEH,MAAM,mBAAmB,GAAG,GAAG,CAAA,qCAAqC,CAAC;AACrE,MAAM,gBAAgB,GAAG,GAAG,CAAA,8BAA8B,CAAC;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;IAE7B,WAAW;;;wBAGS,mBAAmB;;qBAEtB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHpC,CAAC","sourcesContent":["import { css } from 'lit';\r\nimport { srOnlyStyle } from '../../../styles/sr-only';\r\n\r\n/**\r\n * Base tile styles\r\n */\r\n\r\nconst tileBackgroundColor = css`var(--tileBackgroundColor, #ffffff)`;\r\nconst tileCornerRadius = css`var(--tileCornerRadius, 4px)`;\r\n\r\nexport const baseTileStyles = css`\r\n /* Include .sr-only styles for all tiles */\r\n ${srOnlyStyle}\r\n\r\n .container {\r\n background-color: ${tileBackgroundColor};\r\n border: 1px #2c2c2c;\r\n border-radius: ${tileCornerRadius};\r\n box-shadow: var(--tileBoxShadow, 1px 1px 2px 0);\r\n box-sizing: border-box;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n }\r\n\r\n image-block {\r\n display: block;\r\n position: relative;\r\n text-align: center;\r\n }\r\n\r\n .tile-details {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n row-gap: 10px;\r\n font-family: 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;\r\n }\r\n\r\n .item-info {\r\n display: flex;\r\n flex-direction: column;\r\n row-gap: 5px;\r\n flex-grow: 1;\r\n }\r\n\r\n #title {\r\n padding: 0 5px;\r\n }\r\n\r\n .created-by,\r\n .date-sorted-by,\r\n .volume-issue,\r\n .archivist-since {\r\n display: flex;\r\n justify-content: left;\r\n align-items: flex-start;\r\n padding: 0 5px;\r\n }\r\n\r\n .truncated {\r\n flex: 1;\r\n color: #2c2c2c;\r\n min-width: 0; /* Important for long words! */\r\n text-align: left;\r\n line-height: 15px;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n word-wrap: break-word;\r\n -webkit-line-clamp: 3;\r\n -webkit-box-orient: vertical;\r\n }\r\n\r\n h4.truncated,\r\n h3.truncated {\r\n display: -webkit-box;\r\n margin: 0px;\r\n line-height: 15px;\r\n font-size: 14px;\r\n font-weight: 500;\r\n padding-bottom: 1px;\r\n }\r\n\r\n span {\r\n display: -webkit-box;\r\n font-size: 1.4rem;\r\n line-height: 15px;\r\n overflow: hidden;\r\n word-wrap: break-word;\r\n -webkit-line-clamp: 1;\r\n -webkit-box-orient: vertical;\r\n padding-bottom: 1px;\r\n }\r\n\r\n .container:hover > .tile-details > .item-info > #title > .truncated {\r\n text-decoration: underline;\r\n }\r\n\r\n /** this is a workaround for Safari 15 where the hover effects are not working */\r\n #title:hover > .truncated {\r\n text-decoration: underline;\r\n }\r\n\r\n .info-button {\r\n position: absolute;\r\n right: 10px;\r\n top: 10px;\r\n margin: 0;\r\n padding: 0;\r\n border: none;\r\n border-radius: 50%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(220, 220, 220, 0.5);\r\n color: white;\r\n font-size: 2.4rem;\r\n font-weight: bold;\r\n line-height: 1;\r\n text-shadow: black 1px 1px 3px;\r\n overflow: visible;\r\n aspect-ratio: 1 / 1;\r\n z-index: 1;\r\n }\r\n\r\n .hidden {\r\n display: none;\r\n }\r\n`;\r\n"]}
@@ -764,41 +764,51 @@ describe('Collection Browser', () => {
764
764
  },
765
765
  });
766
766
  });
767
- it('applies correct search filter when TV clip filter set to commercials', async () => {
767
+ it('applies correct TV search filter for commercials', async () => {
768
768
  var _a, _b, _c;
769
769
  const searchService = new MockSearchService();
770
770
  const el = await fixture(html `<collection-browser .searchService=${searchService}>
771
771
  </collection-browser>`);
772
772
  el.baseQuery = 'tv-fields';
773
773
  el.searchType = SearchType.TV;
774
- el.tvClipFilter = 'commercials';
774
+ el.selectedFacets = {
775
+ clip_type: {
776
+ commercial: { key: 'commercial', count: 1, state: 'selected' },
777
+ },
778
+ };
775
779
  await el.updateComplete;
776
780
  await el.initialSearchComplete;
777
- expect((_c = (_b = (_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.ad_id) === null || _c === void 0 ? void 0 : _c['*']).to.equal(FilterConstraint.INCLUDE);
781
+ expect((_c = (_b = (_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.clip_type) === null || _c === void 0 ? void 0 : _c.commercial).to.equal(FilterConstraint.INCLUDE);
778
782
  });
779
- it('applies correct search filter when TV clip filter set to factchecks', async () => {
783
+ it('applies correct TV search filter for fact checks', async () => {
780
784
  var _a, _b, _c;
781
785
  const searchService = new MockSearchService();
782
786
  const el = await fixture(html `<collection-browser .searchService=${searchService}>
783
787
  </collection-browser>`);
784
788
  el.baseQuery = 'tv-fields';
785
789
  el.searchType = SearchType.TV;
786
- el.tvClipFilter = 'factchecks';
790
+ el.selectedFacets = {
791
+ clip_type: {
792
+ 'fact check': { key: 'fact check', count: 1, state: 'selected' },
793
+ },
794
+ };
787
795
  await el.updateComplete;
788
796
  await el.initialSearchComplete;
789
- expect((_c = (_b = (_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.factcheck) === null || _c === void 0 ? void 0 : _c['*']).to.equal(FilterConstraint.INCLUDE);
797
+ expect((_c = (_b = (_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.clip_type) === null || _c === void 0 ? void 0 : _c['fact check']).to.equal(FilterConstraint.INCLUDE);
790
798
  });
791
- it('applies correct search filter when TV clip filter set to quotes', async () => {
799
+ it('applies correct TV search filter for quotes', async () => {
792
800
  var _a, _b, _c;
793
801
  const searchService = new MockSearchService();
794
802
  const el = await fixture(html `<collection-browser .searchService=${searchService}>
795
803
  </collection-browser>`);
796
804
  el.baseQuery = 'tv-fields';
797
805
  el.searchType = SearchType.TV;
798
- el.tvClipFilter = 'quotes';
806
+ el.selectedFacets = {
807
+ clip_type: { quote: { key: 'quote', count: 1, state: 'selected' } },
808
+ };
799
809
  await el.updateComplete;
800
810
  await el.initialSearchComplete;
801
- expect((_c = (_b = (_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.clip) === null || _c === void 0 ? void 0 : _c['1']).to.equal(FilterConstraint.INCLUDE);
811
+ expect((_c = (_b = (_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.clip_type) === null || _c === void 0 ? void 0 : _c.quote).to.equal(FilterConstraint.INCLUDE);
802
812
  });
803
813
  it('resets letter filters when query changes', async () => {
804
814
  var _a, _b, _c, _d, _e, _f, _g;