@fileverse-dev/fortune-react 1.0.2-mod-30 → 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/components/Workbook/api.d.ts +1 -1
- package/dist/components/Workbook/index.d.ts +1 -1
- package/dist/index.css +27 -24
- package/dist/index.esm.css +27 -24
- package/dist/index.esm.js +155 -157
- package/dist/index.js +155 -157
- package/dist/index.umd.css +27 -24
- package/dist/index.umd.js +4420 -2734
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +9 -9
- package/package.json +2 -2
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
|
-
},
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
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
|
}));
|
|
@@ -7848,7 +7848,8 @@ var ContextMenu = function ContextMenu() {
|
|
|
7848
7848
|
}
|
|
7849
7849
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7850
7850
|
name: "sort-asc",
|
|
7851
|
-
width:
|
|
7851
|
+
width: 24,
|
|
7852
|
+
height: 18,
|
|
7852
7853
|
style: {
|
|
7853
7854
|
marginRight: "4px"
|
|
7854
7855
|
}
|
|
@@ -7866,7 +7867,8 @@ var ContextMenu = function ContextMenu() {
|
|
|
7866
7867
|
}
|
|
7867
7868
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7868
7869
|
name: "sort-desc",
|
|
7869
|
-
width:
|
|
7870
|
+
width: 24,
|
|
7871
|
+
height: 18,
|
|
7870
7872
|
style: {
|
|
7871
7873
|
marginRight: "4px"
|
|
7872
7874
|
}
|
|
@@ -7922,7 +7924,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7922
7924
|
}
|
|
7923
7925
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7924
7926
|
name: "filter",
|
|
7925
|
-
width:
|
|
7927
|
+
width: 24,
|
|
7926
7928
|
style: {
|
|
7927
7929
|
marginRight: "4px"
|
|
7928
7930
|
}
|
|
@@ -7940,9 +7942,11 @@ var ContextMenu = function ContextMenu() {
|
|
|
7940
7942
|
}
|
|
7941
7943
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7942
7944
|
name: "eraser",
|
|
7943
|
-
width:
|
|
7945
|
+
width: 24,
|
|
7946
|
+
height: 22,
|
|
7944
7947
|
style: {
|
|
7945
|
-
marginRight: "4px"
|
|
7948
|
+
marginRight: "4px",
|
|
7949
|
+
marginLeft: "2px"
|
|
7946
7950
|
}
|
|
7947
7951
|
}), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
|
|
7948
7952
|
trigger: "mouseenter focus",
|
|
@@ -7953,7 +7957,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7953
7957
|
className: "context-item"
|
|
7954
7958
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7955
7959
|
name: "filter",
|
|
7956
|
-
width:
|
|
7960
|
+
width: 24,
|
|
7957
7961
|
style: {
|
|
7958
7962
|
marginRight: "4px"
|
|
7959
7963
|
}
|
|
@@ -10377,23 +10381,24 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
10377
10381
|
var SelectItem = function SelectItem(_ref) {
|
|
10378
10382
|
var item = _ref.item,
|
|
10379
10383
|
isChecked = _ref.isChecked,
|
|
10380
|
-
|
|
10384
|
+
onChange = _ref.onChange,
|
|
10381
10385
|
isItemVisible = _ref.isItemVisible;
|
|
10382
10386
|
var checked = useMemo(function () {
|
|
10383
10387
|
return isChecked(item.key);
|
|
10384
10388
|
}, [isChecked, item.key]);
|
|
10385
10389
|
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
|
|
10386
10390
|
className: "select-item"
|
|
10387
|
-
}, /*#__PURE__*/React.createElement("
|
|
10388
|
-
className: "
|
|
10389
|
-
|
|
10391
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10392
|
+
className: "flex items-center gap-2"
|
|
10393
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
10394
|
+
className: "border-2",
|
|
10390
10395
|
checked: checked,
|
|
10391
|
-
|
|
10392
|
-
|
|
10396
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
10397
|
+
onChange(item, e.target.checked);
|
|
10393
10398
|
}
|
|
10394
|
-
}), /*#__PURE__*/React.createElement("
|
|
10399
|
+
}), /*#__PURE__*/React.createElement("span", null, item.text)), /*#__PURE__*/React.createElement("span", {
|
|
10395
10400
|
className: "count"
|
|
10396
|
-
}, "
|
|
10401
|
+
}, "".concat(item.rows.length)))) : null;
|
|
10397
10402
|
};
|
|
10398
10403
|
var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
10399
10404
|
var item = _ref2.item,
|
|
@@ -10402,7 +10407,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
10402
10407
|
initialExpand = _ref2.initialExpand,
|
|
10403
10408
|
onExpand = _ref2.onExpand,
|
|
10404
10409
|
isChecked = _ref2.isChecked,
|
|
10405
|
-
|
|
10410
|
+
onChange = _ref2.onChange,
|
|
10406
10411
|
isItemVisible = _ref2.isItemVisible;
|
|
10407
10412
|
var _useState = useState(initialExpand(item.key)),
|
|
10408
10413
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -10411,39 +10416,43 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
10411
10416
|
var checked = useMemo(function () {
|
|
10412
10417
|
return isChecked(item.key);
|
|
10413
10418
|
}, [isChecked, item.key]);
|
|
10414
|
-
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div",
|
|
10419
|
+
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
|
|
10420
|
+
className: "flex flex-col gap-2"
|
|
10421
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10415
10422
|
className: "select-item",
|
|
10416
10423
|
style: {
|
|
10417
10424
|
marginLeft: -2 + depth * 20
|
|
10418
10425
|
},
|
|
10419
|
-
onClick: function onClick() {
|
|
10420
|
-
onExpand === null || onExpand === void 0 ? void 0 : onExpand(item.key, !expand);
|
|
10421
|
-
setExpand(!expand);
|
|
10422
|
-
},
|
|
10423
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
|
+
}
|
|
10424
10435
|
}, _.isEmpty(item.children) ? (/*#__PURE__*/React.createElement("div", {
|
|
10425
10436
|
style: {
|
|
10426
10437
|
width: 10
|
|
10427
10438
|
}
|
|
10428
|
-
})) : (/*#__PURE__*/React.createElement(
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
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);
|
|
10432
10446
|
}
|
|
10433
|
-
})), /*#__PURE__*/React.createElement(
|
|
10434
|
-
className: "
|
|
10435
|
-
type: "checkbox",
|
|
10447
|
+
})), /*#__PURE__*/React.createElement(Checkbox, {
|
|
10448
|
+
className: "border-2",
|
|
10436
10449
|
checked: checked,
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
}
|
|
10440
|
-
|
|
10441
|
-
return e.stopPropagation();
|
|
10442
|
-
},
|
|
10443
|
-
tabIndex: 0
|
|
10444
|
-
}), /*#__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", {
|
|
10445
10454
|
className: "count"
|
|
10446
|
-
}, "
|
|
10455
|
+
}, "".concat(item.rows.length))), expand && item.children.map(function (v) {
|
|
10447
10456
|
return /*#__PURE__*/React.createElement(_DateSelectTreeItem, _objectSpread2({
|
|
10448
10457
|
key: v.key,
|
|
10449
10458
|
item: v,
|
|
@@ -10452,7 +10461,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
10452
10461
|
initialExpand: initialExpand,
|
|
10453
10462
|
onExpand: onExpand,
|
|
10454
10463
|
isChecked: isChecked,
|
|
10455
|
-
onChange:
|
|
10464
|
+
onChange: onChange,
|
|
10456
10465
|
isItemVisible: isItemVisible
|
|
10457
10466
|
}));
|
|
10458
10467
|
}))) : null;
|
|
@@ -10501,8 +10510,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10501
10510
|
startCol = _ref4.startCol,
|
|
10502
10511
|
endRow = _ref4.endRow,
|
|
10503
10512
|
endCol = _ref4.endCol,
|
|
10504
|
-
col = _ref4.col
|
|
10505
|
-
listBoxMaxHeight = _ref4.listBoxMaxHeight;
|
|
10513
|
+
col = _ref4.col;
|
|
10506
10514
|
var _locale = locale(context),
|
|
10507
10515
|
filter = _locale.filter;
|
|
10508
10516
|
var _useState3 = useState({
|
|
@@ -10577,25 +10585,6 @@ var FilterMenu = function FilterMenu() {
|
|
|
10577
10585
|
}));
|
|
10578
10586
|
}, 300);
|
|
10579
10587
|
}, [data.flattenValues]);
|
|
10580
|
-
var selectAll = useCallback(function () {
|
|
10581
|
-
setDatesUncheck([]);
|
|
10582
|
-
setValuesUncheck([]);
|
|
10583
|
-
hiddenRows.current = [];
|
|
10584
|
-
}, []);
|
|
10585
|
-
var clearAll = useCallback(function () {
|
|
10586
|
-
setDatesUncheck(_.keys(data.dateRowMap));
|
|
10587
|
-
setValuesUncheck(_.keys(data.valueRowMap));
|
|
10588
|
-
hiddenRows.current = data.visibleRows;
|
|
10589
|
-
}, [data.dateRowMap, data.valueRowMap, data.visibleRows]);
|
|
10590
|
-
var inverseSelect = useCallback(function () {
|
|
10591
|
-
setDatesUncheck(produce(function (draft) {
|
|
10592
|
-
return _.xor(draft, _.keys(data.dateRowMap));
|
|
10593
|
-
}));
|
|
10594
|
-
setValuesUncheck(produce(function (draft) {
|
|
10595
|
-
return _.xor(draft, _.keys(data.valueRowMap));
|
|
10596
|
-
}));
|
|
10597
|
-
hiddenRows.current = _.xor(hiddenRows.current, data.visibleRows);
|
|
10598
|
-
}, [data.dateRowMap, data.valueRowMap, data.visibleRows]);
|
|
10599
10588
|
var onColorSelectChange = useCallback(function (key, color, checked) {
|
|
10600
10589
|
setFilterColors(produce(function (draft) {
|
|
10601
10590
|
var colorData = _.find(_.get(draft, key), function (v) {
|
|
@@ -10725,11 +10714,12 @@ var FilterMenu = function FilterMenu() {
|
|
|
10725
10714
|
ref: containerRef,
|
|
10726
10715
|
style: {
|
|
10727
10716
|
left: filterContextMenu.x,
|
|
10728
|
-
top: filterContextMenu.y
|
|
10717
|
+
top: filterContextMenu.y,
|
|
10718
|
+
minWidth: "280px !important"
|
|
10729
10719
|
}
|
|
10730
10720
|
}, (_settings$filterConte = settings.filterContextMenu) === null || _settings$filterConte === void 0 ? void 0 : _settings$filterConte.map(function (name, i) {
|
|
10731
10721
|
if (name === "|") {
|
|
10732
|
-
return /*#__PURE__*/React.createElement(Divider$
|
|
10722
|
+
return /*#__PURE__*/React.createElement(Divider$2, {
|
|
10733
10723
|
key: "divider-".concat(i)
|
|
10734
10724
|
});
|
|
10735
10725
|
}
|
|
@@ -10739,7 +10729,16 @@ var FilterMenu = function FilterMenu() {
|
|
|
10739
10729
|
onClick: function onClick() {
|
|
10740
10730
|
return sortData(true);
|
|
10741
10731
|
}
|
|
10742
|
-
},
|
|
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)));
|
|
10743
10742
|
}
|
|
10744
10743
|
if (name === "sort-by-desc") {
|
|
10745
10744
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -10747,7 +10746,16 @@ var FilterMenu = function FilterMenu() {
|
|
|
10747
10746
|
onClick: function onClick() {
|
|
10748
10747
|
return sortData(false);
|
|
10749
10748
|
}
|
|
10750
|
-
},
|
|
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)));
|
|
10751
10759
|
}
|
|
10752
10760
|
if (name === "filter-by-color") {
|
|
10753
10761
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10775,72 +10783,22 @@ var FilterMenu = function FilterMenu() {
|
|
|
10775
10783
|
className: "filter-caret right"
|
|
10776
10784
|
}))));
|
|
10777
10785
|
}
|
|
10778
|
-
if (name === "filter-by-condition") {
|
|
10779
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
10780
|
-
key: "name"
|
|
10781
|
-
}, /*#__PURE__*/React.createElement(Menu, {
|
|
10782
|
-
onClick: function onClick() {}
|
|
10783
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
10784
|
-
className: "filter-caret right"
|
|
10785
|
-
}), filter.filterByCondition), /*#__PURE__*/React.createElement("div", {
|
|
10786
|
-
className: "luckysheet-\\${menuid}-bycondition",
|
|
10787
|
-
style: {
|
|
10788
|
-
display: "none"
|
|
10789
|
-
}
|
|
10790
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
10791
|
-
className: "luckysheet-flat-menu-button luckysheet-mousedown-cancel",
|
|
10792
|
-
id: "luckysheet-\\${menuid}-selected"
|
|
10793
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
10794
|
-
className: "luckysheet-mousedown-cancel",
|
|
10795
|
-
"data-value": "null",
|
|
10796
|
-
"data-type": "0"
|
|
10797
|
-
}, filter.filiterInputNone), /*#__PURE__*/React.createElement("div", {
|
|
10798
|
-
className: "luckysheet-mousedown-cancel"
|
|
10799
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
10800
|
-
className: "fa fa-sort",
|
|
10801
|
-
"aria-hidden": "true"
|
|
10802
|
-
})))));
|
|
10803
|
-
}
|
|
10804
10786
|
if (name === "filter-by-value") {
|
|
10805
10787
|
return /*#__PURE__*/React.createElement("div", {
|
|
10806
10788
|
key: name
|
|
10807
|
-
}, /*#__PURE__*/React.createElement(Menu, {
|
|
10808
|
-
onClick: function onClick() {}
|
|
10809
10789
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10810
|
-
className: "filter-
|
|
10811
|
-
}), filter.filterByValues), /*#__PURE__*/React.createElement("div", {
|
|
10812
|
-
className: "luckysheet-filter-byvalue"
|
|
10790
|
+
className: "luckysheet-filter-byvalue flex flex-col gap-2 mt-2"
|
|
10813
10791
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10814
|
-
className: "fortune-menuitem-row byvalue-btn-row"
|
|
10815
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
10816
|
-
className: "fortune-byvalue-btn",
|
|
10817
|
-
onClick: selectAll,
|
|
10818
|
-
tabIndex: 0
|
|
10819
|
-
}, filter.filterValueByAllBtn), " - ", /*#__PURE__*/React.createElement("span", {
|
|
10820
|
-
className: "fortune-byvalue-btn",
|
|
10821
|
-
onClick: clearAll,
|
|
10822
|
-
tabIndex: 0
|
|
10823
|
-
}, filter.filterValueByClearBtn), " - ", /*#__PURE__*/React.createElement("span", {
|
|
10824
|
-
className: "fortune-byvalue-btn",
|
|
10825
|
-
onClick: inverseSelect,
|
|
10826
|
-
tabIndex: 0
|
|
10827
|
-
}, filter.filterValueByInverseBtn)), /*#__PURE__*/React.createElement("div", {
|
|
10828
|
-
className: "byvalue-filter-icon"
|
|
10829
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
10830
|
-
name: "filter-fill",
|
|
10831
|
-
style: {
|
|
10832
|
-
width: 20,
|
|
10833
|
-
height: 20
|
|
10834
|
-
}
|
|
10835
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
10836
10792
|
className: "filtermenu-input-container"
|
|
10837
|
-
}, /*#__PURE__*/React.createElement(
|
|
10838
|
-
|
|
10793
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
10794
|
+
leftIcon: /*#__PURE__*/React.createElement(LucideIcon, {
|
|
10795
|
+
name: "Search",
|
|
10796
|
+
size: "sm"
|
|
10797
|
+
}),
|
|
10839
10798
|
onKeyDown: function onKeyDown(e) {
|
|
10840
10799
|
return e.stopPropagation();
|
|
10841
10800
|
},
|
|
10842
10801
|
placeholder: filter.filterValueByTip,
|
|
10843
|
-
className: "luckysheet-mousedown-cancel",
|
|
10844
10802
|
id: "luckysheet-\\${menuid}-byvalue-input",
|
|
10845
10803
|
value: searchText,
|
|
10846
10804
|
onChange: function onChange(e) {
|
|
@@ -10848,10 +10806,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10848
10806
|
searchValues(e.target.value);
|
|
10849
10807
|
}
|
|
10850
10808
|
})), /*#__PURE__*/React.createElement("div", {
|
|
10851
|
-
id: "luckysheet-filter-byvalue-select"
|
|
10852
|
-
style: {
|
|
10853
|
-
maxHeight: listBoxMaxHeight
|
|
10854
|
-
}
|
|
10809
|
+
id: "luckysheet-filter-byvalue-select"
|
|
10855
10810
|
}, /*#__PURE__*/React.createElement(DateSelectTree, {
|
|
10856
10811
|
dates: data.dates,
|
|
10857
10812
|
onExpand: onExpand,
|
|
@@ -10873,6 +10828,37 @@ var FilterMenu = function FilterMenu() {
|
|
|
10873
10828
|
return v.match(item.key) != null;
|
|
10874
10829
|
}) > -1;
|
|
10875
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
|
+
}
|
|
10876
10862
|
}), data.values.map(function (v) {
|
|
10877
10863
|
return /*#__PURE__*/React.createElement(SelectItem, {
|
|
10878
10864
|
key: v.key,
|
|
@@ -10882,14 +10868,17 @@ var FilterMenu = function FilterMenu() {
|
|
|
10882
10868
|
},
|
|
10883
10869
|
onChange: function onChange(item, checked) {
|
|
10884
10870
|
var rows = hiddenRows.current;
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10871
|
+
if (checked) {
|
|
10872
|
+
hiddenRows.current = _.without.apply(_, [rows].concat(_toConsumableArray(item.rows)));
|
|
10873
|
+
setValuesUncheck(produce(function (draft) {
|
|
10888
10874
|
_.pull(draft, item.key);
|
|
10889
|
-
}
|
|
10875
|
+
}));
|
|
10876
|
+
} else {
|
|
10877
|
+
hiddenRows.current = _.concat(rows, item.rows);
|
|
10878
|
+
setValuesUncheck(produce(function (draft) {
|
|
10890
10879
|
draft.push(item.key);
|
|
10891
|
-
}
|
|
10892
|
-
}
|
|
10880
|
+
}));
|
|
10881
|
+
}
|
|
10893
10882
|
},
|
|
10894
10883
|
isItemVisible: function isItemVisible(item) {
|
|
10895
10884
|
return showValues.length === data.flattenValues.length ? true : _.includes(showValues, item.text);
|
|
@@ -10898,40 +10887,49 @@ var FilterMenu = function FilterMenu() {
|
|
|
10898
10887
|
}))));
|
|
10899
10888
|
}
|
|
10900
10889
|
return null;
|
|
10901
|
-
}), /*#__PURE__*/React.createElement(
|
|
10902
|
-
className: "fortune-menuitem-row"
|
|
10903
|
-
}, /*#__PURE__*/React.createElement(
|
|
10904
|
-
|
|
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
|
+
},
|
|
10905
10897
|
onClick: function onClick() {
|
|
10906
|
-
if (col == null) return;
|
|
10907
10898
|
setContext(function (draftCtx) {
|
|
10908
|
-
|
|
10909
|
-
pre[curr] = 0;
|
|
10910
|
-
return pre;
|
|
10911
|
-
}, {});
|
|
10912
|
-
saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
|
|
10913
|
-
hiddenRows.current = [];
|
|
10914
|
-
draftCtx.filterContextMenu = undefined;
|
|
10899
|
+
clearFilter(draftCtx);
|
|
10915
10900
|
});
|
|
10916
10901
|
},
|
|
10917
10902
|
tabIndex: 0
|
|
10918
|
-
}, filter.
|
|
10919
|
-
|
|
10903
|
+
}, filter.clearFilter), /*#__PURE__*/React.createElement(Button$1, {
|
|
10904
|
+
variant: "secondary",
|
|
10905
|
+
style: {
|
|
10906
|
+
minWidth: "80px"
|
|
10907
|
+
},
|
|
10920
10908
|
onClick: function onClick() {
|
|
10921
10909
|
setContext(function (draftCtx) {
|
|
10922
10910
|
draftCtx.filterContextMenu = undefined;
|
|
10923
10911
|
});
|
|
10924
10912
|
},
|
|
10925
10913
|
tabIndex: 0
|
|
10926
|
-
}, filter.filterCancel), /*#__PURE__*/React.createElement(
|
|
10927
|
-
|
|
10914
|
+
}, filter.filterCancel), /*#__PURE__*/React.createElement(Button$1, {
|
|
10915
|
+
variant: "default",
|
|
10916
|
+
style: {
|
|
10917
|
+
minWidth: "80px"
|
|
10918
|
+
},
|
|
10928
10919
|
onClick: function onClick() {
|
|
10920
|
+
if (col == null) return;
|
|
10929
10921
|
setContext(function (draftCtx) {
|
|
10930
|
-
|
|
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;
|
|
10931
10929
|
});
|
|
10932
10930
|
},
|
|
10933
10931
|
tabIndex: 0
|
|
10934
|
-
}, filter.
|
|
10932
|
+
}, filter.filterConfirm))), showSubMenu && (/*#__PURE__*/React.createElement("div", {
|
|
10935
10933
|
ref: subMenuRef,
|
|
10936
10934
|
className: "luckysheet-filter-bycolor-submenu",
|
|
10937
10935
|
style: subMenuPos,
|
|
@@ -10971,7 +10969,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10971
10969
|
});
|
|
10972
10970
|
},
|
|
10973
10971
|
tabIndex: 0
|
|
10974
|
-
}, filter.
|
|
10972
|
+
}, filter.filterConfirm))))));
|
|
10975
10973
|
};
|
|
10976
10974
|
|
|
10977
10975
|
var SheetHiddenButton = function SheetHiddenButton(_ref) {
|