@fileverse-dev/fortune-react 1.1.2 → 1.1.4
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/es/components/ConditionFormat/ConditionRules.js +1 -1
- package/es/components/ConditionFormat/index.js +6 -0
- package/es/components/Workbook/index.js +8 -1
- package/lib/components/ConditionFormat/ConditionRules.js +1 -1
- package/lib/components/ConditionFormat/index.js +6 -0
- package/lib/components/Workbook/index.js +7 -0
- package/package.json +2 -2
|
@@ -111,7 +111,7 @@ var ConditionRules = function ConditionRules(_a) {
|
|
|
111
111
|
className: "flex flex-col"
|
|
112
112
|
}, /*#__PURE__*/React.createElement("div", {
|
|
113
113
|
className: "condition-rules-value text-heading-xsm"
|
|
114
|
-
}, conditionformat["conditionformat_".concat(titleType, "_title")]), (type === "greaterThan" || type === "lessThan" || type === "equal" || type === "textContains") && (/*#__PURE__*/React.createElement("div", {
|
|
114
|
+
}, conditionformat["conditionformat_".concat(titleType, "_title")]), (type === "greaterThan" || type === "greaterThanOrEqual" || type === "lessThan" || type === "lessThanOrEqual" || type === "equal" || type === "textContains") && (/*#__PURE__*/React.createElement("div", {
|
|
115
115
|
className: "w-full"
|
|
116
116
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
117
117
|
value: context.conditionRules.rulesValue,
|
|
@@ -89,9 +89,15 @@ var ConditionalFormat = function ConditionalFormat(_a) {
|
|
|
89
89
|
}, [{
|
|
90
90
|
text: "greaterThan",
|
|
91
91
|
value: ">"
|
|
92
|
+
}, {
|
|
93
|
+
text: "greaterThanOrEqual",
|
|
94
|
+
value: ">="
|
|
92
95
|
}, {
|
|
93
96
|
text: "lessThan",
|
|
94
97
|
value: "<"
|
|
98
|
+
}, {
|
|
99
|
+
text: "lessThanOrEqual",
|
|
100
|
+
value: "<="
|
|
95
101
|
}, {
|
|
96
102
|
text: "between",
|
|
97
103
|
value: "[]"
|
|
@@ -15,7 +15,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
15
15
|
}
|
|
16
16
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17
17
|
};
|
|
18
|
-
import { defaultContext, defaultSettings, initSheetIndex, handleGlobalKeyDown, getSheetIndex, handlePaste, filterPatch, patchToOp, inverseRowColOptions, ensureSheetIndex, insertRowCol, deleteRowCol, locale, calcSelectionInfo, groupValuesRefresh, insertDuneChart, getFlowdata, api } from "@fileverse-dev/fortune-core";
|
|
18
|
+
import { defaultContext, defaultSettings, initSheetIndex, handleGlobalKeyDown, getSheetIndex, handlePaste, filterPatch, patchToOp, inverseRowColOptions, ensureSheetIndex, insertRowCol, deleteRowCol, locale, calcSelectionInfo, groupValuesRefresh, insertDuneChart, getFlowdata, api, handlePasteByClick } from "@fileverse-dev/fortune-core";
|
|
19
19
|
import React, { useMemo, useState, useCallback, useEffect, useRef, useImperativeHandle } from "react";
|
|
20
20
|
import "./index.css";
|
|
21
21
|
import produce, { applyPatches, enablePatches, produceWithPatches } from "immer";
|
|
@@ -602,6 +602,13 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
602
602
|
column: [0, totalCol - 1]
|
|
603
603
|
}]);
|
|
604
604
|
}
|
|
605
|
+
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === "KeyV") {
|
|
606
|
+
navigator.clipboard.readText().then(function (clipboardText) {
|
|
607
|
+
setContextWithProduce(function (safeCtx) {
|
|
608
|
+
handlePasteByClick(safeCtx, clipboardText);
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
}
|
|
605
612
|
var nativeEvent = e.nativeEvent;
|
|
606
613
|
if ((e.ctrlKey || e.metaKey) && e.code === "KeyZ") {
|
|
607
614
|
if (e.shiftKey) {
|
|
@@ -120,7 +120,7 @@ var ConditionRules = function ConditionRules(_a) {
|
|
|
120
120
|
className: "flex flex-col"
|
|
121
121
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
122
122
|
className: "condition-rules-value text-heading-xsm"
|
|
123
|
-
}, conditionformat["conditionformat_".concat(titleType, "_title")]), (type === "greaterThan" || type === "lessThan" || type === "equal" || type === "textContains") && (/*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
}, conditionformat["conditionformat_".concat(titleType, "_title")]), (type === "greaterThan" || type === "greaterThanOrEqual" || type === "lessThan" || type === "lessThanOrEqual" || type === "equal" || type === "textContains") && (/*#__PURE__*/_react.default.createElement("div", {
|
|
124
124
|
className: "w-full"
|
|
125
125
|
}, /*#__PURE__*/_react.default.createElement(_ui.TextField, {
|
|
126
126
|
value: context.conditionRules.rulesValue,
|
|
@@ -98,9 +98,15 @@ var ConditionalFormat = function ConditionalFormat(_a) {
|
|
|
98
98
|
}, [{
|
|
99
99
|
text: "greaterThan",
|
|
100
100
|
value: ">"
|
|
101
|
+
}, {
|
|
102
|
+
text: "greaterThanOrEqual",
|
|
103
|
+
value: ">="
|
|
101
104
|
}, {
|
|
102
105
|
text: "lessThan",
|
|
103
106
|
value: "<"
|
|
107
|
+
}, {
|
|
108
|
+
text: "lessThanOrEqual",
|
|
109
|
+
value: "<="
|
|
104
110
|
}, {
|
|
105
111
|
text: "between",
|
|
106
112
|
value: "[]"
|
|
@@ -611,6 +611,13 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
611
611
|
column: [0, totalCol - 1]
|
|
612
612
|
}]);
|
|
613
613
|
}
|
|
614
|
+
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === "KeyV") {
|
|
615
|
+
navigator.clipboard.readText().then(function (clipboardText) {
|
|
616
|
+
setContextWithProduce(function (safeCtx) {
|
|
617
|
+
(0, _fortuneCore.handlePasteByClick)(safeCtx, clipboardText);
|
|
618
|
+
});
|
|
619
|
+
});
|
|
620
|
+
}
|
|
614
621
|
var nativeEvent = e.nativeEvent;
|
|
615
622
|
if ((e.ctrlKey || e.metaKey) && e.code === "KeyZ") {
|
|
616
623
|
if (e.shiftKey) {
|
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.4",
|
|
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.4",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|