@internetarchive/collection-browser 4.1.1-alpha-webdev8185.0 → 4.1.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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/collection-browser.d.ts +2 -9
- package/dist/src/collection-browser.js +0 -17
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js +0 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.d.ts +2 -5
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
- package/dist/src/models.d.ts +2 -20
- package/dist/src/models.js +0 -36
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.js +9 -3
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +2 -2
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/index.ts +0 -5
- package/package.json +1 -1
- package/src/collection-browser.ts +4 -25
- package/src/data-source/collection-browser-data-source.ts +0 -1
- package/src/data-source/collection-browser-query-state.ts +2 -12
- package/src/models.ts +4 -46
- package/src/restoration-state-handler.ts +550 -546
- package/src/sort-filter-bar/sort-filter-bar.ts +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { CollectionBrowserDataSource } from './src/data-source/collection-browse
|
|
|
3
3
|
export { CollectionBrowserDataSourceInterface } from './src/data-source/collection-browser-data-source-interface';
|
|
4
4
|
export { CollectionBrowserQueryState } from './src/data-source/collection-browser-query-state';
|
|
5
5
|
export { SortFilterBar } from './src/sort-filter-bar/sort-filter-bar';
|
|
6
|
-
export { CollectionDisplayMode, SortField,
|
|
6
|
+
export { CollectionDisplayMode, SortField, TileModel, FacetOption, SelectedFacets, getDefaultSelectedFacets, } from './src/models';
|
|
7
7
|
export { CollectionBrowserLoadingTile } from './src/tiles/collection-browser-loading-tile';
|
|
8
8
|
export { CollectionTile } from './src/tiles/grid/collection-tile';
|
|
9
9
|
export { AccountTile } from './src/tiles/grid/account-tile';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CollectionBrowser } from './src/collection-browser';
|
|
2
2
|
export { CollectionBrowserDataSource } from './src/data-source/collection-browser-data-source';
|
|
3
3
|
export { SortFilterBar } from './src/sort-filter-bar/sort-filter-bar';
|
|
4
|
-
export { SortField, TileModel, getDefaultSelectedFacets,
|
|
4
|
+
export { SortField, TileModel, getDefaultSelectedFacets, } from './src/models';
|
|
5
5
|
export { CollectionBrowserLoadingTile } from './src/tiles/collection-browser-loading-tile';
|
|
6
6
|
export { CollectionTile } from './src/tiles/grid/collection-tile';
|
|
7
7
|
export { AccountTile } from './src/tiles/grid/account-tile';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAG/F,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAEL,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAG/F,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAEL,SAAS,EACT,SAAS,EAGT,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAO7D,cAAc,uDAAuD,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6DAA6D,CAAC","sourcesContent":["export { CollectionBrowser } from './src/collection-browser';\nexport { CollectionBrowserDataSource } from './src/data-source/collection-browser-data-source';\nexport { CollectionBrowserDataSourceInterface } from './src/data-source/collection-browser-data-source-interface';\nexport { CollectionBrowserQueryState } from './src/data-source/collection-browser-query-state';\nexport { SortFilterBar } from './src/sort-filter-bar/sort-filter-bar';\nexport {\n CollectionDisplayMode,\n SortField,\n TileModel,\n FacetOption,\n SelectedFacets,\n getDefaultSelectedFacets,\n} from './src/models';\nexport { CollectionBrowserLoadingTile } from './src/tiles/collection-browser-loading-tile';\nexport { CollectionTile } from './src/tiles/grid/collection-tile';\nexport { AccountTile } from './src/tiles/grid/account-tile';\nexport { ItemTile } from './src/tiles/grid/item-tile';\nexport { TileList } from './src/tiles/list/tile-list';\nexport { TileListCompact } from './src/tiles/list/tile-list-compact';\nexport { TileDispatcher } from './src/tiles/tile-dispatcher';\nexport { LayoutType } from './src/tiles/models';\nexport {\n SmartQueryHeuristic,\n KeywordFacetMap,\n SmartFacet,\n} from './src/collection-facets/smart-facets/models';\nexport * from './src/collection-facets/smart-facets/heuristics/index';\nexport { SmartQueryHeuristicGroup } from './src/collection-facets/smart-facets/smart-facet-heuristics';\n"]}
|
|
@@ -7,7 +7,7 @@ import '@internetarchive/infinite-scroller';
|
|
|
7
7
|
import type { ModalManagerInterface } from '@internetarchive/modal-manager';
|
|
8
8
|
import type { FeatureFeedbackServiceInterface } from '@internetarchive/feature-feedback';
|
|
9
9
|
import type { RecaptchaManagerInterface } from '@internetarchive/recaptcha-manager';
|
|
10
|
-
import { SelectedFacets, SortField,
|
|
10
|
+
import { SelectedFacets, SortField, CollectionBrowserContext, TileModel, CollectionDisplayMode, FacetEventDetails, FacetLoadStrategy } from './models';
|
|
11
11
|
import { RestorationStateHandlerInterface } from './restoration-state-handler';
|
|
12
12
|
import type { CollectionBrowserQueryState, CollectionBrowserSearchInterface } from './data-source/collection-browser-query-state';
|
|
13
13
|
import type { CollectionBrowserDataSourceInterface } from './data-source/collection-browser-data-source-interface';
|
|
@@ -61,7 +61,7 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
|
|
|
61
61
|
selectedTitleFilter: string | null;
|
|
62
62
|
selectedCreatorFilter: string | null;
|
|
63
63
|
sortDirection: SortDirection | null;
|
|
64
|
-
defaultSortField:
|
|
64
|
+
defaultSortField: Exclude<SortField, SortField.default>;
|
|
65
65
|
defaultSortDirection: SortDirection | null;
|
|
66
66
|
pageSize: number;
|
|
67
67
|
currentPage?: number;
|
|
@@ -587,13 +587,6 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
|
|
|
587
587
|
* an error from the backend.
|
|
588
588
|
*/
|
|
589
589
|
emitSearchError(): void;
|
|
590
|
-
/**
|
|
591
|
-
* Emits a `collectionExtraInfoLoaded` event when the data source has received
|
|
592
|
-
* collection metadata from the backend. This allows parent components to react
|
|
593
|
-
* to the metadata (e.g., to update their default sort based on the collection's
|
|
594
|
-
* `sort-by` metadata field).
|
|
595
|
-
*/
|
|
596
|
-
emitCollectionExtraInfoLoaded(collectionExtraInfo?: CollectionExtraInfo): void;
|
|
597
590
|
/**
|
|
598
591
|
* Emits a `queryStateChanged` event indicating that one or more of this component's
|
|
599
592
|
* properties have changed in a way that could affect the set of search results.
|
|
@@ -1274,12 +1274,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1274
1274
|
this.maxSelectedDate = queryState.maxSelectedDate;
|
|
1275
1275
|
this.selectedSort = queryState.selectedSort ?? SortField.default;
|
|
1276
1276
|
this.sortDirection = queryState.sortDirection;
|
|
1277
|
-
if (queryState.defaultSortField) {
|
|
1278
|
-
this.defaultSortField = queryState.defaultSortField;
|
|
1279
|
-
}
|
|
1280
|
-
if (queryState.defaultSortDirection !== undefined) {
|
|
1281
|
-
this.defaultSortDirection = queryState.defaultSortDirection;
|
|
1282
|
-
}
|
|
1283
1277
|
this.selectedTitleFilter = queryState.selectedTitleFilter;
|
|
1284
1278
|
this.selectedCreatorFilter = queryState.selectedCreatorFilter;
|
|
1285
1279
|
this.pagesToRender = this.initialPageNumber;
|
|
@@ -1595,17 +1589,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1595
1589
|
detail: this.dataSource.queryErrorMessage,
|
|
1596
1590
|
}));
|
|
1597
1591
|
}
|
|
1598
|
-
/**
|
|
1599
|
-
* Emits a `collectionExtraInfoLoaded` event when the data source has received
|
|
1600
|
-
* collection metadata from the backend. This allows parent components to react
|
|
1601
|
-
* to the metadata (e.g., to update their default sort based on the collection's
|
|
1602
|
-
* `sort-by` metadata field).
|
|
1603
|
-
*/
|
|
1604
|
-
emitCollectionExtraInfoLoaded(collectionExtraInfo) {
|
|
1605
|
-
this.dispatchEvent(new CustomEvent('collectionExtraInfoLoaded', {
|
|
1606
|
-
detail: collectionExtraInfo,
|
|
1607
|
-
}));
|
|
1608
|
-
}
|
|
1609
1592
|
/**
|
|
1610
1593
|
* Emits a `queryStateChanged` event indicating that one or more of this component's
|
|
1611
1594
|
* properties have changed in a way that could affect the set of search results.
|