@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/cjs/index.js
CHANGED
|
@@ -15,7 +15,7 @@ let _univerjs_design = require("@univerjs/design");
|
|
|
15
15
|
let _univerjs_engine_formula = require("@univerjs/engine-formula");
|
|
16
16
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/commands/commands/add-average-cf.command.ts
|
|
19
19
|
const AddAverageCfCommand = {
|
|
20
20
|
type: _univerjs_core.CommandType.COMMAND,
|
|
21
21
|
id: "sheet.command.add-average-conditional-rule",
|
|
@@ -47,8 +47,7 @@ const AddAverageCfCommand = {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
//#region src/commands/commands/add-color-scale-cf.command.ts
|
|
50
|
+
// src/commands/commands/add-color-scale-cf.command.ts
|
|
52
51
|
const AddColorScaleConditionalRuleCommand = {
|
|
53
52
|
type: _univerjs_core.CommandType.COMMAND,
|
|
54
53
|
id: "sheet.command.add-color-scale-conditional-rule",
|
|
@@ -78,8 +77,7 @@ const AddColorScaleConditionalRuleCommand = {
|
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
//#region src/commands/commands/add-data-bar-cf.command.ts
|
|
80
|
+
// src/commands/commands/add-data-bar-cf.command.ts
|
|
83
81
|
const AddDataBarConditionalRuleCommand = {
|
|
84
82
|
type: _univerjs_core.CommandType.COMMAND,
|
|
85
83
|
id: "sheet.command.add-data-bar-conditional-rule",
|
|
@@ -118,8 +116,7 @@ const AddDataBarConditionalRuleCommand = {
|
|
|
118
116
|
}
|
|
119
117
|
};
|
|
120
118
|
|
|
121
|
-
|
|
122
|
-
//#region src/commands/commands/add-duplicate-values-cf.command.ts
|
|
119
|
+
// src/commands/commands/add-duplicate-values-cf.command.ts
|
|
123
120
|
const AddDuplicateValuesCfCommand = {
|
|
124
121
|
type: _univerjs_core.CommandType.COMMAND,
|
|
125
122
|
id: "sheet.command.add-duplicate-values-conditional-rule",
|
|
@@ -150,8 +147,7 @@ const AddDuplicateValuesCfCommand = {
|
|
|
150
147
|
}
|
|
151
148
|
};
|
|
152
149
|
|
|
153
|
-
|
|
154
|
-
//#region src/commands/commands/add-icon-set-cf.command.ts
|
|
150
|
+
// src/commands/commands/add-icon-set-cf.command.ts
|
|
155
151
|
const AddIconSetConditionalRuleCommand = {
|
|
156
152
|
type: _univerjs_core.CommandType.COMMAND,
|
|
157
153
|
id: "sheet.command.add-icon-set-conditional-rule",
|
|
@@ -180,8 +176,7 @@ const AddIconSetConditionalRuleCommand = {
|
|
|
180
176
|
}
|
|
181
177
|
};
|
|
182
178
|
|
|
183
|
-
|
|
184
|
-
//#region src/commands/commands/add-number-cf.command.ts
|
|
179
|
+
// src/commands/commands/add-number-cf.command.ts
|
|
185
180
|
const AddNumberCfCommand = {
|
|
186
181
|
type: _univerjs_core.CommandType.COMMAND,
|
|
187
182
|
id: "sheet.command.add-number-conditional-rule",
|
|
@@ -235,8 +230,7 @@ const AddNumberCfCommand = {
|
|
|
235
230
|
}
|
|
236
231
|
};
|
|
237
232
|
|
|
238
|
-
|
|
239
|
-
//#region src/commands/commands/add-rank-cf.command.ts
|
|
233
|
+
// src/commands/commands/add-rank-cf.command.ts
|
|
240
234
|
const AddRankCfCommand = {
|
|
241
235
|
type: _univerjs_core.CommandType.COMMAND,
|
|
242
236
|
id: "sheet.command.add-rank-conditional-rule",
|
|
@@ -270,8 +264,7 @@ const AddRankCfCommand = {
|
|
|
270
264
|
}
|
|
271
265
|
};
|
|
272
266
|
|
|
273
|
-
|
|
274
|
-
//#region src/commands/commands/add-text-cf.command.ts
|
|
267
|
+
// src/commands/commands/add-text-cf.command.ts
|
|
275
268
|
const AddTextCfCommand = {
|
|
276
269
|
type: _univerjs_core.CommandType.COMMAND,
|
|
277
270
|
id: "sheet.command.add-text-conditional-rule",
|
|
@@ -304,8 +297,7 @@ const AddTextCfCommand = {
|
|
|
304
297
|
}
|
|
305
298
|
};
|
|
306
299
|
|
|
307
|
-
|
|
308
|
-
//#region src/commands/commands/add-time-period-cf.command.ts
|
|
300
|
+
// src/commands/commands/add-time-period-cf.command.ts
|
|
309
301
|
const AddTimePeriodCfCommand = {
|
|
310
302
|
type: _univerjs_core.CommandType.COMMAND,
|
|
311
303
|
id: "sheet.command.add-time-period-conditional-rule",
|
|
@@ -337,8 +329,7 @@ const AddTimePeriodCfCommand = {
|
|
|
337
329
|
}
|
|
338
330
|
};
|
|
339
331
|
|
|
340
|
-
|
|
341
|
-
//#region src/commands/commands/add-unique-values-cf.command.ts
|
|
332
|
+
// src/commands/commands/add-unique-values-cf.command.ts
|
|
342
333
|
const AddUniqueValuesCfCommand = {
|
|
343
334
|
type: _univerjs_core.CommandType.COMMAND,
|
|
344
335
|
id: "sheet.command.add-uniqueValues-conditional-rule",
|
|
@@ -369,8 +360,7 @@ const AddUniqueValuesCfCommand = {
|
|
|
369
360
|
}
|
|
370
361
|
};
|
|
371
362
|
|
|
372
|
-
|
|
373
|
-
//#region src/const.ts
|
|
363
|
+
// src/const.ts
|
|
374
364
|
/**
|
|
375
365
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
376
366
|
*
|
|
@@ -388,8 +378,7 @@ const AddUniqueValuesCfCommand = {
|
|
|
388
378
|
*/
|
|
389
379
|
const CF_PANEL_KEY = "sheet.conditional.formatting.panel";
|
|
390
380
|
|
|
391
|
-
|
|
392
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
381
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
|
|
393
382
|
function _typeof(o) {
|
|
394
383
|
"@babel/helpers - typeof";
|
|
395
384
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -399,28 +388,25 @@ function _typeof(o) {
|
|
|
399
388
|
}, _typeof(o);
|
|
400
389
|
}
|
|
401
390
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
function toPrimitive(t, r) {
|
|
391
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
|
|
392
|
+
function toPrimitive(t, e) {
|
|
405
393
|
if ("object" != _typeof(t) || !t) return t;
|
|
406
|
-
var
|
|
407
|
-
if (void 0 !==
|
|
408
|
-
var i =
|
|
394
|
+
var r;
|
|
395
|
+
if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
|
|
396
|
+
var i = r.call(t, e || "default");
|
|
409
397
|
if ("object" != _typeof(i)) return i;
|
|
410
398
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
411
399
|
}
|
|
412
|
-
return ("string" ===
|
|
400
|
+
return ("string" === e ? String : Number)(t);
|
|
413
401
|
}
|
|
414
402
|
|
|
415
|
-
|
|
416
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
403
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
|
|
417
404
|
function toPropertyKey(t) {
|
|
418
405
|
var i = toPrimitive(t, "string");
|
|
419
406
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
420
407
|
}
|
|
421
408
|
|
|
422
|
-
|
|
423
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
409
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
|
|
424
410
|
function _defineProperty(e, r, t) {
|
|
425
411
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
426
412
|
value: t,
|
|
@@ -430,16 +416,14 @@ function _defineProperty(e, r, t) {
|
|
|
430
416
|
}) : e[r] = t, e;
|
|
431
417
|
}
|
|
432
418
|
|
|
433
|
-
|
|
434
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
419
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
|
|
435
420
|
function __decorateParam(paramIndex, decorator) {
|
|
436
421
|
return function(target, key) {
|
|
437
422
|
decorator(target, key, paramIndex);
|
|
438
423
|
};
|
|
439
424
|
}
|
|
440
425
|
|
|
441
|
-
|
|
442
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
426
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
|
|
443
427
|
function __decorate(decorators, target, key, desc) {
|
|
444
428
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
445
429
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -447,8 +431,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
447
431
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
448
432
|
}
|
|
449
433
|
|
|
450
|
-
|
|
451
|
-
//#region src/controllers/cf.panel.controller.ts
|
|
434
|
+
// src/controllers/cf.panel.controller.ts
|
|
452
435
|
let ConditionalFormattingPanelController = class ConditionalFormattingPanelController extends _univerjs_core.Disposable {
|
|
453
436
|
constructor(_univerInstanceService, _sidebarService, _localeService) {
|
|
454
437
|
super();
|
|
@@ -488,8 +471,7 @@ ConditionalFormattingPanelController = __decorate([
|
|
|
488
471
|
__decorateParam(2, (0, _univerjs_core.Inject)(_univerjs_core.LocaleService))
|
|
489
472
|
], ConditionalFormattingPanelController);
|
|
490
473
|
|
|
491
|
-
|
|
492
|
-
//#region src/commands/operations/open-conditional-formatting-panel.ts
|
|
474
|
+
// src/commands/operations/open-conditional-formatting-panel.ts
|
|
493
475
|
const OpenConditionalFormattingOperator = {
|
|
494
476
|
id: "sheet.operation.open.conditional.formatting.panel",
|
|
495
477
|
type: _univerjs_core.CommandType.OPERATION,
|
|
@@ -586,8 +568,7 @@ const OpenConditionalFormattingOperator = {
|
|
|
586
568
|
}
|
|
587
569
|
};
|
|
588
570
|
|
|
589
|
-
|
|
590
|
-
//#region src/controllers/cf.clear.controller.ts
|
|
571
|
+
// src/controllers/cf.clear.controller.ts
|
|
591
572
|
let ConditionalFormattingClearController = class ConditionalFormattingClearController extends _univerjs_core.Disposable {
|
|
592
573
|
constructor(_injector, _univerInstanceService, _sheetInterceptorService, _selectionManagerService, _conditionalFormattingRangeIndexModel) {
|
|
593
574
|
super();
|
|
@@ -688,8 +669,7 @@ function generateClearCfMutations(injector, allRules, ranges, unitId, subUnitId)
|
|
|
688
669
|
};
|
|
689
670
|
}
|
|
690
671
|
|
|
691
|
-
|
|
692
|
-
//#region src/menu/manage-rule.ts
|
|
672
|
+
// src/menu/manage-rule.ts
|
|
693
673
|
const commandList = [
|
|
694
674
|
_univerjs_sheets.SetWorksheetActiveOperation.id,
|
|
695
675
|
_univerjs_sheets_conditional_formatting.AddConditionalRuleMutation.id,
|
|
@@ -854,8 +834,7 @@ function FactoryManageConditionalFormattingRule(accessor) {
|
|
|
854
834
|
};
|
|
855
835
|
}
|
|
856
836
|
|
|
857
|
-
|
|
858
|
-
//#region src/menu/quick-insert.menu.ts
|
|
837
|
+
// src/menu/quick-insert.menu.ts
|
|
859
838
|
const DATA_BAR_PARAMS = {
|
|
860
839
|
min: { type: _univerjs_sheets_conditional_formatting.CFValueType.min },
|
|
861
840
|
max: { type: _univerjs_sheets_conditional_formatting.CFValueType.max },
|
|
@@ -980,8 +959,7 @@ function quickIconSetMenuFactory(accessor) {
|
|
|
980
959
|
};
|
|
981
960
|
}
|
|
982
961
|
|
|
983
|
-
|
|
984
|
-
//#region src/menu/schema.ts
|
|
962
|
+
// src/menu/schema.ts
|
|
985
963
|
const conditionalFormattingRuleMenuSchema = { [_univerjs_ui.RibbonDataGroup.RULES]: { [OpenConditionalFormattingOperator.id]: {
|
|
986
964
|
order: 1,
|
|
987
965
|
gridLayout: {
|
|
@@ -1004,19 +982,16 @@ const menuSchema = {
|
|
|
1004
982
|
...conditionalFormattingRuleMenuSchema
|
|
1005
983
|
};
|
|
1006
984
|
|
|
1007
|
-
|
|
1008
|
-
//#region package.json
|
|
985
|
+
// package.json
|
|
1009
986
|
var name = "@univerjs/sheets-conditional-formatting-ui";
|
|
1010
|
-
var version = "1.
|
|
987
|
+
var version = "1.5.0";
|
|
1011
988
|
|
|
1012
|
-
|
|
1013
|
-
//#region src/config/config.ts
|
|
989
|
+
// src/config/config.ts
|
|
1014
990
|
const SHEETS_CONDITIONAL_FORMATTING_UI_PLUGIN_CONFIG_KEY = "sheets-conditional-formatting-ui.config";
|
|
1015
991
|
const configSymbol = Symbol(SHEETS_CONDITIONAL_FORMATTING_UI_PLUGIN_CONFIG_KEY);
|
|
1016
992
|
const defaultPluginConfig = {};
|
|
1017
993
|
|
|
1018
|
-
|
|
1019
|
-
//#region src/controllers/cf-formula-ref-range.controller.ts
|
|
994
|
+
// src/controllers/cf-formula-ref-range.controller.ts
|
|
1020
995
|
let ConditionalFormattingFormulaRefRangeController = class ConditionalFormattingFormulaRefRangeController extends _univerjs_core.Disposable {
|
|
1021
996
|
constructor(_conditionalFormattingRuleModel, _formulaRefRangeService, _injector) {
|
|
1022
997
|
super();
|
|
@@ -1192,8 +1167,7 @@ ConditionalFormattingFormulaRefRangeController = __decorate([
|
|
|
1192
1167
|
__decorateParam(2, (0, _univerjs_core.Inject)(_univerjs_core.Injector))
|
|
1193
1168
|
], ConditionalFormattingFormulaRefRangeController);
|
|
1194
1169
|
|
|
1195
|
-
|
|
1196
|
-
//#region src/controllers/cf.copy-paste.controller.ts
|
|
1170
|
+
// src/controllers/cf.copy-paste.controller.ts
|
|
1197
1171
|
const specialPastes = [
|
|
1198
1172
|
_univerjs_sheets_ui.PREDEFINED_HOOK_NAME_PASTE.SPECIAL_PASTE_FORMAT,
|
|
1199
1173
|
_univerjs_sheets_ui.PREDEFINED_HOOK_NAME_PASTE.DEFAULT_PASTE,
|
|
@@ -1419,8 +1393,7 @@ ConditionalFormattingCopyPasteController = __decorate([
|
|
|
1419
1393
|
__decorateParam(4, (0, _univerjs_core.Inject)(_univerjs_sheets_conditional_formatting.ConditionalFormattingRangeTransformService))
|
|
1420
1394
|
], ConditionalFormattingCopyPasteController);
|
|
1421
1395
|
|
|
1422
|
-
|
|
1423
|
-
//#region src/controllers/cf.i18n.controller.ts
|
|
1396
|
+
// src/controllers/cf.i18n.controller.ts
|
|
1424
1397
|
let ConditionalFormattingI18nController = class ConditionalFormattingI18nController extends _univerjs_core.Disposable {
|
|
1425
1398
|
constructor(_localeService) {
|
|
1426
1399
|
super();
|
|
@@ -1470,8 +1443,7 @@ let ConditionalFormattingI18nController = class ConditionalFormattingI18nControl
|
|
|
1470
1443
|
};
|
|
1471
1444
|
ConditionalFormattingI18nController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_core.LocaleService))], ConditionalFormattingI18nController);
|
|
1472
1445
|
|
|
1473
|
-
|
|
1474
|
-
//#region src/controllers/cf.permission.controller.ts
|
|
1446
|
+
// src/controllers/cf.permission.controller.ts
|
|
1475
1447
|
let ConditionalFormattingPermissionController = class ConditionalFormattingPermissionController extends _univerjs_core.Disposable {
|
|
1476
1448
|
constructor(_localeService, _commandService, _sheetPermissionCheckController) {
|
|
1477
1449
|
super();
|
|
@@ -1499,8 +1471,7 @@ ConditionalFormattingPermissionController = __decorate([
|
|
|
1499
1471
|
__decorateParam(2, (0, _univerjs_core.Inject)(_univerjs_sheets.SheetPermissionCheckController))
|
|
1500
1472
|
], ConditionalFormattingPermissionController);
|
|
1501
1473
|
|
|
1502
|
-
|
|
1503
|
-
//#region src/controllers/cf.render.controller.ts
|
|
1474
|
+
// src/controllers/cf.render.controller.ts
|
|
1504
1475
|
let SheetsCfRenderController = class SheetsCfRenderController extends _univerjs_core.Disposable {
|
|
1505
1476
|
constructor(_sheetInterceptorService, _conditionalFormattingService, _univerInstanceService, _renderManagerService, _conditionalFormattingViewModel, _conditionalFormattingRuleModel, _conditionalFormattingRangeIndexModel) {
|
|
1506
1477
|
super();
|
|
@@ -1671,8 +1642,7 @@ SheetsCfRenderController = __decorate([
|
|
|
1671
1642
|
__decorateParam(6, (0, _univerjs_core.Inject)(_univerjs_sheets_conditional_formatting.ConditionalFormattingRangeIndexModel))
|
|
1672
1643
|
], SheetsCfRenderController);
|
|
1673
1644
|
|
|
1674
|
-
|
|
1675
|
-
//#region src/views/ColorPicker.tsx
|
|
1645
|
+
// src/views/ColorPicker.tsx
|
|
1676
1646
|
const ColorPicker = (props) => {
|
|
1677
1647
|
const { color, onChange, disable = false, Icon = _univerjs_icons.PaintBucketDoubleIcon, className, DropdownComponent = _univerjs_design.Dropdown, PickerComponent = _univerjs_design.ColorPicker } = props;
|
|
1678
1648
|
const colorKit = (0, react.useMemo)(() => new _univerjs_core.ColorKit(color), [color]);
|
|
@@ -1698,8 +1668,7 @@ const ColorPicker = (props) => {
|
|
|
1698
1668
|
}) : renderIcon();
|
|
1699
1669
|
};
|
|
1700
1670
|
|
|
1701
|
-
|
|
1702
|
-
//#region src/views/ConditionalFormattingRulePreview.tsx
|
|
1671
|
+
// src/views/ConditionalFormattingRulePreview.tsx
|
|
1703
1672
|
/** Shows a rule's configured appearance without evaluating worksheet values. */
|
|
1704
1673
|
function ConditionalFormattingRulePreview(props) {
|
|
1705
1674
|
const { rule } = props;
|
|
@@ -1787,8 +1756,7 @@ function ConditionalFormattingRulePreview(props) {
|
|
|
1787
1756
|
}
|
|
1788
1757
|
}
|
|
1789
1758
|
|
|
1790
|
-
|
|
1791
|
-
//#region src/views/panel/rule-edit/RuleNumberInput.tsx
|
|
1759
|
+
// src/views/panel/rule-edit/RuleNumberInput.tsx
|
|
1792
1760
|
/**
|
|
1793
1761
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1794
1762
|
*
|
|
@@ -1837,8 +1805,7 @@ function RuleNumberInput({ value, onChange, min = Number.MIN_SAFE_INTEGER, max =
|
|
|
1837
1805
|
});
|
|
1838
1806
|
}
|
|
1839
1807
|
|
|
1840
|
-
|
|
1841
|
-
//#region src/views/panel/rule-edit/styles.ts
|
|
1808
|
+
// src/views/panel/rule-edit/styles.ts
|
|
1842
1809
|
/**
|
|
1843
1810
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1844
1811
|
*
|
|
@@ -1856,8 +1823,7 @@ function RuleNumberInput({ value, onChange, min = Number.MIN_SAFE_INTEGER, max =
|
|
|
1856
1823
|
*/
|
|
1857
1824
|
const previewClassName = (0, _univerjs_design.clsx)("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", _univerjs_design.borderClassName);
|
|
1858
1825
|
|
|
1859
|
-
|
|
1860
|
-
//#region src/views/panel/rule-edit/ColorScale.tsx
|
|
1826
|
+
// src/views/panel/rule-edit/ColorScale.tsx
|
|
1861
1827
|
const createOptionItem$2 = (text) => ({
|
|
1862
1828
|
label: `sheets-conditional-formatting-ui.valueType.${text}`,
|
|
1863
1829
|
value: text
|
|
@@ -2284,8 +2250,7 @@ const ColorScaleStyleEditor = (props) => {
|
|
|
2284
2250
|
] });
|
|
2285
2251
|
};
|
|
2286
2252
|
|
|
2287
|
-
|
|
2288
|
-
//#region src/views/panel/rule-edit/DataBar.tsx
|
|
2253
|
+
// src/views/panel/rule-edit/DataBar.tsx
|
|
2289
2254
|
const createOptionItem$1 = (text) => ({
|
|
2290
2255
|
label: `sheets-conditional-formatting-ui.valueType.${text}`,
|
|
2291
2256
|
value: text
|
|
@@ -2677,8 +2642,7 @@ const DataBarStyleEditor = (props) => {
|
|
|
2677
2642
|
] });
|
|
2678
2643
|
};
|
|
2679
2644
|
|
|
2680
|
-
|
|
2681
|
-
//#region src/views/ConditionalStyleEditor.tsx
|
|
2645
|
+
// src/views/ConditionalStyleEditor.tsx
|
|
2682
2646
|
const getAnotherBooleanNumber = (v) => {
|
|
2683
2647
|
return [_univerjs_core.BooleanNumber.FALSE, void 0].includes(v) ? _univerjs_core.BooleanNumber.TRUE : _univerjs_core.BooleanNumber.FALSE;
|
|
2684
2648
|
};
|
|
@@ -2768,8 +2732,7 @@ const ConditionalStyleEditor = (props) => {
|
|
|
2768
2732
|
});
|
|
2769
2733
|
};
|
|
2770
2734
|
|
|
2771
|
-
|
|
2772
|
-
//#region src/views/panel/rule-edit/Formula.tsx
|
|
2735
|
+
// src/views/panel/rule-edit/Formula.tsx
|
|
2773
2736
|
const FormulaStyleEditor = (props) => {
|
|
2774
2737
|
var _props$rule;
|
|
2775
2738
|
const { onChange, interceptorManager, ColorPickerComponent, FormulaEditorComponent = _univerjs_sheets_formula_ui.FormulaEditor } = props;
|
|
@@ -2886,8 +2849,7 @@ const FormulaStyleEditor = (props) => {
|
|
|
2886
2849
|
});
|
|
2887
2850
|
};
|
|
2888
2851
|
|
|
2889
|
-
|
|
2890
|
-
//#region src/views/wrapper-error/WrapperError.tsx
|
|
2852
|
+
// src/views/wrapper-error/WrapperError.tsx
|
|
2891
2853
|
const WrapperError = (props) => {
|
|
2892
2854
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [props.children, props.errorText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2893
2855
|
className: "univer-mt-1 univer-text-xs univer-text-red-500",
|
|
@@ -2895,8 +2857,7 @@ const WrapperError = (props) => {
|
|
|
2895
2857
|
})] });
|
|
2896
2858
|
};
|
|
2897
2859
|
|
|
2898
|
-
|
|
2899
|
-
//#region src/views/panel/rule-edit/HighlightCell.tsx
|
|
2860
|
+
// src/views/panel/rule-edit/HighlightCell.tsx
|
|
2900
2861
|
const textOperators = new Set(Object.values(_univerjs_sheets_conditional_formatting.CFTextOperator));
|
|
2901
2862
|
const numberOperators = new Set(Object.values(_univerjs_sheets_conditional_formatting.CFNumberOperator));
|
|
2902
2863
|
const timePeriodOperators = new Set(Object.values(_univerjs_sheets_conditional_formatting.CFTimePeriodOperator));
|
|
@@ -3255,7 +3216,7 @@ const HighlightCellStyleEditor = (props) => {
|
|
|
3255
3216
|
onChange: onTypeChange,
|
|
3256
3217
|
value: subType,
|
|
3257
3218
|
options: typeOptions
|
|
3258
|
-
}), (operatorOptions === null || operatorOptions === void 0 ? void 0 : operatorOptions.length) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectComponent, {
|
|
3219
|
+
}), !!(operatorOptions === null || operatorOptions === void 0 ? void 0 : operatorOptions.length) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectComponent, {
|
|
3259
3220
|
className: "univer-mt-3 univer-w-full",
|
|
3260
3221
|
onChange: onOperatorChange,
|
|
3261
3222
|
value: operator || "",
|
|
@@ -3286,8 +3247,7 @@ const HighlightCellStyleEditor = (props) => {
|
|
|
3286
3247
|
] });
|
|
3287
3248
|
};
|
|
3288
3249
|
|
|
3289
|
-
|
|
3290
|
-
//#region src/views/panel/rule-edit/IconSet.tsx
|
|
3250
|
+
// src/views/panel/rule-edit/IconSet.tsx
|
|
3291
3251
|
const getIcon = (iconType, iconId) => {
|
|
3292
3252
|
return (_univerjs_sheets_conditional_formatting.iconMap[iconType] || [])[Number(iconId)] || "";
|
|
3293
3253
|
};
|
|
@@ -3329,15 +3289,6 @@ const TextInput = (props) => {
|
|
|
3329
3289
|
})
|
|
3330
3290
|
});
|
|
3331
3291
|
};
|
|
3332
|
-
const createDefaultConfigItem = (iconType, index, list) => ({
|
|
3333
|
-
operator: _univerjs_sheets_conditional_formatting.CFNumberOperator.greaterThan,
|
|
3334
|
-
value: {
|
|
3335
|
-
type: _univerjs_sheets_conditional_formatting.CFValueType.num,
|
|
3336
|
-
value: (list.length - 1 - index) * 10
|
|
3337
|
-
},
|
|
3338
|
-
iconType,
|
|
3339
|
-
iconId: String(index)
|
|
3340
|
-
});
|
|
3341
3292
|
const IconGroupList = (props) => {
|
|
3342
3293
|
const { iconType, onClick } = props;
|
|
3343
3294
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
@@ -3524,14 +3475,10 @@ const IconSetRuleEdit = (props) => {
|
|
|
3524
3475
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownComponent, {
|
|
3525
3476
|
overlay: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3526
3477
|
className: "univer-rounded-lg univer-p-4",
|
|
3527
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconItemList, {
|
|
3528
|
-
onClick: handleIconClick,
|
|
3529
|
-
iconId: item.iconId,
|
|
3530
|
-
iconType: item.iconType
|
|
3531
|
-
})
|
|
3478
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconItemList, { onClick: handleIconClick })
|
|
3532
3479
|
}),
|
|
3533
3480
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3534
|
-
className: (0, _univerjs_design.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-
|
|
3481
|
+
className: (0, _univerjs_design.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", _univerjs_design.borderClassName),
|
|
3535
3482
|
children: [icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
3536
3483
|
src: icon,
|
|
3537
3484
|
className: "univer-size-4",
|
|
@@ -3546,7 +3493,7 @@ const IconSetRuleEdit = (props) => {
|
|
|
3546
3493
|
handleOperatorChange(v, index);
|
|
3547
3494
|
}
|
|
3548
3495
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3549
|
-
className: "univer-
|
|
3496
|
+
className: "univer-self-center univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
3550
3497
|
children: [localeService.t("sheets-conditional-formatting-ui.iconSet.rule"), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3551
3498
|
className: "univer-font-medium",
|
|
3552
3499
|
children: [
|
|
@@ -3599,6 +3546,15 @@ const IconSet = (props) => {
|
|
|
3599
3546
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
3600
3547
|
const direction = (0, _univerjs_ui.useObservable)(localeService.direction$, localeService.getDirection());
|
|
3601
3548
|
const [errorMap, setErrorMap] = (0, react.useState)({});
|
|
3549
|
+
const createDefaultConfigItem = (iconType, index, list) => ({
|
|
3550
|
+
operator: _univerjs_sheets_conditional_formatting.CFNumberOperator.greaterThan,
|
|
3551
|
+
value: {
|
|
3552
|
+
type: _univerjs_sheets_conditional_formatting.CFValueType.num,
|
|
3553
|
+
value: (list.length - 1 - index) * 10
|
|
3554
|
+
},
|
|
3555
|
+
iconType,
|
|
3556
|
+
iconId: String(index)
|
|
3557
|
+
});
|
|
3602
3558
|
const [currentIconType, setCurrentIconType] = (0, react.useState)(() => {
|
|
3603
3559
|
const defaultV = Object.keys(_univerjs_sheets_conditional_formatting.iconMap)[0];
|
|
3604
3560
|
if (rule && rule.config.length) {
|
|
@@ -3737,7 +3693,7 @@ const IconSet = (props) => {
|
|
|
3737
3693
|
dir: direction,
|
|
3738
3694
|
children: [
|
|
3739
3695
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3740
|
-
className: "univer-mt-4 univer-text-sm univer-text-gray-600",
|
|
3696
|
+
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
3741
3697
|
children: localeService.t("sheets-conditional-formatting-ui.panel.styleRule")
|
|
3742
3698
|
}),
|
|
3743
3699
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -3752,7 +3708,7 @@ const IconSet = (props) => {
|
|
|
3752
3708
|
})
|
|
3753
3709
|
}),
|
|
3754
3710
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3755
|
-
className: (0, _univerjs_design.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", _univerjs_design.borderClassName),
|
|
3711
|
+
className: (0, _univerjs_design.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", _univerjs_design.borderClassName),
|
|
3756
3712
|
children: [previewIcon, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.MoreDownIcon, {})]
|
|
3757
3713
|
})
|
|
3758
3714
|
})
|
|
@@ -3786,8 +3742,7 @@ const IconSet = (props) => {
|
|
|
3786
3742
|
});
|
|
3787
3743
|
};
|
|
3788
3744
|
|
|
3789
|
-
|
|
3790
|
-
//#region src/views/panel/rule-edit/Rank.tsx
|
|
3745
|
+
// src/views/panel/rule-edit/Rank.tsx
|
|
3791
3746
|
const RankStyleEditor = (props) => {
|
|
3792
3747
|
var _props$rule;
|
|
3793
3748
|
const { onChange, interceptorManager, SelectComponent = _univerjs_design.Select, ColorPickerComponent } = props;
|
|
@@ -3983,13 +3938,11 @@ const RankStyleEditor = (props) => {
|
|
|
3983
3938
|
] });
|
|
3984
3939
|
};
|
|
3985
3940
|
|
|
3986
|
-
|
|
3987
|
-
//#region src/views/panel/rule-edit/type.ts
|
|
3941
|
+
// src/views/panel/rule-edit/type.ts
|
|
3988
3942
|
const beforeSubmit = (0, _univerjs_core.createInterceptorKey)("beforeSubmit");
|
|
3989
3943
|
const submit = (0, _univerjs_core.createInterceptorKey)("submit");
|
|
3990
3944
|
|
|
3991
|
-
|
|
3992
|
-
//#region src/views/panel/RuleEdit.tsx
|
|
3945
|
+
// src/views/panel/RuleEdit.tsx
|
|
3993
3946
|
const getUnitId = (univerInstanceService) => univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET).getUnitId();
|
|
3994
3947
|
const getSubUnitId = (univerInstanceService) => {
|
|
3995
3948
|
var _getActiveSheet;
|
|
@@ -4232,8 +4185,7 @@ const RuleEdit = (props) => {
|
|
|
4232
4185
|
] });
|
|
4233
4186
|
};
|
|
4234
4187
|
|
|
4235
|
-
|
|
4236
|
-
//#region src/utils/get-rule-describe.ts
|
|
4188
|
+
// src/utils/get-rule-describe.ts
|
|
4237
4189
|
/** Returns the localized description used by the built-in conditional formatting rule list. */
|
|
4238
4190
|
function getRuleDescribe(rule, localeService) {
|
|
4239
4191
|
const ruleConfig = rule.rule;
|
|
@@ -4269,8 +4221,7 @@ function getRuleDescribe(rule, localeService) {
|
|
|
4269
4221
|
}
|
|
4270
4222
|
}
|
|
4271
4223
|
|
|
4272
|
-
|
|
4273
|
-
//#region src/views/panel/RuleList.tsx
|
|
4224
|
+
// src/views/panel/RuleList.tsx
|
|
4274
4225
|
function RuleList(props) {
|
|
4275
4226
|
const { SelectComponent = _univerjs_design.Select } = props;
|
|
4276
4227
|
const { onClick } = props;
|
|
@@ -4498,8 +4449,7 @@ function RuleList(props) {
|
|
|
4498
4449
|
}) })] });
|
|
4499
4450
|
}
|
|
4500
4451
|
|
|
4501
|
-
|
|
4502
|
-
//#region src/views/ConditionFormattingPanel.tsx
|
|
4452
|
+
// src/views/ConditionFormattingPanel.tsx
|
|
4503
4453
|
const ConditionFormattingPanel = (props) => {
|
|
4504
4454
|
const { RuleEditComponent = RuleEdit, RuleListComponent = RuleList } = props;
|
|
4505
4455
|
const [currentEditRule, setCurrentEditRule] = (0, react.useState)(props.rule);
|
|
@@ -4518,7 +4468,7 @@ const ConditionFormattingPanel = (props) => {
|
|
|
4518
4468
|
setIsShowRuleEditor(true);
|
|
4519
4469
|
};
|
|
4520
4470
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4521
|
-
className: "univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4",
|
|
4471
|
+
className: "univer-box-border univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4",
|
|
4522
4472
|
children: isShowRuleEditor ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuleEditComponent, {
|
|
4523
4473
|
onCancel: handleCancel,
|
|
4524
4474
|
rule: currentEditRule
|
|
@@ -4529,8 +4479,7 @@ const ConditionFormattingPanel = (props) => {
|
|
|
4529
4479
|
});
|
|
4530
4480
|
};
|
|
4531
4481
|
|
|
4532
|
-
|
|
4533
|
-
//#region src/views/mobile/MobileColorPicker.tsx
|
|
4482
|
+
// src/views/mobile/MobileColorPicker.tsx
|
|
4534
4483
|
function MobileConditionalColorPicker(props) {
|
|
4535
4484
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ColorPicker, {
|
|
4536
4485
|
...props,
|
|
@@ -4539,8 +4488,7 @@ function MobileConditionalColorPicker(props) {
|
|
|
4539
4488
|
});
|
|
4540
4489
|
}
|
|
4541
4490
|
|
|
4542
|
-
|
|
4543
|
-
//#region src/views/mobile/MobileRuleEdit.tsx
|
|
4491
|
+
// src/views/mobile/MobileRuleEdit.tsx
|
|
4544
4492
|
function MobileRuleEdit(props) {
|
|
4545
4493
|
const FormulaEditorComponent = (0, _univerjs_ui.useDependency)(_univerjs_ui.ComponentManager).get(_univerjs_sheets_ui.EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY);
|
|
4546
4494
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuleEdit, {
|
|
@@ -4553,8 +4501,7 @@ function MobileRuleEdit(props) {
|
|
|
4553
4501
|
});
|
|
4554
4502
|
}
|
|
4555
4503
|
|
|
4556
|
-
|
|
4557
|
-
//#region src/views/mobile/MobileRuleList.tsx
|
|
4504
|
+
// src/views/mobile/MobileRuleList.tsx
|
|
4558
4505
|
function MobileRuleList(props) {
|
|
4559
4506
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuleList, {
|
|
4560
4507
|
...props,
|
|
@@ -4562,8 +4509,7 @@ function MobileRuleList(props) {
|
|
|
4562
4509
|
});
|
|
4563
4510
|
}
|
|
4564
4511
|
|
|
4565
|
-
|
|
4566
|
-
//#region src/views/mobile/MobileConditionFormattingPanel.tsx
|
|
4512
|
+
// src/views/mobile/MobileConditionFormattingPanel.tsx
|
|
4567
4513
|
function MobileConditionFormattingPanel(props) {
|
|
4568
4514
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConditionFormattingPanel, {
|
|
4569
4515
|
...props,
|
|
@@ -4572,8 +4518,7 @@ function MobileConditionFormattingPanel(props) {
|
|
|
4572
4518
|
});
|
|
4573
4519
|
}
|
|
4574
4520
|
|
|
4575
|
-
|
|
4576
|
-
//#region src/controllers/mobile/components.controller.ts
|
|
4521
|
+
// src/controllers/mobile/components.controller.ts
|
|
4577
4522
|
/**
|
|
4578
4523
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4579
4524
|
*
|
|
@@ -4602,15 +4547,13 @@ let MobileComponentsController = class MobileComponentsController extends _unive
|
|
|
4602
4547
|
};
|
|
4603
4548
|
MobileComponentsController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_ui.ComponentManager)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_ui.IconManager))], MobileComponentsController);
|
|
4604
4549
|
|
|
4605
|
-
|
|
4606
|
-
//#region src/menu/mobile-schema.ts
|
|
4550
|
+
// src/menu/mobile-schema.ts
|
|
4607
4551
|
const mobileMenuSchema = { [_univerjs_ui.RibbonDataGroup.RULES]: { [OpenConditionalFormattingOperator.id]: {
|
|
4608
4552
|
order: 1,
|
|
4609
4553
|
menuItemFactory: FactoryManageConditionalFormattingRule
|
|
4610
4554
|
} } };
|
|
4611
4555
|
|
|
4612
|
-
|
|
4613
|
-
//#region src/menu/mobile-cf.menu.controller.ts
|
|
4556
|
+
// src/menu/mobile-cf.menu.controller.ts
|
|
4614
4557
|
/**
|
|
4615
4558
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4616
4559
|
*
|
|
@@ -4634,8 +4577,7 @@ let ConditionalFormattingMobileMenuController = class ConditionalFormattingMobil
|
|
|
4634
4577
|
};
|
|
4635
4578
|
ConditionalFormattingMobileMenuController = __decorate([__decorateParam(0, _univerjs_ui.IMenuManagerService)], ConditionalFormattingMobileMenuController);
|
|
4636
4579
|
|
|
4637
|
-
|
|
4638
|
-
//#region src/mobile-plugin.ts
|
|
4580
|
+
// src/mobile-plugin.ts
|
|
4639
4581
|
let UniverSheetsConditionalFormattingMobileUIPlugin = class UniverSheetsConditionalFormattingMobileUIPlugin extends _univerjs_core.Plugin {
|
|
4640
4582
|
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
|
4641
4583
|
super();
|
|
@@ -4704,8 +4646,7 @@ UniverSheetsConditionalFormattingMobileUIPlugin = __decorate([
|
|
|
4704
4646
|
__decorateParam(3, _univerjs_core.IConfigService)
|
|
4705
4647
|
], UniverSheetsConditionalFormattingMobileUIPlugin);
|
|
4706
4648
|
|
|
4707
|
-
|
|
4708
|
-
//#region src/controllers/cf.auto-fill.controller.ts
|
|
4649
|
+
// src/controllers/cf.auto-fill.controller.ts
|
|
4709
4650
|
let ConditionalFormattingAutoFillController = class ConditionalFormattingAutoFillController extends _univerjs_core.Disposable {
|
|
4710
4651
|
constructor(_injector, _univerInstanceService, _autoFillService, _conditionalFormattingRuleModel, _conditionalFormattingRangeTransformService) {
|
|
4711
4652
|
super();
|
|
@@ -4835,8 +4776,7 @@ ConditionalFormattingAutoFillController = __decorate([
|
|
|
4835
4776
|
__decorateParam(4, (0, _univerjs_core.Inject)(_univerjs_sheets_conditional_formatting.ConditionalFormattingRangeTransformService))
|
|
4836
4777
|
], ConditionalFormattingAutoFillController);
|
|
4837
4778
|
|
|
4838
|
-
|
|
4839
|
-
//#region src/controllers/cf.editor.controller.ts
|
|
4779
|
+
// src/controllers/cf.editor.controller.ts
|
|
4840
4780
|
/**
|
|
4841
4781
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4842
4782
|
*
|
|
@@ -4894,8 +4834,7 @@ let ConditionalFormattingEditorController = class ConditionalFormattingEditorCon
|
|
|
4894
4834
|
};
|
|
4895
4835
|
ConditionalFormattingEditorController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_sheets.SheetInterceptorService)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_sheets_conditional_formatting.ConditionalFormattingService))], ConditionalFormattingEditorController);
|
|
4896
4836
|
|
|
4897
|
-
|
|
4898
|
-
//#region src/controllers/cf.painter.controller.ts
|
|
4837
|
+
// src/controllers/cf.painter.controller.ts
|
|
4899
4838
|
const repeatByRange = (sourceRange, targetRange) => {
|
|
4900
4839
|
const getRowLength = (range) => range.endRow - range.startRow + 1;
|
|
4901
4840
|
const getColLength = (range) => range.endColumn - range.startColumn + 1;
|
|
@@ -5151,8 +5090,7 @@ ConditionalFormattingPainterController = __decorate([
|
|
|
5151
5090
|
__decorateParam(5, (0, _univerjs_core.Inject)(_univerjs_sheets_conditional_formatting.ConditionalFormattingRangeTransformService))
|
|
5152
5091
|
], ConditionalFormattingPainterController);
|
|
5153
5092
|
|
|
5154
|
-
|
|
5155
|
-
//#region src/controllers/cf.viewport.controller.ts
|
|
5093
|
+
// src/controllers/cf.viewport.controller.ts
|
|
5156
5094
|
let ConditionalFormattingViewportController = class ConditionalFormattingViewportController extends _univerjs_core.Disposable {
|
|
5157
5095
|
constructor(_conditionalFormattingViewModel, _univerInstanceService, _renderManagerService) {
|
|
5158
5096
|
super();
|
|
@@ -5201,8 +5139,7 @@ ConditionalFormattingViewportController = __decorate([
|
|
|
5201
5139
|
__decorateParam(2, _univerjs_engine_render.IRenderManagerService)
|
|
5202
5140
|
], ConditionalFormattingViewportController);
|
|
5203
5141
|
|
|
5204
|
-
|
|
5205
|
-
//#region src/controllers/components.controller.ts
|
|
5142
|
+
// src/controllers/components.controller.ts
|
|
5206
5143
|
/**
|
|
5207
5144
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5208
5145
|
*
|
|
@@ -5239,8 +5176,7 @@ let ComponentsController = class ComponentsController extends _univerjs_core.Dis
|
|
|
5239
5176
|
};
|
|
5240
5177
|
ComponentsController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_ui.ComponentManager)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_ui.IconManager))], ComponentsController);
|
|
5241
5178
|
|
|
5242
|
-
|
|
5243
|
-
//#region src/menu/cf.menu.controller.ts
|
|
5179
|
+
// src/menu/cf.menu.controller.ts
|
|
5244
5180
|
/**
|
|
5245
5181
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
5246
5182
|
*
|
|
@@ -5265,8 +5201,7 @@ let ConditionalFormattingMenuController = class ConditionalFormattingMenuControl
|
|
|
5265
5201
|
};
|
|
5266
5202
|
ConditionalFormattingMenuController = __decorate([__decorateParam(0, _univerjs_ui.IMenuManagerService)], ConditionalFormattingMenuController);
|
|
5267
5203
|
|
|
5268
|
-
|
|
5269
|
-
//#region src/plugin.ts
|
|
5204
|
+
// src/plugin.ts
|
|
5270
5205
|
let UniverSheetsConditionalFormattingUIPlugin = class UniverSheetsConditionalFormattingUIPlugin extends _univerjs_core.Plugin {
|
|
5271
5206
|
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
|
5272
5207
|
super();
|
|
@@ -5342,7 +5277,6 @@ UniverSheetsConditionalFormattingUIPlugin = __decorate([
|
|
|
5342
5277
|
__decorateParam(3, _univerjs_core.IConfigService)
|
|
5343
5278
|
], UniverSheetsConditionalFormattingUIPlugin);
|
|
5344
5279
|
|
|
5345
|
-
//#endregion
|
|
5346
5280
|
exports.AddAverageCfCommand = AddAverageCfCommand;
|
|
5347
5281
|
exports.AddColorScaleConditionalRuleCommand = AddColorScaleConditionalRuleCommand;
|
|
5348
5282
|
exports.AddDataBarConditionalRuleCommand = AddDataBarConditionalRuleCommand;
|