@fileverse-dev/fortune-react 1.0.2-mod-43 → 1.0.2-mod-45
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/Toolbar/Button.d.ts +1 -0
- package/dist/index.css +1 -2
- package/dist/index.esm.css +1 -2
- package/dist/index.esm.js +49 -17
- package/dist/index.js +48 -16
- package/dist/index.umd.css +1 -2
- package/dist/index.umd.js +49 -17
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +7 -7
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -2254,7 +2254,6 @@ input[type="number"].condition-rules-project-input {
|
|
|
2254
2254
|
border-bottom: 1px solid #d4d4d4;
|
|
2255
2255
|
white-space: nowrap;
|
|
2256
2256
|
align-items: center;
|
|
2257
|
-
flex-wrap: wrap;
|
|
2258
2257
|
gap: 4px;
|
|
2259
2258
|
}
|
|
2260
2259
|
|
|
@@ -2816,7 +2815,7 @@ label {
|
|
|
2816
2815
|
|
|
2817
2816
|
.input-modal {
|
|
2818
2817
|
position: fixed;
|
|
2819
|
-
top:
|
|
2818
|
+
top: 16%;
|
|
2820
2819
|
left: 50%;
|
|
2821
2820
|
transform: translateX(-50%);
|
|
2822
2821
|
border-radius: 0.75rem;
|
package/dist/index.esm.css
CHANGED
|
@@ -2254,7 +2254,6 @@ input[type="number"].condition-rules-project-input {
|
|
|
2254
2254
|
border-bottom: 1px solid #d4d4d4;
|
|
2255
2255
|
white-space: nowrap;
|
|
2256
2256
|
align-items: center;
|
|
2257
|
-
flex-wrap: wrap;
|
|
2258
2257
|
gap: 4px;
|
|
2259
2258
|
}
|
|
2260
2259
|
|
|
@@ -2816,7 +2815,7 @@ label {
|
|
|
2816
2815
|
|
|
2817
2816
|
.input-modal {
|
|
2818
2817
|
position: fixed;
|
|
2819
|
-
top:
|
|
2818
|
+
top: 16%;
|
|
2820
2819
|
left: 50%;
|
|
2821
2820
|
transform: translateX(-50%);
|
|
2822
2821
|
border-radius: 0.75rem;
|
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, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropdownValue, onIframeMoveStart, onIframeResizeStart, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, sanitizeDuneUrl, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, insertDuneChart, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
|
|
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, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropdownValue, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, sanitizeDuneUrl, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, insertDuneChart, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-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';
|
|
@@ -3565,12 +3565,17 @@ var DropDownList = function DropDownList() {
|
|
|
3565
3565
|
};
|
|
3566
3566
|
|
|
3567
3567
|
var IframeBoxs = function IframeBoxs() {
|
|
3568
|
-
var _context$insertedIfra;
|
|
3569
3568
|
var _useContext = useContext(WorkbookContext),
|
|
3570
3569
|
context = _useContext.context,
|
|
3571
3570
|
setContext = _useContext.setContext,
|
|
3572
3571
|
refs = _useContext.refs;
|
|
3573
3572
|
var containerRef = useRef(null);
|
|
3573
|
+
var currentSheetIframes = useMemo(function () {
|
|
3574
|
+
var currentSheet = context.luckysheetfile.find(function (sheet) {
|
|
3575
|
+
return sheet.id === context.currentSheetId;
|
|
3576
|
+
});
|
|
3577
|
+
return (currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes) || [];
|
|
3578
|
+
}, [context.luckysheetfile, context.currentSheetId]);
|
|
3574
3579
|
useEffect(function () {
|
|
3575
3580
|
var handleClickOutside = function handleClickOutside(e) {
|
|
3576
3581
|
if (!containerRef.current) return;
|
|
@@ -3592,7 +3597,7 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3592
3597
|
return /*#__PURE__*/React.createElement("div", {
|
|
3593
3598
|
id: "fortune-iframe-boxes",
|
|
3594
3599
|
ref: containerRef
|
|
3595
|
-
},
|
|
3600
|
+
}, currentSheetIframes === null || currentSheetIframes === void 0 ? void 0 : currentSheetIframes.map(function (frame) {
|
|
3596
3601
|
var isActive = frame.id === context.activeIframe;
|
|
3597
3602
|
var style = {
|
|
3598
3603
|
width: frame.width * context.zoomRatio,
|
|
@@ -3619,6 +3624,16 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3619
3624
|
onMouseDown: function onMouseDown(e) {
|
|
3620
3625
|
if (isActive) {
|
|
3621
3626
|
onIframeMoveStart(context, refs.globalCache, e.nativeEvent);
|
|
3627
|
+
var handleMouseMove = function handleMouseMove(moveEvent) {
|
|
3628
|
+
onIframeMove(context, refs.globalCache, moveEvent);
|
|
3629
|
+
};
|
|
3630
|
+
var _handleMouseUp = function handleMouseUp() {
|
|
3631
|
+
onIframeMoveEnd(context, refs.globalCache);
|
|
3632
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
3633
|
+
document.removeEventListener("mouseup", _handleMouseUp);
|
|
3634
|
+
};
|
|
3635
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
3636
|
+
document.addEventListener("mouseup", _handleMouseUp);
|
|
3622
3637
|
}
|
|
3623
3638
|
e.stopPropagation();
|
|
3624
3639
|
}
|
|
@@ -3642,17 +3657,23 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3642
3657
|
className: "luckysheet-modal-dialog-border"
|
|
3643
3658
|
}), isActive && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3644
3659
|
className: "luckysheet-modal-dialog-resize"
|
|
3645
|
-
}, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (
|
|
3660
|
+
}, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (v) {
|
|
3646
3661
|
return /*#__PURE__*/React.createElement("div", {
|
|
3647
|
-
key:
|
|
3648
|
-
className: "luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-".concat(
|
|
3649
|
-
"data-type":
|
|
3650
|
-
style: {
|
|
3651
|
-
zIndex: 300,
|
|
3652
|
-
position: "absolute"
|
|
3653
|
-
},
|
|
3662
|
+
key: v,
|
|
3663
|
+
className: "luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-".concat(v),
|
|
3664
|
+
"data-type": v,
|
|
3654
3665
|
onMouseDown: function onMouseDown(e) {
|
|
3655
|
-
onIframeResizeStart(context, refs.globalCache, e.nativeEvent,
|
|
3666
|
+
onIframeResizeStart(context, refs.globalCache, e.nativeEvent, v);
|
|
3667
|
+
var handleMouseMove = function handleMouseMove(moveEvent) {
|
|
3668
|
+
onIframeResize(context, refs.globalCache, moveEvent);
|
|
3669
|
+
};
|
|
3670
|
+
var _handleMouseUp2 = function handleMouseUp() {
|
|
3671
|
+
onIframeResizeEnd(context, refs.globalCache);
|
|
3672
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
3673
|
+
document.removeEventListener("mouseup", _handleMouseUp2);
|
|
3674
|
+
};
|
|
3675
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
3676
|
+
document.addEventListener("mouseup", _handleMouseUp2);
|
|
3656
3677
|
e.stopPropagation();
|
|
3657
3678
|
}
|
|
3658
3679
|
});
|
|
@@ -3665,10 +3686,15 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3665
3686
|
title: "Delete",
|
|
3666
3687
|
onClick: function onClick() {
|
|
3667
3688
|
setContext(function (ctx) {
|
|
3668
|
-
var
|
|
3669
|
-
|
|
3670
|
-
return f.id !== frame.id;
|
|
3689
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
3690
|
+
return sheet.id === ctx.currentSheetId;
|
|
3671
3691
|
});
|
|
3692
|
+
if (currentSheet) {
|
|
3693
|
+
var _currentSheet$iframes;
|
|
3694
|
+
currentSheet.iframes = (_currentSheet$iframes = currentSheet.iframes) === null || _currentSheet$iframes === void 0 ? void 0 : _currentSheet$iframes.filter(function (f) {
|
|
3695
|
+
return f.id !== frame.id;
|
|
3696
|
+
});
|
|
3697
|
+
}
|
|
3672
3698
|
ctx.activeIframe = undefined;
|
|
3673
3699
|
});
|
|
3674
3700
|
}
|
|
@@ -4400,7 +4426,8 @@ var Button = function Button(_ref) {
|
|
|
4400
4426
|
iconId = _ref.iconId,
|
|
4401
4427
|
disabled = _ref.disabled,
|
|
4402
4428
|
selected = _ref.selected,
|
|
4403
|
-
children = _ref.children
|
|
4429
|
+
children = _ref.children,
|
|
4430
|
+
style = _ref.style;
|
|
4404
4431
|
return /*#__PURE__*/React.createElement("div", {
|
|
4405
4432
|
className: "fortune-toolbar-button fortune-toolbar-item",
|
|
4406
4433
|
onClick: onClick,
|
|
@@ -4410,7 +4437,7 @@ var Button = function Button(_ref) {
|
|
|
4410
4437
|
"aria-label": tooltip,
|
|
4411
4438
|
style: selected ? {
|
|
4412
4439
|
backgroundColor: "#E7E5EB"
|
|
4413
|
-
} :
|
|
4440
|
+
} : style
|
|
4414
4441
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
4415
4442
|
name: iconId,
|
|
4416
4443
|
width: 16,
|
|
@@ -6767,6 +6794,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6767
6794
|
onClick: function onClick() {
|
|
6768
6795
|
if (context.allowEdit === false) return;
|
|
6769
6796
|
setShowDuneModal(true);
|
|
6797
|
+
},
|
|
6798
|
+
style: {
|
|
6799
|
+
backgroundColor: "#F4603E2E",
|
|
6800
|
+
borderRadius: "8px"
|
|
6770
6801
|
}
|
|
6771
6802
|
}), showDuneModal && (/*#__PURE__*/React.createElement(DuneChartsInputModal, {
|
|
6772
6803
|
isOpen: showDuneModal,
|
|
@@ -11762,6 +11793,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11762
11793
|
}
|
|
11763
11794
|
draftCtx.config = _.isNil(sheet.config) ? {} : sheet.config;
|
|
11764
11795
|
draftCtx.insertedImgs = sheet.images;
|
|
11796
|
+
draftCtx.insertedIframes = sheet.iframes;
|
|
11765
11797
|
draftCtx.currency = mergedSettings.currency || "¥";
|
|
11766
11798
|
draftCtx.zoomRatio = _.isNil(sheet.zoomRatio) ? 1 : sheet.zoomRatio;
|
|
11767
11799
|
draftCtx.rowHeaderWidth = mergedSettings.rowHeaderWidth * draftCtx.zoomRatio;
|
package/dist/index.js
CHANGED
|
@@ -3577,12 +3577,17 @@ var DropDownList = function DropDownList() {
|
|
|
3577
3577
|
};
|
|
3578
3578
|
|
|
3579
3579
|
var IframeBoxs = function IframeBoxs() {
|
|
3580
|
-
var _context$insertedIfra;
|
|
3581
3580
|
var _useContext = React.useContext(WorkbookContext),
|
|
3582
3581
|
context = _useContext.context,
|
|
3583
3582
|
setContext = _useContext.setContext,
|
|
3584
3583
|
refs = _useContext.refs;
|
|
3585
3584
|
var containerRef = React.useRef(null);
|
|
3585
|
+
var currentSheetIframes = React.useMemo(function () {
|
|
3586
|
+
var currentSheet = context.luckysheetfile.find(function (sheet) {
|
|
3587
|
+
return sheet.id === context.currentSheetId;
|
|
3588
|
+
});
|
|
3589
|
+
return (currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes) || [];
|
|
3590
|
+
}, [context.luckysheetfile, context.currentSheetId]);
|
|
3586
3591
|
React.useEffect(function () {
|
|
3587
3592
|
var handleClickOutside = function handleClickOutside(e) {
|
|
3588
3593
|
if (!containerRef.current) return;
|
|
@@ -3604,7 +3609,7 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3604
3609
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3605
3610
|
id: "fortune-iframe-boxes",
|
|
3606
3611
|
ref: containerRef
|
|
3607
|
-
},
|
|
3612
|
+
}, currentSheetIframes === null || currentSheetIframes === void 0 ? void 0 : currentSheetIframes.map(function (frame) {
|
|
3608
3613
|
var isActive = frame.id === context.activeIframe;
|
|
3609
3614
|
var style = {
|
|
3610
3615
|
width: frame.width * context.zoomRatio,
|
|
@@ -3631,6 +3636,16 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3631
3636
|
onMouseDown: function onMouseDown(e) {
|
|
3632
3637
|
if (isActive) {
|
|
3633
3638
|
fortuneCore.onIframeMoveStart(context, refs.globalCache, e.nativeEvent);
|
|
3639
|
+
var handleMouseMove = function handleMouseMove(moveEvent) {
|
|
3640
|
+
fortuneCore.onIframeMove(context, refs.globalCache, moveEvent);
|
|
3641
|
+
};
|
|
3642
|
+
var _handleMouseUp = function handleMouseUp() {
|
|
3643
|
+
fortuneCore.onIframeMoveEnd(context, refs.globalCache);
|
|
3644
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
3645
|
+
document.removeEventListener("mouseup", _handleMouseUp);
|
|
3646
|
+
};
|
|
3647
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
3648
|
+
document.addEventListener("mouseup", _handleMouseUp);
|
|
3634
3649
|
}
|
|
3635
3650
|
e.stopPropagation();
|
|
3636
3651
|
}
|
|
@@ -3654,17 +3669,23 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3654
3669
|
className: "luckysheet-modal-dialog-border"
|
|
3655
3670
|
}), isActive && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3656
3671
|
className: "luckysheet-modal-dialog-resize"
|
|
3657
|
-
}, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (
|
|
3672
|
+
}, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (v) {
|
|
3658
3673
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3659
|
-
key:
|
|
3660
|
-
className: "luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-".concat(
|
|
3661
|
-
"data-type":
|
|
3662
|
-
style: {
|
|
3663
|
-
zIndex: 300,
|
|
3664
|
-
position: "absolute"
|
|
3665
|
-
},
|
|
3674
|
+
key: v,
|
|
3675
|
+
className: "luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-".concat(v),
|
|
3676
|
+
"data-type": v,
|
|
3666
3677
|
onMouseDown: function onMouseDown(e) {
|
|
3667
|
-
fortuneCore.onIframeResizeStart(context, refs.globalCache, e.nativeEvent,
|
|
3678
|
+
fortuneCore.onIframeResizeStart(context, refs.globalCache, e.nativeEvent, v);
|
|
3679
|
+
var handleMouseMove = function handleMouseMove(moveEvent) {
|
|
3680
|
+
fortuneCore.onIframeResize(context, refs.globalCache, moveEvent);
|
|
3681
|
+
};
|
|
3682
|
+
var _handleMouseUp2 = function handleMouseUp() {
|
|
3683
|
+
fortuneCore.onIframeResizeEnd(context, refs.globalCache);
|
|
3684
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
3685
|
+
document.removeEventListener("mouseup", _handleMouseUp2);
|
|
3686
|
+
};
|
|
3687
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
3688
|
+
document.addEventListener("mouseup", _handleMouseUp2);
|
|
3668
3689
|
e.stopPropagation();
|
|
3669
3690
|
}
|
|
3670
3691
|
});
|
|
@@ -3677,10 +3698,15 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3677
3698
|
title: "Delete",
|
|
3678
3699
|
onClick: function onClick() {
|
|
3679
3700
|
setContext(function (ctx) {
|
|
3680
|
-
var
|
|
3681
|
-
|
|
3682
|
-
return f.id !== frame.id;
|
|
3701
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
3702
|
+
return sheet.id === ctx.currentSheetId;
|
|
3683
3703
|
});
|
|
3704
|
+
if (currentSheet) {
|
|
3705
|
+
var _currentSheet$iframes;
|
|
3706
|
+
currentSheet.iframes = (_currentSheet$iframes = currentSheet.iframes) === null || _currentSheet$iframes === void 0 ? void 0 : _currentSheet$iframes.filter(function (f) {
|
|
3707
|
+
return f.id !== frame.id;
|
|
3708
|
+
});
|
|
3709
|
+
}
|
|
3684
3710
|
ctx.activeIframe = undefined;
|
|
3685
3711
|
});
|
|
3686
3712
|
}
|
|
@@ -4412,7 +4438,8 @@ var Button = function Button(_ref) {
|
|
|
4412
4438
|
iconId = _ref.iconId,
|
|
4413
4439
|
disabled = _ref.disabled,
|
|
4414
4440
|
selected = _ref.selected,
|
|
4415
|
-
children = _ref.children
|
|
4441
|
+
children = _ref.children,
|
|
4442
|
+
style = _ref.style;
|
|
4416
4443
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4417
4444
|
className: "fortune-toolbar-button fortune-toolbar-item",
|
|
4418
4445
|
onClick: onClick,
|
|
@@ -4422,7 +4449,7 @@ var Button = function Button(_ref) {
|
|
|
4422
4449
|
"aria-label": tooltip,
|
|
4423
4450
|
style: selected ? {
|
|
4424
4451
|
backgroundColor: "#E7E5EB"
|
|
4425
|
-
} :
|
|
4452
|
+
} : style
|
|
4426
4453
|
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
4427
4454
|
name: iconId,
|
|
4428
4455
|
width: 16,
|
|
@@ -6779,6 +6806,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6779
6806
|
onClick: function onClick() {
|
|
6780
6807
|
if (context.allowEdit === false) return;
|
|
6781
6808
|
setShowDuneModal(true);
|
|
6809
|
+
},
|
|
6810
|
+
style: {
|
|
6811
|
+
backgroundColor: "#F4603E2E",
|
|
6812
|
+
borderRadius: "8px"
|
|
6782
6813
|
}
|
|
6783
6814
|
}), showDuneModal && (/*#__PURE__*/React__default['default'].createElement(DuneChartsInputModal, {
|
|
6784
6815
|
isOpen: showDuneModal,
|
|
@@ -11774,6 +11805,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
|
|
|
11774
11805
|
}
|
|
11775
11806
|
draftCtx.config = ___default['default'].isNil(sheet.config) ? {} : sheet.config;
|
|
11776
11807
|
draftCtx.insertedImgs = sheet.images;
|
|
11808
|
+
draftCtx.insertedIframes = sheet.iframes;
|
|
11777
11809
|
draftCtx.currency = mergedSettings.currency || "¥";
|
|
11778
11810
|
draftCtx.zoomRatio = ___default['default'].isNil(sheet.zoomRatio) ? 1 : sheet.zoomRatio;
|
|
11779
11811
|
draftCtx.rowHeaderWidth = mergedSettings.rowHeaderWidth * draftCtx.zoomRatio;
|
package/dist/index.umd.css
CHANGED
|
@@ -2254,7 +2254,6 @@ input[type="number"].condition-rules-project-input {
|
|
|
2254
2254
|
border-bottom: 1px solid #d4d4d4;
|
|
2255
2255
|
white-space: nowrap;
|
|
2256
2256
|
align-items: center;
|
|
2257
|
-
flex-wrap: wrap;
|
|
2258
2257
|
gap: 4px;
|
|
2259
2258
|
}
|
|
2260
2259
|
|
|
@@ -2816,7 +2815,7 @@ label {
|
|
|
2816
2815
|
|
|
2817
2816
|
.input-modal {
|
|
2818
2817
|
position: fixed;
|
|
2819
|
-
top:
|
|
2818
|
+
top: 16%;
|
|
2820
2819
|
left: 50%;
|
|
2821
2820
|
transform: translateX(-50%);
|
|
2822
2821
|
border-radius: 0.75rem;
|