@fileverse-dev/fortune-react 1.1.45 → 1.1.47
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.
|
@@ -585,7 +585,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
585
585
|
}
|
|
586
586
|
}, [itemLocations, setMoreItems, settings.toolbarItems.length, sheetWidth, isDesktop]);
|
|
587
587
|
var getToolbarItem = useCallback(function (name, i) {
|
|
588
|
-
var _a, _b, _c, _d, _e, _f;
|
|
588
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
589
589
|
var tooltip = toolbar[name];
|
|
590
590
|
if (name === "|") {
|
|
591
591
|
return /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -647,7 +647,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
647
647
|
if ((curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) != null) {
|
|
648
648
|
if (format != null) {
|
|
649
649
|
currentFmt = format.text;
|
|
650
|
-
} else if (curr_2
|
|
650
|
+
} else if (((_a = curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === null || _a === void 0 ? void 0 : _a.includes('#,##0')) || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0" || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0.00") {
|
|
651
651
|
currentFmt = "Number";
|
|
652
652
|
} else {
|
|
653
653
|
currentFmt = defaultFormat[defaultFormat.length - 1].text;
|
|
@@ -785,9 +785,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
785
785
|
value: 2
|
|
786
786
|
}];
|
|
787
787
|
return /*#__PURE__*/React.createElement(Combo, {
|
|
788
|
-
iconId: ((
|
|
788
|
+
iconId: ((_b = _.find(items_1, function (item) {
|
|
789
789
|
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.ht);
|
|
790
|
-
})) === null ||
|
|
790
|
+
})) === null || _b === void 0 ? void 0 : _b.title) || "align-left",
|
|
791
791
|
key: name,
|
|
792
792
|
tooltip: toolbar.horizontalAlign,
|
|
793
793
|
showArrow: false
|
|
@@ -837,9 +837,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
837
837
|
value: 2
|
|
838
838
|
}];
|
|
839
839
|
return /*#__PURE__*/React.createElement(Combo, {
|
|
840
|
-
iconId: ((
|
|
840
|
+
iconId: ((_c = _.find(items_2, function (item) {
|
|
841
841
|
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
|
|
842
|
-
})) === null ||
|
|
842
|
+
})) === null || _c === void 0 ? void 0 : _c.title) || "align-top",
|
|
843
843
|
key: name,
|
|
844
844
|
tooltip: toolbar.verticalAlign,
|
|
845
845
|
showArrow: false
|
|
@@ -1110,7 +1110,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1110
1110
|
}));
|
|
1111
1111
|
}
|
|
1112
1112
|
if (name === "comment") {
|
|
1113
|
-
var last = (
|
|
1113
|
+
var last = (_d = context.luckysheet_select_save) === null || _d === void 0 ? void 0 : _d[context.luckysheet_select_save.length - 1];
|
|
1114
1114
|
var row_index_1 = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
1115
1115
|
var col_index_1 = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
1116
1116
|
if (!last) {
|
|
@@ -1125,7 +1125,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
1127
|
var itemData_1;
|
|
1128
|
-
if (((
|
|
1128
|
+
if (((_f = (_e = flowdata === null || flowdata === void 0 ? void 0 : flowdata[row_index_1]) === null || _e === void 0 ? void 0 : _e[col_index_1]) === null || _f === void 0 ? void 0 : _f.ps) != null) {
|
|
1129
1129
|
itemData_1 = [{
|
|
1130
1130
|
key: "edit",
|
|
1131
1131
|
text: comment.edit,
|
|
@@ -1614,7 +1614,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1614
1614
|
iconId: name,
|
|
1615
1615
|
tooltip: tooltip,
|
|
1616
1616
|
key: name,
|
|
1617
|
-
selected: (
|
|
1617
|
+
selected: (_g = toolbarItemSelectedFunc(name)) === null || _g === void 0 ? void 0 : _g(cell),
|
|
1618
1618
|
onClick: function onClick() {
|
|
1619
1619
|
return setContext(function (draftCtx) {
|
|
1620
1620
|
var _a;
|
|
@@ -594,7 +594,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
594
594
|
}
|
|
595
595
|
}, [itemLocations, setMoreItems, settings.toolbarItems.length, sheetWidth, isDesktop]);
|
|
596
596
|
var getToolbarItem = (0, _react.useCallback)(function (name, i) {
|
|
597
|
-
var _a, _b, _c, _d, _e, _f;
|
|
597
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
598
598
|
var tooltip = toolbar[name];
|
|
599
599
|
if (name === "|") {
|
|
600
600
|
return /*#__PURE__*/_react.default.createElement(_Divider.default, {
|
|
@@ -656,7 +656,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
656
656
|
if ((curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) != null) {
|
|
657
657
|
if (format != null) {
|
|
658
658
|
currentFmt = format.text;
|
|
659
|
-
} else if (curr_2
|
|
659
|
+
} else if (((_a = curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === null || _a === void 0 ? void 0 : _a.includes('#,##0')) || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0" || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0.00") {
|
|
660
660
|
currentFmt = "Number";
|
|
661
661
|
} else {
|
|
662
662
|
currentFmt = defaultFormat[defaultFormat.length - 1].text;
|
|
@@ -794,9 +794,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
794
794
|
value: 2
|
|
795
795
|
}];
|
|
796
796
|
return /*#__PURE__*/_react.default.createElement(_Combo.default, {
|
|
797
|
-
iconId: ((
|
|
797
|
+
iconId: ((_b = _lodash.default.find(items_1, function (item) {
|
|
798
798
|
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.ht);
|
|
799
|
-
})) === null ||
|
|
799
|
+
})) === null || _b === void 0 ? void 0 : _b.title) || "align-left",
|
|
800
800
|
key: name,
|
|
801
801
|
tooltip: toolbar.horizontalAlign,
|
|
802
802
|
showArrow: false
|
|
@@ -846,9 +846,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
846
846
|
value: 2
|
|
847
847
|
}];
|
|
848
848
|
return /*#__PURE__*/_react.default.createElement(_Combo.default, {
|
|
849
|
-
iconId: ((
|
|
849
|
+
iconId: ((_c = _lodash.default.find(items_2, function (item) {
|
|
850
850
|
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
|
|
851
|
-
})) === null ||
|
|
851
|
+
})) === null || _c === void 0 ? void 0 : _c.title) || "align-top",
|
|
852
852
|
key: name,
|
|
853
853
|
tooltip: toolbar.verticalAlign,
|
|
854
854
|
showArrow: false
|
|
@@ -1119,7 +1119,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1119
1119
|
}));
|
|
1120
1120
|
}
|
|
1121
1121
|
if (name === "comment") {
|
|
1122
|
-
var last = (
|
|
1122
|
+
var last = (_d = context.luckysheet_select_save) === null || _d === void 0 ? void 0 : _d[context.luckysheet_select_save.length - 1];
|
|
1123
1123
|
var row_index_1 = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
1124
1124
|
var col_index_1 = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
1125
1125
|
if (!last) {
|
|
@@ -1134,7 +1134,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
1136
|
var itemData_1;
|
|
1137
|
-
if (((
|
|
1137
|
+
if (((_f = (_e = flowdata === null || flowdata === void 0 ? void 0 : flowdata[row_index_1]) === null || _e === void 0 ? void 0 : _e[col_index_1]) === null || _f === void 0 ? void 0 : _f.ps) != null) {
|
|
1138
1138
|
itemData_1 = [{
|
|
1139
1139
|
key: "edit",
|
|
1140
1140
|
text: comment.edit,
|
|
@@ -1623,7 +1623,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1623
1623
|
iconId: name,
|
|
1624
1624
|
tooltip: tooltip,
|
|
1625
1625
|
key: name,
|
|
1626
|
-
selected: (
|
|
1626
|
+
selected: (_g = (0, _fortuneCore.toolbarItemSelectedFunc)(name)) === null || _g === void 0 ? void 0 : _g(cell),
|
|
1627
1627
|
onClick: function onClick() {
|
|
1628
1628
|
return setContext(function (draftCtx) {
|
|
1629
1629
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.47",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.1.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.1.47",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|