@leankylin-sheet/react 2.0.13 → 2.0.15
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/CellOptions/index.d.ts +4 -0
- package/dist/components/Workbook/api.d.ts +1 -0
- package/dist/components/Workbook/index.d.ts +1 -0
- package/dist/index.css +6 -0
- package/dist/index.esm.css +6 -0
- package/dist/index.esm.js +258 -179
- package/dist/index.js +257 -178
- package/dist/index.umd.css +6 -0
- package/dist/index.umd.js +433 -395
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +2 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,40 +1,9 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, onCommentBoxResizeStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, setCaretPosition, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getDataBySelectionNoCopy, getInlineStringNoStyle, rangeHightlightselected, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
1
|
+
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, functionHTMLGenerate, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, onCommentBoxResizeStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, setCaretPosition, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getDataBySelectionNoCopy, getInlineStringNoStyle, rangeHightlightselected, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
2
2
|
import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
3
|
import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
|
|
7
|
-
function _arrayLikeToArray(r, a) {
|
|
8
|
-
(null == a || a > r.length) && (a = r.length);
|
|
9
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
function _arrayWithHoles(r) {
|
|
13
|
-
if (Array.isArray(r)) return r;
|
|
14
|
-
}
|
|
15
|
-
function _arrayWithoutHoles(r) {
|
|
16
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
17
|
-
}
|
|
18
|
-
function _defineProperty(e, r, t) {
|
|
19
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
20
|
-
value: t,
|
|
21
|
-
enumerable: !0,
|
|
22
|
-
configurable: !0,
|
|
23
|
-
writable: !0
|
|
24
|
-
}) : e[r] = t, e;
|
|
25
|
-
}
|
|
26
|
-
function _extends() {
|
|
27
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
28
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
29
|
-
var t = arguments[e];
|
|
30
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
31
|
-
}
|
|
32
|
-
return n;
|
|
33
|
-
}, _extends.apply(null, arguments);
|
|
34
|
-
}
|
|
35
|
-
function _iterableToArray(r) {
|
|
36
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
37
|
-
}
|
|
38
7
|
function _iterableToArrayLimit(r, l) {
|
|
39
8
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
40
9
|
if (null != t) {
|
|
@@ -62,15 +31,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
62
31
|
return a;
|
|
63
32
|
}
|
|
64
33
|
}
|
|
65
|
-
function _nonIterableRest() {
|
|
66
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
67
|
-
}
|
|
68
|
-
function _nonIterableSpread() {
|
|
69
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
-
}
|
|
71
|
-
function _objectDestructuringEmpty(t) {
|
|
72
|
-
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
73
|
-
}
|
|
74
34
|
function ownKeys(e, r) {
|
|
75
35
|
var t = Object.keys(e);
|
|
76
36
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -92,32 +52,6 @@ function _objectSpread2(e) {
|
|
|
92
52
|
}
|
|
93
53
|
return e;
|
|
94
54
|
}
|
|
95
|
-
function _objectWithoutProperties(e, t) {
|
|
96
|
-
if (null == e) return {};
|
|
97
|
-
var o,
|
|
98
|
-
r,
|
|
99
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
100
|
-
if (Object.getOwnPropertySymbols) {
|
|
101
|
-
var s = Object.getOwnPropertySymbols(e);
|
|
102
|
-
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
103
|
-
}
|
|
104
|
-
return i;
|
|
105
|
-
}
|
|
106
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
107
|
-
if (null == r) return {};
|
|
108
|
-
var t = {};
|
|
109
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
110
|
-
if (e.includes(n)) continue;
|
|
111
|
-
t[n] = r[n];
|
|
112
|
-
}
|
|
113
|
-
return t;
|
|
114
|
-
}
|
|
115
|
-
function _slicedToArray(r, e) {
|
|
116
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
117
|
-
}
|
|
118
|
-
function _toConsumableArray(r) {
|
|
119
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
120
|
-
}
|
|
121
55
|
function _toPrimitive(t, r) {
|
|
122
56
|
if ("object" != typeof t || !t) return t;
|
|
123
57
|
var e = t[Symbol.toPrimitive];
|
|
@@ -132,12 +66,97 @@ function _toPropertyKey(t) {
|
|
|
132
66
|
var i = _toPrimitive(t, "string");
|
|
133
67
|
return "symbol" == typeof i ? i : i + "";
|
|
134
68
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
69
|
+
function _defineProperty(obj, key, value) {
|
|
70
|
+
key = _toPropertyKey(key);
|
|
71
|
+
if (key in obj) {
|
|
72
|
+
Object.defineProperty(obj, key, {
|
|
73
|
+
value: value,
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
obj[key] = value;
|
|
140
80
|
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
function _extends() {
|
|
84
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
85
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
86
|
+
var source = arguments[i];
|
|
87
|
+
for (var key in source) {
|
|
88
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
89
|
+
target[key] = source[key];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return target;
|
|
94
|
+
};
|
|
95
|
+
return _extends.apply(this, arguments);
|
|
96
|
+
}
|
|
97
|
+
function _objectDestructuringEmpty(obj) {
|
|
98
|
+
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
99
|
+
}
|
|
100
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
101
|
+
if (source == null) return {};
|
|
102
|
+
var target = {};
|
|
103
|
+
var sourceKeys = Object.keys(source);
|
|
104
|
+
var key, i;
|
|
105
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
106
|
+
key = sourceKeys[i];
|
|
107
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
108
|
+
target[key] = source[key];
|
|
109
|
+
}
|
|
110
|
+
return target;
|
|
111
|
+
}
|
|
112
|
+
function _objectWithoutProperties(source, excluded) {
|
|
113
|
+
if (source == null) return {};
|
|
114
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
115
|
+
var key, i;
|
|
116
|
+
if (Object.getOwnPropertySymbols) {
|
|
117
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
118
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
119
|
+
key = sourceSymbolKeys[i];
|
|
120
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
121
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
122
|
+
target[key] = source[key];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return target;
|
|
126
|
+
}
|
|
127
|
+
function _slicedToArray(arr, i) {
|
|
128
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
129
|
+
}
|
|
130
|
+
function _toConsumableArray(arr) {
|
|
131
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
132
|
+
}
|
|
133
|
+
function _arrayWithoutHoles(arr) {
|
|
134
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
135
|
+
}
|
|
136
|
+
function _arrayWithHoles(arr) {
|
|
137
|
+
if (Array.isArray(arr)) return arr;
|
|
138
|
+
}
|
|
139
|
+
function _iterableToArray(iter) {
|
|
140
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
141
|
+
}
|
|
142
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
143
|
+
if (!o) return;
|
|
144
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
145
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
146
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
147
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
148
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
149
|
+
}
|
|
150
|
+
function _arrayLikeToArray(arr, len) {
|
|
151
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
152
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
153
|
+
return arr2;
|
|
154
|
+
}
|
|
155
|
+
function _nonIterableSpread() {
|
|
156
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
157
|
+
}
|
|
158
|
+
function _nonIterableRest() {
|
|
159
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
141
160
|
}
|
|
142
161
|
|
|
143
162
|
var defaultRefs = {
|
|
@@ -345,14 +364,14 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
345
364
|
left: hoverLocation.col - 5 + (hoverInFreeze ? context.scrollLeft : 0),
|
|
346
365
|
opacity: context.luckysheet_cols_change_size ? 1 : 0
|
|
347
366
|
}
|
|
348
|
-
}), !context.luckysheet_cols_change_size && hoverLocation.col_index >= 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
367
|
+
}), !context.luckysheet_cols_change_size && hoverLocation.col_index >= 0 ? ( /*#__PURE__*/React.createElement("div", {
|
|
349
368
|
className: "leankylin-col-header-hover",
|
|
350
369
|
style: _.assign({
|
|
351
370
|
left: hoverLocation.col_pre,
|
|
352
371
|
width: hoverLocation.col - hoverLocation.col_pre - 1,
|
|
353
372
|
display: "block"
|
|
354
373
|
}, fixColumnStyleOverflowInFreeze(context, hoverLocation.col_index, hoverLocation.col_index, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
|
|
355
|
-
}, allowEditRef.current && (/*#__PURE__*/React.createElement("span", {
|
|
374
|
+
}, allowEditRef.current && ( /*#__PURE__*/React.createElement("span", {
|
|
356
375
|
className: "header-arrow",
|
|
357
376
|
onClick: function onClick(e) {
|
|
358
377
|
setContext(function (ctx) {
|
|
@@ -560,7 +579,7 @@ var RowHeader = function RowHeader() {
|
|
|
560
579
|
top: hoverLocation.row - 3 + (hoverInFreeze ? context.scrollTop : 0),
|
|
561
580
|
opacity: context.luckysheet_rows_change_size ? 1 : 0
|
|
562
581
|
}
|
|
563
|
-
}), !context.luckysheet_rows_change_size && hoverLocation.row_index >= 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
582
|
+
}), !context.luckysheet_rows_change_size && hoverLocation.row_index >= 0 ? ( /*#__PURE__*/React.createElement("div", {
|
|
564
583
|
className: "leankylin-row-header-hover",
|
|
565
584
|
style: _.assign({
|
|
566
585
|
top: hoverLocation.row_pre,
|
|
@@ -663,13 +682,34 @@ var ContentEditable = function ContentEditable(_ref) {
|
|
|
663
682
|
|
|
664
683
|
var FormulaSearch = function FormulaSearch(props) {
|
|
665
684
|
var _useContext = useContext(WorkbookContext),
|
|
666
|
-
context = _useContext.context
|
|
685
|
+
context = _useContext.context,
|
|
686
|
+
refs = _useContext.refs,
|
|
687
|
+
settings = _useContext.settings;
|
|
667
688
|
if (_.isEmpty(context.functionCandidates)) return null;
|
|
689
|
+
function moveCursorToEnd(editor) {
|
|
690
|
+
var leftParen = editor.querySelector(".luckysheet-formula-text-lpar");
|
|
691
|
+
var rightParen = editor.querySelector(".luckysheet-formula-text-rpar");
|
|
692
|
+
var range = document.createRange();
|
|
693
|
+
var selection = window.getSelection();
|
|
694
|
+
range.setStartAfter(leftParen);
|
|
695
|
+
range.setEndBefore(rightParen);
|
|
696
|
+
selection.removeAllRanges();
|
|
697
|
+
selection.addRange(range);
|
|
698
|
+
}
|
|
699
|
+
if (settings.renderFormulaSearch) {
|
|
700
|
+
return settings.renderFormulaSearch(context.functionCandidates, functionHTMLGenerate, refs.cellInput.current);
|
|
701
|
+
}
|
|
668
702
|
return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
669
703
|
id: "luckysheet-formula-search-c",
|
|
670
704
|
className: "luckysheet-formula-search-c"
|
|
671
705
|
}), context.functionCandidates.map(function (v) {
|
|
672
706
|
return /*#__PURE__*/React.createElement("div", {
|
|
707
|
+
onClick: function onClick() {
|
|
708
|
+
var _refs$cellInput$curre;
|
|
709
|
+
refs.cellInput.current.innerHTML = functionHTMLGenerate("=".concat(v.n, "()"));
|
|
710
|
+
(_refs$cellInput$curre = refs.cellInput.current) === null || _refs$cellInput$curre === void 0 ? void 0 : _refs$cellInput$curre.focus();
|
|
711
|
+
moveCursorToEnd(refs.cellInput.current);
|
|
712
|
+
},
|
|
673
713
|
key: v.n,
|
|
674
714
|
"data-func": v.n,
|
|
675
715
|
className: "luckysheet-formula-search-item"
|
|
@@ -683,12 +723,16 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
683
723
|
|
|
684
724
|
var FormulaHint = function FormulaHint(props) {
|
|
685
725
|
var _useContext = useContext(WorkbookContext),
|
|
686
|
-
context = _useContext.context
|
|
726
|
+
context = _useContext.context,
|
|
727
|
+
settings = _useContext.settings;
|
|
687
728
|
var _locale = locale(context),
|
|
688
729
|
formulaMore = _locale.formulaMore;
|
|
689
730
|
if (!context.functionHint) return null;
|
|
690
731
|
var fn = context.formulaCache.functionlistMap[context.functionHint];
|
|
691
732
|
if (!fn) return null;
|
|
733
|
+
if (settings.renderFormulaHint) {
|
|
734
|
+
settings.renderFormulaHint(fn);
|
|
735
|
+
}
|
|
692
736
|
return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
693
737
|
id: "luckysheet-formula-help-c",
|
|
694
738
|
className: "luckysheet-formula-help-c"
|
|
@@ -767,9 +811,9 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
767
811
|
key: param.name
|
|
768
812
|
}, /*#__PURE__*/React.createElement("div", {
|
|
769
813
|
className: "luckysheet-arguments-help-section-title"
|
|
770
|
-
}, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
|
|
814
|
+
}, param.name, param.repeat === "y" && ( /*#__PURE__*/React.createElement("span", {
|
|
771
815
|
className: "luckysheet-arguments-help-argument-info"
|
|
772
|
-
}, "...-", formulaMore.allowRepeatText)), param.require === "o" && (/*#__PURE__*/React.createElement("span", {
|
|
816
|
+
}, "...-", formulaMore.allowRepeatText)), param.require === "o" && ( /*#__PURE__*/React.createElement("span", {
|
|
773
817
|
className: "luckysheet-arguments-help-argument-info"
|
|
774
818
|
}, "-[", formulaMore.allowOptionText, "]"))), /*#__PURE__*/React.createElement("span", {
|
|
775
819
|
className: "luckysheet-arguments-help-parameter-content"
|
|
@@ -905,9 +949,7 @@ var InputBox = function InputBox() {
|
|
|
905
949
|
if (!(kcode >= 112 && kcode <= 123 || kcode <= 46 || kcode === 144 || kcode === 108 || e.ctrlKey || e.altKey || e.shiftKey && (kcode === 37 || kcode === 38 || kcode === 39 || kcode === 40)) || kcode === 8 || kcode === 32 || kcode === 46 || e.ctrlKey && kcode === 86) {
|
|
906
950
|
setContext(function (draftCtx) {
|
|
907
951
|
if ((draftCtx.formulaCache.rangestart || draftCtx.formulaCache.rangedrag_column_start || draftCtx.formulaCache.rangedrag_row_start || israngeseleciton(draftCtx)) && isBlur) return;
|
|
908
|
-
if (!isAllowEdit(draftCtx, draftCtx.luckysheet_select_save))
|
|
909
|
-
return;
|
|
910
|
-
}
|
|
952
|
+
if (!isAllowEdit(draftCtx, draftCtx.luckysheet_select_save)) ;
|
|
911
953
|
handleFormulaInput(draftCtx, refs.fxInput.current, refs.cellInput.current, kcode, preText.current);
|
|
912
954
|
});
|
|
913
955
|
}
|
|
@@ -963,7 +1005,7 @@ var InputBox = function InputBox() {
|
|
|
963
1005
|
onKeyDown: onKeyDown,
|
|
964
1006
|
onPaste: onPaste,
|
|
965
1007
|
allowEdit: edit ? !isHidenRC : edit
|
|
966
|
-
})), document.activeElement === inputRef.current && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
|
|
1008
|
+
})), document.activeElement === inputRef.current && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
|
|
967
1009
|
style: {
|
|
968
1010
|
top: ((firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.height_move) || 0) + 4
|
|
969
1011
|
}
|
|
@@ -1056,12 +1098,12 @@ var Dialog = function Dialog(_ref) {
|
|
|
1056
1098
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1057
1099
|
className: "leankylin-dialog-box-content",
|
|
1058
1100
|
style: contentStyle
|
|
1059
|
-
}, children), type != null && (/*#__PURE__*/React.createElement("div", {
|
|
1101
|
+
}, children), type != null && ( /*#__PURE__*/React.createElement("div", {
|
|
1060
1102
|
className: "leankylin-dialog-box-button-container"
|
|
1061
|
-
}, type === "ok" ? (/*#__PURE__*/React.createElement("div", {
|
|
1103
|
+
}, type === "ok" ? ( /*#__PURE__*/React.createElement("div", {
|
|
1062
1104
|
className: "leankylin-message-box-button button-default",
|
|
1063
1105
|
onClick: onOk
|
|
1064
|
-
}, button.confirm)) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1106
|
+
}, button.confirm)) : ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1065
1107
|
className: "leankylin-message-box-button button-primary",
|
|
1066
1108
|
onClick: onOk
|
|
1067
1109
|
}, button.confirm), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1117,7 +1159,7 @@ var ModalProvider = function ModalProvider(_ref) {
|
|
|
1117
1159
|
}, [hideModal, showModal]);
|
|
1118
1160
|
return /*#__PURE__*/React.createElement(ModalContext.Provider, {
|
|
1119
1161
|
value: providerValue
|
|
1120
|
-
}, children, component && (/*#__PURE__*/React.createElement("div", {
|
|
1162
|
+
}, children, component && ( /*#__PURE__*/React.createElement("div", {
|
|
1121
1163
|
onMouseDown: function onMouseDown(e) {
|
|
1122
1164
|
return e.stopPropagation();
|
|
1123
1165
|
},
|
|
@@ -1142,7 +1184,7 @@ function useAlert() {
|
|
|
1142
1184
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "ok";
|
|
1143
1185
|
var onOk = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : hideModal;
|
|
1144
1186
|
var onCancel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : hideModal;
|
|
1145
|
-
showModal(/*#__PURE__*/React.createElement(MessageBox, {
|
|
1187
|
+
showModal( /*#__PURE__*/React.createElement(MessageBox, {
|
|
1146
1188
|
type: type,
|
|
1147
1189
|
onOk: onOk,
|
|
1148
1190
|
onCancel: onCancel
|
|
@@ -1212,7 +1254,7 @@ var SearchReplace = function SearchReplace() {
|
|
|
1212
1254
|
};
|
|
1213
1255
|
}, []);
|
|
1214
1256
|
var body = document.body;
|
|
1215
|
-
return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", {
|
|
1257
|
+
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
|
|
1216
1258
|
id: "leankylin-search-replace",
|
|
1217
1259
|
className: "leankylin-search-replace leankylin-dialog",
|
|
1218
1260
|
style: getInitialPosition(body),
|
|
@@ -1275,7 +1317,7 @@ var SearchReplace = function SearchReplace() {
|
|
|
1275
1317
|
onChange: function onChange(e) {
|
|
1276
1318
|
return setSearchText(e.target.value);
|
|
1277
1319
|
}
|
|
1278
|
-
})), showReplace && (/*#__PURE__*/React.createElement("div", {
|
|
1320
|
+
})), showReplace && ( /*#__PURE__*/React.createElement("div", {
|
|
1279
1321
|
className: "textboxs",
|
|
1280
1322
|
id: "replaceInput"
|
|
1281
1323
|
}, findAndReplace.replaceTextbox, "\uFF1A", /*#__PURE__*/React.createElement("input", {
|
|
@@ -1313,7 +1355,7 @@ var SearchReplace = function SearchReplace() {
|
|
|
1313
1355
|
}
|
|
1314
1356
|
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.distinguishTextbox)))), /*#__PURE__*/React.createElement("div", {
|
|
1315
1357
|
className: "btnBox"
|
|
1316
|
-
}, showReplace && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1358
|
+
}, showReplace && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1317
1359
|
id: "replaceAllBtn",
|
|
1318
1360
|
className: "leankylin-message-box-button button-default",
|
|
1319
1361
|
onClick: function onClick() {
|
|
@@ -1360,7 +1402,7 @@ var SearchReplace = function SearchReplace() {
|
|
|
1360
1402
|
}, findAndReplace.findBtn))), /*#__PURE__*/React.createElement("div", {
|
|
1361
1403
|
className: "close-button leankylin-message-box-button button-default",
|
|
1362
1404
|
onClick: closeDialog
|
|
1363
|
-
}, button.close), searchResult.length > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
1405
|
+
}, button.close), searchResult.length > 0 && ( /*#__PURE__*/React.createElement("div", {
|
|
1364
1406
|
id: "searchAllbox",
|
|
1365
1407
|
onScroll: function onScroll(e) {
|
|
1366
1408
|
return e.stopPropagation();
|
|
@@ -1553,7 +1595,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1553
1595
|
});
|
|
1554
1596
|
}));
|
|
1555
1597
|
}
|
|
1556
|
-
return selectingCellRange ? (/*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({
|
|
1598
|
+
return selectingCellRange ? ( /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({
|
|
1557
1599
|
className: "leankylin-link-modify-modal range-selection-modal",
|
|
1558
1600
|
style: {
|
|
1559
1601
|
left: position.cellLeft,
|
|
@@ -1588,7 +1630,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1588
1630
|
}, function () {
|
|
1589
1631
|
setLinkAddress(originAddress);
|
|
1590
1632
|
setRangeModalVisible(false);
|
|
1591
|
-
})))) : (/*#__PURE__*/React.createElement("div", _objectSpread2({
|
|
1633
|
+
})))) : ( /*#__PURE__*/React.createElement("div", _objectSpread2({
|
|
1592
1634
|
className: "leankylin-link-modify-modal",
|
|
1593
1635
|
style: {
|
|
1594
1636
|
left: position.cellLeft + 20,
|
|
@@ -1632,7 +1674,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1632
1674
|
}, type.text);
|
|
1633
1675
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1634
1676
|
className: "leankylin-link-modify-line"
|
|
1635
|
-
}, linkType === "webpage" && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1677
|
+
}, linkType === "webpage" && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1636
1678
|
className: "leankylin-link-modify-title"
|
|
1637
1679
|
}, insertLink.linkAddress), /*#__PURE__*/React.createElement("input", {
|
|
1638
1680
|
className: "leankylin-link-modify-input ".concat(!linkAddress || isLinkAddressValid.isValid ? "" : "error-input"),
|
|
@@ -1641,7 +1683,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1641
1683
|
onChange: function onChange(e) {
|
|
1642
1684
|
return setLinkAddress(e.target.value);
|
|
1643
1685
|
}
|
|
1644
|
-
}), tooltip)), linkType === "cellrange" && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1686
|
+
}), tooltip)), linkType === "cellrange" && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1645
1687
|
className: "leankylin-link-modify-title"
|
|
1646
1688
|
}, insertLink.linkCell), /*#__PURE__*/React.createElement("input", {
|
|
1647
1689
|
className: "leankylin-link-modify-input ".concat(!linkAddress || isLinkAddressValid.isValid ? "" : "error-input"),
|
|
@@ -1657,7 +1699,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1657
1699
|
}
|
|
1658
1700
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1659
1701
|
name: "border-all"
|
|
1660
|
-
})), tooltip)), linkType === "sheet" && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1702
|
+
})), tooltip)), linkType === "sheet" && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1661
1703
|
className: "leankylin-link-modify-title"
|
|
1662
1704
|
}, insertLink.linkSheet), /*#__PURE__*/React.createElement("select", {
|
|
1663
1705
|
className: "leankylin-link-modify-select",
|
|
@@ -1738,7 +1780,7 @@ var FilterOptions = function FilterOptions(_ref) {
|
|
|
1738
1780
|
frozenColumns = (frozen === null || frozen === void 0 ? void 0 : (_frozen$range = frozen.range) === null || _frozen$range === void 0 ? void 0 : _frozen$range.column_focus) || -1;
|
|
1739
1781
|
frozenRows = (frozen === null || frozen === void 0 ? void 0 : (_frozen$range2 = frozen.range) === null || _frozen$range2 === void 0 ? void 0 : _frozen$range2.row_focus) || -1;
|
|
1740
1782
|
}
|
|
1741
|
-
return filterOptions == null ? (/*#__PURE__*/React.createElement("div", null)) : (/*#__PURE__*/React.createElement(React.Fragment, null, filterOptions.items.map(function (v, i) {
|
|
1783
|
+
return filterOptions == null ? ( /*#__PURE__*/React.createElement("div", null)) : ( /*#__PURE__*/React.createElement(React.Fragment, null, filterOptions.items.map(function (v, i) {
|
|
1742
1784
|
var _refs$globalCache$fre, _refs$globalCache$fre2;
|
|
1743
1785
|
var filterParam = filter[i];
|
|
1744
1786
|
var columnOverflowFreezeStyle = fixColumnStyleOverflowInFreeze(context, i + filterOptions.startCol, i + filterOptions.startCol, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]);
|
|
@@ -1786,9 +1828,9 @@ var FilterOptions = function FilterOptions(_ref) {
|
|
|
1786
1828
|
width: undefined
|
|
1787
1829
|
}),
|
|
1788
1830
|
className: "luckysheet-filter-options ".concat(filterParam == null ? "" : "luckysheet-filter-options-active")
|
|
1789
|
-
}, filterParam == null ? (/*#__PURE__*/React.createElement("div", {
|
|
1831
|
+
}, filterParam == null ? ( /*#__PURE__*/React.createElement("div", {
|
|
1790
1832
|
className: "caret down"
|
|
1791
|
-
})) : (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
1833
|
+
})) : ( /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1792
1834
|
name: "filter-fill-white",
|
|
1793
1835
|
style: {
|
|
1794
1836
|
width: 15,
|
|
@@ -1811,7 +1853,7 @@ var ImgBoxs = function ImgBoxs() {
|
|
|
1811
1853
|
}, [context.activeImg, context.insertedImgs]);
|
|
1812
1854
|
return /*#__PURE__*/React.createElement("div", {
|
|
1813
1855
|
id: "luckysheet-image-showBoxs"
|
|
1814
|
-
}, activeImg && (/*#__PURE__*/React.createElement("div", {
|
|
1856
|
+
}, activeImg && ( /*#__PURE__*/React.createElement("div", {
|
|
1815
1857
|
id: "luckysheet-modal-dialog-activeImage",
|
|
1816
1858
|
className: "luckysheet-modal-dialog",
|
|
1817
1859
|
style: {
|
|
@@ -2112,7 +2154,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
2112
2154
|
className: "luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-".concat(v),
|
|
2113
2155
|
"data-type": v
|
|
2114
2156
|
});
|
|
2115
|
-
})), isEditing && (/*#__PURE__*/React.createElement("div", {
|
|
2157
|
+
})), isEditing && ( /*#__PURE__*/React.createElement("div", {
|
|
2116
2158
|
className: "luckysheet-postil-dialog-resize"
|
|
2117
2159
|
}, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (v) {
|
|
2118
2160
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2181,7 +2223,7 @@ function useDialog() {
|
|
|
2181
2223
|
var showDialog = useCallback(function (content, type) {
|
|
2182
2224
|
var onOk = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : hideModal;
|
|
2183
2225
|
var onCancel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : hideModal;
|
|
2184
|
-
showModal(/*#__PURE__*/React.createElement(Dialog, {
|
|
2226
|
+
showModal( /*#__PURE__*/React.createElement(Dialog, {
|
|
2185
2227
|
type: type,
|
|
2186
2228
|
onOk: onOk,
|
|
2187
2229
|
onCancel: onCancel
|
|
@@ -2407,7 +2449,7 @@ var DataVerification = function DataVerification() {
|
|
|
2407
2449
|
value: v,
|
|
2408
2450
|
key: v
|
|
2409
2451
|
}, dataVerification[v]);
|
|
2410
|
-
})), ((_context$dataVerifica2 = context.dataVerification) === null || _context$dataVerifica2 === void 0 ? void 0 : (_context$dataVerifica3 = _context$dataVerifica2.dataRegulation) === null || _context$dataVerifica3 === void 0 ? void 0 : _context$dataVerifica3.type) === "dropdown" && (/*#__PURE__*/React.createElement("div", {
|
|
2452
|
+
})), ((_context$dataVerifica2 = context.dataVerification) === null || _context$dataVerifica2 === void 0 ? void 0 : (_context$dataVerifica3 = _context$dataVerifica2.dataRegulation) === null || _context$dataVerifica3 === void 0 ? void 0 : _context$dataVerifica3.type) === "dropdown" && ( /*#__PURE__*/React.createElement("div", {
|
|
2411
2453
|
className: "show-box-item"
|
|
2412
2454
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2413
2455
|
className: "data-verification-range"
|
|
@@ -2445,7 +2487,7 @@ var DataVerification = function DataVerification() {
|
|
|
2445
2487
|
}
|
|
2446
2488
|
}), /*#__PURE__*/React.createElement("label", {
|
|
2447
2489
|
htmlFor: "mul"
|
|
2448
|
-
}, dataVerification.allowMultiSelect)))), ((_context$dataVerifica4 = context.dataVerification) === null || _context$dataVerifica4 === void 0 ? void 0 : (_context$dataVerifica5 = _context$dataVerifica4.dataRegulation) === null || _context$dataVerifica5 === void 0 ? void 0 : _context$dataVerifica5.type) === "checkbox" && (/*#__PURE__*/React.createElement("div", {
|
|
2490
|
+
}, dataVerification.allowMultiSelect)))), ((_context$dataVerifica4 = context.dataVerification) === null || _context$dataVerifica4 === void 0 ? void 0 : (_context$dataVerifica5 = _context$dataVerifica4.dataRegulation) === null || _context$dataVerifica5 === void 0 ? void 0 : _context$dataVerifica5.type) === "checkbox" && ( /*#__PURE__*/React.createElement("div", {
|
|
2449
2491
|
className: "show-box-item"
|
|
2450
2492
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2451
2493
|
className: "check-box"
|
|
@@ -2473,7 +2515,7 @@ var DataVerification = function DataVerification() {
|
|
|
2473
2515
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2474
2516
|
});
|
|
2475
2517
|
}
|
|
2476
|
-
})))), (((_context$dataVerifica10 = context.dataVerification) === null || _context$dataVerifica10 === void 0 ? void 0 : (_context$dataVerifica11 = _context$dataVerifica10.dataRegulation) === null || _context$dataVerifica11 === void 0 ? void 0 : _context$dataVerifica11.type) === "number" || ((_context$dataVerifica12 = context.dataVerification) === null || _context$dataVerifica12 === void 0 ? void 0 : (_context$dataVerifica13 = _context$dataVerifica12.dataRegulation) === null || _context$dataVerifica13 === void 0 ? void 0 : _context$dataVerifica13.type) === "number_integer" || ((_context$dataVerifica14 = context.dataVerification) === null || _context$dataVerifica14 === void 0 ? void 0 : (_context$dataVerifica15 = _context$dataVerifica14.dataRegulation) === null || _context$dataVerifica15 === void 0 ? void 0 : _context$dataVerifica15.type) === "number_decimal" || ((_context$dataVerifica16 = context.dataVerification) === null || _context$dataVerifica16 === void 0 ? void 0 : (_context$dataVerifica17 = _context$dataVerifica16.dataRegulation) === null || _context$dataVerifica17 === void 0 ? void 0 : _context$dataVerifica17.type) === "text_length") && (/*#__PURE__*/React.createElement("div", {
|
|
2518
|
+
})))), (((_context$dataVerifica10 = context.dataVerification) === null || _context$dataVerifica10 === void 0 ? void 0 : (_context$dataVerifica11 = _context$dataVerifica10.dataRegulation) === null || _context$dataVerifica11 === void 0 ? void 0 : _context$dataVerifica11.type) === "number" || ((_context$dataVerifica12 = context.dataVerification) === null || _context$dataVerifica12 === void 0 ? void 0 : (_context$dataVerifica13 = _context$dataVerifica12.dataRegulation) === null || _context$dataVerifica13 === void 0 ? void 0 : _context$dataVerifica13.type) === "number_integer" || ((_context$dataVerifica14 = context.dataVerification) === null || _context$dataVerifica14 === void 0 ? void 0 : (_context$dataVerifica15 = _context$dataVerifica14.dataRegulation) === null || _context$dataVerifica15 === void 0 ? void 0 : _context$dataVerifica15.type) === "number_decimal" || ((_context$dataVerifica16 = context.dataVerification) === null || _context$dataVerifica16 === void 0 ? void 0 : (_context$dataVerifica17 = _context$dataVerifica16.dataRegulation) === null || _context$dataVerifica17 === void 0 ? void 0 : _context$dataVerifica17.type) === "text_length") && ( /*#__PURE__*/React.createElement("div", {
|
|
2477
2519
|
className: "show-box-item"
|
|
2478
2520
|
}, /*#__PURE__*/React.createElement("select", {
|
|
2479
2521
|
className: "data-verification-type-select",
|
|
@@ -2491,7 +2533,7 @@ var DataVerification = function DataVerification() {
|
|
|
2491
2533
|
value: v,
|
|
2492
2534
|
key: v
|
|
2493
2535
|
}, dataVerification[v]);
|
|
2494
|
-
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
|
|
2536
|
+
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? ( /*#__PURE__*/React.createElement("div", {
|
|
2495
2537
|
className: "input-box"
|
|
2496
2538
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2497
2539
|
type: "number",
|
|
@@ -2513,7 +2555,7 @@ var DataVerification = function DataVerification() {
|
|
|
2513
2555
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2514
2556
|
});
|
|
2515
2557
|
}
|
|
2516
|
-
}))) : (/*#__PURE__*/React.createElement("div", {
|
|
2558
|
+
}))) : ( /*#__PURE__*/React.createElement("div", {
|
|
2517
2559
|
className: "input-box"
|
|
2518
2560
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2519
2561
|
type: "number",
|
|
@@ -2528,7 +2570,7 @@ var DataVerification = function DataVerification() {
|
|
|
2528
2570
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2529
2571
|
});
|
|
2530
2572
|
}
|
|
2531
|
-
}))))), ((_context$dataVerifica18 = context.dataVerification) === null || _context$dataVerifica18 === void 0 ? void 0 : (_context$dataVerifica19 = _context$dataVerifica18.dataRegulation) === null || _context$dataVerifica19 === void 0 ? void 0 : _context$dataVerifica19.type) === "text_content" && (/*#__PURE__*/React.createElement("div", {
|
|
2573
|
+
}))))), ((_context$dataVerifica18 = context.dataVerification) === null || _context$dataVerifica18 === void 0 ? void 0 : (_context$dataVerifica19 = _context$dataVerifica18.dataRegulation) === null || _context$dataVerifica19 === void 0 ? void 0 : _context$dataVerifica19.type) === "text_content" && ( /*#__PURE__*/React.createElement("div", {
|
|
2532
2574
|
className: "show-box-item"
|
|
2533
2575
|
}, /*#__PURE__*/React.createElement("select", {
|
|
2534
2576
|
className: "data-verification-type-select",
|
|
@@ -2561,7 +2603,7 @@ var DataVerification = function DataVerification() {
|
|
|
2561
2603
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2562
2604
|
});
|
|
2563
2605
|
}
|
|
2564
|
-
})))), ((_context$dataVerifica20 = context.dataVerification) === null || _context$dataVerifica20 === void 0 ? void 0 : (_context$dataVerifica21 = _context$dataVerifica20.dataRegulation) === null || _context$dataVerifica21 === void 0 ? void 0 : _context$dataVerifica21.type) === "date" && (/*#__PURE__*/React.createElement("div", {
|
|
2606
|
+
})))), ((_context$dataVerifica20 = context.dataVerification) === null || _context$dataVerifica20 === void 0 ? void 0 : (_context$dataVerifica21 = _context$dataVerifica20.dataRegulation) === null || _context$dataVerifica21 === void 0 ? void 0 : _context$dataVerifica21.type) === "date" && ( /*#__PURE__*/React.createElement("div", {
|
|
2565
2607
|
className: "show-box-item"
|
|
2566
2608
|
}, /*#__PURE__*/React.createElement("select", {
|
|
2567
2609
|
className: "data-verification-type-select",
|
|
@@ -2579,7 +2621,7 @@ var DataVerification = function DataVerification() {
|
|
|
2579
2621
|
value: v,
|
|
2580
2622
|
key: v
|
|
2581
2623
|
}, dataVerification[v]);
|
|
2582
|
-
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
|
|
2624
|
+
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? ( /*#__PURE__*/React.createElement("div", {
|
|
2583
2625
|
className: "input-box"
|
|
2584
2626
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2585
2627
|
type: "date",
|
|
@@ -2601,7 +2643,7 @@ var DataVerification = function DataVerification() {
|
|
|
2601
2643
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2602
2644
|
});
|
|
2603
2645
|
}
|
|
2604
|
-
}))) : (/*#__PURE__*/React.createElement("div", {
|
|
2646
|
+
}))) : ( /*#__PURE__*/React.createElement("div", {
|
|
2605
2647
|
className: "input-box"
|
|
2606
2648
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2607
2649
|
type: "date",
|
|
@@ -2616,7 +2658,7 @@ var DataVerification = function DataVerification() {
|
|
|
2616
2658
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2617
2659
|
});
|
|
2618
2660
|
}
|
|
2619
|
-
}))))), ((_context$dataVerifica22 = context.dataVerification) === null || _context$dataVerifica22 === void 0 ? void 0 : (_context$dataVerifica23 = _context$dataVerifica22.dataRegulation) === null || _context$dataVerifica23 === void 0 ? void 0 : _context$dataVerifica23.type) === "validity" && (/*#__PURE__*/React.createElement("div", {
|
|
2661
|
+
}))))), ((_context$dataVerifica22 = context.dataVerification) === null || _context$dataVerifica22 === void 0 ? void 0 : (_context$dataVerifica23 = _context$dataVerifica22.dataRegulation) === null || _context$dataVerifica23 === void 0 ? void 0 : _context$dataVerifica23.type) === "validity" && ( /*#__PURE__*/React.createElement("div", {
|
|
2620
2662
|
className: "show-box-item"
|
|
2621
2663
|
}, /*#__PURE__*/React.createElement("select", {
|
|
2622
2664
|
className: "data-verification-type-select",
|
|
@@ -2660,7 +2702,7 @@ var DataVerification = function DataVerification() {
|
|
|
2660
2702
|
htmlFor: v,
|
|
2661
2703
|
key: "label".concat(v)
|
|
2662
2704
|
}, dataVerification[v]));
|
|
2663
|
-
}), ((_context$dataVerifica24 = context.dataVerification) === null || _context$dataVerifica24 === void 0 ? void 0 : (_context$dataVerifica25 = _context$dataVerifica24.dataRegulation) === null || _context$dataVerifica25 === void 0 ? void 0 : _context$dataVerifica25.hintShow) && (/*#__PURE__*/React.createElement("div", {
|
|
2705
|
+
}), ((_context$dataVerifica24 = context.dataVerification) === null || _context$dataVerifica24 === void 0 ? void 0 : (_context$dataVerifica25 = _context$dataVerifica24.dataRegulation) === null || _context$dataVerifica25 === void 0 ? void 0 : _context$dataVerifica25.hintShow) && ( /*#__PURE__*/React.createElement("div", {
|
|
2664
2706
|
className: "input-box"
|
|
2665
2707
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2666
2708
|
type: "text",
|
|
@@ -2786,7 +2828,7 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
2786
2828
|
className: "condition-rules-title"
|
|
2787
2829
|
}, conditionformat["conditionformat_".concat(type)]), /*#__PURE__*/React.createElement("div", {
|
|
2788
2830
|
className: "conditin-rules-value"
|
|
2789
|
-
}, conditionformat["conditionformat_".concat(type, "_title")]), (type === "greaterThan" || type === "lessThan" || type === "equal" || type === "textContains") && (/*#__PURE__*/React.createElement("div", {
|
|
2831
|
+
}, conditionformat["conditionformat_".concat(type, "_title")]), (type === "greaterThan" || type === "lessThan" || type === "equal" || type === "textContains") && ( /*#__PURE__*/React.createElement("div", {
|
|
2790
2832
|
className: "condition-rules-inpbox"
|
|
2791
2833
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2792
2834
|
className: "condition-rules-input",
|
|
@@ -2798,7 +2840,7 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
2798
2840
|
ctx.conditionRules.rulesValue = value;
|
|
2799
2841
|
});
|
|
2800
2842
|
}
|
|
2801
|
-
}))), type === "between" && (/*#__PURE__*/React.createElement("div", {
|
|
2843
|
+
}))), type === "between" && ( /*#__PURE__*/React.createElement("div", {
|
|
2802
2844
|
className: "condition-rules-between-box"
|
|
2803
2845
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2804
2846
|
className: "condition-rules-between-inpbox"
|
|
@@ -2828,7 +2870,7 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
2828
2870
|
ctx.conditionRules.betweenValue.value2 = value;
|
|
2829
2871
|
});
|
|
2830
2872
|
}
|
|
2831
|
-
})))), type === "occurrenceDate" && (/*#__PURE__*/React.createElement("div", {
|
|
2873
|
+
})))), type === "occurrenceDate" && ( /*#__PURE__*/React.createElement("div", {
|
|
2832
2874
|
className: "condition-rules-inpbox"
|
|
2833
2875
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2834
2876
|
type: "date",
|
|
@@ -2840,7 +2882,7 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
2840
2882
|
ctx.conditionRules.dateValue = value;
|
|
2841
2883
|
});
|
|
2842
2884
|
}
|
|
2843
|
-
}))), type === "duplicateValue" && (/*#__PURE__*/React.createElement("select", {
|
|
2885
|
+
}))), type === "duplicateValue" && ( /*#__PURE__*/React.createElement("select", {
|
|
2844
2886
|
className: "condition-rules-select",
|
|
2845
2887
|
onChange: function onChange(e) {
|
|
2846
2888
|
var value = e.target.value;
|
|
@@ -2852,7 +2894,7 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
2852
2894
|
value: "0"
|
|
2853
2895
|
}, conditionformat.duplicateValue), /*#__PURE__*/React.createElement("option", {
|
|
2854
2896
|
value: "1"
|
|
2855
|
-
}, conditionformat.uniqueValue))), (type === "top10" || type === "top10_percent" || type === "last10" || type === "last10_percent") && (/*#__PURE__*/React.createElement("div", {
|
|
2897
|
+
}, conditionformat.uniqueValue))), (type === "top10" || type === "top10_percent" || type === "last10" || type === "last10_percent") && ( /*#__PURE__*/React.createElement("div", {
|
|
2856
2898
|
className: "condition-rules-project-box"
|
|
2857
2899
|
}, type === "top10" || type === "top10_percent" ? conditionformat.top : conditionformat.last, /*#__PURE__*/React.createElement("input", {
|
|
2858
2900
|
className: "condition-rules-project-input",
|
|
@@ -2959,19 +3001,19 @@ var RangeDialog = function RangeDialog() {
|
|
|
2959
3001
|
if (!context.rangeDialog) return;
|
|
2960
3002
|
var rangeDialogType = context.rangeDialog.type;
|
|
2961
3003
|
if (rangeDialogType.indexOf("between") >= 0) {
|
|
2962
|
-
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
3004
|
+
showDialog( /*#__PURE__*/React.createElement(ConditionRules, {
|
|
2963
3005
|
type: "between"
|
|
2964
3006
|
}));
|
|
2965
3007
|
return;
|
|
2966
3008
|
}
|
|
2967
3009
|
if (rangeDialogType.indexOf("conditionRules") >= 0) {
|
|
2968
3010
|
var rulesType = rangeDialogType.substring("conditionRules".length, rangeDialogType.length);
|
|
2969
|
-
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
3011
|
+
showDialog( /*#__PURE__*/React.createElement(ConditionRules, {
|
|
2970
3012
|
type: rulesType
|
|
2971
3013
|
}));
|
|
2972
3014
|
return;
|
|
2973
3015
|
}
|
|
2974
|
-
showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
|
|
3016
|
+
showDialog( /*#__PURE__*/React.createElement(DataVerification, null));
|
|
2975
3017
|
}, [context.rangeDialog, setContext, showDialog]);
|
|
2976
3018
|
useEffect(function () {
|
|
2977
3019
|
setRangeTxt2(function (r) {
|
|
@@ -3162,6 +3204,38 @@ var DropDownList = function DropDownList() {
|
|
|
3162
3204
|
}));
|
|
3163
3205
|
};
|
|
3164
3206
|
|
|
3207
|
+
var CellOptions = function CellOptions() {
|
|
3208
|
+
var _context$cellOptions;
|
|
3209
|
+
var _useContext = useContext(WorkbookContext),
|
|
3210
|
+
context = _useContext.context,
|
|
3211
|
+
refs = _useContext.refs;
|
|
3212
|
+
var cellOptions = (_context$cellOptions = context.cellOptions) !== null && _context$cellOptions !== void 0 ? _context$cellOptions : [];
|
|
3213
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3214
|
+
className: "leankylin-cell-option"
|
|
3215
|
+
}, cellOptions === null || cellOptions === void 0 ? void 0 : cellOptions.map(function (item) {
|
|
3216
|
+
var _refs$globalCache$fre, _refs$globalCache$fre2, _item$render;
|
|
3217
|
+
var _colLocationByIndex = colLocationByIndex(item.c, context.visibledatacolumn),
|
|
3218
|
+
_colLocationByIndex2 = _slicedToArray(_colLocationByIndex, 2),
|
|
3219
|
+
left = _colLocationByIndex2[0],
|
|
3220
|
+
right = _colLocationByIndex2[1];
|
|
3221
|
+
var _rowLocationByIndex = rowLocationByIndex(item.r, context.visibledatarow),
|
|
3222
|
+
_rowLocationByIndex2 = _slicedToArray(_rowLocationByIndex, 2),
|
|
3223
|
+
top = _rowLocationByIndex2[0],
|
|
3224
|
+
bottom = _rowLocationByIndex2[1];
|
|
3225
|
+
var columnOverflowFreezeStyle = fixColumnStyleOverflowInFreeze(context, item.c, item.c, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]);
|
|
3226
|
+
var rowOverflowFreezeStyle = fixRowStyleOverflowInFreeze(context, item.r, item.r, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]);
|
|
3227
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3228
|
+
style: _objectSpread2(_objectSpread2(_objectSpread2({}, columnOverflowFreezeStyle), rowOverflowFreezeStyle), {}, {
|
|
3229
|
+
position: "absolute",
|
|
3230
|
+
left: left,
|
|
3231
|
+
top: top,
|
|
3232
|
+
width: right - left,
|
|
3233
|
+
height: bottom - top
|
|
3234
|
+
})
|
|
3235
|
+
}, item === null || item === void 0 ? void 0 : (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item));
|
|
3236
|
+
}));
|
|
3237
|
+
};
|
|
3238
|
+
|
|
3165
3239
|
var SheetOverlay = function SheetOverlay() {
|
|
3166
3240
|
var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
|
|
3167
3241
|
var _useContext = useContext(WorkbookContext),
|
|
@@ -3349,7 +3423,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3349
3423
|
}
|
|
3350
3424
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3351
3425
|
id: "leankylin-formula-functionrange"
|
|
3352
|
-
}), context.formulaRangeSelect && (/*#__PURE__*/React.createElement("div", {
|
|
3426
|
+
}), context.formulaRangeSelect && ( /*#__PURE__*/React.createElement("div", {
|
|
3353
3427
|
className: "leankylin-selection-copy leankylin-formula-functionrange-select",
|
|
3354
3428
|
style: context.formulaRangeSelect
|
|
3355
3429
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -3421,7 +3495,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3421
3495
|
onMouseDown: function onMouseDown(e) {
|
|
3422
3496
|
return e.preventDefault();
|
|
3423
3497
|
}
|
|
3424
|
-
}), ((_context$luckysheet_s3 = (_context$luckysheet_s4 = context.luckysheet_selection_range) === null || _context$luckysheet_s4 === void 0 ? void 0 : _context$luckysheet_s4.length) !== null && _context$luckysheet_s3 !== void 0 ? _context$luckysheet_s3 : 0) > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
3498
|
+
}), ((_context$luckysheet_s3 = (_context$luckysheet_s4 = context.luckysheet_selection_range) === null || _context$luckysheet_s4 === void 0 ? void 0 : _context$luckysheet_s4.length) !== null && _context$luckysheet_s3 !== void 0 ? _context$luckysheet_s3 : 0) > 0 && ( /*#__PURE__*/React.createElement("div", {
|
|
3425
3499
|
id: "leankylin-selection-copy"
|
|
3426
3500
|
}, context.luckysheet_selection_range.map(function (range) {
|
|
3427
3501
|
var r1 = range.row[0];
|
|
@@ -3462,7 +3536,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3462
3536
|
onMouseDown: function onMouseDown(e) {
|
|
3463
3537
|
return e.preventDefault();
|
|
3464
3538
|
}
|
|
3465
|
-
}), ((_context$luckysheet_s5 = (_context$luckysheet_s6 = context.luckysheet_select_save) === null || _context$luckysheet_s6 === void 0 ? void 0 : _context$luckysheet_s6.length) !== null && _context$luckysheet_s5 !== void 0 ? _context$luckysheet_s5 : 0) > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
3539
|
+
}), ((_context$luckysheet_s5 = (_context$luckysheet_s6 = context.luckysheet_select_save) === null || _context$luckysheet_s6 === void 0 ? void 0 : _context$luckysheet_s6.length) !== null && _context$luckysheet_s5 !== void 0 ? _context$luckysheet_s5 : 0) > 0 && ( /*#__PURE__*/React.createElement("div", {
|
|
3466
3540
|
id: "luckysheet-cell-selected-boxs"
|
|
3467
3541
|
}, context.luckysheet_select_save.map(function (selection, index) {
|
|
3468
3542
|
var _refs$globalCache$fre3, _refs$globalCache$fre4;
|
|
@@ -3560,11 +3634,11 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3560
3634
|
className: "leankylin-presence-username",
|
|
3561
3635
|
style: usernameStyle
|
|
3562
3636
|
}, presence.username));
|
|
3563
|
-
}), ((_context$linkCard = context.linkCard) === null || _context$linkCard === void 0 ? void 0 : _context$linkCard.sheetId) === context.currentSheetId && (/*#__PURE__*/React.createElement(LinkEditCard, _objectSpread2({}, context.linkCard))), ((_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.show) && /*#__PURE__*/React.createElement(RangeDialog, null), /*#__PURE__*/React.createElement(FilterOptions, {
|
|
3637
|
+
}), ((_context$linkCard = context.linkCard) === null || _context$linkCard === void 0 ? void 0 : _context$linkCard.sheetId) === context.currentSheetId && ( /*#__PURE__*/React.createElement(LinkEditCard, _objectSpread2({}, context.linkCard))), ((_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.show) && /*#__PURE__*/React.createElement(RangeDialog, null), /*#__PURE__*/React.createElement(FilterOptions, {
|
|
3564
3638
|
getContainer: function getContainer() {
|
|
3565
3639
|
return containerRef.current;
|
|
3566
3640
|
}
|
|
3567
|
-
}), /*#__PURE__*/React.createElement(InputBox, null), /*#__PURE__*/React.createElement(NotationBoxes, null), /*#__PURE__*/React.createElement("div", {
|
|
3641
|
+
}), /*#__PURE__*/React.createElement(CellOptions, null), /*#__PURE__*/React.createElement(InputBox, null), /*#__PURE__*/React.createElement(NotationBoxes, null), /*#__PURE__*/React.createElement("div", {
|
|
3568
3642
|
id: "luckysheet-multipleRange-show"
|
|
3569
3643
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3570
3644
|
id: "luckysheet-dynamicArray-hightShow"
|
|
@@ -3896,9 +3970,9 @@ var Combo = function Combo(_ref) {
|
|
|
3896
3970
|
"data-tips": tooltip,
|
|
3897
3971
|
role: "button",
|
|
3898
3972
|
style: style
|
|
3899
|
-
}, iconId ? (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
3973
|
+
}, iconId ? ( /*#__PURE__*/React.createElement(SVGIcon, {
|
|
3900
3974
|
name: iconId
|
|
3901
|
-
})) : (/*#__PURE__*/React.createElement("span", {
|
|
3975
|
+
})) : ( /*#__PURE__*/React.createElement("span", {
|
|
3902
3976
|
className: "leankylin-toolbar-combo-text"
|
|
3903
3977
|
}, text))), /*#__PURE__*/React.createElement("div", {
|
|
3904
3978
|
className: "leankylin-toolbar-combo-arrow",
|
|
@@ -3913,7 +3987,7 @@ var Combo = function Combo(_ref) {
|
|
|
3913
3987
|
width: 10
|
|
3914
3988
|
})), tooltip && /*#__PURE__*/React.createElement("div", {
|
|
3915
3989
|
className: "leankylin-tooltip"
|
|
3916
|
-
}, tooltip)), open && (/*#__PURE__*/React.createElement("div", {
|
|
3990
|
+
}, tooltip)), open && ( /*#__PURE__*/React.createElement("div", {
|
|
3917
3991
|
ref: popupRef,
|
|
3918
3992
|
className: "leankylin-toolbar-combo-popup",
|
|
3919
3993
|
style: popupPosition
|
|
@@ -4579,7 +4653,7 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
4579
4653
|
key: v.text,
|
|
4580
4654
|
onClick: function onClick() {
|
|
4581
4655
|
setOpen(false);
|
|
4582
|
-
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
4656
|
+
showDialog( /*#__PURE__*/React.createElement(ConditionRules, {
|
|
4583
4657
|
type: v.text
|
|
4584
4658
|
}));
|
|
4585
4659
|
}
|
|
@@ -4626,7 +4700,7 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
4626
4700
|
key: v.text,
|
|
4627
4701
|
onClick: function onClick() {
|
|
4628
4702
|
setOpen(false);
|
|
4629
|
-
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
4703
|
+
showDialog( /*#__PURE__*/React.createElement(ConditionRules, {
|
|
4630
4704
|
type: v.text
|
|
4631
4705
|
}));
|
|
4632
4706
|
}
|
|
@@ -5391,7 +5465,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5391
5465
|
}, [{
|
|
5392
5466
|
text: toolbarFormat.moreCurrency,
|
|
5393
5467
|
onclick: function onclick() {
|
|
5394
|
-
showDialog(/*#__PURE__*/React.createElement(FormatSearch, {
|
|
5468
|
+
showDialog( /*#__PURE__*/React.createElement(FormatSearch, {
|
|
5395
5469
|
onCancel: hideDialog,
|
|
5396
5470
|
type: "currency"
|
|
5397
5471
|
}));
|
|
@@ -5587,7 +5661,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5587
5661
|
onClick: function onClick() {
|
|
5588
5662
|
var imgsrc = handleScreenShot(contextRef.current);
|
|
5589
5663
|
if (imgsrc) {
|
|
5590
|
-
showDialog(/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, screenshot.screenshotTipSuccess), /*#__PURE__*/React.createElement("img", {
|
|
5664
|
+
showDialog( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, screenshot.screenshotTipSuccess), /*#__PURE__*/React.createElement("img", {
|
|
5591
5665
|
src: imgsrc,
|
|
5592
5666
|
alt: "",
|
|
5593
5667
|
style: {
|
|
@@ -5615,7 +5689,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5615
5689
|
} else if (currentColumn[0] !== currentColumn[1]) {
|
|
5616
5690
|
showDialog(splitText.tipNoMultiColumn, "ok");
|
|
5617
5691
|
} else {
|
|
5618
|
-
showDialog(/*#__PURE__*/React.createElement(SplitColumn, null));
|
|
5692
|
+
showDialog( /*#__PURE__*/React.createElement(SplitColumn, null));
|
|
5619
5693
|
}
|
|
5620
5694
|
}
|
|
5621
5695
|
}
|
|
@@ -5628,7 +5702,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5628
5702
|
key: name,
|
|
5629
5703
|
onClick: function onClick() {
|
|
5630
5704
|
if (context.allowEdit === false) return;
|
|
5631
|
-
showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
|
|
5705
|
+
showDialog( /*#__PURE__*/React.createElement(DataVerification, null));
|
|
5632
5706
|
}
|
|
5633
5707
|
});
|
|
5634
5708
|
}
|
|
@@ -5686,7 +5760,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5686
5760
|
range = _.assignIn([], context.luckysheet_select_save);
|
|
5687
5761
|
}
|
|
5688
5762
|
if (value === "location") {
|
|
5689
|
-
showDialog(/*#__PURE__*/React.createElement(LocationCondition, null));
|
|
5763
|
+
showDialog( /*#__PURE__*/React.createElement(LocationCondition, null));
|
|
5690
5764
|
} else if (value === "locationFormula") {
|
|
5691
5765
|
setContext(function (ctx) {
|
|
5692
5766
|
rangeArr = applyLocation(range, "locationFormula", "all", ctx);
|
|
@@ -5907,7 +5981,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5907
5981
|
}), /*#__PURE__*/React.createElement(MenuDivider, null), /*#__PURE__*/React.createElement(Option, {
|
|
5908
5982
|
key: "formula",
|
|
5909
5983
|
onClick: function onClick() {
|
|
5910
|
-
showDialog(/*#__PURE__*/React.createElement(FormulaSearch$1, {
|
|
5984
|
+
showDialog( /*#__PURE__*/React.createElement(FormulaSearch$1, {
|
|
5911
5985
|
onCancel: hideDialog
|
|
5912
5986
|
}));
|
|
5913
5987
|
setOpen(false);
|
|
@@ -6020,7 +6094,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6020
6094
|
return /*#__PURE__*/React.createElement(Select, null, _items4.map(function (_ref9, ii) {
|
|
6021
6095
|
var text = _ref9.text,
|
|
6022
6096
|
value = _ref9.value;
|
|
6023
|
-
return value !== "divider" ? (/*#__PURE__*/React.createElement(Option, {
|
|
6097
|
+
return value !== "divider" ? ( /*#__PURE__*/React.createElement(Option, {
|
|
6024
6098
|
key: value,
|
|
6025
6099
|
onClick: function onClick() {
|
|
6026
6100
|
setContext(function (ctx) {
|
|
@@ -6032,7 +6106,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6032
6106
|
className: "leankylin-toolbar-menu-line"
|
|
6033
6107
|
}, text, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
6034
6108
|
name: value
|
|
6035
|
-
})))) : (/*#__PURE__*/React.createElement(MenuDivider, {
|
|
6109
|
+
})))) : ( /*#__PURE__*/React.createElement(MenuDivider, {
|
|
6036
6110
|
key: ii
|
|
6037
6111
|
}));
|
|
6038
6112
|
}), /*#__PURE__*/React.createElement(CustomBorder, {
|
|
@@ -6239,7 +6313,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6239
6313
|
iconId = _ref13.iconId,
|
|
6240
6314
|
value = _ref13.value,
|
|
6241
6315
|
_onClick2 = _ref13.onClick;
|
|
6242
|
-
return value !== "divider" ? (/*#__PURE__*/React.createElement(Option, {
|
|
6316
|
+
return value !== "divider" ? ( /*#__PURE__*/React.createElement(Option, {
|
|
6243
6317
|
key: value,
|
|
6244
6318
|
onClick: function onClick() {
|
|
6245
6319
|
_onClick2 === null || _onClick2 === void 0 ? void 0 : _onClick2();
|
|
@@ -6249,7 +6323,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6249
6323
|
className: "leankylin-toolbar-menu-line"
|
|
6250
6324
|
}, text, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
6251
6325
|
name: iconId
|
|
6252
|
-
})))) : (/*#__PURE__*/React.createElement(MenuDivider, {
|
|
6326
|
+
})))) : ( /*#__PURE__*/React.createElement(MenuDivider, {
|
|
6253
6327
|
key: "divider-".concat(index)
|
|
6254
6328
|
}));
|
|
6255
6329
|
}));
|
|
@@ -6279,11 +6353,11 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6279
6353
|
icon: n.icon,
|
|
6280
6354
|
iconName: n.iconName
|
|
6281
6355
|
}, n.children);
|
|
6282
|
-
}), ((_settings$customToolb = settings.customToolbarItems) === null || _settings$customToolb === void 0 ? void 0 : _settings$customToolb.length) > 0 ? (/*#__PURE__*/React.createElement(Divider, {
|
|
6356
|
+
}), ((_settings$customToolb = settings.customToolbarItems) === null || _settings$customToolb === void 0 ? void 0 : _settings$customToolb.length) > 0 ? ( /*#__PURE__*/React.createElement(Divider, {
|
|
6283
6357
|
key: "customDivider"
|
|
6284
6358
|
})) : null, (toolbarWrapIndex === -1 ? settings.toolbarItems : settings.toolbarItems.slice(0, toolbarWrapIndex + 1)).map(function (name, i) {
|
|
6285
6359
|
return getToolbarItem(name, i);
|
|
6286
|
-
}), toolbarWrapIndex !== -1 && toolbarWrapIndex < settings.toolbarItems.length - 1 ? (/*#__PURE__*/React.createElement(Button, {
|
|
6360
|
+
}), toolbarWrapIndex !== -1 && toolbarWrapIndex < settings.toolbarItems.length - 1 ? ( /*#__PURE__*/React.createElement(Button, {
|
|
6287
6361
|
iconId: "more",
|
|
6288
6362
|
tooltip: toolbar.toolMore,
|
|
6289
6363
|
onClick: function onClick() {
|
|
@@ -6577,7 +6651,7 @@ var FxEditor = function FxEditor() {
|
|
|
6577
6651
|
},
|
|
6578
6652
|
tabIndex: 0,
|
|
6579
6653
|
allowEdit: allowEdit
|
|
6580
|
-
}), /*#__PURE__*/React.createElement(CalcInfo, null), settings === null || settings === void 0 ? void 0 : settings.fxContainer, focused && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
|
|
6654
|
+
}), /*#__PURE__*/React.createElement(CalcInfo, null), settings === null || settings === void 0 ? void 0 : settings.fxContainer, focused && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
|
|
6581
6655
|
style: {
|
|
6582
6656
|
top: inputContainerRef.current.clientHeight
|
|
6583
6657
|
}
|
|
@@ -6804,7 +6878,7 @@ var SheetItem = function SheetItem(_ref) {
|
|
|
6804
6878
|
style: {
|
|
6805
6879
|
fill: svgColor
|
|
6806
6880
|
}
|
|
6807
|
-
})), !!sheet.color && (/*#__PURE__*/React.createElement("div", {
|
|
6881
|
+
})), !!sheet.color && ( /*#__PURE__*/React.createElement("div", {
|
|
6808
6882
|
className: "luckysheet-sheets-item-color",
|
|
6809
6883
|
style: {
|
|
6810
6884
|
background: sheet.color
|
|
@@ -6887,7 +6961,7 @@ var ZoomControl = function ZoomControl() {
|
|
|
6887
6961
|
onClick: function onClick() {
|
|
6888
6962
|
return setRadioMenuOpen(true);
|
|
6889
6963
|
}
|
|
6890
|
-
}, (context.zoomRatio * 100).toFixed(0), "%"), radioMenuOpen && (/*#__PURE__*/React.createElement("div", {
|
|
6964
|
+
}, (context.zoomRatio * 100).toFixed(0), "%"), radioMenuOpen && ( /*#__PURE__*/React.createElement("div", {
|
|
6891
6965
|
className: "leankylin-zoom-ratio-menu",
|
|
6892
6966
|
ref: menuRef
|
|
6893
6967
|
}, presets.map(function (v) {
|
|
@@ -6971,14 +7045,14 @@ var SheetTab = function SheetTab() {
|
|
|
6971
7045
|
id: "luckysheet-sheet-area"
|
|
6972
7046
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6973
7047
|
id: "luckysheet-sheet-content"
|
|
6974
|
-
}, context.allowEdit && (/*#__PURE__*/React.createElement("div", {
|
|
7048
|
+
}, context.allowEdit && ( /*#__PURE__*/React.createElement("div", {
|
|
6975
7049
|
className: "leankylin-sheettab-button",
|
|
6976
7050
|
onClick: onAddSheetClick
|
|
6977
7051
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
6978
7052
|
name: "plus",
|
|
6979
7053
|
width: 16,
|
|
6980
7054
|
height: 16
|
|
6981
|
-
}))), context.allowEdit && (/*#__PURE__*/React.createElement("div", {
|
|
7055
|
+
}))), context.allowEdit && ( /*#__PURE__*/React.createElement("div", {
|
|
6982
7056
|
className: "sheet-list-container"
|
|
6983
7057
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6984
7058
|
id: "all-sheets",
|
|
@@ -7016,9 +7090,9 @@ var SheetTab = function SheetTab() {
|
|
|
7016
7090
|
key: sheet.id,
|
|
7017
7091
|
sheet: sheet
|
|
7018
7092
|
});
|
|
7019
|
-
})), isShowBoundary && isShowScrollBtn && (/*#__PURE__*/React.createElement("div", {
|
|
7093
|
+
})), isShowBoundary && isShowScrollBtn && ( /*#__PURE__*/React.createElement("div", {
|
|
7020
7094
|
className: "boundary boundary-right"
|
|
7021
|
-
}))), isShowScrollBtn && (/*#__PURE__*/React.createElement("div", {
|
|
7095
|
+
}))), isShowScrollBtn && ( /*#__PURE__*/React.createElement("div", {
|
|
7022
7096
|
id: "leankylin-sheettab-leftscroll",
|
|
7023
7097
|
className: "leankylin-sheettab-scroll",
|
|
7024
7098
|
ref: leftScrollRef,
|
|
@@ -7029,7 +7103,7 @@ var SheetTab = function SheetTab() {
|
|
|
7029
7103
|
name: "arrow-doubleleft",
|
|
7030
7104
|
width: 12,
|
|
7031
7105
|
height: 12
|
|
7032
|
-
}))), isShowScrollBtn && (/*#__PURE__*/React.createElement("div", {
|
|
7106
|
+
}))), isShowScrollBtn && ( /*#__PURE__*/React.createElement("div", {
|
|
7033
7107
|
id: "leankylin-sheettab-rightscroll",
|
|
7034
7108
|
className: "leankylin-sheettab-scroll",
|
|
7035
7109
|
ref: rightScrollRef,
|
|
@@ -7280,7 +7354,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7280
7354
|
insertRowColOp: insertRowColOp
|
|
7281
7355
|
});
|
|
7282
7356
|
}
|
|
7283
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, _.startsWith((_context$lang = context.lang) !== null && _context$lang !== void 0 ? _context$lang : "", "zh") && (/*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7357
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, _.startsWith((_context$lang = context.lang) !== null && _context$lang !== void 0 ? _context$lang : "", "zh") && ( /*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7284
7358
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7285
7359
|
}, rightclick[dir]))), "".concat(rightclick.insert, " "), /*#__PURE__*/React.createElement("input", {
|
|
7286
7360
|
onClick: function onClick(e) {
|
|
@@ -7295,7 +7369,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7295
7369
|
defaultValue: "1"
|
|
7296
7370
|
}), /*#__PURE__*/React.createElement("span", {
|
|
7297
7371
|
className: "luckysheet-cols-rows-shift-word luckysheet-mousedown-cancel"
|
|
7298
|
-
}, "".concat(rightclick.column, " ")), !_.startsWith((_context$lang2 = context.lang) !== null && _context$lang2 !== void 0 ? _context$lang2 : "", "zh") && (/*#__PURE__*/React.createElement("span", {
|
|
7372
|
+
}, "".concat(rightclick.column, " ")), !_.startsWith((_context$lang2 = context.lang) !== null && _context$lang2 !== void 0 ? _context$lang2 : "", "zh") && ( /*#__PURE__*/React.createElement("span", {
|
|
7299
7373
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7300
7374
|
}, rightclick[dir]))));
|
|
7301
7375
|
});
|
|
@@ -7333,7 +7407,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7333
7407
|
insertRowColOp: insertRowColOp
|
|
7334
7408
|
});
|
|
7335
7409
|
}
|
|
7336
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, _.startsWith((_context$lang3 = context.lang) !== null && _context$lang3 !== void 0 ? _context$lang3 : "", "zh") && (/*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7410
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, _.startsWith((_context$lang3 = context.lang) !== null && _context$lang3 !== void 0 ? _context$lang3 : "", "zh") && ( /*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7337
7411
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7338
7412
|
}, rightclick[dir]))), "".concat(rightclick.insert, " "), /*#__PURE__*/React.createElement("input", {
|
|
7339
7413
|
onClick: function onClick(e) {
|
|
@@ -7348,13 +7422,13 @@ var ContextMenu = function ContextMenu() {
|
|
|
7348
7422
|
defaultValue: "1"
|
|
7349
7423
|
}), /*#__PURE__*/React.createElement("span", {
|
|
7350
7424
|
className: "luckysheet-cols-rows-shift-word luckysheet-mousedown-cancel"
|
|
7351
|
-
}, "".concat(rightclick.row, " ")), !_.startsWith((_context$lang4 = context.lang) !== null && _context$lang4 !== void 0 ? _context$lang4 : "", "zh") && (/*#__PURE__*/React.createElement("span", {
|
|
7425
|
+
}, "".concat(rightclick.row, " ")), !_.startsWith((_context$lang4 = context.lang) !== null && _context$lang4 !== void 0 ? _context$lang4 : "", "zh") && ( /*#__PURE__*/React.createElement("span", {
|
|
7352
7426
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7353
7427
|
}, rightclick[dir]))));
|
|
7354
7428
|
});
|
|
7355
7429
|
}
|
|
7356
7430
|
if (name === "delete-column") {
|
|
7357
|
-
return (selection === null || selection === void 0 ? void 0 : selection.column_select) && (/*#__PURE__*/React.createElement(Menu, {
|
|
7431
|
+
return (selection === null || selection === void 0 ? void 0 : selection.column_select) && ( /*#__PURE__*/React.createElement(Menu, {
|
|
7358
7432
|
key: "delete-col",
|
|
7359
7433
|
onClick: function onClick() {
|
|
7360
7434
|
if (!selection) return;
|
|
@@ -7397,7 +7471,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7397
7471
|
}, rightclick.deleteSelected, rightclick.column));
|
|
7398
7472
|
}
|
|
7399
7473
|
if (name === "delete-row") {
|
|
7400
|
-
return (selection === null || selection === void 0 ? void 0 : selection.row_select) && (/*#__PURE__*/React.createElement(Menu, {
|
|
7474
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) && ( /*#__PURE__*/React.createElement(Menu, {
|
|
7401
7475
|
key: "delete-row",
|
|
7402
7476
|
onClick: function onClick() {
|
|
7403
7477
|
if (!selection) return;
|
|
@@ -7488,7 +7562,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7488
7562
|
})) ? "" : rowHeight;
|
|
7489
7563
|
return ((_context$luckysheet_s9 = context.luckysheet_select_save) === null || _context$luckysheet_s9 === void 0 ? void 0 : _context$luckysheet_s9.some(function (section) {
|
|
7490
7564
|
return section.row_select;
|
|
7491
|
-
})) ? (/*#__PURE__*/React.createElement(Menu, {
|
|
7565
|
+
})) ? ( /*#__PURE__*/React.createElement(Menu, {
|
|
7492
7566
|
key: "set-row-height",
|
|
7493
7567
|
onClick: function onClick(e, container) {
|
|
7494
7568
|
var _container$querySelec2;
|
|
@@ -7536,7 +7610,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7536
7610
|
})) ? "" : colWidth;
|
|
7537
7611
|
return ((_context$luckysheet_s11 = context.luckysheet_select_save) === null || _context$luckysheet_s11 === void 0 ? void 0 : _context$luckysheet_s11.some(function (section) {
|
|
7538
7612
|
return section.column_select;
|
|
7539
|
-
})) ? (/*#__PURE__*/React.createElement(Menu, {
|
|
7613
|
+
})) ? ( /*#__PURE__*/React.createElement(Menu, {
|
|
7540
7614
|
key: "set-column-width",
|
|
7541
7615
|
onClick: function onClick(e, container) {
|
|
7542
7616
|
var _container$querySelec3;
|
|
@@ -7628,7 +7702,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7628
7702
|
key: name,
|
|
7629
7703
|
onClick: function onClick() {
|
|
7630
7704
|
setContext(function (draftCtx) {
|
|
7631
|
-
showDialog(/*#__PURE__*/React.createElement(CustomSort, null));
|
|
7705
|
+
showDialog( /*#__PURE__*/React.createElement(CustomSort, null));
|
|
7632
7706
|
draftCtx.contextMenu = {};
|
|
7633
7707
|
});
|
|
7634
7708
|
}
|
|
@@ -9383,7 +9457,7 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
9383
9457
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
9384
9458
|
name: "rightArrow",
|
|
9385
9459
|
width: 18
|
|
9386
|
-
})), isShowChangeColor && context.allowEdit && (/*#__PURE__*/React.createElement(ChangeColor, {
|
|
9460
|
+
})), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React.createElement(ChangeColor, {
|
|
9387
9461
|
triggerParentUpdate: updateShowInputColor
|
|
9388
9462
|
})));
|
|
9389
9463
|
}
|
|
@@ -9423,6 +9497,11 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
9423
9497
|
getRefs: function getRefs() {
|
|
9424
9498
|
return refs;
|
|
9425
9499
|
},
|
|
9500
|
+
setCellOptions: function setCellOptions(cellOptions) {
|
|
9501
|
+
return setContext(function (ctx) {
|
|
9502
|
+
ctx.cellOptions = cellOptions;
|
|
9503
|
+
});
|
|
9504
|
+
},
|
|
9426
9505
|
applyOp: function applyOp(ops) {
|
|
9427
9506
|
setContext(function (ctx_) {
|
|
9428
9507
|
var _ops$, _ops$$path, _ops$2, _ops$2$path, _ops$3;
|
|
@@ -9685,7 +9764,7 @@ var SelectItem = function SelectItem(_ref) {
|
|
|
9685
9764
|
var checked = useMemo(function () {
|
|
9686
9765
|
return isChecked(item.key);
|
|
9687
9766
|
}, [isChecked, item.key]);
|
|
9688
|
-
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
|
|
9767
|
+
return isItemVisible(item) ? ( /*#__PURE__*/React.createElement("div", {
|
|
9689
9768
|
className: "select-item"
|
|
9690
9769
|
}, /*#__PURE__*/React.createElement("input", {
|
|
9691
9770
|
className: "filter-checkbox",
|
|
@@ -9698,7 +9777,7 @@ var SelectItem = function SelectItem(_ref) {
|
|
|
9698
9777
|
className: "count"
|
|
9699
9778
|
}, "( ".concat(item.rows.length, " )")))) : null;
|
|
9700
9779
|
};
|
|
9701
|
-
var
|
|
9780
|
+
var DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
9702
9781
|
var item = _ref2.item,
|
|
9703
9782
|
_ref2$depth = _ref2.depth,
|
|
9704
9783
|
depth = _ref2$depth === void 0 ? 0 : _ref2$depth,
|
|
@@ -9714,7 +9793,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
9714
9793
|
var checked = useMemo(function () {
|
|
9715
9794
|
return isChecked(item.key);
|
|
9716
9795
|
}, [isChecked, item.key]);
|
|
9717
|
-
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
9796
|
+
return isItemVisible(item) ? ( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
9718
9797
|
className: "select-item",
|
|
9719
9798
|
style: {
|
|
9720
9799
|
marginLeft: -2 + depth * 20
|
|
@@ -9723,11 +9802,11 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
9723
9802
|
onExpand === null || onExpand === void 0 ? void 0 : onExpand(item.key, !expand);
|
|
9724
9803
|
setExpand(!expand);
|
|
9725
9804
|
}
|
|
9726
|
-
}, _.isEmpty(item.children) ? (/*#__PURE__*/React.createElement("div", {
|
|
9805
|
+
}, _.isEmpty(item.children) ? ( /*#__PURE__*/React.createElement("div", {
|
|
9727
9806
|
style: {
|
|
9728
9807
|
width: 10
|
|
9729
9808
|
}
|
|
9730
|
-
})) : (/*#__PURE__*/React.createElement("div", {
|
|
9809
|
+
})) : ( /*#__PURE__*/React.createElement("div", {
|
|
9731
9810
|
className: "filter-caret ".concat(expand ? "down" : "right"),
|
|
9732
9811
|
style: {
|
|
9733
9812
|
cursor: "pointer"
|
|
@@ -9745,7 +9824,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
9745
9824
|
}), /*#__PURE__*/React.createElement("div", null, item.text), /*#__PURE__*/React.createElement("span", {
|
|
9746
9825
|
className: "count"
|
|
9747
9826
|
}, "( ".concat(item.rows.length, " )"))), expand && item.children.map(function (v) {
|
|
9748
|
-
return /*#__PURE__*/React.createElement(
|
|
9827
|
+
return /*#__PURE__*/React.createElement(DateSelectTreeItem, _objectSpread2({
|
|
9749
9828
|
key: v.key,
|
|
9750
9829
|
item: v,
|
|
9751
9830
|
depth: depth + 1
|
|
@@ -9766,7 +9845,7 @@ var DateSelectTree = function DateSelectTree(_ref3) {
|
|
|
9766
9845
|
onChange = _ref3.onChange,
|
|
9767
9846
|
isItemVisible = _ref3.isItemVisible;
|
|
9768
9847
|
return /*#__PURE__*/React.createElement(React.Fragment, null, dates.map(function (v) {
|
|
9769
|
-
return /*#__PURE__*/React.createElement(
|
|
9848
|
+
return /*#__PURE__*/React.createElement(DateSelectTreeItem, _objectSpread2({
|
|
9770
9849
|
key: v.key,
|
|
9771
9850
|
item: v
|
|
9772
9851
|
}, {
|
|
@@ -9919,7 +9998,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
9919
9998
|
});
|
|
9920
9999
|
}, [col, setContext, startRow, startCol, endRow, endCol, showAlert]);
|
|
9921
10000
|
var renderColorList = useCallback(function (key, title, colors, onSelectChange) {
|
|
9922
|
-
return colors.length > 1 ? (/*#__PURE__*/React.createElement("div", {
|
|
10001
|
+
return colors.length > 1 ? ( /*#__PURE__*/React.createElement("div", {
|
|
9923
10002
|
key: key
|
|
9924
10003
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9925
10004
|
className: "title"
|
|
@@ -10225,7 +10304,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10225
10304
|
clearFilter(draftCtx);
|
|
10226
10305
|
});
|
|
10227
10306
|
}
|
|
10228
|
-
}, filter.clearFilter))), showSubMenu && (/*#__PURE__*/React.createElement("div", {
|
|
10307
|
+
}, filter.clearFilter))), showSubMenu && ( /*#__PURE__*/React.createElement("div", {
|
|
10229
10308
|
ref: subMenuRef,
|
|
10230
10309
|
className: "luckysheet-filter-bycolor-submenu",
|
|
10231
10310
|
style: subMenuPos,
|
|
@@ -10236,9 +10315,9 @@ var FilterMenu = function FilterMenu() {
|
|
|
10236
10315
|
mouseHoverSubMenu.current = false;
|
|
10237
10316
|
setShowSubMenu(false);
|
|
10238
10317
|
}
|
|
10239
|
-
}, filterColors.bgColors.length < 2 && filterColors.fcColors.length < 2 ? (/*#__PURE__*/React.createElement("div", {
|
|
10318
|
+
}, filterColors.bgColors.length < 2 && filterColors.fcColors.length < 2 ? ( /*#__PURE__*/React.createElement("div", {
|
|
10240
10319
|
className: "one-color-tip"
|
|
10241
|
-
}, filter.filterContainerOneColorTip)) : (/*#__PURE__*/React.createElement(React.Fragment, null, [{
|
|
10320
|
+
}, filter.filterContainerOneColorTip)) : ( /*#__PURE__*/React.createElement(React.Fragment, null, [{
|
|
10242
10321
|
key: "bgColors",
|
|
10243
10322
|
title: filter.filiterByColorTip,
|
|
10244
10323
|
colors: filterColors.bgColors
|
|
@@ -10287,7 +10366,7 @@ var SheetHiddenButton = function SheetHiddenButton(_ref) {
|
|
|
10287
10366
|
showSheet();
|
|
10288
10367
|
},
|
|
10289
10368
|
className: "leankylin-sheet-hidden-button"
|
|
10290
|
-
}, (sheet === null || sheet === void 0 ? void 0 : sheet.hide) === 1 ? (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
10369
|
+
}, (sheet === null || sheet === void 0 ? void 0 : sheet.hide) === 1 ? ( /*#__PURE__*/React.createElement(SVGIcon, {
|
|
10291
10370
|
name: "hidden",
|
|
10292
10371
|
width: 16,
|
|
10293
10372
|
height: 16,
|
|
@@ -10345,7 +10424,7 @@ var SheetListItem = function SheetListItem(_ref) {
|
|
|
10345
10424
|
}
|
|
10346
10425
|
}, /*#__PURE__*/React.createElement("span", {
|
|
10347
10426
|
className: "leankylin-sheet-selected-check-sapce"
|
|
10348
|
-
}, sheet.id === context.currentSheetId && (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
10427
|
+
}, sheet.id === context.currentSheetId && ( /*#__PURE__*/React.createElement(SVGIcon, {
|
|
10349
10428
|
name: "check",
|
|
10350
10429
|
width: 16,
|
|
10351
10430
|
height: 16,
|
|
@@ -10356,7 +10435,7 @@ var SheetListItem = function SheetListItem(_ref) {
|
|
|
10356
10435
|
}))), /*#__PURE__*/React.createElement("span", {
|
|
10357
10436
|
className: "luckysheet-sheets-item-name leankylin-sheet-list-item-name",
|
|
10358
10437
|
spellCheck: "false"
|
|
10359
|
-
}, !!sheet.color && (/*#__PURE__*/React.createElement("div", {
|
|
10438
|
+
}, !!sheet.color && ( /*#__PURE__*/React.createElement("div", {
|
|
10360
10439
|
className: "luckysheet-sheets-list-item-color",
|
|
10361
10440
|
style: {
|
|
10362
10441
|
background: sheet.color
|
|
@@ -10847,14 +10926,14 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
10847
10926
|
onKeyDown: onKeyDown
|
|
10848
10927
|
}, /*#__PURE__*/React.createElement(SVGDefines, null), /*#__PURE__*/React.createElement("div", {
|
|
10849
10928
|
className: "leankylin-workarea"
|
|
10850
|
-
}, mergedSettings.showToolbar && (/*#__PURE__*/React.createElement(Toolbar, {
|
|
10929
|
+
}, mergedSettings.showToolbar && ( /*#__PURE__*/React.createElement(Toolbar, {
|
|
10851
10930
|
moreItemsOpen: moreToolbarItems !== null,
|
|
10852
10931
|
setMoreItems: setMoreToolbarItems
|
|
10853
10932
|
})), mergedSettings.showFormulaBar && /*#__PURE__*/React.createElement(FxEditor, null)), /*#__PURE__*/React.createElement(Sheet, {
|
|
10854
10933
|
sheet: sheet
|
|
10855
|
-
}), mergedSettings.showSheetTabs && /*#__PURE__*/React.createElement(SheetTab, null), /*#__PURE__*/React.createElement(ContextMenu, null), /*#__PURE__*/React.createElement(FilterMenu, null), /*#__PURE__*/React.createElement(SheetTabContextMenu, null), context.showSheetList && /*#__PURE__*/React.createElement(SheetList, null), moreToolbarItems && (/*#__PURE__*/React.createElement(MoreItemsContaier, {
|
|
10934
|
+
}), mergedSettings.showSheetTabs && /*#__PURE__*/React.createElement(SheetTab, null), /*#__PURE__*/React.createElement(ContextMenu, null), /*#__PURE__*/React.createElement(FilterMenu, null), /*#__PURE__*/React.createElement(SheetTabContextMenu, null), context.showSheetList && /*#__PURE__*/React.createElement(SheetList, null), moreToolbarItems && ( /*#__PURE__*/React.createElement(MoreItemsContaier, {
|
|
10856
10935
|
onClose: onMoreToolbarItemsClose
|
|
10857
|
-
}, moreToolbarItems)), !_.isEmpty(context.contextMenu) && (/*#__PURE__*/React.createElement("div", {
|
|
10936
|
+
}, moreToolbarItems)), !_.isEmpty(context.contextMenu) && ( /*#__PURE__*/React.createElement("div", {
|
|
10858
10937
|
onMouseDown: function onMouseDown() {
|
|
10859
10938
|
setContextWithProduce(function (draftCtx) {
|
|
10860
10939
|
draftCtx.contextMenu = {};
|