@univerjs/sheets-conditional-formatting-ui 0.9.2 → 0.9.3

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/index.js CHANGED
@@ -2,12 +2,12 @@ var lr = Object.defineProperty;
2
2
  var cr = (t, e, r) => e in t ? lr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var Se = (t, e, r) => cr(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { CommandType as me, ICommandService as te, IUniverInstanceService as Z, ColorKit as mn, BooleanNumber as le, LocaleService as re, UniverInstanceType as A, Tools as Bt, get as ur, set as dr, createInterceptorKey as fn, InterceptorManager as hr, Inject as P, Disposable as ue, Injector as fe, Rectangle as ye, generateRandomId as vr, ObjectMatrix as Me, Range as be, toDisposable as pn, InterceptorEffectEnum as gr, DependentOn as Cn, IConfigService as yn, Plugin as bn, merge as In, registerDependencies as mr, touchDependencies as kt } from "@univerjs/core";
5
- import { getSheetCommandTarget as Ie, SheetsSelectionsService as je, RemoveSheetMutation as fr, SetWorksheetActiveOperation as Wt, setEndForRange as pr, SetSelectionsOperation as Cr, checkRangesEditablePermission as mt, SheetInterceptorService as qt, ClearSelectionFormatCommand as yr, ClearSelectionAllCommand as br, RangeMergeUtil as Ir, rangeToDiscreteRange as Sr, findAllRectangle as ft, createTopMatrixFromMatrix as pt, SheetPermissionCheckController as _r, WorksheetEditPermission as Sn, WorksheetSetCellStylePermission as _n, RangeProtectionPermissionEditPoint as wn, WorkbookEditablePermission as Rn, RefRangeService as wr, handleDefaultRangeChangeWithEffectRefCommands as Rr, INTERCEPTOR_POINT as Tr, AFTER_CELL_EDIT as xr } from "@univerjs/sheets";
6
- import { ConditionalFormattingRuleModel as Q, CFSubRuleType as F, CFRuleType as L, AddConditionalRuleMutation as se, CFNumberOperator as U, getColorScaleFromValue as Er, iconMap as Ve, DEFAULT_BG_COLOR as Nr, DEFAULT_FONT_COLOR as Mr, defaultDataBarPositiveColor as Ke, defaultDataBarNativeColor as Xe, CFValueType as D, createDefaultValueByValueType as Je, removeUndefinedAttr as Vr, createDefaultValue as Ct, CFTextOperator as H, CFTimePeriodOperator as ve, iconGroup as kr, getOppositeOperator as Ht, compareWithNumber as Fr, EMPTY_ICON_TYPE as Lr, SetCfCommand as Ur, AddCfCommand as Tn, SetConditionalRuleMutation as _e, DeleteConditionalRuleMutation as we, MoveConditionalRuleMutation as xn, ClearWorksheetCfCommand as En, DeleteCfCommand as Yt, MoveCfCommand as Pr, ClearRangeCfCommand as Or, createDefaultRule as xe, setConditionalRuleMutationUndoFactory as $e, DeleteConditionalRuleMutationUndoFactory as Ae, ConditionalFormattingViewModel as it, SHEET_CONDITIONAL_FORMATTING_PLUGIN as st, AddConditionalRuleMutationUndoFactory as Nn, isRangesEqual as Dr, ConditionalFormattingService as Mn, DEFAULT_PADDING as $r, DEFAULT_WIDTH as Ar, UniverSheetsConditionalFormattingPlugin as Vn, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as Hr } from "@univerjs/sheets-conditional-formatting";
5
+ import { getSheetCommandTarget as Ie, SheetsSelectionsService as Be, RemoveSheetMutation as fr, SetWorksheetActiveOperation as Wt, setEndForRange as pr, SetSelectionsOperation as Cr, checkRangesEditablePermission as mt, SheetInterceptorService as qt, ClearSelectionFormatCommand as yr, ClearSelectionAllCommand as br, RangeMergeUtil as Ir, rangeToDiscreteRange as Sr, findAllRectangle as ft, createTopMatrixFromMatrix as pt, SheetPermissionCheckController as _r, WorksheetEditPermission as Sn, WorksheetSetCellStylePermission as _n, RangeProtectionPermissionEditPoint as wn, WorkbookEditablePermission as Rn, RefRangeService as wr, handleDefaultRangeChangeWithEffectRefCommands as Rr, INTERCEPTOR_POINT as Tr, AFTER_CELL_EDIT as xr } from "@univerjs/sheets";
6
+ import { ConditionalFormattingRuleModel as Q, CFSubRuleType as F, CFRuleType as L, AddConditionalRuleMutation as se, CFNumberOperator as U, getColorScaleFromValue as Er, iconMap as Ve, DEFAULT_BG_COLOR as Nr, DEFAULT_FONT_COLOR as Mr, defaultDataBarPositiveColor as Ke, defaultDataBarNativeColor as Xe, CFValueType as D, createDefaultValueByValueType as Je, removeUndefinedAttr as Vr, createDefaultValue as Ct, CFTextOperator as H, CFTimePeriodOperator as ve, iconGroup as kr, getOppositeOperator as Ht, compareWithNumber as Fr, EMPTY_ICON_TYPE as Lr, SetCfCommand as Ur, AddCfCommand as Tn, SetConditionalRuleMutation as _e, DeleteConditionalRuleMutation as we, MoveConditionalRuleMutation as xn, ClearWorksheetCfCommand as En, DeleteCfCommand as Yt, MoveCfCommand as Pr, ClearRangeCfCommand as Or, createDefaultRule as xe, setConditionalRuleMutationUndoFactory as Ae, DeleteConditionalRuleMutationUndoFactory as He, ConditionalFormattingViewModel as it, SHEET_CONDITIONAL_FORMATTING_PLUGIN as st, AddConditionalRuleMutationUndoFactory as Nn, isRangesEqual as Dr, ConditionalFormattingService as Mn, DEFAULT_PADDING as $r, DEFAULT_WIDTH as Ar, UniverSheetsConditionalFormattingPlugin as Vn, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as Hr } from "@univerjs/sheets-conditional-formatting";
7
7
  import { useDependency as q, useSidebarClick as Nt, ILayoutService as jr, useScrollYOverContainer as Br, ISidebarService as kn, useObservable as Wr, ComponentManager as qr, getMenuHiddenObservable as Gr, MenuItemType as Zr, RibbonDataGroup as zr, IMenuManagerService as Yr } from "@univerjs/ui";
8
8
  import { jsx as c, jsxs as k, Fragment as jt } from "react/jsx-runtime";
9
- import { forwardRef as oe, useRef as ge, createElement as de, useMemo as J, useState as N, useEffect as K } from "react";
10
- import { Dropdown as Gt, clsx as X, ColorPicker as Kr, borderClassName as Be, Select as ce, InputNumber as ke, RadioGroup as Xr, Radio as Kt, Checkbox as yt, Input as Jr, Button as Xt, Tooltip as Jt, ReactGridLayout as Qr } from "@univerjs/design";
9
+ import { forwardRef as oe, useRef as ge, createElement as de, useMemo as J, useState as N, useEffect as X } from "react";
10
+ import { Dropdown as Gt, clsx as Y, ColorPicker as Kr, borderClassName as Le, Select as ce, InputNumber as ke, RadioGroup as Xr, Radio as Kt, Checkbox as yt, Input as Jr, Button as Xt, Tooltip as Jt, ReactGridLayout as Qr } from "@univerjs/design";
11
11
  import { serializeRange as Fn, deserializeRangeWithSheet as ei } from "@univerjs/engine-formula";
12
12
  import { FormulaEditor as Mt, RangeSelector as ti } from "@univerjs/sheets-formula-ui";
13
13
  import { useHighlightRange as ni, ISheetClipboardService as ri, COPY_TYPE as Qt, PREDEFINED_HOOK_NAME as Ft, virtualizeDiscreteRanges as Ln, getRepeatRange as ii, SheetSkeletonManagerService as Un, IAutoFillService as si, APPLY_TYPE as Lt, getAutoFillRepeatRange as oi, getCurrentRangeDisable$ as ai, IFormatPainterService as li, FormatPainterStatus as Ut } from "@univerjs/sheets-ui";
@@ -369,7 +369,7 @@ tr.displayName = "UnderlineIcon";
369
369
  const Fe = (t) => {
370
370
  const { color: e, onChange: r, disable: n = !1, Icon: i = Jn, className: s } = t, o = J(() => new mn(e), [e]), u = () => {
371
371
  const a = {
372
- className: X("univer-fill-primary-600", n && s),
372
+ className: Y("univer-fill-primary-600", n && s),
373
373
  extend: { colorChannel1: o.isValid ? e : "" }
374
374
  };
375
375
  return /* @__PURE__ */ c(i, { ...a });
@@ -381,7 +381,7 @@ const Fe = (t) => {
381
381
  children: /* @__PURE__ */ c(
382
382
  "span",
383
383
  {
384
- className: X("univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", s),
384
+ className: Y("univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", s),
385
385
  children: u()
386
386
  }
387
387
  )
@@ -450,7 +450,7 @@ const Fe = (t) => {
450
450
  return /* @__PURE__ */ c(
451
451
  "div",
452
452
  {
453
- className: X(i, {
453
+ className: Y(i, {
454
454
  "univer-font-bold": x,
455
455
  "univer-italic": R
456
456
  }),
@@ -460,7 +460,7 @@ const Fe = (t) => {
460
460
  );
461
461
  }
462
462
  }
463
- }, at = X("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", Be), Ee = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Pt = (t) => {
463
+ }, at = Y("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", Le), Ee = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Pt = (t) => {
464
464
  var y;
465
465
  const { type: e, className: r, onChange: n, id: i, value: s } = t, o = q(Z), u = o.getCurrentUnitForType(A.UNIVER_SHEET).getUnitId(), a = (y = o.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : y.getSheetId(), h = J(() => String(s).startsWith("=") ? String(s) : "=", [s]), l = J(() => [D.max, D.min, "none"].includes(e) ? { disabled: !0 } : [D.percent, D.percentile].includes(e) ? {
466
466
  min: 0,
@@ -476,7 +476,7 @@ const Fe = (t) => {
476
476
  Mt,
477
477
  {
478
478
  ref: d,
479
- className: X("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Be),
479
+ className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Le),
480
480
  initValue: h,
481
481
  unitId: u,
482
482
  subUnitId: a,
@@ -531,10 +531,10 @@ const Fe = (t) => {
531
531
  const m = "#2e55ef";
532
532
  return n && ((_ = n.config[n.config.length - 1]) == null ? void 0 : _.color) || m;
533
533
  }), E = J(() => (m) => {
534
- const { minType: _, medianType: j, maxType: Y, minValue: pe, medianValue: Ce, maxValue: Le, minColor: Ue, medianColor: $, maxColor: B } = m, G = [];
535
- return G.push({ color: Ue, value: { type: _, value: pe } }), j !== "none" && G.push({ color: $, value: { type: j, value: Ce } }), G.push({ color: B, value: { type: Y, value: Le } }), { config: G.map((ee, ne) => ({ ...ee, index: ne })), type: L.colorScale };
534
+ const { minType: _, medianType: j, maxType: K, minValue: pe, medianValue: Ce, maxValue: Ue, minColor: Pe, medianColor: $, maxColor: B } = m, G = [];
535
+ return G.push({ color: Pe, value: { type: _, value: pe } }), j !== "none" && G.push({ color: $, value: { type: j, value: Ce } }), G.push({ color: B, value: { type: K, value: Ue } }), { config: G.map((ee, ne) => ({ ...ee, index: ne })), type: L.colorScale };
536
536
  }, []);
537
- K(() => e.intercept(e.getInterceptPoints().submit, {
537
+ X(() => e.intercept(e.getInterceptPoints().submit, {
538
538
  handler() {
539
539
  return E({ minType: a, medianType: l, maxType: v, minValue: y, medianValue: w, maxValue: R, minColor: T, medianColor: b, maxColor: C });
540
540
  }
@@ -774,7 +774,7 @@ const Fe = (t) => {
774
774
  )
775
775
  ] })
776
776
  ] });
777
- }, Pe = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), rn = (t) => {
777
+ }, Oe = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), rn = (t) => {
778
778
  var f;
779
779
  const { onChange: e, className: r, value: n, type: i, id: s, disabled: o = !1 } = t, u = q(Z), a = u.getCurrentUnitOfType(A.UNIVER_SHEET).getUnitId(), h = (f = u.getCurrentUnitOfType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : f.getSheetId(), l = ge(null), [d, v] = N(!1);
780
780
  Nt((w) => {
@@ -794,7 +794,7 @@ const Fe = (t) => {
794
794
  Mt,
795
795
  {
796
796
  ref: l,
797
- className: X("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Be),
797
+ className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Le),
798
798
  initValue: w,
799
799
  unitId: a,
800
800
  subUnitId: h,
@@ -831,11 +831,11 @@ const Fe = (t) => {
831
831
  var m;
832
832
  return n ? ((m = n.config) == null ? void 0 : m.nativeColor) || Xe : Xe;
833
833
  }), l = [
834
- Pe(D.num, r),
835
- Pe(D.percent, r),
836
- Pe(D.percentile, r),
837
- Pe(D.formula, r)
838
- ], d = [Pe(D.min, r), ...l], v = [Pe(D.max, r), ...l], [p, y] = N(() => {
834
+ Oe(D.num, r),
835
+ Oe(D.percent, r),
836
+ Oe(D.percentile, r),
837
+ Oe(D.formula, r)
838
+ ], d = [Oe(D.min, r), ...l], v = [Oe(D.max, r), ...l], [p, y] = N(() => {
839
839
  var _;
840
840
  const m = d[0].value;
841
841
  return n && ((_ = n.config) == null ? void 0 : _.min.type) || m;
@@ -862,7 +862,7 @@ const Fe = (t) => {
862
862
  positiveColor: m.positiveColor || Ke,
863
863
  nativeColor: m.nativeColor || Xe
864
864
  }, type: L.dataBar, isShowValue: m.isShowValue });
865
- K(() => e.intercept(e.getInterceptPoints().submit, {
865
+ X(() => e.intercept(e.getInterceptPoints().submit, {
866
866
  handler() {
867
867
  return S({ isGradient: i, minValue: I, minValueType: p, maxValue: x, maxValueType: f, positiveColor: o, nativeColor: a, isShowValue: g });
868
868
  }
@@ -1131,7 +1131,7 @@ const Fe = (t) => {
1131
1131
  const I = "#e8ecfc";
1132
1132
  return (R = e == null ? void 0 : e.bg) != null && R.rgb ? e.bg.rgb : I;
1133
1133
  });
1134
- K(() => {
1134
+ X(() => {
1135
1135
  const I = {
1136
1136
  bl: i,
1137
1137
  it: o
@@ -1139,11 +1139,11 @@ const Fe = (t) => {
1139
1139
  v !== void 0 && (I.cl = { rgb: v }), y !== void 0 && (I.bg = { rgb: y }), l !== void 0 && (I.st = { s: l }), a !== void 0 && (I.ul = { s: a }), r(Vr(I));
1140
1140
  }, [i, o, a, l, v, y]);
1141
1141
  const w = "univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";
1142
- return /* @__PURE__ */ k("div", { className: X("univer-my-2.5 univer-flex univer-justify-between", n), children: [
1142
+ return /* @__PURE__ */ k("div", { className: Y("univer-my-2.5 univer-flex univer-justify-between", n), children: [
1143
1143
  /* @__PURE__ */ c(
1144
1144
  "div",
1145
1145
  {
1146
- className: X(w, {
1146
+ className: Y(w, {
1147
1147
  "univer-bg-gray-100 dark:!univer-bg-gray-700": ut(i || le.FALSE)
1148
1148
  }),
1149
1149
  onClick: () => s(ct(i)),
@@ -1153,7 +1153,7 @@ const Fe = (t) => {
1153
1153
  /* @__PURE__ */ c(
1154
1154
  "div",
1155
1155
  {
1156
- className: X(w, {
1156
+ className: Y(w, {
1157
1157
  "univer-bg-gray-100 dark:!univer-bg-gray-700": ut(o || le.FALSE)
1158
1158
  }),
1159
1159
  onClick: () => u(ct(o)),
@@ -1163,7 +1163,7 @@ const Fe = (t) => {
1163
1163
  /* @__PURE__ */ c(
1164
1164
  "div",
1165
1165
  {
1166
- className: X(w, {
1166
+ className: Y(w, {
1167
1167
  "univer-bg-gray-100 dark:!univer-bg-gray-700": ut(a || le.FALSE)
1168
1168
  }),
1169
1169
  onClick: () => h(ct(a)),
@@ -1173,7 +1173,7 @@ const Fe = (t) => {
1173
1173
  /* @__PURE__ */ c(
1174
1174
  "div",
1175
1175
  {
1176
- className: X(w, {
1176
+ className: Y(w, {
1177
1177
  "univer-bg-gray-100 dark:!univer-bg-gray-700": ut(l || le.FALSE)
1178
1178
  }),
1179
1179
  onClick: () => d(ct(l)),
@@ -1191,11 +1191,11 @@ const Fe = (t) => {
1191
1191
  type: L.highlightCell,
1192
1192
  subType: F.formula
1193
1193
  });
1194
- K(() => r.intercept(r.getInterceptPoints().submit, {
1194
+ X(() => r.intercept(r.getInterceptPoints().submit, {
1195
1195
  handler() {
1196
1196
  return R({ style: v });
1197
1197
  }
1198
- }), [v, y, r]), K(() => r.intercept(r.getInterceptPoints().beforeSubmit, {
1198
+ }), [v, y, r]), X(() => r.intercept(r.getInterceptPoints().beforeSubmit, {
1199
1199
  handler: (b, S, C) => w || y.length === 1 || !y.startsWith("=") ? (I(n.t("sheet.cf.errorMessage.formulaError")), !1) : C(b)
1200
1200
  }), [w, y]);
1201
1201
  const x = (g) => {
@@ -1216,7 +1216,7 @@ const Fe = (t) => {
1216
1216
  Mt,
1217
1217
  {
1218
1218
  ref: d,
1219
- className: X("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Be),
1219
+ className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Le),
1220
1220
  errorText: w,
1221
1221
  isFocus: h,
1222
1222
  initValue: y,
@@ -1256,7 +1256,7 @@ const Fe = (t) => {
1256
1256
  t.children
1257
1257
  ] }), W = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }), Ei = (t) => {
1258
1258
  const { type: e, operator: r, onChange: n, value: i, interceptorManager: s } = t, o = q(re), [u, a] = N(() => typeof i == "number" ? i : 0), [h, l] = N(""), [d, v] = N(() => typeof i == "string" ? i : ""), [p, y] = N(""), [f, w] = N(() => Array.isArray(i) ? i[0] === void 0 ? 0 : i[0] : 0), [I, R] = N(""), [x, T] = N(() => Array.isArray(i) ? i[1] === void 0 ? 100 : i[1] : 100), [g, b] = N("");
1259
- switch (K(() => {
1259
+ switch (X(() => {
1260
1260
  switch (e) {
1261
1261
  case F.text: {
1262
1262
  [H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(r) && n(d);
@@ -1267,7 +1267,7 @@ const Fe = (t) => {
1267
1267
  break;
1268
1268
  }
1269
1269
  }
1270
- }, [e]), K(() => {
1270
+ }, [e]), X(() => {
1271
1271
  const S = s.intercept(s.getInterceptPoints().beforeSubmit, {
1272
1272
  handler: (C, M, E) => {
1273
1273
  switch (e) {
@@ -1406,7 +1406,7 @@ const Fe = (t) => {
1406
1406
  const g = "";
1407
1407
  return i ? (S = i.value) != null ? S : Ct(i.subType, i.operator) : g;
1408
1408
  }), [p, y] = N({}), f = J(() => (g) => {
1409
- var b, S, C, M, E, V, O, m, _, j, Y, pe, Ce, Le, Ue;
1409
+ var b, S, C, M, E, V, O, m, _, j, K, pe, Ce, Ue, Pe;
1410
1410
  switch (g.subType || s) {
1411
1411
  case F.text: {
1412
1412
  if ([H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(h))
@@ -1433,7 +1433,7 @@ const Fe = (t) => {
1433
1433
  type: L.highlightCell,
1434
1434
  subType: (_ = g.subType) != null ? _ : s,
1435
1435
  operator: (j = g.operator) != null ? j : h,
1436
- style: (Y = g.style) != null ? Y : p,
1436
+ style: (K = g.style) != null ? K : p,
1437
1437
  value: (pe = g.value) != null ? pe : d
1438
1438
  };
1439
1439
  break;
@@ -1442,15 +1442,15 @@ const Fe = (t) => {
1442
1442
  return {
1443
1443
  type: L.highlightCell,
1444
1444
  subType: (Ce = g.subType) != null ? Ce : s,
1445
- operator: (Le = g.operator) != null ? Le : h,
1446
- style: (Ue = g.style) != null ? Ue : p
1445
+ operator: (Ue = g.operator) != null ? Ue : h,
1446
+ style: (Pe = g.style) != null ? Pe : p
1447
1447
  };
1448
1448
  }, [s, h, d, p]);
1449
- K(() => e.intercept(e.getInterceptPoints().submit, {
1449
+ X(() => e.intercept(e.getInterceptPoints().submit, {
1450
1450
  handler() {
1451
1451
  return f({});
1452
1452
  }
1453
- }), [f, e]), K(() => {
1453
+ }), [f, e]), X(() => {
1454
1454
  u.some((g) => g.value === s) || o(u[0].value);
1455
1455
  }, [u]);
1456
1456
  const w = (g) => {
@@ -1524,7 +1524,7 @@ const Fe = (t) => {
1524
1524
  /* @__PURE__ */ c(
1525
1525
  ke,
1526
1526
  {
1527
- className: X({
1527
+ className: Y({
1528
1528
  "univer-border-red-500": e
1529
1529
  }),
1530
1530
  value: Number(t.value) || 0,
@@ -1536,6 +1536,7 @@ const Fe = (t) => {
1536
1536
  Mt,
1537
1537
  {
1538
1538
  ref: u,
1539
+ className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Le),
1539
1540
  initValue: String(t.value),
1540
1541
  unitId: s,
1541
1542
  subUnitId: o,
@@ -1678,12 +1679,10 @@ const Fe = (t) => {
1678
1679
  {
1679
1680
  className: "univer-font-medium univer-text-gray-600 dark:!univer-text-gray-200",
1680
1681
  children: [
1681
- "(",
1682
1682
  i.t("sheet.cf.iconSet.when"),
1683
1683
  i.t(`sheet.cf.symbol.${Ht(I.operator)}`),
1684
1684
  R,
1685
- f ? "" : ` ${i.t("sheet.cf.iconSet.and")} `,
1686
- ")"
1685
+ f ? "" : ` ${i.t("sheet.cf.iconSet.and")} `
1687
1686
  ]
1688
1687
  }
1689
1688
  )
@@ -1691,7 +1690,7 @@ const Fe = (t) => {
1691
1690
  ]
1692
1691
  }
1693
1692
  ),
1694
- /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center univer-justify-between univer-gap-4", children: [
1693
+ /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4", children: [
1695
1694
  /* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: /* @__PURE__ */ c(
1696
1695
  Gt,
1697
1696
  {
@@ -1699,14 +1698,9 @@ const Fe = (t) => {
1699
1698
  children: /* @__PURE__ */ k(
1700
1699
  "div",
1701
1700
  {
1702
- className: X("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-gray-200", Be),
1701
+ className: Y("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-gray-200", Le),
1703
1702
  children: [
1704
- y ? /* @__PURE__ */ c("img", { src: y, className: "univer-size-4", draggable: !1 }) : /* @__PURE__ */ c(
1705
- ot,
1706
- {
1707
- className: "univer-size-4"
1708
- }
1709
- ),
1703
+ y ? /* @__PURE__ */ c("img", { src: y, className: "univer-size-4", draggable: !1 }) : /* @__PURE__ */ c(ot, { className: "univer-size-4" }),
1710
1704
  /* @__PURE__ */ c(Zt, {})
1711
1705
  ]
1712
1706
  }
@@ -1716,7 +1710,7 @@ const Fe = (t) => {
1716
1710
  f ? /* @__PURE__ */ k(
1717
1711
  "div",
1718
1712
  {
1719
- className: "univer-mt-0 univer-w-[45%] univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
1713
+ className: "univer-mt-0 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
1720
1714
  children: [
1721
1715
  i.t("sheet.cf.iconSet.rule"),
1722
1716
  /* @__PURE__ */ k("span", { className: "univer-font-medium", children: [
@@ -1742,7 +1736,7 @@ const Fe = (t) => {
1742
1736
  /* @__PURE__ */ k(
1743
1737
  "div",
1744
1738
  {
1745
- className: "univer-mt-3 univer-flex univer-items-center univer-justify-between univer-gap-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
1739
+ className: "univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
1746
1740
  children: [
1747
1741
  /* @__PURE__ */ c("div", { children: i.t("sheet.cf.iconSet.type") }),
1748
1742
  /* @__PURE__ */ c("div", { children: i.t("sheet.cf.iconSet.value") })
@@ -1752,12 +1746,11 @@ const Fe = (t) => {
1752
1746
  /* @__PURE__ */ k(
1753
1747
  "div",
1754
1748
  {
1755
- className: "univer-mt-3 univer-flex univer-items-center univer-justify-between univer-gap-4",
1749
+ className: "univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4",
1756
1750
  children: [
1757
1751
  /* @__PURE__ */ c(
1758
1752
  ce,
1759
1753
  {
1760
- className: "univer-flex-shrink-0",
1761
1754
  options: o,
1762
1755
  value: d.value.type,
1763
1756
  onChange: (T) => {
@@ -1765,7 +1758,7 @@ const Fe = (t) => {
1765
1758
  }
1766
1759
  }
1767
1760
  ),
1768
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
1761
+ /* @__PURE__ */ c(
1769
1762
  Ni,
1770
1763
  {
1771
1764
  id: v,
@@ -1776,7 +1769,7 @@ const Fe = (t) => {
1776
1769
  u(T, v);
1777
1770
  }
1778
1771
  }
1779
- ) })
1772
+ )
1780
1773
  ]
1781
1774
  }
1782
1775
  )
@@ -1843,7 +1836,7 @@ const Fe = (t) => {
1843
1836
  const b = Ve[g] || [], S = new Array(b.length).fill("").map((C, M, E) => an(g, M, E));
1844
1837
  h(S), s(p(S));
1845
1838
  };
1846
- K(() => {
1839
+ X(() => {
1847
1840
  const g = e.intercept(e.getInterceptPoints().submit, {
1848
1841
  handler() {
1849
1842
  return { type: L.iconSet, isShowValue: l, config: a };
@@ -1852,7 +1845,7 @@ const Fe = (t) => {
1852
1845
  return () => {
1853
1846
  g();
1854
1847
  };
1855
- }, [l, a, e]), K(() => {
1848
+ }, [l, a, e]), X(() => {
1856
1849
  const g = e.intercept(e.getInterceptPoints().beforeSubmit, {
1857
1850
  handler() {
1858
1851
  return Object.keys(i).length === 0;
@@ -1887,7 +1880,7 @@ const Fe = (t) => {
1887
1880
  children: /* @__PURE__ */ k(
1888
1881
  "div",
1889
1882
  {
1890
- className: X("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600", Be),
1883
+ className: Y("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600", Le),
1891
1884
  children: [
1892
1885
  v,
1893
1886
  /* @__PURE__ */ c(Zt, {})
@@ -1961,7 +1954,7 @@ const Fe = (t) => {
1961
1954
  if (R === "lessThanAverage")
1962
1955
  return { type: L.highlightCell, subType: F.average, operator: U.lessThan, style: g };
1963
1956
  };
1964
- K(() => r.intercept(r.getInterceptPoints().submit, {
1957
+ X(() => r.intercept(r.getInterceptPoints().submit, {
1965
1958
  handler() {
1966
1959
  return y({ type: o, isPercent: l, value: a, style: v });
1967
1960
  }
@@ -2037,7 +2030,7 @@ const Fe = (t) => {
2037
2030
  return (e = t.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
2038
2031
  }, Oi = (t) => {
2039
2032
  var S, C, M;
2040
- const e = q(re), r = q(te), n = q(Z), i = q(Q), s = q(je), o = ln(n), u = cn(n), [a, h] = N(void 0), l = ge((C = (S = t.rule) == null ? void 0 : S.ranges) != null ? C : []), d = J(() => {
2033
+ const e = q(re), r = q(te), n = q(Z), i = q(Q), s = q(Be), o = ln(n), u = cn(n), [a, h] = N(void 0), l = ge((C = (S = t.rule) == null ? void 0 : S.ranges) != null ? C : []), d = J(() => {
2041
2034
  var V, O, m;
2042
2035
  let E = (V = t.rule) == null ? void 0 : V.ranges;
2043
2036
  return E != null && E.length || (E = (m = (O = s.getCurrentSelections()) == null ? void 0 : O.map((_) => _.range)) != null ? m : []), l.current = E, E != null && E.length ? E.map((_) => {
@@ -2099,7 +2092,7 @@ const Fe = (t) => {
2099
2092
  return on;
2100
2093
  }
2101
2094
  }, [p]);
2102
- K(() => {
2095
+ X(() => {
2103
2096
  const E = r.onCommandExecuted((V) => {
2104
2097
  if (V.id === fr.id) {
2105
2098
  const O = V.params;
@@ -2121,7 +2114,7 @@ const Fe = (t) => {
2121
2114
  const m = n.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet();
2122
2115
  if (!m)
2123
2116
  throw new Error("No active sheet found");
2124
- return l.current.map((Y) => pr(Y, m.getRowCount(), m.getColumnCount())).filter((Y) => !(Number.isNaN(Y.startRow) || Number.isNaN(Y.startColumn)));
2117
+ return l.current.map((K) => pr(K, m.getRowCount(), m.getColumnCount())).filter((K) => !(Number.isNaN(K.startRow) || Number.isNaN(K.startColumn)));
2125
2118
  })();
2126
2119
  if (w.fetchThroughInterceptors(w.getInterceptPoints().beforeSubmit)(!0, null)) {
2127
2120
  const m = w.fetchThroughInterceptors(w.getInterceptPoints().submit)(null, null);
@@ -2129,8 +2122,8 @@ const Fe = (t) => {
2129
2122
  const _ = ln(n), j = cn(n);
2130
2123
  if (!_ || !j)
2131
2124
  throw new Error("No active sheet found");
2132
- let Y = {};
2133
- t.rule && t.rule.cfId ? (Y = { ...t.rule, ranges: V, rule: m }, r.executeCommand(Ur.id, { unitId: _, subUnitId: j, rule: Y }), t.onCancel()) : (Y = { cfId: i.createCfId(_, j), ranges: V, rule: m, stopIfTrue: !1 }, r.executeCommand(Tn.id, { unitId: _, subUnitId: j, rule: Y }), t.onCancel());
2125
+ let K = {};
2126
+ t.rule && t.rule.cfId ? (K = { ...t.rule, ranges: V, rule: m }, r.executeCommand(Ur.id, { unitId: _, subUnitId: j, rule: K }), t.onCancel()) : (K = { cfId: i.createCfId(_, j), ranges: V, rule: m, stopIfTrue: !1 }, r.executeCommand(Tn.id, { unitId: _, subUnitId: j, rule: K }), t.onCancel());
2134
2127
  }
2135
2128
  }
2136
2129
  }, g = () => {
@@ -2194,7 +2187,7 @@ var Di = Object.getOwnPropertyDescriptor, $i = (t, e, r, n) => {
2194
2187
  (o = t[s]) && (i = o(i) || i);
2195
2188
  return i;
2196
2189
  }, Ai = (t, e) => (r, n) => e(r, n, t);
2197
- let He = class extends ue {
2190
+ let je = class extends ue {
2198
2191
  constructor(e) {
2199
2192
  super();
2200
2193
  Se(this, "_initLocal", () => {
@@ -2231,9 +2224,9 @@ let He = class extends ue {
2231
2224
  return [];
2232
2225
  }
2233
2226
  };
2234
- He = $i([
2227
+ je = $i([
2235
2228
  Ai(0, P(re))
2236
- ], He);
2229
+ ], je);
2237
2230
  const Hi = (t, e) => {
2238
2231
  const r = t.rule;
2239
2232
  switch (r.type) {
@@ -2274,7 +2267,7 @@ const Hi = (t, e) => {
2274
2267
  };
2275
2268
  let un = 0;
2276
2269
  const ji = (t) => {
2277
- const { onClick: e } = t, r = q(Q), n = q(Z), i = q(je), s = q(te), o = q(re), u = q(fe), a = q(kn), h = q(He), l = Wr(() => n.getCurrentTypeOfUnit$(A.UNIVER_SHEET), void 0, void 0, []), d = l.getUnitId(), v = l.getActiveSheet();
2270
+ const { onClick: e } = t, r = q(Q), n = q(Z), i = q(Be), s = q(te), o = q(re), u = q(fe), a = q(kn), h = q(je), l = Wr(() => n.getCurrentTypeOfUnit$(A.UNIVER_SHEET), void 0, void 0, []), d = l.getUnitId(), v = l.getActiveSheet();
2278
2271
  if (!v)
2279
2272
  throw new Error("No active sheet found");
2280
2273
  const p = v.getSheetId(), [y, f] = N([]), [w, I] = N("2"), [R, x] = N(0), [T, g] = N(-1), [b, S] = N(un), C = ge(null), M = [
@@ -2294,14 +2287,14 @@ const ji = (t) => {
2294
2287
  return [...$];
2295
2288
  return [];
2296
2289
  }, [V, O] = N(E);
2297
- ni(y), K(() => {
2290
+ ni(y), X(() => {
2298
2291
  const $ = s.onCommandExecuted((B) => {
2299
2292
  B.id === Wt.id && x(Math.random());
2300
2293
  });
2301
2294
  return () => $.dispose();
2302
- }), K(() => {
2295
+ }), X(() => {
2303
2296
  O(E);
2304
- }, [w, R, d, p]), K(() => {
2297
+ }, [w, R, d, p]), X(() => {
2305
2298
  if (w === "2")
2306
2299
  return;
2307
2300
  const $ = new Ne((B) => {
@@ -2316,12 +2309,12 @@ const ji = (t) => {
2316
2309
  return () => {
2317
2310
  $.unsubscribe();
2318
2311
  };
2319
- }, [n, w, d, p]), K(() => {
2312
+ }, [n, w, d, p]), X(() => {
2320
2313
  const $ = r.$ruleChange.subscribe(() => {
2321
2314
  x(Math.random());
2322
2315
  });
2323
2316
  return () => $.unsubscribe();
2324
- }, [r]), K(() => {
2317
+ }, [r]), X(() => {
2325
2318
  const $ = () => {
2326
2319
  var ee, ne;
2327
2320
  const z = Math.max(0, ((ne = (ee = C.current) == null ? void 0 : ee.getBoundingClientRect().width) != null ? ne : 0) - 8);
@@ -2367,7 +2360,7 @@ const ji = (t) => {
2367
2360
  return Math.min(ar - 1, Math.max(0, or));
2368
2361
  }, Re = V[ne(B.y)].cfId, Te = V[ne(G.y)].cfId;
2369
2362
  Re !== Te && s.executeCommand(Pr.id, { unitId: z, subUnitId: ee, start: { id: Re, type: "self" }, end: { id: Te, type: G.y > B.y ? "after" : "before" } });
2370
- }, Y = () => {
2363
+ }, K = () => {
2371
2364
  t.onCreate();
2372
2365
  }, pe = () => {
2373
2366
  w === "2" ? s.executeCommand(En.id) : w === "1" && V.map((B) => ({ unitId: d, subUnitId: p, cfId: B.cfId })).forEach((B) => {
@@ -2379,7 +2372,7 @@ const ji = (t) => {
2379
2372
  const z = G.ranges;
2380
2373
  return mt(u, $.getUnitId(), B.getSheetId(), z);
2381
2374
  });
2382
- }, [V]), Le = Ce.map(($, B) => ({ i: $.cfId, x: 0, w: 12, y: B, h: 1, isResizable: !1 })), Ue = J(() => {
2375
+ }, [V]), Ue = Ce.map(($, B) => ({ i: $.cfId, x: 0, w: 12, y: B, h: 1, isResizable: !1 })), Pe = J(() => {
2383
2376
  const $ = n.getCurrentUnitOfType(A.UNIVER_SHEET), B = $.getActiveSheet();
2384
2377
  return V.every((G) => {
2385
2378
  const z = G.ranges;
@@ -2407,11 +2400,11 @@ const ji = (t) => {
2407
2400
  "a",
2408
2401
  {
2409
2402
  className: "univer-size-5 univer-cursor-pointer",
2410
- onClick: Y,
2403
+ onClick: K,
2411
2404
  children: /* @__PURE__ */ c(Kn, {})
2412
2405
  }
2413
2406
  ) }),
2414
- V.length && Ue ? /* @__PURE__ */ c(Jt, { title: o.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ c(
2407
+ V.length && Pe ? /* @__PURE__ */ c(Jt, { title: o.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ c(
2415
2408
  "a",
2416
2409
  {
2417
2410
  className: "univer-size-5 univer-cursor-pointer",
@@ -2426,7 +2419,7 @@ const ji = (t) => {
2426
2419
  {
2427
2420
  className: "[&_.react-grid-item]:univer-transition-none [&_.react-grid-placeholder]:univer-rounded [&_.react-grid-placeholder]:!univer-bg-gray-200",
2428
2421
  draggableHandle: ".draggableHandle",
2429
- layout: Le,
2422
+ layout: Ue,
2430
2423
  cols: 12,
2431
2424
  rowHeight: 60,
2432
2425
  width: b,
@@ -2436,7 +2429,7 @@ const ji = (t) => {
2436
2429
  children: Ce == null ? void 0 : Ce.map(($, B) => /* @__PURE__ */ c("div", { children: /* @__PURE__ */ k(
2437
2430
  "div",
2438
2431
  {
2439
- className: X("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", {
2432
+ className: Y("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", {
2440
2433
  "univer-bg-gray-100 dark:!univer-bg-gray-700": T === B
2441
2434
  }),
2442
2435
  onMouseMove: () => {
@@ -2450,7 +2443,7 @@ const ji = (t) => {
2450
2443
  /* @__PURE__ */ c(
2451
2444
  "div",
2452
2445
  {
2453
- className: X("univer-absolute univer-left-0 univer-hidden univer-size-5 univer-cursor-grab univer-items-center univer-justify-center univer-rounded group-hover:univer-flex", "draggableHandle"),
2446
+ className: Y("univer-absolute univer-left-0 univer-hidden univer-size-5 univer-cursor-grab univer-items-center univer-justify-center univer-rounded group-hover:univer-flex", "draggableHandle"),
2454
2447
  onClick: (G) => G.stopPropagation(),
2455
2448
  children: /* @__PURE__ */ c(Qn, {})
2456
2449
  }
@@ -2475,7 +2468,7 @@ const ji = (t) => {
2475
2468
  /* @__PURE__ */ c(
2476
2469
  "div",
2477
2470
  {
2478
- className: X("univer-absolute univer-right-1 univer-hidden univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 group-hover:univer-flex", {
2471
+ className: Y("univer-absolute univer-right-1 univer-hidden univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 group-hover:univer-flex", {
2479
2472
  "univer-flex univer-items-center univer-justify-center": T === B
2480
2473
  }),
2481
2474
  onClick: (G) => {
@@ -2492,7 +2485,7 @@ const ji = (t) => {
2492
2485
  ] });
2493
2486
  }, Bi = (t) => {
2494
2487
  const [e, r] = N(t.rule), [n, i] = N(!!t.rule);
2495
- return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between", children: n ? /* @__PURE__ */ c(Oi, { onCancel: () => {
2488
+ return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4", children: n ? /* @__PURE__ */ c(Oi, { onCancel: () => {
2496
2489
  i(!1), r(void 0);
2497
2490
  }, rule: e }) : /* @__PURE__ */ c(ji, { onClick: (a) => {
2498
2491
  r(a), i(!0);
@@ -2553,7 +2546,7 @@ const Vt = {
2553
2546
  type: me.OPERATION,
2554
2547
  handler: (t, e) => {
2555
2548
  var u;
2556
- const r = t.get(Qe), n = t.get(je), i = t.get(te), s = ((u = n.getCurrentSelections()) == null ? void 0 : u.map((a) => a.range)) || [];
2549
+ const r = t.get(Qe), n = t.get(Be), i = t.get(te), s = ((u = n.getCurrentSelections()) == null ? void 0 : u.map((a) => a.range)) || [];
2557
2550
  switch (e.value) {
2558
2551
  case 3: {
2559
2552
  r.openPanel({ ...xe(), ranges: s });
@@ -2688,7 +2681,7 @@ bt = Zi([
2688
2681
  Ge(0, P(fe)),
2689
2682
  Ge(1, P(Z)),
2690
2683
  Ge(2, P(qt)),
2691
- Ge(3, P(je)),
2684
+ Ge(3, P(Be)),
2692
2685
  Ge(4, P(Q))
2693
2686
  ], bt);
2694
2687
  function dn(t, e, r, n, i) {
@@ -2703,7 +2696,7 @@ function dn(t, e, r, n, i) {
2703
2696
  subUnitId: i,
2704
2697
  rule: { ...u, ranges: h }
2705
2698
  }
2706
- }, d = $e(t, l.params);
2699
+ }, d = Ae(t, l.params);
2707
2700
  s.push(l), o.push(...d);
2708
2701
  } else {
2709
2702
  const l = {
@@ -2713,7 +2706,7 @@ function dn(t, e, r, n, i) {
2713
2706
  subUnitId: i,
2714
2707
  cfId: u.cfId
2715
2708
  }
2716
- }, d = Ae(t, l.params);
2709
+ }, d = He(t, l.params);
2717
2710
  s.push(l), o.push(...d);
2718
2711
  }
2719
2712
  }), { redos: s, undos: o };
@@ -2832,8 +2825,8 @@ let et = class extends ue {
2832
2825
  if (!v[O]) {
2833
2826
  const m = R(O), _ = new Me();
2834
2827
  v[O] = _, m.ranges.forEach((j) => {
2835
- be.foreach(j, (Y, pe) => {
2836
- _.setValue(Y, pe, 1);
2828
+ be.foreach(j, (K, pe) => {
2829
+ _.setValue(K, pe, 1);
2837
2830
  });
2838
2831
  });
2839
2832
  }
@@ -2850,7 +2843,7 @@ let et = class extends ue {
2850
2843
  subUnitId: o,
2851
2844
  cfId: g
2852
2845
  };
2853
- x.push({ id: we.id, params: C }), T.push(...Ae(this._injector, C));
2846
+ x.push({ id: we.id, params: C }), T.push(...He(this._injector, C));
2854
2847
  }
2855
2848
  if (f.some((C) => C.cfId === g)) {
2856
2849
  const C = R(g), M = {
@@ -2868,7 +2861,7 @@ let et = class extends ue {
2868
2861
  subUnitId: o,
2869
2862
  rule: { ...C, ranges: S }
2870
2863
  };
2871
- x.push({ id: _e.id, params: M }), T.push(...$e(this._injector, M));
2864
+ x.push({ id: _e.id, params: M }), T.push(...Ae(this._injector, M));
2872
2865
  }
2873
2866
  }
2874
2867
  return {
@@ -2926,10 +2919,10 @@ let nt = class extends ue {
2926
2919
  if (Dr(l, h))
2927
2920
  return { redos: [], undos: [] };
2928
2921
  if (l.length) {
2929
- const v = { unitId: n, subUnitId: i, rule: { ...s, ranges: l } }, p = [{ id: _e.id, params: v }], y = $e(this._injector, v);
2922
+ const v = { unitId: n, subUnitId: i, rule: { ...s, ranges: l } }, p = [{ id: _e.id, params: v }], y = Ae(this._injector, v);
2930
2923
  return { redos: p, undos: y };
2931
2924
  } else {
2932
- const v = { unitId: n, subUnitId: i, cfId: s.cfId }, p = [{ id: we.id, params: v }], y = Ae(this._injector, v);
2925
+ const v = { unitId: n, subUnitId: i, cfId: s.cfId }, p = [{ id: we.id, params: v }], y = He(this._injector, v);
2933
2926
  return { redos: p, undos: y };
2934
2927
  }
2935
2928
  }, u = [];
@@ -2973,7 +2966,7 @@ var es = Object.getOwnPropertyDescriptor, ts = (t, e, r, n) => {
2973
2966
  for (var i = n > 1 ? void 0 : n ? es(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2974
2967
  (o = t[s]) && (i = o(i) || i);
2975
2968
  return i;
2976
- }, Oe = (t, e) => (r, n) => e(r, n, t);
2969
+ }, De = (t, e) => (r, n) => e(r, n, t);
2977
2970
  let rt = class extends ue {
2978
2971
  constructor(e, r, n, i, s, o) {
2979
2972
  super();
@@ -3025,12 +3018,12 @@ let rt = class extends ue {
3025
3018
  }
3026
3019
  };
3027
3020
  rt = ts([
3028
- Oe(0, P(qt)),
3029
- Oe(1, P(Mn)),
3030
- Oe(2, P(Z)),
3031
- Oe(3, P(On)),
3032
- Oe(4, P(it)),
3033
- Oe(5, P(Q))
3021
+ De(0, P(qt)),
3022
+ De(1, P(Mn)),
3023
+ De(2, P(Z)),
3024
+ De(3, P(On)),
3025
+ De(4, P(it)),
3026
+ De(5, P(Q))
3034
3027
  ], rt);
3035
3028
  const rr = "sheets-conditional-formatting-ui.config", It = {};
3036
3029
  var ns = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, is = (t, e, r) => e in t ? ns(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, ss = (t, e, r, n) => {
@@ -3046,7 +3039,7 @@ let St = class extends bn {
3046
3039
  It,
3047
3040
  this._config
3048
3041
  );
3049
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(rr, s), this._initCommand(), this._injector.add([rt]), this._injector.add([nt]), this._injector.add([et]), this._injector.add([tt]), this._injector.add([He]);
3042
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(rr, s), this._initCommand(), this._injector.add([rt]), this._injector.add([nt]), this._injector.add([et]), this._injector.add([tt]), this._injector.add([je]);
3050
3043
  }
3051
3044
  _initCommand() {
3052
3045
  [
@@ -3178,14 +3171,14 @@ let _t = class extends ue {
3178
3171
  subUnitId: u,
3179
3172
  rule: { ...b, ranges: S }
3180
3173
  };
3181
- h.push({ id: _e.id, params: C }), l.push(...$e(this._injector, C));
3174
+ h.push({ id: _e.id, params: C }), l.push(...Ae(this._injector, C));
3182
3175
  } else {
3183
3176
  const C = {
3184
3177
  unitId: o,
3185
3178
  subUnitId: u,
3186
3179
  cfId: b.cfId
3187
3180
  };
3188
- h.push({ id: we.id, params: C }), l.push(...Ae(this._injector, C));
3181
+ h.push({ id: we.id, params: C }), l.push(...He(this._injector, C));
3189
3182
  }
3190
3183
  }), {
3191
3184
  undos: l,
@@ -3340,7 +3333,7 @@ const vn = [
3340
3333
  value: ie.clearWorkSheetRules
3341
3334
  }
3342
3335
  ], us = (t) => {
3343
- const e = t.get(je), r = t.get(te), n = t.get(Z), i = t.get(Q), s = new Ne((a) => Pn(
3336
+ const e = t.get(Be), r = t.get(te), n = t.get(Z), i = t.get(Q), s = new Ne((a) => Pn(
3344
3337
  e.selectionMoveEnd$,
3345
3338
  e.selectionSet$,
3346
3339
  new Ne((h) => {
@@ -3424,7 +3417,7 @@ var gs = Object.getOwnPropertyDescriptor, ms = (t, e, r, n) => {
3424
3417
  for (var i = n > 1 ? void 0 : n ? gs(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3425
3418
  (o = t[s]) && (i = o(i) || i);
3426
3419
  return i;
3427
- }, De = (t, e) => (r, n) => e(r, n, t);
3420
+ }, $e = (t, e) => (r, n) => e(r, n, t);
3428
3421
  const fs = (t, e) => {
3429
3422
  const r = (l) => l.endRow - l.startRow + 1, n = (l) => l.endColumn - l.startColumn + 1, i = r(e) % r(t), s = n(e) % n(t), o = Math.floor(r(e) / r(t)), u = Math.floor(n(e) / n(t)), a = [], h = {
3430
3423
  startRow: 0,
@@ -3553,14 +3546,14 @@ let Tt = class extends ue {
3553
3546
  subUnitId: o,
3554
3547
  rule: { ...g, ranges: b }
3555
3548
  };
3556
- p.push({ id: _e.id, params: S }), y.push(...$e(this._injector, S));
3549
+ p.push({ id: _e.id, params: S }), y.push(...Ae(this._injector, S));
3557
3550
  } else {
3558
3551
  const S = {
3559
3552
  unitId: s,
3560
3553
  subUnitId: o,
3561
3554
  cfId: g.cfId
3562
3555
  };
3563
- p.push({ id: we.id, params: S }), y.push(...Ae(this._injector, S));
3556
+ p.push({ id: we.id, params: S }), y.push(...He(this._injector, S));
3564
3557
  }
3565
3558
  else if (b.length) {
3566
3559
  const S = this._conditionalFormattingRuleModel.getRule(h, l, T);
@@ -3588,14 +3581,14 @@ let Tt = class extends ue {
3588
3581
  subUnitId: l,
3589
3582
  rule: { ...g, ranges: b }
3590
3583
  };
3591
- p.push({ id: _e.id, params: S }), y.push(...$e(this._injector, S));
3584
+ p.push({ id: _e.id, params: S }), y.push(...Ae(this._injector, S));
3592
3585
  } else {
3593
3586
  const S = {
3594
3587
  unitId: h,
3595
3588
  subUnitId: l,
3596
3589
  cfId: g.cfId
3597
3590
  };
3598
- p.push({ id: we.id, params: S }), y.push(...Ae(this._injector, S));
3591
+ p.push({ id: we.id, params: S }), y.push(...He(this._injector, S));
3599
3592
  }
3600
3593
  }
3601
3594
  }), {
@@ -3628,12 +3621,12 @@ let Tt = class extends ue {
3628
3621
  }
3629
3622
  };
3630
3623
  Tt = ms([
3631
- De(0, P(fe)),
3632
- De(1, P(Z)),
3633
- De(2, P(li)),
3634
- De(3, P(je)),
3635
- De(4, P(Q)),
3636
- De(5, P(it))
3624
+ $e(0, P(fe)),
3625
+ $e(1, P(Z)),
3626
+ $e(2, P(li)),
3627
+ $e(3, P(Be)),
3628
+ $e(4, P(Q)),
3629
+ $e(5, P(it))
3637
3630
  ], Tt);
3638
3631
  var ps = Object.getOwnPropertyDescriptor, Cs = (t, e, r, n) => {
3639
3632
  for (var i = n > 1 ? void 0 : n ? ps(e, r) : e, s = t.length - 1, o; s >= 0; s--)
@@ -3691,7 +3684,7 @@ let Et = class extends bn {
3691
3684
  [tt],
3692
3685
  [Qe],
3693
3686
  [Rt],
3694
- [He],
3687
+ [je],
3695
3688
  [wt],
3696
3689
  [bt],
3697
3690
  [Tt],
@@ -3712,7 +3705,7 @@ let Et = class extends bn {
3712
3705
  [bt],
3713
3706
  [et],
3714
3707
  [wt],
3715
- [He],
3708
+ [je],
3716
3709
  [Tt],
3717
3710
  [tt],
3718
3711
  [nt],