@fileverse-dev/fortune-react 1.0.2-mod-73 → 1.0.2-mod-75
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 +0 -2
- package/dist/index.esm.css +0 -2
- package/dist/index.esm.js +59 -12
- package/dist/index.js +58 -11
- package/dist/index.umd.css +0 -2
- package/dist/index.umd.js +80 -22
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +2 -2
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -1107,8 +1107,6 @@ html::-webkit-scrollbar-button {
|
|
|
1107
1107
|
top: 25px;
|
|
1108
1108
|
background: #ffff;
|
|
1109
1109
|
min-width: 300px;
|
|
1110
|
-
width: -moz-fit-content;
|
|
1111
|
-
width: fit-content;
|
|
1112
1110
|
/* max-width: 450px; */
|
|
1113
1111
|
border: 1px solid lavender;
|
|
1114
1112
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
package/dist/index.esm.css
CHANGED
|
@@ -1107,8 +1107,6 @@ html::-webkit-scrollbar-button {
|
|
|
1107
1107
|
top: 25px;
|
|
1108
1108
|
background: #ffff;
|
|
1109
1109
|
min-width: 300px;
|
|
1110
|
-
width: -moz-fit-content;
|
|
1111
|
-
width: fit-content;
|
|
1112
1110
|
/* max-width: 450px; */
|
|
1113
1111
|
border: 1px solid lavender;
|
|
1114
1112
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, handleContextMenu, 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, api, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, removeActiveImage, deleteSelectedCellText, deleteRowCol, hideSelected, showSelected, 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, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, handleContextMenu, 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, saveIframe, 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, api, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, removeActiveImage, deleteSelectedCellText, deleteRowCol, hideSelected, showSelected, 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';
|
|
@@ -2432,13 +2432,33 @@ var ImgBoxs = function ImgBoxs() {
|
|
|
2432
2432
|
context = _useContext.context,
|
|
2433
2433
|
setContext = _useContext.setContext,
|
|
2434
2434
|
refs = _useContext.refs;
|
|
2435
|
+
var containerRef = useRef(null);
|
|
2435
2436
|
var activeImg = useMemo(function () {
|
|
2436
2437
|
return _.find(context.insertedImgs, {
|
|
2437
2438
|
id: context.activeImg
|
|
2438
2439
|
});
|
|
2439
2440
|
}, [context.activeImg, context.insertedImgs]);
|
|
2441
|
+
useEffect(function () {
|
|
2442
|
+
var handleClickOutside = function handleClickOutside(e) {
|
|
2443
|
+
if (!containerRef.current) return;
|
|
2444
|
+
var imageBoxes = containerRef.current.querySelectorAll(".luckysheet-modal-dialog-image");
|
|
2445
|
+
var clickedInsideSomeImage = Array.from(imageBoxes).some(function (el) {
|
|
2446
|
+
return el.contains(e.target);
|
|
2447
|
+
});
|
|
2448
|
+
if (!clickedInsideSomeImage && context.activeImg !== undefined) {
|
|
2449
|
+
setContext(function (ctx) {
|
|
2450
|
+
ctx.activeImg = undefined;
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
};
|
|
2454
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2455
|
+
return function () {
|
|
2456
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2457
|
+
};
|
|
2458
|
+
}, [context.activeImg, setContext]);
|
|
2440
2459
|
return /*#__PURE__*/React.createElement("div", {
|
|
2441
|
-
id: "luckysheet-image-showBoxs"
|
|
2460
|
+
id: "luckysheet-image-showBoxs",
|
|
2461
|
+
ref: containerRef
|
|
2442
2462
|
}, activeImg && (/*#__PURE__*/React.createElement("div", {
|
|
2443
2463
|
id: "luckysheet-modal-dialog-activeImage",
|
|
2444
2464
|
className: "luckysheet-modal-dialog",
|
|
@@ -2503,16 +2523,41 @@ var ImgBoxs = function ImgBoxs() {
|
|
|
2503
2523
|
}, /*#__PURE__*/React.createElement("i", {
|
|
2504
2524
|
className: "fa fa-window-maximize",
|
|
2505
2525
|
"aria-hidden": "true"
|
|
2506
|
-
})), /*#__PURE__*/React.createElement(
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2526
|
+
})), /*#__PURE__*/React.createElement(IconButton, {
|
|
2527
|
+
icon: "Trash2",
|
|
2528
|
+
onMouseDown: function onMouseDown(e) {
|
|
2529
|
+
e.stopPropagation();
|
|
2530
|
+
setContext(function (ctx) {
|
|
2531
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
2532
|
+
return sheet.id === ctx.currentSheetId;
|
|
2533
|
+
});
|
|
2534
|
+
if (currentSheet) {
|
|
2535
|
+
var _currentSheet$images;
|
|
2536
|
+
currentSheet.images = (_currentSheet$images = currentSheet.images) === null || _currentSheet$images === void 0 ? void 0 : _currentSheet$images.filter(function (f) {
|
|
2537
|
+
return f.id !== activeImg.id;
|
|
2538
|
+
});
|
|
2539
|
+
}
|
|
2540
|
+
ctx.activeImg = undefined;
|
|
2541
|
+
});
|
|
2542
|
+
},
|
|
2543
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
2544
|
+
e.stopPropagation();
|
|
2545
|
+
setContext(function (ctx) {
|
|
2546
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
2547
|
+
return sheet.id === ctx.currentSheetId;
|
|
2548
|
+
});
|
|
2549
|
+
if (currentSheet) {
|
|
2550
|
+
var _currentSheet$images2;
|
|
2551
|
+
currentSheet.images = (_currentSheet$images2 = currentSheet.images) === null || _currentSheet$images2 === void 0 ? void 0 : _currentSheet$images2.filter(function (f) {
|
|
2552
|
+
return f.id !== activeImg.id;
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
ctx.activeImg = undefined;
|
|
2556
|
+
});
|
|
2557
|
+
},
|
|
2558
|
+
variant: "ghost",
|
|
2559
|
+
className: "fortune-iframe-boxes-delete-button"
|
|
2560
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
2516
2561
|
className: "img-list"
|
|
2517
2562
|
}, (_context$insertedImgs = context.insertedImgs) === null || _context$insertedImgs === void 0 ? void 0 : _context$insertedImgs.map(function (v) {
|
|
2518
2563
|
var id = v.id,
|
|
@@ -3843,6 +3888,8 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3843
3888
|
currentSheet.iframes = (_currentSheet$iframes = currentSheet.iframes) === null || _currentSheet$iframes === void 0 ? void 0 : _currentSheet$iframes.filter(function (f) {
|
|
3844
3889
|
return f.id !== frame.id;
|
|
3845
3890
|
});
|
|
3891
|
+
ctx.insertedIframes = currentSheet.iframes;
|
|
3892
|
+
saveIframe(ctx);
|
|
3846
3893
|
}
|
|
3847
3894
|
ctx.activeIframe = undefined;
|
|
3848
3895
|
});
|
package/dist/index.js
CHANGED
|
@@ -2443,13 +2443,33 @@ var ImgBoxs = function ImgBoxs() {
|
|
|
2443
2443
|
context = _useContext.context,
|
|
2444
2444
|
setContext = _useContext.setContext,
|
|
2445
2445
|
refs = _useContext.refs;
|
|
2446
|
+
var containerRef = React.useRef(null);
|
|
2446
2447
|
var activeImg = React.useMemo(function () {
|
|
2447
2448
|
return ___default['default'].find(context.insertedImgs, {
|
|
2448
2449
|
id: context.activeImg
|
|
2449
2450
|
});
|
|
2450
2451
|
}, [context.activeImg, context.insertedImgs]);
|
|
2452
|
+
React.useEffect(function () {
|
|
2453
|
+
var handleClickOutside = function handleClickOutside(e) {
|
|
2454
|
+
if (!containerRef.current) return;
|
|
2455
|
+
var imageBoxes = containerRef.current.querySelectorAll(".luckysheet-modal-dialog-image");
|
|
2456
|
+
var clickedInsideSomeImage = Array.from(imageBoxes).some(function (el) {
|
|
2457
|
+
return el.contains(e.target);
|
|
2458
|
+
});
|
|
2459
|
+
if (!clickedInsideSomeImage && context.activeImg !== undefined) {
|
|
2460
|
+
setContext(function (ctx) {
|
|
2461
|
+
ctx.activeImg = undefined;
|
|
2462
|
+
});
|
|
2463
|
+
}
|
|
2464
|
+
};
|
|
2465
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2466
|
+
return function () {
|
|
2467
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2468
|
+
};
|
|
2469
|
+
}, [context.activeImg, setContext]);
|
|
2451
2470
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2452
|
-
id: "luckysheet-image-showBoxs"
|
|
2471
|
+
id: "luckysheet-image-showBoxs",
|
|
2472
|
+
ref: containerRef
|
|
2453
2473
|
}, activeImg && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
2454
2474
|
id: "luckysheet-modal-dialog-activeImage",
|
|
2455
2475
|
className: "luckysheet-modal-dialog",
|
|
@@ -2514,16 +2534,41 @@ var ImgBoxs = function ImgBoxs() {
|
|
|
2514
2534
|
}, /*#__PURE__*/React__default['default'].createElement("i", {
|
|
2515
2535
|
className: "fa fa-window-maximize",
|
|
2516
2536
|
"aria-hidden": "true"
|
|
2517
|
-
})), /*#__PURE__*/React__default['default'].createElement(
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2537
|
+
})), /*#__PURE__*/React__default['default'].createElement(ui.IconButton, {
|
|
2538
|
+
icon: "Trash2",
|
|
2539
|
+
onMouseDown: function onMouseDown(e) {
|
|
2540
|
+
e.stopPropagation();
|
|
2541
|
+
setContext(function (ctx) {
|
|
2542
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
2543
|
+
return sheet.id === ctx.currentSheetId;
|
|
2544
|
+
});
|
|
2545
|
+
if (currentSheet) {
|
|
2546
|
+
var _currentSheet$images;
|
|
2547
|
+
currentSheet.images = (_currentSheet$images = currentSheet.images) === null || _currentSheet$images === void 0 ? void 0 : _currentSheet$images.filter(function (f) {
|
|
2548
|
+
return f.id !== activeImg.id;
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
ctx.activeImg = undefined;
|
|
2552
|
+
});
|
|
2553
|
+
},
|
|
2554
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
2555
|
+
e.stopPropagation();
|
|
2556
|
+
setContext(function (ctx) {
|
|
2557
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
2558
|
+
return sheet.id === ctx.currentSheetId;
|
|
2559
|
+
});
|
|
2560
|
+
if (currentSheet) {
|
|
2561
|
+
var _currentSheet$images2;
|
|
2562
|
+
currentSheet.images = (_currentSheet$images2 = currentSheet.images) === null || _currentSheet$images2 === void 0 ? void 0 : _currentSheet$images2.filter(function (f) {
|
|
2563
|
+
return f.id !== activeImg.id;
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
ctx.activeImg = undefined;
|
|
2567
|
+
});
|
|
2568
|
+
},
|
|
2569
|
+
variant: "ghost",
|
|
2570
|
+
className: "fortune-iframe-boxes-delete-button"
|
|
2571
|
+
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2527
2572
|
className: "img-list"
|
|
2528
2573
|
}, (_context$insertedImgs = context.insertedImgs) === null || _context$insertedImgs === void 0 ? void 0 : _context$insertedImgs.map(function (v) {
|
|
2529
2574
|
var id = v.id,
|
|
@@ -3854,6 +3899,8 @@ var IframeBoxs = function IframeBoxs() {
|
|
|
3854
3899
|
currentSheet.iframes = (_currentSheet$iframes = currentSheet.iframes) === null || _currentSheet$iframes === void 0 ? void 0 : _currentSheet$iframes.filter(function (f) {
|
|
3855
3900
|
return f.id !== frame.id;
|
|
3856
3901
|
});
|
|
3902
|
+
ctx.insertedIframes = currentSheet.iframes;
|
|
3903
|
+
fortuneCore.saveIframe(ctx);
|
|
3857
3904
|
}
|
|
3858
3905
|
ctx.activeIframe = undefined;
|
|
3859
3906
|
});
|
package/dist/index.umd.css
CHANGED
|
@@ -1107,8 +1107,6 @@ html::-webkit-scrollbar-button {
|
|
|
1107
1107
|
top: 25px;
|
|
1108
1108
|
background: #ffff;
|
|
1109
1109
|
min-width: 300px;
|
|
1110
|
-
width: -moz-fit-content;
|
|
1111
|
-
width: fit-content;
|
|
1112
1110
|
/* max-width: 450px; */
|
|
1113
1111
|
border: 1px solid lavender;
|
|
1114
1112
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
package/dist/index.umd.js
CHANGED
|
@@ -37100,12 +37100,14 @@
|
|
|
37100
37100
|
address,
|
|
37101
37101
|
startDate,
|
|
37102
37102
|
endDate,
|
|
37103
|
+
page = 1,
|
|
37104
|
+
offset = 10,
|
|
37103
37105
|
}) {
|
|
37104
37106
|
const API_KEY = window.localStorage.getItem(scanKey);
|
|
37105
37107
|
if (!API_KEY) return `${scanKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
37106
37108
|
if (API_KEY === 'xxxx') return `${scanKey}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`;
|
|
37107
37109
|
|
|
37108
|
-
|
|
37110
|
+
let chainId = CHAIN_ID_MAP[chain?.toLowerCase()];
|
|
37109
37111
|
if (!chainId) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_CHAIN}`;
|
|
37110
37112
|
|
|
37111
37113
|
const ACTION_MAP = {
|
|
@@ -37118,6 +37120,10 @@
|
|
|
37118
37120
|
const action = ACTION_MAP[type];
|
|
37119
37121
|
if (!action) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`;
|
|
37120
37122
|
|
|
37123
|
+
|
|
37124
|
+
if (scanKey === SERVICE_API_KEY.Basescan) chainId = 'base';
|
|
37125
|
+
if (scanKey === SERVICE_API_KEY.Gnosisscan) chainId = 'gnosis';
|
|
37126
|
+
|
|
37121
37127
|
let url = `${baseUrl}?chainid=${chainId}&module=account&action=${action}&apikey=${API_KEY}`;
|
|
37122
37128
|
|
|
37123
37129
|
if (['all-txns', 'token-txns', 'nft-txns'].includes(type)) {
|
|
@@ -37131,6 +37137,7 @@
|
|
|
37131
37137
|
]);
|
|
37132
37138
|
url += `&startblock=${startBlock}&endblock=${endBlock}`;
|
|
37133
37139
|
}
|
|
37140
|
+
url += `&page=${page}&offset=${offset}`;
|
|
37134
37141
|
}
|
|
37135
37142
|
|
|
37136
37143
|
try {
|
|
@@ -37287,7 +37294,7 @@
|
|
|
37287
37294
|
}
|
|
37288
37295
|
|
|
37289
37296
|
async function BASESCAN(...args) {
|
|
37290
|
-
const [type, chain, address, startDate, endDate] = args;
|
|
37297
|
+
const [type, chain, address, startDate, endDate, page, limit] = args;
|
|
37291
37298
|
return handleScanRequest({
|
|
37292
37299
|
scanKey: SERVICE_API_KEY.Basescan,
|
|
37293
37300
|
baseUrl: 'https://api.basescan.org/api',
|
|
@@ -37296,10 +37303,12 @@
|
|
|
37296
37303
|
address,
|
|
37297
37304
|
startDate,
|
|
37298
37305
|
endDate,
|
|
37306
|
+
page,
|
|
37307
|
+
offset:limit
|
|
37299
37308
|
});
|
|
37300
37309
|
}
|
|
37301
37310
|
async function GNOSISSCAN(...args) {
|
|
37302
|
-
const [type, chain, address, startDate, endDate] = args;
|
|
37311
|
+
const [type, chain, address, startDate, endDate, page, limit] = args;
|
|
37303
37312
|
return handleScanRequest({
|
|
37304
37313
|
scanKey: SERVICE_API_KEY.Gnosisscan,
|
|
37305
37314
|
baseUrl: 'https://api.gnosisscan.io/api',
|
|
@@ -37308,6 +37317,8 @@
|
|
|
37308
37317
|
address,
|
|
37309
37318
|
startDate,
|
|
37310
37319
|
endDate,
|
|
37320
|
+
page,
|
|
37321
|
+
offset:limit
|
|
37311
37322
|
});
|
|
37312
37323
|
}
|
|
37313
37324
|
|
|
@@ -37413,7 +37424,7 @@
|
|
|
37413
37424
|
|
|
37414
37425
|
|
|
37415
37426
|
async function ETHERSCAN(...args) {
|
|
37416
|
-
const [type, chain, address, startDate, endDate] = args;
|
|
37427
|
+
const [type, chain, address, startDate, endDate, page, limit] = args;
|
|
37417
37428
|
return handleScanRequest({
|
|
37418
37429
|
scanKey: SERVICE_API_KEY.Etherscan,
|
|
37419
37430
|
baseUrl: 'https://api.etherscan.io/v2/api',
|
|
@@ -37422,6 +37433,8 @@
|
|
|
37422
37433
|
address,
|
|
37423
37434
|
startDate,
|
|
37424
37435
|
endDate,
|
|
37436
|
+
page,
|
|
37437
|
+
offset:limit
|
|
37425
37438
|
});
|
|
37426
37439
|
}
|
|
37427
37440
|
|
|
@@ -37467,7 +37480,7 @@
|
|
|
37467
37480
|
}
|
|
37468
37481
|
}
|
|
37469
37482
|
|
|
37470
|
-
async function EOA(addresses, category, chains, startTime, endTime) {
|
|
37483
|
+
async function EOA(addresses, category, chains, startTime, endTime, page = 1, offset = 10) {
|
|
37471
37484
|
try {
|
|
37472
37485
|
const ADDRESSES = addresses.split(',').map(a => a.trim());
|
|
37473
37486
|
const CHAINS = typeof chains === 'string' ? chains.split(',').map(c => c.trim()) : chains;
|
|
@@ -37488,18 +37501,16 @@
|
|
|
37488
37501
|
if (category === 'txns') {
|
|
37489
37502
|
const startBlock = await fromTimeStampToBlock(startTime, chain, API_KEY);
|
|
37490
37503
|
const endBlock = await fromTimeStampToBlock(endTime, chain, API_KEY);
|
|
37491
|
-
timeQuery = `&startblock=${startBlock}&endblock=${endBlock}`;
|
|
37504
|
+
timeQuery = `&startblock=${startBlock}&endblock=${endBlock}&page=${page}&offset=${offset}&sort=asc`;
|
|
37492
37505
|
} else {
|
|
37493
37506
|
timeQuery = `&tag=latest`;
|
|
37494
37507
|
}
|
|
37495
37508
|
|
|
37496
|
-
const url = `https://api.etherscan.io/v2/api?module=${action.split('.')[0]}&action=${action.split('.')[1]}&address=${address}&
|
|
37509
|
+
const url = `https://api.etherscan.io/v2/api?module=${action.split('.')[0]}&action=${action.split('.')[1]}&address=${address}&chainid=${chainId}&apikey=${API_KEY}${timeQuery}`;
|
|
37497
37510
|
|
|
37498
37511
|
try {
|
|
37499
37512
|
const response = await fetch(url);
|
|
37500
|
-
if (!response.ok) {
|
|
37501
|
-
return `HTTP_${response.status}`;
|
|
37502
|
-
}
|
|
37513
|
+
if (!response.ok) return `HTTP_${response.status}`;
|
|
37503
37514
|
|
|
37504
37515
|
const json = await response.json();
|
|
37505
37516
|
|
|
@@ -37515,7 +37526,6 @@
|
|
|
37515
37526
|
for (const entry of entries) {
|
|
37516
37527
|
flatResults.push({ chain, address, ...entry });
|
|
37517
37528
|
}
|
|
37518
|
-
|
|
37519
37529
|
} catch (e) {
|
|
37520
37530
|
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
37521
37531
|
}
|
|
@@ -37532,6 +37542,7 @@
|
|
|
37532
37542
|
|
|
37533
37543
|
|
|
37534
37544
|
|
|
37545
|
+
|
|
37535
37546
|
async function FLVURL(token, vs_currencies) {
|
|
37536
37547
|
return new Promise((resolve) => {
|
|
37537
37548
|
setTimeout(() => {
|
|
@@ -106803,13 +106814,33 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
106803
106814
|
context = _useContext.context,
|
|
106804
106815
|
setContext = _useContext.setContext,
|
|
106805
106816
|
refs = _useContext.refs;
|
|
106817
|
+
var containerRef = React.useRef(null);
|
|
106806
106818
|
var activeImg = React.useMemo(function () {
|
|
106807
106819
|
return lodash.find(context.insertedImgs, {
|
|
106808
106820
|
id: context.activeImg
|
|
106809
106821
|
});
|
|
106810
106822
|
}, [context.activeImg, context.insertedImgs]);
|
|
106823
|
+
React.useEffect(function () {
|
|
106824
|
+
var handleClickOutside = function handleClickOutside(e) {
|
|
106825
|
+
if (!containerRef.current) return;
|
|
106826
|
+
var imageBoxes = containerRef.current.querySelectorAll(".luckysheet-modal-dialog-image");
|
|
106827
|
+
var clickedInsideSomeImage = Array.from(imageBoxes).some(function (el) {
|
|
106828
|
+
return el.contains(e.target);
|
|
106829
|
+
});
|
|
106830
|
+
if (!clickedInsideSomeImage && context.activeImg !== undefined) {
|
|
106831
|
+
setContext(function (ctx) {
|
|
106832
|
+
ctx.activeImg = undefined;
|
|
106833
|
+
});
|
|
106834
|
+
}
|
|
106835
|
+
};
|
|
106836
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
106837
|
+
return function () {
|
|
106838
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
106839
|
+
};
|
|
106840
|
+
}, [context.activeImg, setContext]);
|
|
106811
106841
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
106812
|
-
id: "luckysheet-image-showBoxs"
|
|
106842
|
+
id: "luckysheet-image-showBoxs",
|
|
106843
|
+
ref: containerRef
|
|
106813
106844
|
}, activeImg && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
106814
106845
|
id: "luckysheet-modal-dialog-activeImage",
|
|
106815
106846
|
className: "luckysheet-modal-dialog",
|
|
@@ -106874,16 +106905,41 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
106874
106905
|
}, /*#__PURE__*/React__default['default'].createElement("i", {
|
|
106875
106906
|
className: "fa fa-window-maximize",
|
|
106876
106907
|
"aria-hidden": "true"
|
|
106877
|
-
})), /*#__PURE__*/React__default['default'].createElement(
|
|
106878
|
-
|
|
106879
|
-
|
|
106880
|
-
|
|
106881
|
-
|
|
106882
|
-
|
|
106883
|
-
|
|
106884
|
-
|
|
106885
|
-
|
|
106886
|
-
|
|
106908
|
+
})), /*#__PURE__*/React__default['default'].createElement(Er, {
|
|
106909
|
+
icon: "Trash2",
|
|
106910
|
+
onMouseDown: function onMouseDown(e) {
|
|
106911
|
+
e.stopPropagation();
|
|
106912
|
+
setContext(function (ctx) {
|
|
106913
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
106914
|
+
return sheet.id === ctx.currentSheetId;
|
|
106915
|
+
});
|
|
106916
|
+
if (currentSheet) {
|
|
106917
|
+
var _currentSheet$images;
|
|
106918
|
+
currentSheet.images = (_currentSheet$images = currentSheet.images) === null || _currentSheet$images === void 0 ? void 0 : _currentSheet$images.filter(function (f) {
|
|
106919
|
+
return f.id !== activeImg.id;
|
|
106920
|
+
});
|
|
106921
|
+
}
|
|
106922
|
+
ctx.activeImg = undefined;
|
|
106923
|
+
});
|
|
106924
|
+
},
|
|
106925
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
106926
|
+
e.stopPropagation();
|
|
106927
|
+
setContext(function (ctx) {
|
|
106928
|
+
var currentSheet = ctx.luckysheetfile.find(function (sheet) {
|
|
106929
|
+
return sheet.id === ctx.currentSheetId;
|
|
106930
|
+
});
|
|
106931
|
+
if (currentSheet) {
|
|
106932
|
+
var _currentSheet$images2;
|
|
106933
|
+
currentSheet.images = (_currentSheet$images2 = currentSheet.images) === null || _currentSheet$images2 === void 0 ? void 0 : _currentSheet$images2.filter(function (f) {
|
|
106934
|
+
return f.id !== activeImg.id;
|
|
106935
|
+
});
|
|
106936
|
+
}
|
|
106937
|
+
ctx.activeImg = undefined;
|
|
106938
|
+
});
|
|
106939
|
+
},
|
|
106940
|
+
variant: "ghost",
|
|
106941
|
+
className: "fortune-iframe-boxes-delete-button"
|
|
106942
|
+
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
106887
106943
|
className: "img-list"
|
|
106888
106944
|
}, (_context$insertedImgs = context.insertedImgs) === null || _context$insertedImgs === void 0 ? void 0 : _context$insertedImgs.map(function (v) {
|
|
106889
106945
|
var id = v.id,
|
|
@@ -108214,6 +108270,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
108214
108270
|
currentSheet.iframes = (_currentSheet$iframes = currentSheet.iframes) === null || _currentSheet$iframes === void 0 ? void 0 : _currentSheet$iframes.filter(function (f) {
|
|
108215
108271
|
return f.id !== frame.id;
|
|
108216
108272
|
});
|
|
108273
|
+
ctx.insertedIframes = currentSheet.iframes;
|
|
108274
|
+
saveIframe(ctx);
|
|
108217
108275
|
}
|
|
108218
108276
|
ctx.activeIframe = undefined;
|
|
108219
108277
|
});
|