@infinite-table/infinite-react 3.0.3 → 3.0.4

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/index.dev.js CHANGED
@@ -13112,7 +13112,7 @@ function concludeReducer(params) {
13112
13112
  }
13113
13113
  if (cache) {
13114
13114
  cache.clear();
13115
- state.cache = cache;
13115
+ state.cache = void 0;
13116
13116
  }
13117
13117
  const { filterFunction, filterValue, filterTypes, operatorsByFilterType } = state;
13118
13118
  const shouldFilter = !!filterFunction || Array.isArray(filterValue) && filterValue.length;
@@ -13365,7 +13365,7 @@ function concludeReducer(params) {
13365
13365
  if (originalDataArrayChanged) {
13366
13366
  state.originalDataArrayChangedInfo = {
13367
13367
  timestamp: now,
13368
- mutations
13368
+ mutations: (mutations == null ? void 0 : mutations.size) ? mutations : void 0
13369
13369
  };
13370
13370
  }
13371
13371
  return state;
@@ -13975,7 +13975,7 @@ var Indexer = class {
13975
13975
  };
13976
13976
  this.indexArray = (arr, options) => {
13977
13977
  const { cache, toPrimaryKey } = options;
13978
- if (cache) {
13978
+ if (cache && !cache.isEmpty()) {
13979
13979
  arr = arr.concat();
13980
13980
  }
13981
13981
  for (let i = 0; i < arr.length; i++) {
@@ -14448,7 +14448,7 @@ function DataSourceCmp({ children }) {
14448
14448
  componentState.originalDataArray,
14449
14449
  componentState.originalDataArrayChangedInfo
14450
14450
  );
14451
- if (componentState.onDataMutations && componentState.originalDataArrayChangedInfo.mutations) {
14451
+ if (componentState.onDataMutations && componentState.originalDataArrayChangedInfo.mutations && componentState.originalDataArrayChangedInfo.mutations.size) {
14452
14452
  componentState.onDataMutations({
14453
14453
  primaryKeyField: typeof componentState.primaryKey === "string" ? componentState.primaryKey : void 0,
14454
14454
  dataArray: componentState.originalDataArray,
@@ -17583,7 +17583,7 @@ var useLicense = (licenseKey = "") => {
17583
17583
  const valid = (0, import_react49.useMemo)(() => {
17584
17584
  let valid2 = isValidLicense(licenseKey, {
17585
17585
  publishedAt: 1624970570587,
17586
- version: "3.0.3"
17586
+ version: "3.0.4"
17587
17587
  });
17588
17588
  if (!licenseKey && !valid2 && isInsidePlayground) {
17589
17589
  return true;
package/index.dev.mjs CHANGED
@@ -13097,7 +13097,7 @@ function concludeReducer(params) {
13097
13097
  }
13098
13098
  if (cache) {
13099
13099
  cache.clear();
13100
- state.cache = cache;
13100
+ state.cache = void 0;
13101
13101
  }
13102
13102
  const { filterFunction, filterValue, filterTypes, operatorsByFilterType } = state;
13103
13103
  const shouldFilter = !!filterFunction || Array.isArray(filterValue) && filterValue.length;
@@ -13350,7 +13350,7 @@ function concludeReducer(params) {
13350
13350
  if (originalDataArrayChanged) {
13351
13351
  state.originalDataArrayChangedInfo = {
13352
13352
  timestamp: now,
13353
- mutations
13353
+ mutations: (mutations == null ? void 0 : mutations.size) ? mutations : void 0
13354
13354
  };
13355
13355
  }
13356
13356
  return state;
@@ -13960,7 +13960,7 @@ var Indexer = class {
13960
13960
  };
13961
13961
  this.indexArray = (arr, options) => {
13962
13962
  const { cache, toPrimaryKey } = options;
13963
- if (cache) {
13963
+ if (cache && !cache.isEmpty()) {
13964
13964
  arr = arr.concat();
13965
13965
  }
13966
13966
  for (let i = 0; i < arr.length; i++) {
@@ -14433,7 +14433,7 @@ function DataSourceCmp({ children }) {
14433
14433
  componentState.originalDataArray,
14434
14434
  componentState.originalDataArrayChangedInfo
14435
14435
  );
14436
- if (componentState.onDataMutations && componentState.originalDataArrayChangedInfo.mutations) {
14436
+ if (componentState.onDataMutations && componentState.originalDataArrayChangedInfo.mutations && componentState.originalDataArrayChangedInfo.mutations.size) {
14437
14437
  componentState.onDataMutations({
14438
14438
  primaryKeyField: typeof componentState.primaryKey === "string" ? componentState.primaryKey : void 0,
14439
14439
  dataArray: componentState.originalDataArray,
@@ -17572,7 +17572,7 @@ var useLicense = (licenseKey = "") => {
17572
17572
  const valid = useMemo11(() => {
17573
17573
  let valid2 = isValidLicense(licenseKey, {
17574
17574
  publishedAt: 1624970570587,
17575
- version: "3.0.3"
17575
+ version: "3.0.4"
17576
17576
  });
17577
17577
  if (!licenseKey && !valid2 && isInsidePlayground) {
17578
17578
  return true;