@univerjs/sheets-data-validation-ui 0.5.5-nightly.202501210925 → 0.5.5-nightly.202501220324

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 (32) hide show
  1. package/lib/cjs/index.js +1 -9
  2. package/lib/cjs/locale/en-US.js +1 -1
  3. package/lib/cjs/locale/fa-IR.js +1 -1
  4. package/lib/cjs/locale/fr-FR.js +1 -1
  5. package/lib/cjs/locale/ru-RU.js +1 -1
  6. package/lib/cjs/locale/vi-VN.js +1 -1
  7. package/lib/cjs/locale/zh-CN.js +1 -1
  8. package/lib/cjs/locale/zh-TW.js +1 -1
  9. package/lib/es/index.js +95 -127
  10. package/lib/types/views/components/date-dropdown/index.d.ts +1 -2
  11. package/lib/types/views/components/detail/index.d.ts +16 -2
  12. package/lib/types/views/components/drop-down/CellDropdown.d.ts +16 -2
  13. package/lib/types/views/components/formula-input/base-formula-input.d.ts +1 -2
  14. package/lib/types/views/components/formula-input/checkbox-formula-input.d.ts +1 -2
  15. package/lib/types/views/components/formula-input/custom-formula-input.d.ts +1 -2
  16. package/lib/types/views/components/formula-input/list-formula-input.d.ts +1 -2
  17. package/lib/types/views/components/item/index.d.ts +1 -2
  18. package/lib/types/views/components/list/index.d.ts +16 -2
  19. package/lib/types/views/components/list-dropdown/index.d.ts +1 -2
  20. package/lib/types/views/components/options/index.d.ts +1 -2
  21. package/lib/types/views/components/panel/index.d.ts +16 -2
  22. package/lib/types/views/components/render-mode/index.d.ts +1 -2
  23. package/lib/types/views/components/show-time/index.d.ts +1 -2
  24. package/lib/umd/index.js +1 -9
  25. package/lib/umd/locale/en-US.js +1 -1
  26. package/lib/umd/locale/fa-IR.js +1 -1
  27. package/lib/umd/locale/fr-FR.js +1 -1
  28. package/lib/umd/locale/ru-RU.js +1 -1
  29. package/lib/umd/locale/vi-VN.js +1 -1
  30. package/lib/umd/locale/zh-CN.js +1 -1
  31. package/lib/umd/locale/zh-TW.js +1 -1
  32. package/package.json +14 -14
package/lib/es/index.js CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
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
- import React, { useState, forwardRef, useRef, createElement, useMemo, useEffect } from "react";
5
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
6
6
  import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, dayjs, 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, merge } from "@univerjs/core";
7
7
  import { Button, DatePanel, Scrollbar, FormLayout, RadioGroup, Radio, Checkbox, Input, Select, DraggableList } from "@univerjs/design";
8
8
  import { DeviceInputEventType, IRenderManagerService, fixLineWidthByScale, Transform, CheckboxShape, CURSOR_TYPE, FontCache, Shape, Rect, getFontStyleString, getDocsSkeletonPageSize, DocumentViewModel, DocumentSkeleton, Documents } from "@univerjs/engine-render";
@@ -11,42 +11,13 @@ import { SheetDataValidationModel, getCellValueOrigin, getDataValidationCellValu
11
11
  import { getPatternType } from "@univerjs/sheets-numfmt";
12
12
  import { SetCellEditVisibleOperation, SheetCanvasPopManagerService, IEditorBridgeService, 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
13
  import { IDialogService, KeyCode, ISidebarService, useObservable, ComponentManager, IZenZoneService, RectPopup, useEvent, useSidebarClick, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, IMenuManagerService } from "@univerjs/ui";
14
+ import React, { useState, forwardRef, useRef, createElement, useMemo, useEffect } from "react";
14
15
  import { DataValidatorRegistryService, DataValidationModel, DataValidatorRegistryScope, TWO_FORMULA_OPERATOR_COUNT, getRuleOptions, getRuleSetting } from "@univerjs/data-validation";
15
16
  import { RichTextEditingMutation } from "@univerjs/docs";
16
17
  import { filter, BehaviorSubject, distinctUntilChanged, Subject, debounceTime, bufferTime } from "rxjs";
17
18
  import { deserializeRangeWithSheet, serializeRange } from "@univerjs/engine-formula";
18
19
  import { RangeSelector, FormulaEditor } from "@univerjs/sheets-formula-ui";
19
- var jsxRuntime = { exports: {} }, reactJsxRuntime_production_min = {};
20
- /**
21
- * @license React
22
- * react-jsx-runtime.production.min.js
23
- *
24
- * Copyright (c) Facebook, Inc. and its affiliates.
25
- *
26
- * This source code is licensed under the MIT license found in the
27
- * LICENSE file in the root directory of this source tree.
28
- */
29
- var hasRequiredReactJsxRuntime_production_min;
30
- function requireReactJsxRuntime_production_min() {
31
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
32
- hasRequiredReactJsxRuntime_production_min = 1;
33
- var f = React, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
34
- function q(c, a, g) {
35
- var b, d = {}, e = null, h = null;
36
- g !== void 0 && (e = "" + g), a.key !== void 0 && (e = "" + a.key), a.ref !== void 0 && (h = a.ref);
37
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
38
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) d[b] === void 0 && (d[b] = a[b]);
39
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
40
- }
41
- return __name(q, "q"), reactJsxRuntime_production_min.Fragment = l, reactJsxRuntime_production_min.jsx = q, reactJsxRuntime_production_min.jsxs = q, reactJsxRuntime_production_min;
42
- }
43
- __name(requireReactJsxRuntime_production_min, "requireReactJsxRuntime_production_min");
44
- var hasRequiredJsxRuntime;
45
- function requireJsxRuntime() {
46
- return hasRequiredJsxRuntime || (hasRequiredJsxRuntime = 1, jsxRuntime.exports = requireReactJsxRuntime_production_min()), jsxRuntime.exports;
47
- }
48
- __name(requireJsxRuntime, "requireJsxRuntime");
49
- var jsxRuntimeExports = requireJsxRuntime(), __defProp$f = Object.defineProperty, __getOwnPropDesc$f = Object.getOwnPropertyDescriptor, __decorateClass$f = /* @__PURE__ */ __name((decorators, target, key, kind) => {
20
+ var __defProp$f = Object.defineProperty, __getOwnPropDesc$f = Object.getOwnPropertyDescriptor, __decorateClass$f = /* @__PURE__ */ __name((decorators, target, key, kind) => {
50
21
  for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
51
22
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
52
23
  return kind && result && __defProp$f(target, key, result), result;
@@ -204,8 +175,8 @@ function DateDropdown(props) {
204
175
  }
205
176
  })) : rejectInputController.showReject(validator.getRuleFinalError(rule, { row, col, unitId, subUnitId }));
206
177
  }, "handleSave");
207
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$6.dvDateDropdown, children: [
208
- /* @__PURE__ */ jsxRuntimeExports.jsx(
178
+ return /* @__PURE__ */ jsxs("div", { className: styles$6.dvDateDropdown, children: [
179
+ /* @__PURE__ */ jsx(
209
180
  DatePanel,
210
181
  {
211
182
  defaultValue: date,
@@ -220,7 +191,7 @@ function DateDropdown(props) {
220
191
  disabledDate: /* @__PURE__ */ __name((current) => !numfmt.parseDate(current.format("YYYY-MM-DD")), "disabledDate")
221
192
  }
222
193
  ),
223
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$6.dvDateDropdownBtns, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "primary", onClick: handleSave, disabled: !date.isValid(), children: localeService.t("dataValidation.alert.ok") }) })
194
+ /* @__PURE__ */ jsx("div", { className: styles$6.dvDateDropdownBtns, children: /* @__PURE__ */ jsx(Button, { size: "small", type: "primary", onClick: handleSave, disabled: !date.isValid(), children: localeService.t("dataValidation.alert.ok") }) })
224
195
  ] });
225
196
  }
226
197
  __name(DateDropdown, "DateDropdown");
@@ -386,19 +357,16 @@ function CellDropdown() {
386
357
  if (!activeDropdown)
387
358
  return null;
388
359
  const { location, componentKey } = activeDropdown, Component = componentManager.get(componentKey), key = `${location.unitId}-${location.subUnitId}-${location.row}-${location.col}`;
389
- if (!Component)
390
- return null;
391
- const hideFn = /* @__PURE__ */ __name(() => {
392
- dropdownManagerService.hideDropdown();
393
- }, "hideFn");
394
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
360
+ return Component ? /* @__PURE__ */ jsx(
395
361
  Component,
396
362
  {
397
363
  location,
398
- hideFn
364
+ hideFn: /* @__PURE__ */ __name(() => {
365
+ dropdownManagerService.hideDropdown();
366
+ }, "hideFn")
399
367
  },
400
368
  key
401
- );
369
+ ) : null;
402
370
  }
403
371
  __name(CellDropdown, "CellDropdown");
404
372
  const DROP_DOWN_KEY = "sheet.ui.dropdown";
@@ -593,9 +561,9 @@ const DATA_VALIDATION_PANEL = "DataValidationPanel", OpenValidationPanelOperatio
593
561
  unitId,
594
562
  subUnitId
595
563
  ), [sheetPermissionCheckController, col, row, unitId, subUnitId]);
596
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$5.dvListDropdown, style, children: [
597
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownTitle, children: title }),
598
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownList, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Scrollbar, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownListContainer, children: filteredOptions.map((item, i) => {
564
+ return /* @__PURE__ */ jsxs("div", { className: styles$5.dvListDropdown, style, children: [
565
+ /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownTitle, children: title }),
566
+ /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownList, children: /* @__PURE__ */ jsx(Scrollbar, { children: /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownListContainer, children: filteredOptions.map((item, i) => {
599
567
  const selected = value.indexOf(item.value) > -1, handleClick = /* @__PURE__ */ __name(() => {
600
568
  let set;
601
569
  selected ? set = new Set(value.filter((sub) => sub !== item.value)) : set = new Set(multiple ? [...value, item.value] : [item.value]);
@@ -604,18 +572,18 @@ const DATA_VALIDATION_PANEL = "DataValidationPanel", OpenValidationPanelOperatio
604
572
  set.has(opt.value) && newValue.push(opt.value);
605
573
  }), onChange(newValue);
606
574
  }, "handleClick"), index = item.label.toLocaleLowerCase().indexOf(lowerFilter);
607
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$5.dvListDropdownItemContainer, onClick: handleClick, children: [
608
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownItem, style: { background: item.color || DROP_DOWN_DEFAULT_COLOR }, children: lowerFilter && item.label.toLowerCase().includes(lowerFilter) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
609
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: item.label.substring(0, index) }),
610
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontWeight: "bold" }, children: item.label.substring(index, index + lowerFilter.length) }),
611
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: item.label.substring(index + lowerFilter.length) })
575
+ return /* @__PURE__ */ jsxs("div", { className: styles$5.dvListDropdownItemContainer, onClick: handleClick, children: [
576
+ /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownItem, style: { background: item.color || DROP_DOWN_DEFAULT_COLOR }, children: lowerFilter && item.label.toLowerCase().includes(lowerFilter) ? /* @__PURE__ */ jsxs(Fragment, { children: [
577
+ /* @__PURE__ */ jsx("span", { children: item.label.substring(0, index) }),
578
+ /* @__PURE__ */ jsx("span", { style: { fontWeight: "bold" }, children: item.label.substring(index, index + lowerFilter.length) }),
579
+ /* @__PURE__ */ jsx("span", { children: item.label.substring(index + lowerFilter.length) })
612
580
  ] }) : item.label }),
613
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownSelectedIcon, children: selected ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckMarkSingle, {}) : null })
581
+ /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownSelectedIcon, children: selected ? /* @__PURE__ */ jsx(CheckMarkSingle, {}) : null })
614
582
  ] }, i);
615
583
  }) }) }, filter2) }),
616
- showEditOnDropdown && hasPermission ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
617
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownSplit }),
618
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$5.dvListDropdownEdit, children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { onClick: onEdit, children: localeService.t("dataValidation.list.edit") }) })
584
+ showEditOnDropdown && hasPermission ? /* @__PURE__ */ jsxs(Fragment, { children: [
585
+ /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownSplit }),
586
+ /* @__PURE__ */ jsx("div", { className: styles$5.dvListDropdownEdit, children: /* @__PURE__ */ jsx("a", { onClick: onEdit, children: localeService.t("dataValidation.list.edit") }) })
619
587
  ] }) : null
620
588
  ] });
621
589
  }, "SelectList");
@@ -657,7 +625,7 @@ function ListDropDown(props) {
657
625
  value: item.label,
658
626
  color: showColor || item.color ? item.color : "transparent"
659
627
  }));
660
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
628
+ return /* @__PURE__ */ jsx(
661
629
  SelectList,
662
630
  {
663
631
  style: { minWidth: cellWidth, maxWidth: Math.max(cellWidth, 200) },
@@ -708,35 +676,35 @@ const dataValidationOptionsButton = "univer-data-validation-options-button", dat
708
676
  function DataValidationOptions(props) {
709
677
  var _a18;
710
678
  const localeService = useDependency(LocaleService), componentManager = useDependency(ComponentManager), { value, onChange, extraComponent } = props, [show, setShow] = useState(!1), ExtraOptions = extraComponent ? componentManager.get(extraComponent) : null;
711
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
712
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dataValidationOptionsButton, onClick: /* @__PURE__ */ __name(() => setShow(!show), "onClick"), children: [
679
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
680
+ /* @__PURE__ */ jsxs("div", { className: styles$4.dataValidationOptionsButton, onClick: /* @__PURE__ */ __name(() => setShow(!show), "onClick"), children: [
713
681
  localeService.t("dataValidation.panel.options"),
714
- show ? /* @__PURE__ */ jsxRuntimeExports.jsx(MoreUpSingle, { className: styles$4.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MoreDownSingle, { className: styles$4.dataValidationOptionsButtonIcon })
682
+ show ? /* @__PURE__ */ jsx(MoreUpSingle, { className: styles$4.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ jsx(MoreDownSingle, { className: styles$4.dataValidationOptionsButtonIcon })
715
683
  ] }),
716
- show && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
717
- ExtraOptions ? /* @__PURE__ */ jsxRuntimeExports.jsx(ExtraOptions, { value, onChange }) : null,
718
- /* @__PURE__ */ jsxRuntimeExports.jsx(
684
+ show && /* @__PURE__ */ jsxs(Fragment, { children: [
685
+ ExtraOptions ? /* @__PURE__ */ jsx(ExtraOptions, { value, onChange }) : null,
686
+ /* @__PURE__ */ jsx(
719
687
  FormLayout,
720
688
  {
721
689
  label: localeService.t("dataValidation.panel.invalid"),
722
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
690
+ children: /* @__PURE__ */ jsxs(
723
691
  RadioGroup,
724
692
  {
725
693
  value: `${(_a18 = value.errorStyle) != null ? _a18 : DataValidationErrorStyle.WARNING}`,
726
694
  onChange: /* @__PURE__ */ __name((errorStyle) => onChange({ ...value, errorStyle: +errorStyle }), "onChange"),
727
695
  children: [
728
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationErrorStyle.WARNING}`, children: localeService.t("dataValidation.panel.showWarning") }),
729
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationErrorStyle.STOP}`, children: localeService.t("dataValidation.panel.rejectInput") })
696
+ /* @__PURE__ */ jsx(Radio, { value: `${DataValidationErrorStyle.WARNING}`, children: localeService.t("dataValidation.panel.showWarning") }),
697
+ /* @__PURE__ */ jsx(Radio, { value: `${DataValidationErrorStyle.STOP}`, children: localeService.t("dataValidation.panel.rejectInput") })
730
698
  ]
731
699
  }
732
700
  )
733
701
  }
734
702
  ),
735
- /* @__PURE__ */ jsxRuntimeExports.jsx(
703
+ /* @__PURE__ */ jsx(
736
704
  FormLayout,
737
705
  {
738
706
  label: localeService.t("dataValidation.panel.messageInfo"),
739
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
707
+ children: /* @__PURE__ */ jsx(
740
708
  Checkbox,
741
709
  {
742
710
  checked: value.showErrorMessage,
@@ -749,7 +717,7 @@ function DataValidationOptions(props) {
749
717
  )
750
718
  }
751
719
  ),
752
- value.showErrorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: value.error, onChange: /* @__PURE__ */ __name((error) => onChange({ ...value, error }), "onChange") }) }) : null
720
+ value.showErrorMessage ? /* @__PURE__ */ jsx(FormLayout, { children: /* @__PURE__ */ jsx(Input, { value: value.error, onChange: /* @__PURE__ */ __name((error) => onChange({ ...value, error }), "onChange") }) }) : null
753
721
  ] })
754
722
  ] });
755
723
  }
@@ -884,13 +852,13 @@ function DataValidationDetail() {
884
852
  var _a19;
885
853
  const handleOutClick = (_a19 = rangeSelectorActionsRef.current) == null ? void 0 : _a19.handleOutClick;
886
854
  handleOutClick && handleOutClick(e, () => isFocusRangeSelectorSet(!1));
887
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.dataValidationDetail, children: [
888
- /* @__PURE__ */ jsxRuntimeExports.jsx(
855
+ }), /* @__PURE__ */ jsxs("div", { className: styles$3.dataValidationDetail, children: [
856
+ /* @__PURE__ */ jsx(
889
857
  FormLayout,
890
858
  {
891
859
  label: localeService.t("dataValidation.panel.range"),
892
860
  error: !localRule.ranges.length || isRangeError ? localeService.t("dataValidation.panel.rangeError") : "",
893
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
861
+ children: /* @__PURE__ */ jsx(
894
862
  RangeSelector,
895
863
  {
896
864
  unitId,
@@ -905,7 +873,7 @@ function DataValidationDetail() {
905
873
  )
906
874
  }
907
875
  ),
908
- /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.panel.type"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
876
+ /* @__PURE__ */ jsx(FormLayout, { label: localeService.t("dataValidation.panel.type"), children: /* @__PURE__ */ jsx(
909
877
  Select,
910
878
  {
911
879
  options: validators == null ? void 0 : validators.map((validator2) => ({
@@ -917,7 +885,7 @@ function DataValidationDetail() {
917
885
  className: styles$3.dataValidationDetailFormItem
918
886
  }
919
887
  ) }),
920
- operators != null && operators.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.panel.operator"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
888
+ operators != null && operators.length ? /* @__PURE__ */ jsx(FormLayout, { label: localeService.t("dataValidation.panel.operator"), children: /* @__PURE__ */ jsx(
921
889
  Select,
922
890
  {
923
891
  options: operators.map((op, i) => ({
@@ -934,7 +902,7 @@ function DataValidationDetail() {
934
902
  className: styles$3.dataValidationDetailFormItem
935
903
  }
936
904
  ) }) : null,
937
- FormulaInput ? /* @__PURE__ */ jsxRuntimeExports.jsx(
905
+ FormulaInput ? /* @__PURE__ */ jsx(
938
906
  FormulaInput,
939
907
  {
940
908
  isTwoFormula,
@@ -956,7 +924,7 @@ function DataValidationDetail() {
956
924
  },
957
925
  key + localRule.type
958
926
  ) : null,
959
- /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
927
+ /* @__PURE__ */ jsx(FormLayout, { children: /* @__PURE__ */ jsx(
960
928
  Checkbox,
961
929
  {
962
930
  checked: (_a18 = localRule.allowBlank) != null ? _a18 : !0,
@@ -970,10 +938,10 @@ function DataValidationDetail() {
970
938
  children: localeService.t("dataValidation.panel.allowBlank")
971
939
  }
972
940
  ) }),
973
- /* @__PURE__ */ jsxRuntimeExports.jsx(DataValidationOptions, { value: options, onChange: handleUpdateRuleOptions, extraComponent: validator.optionsInput }),
974
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.dataValidationDetailButtons, children: [
975
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { className: styles$3.dataValidationDetailButton, onClick: handleDelete, children: localeService.t("dataValidation.panel.removeRule") }),
976
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { className: styles$3.dataValidationDetailButton, type: "primary", onClick: handleOk, children: localeService.t("dataValidation.panel.done") })
941
+ /* @__PURE__ */ jsx(DataValidationOptions, { value: options, onChange: handleUpdateRuleOptions, extraComponent: validator.optionsInput }),
942
+ /* @__PURE__ */ jsxs("div", { className: styles$3.dataValidationDetailButtons, children: [
943
+ /* @__PURE__ */ jsx(Button, { className: styles$3.dataValidationDetailButton, onClick: handleDelete, children: localeService.t("dataValidation.panel.removeRule") }),
944
+ /* @__PURE__ */ jsx(Button, { className: styles$3.dataValidationDetailButton, type: "primary", onClick: handleOk, children: localeService.t("dataValidation.panel.done") })
977
945
  ] })
978
946
  ] });
979
947
  }
@@ -984,7 +952,7 @@ const dataValidationItemContainer = "univer-data-validation-item-container", dat
984
952
  dataValidationItemContent,
985
953
  dataValidationItemIcon
986
954
  }, DataValidationItem = /* @__PURE__ */ __name((props) => {
987
- const { rule, onClick, unitId, subUnitId, disable } = props, validatorRegistry = useDependency(DataValidatorRegistryService), commandService = useDependency(ICommandService), markSelectionService = useDependency(IMarkSelectionService), validator = validatorRegistry.getValidatorItem(rule.type), ids = useRef(), [isHover, setIsHover] = useState(!1), handleDelete = /* @__PURE__ */ __name((e) => {
955
+ const { rule, onClick, unitId, subUnitId, disable } = props, validatorRegistry = useDependency(DataValidatorRegistryService), commandService = useDependency(ICommandService), markSelectionService = useDependency(IMarkSelectionService), validator = validatorRegistry.getValidatorItem(rule.type), ids = useRef(void 0), [isHover, setIsHover] = useState(!1), handleDelete = /* @__PURE__ */ __name((e) => {
988
956
  commandService.executeCommand(RemoveSheetDataValidationCommand.id, {
989
957
  ruleId: rule.uid,
990
958
  unitId,
@@ -996,7 +964,7 @@ const dataValidationItemContainer = "univer-data-validation-item-container", dat
996
964
  ids.current && ((_a18 = ids.current) == null || _a18.forEach((id) => {
997
965
  id && markSelectionService.removeShape(id);
998
966
  }));
999
- }, [markSelectionService]), /* @__PURE__ */ jsxRuntimeExports.jsxs(
967
+ }, [markSelectionService]), /* @__PURE__ */ jsxs(
1000
968
  "div",
1001
969
  {
1002
970
  className: styles$2.dataValidationItemContainer,
@@ -1021,9 +989,9 @@ const dataValidationItemContainer = "univer-data-validation-item-container", dat
1021
989
  }), ids.current = void 0;
1022
990
  }, "onMouseLeave"),
1023
991
  children: [
1024
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$2.dataValidationItemTitle, children: validator == null ? void 0 : validator.generateRuleName(rule) }),
1025
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$2.dataValidationItemContent, children: rule.ranges.map((range) => serializeRange(range)).join(",") }),
1026
- isHover ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$2.dataValidationItemIcon, onClick: handleDelete, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteSingle, {}) }) : null
992
+ /* @__PURE__ */ jsx("div", { className: styles$2.dataValidationItemTitle, children: validator == null ? void 0 : validator.generateRuleName(rule) }),
993
+ /* @__PURE__ */ jsx("div", { className: styles$2.dataValidationItemContent, children: rule.ranges.map((range) => serializeRange(range)).join(",") }),
994
+ isHover ? /* @__PURE__ */ jsx("div", { className: styles$2.dataValidationItemIcon, onClick: handleDelete, children: /* @__PURE__ */ jsx(DeleteSingle, {}) }) : null
1027
995
  ]
1028
996
  }
1029
997
  );
@@ -1039,7 +1007,7 @@ function DataValidationList() {
1039
1007
  void 0,
1040
1008
  []
1041
1009
  );
1042
- return workbook ? /* @__PURE__ */ jsxRuntimeExports.jsx(DataValidationListWithWorkbook, { workbook }) : null;
1010
+ return workbook ? /* @__PURE__ */ jsx(DataValidationListWithWorkbook, { workbook }) : null;
1043
1011
  }
1044
1012
  __name(DataValidationList, "DataValidationList");
1045
1013
  function DataValidationListWithWorkbook(props) {
@@ -1073,10 +1041,10 @@ function DataValidationListWithWorkbook(props) {
1073
1041
  const workbook2 = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), worksheet2 = workbook2.getActiveSheet(), unitId2 = workbook2.getUnitId(), subUnitId2 = worksheet2.getSheetId();
1074
1042
  return rules2.map((rule) => checkRangesEditablePermission(injector, unitId2, subUnitId2, rule.ranges) ? { ...rule } : { ...rule, disable: !0 });
1075
1043
  }, "getDvRulesByPermissionCorrect"))(rules), hasDisableRule = rulesByPermissionCheck == null ? void 0 : rulesByPermissionCheck.some((rule) => rule.disable);
1076
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.dataValidationList, children: [
1044
+ return /* @__PURE__ */ jsxs("div", { className: styles$1.dataValidationList, children: [
1077
1045
  rulesByPermissionCheck == null ? void 0 : rulesByPermissionCheck.map((rule) => {
1078
1046
  var _a18;
1079
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
1047
+ return /* @__PURE__ */ jsx(
1080
1048
  DataValidationItem,
1081
1049
  {
1082
1050
  unitId,
@@ -1094,16 +1062,16 @@ function DataValidationListWithWorkbook(props) {
1094
1062
  rule.uid
1095
1063
  );
1096
1064
  }),
1097
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.dataValidationListButtons, children: [
1098
- rules.length && !hasDisableRule ? /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { className: styles$1.dataValidationListButton, onClick: handleRemoveAll, children: localeService.t("dataValidation.panel.removeAll") }) : null,
1099
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { className: styles$1.dataValidationListButton, type: "primary", onClick: handleAddRule, children: localeService.t("dataValidation.panel.add") })
1065
+ /* @__PURE__ */ jsxs("div", { className: styles$1.dataValidationListButtons, children: [
1066
+ rules.length && !hasDisableRule ? /* @__PURE__ */ jsx(Button, { className: styles$1.dataValidationListButton, onClick: handleRemoveAll, children: localeService.t("dataValidation.panel.removeAll") }) : null,
1067
+ /* @__PURE__ */ jsx(Button, { className: styles$1.dataValidationListButton, type: "primary", onClick: handleAddRule, children: localeService.t("dataValidation.panel.add") })
1100
1068
  ] })
1101
1069
  ] });
1102
1070
  }
1103
1071
  __name(DataValidationListWithWorkbook, "DataValidationListWithWorkbook");
1104
1072
  const DataValidationPanel = /* @__PURE__ */ __name(() => {
1105
1073
  const dataValidationPanelService = useDependency(DataValidationPanelService), activeRule = useObservable(dataValidationPanelService.activeRule$, dataValidationPanelService.activeRule);
1106
- return activeRule ? /* @__PURE__ */ jsxRuntimeExports.jsx(DataValidationDetail, {}, activeRule.rule.uid) : /* @__PURE__ */ jsxRuntimeExports.jsx(DataValidationList, {});
1074
+ return activeRule ? /* @__PURE__ */ jsx(DataValidationDetail, {}, activeRule.rule.uid) : /* @__PURE__ */ jsx(DataValidationList, {});
1107
1075
  }, "DataValidationPanel"), LIST_DROPDOWN_KEY = "data-validation.list.dropdown", DATE_DROPDOWN_KEY = "data-validation.date.dropdown", AddSheetDataValidationAndOpenCommand = {
1108
1076
  type: CommandType.COMMAND,
1109
1077
  id: "data-validation.command.addRuleAndOpen",
@@ -1797,8 +1765,8 @@ const dataValidationFormula = "univer-data-validation-formula", dataValidationFo
1797
1765
  dataValidationFormulaColorItem
1798
1766
  }, BaseFormulaInput = /* @__PURE__ */ __name((props) => {
1799
1767
  const { isTwoFormula = !1, value, onChange, showError, validResult } = props, localeService = useDependency(LocaleService), formula1Res = showError ? validResult == null ? void 0 : validResult.formula1 : "", formula2Res = showError ? validResult == null ? void 0 : validResult.formula2 : "";
1800
- return isTwoFormula ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1801
- /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1768
+ return isTwoFormula ? /* @__PURE__ */ jsxs(Fragment, { children: [
1769
+ /* @__PURE__ */ jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsx(
1802
1770
  Input,
1803
1771
  {
1804
1772
  className: styles.dataValidationFormula,
@@ -1812,8 +1780,8 @@ const dataValidationFormula = "univer-data-validation-formula", dataValidationFo
1812
1780
  }, "onChange")
1813
1781
  }
1814
1782
  ) }),
1815
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.dataValidationFormulaAnd, children: localeService.t("dataValidation.panel.formulaAnd") }),
1816
- /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { error: formula2Res, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1783
+ /* @__PURE__ */ jsx("div", { className: styles.dataValidationFormulaAnd, children: localeService.t("dataValidation.panel.formulaAnd") }),
1784
+ /* @__PURE__ */ jsx(FormLayout, { error: formula2Res, children: /* @__PURE__ */ jsx(
1817
1785
  Input,
1818
1786
  {
1819
1787
  className: styles.dataValidationFormula,
@@ -1827,7 +1795,7 @@ const dataValidationFormula = "univer-data-validation-formula", dataValidationFo
1827
1795
  }, "onChange")
1828
1796
  }
1829
1797
  ) })
1830
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1798
+ ] }) : /* @__PURE__ */ jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsx(
1831
1799
  Input,
1832
1800
  {
1833
1801
  className: styles.dataValidationFormula,
@@ -1841,8 +1809,8 @@ const dataValidationFormula = "univer-data-validation-formula", dataValidationFo
1841
1809
  }, "BaseFormulaInput");
1842
1810
  function CheckboxFormulaInput(props) {
1843
1811
  const { value, onChange, showError, validResult } = props, localeService = useDependency(LocaleService), formula1Res = showError ? validResult == null ? void 0 : validResult.formula1 : "", formula2Res = showError ? validResult == null ? void 0 : validResult.formula2 : "", [checked, setChecked] = useState(!((value == null ? void 0 : value.formula1) === void 0 && (value == null ? void 0 : value.formula2) === void 0));
1844
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1845
- /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1812
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1813
+ /* @__PURE__ */ jsx(FormLayout, { children: /* @__PURE__ */ jsx(
1846
1814
  Checkbox,
1847
1815
  {
1848
1816
  checked,
@@ -1856,7 +1824,7 @@ function CheckboxFormulaInput(props) {
1856
1824
  children: localeService.t("dataValidation.checkbox.tips")
1857
1825
  }
1858
1826
  ) }),
1859
- checked ? /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.checkbox.checked"), error: formula1Res, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1827
+ checked ? /* @__PURE__ */ jsx(FormLayout, { label: localeService.t("dataValidation.checkbox.checked"), error: formula1Res, children: /* @__PURE__ */ jsx(
1860
1828
  Input,
1861
1829
  {
1862
1830
  className: styles.dataValidationFormula,
@@ -1870,7 +1838,7 @@ function CheckboxFormulaInput(props) {
1870
1838
  }, "onChange")
1871
1839
  }
1872
1840
  ) }) : null,
1873
- checked ? /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.checkbox.unchecked"), error: formula2Res, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1841
+ checked ? /* @__PURE__ */ jsx(FormLayout, { label: localeService.t("dataValidation.checkbox.unchecked"), error: formula2Res, children: /* @__PURE__ */ jsx(
1874
1842
  Input,
1875
1843
  {
1876
1844
  className: styles.dataValidationFormula,
@@ -1894,7 +1862,7 @@ function CustomFormulaInput(props) {
1894
1862
  var _a19;
1895
1863
  const handleOutClick = (_a19 = formulaEditorActionsRef.current) == null ? void 0 : _a19.handleOutClick;
1896
1864
  handleOutClick && handleOutClick(e, () => isFocusFormulaEditorSet(!1));
1897
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(
1865
+ }), /* @__PURE__ */ jsx(
1898
1866
  FormulaEditor,
1899
1867
  {
1900
1868
  initValue: (_a18 = value == null ? void 0 : value.formula1) != null ? _a18 : "=",
@@ -1958,7 +1926,7 @@ const DEFAULT_COLOR_PRESET = [
1958
1926
  "#F248A6"
1959
1927
  ], ColorSelect = /* @__PURE__ */ __name((props) => {
1960
1928
  const { value, onChange, disabled } = props, [open, setOpen] = useState(!1);
1961
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
1929
+ return /* @__PURE__ */ jsx(
1962
1930
  Select,
1963
1931
  {
1964
1932
  disabled,
@@ -1969,15 +1937,15 @@ const DEFAULT_COLOR_PRESET = [
1969
1937
  className: styles.dataValidationFormulaColorSelect,
1970
1938
  value,
1971
1939
  onChange,
1972
- labelRender: /* @__PURE__ */ __name((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1940
+ labelRender: /* @__PURE__ */ __name((item) => /* @__PURE__ */ jsx(
1973
1941
  "div",
1974
1942
  {
1975
1943
  className: styles.dataValidationFormulaColorItem,
1976
1944
  style: { background: item.value, marginTop: 5 }
1977
1945
  }
1978
1946
  ), "labelRender"),
1979
- dropdownRender: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.dataValidationFormulaColorSelectPanel, children: DEFAULT_COLOR_PRESET.map(
1980
- (color) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1947
+ dropdownRender: /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("div", { className: styles.dataValidationFormulaColorSelectPanel, children: DEFAULT_COLOR_PRESET.map(
1948
+ (color) => /* @__PURE__ */ jsx(
1981
1949
  "div",
1982
1950
  {
1983
1951
  onClick: /* @__PURE__ */ __name(() => {
@@ -1993,9 +1961,9 @@ const DEFAULT_COLOR_PRESET = [
1993
1961
  );
1994
1962
  }, "ColorSelect"), Template = /* @__PURE__ */ __name((props) => {
1995
1963
  const { item, commonProps, style } = props, { onItemChange, onItemDelete } = commonProps;
1996
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.dataValidationFormulaListItem, style, children: [
1997
- item.isRef ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(SequenceSingle, {}) }),
1998
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1964
+ return /* @__PURE__ */ jsxs("div", { className: styles.dataValidationFormulaListItem, style, children: [
1965
+ item.isRef ? null : /* @__PURE__ */ jsx("div", { className: clsx(styles.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ jsx(SequenceSingle, {}) }),
1966
+ /* @__PURE__ */ jsx(
1999
1967
  ColorSelect,
2000
1968
  {
2001
1969
  value: item.color,
@@ -2004,7 +1972,7 @@ const DEFAULT_COLOR_PRESET = [
2004
1972
  }, "onChange")
2005
1973
  }
2006
1974
  ),
2007
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1975
+ /* @__PURE__ */ jsx(
2008
1976
  Input,
2009
1977
  {
2010
1978
  disabled: item.isRef,
@@ -2014,7 +1982,7 @@ const DEFAULT_COLOR_PRESET = [
2014
1982
  }, "onChange")
2015
1983
  }
2016
1984
  ),
2017
- item.isRef ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteSingle, { onClick: /* @__PURE__ */ __name(() => onItemDelete(item.id), "onClick") }) })
1985
+ item.isRef ? null : /* @__PURE__ */ jsx("div", { className: styles.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ jsx(DeleteSingle, { onClick: /* @__PURE__ */ __name(() => onItemDelete(item.id), "onClick") }) })
2018
1986
  ] });
2019
1987
  }, "Template");
2020
1988
  function ListFormulaInput(props) {
@@ -2109,8 +2077,8 @@ function ListFormulaInput(props) {
2109
2077
  var _a18;
2110
2078
  const handleOutClick = (_a18 = formulaEditorActionsRef.current) == null ? void 0 : _a18.handleOutClick;
2111
2079
  handleOutClick && handleOutClick(e, () => isFocusFormulaEditorSet(!1));
2112
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
2113
- /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.list.options"), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
2080
+ }), /* @__PURE__ */ jsxs(Fragment, { children: [
2081
+ /* @__PURE__ */ jsx(FormLayout, { label: localeService.t("dataValidation.list.options"), children: /* @__PURE__ */ jsxs(
2114
2082
  RadioGroup,
2115
2083
  {
2116
2084
  value: isFormulaStr,
@@ -2121,13 +2089,13 @@ function ListFormulaInput(props) {
2121
2089
  });
2122
2090
  }, "onChange"),
2123
2091
  children: [
2124
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "0", children: localeService.t("dataValidation.list.customOptions") }),
2125
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "1", children: localeService.t("dataValidation.list.refOptions") })
2092
+ /* @__PURE__ */ jsx(Radio, { value: "0", children: localeService.t("dataValidation.list.customOptions") }),
2093
+ /* @__PURE__ */ jsx(Radio, { value: "1", children: localeService.t("dataValidation.list.refOptions") })
2126
2094
  ]
2127
2095
  }
2128
2096
  ) }),
2129
- isFormulaStr === "1" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
2130
- /* @__PURE__ */ jsxRuntimeExports.jsx(
2097
+ isFormulaStr === "1" ? /* @__PURE__ */ jsxs(Fragment, { children: [
2098
+ /* @__PURE__ */ jsx(
2131
2099
  FormulaEditor,
2132
2100
  {
2133
2101
  initValue: formulaStr,
@@ -2144,9 +2112,9 @@ function ListFormulaInput(props) {
2144
2112
  isSupportAcrossSheet: !0
2145
2113
  }
2146
2114
  ),
2147
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, style: { marginTop: "12px" }, children: refFinalList.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(Template, { item, commonProps: { onItemChange: handleRefItemChange }, style: { marginBottom: 12 } }, item.id)) })
2148
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, style: { marginTop: "-12px" }, children: [
2149
- /* @__PURE__ */ jsxRuntimeExports.jsx(
2115
+ /* @__PURE__ */ jsx("div", { ref: containerRef, style: { marginTop: "12px" }, children: refFinalList.map((item) => /* @__PURE__ */ jsx(Template, { item, commonProps: { onItemChange: handleRefItemChange }, style: { marginBottom: 12 } }, item.id)) })
2116
+ ] }) : /* @__PURE__ */ jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsxs("div", { ref: containerRef, style: { marginTop: "-12px" }, children: [
2117
+ /* @__PURE__ */ jsx(
2150
2118
  DraggableList,
2151
2119
  {
2152
2120
  list: strList,
@@ -2154,7 +2122,7 @@ function ListFormulaInput(props) {
2154
2122
  rowHeight: 32,
2155
2123
  margin: [0, 12],
2156
2124
  draggableHandle: ".draggableHandle",
2157
- itemRender: /* @__PURE__ */ __name((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
2125
+ itemRender: /* @__PURE__ */ __name((item) => /* @__PURE__ */ jsx(
2158
2126
  Template,
2159
2127
  {
2160
2128
  item,
@@ -2168,8 +2136,8 @@ function ListFormulaInput(props) {
2168
2136
  idKey: "id"
2169
2137
  }
2170
2138
  ),
2171
- /* @__PURE__ */ jsxRuntimeExports.jsxs("a", { className: styles.dataValidationFormulaListAdd, onClick: handleAdd, children: [
2172
- /* @__PURE__ */ jsxRuntimeExports.jsx(IncreaseSingle, {}),
2139
+ /* @__PURE__ */ jsxs("a", { className: styles.dataValidationFormulaListAdd, onClick: handleAdd, children: [
2140
+ /* @__PURE__ */ jsx(IncreaseSingle, {}),
2173
2141
  localeService.t("dataValidation.list.add")
2174
2142
  ] })
2175
2143
  ] }) })
@@ -2197,10 +2165,10 @@ const CUSTOM_FORMULA_INPUT_NAME = "data-validation.custom-formula-input", BASE_F
2197
2165
  function ListRenderModeInput(props) {
2198
2166
  var _a18;
2199
2167
  const { value, onChange } = props, localeService = useDependency(LocaleService);
2200
- return /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioGroup, { value: `${(_a18 = value.renderMode) != null ? _a18 : DataValidationRenderMode.CUSTOM}`, onChange: /* @__PURE__ */ __name((renderMode) => onChange({ ...value, renderMode: +renderMode }), "onChange"), children: [
2201
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationRenderMode.CUSTOM}`, children: localeService.t("dataValidation.renderMode.chip") }),
2202
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationRenderMode.ARROW}`, children: localeService.t("dataValidation.renderMode.arrow") }),
2203
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationRenderMode.TEXT}`, children: localeService.t("dataValidation.renderMode.text") })
2168
+ return /* @__PURE__ */ jsx(FormLayout, { label: localeService.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ jsxs(RadioGroup, { value: `${(_a18 = value.renderMode) != null ? _a18 : DataValidationRenderMode.CUSTOM}`, onChange: /* @__PURE__ */ __name((renderMode) => onChange({ ...value, renderMode: +renderMode }), "onChange"), children: [
2169
+ /* @__PURE__ */ jsx(Radio, { value: `${DataValidationRenderMode.CUSTOM}`, children: localeService.t("dataValidation.renderMode.chip") }),
2170
+ /* @__PURE__ */ jsx(Radio, { value: `${DataValidationRenderMode.ARROW}`, children: localeService.t("dataValidation.renderMode.arrow") }),
2171
+ /* @__PURE__ */ jsx(Radio, { value: `${DataValidationRenderMode.TEXT}`, children: localeService.t("dataValidation.renderMode.text") })
2204
2172
  ] }) });
2205
2173
  }
2206
2174
  __name(ListRenderModeInput, "ListRenderModeInput");
@@ -2209,7 +2177,7 @@ const DATE_SHOW_TIME_OPTION = "DATE_SHOW_TIME_OPTION";
2209
2177
  function DateShowTimeOption(props) {
2210
2178
  var _a18;
2211
2179
  const { value, onChange } = props, localeService = useDependency(LocaleService);
2212
- return /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2180
+ return /* @__PURE__ */ jsx(FormLayout, { children: /* @__PURE__ */ jsx(
2213
2181
  Checkbox,
2214
2182
  {
2215
2183
  checked: (_a18 = value.bizInfo) == null ? void 0 : _a18.showTime,
@@ -1,3 +1,2 @@
1
1
  import { IDropdownComponentProps } from '../../../services/dropdown-manager.service';
2
- import { default as React } from 'react';
3
- export declare function DateDropdown(props: IDropdownComponentProps): React.JSX.Element | null | undefined;
2
+ export declare function DateDropdown(props: IDropdownComponentProps): import("react/jsx-runtime").JSX.Element | null | undefined;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare function DataValidationDetail(): React.JSX.Element | null;
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare function DataValidationDetail(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare function CellDropdown(): React.JSX.Element | null;
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare function CellDropdown(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,3 +1,2 @@
1
1
  import { IFormulaInputProps } from '@univerjs/data-validation';
2
- import { default as React } from 'react';
3
- export declare const BaseFormulaInput: (props: IFormulaInputProps) => React.JSX.Element;
2
+ export declare const BaseFormulaInput: (props: IFormulaInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { IFormulaInputProps } from '@univerjs/data-validation';
2
- import { default as React } from 'react';
3
- export declare function CheckboxFormulaInput(props: IFormulaInputProps): React.JSX.Element;
2
+ export declare function CheckboxFormulaInput(props: IFormulaInputProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { IFormulaInputProps } from '@univerjs/data-validation';
2
- import { default as React } from 'react';
3
- export declare function CustomFormulaInput(props: IFormulaInputProps): React.JSX.Element;
2
+ export declare function CustomFormulaInput(props: IFormulaInputProps): import("react/jsx-runtime").JSX.Element;