@univerjs/sheets-data-validation-ui 0.4.1 → 0.4.2-nightly.202410301606
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/es/index.js +181 -66
- package/lib/locale/en-US.js +176 -0
- package/lib/locale/fa-IR.js +176 -0
- package/lib/locale/ru-RU.js +176 -0
- package/lib/locale/vi-VN.js +176 -0
- package/lib/locale/zh-CN.js +178 -0
- package/lib/locale/zh-TW.js +178 -0
- package/lib/types/controllers/dv-reject-input.controller.d.ts +3 -3
- package/lib/types/locale/zh-CN.d.ts +6 -0
- package/lib/types/views/validator-views/list-multiple-view.d.ts +1 -0
- package/lib/types/views/widgets/checkbox-widget.d.ts +1 -0
- package/lib/types/views/widgets/dropdown-multiple-widget.d.ts +1 -0
- package/lib/types/views/widgets/dropdown-widget.d.ts +1 -0
- package/lib/types/views/widgets/shape/layout.d.ts +1 -0
- package/lib/umd/index.js +2 -2
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +30 -28
- package/LICENSE +0 -176
- package/lib/cjs/index.js +0 -9
- package/lib/locale/en-US.json +0 -167
- package/lib/locale/fa-IR.json +0 -167
- package/lib/locale/ru-RU.json +0 -167
- package/lib/locale/vi-VN.json +0 -167
- package/lib/locale/zh-CN.json +0 -167
- package/lib/locale/zh-TW.json +0 -167
package/lib/es/index.js
CHANGED
@@ -3,20 +3,19 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
5
5
|
import React, { useState, forwardRef, useRef, createElement, useMemo, useEffect } from "react";
|
6
|
-
import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, numfmt, CellValueType, UniverInstanceType, toDisposable, IUniverInstanceService, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DisposableCollection, CommandType, BuildTextUtils, DataValidationRenderMode, DataValidationType, IConfigService, UndoCommand, RedoCommand, isUnitRangesEqual, debounce, shallowEqual, Injector, DataValidationStatus, ObjectMatrix, Range, Rectangle, queryObjectMatrix, Optional, RxDisposable, InterceptorEffectEnum, sequenceExecute, bufferDebounceTime,
|
6
|
+
import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, numfmt, CellValueType, UniverInstanceType, toDisposable, IUniverInstanceService, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DisposableCollection, CommandType, BuildTextUtils, DataValidationRenderMode, DataValidationType, IConfigService, UndoCommand, RedoCommand, isUnitRangesEqual, debounce, shallowEqual, Injector, DataValidationStatus, ObjectMatrix, Range, Rectangle, queryObjectMatrix, Optional, RxDisposable, InterceptorEffectEnum, sequenceExecute, bufferDebounceTime, isFormulaString, Tools, ThemeService, VerticalAlign, HorizontalAlign, DEFAULT_STYLES, WrapStrategy, DocumentDataModel, DEFAULT_EMPTY_DOCUMENT_VALUE, BooleanNumber, Plugin } from "@univerjs/core";
|
7
7
|
import { Button, DatePanel, RectPopup, Scrollbar, FormLayout, RadioGroup, Radio, Checkbox, Input, Select, DraggableList } from "@univerjs/design";
|
8
|
-
import {
|
9
|
-
import {
|
8
|
+
import { DeviceInputEventType, IRenderManagerService, fixLineWidthByScale, Transform, Checkbox as Checkbox$1, FontCache, Shape, Rect, getFontStyleString, getDocsSkeletonPageSize, DocumentViewModel, DocumentSkeleton, Documents } from "@univerjs/engine-render";
|
9
|
+
import { SheetInterceptorService, AFTER_CELL_EDIT_ASYNC, SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, checkRangesEditablePermission, WorksheetSetCellStylePermission, INTERCEPTOR_POINT, InterceptCellContentPriority } from "@univerjs/sheets";
|
10
|
+
import { SheetDataValidationModel, getCellValueOrigin, getDataValidationCellValue, deserializeListOptions, serializeListOptions, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand, RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, createDefaultNewRule, AddSheetDataValidationCommand, RemoveSheetAllDataValidationCommand, DATA_VALIDATION_PLUGIN_NAME, getDataValidationDiffMutations, DataValidationCacheService, DataValidationFormulaController, DataValidationFormulaService, getFormulaResult, isLegalFormulaResult, transformCheckboxValue, CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2 } from "@univerjs/sheets-data-validation";
|
10
11
|
import { getPatternType } from "@univerjs/sheets-numfmt";
|
12
|
+
import { SetCellEditVisibleOperation, SheetCanvasPopManagerService, IEditorBridgeService, SheetPermissionInterceptorBaseController, IMarkSelectionService, HoverManagerService, CellAlertManagerService, CellAlertType, IAutoFillService, APPLY_TYPE, virtualizeDiscreteRanges, getAutoFillRepeatRange, COPY_TYPE, rangeToDiscreteRange, PREDEFINED_HOOK_NAME, getRepeatRange, ISheetClipboardService, getCurrentRangeDisable$, AutoHeightController, SheetSkeletonManagerService } from "@univerjs/sheets-ui";
|
13
|
+
import { IDialogService, KeyCode, ISidebarService, useObservable, ComponentManager, IZenZoneService, useEvent, useSidebarClick, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, IMenuManagerService } from "@univerjs/ui";
|
11
14
|
import { DataValidatorRegistryService, DataValidationModel, DataValidatorRegistryScope, TWO_FORMULA_OPERATOR_COUNT, getRuleOptions, getRuleSetting } from "@univerjs/data-validation";
|
12
|
-
import { IEditorBridgeService, SheetCanvasPopManagerService, SheetPermissionInterceptorBaseController, IMarkSelectionService, HoverManagerService, CellAlertManagerService, CellAlertType, IAutoFillService, APPLY_TYPE, virtualizeDiscreteRanges, getAutoFillRepeatRange, COPY_TYPE, rangeToDiscreteRange, PREDEFINED_HOOK_NAME, getRepeatRange, ISheetClipboardService, getCurrentRangeDisable$, AutoHeightController, SheetSkeletonManagerService } from "@univerjs/sheets-ui";
|
13
|
-
import { IDialogService, ISidebarService, useObservable, ComponentManager, IZenZoneService, KeyCode, useEvent, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, IMenuManagerService } from "@univerjs/ui";
|
14
15
|
import { RichTextEditingMutation } from "@univerjs/docs";
|
15
|
-
import { IRenderManagerService, DeviceInputEventType, fixLineWidthByScale, Transform, Checkbox as Checkbox$1, FontCache, Shape, Rect, getFontStyleString, getDocsSkeletonPageSize, DocumentViewModel, DocumentSkeleton, Documents } from "@univerjs/engine-render";
|
16
16
|
import { filter, BehaviorSubject, distinctUntilChanged, Subject, debounceTime, bufferTime } from "rxjs";
|
17
17
|
import { deserializeRangeWithSheet, serializeRange } from "@univerjs/engine-formula";
|
18
|
-
import { RangeSelector } from "@univerjs/sheets-formula-ui";
|
19
|
-
import { TextEditor } from "@univerjs/docs-ui";
|
18
|
+
import { RangeSelector, FormulaEditor } from "@univerjs/sheets-formula-ui";
|
20
19
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
21
20
|
function getDefaultExportFromCjs(x) {
|
22
21
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
|
@@ -406,12 +405,12 @@ var __defProp$f = Object.defineProperty, __getOwnPropDesc$f = Object.getOwnPrope
|
|
406
405
|
return kind && result && __defProp$f(target, key, result), result;
|
407
406
|
}, "__decorateClass$f"), __decorateParam$f = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$f"), _a;
|
408
407
|
let DataValidationRejectInputController = (_a = class extends Disposable {
|
409
|
-
constructor(
|
410
|
-
super(), this.
|
408
|
+
constructor(_sheetInterceptorService, _dataValidationModel, _dataValidatorRegistryService, _dialogService, _localeService) {
|
409
|
+
super(), this._sheetInterceptorService = _sheetInterceptorService, this._dataValidationModel = _dataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._dialogService = _dialogService, this._localeService = _localeService, this._initEditorBridgeInterceptor();
|
411
410
|
}
|
412
411
|
_initEditorBridgeInterceptor() {
|
413
|
-
this.
|
414
|
-
|
412
|
+
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
413
|
+
AFTER_CELL_EDIT_ASYNC,
|
415
414
|
{
|
416
415
|
handler: /* @__PURE__ */ __name(async (cellPromise, context, next) => {
|
417
416
|
var _a18;
|
@@ -489,7 +488,7 @@ let DataValidationRejectInputController = (_a = class extends Disposable {
|
|
489
488
|
}
|
490
489
|
}, __name(_a, "DataValidationRejectInputController"), _a);
|
491
490
|
DataValidationRejectInputController = __decorateClass$f([
|
492
|
-
__decorateParam$f(0,
|
491
|
+
__decorateParam$f(0, Inject(SheetInterceptorService)),
|
493
492
|
__decorateParam$f(1, Inject(SheetDataValidationModel)),
|
494
493
|
__decorateParam$f(2, Inject(DataValidatorRegistryService)),
|
495
494
|
__decorateParam$f(3, IDialogService),
|
@@ -529,7 +528,12 @@ function DateDropdown(props) {
|
|
529
528
|
workbook,
|
530
529
|
interceptValue: dateStr.replace("Z", "").replace("T", " "),
|
531
530
|
t: CellValueType.NUMBER
|
532
|
-
}, rule) ? (commandService.executeCommand(
|
531
|
+
}, rule) ? (hideFn(), await commandService.executeCommand(SetCellEditVisibleOperation.id, {
|
532
|
+
visible: !1,
|
533
|
+
eventType: DeviceInputEventType.Keyboard,
|
534
|
+
unitId,
|
535
|
+
keycode: KeyCode.ESC
|
536
|
+
}), await commandService.executeCommand(SetRangeValuesCommand.id, {
|
533
537
|
unitId,
|
534
538
|
subUnitId,
|
535
539
|
range: {
|
@@ -550,7 +554,7 @@ function DateDropdown(props) {
|
|
550
554
|
}
|
551
555
|
}
|
552
556
|
}
|
553
|
-
})
|
557
|
+
})) : rejectInputController.showReject(validator.getRuleFinalError(rule));
|
554
558
|
}, "handleSave");
|
555
559
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.dvDateDropdown, children: [
|
556
560
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -1006,7 +1010,7 @@ function ListDropDown(props) {
|
|
1006
1010
|
title: multiple ? localeService.t("dataValidation.listMultiple.dropdown") : localeService.t("dataValidation.list.dropdown"),
|
1007
1011
|
value,
|
1008
1012
|
multiple,
|
1009
|
-
onChange: /* @__PURE__ */ __name((newValue) => {
|
1013
|
+
onChange: /* @__PURE__ */ __name(async (newValue) => {
|
1010
1014
|
const str = serializeListOptions(newValue), params = {
|
1011
1015
|
unitId,
|
1012
1016
|
subUnitId,
|
@@ -1028,7 +1032,12 @@ function ListDropDown(props) {
|
|
1028
1032
|
keycode: KeyCode.ESC,
|
1029
1033
|
eventType: DeviceInputEventType.Keyboard,
|
1030
1034
|
unitId
|
1031
|
-
}),
|
1035
|
+
}), setLocalValue(str), multiple || hideFn(), editorBridgeService.isVisible().visible && await commandService.executeCommand(SetCellEditVisibleOperation.id, {
|
1036
|
+
visible: !1,
|
1037
|
+
eventType: DeviceInputEventType.Keyboard,
|
1038
|
+
unitId,
|
1039
|
+
keycode: KeyCode.ESC
|
1040
|
+
}), commandService.executeCommand(SetRangeValuesCommand.id, params);
|
1032
1041
|
}, "onChange"),
|
1033
1042
|
options,
|
1034
1043
|
onEdit: handleEdit,
|
@@ -1109,7 +1118,8 @@ function getSheetIdByName(univerInstanceService, unitId, name) {
|
|
1109
1118
|
}
|
1110
1119
|
__name(getSheetIdByName, "getSheetIdByName");
|
1111
1120
|
function DataValidationDetail() {
|
1112
|
-
|
1121
|
+
var _a18;
|
1122
|
+
const [key, setKey] = useState(0), dataValidationPanelService = useDependency(DataValidationPanelService), activeRuleInfo = useObservable(dataValidationPanelService.activeRule$, dataValidationPanelService.activeRule), { unitId, subUnitId, rule } = activeRuleInfo || {}, ruleId = rule.uid, validatorService = useDependency(DataValidatorRegistryService), univerInstanceService = useDependency(IUniverInstanceService), componentManager = useDependency(ComponentManager), commandService = useDependency(ICommandService), dataValidationModel = useDependency(DataValidationModel), localeService = useDependency(LocaleService), [localRule, setLocalRule] = useState(rule), validator = validatorService.getValidatorItem(localRule.type), [showError, setShowError] = useState(!1), validators = validatorService.getValidatorsByScope(DataValidatorRegistryScope.SHEET), [localRanges, setLocalRanges] = useState(() => localRule.ranges.map((i) => ({ unitId: "", sheetId: "", range: i }))), debounceExecute = useMemo(() => debounceExecuteFactory(commandService), [commandService]), [isRangeError, setIsRangeError] = useState(!1), rangeSelectorActionsRef = useRef({}), [isFocusRangeSelector, isFocusRangeSelectorSet] = useState(!1), sheetSelectionService = useDependency(SheetsSelectionsService);
|
1113
1123
|
if (useEffect(() => () => {
|
1114
1124
|
const currentSelection = sheetSelectionService.getCurrentLastSelection();
|
1115
1125
|
currentSelection && sheetSelectionService.setSelections([currentSelection]);
|
@@ -1123,7 +1133,7 @@ function DataValidationDetail() {
|
|
1123
1133
|
}, [commandService, dataValidationModel, ruleId, subUnitId, unitId]), !validator)
|
1124
1134
|
return null;
|
1125
1135
|
const operators = validator.operators, operatorNames = validator.operatorNames, isTwoFormula = localRule.operator ? TWO_FORMULA_OPERATOR_COUNT.includes(localRule.operator) : !1, handleOk = /* @__PURE__ */ __name(() => {
|
1126
|
-
localRule.ranges.length
|
1136
|
+
!localRule.ranges.length || isRangeError || (validator.validatorFormula(localRule, unitId, subUnitId).success ? dataValidationPanelService.setActiveRule(null) : setShowError(!0));
|
1127
1137
|
}, "handleOk"), handleUpdateRuleRanges = useEvent((rangeText) => {
|
1128
1138
|
const unitRanges = rangeText.split(",").map(deserializeRangeWithSheet).map((unitRange) => {
|
1129
1139
|
const sheetName = unitRange.sheetName;
|
@@ -1215,17 +1225,17 @@ function DataValidationDetail() {
|
|
1215
1225
|
options: newOptions
|
1216
1226
|
}
|
1217
1227
|
));
|
1218
|
-
}, "handleUpdateRuleOptions")
|
1219
|
-
|
1220
|
-
|
1221
|
-
handleOutClick
|
1222
|
-
|
1223
|
-
|
1228
|
+
}, "handleUpdateRuleOptions");
|
1229
|
+
return useSidebarClick((e) => {
|
1230
|
+
var _a19;
|
1231
|
+
const handleOutClick = (_a19 = rangeSelectorActionsRef.current) == null ? void 0 : _a19.handleOutClick;
|
1232
|
+
handleOutClick && handleOutClick(e, () => isFocusRangeSelectorSet(!1));
|
1233
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.dataValidationDetail, children: [
|
1224
1234
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
1225
1235
|
FormLayout,
|
1226
1236
|
{
|
1227
1237
|
label: localeService.t("dataValidation.panel.range"),
|
1228
|
-
error: localRule.ranges.length
|
1238
|
+
error: !localRule.ranges.length || isRangeError ? localeService.t("dataValidation.panel.rangeError") : "",
|
1229
1239
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
1230
1240
|
RangeSelector,
|
1231
1241
|
{
|
@@ -1233,8 +1243,10 @@ function DataValidationDetail() {
|
|
1233
1243
|
subUnitId,
|
1234
1244
|
initValue: rangeStr,
|
1235
1245
|
onChange: handleUpdateRuleRanges,
|
1246
|
+
onFocus: /* @__PURE__ */ __name(() => isFocusRangeSelectorSet(!0), "onFocus"),
|
1236
1247
|
isFocus: isFocusRangeSelector,
|
1237
|
-
actions: rangeSelectorActionsRef.current
|
1248
|
+
actions: rangeSelectorActionsRef.current,
|
1249
|
+
onVerify: /* @__PURE__ */ __name((isValid) => setIsRangeError(!isValid), "onVerify")
|
1238
1250
|
}
|
1239
1251
|
)
|
1240
1252
|
}
|
@@ -1290,6 +1302,20 @@ function DataValidationDetail() {
|
|
1290
1302
|
},
|
1291
1303
|
key + localRule.type
|
1292
1304
|
) : null,
|
1305
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
1306
|
+
Checkbox,
|
1307
|
+
{
|
1308
|
+
checked: (_a18 = localRule.allowBlank) != null ? _a18 : !0,
|
1309
|
+
onChange: /* @__PURE__ */ __name(() => {
|
1310
|
+
var _a19;
|
1311
|
+
return handleUpdateRuleSetting({
|
1312
|
+
...baseRule,
|
1313
|
+
allowBlank: !((_a19 = localRule.allowBlank) == null || _a19)
|
1314
|
+
});
|
1315
|
+
}, "onChange"),
|
1316
|
+
children: localeService.t("dataValidation.panel.allowBlank")
|
1317
|
+
}
|
1318
|
+
) }),
|
1293
1319
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DataValidationOptions, { value: options, onChange: handleUpdateRuleOptions, extraComponent: validator.optionsInput }),
|
1294
1320
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.dataValidationDetailButtons, children: [
|
1295
1321
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { className: styles$3.dataValidationDetailButton, onClick: handleDelete, children: localeService.t("dataValidation.panel.removeRule") }),
|
@@ -1675,7 +1701,8 @@ let DataValidationCopyPasteController = (_a6 = class extends Disposable {
|
|
1675
1701
|
copyInfo.subUnitId,
|
1676
1702
|
ruleMatrix.diffWithAddition(this._sheetDataValidationModel.getRules(copyInfo.unitId, copyInfo.subUnitId), additionRules.values()),
|
1677
1703
|
this._injector,
|
1678
|
-
"patched"
|
1704
|
+
"patched",
|
1705
|
+
!1
|
1679
1706
|
);
|
1680
1707
|
return {
|
1681
1708
|
redos: redoMutations,
|
@@ -1705,7 +1732,8 @@ let DataValidationCopyPasteController = (_a6 = class extends Disposable {
|
|
1705
1732
|
subUnitId,
|
1706
1733
|
ruleMatrix.diff(this._sheetDataValidationModel.getRules(unitId, subUnitId)),
|
1707
1734
|
this._injector,
|
1708
|
-
"patched"
|
1735
|
+
"patched",
|
1736
|
+
!1
|
1709
1737
|
);
|
1710
1738
|
return {
|
1711
1739
|
redos: redoMutations,
|
@@ -1941,6 +1969,32 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1941
1969
|
};
|
1942
1970
|
return (_f2 = (_e2 = validator == null ? void 0 : validator.canvasRender) == null ? void 0 : _e2.calcCellAutoHeight) == null ? void 0 : _f2.call(_e2, info);
|
1943
1971
|
}, "interceptorAutoHeight"),
|
1972
|
+
interceptorAutoWidth: /* @__PURE__ */ __name(() => {
|
1973
|
+
var _a19, _b2, _c2, _d2, _e2, _f2;
|
1974
|
+
const skeleton = (_b2 = (_a19 = this._renderManagerService.getRenderById(unitId)) == null ? void 0 : _a19.with(SheetSkeletonManagerService).getWorksheetSkeleton(subUnitId)) == null ? void 0 : _b2.skeleton;
|
1975
|
+
if (!skeleton)
|
1976
|
+
return;
|
1977
|
+
const mergeCell = skeleton.worksheet.getMergedCell(row, col), info = {
|
1978
|
+
data: {
|
1979
|
+
...cell,
|
1980
|
+
dataValidation: {
|
1981
|
+
ruleId,
|
1982
|
+
validStatus,
|
1983
|
+
rule,
|
1984
|
+
validator
|
1985
|
+
}
|
1986
|
+
},
|
1987
|
+
style: skeleton.getsStyles().getStyleByCell(cell),
|
1988
|
+
primaryWithCoord: skeleton.getCellByIndex((_c2 = mergeCell == null ? void 0 : mergeCell.startRow) != null ? _c2 : row, (_d2 = mergeCell == null ? void 0 : mergeCell.startColumn) != null ? _d2 : col),
|
1989
|
+
unitId,
|
1990
|
+
subUnitId,
|
1991
|
+
row,
|
1992
|
+
col,
|
1993
|
+
workbook,
|
1994
|
+
worksheet
|
1995
|
+
};
|
1996
|
+
return (_f2 = (_e2 = validator == null ? void 0 : validator.canvasRender) == null ? void 0 : _e2.calcCellAutoWidth) == null ? void 0 : _f2.call(_e2, info);
|
1997
|
+
}, "interceptorAutoWidth"),
|
1944
1998
|
coverable: ((_f = cell == null ? void 0 : cell.coverable) != null ? _f : !0) && !(rule.type === DataValidationType.LIST || rule.type === DataValidationType.LIST_MULTIPLE)
|
1945
1999
|
});
|
1946
2000
|
}, "handler")
|
@@ -2223,23 +2277,30 @@ function CheckboxFormulaInput(props) {
|
|
2223
2277
|
__name(CheckboxFormulaInput, "CheckboxFormulaInput");
|
2224
2278
|
function CustomFormulaInput(props) {
|
2225
2279
|
var _a18;
|
2226
|
-
const { unitId, subUnitId, value, onChange, showError, validResult } = props, formula1Res = showError ? validResult == null ? void 0 : validResult.formula1 :
|
2227
|
-
return
|
2228
|
-
|
2280
|
+
const { unitId, subUnitId, value, onChange, showError, validResult } = props, formula1Res = showError ? validResult == null ? void 0 : validResult.formula1 : void 0, formulaEditorActionsRef = useRef({}), [isFocusFormulaEditor, isFocusFormulaEditorSet] = useState(!1);
|
2281
|
+
return useSidebarClick((e) => {
|
2282
|
+
var _a19;
|
2283
|
+
const handleOutClick = (_a19 = formulaEditorActionsRef.current) == null ? void 0 : _a19.handleOutClick;
|
2284
|
+
handleOutClick && handleOutClick(e, () => isFocusFormulaEditorSet(!1));
|
2285
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
2286
|
+
FormulaEditor,
|
2229
2287
|
{
|
2230
|
-
|
2231
|
-
|
2232
|
-
|
2288
|
+
initValue: (_a18 = value == null ? void 0 : value.formula1) != null ? _a18 : "",
|
2289
|
+
unitId,
|
2290
|
+
subUnitId,
|
2291
|
+
isFocus: isFocusFormulaEditor,
|
2292
|
+
onChange: /* @__PURE__ */ __name((v = "") => {
|
2293
|
+
const formula = v || "";
|
2233
2294
|
onChange == null || onChange({
|
2234
2295
|
...value,
|
2235
|
-
formula1:
|
2296
|
+
formula1: formula.trim()
|
2236
2297
|
});
|
2237
2298
|
}, "onChange"),
|
2238
|
-
|
2239
|
-
|
2240
|
-
|
2299
|
+
errorText: formula1Res,
|
2300
|
+
onFocus: /* @__PURE__ */ __name(() => isFocusFormulaEditorSet(!0), "onFocus"),
|
2301
|
+
actions: formulaEditorActionsRef.current
|
2241
2302
|
}
|
2242
|
-
)
|
2303
|
+
);
|
2243
2304
|
}
|
2244
2305
|
__name(CustomFormulaInput, "CustomFormulaInput");
|
2245
2306
|
function r(e) {
|
@@ -2432,8 +2493,12 @@ function ListFormulaInput(props) {
|
|
2432
2493
|
}), setFormulaStr("="), setLocalError(localeService.t("dataValidation.validFail.formulaError")));
|
2433
2494
|
},
|
2434
2495
|
[formula2, onChange]
|
2435
|
-
);
|
2436
|
-
return
|
2496
|
+
), formulaEditorActionsRef = useRef({}), [isFocusFormulaEditor, isFocusFormulaEditorSet] = useState(!1);
|
2497
|
+
return useSidebarClick((e) => {
|
2498
|
+
var _a18;
|
2499
|
+
const handleOutClick = (_a18 = formulaEditorActionsRef.current) == null ? void 0 : _a18.handleOutClick;
|
2500
|
+
handleOutClick && handleOutClick(e, () => isFocusFormulaEditorSet(!1));
|
2501
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
2437
2502
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.list.options"), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
2438
2503
|
RadioGroup,
|
2439
2504
|
{
|
@@ -2451,20 +2516,22 @@ function ListFormulaInput(props) {
|
|
2451
2516
|
}
|
2452
2517
|
) }),
|
2453
2518
|
isFormulaStr === "1" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
2454
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
2455
|
-
|
2519
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
2520
|
+
FormulaEditor,
|
2456
2521
|
{
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
const str = (newString != null ? newString : "").trim();
|
2522
|
+
initValue: formulaStr,
|
2523
|
+
unitId,
|
2524
|
+
subUnitId,
|
2525
|
+
isFocus: isFocusFormulaEditor,
|
2526
|
+
onChange: /* @__PURE__ */ __name((v = "") => {
|
2527
|
+
const str = (v != null ? v : "").trim();
|
2464
2528
|
setFormulaStrCopy(str), updateFormula(str);
|
2465
|
-
}, "onChange")
|
2529
|
+
}, "onChange"),
|
2530
|
+
errorText: formula1Res || localError || void 0,
|
2531
|
+
onFocus: /* @__PURE__ */ __name(() => isFocusFormulaEditorSet(!0), "onFocus"),
|
2532
|
+
actions: formulaEditorActionsRef.current
|
2466
2533
|
}
|
2467
|
-
)
|
2534
|
+
),
|
2468
2535
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, children: refFinalList.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(Template, { item, commonProps: { onItemChange: handleRefItemChange }, style: { marginBottom: 12 } }, item.id)) }) })
|
2469
2536
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, style: { marginTop: "-12px" }, children: [
|
2470
2537
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -2598,12 +2665,18 @@ let CheckboxRender = (_a11 = class {
|
|
2598
2665
|
const { style } = info;
|
2599
2666
|
return ((_a18 = style == null ? void 0 : style.fs) != null ? _a18 : 10) * 1.6;
|
2600
2667
|
}
|
2668
|
+
calcCellAutoWidth(info) {
|
2669
|
+
var _a18;
|
2670
|
+
const { style } = info;
|
2671
|
+
return ((_a18 = style == null ? void 0 : style.fs) != null ? _a18 : 10) * 1.6;
|
2672
|
+
}
|
2601
2673
|
async _parseFormula(rule, unitId, subUnitId) {
|
2602
|
-
var _a18, _b;
|
2603
|
-
const { formula1 = CHECKBOX_FORMULA_1, formula2 = CHECKBOX_FORMULA_2 } = rule, results = await this._formulaService.getRuleFormulaResult(unitId, subUnitId, rule.uid);
|
2674
|
+
var _a18, _b, _c;
|
2675
|
+
const { formula1 = CHECKBOX_FORMULA_1, formula2 = CHECKBOX_FORMULA_2 } = rule, results = await this._formulaService.getRuleFormulaResult(unitId, subUnitId, rule.uid), formulaResult1 = getFormulaResult((_a18 = results == null ? void 0 : results[0]) == null ? void 0 : _a18.result), formulaResult2 = getFormulaResult((_b = results == null ? void 0 : results[1]) == null ? void 0 : _b.result), isFormulaValid = isLegalFormulaResult(String(formulaResult1)) && isLegalFormulaResult(String(formulaResult2));
|
2604
2676
|
return {
|
2605
|
-
formula1: isFormulaString(formula1) ? getFormulaResult((
|
2606
|
-
formula2: isFormulaString(formula2) ?
|
2677
|
+
formula1: isFormulaString(formula1) ? getFormulaResult((_c = results == null ? void 0 : results[0]) == null ? void 0 : _c.result) : formula1,
|
2678
|
+
formula2: isFormulaString(formula2) ? formulaResult2 : formula2,
|
2679
|
+
isFormulaValid
|
2607
2680
|
};
|
2608
2681
|
}
|
2609
2682
|
drawWith(ctx, info) {
|
@@ -2737,7 +2810,7 @@ function getDropdownItemSize(text, fontStyle) {
|
|
2737
2810
|
}
|
2738
2811
|
__name(getDropdownItemSize, "getDropdownItemSize");
|
2739
2812
|
function layoutDropdowns(items, fontStyle, cellWidth, cellHeight) {
|
2740
|
-
const
|
2813
|
+
const cellPaddingH = ICON_PLACE$1 + CELL_PADDING_H * 2, widthAvailableForContent = cellWidth - cellPaddingH, heightAvailableForContent = cellHeight - CELL_PADDING_V * 2, textLayout = items.map((item) => ({
|
2741
2814
|
layout: getDropdownItemSize(item, fontStyle),
|
2742
2815
|
text: item
|
2743
2816
|
}));
|
@@ -2745,7 +2818,7 @@ function layoutDropdowns(items, fontStyle, cellWidth, cellHeight) {
|
|
2745
2818
|
const lines = [];
|
2746
2819
|
textLayout.forEach((item) => {
|
2747
2820
|
const { layout } = item, { width, height } = layout;
|
2748
|
-
!currentLine || currentLine.width + width + MARGIN_H$1 >
|
2821
|
+
!currentLine || currentLine.width + width + MARGIN_H$1 > widthAvailableForContent ? (currentLine = {
|
2749
2822
|
width,
|
2750
2823
|
height,
|
2751
2824
|
items: [{
|
@@ -2757,15 +2830,16 @@ function layoutDropdowns(items, fontStyle, cellWidth, cellHeight) {
|
|
2757
2830
|
left: currentLine.width + MARGIN_H$1
|
2758
2831
|
}), currentLine.width = currentLine.width + width + MARGIN_H$1);
|
2759
2832
|
});
|
2760
|
-
let totalHeight = 0;
|
2833
|
+
let totalHeight = 0, maxLineWidth = 0;
|
2761
2834
|
return lines.forEach((line, index) => {
|
2762
|
-
index === lines.length - 1 ? totalHeight += line.height : totalHeight += line.height + MARGIN_V$1;
|
2835
|
+
maxLineWidth = Math.max(maxLineWidth, line.width), index === lines.length - 1 ? totalHeight += line.height : totalHeight += line.height + MARGIN_V$1;
|
2763
2836
|
}), {
|
2764
2837
|
lines,
|
2765
2838
|
totalHeight,
|
2766
|
-
contentWidth,
|
2767
|
-
contentHeight,
|
2768
|
-
cellAutoHeight: totalHeight + CELL_PADDING_V * 2
|
2839
|
+
contentWidth: widthAvailableForContent,
|
2840
|
+
contentHeight: heightAvailableForContent,
|
2841
|
+
cellAutoHeight: totalHeight + CELL_PADDING_V * 2,
|
2842
|
+
calcAutoWidth: maxLineWidth + cellPaddingH
|
2769
2843
|
};
|
2770
2844
|
}
|
2771
2845
|
__name(layoutDropdowns, "layoutDropdowns");
|
@@ -2877,6 +2951,19 @@ let DropdownMultipleWidget = (_a13 = class {
|
|
2877
2951
|
const cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, cellValue = (_a18 = getCellValueOrigin(data)) != null ? _a18 : "", { validator: _validator } = validation, items = _validator.parseCellValue(cellValue), fontStyle = getFontStyleString(style != null ? style : void 0);
|
2878
2952
|
return layoutDropdowns(items, fontStyle, cellWidth, cellHeight).cellAutoHeight;
|
2879
2953
|
}
|
2954
|
+
calcCellAutoWidth(info) {
|
2955
|
+
var _a18;
|
2956
|
+
const { primaryWithCoord, style, data } = info, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, cellBounding = {
|
2957
|
+
startX: _cellBounding.startX + leftOffset,
|
2958
|
+
endX: _cellBounding.endX - rightOffset,
|
2959
|
+
startY: _cellBounding.startY + topOffset,
|
2960
|
+
endY: _cellBounding.endY - downOffset
|
2961
|
+
}, validation = data.dataValidation;
|
2962
|
+
if (!validation)
|
2963
|
+
return;
|
2964
|
+
const cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, cellValue = (_a18 = getCellValueOrigin(data)) != null ? _a18 : "", { validator: _validator } = validation, items = _validator.parseCellValue(cellValue), fontStyle = getFontStyleString(style != null ? style : void 0);
|
2965
|
+
return layoutDropdowns(items, fontStyle, cellWidth, cellHeight).calcAutoWidth;
|
2966
|
+
}
|
2880
2967
|
isHit(position, info) {
|
2881
2968
|
const { primaryWithCoord } = info, cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, { endX } = cellBounding, { x } = position;
|
2882
2969
|
return x >= endX - ICON_PLACE$1 && x <= endX;
|
@@ -2901,6 +2988,7 @@ const _ListMultipleValidatorView = class _ListMultipleValidatorView extends Base
|
|
2901
2988
|
super(...arguments);
|
2902
2989
|
__publicField(this, "id", DataValidationType.LIST_MULTIPLE);
|
2903
2990
|
__publicField(this, "canvasRender", this.injector.createInstance(DropdownMultipleWidget));
|
2991
|
+
__publicField(this, "dropdown", LIST_DROPDOWN_KEY);
|
2904
2992
|
}
|
2905
2993
|
};
|
2906
2994
|
__name(_ListMultipleValidatorView, "ListMultipleValidatorView");
|
@@ -2910,7 +2998,7 @@ var __defProp$3 = Object.defineProperty, __getOwnPropDesc$3 = Object.getOwnPrope
|
|
2910
2998
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
2911
2999
|
return kind && result && __defProp$3(target, key, result), result;
|
2912
3000
|
}, "__decorateClass$3"), __decorateParam$3 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$3");
|
2913
|
-
const PADDING_H = 4, ICON_SIZE = 4, ICON_PLACE = 14, MARGIN_H = 6, MARGIN_V = 4, DROP_DOWN_ICON_COLOR = "#565656", downPath = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
3001
|
+
const PADDING_H = 4, ICON_SIZE = 4, ICON_PLACE = 14, MARGIN_H = 6, MARGIN_V = 4, RADIUS_BG = 8, DROP_DOWN_ICON_COLOR = "#565656", downPath = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
2914
3002
|
function convertToDocumentData(text, style) {
|
2915
3003
|
const contentLength = text.length;
|
2916
3004
|
return {
|
@@ -3074,7 +3162,7 @@ let DropdownWidget = (_a14 = class {
|
|
3074
3162
|
width: rectWidth,
|
3075
3163
|
height: rectHeight,
|
3076
3164
|
fill: (activeItem == null ? void 0 : activeItem.color) || DROP_DOWN_DEFAULT_COLOR,
|
3077
|
-
radius:
|
3165
|
+
radius: RADIUS_BG
|
3078
3166
|
}), ctx.save(), ctx.translateWithPrecision(PADDING_H, 0), ctx.beginPath(), ctx.rect(0, 0, realWidth, fontHeight), ctx.clip(), ctx.translateWithPrecision(paddingLeft, 0), documents.render(ctx), ctx.restore(), ctx.translateWithPrecision(realWidth + PADDING_H + 4, (fontHeight - ICON_SIZE) / 2), ctx.fillStyle = DROP_DOWN_ICON_COLOR, ctx.fill(downPath), ctx.restore(), map.set(key, {
|
3079
3167
|
left: cellBounding.startX + MARGIN_H + skeleton.rowHeaderWidth,
|
3080
3168
|
top: cellBounding.startY + paddingTop + skeleton.columnHeaderHeight,
|
@@ -3110,6 +3198,33 @@ let DropdownWidget = (_a14 = class {
|
|
3110
3198
|
return fontHeight + MARGIN_V * 2;
|
3111
3199
|
}
|
3112
3200
|
}
|
3201
|
+
calcCellAutoWidth(info) {
|
3202
|
+
var _a18;
|
3203
|
+
const { primaryWithCoord, style, data } = info, cellRange = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, rule = (_a18 = data.dataValidation) == null ? void 0 : _a18.rule;
|
3204
|
+
if (!rule || rule.renderMode === DataValidationRenderMode.TEXT) return;
|
3205
|
+
const cellBounding = {
|
3206
|
+
startX: cellRange.startX + leftOffset,
|
3207
|
+
endX: cellRange.endX - rightOffset,
|
3208
|
+
startY: cellRange.startY + topOffset,
|
3209
|
+
endY: cellRange.endY - downOffset
|
3210
|
+
}, cellWidth = cellBounding.endX - cellBounding.startX, value = getCellValueOrigin(data), valueStr = `${value != null ? value : ""}`;
|
3211
|
+
let { tb, pd } = style || {};
|
3212
|
+
const { l: l2 = DEFAULT_STYLES.pd.l, r: r2 = DEFAULT_STYLES.pd.r } = pd != null ? pd : {};
|
3213
|
+
tb = tb != null ? tb : WrapStrategy.WRAP;
|
3214
|
+
let paddingAll = MARGIN_H * 2 + ICON_PLACE;
|
3215
|
+
switch (rule.renderMode) {
|
3216
|
+
case DataValidationRenderMode.ARROW:
|
3217
|
+
paddingAll = ICON_PLACE + MARGIN_H * 2 + r2 + l2;
|
3218
|
+
break;
|
3219
|
+
case DataValidationRenderMode.CUSTOM:
|
3220
|
+
paddingAll = ICON_PLACE + MARGIN_H * 2 + PADDING_H * 2 + r2 + l2 + RADIUS_BG / 2 + 1;
|
3221
|
+
break;
|
3222
|
+
default:
|
3223
|
+
paddingAll = ICON_PLACE + MARGIN_H * 2 + PADDING_H * 2 + r2 + l2 + RADIUS_BG / 2 + 1;
|
3224
|
+
}
|
3225
|
+
const widthForTextLayout = cellWidth - paddingAll, { documentSkeleton, docModel } = createDocuments(valueStr, this._localeService, style);
|
3226
|
+
return tb === WrapStrategy.WRAP && docModel.updateDocumentDataPageSize(Math.max(widthForTextLayout, 1)), documentSkeleton.calculate(), documentSkeleton.getActualSize(), getDocsSkeletonPageSize(documentSkeleton).width + paddingAll;
|
3227
|
+
}
|
3113
3228
|
isHit(position, info) {
|
3114
3229
|
const { data, subUnitId, row, col } = info, dropdownInfo = this._ensureMap(subUnitId).get(this._generateKey(row, col)), validation = data.dataValidation;
|
3115
3230
|
if (!validation || !dropdownInfo || validation.rule.renderMode === DataValidationRenderMode.TEXT)
|
@@ -0,0 +1,176 @@
|
|
1
|
+
const locale = {
|
2
|
+
dataValidation: {
|
3
|
+
title: "Data validation",
|
4
|
+
validFail: {
|
5
|
+
value: "Please input a value",
|
6
|
+
common: "Please input value or formula",
|
7
|
+
number: "Please input number or formula",
|
8
|
+
formula: "Please input formula",
|
9
|
+
integer: "Please input integer or formula",
|
10
|
+
date: "Please input date or formula",
|
11
|
+
list: "Please input options",
|
12
|
+
listInvalid: "The list source must be a delimited list or a reference to a single row or column",
|
13
|
+
checkboxEqual: "Enter different values for ticked and unticked cell contents.",
|
14
|
+
formulaError: "The reference range contains invisible data, please readjust the range",
|
15
|
+
listIntersects: "The selected range cannot intersect with the scope of the rules",
|
16
|
+
primitive: "Formulas are not permitted for custom ticked and unticked values."
|
17
|
+
},
|
18
|
+
panel: {
|
19
|
+
title: "Data validation management",
|
20
|
+
addTitle: "Create new data validation",
|
21
|
+
removeAll: "Remove All",
|
22
|
+
add: "Add Rule",
|
23
|
+
range: "Ranges",
|
24
|
+
type: "Type",
|
25
|
+
options: "Advance options",
|
26
|
+
operator: "Operator",
|
27
|
+
removeRule: "Remove",
|
28
|
+
done: "Done",
|
29
|
+
formulaPlaceholder: "Please input value or formula",
|
30
|
+
valuePlaceholder: "Please input value",
|
31
|
+
formulaAnd: "and",
|
32
|
+
invalid: "Invalid",
|
33
|
+
showWarning: "Show warning",
|
34
|
+
rejectInput: "Reject input",
|
35
|
+
messageInfo: "Helper message",
|
36
|
+
showInfo: "Show help text for a selected cell",
|
37
|
+
rangeError: "Ranges are not legal",
|
38
|
+
allowBlank: "Allow blank values"
|
39
|
+
},
|
40
|
+
operators: {
|
41
|
+
between: "between",
|
42
|
+
greaterThan: "greater than",
|
43
|
+
greaterThanOrEqual: "greater than or equal",
|
44
|
+
lessThan: "less than",
|
45
|
+
lessThanOrEqual: "less than or equal",
|
46
|
+
equal: "equal",
|
47
|
+
notEqual: "not equal",
|
48
|
+
notBetween: "not between"
|
49
|
+
},
|
50
|
+
ruleName: {
|
51
|
+
between: "is between {FORMULA1} and {FORMULA2}",
|
52
|
+
greaterThan: "is greater than {FORMULA1}",
|
53
|
+
greaterThanOrEqual: "is greater than or equal to {FORMULA1}",
|
54
|
+
lessThan: "is less than {FORMULA1}",
|
55
|
+
lessThanOrEqual: "is less than or equal to {FORMULA1}",
|
56
|
+
equal: "is equal to {FORMULA1}",
|
57
|
+
notEqual: "is not equal to {FORMULA1}",
|
58
|
+
notBetween: "is not between {FORMULA1} and {FORMULA2}"
|
59
|
+
},
|
60
|
+
errorMsg: {
|
61
|
+
between: "Value must be between {FORMULA1} and {FORMULA2}",
|
62
|
+
greaterThan: "Value must be greater than {FORMULA1}",
|
63
|
+
greaterThanOrEqual: "Value must be greater than or equal to {FORMULA1}",
|
64
|
+
lessThan: "Value must be less than {FORMULA1}",
|
65
|
+
lessThanOrEqual: "Value must be less than or equal to {FORMULA1}",
|
66
|
+
equal: "Value must be equal to {FORMULA1}",
|
67
|
+
notEqual: "Value must be not equal to {FORMULA1}",
|
68
|
+
notBetween: "Value must be not between {FORMULA1} and {FORMULA2}"
|
69
|
+
},
|
70
|
+
any: {
|
71
|
+
title: "Any value",
|
72
|
+
error: "The content of this cell violates the validation rule"
|
73
|
+
},
|
74
|
+
date: {
|
75
|
+
title: "Date",
|
76
|
+
operators: {
|
77
|
+
between: "between",
|
78
|
+
greaterThan: "after",
|
79
|
+
greaterThanOrEqual: "on or after",
|
80
|
+
lessThan: "before",
|
81
|
+
lessThanOrEqual: "on or before",
|
82
|
+
equal: "equal",
|
83
|
+
notEqual: "not equal",
|
84
|
+
notBetween: "not between"
|
85
|
+
},
|
86
|
+
ruleName: {
|
87
|
+
between: "is between {FORMULA1} and {FORMULA2}",
|
88
|
+
greaterThan: "is after {FORMULA1}",
|
89
|
+
greaterThanOrEqual: "is on or after {FORMULA1}",
|
90
|
+
lessThan: "is before {FORMULA1}",
|
91
|
+
lessThanOrEqual: "is on or before {FORMULA1}",
|
92
|
+
equal: "is {FORMULA1}",
|
93
|
+
notEqual: "is not {FORMULA1}",
|
94
|
+
notBetween: "is not between {FORMULA1}"
|
95
|
+
},
|
96
|
+
errorMsg: {
|
97
|
+
between: "Value must be a legal date and between {FORMULA1} and {FORMULA2}",
|
98
|
+
greaterThan: "Value must be a legal date and after {FORMULA1}",
|
99
|
+
greaterThanOrEqual: "Value must be a legal date and on or after {FORMULA1}",
|
100
|
+
lessThan: "Value must be a legal date and before {FORMULA1}",
|
101
|
+
lessThanOrEqual: "Value must be a legal date and on or before {FORMULA1}",
|
102
|
+
equal: "Value must be a legal date and {FORMULA1}",
|
103
|
+
notEqual: "Value must be a legal date and not {FORMULA1}",
|
104
|
+
notBetween: "Value must be a legal date and not between {FORMULA1}"
|
105
|
+
}
|
106
|
+
},
|
107
|
+
list: {
|
108
|
+
title: "Dropdown",
|
109
|
+
name: "Value contains one from range",
|
110
|
+
error: "Input must fall within specified range",
|
111
|
+
emptyError: "Please enter a value",
|
112
|
+
add: "Add",
|
113
|
+
dropdown: "Select",
|
114
|
+
options: "Options",
|
115
|
+
customOptions: "Custom",
|
116
|
+
refOptions: "From a range",
|
117
|
+
formulaError: "The list source must be a delimited list of data, or a reference to a single row or column.",
|
118
|
+
edit: "Edit"
|
119
|
+
},
|
120
|
+
listMultiple: {
|
121
|
+
title: "Dropdown-Multiple",
|
122
|
+
dropdown: "Multiple select"
|
123
|
+
},
|
124
|
+
textLength: {
|
125
|
+
title: "Text length",
|
126
|
+
errorMsg: {
|
127
|
+
between: "Text length must be between {FORMULA1} and {FORMULA2}",
|
128
|
+
greaterThan: "Text length must be after {FORMULA1}",
|
129
|
+
greaterThanOrEqual: "Text length must be on or after {FORMULA1}",
|
130
|
+
lessThan: "Text length must be before {FORMULA1}",
|
131
|
+
lessThanOrEqual: "Text length must be on or before {FORMULA1}",
|
132
|
+
equal: "Text length must be {FORMULA1}",
|
133
|
+
notEqual: "Text length must be not {FORMULA1}",
|
134
|
+
notBetween: "Text length must be not between {FORMULA1}"
|
135
|
+
}
|
136
|
+
},
|
137
|
+
decimal: {
|
138
|
+
title: "Number"
|
139
|
+
},
|
140
|
+
whole: {
|
141
|
+
title: "Integer"
|
142
|
+
},
|
143
|
+
checkbox: {
|
144
|
+
title: "Checkbox",
|
145
|
+
error: "This cell's contents violate its validation rule",
|
146
|
+
tips: "Use custom values within cells",
|
147
|
+
checked: "Selected value",
|
148
|
+
unchecked: "Unselected value"
|
149
|
+
},
|
150
|
+
custom: {
|
151
|
+
title: "Custom formula",
|
152
|
+
error: "This cell's contents violate its validation rule",
|
153
|
+
validFail: "Please input a valid formula",
|
154
|
+
ruleName: "Custom formula is {FORMULA1}"
|
155
|
+
},
|
156
|
+
alert: {
|
157
|
+
title: "Error",
|
158
|
+
ok: "OK"
|
159
|
+
},
|
160
|
+
error: {
|
161
|
+
title: "Invalid:"
|
162
|
+
},
|
163
|
+
renderMode: {
|
164
|
+
arrow: "Arrow",
|
165
|
+
chip: "Chip",
|
166
|
+
text: "Plain text",
|
167
|
+
label: "Display style"
|
168
|
+
},
|
169
|
+
showTime: {
|
170
|
+
label: "Show TimePicker"
|
171
|
+
}
|
172
|
+
}
|
173
|
+
};
|
174
|
+
export {
|
175
|
+
locale as default
|
176
|
+
};
|