New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@internetarchive/collection-browser

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@internetarchive/collection-browser - npm Package Compare versions

Comparing version

to
2.6.0

@@ -348,4 +348,3 @@ import { FilterConstraint, FilterMapBuilder, SearchType, } from '@internetarchive/search-service';

this.facetsReadyToLoad = ready;
const lazyLoadFacets = ['lazy-mobile', 'opt-in'].includes(this.host.facetLoadStrategy);
const needsFetch = lazyLoadFacets && facetsBecameReady && this.canFetchFacets;
const needsFetch = facetsBecameReady && this.canFetchFacets;
if (needsFetch) {

@@ -352,0 +351,0 @@ this.fetchFacets();

@@ -141,2 +141,4 @@ import type { MediaType } from '@internetarchive/field-parsers';

* In the mobile layout, facet data will only be loaded once the "Filters" accordion is opened.
* - `opt-in-or-login`: Same as `opt-in` for guest users not logged into an account, but same as `eager` for
* any logged in user.
* - `opt-in`: In the desktop layout, facet data will only be loaded after the user presses a "Load Facets" button.

@@ -147,3 +149,3 @@ * In the mobile layout, functions exactly as `lazy-mobile`.

*/
export declare type FacetLoadStrategy = 'eager' | 'lazy-mobile' | 'opt-in' | 'off';
export declare type FacetLoadStrategy = 'eager' | 'lazy-mobile' | 'opt-in-or-login' | 'opt-in' | 'off';
/**

@@ -150,0 +152,0 @@ * Union of the facet types that are available in the sidebar.

@@ -6,3 +6,3 @@ {

"author": "Internet Archive",
"version": "2.5.2",
"version": "2.6.0",
"main": "dist/index.js",

@@ -9,0 +9,0 @@ "module": "dist/index.js",

@@ -407,7 +407,3 @@ import type { ReactiveControllerHost } from 'lit';

const lazyLoadFacets = ['lazy-mobile', 'opt-in'].includes(
this.host.facetLoadStrategy
);
const needsFetch =
lazyLoadFacets && facetsBecameReady && this.canFetchFacets;
const needsFetch = facetsBecameReady && this.canFetchFacets;
if (needsFetch) {

@@ -414,0 +410,0 @@ this.fetchFacets();

@@ -470,2 +470,4 @@ import type { MediaType } from '@internetarchive/field-parsers';

* In the mobile layout, facet data will only be loaded once the "Filters" accordion is opened.
* - `opt-in-or-login`: Same as `opt-in` for guest users not logged into an account, but same as `eager` for
* any logged in user.
* - `opt-in`: In the desktop layout, facet data will only be loaded after the user presses a "Load Facets" button.

@@ -476,3 +478,8 @@ * In the mobile layout, functions exactly as `lazy-mobile`.

*/
export type FacetLoadStrategy = 'eager' | 'lazy-mobile' | 'opt-in' | 'off';
export type FacetLoadStrategy =
| 'eager'
| 'lazy-mobile'
| 'opt-in-or-login'
| 'opt-in'
| 'off';

@@ -479,0 +486,0 @@ /**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display