@fileverse-dev/fortune-react 1.0.2-mod-29 → 1.0.2-mod-31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -2103,15 +2103,11 @@ var FilterOptions = function FilterOptions(_ref) {
2103
2103
  width: undefined
2104
2104
  }),
2105
2105
  className: "luckysheet-filter-options ".concat(filterParam == null ? "" : "luckysheet-filter-options-active")
2106
- }, filterParam == null ? (/*#__PURE__*/React.createElement("div", {
2107
- className: "caret down"
2108
- })) : (/*#__PURE__*/React.createElement(SVGIcon, {
2109
- name: "filter-fill-white",
2110
- style: {
2111
- width: 15,
2112
- height: 15
2113
- }
2114
- })));
2106
+ }, /*#__PURE__*/React.createElement(SVGIcon, {
2107
+ name: "filter",
2108
+ width: 15,
2109
+ height: 15
2110
+ }));
2115
2111
  })));
2116
2112
  };
2117
2113
 
@@ -3209,6 +3205,7 @@ var ConditionRules = function ConditionRules(_ref) {
3209
3205
  }, /*#__PURE__*/React.createElement("span", {
3210
3206
  id: "checkTextColor"
3211
3207
  }, /*#__PURE__*/React.createElement(Checkbox, {
3208
+ className: "border-2",
3212
3209
  checked: context.conditionRules.textColor.check,
3213
3210
  onCheckedChange: function onCheckedChange(e) {
3214
3211
  var checked = e.target.checked;
@@ -3236,6 +3233,7 @@ var ConditionRules = function ConditionRules(_ref) {
3236
3233
  }, /*#__PURE__*/React.createElement("span", {
3237
3234
  id: "checkCellColor"
3238
3235
  }, /*#__PURE__*/React.createElement(Checkbox, {
3236
+ className: "border-2",
3239
3237
  checked: context.conditionRules.cellColor.check,
3240
3238
  onCheckedChange: function onCheckedChange(e) {
3241
3239
  var checked = e.target.checked;
@@ -6530,7 +6528,9 @@ var Toolbar = function Toolbar(_ref) {
6530
6528
  justifyContent: "start"
6531
6529
  }
6532
6530
  }, /*#__PURE__*/React.createElement(SVGIcon, {
6533
- name: iconId
6531
+ name: iconId,
6532
+ width: 24,
6533
+ height: 18
6534
6534
  }), text))) : (/*#__PURE__*/React.createElement(MenuDivider, {
6535
6535
  key: "divider-".concat(index)
6536
6536
  }));
@@ -6555,7 +6555,7 @@ var Toolbar = function Toolbar(_ref) {
6555
6555
  className: "fortune-toolbar",
6556
6556
  "aria-label": toolbar.toolbar
6557
6557
  }, settings.customToolbarItems.filter(function (n) {
6558
- return n.key !== "templates";
6558
+ return n.key === "import-export";
6559
6559
  }).map(function (n) {
6560
6560
  return /*#__PURE__*/React.createElement(CustomButton, {
6561
6561
  tooltip: n.tooltip,
@@ -6592,6 +6592,18 @@ var Toolbar = function Toolbar(_ref) {
6592
6592
  icon: n.icon,
6593
6593
  iconName: n.iconName
6594
6594
  }, n.children);
6595
+ }), /*#__PURE__*/React.createElement(Divider, {
6596
+ key: "templateDivider"
6597
+ }), settings.customToolbarItems.filter(function (n) {
6598
+ return n.key !== "templates" && n.key !== "import-export";
6599
+ }).map(function (n) {
6600
+ return /*#__PURE__*/React.createElement(CustomButton, {
6601
+ tooltip: n.tooltip,
6602
+ onClick: n.onClick,
6603
+ key: n.key,
6604
+ icon: n.icon,
6605
+ iconName: n.iconName
6606
+ }, n.children);
6595
6607
  }));
6596
6608
  };
6597
6609
 
@@ -7836,7 +7848,8 @@ var ContextMenu = function ContextMenu() {
7836
7848
  }
7837
7849
  }, /*#__PURE__*/React.createElement(SVGIcon, {
7838
7850
  name: "sort-asc",
7839
- width: 22,
7851
+ width: 24,
7852
+ height: 18,
7840
7853
  style: {
7841
7854
  marginRight: "4px"
7842
7855
  }
@@ -7854,7 +7867,8 @@ var ContextMenu = function ContextMenu() {
7854
7867
  }
7855
7868
  }, /*#__PURE__*/React.createElement(SVGIcon, {
7856
7869
  name: "sort-desc",
7857
- width: 22,
7870
+ width: 24,
7871
+ height: 18,
7858
7872
  style: {
7859
7873
  marginRight: "4px"
7860
7874
  }
@@ -7910,7 +7924,7 @@ var ContextMenu = function ContextMenu() {
7910
7924
  }
7911
7925
  }, /*#__PURE__*/React.createElement(SVGIcon, {
7912
7926
  name: "filter",
7913
- width: 22,
7927
+ width: 24,
7914
7928
  style: {
7915
7929
  marginRight: "4px"
7916
7930
  }
@@ -7928,9 +7942,11 @@ var ContextMenu = function ContextMenu() {
7928
7942
  }
7929
7943
  }, /*#__PURE__*/React.createElement(SVGIcon, {
7930
7944
  name: "eraser",
7931
- width: 22,
7945
+ width: 24,
7946
+ height: 22,
7932
7947
  style: {
7933
- marginRight: "4px"
7948
+ marginRight: "4px",
7949
+ marginLeft: "2px"
7934
7950
  }
7935
7951
  }), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
7936
7952
  trigger: "mouseenter focus",
@@ -7941,7 +7957,7 @@ var ContextMenu = function ContextMenu() {
7941
7957
  className: "context-item"
7942
7958
  }, /*#__PURE__*/React.createElement(SVGIcon, {
7943
7959
  name: "filter",
7944
- width: 22,
7960
+ width: 24,
7945
7961
  style: {
7946
7962
  marginRight: "4px"
7947
7963
  }
@@ -10365,23 +10381,24 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10365
10381
  var SelectItem = function SelectItem(_ref) {
10366
10382
  var item = _ref.item,
10367
10383
  isChecked = _ref.isChecked,
10368
- _onChange = _ref.onChange,
10384
+ onChange = _ref.onChange,
10369
10385
  isItemVisible = _ref.isItemVisible;
10370
10386
  var checked = useMemo(function () {
10371
10387
  return isChecked(item.key);
10372
10388
  }, [isChecked, item.key]);
10373
10389
  return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
10374
10390
  className: "select-item"
10375
- }, /*#__PURE__*/React.createElement("input", {
10376
- className: "filter-checkbox",
10377
- type: "checkbox",
10391
+ }, /*#__PURE__*/React.createElement("div", {
10392
+ className: "flex items-center gap-2"
10393
+ }, /*#__PURE__*/React.createElement(Checkbox, {
10394
+ className: "border-2",
10378
10395
  checked: checked,
10379
- onChange: function onChange() {
10380
- _onChange(item, !checked);
10396
+ onCheckedChange: function onCheckedChange(e) {
10397
+ onChange(item, e.target.checked);
10381
10398
  }
10382
- }), /*#__PURE__*/React.createElement("div", null, item.text), /*#__PURE__*/React.createElement("span", {
10399
+ }), /*#__PURE__*/React.createElement("span", null, item.text)), /*#__PURE__*/React.createElement("span", {
10383
10400
  className: "count"
10384
- }, "( ".concat(item.rows.length, " )")))) : null;
10401
+ }, "".concat(item.rows.length)))) : null;
10385
10402
  };
10386
10403
  var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
10387
10404
  var item = _ref2.item,
@@ -10390,7 +10407,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
10390
10407
  initialExpand = _ref2.initialExpand,
10391
10408
  onExpand = _ref2.onExpand,
10392
10409
  isChecked = _ref2.isChecked,
10393
- _onChange2 = _ref2.onChange,
10410
+ onChange = _ref2.onChange,
10394
10411
  isItemVisible = _ref2.isItemVisible;
10395
10412
  var _useState = useState(initialExpand(item.key)),
10396
10413
  _useState2 = _slicedToArray(_useState, 2),
@@ -10399,39 +10416,43 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
10399
10416
  var checked = useMemo(function () {
10400
10417
  return isChecked(item.key);
10401
10418
  }, [isChecked, item.key]);
10402
- return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
10419
+ return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
10420
+ className: "flex flex-col gap-2"
10421
+ }, /*#__PURE__*/React.createElement("div", {
10403
10422
  className: "select-item",
10404
10423
  style: {
10405
10424
  marginLeft: -2 + depth * 20
10406
10425
  },
10407
- onClick: function onClick() {
10408
- onExpand === null || onExpand === void 0 ? void 0 : onExpand(item.key, !expand);
10409
- setExpand(!expand);
10410
- },
10411
10426
  tabIndex: 0
10427
+ }, /*#__PURE__*/React.createElement("div", {
10428
+ className: "flex items-center gap-2",
10429
+ style: {
10430
+ flex: 1
10431
+ },
10432
+ onClick: function onClick(e) {
10433
+ return e.stopPropagation();
10434
+ }
10412
10435
  }, _.isEmpty(item.children) ? (/*#__PURE__*/React.createElement("div", {
10413
10436
  style: {
10414
10437
  width: 10
10415
10438
  }
10416
- })) : (/*#__PURE__*/React.createElement("div", {
10417
- className: "filter-caret ".concat(expand ? "down" : "right"),
10418
- style: {
10419
- cursor: "pointer"
10439
+ })) : (/*#__PURE__*/React.createElement(LucideIcon, {
10440
+ name: expand ? "ChevronDown" : "ChevronRight",
10441
+ className: "cursor-pointer",
10442
+ size: "sm",
10443
+ onClick: function onClick() {
10444
+ onExpand === null || onExpand === void 0 ? void 0 : onExpand(item.key, !expand);
10445
+ setExpand(!expand);
10420
10446
  }
10421
- })), /*#__PURE__*/React.createElement("input", {
10422
- className: "filter-checkbox",
10423
- type: "checkbox",
10447
+ })), /*#__PURE__*/React.createElement(Checkbox, {
10448
+ className: "border-2",
10424
10449
  checked: checked,
10425
- onChange: function onChange() {
10426
- _onChange2(item, !checked);
10427
- },
10428
- onClick: function onClick(e) {
10429
- return e.stopPropagation();
10430
- },
10431
- tabIndex: 0
10432
- }), /*#__PURE__*/React.createElement("div", null, item.text), /*#__PURE__*/React.createElement("span", {
10450
+ onCheckedChange: function onCheckedChange(e) {
10451
+ onChange(item, e.target.checked);
10452
+ }
10453
+ }), /*#__PURE__*/React.createElement("span", null, item.text)), /*#__PURE__*/React.createElement("span", {
10433
10454
  className: "count"
10434
- }, "( ".concat(item.rows.length, " )"))), expand && item.children.map(function (v) {
10455
+ }, "".concat(item.rows.length))), expand && item.children.map(function (v) {
10435
10456
  return /*#__PURE__*/React.createElement(_DateSelectTreeItem, _objectSpread2({
10436
10457
  key: v.key,
10437
10458
  item: v,
@@ -10440,7 +10461,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
10440
10461
  initialExpand: initialExpand,
10441
10462
  onExpand: onExpand,
10442
10463
  isChecked: isChecked,
10443
- onChange: _onChange2,
10464
+ onChange: onChange,
10444
10465
  isItemVisible: isItemVisible
10445
10466
  }));
10446
10467
  }))) : null;
@@ -10489,8 +10510,7 @@ var FilterMenu = function FilterMenu() {
10489
10510
  startCol = _ref4.startCol,
10490
10511
  endRow = _ref4.endRow,
10491
10512
  endCol = _ref4.endCol,
10492
- col = _ref4.col,
10493
- listBoxMaxHeight = _ref4.listBoxMaxHeight;
10513
+ col = _ref4.col;
10494
10514
  var _locale = locale(context),
10495
10515
  filter = _locale.filter;
10496
10516
  var _useState3 = useState({
@@ -10565,25 +10585,6 @@ var FilterMenu = function FilterMenu() {
10565
10585
  }));
10566
10586
  }, 300);
10567
10587
  }, [data.flattenValues]);
10568
- var selectAll = useCallback(function () {
10569
- setDatesUncheck([]);
10570
- setValuesUncheck([]);
10571
- hiddenRows.current = [];
10572
- }, []);
10573
- var clearAll = useCallback(function () {
10574
- setDatesUncheck(_.keys(data.dateRowMap));
10575
- setValuesUncheck(_.keys(data.valueRowMap));
10576
- hiddenRows.current = data.visibleRows;
10577
- }, [data.dateRowMap, data.valueRowMap, data.visibleRows]);
10578
- var inverseSelect = useCallback(function () {
10579
- setDatesUncheck(produce(function (draft) {
10580
- return _.xor(draft, _.keys(data.dateRowMap));
10581
- }));
10582
- setValuesUncheck(produce(function (draft) {
10583
- return _.xor(draft, _.keys(data.valueRowMap));
10584
- }));
10585
- hiddenRows.current = _.xor(hiddenRows.current, data.visibleRows);
10586
- }, [data.dateRowMap, data.valueRowMap, data.visibleRows]);
10587
10588
  var onColorSelectChange = useCallback(function (key, color, checked) {
10588
10589
  setFilterColors(produce(function (draft) {
10589
10590
  var colorData = _.find(_.get(draft, key), function (v) {
@@ -10713,11 +10714,12 @@ var FilterMenu = function FilterMenu() {
10713
10714
  ref: containerRef,
10714
10715
  style: {
10715
10716
  left: filterContextMenu.x,
10716
- top: filterContextMenu.y
10717
+ top: filterContextMenu.y,
10718
+ minWidth: "280px !important"
10717
10719
  }
10718
10720
  }, (_settings$filterConte = settings.filterContextMenu) === null || _settings$filterConte === void 0 ? void 0 : _settings$filterConte.map(function (name, i) {
10719
10721
  if (name === "|") {
10720
- return /*#__PURE__*/React.createElement(Divider$1, {
10722
+ return /*#__PURE__*/React.createElement(Divider$2, {
10721
10723
  key: "divider-".concat(i)
10722
10724
  });
10723
10725
  }
@@ -10727,7 +10729,16 @@ var FilterMenu = function FilterMenu() {
10727
10729
  onClick: function onClick() {
10728
10730
  return sortData(true);
10729
10731
  }
10730
- }, filter.sortByAsc);
10732
+ }, /*#__PURE__*/React.createElement("div", {
10733
+ className: "context-item w-full"
10734
+ }, /*#__PURE__*/React.createElement(SVGIcon, {
10735
+ name: "sort-asc",
10736
+ width: 24,
10737
+ height: 18,
10738
+ style: {
10739
+ marginRight: "4px"
10740
+ }
10741
+ }), /*#__PURE__*/React.createElement("p", null, filter.sortByAsc)));
10731
10742
  }
10732
10743
  if (name === "sort-by-desc") {
10733
10744
  return /*#__PURE__*/React.createElement(Menu, {
@@ -10735,7 +10746,16 @@ var FilterMenu = function FilterMenu() {
10735
10746
  onClick: function onClick() {
10736
10747
  return sortData(false);
10737
10748
  }
10738
- }, filter.sortByDesc);
10749
+ }, /*#__PURE__*/React.createElement("div", {
10750
+ className: "context-item w-full"
10751
+ }, /*#__PURE__*/React.createElement(SVGIcon, {
10752
+ name: "sort-desc",
10753
+ width: 24,
10754
+ height: 18,
10755
+ style: {
10756
+ marginRight: "4px"
10757
+ }
10758
+ }), /*#__PURE__*/React.createElement("p", null, filter.sortByDesc)));
10739
10759
  }
10740
10760
  if (name === "filter-by-color") {
10741
10761
  return /*#__PURE__*/React.createElement("div", {
@@ -10763,72 +10783,22 @@ var FilterMenu = function FilterMenu() {
10763
10783
  className: "filter-caret right"
10764
10784
  }))));
10765
10785
  }
10766
- if (name === "filter-by-condition") {
10767
- return /*#__PURE__*/React.createElement("div", {
10768
- key: "name"
10769
- }, /*#__PURE__*/React.createElement(Menu, {
10770
- onClick: function onClick() {}
10771
- }, /*#__PURE__*/React.createElement("div", {
10772
- className: "filter-caret right"
10773
- }), filter.filterByCondition), /*#__PURE__*/React.createElement("div", {
10774
- className: "luckysheet-\\${menuid}-bycondition",
10775
- style: {
10776
- display: "none"
10777
- }
10778
- }, /*#__PURE__*/React.createElement("div", {
10779
- className: "luckysheet-flat-menu-button luckysheet-mousedown-cancel",
10780
- id: "luckysheet-\\${menuid}-selected"
10781
- }, /*#__PURE__*/React.createElement("span", {
10782
- className: "luckysheet-mousedown-cancel",
10783
- "data-value": "null",
10784
- "data-type": "0"
10785
- }, filter.filiterInputNone), /*#__PURE__*/React.createElement("div", {
10786
- className: "luckysheet-mousedown-cancel"
10787
- }, /*#__PURE__*/React.createElement("i", {
10788
- className: "fa fa-sort",
10789
- "aria-hidden": "true"
10790
- })))));
10791
- }
10792
10786
  if (name === "filter-by-value") {
10793
10787
  return /*#__PURE__*/React.createElement("div", {
10794
10788
  key: name
10795
- }, /*#__PURE__*/React.createElement(Menu, {
10796
- onClick: function onClick() {}
10797
10789
  }, /*#__PURE__*/React.createElement("div", {
10798
- className: "filter-caret right"
10799
- }), filter.filterByValues), /*#__PURE__*/React.createElement("div", {
10800
- className: "luckysheet-filter-byvalue"
10790
+ className: "luckysheet-filter-byvalue flex flex-col gap-2 mt-2"
10801
10791
  }, /*#__PURE__*/React.createElement("div", {
10802
- className: "fortune-menuitem-row byvalue-btn-row"
10803
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10804
- className: "fortune-byvalue-btn",
10805
- onClick: selectAll,
10806
- tabIndex: 0
10807
- }, filter.filterValueByAllBtn), " - ", /*#__PURE__*/React.createElement("span", {
10808
- className: "fortune-byvalue-btn",
10809
- onClick: clearAll,
10810
- tabIndex: 0
10811
- }, filter.filterValueByClearBtn), " - ", /*#__PURE__*/React.createElement("span", {
10812
- className: "fortune-byvalue-btn",
10813
- onClick: inverseSelect,
10814
- tabIndex: 0
10815
- }, filter.filterValueByInverseBtn)), /*#__PURE__*/React.createElement("div", {
10816
- className: "byvalue-filter-icon"
10817
- }, /*#__PURE__*/React.createElement(SVGIcon, {
10818
- name: "filter-fill",
10819
- style: {
10820
- width: 20,
10821
- height: 20
10822
- }
10823
- }))), /*#__PURE__*/React.createElement("div", {
10824
10792
  className: "filtermenu-input-container"
10825
- }, /*#__PURE__*/React.createElement("input", {
10826
- type: "text",
10793
+ }, /*#__PURE__*/React.createElement(TextField, {
10794
+ leftIcon: /*#__PURE__*/React.createElement(LucideIcon, {
10795
+ name: "Search",
10796
+ size: "sm"
10797
+ }),
10827
10798
  onKeyDown: function onKeyDown(e) {
10828
10799
  return e.stopPropagation();
10829
10800
  },
10830
10801
  placeholder: filter.filterValueByTip,
10831
- className: "luckysheet-mousedown-cancel",
10832
10802
  id: "luckysheet-\\${menuid}-byvalue-input",
10833
10803
  value: searchText,
10834
10804
  onChange: function onChange(e) {
@@ -10836,10 +10806,7 @@ var FilterMenu = function FilterMenu() {
10836
10806
  searchValues(e.target.value);
10837
10807
  }
10838
10808
  })), /*#__PURE__*/React.createElement("div", {
10839
- id: "luckysheet-filter-byvalue-select",
10840
- style: {
10841
- maxHeight: listBoxMaxHeight
10842
- }
10809
+ id: "luckysheet-filter-byvalue-select"
10843
10810
  }, /*#__PURE__*/React.createElement(DateSelectTree, {
10844
10811
  dates: data.dates,
10845
10812
  onExpand: onExpand,
@@ -10861,6 +10828,37 @@ var FilterMenu = function FilterMenu() {
10861
10828
  return v.match(item.key) != null;
10862
10829
  }) > -1;
10863
10830
  }
10831
+ }), /*#__PURE__*/React.createElement(SelectItem, {
10832
+ item: {
10833
+ key: "all",
10834
+ text: filter.filterValueByAllBtn,
10835
+ value: "",
10836
+ mask: "",
10837
+ rows: data.values.filter(function (v) {
10838
+ return showValues.includes(v.text);
10839
+ }).flatMap(function (v) {
10840
+ return v.rows;
10841
+ })
10842
+ },
10843
+ isChecked: function isChecked() {
10844
+ var allDatesChecked = datesUncheck.length === 0;
10845
+ var allValuesChecked = valuesUncheck.length === 0;
10846
+ return allDatesChecked && allValuesChecked;
10847
+ },
10848
+ onChange: function onChange(item, checked) {
10849
+ if (checked) {
10850
+ setDatesUncheck([]);
10851
+ setValuesUncheck([]);
10852
+ hiddenRows.current = [];
10853
+ } else {
10854
+ setDatesUncheck(_.keys(data.dateRowMap));
10855
+ setValuesUncheck(_.keys(data.valueRowMap));
10856
+ hiddenRows.current = data.visibleRows;
10857
+ }
10858
+ },
10859
+ isItemVisible: function isItemVisible() {
10860
+ return true;
10861
+ }
10864
10862
  }), data.values.map(function (v) {
10865
10863
  return /*#__PURE__*/React.createElement(SelectItem, {
10866
10864
  key: v.key,
@@ -10870,14 +10868,17 @@ var FilterMenu = function FilterMenu() {
10870
10868
  },
10871
10869
  onChange: function onChange(item, checked) {
10872
10870
  var rows = hiddenRows.current;
10873
- hiddenRows.current = checked ? _.without.apply(_, [rows].concat(_toConsumableArray(item.rows))) : _.concat(rows, item.rows);
10874
- setValuesUncheck(produce(function (draft) {
10875
- if (checked) {
10871
+ if (checked) {
10872
+ hiddenRows.current = _.without.apply(_, [rows].concat(_toConsumableArray(item.rows)));
10873
+ setValuesUncheck(produce(function (draft) {
10876
10874
  _.pull(draft, item.key);
10877
- } else {
10875
+ }));
10876
+ } else {
10877
+ hiddenRows.current = _.concat(rows, item.rows);
10878
+ setValuesUncheck(produce(function (draft) {
10878
10879
  draft.push(item.key);
10879
- }
10880
- }));
10880
+ }));
10881
+ }
10881
10882
  },
10882
10883
  isItemVisible: function isItemVisible(item) {
10883
10884
  return showValues.length === data.flattenValues.length ? true : _.includes(showValues, item.text);
@@ -10886,40 +10887,49 @@ var FilterMenu = function FilterMenu() {
10886
10887
  }))));
10887
10888
  }
10888
10889
  return null;
10889
- }), /*#__PURE__*/React.createElement(Divider$1, null), /*#__PURE__*/React.createElement("div", {
10890
- className: "fortune-menuitem-row"
10891
- }, /*#__PURE__*/React.createElement("div", {
10892
- className: "button-basic button-primary",
10890
+ }), /*#__PURE__*/React.createElement("div", {
10891
+ className: "fortune-menuitem-row mt-2"
10892
+ }, /*#__PURE__*/React.createElement(Button$1, {
10893
+ variant: "ghost",
10894
+ style: {
10895
+ minWidth: "80px"
10896
+ },
10893
10897
  onClick: function onClick() {
10894
- if (col == null) return;
10895
10898
  setContext(function (draftCtx) {
10896
- var rowHidden = _.reduce(hiddenRows.current, function (pre, curr) {
10897
- pre[curr] = 0;
10898
- return pre;
10899
- }, {});
10900
- saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
10901
- hiddenRows.current = [];
10902
- draftCtx.filterContextMenu = undefined;
10899
+ clearFilter(draftCtx);
10903
10900
  });
10904
10901
  },
10905
10902
  tabIndex: 0
10906
- }, filter.filterConform), /*#__PURE__*/React.createElement("div", {
10907
- className: "button-basic button-default",
10903
+ }, filter.clearFilter), /*#__PURE__*/React.createElement(Button$1, {
10904
+ variant: "secondary",
10905
+ style: {
10906
+ minWidth: "80px"
10907
+ },
10908
10908
  onClick: function onClick() {
10909
10909
  setContext(function (draftCtx) {
10910
10910
  draftCtx.filterContextMenu = undefined;
10911
10911
  });
10912
10912
  },
10913
10913
  tabIndex: 0
10914
- }, filter.filterCancel), /*#__PURE__*/React.createElement("div", {
10915
- className: "button-basic button-danger",
10914
+ }, filter.filterCancel), /*#__PURE__*/React.createElement(Button$1, {
10915
+ variant: "default",
10916
+ style: {
10917
+ minWidth: "80px"
10918
+ },
10916
10919
  onClick: function onClick() {
10920
+ if (col == null) return;
10917
10921
  setContext(function (draftCtx) {
10918
- clearFilter(draftCtx);
10922
+ var rowHidden = _.reduce(hiddenRows.current, function (pre, curr) {
10923
+ pre[curr] = 0;
10924
+ return pre;
10925
+ }, {});
10926
+ saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
10927
+ hiddenRows.current = [];
10928
+ draftCtx.filterContextMenu = undefined;
10919
10929
  });
10920
10930
  },
10921
10931
  tabIndex: 0
10922
- }, filter.clearFilter))), showSubMenu && (/*#__PURE__*/React.createElement("div", {
10932
+ }, filter.filterConfirm))), showSubMenu && (/*#__PURE__*/React.createElement("div", {
10923
10933
  ref: subMenuRef,
10924
10934
  className: "luckysheet-filter-bycolor-submenu",
10925
10935
  style: subMenuPos,
@@ -10959,7 +10969,7 @@ var FilterMenu = function FilterMenu() {
10959
10969
  });
10960
10970
  },
10961
10971
  tabIndex: 0
10962
- }, filter.filterConform))))));
10972
+ }, filter.filterConfirm))))));
10963
10973
  };
10964
10974
 
10965
10975
  var SheetHiddenButton = function SheetHiddenButton(_ref) {