@univerjs/sheets-conditional-formatting-ui 1.3.1 → 1.5.0
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 +5 -5
- package/lib/cjs/index.js +84 -150
- package/lib/cjs/locale/ar-SA.js +1 -2
- package/lib/cjs/locale/ca-ES.js +1 -2
- package/lib/cjs/locale/de-DE.js +1 -2
- package/lib/cjs/locale/en-US.js +1 -2
- package/lib/cjs/locale/es-ES.js +1 -2
- package/lib/cjs/locale/fa-IR.js +1 -2
- package/lib/cjs/locale/fr-FR.js +1 -2
- package/lib/cjs/locale/id-ID.js +1 -2
- package/lib/cjs/locale/it-IT.js +1 -2
- package/lib/cjs/locale/ja-JP.js +1 -2
- package/lib/cjs/locale/ko-KR.js +1 -2
- package/lib/cjs/locale/pl-PL.js +1 -2
- package/lib/cjs/locale/pt-BR.js +1 -2
- package/lib/cjs/locale/ru-RU.js +1 -2
- package/lib/cjs/locale/sk-SK.js +1 -2
- package/lib/cjs/locale/vi-VN.js +1 -2
- package/lib/cjs/locale/zh-CN.js +1 -2
- package/lib/cjs/locale/zh-HK.js +1 -2
- package/lib/cjs/locale/zh-TW.js +1 -2
- package/lib/es/index.js +91 -157
- package/lib/es/locale/ar-SA.js +1 -2
- package/lib/es/locale/ca-ES.js +1 -2
- package/lib/es/locale/de-DE.js +1 -2
- package/lib/es/locale/en-US.js +1 -2
- package/lib/es/locale/es-ES.js +1 -2
- package/lib/es/locale/fa-IR.js +1 -2
- package/lib/es/locale/fr-FR.js +1 -2
- package/lib/es/locale/id-ID.js +1 -2
- package/lib/es/locale/it-IT.js +1 -2
- package/lib/es/locale/ja-JP.js +1 -2
- package/lib/es/locale/ko-KR.js +1 -2
- package/lib/es/locale/pl-PL.js +1 -2
- package/lib/es/locale/pt-BR.js +1 -2
- package/lib/es/locale/ru-RU.js +1 -2
- package/lib/es/locale/sk-SK.js +1 -2
- package/lib/es/locale/vi-VN.js +1 -2
- package/lib/es/locale/zh-CN.js +1 -2
- package/lib/es/locale/zh-HK.js +1 -2
- package/lib/es/locale/zh-TW.js +1 -2
- package/lib/index.css +4 -8
- package/lib/index.js +91 -157
- package/lib/locale/ar-SA.js +1 -2
- package/lib/locale/ca-ES.js +1 -2
- package/lib/locale/de-DE.js +1 -2
- package/lib/locale/en-US.js +1 -2
- package/lib/locale/es-ES.js +1 -2
- package/lib/locale/fa-IR.js +1 -2
- package/lib/locale/fr-FR.js +1 -2
- package/lib/locale/id-ID.js +1 -2
- package/lib/locale/it-IT.js +1 -2
- package/lib/locale/ja-JP.js +1 -2
- package/lib/locale/ko-KR.js +1 -2
- package/lib/locale/pl-PL.js +1 -2
- package/lib/locale/pt-BR.js +1 -2
- package/lib/locale/ru-RU.js +1 -2
- package/lib/locale/sk-SK.js +1 -2
- package/lib/locale/vi-VN.js +1 -2
- package/lib/locale/zh-CN.js +1 -2
- package/lib/locale/zh-HK.js +1 -2
- package/lib/locale/zh-TW.js +1 -2
- package/lib/umd/index.js +1 -1
- package/package.json +19 -18
package/lib/index.js
CHANGED
|
@@ -10,11 +10,11 @@ import { FormulaRefRangeService, UniverSheetsFormulaPlugin } from "@univerjs/she
|
|
|
10
10
|
import { FormulaEditor, MobileRangeSelector, RangeSelector, UniverSheetsFormulaMobileUIPlugin } from "@univerjs/sheets-formula-ui";
|
|
11
11
|
import { BoldIcon, ConditionsDoubleIcon, DataBarIcon, DeleteIcon, FontColorDoubleIcon, GripVerticalIcon, IncreaseIcon, ItalicIcon, MoreDownIcon, PaintBucketDoubleIcon, RatingIcon, SlashDoubleIcon, StrikethroughIcon, UnderlineIcon } from "@univerjs/icons";
|
|
12
12
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
13
|
-
import { Button, Checkbox, ColorPicker, DraggableList, Dropdown, Input, InputNumber, MobileColorPicker, MobileDropdown, MobileSelect, Radio, RadioGroup, Select, Tooltip, borderClassName, clsx } from "@univerjs/design";
|
|
13
|
+
import { Button, Checkbox, ColorPicker as ColorPicker$1, DraggableList, Dropdown, Input, InputNumber, MobileColorPicker, MobileDropdown, MobileSelect, Radio, RadioGroup, Select, Tooltip, borderClassName, clsx } from "@univerjs/design";
|
|
14
14
|
import { LexerTreeBuilder, deserializeRangeWithSheet, operatorToken, serializeRange } from "@univerjs/engine-formula";
|
|
15
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/commands/commands/add-average-cf.command.ts
|
|
18
18
|
const AddAverageCfCommand = {
|
|
19
19
|
type: CommandType.COMMAND,
|
|
20
20
|
id: "sheet.command.add-average-conditional-rule",
|
|
@@ -46,8 +46,7 @@ const AddAverageCfCommand = {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
//#region src/commands/commands/add-color-scale-cf.command.ts
|
|
49
|
+
// src/commands/commands/add-color-scale-cf.command.ts
|
|
51
50
|
const AddColorScaleConditionalRuleCommand = {
|
|
52
51
|
type: CommandType.COMMAND,
|
|
53
52
|
id: "sheet.command.add-color-scale-conditional-rule",
|
|
@@ -77,8 +76,7 @@ const AddColorScaleConditionalRuleCommand = {
|
|
|
77
76
|
}
|
|
78
77
|
};
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
//#region src/commands/commands/add-data-bar-cf.command.ts
|
|
79
|
+
// src/commands/commands/add-data-bar-cf.command.ts
|
|
82
80
|
const AddDataBarConditionalRuleCommand = {
|
|
83
81
|
type: CommandType.COMMAND,
|
|
84
82
|
id: "sheet.command.add-data-bar-conditional-rule",
|
|
@@ -117,8 +115,7 @@ const AddDataBarConditionalRuleCommand = {
|
|
|
117
115
|
}
|
|
118
116
|
};
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
//#region src/commands/commands/add-duplicate-values-cf.command.ts
|
|
118
|
+
// src/commands/commands/add-duplicate-values-cf.command.ts
|
|
122
119
|
const AddDuplicateValuesCfCommand = {
|
|
123
120
|
type: CommandType.COMMAND,
|
|
124
121
|
id: "sheet.command.add-duplicate-values-conditional-rule",
|
|
@@ -149,8 +146,7 @@ const AddDuplicateValuesCfCommand = {
|
|
|
149
146
|
}
|
|
150
147
|
};
|
|
151
148
|
|
|
152
|
-
|
|
153
|
-
//#region src/commands/commands/add-icon-set-cf.command.ts
|
|
149
|
+
// src/commands/commands/add-icon-set-cf.command.ts
|
|
154
150
|
const AddIconSetConditionalRuleCommand = {
|
|
155
151
|
type: CommandType.COMMAND,
|
|
156
152
|
id: "sheet.command.add-icon-set-conditional-rule",
|
|
@@ -179,8 +175,7 @@ const AddIconSetConditionalRuleCommand = {
|
|
|
179
175
|
}
|
|
180
176
|
};
|
|
181
177
|
|
|
182
|
-
|
|
183
|
-
//#region src/commands/commands/add-number-cf.command.ts
|
|
178
|
+
// src/commands/commands/add-number-cf.command.ts
|
|
184
179
|
const AddNumberCfCommand = {
|
|
185
180
|
type: CommandType.COMMAND,
|
|
186
181
|
id: "sheet.command.add-number-conditional-rule",
|
|
@@ -234,8 +229,7 @@ const AddNumberCfCommand = {
|
|
|
234
229
|
}
|
|
235
230
|
};
|
|
236
231
|
|
|
237
|
-
|
|
238
|
-
//#region src/commands/commands/add-rank-cf.command.ts
|
|
232
|
+
// src/commands/commands/add-rank-cf.command.ts
|
|
239
233
|
const AddRankCfCommand = {
|
|
240
234
|
type: CommandType.COMMAND,
|
|
241
235
|
id: "sheet.command.add-rank-conditional-rule",
|
|
@@ -269,8 +263,7 @@ const AddRankCfCommand = {
|
|
|
269
263
|
}
|
|
270
264
|
};
|
|
271
265
|
|
|
272
|
-
|
|
273
|
-
//#region src/commands/commands/add-text-cf.command.ts
|
|
266
|
+
// src/commands/commands/add-text-cf.command.ts
|
|
274
267
|
const AddTextCfCommand = {
|
|
275
268
|
type: CommandType.COMMAND,
|
|
276
269
|
id: "sheet.command.add-text-conditional-rule",
|
|
@@ -303,8 +296,7 @@ const AddTextCfCommand = {
|
|
|
303
296
|
}
|
|
304
297
|
};
|
|
305
298
|
|
|
306
|
-
|
|
307
|
-
//#region src/commands/commands/add-time-period-cf.command.ts
|
|
299
|
+
// src/commands/commands/add-time-period-cf.command.ts
|
|
308
300
|
const AddTimePeriodCfCommand = {
|
|
309
301
|
type: CommandType.COMMAND,
|
|
310
302
|
id: "sheet.command.add-time-period-conditional-rule",
|
|
@@ -336,8 +328,7 @@ const AddTimePeriodCfCommand = {
|
|
|
336
328
|
}
|
|
337
329
|
};
|
|
338
330
|
|
|
339
|
-
|
|
340
|
-
//#region src/commands/commands/add-unique-values-cf.command.ts
|
|
331
|
+
// src/commands/commands/add-unique-values-cf.command.ts
|
|
341
332
|
const AddUniqueValuesCfCommand = {
|
|
342
333
|
type: CommandType.COMMAND,
|
|
343
334
|
id: "sheet.command.add-uniqueValues-conditional-rule",
|
|
@@ -368,8 +359,7 @@ const AddUniqueValuesCfCommand = {
|
|
|
368
359
|
}
|
|
369
360
|
};
|
|
370
361
|
|
|
371
|
-
|
|
372
|
-
//#region src/const.ts
|
|
362
|
+
// src/const.ts
|
|
373
363
|
/**
|
|
374
364
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
375
365
|
*
|
|
@@ -387,8 +377,7 @@ const AddUniqueValuesCfCommand = {
|
|
|
387
377
|
*/
|
|
388
378
|
const CF_PANEL_KEY = "sheet.conditional.formatting.panel";
|
|
389
379
|
|
|
390
|
-
|
|
391
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
380
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
|
|
392
381
|
function _typeof(o) {
|
|
393
382
|
"@babel/helpers - typeof";
|
|
394
383
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -398,28 +387,25 @@ function _typeof(o) {
|
|
|
398
387
|
}, _typeof(o);
|
|
399
388
|
}
|
|
400
389
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
function toPrimitive(t, r) {
|
|
390
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
|
|
391
|
+
function toPrimitive(t, e) {
|
|
404
392
|
if ("object" != _typeof(t) || !t) return t;
|
|
405
|
-
var
|
|
406
|
-
if (void 0 !==
|
|
407
|
-
var i =
|
|
393
|
+
var r;
|
|
394
|
+
if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
|
|
395
|
+
var i = r.call(t, e || "default");
|
|
408
396
|
if ("object" != _typeof(i)) return i;
|
|
409
397
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
410
398
|
}
|
|
411
|
-
return ("string" ===
|
|
399
|
+
return ("string" === e ? String : Number)(t);
|
|
412
400
|
}
|
|
413
401
|
|
|
414
|
-
|
|
415
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
402
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
|
|
416
403
|
function toPropertyKey(t) {
|
|
417
404
|
var i = toPrimitive(t, "string");
|
|
418
405
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
419
406
|
}
|
|
420
407
|
|
|
421
|
-
|
|
422
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
408
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
|
|
423
409
|
function _defineProperty(e, r, t) {
|
|
424
410
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
425
411
|
value: t,
|
|
@@ -429,16 +415,14 @@ function _defineProperty(e, r, t) {
|
|
|
429
415
|
}) : e[r] = t, e;
|
|
430
416
|
}
|
|
431
417
|
|
|
432
|
-
|
|
433
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
418
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
|
|
434
419
|
function __decorateParam(paramIndex, decorator) {
|
|
435
420
|
return function(target, key) {
|
|
436
421
|
decorator(target, key, paramIndex);
|
|
437
422
|
};
|
|
438
423
|
}
|
|
439
424
|
|
|
440
|
-
|
|
441
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
425
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
|
|
442
426
|
function __decorate(decorators, target, key, desc) {
|
|
443
427
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
444
428
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -446,8 +430,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
446
430
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
447
431
|
}
|
|
448
432
|
|
|
449
|
-
|
|
450
|
-
//#region src/controllers/cf.panel.controller.ts
|
|
433
|
+
// src/controllers/cf.panel.controller.ts
|
|
451
434
|
let ConditionalFormattingPanelController = class ConditionalFormattingPanelController extends Disposable {
|
|
452
435
|
constructor(_univerInstanceService, _sidebarService, _localeService) {
|
|
453
436
|
super();
|
|
@@ -487,8 +470,7 @@ ConditionalFormattingPanelController = __decorate([
|
|
|
487
470
|
__decorateParam(2, Inject(LocaleService))
|
|
488
471
|
], ConditionalFormattingPanelController);
|
|
489
472
|
|
|
490
|
-
|
|
491
|
-
//#region src/commands/operations/open-conditional-formatting-panel.ts
|
|
473
|
+
// src/commands/operations/open-conditional-formatting-panel.ts
|
|
492
474
|
const OpenConditionalFormattingOperator = {
|
|
493
475
|
id: "sheet.operation.open.conditional.formatting.panel",
|
|
494
476
|
type: CommandType.OPERATION,
|
|
@@ -585,8 +567,7 @@ const OpenConditionalFormattingOperator = {
|
|
|
585
567
|
}
|
|
586
568
|
};
|
|
587
569
|
|
|
588
|
-
|
|
589
|
-
//#region src/controllers/cf.clear.controller.ts
|
|
570
|
+
// src/controllers/cf.clear.controller.ts
|
|
590
571
|
let ConditionalFormattingClearController = class ConditionalFormattingClearController extends Disposable {
|
|
591
572
|
constructor(_injector, _univerInstanceService, _sheetInterceptorService, _selectionManagerService, _conditionalFormattingRangeIndexModel) {
|
|
592
573
|
super();
|
|
@@ -687,8 +668,7 @@ function generateClearCfMutations(injector, allRules, ranges, unitId, subUnitId)
|
|
|
687
668
|
};
|
|
688
669
|
}
|
|
689
670
|
|
|
690
|
-
|
|
691
|
-
//#region src/menu/manage-rule.ts
|
|
671
|
+
// src/menu/manage-rule.ts
|
|
692
672
|
const commandList = [
|
|
693
673
|
SetWorksheetActiveOperation.id,
|
|
694
674
|
AddConditionalRuleMutation.id,
|
|
@@ -853,8 +833,7 @@ function FactoryManageConditionalFormattingRule(accessor) {
|
|
|
853
833
|
};
|
|
854
834
|
}
|
|
855
835
|
|
|
856
|
-
|
|
857
|
-
//#region src/menu/quick-insert.menu.ts
|
|
836
|
+
// src/menu/quick-insert.menu.ts
|
|
858
837
|
const DATA_BAR_PARAMS = {
|
|
859
838
|
min: { type: CFValueType.min },
|
|
860
839
|
max: { type: CFValueType.max },
|
|
@@ -979,8 +958,7 @@ function quickIconSetMenuFactory(accessor) {
|
|
|
979
958
|
};
|
|
980
959
|
}
|
|
981
960
|
|
|
982
|
-
|
|
983
|
-
//#region src/menu/schema.ts
|
|
961
|
+
// src/menu/schema.ts
|
|
984
962
|
const conditionalFormattingRuleMenuSchema = { [RibbonDataGroup.RULES]: { [OpenConditionalFormattingOperator.id]: {
|
|
985
963
|
order: 1,
|
|
986
964
|
gridLayout: {
|
|
@@ -1003,19 +981,16 @@ const menuSchema = {
|
|
|
1003
981
|
...conditionalFormattingRuleMenuSchema
|
|
1004
982
|
};
|
|
1005
983
|
|
|
1006
|
-
|
|
1007
|
-
//#region package.json
|
|
984
|
+
// package.json
|
|
1008
985
|
var name = "@univerjs/sheets-conditional-formatting-ui";
|
|
1009
|
-
var version = "1.
|
|
986
|
+
var version = "1.5.0";
|
|
1010
987
|
|
|
1011
|
-
|
|
1012
|
-
//#region src/config/config.ts
|
|
988
|
+
// src/config/config.ts
|
|
1013
989
|
const SHEETS_CONDITIONAL_FORMATTING_UI_PLUGIN_CONFIG_KEY = "sheets-conditional-formatting-ui.config";
|
|
1014
990
|
const configSymbol = Symbol(SHEETS_CONDITIONAL_FORMATTING_UI_PLUGIN_CONFIG_KEY);
|
|
1015
991
|
const defaultPluginConfig = {};
|
|
1016
992
|
|
|
1017
|
-
|
|
1018
|
-
//#region src/controllers/cf-formula-ref-range.controller.ts
|
|
993
|
+
// src/controllers/cf-formula-ref-range.controller.ts
|
|
1019
994
|
let ConditionalFormattingFormulaRefRangeController = class ConditionalFormattingFormulaRefRangeController extends Disposable {
|
|
1020
995
|
constructor(_conditionalFormattingRuleModel, _formulaRefRangeService, _injector) {
|
|
1021
996
|
super();
|
|
@@ -1191,8 +1166,7 @@ ConditionalFormattingFormulaRefRangeController = __decorate([
|
|
|
1191
1166
|
__decorateParam(2, Inject(Injector))
|
|
1192
1167
|
], ConditionalFormattingFormulaRefRangeController);
|
|
1193
1168
|
|
|
1194
|
-
|
|
1195
|
-
//#region src/controllers/cf.copy-paste.controller.ts
|
|
1169
|
+
// src/controllers/cf.copy-paste.controller.ts
|
|
1196
1170
|
const specialPastes = [
|
|
1197
1171
|
PREDEFINED_HOOK_NAME_PASTE.SPECIAL_PASTE_FORMAT,
|
|
1198
1172
|
PREDEFINED_HOOK_NAME_PASTE.DEFAULT_PASTE,
|
|
@@ -1418,8 +1392,7 @@ ConditionalFormattingCopyPasteController = __decorate([
|
|
|
1418
1392
|
__decorateParam(4, Inject(ConditionalFormattingRangeTransformService))
|
|
1419
1393
|
], ConditionalFormattingCopyPasteController);
|
|
1420
1394
|
|
|
1421
|
-
|
|
1422
|
-
//#region src/controllers/cf.i18n.controller.ts
|
|
1395
|
+
// src/controllers/cf.i18n.controller.ts
|
|
1423
1396
|
let ConditionalFormattingI18nController = class ConditionalFormattingI18nController extends Disposable {
|
|
1424
1397
|
constructor(_localeService) {
|
|
1425
1398
|
super();
|
|
@@ -1469,8 +1442,7 @@ let ConditionalFormattingI18nController = class ConditionalFormattingI18nControl
|
|
|
1469
1442
|
};
|
|
1470
1443
|
ConditionalFormattingI18nController = __decorate([__decorateParam(0, Inject(LocaleService))], ConditionalFormattingI18nController);
|
|
1471
1444
|
|
|
1472
|
-
|
|
1473
|
-
//#region src/controllers/cf.permission.controller.ts
|
|
1445
|
+
// src/controllers/cf.permission.controller.ts
|
|
1474
1446
|
let ConditionalFormattingPermissionController = class ConditionalFormattingPermissionController extends Disposable {
|
|
1475
1447
|
constructor(_localeService, _commandService, _sheetPermissionCheckController) {
|
|
1476
1448
|
super();
|
|
@@ -1498,8 +1470,7 @@ ConditionalFormattingPermissionController = __decorate([
|
|
|
1498
1470
|
__decorateParam(2, Inject(SheetPermissionCheckController))
|
|
1499
1471
|
], ConditionalFormattingPermissionController);
|
|
1500
1472
|
|
|
1501
|
-
|
|
1502
|
-
//#region src/controllers/cf.render.controller.ts
|
|
1473
|
+
// src/controllers/cf.render.controller.ts
|
|
1503
1474
|
let SheetsCfRenderController = class SheetsCfRenderController extends Disposable {
|
|
1504
1475
|
constructor(_sheetInterceptorService, _conditionalFormattingService, _univerInstanceService, _renderManagerService, _conditionalFormattingViewModel, _conditionalFormattingRuleModel, _conditionalFormattingRangeIndexModel) {
|
|
1505
1476
|
super();
|
|
@@ -1670,10 +1641,9 @@ SheetsCfRenderController = __decorate([
|
|
|
1670
1641
|
__decorateParam(6, Inject(ConditionalFormattingRangeIndexModel))
|
|
1671
1642
|
], SheetsCfRenderController);
|
|
1672
1643
|
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
const ColorPicker$1 =
|
|
1676
|
-
const { color, onChange, disable = false, Icon = PaintBucketDoubleIcon, className, DropdownComponent = Dropdown, PickerComponent = ColorPicker } = props;
|
|
1644
|
+
// src/views/ColorPicker.tsx
|
|
1645
|
+
const ColorPicker = (props) => {
|
|
1646
|
+
const { color, onChange, disable = false, Icon = PaintBucketDoubleIcon, className, DropdownComponent = Dropdown, PickerComponent = ColorPicker$1 } = props;
|
|
1677
1647
|
const colorKit = useMemo(() => new ColorKit(color), [color]);
|
|
1678
1648
|
const renderIcon = () => {
|
|
1679
1649
|
const iconProps = {
|
|
@@ -1697,8 +1667,7 @@ const ColorPicker$1 = (props) => {
|
|
|
1697
1667
|
}) : renderIcon();
|
|
1698
1668
|
};
|
|
1699
1669
|
|
|
1700
|
-
|
|
1701
|
-
//#region src/views/ConditionalFormattingRulePreview.tsx
|
|
1670
|
+
// src/views/ConditionalFormattingRulePreview.tsx
|
|
1702
1671
|
/** Shows a rule's configured appearance without evaluating worksheet values. */
|
|
1703
1672
|
function ConditionalFormattingRulePreview(props) {
|
|
1704
1673
|
const { rule } = props;
|
|
@@ -1786,8 +1755,7 @@ function ConditionalFormattingRulePreview(props) {
|
|
|
1786
1755
|
}
|
|
1787
1756
|
}
|
|
1788
1757
|
|
|
1789
|
-
|
|
1790
|
-
//#region src/views/panel/rule-edit/RuleNumberInput.tsx
|
|
1758
|
+
// src/views/panel/rule-edit/RuleNumberInput.tsx
|
|
1791
1759
|
/**
|
|
1792
1760
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1793
1761
|
*
|
|
@@ -1836,8 +1804,7 @@ function RuleNumberInput({ value, onChange, min = Number.MIN_SAFE_INTEGER, max =
|
|
|
1836
1804
|
});
|
|
1837
1805
|
}
|
|
1838
1806
|
|
|
1839
|
-
|
|
1840
|
-
//#region src/views/panel/rule-edit/styles.ts
|
|
1807
|
+
// src/views/panel/rule-edit/styles.ts
|
|
1841
1808
|
/**
|
|
1842
1809
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1843
1810
|
*
|
|
@@ -1855,8 +1822,7 @@ function RuleNumberInput({ value, onChange, min = Number.MIN_SAFE_INTEGER, max =
|
|
|
1855
1822
|
*/
|
|
1856
1823
|
const previewClassName = clsx("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", borderClassName);
|
|
1857
1824
|
|
|
1858
|
-
|
|
1859
|
-
//#region src/views/panel/rule-edit/ColorScale.tsx
|
|
1825
|
+
// src/views/panel/rule-edit/ColorScale.tsx
|
|
1860
1826
|
const createOptionItem$2 = (text) => ({
|
|
1861
1827
|
label: `sheets-conditional-formatting-ui.valueType.${text}`,
|
|
1862
1828
|
value: text
|
|
@@ -1915,7 +1881,7 @@ const TextInput$1 = (props) => {
|
|
|
1915
1881
|
};
|
|
1916
1882
|
const ColorScaleStyleEditor = (props) => {
|
|
1917
1883
|
var _props$rule;
|
|
1918
|
-
const { interceptorManager, SelectComponent = Select, ColorPickerComponent = ColorPicker
|
|
1884
|
+
const { interceptorManager, SelectComponent = Select, ColorPickerComponent = ColorPicker, FormulaEditorComponent = FormulaEditor } = props;
|
|
1919
1885
|
const localeService = useDependency(LocaleService);
|
|
1920
1886
|
const rule = ((_props$rule = props.rule) === null || _props$rule === void 0 ? void 0 : _props$rule.type) === CFRuleType.colorScale ? props.rule : void 0;
|
|
1921
1887
|
const commonOptionDefinitions = [
|
|
@@ -2283,8 +2249,7 @@ const ColorScaleStyleEditor = (props) => {
|
|
|
2283
2249
|
] });
|
|
2284
2250
|
};
|
|
2285
2251
|
|
|
2286
|
-
|
|
2287
|
-
//#region src/views/panel/rule-edit/DataBar.tsx
|
|
2252
|
+
// src/views/panel/rule-edit/DataBar.tsx
|
|
2288
2253
|
const createOptionItem$1 = (text) => ({
|
|
2289
2254
|
label: `sheets-conditional-formatting-ui.valueType.${text}`,
|
|
2290
2255
|
value: text
|
|
@@ -2342,7 +2307,7 @@ const InputText = (props) => {
|
|
|
2342
2307
|
};
|
|
2343
2308
|
const DataBarStyleEditor = (props) => {
|
|
2344
2309
|
var _props$rule;
|
|
2345
|
-
const { interceptorManager, SelectComponent = Select, ColorPickerComponent = ColorPicker
|
|
2310
|
+
const { interceptorManager, SelectComponent = Select, ColorPickerComponent = ColorPicker, FormulaEditorComponent = FormulaEditor } = props;
|
|
2346
2311
|
const localeService = useDependency(LocaleService);
|
|
2347
2312
|
const rule = ((_props$rule = props.rule) === null || _props$rule === void 0 ? void 0 : _props$rule.type) === CFRuleType.dataBar ? props.rule : void 0;
|
|
2348
2313
|
const [isGradient, setIsGradient] = useState(() => {
|
|
@@ -2676,14 +2641,13 @@ const DataBarStyleEditor = (props) => {
|
|
|
2676
2641
|
] });
|
|
2677
2642
|
};
|
|
2678
2643
|
|
|
2679
|
-
|
|
2680
|
-
//#region src/views/ConditionalStyleEditor.tsx
|
|
2644
|
+
// src/views/ConditionalStyleEditor.tsx
|
|
2681
2645
|
const getAnotherBooleanNumber = (v) => {
|
|
2682
2646
|
return [BooleanNumber.FALSE, void 0].includes(v) ? BooleanNumber.TRUE : BooleanNumber.FALSE;
|
|
2683
2647
|
};
|
|
2684
2648
|
const getBooleanFromNumber = (v) => v !== BooleanNumber.FALSE;
|
|
2685
2649
|
const ConditionalStyleEditor = (props) => {
|
|
2686
|
-
const { style, onChange, className, ColorPickerComponent = ColorPicker
|
|
2650
|
+
const { style, onChange, className, ColorPickerComponent = ColorPicker } = props;
|
|
2687
2651
|
const [isBold, setIsBold] = useState(() => {
|
|
2688
2652
|
if (!(style === null || style === void 0 ? void 0 : style.bl)) return;
|
|
2689
2653
|
return style.bl;
|
|
@@ -2767,8 +2731,7 @@ const ConditionalStyleEditor = (props) => {
|
|
|
2767
2731
|
});
|
|
2768
2732
|
};
|
|
2769
2733
|
|
|
2770
|
-
|
|
2771
|
-
//#region src/views/panel/rule-edit/Formula.tsx
|
|
2734
|
+
// src/views/panel/rule-edit/Formula.tsx
|
|
2772
2735
|
const FormulaStyleEditor = (props) => {
|
|
2773
2736
|
var _props$rule;
|
|
2774
2737
|
const { onChange, interceptorManager, ColorPickerComponent, FormulaEditorComponent = FormulaEditor } = props;
|
|
@@ -2885,8 +2848,7 @@ const FormulaStyleEditor = (props) => {
|
|
|
2885
2848
|
});
|
|
2886
2849
|
};
|
|
2887
2850
|
|
|
2888
|
-
|
|
2889
|
-
//#region src/views/wrapper-error/WrapperError.tsx
|
|
2851
|
+
// src/views/wrapper-error/WrapperError.tsx
|
|
2890
2852
|
const WrapperError = (props) => {
|
|
2891
2853
|
return /* @__PURE__ */ jsxs("div", { children: [props.children, props.errorText && /* @__PURE__ */ jsx("div", {
|
|
2892
2854
|
className: "univer-mt-1 univer-text-xs univer-text-red-500",
|
|
@@ -2894,8 +2856,7 @@ const WrapperError = (props) => {
|
|
|
2894
2856
|
})] });
|
|
2895
2857
|
};
|
|
2896
2858
|
|
|
2897
|
-
|
|
2898
|
-
//#region src/views/panel/rule-edit/HighlightCell.tsx
|
|
2859
|
+
// src/views/panel/rule-edit/HighlightCell.tsx
|
|
2899
2860
|
const textOperators = new Set(Object.values(CFTextOperator));
|
|
2900
2861
|
const numberOperators = new Set(Object.values(CFNumberOperator));
|
|
2901
2862
|
const timePeriodOperators = new Set(Object.values(CFTimePeriodOperator));
|
|
@@ -3254,7 +3215,7 @@ const HighlightCellStyleEditor = (props) => {
|
|
|
3254
3215
|
onChange: onTypeChange,
|
|
3255
3216
|
value: subType,
|
|
3256
3217
|
options: typeOptions
|
|
3257
|
-
}), (operatorOptions === null || operatorOptions === void 0 ? void 0 : operatorOptions.length) && /* @__PURE__ */ jsx(SelectComponent, {
|
|
3218
|
+
}), !!(operatorOptions === null || operatorOptions === void 0 ? void 0 : operatorOptions.length) && /* @__PURE__ */ jsx(SelectComponent, {
|
|
3258
3219
|
className: "univer-mt-3 univer-w-full",
|
|
3259
3220
|
onChange: onOperatorChange,
|
|
3260
3221
|
value: operator || "",
|
|
@@ -3285,8 +3246,7 @@ const HighlightCellStyleEditor = (props) => {
|
|
|
3285
3246
|
] });
|
|
3286
3247
|
};
|
|
3287
3248
|
|
|
3288
|
-
|
|
3289
|
-
//#region src/views/panel/rule-edit/IconSet.tsx
|
|
3249
|
+
// src/views/panel/rule-edit/IconSet.tsx
|
|
3290
3250
|
const getIcon = (iconType, iconId) => {
|
|
3291
3251
|
return (iconMap[iconType] || [])[Number(iconId)] || "";
|
|
3292
3252
|
};
|
|
@@ -3328,15 +3288,6 @@ const TextInput = (props) => {
|
|
|
3328
3288
|
})
|
|
3329
3289
|
});
|
|
3330
3290
|
};
|
|
3331
|
-
const createDefaultConfigItem = (iconType, index, list) => ({
|
|
3332
|
-
operator: CFNumberOperator.greaterThan,
|
|
3333
|
-
value: {
|
|
3334
|
-
type: CFValueType.num,
|
|
3335
|
-
value: (list.length - 1 - index) * 10
|
|
3336
|
-
},
|
|
3337
|
-
iconType,
|
|
3338
|
-
iconId: String(index)
|
|
3339
|
-
});
|
|
3340
3291
|
const IconGroupList = (props) => {
|
|
3341
3292
|
const { iconType, onClick } = props;
|
|
3342
3293
|
const localeService = useDependency(LocaleService);
|
|
@@ -3523,14 +3474,10 @@ const IconSetRuleEdit = (props) => {
|
|
|
3523
3474
|
children: /* @__PURE__ */ jsx(DropdownComponent, {
|
|
3524
3475
|
overlay: /* @__PURE__ */ jsx("div", {
|
|
3525
3476
|
className: "univer-rounded-lg univer-p-4",
|
|
3526
|
-
children: /* @__PURE__ */ jsx(IconItemList, {
|
|
3527
|
-
onClick: handleIconClick,
|
|
3528
|
-
iconId: item.iconId,
|
|
3529
|
-
iconType: item.iconType
|
|
3530
|
-
})
|
|
3477
|
+
children: /* @__PURE__ */ jsx(IconItemList, { onClick: handleIconClick })
|
|
3531
3478
|
}),
|
|
3532
3479
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3533
|
-
className: clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-gray-0 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-
|
|
3480
|
+
className: clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-gray-0 univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-gray-0", borderClassName),
|
|
3534
3481
|
children: [icon ? /* @__PURE__ */ jsx("img", {
|
|
3535
3482
|
src: icon,
|
|
3536
3483
|
className: "univer-size-4",
|
|
@@ -3545,7 +3492,7 @@ const IconSetRuleEdit = (props) => {
|
|
|
3545
3492
|
handleOperatorChange(v, index);
|
|
3546
3493
|
}
|
|
3547
3494
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
3548
|
-
className: "univer-
|
|
3495
|
+
className: "univer-self-center univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
3549
3496
|
children: [localeService.t("sheets-conditional-formatting-ui.iconSet.rule"), /* @__PURE__ */ jsxs("span", {
|
|
3550
3497
|
className: "univer-font-medium",
|
|
3551
3498
|
children: [
|
|
@@ -3598,6 +3545,15 @@ const IconSet = (props) => {
|
|
|
3598
3545
|
const localeService = useDependency(LocaleService);
|
|
3599
3546
|
const direction = useObservable(localeService.direction$, localeService.getDirection());
|
|
3600
3547
|
const [errorMap, setErrorMap] = useState({});
|
|
3548
|
+
const createDefaultConfigItem = (iconType, index, list) => ({
|
|
3549
|
+
operator: CFNumberOperator.greaterThan,
|
|
3550
|
+
value: {
|
|
3551
|
+
type: CFValueType.num,
|
|
3552
|
+
value: (list.length - 1 - index) * 10
|
|
3553
|
+
},
|
|
3554
|
+
iconType,
|
|
3555
|
+
iconId: String(index)
|
|
3556
|
+
});
|
|
3601
3557
|
const [currentIconType, setCurrentIconType] = useState(() => {
|
|
3602
3558
|
const defaultV = Object.keys(iconMap)[0];
|
|
3603
3559
|
if (rule && rule.config.length) {
|
|
@@ -3736,7 +3692,7 @@ const IconSet = (props) => {
|
|
|
3736
3692
|
dir: direction,
|
|
3737
3693
|
children: [
|
|
3738
3694
|
/* @__PURE__ */ jsx("div", {
|
|
3739
|
-
className: "univer-mt-4 univer-text-sm univer-text-gray-600",
|
|
3695
|
+
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
3740
3696
|
children: localeService.t("sheets-conditional-formatting-ui.panel.styleRule")
|
|
3741
3697
|
}),
|
|
3742
3698
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -3751,7 +3707,7 @@ const IconSet = (props) => {
|
|
|
3751
3707
|
})
|
|
3752
3708
|
}),
|
|
3753
3709
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3754
|
-
className: clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-gray-0 univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600", borderClassName),
|
|
3710
|
+
className: clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-gray-0 univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-gray-0", borderClassName),
|
|
3755
3711
|
children: [previewIcon, /* @__PURE__ */ jsx(MoreDownIcon, {})]
|
|
3756
3712
|
})
|
|
3757
3713
|
})
|
|
@@ -3785,8 +3741,7 @@ const IconSet = (props) => {
|
|
|
3785
3741
|
});
|
|
3786
3742
|
};
|
|
3787
3743
|
|
|
3788
|
-
|
|
3789
|
-
//#region src/views/panel/rule-edit/Rank.tsx
|
|
3744
|
+
// src/views/panel/rule-edit/Rank.tsx
|
|
3790
3745
|
const RankStyleEditor = (props) => {
|
|
3791
3746
|
var _props$rule;
|
|
3792
3747
|
const { onChange, interceptorManager, SelectComponent = Select, ColorPickerComponent } = props;
|
|
@@ -3982,13 +3937,11 @@ const RankStyleEditor = (props) => {
|
|
|
3982
3937
|
] });
|
|
3983
3938
|
};
|
|
3984
3939
|
|
|
3985
|
-
|
|
3986
|
-
//#region src/views/panel/rule-edit/type.ts
|
|
3940
|
+
// src/views/panel/rule-edit/type.ts
|
|
3987
3941
|
const beforeSubmit = createInterceptorKey("beforeSubmit");
|
|
3988
3942
|
const submit = createInterceptorKey("submit");
|
|
3989
3943
|
|
|
3990
|
-
|
|
3991
|
-
//#region src/views/panel/RuleEdit.tsx
|
|
3944
|
+
// src/views/panel/RuleEdit.tsx
|
|
3992
3945
|
const getUnitId = (univerInstanceService) => univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_SHEET).getUnitId();
|
|
3993
3946
|
const getSubUnitId = (univerInstanceService) => {
|
|
3994
3947
|
var _getActiveSheet;
|
|
@@ -4231,8 +4184,7 @@ const RuleEdit = (props) => {
|
|
|
4231
4184
|
] });
|
|
4232
4185
|
};
|
|
4233
4186
|
|
|
4234
|
-
|
|
4235
|
-
//#region src/utils/get-rule-describe.ts
|
|
4187
|
+
// src/utils/get-rule-describe.ts
|
|
4236
4188
|
/** Returns the localized description used by the built-in conditional formatting rule list. */
|
|
4237
4189
|
function getRuleDescribe(rule, localeService) {
|
|
4238
4190
|
const ruleConfig = rule.rule;
|
|
@@ -4268,8 +4220,7 @@ function getRuleDescribe(rule, localeService) {
|
|
|
4268
4220
|
}
|
|
4269
4221
|
}
|
|
4270
4222
|
|
|
4271
|
-
|
|
4272
|
-
//#region src/views/panel/RuleList.tsx
|
|
4223
|
+
// src/views/panel/RuleList.tsx
|
|
4273
4224
|
function RuleList(props) {
|
|
4274
4225
|
const { SelectComponent = Select } = props;
|
|
4275
4226
|
const { onClick } = props;
|
|
@@ -4497,8 +4448,7 @@ function RuleList(props) {
|
|
|
4497
4448
|
}) })] });
|
|
4498
4449
|
}
|
|
4499
4450
|
|
|
4500
|
-
|
|
4501
|
-
//#region src/views/ConditionFormattingPanel.tsx
|
|
4451
|
+
// src/views/ConditionFormattingPanel.tsx
|
|
4502
4452
|
const ConditionFormattingPanel = (props) => {
|
|
4503
4453
|
const { RuleEditComponent = RuleEdit, RuleListComponent = RuleList } = props;
|
|
4504
4454
|
const [currentEditRule, setCurrentEditRule] = useState(props.rule);
|
|
@@ -4517,7 +4467,7 @@ const ConditionFormattingPanel = (props) => {
|
|
|
4517
4467
|
setIsShowRuleEditor(true);
|
|
4518
4468
|
};
|
|
4519
4469
|
return /* @__PURE__ */ jsx("div", {
|
|
4520
|
-
className: "univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4",
|
|
4470
|
+
className: "univer-box-border univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4",
|
|
4521
4471
|
children: isShowRuleEditor ? /* @__PURE__ */ jsx(RuleEditComponent, {
|
|
4522
4472
|
onCancel: handleCancel,
|
|
4523
4473
|
rule: currentEditRule
|
|
@@ -4528,18 +4478,16 @@ const ConditionFormattingPanel = (props) => {
|
|
|
4528
4478
|
});
|
|
4529
4479
|
};
|
|
4530
4480
|
|
|
4531
|
-
|
|
4532
|
-
//#region src/views/mobile/MobileColorPicker.tsx
|
|
4481
|
+
// src/views/mobile/MobileColorPicker.tsx
|
|
4533
4482
|
function MobileConditionalColorPicker(props) {
|
|
4534
|
-
return /* @__PURE__ */ jsx(ColorPicker
|
|
4483
|
+
return /* @__PURE__ */ jsx(ColorPicker, {
|
|
4535
4484
|
...props,
|
|
4536
4485
|
DropdownComponent: MobileDropdown,
|
|
4537
4486
|
PickerComponent: MobileColorPicker
|
|
4538
4487
|
});
|
|
4539
4488
|
}
|
|
4540
4489
|
|
|
4541
|
-
|
|
4542
|
-
//#region src/views/mobile/MobileRuleEdit.tsx
|
|
4490
|
+
// src/views/mobile/MobileRuleEdit.tsx
|
|
4543
4491
|
function MobileRuleEdit(props) {
|
|
4544
4492
|
const FormulaEditorComponent = useDependency(ComponentManager).get(EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY);
|
|
4545
4493
|
return /* @__PURE__ */ jsx(RuleEdit, {
|
|
@@ -4552,8 +4500,7 @@ function MobileRuleEdit(props) {
|
|
|
4552
4500
|
});
|
|
4553
4501
|
}
|
|
4554
4502
|
|
|
4555
|
-
|
|
4556
|
-
//#region src/views/mobile/MobileRuleList.tsx
|
|
4503
|
+
// src/views/mobile/MobileRuleList.tsx
|
|
4557
4504
|
function MobileRuleList(props) {
|
|
4558
4505
|
return /* @__PURE__ */ jsx(RuleList, {
|
|
4559
4506
|
...props,
|
|
@@ -4561,8 +4508,7 @@ function MobileRuleList(props) {
|
|
|
4561
4508
|
});
|
|
4562
4509
|
}
|
|
4563
4510
|
|
|
4564
|
-
|
|
4565
|
-
//#region src/views/mobile/MobileConditionFormattingPanel.tsx
|
|
4511
|
+
// src/views/mobile/MobileConditionFormattingPanel.tsx
|
|
4566
4512
|
function MobileConditionFormattingPanel(props) {
|
|
4567
4513
|
return /* @__PURE__ */ jsx(ConditionFormattingPanel, {
|
|
4568
4514
|
...props,
|
|
@@ -4571,8 +4517,7 @@ function MobileConditionFormattingPanel(props) {
|
|
|
4571
4517
|
});
|
|
4572
4518
|
}
|
|
4573
4519
|
|
|
4574
|
-
|
|
4575
|
-
//#region src/controllers/mobile/components.controller.ts
|
|
4520
|
+
// src/controllers/mobile/components.controller.ts
|
|
4576
4521
|
/**
|
|
4577
4522
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4578
4523
|
*
|
|
@@ -4601,15 +4546,13 @@ let MobileComponentsController = class MobileComponentsController extends Dispos
|
|
|
4601
4546
|
};
|
|
4602
4547
|
MobileComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], MobileComponentsController);
|
|
4603
4548
|
|
|
4604
|
-
|
|
4605
|
-
//#region src/menu/mobile-schema.ts
|
|
4549
|
+
// src/menu/mobile-schema.ts
|
|
4606
4550
|
const mobileMenuSchema = { [RibbonDataGroup.RULES]: { [OpenConditionalFormattingOperator.id]: {
|
|
4607
4551
|
order: 1,
|
|
4608
4552
|
menuItemFactory: FactoryManageConditionalFormattingRule
|
|
4609
4553
|
} } };
|
|
4610
4554
|
|
|
4611
|
-
|
|
4612
|
-
//#region src/menu/mobile-cf.menu.controller.ts
|
|
4555
|
+
// src/menu/mobile-cf.menu.controller.ts
|
|
4613
4556
|
/**
|
|
4614
4557
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4615
4558
|
*
|
|
@@ -4633,8 +4576,7 @@ let ConditionalFormattingMobileMenuController = class ConditionalFormattingMobil
|
|
|
4633
4576
|
};
|
|
4634
4577
|
ConditionalFormattingMobileMenuController = __decorate([__decorateParam(0, IMenuManagerService)], ConditionalFormattingMobileMenuController);
|
|
4635
4578
|
|
|
4636
|
-
|
|
4637
|
-
//#region src/mobile-plugin.ts
|
|
4579
|
+
// src/mobile-plugin.ts
|
|
4638
4580
|
let UniverSheetsConditionalFormattingMobileUIPlugin = class UniverSheetsConditionalFormattingMobileUIPlugin extends Plugin {
|
|
4639
4581
|
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
|
4640
4582
|
super();
|
|
@@ -4703,8 +4645,7 @@ UniverSheetsConditionalFormattingMobileUIPlugin = __decorate([
|
|
|
4703
4645
|
__decorateParam(3, IConfigService)
|
|
4704
4646
|
], UniverSheetsConditionalFormattingMobileUIPlugin);
|
|
4705
4647
|
|
|
4706
|
-
|
|
4707
|
-
//#region src/controllers/cf.auto-fill.controller.ts
|
|
4648
|
+
// src/controllers/cf.auto-fill.controller.ts
|
|
4708
4649
|
let ConditionalFormattingAutoFillController = class ConditionalFormattingAutoFillController extends Disposable {
|
|
4709
4650
|
constructor(_injector, _univerInstanceService, _autoFillService, _conditionalFormattingRuleModel, _conditionalFormattingRangeTransformService) {
|
|
4710
4651
|
super();
|
|
@@ -4834,8 +4775,7 @@ ConditionalFormattingAutoFillController = __decorate([
|
|
|
4834
4775
|
__decorateParam(4, Inject(ConditionalFormattingRangeTransformService))
|
|
4835
4776
|
], ConditionalFormattingAutoFillController);
|
|
4836
4777
|
|
|
4837
|
-
|
|
4838
|
-
//#region src/controllers/cf.editor.controller.ts
|
|
4778
|
+
// src/controllers/cf.editor.controller.ts
|
|
4839
4779
|
/**
|
|
4840
4780
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4841
4781
|
*
|
|
@@ -4893,8 +4833,7 @@ let ConditionalFormattingEditorController = class ConditionalFormattingEditorCon
|
|
|
4893
4833
|
};
|
|
4894
4834
|
ConditionalFormattingEditorController = __decorate([__decorateParam(0, Inject(SheetInterceptorService)), __decorateParam(1, Inject(ConditionalFormattingService))], ConditionalFormattingEditorController);
|
|
4895
4835
|
|
|
4896
|
-
|
|
4897
|
-
//#region src/controllers/cf.painter.controller.ts
|
|
4836
|
+
// src/controllers/cf.painter.controller.ts
|
|
4898
4837
|
const repeatByRange = (sourceRange, targetRange) => {
|
|
4899
4838
|
const getRowLength = (range) => range.endRow - range.startRow + 1;
|
|
4900
4839
|
const getColLength = (range) => range.endColumn - range.startColumn + 1;
|
|
@@ -5150,8 +5089,7 @@ ConditionalFormattingPainterController = __decorate([
|
|
|
5150
5089
|
__decorateParam(5, Inject(ConditionalFormattingRangeTransformService))
|
|
5151
5090
|
], ConditionalFormattingPainterController);
|
|
5152
5091
|
|
|
5153
|
-
|
|
5154
|
-
//#region src/controllers/cf.viewport.controller.ts
|
|
5092
|
+
// src/controllers/cf.viewport.controller.ts
|
|
5155
5093
|
let ConditionalFormattingViewportController = class ConditionalFormattingViewportController extends Disposable {
|
|
5156
5094
|
constructor(_conditionalFormattingViewModel, _univerInstanceService, _renderManagerService) {
|
|
5157
5095
|
super();
|
|
@@ -5200,8 +5138,7 @@ ConditionalFormattingViewportController = __decorate([
|
|
|
5200
5138
|
__decorateParam(2, IRenderManagerService)
|
|
5201
5139
|
], ConditionalFormattingViewportController);
|
|
5202
5140
|
|
|
5203
|
-
|
|
5204
|
-
//#region src/controllers/components.controller.ts
|
|
5141
|
+
// src/controllers/components.controller.ts
|
|
5205
5142
|
/**
|
|
5206
5143
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5207
5144
|
*
|
|
@@ -5238,8 +5175,7 @@ let ComponentsController = class ComponentsController extends Disposable {
|
|
|
5238
5175
|
};
|
|
5239
5176
|
ComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], ComponentsController);
|
|
5240
5177
|
|
|
5241
|
-
|
|
5242
|
-
//#region src/menu/cf.menu.controller.ts
|
|
5178
|
+
// src/menu/cf.menu.controller.ts
|
|
5243
5179
|
/**
|
|
5244
5180
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5245
5181
|
*
|
|
@@ -5264,8 +5200,7 @@ let ConditionalFormattingMenuController = class ConditionalFormattingMenuControl
|
|
|
5264
5200
|
};
|
|
5265
5201
|
ConditionalFormattingMenuController = __decorate([__decorateParam(0, IMenuManagerService)], ConditionalFormattingMenuController);
|
|
5266
5202
|
|
|
5267
|
-
|
|
5268
|
-
//#region src/plugin.ts
|
|
5203
|
+
// src/plugin.ts
|
|
5269
5204
|
let UniverSheetsConditionalFormattingUIPlugin = class UniverSheetsConditionalFormattingUIPlugin extends Plugin {
|
|
5270
5205
|
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
|
5271
5206
|
super();
|
|
@@ -5341,5 +5276,4 @@ UniverSheetsConditionalFormattingUIPlugin = __decorate([
|
|
|
5341
5276
|
__decorateParam(3, IConfigService)
|
|
5342
5277
|
], UniverSheetsConditionalFormattingUIPlugin);
|
|
5343
5278
|
|
|
5344
|
-
//#endregion
|
|
5345
5279
|
export { AddAverageCfCommand, AddColorScaleConditionalRuleCommand, AddDataBarConditionalRuleCommand, AddDuplicateValuesCfCommand, AddIconSetConditionalRuleCommand, AddNumberCfCommand, AddRankCfCommand, AddTextCfCommand, AddTimePeriodCfCommand, AddUniqueValuesCfCommand, CF_PANEL_KEY, ConditionalFormattingClearController, ConditionalFormattingRulePreview, OpenConditionalFormattingOperator, menuSchema as SheetsConditionalFormattingUIMenuSchema, UniverSheetsConditionalFormattingMobileUIPlugin, UniverSheetsConditionalFormattingUIPlugin, getRuleDescribe };
|