@fileverse-dev/fortune-react 1.2.4 → 1.2.6
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/index.css +0 -2
- package/es/components/ContextMenu/Menu.d.ts +0 -1
- package/es/components/ContextMenu/Menu.js +2 -5
- package/es/components/ContextMenu/index.css +1 -4
- package/es/components/ContextMenu/index.js +8 -35
- package/es/components/DataVerification/ColorPicker.js +2 -2
- package/es/components/DataVerification/DropdownList.js +13 -3
- package/es/components/DataVerification/DropdownOption.js +14 -1
- package/es/components/DataVerification/RangeDialog.js +2 -0
- package/es/components/DataVerification/index.css +18 -4
- package/es/components/DataVerification/index.js +29 -13
- package/es/components/SheetOverlay/ColumnHeader.js +34 -19
- package/es/components/SheetOverlay/FormulaHint/index.js +2 -2
- package/es/components/SheetOverlay/FormulaSearch/index.css +1 -0
- package/es/components/SheetOverlay/FormulaSearch/index.js +1 -1
- package/es/components/SheetOverlay/RowHeader.js +33 -6
- package/es/components/SheetOverlay/index.css +24 -7
- package/es/components/Toolbar/Combo.js +2 -5
- package/es/components/Toolbar/Select.js +1 -1
- package/es/components/Toolbar/index.css +1 -21
- package/es/components/Toolbar/index.js +1 -2
- package/lib/components/ConditionFormat/index.css +0 -2
- package/lib/components/ContextMenu/Menu.d.ts +0 -1
- package/lib/components/ContextMenu/Menu.js +2 -5
- package/lib/components/ContextMenu/index.css +1 -4
- package/lib/components/ContextMenu/index.js +7 -34
- package/lib/components/DataVerification/ColorPicker.js +2 -2
- package/lib/components/DataVerification/DropdownList.js +13 -3
- package/lib/components/DataVerification/DropdownOption.js +14 -1
- package/lib/components/DataVerification/RangeDialog.js +2 -0
- package/lib/components/DataVerification/index.css +18 -4
- package/lib/components/DataVerification/index.js +29 -13
- package/lib/components/SheetOverlay/ColumnHeader.js +33 -17
- package/lib/components/SheetOverlay/FormulaHint/index.js +2 -2
- package/lib/components/SheetOverlay/FormulaSearch/index.css +1 -0
- package/lib/components/SheetOverlay/FormulaSearch/index.js +1 -1
- package/lib/components/SheetOverlay/RowHeader.js +32 -4
- package/lib/components/SheetOverlay/index.css +24 -7
- package/lib/components/Toolbar/Combo.js +1 -4
- package/lib/components/Toolbar/Select.js +1 -1
- package/lib/components/Toolbar/index.css +1 -21
- package/package.json +2 -2
|
@@ -62,7 +62,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
62
62
|
});
|
|
63
63
|
if (_lodash.default.isEmpty(context.functionCandidates) && _lodash.default.isEmpty(context.defaultCandidates)) return null;
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className: "flex
|
|
65
|
+
className: "flex flex-col luckysheet-formula-search-c-p custom-scroll",
|
|
66
66
|
id: "luckysheet-formula-search-c-p",
|
|
67
67
|
style: {
|
|
68
68
|
top: top
|
|
@@ -184,12 +184,30 @@ var RowHeader = function RowHeader() {
|
|
|
184
184
|
}
|
|
185
185
|
}, [context.visibledatarow, sheetIndex]);
|
|
186
186
|
var showRow = function showRow(e, item) {
|
|
187
|
+
var _a, _b;
|
|
188
|
+
if (sheetIndex == null) return;
|
|
189
|
+
var startPoint = item.row;
|
|
190
|
+
var startRow = startPoint,
|
|
191
|
+
endRow = startPoint;
|
|
192
|
+
var rowhiddenData = (_b = (_a = context.luckysheetfile[sheetIndex]) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.rowhidden;
|
|
193
|
+
var findRowBoundary = function findRowBoundary(start, direction) {
|
|
194
|
+
var tempPoint = start;
|
|
195
|
+
while (true) {
|
|
196
|
+
var checkRowIndex = tempPoint + direction;
|
|
197
|
+
if (!(rowhiddenData === null || rowhiddenData === void 0 ? void 0 : rowhiddenData.hasOwnProperty(checkRowIndex))) break;
|
|
198
|
+
tempPoint = checkRowIndex;
|
|
199
|
+
}
|
|
200
|
+
return tempPoint;
|
|
201
|
+
};
|
|
202
|
+
startRow = findRowBoundary(startPoint, -1);
|
|
203
|
+
endRow = findRowBoundary(startPoint, 1);
|
|
204
|
+
console.log(startRow, endRow);
|
|
187
205
|
if (context.isFlvReadOnly) return;
|
|
188
206
|
e.stopPropagation();
|
|
189
207
|
setContext(function (ctx) {
|
|
190
208
|
var _a;
|
|
191
209
|
_fortuneCore.api.setSelection(ctx, [{
|
|
192
|
-
row: [Number(
|
|
210
|
+
row: [Number(startRow) - 1, Number(endRow) + 1],
|
|
193
211
|
column: [0, (_a = context.visibledatacolumn) === null || _a === void 0 ? void 0 : _a.length]
|
|
194
212
|
}], {
|
|
195
213
|
id: context.currentSheetId
|
|
@@ -198,6 +216,15 @@ var RowHeader = function RowHeader() {
|
|
|
198
216
|
setContext(function (ctx) {
|
|
199
217
|
(0, _fortuneCore.showSelected)(ctx, "row");
|
|
200
218
|
});
|
|
219
|
+
setContext(function (ctx) {
|
|
220
|
+
var _a;
|
|
221
|
+
_fortuneCore.api.setSelection(ctx, [{
|
|
222
|
+
row: [Number(startRow), Number(endRow)],
|
|
223
|
+
column: [0, (_a = context.visibledatacolumn) === null || _a === void 0 ? void 0 : _a.length]
|
|
224
|
+
}], {
|
|
225
|
+
id: context.currentSheetId
|
|
226
|
+
});
|
|
227
|
+
});
|
|
201
228
|
};
|
|
202
229
|
(0, _react.useEffect)(function () {
|
|
203
230
|
containerRef.current.scrollTop = context.scrollTop;
|
|
@@ -215,9 +242,9 @@ var RowHeader = function RowHeader() {
|
|
|
215
242
|
onContextMenu: onContextMenu
|
|
216
243
|
}, hiddenPointers.map(function (item) {
|
|
217
244
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
218
|
-
className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row
|
|
245
|
+
className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row",
|
|
219
246
|
style: {
|
|
220
|
-
top: "".concat(item.top -
|
|
247
|
+
top: "".concat(item.top - 15, "px"),
|
|
221
248
|
zIndex: 100
|
|
222
249
|
},
|
|
223
250
|
onClick: function onClick(e) {
|
|
@@ -274,12 +301,13 @@ var RowHeader = function RowHeader() {
|
|
|
274
301
|
r1 = _a.r1,
|
|
275
302
|
r2 = _a.r2;
|
|
276
303
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
277
|
-
className: "fortune-row-header-selected
|
|
304
|
+
className: "fortune-row-header-selected",
|
|
278
305
|
key: i,
|
|
279
306
|
style: _lodash.default.assign({
|
|
280
307
|
top: row_pre,
|
|
281
308
|
height: row - row_pre - 1,
|
|
282
309
|
display: "block",
|
|
310
|
+
backgroundColor: "#EFC703",
|
|
283
311
|
mixBlendMode: "multiply"
|
|
284
312
|
}, (0, _fortuneCore.fixRowStyleOverflowInFreeze)(context, r1, r2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
|
|
285
313
|
});
|
|
@@ -45,10 +45,12 @@
|
|
|
45
45
|
.fortune-row-header-selected {
|
|
46
46
|
position: absolute;
|
|
47
47
|
z-index: 10;
|
|
48
|
+
border-right: 1px solid #0188fb;
|
|
48
49
|
right: 0;
|
|
49
50
|
width: 100%;
|
|
50
51
|
margin-top: 2px;
|
|
51
52
|
display: none;
|
|
53
|
+
background-color: rgba(76, 76, 76, 0.1);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
.fortune-col-header-wrap {
|
|
@@ -92,10 +94,12 @@
|
|
|
92
94
|
cursor: default;
|
|
93
95
|
position: absolute;
|
|
94
96
|
z-index: 10;
|
|
97
|
+
border-bottom: 1px solid #0188fb;
|
|
95
98
|
bottom: 0;
|
|
96
99
|
height: 100%;
|
|
97
100
|
margin-left: 0px;
|
|
98
101
|
display: none;
|
|
102
|
+
background-color: rgba(76, 76, 76, 0.1);
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
.fortune-left-top {
|
|
@@ -133,7 +137,7 @@
|
|
|
133
137
|
z-index: 14;
|
|
134
138
|
/*border:1px solid #fff;*/
|
|
135
139
|
margin: 0px 0 0 0px;
|
|
136
|
-
|
|
140
|
+
background: rgba(0, 80, 208, 0.15);
|
|
137
141
|
display: none;
|
|
138
142
|
}
|
|
139
143
|
|
|
@@ -195,9 +199,9 @@
|
|
|
195
199
|
z-index: 15;
|
|
196
200
|
border: 2.5px solid #efc703;
|
|
197
201
|
margin: -1px 0 0 -1px;
|
|
202
|
+
background: rgba(1, 136, 251, 0.15);
|
|
198
203
|
display: none;
|
|
199
204
|
box-sizing: content-box;
|
|
200
|
-
background: rgba(239, 199, 5, 0.02);
|
|
201
205
|
}
|
|
202
206
|
|
|
203
207
|
.luckysheet-cs-inner-border {
|
|
@@ -1009,16 +1013,22 @@
|
|
|
1009
1013
|
}
|
|
1010
1014
|
|
|
1011
1015
|
.hide-btn {
|
|
1012
|
-
padding-
|
|
1016
|
+
padding-left: 3px;
|
|
1017
|
+
padding-right: 3px;
|
|
1018
|
+
padding-top: 2px;
|
|
1013
1019
|
position: absolute;
|
|
1014
|
-
|
|
1020
|
+
width: 32px;
|
|
1015
1021
|
top: 5px;
|
|
1016
1022
|
z-index: 200;
|
|
1017
|
-
width: 9px;
|
|
1018
1023
|
}
|
|
1019
1024
|
|
|
1020
1025
|
.hide-btn:hover {
|
|
1021
|
-
|
|
1026
|
+
padding-left: 2px;
|
|
1027
|
+
padding-right: 2px;
|
|
1028
|
+
padding-top: 1px;
|
|
1029
|
+
background-color: rgba(255, 255, 255, 1);
|
|
1030
|
+
border-radius: var(--border-radius-sm, 4px);
|
|
1031
|
+
border: 1px solid #BDC4C8;
|
|
1022
1032
|
}
|
|
1023
1033
|
|
|
1024
1034
|
.rotate-row-icon {
|
|
@@ -1027,6 +1037,13 @@
|
|
|
1027
1037
|
|
|
1028
1038
|
.hide-btn-row {
|
|
1029
1039
|
position: absolute;
|
|
1030
|
-
|
|
1040
|
+
left: 4px;
|
|
1031
1041
|
z-index: 200;
|
|
1042
|
+
width: 12px;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.hide-btn-row:hover {
|
|
1046
|
+
background-color: white;
|
|
1047
|
+
border: 1px solid #BDC4C8;
|
|
1048
|
+
border-radius: 4px;
|
|
1032
1049
|
}
|
|
@@ -58,10 +58,7 @@ var Combo = function Combo(_a) {
|
|
|
58
58
|
height: 16
|
|
59
59
|
})) : (/*#__PURE__*/_react.default.createElement("span", {
|
|
60
60
|
className: "fortune-toolbar-combo-text"
|
|
61
|
-
}, text !== undefined ? text : "")), /*#__PURE__*/_react.default.createElement(_ui.
|
|
62
|
-
className: "w-[16px] h-[16px]",
|
|
63
|
-
name: "ChevronDown"
|
|
64
|
-
})))) : (/*#__PURE__*/_react.default.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
61
|
+
}, text !== undefined ? text : ""))))) : (/*#__PURE__*/_react.default.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
65
62
|
text: tooltip,
|
|
66
63
|
placement: "bottom"
|
|
67
64
|
}, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
@@ -34,7 +34,7 @@ var Option = exports.Option = function Option(_a) {
|
|
|
34
34
|
}, iconId && /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
35
35
|
name: iconId
|
|
36
36
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className: "fortuen-toolbar-text color-text-default text-body-sm
|
|
37
|
+
className: "fortuen-toolbar-text color-text-default text-body-sm"
|
|
38
38
|
}, children));
|
|
39
39
|
};
|
|
40
40
|
var _default = exports.default = Select;
|
|
@@ -141,30 +141,14 @@
|
|
|
141
141
|
|
|
142
142
|
.fortune-toolbar-combo-button {
|
|
143
143
|
font-size: 12px;
|
|
144
|
-
padding-top: 4px;
|
|
145
|
-
padding-bottom: 4px;
|
|
146
|
-
padding-left: 8px;
|
|
147
|
-
padding-right: 8px;
|
|
148
|
-
border-radius: 4px;
|
|
149
|
-
gap: 8px;
|
|
150
|
-
}
|
|
151
|
-
.fortune-toolbar-combo-button:hover {
|
|
152
|
-
background: hsl(var(--color-bg-default-hover));
|
|
153
144
|
}
|
|
154
145
|
|
|
155
146
|
.fortune-toolbar-select-option {
|
|
156
147
|
font-size: 12px;
|
|
157
148
|
min-width: 60px;
|
|
158
|
-
padding
|
|
159
|
-
padding-right: 8px;
|
|
160
|
-
padding-top: 6px;
|
|
161
|
-
padding-bottom: 6px;
|
|
149
|
+
padding: 8px;
|
|
162
150
|
cursor: pointer;
|
|
163
151
|
user-select: none;
|
|
164
|
-
height: 32px;
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
|
|
168
152
|
}
|
|
169
153
|
|
|
170
154
|
.fortune-toolbar-select-option:hover {
|
|
@@ -187,10 +171,6 @@
|
|
|
187
171
|
font-weight: 500;
|
|
188
172
|
font-size: 14px;
|
|
189
173
|
line-height: 20px;
|
|
190
|
-
max-width: 56px;
|
|
191
|
-
overflow: hidden;
|
|
192
|
-
text-overflow: ellipsis;
|
|
193
|
-
white-space: nowrap;
|
|
194
174
|
}
|
|
195
175
|
|
|
196
176
|
.fortune-toolbar-color-picker-item {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
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.2.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.2.6",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|