@univerjs/sheets-numfmt 0.5.3-nightly.202501071618 → 0.5.3-nightly.202501081606

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.
Files changed (2) hide show
  1. package/lib/es/index.js +29 -29
  2. package/package.json +5 -5
package/lib/es/index.js CHANGED
@@ -2,7 +2,7 @@ var te = Object.defineProperty;
2
2
  var ne = (e, t, n) => t in e ? te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var N = (e, t, n) => ne(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { numfmt as $, CommandType as I, ICommandService as C, IUniverInstanceService as O, IUndoRedoService as re, sequenceExecute as se, Range as _, CellValueType as V, LocaleType as oe, Inject as M, ThemeService as ce, LocaleService as ie, Disposable as q, ObjectMatrix as j, InterceptorEffectEnum as B, isRealNum as ae, UniverInstanceType as z, DependentOn as ue, Injector as le, Plugin as me, registerDependencies as fe, touchDependencies as L } from "@univerjs/core";
5
- import { getSheetCommandTarget as A, transformCellsToRange as de, rangeMerge as G, SetNumfmtMutation as X, factorySetNumfmtUndoMutation as he, RemoveNumfmtMutation as ge, factoryRemoveNumfmtUndoMutation as ve, SheetsSelectionsService as D, INumfmtService as w, SheetInterceptorService as pe, INTERCEPTOR_POINT as Se, InterceptCellContentPriority as ye, SetRangeValuesMutation as _e, UniverSheetsPlugin as Ce } from "@univerjs/sheets";
5
+ import { getSheetCommandTarget as A, transformCellsToRange as de, rangeMerge as G, SetNumfmtMutation as X, factorySetNumfmtUndoMutation as he, RemoveNumfmtMutation as ge, factoryRemoveNumfmtUndoMutation as pe, SheetsSelectionsService as D, INumfmtService as w, SheetInterceptorService as ve, INTERCEPTOR_POINT as Se, InterceptCellContentPriority as ye, SetRangeValuesMutation as _e, UniverSheetsPlugin as Ce } from "@univerjs/sheets";
6
6
  import { BehaviorSubject as Y, switchMap as be, of as Me, skip as $e } from "rxjs";
7
7
  import { DEFAULT_TEXT_FORMAT as Ee } from "@univerjs/engine-numfmt";
8
8
  const J = [
@@ -216,8 +216,8 @@ const J = [
216
216
  }, f = [], h = [];
217
217
  if (l.length) {
218
218
  Object.keys(m.values).forEach((g) => {
219
- const v = m.values[g];
220
- v.ranges = G(v.ranges);
219
+ const p = m.values[g];
220
+ p.ranges = G(p.ranges);
221
221
  }), f.push({
222
222
  id: X.id,
223
223
  params: m
@@ -230,15 +230,15 @@ const J = [
230
230
  id: ge.id,
231
231
  params: d
232
232
  });
233
- const a = ve(e, d);
233
+ const a = pe(e, d);
234
234
  h.push(...a);
235
235
  }
236
- const p = se(f, n).result;
237
- return p && s.pushUndoRedo({
236
+ const v = se(f, n).result;
237
+ return v && s.pushUndoRedo({
238
238
  unitID: c,
239
239
  undoMutations: h,
240
240
  redoMutations: f
241
- }), p;
241
+ }), v;
242
242
  }
243
243
  }, xe = {
244
244
  id: "sheet.command.numfmt.add.decimal.command",
@@ -252,10 +252,10 @@ const J = [
252
252
  const { unitId: u, subUnitId: l } = c;
253
253
  let i = 0;
254
254
  o.forEach((h) => {
255
- _.foreach(h.range, (p, a) => {
256
- const g = r.getValue(u, l, p, a);
255
+ _.foreach(h.range, (v, a) => {
256
+ const g = r.getValue(u, l, v, a);
257
257
  if (!g) {
258
- const S = c.worksheet.getCellRaw(p, a);
258
+ const S = c.worksheet.getCellRaw(v, a);
259
259
  if (!i && S && S.t === V.NUMBER && S.v) {
260
260
  const y = /\.(\d*)$/.exec(String(S.v));
261
261
  if (y) {
@@ -267,24 +267,24 @@ const J = [
267
267
  }
268
268
  return;
269
269
  }
270
- const v = T(g.pattern);
271
- i = v > i ? v : i;
270
+ const p = T(g.pattern);
271
+ i = p > i ? p : i;
272
272
  });
273
273
  });
274
274
  const m = i + 1, d = x(`0${m > 0 ? ".0" : ""}`, m), f = [];
275
275
  return o.forEach((h) => {
276
- _.foreach(h.range, (p, a) => {
277
- const g = r.getValue(u, l, p, a);
276
+ _.foreach(h.range, (v, a) => {
277
+ const g = r.getValue(u, l, v, a);
278
278
  if (!g)
279
279
  f.push({
280
- row: p,
280
+ row: v,
281
281
  col: a,
282
282
  pattern: d
283
283
  });
284
284
  else {
285
- const v = T(g.pattern), S = x(g.pattern, v + 1);
285
+ const p = T(g.pattern), S = x(g.pattern, p + 1);
286
286
  S !== g.pattern && f.push({
287
- row: p,
287
+ row: v,
288
288
  col: a,
289
289
  pattern: S
290
290
  });
@@ -347,10 +347,10 @@ const Pe = {
347
347
  if (!c) return !1;
348
348
  const { unitId: u, subUnitId: l } = c;
349
349
  let i = 0;
350
- o.forEach((p) => {
351
- _.foreach(p.range, (a, g) => {
352
- const v = r.getValue(u, l, a, g);
353
- if (!v) {
350
+ o.forEach((v) => {
351
+ _.foreach(v.range, (a, g) => {
352
+ const p = r.getValue(u, l, a, g);
353
+ if (!p) {
354
354
  const y = c.worksheet.getCellRaw(a, g);
355
355
  if (!i && y && y.t === V.NUMBER && y.v) {
356
356
  const E = /\.(\d*)$/.exec(String(y.v));
@@ -363,26 +363,26 @@ const Pe = {
363
363
  }
364
364
  return;
365
365
  }
366
- const S = T(v.pattern);
366
+ const S = T(p.pattern);
367
367
  i = S > i ? S : i;
368
368
  });
369
369
  });
370
370
  const m = i - 1, d = x(`0${m > 0 ? ".0" : "."}`, m), f = [];
371
- return o.forEach((p) => {
372
- _.foreach(p.range, (a, g) => {
373
- const v = r.getValue(u, l, a, g);
374
- if (!v)
371
+ return o.forEach((v) => {
372
+ _.foreach(v.range, (a, g) => {
373
+ const p = r.getValue(u, l, a, g);
374
+ if (!p)
375
375
  f.push({
376
376
  row: a,
377
377
  col: g,
378
378
  pattern: d
379
379
  });
380
380
  else {
381
- const S = T(v.pattern);
381
+ const S = T(p.pattern);
382
382
  f.push({
383
383
  row: a,
384
384
  col: g,
385
- pattern: x(v.pattern, S - 1)
385
+ pattern: x(p.pattern, S - 1)
386
386
  });
387
387
  }
388
388
  });
@@ -487,7 +487,7 @@ let P = class extends q {
487
487
  };
488
488
  P = Fe([
489
489
  b(0, O),
490
- b(1, M(pe)),
490
+ b(1, M(ve)),
491
491
  b(2, M(ce)),
492
492
  b(3, M(C)),
493
493
  b(4, M(w)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-numfmt",
3
- "version": "0.5.3-nightly.202501071618",
3
+ "version": "0.5.3-nightly.202501081606",
4
4
  "private": false,
5
5
  "description": "UniverSheet numfmt plugin",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -53,14 +53,14 @@
53
53
  "rxjs": ">=7.0.0"
54
54
  },
55
55
  "dependencies": {
56
- "@univerjs/core": "0.5.3-nightly.202501071618",
57
- "@univerjs/sheets": "0.5.3-nightly.202501071618",
58
- "@univerjs/engine-numfmt": "0.5.3-nightly.202501071618"
56
+ "@univerjs/core": "0.5.3-nightly.202501081606",
57
+ "@univerjs/engine-numfmt": "0.5.3-nightly.202501081606",
58
+ "@univerjs/sheets": "0.5.3-nightly.202501081606"
59
59
  },
60
60
  "devDependencies": {
61
61
  "rxjs": "^7.8.1",
62
62
  "typescript": "^5.7.2",
63
- "vite": "^6.0.6",
63
+ "vite": "^6.0.7",
64
64
  "vitest": "^2.1.8",
65
65
  "@univerjs-infra/shared": "0.5.3"
66
66
  },