billy-herrington-utils 2.0.0 → 2.0.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.
@@ -6113,7 +6113,8 @@ Expected function or array of functions, received type ${typeof e}.`
6113
6113
  __publicField(this, "intersectionObservable");
6114
6114
  __publicField(this, "thumbsSelector", ".thumb");
6115
6115
  __publicField(this, "getThumbsStrategy", "default");
6116
- __publicField(this, "paginationStrategy", getPaginationStrategy({}));
6116
+ __publicField(this, "paginationStrategyOptions", {});
6117
+ __publicField(this, "paginationStrategy", getPaginationStrategy(this.paginationStrategyOptions));
6117
6118
  __publicField(this, "mutationObservers", []);
6118
6119
  __publicField(this, "resetOnPaginationOrContainerDeath", true);
6119
6120
  __publicField(this, "customSelectors", {});
@@ -6126,18 +6127,9 @@ Expected function or array of functions, received type ${typeof e}.`
6126
6127
  __publicField(this, "gui", new ju(this.scheme, this.store));
6127
6128
  __publicField(this, "dataManager", new DataManager(this, this.store.state));
6128
6129
  __publicField(this, "infiniteScroller");
6129
- __publicField(this, "resetInfiniteScroller", () => {
6130
- this.infiniteScroller?.dispose();
6131
- const infiniteScroller = InfiniteScroller.create(
6132
- this.store,
6133
- this,
6134
- this.dataManager.parseData
6135
- );
6136
- return infiniteScroller;
6137
- });
6138
6130
  __publicField(this, "initialGrope");
6139
6131
  this.store.subscribe(() => this.dataManager.applyFilters());
6140
- this.infiniteScroller = this.resetInfiniteScroller();
6132
+ this.resetInfiniteScroller();
6141
6133
  this.resetOn();
6142
6134
  this.animatePreview?.();
6143
6135
  this.gropeInit();
@@ -6225,7 +6217,7 @@ Expected function or array of functions, received type ${typeof e}.`
6225
6217
  this.mutationObservers.forEach((o) => {
6226
6218
  o.disconnect();
6227
6219
  });
6228
- this.infiniteScroller = this.resetInfiniteScroller();
6220
+ this.resetInfiniteScroller();
6229
6221
  this.resetOn();
6230
6222
  }
6231
6223
  resetOn() {
@@ -6241,6 +6233,15 @@ Expected function or array of functions, received type ${typeof e}.`
6241
6233
  this.mutationObservers.push(observer);
6242
6234
  });
6243
6235
  }
6236
+ resetInfiniteScroller() {
6237
+ this.infiniteScroller?.dispose();
6238
+ if (!this.paginationStrategy.hasPagination) return;
6239
+ this.infiniteScroller = InfiniteScroller.create(
6240
+ this.store,
6241
+ this,
6242
+ this.dataManager.parseData
6243
+ );
6244
+ }
6244
6245
  gropeInit() {
6245
6246
  if (!this.initialGrope) return;
6246
6247
  if (this.initialGrope === "all-in-one") {