@gridsheet/react-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.
@@ -1 +1 @@
1
- {"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../src/components/GridSheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmC,WAAW,EAAE,WAAW,EAAe,KAAK,EAAa,MAAM,UAAU,CAAC;AAiCzH,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAElE,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,SAAc,EACd,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,EACzB,OAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,WAAW,GACrB,EAAE,KAAK,eAgXP"}
1
+ {"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../src/components/GridSheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmC,WAAW,EAAE,WAAW,EAAe,KAAK,EAAa,MAAM,UAAU,CAAC;AAiCzH,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAElE,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,SAAc,EACd,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,EACzB,OAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,WAAW,GACrB,EAAE,KAAK,eA4XP"}
@@ -1958,9 +1958,10 @@ let ge = class xe {
1958
1958
  }
1959
1959
  /** @internal */
1960
1960
  processFormula(e, { idMap: t, ...s }) {
1961
+ var r, n;
1961
1962
  if ((typeof e == "string" || e instanceof String) && e.charAt(0) === "=") {
1962
- const r = new tt(e.substring(1));
1963
- return r.tokenize(t), r.identify({ ...s, sheet: this }), r.dependencyIds.forEach((n) => this.addDependency(n, s.dependency)), s.dependency != null && (this._formulaHasAsync(r) ? this.registry.asyncFormulaCells.add(s.dependency) : this.registry.asyncFormulaCells.delete(s.dependency)), "=" + r.identifiedFormula;
1963
+ const o = new tt(e.substring(1));
1964
+ return o.tokenize(t), 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 = (r = this.registry).onFormula) == null || n.call(r)), "=" + o.identifiedFormula;
1964
1965
  }
1965
1966
  return s.dependency != null && this.registry.asyncFormulaCells.delete(s.dependency), e;
1966
1967
  }
@@ -4766,18 +4767,19 @@ class kn {
4766
4767
  onInsertCols: c,
4767
4768
  onSelect: u,
4768
4769
  onKeyUp: d,
4769
- onInit: g
4770
+ onInit: g,
4771
+ onFormula: h
4770
4772
  } = {}) {
4771
- 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 = pr, this.cutting = !1, this.histories = [], this.historyIndex = -1, this.historyLimit = gr, this._componentSheetIds = /* @__PURE__ */ new Map(), this.ready = !1, this.functions = {}, this.policies = {}, this.transmit = (h) => {
4772
- }, this.updateSheet = (h) => ({ type: 0, value: h }), e != null && (this.historyLimit = e), this.functions = {
4773
+ 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 = pr, this.cutting = !1, this.histories = [], this.historyIndex = -1, this.historyLimit = gr, this._componentSheetIds = /* @__PURE__ */ new Map(), this.ready = !1, this.functions = {}, this.policies = {}, this.transmit = (f) => {
4774
+ }, this.updateSheet = (f) => ({ type: 0, value: f }), e != null && (this.historyLimit = e), this.functions = {
4773
4775
  ...Gs,
4774
4776
  ...t
4775
4777
  };
4776
- for (const h in this.functions) {
4777
- const f = this.functions[h];
4778
- f.__name = h;
4778
+ for (const f in this.functions) {
4779
+ const p = this.functions[f];
4780
+ p.__name = f;
4779
4781
  }
4780
- this.policies = s, this.onSave = r, this.onChange = n, this.onRemoveRows = o, this.onRemoveCols = a, this.onInsertRows = l, this.onInsertCols = c, this.onSelect = u, this.onKeyUp = d, this.onInit = g;
4782
+ this.policies = s, this.onSave = r, this.onChange = n, this.onRemoveRows = o, this.onRemoveCols = a, this.onInsertRows = l, this.onInsertCols = c, this.onSelect = u, this.onKeyUp = d, this.onInit = g, this.onFormula = h;
4781
4783
  }
4782
4784
  boot() {
4783
4785
  if (this.ready || Object.keys(this.contextsBySheetId).length === 0)
@@ -6781,4 +6783,4 @@ export {
6781
6783
  Eo as y,
6782
6784
  no as z
6783
6785
  };
6784
- //# sourceMappingURL=hooks-CCpInOc_.mjs.map
6786
+ //# sourceMappingURL=hooks-BhxFU0X7.mjs.map