@gridsheet/preact-core 3.4.1 → 3.4.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.
@@ -1959,9 +1959,10 @@ let Y$1 = class Y {
1959
1959
  }
1960
1960
  /** @internal */
1961
1961
  processFormula(t, { idMap: e, ...s }) {
1962
+ var i, n;
1962
1963
  if ((typeof t == "string" || t instanceof String) && t.charAt(0) === "=") {
1963
- const i = new te$1(t.substring(1));
1964
- return i.tokenize(e), i.identify({ ...s, sheet: this }), i.dependencyIds.forEach((n) => this.addDependency(n, s.dependency)), s.dependency != null && (this._formulaHasAsync(i) ? this.registry.asyncFormulaCells.add(s.dependency) : this.registry.asyncFormulaCells.delete(s.dependency)), "=" + i.identifiedFormula;
1964
+ const o = new te$1(t.substring(1));
1965
+ return o.tokenize(e), o.identify({ ...s, sheet: this }), o.dependencyIds.forEach((a) => this.addDependency(a, s.dependency)), s.dependency != null && (this._formulaHasAsync(o) ? this.registry.asyncFormulaCells.add(s.dependency) : this.registry.asyncFormulaCells.delete(s.dependency), (n = (i = this.registry).onFormula) == null || n.call(i)), "=" + o.identifiedFormula;
1965
1966
  }
1966
1967
  return s.dependency != null && this.registry.asyncFormulaCells.delete(s.dependency), t;
1967
1968
  }
@@ -4767,18 +4768,19 @@ class Hr {
4767
4768
  onInsertCols: h,
4768
4769
  onSelect: u,
4769
4770
  onKeyUp: c,
4770
- onInit: f
4771
+ onInit: f,
4772
+ onFormula: d
4771
4773
  } = {}) {
4772
- this.sheetHead = 0, this.cellHead = 0, this.data = {}, this.systems = {}, this.sheetIdsByName = {}, this.contextsBySheetId = {}, this.choosingSheetId = 0, this.choosingAddress = "", this.editingSheetId = 0, this.editingAddress = "", this.paletteBySheetName = {}, this.lastFocused = null, this.solvedCaches = /* @__PURE__ */ new Map(), this.lastSpilledTargetIds = /* @__PURE__ */ new Set(), this.asyncFormulaCells = /* @__PURE__ */ new Set(), this.asyncPending = /* @__PURE__ */ new Map(), this.copyingSheetId = 0, this.copyingZone = Ms, this.cutting = false, this.histories = [], this.historyIndex = -1, this.historyLimit = Cs, this._componentSheetIds = /* @__PURE__ */ new Map(), this.ready = false, this.functions = {}, this.policies = {}, this.transmit = (d) => {
4773
- }, this.updateSheet = (d) => ({ type: 0, value: d }), t != null && (this.historyLimit = t), this.functions = {
4774
+ this.sheetHead = 0, this.cellHead = 0, this.data = {}, this.systems = {}, this.sheetIdsByName = {}, this.contextsBySheetId = {}, this.choosingSheetId = 0, this.choosingAddress = "", this.editingSheetId = 0, this.editingAddress = "", this.paletteBySheetName = {}, this.lastFocused = null, this.solvedCaches = /* @__PURE__ */ new Map(), this.lastSpilledTargetIds = /* @__PURE__ */ new Set(), this.asyncFormulaCells = /* @__PURE__ */ new Set(), this.asyncPending = /* @__PURE__ */ new Map(), this.copyingSheetId = 0, this.copyingZone = Ms, this.cutting = false, this.histories = [], this.historyIndex = -1, this.historyLimit = Cs, this._componentSheetIds = /* @__PURE__ */ new Map(), this.ready = false, this.functions = {}, this.policies = {}, this.transmit = (p) => {
4775
+ }, this.updateSheet = (p) => ({ type: 0, value: p }), t != null && (this.historyLimit = t), this.functions = {
4774
4776
  ...gs,
4775
4777
  ...e
4776
4778
  };
4777
- for (const d in this.functions) {
4778
- const p = this.functions[d];
4779
- p.__name = d;
4779
+ for (const p in this.functions) {
4780
+ const m = this.functions[p];
4781
+ m.__name = p;
4780
4782
  }
4781
- this.policies = s, this.onSave = i, this.onChange = n, this.onRemoveRows = o, this.onRemoveCols = a, this.onInsertRows = l, this.onInsertCols = h, this.onSelect = u, this.onKeyUp = c, this.onInit = f;
4783
+ this.policies = s, this.onSave = i, this.onChange = n, this.onRemoveRows = o, this.onRemoveCols = a, this.onInsertRows = l, this.onInsertCols = h, this.onSelect = u, this.onKeyUp = c, this.onInit = f, this.onFormula = d;
4782
4784
  }
4783
4785
  boot() {
4784
4786
  if (this.ready || Object.keys(this.contextsBySheetId).length === 0)
@@ -7186,4 +7188,4 @@ export {
7186
7188
  arrow as y,
7187
7189
  escape as z
7188
7190
  };
7189
- //# sourceMappingURL=hooks-BHtHkTAN.mjs.map
7191
+ //# sourceMappingURL=hooks-Ij1DTX5N.mjs.map