@internetarchive/collection-browser 2.8.1-alpha-webdev7386.0 → 2.8.1-alpha-webdev7002.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 (47) hide show
  1. package/dist/index.d.ts +4 -1
  2. package/dist/index.js +3 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/src/collection-browser.js +1 -7
  5. package/dist/src/collection-browser.js.map +1 -1
  6. package/dist/src/collection-facets/smart-facets/heuristics/{browser-language-heuristic.d.ts → browser-language/browser-language-heuristic.d.ts} +1 -1
  7. package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js.map +1 -0
  8. package/dist/src/collection-facets/smart-facets/heuristics/index.d.ts +3 -0
  9. package/dist/src/collection-facets/smart-facets/heuristics/index.js +4 -0
  10. package/dist/src/collection-facets/smart-facets/heuristics/index.js.map +1 -0
  11. package/dist/src/collection-facets/smart-facets/heuristics/{query-keywords-heuristic.d.ts → query-keywords/query-keywords-heuristic.d.ts} +1 -2
  12. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js +14 -0
  13. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js.map +1 -0
  14. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.d.ts +6 -0
  15. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js +52 -0
  16. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js.map +1 -0
  17. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.d.ts +9 -0
  18. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js +69 -0
  19. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js.map +1 -0
  20. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.d.ts +21 -0
  21. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js +82 -0
  22. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js.map +1 -0
  23. package/dist/src/collection-facets/smart-facets/models.d.ts +4 -0
  24. package/dist/src/collection-facets/smart-facets/models.js.map +1 -1
  25. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.d.ts +2 -2
  26. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +9 -7
  27. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -1
  28. package/index.ts +15 -1
  29. package/package.json +1 -1
  30. package/src/collection-browser.ts +3 -6
  31. package/src/collection-facets/smart-facets/heuristics/{browser-language-heuristic.ts → browser-language/browser-language-heuristic.ts} +1 -1
  32. package/src/collection-facets/smart-facets/heuristics/index.ts +3 -0
  33. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +17 -0
  34. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +54 -0
  35. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +79 -0
  36. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +96 -0
  37. package/src/collection-facets/smart-facets/models.ts +4 -0
  38. package/src/collection-facets/smart-facets/smart-facet-heuristics.ts +12 -7
  39. package/dist/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.js.map +0 -1
  40. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.js +0 -45
  41. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.js.map +0 -1
  42. package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.d.ts +0 -5
  43. package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js +0 -173
  44. package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js.map +0 -1
  45. package/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.ts +0 -55
  46. package/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.ts +0 -191
  47. /package/dist/src/collection-facets/smart-facets/heuristics/{browser-language-heuristic.js → browser-language/browser-language-heuristic.js} +0 -0
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, TileModel } from './src/models';
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';
@@ -11,3 +11,6 @@ export { ItemTile } from './src/tiles/grid/item-tile';
11
11
  export { TileList } from './src/tiles/list/tile-list';
12
12
  export { TileListCompact } from './src/tiles/list/tile-list-compact';
13
13
  export { TileDispatcher } from './src/tiles/tile-dispatcher';
14
+ export { SmartQueryHeuristic, KeywordFacetMap, SmartFacet, } from './src/collection-facets/smart-facets/models';
15
+ export * from './src/collection-facets/smart-facets/heuristics/index';
16
+ export { SmartQueryHeuristicGroup } from './src/collection-facets/smart-facets/smart-facet-heuristics';
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 } from './src/models';
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';
@@ -9,4 +9,6 @@ export { ItemTile } from './src/tiles/grid/item-tile';
9
9
  export { TileList } from './src/tiles/list/tile-list';
10
10
  export { TileListCompact } from './src/tiles/list/tile-list-compact';
11
11
  export { TileDispatcher } from './src/tiles/tile-dispatcher';
12
+ export * from './src/collection-facets/smart-facets/heuristics/index';
13
+ export { SmartQueryHeuristicGroup } from './src/collection-facets/smart-facets/smart-facet-heuristics';
12
14
  //# sourceMappingURL=index.js.map
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,EAAyB,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3E,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","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 { CollectionDisplayMode, SortField, TileModel } 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';\n"]}
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;AAM7D,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 {\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"]}
@@ -627,13 +627,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
627
627
  handleRemoveItems() {
628
628
  this.dispatchEvent(new CustomEvent('itemRemovalRequested', {
629
629
  detail: {
630
- items: this.dataSource.checkedTileModels.map(model => {
631
- var _a;
632
- // For favorited searches, we attach a search: prefix to differentiate it from an item
633
- const searchPrefix = (model === null || model === void 0 ? void 0 : model.mediatype) === 'search' ? 'search:' : '';
634
- const identifier = (_a = model === null || model === void 0 ? void 0 : model.identifier) !== null && _a !== void 0 ? _a : '';
635
- return `${searchPrefix}${identifier}`;
636
- }),
630
+ items: this.dataSource.checkedTileModels.map(model => (model === null || model === void 0 ? void 0 : model.identifier) ? model.identifier : ''),
637
631
  },
638
632
  }));
639
633
  }