dexie 4.0.10 → 4.0.11

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.
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 4.0.10, Fri Nov 15 2024
7
+ * Version 4.0.11, Wed Jan 15 2025
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -1096,7 +1096,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1096
1096
  }
1097
1097
  }
1098
1098
 
1099
- const DEXIE_VERSION = '4.0.10';
1099
+ const DEXIE_VERSION = '4.0.11';
1100
1100
  const maxString = String.fromCharCode(65535);
1101
1101
  const minKey = -Infinity;
1102
1102
  const INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -1718,11 +1718,11 @@ function iterate(cursorPromise, filter, fn, valueMapper) {
1718
1718
  });
1719
1719
  }
1720
1720
 
1721
- const PropModSymbol = Symbol();
1722
1721
  class PropModification {
1723
1722
  execute(value) {
1724
- if (this.add !== undefined) {
1725
- const term = this.add;
1723
+ const spec = this["@@propmod"];
1724
+ if (spec.add !== undefined) {
1725
+ const term = spec.add;
1726
1726
  if (isArray(term)) {
1727
1727
  return [...(isArray(value) ? value : []), ...term].sort();
1728
1728
  }
@@ -1738,8 +1738,8 @@ class PropModification {
1738
1738
  }
1739
1739
  throw new TypeError(`Invalid term ${term}`);
1740
1740
  }
1741
- if (this.remove !== undefined) {
1742
- const subtrahend = this.remove;
1741
+ if (spec.remove !== undefined) {
1742
+ const subtrahend = spec.remove;
1743
1743
  if (isArray(subtrahend)) {
1744
1744
  return isArray(value) ? value.filter(item => !subtrahend.includes(item)).sort() : [];
1745
1745
  }
@@ -1755,14 +1755,14 @@ class PropModification {
1755
1755
  }
1756
1756
  throw new TypeError(`Invalid subtrahend ${subtrahend}`);
1757
1757
  }
1758
- const prefixToReplace = this.replacePrefix?.[0];
1758
+ const prefixToReplace = spec.replacePrefix?.[0];
1759
1759
  if (prefixToReplace && typeof value === 'string' && value.startsWith(prefixToReplace)) {
1760
- return this.replacePrefix[1] + value.substring(prefixToReplace.length);
1760
+ return spec.replacePrefix[1] + value.substring(prefixToReplace.length);
1761
1761
  }
1762
1762
  return value;
1763
1763
  }
1764
1764
  constructor(spec) {
1765
- Object.assign(this, spec);
1765
+ this["@@propmod"] = spec;
1766
1766
  }
1767
1767
  }
1768
1768
 
@@ -5802,5 +5802,5 @@ function replacePrefix(a, b) {
5802
5802
  DexiePromise.rejectionMapper = mapError;
5803
5803
  setDebug(debug);
5804
5804
 
5805
- export { Dexie$1 as Dexie, Entity, PropModSymbol, PropModification, RangeSet, add, cmp, Dexie$1 as default, liveQuery, mergeRanges, rangesOverlap, remove, replacePrefix };
5805
+ export { Dexie$1 as Dexie, Entity, PropModification, RangeSet, add, cmp, Dexie$1 as default, liveQuery, mergeRanges, rangesOverlap, remove, replacePrefix };
5806
5806
  //# sourceMappingURL=dexie.mjs.map