@leankylin-sheet/react 1.2.0 → 1.2.1
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/index.css +2 -4
- package/dist/index.esm.css +2 -4
- package/dist/index.esm.js +3 -63
- package/dist/index.js +2 -62
- package/dist/index.umd.css +2 -4
- package/dist/index.umd.js +3 -63
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +7 -2
package/dist/index.css
CHANGED
|
@@ -475,10 +475,8 @@ html::-webkit-scrollbar-button {
|
|
|
475
475
|
|
|
476
476
|
.luckysheet-bottom-controll-row {
|
|
477
477
|
position: absolute;
|
|
478
|
-
height:
|
|
479
|
-
|
|
480
|
-
/* background: #000; */
|
|
481
|
-
bottom: 38px;
|
|
478
|
+
height: 50px;
|
|
479
|
+
bottom: 30px;
|
|
482
480
|
left: 0px;
|
|
483
481
|
z-index: 1000;
|
|
484
482
|
}
|
package/dist/index.esm.css
CHANGED
|
@@ -475,10 +475,8 @@ html::-webkit-scrollbar-button {
|
|
|
475
475
|
|
|
476
476
|
.luckysheet-bottom-controll-row {
|
|
477
477
|
position: absolute;
|
|
478
|
-
height:
|
|
479
|
-
|
|
480
|
-
/* background: #000; */
|
|
481
|
-
bottom: 38px;
|
|
478
|
+
height: 50px;
|
|
479
|
+
bottom: 30px;
|
|
482
480
|
left: 0px;
|
|
483
481
|
z-index: 1000;
|
|
484
482
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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,
|
|
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, getInlineStringNoStyle, rangeHightlightselected, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, handlePasteByClick, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, 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';
|
|
@@ -3140,13 +3140,9 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3140
3140
|
setContext = _useContext.setContext,
|
|
3141
3141
|
settings = _useContext.settings,
|
|
3142
3142
|
refs = _useContext.refs;
|
|
3143
|
-
var _locale = locale(context),
|
|
3144
|
-
info = _locale.info,
|
|
3145
|
-
rightclick = _locale.rightclick;
|
|
3146
3143
|
var _useDialog = useDialog(),
|
|
3147
3144
|
showDialog = _useDialog.showDialog;
|
|
3148
3145
|
var containerRef = useRef(null);
|
|
3149
|
-
var bottomAddRowInputRef = useRef(null);
|
|
3150
3146
|
var dataVerificationHintBoxRef = useRef(null);
|
|
3151
3147
|
var _useAlert = useAlert(),
|
|
3152
3148
|
showAlert = _useAlert.showAlert;
|
|
@@ -3243,33 +3239,6 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3243
3239
|
var onTouchEnd = useCallback(function () {
|
|
3244
3240
|
handleOverlayTouchEnd(refs.globalCache);
|
|
3245
3241
|
}, [refs.globalCache]);
|
|
3246
|
-
var handleBottomAddRow = useCallback(function () {
|
|
3247
|
-
var _bottomAddRowInputRef;
|
|
3248
|
-
var valueStr = ((_bottomAddRowInputRef = bottomAddRowInputRef.current) === null || _bottomAddRowInputRef === void 0 ? void 0 : _bottomAddRowInputRef.value) || context.addDefaultRows.toString();
|
|
3249
|
-
var value = parseInt(valueStr, 10);
|
|
3250
|
-
if (Number.isNaN(value)) {
|
|
3251
|
-
return;
|
|
3252
|
-
}
|
|
3253
|
-
if (value < 1) {
|
|
3254
|
-
return;
|
|
3255
|
-
}
|
|
3256
|
-
var insertRowColOp = {
|
|
3257
|
-
type: "row",
|
|
3258
|
-
index: context.luckysheetfile[getSheetIndex(context, context.currentSheetId)].data.length - 1,
|
|
3259
|
-
count: value,
|
|
3260
|
-
direction: "rightbottom",
|
|
3261
|
-
id: context.currentSheetId
|
|
3262
|
-
};
|
|
3263
|
-
setContext(function (draftCtx) {
|
|
3264
|
-
try {
|
|
3265
|
-
insertRowCol(draftCtx, insertRowColOp, false);
|
|
3266
|
-
} catch (err) {
|
|
3267
|
-
if (err.message === "maxExceeded") showAlert(rightclick.rowOverLimit);
|
|
3268
|
-
}
|
|
3269
|
-
}, {
|
|
3270
|
-
insertRowColOp: insertRowColOp
|
|
3271
|
-
});
|
|
3272
|
-
}, [context, rightclick.rowOverLimit, setContext, showAlert]);
|
|
3273
3242
|
useEffect(function () {
|
|
3274
3243
|
if (context.warnDialog) {
|
|
3275
3244
|
setTimeout(function () {
|
|
@@ -3635,38 +3604,9 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3635
3604
|
return e.stopPropagation();
|
|
3636
3605
|
},
|
|
3637
3606
|
style: {
|
|
3638
|
-
left: context.scrollLeft
|
|
3639
|
-
display: context.allowEdit ? "block" : "none"
|
|
3640
|
-
}
|
|
3641
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
3642
|
-
className: "leankylin-add-row-button",
|
|
3643
|
-
onClick: function onClick() {
|
|
3644
|
-
handleBottomAddRow();
|
|
3645
|
-
}
|
|
3646
|
-
}, info.add), /*#__PURE__*/React.createElement("input", {
|
|
3647
|
-
ref: bottomAddRowInputRef,
|
|
3648
|
-
type: "text",
|
|
3649
|
-
style: {
|
|
3650
|
-
width: 50
|
|
3651
|
-
},
|
|
3652
|
-
placeholder: context.addDefaultRows.toString()
|
|
3653
|
-
}), " ", /*#__PURE__*/React.createElement("span", {
|
|
3654
|
-
style: {
|
|
3655
|
-
fontSize: 14
|
|
3656
|
-
}
|
|
3657
|
-
}, info.row), " ", /*#__PURE__*/React.createElement("span", {
|
|
3658
|
-
style: {
|
|
3659
|
-
fontSize: 14,
|
|
3660
|
-
color: "#9c9c9c"
|
|
3661
|
-
}
|
|
3662
|
-
}, "(", info.addLast, ")"), /*#__PURE__*/React.createElement("span", {
|
|
3663
|
-
className: "leankylin-add-row-button",
|
|
3664
|
-
onClick: function onClick() {
|
|
3665
|
-
setContext(function (ctx) {
|
|
3666
|
-
ctx.scrollTop = 0;
|
|
3667
|
-
});
|
|
3607
|
+
left: context.scrollLeft
|
|
3668
3608
|
}
|
|
3669
|
-
},
|
|
3609
|
+
}, settings.Footer)))))));
|
|
3670
3610
|
};
|
|
3671
3611
|
|
|
3672
3612
|
var Sheet = function Sheet(_ref) {
|
package/dist/index.js
CHANGED
|
@@ -3150,13 +3150,9 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3150
3150
|
setContext = _useContext.setContext,
|
|
3151
3151
|
settings = _useContext.settings,
|
|
3152
3152
|
refs = _useContext.refs;
|
|
3153
|
-
var _locale = core.locale(context),
|
|
3154
|
-
info = _locale.info,
|
|
3155
|
-
rightclick = _locale.rightclick;
|
|
3156
3153
|
var _useDialog = useDialog(),
|
|
3157
3154
|
showDialog = _useDialog.showDialog;
|
|
3158
3155
|
var containerRef = React.useRef(null);
|
|
3159
|
-
var bottomAddRowInputRef = React.useRef(null);
|
|
3160
3156
|
var dataVerificationHintBoxRef = React.useRef(null);
|
|
3161
3157
|
var _useAlert = useAlert(),
|
|
3162
3158
|
showAlert = _useAlert.showAlert;
|
|
@@ -3253,33 +3249,6 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3253
3249
|
var onTouchEnd = React.useCallback(function () {
|
|
3254
3250
|
core.handleOverlayTouchEnd(refs.globalCache);
|
|
3255
3251
|
}, [refs.globalCache]);
|
|
3256
|
-
var handleBottomAddRow = React.useCallback(function () {
|
|
3257
|
-
var _bottomAddRowInputRef;
|
|
3258
|
-
var valueStr = ((_bottomAddRowInputRef = bottomAddRowInputRef.current) === null || _bottomAddRowInputRef === void 0 ? void 0 : _bottomAddRowInputRef.value) || context.addDefaultRows.toString();
|
|
3259
|
-
var value = parseInt(valueStr, 10);
|
|
3260
|
-
if (Number.isNaN(value)) {
|
|
3261
|
-
return;
|
|
3262
|
-
}
|
|
3263
|
-
if (value < 1) {
|
|
3264
|
-
return;
|
|
3265
|
-
}
|
|
3266
|
-
var insertRowColOp = {
|
|
3267
|
-
type: "row",
|
|
3268
|
-
index: context.luckysheetfile[core.getSheetIndex(context, context.currentSheetId)].data.length - 1,
|
|
3269
|
-
count: value,
|
|
3270
|
-
direction: "rightbottom",
|
|
3271
|
-
id: context.currentSheetId
|
|
3272
|
-
};
|
|
3273
|
-
setContext(function (draftCtx) {
|
|
3274
|
-
try {
|
|
3275
|
-
core.insertRowCol(draftCtx, insertRowColOp, false);
|
|
3276
|
-
} catch (err) {
|
|
3277
|
-
if (err.message === "maxExceeded") showAlert(rightclick.rowOverLimit);
|
|
3278
|
-
}
|
|
3279
|
-
}, {
|
|
3280
|
-
insertRowColOp: insertRowColOp
|
|
3281
|
-
});
|
|
3282
|
-
}, [context, rightclick.rowOverLimit, setContext, showAlert]);
|
|
3283
3252
|
React.useEffect(function () {
|
|
3284
3253
|
if (context.warnDialog) {
|
|
3285
3254
|
setTimeout(function () {
|
|
@@ -3645,38 +3614,9 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3645
3614
|
return e.stopPropagation();
|
|
3646
3615
|
},
|
|
3647
3616
|
style: {
|
|
3648
|
-
left: context.scrollLeft
|
|
3649
|
-
display: context.allowEdit ? "block" : "none"
|
|
3650
|
-
}
|
|
3651
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3652
|
-
className: "leankylin-add-row-button",
|
|
3653
|
-
onClick: function onClick() {
|
|
3654
|
-
handleBottomAddRow();
|
|
3655
|
-
}
|
|
3656
|
-
}, info.add), /*#__PURE__*/React__default['default'].createElement("input", {
|
|
3657
|
-
ref: bottomAddRowInputRef,
|
|
3658
|
-
type: "text",
|
|
3659
|
-
style: {
|
|
3660
|
-
width: 50
|
|
3661
|
-
},
|
|
3662
|
-
placeholder: context.addDefaultRows.toString()
|
|
3663
|
-
}), " ", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
3664
|
-
style: {
|
|
3665
|
-
fontSize: 14
|
|
3666
|
-
}
|
|
3667
|
-
}, info.row), " ", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
3668
|
-
style: {
|
|
3669
|
-
fontSize: 14,
|
|
3670
|
-
color: "#9c9c9c"
|
|
3671
|
-
}
|
|
3672
|
-
}, "(", info.addLast, ")"), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
3673
|
-
className: "leankylin-add-row-button",
|
|
3674
|
-
onClick: function onClick() {
|
|
3675
|
-
setContext(function (ctx) {
|
|
3676
|
-
ctx.scrollTop = 0;
|
|
3677
|
-
});
|
|
3617
|
+
left: context.scrollLeft
|
|
3678
3618
|
}
|
|
3679
|
-
},
|
|
3619
|
+
}, settings.Footer)))))));
|
|
3680
3620
|
};
|
|
3681
3621
|
|
|
3682
3622
|
var Sheet = function Sheet(_ref) {
|
package/dist/index.umd.css
CHANGED
|
@@ -475,10 +475,8 @@ html::-webkit-scrollbar-button {
|
|
|
475
475
|
|
|
476
476
|
.luckysheet-bottom-controll-row {
|
|
477
477
|
position: absolute;
|
|
478
|
-
height:
|
|
479
|
-
|
|
480
|
-
/* background: #000; */
|
|
481
|
-
bottom: 38px;
|
|
478
|
+
height: 50px;
|
|
479
|
+
bottom: 30px;
|
|
482
480
|
left: 0px;
|
|
483
481
|
z-index: 1000;
|
|
484
482
|
}
|