@univerjs/engine-formula 0.15.5 → 0.16.0-insiders.20260302-b09f1e4

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/lib/es/facade.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FBase as _, FUniver as S } from "@univerjs/core/facade";
2
2
  import { Inject as c, ICommandService as f, Injector as C, IConfigService as h } from "@univerjs/core";
3
- import { LexerTreeBuilder as v, IFunctionService as g, IDefinedNamesService as E, ISuperTableService as x, SetTriggerFormulaCalculationStartMutation as F, SetFormulaCalculationStopMutation as T, SetFormulaCalculationStartMutation as y, SetFormulaCalculationNotificationMutation as m, GlobalComputingStatusService as R, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as b, SetFormulaStringBatchCalculationResultMutation as w, SetFormulaStringBatchCalculationMutation as D, SetFormulaDependencyCalculationResultMutation as M, SetFormulaDependencyCalculationMutation as I, SetCellFormulaDependencyCalculationResultMutation as N, SetCellFormulaDependencyCalculationMutation as B, SetQueryFormulaDependencyResultMutation as d, SetQueryFormulaDependencyMutation as p, ENGINE_FORMULA_RETURN_DEPENDENCY_TREE as P, SetQueryFormulaDependencyAllResultMutation as L, SetQueryFormulaDependencyAllMutation as O } from "@univerjs/engine-formula";
3
+ import { LexerTreeBuilder as v, SetTriggerFormulaCalculationStartMutation as g, SetFormulaCalculationStopMutation as E, SetFormulaCalculationStartMutation as x, SetFormulaCalculationNotificationMutation as m, GlobalComputingStatusService as F, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as T, SetFormulaStringBatchCalculationResultMutation as y, SetFormulaStringBatchCalculationMutation as R, SetFormulaDependencyCalculationResultMutation as b, SetFormulaDependencyCalculationMutation as w, SetCellFormulaDependencyCalculationResultMutation as D, SetCellFormulaDependencyCalculationMutation as M, SetQueryFormulaDependencyResultMutation as d, SetQueryFormulaDependencyMutation as p, ENGINE_FORMULA_RETURN_DEPENDENCY_TREE as I, SetQueryFormulaDependencyAllResultMutation as N, SetQueryFormulaDependencyAllMutation as B, IFunctionService as P, IDefinedNamesService as L, ISuperTableService as O } from "@univerjs/engine-formula";
4
4
  import { firstValueFrom as A, race as U, filter as j, timer as Q, map as G } from "rxjs";
5
5
  var q = Object.getOwnPropertyDescriptor, z = (e, t, r, i) => {
6
6
  for (var n = i > 1 ? void 0 : i ? q(t, r) : t, a = e.length - 1, o; a >= 0; a--)
@@ -66,7 +66,7 @@ let l = class extends _ {
66
66
  * ```
67
67
  */
68
68
  executeCalculation() {
69
- this._commandService.executeCommand(F.id, { commands: [], forceCalculation: !0 }, { onlyLocal: !0 });
69
+ this._commandService.executeCommand(g.id, { commands: [], forceCalculation: !0 }, { onlyLocal: !0 });
70
70
  }
71
71
  /**
72
72
  * Stop the calculation of the formula.
@@ -78,7 +78,7 @@ let l = class extends _ {
78
78
  * ```
79
79
  */
80
80
  stopCalculation() {
81
- this._commandService.executeCommand(T.id, {});
81
+ this._commandService.executeCommand(E.id, {});
82
82
  }
83
83
  /**
84
84
  * Listening calculation starts.
@@ -95,7 +95,7 @@ let l = class extends _ {
95
95
  */
96
96
  calculationStart(e) {
97
97
  return this._commandService.onCommandExecuted((t) => {
98
- if (t.id === y.id) {
98
+ if (t.id === x.id) {
99
99
  const r = t.params;
100
100
  e(r.forceCalculation);
101
101
  }
@@ -126,7 +126,7 @@ let l = class extends _ {
126
126
  * @deprecated Use `onCalculationEnd` instead.
127
127
  */
128
128
  whenComputingCompleteAsync(e) {
129
- const t = this._injector.get(R);
129
+ const t = this._injector.get(F);
130
130
  return t.computingStatus ? Promise.resolve(!0) : A(U(
131
131
  t.computingStatus$.pipe(j((r) => r)),
132
132
  Q(e != null ? e : 3e4).pipe(G(() => !1))
@@ -179,7 +179,7 @@ let l = class extends _ {
179
179
  * ```
180
180
  */
181
181
  setMaxIteration(e) {
182
- this._configService.setConfig(b, e);
182
+ this._configService.setConfig(T, e);
183
183
  }
184
184
  /**
185
185
  * Execute a batch of formulas asynchronously and receive computed results.
@@ -253,7 +253,7 @@ let l = class extends _ {
253
253
  executeFormulas(e, t = 3e4) {
254
254
  return new Promise((r, i) => {
255
255
  const n = this._commandService.onCommandExecuted((o) => {
256
- if (o.id !== w.id)
256
+ if (o.id !== y.id)
257
257
  return;
258
258
  const s = o.params;
259
259
  clearTimeout(a), n.dispose(), s.result != null ? r(s.result) : i(new Error("Formula batch calculation returned no result"));
@@ -261,7 +261,7 @@ let l = class extends _ {
261
261
  n.dispose(), i(new Error("Formula batch calculation timeout"));
262
262
  }, t);
263
263
  this._commandService.executeCommand(
264
- D.id,
264
+ R.id,
265
265
  { formulas: e },
266
266
  { onlyLocal: !0 }
267
267
  );
@@ -291,7 +291,7 @@ let l = class extends _ {
291
291
  getAllDependencyTrees(e = 3e4) {
292
292
  return new Promise((t, r) => {
293
293
  const i = this._commandService.onCommandExecuted((a) => {
294
- if (a.id !== M.id)
294
+ if (a.id !== b.id)
295
295
  return;
296
296
  const o = a.params;
297
297
  clearTimeout(n), i.dispose(), o.result != null ? t(o.result) : t([]);
@@ -299,7 +299,7 @@ let l = class extends _ {
299
299
  i.dispose(), r(new Error("Formula dependency calculation timeout"));
300
300
  }, e);
301
301
  this._commandService.executeCommand(
302
- I.id,
302
+ w.id,
303
303
  void 0,
304
304
  { onlyLocal: !0 }
305
305
  );
@@ -342,7 +342,7 @@ let l = class extends _ {
342
342
  getCellDependencyTree(e, t = 3e4) {
343
343
  return new Promise((r, i) => {
344
344
  const n = this._commandService.onCommandExecuted((o) => {
345
- if (o.id !== N.id)
345
+ if (o.id !== D.id)
346
346
  return;
347
347
  const s = o.params;
348
348
  clearTimeout(a), n.dispose(), r(s.result);
@@ -350,7 +350,7 @@ let l = class extends _ {
350
350
  n.dispose(), i(new Error("Cell dependency calculation timeout"));
351
351
  }, t);
352
352
  this._commandService.executeCommand(
353
- B.id,
353
+ M.id,
354
354
  e,
355
355
  { onlyLocal: !0 }
356
356
  );
@@ -505,7 +505,7 @@ let l = class extends _ {
505
505
  * ```
506
506
  */
507
507
  setFormulaReturnDependencyTree(e) {
508
- this._configService.setConfig(P, e);
508
+ this._configService.setConfig(I, e);
509
509
  }
510
510
  /**
511
511
  * Parse a formula string and return its **formula expression tree**.
@@ -621,7 +621,7 @@ let l = class extends _ {
621
621
  getRangeDependentsAndInRangeFormulas(e, t = 3e4) {
622
622
  return new Promise((r, i) => {
623
623
  const n = this._commandService.onCommandExecuted((o) => {
624
- if (o.id !== L.id)
624
+ if (o.id !== N.id)
625
625
  return;
626
626
  const s = o.params;
627
627
  clearTimeout(a), n.dispose(), s.result != null ? r(s.result) : r({ dependents: [], inRanges: [] });
@@ -629,7 +629,7 @@ let l = class extends _ {
629
629
  n.dispose(), i(new Error("Range dependents calculation timeout"));
630
630
  }, t);
631
631
  this._commandService.executeCommand(
632
- O.id,
632
+ B.id,
633
633
  { unitRanges: e },
634
634
  { onlyLocal: !0 }
635
635
  );
@@ -641,9 +641,9 @@ l = z([
641
641
  u(1, c(C)),
642
642
  u(2, c(v)),
643
643
  u(3, h),
644
- u(4, g),
645
- u(5, E),
646
- u(6, x)
644
+ u(4, P),
645
+ u(5, L),
646
+ u(6, O)
647
647
  ], l);
648
648
  class V extends S {
649
649
  getFormula() {
package/lib/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Hc = Object.defineProperty;
2
2
  var Gc = (i, a, e) => a in i ? Hc(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
3
3
  var A = (i, a, e) => Gc(i, typeof a != "symbol" ? a + "" : a, e);
4
- import { LRUMap as Wc, hashAlgorithm as Qc, isRealNum as q, numfmt as mr, ObjectMatrix as me, CommandType as be, MAX_COLUMN_COUNT as Nr, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, MAX_ROW_COUNT as Ln, columnLabelToNumber as Ro, createIdentifier as Je, Disposable as Se, IUniverInstanceService as zr, moveRangeByOffset as Na, isValidRange as qc, isFormulaString as Et, isFormulaId as wt, Rectangle as hi, cellToRange as Xc, Inject as Ee, UniverInstanceType as tr, BooleanNumber as yo, LocaleService as Kc, BuildTextUtils as Zc, LocaleType as Ct, getNumfmtParseValueFilter as as, CellValueType as Dt, isTextFormat as zc, RichTextBuilder as Jc, toDisposable as el, Injector as bo, generateRandomId as po, sortRules as tl, RTree as Ys, IConfigService as Va, AsyncLock as rl, requestImmediateMacroTask as nl, ICommandService as hr, DataStreamTreeTokenType as Be, DisposableCollection as sl, Optional as al, LifecycleService as il, Plugin as ol, merge as ul, touchDependencies as Ss } from "@univerjs/core";
4
+ import { LRUMap as Wc, hashAlgorithm as Qc, isRealNum as q, numfmt as mr, ObjectMatrix as me, CommandType as be, MAX_COLUMN_COUNT as Nr, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, MAX_ROW_COUNT as Ln, columnLabelToNumber as Ro, createIdentifier as Je, Disposable as Se, IUniverInstanceService as zr, moveRangeByOffset as Na, isValidRange as qc, isFormulaString as Et, isFormulaId as wt, Rectangle as hi, cellToRange as Xc, Inject as Ee, UniverInstanceType as tr, BooleanNumber as yo, LocaleService as Kc, BuildTextUtils as Zc, LocaleType as Ct, getNumfmtParseValueFilter as as, CellValueType as Dt, isTextFormat as zc, RichTextBuilder as Jc, toDisposable as el, Injector as bo, generateRandomId as po, sortRules as tl, RTree as Ys, AsyncLock as rl, requestImmediateMacroTask as nl, IConfigService as Va, ICommandService as hr, DataStreamTreeTokenType as Be, DisposableCollection as sl, Optional as al, LifecycleService as il, Plugin as ol, merge as ul, touchDependencies as Ss } from "@univerjs/core";
5
5
  import { Subject as Pt, BehaviorSubject as Oa, distinctUntilChanged as No, combineLatest as cl, map as ll, Observable as fl, shareReplay as ml, bufferWhen as hl, filter as gi } from "rxjs";
6
6
  import { DataSyncPrimaryController as gl } from "@univerjs/rpc";
7
7
  var or = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(or || {}), It = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(It || {}), we = /* @__PURE__ */ ((i) => (i.ALL = "#All", i.DATA = "#Data", i.HEADERS = "#Headers", i.TOTALS = "#Totals", i.THIS_ROW = "#This Row", i))(we || {}), ft = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ft || {});
@@ -33093,10 +33093,11 @@ let pa = class extends Se {
33093
33093
  }
33094
33094
  }
33095
33095
  };
33096
- this._commandService.executeCommand(cs.id, c).then(() => {
33096
+ this._commandService.executeCommand(cs.id, c, { onlyLocal: !0 }).then(() => {
33097
33097
  this._commandService.executeCommand(
33098
33098
  mn.id,
33099
- { [t]: { [r]: { [s]: !0 } } }
33099
+ { [t]: { [r]: { [s]: !0 } } },
33100
+ { onlyLocal: !0 }
33100
33101
  );
33101
33102
  });
33102
33103
  };
@@ -33159,7 +33160,7 @@ let pa = class extends Se {
33159
33160
  subUnitId: e,
33160
33161
  formulaIdList: t
33161
33162
  };
33162
- this._commandService.executeCommand(ls.id, r);
33163
+ this._commandService.executeCommand(ls.id, r, { onlyLocal: !0 });
33163
33164
  const n = this._ensureCacheMap(a, e);
33164
33165
  t.forEach((s) => n.delete(s));
33165
33166
  }
@@ -33178,7 +33179,8 @@ let pa = class extends Se {
33178
33179
  const r = this.getFormulaValueSync(a, e, t);
33179
33180
  r && (r.status = Er.WAIT, this._commandService.executeCommand(
33180
33181
  mn.id,
33181
- { [a]: { [e]: { [t]: !0 } } }
33182
+ { [a]: { [e]: { [t]: !0 } } },
33183
+ { onlyLocal: !0 }
33182
33184
  ));
33183
33185
  }
33184
33186
  };
package/lib/facade.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FBase as _, FUniver as S } from "@univerjs/core/facade";
2
2
  import { Inject as c, ICommandService as f, Injector as C, IConfigService as h } from "@univerjs/core";
3
- import { LexerTreeBuilder as v, IFunctionService as g, IDefinedNamesService as E, ISuperTableService as x, SetTriggerFormulaCalculationStartMutation as F, SetFormulaCalculationStopMutation as T, SetFormulaCalculationStartMutation as y, SetFormulaCalculationNotificationMutation as m, GlobalComputingStatusService as R, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as b, SetFormulaStringBatchCalculationResultMutation as w, SetFormulaStringBatchCalculationMutation as D, SetFormulaDependencyCalculationResultMutation as M, SetFormulaDependencyCalculationMutation as I, SetCellFormulaDependencyCalculationResultMutation as N, SetCellFormulaDependencyCalculationMutation as B, SetQueryFormulaDependencyResultMutation as d, SetQueryFormulaDependencyMutation as p, ENGINE_FORMULA_RETURN_DEPENDENCY_TREE as P, SetQueryFormulaDependencyAllResultMutation as L, SetQueryFormulaDependencyAllMutation as O } from "@univerjs/engine-formula";
3
+ import { LexerTreeBuilder as v, SetTriggerFormulaCalculationStartMutation as g, SetFormulaCalculationStopMutation as E, SetFormulaCalculationStartMutation as x, SetFormulaCalculationNotificationMutation as m, GlobalComputingStatusService as F, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as T, SetFormulaStringBatchCalculationResultMutation as y, SetFormulaStringBatchCalculationMutation as R, SetFormulaDependencyCalculationResultMutation as b, SetFormulaDependencyCalculationMutation as w, SetCellFormulaDependencyCalculationResultMutation as D, SetCellFormulaDependencyCalculationMutation as M, SetQueryFormulaDependencyResultMutation as d, SetQueryFormulaDependencyMutation as p, ENGINE_FORMULA_RETURN_DEPENDENCY_TREE as I, SetQueryFormulaDependencyAllResultMutation as N, SetQueryFormulaDependencyAllMutation as B, IFunctionService as P, IDefinedNamesService as L, ISuperTableService as O } from "@univerjs/engine-formula";
4
4
  import { firstValueFrom as A, race as U, filter as j, timer as Q, map as G } from "rxjs";
5
5
  var q = Object.getOwnPropertyDescriptor, z = (e, t, r, i) => {
6
6
  for (var n = i > 1 ? void 0 : i ? q(t, r) : t, a = e.length - 1, o; a >= 0; a--)
@@ -66,7 +66,7 @@ let l = class extends _ {
66
66
  * ```
67
67
  */
68
68
  executeCalculation() {
69
- this._commandService.executeCommand(F.id, { commands: [], forceCalculation: !0 }, { onlyLocal: !0 });
69
+ this._commandService.executeCommand(g.id, { commands: [], forceCalculation: !0 }, { onlyLocal: !0 });
70
70
  }
71
71
  /**
72
72
  * Stop the calculation of the formula.
@@ -78,7 +78,7 @@ let l = class extends _ {
78
78
  * ```
79
79
  */
80
80
  stopCalculation() {
81
- this._commandService.executeCommand(T.id, {});
81
+ this._commandService.executeCommand(E.id, {});
82
82
  }
83
83
  /**
84
84
  * Listening calculation starts.
@@ -95,7 +95,7 @@ let l = class extends _ {
95
95
  */
96
96
  calculationStart(e) {
97
97
  return this._commandService.onCommandExecuted((t) => {
98
- if (t.id === y.id) {
98
+ if (t.id === x.id) {
99
99
  const r = t.params;
100
100
  e(r.forceCalculation);
101
101
  }
@@ -126,7 +126,7 @@ let l = class extends _ {
126
126
  * @deprecated Use `onCalculationEnd` instead.
127
127
  */
128
128
  whenComputingCompleteAsync(e) {
129
- const t = this._injector.get(R);
129
+ const t = this._injector.get(F);
130
130
  return t.computingStatus ? Promise.resolve(!0) : A(U(
131
131
  t.computingStatus$.pipe(j((r) => r)),
132
132
  Q(e != null ? e : 3e4).pipe(G(() => !1))
@@ -179,7 +179,7 @@ let l = class extends _ {
179
179
  * ```
180
180
  */
181
181
  setMaxIteration(e) {
182
- this._configService.setConfig(b, e);
182
+ this._configService.setConfig(T, e);
183
183
  }
184
184
  /**
185
185
  * Execute a batch of formulas asynchronously and receive computed results.
@@ -253,7 +253,7 @@ let l = class extends _ {
253
253
  executeFormulas(e, t = 3e4) {
254
254
  return new Promise((r, i) => {
255
255
  const n = this._commandService.onCommandExecuted((o) => {
256
- if (o.id !== w.id)
256
+ if (o.id !== y.id)
257
257
  return;
258
258
  const s = o.params;
259
259
  clearTimeout(a), n.dispose(), s.result != null ? r(s.result) : i(new Error("Formula batch calculation returned no result"));
@@ -261,7 +261,7 @@ let l = class extends _ {
261
261
  n.dispose(), i(new Error("Formula batch calculation timeout"));
262
262
  }, t);
263
263
  this._commandService.executeCommand(
264
- D.id,
264
+ R.id,
265
265
  { formulas: e },
266
266
  { onlyLocal: !0 }
267
267
  );
@@ -291,7 +291,7 @@ let l = class extends _ {
291
291
  getAllDependencyTrees(e = 3e4) {
292
292
  return new Promise((t, r) => {
293
293
  const i = this._commandService.onCommandExecuted((a) => {
294
- if (a.id !== M.id)
294
+ if (a.id !== b.id)
295
295
  return;
296
296
  const o = a.params;
297
297
  clearTimeout(n), i.dispose(), o.result != null ? t(o.result) : t([]);
@@ -299,7 +299,7 @@ let l = class extends _ {
299
299
  i.dispose(), r(new Error("Formula dependency calculation timeout"));
300
300
  }, e);
301
301
  this._commandService.executeCommand(
302
- I.id,
302
+ w.id,
303
303
  void 0,
304
304
  { onlyLocal: !0 }
305
305
  );
@@ -342,7 +342,7 @@ let l = class extends _ {
342
342
  getCellDependencyTree(e, t = 3e4) {
343
343
  return new Promise((r, i) => {
344
344
  const n = this._commandService.onCommandExecuted((o) => {
345
- if (o.id !== N.id)
345
+ if (o.id !== D.id)
346
346
  return;
347
347
  const s = o.params;
348
348
  clearTimeout(a), n.dispose(), r(s.result);
@@ -350,7 +350,7 @@ let l = class extends _ {
350
350
  n.dispose(), i(new Error("Cell dependency calculation timeout"));
351
351
  }, t);
352
352
  this._commandService.executeCommand(
353
- B.id,
353
+ M.id,
354
354
  e,
355
355
  { onlyLocal: !0 }
356
356
  );
@@ -505,7 +505,7 @@ let l = class extends _ {
505
505
  * ```
506
506
  */
507
507
  setFormulaReturnDependencyTree(e) {
508
- this._configService.setConfig(P, e);
508
+ this._configService.setConfig(I, e);
509
509
  }
510
510
  /**
511
511
  * Parse a formula string and return its **formula expression tree**.
@@ -621,7 +621,7 @@ let l = class extends _ {
621
621
  getRangeDependentsAndInRangeFormulas(e, t = 3e4) {
622
622
  return new Promise((r, i) => {
623
623
  const n = this._commandService.onCommandExecuted((o) => {
624
- if (o.id !== L.id)
624
+ if (o.id !== N.id)
625
625
  return;
626
626
  const s = o.params;
627
627
  clearTimeout(a), n.dispose(), s.result != null ? r(s.result) : r({ dependents: [], inRanges: [] });
@@ -629,7 +629,7 @@ let l = class extends _ {
629
629
  n.dispose(), i(new Error("Range dependents calculation timeout"));
630
630
  }, t);
631
631
  this._commandService.executeCommand(
632
- O.id,
632
+ B.id,
633
633
  { unitRanges: e },
634
634
  { onlyLocal: !0 }
635
635
  );
@@ -641,9 +641,9 @@ l = z([
641
641
  u(1, c(C)),
642
642
  u(2, c(v)),
643
643
  u(3, h),
644
- u(4, g),
645
- u(5, E),
646
- u(6, x)
644
+ u(4, P),
645
+ u(5, L),
646
+ u(6, O)
647
647
  ], l);
648
648
  class V extends S {
649
649
  getFormula() {
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Hc = Object.defineProperty;
2
2
  var Gc = (i, a, e) => a in i ? Hc(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
3
3
  var A = (i, a, e) => Gc(i, typeof a != "symbol" ? a + "" : a, e);
4
- import { LRUMap as Wc, hashAlgorithm as Qc, isRealNum as q, numfmt as mr, ObjectMatrix as me, CommandType as be, MAX_COLUMN_COUNT as Nr, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, MAX_ROW_COUNT as Ln, columnLabelToNumber as Ro, createIdentifier as Je, Disposable as Se, IUniverInstanceService as zr, moveRangeByOffset as Na, isValidRange as qc, isFormulaString as Et, isFormulaId as wt, Rectangle as hi, cellToRange as Xc, Inject as Ee, UniverInstanceType as tr, BooleanNumber as yo, LocaleService as Kc, BuildTextUtils as Zc, LocaleType as Ct, getNumfmtParseValueFilter as as, CellValueType as Dt, isTextFormat as zc, RichTextBuilder as Jc, toDisposable as el, Injector as bo, generateRandomId as po, sortRules as tl, RTree as Ys, IConfigService as Va, AsyncLock as rl, requestImmediateMacroTask as nl, ICommandService as hr, DataStreamTreeTokenType as Be, DisposableCollection as sl, Optional as al, LifecycleService as il, Plugin as ol, merge as ul, touchDependencies as Ss } from "@univerjs/core";
4
+ import { LRUMap as Wc, hashAlgorithm as Qc, isRealNum as q, numfmt as mr, ObjectMatrix as me, CommandType as be, MAX_COLUMN_COUNT as Nr, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, MAX_ROW_COUNT as Ln, columnLabelToNumber as Ro, createIdentifier as Je, Disposable as Se, IUniverInstanceService as zr, moveRangeByOffset as Na, isValidRange as qc, isFormulaString as Et, isFormulaId as wt, Rectangle as hi, cellToRange as Xc, Inject as Ee, UniverInstanceType as tr, BooleanNumber as yo, LocaleService as Kc, BuildTextUtils as Zc, LocaleType as Ct, getNumfmtParseValueFilter as as, CellValueType as Dt, isTextFormat as zc, RichTextBuilder as Jc, toDisposable as el, Injector as bo, generateRandomId as po, sortRules as tl, RTree as Ys, AsyncLock as rl, requestImmediateMacroTask as nl, IConfigService as Va, ICommandService as hr, DataStreamTreeTokenType as Be, DisposableCollection as sl, Optional as al, LifecycleService as il, Plugin as ol, merge as ul, touchDependencies as Ss } from "@univerjs/core";
5
5
  import { Subject as Pt, BehaviorSubject as Oa, distinctUntilChanged as No, combineLatest as cl, map as ll, Observable as fl, shareReplay as ml, bufferWhen as hl, filter as gi } from "rxjs";
6
6
  import { DataSyncPrimaryController as gl } from "@univerjs/rpc";
7
7
  var or = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(or || {}), It = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(It || {}), we = /* @__PURE__ */ ((i) => (i.ALL = "#All", i.DATA = "#Data", i.HEADERS = "#Headers", i.TOTALS = "#Totals", i.THIS_ROW = "#This Row", i))(we || {}), ft = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ft || {});
@@ -33093,10 +33093,11 @@ let pa = class extends Se {
33093
33093
  }
33094
33094
  }
33095
33095
  };
33096
- this._commandService.executeCommand(cs.id, c).then(() => {
33096
+ this._commandService.executeCommand(cs.id, c, { onlyLocal: !0 }).then(() => {
33097
33097
  this._commandService.executeCommand(
33098
33098
  mn.id,
33099
- { [t]: { [r]: { [s]: !0 } } }
33099
+ { [t]: { [r]: { [s]: !0 } } },
33100
+ { onlyLocal: !0 }
33100
33101
  );
33101
33102
  });
33102
33103
  };
@@ -33159,7 +33160,7 @@ let pa = class extends Se {
33159
33160
  subUnitId: e,
33160
33161
  formulaIdList: t
33161
33162
  };
33162
- this._commandService.executeCommand(ls.id, r);
33163
+ this._commandService.executeCommand(ls.id, r, { onlyLocal: !0 });
33163
33164
  const n = this._ensureCacheMap(a, e);
33164
33165
  t.forEach((s) => n.delete(s));
33165
33166
  }
@@ -33178,7 +33179,8 @@ let pa = class extends Se {
33178
33179
  const r = this.getFormulaValueSync(a, e, t);
33179
33180
  r && (r.status = Er.WAIT, this._commandService.executeCommand(
33180
33181
  mn.id,
33181
- { [a]: { [e]: { [t]: !0 } } }
33182
+ { [a]: { [e]: { [t]: !0 } } },
33183
+ { onlyLocal: !0 }
33182
33184
  ));
33183
33185
  }
33184
33186
  };