@univerjs/sheets-table-ui 1.0.3 → 1.1.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.
Files changed (83) hide show
  1. package/lib/cjs/index.js +257 -66
  2. package/lib/cjs/locale/ar-SA.js +3 -0
  3. package/lib/cjs/locale/ca-ES.js +3 -0
  4. package/lib/cjs/locale/de-DE.js +3 -0
  5. package/lib/cjs/locale/en-US.js +3 -0
  6. package/lib/cjs/locale/es-ES.js +3 -0
  7. package/lib/cjs/locale/fa-IR.js +3 -0
  8. package/lib/cjs/locale/fr-FR.js +3 -0
  9. package/lib/cjs/locale/id-ID.js +3 -0
  10. package/lib/cjs/locale/it-IT.js +3 -0
  11. package/lib/cjs/locale/ja-JP.js +3 -0
  12. package/lib/cjs/locale/ko-KR.js +3 -0
  13. package/lib/cjs/locale/pl-PL.js +3 -0
  14. package/lib/cjs/locale/pt-BR.js +3 -0
  15. package/lib/cjs/locale/ru-RU.js +3 -0
  16. package/lib/cjs/locale/sk-SK.js +3 -0
  17. package/lib/cjs/locale/vi-VN.js +3 -0
  18. package/lib/cjs/locale/zh-CN.js +3 -0
  19. package/lib/cjs/locale/zh-HK.js +3 -0
  20. package/lib/cjs/locale/zh-TW.js +3 -0
  21. package/lib/es/index.js +260 -69
  22. package/lib/es/locale/ar-SA.js +3 -0
  23. package/lib/es/locale/ca-ES.js +3 -0
  24. package/lib/es/locale/de-DE.js +3 -0
  25. package/lib/es/locale/en-US.js +3 -0
  26. package/lib/es/locale/es-ES.js +3 -0
  27. package/lib/es/locale/fa-IR.js +3 -0
  28. package/lib/es/locale/fr-FR.js +3 -0
  29. package/lib/es/locale/id-ID.js +3 -0
  30. package/lib/es/locale/it-IT.js +3 -0
  31. package/lib/es/locale/ja-JP.js +3 -0
  32. package/lib/es/locale/ko-KR.js +3 -0
  33. package/lib/es/locale/pl-PL.js +3 -0
  34. package/lib/es/locale/pt-BR.js +3 -0
  35. package/lib/es/locale/ru-RU.js +3 -0
  36. package/lib/es/locale/sk-SK.js +3 -0
  37. package/lib/es/locale/vi-VN.js +3 -0
  38. package/lib/es/locale/zh-CN.js +3 -0
  39. package/lib/es/locale/zh-HK.js +3 -0
  40. package/lib/es/locale/zh-TW.js +3 -0
  41. package/lib/index.js +260 -69
  42. package/lib/locale/ar-SA.js +3 -0
  43. package/lib/locale/ca-ES.js +3 -0
  44. package/lib/locale/de-DE.js +3 -0
  45. package/lib/locale/en-US.js +3 -0
  46. package/lib/locale/es-ES.js +3 -0
  47. package/lib/locale/fa-IR.js +3 -0
  48. package/lib/locale/fr-FR.js +3 -0
  49. package/lib/locale/id-ID.js +3 -0
  50. package/lib/locale/it-IT.js +3 -0
  51. package/lib/locale/ja-JP.js +3 -0
  52. package/lib/locale/ko-KR.js +3 -0
  53. package/lib/locale/pl-PL.js +3 -0
  54. package/lib/locale/pt-BR.js +3 -0
  55. package/lib/locale/ru-RU.js +3 -0
  56. package/lib/locale/sk-SK.js +3 -0
  57. package/lib/locale/vi-VN.js +3 -0
  58. package/lib/locale/zh-CN.js +3 -0
  59. package/lib/locale/zh-HK.js +3 -0
  60. package/lib/locale/zh-TW.js +3 -0
  61. package/lib/types/locale/en-US.d.ts +3 -0
  62. package/lib/types/views/widgets/table-filter-button.shape.d.ts +2 -1
  63. package/lib/umd/index.js +2 -2
  64. package/lib/umd/locale/ar-SA.js +1 -1
  65. package/lib/umd/locale/ca-ES.js +1 -1
  66. package/lib/umd/locale/de-DE.js +1 -1
  67. package/lib/umd/locale/en-US.js +1 -1
  68. package/lib/umd/locale/es-ES.js +1 -1
  69. package/lib/umd/locale/fa-IR.js +1 -1
  70. package/lib/umd/locale/fr-FR.js +1 -1
  71. package/lib/umd/locale/id-ID.js +1 -1
  72. package/lib/umd/locale/it-IT.js +1 -1
  73. package/lib/umd/locale/ja-JP.js +1 -1
  74. package/lib/umd/locale/ko-KR.js +1 -1
  75. package/lib/umd/locale/pl-PL.js +1 -1
  76. package/lib/umd/locale/pt-BR.js +1 -1
  77. package/lib/umd/locale/ru-RU.js +1 -1
  78. package/lib/umd/locale/sk-SK.js +1 -1
  79. package/lib/umd/locale/vi-VN.js +1 -1
  80. package/lib/umd/locale/zh-CN.js +1 -1
  81. package/lib/umd/locale/zh-HK.js +1 -1
  82. package/lib/umd/locale/zh-TW.js +1 -1
  83. package/package.json +15 -15
package/lib/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { AddSheetTableCommand, AddTableThemeCommand, DeleteSheetTableCommand, RemoveTableThemeCommand, SHEET_TABLE_CUSTOM_THEME_PREFIX, SetSheetTableCommand, SetSheetTableFilterCommand, SetSheetTableFilterMutation, SetSheetTableMutation, SetSheetTableSortStateCommand, SheetTableInsertColCommand, SheetTableInsertColumnAtCommand, SheetTableInsertRowAtCommand, SheetTableInsertRowCommand, SheetTableRemoveColCommand, SheetTableRemoveColumnAtCommand, SheetTableRemoveRowCommand, SheetTableService, SheetsTableController, SheetsTableSortStateEnum, TABLE_FILTER_EMPTY_VALUE, TableColumnFilterTypeEnum, TableConditionTypeEnum, TableDateCompareTypeEnum, TableManager, TableNumberCompareTypeEnum, TableStringCompareTypeEnum, UniverSheetsTablePlugin, compileTableRecordFilter, customEmptyThemeWithBorderStyle, getExistingNamesSet, getTableRecordValue, getTableRecordValueKey, isColorTableFilter, isConditionFilter, isManualTableFilter, isRecordTableFilter, processStyleWithBorderStyle, validateSheetTableName } from "@univerjs/sheets-table";
1
+ import { AddSheetTableCommand, AddTableThemeCommand, DeleteSheetTableCommand, RemoveTableThemeCommand, SHEET_TABLE_CUSTOM_THEME_PREFIX, SetSheetTableCommand, SetSheetTableFilterCommand, SetSheetTableFilterMutation, SetSheetTableMutation, SetSheetTableSortStateCommand, SheetTableInsertColCommand, SheetTableInsertColumnAtCommand, SheetTableInsertRowAtCommand, SheetTableInsertRowCommand, SheetTableRemoveColCommand, SheetTableRemoveColumnAtCommand, SheetTableRemoveRowCommand, SheetTableService, SheetsTableButtonStateEnum, SheetsTableController, SheetsTableSortStateEnum, TABLE_FILTER_EMPTY_VALUE, TableColumnFilterTypeEnum, TableConditionTypeEnum, TableDateCompareTypeEnum, TableManager, TableNumberCompareTypeEnum, TableStringCompareTypeEnum, UniverSheetsTablePlugin, compileTableRecordFilter, customEmptyThemeWithBorderStyle, getExistingNamesSet, getTableRecordValue, getTableRecordValueKey, isColorTableFilter, isConditionFilter, isManualTableFilter, isRecordTableFilter, processStyleWithBorderStyle, validateSheetTableName } from "@univerjs/sheets-table";
2
2
  import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IDialogService, IMenuManagerService, ISidebarService, IconManager, MenuItemType, MobileDrawer, RibbonDataGroup, UniverMobileUIPlugin, getMenuHiddenObservable, useDependency, useObservable } from "@univerjs/ui";
3
3
  import { ColorKit, CommandType, DEFAULT_STYLES, DependentOn, Disposable, ErrorService, FilterSelectionMode, ICommandService, IConfigService, IContextService, IPermissionService, IUndoRedoService, IUniverInstanceService, Inject, Injector, InterceptorEffectEnum, LocaleService, ObjectMatrix, Plugin, RecordValueType, Rectangle, RxDisposable, UniverInstanceType, VerticalAlign, cellToRange, fromCallback, generateRandomId, getColorStyle, merge, registerDependencies, toDisposable, touchDependencies } from "@univerjs/core";
4
4
  import { INTERCEPTOR_POINT, RangeThemeStyle, SelectRangeCommand, SetRangeThemeMutation, SetRangeValuesMutation, SetSelectionsOperation, SetVerticalTextAlignCommand, SheetInterceptorService, SheetRangeThemeModel, SheetsSelectionsService, UniverSheetsPlugin, WorkbookEditablePermission, WorkbookPermissionService, expandToContinuousRange, getPrimaryForRange, getSheetCommandTarget, isSingleCellSelection } from "@univerjs/sheets";
5
- import { ExpandSelectionCommand, ISheetSelectionRenderService, MoveSelectionCommand, MoveSelectionEnterAndTabCommand, SHEET_VIEW_KEY, SelectAllCommand, SetScrollOperation, SetZoomRatioOperation, SheetCanvasPopManagerService, SheetSkeletonManagerService, UniverSheetsMobileUIPlugin, UniverSheetsUIPlugin, getCoordByCell, getCurrentRangeDisable$, getTransformCoord } from "@univerjs/sheets-ui";
5
+ import { ExpandSelectionCommand, ISheetSelectionRenderService, MoveSelectionCommand, MoveSelectionEnterAndTabCommand, SHEET_VIEW_KEY, SelectAllCommand, SetScrollOperation, SetZoomRatioOperation, SheetCanvasPopManagerService, SheetSkeletonManagerService, UniverSheetsMobileUIPlugin, UniverSheetsUIPlugin, getCoordByCell, getCurrentRangeDisable$ } from "@univerjs/sheets-ui";
6
6
  import { Subject, distinctUntilChanged, filter, map, merge as merge$1, of, startWith, switchMap, takeUntil } from "rxjs";
7
- import { CURSOR_TYPE, DEFAULT_FONTFACE_PLANE, IRenderManagerService, Shape, UniverRenderEnginePlugin } from "@univerjs/engine-render";
7
+ import { CURSOR_TYPE, DEFAULT_FONTFACE_PLANE, IRenderManagerService, Shape, UniverRenderEnginePlugin, Vector2 } from "@univerjs/engine-render";
8
8
  import { AIcon, AscendingIcon, BanIcon, CheckMarkIcon, CloseIcon, DeleteColumnDoubleIcon, DescendingIcon, DownIcon, IncreaseIcon, LeftInsertColumnDoubleIcon, MoreDownIcon, MoreLeftIcon, MoreRightIcon, RightInsertColumnDoubleIcon, SuccessIcon, TableIcon } from "@univerjs/icons";
9
- import { ActionRow, Button, ButtonGroup, CascaderList, Checkbox, ColorPicker, DatePicker, DateRangePicker, Dropdown, DropdownMenu, FormLayout, Input, InputNumber, MobileActionRow, MobileActionRowGroup, MobileColorPicker, MobileDropdown, MobileSelect, Segmented, Select, borderClassName, clsx, resetButtonClassName, scrollbarClassName } from "@univerjs/design";
9
+ import { ActionRow, Button, ButtonGroup, CascaderList, Checkbox, ColorPicker, DatePicker, DateRangePicker, Dropdown, DropdownMenu, FormLayout, Input, MobileActionRow, MobileActionRowGroup, MobileColorPicker, MobileDropdown, MobileSelect, Segmented, Select, borderClassName, clsx, resetButtonClassName, scrollbarClassName } from "@univerjs/design";
10
10
  import { SortRangeCommand, SortType } from "@univerjs/sheets-sort";
11
- import { useEffect, useMemo, useRef, useState } from "react";
11
+ import { useMemo, useRef, useState } from "react";
12
12
  import { createPortal } from "react-dom";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  import { IDefinedNamesService, deserializeRangeWithSheet, serializeRange } from "@univerjs/engine-formula";
@@ -253,10 +253,10 @@ const menuSchema = {
253
253
  //#endregion
254
254
  //#region package.json
255
255
  var name = "@univerjs/sheets-table-ui";
256
- var version = "1.0.3";
256
+ var version = "1.1.0";
257
257
 
258
258
  //#endregion
259
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
259
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
260
260
  function _typeof(o) {
261
261
  "@babel/helpers - typeof";
262
262
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -267,7 +267,7 @@ function _typeof(o) {
267
267
  }
268
268
 
269
269
  //#endregion
270
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
270
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
271
271
  function toPrimitive(t, r) {
272
272
  if ("object" != _typeof(t) || !t) return t;
273
273
  var e = t[Symbol.toPrimitive];
@@ -280,14 +280,14 @@ function toPrimitive(t, r) {
280
280
  }
281
281
 
282
282
  //#endregion
283
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
283
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
284
284
  function toPropertyKey(t) {
285
285
  var i = toPrimitive(t, "string");
286
286
  return "symbol" == _typeof(i) ? i : i + "";
287
287
  }
288
288
 
289
289
  //#endregion
290
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
290
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
291
291
  function _defineProperty(e, r, t) {
292
292
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
293
293
  value: t,
@@ -298,7 +298,7 @@ function _defineProperty(e, r, t) {
298
298
  }
299
299
 
300
300
  //#endregion
301
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorateParam.js
301
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
302
302
  function __decorateParam(paramIndex, decorator) {
303
303
  return function(target, key) {
304
304
  decorator(target, key, paramIndex);
@@ -306,7 +306,7 @@ function __decorateParam(paramIndex, decorator) {
306
306
  }
307
307
 
308
308
  //#endregion
309
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorate.js
309
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
310
310
  function __decorate(decorators, target, key, desc) {
311
311
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
312
312
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -535,7 +535,7 @@ let SheetsTableUiService = class SheetsTableUiService extends Disposable {
535
535
  const checkedItems = [];
536
536
  if (table) {
537
537
  const filter = table.getTableFilterColumn(columnIndex);
538
- if (isManualTableFilter(filter)) checkedItems.push(...filter.values.map((value) => value === TABLE_FILTER_EMPTY_VALUE ? this._localeService.t("sheets-table-ui.condition.empty") : value));
538
+ if (isManualTableFilter(filter)) checkedItems.push(...filter.values.map((value) => value === TABLE_FILTER_EMPTY_VALUE ? this._localeService.t("sheets-table-ui.condition.empty") : String(value)));
539
539
  else if (isRecordTableFilter(filter)) {
540
540
  const accepts = compileTableRecordFilter(filter);
541
541
  const items = this.getTableFilterItems(unitId, table.getSubunitId(), tableId, columnIndex);
@@ -651,9 +651,8 @@ let SheetsTableUiService = class SheetsTableUiService extends Disposable {
651
651
  let allItemsCount = 0;
652
652
  for (let row = startRow; row <= endRow; row++) {
653
653
  if (filteredRowsByOtherColumns.has(row)) continue;
654
- let stringItem = this._sheetTableService.getCellValueWithConditionType(worksheet, row, column);
655
- if (stringItem == null) stringItem = this._localeService.t("sheets-table-ui.condition.empty");
656
- if (useRecordValues && typeof stringItem !== "string") stringItem = String(stringItem);
654
+ const cellValue = this._sheetTableService.getCellValueWithConditionType(worksheet, row, column);
655
+ const stringItem = cellValue == null ? this._localeService.t("sheets-table-ui.condition.empty") : String(cellValue);
657
656
  const recordValue = useRecordValues ? getTableRecordValue(worksheet, row, column) : void 0;
658
657
  const valueKey = recordValue ? getTableRecordValueKey(recordValue) : void 0;
659
658
  const itemKey = valueKey ?? stringItem;
@@ -1136,10 +1135,79 @@ function getInitConditionInfo(tableFilter) {
1136
1135
  //#endregion
1137
1136
  //#region src/views/components/MobileSheetTableConditionPanel.tsx
1138
1137
  function MobileSheetTableConditionPanel(props) {
1139
- var _conditionInfo$info$d, _conditionInfo$info$d2, _conditionInfo$info$n, _conditionInfo$info$n3;
1138
+ var _conditionInfo$info$n, _conditionInfo$info$n2, _conditionInfo$info$n3, _conditionInfo$info$n7, _conditionInfo$info$n8, _conditionInfo$info$n9, _conditionInfo$info$d, _conditionInfo$info$d2;
1140
1139
  const { conditionInfo, onChange } = props;
1141
1140
  const localeService = useDependency(LocaleService);
1142
1141
  const injector = useDependency(Injector);
1142
+ const [numberDraftState, setNumberDraftState] = useState({
1143
+ value: conditionInfo.info.number,
1144
+ type: conditionInfo.type,
1145
+ compare: conditionInfo.compare,
1146
+ text: String(conditionInfo.info.number ?? "")
1147
+ });
1148
+ if (!Object.is(numberDraftState.value, conditionInfo.info.number) || numberDraftState.type !== conditionInfo.type || numberDraftState.compare !== conditionInfo.compare) setNumberDraftState({
1149
+ value: conditionInfo.info.number,
1150
+ type: conditionInfo.type,
1151
+ compare: conditionInfo.compare,
1152
+ text: String(conditionInfo.info.number ?? "")
1153
+ });
1154
+ const numberDraft = numberDraftState.text;
1155
+ const setNumberDraft = (text) => setNumberDraftState({
1156
+ value: conditionInfo.info.number,
1157
+ type: conditionInfo.type,
1158
+ compare: conditionInfo.compare,
1159
+ text
1160
+ });
1161
+ const [minDraftState, setMinDraftState] = useState({
1162
+ value: (_conditionInfo$info$n = conditionInfo.info.numberRange) === null || _conditionInfo$info$n === void 0 ? void 0 : _conditionInfo$info$n[0],
1163
+ type: conditionInfo.type,
1164
+ compare: conditionInfo.compare,
1165
+ text: String(((_conditionInfo$info$n2 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n2 === void 0 ? void 0 : _conditionInfo$info$n2[0]) ?? "")
1166
+ });
1167
+ if (!Object.is(minDraftState.value, (_conditionInfo$info$n3 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n3 === void 0 ? void 0 : _conditionInfo$info$n3[0]) || minDraftState.type !== conditionInfo.type || minDraftState.compare !== conditionInfo.compare) {
1168
+ var _conditionInfo$info$n4, _conditionInfo$info$n5;
1169
+ setMinDraftState({
1170
+ value: (_conditionInfo$info$n4 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n4 === void 0 ? void 0 : _conditionInfo$info$n4[0],
1171
+ type: conditionInfo.type,
1172
+ compare: conditionInfo.compare,
1173
+ text: String(((_conditionInfo$info$n5 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n5 === void 0 ? void 0 : _conditionInfo$info$n5[0]) ?? "")
1174
+ });
1175
+ }
1176
+ const minDraft = minDraftState.text;
1177
+ const setMinDraft = (text) => {
1178
+ var _conditionInfo$info$n6;
1179
+ return setMinDraftState({
1180
+ value: (_conditionInfo$info$n6 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n6 === void 0 ? void 0 : _conditionInfo$info$n6[0],
1181
+ type: conditionInfo.type,
1182
+ compare: conditionInfo.compare,
1183
+ text
1184
+ });
1185
+ };
1186
+ const [maxDraftState, setMaxDraftState] = useState({
1187
+ value: (_conditionInfo$info$n7 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n7 === void 0 ? void 0 : _conditionInfo$info$n7[1],
1188
+ type: conditionInfo.type,
1189
+ compare: conditionInfo.compare,
1190
+ text: String(((_conditionInfo$info$n8 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n8 === void 0 ? void 0 : _conditionInfo$info$n8[1]) ?? "")
1191
+ });
1192
+ if (!Object.is(maxDraftState.value, (_conditionInfo$info$n9 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n9 === void 0 ? void 0 : _conditionInfo$info$n9[1]) || maxDraftState.type !== conditionInfo.type || maxDraftState.compare !== conditionInfo.compare) {
1193
+ var _conditionInfo$info$n10, _conditionInfo$info$n11;
1194
+ setMaxDraftState({
1195
+ value: (_conditionInfo$info$n10 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n10 === void 0 ? void 0 : _conditionInfo$info$n10[1],
1196
+ type: conditionInfo.type,
1197
+ compare: conditionInfo.compare,
1198
+ text: String(((_conditionInfo$info$n11 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n11 === void 0 ? void 0 : _conditionInfo$info$n11[1]) ?? "")
1199
+ });
1200
+ }
1201
+ const maxDraft = maxDraftState.text;
1202
+ const setMaxDraft = (text) => {
1203
+ var _conditionInfo$info$n12;
1204
+ return setMaxDraftState({
1205
+ value: (_conditionInfo$info$n12 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n12 === void 0 ? void 0 : _conditionInfo$info$n12[1],
1206
+ type: conditionInfo.type,
1207
+ compare: conditionInfo.compare,
1208
+ text
1209
+ });
1210
+ };
1143
1211
  const [conditionVisible, setConditionVisible] = useState(false);
1144
1212
  const [defaultDate] = useState(() => /* @__PURE__ */ new Date());
1145
1213
  const cascaderOptions = getCascaderListOptions(injector);
@@ -1190,12 +1258,15 @@ function MobileSheetTableConditionPanel(props) {
1190
1258
  placeholder: localeService.t("sheets-table-ui.filter.input-values-placeholder"),
1191
1259
  value: conditionInfo.info.string,
1192
1260
  onChange: (value) => handleConditionInfo({ string: value })
1193
- }) : /* @__PURE__ */ jsx(InputNumber, {
1261
+ }) : /* @__PURE__ */ jsx(Input, {
1194
1262
  className: "univer-h-7 univer-w-full",
1195
- value: conditionInfo.info.number,
1196
- controls: false,
1263
+ inputMode: "decimal",
1264
+ value: numberDraft,
1265
+ "aria-invalid": numberDraft !== "" && !Number.isFinite(Number(numberDraft)),
1266
+ onBlur: () => setNumberDraft(String(conditionInfo.info.number ?? "")),
1197
1267
  onChange: (value) => {
1198
- if (value !== null) handleConditionInfo({ number: value });
1268
+ setNumberDraft(value);
1269
+ if (value.trim() !== "" && Number.isFinite(Number(value))) handleConditionInfo({ number: Number(value) });
1199
1270
  }
1200
1271
  }) }),
1201
1272
  subComponentType === "DatePicker" && /* @__PURE__ */ jsx("div", {
@@ -1217,26 +1288,38 @@ function MobileSheetTableConditionPanel(props) {
1217
1288
  subComponentType === "Inputs" && /* @__PURE__ */ jsxs("div", {
1218
1289
  className: "univer-flex univer-items-center univer-gap-2",
1219
1290
  children: [
1220
- /* @__PURE__ */ jsx(InputNumber, {
1291
+ /* @__PURE__ */ jsx(Input, {
1221
1292
  className: "univer-w-full",
1222
- value: (_conditionInfo$info$n = conditionInfo.info.numberRange) === null || _conditionInfo$info$n === void 0 ? void 0 : _conditionInfo$info$n[0],
1223
- controls: false,
1293
+ inputMode: "decimal",
1294
+ value: minDraft,
1295
+ "aria-invalid": minDraft !== "" && !Number.isFinite(Number(minDraft)),
1296
+ onBlur: () => {
1297
+ var _conditionInfo$info$n13;
1298
+ return setMinDraft(String(((_conditionInfo$info$n13 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n13 === void 0 ? void 0 : _conditionInfo$info$n13[0]) ?? ""));
1299
+ },
1224
1300
  onChange: (value) => {
1225
- if (value !== null) {
1226
- var _conditionInfo$info$n2;
1227
- handleConditionInfo({ numberRange: [value, (_conditionInfo$info$n2 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n2 === void 0 ? void 0 : _conditionInfo$info$n2[1]] });
1301
+ setMinDraft(value);
1302
+ if (value.trim() !== "" && Number.isFinite(Number(value))) {
1303
+ var _conditionInfo$info$n14;
1304
+ handleConditionInfo({ numberRange: [Number(value), (_conditionInfo$info$n14 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n14 === void 0 ? void 0 : _conditionInfo$info$n14[1]] });
1228
1305
  }
1229
1306
  }
1230
1307
  }),
1231
1308
  /* @__PURE__ */ jsx("span", { children: " - " }),
1232
- /* @__PURE__ */ jsx(InputNumber, {
1309
+ /* @__PURE__ */ jsx(Input, {
1233
1310
  className: "univer-w-full",
1234
- value: (_conditionInfo$info$n3 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n3 === void 0 ? void 0 : _conditionInfo$info$n3[1],
1235
- controls: false,
1311
+ inputMode: "decimal",
1312
+ value: maxDraft,
1313
+ "aria-invalid": maxDraft !== "" && !Number.isFinite(Number(maxDraft)),
1314
+ onBlur: () => {
1315
+ var _conditionInfo$info$n15;
1316
+ return setMaxDraft(String(((_conditionInfo$info$n15 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n15 === void 0 ? void 0 : _conditionInfo$info$n15[1]) ?? ""));
1317
+ },
1236
1318
  onChange: (value) => {
1237
- if (value !== null) {
1238
- var _conditionInfo$info$n4;
1239
- handleConditionInfo({ numberRange: [(_conditionInfo$info$n4 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n4 === void 0 ? void 0 : _conditionInfo$info$n4[0], value] });
1319
+ setMaxDraft(value);
1320
+ if (value.trim() !== "" && Number.isFinite(Number(value))) {
1321
+ var _conditionInfo$info$n16;
1322
+ handleConditionInfo({ numberRange: [(_conditionInfo$info$n16 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n16 === void 0 ? void 0 : _conditionInfo$info$n16[0], Number(value)] });
1240
1323
  }
1241
1324
  }
1242
1325
  })
@@ -2024,10 +2107,9 @@ const SheetTableThemePanel = (props) => {
2024
2107
  const table = tableManager.getTableById(unitId, tableId);
2025
2108
  const rangeThemeModel = useDependency(SheetRangeThemeModel);
2026
2109
  const sheetTableThemeUIController = useDependency(SheetTableThemeUIController);
2027
- const rangeThemeMapChanged = useObservable(rangeThemeModel.rangeThemeMapChange$);
2028
- const tableRefresh = useObservable(sheetTableThemeUIController.refreshTable$);
2110
+ useObservable(rangeThemeModel.rangeThemeMapChange$);
2111
+ useObservable(sheetTableThemeUIController.refreshTable$);
2029
2112
  const errorService = useDependency(ErrorService);
2030
- const [, setRefresh] = useState(Math.random);
2031
2113
  const themeConfig = useObservable(tableManager.tableThemeChanged$, {
2032
2114
  theme: table === null || table === void 0 ? void 0 : table.getTableStyleId(),
2033
2115
  oldTheme: table === null || table === void 0 ? void 0 : table.getTableStyleId(),
@@ -2086,9 +2168,6 @@ const SheetTableThemePanel = (props) => {
2086
2168
  themeName
2087
2169
  });
2088
2170
  };
2089
- useEffect(() => {
2090
- setRefresh(Math.random());
2091
- }, [rangeThemeMapChanged, tableRefresh]);
2092
2171
  if (!table) return null;
2093
2172
  const headerBgIsDark = new ColorKit(headerBg).isDark();
2094
2173
  const firstRowBgIsDark = new ColorKit(firstRowBg).isDark();
@@ -2158,6 +2237,7 @@ const SheetTableThemePanel = (props) => {
2158
2237
  className: "univer-grid univer-grid-cols-6 univer-gap-2",
2159
2238
  children: defaultRangeThemes.map((item) => {
2160
2239
  var _rangeThemeItem$getHe, _rangeThemeItem$getFi, _rangeThemeItem$getSe, _rangeThemeItem$getLa;
2240
+ const label = localeService.t("sheets-table-ui.defaultStyleNumber", item.slice(TABLE_DEFAULT_NAME_PREFIX.length));
2161
2241
  const rangeThemeItem = rangeThemeModel.getDefaultRangeThemeStyle(item);
2162
2242
  const rowBackgrounds = [
2163
2243
  (rangeThemeItem === null || rangeThemeItem === void 0 || (_rangeThemeItem$getHe = rangeThemeItem.getHeaderRowStyle()) === null || _rangeThemeItem$getHe === void 0 || (_rangeThemeItem$getHe = _rangeThemeItem$getHe.bg) === null || _rangeThemeItem$getHe === void 0 ? void 0 : _rangeThemeItem$getHe.rgb) || "rgb(255, 255, 255)",
@@ -2168,8 +2248,8 @@ const SheetTableThemePanel = (props) => {
2168
2248
  const selected = item === themeConfig.theme;
2169
2249
  return /* @__PURE__ */ jsx("button", {
2170
2250
  type: "button",
2171
- title: item,
2172
- "aria-label": item,
2251
+ title: label,
2252
+ "aria-label": label,
2173
2253
  "aria-pressed": selected,
2174
2254
  className: clsx("univer-flex univer-h-12 univer-w-full univer-cursor-pointer univer-flex-col univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-1 univer-shadow-sm univer-transition-all hover:univer-border-gray-400 hover:univer-shadow-md focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200 dark:!univer-bg-gray-800", borderClassName, { "!univer-border-primary-500 univer-ring-2 univer-ring-primary-100": selected }),
2175
2255
  onClick: () => handleThemeChange(item),
@@ -2201,6 +2281,8 @@ const SheetTableThemePanel = (props) => {
2201
2281
  children: /* @__PURE__ */ jsx(IncreaseIcon, { className: "univer-size-4" })
2202
2282
  }), customRangeThemes.map((item) => {
2203
2283
  var _rangeThemeItem$getHe2, _rangeThemeItem$getFi2, _rangeThemeItem$getSe2, _rangeThemeItem$getLa2;
2284
+ const styleNumber = item.slice(TABLE_CUSTOM_NAME_PREFIX.length);
2285
+ const label = localeService.t("sheets-table-ui.customStyleNumber", styleNumber);
2204
2286
  const rangeThemeItem = rangeThemeModel.getCustomRangeThemeStyle(unitId, item);
2205
2287
  const rowBackgrounds = [
2206
2288
  rangeThemeItem === null || rangeThemeItem === void 0 || (_rangeThemeItem$getHe2 = rangeThemeItem.getHeaderRowStyle()) === null || _rangeThemeItem$getHe2 === void 0 || (_rangeThemeItem$getHe2 = _rangeThemeItem$getHe2.bg) === null || _rangeThemeItem$getHe2 === void 0 ? void 0 : _rangeThemeItem$getHe2.rgb,
@@ -2213,8 +2295,8 @@ const SheetTableThemePanel = (props) => {
2213
2295
  className: "univer-group univer-relative univer-h-12 univer-min-w-0",
2214
2296
  children: [/* @__PURE__ */ jsx("button", {
2215
2297
  type: "button",
2216
- title: item,
2217
- "aria-label": item,
2298
+ title: label,
2299
+ "aria-label": label,
2218
2300
  "aria-pressed": selected,
2219
2301
  className: clsx("univer-flex univer-size-full univer-cursor-pointer univer-flex-col univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-1 univer-shadow-sm univer-transition-all hover:univer-border-gray-400 hover:univer-shadow-md focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200 dark:!univer-bg-gray-900", borderClassName, { "!univer-border-primary-500 univer-ring-2 univer-ring-primary-100": selected }),
2220
2302
  onClick: () => handleThemeChange(item),
@@ -2228,7 +2310,7 @@ const SheetTableThemePanel = (props) => {
2228
2310
  }), /* @__PURE__ */ jsx("button", {
2229
2311
  type: "button",
2230
2312
  "data-u-comp": "sheet-table-theme-remove",
2231
- "aria-label": `${localeService.t("sheets-table-ui.customStyle")} ${item}`,
2313
+ "aria-label": localeService.t("sheets-table-ui.removeCustomStyle", styleNumber),
2232
2314
  className: clsx("univer-absolute univer-right-[-6px] univer-top-[-6px] univer-z-10 univer-flex univer-size-5 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-0 univer-text-gray-500 univer-shadow-sm univer-transition-all hover:univer-border-red-200 hover:univer-bg-red-50 hover:univer-text-red-600 focus:univer-opacity-100 focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200 rtl:univer-left-[-6px] rtl:univer-right-auto dark:!univer-border-gray-600 dark:!univer-bg-gray-900", {
2233
2315
  "univer-opacity-100": selected,
2234
2316
  "univer-opacity-0 group-focus-within:univer-opacity-100 group-hover:univer-opacity-100": !selected
@@ -2957,12 +3039,10 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
2957
3039
  this._shape.setHoveredRegion(null);
2958
3040
  }
2959
3041
  _getLocalPoint(evt) {
2960
- const skeleton = this._sheetSkeletonManagerService.getCurrentSkeleton();
2961
- if (skeleton) return getTransformCoord(evt.offsetX, evt.offsetY, this._context.scene, skeleton);
2962
- return {
2963
- x: evt.offsetX,
2964
- y: evt.offsetY
2965
- };
3042
+ const { scene } = this._context;
3043
+ const point = new Vector2(evt.offsetX, evt.offsetY);
3044
+ const viewport = scene.getActiveViewportByCoord(point) ?? scene.getDefaultViewport();
3045
+ return (viewport === null || viewport === void 0 ? void 0 : viewport.transformVector2SceneCoord(point)) ?? point;
2966
3046
  }
2967
3047
  };
2968
3048
  SheetTableControlsRenderController = __decorate([
@@ -3023,6 +3103,25 @@ var SheetTableControlsMobileRenderController = class extends SheetTableControlsR
3023
3103
  }
3024
3104
  };
3025
3105
 
3106
+ //#endregion
3107
+ //#region src/views/widgets/icons.ts
3108
+ /**
3109
+ * Copyright 2023-present DreamNum Co., Ltd.
3110
+ *
3111
+ * Licensed under the Apache License, Version 2.0 (the "License");
3112
+ * you may not use this file except in compliance with the License.
3113
+ * You may obtain a copy of the License at
3114
+ *
3115
+ * http://www.apache.org/licenses/LICENSE-2.0
3116
+ *
3117
+ * Unless required by applicable law or agreed to in writing, software
3118
+ * distributed under the License is distributed on an "AS IS" BASIS,
3119
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3120
+ * See the License for the specific language governing permissions and
3121
+ * limitations under the License.
3122
+ */
3123
+ const filterPartial = ["M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z"];
3124
+
3026
3125
  //#endregion
3027
3126
  //#region src/views/widgets/table-filter-button.shape.ts
3028
3127
  const FILTER_ICON_SIZE = 16;
@@ -3038,6 +3137,7 @@ let SheetsTableFilterButtonShape = class SheetsTableFilterButtonShape extends Sh
3038
3137
  _defineProperty(this, "_hoverBackground", "rgba(255, 255, 255, 0.92)");
3039
3138
  _defineProperty(this, "_hoverIconColor", "#202124");
3040
3139
  _defineProperty(this, "_hovered", false);
3140
+ _defineProperty(this, "_filteredIconPath", null);
3041
3141
  this.setShapeProps(props);
3042
3142
  this.onPointerDown$.subscribeEvent((evt) => this.onPointerDown(evt));
3043
3143
  this.onPointerEnter$.subscribeEvent(() => this.onPointerEnter());
@@ -3056,6 +3156,7 @@ let SheetsTableFilterButtonShape = class SheetsTableFilterButtonShape extends Sh
3056
3156
  });
3057
3157
  }
3058
3158
  _draw(ctx) {
3159
+ var _this$_filterParams;
3059
3160
  const cellHeight = this._cellHeight;
3060
3161
  const cellWidth = this._cellWidth;
3061
3162
  const left = 16 - cellWidth;
@@ -3074,7 +3175,13 @@ let SheetsTableFilterButtonShape = class SheetsTableFilterButtonShape extends Sh
3074
3175
  ctx.fill();
3075
3176
  ctx.restore();
3076
3177
  }
3077
- this._drawChevron(ctx, this._hovered ? this._hoverIconColor : this._iconColor);
3178
+ const iconColor = this._hovered ? this._hoverIconColor : this._iconColor;
3179
+ const buttonState = (_this$_filterParams = this._filterParams) === null || _this$_filterParams === void 0 ? void 0 : _this$_filterParams.buttonState;
3180
+ if (buttonState === SheetsTableButtonStateEnum.FilteredSortNone || buttonState === SheetsTableButtonStateEnum.FilteredSortAsc || buttonState === SheetsTableButtonStateEnum.FilteredSortDesc) {
3181
+ this._filteredIconPath ??= new Path2D(filterPartial[0]);
3182
+ ctx.fillStyle = iconColor;
3183
+ ctx.fill(this._filteredIconPath);
3184
+ } else this._drawChevron(ctx, iconColor);
3078
3185
  ctx.restore();
3079
3186
  }
3080
3187
  _drawChevron(ctx, color) {
@@ -3596,9 +3703,78 @@ function SheetTableColorFilterPanel(props) {
3596
3703
  //#endregion
3597
3704
  //#region src/views/components/SheetTableConditionPanel.tsx
3598
3705
  const SheetTableConditionPanel = (props) => {
3599
- var _conditionInfo$info$d, _conditionInfo$info$d2, _conditionInfo$info$n, _conditionInfo$info$n3;
3706
+ var _conditionInfo$info$n, _conditionInfo$info$n2, _conditionInfo$info$n3, _conditionInfo$info$n7, _conditionInfo$info$n8, _conditionInfo$info$n9, _conditionInfo$info$d, _conditionInfo$info$d2;
3600
3707
  const { conditionInfo, onChange } = props;
3601
3708
  const localeService = useDependency(LocaleService);
3709
+ const [numberDraftState, setNumberDraftState] = useState({
3710
+ value: conditionInfo.info.number,
3711
+ type: conditionInfo.type,
3712
+ compare: conditionInfo.compare,
3713
+ text: String(conditionInfo.info.number ?? "")
3714
+ });
3715
+ if (!Object.is(numberDraftState.value, conditionInfo.info.number) || numberDraftState.type !== conditionInfo.type || numberDraftState.compare !== conditionInfo.compare) setNumberDraftState({
3716
+ value: conditionInfo.info.number,
3717
+ type: conditionInfo.type,
3718
+ compare: conditionInfo.compare,
3719
+ text: String(conditionInfo.info.number ?? "")
3720
+ });
3721
+ const numberDraft = numberDraftState.text;
3722
+ const setNumberDraft = (text) => setNumberDraftState({
3723
+ value: conditionInfo.info.number,
3724
+ type: conditionInfo.type,
3725
+ compare: conditionInfo.compare,
3726
+ text
3727
+ });
3728
+ const [minDraftState, setMinDraftState] = useState({
3729
+ value: (_conditionInfo$info$n = conditionInfo.info.numberRange) === null || _conditionInfo$info$n === void 0 ? void 0 : _conditionInfo$info$n[0],
3730
+ type: conditionInfo.type,
3731
+ compare: conditionInfo.compare,
3732
+ text: String(((_conditionInfo$info$n2 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n2 === void 0 ? void 0 : _conditionInfo$info$n2[0]) ?? "")
3733
+ });
3734
+ if (!Object.is(minDraftState.value, (_conditionInfo$info$n3 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n3 === void 0 ? void 0 : _conditionInfo$info$n3[0]) || minDraftState.type !== conditionInfo.type || minDraftState.compare !== conditionInfo.compare) {
3735
+ var _conditionInfo$info$n4, _conditionInfo$info$n5;
3736
+ setMinDraftState({
3737
+ value: (_conditionInfo$info$n4 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n4 === void 0 ? void 0 : _conditionInfo$info$n4[0],
3738
+ type: conditionInfo.type,
3739
+ compare: conditionInfo.compare,
3740
+ text: String(((_conditionInfo$info$n5 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n5 === void 0 ? void 0 : _conditionInfo$info$n5[0]) ?? "")
3741
+ });
3742
+ }
3743
+ const minDraft = minDraftState.text;
3744
+ const setMinDraft = (text) => {
3745
+ var _conditionInfo$info$n6;
3746
+ return setMinDraftState({
3747
+ value: (_conditionInfo$info$n6 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n6 === void 0 ? void 0 : _conditionInfo$info$n6[0],
3748
+ type: conditionInfo.type,
3749
+ compare: conditionInfo.compare,
3750
+ text
3751
+ });
3752
+ };
3753
+ const [maxDraftState, setMaxDraftState] = useState({
3754
+ value: (_conditionInfo$info$n7 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n7 === void 0 ? void 0 : _conditionInfo$info$n7[1],
3755
+ type: conditionInfo.type,
3756
+ compare: conditionInfo.compare,
3757
+ text: String(((_conditionInfo$info$n8 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n8 === void 0 ? void 0 : _conditionInfo$info$n8[1]) ?? "")
3758
+ });
3759
+ if (!Object.is(maxDraftState.value, (_conditionInfo$info$n9 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n9 === void 0 ? void 0 : _conditionInfo$info$n9[1]) || maxDraftState.type !== conditionInfo.type || maxDraftState.compare !== conditionInfo.compare) {
3760
+ var _conditionInfo$info$n10, _conditionInfo$info$n11;
3761
+ setMaxDraftState({
3762
+ value: (_conditionInfo$info$n10 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n10 === void 0 ? void 0 : _conditionInfo$info$n10[1],
3763
+ type: conditionInfo.type,
3764
+ compare: conditionInfo.compare,
3765
+ text: String(((_conditionInfo$info$n11 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n11 === void 0 ? void 0 : _conditionInfo$info$n11[1]) ?? "")
3766
+ });
3767
+ }
3768
+ const maxDraft = maxDraftState.text;
3769
+ const setMaxDraft = (text) => {
3770
+ var _conditionInfo$info$n12;
3771
+ return setMaxDraftState({
3772
+ value: (_conditionInfo$info$n12 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n12 === void 0 ? void 0 : _conditionInfo$info$n12[1],
3773
+ type: conditionInfo.type,
3774
+ compare: conditionInfo.compare,
3775
+ text
3776
+ });
3777
+ };
3602
3778
  const [conditionVisible, setConditionVisible] = useState(false);
3603
3779
  const injector = useDependency(Injector);
3604
3780
  const cascaderOptions = getCascaderListOptions(injector);
@@ -3651,12 +3827,15 @@ const SheetTableConditionPanel = (props) => {
3651
3827
  placeholder: localeService.t("sheets-table-ui.filter.input-values-placeholder"),
3652
3828
  value: conditionInfo.info.string,
3653
3829
  onChange: (v) => handleConditionInfo({ string: v })
3654
- }) : /* @__PURE__ */ jsx(InputNumber, {
3830
+ }) : /* @__PURE__ */ jsx(Input, {
3655
3831
  className: "univer-h-7 univer-w-full",
3656
- value: conditionInfo.info.number,
3657
- controls: false,
3832
+ inputMode: "decimal",
3833
+ value: numberDraft,
3834
+ "aria-invalid": numberDraft !== "" && !Number.isFinite(Number(numberDraft)),
3835
+ onBlur: () => setNumberDraft(String(conditionInfo.info.number ?? "")),
3658
3836
  onChange: (v) => {
3659
- if (v !== null) handleConditionInfo({ number: v });
3837
+ setNumberDraft(v);
3838
+ if (v.trim() !== "" && Number.isFinite(Number(v))) handleConditionInfo({ number: Number(v) });
3660
3839
  }
3661
3840
  }) }),
3662
3841
  !!(subComponentType === "DatePicker") && /* @__PURE__ */ jsx("div", {
@@ -3681,26 +3860,38 @@ const SheetTableConditionPanel = (props) => {
3681
3860
  subComponentType === "Inputs" && /* @__PURE__ */ jsxs("div", {
3682
3861
  className: "univer-flex univer-items-center univer-gap-2",
3683
3862
  children: [
3684
- /* @__PURE__ */ jsx(InputNumber, {
3863
+ /* @__PURE__ */ jsx(Input, {
3685
3864
  className: "univer-w-full",
3686
- value: (_conditionInfo$info$n = conditionInfo.info.numberRange) === null || _conditionInfo$info$n === void 0 ? void 0 : _conditionInfo$info$n[0],
3865
+ inputMode: "decimal",
3866
+ value: minDraft,
3867
+ "aria-invalid": minDraft !== "" && !Number.isFinite(Number(minDraft)),
3868
+ onBlur: () => {
3869
+ var _conditionInfo$info$n13;
3870
+ return setMinDraft(String(((_conditionInfo$info$n13 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n13 === void 0 ? void 0 : _conditionInfo$info$n13[0]) ?? ""));
3871
+ },
3687
3872
  onChange: (v) => {
3688
- if (v !== null) {
3689
- var _conditionInfo$info$n2;
3690
- handleConditionInfo({ numberRange: [v, (_conditionInfo$info$n2 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n2 === void 0 ? void 0 : _conditionInfo$info$n2[1]] });
3873
+ setMinDraft(v);
3874
+ if (v.trim() !== "" && Number.isFinite(Number(v))) {
3875
+ var _conditionInfo$info$n14;
3876
+ handleConditionInfo({ numberRange: [Number(v), (_conditionInfo$info$n14 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n14 === void 0 ? void 0 : _conditionInfo$info$n14[1]] });
3691
3877
  }
3692
- },
3693
- controls: false
3878
+ }
3694
3879
  }),
3695
3880
  /* @__PURE__ */ jsx("span", { children: " - " }),
3696
- /* @__PURE__ */ jsx(InputNumber, {
3881
+ /* @__PURE__ */ jsx(Input, {
3697
3882
  className: "univer-w-full",
3698
- value: (_conditionInfo$info$n3 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n3 === void 0 ? void 0 : _conditionInfo$info$n3[1],
3699
- controls: false,
3883
+ inputMode: "decimal",
3884
+ value: maxDraft,
3885
+ "aria-invalid": maxDraft !== "" && !Number.isFinite(Number(maxDraft)),
3886
+ onBlur: () => {
3887
+ var _conditionInfo$info$n15;
3888
+ return setMaxDraft(String(((_conditionInfo$info$n15 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n15 === void 0 ? void 0 : _conditionInfo$info$n15[1]) ?? ""));
3889
+ },
3700
3890
  onChange: (v) => {
3701
- if (v !== null) {
3702
- var _conditionInfo$info$n4;
3703
- handleConditionInfo({ numberRange: [(_conditionInfo$info$n4 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n4 === void 0 ? void 0 : _conditionInfo$info$n4[0], v] });
3891
+ setMaxDraft(v);
3892
+ if (v.trim() !== "" && Number.isFinite(Number(v))) {
3893
+ var _conditionInfo$info$n16;
3894
+ handleConditionInfo({ numberRange: [(_conditionInfo$info$n16 = conditionInfo.info.numberRange) === null || _conditionInfo$info$n16 === void 0 ? void 0 : _conditionInfo$info$n16[0], Number(v)] });
3704
3895
  }
3705
3896
  }
3706
3897
  })
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/ar-SA.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "النمط الافتراضي {0}",
4
+ customStyleNumber: "النمط المخصص {0}",
5
+ removeCustomStyle: "حذف النمط المخصص {0}",
3
6
  calculatedColumn: "عمود محسوب",
4
7
  columnFormula: "الصيغة",
5
8
  columnFormulaHint: "يستبدل فورًا {0} خلية بيانات دون الرأس والإجمالي. إيقاف التعبئة يحافظ على الخلايا الحالية. يمكن التراجع.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/ca-ES.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "Estil predeterminat {0}",
4
+ customStyleNumber: "Estil personalitzat {0}",
5
+ removeCustomStyle: "Suprimeix l’estil personalitzat {0}",
3
6
  calculatedColumn: "Columna calculada",
4
7
  columnFormula: "Fórmula",
5
8
  columnFormulaHint: "Substitueix immediatament les {0} cel·les de dades, sense capçalera ni totals. Aturar conserva les cel·les existents. Es pot desfer.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/de-DE.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "Standardstil {0}",
4
+ customStyleNumber: "Benutzerdefinierter Stil {0}",
5
+ removeCustomStyle: "Benutzerdefinierten Stil {0} löschen",
3
6
  calculatedColumn: "Berechnete Spalte",
4
7
  columnFormula: "Formel",
5
8
  columnFormulaHint: "Ersetzt sofort alle {0} Datenzellen ohne Kopf- und Ergebniszeile. Beim Stoppen bleiben vorhandene Zellen erhalten. Rückgängig möglich.",
@@ -15,6 +15,9 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  const locale = { "sheets-table-ui": {
18
+ defaultStyleNumber: "Default style {0}",
19
+ customStyleNumber: "Custom style {0}",
20
+ removeCustomStyle: "Delete custom style {0}",
18
21
  calculatedColumn: "Calculated column",
19
22
  columnFormula: "Formula",
20
23
  columnFormulaHint: "Apply replaces all {0} data cells in this column immediately. Header and footer are excluded. Stop preserves existing cells. Changes can be undone.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/es-ES.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "Estilo predeterminado {0}",
4
+ customStyleNumber: "Estilo personalizado {0}",
5
+ removeCustomStyle: "Eliminar el estilo personalizado {0}",
3
6
  calculatedColumn: "Columna calculada",
4
7
  columnFormula: "Fórmula",
5
8
  columnFormulaHint: "Reemplaza inmediatamente las {0} celdas de datos, sin encabezado ni totales. Detener conserva las celdas existentes. Se puede deshacer.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/fa-IR.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "سبک پیش‌فرض {0}",
4
+ customStyleNumber: "سبک سفارشی {0}",
5
+ removeCustomStyle: "حذف سبک سفارشی {0}",
3
6
  calculatedColumn: "ستون محاسباتی",
4
7
  columnFormula: "فرمول",
5
8
  columnFormulaHint: "بلافاصله {0} سلول داده را بدون سربرگ و جمع جایگزین می‌کند. توقف، سلول‌های موجود را حفظ می‌کند. قابل واگرد است.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/fr-FR.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "Style par défaut {0}",
4
+ customStyleNumber: "Style personnalisé {0}",
5
+ removeCustomStyle: "Supprimer le style personnalisé {0}",
3
6
  calculatedColumn: "Colonne calculée",
4
7
  columnFormula: "Formule",
5
8
  columnFormulaHint: "Remplace immédiatement les {0} cellules de données, hors en-tête et total. Arrêter conserve les cellules existantes. Annulation possible.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/id-ID.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "Gaya default {0}",
4
+ customStyleNumber: "Gaya kustom {0}",
5
+ removeCustomStyle: "Hapus gaya kustom {0}",
3
6
  calculatedColumn: "Kolom terhitung",
4
7
  columnFormula: "Rumus",
5
8
  columnFormulaHint: "Langsung mengganti {0} sel data, kecuali header dan total. Berhenti mempertahankan sel yang ada. Perubahan dapat diurungkan.",
@@ -1,5 +1,8 @@
1
1
  //#region src/locale/it-IT.ts
2
2
  const locale = { "sheets-table-ui": {
3
+ defaultStyleNumber: "Stile predefinito {0}",
4
+ customStyleNumber: "Stile personalizzato {0}",
5
+ removeCustomStyle: "Elimina lo stile personalizzato {0}",
3
6
  calculatedColumn: "Colonna calcolata",
4
7
  columnFormula: "Formula",
5
8
  columnFormulaHint: "Sostituisce subito {0} celle dati, escluse intestazione e totali. Arrestare mantiene le celle esistenti. È possibile annullare.",