@univerjs/sheets-conditional-formatting-ui 1.2.0 → 1.3.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/lib/cjs/index.js +34 -13
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +34 -13
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/index.css +4 -0
- package/lib/index.js +34 -13
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/views/panel/RuleEdit.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +12 -12
package/lib/cjs/index.js
CHANGED
|
@@ -1007,7 +1007,7 @@ const menuSchema = {
|
|
|
1007
1007
|
//#endregion
|
|
1008
1008
|
//#region package.json
|
|
1009
1009
|
var name = "@univerjs/sheets-conditional-formatting-ui";
|
|
1010
|
-
var version = "1.
|
|
1010
|
+
var version = "1.3.0";
|
|
1011
1011
|
|
|
1012
1012
|
//#endregion
|
|
1013
1013
|
//#region src/config/config.ts
|
|
@@ -3996,7 +3996,7 @@ const getSubUnitId = (univerInstanceService) => {
|
|
|
3996
3996
|
return (_getActiveSheet = univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET).getActiveSheet()) === null || _getActiveSheet === void 0 ? void 0 : _getActiveSheet.getSheetId();
|
|
3997
3997
|
};
|
|
3998
3998
|
const RuleEdit = (props) => {
|
|
3999
|
-
var _props$rule, _props$
|
|
3999
|
+
var _props$rule, _props$rule2, _props$rule6;
|
|
4000
4000
|
const { SelectComponent = _univerjs_design.Select, DropdownComponent, ColorPickerComponent, RangeSelectorComponent = _univerjs_sheets_formula_ui.RangeSelector, FormulaEditorComponent = _univerjs_sheets_formula_ui.FormulaEditor } = props;
|
|
4001
4001
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
4002
4002
|
const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
|
|
@@ -4006,11 +4006,12 @@ const RuleEdit = (props) => {
|
|
|
4006
4006
|
const unitId = getUnitId(univerInstanceService);
|
|
4007
4007
|
const subUnitId = getSubUnitId(univerInstanceService);
|
|
4008
4008
|
const [errorText, setErrorText] = (0, react.useState)(void 0);
|
|
4009
|
-
const
|
|
4009
|
+
const [stopIfTrue, setStopIfTrue] = (0, react.useState)(!!((_props$rule = props.rule) === null || _props$rule === void 0 ? void 0 : _props$rule.stopIfTrue));
|
|
4010
|
+
const rangeResult = (0, react.useRef)(((_props$rule2 = props.rule) === null || _props$rule2 === void 0 ? void 0 : _props$rule2.ranges) ?? []);
|
|
4010
4011
|
const rangeSelectorTouched = (0, react.useRef)(false);
|
|
4011
4012
|
const rangeString = (0, react.useMemo)(() => {
|
|
4012
|
-
var _props$
|
|
4013
|
-
let ranges = (_props$
|
|
4013
|
+
var _props$rule3;
|
|
4014
|
+
let ranges = (_props$rule3 = props.rule) === null || _props$rule3 === void 0 ? void 0 : _props$rule3.ranges;
|
|
4014
4015
|
if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) {
|
|
4015
4016
|
var _selectionManagerServ;
|
|
4016
4017
|
ranges = ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range)) ?? [];
|
|
@@ -4049,14 +4050,14 @@ const RuleEdit = (props) => {
|
|
|
4049
4050
|
}
|
|
4050
4051
|
];
|
|
4051
4052
|
const [ruleType, setRuleType] = (0, react.useState)(() => {
|
|
4052
|
-
var _props$
|
|
4053
|
-
const type = (_props$
|
|
4053
|
+
var _props$rule4;
|
|
4054
|
+
const type = (_props$rule4 = props.rule) === null || _props$rule4 === void 0 ? void 0 : _props$rule4.rule.type;
|
|
4054
4055
|
const defaultType = options[0].value;
|
|
4055
4056
|
if (!type) return defaultType;
|
|
4056
4057
|
switch (type) {
|
|
4057
4058
|
case _univerjs_sheets_conditional_formatting.CFRuleType.highlightCell:
|
|
4058
|
-
var _props$
|
|
4059
|
-
switch ((_props$
|
|
4059
|
+
var _props$rule5;
|
|
4060
|
+
switch ((_props$rule5 = props.rule) === null || _props$rule5 === void 0 ? void 0 : _props$rule5.rule.subType) {
|
|
4060
4061
|
case _univerjs_sheets_conditional_formatting.CFSubRuleType.number:
|
|
4061
4062
|
case _univerjs_sheets_conditional_formatting.CFSubRuleType.text:
|
|
4062
4063
|
case _univerjs_sheets_conditional_formatting.CFSubRuleType.duplicateValues:
|
|
@@ -4091,6 +4092,7 @@ const RuleEdit = (props) => {
|
|
|
4091
4092
|
default: return HighlightCellStyleEditor;
|
|
4092
4093
|
}
|
|
4093
4094
|
}, [ruleType]);
|
|
4095
|
+
const supportsStopIfTrue = StyleEditor === HighlightCellStyleEditor || StyleEditor === RankStyleEditor || StyleEditor === FormulaStyleEditor;
|
|
4094
4096
|
(0, react.useEffect)(() => {
|
|
4095
4097
|
const disposable = commandService.onCommandExecuted((commandInfo) => {
|
|
4096
4098
|
if (commandInfo.id === _univerjs_sheets.RemoveSheetMutation.id) {
|
|
@@ -4132,7 +4134,8 @@ const RuleEdit = (props) => {
|
|
|
4132
4134
|
rule = {
|
|
4133
4135
|
...props.rule,
|
|
4134
4136
|
ranges,
|
|
4135
|
-
rule: result
|
|
4137
|
+
rule: result,
|
|
4138
|
+
stopIfTrue: result.type === _univerjs_sheets_conditional_formatting.CFRuleType.highlightCell && stopIfTrue
|
|
4136
4139
|
};
|
|
4137
4140
|
commandService.executeCommand(_univerjs_sheets_conditional_formatting.SetCfCommand.id, {
|
|
4138
4141
|
unitId,
|
|
@@ -4145,7 +4148,7 @@ const RuleEdit = (props) => {
|
|
|
4145
4148
|
cfId: conditionalFormattingRuleModel.createCfId(unitId, subUnitId),
|
|
4146
4149
|
ranges,
|
|
4147
4150
|
rule: result,
|
|
4148
|
-
stopIfTrue:
|
|
4151
|
+
stopIfTrue: result.type === _univerjs_sheets_conditional_formatting.CFRuleType.highlightCell && stopIfTrue
|
|
4149
4152
|
};
|
|
4150
4153
|
commandService.executeCommand(_univerjs_sheets_conditional_formatting.AddCfCommand.id, {
|
|
4151
4154
|
unitId,
|
|
@@ -4200,13 +4203,21 @@ const RuleEdit = (props) => {
|
|
|
4200
4203
|
}),
|
|
4201
4204
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyleEditor, {
|
|
4202
4205
|
interceptorManager,
|
|
4203
|
-
rule: (_props$
|
|
4206
|
+
rule: (_props$rule6 = props.rule) === null || _props$rule6 === void 0 ? void 0 : _props$rule6.rule,
|
|
4204
4207
|
onChange: onStyleChange,
|
|
4205
4208
|
SelectComponent,
|
|
4206
4209
|
DropdownComponent,
|
|
4207
4210
|
ColorPickerComponent,
|
|
4208
4211
|
FormulaEditorComponent
|
|
4209
4212
|
}),
|
|
4213
|
+
supportsStopIfTrue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4214
|
+
className: "univer-mt-4",
|
|
4215
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Checkbox, {
|
|
4216
|
+
checked: stopIfTrue,
|
|
4217
|
+
onChange: (checked) => setStopIfTrue(!!checked),
|
|
4218
|
+
children: localeService.t("sheets-conditional-formatting-ui.panel.stopIfTrue")
|
|
4219
|
+
})
|
|
4220
|
+
}),
|
|
4210
4221
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4211
4222
|
className: "univer-mt-4 univer-flex univer-justify-end univer-gap-2",
|
|
4212
4223
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
@@ -4438,7 +4449,7 @@ function RuleList(props) {
|
|
|
4438
4449
|
onDragStop: handleDragStop,
|
|
4439
4450
|
onDragStart: handleDragStart,
|
|
4440
4451
|
itemRender: (rule) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4441
|
-
className: (0, _univerjs_design.clsx)("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 rtl:univer-pl-8 rtl:univer-pr-5 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 dark:!univer-bg-gray-700": draggingId === rule.cfId }),
|
|
4452
|
+
className: (0, _univerjs_design.clsx)("univer-group univer-relative univer-flex univer-flex-wrap univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 rtl:univer-pl-8 rtl:univer-pr-5 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 dark:!univer-bg-gray-700": draggingId === rule.cfId }),
|
|
4442
4453
|
onMouseMove: () => {
|
|
4443
4454
|
rule.ranges !== currentRuleRanges && setCurrentRuleRanges(rule.ranges);
|
|
4444
4455
|
},
|
|
@@ -4463,6 +4474,16 @@ function RuleList(props) {
|
|
|
4463
4474
|
})]
|
|
4464
4475
|
}),
|
|
4465
4476
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConditionalFormattingRulePreview, { rule: rule.rule }) }),
|
|
4477
|
+
rule.rule.type === _univerjs_sheets_conditional_formatting.CFRuleType.highlightCell && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4478
|
+
className: "univer-pointer-events-none univer-mt-2 univer-w-full",
|
|
4479
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Checkbox, {
|
|
4480
|
+
className: "univer-max-w-full",
|
|
4481
|
+
contentClassName: "univer-min-w-0",
|
|
4482
|
+
checked: !!rule.stopIfTrue,
|
|
4483
|
+
disabled: true,
|
|
4484
|
+
children: localeService.t("sheets-conditional-formatting-ui.panel.stopIfTrue")
|
|
4485
|
+
})
|
|
4486
|
+
}),
|
|
4466
4487
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4467
4488
|
className: (0, _univerjs_design.clsx)("univer-absolute univer-right-1 univer-hidden univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded univer-text-red-500 group-hover:univer-flex hover:univer-bg-gray-200 rtl:univer-left-1 rtl:univer-right-auto", { "univer-flex univer-items-center univer-justify-center": draggingId === rule.cfId }),
|
|
4468
4489
|
onClick: (e) => {
|
package/lib/cjs/locale/ar-SA.js
CHANGED
package/lib/cjs/locale/ca-ES.js
CHANGED
package/lib/cjs/locale/de-DE.js
CHANGED
package/lib/cjs/locale/en-US.js
CHANGED
package/lib/cjs/locale/es-ES.js
CHANGED
package/lib/cjs/locale/fa-IR.js
CHANGED
package/lib/cjs/locale/fr-FR.js
CHANGED
package/lib/cjs/locale/id-ID.js
CHANGED
package/lib/cjs/locale/it-IT.js
CHANGED
package/lib/cjs/locale/ja-JP.js
CHANGED
package/lib/cjs/locale/ko-KR.js
CHANGED
package/lib/cjs/locale/pl-PL.js
CHANGED
package/lib/cjs/locale/pt-BR.js
CHANGED
package/lib/cjs/locale/ru-RU.js
CHANGED
package/lib/cjs/locale/sk-SK.js
CHANGED
package/lib/cjs/locale/vi-VN.js
CHANGED
package/lib/cjs/locale/zh-CN.js
CHANGED
package/lib/cjs/locale/zh-HK.js
CHANGED
package/lib/cjs/locale/zh-TW.js
CHANGED
package/lib/es/index.js
CHANGED
|
@@ -1006,7 +1006,7 @@ const menuSchema = {
|
|
|
1006
1006
|
//#endregion
|
|
1007
1007
|
//#region package.json
|
|
1008
1008
|
var name = "@univerjs/sheets-conditional-formatting-ui";
|
|
1009
|
-
var version = "1.
|
|
1009
|
+
var version = "1.3.0";
|
|
1010
1010
|
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/config/config.ts
|
|
@@ -3995,7 +3995,7 @@ const getSubUnitId = (univerInstanceService) => {
|
|
|
3995
3995
|
return (_getActiveSheet = univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_SHEET).getActiveSheet()) === null || _getActiveSheet === void 0 ? void 0 : _getActiveSheet.getSheetId();
|
|
3996
3996
|
};
|
|
3997
3997
|
const RuleEdit = (props) => {
|
|
3998
|
-
var _props$rule, _props$
|
|
3998
|
+
var _props$rule, _props$rule2, _props$rule6;
|
|
3999
3999
|
const { SelectComponent = Select, DropdownComponent, ColorPickerComponent, RangeSelectorComponent = RangeSelector, FormulaEditorComponent = FormulaEditor } = props;
|
|
4000
4000
|
const localeService = useDependency(LocaleService);
|
|
4001
4001
|
const commandService = useDependency(ICommandService);
|
|
@@ -4005,11 +4005,12 @@ const RuleEdit = (props) => {
|
|
|
4005
4005
|
const unitId = getUnitId(univerInstanceService);
|
|
4006
4006
|
const subUnitId = getSubUnitId(univerInstanceService);
|
|
4007
4007
|
const [errorText, setErrorText] = useState(void 0);
|
|
4008
|
-
const
|
|
4008
|
+
const [stopIfTrue, setStopIfTrue] = useState(!!((_props$rule = props.rule) === null || _props$rule === void 0 ? void 0 : _props$rule.stopIfTrue));
|
|
4009
|
+
const rangeResult = useRef(((_props$rule2 = props.rule) === null || _props$rule2 === void 0 ? void 0 : _props$rule2.ranges) ?? []);
|
|
4009
4010
|
const rangeSelectorTouched = useRef(false);
|
|
4010
4011
|
const rangeString = useMemo(() => {
|
|
4011
|
-
var _props$
|
|
4012
|
-
let ranges = (_props$
|
|
4012
|
+
var _props$rule3;
|
|
4013
|
+
let ranges = (_props$rule3 = props.rule) === null || _props$rule3 === void 0 ? void 0 : _props$rule3.ranges;
|
|
4013
4014
|
if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) {
|
|
4014
4015
|
var _selectionManagerServ;
|
|
4015
4016
|
ranges = ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range)) ?? [];
|
|
@@ -4048,14 +4049,14 @@ const RuleEdit = (props) => {
|
|
|
4048
4049
|
}
|
|
4049
4050
|
];
|
|
4050
4051
|
const [ruleType, setRuleType] = useState(() => {
|
|
4051
|
-
var _props$
|
|
4052
|
-
const type = (_props$
|
|
4052
|
+
var _props$rule4;
|
|
4053
|
+
const type = (_props$rule4 = props.rule) === null || _props$rule4 === void 0 ? void 0 : _props$rule4.rule.type;
|
|
4053
4054
|
const defaultType = options[0].value;
|
|
4054
4055
|
if (!type) return defaultType;
|
|
4055
4056
|
switch (type) {
|
|
4056
4057
|
case CFRuleType.highlightCell:
|
|
4057
|
-
var _props$
|
|
4058
|
-
switch ((_props$
|
|
4058
|
+
var _props$rule5;
|
|
4059
|
+
switch ((_props$rule5 = props.rule) === null || _props$rule5 === void 0 ? void 0 : _props$rule5.rule.subType) {
|
|
4059
4060
|
case CFSubRuleType.number:
|
|
4060
4061
|
case CFSubRuleType.text:
|
|
4061
4062
|
case CFSubRuleType.duplicateValues:
|
|
@@ -4090,6 +4091,7 @@ const RuleEdit = (props) => {
|
|
|
4090
4091
|
default: return HighlightCellStyleEditor;
|
|
4091
4092
|
}
|
|
4092
4093
|
}, [ruleType]);
|
|
4094
|
+
const supportsStopIfTrue = StyleEditor === HighlightCellStyleEditor || StyleEditor === RankStyleEditor || StyleEditor === FormulaStyleEditor;
|
|
4093
4095
|
useEffect(() => {
|
|
4094
4096
|
const disposable = commandService.onCommandExecuted((commandInfo) => {
|
|
4095
4097
|
if (commandInfo.id === RemoveSheetMutation.id) {
|
|
@@ -4131,7 +4133,8 @@ const RuleEdit = (props) => {
|
|
|
4131
4133
|
rule = {
|
|
4132
4134
|
...props.rule,
|
|
4133
4135
|
ranges,
|
|
4134
|
-
rule: result
|
|
4136
|
+
rule: result,
|
|
4137
|
+
stopIfTrue: result.type === CFRuleType.highlightCell && stopIfTrue
|
|
4135
4138
|
};
|
|
4136
4139
|
commandService.executeCommand(SetCfCommand.id, {
|
|
4137
4140
|
unitId,
|
|
@@ -4144,7 +4147,7 @@ const RuleEdit = (props) => {
|
|
|
4144
4147
|
cfId: conditionalFormattingRuleModel.createCfId(unitId, subUnitId),
|
|
4145
4148
|
ranges,
|
|
4146
4149
|
rule: result,
|
|
4147
|
-
stopIfTrue:
|
|
4150
|
+
stopIfTrue: result.type === CFRuleType.highlightCell && stopIfTrue
|
|
4148
4151
|
};
|
|
4149
4152
|
commandService.executeCommand(AddCfCommand.id, {
|
|
4150
4153
|
unitId,
|
|
@@ -4199,13 +4202,21 @@ const RuleEdit = (props) => {
|
|
|
4199
4202
|
}),
|
|
4200
4203
|
/* @__PURE__ */ jsx(StyleEditor, {
|
|
4201
4204
|
interceptorManager,
|
|
4202
|
-
rule: (_props$
|
|
4205
|
+
rule: (_props$rule6 = props.rule) === null || _props$rule6 === void 0 ? void 0 : _props$rule6.rule,
|
|
4203
4206
|
onChange: onStyleChange,
|
|
4204
4207
|
SelectComponent,
|
|
4205
4208
|
DropdownComponent,
|
|
4206
4209
|
ColorPickerComponent,
|
|
4207
4210
|
FormulaEditorComponent
|
|
4208
4211
|
}),
|
|
4212
|
+
supportsStopIfTrue && /* @__PURE__ */ jsx("div", {
|
|
4213
|
+
className: "univer-mt-4",
|
|
4214
|
+
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
4215
|
+
checked: stopIfTrue,
|
|
4216
|
+
onChange: (checked) => setStopIfTrue(!!checked),
|
|
4217
|
+
children: localeService.t("sheets-conditional-formatting-ui.panel.stopIfTrue")
|
|
4218
|
+
})
|
|
4219
|
+
}),
|
|
4209
4220
|
/* @__PURE__ */ jsxs("div", {
|
|
4210
4221
|
className: "univer-mt-4 univer-flex univer-justify-end univer-gap-2",
|
|
4211
4222
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
@@ -4437,7 +4448,7 @@ function RuleList(props) {
|
|
|
4437
4448
|
onDragStop: handleDragStop,
|
|
4438
4449
|
onDragStart: handleDragStart,
|
|
4439
4450
|
itemRender: (rule) => /* @__PURE__ */ jsxs("div", {
|
|
4440
|
-
className: clsx("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 rtl:univer-pl-8 rtl:univer-pr-5 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 dark:!univer-bg-gray-700": draggingId === rule.cfId }),
|
|
4451
|
+
className: clsx("univer-group univer-relative univer-flex univer-flex-wrap univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 rtl:univer-pl-8 rtl:univer-pr-5 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 dark:!univer-bg-gray-700": draggingId === rule.cfId }),
|
|
4441
4452
|
onMouseMove: () => {
|
|
4442
4453
|
rule.ranges !== currentRuleRanges && setCurrentRuleRanges(rule.ranges);
|
|
4443
4454
|
},
|
|
@@ -4462,6 +4473,16 @@ function RuleList(props) {
|
|
|
4462
4473
|
})]
|
|
4463
4474
|
}),
|
|
4464
4475
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ConditionalFormattingRulePreview, { rule: rule.rule }) }),
|
|
4476
|
+
rule.rule.type === CFRuleType.highlightCell && /* @__PURE__ */ jsx("div", {
|
|
4477
|
+
className: "univer-pointer-events-none univer-mt-2 univer-w-full",
|
|
4478
|
+
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
4479
|
+
className: "univer-max-w-full",
|
|
4480
|
+
contentClassName: "univer-min-w-0",
|
|
4481
|
+
checked: !!rule.stopIfTrue,
|
|
4482
|
+
disabled: true,
|
|
4483
|
+
children: localeService.t("sheets-conditional-formatting-ui.panel.stopIfTrue")
|
|
4484
|
+
})
|
|
4485
|
+
}),
|
|
4465
4486
|
/* @__PURE__ */ jsx("div", {
|
|
4466
4487
|
className: clsx("univer-absolute univer-right-1 univer-hidden univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded univer-text-red-500 group-hover:univer-flex hover:univer-bg-gray-200 rtl:univer-left-1 rtl:univer-right-auto", { "univer-flex univer-items-center univer-justify-center": draggingId === rule.cfId }),
|
|
4467
4488
|
onClick: (e) => {
|
package/lib/es/locale/ar-SA.js
CHANGED
package/lib/es/locale/ca-ES.js
CHANGED
package/lib/es/locale/de-DE.js
CHANGED
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/es-ES.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED
package/lib/es/locale/id-ID.js
CHANGED
package/lib/es/locale/it-IT.js
CHANGED
package/lib/es/locale/ja-JP.js
CHANGED
package/lib/es/locale/ko-KR.js
CHANGED
package/lib/es/locale/pl-PL.js
CHANGED
package/lib/es/locale/pt-BR.js
CHANGED
package/lib/es/locale/ru-RU.js
CHANGED
package/lib/es/locale/sk-SK.js
CHANGED
package/lib/es/locale/vi-VN.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
package/lib/es/locale/zh-HK.js
CHANGED
package/lib/es/locale/zh-TW.js
CHANGED