@internetarchive/collection-browser 4.1.0-alpha-webdev8186.5 → 4.2.0-alpha-webdev8164.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.
- 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/.husky/pre-commit +1 -4
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/collection-facets/facets-template.js +5 -0
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +92 -8
- package/dist/src/collection-facets/more-facets-content.js +526 -84
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +12 -3
- package/dist/src/collection-facets/more-facets-pagination.js +69 -8
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.js +1 -0
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +162 -3
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +63 -3
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -1
- package/dist/test/mocks/mock-search-responses.d.ts +5 -0
- package/dist/test/mocks/mock-search-responses.js +44 -0
- package/dist/test/mocks/mock-search-responses.js.map +1 -1
- package/dist/test/mocks/mock-search-service.js +2 -1
- package/dist/test/mocks/mock-search-service.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 -121
- package/renovate.json +6 -6
- package/src/collection-facets/facets-template.ts +5 -0
- package/src/collection-facets/more-facets-content.ts +566 -96
- package/src/collection-facets/more-facets-pagination.ts +80 -9
- package/src/collection-facets/toggle-switch.ts +1 -0
- package/test/collection-facets/more-facets-content.test.ts +251 -4
- package/test/collection-facets/more-facets-pagination.test.ts +87 -3
- package/test/mocks/mock-search-responses.ts +48 -0
- package/test/mocks/mock-search-service.ts +2 -0
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +52 -52
- package/.claude/settings.local.json +0 -8
package/README.md
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
 [](https://codecov.io/gh/internetarchive/iaux-collection-browser)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# Internet Archive Collection Browser
|
|
5
|
-
|
|
6
|
-
This is the main collection browser for the Internet Archive website.
|
|
7
|
-
|
|
8
|
-
[Review app URL](https://internetarchive.github.io/iaux-collection-browser/main)
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
import '@internetarchive/collection-browser';
|
|
13
|
-
|
|
14
|
-
<collection-browser>
|
|
15
|
-
</collection-browser>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Local Demo with `web-dev-server`
|
|
19
|
-
```bash
|
|
20
|
-
yarn install
|
|
21
|
-
yarn start
|
|
22
|
-
```
|
|
23
|
-
To run a local development server that serves the basic demo located in `index.html`
|
|
24
|
-
|
|
25
|
-
## Testing with Web Test Runner
|
|
26
|
-
To run the suite of Web Test Runner tests, run
|
|
27
|
-
```bash
|
|
28
|
-
yarn run test
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
yarn run test:watch
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Linting with ESLint, Prettier, and Types
|
|
38
|
-
To scan the project for linting errors, run
|
|
39
|
-
```bash
|
|
40
|
-
yarn run lint
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
You can lint with ESLint and Prettier individually as well
|
|
44
|
-
```bash
|
|
45
|
-
yarn run lint:eslint
|
|
46
|
-
```
|
|
47
|
-
```bash
|
|
48
|
-
yarn run lint:prettier
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
To automatically fix many linting errors, run
|
|
52
|
-
```bash
|
|
53
|
-
yarn run format
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
You can format using ESLint and Prettier individually as well
|
|
57
|
-
```bash
|
|
58
|
-
yarn run format:eslint
|
|
59
|
-
```
|
|
60
|
-
```bash
|
|
61
|
-
yarn run format:prettier
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Tooling configs
|
|
65
|
-
|
|
66
|
-
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
67
|
-
|
|
68
|
-
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
69
|
-
|
|
70
|
-
## Manual Deploy using `gh-pages`
|
|
71
|
-
|
|
72
|
-
Live demo app from current main branch: [https://internetarchive.github.io/iaux-collection-browser](https://internetarchive.github.io/iaux-collection-browser)
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
yarn run deploy
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Automatic Deploy of Demo App
|
|
79
|
-
|
|
80
|
-
When you create a Pull Request, if your code passes codecov unit tests, it will be always served live at base url / pull request number. For this demo app, you must create a Pull Request, nothing will be created from a simple branch.
|
|
81
|
-
|
|
82
|
-
This URL will be removed when the Pull Request is merged/closed.
|
|
83
|
-
|
|
1
|
+
 [](https://codecov.io/gh/internetarchive/iaux-collection-browser)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# Internet Archive Collection Browser
|
|
5
|
+
|
|
6
|
+
This is the main collection browser for the Internet Archive website.
|
|
7
|
+
|
|
8
|
+
[Review app URL](https://internetarchive.github.io/iaux-collection-browser/main)
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import '@internetarchive/collection-browser';
|
|
13
|
+
|
|
14
|
+
<collection-browser>
|
|
15
|
+
</collection-browser>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Local Demo with `web-dev-server`
|
|
19
|
+
```bash
|
|
20
|
+
yarn install
|
|
21
|
+
yarn start
|
|
22
|
+
```
|
|
23
|
+
To run a local development server that serves the basic demo located in `index.html`
|
|
24
|
+
|
|
25
|
+
## Testing with Web Test Runner
|
|
26
|
+
To run the suite of Web Test Runner tests, run
|
|
27
|
+
```bash
|
|
28
|
+
yarn run test
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn run test:watch
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Linting with ESLint, Prettier, and Types
|
|
38
|
+
To scan the project for linting errors, run
|
|
39
|
+
```bash
|
|
40
|
+
yarn run lint
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
You can lint with ESLint and Prettier individually as well
|
|
44
|
+
```bash
|
|
45
|
+
yarn run lint:eslint
|
|
46
|
+
```
|
|
47
|
+
```bash
|
|
48
|
+
yarn run lint:prettier
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
To automatically fix many linting errors, run
|
|
52
|
+
```bash
|
|
53
|
+
yarn run format
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
You can format using ESLint and Prettier individually as well
|
|
57
|
+
```bash
|
|
58
|
+
yarn run format:eslint
|
|
59
|
+
```
|
|
60
|
+
```bash
|
|
61
|
+
yarn run format:prettier
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Tooling configs
|
|
65
|
+
|
|
66
|
+
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
67
|
+
|
|
68
|
+
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
69
|
+
|
|
70
|
+
## Manual Deploy using `gh-pages`
|
|
71
|
+
|
|
72
|
+
Live demo app from current main branch: [https://internetarchive.github.io/iaux-collection-browser](https://internetarchive.github.io/iaux-collection-browser)
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
yarn run deploy
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Automatic Deploy of Demo App
|
|
79
|
+
|
|
80
|
+
When you create a Pull Request, if your code passes codecov unit tests, it will be always served live at base url / pull request number. For this demo app, you must create a Pull Request, nothing will be created from a simple branch.
|
|
81
|
+
|
|
82
|
+
This URL will be removed when the Pull Request is merged/closed.
|
|
83
|
+
|
|
84
84
|
Example: `https://internetarchive.github.io/iaux-collection-browser/pr/<pr-number>`
|
|
@@ -38,10 +38,15 @@ let FacetsTemplate = class FacetsTemplate extends LitElement {
|
|
|
38
38
|
static get styles() {
|
|
39
39
|
const columnCount = css `var(--facetsColumnCount, 1)`;
|
|
40
40
|
const columnGap = css `var(--facetsColumnGap, 15px)`;
|
|
41
|
+
const columnWidth = css `var(--facetsColumnWidth, auto)`;
|
|
42
|
+
const maxHeight = css `var(--facetsMaxHeight, none)`;
|
|
41
43
|
return css `
|
|
42
44
|
.facet-rows {
|
|
43
45
|
column-count: ${columnCount};
|
|
44
46
|
column-gap: ${columnGap};
|
|
47
|
+
column-width: ${columnWidth};
|
|
48
|
+
max-height: ${maxHeight};
|
|
49
|
+
column-fill: auto;
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
a:link,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets-template.js","sourceRoot":"","sources":["../../../src/collection-facets/facets-template.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EAGV,OAAO,GACR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,aAAa,CAAC;AAGd,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAMpC,YAAY,CAAC,CAAiC;QACpD,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAEO,uBAAuB,CAAC,MAAyB;QACvD,MAAM,KAAK,GAAG,IAAI,WAAW,CAAoB,YAAY,EAAE;YAC7D,MAAM;YACN,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAY,cAAc;QACxB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,UAAU;YAAE,OAAO,OAAO,CAAC;QAEhC,MAAM,YAAY,GAAG,UAAU,CAAC,OAAwB,CAAC;QAEzD,2CAA2C;QAC3C,sEAAsE;QACtE,OAAO,IAAI,CAAA;uDACwC,UAAU,CAAC,GAAG;UAC3D,MAAM,CACN,YAAY,EACZ,MAAM,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,EAC3C,MAAM,CAAC,EAAE,CACP,IAAI,CAAA;2BACW,UAAU,CAAC,GAAG;wBACjB,MAAM;kCACI,IAAI,CAAC,gBAAgB;4BAC3B,IAAI,CAAC,YAAY;0BACnB,CACjB;;KAEJ,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,MAAM;QACf,MAAM,WAAW,GAAG,GAAG,CAAA,6BAA6B,CAAC;QACrD,MAAM,SAAS,GAAG,GAAG,CAAA,8BAA8B,CAAC;QAEpD,OAAO,GAAG,CAAA;;wBAEU,WAAW;sBACb,SAAS
|
|
1
|
+
{"version":3,"file":"facets-template.js","sourceRoot":"","sources":["../../../src/collection-facets/facets-template.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EAGV,OAAO,GACR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,aAAa,CAAC;AAGd,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAMpC,YAAY,CAAC,CAAiC;QACpD,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAEO,uBAAuB,CAAC,MAAyB;QACvD,MAAM,KAAK,GAAG,IAAI,WAAW,CAAoB,YAAY,EAAE;YAC7D,MAAM;YACN,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAY,cAAc;QACxB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,UAAU;YAAE,OAAO,OAAO,CAAC;QAEhC,MAAM,YAAY,GAAG,UAAU,CAAC,OAAwB,CAAC;QAEzD,2CAA2C;QAC3C,sEAAsE;QACtE,OAAO,IAAI,CAAA;uDACwC,UAAU,CAAC,GAAG;UAC3D,MAAM,CACN,YAAY,EACZ,MAAM,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,EAC3C,MAAM,CAAC,EAAE,CACP,IAAI,CAAA;2BACW,UAAU,CAAC,GAAG;wBACjB,MAAM;kCACI,IAAI,CAAC,gBAAgB;4BAC3B,IAAI,CAAC,YAAY;0BACnB,CACjB;;KAEJ,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,MAAM;QACf,MAAM,WAAW,GAAG,GAAG,CAAA,6BAA6B,CAAC;QACrD,MAAM,SAAS,GAAG,GAAG,CAAA,8BAA8B,CAAC;QACpD,MAAM,WAAW,GAAG,GAAG,CAAA,gCAAgC,CAAC;QACxD,MAAM,SAAS,GAAG,GAAG,CAAA,8BAA8B,CAAC;QAEpD,OAAO,GAAG,CAAA;;wBAEU,WAAW;sBACb,SAAS;wBACP,WAAW;sBACb,SAAS;;;;;;;;;;;;KAY1B,CAAC;IACJ,CAAC;CACF,CAAA;AAvE6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAyB;AAGpD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDACS;AAJzB,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAwE1B","sourcesContent":["import {\n css,\n html,\n LitElement,\n TemplateResult,\n CSSResultGroup,\n nothing,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport type { FacetGroup, FacetBucket, FacetEventDetails } from '../models';\nimport type { CollectionTitles } from '../data-source/models';\nimport './facet-row';\n\n@customElement('facets-template')\nexport class FacetsTemplate extends LitElement {\n @property({ type: Object }) facetGroup?: FacetGroup;\n\n @property({ type: Object })\n collectionTitles?: CollectionTitles;\n\n private facetClicked(e: CustomEvent<FacetEventDetails>) {\n this.dispatchFacetClickEvent(e.detail);\n }\n\n private dispatchFacetClickEvent(detail: FacetEventDetails) {\n const event = new CustomEvent<FacetEventDetails>('facetClick', {\n detail,\n composed: true,\n });\n this.dispatchEvent(event);\n }\n\n private get facetsTemplate(): TemplateResult | typeof nothing {\n const { facetGroup } = this;\n if (!facetGroup) return nothing;\n\n const facetBuckets = facetGroup.buckets as FacetBucket[];\n\n // Added data-testid for Playwright testing\n // Using className and aria-labels is not ideal for Playwright locator\n return html`\n <div class=\"facet-rows\" data-testid=\"facets-on-${facetGroup.key}\">\n ${repeat(\n facetBuckets,\n bucket => `${facetGroup.key}:${bucket.key}`,\n bucket =>\n html`<facet-row\n .facetType=${facetGroup.key}\n .bucket=${bucket}\n .collectionTitles=${this.collectionTitles}\n @facetClick=${this.facetClicked}\n ></facet-row>`,\n )}\n </div>\n `;\n }\n\n render() {\n return html`${this.facetsTemplate}`;\n }\n\n static get styles(): CSSResultGroup {\n const columnCount = css`var(--facetsColumnCount, 1)`;\n const columnGap = css`var(--facetsColumnGap, 15px)`;\n const columnWidth = css`var(--facetsColumnWidth, auto)`;\n const maxHeight = css`var(--facetsMaxHeight, none)`;\n\n return css`\n .facet-rows {\n column-count: ${columnCount};\n column-gap: ${columnGap};\n column-width: ${columnWidth};\n max-height: ${maxHeight};\n column-fill: auto;\n }\n\n a:link,\n a:visited {\n text-decoration: none;\n color: var(--ia-theme-link-color, #4b64ff);\n }\n a:hover {\n text-decoration: underline;\n }\n `;\n }\n}\n"]}
|
|
@@ -5,9 +5,10 @@ import type { AnalyticsManagerInterface } from '@internetarchive/analytics-manag
|
|
|
5
5
|
import { SelectedFacets, FacetOption } from '../models';
|
|
6
6
|
import type { CollectionTitles, PageSpecifierParams, TVChannelAliases } from '../data-source/models';
|
|
7
7
|
import '@internetarchive/elements/ia-status-indicator/ia-status-indicator';
|
|
8
|
-
import './more-facets-pagination';
|
|
9
8
|
import './facets-template';
|
|
10
9
|
import './toggle-switch';
|
|
10
|
+
import './more-facets-pagination';
|
|
11
|
+
import '@internetarchive/ia-clearable-text-input';
|
|
11
12
|
export declare class MoreFacetsContent extends LitElement {
|
|
12
13
|
facetKey?: FacetOption;
|
|
13
14
|
query?: string;
|
|
@@ -51,11 +52,69 @@ export declare class MoreFacetsContent extends LitElement {
|
|
|
51
52
|
*/
|
|
52
53
|
private unappliedFacetChanges;
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
+
* Text entered by the user to filter facet buckets.
|
|
56
|
+
* Applied to bucket.key for case-insensitive matching.
|
|
57
|
+
*/
|
|
58
|
+
private filterText;
|
|
59
|
+
/**
|
|
60
|
+
* Current page number for pagination (when facet count >= PAGINATION_THRESHOLD).
|
|
55
61
|
*/
|
|
56
62
|
private pageNumber;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the component is narrow enough to warrant compact pagination.
|
|
65
|
+
* Updated via a ResizeObserver-based container query approach.
|
|
66
|
+
*/
|
|
67
|
+
private isCompactView;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the horizontal scroll is at the leftmost position.
|
|
70
|
+
*/
|
|
71
|
+
private atScrollStart;
|
|
72
|
+
/**
|
|
73
|
+
* Whether the horizontal scroll is at the rightmost position.
|
|
74
|
+
*/
|
|
75
|
+
private atScrollEnd;
|
|
76
|
+
private filterInput;
|
|
77
|
+
private facetsContentEl;
|
|
57
78
|
willUpdate(changed: PropertyValues): void;
|
|
79
|
+
updated(changed: PropertyValues): void;
|
|
80
|
+
private resizeObserver?;
|
|
58
81
|
firstUpdated(): void;
|
|
82
|
+
disconnectedCallback(): void;
|
|
83
|
+
private scrollHandler;
|
|
84
|
+
private scrollListenerAttached;
|
|
85
|
+
/**
|
|
86
|
+
* Attaches a scroll event listener to the facets content element
|
|
87
|
+
* to track horizontal scroll position for arrow button states.
|
|
88
|
+
*/
|
|
89
|
+
private attachScrollListener;
|
|
90
|
+
private removeScrollListener;
|
|
91
|
+
/**
|
|
92
|
+
* Updates the scroll arrow disabled states based on current scroll position.
|
|
93
|
+
*/
|
|
94
|
+
private updateScrollState;
|
|
95
|
+
/**
|
|
96
|
+
* Calculates the width of one column step (column width + gap) based on
|
|
97
|
+
* the CSS multi-column layout of the scroll container.
|
|
98
|
+
*/
|
|
99
|
+
private getColumnStep;
|
|
100
|
+
/**
|
|
101
|
+
* Snaps a scroll target to the nearest column boundary.
|
|
102
|
+
*/
|
|
103
|
+
private snapToColumn;
|
|
104
|
+
/**
|
|
105
|
+
* Scrolls the facet content left by approximately one page, snapping to
|
|
106
|
+
* the nearest column boundary.
|
|
107
|
+
*/
|
|
108
|
+
private onScrollLeft;
|
|
109
|
+
/**
|
|
110
|
+
* Scrolls the facet content right by approximately one page, snapping to
|
|
111
|
+
* the nearest column boundary.
|
|
112
|
+
*/
|
|
113
|
+
private onScrollRight;
|
|
114
|
+
/**
|
|
115
|
+
* Sets up a ResizeObserver to toggle compact pagination based on component width.
|
|
116
|
+
*/
|
|
117
|
+
private setupCompactViewObserver;
|
|
59
118
|
/**
|
|
60
119
|
* Close more facets modal on Escape click
|
|
61
120
|
*/
|
|
@@ -69,10 +128,6 @@ export declare class MoreFacetsContent extends LitElement {
|
|
|
69
128
|
* - this.aggregations - hold result of search service and being used for further processing.
|
|
70
129
|
*/
|
|
71
130
|
updateSpecificFacets(): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Handler for page number changes from the pagination widget.
|
|
74
|
-
*/
|
|
75
|
-
private pageNumberClicked;
|
|
76
131
|
/**
|
|
77
132
|
* Combines the selected facets with the aggregations to create a single list of facets
|
|
78
133
|
*/
|
|
@@ -88,18 +143,47 @@ export declare class MoreFacetsContent extends LitElement {
|
|
|
88
143
|
*/
|
|
89
144
|
private get aggregationFacetGroup();
|
|
90
145
|
/**
|
|
91
|
-
* Returns
|
|
146
|
+
* Returns the facet group with buckets filtered by the current filter text.
|
|
147
|
+
* Filters are applied to the full bucket list before pagination.
|
|
148
|
+
*/
|
|
149
|
+
private get filteredFacetGroup();
|
|
150
|
+
/**
|
|
151
|
+
* Determines whether to use pagination based on the number of filtered facets.
|
|
152
|
+
* Returns true if facet count >= PAGINATION_THRESHOLD, false otherwise.
|
|
153
|
+
*/
|
|
154
|
+
private get usePagination();
|
|
155
|
+
/**
|
|
156
|
+
* Returns the facet group for the current page.
|
|
157
|
+
* If using pagination (>= 1000 facets), slices to show only the current page.
|
|
158
|
+
* Otherwise, returns all facets for horizontal scrolling.
|
|
92
159
|
*/
|
|
93
160
|
private get facetGroupForCurrentPage();
|
|
94
161
|
private get moreFacetsTemplate();
|
|
95
162
|
private get loaderTemplate();
|
|
163
|
+
private get emptyFilterResultsTemplate();
|
|
96
164
|
/**
|
|
97
|
-
*
|
|
165
|
+
* Number of pages for pagination (only used when facet count >= PAGINATION_THRESHOLD).
|
|
98
166
|
*/
|
|
99
167
|
private get paginationSize();
|
|
168
|
+
/**
|
|
169
|
+
* Template for pagination component.
|
|
170
|
+
*/
|
|
100
171
|
private get facetsPaginationTemplate();
|
|
101
172
|
private get footerTemplate();
|
|
102
173
|
private sortFacetAggregation;
|
|
174
|
+
/**
|
|
175
|
+
* Handler for filter input changes. Updates the filter text and triggers re-render.
|
|
176
|
+
*/
|
|
177
|
+
private handleFilterInput;
|
|
178
|
+
/**
|
|
179
|
+
* Handler for when the filter input is cleared via the clear button.
|
|
180
|
+
*/
|
|
181
|
+
private handleFilterClear;
|
|
182
|
+
/**
|
|
183
|
+
* Handler for pagination page number clicks.
|
|
184
|
+
* Only used when facet count >= PAGINATION_THRESHOLD.
|
|
185
|
+
*/
|
|
186
|
+
private pageNumberClicked;
|
|
103
187
|
private get modalHeaderTemplate();
|
|
104
188
|
render(): TemplateResult<1>;
|
|
105
189
|
private applySearchFacetsClicked;
|