@univerjs/sheets-conditional-formatting 0.1.5
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/LICENSE +176 -0
- package/README.md +30 -0
- package/lib/cjs/index.js +11 -0
- package/lib/es/index.js +9334 -0
- package/lib/index.css +1 -0
- package/lib/types/assets/icon-map.json.d.ts +82 -0
- package/lib/types/base/const.d.ts +66 -0
- package/lib/types/commands/commands/add-average-cf.command.d.ts +11 -0
- package/lib/types/commands/commands/add-cf.command.d.ts +10 -0
- package/lib/types/commands/commands/add-color-scale-cf.command.d.ts +10 -0
- package/lib/types/commands/commands/add-data-bar-cf.command.d.ts +14 -0
- package/lib/types/commands/commands/add-duplicate-values-cf.command.d.ts +10 -0
- package/lib/types/commands/commands/add-number-cf.command.d.ts +12 -0
- package/lib/types/commands/commands/add-rank-cf.command.d.ts +13 -0
- package/lib/types/commands/commands/add-text-cf.command.d.ts +12 -0
- package/lib/types/commands/commands/add-time-period-cf.command.d.ts +11 -0
- package/lib/types/commands/commands/add-unique-values-cf.command.d.ts +10 -0
- package/lib/types/commands/commands/clear-range-cf.command.d.ts +8 -0
- package/lib/types/commands/commands/clear-worksheet-cf.command.d.ts +7 -0
- package/lib/types/commands/commands/delete-cf.command.d.ts +8 -0
- package/lib/types/commands/commands/move-cf.command.d.ts +9 -0
- package/lib/types/commands/commands/set-cf.command.d.ts +9 -0
- package/lib/types/commands/mutations/add-conditional-rule.mutation.d.ts +15 -0
- package/lib/types/commands/mutations/delete-conditional-rule.mutation.d.ts +10 -0
- package/lib/types/commands/mutations/formula-mark-dirty.mutation.d.ts +10 -0
- package/lib/types/commands/mutations/move-conditional-rule.mutation.d.ts +14 -0
- package/lib/types/commands/mutations/set-conditional-rule.mutation.d.ts +14 -0
- package/lib/types/commands/operations/open-conditional-formatting-panel.d.ts +15 -0
- package/lib/types/components/color-picker/index.d.ts +12 -0
- package/lib/types/components/conditional-style-editor/index.d.ts +10 -0
- package/lib/types/components/panel/index.d.ts +8 -0
- package/lib/types/components/panel/rule-edit/colorScale.d.ts +4 -0
- package/lib/types/components/panel/rule-edit/dataBar.d.ts +4 -0
- package/lib/types/components/panel/rule-edit/formula.d.ts +4 -0
- package/lib/types/components/panel/rule-edit/highlightCell.d.ts +5 -0
- package/lib/types/components/panel/rule-edit/iconSet.d.ts +5 -0
- package/lib/types/components/panel/rule-edit/index.d.ts +9 -0
- package/lib/types/components/panel/rule-edit/rank.d.ts +4 -0
- package/lib/types/components/panel/rule-edit/type.d.ts +13 -0
- package/lib/types/components/panel/rule-list/index.d.ts +9 -0
- package/lib/types/components/preview/index.d.ts +6 -0
- package/lib/types/controllers/cf.auto-fill.controller.d.ts +15 -0
- package/lib/types/controllers/cf.clear.controller.d.ts +14 -0
- package/lib/types/controllers/cf.copy-paste.controller.d.ts +18 -0
- package/lib/types/controllers/cf.editor.controller.d.ts +15 -0
- package/lib/types/controllers/cf.i18n.controller.d.ts +10 -0
- package/lib/types/controllers/cf.menu.controller.d.ts +16 -0
- package/lib/types/controllers/cf.ref-range.controller.d.ts +15 -0
- package/lib/types/controllers/cf.render.controller.d.ts +21 -0
- package/lib/types/index.d.ts +17 -0
- package/lib/types/locale/en-US.d.ts +4 -0
- package/lib/types/locale/index.d.ts +17 -0
- package/lib/types/locale/zh-CN.d.ts +169 -0
- package/lib/types/menu/manage-rule.d.ts +4 -0
- package/lib/types/models/conditional-formatting-rule-model.d.ts +32 -0
- package/lib/types/models/conditional-formatting-view-model.d.ts +29 -0
- package/lib/types/models/icon-map.d.ts +26 -0
- package/lib/types/models/type.d.ts +91 -0
- package/lib/types/plugin.d.ts +13 -0
- package/lib/types/render/data-bar.render.d.ts +13 -0
- package/lib/types/render/icon.render.d.ts +18 -0
- package/lib/types/render/type.d.ts +22 -0
- package/lib/types/services/__test__/cf.service.spec.d.ts +16 -0
- package/lib/types/services/__test__/test.util.d.ts +24 -0
- package/lib/types/services/calculate-unit/color-scale.d.ts +3 -0
- package/lib/types/services/calculate-unit/data-bar.d.ts +3 -0
- package/lib/types/services/calculate-unit/highlight-cell.d.ts +3 -0
- package/lib/types/services/calculate-unit/icon-set.d.ts +3 -0
- package/lib/types/services/calculate-unit/type.d.ts +17 -0
- package/lib/types/services/calculate-unit/utils.d.ts +33 -0
- package/lib/types/services/conditional-formatting-formula.service.d.ts +57 -0
- package/lib/types/services/conditional-formatting.service.d.ts +49 -0
- package/lib/types/utils/getStringFromDataStream.d.ts +3 -0
- package/lib/types/utils/isRangesEqual.d.ts +3 -0
- package/lib/types/utils/removeUndefinedAttr.d.ts +16 -0
- package/lib/types/utils/type.d.ts +18 -0
- package/lib/umd/index.js +11 -0
- package/package.json +108 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../models/type';
|
|
2
|
+
|
|
3
|
+
export declare const SHEET_CONDITIONAL_FORMATTING_PLUGIN = "SHEET_CONDITIONAL_FORMATTING_PLUGIN";
|
|
4
|
+
export declare enum CFTextOperator {
|
|
5
|
+
beginsWith = "beginsWith",
|
|
6
|
+
endsWith = "endsWith",
|
|
7
|
+
containsText = "containsText",
|
|
8
|
+
notContainsText = "notContainsText",
|
|
9
|
+
equal = "equal",
|
|
10
|
+
notEqual = "notEqual",
|
|
11
|
+
containsBlanks = "containsBlanks",
|
|
12
|
+
notContainsBlanks = "notContainsBlanks",
|
|
13
|
+
containsErrors = "containsErrors",
|
|
14
|
+
notContainsErrors = "notContainsErrors"
|
|
15
|
+
}
|
|
16
|
+
export declare enum CFTimePeriodOperator {
|
|
17
|
+
today = "today",
|
|
18
|
+
yesterday = "yesterday",
|
|
19
|
+
tomorrow = "tomorrow",
|
|
20
|
+
last7Days = "last7Days",
|
|
21
|
+
thisMonth = "thisMonth",
|
|
22
|
+
lastMonth = "lastMonth",
|
|
23
|
+
nextMonth = "nextMonth",
|
|
24
|
+
thisWeek = "thisWeek",
|
|
25
|
+
lastWeek = "lastWeek",
|
|
26
|
+
nextWeek = "nextWeek"
|
|
27
|
+
}
|
|
28
|
+
export declare enum CFNumberOperator {
|
|
29
|
+
greaterThan = "greaterThan",
|
|
30
|
+
greaterThanOrEqual = "greaterThanOrEqual",
|
|
31
|
+
lessThan = "lessThan",
|
|
32
|
+
lessThanOrEqual = "lessThanOrEqual",
|
|
33
|
+
notBetween = "notBetween",
|
|
34
|
+
between = "between",
|
|
35
|
+
equal = "equal",
|
|
36
|
+
notEqual = "notEqual"
|
|
37
|
+
}
|
|
38
|
+
export declare enum CFRuleType {
|
|
39
|
+
highlightCell = "highlightCell",
|
|
40
|
+
dataBar = "dataBar",
|
|
41
|
+
colorScale = "colorScale",
|
|
42
|
+
iconSet = "iconSet"
|
|
43
|
+
}
|
|
44
|
+
export declare enum CFSubRuleType {
|
|
45
|
+
uniqueValues = "uniqueValues",
|
|
46
|
+
duplicateValues = "duplicateValues",
|
|
47
|
+
rank = "rank",
|
|
48
|
+
text = "text",
|
|
49
|
+
timePeriod = "timePeriod",
|
|
50
|
+
number = "number",
|
|
51
|
+
average = "average",
|
|
52
|
+
formula = "formula"
|
|
53
|
+
}
|
|
54
|
+
export declare enum CFValueType {
|
|
55
|
+
num = "num",
|
|
56
|
+
min = "min",
|
|
57
|
+
max = "max",
|
|
58
|
+
percent = "percent",
|
|
59
|
+
percentile = "percentile",
|
|
60
|
+
formula = "formula"
|
|
61
|
+
}
|
|
62
|
+
export declare const DEFAULT_BG_COLOR = "#fff";
|
|
63
|
+
export declare const DEFAULT_FONT_COLOR = "#000000";
|
|
64
|
+
export declare const createDefaultRule: () => IConditionFormattingRule<import('../models/type').IConditionalFormattingRuleConfig>;
|
|
65
|
+
export declare const createDefaultValue: (subType: CFSubRuleType, operator: CFTextOperator | CFNumberOperator | CFTimePeriodOperator) => "" | 10 | [number, number];
|
|
66
|
+
export declare const createDefaultValueByValueType: (type: CFValueType, defaultValue?: number) => number | "" | "=";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAverageHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddAverageCfParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: IAverageHighlightCell['style'];
|
|
8
|
+
operator: IAverageHighlightCell['operator'];
|
|
9
|
+
}
|
|
10
|
+
export declare const DddAverageCfCommand: ICommand<IAddAverageCfParams>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MakePropertyOptional } from '../../utils/type';
|
|
2
|
+
import { IConditionFormattingRule } from '../../models/type';
|
|
3
|
+
import { ICommand } from '@univerjs/core';
|
|
4
|
+
|
|
5
|
+
export interface IAddCfCommandParams {
|
|
6
|
+
unitId?: string;
|
|
7
|
+
subUnitId?: string;
|
|
8
|
+
rule: MakePropertyOptional<IConditionFormattingRule, 'cfId'>;
|
|
9
|
+
}
|
|
10
|
+
export declare const AddCfCommand: ICommand<IAddCfCommandParams>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IColorScale } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddColorScaleConditionalRuleParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
config: IColorScale['config'];
|
|
8
|
+
}
|
|
9
|
+
export declare const AddColorScaleConditionalRuleCommand: ICommand<IAddColorScaleConditionalRuleParams>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IDataBar } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddUniqueValuesConditionalRuleParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
min: IDataBar['config']['min'];
|
|
8
|
+
max: IDataBar['config']['max'];
|
|
9
|
+
nativeColor: IDataBar['config']['nativeColor'];
|
|
10
|
+
positiveColor: IDataBar['config']['positiveColor'];
|
|
11
|
+
isGradient: IDataBar['config']['isGradient'];
|
|
12
|
+
}
|
|
13
|
+
export declare const AddDataBarConditionalRuleCommand: ICommand<IAddUniqueValuesConditionalRuleParams>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddDuplicateValuesConditionalRuleParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: IHighlightCell['style'];
|
|
8
|
+
}
|
|
9
|
+
export declare const AddDuplicateValuesCfCommand: ICommand<IAddDuplicateValuesConditionalRuleParams>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { INumberHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddNumberCfParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: INumberHighlightCell['style'];
|
|
8
|
+
operator: INumberHighlightCell['operator'];
|
|
9
|
+
value: number | [number, number];
|
|
10
|
+
}
|
|
11
|
+
export declare const AddNumberCfCommand: ICommand<IAddNumberCfParams>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IRankHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddRankCfParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: IRankHighlightCell['style'];
|
|
8
|
+
isPercent: boolean;
|
|
9
|
+
isBottom: boolean;
|
|
10
|
+
value: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const AddRankCfCommand: ICommand<IAddRankCfParams>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITextHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddAverageCfParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: ITextHighlightCell['style'];
|
|
8
|
+
operator: ITextHighlightCell['operator'];
|
|
9
|
+
value: ITextHighlightCell['value'];
|
|
10
|
+
}
|
|
11
|
+
export declare const AddTextCfCommand: ICommand<IAddAverageCfParams>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITimePeriodHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddTimePeriodCf {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: ITimePeriodHighlightCell['style'];
|
|
8
|
+
operator: ITimePeriodHighlightCell['operator'];
|
|
9
|
+
}
|
|
10
|
+
export declare const AddTimePeriodCfCommand: ICommand<IAddTimePeriodCf>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHighlightCell } from '../../models/type';
|
|
2
|
+
import { ICommand, IRange } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
interface IAddUniqueValuesConditionalRuleParams {
|
|
5
|
+
ranges: IRange[];
|
|
6
|
+
stopIfTrue?: boolean;
|
|
7
|
+
style: IHighlightCell['style'];
|
|
8
|
+
}
|
|
9
|
+
export declare const AddUniqueValuesCfCommand: ICommand<IAddUniqueValuesConditionalRuleParams>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../../models/type';
|
|
2
|
+
import { ICommand } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export interface ISetCfCommandParams {
|
|
5
|
+
unitId?: string;
|
|
6
|
+
subUnitId?: string;
|
|
7
|
+
rule: IConditionFormattingRule;
|
|
8
|
+
}
|
|
9
|
+
export declare const SetCfCommand: ICommand<ISetCfCommandParams>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IDeleteConditionalRuleMutationParams } from './delete-conditional-rule.mutation';
|
|
2
|
+
import { IConditionFormattingRule } from '../../models/type';
|
|
3
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
4
|
+
import { IMutation } from '@univerjs/core';
|
|
5
|
+
|
|
6
|
+
export interface IAddConditionalRuleMutationParams {
|
|
7
|
+
unitId: string;
|
|
8
|
+
subUnitId: string;
|
|
9
|
+
rule: IConditionFormattingRule;
|
|
10
|
+
}
|
|
11
|
+
export declare const AddConditionalRuleMutationUndoFactory: (accessor: IAccessor, param: IAddConditionalRuleMutationParams) => {
|
|
12
|
+
id: string;
|
|
13
|
+
params: IDeleteConditionalRuleMutationParams;
|
|
14
|
+
};
|
|
15
|
+
export declare const AddConditionalRuleMutation: IMutation<IAddConditionalRuleMutationParams>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
2
|
+
import { IMutation, IMutationInfo } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export interface IDeleteConditionalRuleMutationParams {
|
|
5
|
+
unitId: string;
|
|
6
|
+
subUnitId: string;
|
|
7
|
+
cfId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const DeleteConditionalRuleMutationUndoFactory: (accessor: IAccessor, param: IDeleteConditionalRuleMutationParams) => IMutationInfo<object>[];
|
|
10
|
+
export declare const DeleteConditionalRuleMutation: IMutation<IDeleteConditionalRuleMutationParams>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IMutation } from '@univerjs/core';
|
|
2
|
+
|
|
3
|
+
export interface IConditionalFormattingFormulaMarkDirtyParams {
|
|
4
|
+
[unitId: string]: {
|
|
5
|
+
[sunUnitId: string]: {
|
|
6
|
+
[formulaId: string]: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const ConditionalFormattingFormulaMarkDirty: IMutation<IConditionalFormattingFormulaMarkDirtyParams>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
2
|
+
import { IMutation } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export interface IMoveConditionalRuleMutationParams {
|
|
5
|
+
unitId: string;
|
|
6
|
+
subUnitId: string;
|
|
7
|
+
cfId: string;
|
|
8
|
+
targetCfId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MoveConditionalRuleMutation: IMutation<IMoveConditionalRuleMutationParams>;
|
|
11
|
+
export declare const MoveConditionalRuleMutationUndoFactory: (accessor: IAccessor, param: IMoveConditionalRuleMutationParams) => {
|
|
12
|
+
id: string;
|
|
13
|
+
params: IMoveConditionalRuleMutationParams;
|
|
14
|
+
}[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../../models/type';
|
|
2
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
3
|
+
import { IMutation } from '@univerjs/core';
|
|
4
|
+
|
|
5
|
+
export interface ISetConditionalRuleMutationParams {
|
|
6
|
+
unitId: string;
|
|
7
|
+
subUnitId: string;
|
|
8
|
+
rule: IConditionFormattingRule;
|
|
9
|
+
}
|
|
10
|
+
export declare const SetConditionalRuleMutation: IMutation<ISetConditionalRuleMutationParams>;
|
|
11
|
+
export declare const setConditionalRuleMutationUndoFactory: (accessor: IAccessor, param: ISetConditionalRuleMutationParams) => {
|
|
12
|
+
id: string;
|
|
13
|
+
params: ISetConditionalRuleMutationParams;
|
|
14
|
+
}[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICommand } from '@univerjs/core';
|
|
2
|
+
|
|
3
|
+
export declare enum CF_MENU_OPERATION {
|
|
4
|
+
createRule = 1,
|
|
5
|
+
viewRule = 2,
|
|
6
|
+
highlightCell = 3,
|
|
7
|
+
rank = 4,
|
|
8
|
+
formula = 5,
|
|
9
|
+
colorScale = 6,
|
|
10
|
+
dataBar = 7,
|
|
11
|
+
icon = 8,
|
|
12
|
+
clearRangeRules = 9,
|
|
13
|
+
clearWorkSheetRules = 10
|
|
14
|
+
}
|
|
15
|
+
export declare const OpenConditionalFormattingOperator: ICommand;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IColorPickerProps {
|
|
4
|
+
color: string;
|
|
5
|
+
onChange: (color: string) => void;
|
|
6
|
+
disable?: boolean;
|
|
7
|
+
iconId?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
isNeedDropdownIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ColorPicker: (props: IColorPickerProps) => React.JSX.Element | undefined;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHighlightCell } from '../../models/type';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
interface IConditionalStyleEditorProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: IHighlightCell['style'];
|
|
7
|
+
onChange: (style: IHighlightCell['style']) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ConditionalStyleEditor: (props: IConditionalStyleEditorProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../../models/type';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
interface IConditionFormattingPanelProps {
|
|
5
|
+
rule?: IConditionFormattingRule;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionFormattingPanel: (props: IConditionFormattingPanelProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IStyleEditorProps } from './type';
|
|
2
|
+
import { INumberHighlightCell, ITextHighlightCell, ITimePeriodHighlightCell } from '../../../models/type';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
export declare const HighlightCellStyleEditor: (props: IStyleEditorProps<any, ITextHighlightCell | INumberHighlightCell | ITimePeriodHighlightCell>) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../../../models/type';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
interface IRuleEditProps {
|
|
5
|
+
rule?: IConditionFormattingRule;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const RuleEdit: (props: IRuleEditProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IConditionalFormattingRuleConfig } from '../../../models/type';
|
|
2
|
+
import { InterceptorManager } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export declare const beforeSubmit: import('@univerjs/core').IInterceptor<boolean, null>;
|
|
5
|
+
export declare const submit: import('@univerjs/core').IInterceptor<any, null>;
|
|
6
|
+
export interface IStyleEditorProps<S = any, R = IConditionalFormattingRuleConfig> {
|
|
7
|
+
onChange: (style: S) => void;
|
|
8
|
+
rule?: R;
|
|
9
|
+
interceptorManager: InterceptorManager<{
|
|
10
|
+
beforeSubmit: typeof beforeSubmit;
|
|
11
|
+
submit: typeof submit;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../../../models/type';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
interface IRuleListProps {
|
|
5
|
+
onClick: (rule: IConditionFormattingRule) => void;
|
|
6
|
+
onCreate: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const RuleList: (props: IRuleListProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
2
|
+
import { ConditionalFormattingViewModel } from '../models/conditional-formatting-view-model';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
4
|
+
import { IAutoFillService } from '@univerjs/sheets-ui';
|
|
5
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
6
|
+
|
|
7
|
+
export declare class ConditionalFormattingAutoFillController extends Disposable {
|
|
8
|
+
private _injector;
|
|
9
|
+
private _univerInstanceService;
|
|
10
|
+
private _autoFillService;
|
|
11
|
+
private _conditionalFormattingRuleModel;
|
|
12
|
+
private _conditionalFormattingViewModel;
|
|
13
|
+
constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _autoFillService: IAutoFillService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingViewModel: ConditionalFormattingViewModel);
|
|
14
|
+
private _initAutoFill;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
|
|
4
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
5
|
+
|
|
6
|
+
export declare class ConditionalFormattingClearController extends Disposable {
|
|
7
|
+
private _injector;
|
|
8
|
+
private _univerInstanceService;
|
|
9
|
+
private _sheetInterceptorService;
|
|
10
|
+
private _selectionManagerService;
|
|
11
|
+
private _conditionalFormattingRuleModel;
|
|
12
|
+
constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _sheetInterceptorService: SheetInterceptorService, _selectionManagerService: SelectionManagerService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel);
|
|
13
|
+
private _init;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
2
|
+
import { ConditionalFormattingViewModel } from '../models/conditional-formatting-view-model';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
4
|
+
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
|
5
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
6
|
+
|
|
7
|
+
export declare class ConditionalFormattingCopyPasteController extends Disposable {
|
|
8
|
+
private _sheetClipboardService;
|
|
9
|
+
private _conditionalFormattingRuleModel;
|
|
10
|
+
private _injector;
|
|
11
|
+
private _conditionalFormattingViewModel;
|
|
12
|
+
private _univerInstanceService;
|
|
13
|
+
private _copyInfo;
|
|
14
|
+
constructor(_sheetClipboardService: ISheetClipboardService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _injector: Injector, _conditionalFormattingViewModel: ConditionalFormattingViewModel, _univerInstanceService: IUniverInstanceService);
|
|
15
|
+
private _initClipboardHook;
|
|
16
|
+
private _collectConditionalRule;
|
|
17
|
+
private _generateConditionalFormattingMutations;
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConditionalFormattingService } from '../services/conditional-formatting.service';
|
|
2
|
+
import { IEditorBridgeService } from '@univerjs/sheets-ui';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
|
|
5
|
+
export declare class ConditionalFormattingEditorController extends Disposable {
|
|
6
|
+
private _editorBridgeService;
|
|
7
|
+
private _conditionalFormattingService;
|
|
8
|
+
constructor(_editorBridgeService: IEditorBridgeService, _conditionalFormattingService: ConditionalFormattingService);
|
|
9
|
+
/**
|
|
10
|
+
* Process the values after edit
|
|
11
|
+
* @private
|
|
12
|
+
* @memberof NumfmtService
|
|
13
|
+
*/
|
|
14
|
+
private _initInterceptorEditorEnd;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Disposable, LocaleService } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export declare class ConditionalFormattingI18nController extends Disposable {
|
|
5
|
+
private _localeService;
|
|
6
|
+
constructor(_localeService: LocaleService);
|
|
7
|
+
private _initLocal;
|
|
8
|
+
tWithReactNode(key: string, ...args: (ReactNode | string)[]): ReactNode[];
|
|
9
|
+
private _findReplaceIndex;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IConditionFormattingRule } from '../models/type';
|
|
2
|
+
import { ComponentManager, IMenuService, ISidebarService } from '@univerjs/ui';
|
|
3
|
+
import { Disposable, LocaleService } from '@univerjs/core';
|
|
4
|
+
import { Injector } from '@wendellhu/redi';
|
|
5
|
+
|
|
6
|
+
export declare class ConditionalFormattingMenuController extends Disposable {
|
|
7
|
+
private _injector;
|
|
8
|
+
private _componentManager;
|
|
9
|
+
private _menuService;
|
|
10
|
+
private _sidebarService;
|
|
11
|
+
private _localeService;
|
|
12
|
+
constructor(_injector: Injector, _componentManager: ComponentManager, _menuService: IMenuService, _sidebarService: ISidebarService, _localeService: LocaleService);
|
|
13
|
+
openPanel(rule?: IConditionFormattingRule): void;
|
|
14
|
+
private _initMenu;
|
|
15
|
+
private _initPanel;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { RefRangeService } from '@univerjs/sheets';
|
|
4
|
+
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
5
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
6
|
+
|
|
7
|
+
export declare class RefRangeController extends Disposable {
|
|
8
|
+
private _conditionalFormattingRuleModel;
|
|
9
|
+
private _univerInstanceService;
|
|
10
|
+
private _injector;
|
|
11
|
+
private _sheetSkeletonManagerService;
|
|
12
|
+
private _refRangeService;
|
|
13
|
+
constructor(_conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _univerInstanceService: IUniverInstanceService, _injector: Injector, _sheetSkeletonManagerService: SheetSkeletonManagerService, _refRangeService: RefRangeService);
|
|
14
|
+
private _initRefRange;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
2
|
+
import { ConditionalFormattingViewModel } from '../models/conditional-formatting-view-model';
|
|
3
|
+
import { ConditionalFormattingService } from '../services/conditional-formatting.service';
|
|
4
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
5
|
+
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
6
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
7
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
8
|
+
|
|
9
|
+
export declare class RenderController extends Disposable {
|
|
10
|
+
private _sheetInterceptorService;
|
|
11
|
+
private _conditionalFormattingService;
|
|
12
|
+
private _univerInstanceService;
|
|
13
|
+
private _renderManagerService;
|
|
14
|
+
private _conditionalFormattingViewModel;
|
|
15
|
+
private _conditionalFormattingRuleModel;
|
|
16
|
+
private _sheetSkeletonManagerService;
|
|
17
|
+
constructor(_sheetInterceptorService: SheetInterceptorService, _conditionalFormattingService: ConditionalFormattingService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _conditionalFormattingViewModel: ConditionalFormattingViewModel, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
18
|
+
_initRender(): void;
|
|
19
|
+
_initSkeleton(): void;
|
|
20
|
+
_initViewModelInterceptor(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { SheetsConditionalFormattingPlugin } from './plugin';
|
|
17
|
+
export { enUS, zhCN } from './locale';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { default as enUS } from './en-US';
|
|
17
|
+
export { default as zhCN } from './zh-CN';
|