@univerjs/sheets-conditional-formatting-ui 0.21.1 → 0.22.0-insiders.20260513-09bbeca

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/README.md CHANGED
@@ -1,37 +1,47 @@
1
1
  # @univerjs/sheets-conditional-formatting-ui
2
2
 
3
- ## Package Overview
4
-
5
- | Package Name | UMD Namespace | Version | License | Downloads | Contains CSS | Contains i18n locales |
6
- | --- | --- | --- | --- | --- | :---: | :---: |
7
- | `@univerjs/sheets-conditional-formatting-ui` | `UniverSheetsConditionalFormattingUi` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs/sheets-conditional-formatting-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-conditional-formatting-ui)
4
+ [![license](https://img.shields.io/npm/l/@univerjs/sheets-conditional-formatting-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-conditional-formatting-ui)
5
+ [![downloads](https://img.shields.io/npm/dm/@univerjs/sheets-conditional-formatting-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-conditional-formatting-ui)
8
6
 
9
- ## Introduction
7
+ `@univerjs/sheets-conditional-formatting-ui` adds the conditional formatting panels, menus, and interaction UI for Univer Sheets.
10
8
 
11
- `@univerjs/sheets-conditional-formatting-ui` provides full capabilities for Univer Sheet conditional formatting, including panel capabilities.
12
-
13
- ## Usage
9
+ ## Package Overview
14
10
 
15
- ### Installation
11
+ | Package | UMD global | CSS | Locales | Facade entry |
12
+ | --- | --- | :---: | :---: | :---: |
13
+ | `@univerjs/sheets-conditional-formatting-ui` | `UniverSheetsConditionalFormattingUi` | Yes | Yes | No |
16
14
 
17
- ```shell
18
- # Using npm
19
- npm install @univerjs/sheets-conditional-formatting-ui
15
+ ## Installation
20
16
 
21
- # Using pnpm
17
+ ```sh
22
18
  pnpm add @univerjs/sheets-conditional-formatting-ui
19
+ # or
20
+ npm install @univerjs/sheets-conditional-formatting-ui
23
21
  ```
24
22
 
25
- ### Register the plugin
23
+ Keep all `@univerjs/*` packages on the same version.
26
24
 
27
- ```typescript
25
+ ## Usage
26
+
27
+ ```ts
28
+ import '@univerjs/sheets-conditional-formatting-ui/lib/index.css';
29
+ import EnUS from '@univerjs/sheets-conditional-formatting-ui/locale/en-US';
28
30
  import { UniverSheetsConditionalFormattingUIPlugin } from '@univerjs/sheets-conditional-formatting-ui';
29
31
 
30
32
  univer.registerPlugin(UniverSheetsConditionalFormattingUIPlugin);
33
+
34
+ // Merge EnUS into your Univer locale map when this package contributes UI text.
31
35
  ```
32
36
 
33
- <!-- Links -->
34
- [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-conditional-formatting-ui?style=flat-square
35
- [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-conditional-formatting-ui
36
- [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-conditional-formatting-ui?style=flat-square
37
- [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-conditional-formatting-ui?style=flat-square
37
+ Exported plugin classes:
38
+
39
+ - `UniverSheetsConditionalFormattingUIPlugin`
40
+ - `UniverSheetsConditionalFormattingMobileUIPlugin`
41
+
42
+ ## Resources
43
+
44
+ - [Documentation](https://docs.univer.ai)
45
+ - [NPM package](https://npmjs.com/package/@univerjs/sheets-conditional-formatting-ui)
46
+ - [GitHub repository](https://github.com/dream-num/univer)
47
+
package/lib/cjs/index.js CHANGED
@@ -1967,9 +1967,8 @@ const IconItemList = (props) => {
1967
1967
  const list = (0, react.useMemo)(() => {
1968
1968
  const result = [];
1969
1969
  for (const key in _univerjs_sheets_conditional_formatting.iconMap) {
1970
- const list = _univerjs_sheets_conditional_formatting.iconMap[key];
1971
1970
  const iconType = key;
1972
- list.forEach((base64, index) => {
1971
+ _univerjs_sheets_conditional_formatting.iconMap[iconType].forEach((base64, index) => {
1973
1972
  result.push({
1974
1973
  iconType,
1975
1974
  base64,
@@ -1985,7 +1984,7 @@ const IconItemList = (props) => {
1985
1984
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1986
1985
  className: "univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",
1987
1986
  onClick: () => handleClick({
1988
- iconType: _univerjs_sheets_conditional_formatting.EMPTY_ICON_TYPE,
1987
+ iconType: _univerjs_sheets_conditional_formatting.IIconSetType.empty,
1989
1988
  iconId: "",
1990
1989
  base64: ""
1991
1990
  }),
@@ -2755,7 +2754,7 @@ const RuleEdit = (props) => {
2755
2754
  };
2756
2755
 
2757
2756
  //#endregion
2758
- //#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
2757
+ //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
2759
2758
  function _typeof(o) {
2760
2759
  "@babel/helpers - typeof";
2761
2760
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -2766,7 +2765,7 @@ function _typeof(o) {
2766
2765
  }
2767
2766
 
2768
2767
  //#endregion
2769
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
2768
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
2770
2769
  function toPrimitive(t, r) {
2771
2770
  if ("object" != _typeof(t) || !t) return t;
2772
2771
  var e = t[Symbol.toPrimitive];
@@ -2779,14 +2778,14 @@ function toPrimitive(t, r) {
2779
2778
  }
2780
2779
 
2781
2780
  //#endregion
2782
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
2781
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
2783
2782
  function toPropertyKey(t) {
2784
2783
  var i = toPrimitive(t, "string");
2785
2784
  return "symbol" == _typeof(i) ? i : i + "";
2786
2785
  }
2787
2786
 
2788
2787
  //#endregion
2789
- //#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
2788
+ //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
2790
2789
  function _defineProperty(e, r, t) {
2791
2790
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
2792
2791
  value: t,
@@ -2797,7 +2796,7 @@ function _defineProperty(e, r, t) {
2797
2796
  }
2798
2797
 
2799
2798
  //#endregion
2800
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
2799
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
2801
2800
  function __decorateParam(paramIndex, decorator) {
2802
2801
  return function(target, key) {
2803
2802
  decorator(target, key, paramIndex);
@@ -2805,7 +2804,7 @@ function __decorateParam(paramIndex, decorator) {
2805
2804
  }
2806
2805
 
2807
2806
  //#endregion
2808
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorate.js
2807
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
2809
2808
  function __decorate(decorators, target, key, desc) {
2810
2809
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2811
2810
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -3220,19 +3219,6 @@ ConditionalFormattingPanelController = __decorate([
3220
3219
 
3221
3220
  //#endregion
3222
3221
  //#region src/commands/operations/open-conditional-formatting-panel.ts
3223
- let CF_MENU_OPERATION = /* @__PURE__ */ function(CF_MENU_OPERATION) {
3224
- CF_MENU_OPERATION[CF_MENU_OPERATION["createRule"] = 1] = "createRule";
3225
- CF_MENU_OPERATION[CF_MENU_OPERATION["viewRule"] = 2] = "viewRule";
3226
- CF_MENU_OPERATION[CF_MENU_OPERATION["highlightCell"] = 3] = "highlightCell";
3227
- CF_MENU_OPERATION[CF_MENU_OPERATION["rank"] = 4] = "rank";
3228
- CF_MENU_OPERATION[CF_MENU_OPERATION["formula"] = 5] = "formula";
3229
- CF_MENU_OPERATION[CF_MENU_OPERATION["colorScale"] = 6] = "colorScale";
3230
- CF_MENU_OPERATION[CF_MENU_OPERATION["dataBar"] = 7] = "dataBar";
3231
- CF_MENU_OPERATION[CF_MENU_OPERATION["icon"] = 8] = "icon";
3232
- CF_MENU_OPERATION[CF_MENU_OPERATION["clearRangeRules"] = 9] = "clearRangeRules";
3233
- CF_MENU_OPERATION[CF_MENU_OPERATION["clearWorkSheetRules"] = 10] = "clearWorkSheetRules";
3234
- return CF_MENU_OPERATION;
3235
- }({});
3236
3222
  const OpenConditionalFormattingOperator = {
3237
3223
  id: "sheet.operation.open.conditional.formatting.panel",
3238
3224
  type: _univerjs_core.CommandType.OPERATION,
@@ -3243,13 +3229,13 @@ const OpenConditionalFormattingOperator = {
3243
3229
  const commandService = accessor.get(_univerjs_core.ICommandService);
3244
3230
  const ranges = ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range)) || [];
3245
3231
  switch (params.value) {
3246
- case CF_MENU_OPERATION.highlightCell:
3232
+ case 3:
3247
3233
  conditionalFormattingMenuController.openPanel({
3248
3234
  ...(0, _univerjs_sheets_conditional_formatting.createDefaultRule)(),
3249
3235
  ranges
3250
3236
  });
3251
3237
  break;
3252
- case CF_MENU_OPERATION.rank: {
3238
+ case 4: {
3253
3239
  const rule = {
3254
3240
  ..._univerjs_sheets_conditional_formatting.createDefaultRule,
3255
3241
  ranges,
@@ -3261,7 +3247,7 @@ const OpenConditionalFormattingOperator = {
3261
3247
  conditionalFormattingMenuController.openPanel(rule);
3262
3248
  break;
3263
3249
  }
3264
- case CF_MENU_OPERATION.formula: {
3250
+ case 5: {
3265
3251
  const rule = {
3266
3252
  ..._univerjs_sheets_conditional_formatting.createDefaultRule,
3267
3253
  ranges,
@@ -3274,7 +3260,7 @@ const OpenConditionalFormattingOperator = {
3274
3260
  conditionalFormattingMenuController.openPanel(rule);
3275
3261
  break;
3276
3262
  }
3277
- case CF_MENU_OPERATION.colorScale: {
3263
+ case 6: {
3278
3264
  const rule = {
3279
3265
  ..._univerjs_sheets_conditional_formatting.createDefaultRule,
3280
3266
  ranges,
@@ -3286,7 +3272,7 @@ const OpenConditionalFormattingOperator = {
3286
3272
  conditionalFormattingMenuController.openPanel(rule);
3287
3273
  break;
3288
3274
  }
3289
- case CF_MENU_OPERATION.dataBar: {
3275
+ case 7: {
3290
3276
  const rule = {
3291
3277
  ..._univerjs_sheets_conditional_formatting.createDefaultRule,
3292
3278
  ranges,
@@ -3298,7 +3284,7 @@ const OpenConditionalFormattingOperator = {
3298
3284
  conditionalFormattingMenuController.openPanel(rule);
3299
3285
  break;
3300
3286
  }
3301
- case CF_MENU_OPERATION.icon: {
3287
+ case 8: {
3302
3288
  const rule = {
3303
3289
  ..._univerjs_sheets_conditional_formatting.createDefaultRule,
3304
3290
  ranges,
@@ -3311,19 +3297,19 @@ const OpenConditionalFormattingOperator = {
3311
3297
  conditionalFormattingMenuController.openPanel(rule);
3312
3298
  break;
3313
3299
  }
3314
- case CF_MENU_OPERATION.viewRule:
3300
+ case 2:
3315
3301
  conditionalFormattingMenuController.openPanel();
3316
3302
  break;
3317
- case CF_MENU_OPERATION.createRule:
3303
+ case 1:
3318
3304
  conditionalFormattingMenuController.openPanel({
3319
3305
  ...(0, _univerjs_sheets_conditional_formatting.createDefaultRule)(),
3320
3306
  ranges
3321
3307
  });
3322
3308
  break;
3323
- case CF_MENU_OPERATION.clearRangeRules:
3309
+ case 9:
3324
3310
  commandService.executeCommand(_univerjs_sheets_conditional_formatting.ClearRangeCfCommand.id, { ranges });
3325
3311
  break;
3326
- case CF_MENU_OPERATION.clearWorkSheetRules:
3312
+ case 10:
3327
3313
  commandService.executeCommand(_univerjs_sheets_conditional_formatting.ClearWorksheetCfCommand.id);
3328
3314
  break;
3329
3315
  }
@@ -3437,7 +3423,7 @@ function generateClearCfMutations(injector, allRules, ranges, unitId, subUnitId)
3437
3423
  //#endregion
3438
3424
  //#region package.json
3439
3425
  var name = "@univerjs/sheets-conditional-formatting-ui";
3440
- var version = "0.21.1";
3426
+ var version = "0.22.0-insiders.20260513-09bbeca";
3441
3427
 
3442
3428
  //#endregion
3443
3429
  //#region src/config/config.ts
@@ -4572,63 +4558,63 @@ const commonSelections = [
4572
4558
  name: "sheet.cf.ruleType.highlightCell",
4573
4559
  selectable: false
4574
4560
  },
4575
- value: CF_MENU_OPERATION.highlightCell
4561
+ value: 3
4576
4562
  },
4577
4563
  {
4578
4564
  label: {
4579
4565
  name: "sheet.cf.panel.rankAndAverage",
4580
4566
  selectable: false
4581
4567
  },
4582
- value: CF_MENU_OPERATION.rank
4568
+ value: 4
4583
4569
  },
4584
4570
  {
4585
4571
  label: {
4586
4572
  name: "sheet.cf.ruleType.formula",
4587
4573
  selectable: false
4588
4574
  },
4589
- value: CF_MENU_OPERATION.formula
4575
+ value: 5
4590
4576
  },
4591
4577
  {
4592
4578
  label: {
4593
4579
  name: "sheet.cf.ruleType.colorScale",
4594
4580
  selectable: false
4595
4581
  },
4596
- value: CF_MENU_OPERATION.colorScale
4582
+ value: 6
4597
4583
  },
4598
4584
  {
4599
4585
  label: {
4600
4586
  name: "sheet.cf.ruleType.dataBar",
4601
4587
  selectable: false
4602
4588
  },
4603
- value: CF_MENU_OPERATION.dataBar
4589
+ value: 7
4604
4590
  },
4605
4591
  {
4606
4592
  label: {
4607
4593
  name: "sheet.cf.ruleType.iconSet",
4608
4594
  selectable: false
4609
4595
  },
4610
- value: CF_MENU_OPERATION.icon
4596
+ value: 8
4611
4597
  },
4612
4598
  {
4613
4599
  label: {
4614
4600
  name: "sheet.cf.menu.manageConditionalFormatting",
4615
4601
  selectable: false
4616
4602
  },
4617
- value: CF_MENU_OPERATION.viewRule
4603
+ value: 2
4618
4604
  },
4619
4605
  {
4620
4606
  label: {
4621
4607
  name: "sheet.cf.menu.createConditionalFormatting",
4622
4608
  selectable: false
4623
4609
  },
4624
- value: CF_MENU_OPERATION.createRule
4610
+ value: 1
4625
4611
  },
4626
4612
  {
4627
4613
  label: {
4628
4614
  name: "sheet.cf.menu.clearRangeRules",
4629
4615
  selectable: false
4630
4616
  },
4631
- value: CF_MENU_OPERATION.clearRangeRules,
4617
+ value: 9,
4632
4618
  disabled: false
4633
4619
  },
4634
4620
  {
@@ -4636,7 +4622,7 @@ const commonSelections = [
4636
4622
  name: "sheet.cf.menu.clearWorkSheetRules",
4637
4623
  selectable: false
4638
4624
  },
4639
- value: CF_MENU_OPERATION.clearWorkSheetRules
4625
+ value: 10
4640
4626
  }
4641
4627
  ];
4642
4628
  const FactoryManageConditionalFormattingRule = (accessor) => {
@@ -4689,14 +4675,14 @@ const FactoryManageConditionalFormattingRule = (accessor) => {
4689
4675
  }));
4690
4676
  const selections$ = new rxjs.Observable((subscriber) => {
4691
4677
  clearRangeEnable$.subscribe((v) => {
4692
- const item = commonSelections.find((item) => item.value === CF_MENU_OPERATION.clearRangeRules);
4678
+ const item = commonSelections.find((item) => item.value === 9);
4693
4679
  if (item) {
4694
4680
  item.disabled = !v;
4695
4681
  subscriber.next(commonSelections);
4696
4682
  }
4697
4683
  });
4698
4684
  clearSheetEnable$.subscribe((v) => {
4699
- const item = commonSelections.find((item) => item.value === CF_MENU_OPERATION.clearWorkSheetRules);
4685
+ const item = commonSelections.find((item) => item.value === 10);
4700
4686
  if (item) {
4701
4687
  item.disabled = !v;
4702
4688
  subscriber.next(commonSelections);
package/lib/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BooleanNumber, ColorKit, CommandType, DependentOn, Disposable, ICommandService, IConfigService, IUniverInstanceService, Inject, Injector, InterceptorEffectEnum, InterceptorManager, LocaleService, ObjectMatrix, Plugin, Range, Rectangle, Tools, UniverInstanceType, createInterceptorKey, generateRandomId, get, merge, registerDependencies, set, toDisposable, touchDependencies } from "@univerjs/core";
2
2
  import { AFTER_CELL_EDIT, AUTO_FILL_APPLY_TYPE, AutoFillTools, ClearSelectionAllCommand, ClearSelectionFormatCommand, IAutoFillService, INTERCEPTOR_POINT, RangeMergeUtil, RangeProtectionPermissionEditPoint, RemoveSheetMutation, SetSelectionsOperation, SetWorksheetActiveOperation, SheetInterceptorService, SheetPermissionCheckController, SheetsSelectionsService, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellStylePermission, checkRangesEditablePermission, createTopMatrixFromMatrix, findAllRectangle, getSheetCommandTarget, rangeToDiscreteRange, setEndForRange } from "@univerjs/sheets";
3
- import { AddCfCommand, AddConditionalRuleMutation, AddConditionalRuleMutationUndoFactory, CFNumberOperator, CFRuleType, CFSubRuleType, CFTextOperator, CFTimePeriodOperator, CFValueType, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH, ClearRangeCfCommand, ClearWorksheetCfCommand, ConditionalFormattingRuleModel, ConditionalFormattingService, ConditionalFormattingViewModel, DEFAULT_BG_COLOR, DEFAULT_FONT_COLOR, DEFAULT_PADDING, DEFAULT_WIDTH, DeleteCfCommand, DeleteConditionalRuleMutation, DeleteConditionalRuleMutationUndoFactory, EMPTY_ICON_TYPE, MoveCfCommand, MoveConditionalRuleMutation, SHEET_CONDITIONAL_FORMATTING_PLUGIN, SetCfCommand, SetConditionalRuleMutation, UniverSheetsConditionalFormattingPlugin, compareWithNumber, createCfId, createDefaultRule, createDefaultValue, createDefaultValueByValueType, defaultDataBarNativeColor, defaultDataBarPositiveColor, getColorScaleFromValue, getOppositeOperator, iconGroup, iconMap, removeUndefinedAttr, setConditionalRuleMutationUndoFactory } from "@univerjs/sheets-conditional-formatting";
3
+ import { AddCfCommand, AddConditionalRuleMutation, AddConditionalRuleMutationUndoFactory, CFNumberOperator, CFRuleType, CFSubRuleType, CFTextOperator, CFTimePeriodOperator, CFValueType, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH, ClearRangeCfCommand, ClearWorksheetCfCommand, ConditionalFormattingRuleModel, ConditionalFormattingService, ConditionalFormattingViewModel, DEFAULT_BG_COLOR, DEFAULT_FONT_COLOR, DEFAULT_PADDING, DEFAULT_WIDTH, DeleteCfCommand, DeleteConditionalRuleMutation, DeleteConditionalRuleMutationUndoFactory, IIconSetType, MoveCfCommand, MoveConditionalRuleMutation, SHEET_CONDITIONAL_FORMATTING_PLUGIN, SetCfCommand, SetConditionalRuleMutation, UniverSheetsConditionalFormattingPlugin, compareWithNumber, createCfId, createDefaultRule, createDefaultValue, createDefaultValueByValueType, defaultDataBarNativeColor, defaultDataBarPositiveColor, getColorScaleFromValue, getOppositeOperator, iconGroup, iconMap, removeUndefinedAttr, setConditionalRuleMutationUndoFactory } from "@univerjs/sheets-conditional-formatting";
4
4
  import { ComponentManager, ILayoutService, IMenuManagerService, ISidebarService, MenuItemType, RibbonDataGroup, getMenuHiddenObservable, useDependency, useObservable, useScrollYOverContainer, useSidebarClick } from "@univerjs/ui";
5
5
  import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
6
6
  import { Button, Checkbox, ColorPicker, DraggableList, Dropdown, Input, InputNumber, Radio, RadioGroup, Select, Tooltip, borderClassName, clsx } from "@univerjs/design";
@@ -1966,9 +1966,8 @@ const IconItemList = (props) => {
1966
1966
  const list = useMemo(() => {
1967
1967
  const result = [];
1968
1968
  for (const key in iconMap) {
1969
- const list = iconMap[key];
1970
1969
  const iconType = key;
1971
- list.forEach((base64, index) => {
1970
+ iconMap[iconType].forEach((base64, index) => {
1972
1971
  result.push({
1973
1972
  iconType,
1974
1973
  base64,
@@ -1984,7 +1983,7 @@ const IconItemList = (props) => {
1984
1983
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
1985
1984
  className: "univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",
1986
1985
  onClick: () => handleClick({
1987
- iconType: EMPTY_ICON_TYPE,
1986
+ iconType: IIconSetType.empty,
1988
1987
  iconId: "",
1989
1988
  base64: ""
1990
1989
  }),
@@ -2754,7 +2753,7 @@ const RuleEdit = (props) => {
2754
2753
  };
2755
2754
 
2756
2755
  //#endregion
2757
- //#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
2756
+ //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
2758
2757
  function _typeof(o) {
2759
2758
  "@babel/helpers - typeof";
2760
2759
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -2765,7 +2764,7 @@ function _typeof(o) {
2765
2764
  }
2766
2765
 
2767
2766
  //#endregion
2768
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
2767
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
2769
2768
  function toPrimitive(t, r) {
2770
2769
  if ("object" != _typeof(t) || !t) return t;
2771
2770
  var e = t[Symbol.toPrimitive];
@@ -2778,14 +2777,14 @@ function toPrimitive(t, r) {
2778
2777
  }
2779
2778
 
2780
2779
  //#endregion
2781
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
2780
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
2782
2781
  function toPropertyKey(t) {
2783
2782
  var i = toPrimitive(t, "string");
2784
2783
  return "symbol" == _typeof(i) ? i : i + "";
2785
2784
  }
2786
2785
 
2787
2786
  //#endregion
2788
- //#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
2787
+ //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
2789
2788
  function _defineProperty(e, r, t) {
2790
2789
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
2791
2790
  value: t,
@@ -2796,7 +2795,7 @@ function _defineProperty(e, r, t) {
2796
2795
  }
2797
2796
 
2798
2797
  //#endregion
2799
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
2798
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
2800
2799
  function __decorateParam(paramIndex, decorator) {
2801
2800
  return function(target, key) {
2802
2801
  decorator(target, key, paramIndex);
@@ -2804,7 +2803,7 @@ function __decorateParam(paramIndex, decorator) {
2804
2803
  }
2805
2804
 
2806
2805
  //#endregion
2807
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorate.js
2806
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
2808
2807
  function __decorate(decorators, target, key, desc) {
2809
2808
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2810
2809
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -3219,19 +3218,6 @@ ConditionalFormattingPanelController = __decorate([
3219
3218
 
3220
3219
  //#endregion
3221
3220
  //#region src/commands/operations/open-conditional-formatting-panel.ts
3222
- let CF_MENU_OPERATION = /* @__PURE__ */ function(CF_MENU_OPERATION) {
3223
- CF_MENU_OPERATION[CF_MENU_OPERATION["createRule"] = 1] = "createRule";
3224
- CF_MENU_OPERATION[CF_MENU_OPERATION["viewRule"] = 2] = "viewRule";
3225
- CF_MENU_OPERATION[CF_MENU_OPERATION["highlightCell"] = 3] = "highlightCell";
3226
- CF_MENU_OPERATION[CF_MENU_OPERATION["rank"] = 4] = "rank";
3227
- CF_MENU_OPERATION[CF_MENU_OPERATION["formula"] = 5] = "formula";
3228
- CF_MENU_OPERATION[CF_MENU_OPERATION["colorScale"] = 6] = "colorScale";
3229
- CF_MENU_OPERATION[CF_MENU_OPERATION["dataBar"] = 7] = "dataBar";
3230
- CF_MENU_OPERATION[CF_MENU_OPERATION["icon"] = 8] = "icon";
3231
- CF_MENU_OPERATION[CF_MENU_OPERATION["clearRangeRules"] = 9] = "clearRangeRules";
3232
- CF_MENU_OPERATION[CF_MENU_OPERATION["clearWorkSheetRules"] = 10] = "clearWorkSheetRules";
3233
- return CF_MENU_OPERATION;
3234
- }({});
3235
3221
  const OpenConditionalFormattingOperator = {
3236
3222
  id: "sheet.operation.open.conditional.formatting.panel",
3237
3223
  type: CommandType.OPERATION,
@@ -3242,13 +3228,13 @@ const OpenConditionalFormattingOperator = {
3242
3228
  const commandService = accessor.get(ICommandService);
3243
3229
  const ranges = ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range)) || [];
3244
3230
  switch (params.value) {
3245
- case CF_MENU_OPERATION.highlightCell:
3231
+ case 3:
3246
3232
  conditionalFormattingMenuController.openPanel({
3247
3233
  ...createDefaultRule(),
3248
3234
  ranges
3249
3235
  });
3250
3236
  break;
3251
- case CF_MENU_OPERATION.rank: {
3237
+ case 4: {
3252
3238
  const rule = {
3253
3239
  ...createDefaultRule,
3254
3240
  ranges,
@@ -3260,7 +3246,7 @@ const OpenConditionalFormattingOperator = {
3260
3246
  conditionalFormattingMenuController.openPanel(rule);
3261
3247
  break;
3262
3248
  }
3263
- case CF_MENU_OPERATION.formula: {
3249
+ case 5: {
3264
3250
  const rule = {
3265
3251
  ...createDefaultRule,
3266
3252
  ranges,
@@ -3273,7 +3259,7 @@ const OpenConditionalFormattingOperator = {
3273
3259
  conditionalFormattingMenuController.openPanel(rule);
3274
3260
  break;
3275
3261
  }
3276
- case CF_MENU_OPERATION.colorScale: {
3262
+ case 6: {
3277
3263
  const rule = {
3278
3264
  ...createDefaultRule,
3279
3265
  ranges,
@@ -3285,7 +3271,7 @@ const OpenConditionalFormattingOperator = {
3285
3271
  conditionalFormattingMenuController.openPanel(rule);
3286
3272
  break;
3287
3273
  }
3288
- case CF_MENU_OPERATION.dataBar: {
3274
+ case 7: {
3289
3275
  const rule = {
3290
3276
  ...createDefaultRule,
3291
3277
  ranges,
@@ -3297,7 +3283,7 @@ const OpenConditionalFormattingOperator = {
3297
3283
  conditionalFormattingMenuController.openPanel(rule);
3298
3284
  break;
3299
3285
  }
3300
- case CF_MENU_OPERATION.icon: {
3286
+ case 8: {
3301
3287
  const rule = {
3302
3288
  ...createDefaultRule,
3303
3289
  ranges,
@@ -3310,19 +3296,19 @@ const OpenConditionalFormattingOperator = {
3310
3296
  conditionalFormattingMenuController.openPanel(rule);
3311
3297
  break;
3312
3298
  }
3313
- case CF_MENU_OPERATION.viewRule:
3299
+ case 2:
3314
3300
  conditionalFormattingMenuController.openPanel();
3315
3301
  break;
3316
- case CF_MENU_OPERATION.createRule:
3302
+ case 1:
3317
3303
  conditionalFormattingMenuController.openPanel({
3318
3304
  ...createDefaultRule(),
3319
3305
  ranges
3320
3306
  });
3321
3307
  break;
3322
- case CF_MENU_OPERATION.clearRangeRules:
3308
+ case 9:
3323
3309
  commandService.executeCommand(ClearRangeCfCommand.id, { ranges });
3324
3310
  break;
3325
- case CF_MENU_OPERATION.clearWorkSheetRules:
3311
+ case 10:
3326
3312
  commandService.executeCommand(ClearWorksheetCfCommand.id);
3327
3313
  break;
3328
3314
  }
@@ -3436,7 +3422,7 @@ function generateClearCfMutations(injector, allRules, ranges, unitId, subUnitId)
3436
3422
  //#endregion
3437
3423
  //#region package.json
3438
3424
  var name = "@univerjs/sheets-conditional-formatting-ui";
3439
- var version = "0.21.1";
3425
+ var version = "0.22.0-insiders.20260513-09bbeca";
3440
3426
 
3441
3427
  //#endregion
3442
3428
  //#region src/config/config.ts
@@ -4571,63 +4557,63 @@ const commonSelections = [
4571
4557
  name: "sheet.cf.ruleType.highlightCell",
4572
4558
  selectable: false
4573
4559
  },
4574
- value: CF_MENU_OPERATION.highlightCell
4560
+ value: 3
4575
4561
  },
4576
4562
  {
4577
4563
  label: {
4578
4564
  name: "sheet.cf.panel.rankAndAverage",
4579
4565
  selectable: false
4580
4566
  },
4581
- value: CF_MENU_OPERATION.rank
4567
+ value: 4
4582
4568
  },
4583
4569
  {
4584
4570
  label: {
4585
4571
  name: "sheet.cf.ruleType.formula",
4586
4572
  selectable: false
4587
4573
  },
4588
- value: CF_MENU_OPERATION.formula
4574
+ value: 5
4589
4575
  },
4590
4576
  {
4591
4577
  label: {
4592
4578
  name: "sheet.cf.ruleType.colorScale",
4593
4579
  selectable: false
4594
4580
  },
4595
- value: CF_MENU_OPERATION.colorScale
4581
+ value: 6
4596
4582
  },
4597
4583
  {
4598
4584
  label: {
4599
4585
  name: "sheet.cf.ruleType.dataBar",
4600
4586
  selectable: false
4601
4587
  },
4602
- value: CF_MENU_OPERATION.dataBar
4588
+ value: 7
4603
4589
  },
4604
4590
  {
4605
4591
  label: {
4606
4592
  name: "sheet.cf.ruleType.iconSet",
4607
4593
  selectable: false
4608
4594
  },
4609
- value: CF_MENU_OPERATION.icon
4595
+ value: 8
4610
4596
  },
4611
4597
  {
4612
4598
  label: {
4613
4599
  name: "sheet.cf.menu.manageConditionalFormatting",
4614
4600
  selectable: false
4615
4601
  },
4616
- value: CF_MENU_OPERATION.viewRule
4602
+ value: 2
4617
4603
  },
4618
4604
  {
4619
4605
  label: {
4620
4606
  name: "sheet.cf.menu.createConditionalFormatting",
4621
4607
  selectable: false
4622
4608
  },
4623
- value: CF_MENU_OPERATION.createRule
4609
+ value: 1
4624
4610
  },
4625
4611
  {
4626
4612
  label: {
4627
4613
  name: "sheet.cf.menu.clearRangeRules",
4628
4614
  selectable: false
4629
4615
  },
4630
- value: CF_MENU_OPERATION.clearRangeRules,
4616
+ value: 9,
4631
4617
  disabled: false
4632
4618
  },
4633
4619
  {
@@ -4635,7 +4621,7 @@ const commonSelections = [
4635
4621
  name: "sheet.cf.menu.clearWorkSheetRules",
4636
4622
  selectable: false
4637
4623
  },
4638
- value: CF_MENU_OPERATION.clearWorkSheetRules
4624
+ value: 10
4639
4625
  }
4640
4626
  ];
4641
4627
  const FactoryManageConditionalFormattingRule = (accessor) => {
@@ -4688,14 +4674,14 @@ const FactoryManageConditionalFormattingRule = (accessor) => {
4688
4674
  }));
4689
4675
  const selections$ = new Observable((subscriber) => {
4690
4676
  clearRangeEnable$.subscribe((v) => {
4691
- const item = commonSelections.find((item) => item.value === CF_MENU_OPERATION.clearRangeRules);
4677
+ const item = commonSelections.find((item) => item.value === 9);
4692
4678
  if (item) {
4693
4679
  item.disabled = !v;
4694
4680
  subscriber.next(commonSelections);
4695
4681
  }
4696
4682
  });
4697
4683
  clearSheetEnable$.subscribe((v) => {
4698
- const item = commonSelections.find((item) => item.value === CF_MENU_OPERATION.clearWorkSheetRules);
4684
+ const item = commonSelections.find((item) => item.value === 10);
4699
4685
  if (item) {
4700
4686
  item.disabled = !v;
4701
4687
  subscriber.next(commonSelections);