@internetarchive/collection-browser 3.5.2-alpha-webdev8164.0 → 3.5.2-webdev-8162.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/.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/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/app-root.js +606 -606
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +23 -28
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +8 -34
- package/dist/src/collection-facets/more-facets-content.js +159 -358
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +77 -77
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +137 -137
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/models.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +215 -215
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/test/collection-browser.test.js +1 -1
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +31 -137
- package/dist/test/collection-facets/more-facets-content.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 +121 -119
- package/renovate.json +6 -6
- package/src/app-root.ts +1140 -1140
- package/src/collection-facets/facets-template.ts +83 -88
- package/src/collection-facets/more-facets-content.ts +642 -856
- package/src/tiles/grid/collection-tile.ts +163 -163
- package/src/tiles/grid/item-tile.ts +340 -340
- package/src/tiles/models.ts +1 -1
- package/src/tiles/tile-dispatcher.ts +517 -517
- package/test/collection-browser.test.ts +1 -1
- package/test/collection-facets/more-facets-content.test.ts +231 -378
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +52 -41
- package/.husky/pre-commit +0 -4
|
@@ -5,18 +5,13 @@ import { AggregationSortType, } from '@internetarchive/search-service';
|
|
|
5
5
|
import { msg } from '@lit/localize';
|
|
6
6
|
import { facetTitles, suppressedCollections, valueFacetSort, defaultFacetSort, getDefaultSelectedFacets, } from '../models';
|
|
7
7
|
import '@internetarchive/elements/ia-status-indicator/ia-status-indicator';
|
|
8
|
+
import './more-facets-pagination';
|
|
8
9
|
import './facets-template';
|
|
9
10
|
import { analyticsActions, analyticsCategories, } from '../utils/analytics-events';
|
|
10
11
|
import './toggle-switch';
|
|
11
|
-
import './more-facets-pagination';
|
|
12
12
|
import { srOnlyStyle } from '../styles/sr-only';
|
|
13
13
|
import { mergeSelectedFacets, sortBucketsBySelectionState, updateSelectedFacetBucket, } from '../utils/facet-utils';
|
|
14
14
|
import { MORE_FACETS__DEFAULT_PAGE_SIZE, MORE_FACETS__MAX_AGGREGATIONS, } from './models';
|
|
15
|
-
/**
|
|
16
|
-
* Threshold for switching from horizontal scroll to pagination.
|
|
17
|
-
* If facet count >= this value, use pagination. Otherwise use horizontal scroll.
|
|
18
|
-
*/
|
|
19
|
-
const PAGINATION_THRESHOLD = 1000;
|
|
20
15
|
let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
21
16
|
constructor() {
|
|
22
17
|
super(...arguments);
|
|
@@ -39,12 +34,7 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
39
34
|
*/
|
|
40
35
|
this.unappliedFacetChanges = getDefaultSelectedFacets();
|
|
41
36
|
/**
|
|
42
|
-
*
|
|
43
|
-
* Applied to bucket.key for case-insensitive matching.
|
|
44
|
-
*/
|
|
45
|
-
this.filterText = '';
|
|
46
|
-
/**
|
|
47
|
-
* Current page number for pagination (when facet count >= PAGINATION_THRESHOLD).
|
|
37
|
+
* Which page of facets we are showing.
|
|
48
38
|
*/
|
|
49
39
|
this.pageNumber = 1;
|
|
50
40
|
}
|
|
@@ -58,10 +48,6 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
58
48
|
// store it for reuse across pages.
|
|
59
49
|
this.facetGroup = this.mergedFacets;
|
|
60
50
|
}
|
|
61
|
-
// Reset to page 1 when filter text changes (only matters for pagination mode)
|
|
62
|
-
if (changed.has('filterText')) {
|
|
63
|
-
this.pageNumber = 1;
|
|
64
|
-
}
|
|
65
51
|
}
|
|
66
52
|
updated(changed) {
|
|
67
53
|
// If any of the search properties change, it triggers a facet fetch
|
|
@@ -70,7 +56,7 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
70
56
|
changed.has('searchType') ||
|
|
71
57
|
changed.has('filterMap')) {
|
|
72
58
|
this.facetsLoading = true;
|
|
73
|
-
this.pageNumber = 1;
|
|
59
|
+
this.pageNumber = 1;
|
|
74
60
|
this.sortedBy = defaultFacetSort[this.facetKey];
|
|
75
61
|
this.updateSpecificFacets();
|
|
76
62
|
}
|
|
@@ -135,6 +121,20 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
135
121
|
}
|
|
136
122
|
}
|
|
137
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Handler for page number changes from the pagination widget.
|
|
126
|
+
*/
|
|
127
|
+
pageNumberClicked(e) {
|
|
128
|
+
const page = e?.detail?.page;
|
|
129
|
+
if (page) {
|
|
130
|
+
this.pageNumber = Number(page);
|
|
131
|
+
}
|
|
132
|
+
this.analyticsHandler?.sendEvent({
|
|
133
|
+
category: analyticsCategories.default,
|
|
134
|
+
action: analyticsActions.moreFacetsPageChange,
|
|
135
|
+
label: `${this.pageNumber}`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
138
|
/**
|
|
139
139
|
* Combines the selected facets with the aggregations to create a single list of facets
|
|
140
140
|
*/
|
|
@@ -252,211 +252,122 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
|
-
* Returns
|
|
256
|
-
* Filters are applied to the full bucket list before pagination.
|
|
255
|
+
* Returns a FacetGroup representing only the current page of facet buckets to show.
|
|
257
256
|
*/
|
|
258
|
-
get
|
|
259
|
-
const { facetGroup
|
|
257
|
+
get facetGroupForCurrentPage() {
|
|
258
|
+
const { facetGroup } = this;
|
|
260
259
|
if (!facetGroup)
|
|
261
260
|
return undefined;
|
|
262
|
-
//
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
// Filter buckets case-insensitively by bucket key
|
|
267
|
-
const lowerFilter = filterText.toLowerCase().trim();
|
|
268
|
-
const filteredBuckets = facetGroup.buckets.filter(bucket => bucket.key.toLowerCase().includes(lowerFilter));
|
|
261
|
+
// Slice out only the current page of facet buckets
|
|
262
|
+
const firstBucketIndexOnPage = (this.pageNumber - 1) * this.facetsPerPage;
|
|
263
|
+
const truncatedBuckets = facetGroup.buckets.slice(firstBucketIndexOnPage, firstBucketIndexOnPage + this.facetsPerPage);
|
|
269
264
|
return {
|
|
270
265
|
...facetGroup,
|
|
271
|
-
buckets:
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Determines whether to use pagination based on the number of filtered facets.
|
|
276
|
-
* Returns true if facet count >= PAGINATION_THRESHOLD, false otherwise.
|
|
277
|
-
*/
|
|
278
|
-
get usePagination() {
|
|
279
|
-
const facetCount = this.filteredFacetGroup?.buckets.length ?? 0;
|
|
280
|
-
return facetCount >= PAGINATION_THRESHOLD;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Returns the facet group for the current page.
|
|
284
|
-
* If using pagination (>= 1000 facets), slices to show only the current page.
|
|
285
|
-
* Otherwise, returns all facets for horizontal scrolling.
|
|
286
|
-
*/
|
|
287
|
-
get facetGroupForCurrentPage() {
|
|
288
|
-
const filteredGroup = this.filteredFacetGroup;
|
|
289
|
-
if (!filteredGroup)
|
|
290
|
-
return undefined;
|
|
291
|
-
// If facet count is below threshold, show all facets with horizontal scroll
|
|
292
|
-
if (!this.usePagination) {
|
|
293
|
-
return filteredGroup;
|
|
294
|
-
}
|
|
295
|
-
// Otherwise, use pagination - slice to current page
|
|
296
|
-
const startIndex = (this.pageNumber - 1) * this.facetsPerPage;
|
|
297
|
-
const endIndex = startIndex + this.facetsPerPage;
|
|
298
|
-
const slicedBuckets = filteredGroup.buckets.slice(startIndex, endIndex);
|
|
299
|
-
return {
|
|
300
|
-
...filteredGroup,
|
|
301
|
-
buckets: slicedBuckets,
|
|
266
|
+
buckets: truncatedBuckets,
|
|
302
267
|
};
|
|
303
268
|
}
|
|
304
269
|
get moreFacetsTemplate() {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
return html `
|
|
312
|
-
<facets-template
|
|
313
|
-
.facetGroup=${facetGroup}
|
|
314
|
-
.selectedFacets=${this.selectedFacets}
|
|
315
|
-
.collectionTitles=${this.collectionTitles}
|
|
270
|
+
return html `
|
|
271
|
+
<facets-template
|
|
272
|
+
.facetGroup=${this.facetGroupForCurrentPage}
|
|
273
|
+
.selectedFacets=${this.selectedFacets}
|
|
274
|
+
.collectionTitles=${this.collectionTitles}
|
|
316
275
|
@facetClick=${(e) => {
|
|
317
276
|
if (this.facetKey) {
|
|
318
277
|
this.unappliedFacetChanges = updateSelectedFacetBucket(this.unappliedFacetChanges, this.facetKey, e.detail.bucket);
|
|
319
278
|
}
|
|
320
|
-
}}
|
|
321
|
-
></facets-template>
|
|
279
|
+
}}
|
|
280
|
+
></facets-template>
|
|
322
281
|
`;
|
|
323
282
|
}
|
|
324
283
|
get loaderTemplate() {
|
|
325
|
-
return html `
|
|
326
|
-
<ia-status-indicator
|
|
327
|
-
class="facets-loader"
|
|
328
|
-
mode="loading"
|
|
329
|
-
></ia-status-indicator>
|
|
330
|
-
`;
|
|
331
|
-
}
|
|
332
|
-
get emptyFilterResultsTemplate() {
|
|
333
|
-
return html `
|
|
334
|
-
<div class="empty-results">
|
|
335
|
-
<p>${msg('No matching values found.')}</p>
|
|
336
|
-
<p class="hint">${msg('Try a different search term.')}</p>
|
|
337
|
-
</div>
|
|
284
|
+
return html `
|
|
285
|
+
<ia-status-indicator
|
|
286
|
+
class="facets-loader"
|
|
287
|
+
mode="loading"
|
|
288
|
+
></ia-status-indicator>
|
|
338
289
|
`;
|
|
339
290
|
}
|
|
340
291
|
/**
|
|
341
|
-
*
|
|
292
|
+
* How many pages of facets to show in the modal pagination widget
|
|
342
293
|
*/
|
|
343
294
|
get paginationSize() {
|
|
344
|
-
|
|
345
|
-
|
|
295
|
+
if (!this.aggregations || !this.facetKey)
|
|
296
|
+
return 0;
|
|
297
|
+
// Calculate the appropriate number of pages to show in the modal pagination widget
|
|
298
|
+
const length = this.aggregations[this.facetKey]?.buckets.length;
|
|
299
|
+
return Math.ceil(length / this.facetsPerPage);
|
|
346
300
|
}
|
|
347
|
-
|
|
348
|
-
* Template for pagination component (only shown when facet count >= PAGINATION_THRESHOLD).
|
|
349
|
-
*/
|
|
301
|
+
// render pagination if more then 1 page
|
|
350
302
|
get facetsPaginationTemplate() {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
303
|
+
return this.paginationSize > 1
|
|
304
|
+
? html `<more-facets-pagination
|
|
305
|
+
.size=${this.paginationSize}
|
|
306
|
+
.currentPage=${1}
|
|
307
|
+
@pageNumberClicked=${this.pageNumberClicked}
|
|
308
|
+
></more-facets-pagination>`
|
|
309
|
+
: nothing;
|
|
358
310
|
}
|
|
359
311
|
get footerTemplate() {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
312
|
+
if (this.paginationSize > 0) {
|
|
313
|
+
return html `${this.facetsPaginationTemplate}
|
|
314
|
+
<div class="footer">
|
|
315
|
+
<button
|
|
316
|
+
class="btn btn-cancel"
|
|
317
|
+
type="button"
|
|
318
|
+
@click=${this.cancelClick}
|
|
319
|
+
>
|
|
320
|
+
Cancel
|
|
321
|
+
</button>
|
|
322
|
+
<button
|
|
323
|
+
class="btn btn-submit"
|
|
324
|
+
type="button"
|
|
325
|
+
@click=${this.applySearchFacetsClicked}
|
|
326
|
+
>
|
|
327
|
+
Apply filters
|
|
328
|
+
</button>
|
|
329
|
+
</div> `;
|
|
330
|
+
}
|
|
331
|
+
return nothing;
|
|
375
332
|
}
|
|
376
333
|
sortFacetAggregation(facetSortType) {
|
|
377
334
|
this.sortedBy = facetSortType;
|
|
378
335
|
this.dispatchEvent(new CustomEvent('sortedFacets', { detail: this.sortedBy }));
|
|
379
336
|
}
|
|
380
|
-
/**
|
|
381
|
-
* Handler for filter input changes. Updates the filter text and triggers re-render.
|
|
382
|
-
*/
|
|
383
|
-
handleFilterInput(e) {
|
|
384
|
-
const input = e.target;
|
|
385
|
-
this.filterText = input.value;
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Handler for pagination page number clicks.
|
|
389
|
-
* Only used when facet count >= PAGINATION_THRESHOLD.
|
|
390
|
-
*/
|
|
391
|
-
pageNumberClicked(e) {
|
|
392
|
-
this.pageNumber = e.detail.page;
|
|
393
|
-
// Track page navigation in analytics
|
|
394
|
-
this.analyticsHandler?.sendEvent({
|
|
395
|
-
category: analyticsCategories.default,
|
|
396
|
-
action: analyticsActions.moreFacetsPageChange,
|
|
397
|
-
label: `${this.pageNumber}`,
|
|
398
|
-
});
|
|
399
|
-
this.dispatchEvent(new CustomEvent('pageChanged', { detail: this.pageNumber }));
|
|
400
|
-
}
|
|
401
337
|
get modalHeaderTemplate() {
|
|
402
338
|
const facetSort = this.sortedBy ?? defaultFacetSort[this.facetKey];
|
|
403
339
|
const defaultSwitchSide = facetSort === AggregationSortType.COUNT ? 'left' : 'right';
|
|
404
|
-
return html `<span class="sr-only">${msg('More facets for:')}</span>
|
|
405
|
-
<span class="title">
|
|
406
|
-
${this.facetGroup?.title}
|
|
407
|
-
|
|
408
|
-
<label class="sort-label">${msg('Sort by:')}</label>
|
|
340
|
+
return html `<span class="sr-only">${msg('More facets for:')}</span>
|
|
341
|
+
<span class="title">
|
|
342
|
+
${this.facetGroup?.title}
|
|
343
|
+
|
|
344
|
+
<label class="sort-label">${msg('Sort by:')}</label>
|
|
409
345
|
${this.facetKey
|
|
410
|
-
? html `<toggle-switch
|
|
411
|
-
class="sort-toggle"
|
|
412
|
-
leftValue=${AggregationSortType.COUNT}
|
|
413
|
-
leftLabel="Count"
|
|
414
|
-
rightValue=${valueFacetSort[this.facetKey]}
|
|
415
|
-
.rightLabel=${this.facetGroup?.title}
|
|
416
|
-
side=${defaultSwitchSide}
|
|
346
|
+
? html `<toggle-switch
|
|
347
|
+
class="sort-toggle"
|
|
348
|
+
leftValue=${AggregationSortType.COUNT}
|
|
349
|
+
leftLabel="Count"
|
|
350
|
+
rightValue=${valueFacetSort[this.facetKey]}
|
|
351
|
+
.rightLabel=${this.facetGroup?.title}
|
|
352
|
+
side=${defaultSwitchSide}
|
|
417
353
|
@change=${(e) => {
|
|
418
354
|
this.sortFacetAggregation(Number(e.detail));
|
|
419
|
-
}}
|
|
355
|
+
}}
|
|
420
356
|
></toggle-switch>`
|
|
421
|
-
: nothing}
|
|
422
|
-
|
|
423
|
-
<label class="filter-label" for="facet-filter"
|
|
424
|
-
>${msg('Filter by:')}</label
|
|
425
|
-
>
|
|
426
|
-
<input
|
|
427
|
-
id="facet-filter"
|
|
428
|
-
type="text"
|
|
429
|
-
class="filter-input"
|
|
430
|
-
.value=${this.filterText}
|
|
431
|
-
@input=${this.handleFilterInput}
|
|
432
|
-
placeholder=${msg('Search...')}
|
|
433
|
-
aria-label=${msg('Filter facets')}
|
|
434
|
-
/>
|
|
357
|
+
: nothing}
|
|
435
358
|
</span>`;
|
|
436
359
|
}
|
|
437
360
|
render() {
|
|
438
|
-
|
|
439
|
-
? 'facets-content pagination-mode'
|
|
440
|
-
: 'facets-content horizontal-scroll-mode';
|
|
441
|
-
const sectionClass = this.usePagination
|
|
442
|
-
? 'pagination-mode'
|
|
443
|
-
: 'horizontal-scroll-mode';
|
|
444
|
-
return html `
|
|
361
|
+
return html `
|
|
445
362
|
${this.facetsLoading
|
|
446
363
|
? this.loaderTemplate
|
|
447
|
-
: html `
|
|
448
|
-
<section id="more-facets"
|
|
449
|
-
<div class="header-content">${this.modalHeaderTemplate}</div>
|
|
450
|
-
<div class="
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
${this.moreFacetsTemplate}
|
|
455
|
-
</div>`}
|
|
456
|
-
</div>
|
|
457
|
-
${this.footerTemplate}
|
|
458
|
-
</section>
|
|
459
|
-
`}
|
|
364
|
+
: html `
|
|
365
|
+
<section id="more-facets">
|
|
366
|
+
<div class="header-content">${this.modalHeaderTemplate}</div>
|
|
367
|
+
<div class="facets-content">${this.moreFacetsTemplate}</div>
|
|
368
|
+
${this.footerTemplate}
|
|
369
|
+
</section>
|
|
370
|
+
`}
|
|
460
371
|
`;
|
|
461
372
|
}
|
|
462
373
|
applySearchFacetsClicked() {
|
|
@@ -469,8 +380,6 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
469
380
|
this.dispatchEvent(event);
|
|
470
381
|
// Reset the unapplied changes back to default, now that they have been applied
|
|
471
382
|
this.unappliedFacetChanges = getDefaultSelectedFacets();
|
|
472
|
-
// Reset filter text
|
|
473
|
-
this.filterText = '';
|
|
474
383
|
this.modalManager?.closeModal();
|
|
475
384
|
this.analyticsHandler?.sendEvent({
|
|
476
385
|
category: analyticsCategories.default,
|
|
@@ -481,8 +390,6 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
481
390
|
cancelClick() {
|
|
482
391
|
// Reset the unapplied changes back to default
|
|
483
392
|
this.unappliedFacetChanges = getDefaultSelectedFacets();
|
|
484
|
-
// Reset filter text
|
|
485
|
-
this.filterText = '';
|
|
486
393
|
this.modalManager?.closeModal();
|
|
487
394
|
this.analyticsHandler?.sendEvent({
|
|
488
395
|
category: analyticsCategories.default,
|
|
@@ -494,176 +401,73 @@ let MoreFacetsContent = class MoreFacetsContent extends LitElement {
|
|
|
494
401
|
const modalSubmitButton = css `var(--primaryButtonBGColor, #194880)`;
|
|
495
402
|
return [
|
|
496
403
|
srOnlyStyle,
|
|
497
|
-
css `
|
|
498
|
-
section#more-facets {
|
|
499
|
-
overflow: auto;
|
|
500
|
-
padding: 10px; /* leaves room for scroll bar to appear without overlaying on content */
|
|
501
|
-
--facetsColumnCount: 3;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
.facets-content {
|
|
565
|
-
font-size: 1.2rem;
|
|
566
|
-
max-height: 300px;
|
|
567
|
-
padding: 10px;
|
|
568
|
-
/* Force scrollbar to always be visible */
|
|
569
|
-
scrollbar-width: thin; /* Firefox */
|
|
570
|
-
scrollbar-color: #888 #f1f1f1; /* Firefox - thumb and track colors */
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/* Pagination mode: vertical scrolling, allow taller height for multiple columns */
|
|
574
|
-
.facets-content.pagination-mode {
|
|
575
|
-
overflow-y: auto;
|
|
576
|
-
overflow-x: hidden;
|
|
577
|
-
max-height: none; /* Remove height constraint to allow columns to flow properly */
|
|
578
|
-
height: 300px; /* Fixed height to enable vertical scroll */
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
/* Horizontal scroll mode: horizontal scrolling only */
|
|
582
|
-
.facets-content.horizontal-scroll-mode {
|
|
583
|
-
overflow-x: auto;
|
|
584
|
-
overflow-y: hidden;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/* Webkit browsers scrollbar styling - always visible */
|
|
588
|
-
.facets-content::-webkit-scrollbar {
|
|
589
|
-
width: 12px; /* Vertical scrollbar width */
|
|
590
|
-
height: 12px; /* Horizontal scrollbar height */
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.facets-content::-webkit-scrollbar-track {
|
|
594
|
-
background: #f1f1f1;
|
|
595
|
-
border-radius: 6px;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.facets-content::-webkit-scrollbar-thumb {
|
|
599
|
-
background: #888;
|
|
600
|
-
border-radius: 6px;
|
|
601
|
-
min-height: 30px; /* Ensure thumb is always visible when scrolling is possible */
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.facets-content::-webkit-scrollbar-thumb:hover {
|
|
605
|
-
background: #555;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/* Force corner to match track color */
|
|
609
|
-
.facets-content::-webkit-scrollbar-corner {
|
|
610
|
-
background: #f1f1f1;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.facets-horizontal-container {
|
|
614
|
-
display: inline-block;
|
|
615
|
-
min-width: 100%;
|
|
616
|
-
/* Allow natural width expansion based on content */
|
|
617
|
-
width: fit-content;
|
|
618
|
-
}
|
|
619
|
-
.facets-loader {
|
|
620
|
-
--icon-width: 70px;
|
|
621
|
-
margin-bottom: 20px;
|
|
622
|
-
display: block;
|
|
623
|
-
margin-left: auto;
|
|
624
|
-
margin-right: auto;
|
|
625
|
-
}
|
|
626
|
-
.btn {
|
|
627
|
-
border: none;
|
|
628
|
-
padding: 10px;
|
|
629
|
-
margin-bottom: 10px;
|
|
630
|
-
width: auto;
|
|
631
|
-
border-radius: 4px;
|
|
632
|
-
cursor: pointer;
|
|
633
|
-
}
|
|
634
|
-
.btn-cancel {
|
|
635
|
-
background-color: #2c2c2c;
|
|
636
|
-
color: white;
|
|
637
|
-
}
|
|
638
|
-
.btn-submit {
|
|
639
|
-
background-color: ${modalSubmitButton};
|
|
640
|
-
color: white;
|
|
641
|
-
}
|
|
642
|
-
.footer {
|
|
643
|
-
text-align: center;
|
|
644
|
-
margin-top: 10px;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
@media (max-width: 560px) {
|
|
648
|
-
section#more-facets.horizontal-scroll-mode,
|
|
649
|
-
section#more-facets.pagination-mode {
|
|
650
|
-
max-height: 450px;
|
|
651
|
-
--facetsColumnCount: 1; /* Single column on mobile */
|
|
652
|
-
--facetsMaxHeight: none; /* Remove fixed height for vertical scrolling */
|
|
653
|
-
}
|
|
654
|
-
/* On mobile, always use vertical scrolling regardless of mode */
|
|
655
|
-
.facets-content,
|
|
656
|
-
.facets-content.pagination-mode,
|
|
657
|
-
.facets-content.horizontal-scroll-mode {
|
|
658
|
-
overflow-y: auto;
|
|
659
|
-
overflow-x: hidden;
|
|
660
|
-
height: 300px;
|
|
661
|
-
}
|
|
662
|
-
.filter-input {
|
|
663
|
-
width: 120px;
|
|
664
|
-
font-size: 1.2rem;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
404
|
+
css `
|
|
405
|
+
section#more-facets {
|
|
406
|
+
overflow: auto;
|
|
407
|
+
padding: 10px; /* leaves room for scroll bar to appear without overlaying on content */
|
|
408
|
+
--facetsColumnCount: 3;
|
|
409
|
+
}
|
|
410
|
+
.header-content .title {
|
|
411
|
+
display: block;
|
|
412
|
+
text-align: left;
|
|
413
|
+
font-size: 1.8rem;
|
|
414
|
+
padding: 0 10px;
|
|
415
|
+
font-weight: bold;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.sort-label {
|
|
419
|
+
margin-left: 20px;
|
|
420
|
+
font-size: 1.3rem;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.sort-toggle {
|
|
424
|
+
font-weight: normal;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.facets-content {
|
|
428
|
+
font-size: 1.2rem;
|
|
429
|
+
max-height: 300px;
|
|
430
|
+
overflow: auto;
|
|
431
|
+
padding: 10px;
|
|
432
|
+
}
|
|
433
|
+
.facets-loader {
|
|
434
|
+
--icon-width: 70px;
|
|
435
|
+
margin-bottom: 20px;
|
|
436
|
+
display: block;
|
|
437
|
+
margin-left: auto;
|
|
438
|
+
margin-right: auto;
|
|
439
|
+
}
|
|
440
|
+
.btn {
|
|
441
|
+
border: none;
|
|
442
|
+
padding: 10px;
|
|
443
|
+
margin-bottom: 10px;
|
|
444
|
+
width: auto;
|
|
445
|
+
border-radius: 4px;
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
}
|
|
448
|
+
.btn-cancel {
|
|
449
|
+
background-color: #2c2c2c;
|
|
450
|
+
color: white;
|
|
451
|
+
}
|
|
452
|
+
.btn-submit {
|
|
453
|
+
background-color: ${modalSubmitButton};
|
|
454
|
+
color: white;
|
|
455
|
+
}
|
|
456
|
+
.footer {
|
|
457
|
+
text-align: center;
|
|
458
|
+
margin-top: 10px;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@media (max-width: 560px) {
|
|
462
|
+
section#more-facets {
|
|
463
|
+
max-height: 450px;
|
|
464
|
+
--facetsColumnCount: 1;
|
|
465
|
+
}
|
|
466
|
+
.facets-content {
|
|
467
|
+
overflow-y: auto;
|
|
468
|
+
height: 300px;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
667
471
|
`,
|
|
668
472
|
];
|
|
669
473
|
}
|
|
@@ -725,9 +529,6 @@ __decorate([
|
|
|
725
529
|
__decorate([
|
|
726
530
|
state()
|
|
727
531
|
], MoreFacetsContent.prototype, "unappliedFacetChanges", void 0);
|
|
728
|
-
__decorate([
|
|
729
|
-
state()
|
|
730
|
-
], MoreFacetsContent.prototype, "filterText", void 0);
|
|
731
532
|
__decorate([
|
|
732
533
|
state()
|
|
733
534
|
], MoreFacetsContent.prototype, "pageNumber", void 0);
|