@fileverse-dev/fortune-core 1.0.2-mod-21 → 1.0.2-mod-23
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.esm.js +85 -1
- package/dist/index.js +86 -0
- package/dist/utils/freeze.d.ts +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -75457,6 +75457,90 @@ function inverseRowColOptions(options) {
|
|
|
75457
75457
|
return options;
|
|
75458
75458
|
}
|
|
75459
75459
|
|
|
75460
|
+
var getFreezeState = function getFreezeState(ctx) {
|
|
75461
|
+
var _ctx$luckysheetfile$s, _ctx$luckysheet_selec, _frozen$range, _frozen$range2;
|
|
75462
|
+
var sheetIndex = getSheetIndex(ctx, ctx.currentSheetId);
|
|
75463
|
+
if (sheetIndex == null) return {
|
|
75464
|
+
isRowFrozen: false,
|
|
75465
|
+
isColFrozen: false
|
|
75466
|
+
};
|
|
75467
|
+
var frozen = (_ctx$luckysheetfile$s = ctx.luckysheetfile[sheetIndex]) === null || _ctx$luckysheetfile$s === void 0 ? void 0 : _ctx$luckysheetfile$s.frozen;
|
|
75468
|
+
var selection = (_ctx$luckysheet_selec = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec === void 0 ? void 0 : _ctx$luckysheet_selec[0];
|
|
75469
|
+
if (!selection) return {
|
|
75470
|
+
isRowFrozen: false,
|
|
75471
|
+
isColFrozen: false
|
|
75472
|
+
};
|
|
75473
|
+
var frozenRow = frozen === null || frozen === void 0 ? void 0 : (_frozen$range = frozen.range) === null || _frozen$range === void 0 ? void 0 : _frozen$range.row_focus;
|
|
75474
|
+
var frozenCol = frozen === null || frozen === void 0 ? void 0 : (_frozen$range2 = frozen.range) === null || _frozen$range2 === void 0 ? void 0 : _frozen$range2.column_focus;
|
|
75475
|
+
var isRowFrozen = typeof frozenRow === "number" && frozenRow === selection.row_focus;
|
|
75476
|
+
var isColFrozen = typeof frozenCol === "number" && frozenCol === selection.column_focus;
|
|
75477
|
+
return {
|
|
75478
|
+
isRowFrozen: isRowFrozen,
|
|
75479
|
+
isColFrozen: isColFrozen
|
|
75480
|
+
};
|
|
75481
|
+
};
|
|
75482
|
+
var toggleFreeze = function toggleFreeze(ctx, type) {
|
|
75483
|
+
var _ctx$luckysheet_selec2, _sheet$frozen, _frozen$range3, _selection$row_focus, _selection$column_foc, _selection$row_focus2, _selection$column_foc2;
|
|
75484
|
+
var selection = (_ctx$luckysheet_selec2 = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec2 === void 0 ? void 0 : _ctx$luckysheet_selec2[0];
|
|
75485
|
+
if (!selection) return;
|
|
75486
|
+
var sheetIndex = getSheetIndex(ctx, ctx.currentSheetId);
|
|
75487
|
+
var sheet = ctx.luckysheetfile[sheetIndex];
|
|
75488
|
+
var frozen = (_sheet$frozen = sheet.frozen) !== null && _sheet$frozen !== void 0 ? _sheet$frozen : {
|
|
75489
|
+
range: {
|
|
75490
|
+
row_focus: -1,
|
|
75491
|
+
column_focus: -1
|
|
75492
|
+
}
|
|
75493
|
+
};
|
|
75494
|
+
var _ref = (_frozen$range3 = frozen.range) !== null && _frozen$range3 !== void 0 ? _frozen$range3 : {
|
|
75495
|
+
row_focus: -1,
|
|
75496
|
+
column_focus: -1
|
|
75497
|
+
},
|
|
75498
|
+
row_focus = _ref.row_focus,
|
|
75499
|
+
column_focus = _ref.column_focus;
|
|
75500
|
+
switch (type) {
|
|
75501
|
+
case "row":
|
|
75502
|
+
row_focus = (_selection$row_focus = selection.row_focus) !== null && _selection$row_focus !== void 0 ? _selection$row_focus : -1;
|
|
75503
|
+
break;
|
|
75504
|
+
case "column":
|
|
75505
|
+
column_focus = (_selection$column_foc = selection.column_focus) !== null && _selection$column_foc !== void 0 ? _selection$column_foc : -1;
|
|
75506
|
+
break;
|
|
75507
|
+
case "both":
|
|
75508
|
+
row_focus = (_selection$row_focus2 = selection.row_focus) !== null && _selection$row_focus2 !== void 0 ? _selection$row_focus2 : -1;
|
|
75509
|
+
column_focus = (_selection$column_foc2 = selection.column_focus) !== null && _selection$column_foc2 !== void 0 ? _selection$column_foc2 : -1;
|
|
75510
|
+
break;
|
|
75511
|
+
case "unfreeze-row":
|
|
75512
|
+
row_focus = -1;
|
|
75513
|
+
break;
|
|
75514
|
+
case "unfreeze-column":
|
|
75515
|
+
column_focus = -1;
|
|
75516
|
+
break;
|
|
75517
|
+
case "unfreeze-all":
|
|
75518
|
+
delete sheet.frozen;
|
|
75519
|
+
return;
|
|
75520
|
+
}
|
|
75521
|
+
var hasRow = row_focus >= 0;
|
|
75522
|
+
var hasCol = column_focus >= 0;
|
|
75523
|
+
if (!hasRow && !hasCol) {
|
|
75524
|
+
delete sheet.frozen;
|
|
75525
|
+
return;
|
|
75526
|
+
}
|
|
75527
|
+
var newType;
|
|
75528
|
+
if (hasRow && hasCol) {
|
|
75529
|
+
newType = "both";
|
|
75530
|
+
} else if (hasRow) {
|
|
75531
|
+
newType = "row";
|
|
75532
|
+
} else {
|
|
75533
|
+
newType = "column";
|
|
75534
|
+
}
|
|
75535
|
+
sheet.frozen = {
|
|
75536
|
+
type: newType,
|
|
75537
|
+
range: {
|
|
75538
|
+
row_focus: row_focus,
|
|
75539
|
+
column_focus: column_focus
|
|
75540
|
+
}
|
|
75541
|
+
};
|
|
75542
|
+
};
|
|
75543
|
+
|
|
75460
75544
|
function generateRandomSheetName(file, isPivotTable, ctx) {
|
|
75461
75545
|
var index = file.length;
|
|
75462
75546
|
var locale_pivotTable = locale(ctx).pivotTable;
|
|
@@ -79844,4 +79928,4 @@ function handlePasteByClick(ctx, clipboardData, triggerType) {
|
|
|
79844
79928
|
} else ;
|
|
79845
79929
|
}
|
|
79846
79930
|
|
|
79847
|
-
export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, index as api, applyLocation, attrToCssName, autoSelectionFormula, calcSelectionInfo, cancelActiveImgItem, cancelFunctionrangeSelected, cancelNormalSelected, cancelPaintModel, cellFocus, cfSplitRange, changeSheet, chatatABC, checkCF, checkCellIsLocked, checkProtectionAllSelected, checkProtectionFormatCells, checkProtectionSelectLockedOrUnLockedCells, checkboxChange, clearFilter, clearMeasureTextCache, colHasMerged, colLocation, colLocationByIndex, colors, columnCharToIndex, commentBoxProps, compute, computeRowlenArr, confirmMessage, convertCssToStyleList, convertSpanToShareString, copy, createDropCellRange, createFilter, createFilterOptions, createFormulaRangeSelect, createRangeHightlight, dataRangeSelection, datenum_local, defaultContext, defaultFont, defaultSettings, defaultStyle, delFunctionGroup, deleteCellInSave, deleteComment, deleteRowCol, deleteSelectedCellText, deleteSheet, diff, drawArrow, drawLineInfo, dropCellCache, editComment, editSheetName, ensureSheetIndex, error, escapeHTMLTag, escapeScriptTag, execFunctionGroup, execfunction, expandRowsAndColumns, extractFormulaCellOps, filterPatch, fixColumnStyleOverflowInFreeze, fixPositionOnFrozenCells, fixRowStyleOverflowInFreeze, functionCopy, functionHTMLGenerate, functionStrChange, genarate, generateRandomId, generateRandomSheetName, getAllFunctionGroup, getArrowCanvasSize, getBorderInfoCompute, getBorderInfoComputeRange, getCellHyperlink, getCellRowColumn, getCellTextInfo, getCellTopRightPostion, getCellValue, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFrozenHandleLeft, getFrozenHandleTop, getHintText, getHistoryRules, getInlineStringHTML, getInlineStringNoStyle, getMeasureText, getNowDateTime, getNullData, getOptionValue, getOrigincell, getQKBorder, getRange, getRangeArr, getRangeByTxt, getRangetxt, getRealCellValue, getRegExpStr, getRegStr, getRowMerge, getSearchIndexArr, getSelectRange, getSheetByIndex, getSheetIdByName, getSheetIndex, getStyleByCell, getTypeItemHide, getcellFormula, getcellrange, getdatabyselection, getrangeseleciton, goToLink, groupValuesRefresh, handleArrowKey, handleBold, handleBorder, handleCellAreaDoubleClick, handleCellAreaMouseDown, handleClearFormat, handleColFreezeHandleMouseDown, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, handleContextMenu, handleCopy, handleCurrencyFormat, handleFormatPainter, handleFormulaInput, handleFreeze, handleGlobalEnter, handleGlobalKeyDown, handleGlobalWheel, handleHorizontalAlign, handleItalic, handleKeydownForZoom, handleLink, handleMerge, handleNumberDecrease, handleNumberIncrease, handleOverlayMouseMove, handleOverlayMouseUp, handleOverlayTouchEnd, handleOverlayTouchMove, handleOverlayTouchStart, handlePaste, handlePasteByClick, handlePercentageFormat, handleRowFreezeHandleMouseDown, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleScreenShot, handleSort, handleStrikeThrough, handleSum, handleTextBackground, handleTextColor, handleTextSize, handleUnderline, handleVerticalAlign, handleWithCtrlOrMetaKey, hasChinaword, hasPartMC, hideCRCount, hideDropCellSelection, hideSelected, imageProps, indexToColumnChar, initFreeze, initSheetIndex, inlineStyleAffectAttribute, inlineStyleAffectCssName, insertImage, insertRowCol, insertUpdateFunctionGroup, inverseRowColOptions, isAllSelectedCellsInStatus, isAllowEdit, isInlineStringCT, isInlineStringCell, isLinkValid, isRealNull, isRealNum, isShowHidenCR, isSupportBoundingBox, is_date, iscelldata, isdatatype, isdatatypemulti, isdatetime, israngeseleciton, jfrefreshgrid, labelFilterOptionState, locale, luckysheetUpdateCell, mergeBorder, mergeCells, mergeMoveMain, mousePosition, moveHighlightCell, moveHighlightRange, moveToEnd, newComment, normalizeSelection, normalizedAttr, normalizedCellAttr, onCellsMove, onCellsMoveEnd, onCellsMoveStart, onCommentBoxMove, onCommentBoxMoveEnd, onCommentBoxMoveStart, onCommentBoxResize, onCommentBoxResizeEnd, onCommentBoxResizeStart, onDropCellSelect, onDropCellSelectEnd, onFormulaRangeDragEnd, onImageMove, onImageMoveEnd, onImageMoveStart, onImageResize, onImageResizeEnd, onImageResizeStart, onRangeSelectionModalMove, onRangeSelectionModalMoveEnd, onRangeSelectionModalMoveStart, onSearchDialogMove, onSearchDialogMoveEnd, onSearchDialogMoveStart, opToPatch, orderbydata, orderbydatafiler, overShowComment, pasteHandlerOfPaintModel, patchToOp, rangeDrag, rangeDragColumn, rangeDragRow, rangeHightlightselected, rangeSetValue, rangeValueToHtml, removeActiveImage, removeEditingComment, removeHyperlink, removeOverShowComment, replace, replaceAll, replaceHtml, rgbToHex, rowHasMerged, rowLocation, rowLocationByIndex, saveFilter, saveHyperlink, saveImage, scrollToFrozenRowCol, scrollToHighlightCell, searchAll, searchNext, selectAll, selectIsOverlap, selectTextContent, selectTextContentCross, selectTitlesMap, selectTitlesRange, selectionCache, selectionCopyShow, seletedHighlistByindex, setCaretPosition, setCellValue, setConditionRules, setDropcownValue, setEditingComment, showComments, showDropCellSelection, showHideAllComments, showHideComment, showImgChooser, showLinkCard, showSelected, sortDataRange, sortSelection, storeSheetParamALL, toolbarItemClickHandler, toolbarItemSelectedFunc, update, updateCell, updateContextWithCanvas, updateContextWithSheetData, updateDropCell, updateFormat, updateFormatCell, updateInlineStringFormat, updateInlineStringFormatOutside, updateItem, updateMoreCell, updateSheet, validateCellData, validateIdCard, valueIsError, valueShowEs };
|
|
79931
|
+
export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, index as api, applyLocation, attrToCssName, autoSelectionFormula, calcSelectionInfo, cancelActiveImgItem, cancelFunctionrangeSelected, cancelNormalSelected, cancelPaintModel, cellFocus, cfSplitRange, changeSheet, chatatABC, checkCF, checkCellIsLocked, checkProtectionAllSelected, checkProtectionFormatCells, checkProtectionSelectLockedOrUnLockedCells, checkboxChange, clearFilter, clearMeasureTextCache, colHasMerged, colLocation, colLocationByIndex, colors, columnCharToIndex, commentBoxProps, compute, computeRowlenArr, confirmMessage, convertCssToStyleList, convertSpanToShareString, copy, createDropCellRange, createFilter, createFilterOptions, createFormulaRangeSelect, createRangeHightlight, dataRangeSelection, datenum_local, defaultContext, defaultFont, defaultSettings, defaultStyle, delFunctionGroup, deleteCellInSave, deleteComment, deleteRowCol, deleteSelectedCellText, deleteSheet, diff, drawArrow, drawLineInfo, dropCellCache, editComment, editSheetName, ensureSheetIndex, error, escapeHTMLTag, escapeScriptTag, execFunctionGroup, execfunction, expandRowsAndColumns, extractFormulaCellOps, filterPatch, fixColumnStyleOverflowInFreeze, fixPositionOnFrozenCells, fixRowStyleOverflowInFreeze, functionCopy, functionHTMLGenerate, functionStrChange, genarate, generateRandomId, generateRandomSheetName, getAllFunctionGroup, getArrowCanvasSize, getBorderInfoCompute, getBorderInfoComputeRange, getCellHyperlink, getCellRowColumn, getCellTextInfo, getCellTopRightPostion, getCellValue, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFreezeState, getFrozenHandleLeft, getFrozenHandleTop, getHintText, getHistoryRules, getInlineStringHTML, getInlineStringNoStyle, getMeasureText, getNowDateTime, getNullData, getOptionValue, getOrigincell, getQKBorder, getRange, getRangeArr, getRangeByTxt, getRangetxt, getRealCellValue, getRegExpStr, getRegStr, getRowMerge, getSearchIndexArr, getSelectRange, getSheetByIndex, getSheetIdByName, getSheetIndex, getStyleByCell, getTypeItemHide, getcellFormula, getcellrange, getdatabyselection, getrangeseleciton, goToLink, groupValuesRefresh, handleArrowKey, handleBold, handleBorder, handleCellAreaDoubleClick, handleCellAreaMouseDown, handleClearFormat, handleColFreezeHandleMouseDown, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, handleContextMenu, handleCopy, handleCurrencyFormat, handleFormatPainter, handleFormulaInput, handleFreeze, handleGlobalEnter, handleGlobalKeyDown, handleGlobalWheel, handleHorizontalAlign, handleItalic, handleKeydownForZoom, handleLink, handleMerge, handleNumberDecrease, handleNumberIncrease, handleOverlayMouseMove, handleOverlayMouseUp, handleOverlayTouchEnd, handleOverlayTouchMove, handleOverlayTouchStart, handlePaste, handlePasteByClick, handlePercentageFormat, handleRowFreezeHandleMouseDown, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleScreenShot, handleSort, handleStrikeThrough, handleSum, handleTextBackground, handleTextColor, handleTextSize, handleUnderline, handleVerticalAlign, handleWithCtrlOrMetaKey, hasChinaword, hasPartMC, hideCRCount, hideDropCellSelection, hideSelected, imageProps, indexToColumnChar, initFreeze, initSheetIndex, inlineStyleAffectAttribute, inlineStyleAffectCssName, insertImage, insertRowCol, insertUpdateFunctionGroup, inverseRowColOptions, isAllSelectedCellsInStatus, isAllowEdit, isInlineStringCT, isInlineStringCell, isLinkValid, isRealNull, isRealNum, isShowHidenCR, isSupportBoundingBox, is_date, iscelldata, isdatatype, isdatatypemulti, isdatetime, israngeseleciton, jfrefreshgrid, labelFilterOptionState, locale, luckysheetUpdateCell, mergeBorder, mergeCells, mergeMoveMain, mousePosition, moveHighlightCell, moveHighlightRange, moveToEnd, newComment, normalizeSelection, normalizedAttr, normalizedCellAttr, onCellsMove, onCellsMoveEnd, onCellsMoveStart, onCommentBoxMove, onCommentBoxMoveEnd, onCommentBoxMoveStart, onCommentBoxResize, onCommentBoxResizeEnd, onCommentBoxResizeStart, onDropCellSelect, onDropCellSelectEnd, onFormulaRangeDragEnd, onImageMove, onImageMoveEnd, onImageMoveStart, onImageResize, onImageResizeEnd, onImageResizeStart, onRangeSelectionModalMove, onRangeSelectionModalMoveEnd, onRangeSelectionModalMoveStart, onSearchDialogMove, onSearchDialogMoveEnd, onSearchDialogMoveStart, opToPatch, orderbydata, orderbydatafiler, overShowComment, pasteHandlerOfPaintModel, patchToOp, rangeDrag, rangeDragColumn, rangeDragRow, rangeHightlightselected, rangeSetValue, rangeValueToHtml, removeActiveImage, removeEditingComment, removeHyperlink, removeOverShowComment, replace, replaceAll, replaceHtml, rgbToHex, rowHasMerged, rowLocation, rowLocationByIndex, saveFilter, saveHyperlink, saveImage, scrollToFrozenRowCol, scrollToHighlightCell, searchAll, searchNext, selectAll, selectIsOverlap, selectTextContent, selectTextContentCross, selectTitlesMap, selectTitlesRange, selectionCache, selectionCopyShow, seletedHighlistByindex, setCaretPosition, setCellValue, setConditionRules, setDropcownValue, setEditingComment, showComments, showDropCellSelection, showHideAllComments, showHideComment, showImgChooser, showLinkCard, showSelected, sortDataRange, sortSelection, storeSheetParamALL, toggleFreeze, toolbarItemClickHandler, toolbarItemSelectedFunc, update, updateCell, updateContextWithCanvas, updateContextWithSheetData, updateDropCell, updateFormat, updateFormatCell, updateInlineStringFormat, updateInlineStringFormatOutside, updateItem, updateMoreCell, updateSheet, validateCellData, validateIdCard, valueIsError, valueShowEs };
|
package/dist/index.js
CHANGED
|
@@ -75467,6 +75467,90 @@ function inverseRowColOptions(options) {
|
|
|
75467
75467
|
return options;
|
|
75468
75468
|
}
|
|
75469
75469
|
|
|
75470
|
+
var getFreezeState = function getFreezeState(ctx) {
|
|
75471
|
+
var _ctx$luckysheetfile$s, _ctx$luckysheet_selec, _frozen$range, _frozen$range2;
|
|
75472
|
+
var sheetIndex = getSheetIndex(ctx, ctx.currentSheetId);
|
|
75473
|
+
if (sheetIndex == null) return {
|
|
75474
|
+
isRowFrozen: false,
|
|
75475
|
+
isColFrozen: false
|
|
75476
|
+
};
|
|
75477
|
+
var frozen = (_ctx$luckysheetfile$s = ctx.luckysheetfile[sheetIndex]) === null || _ctx$luckysheetfile$s === void 0 ? void 0 : _ctx$luckysheetfile$s.frozen;
|
|
75478
|
+
var selection = (_ctx$luckysheet_selec = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec === void 0 ? void 0 : _ctx$luckysheet_selec[0];
|
|
75479
|
+
if (!selection) return {
|
|
75480
|
+
isRowFrozen: false,
|
|
75481
|
+
isColFrozen: false
|
|
75482
|
+
};
|
|
75483
|
+
var frozenRow = frozen === null || frozen === void 0 ? void 0 : (_frozen$range = frozen.range) === null || _frozen$range === void 0 ? void 0 : _frozen$range.row_focus;
|
|
75484
|
+
var frozenCol = frozen === null || frozen === void 0 ? void 0 : (_frozen$range2 = frozen.range) === null || _frozen$range2 === void 0 ? void 0 : _frozen$range2.column_focus;
|
|
75485
|
+
var isRowFrozen = typeof frozenRow === "number" && frozenRow === selection.row_focus;
|
|
75486
|
+
var isColFrozen = typeof frozenCol === "number" && frozenCol === selection.column_focus;
|
|
75487
|
+
return {
|
|
75488
|
+
isRowFrozen: isRowFrozen,
|
|
75489
|
+
isColFrozen: isColFrozen
|
|
75490
|
+
};
|
|
75491
|
+
};
|
|
75492
|
+
var toggleFreeze = function toggleFreeze(ctx, type) {
|
|
75493
|
+
var _ctx$luckysheet_selec2, _sheet$frozen, _frozen$range3, _selection$row_focus, _selection$column_foc, _selection$row_focus2, _selection$column_foc2;
|
|
75494
|
+
var selection = (_ctx$luckysheet_selec2 = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec2 === void 0 ? void 0 : _ctx$luckysheet_selec2[0];
|
|
75495
|
+
if (!selection) return;
|
|
75496
|
+
var sheetIndex = getSheetIndex(ctx, ctx.currentSheetId);
|
|
75497
|
+
var sheet = ctx.luckysheetfile[sheetIndex];
|
|
75498
|
+
var frozen = (_sheet$frozen = sheet.frozen) !== null && _sheet$frozen !== void 0 ? _sheet$frozen : {
|
|
75499
|
+
range: {
|
|
75500
|
+
row_focus: -1,
|
|
75501
|
+
column_focus: -1
|
|
75502
|
+
}
|
|
75503
|
+
};
|
|
75504
|
+
var _ref = (_frozen$range3 = frozen.range) !== null && _frozen$range3 !== void 0 ? _frozen$range3 : {
|
|
75505
|
+
row_focus: -1,
|
|
75506
|
+
column_focus: -1
|
|
75507
|
+
},
|
|
75508
|
+
row_focus = _ref.row_focus,
|
|
75509
|
+
column_focus = _ref.column_focus;
|
|
75510
|
+
switch (type) {
|
|
75511
|
+
case "row":
|
|
75512
|
+
row_focus = (_selection$row_focus = selection.row_focus) !== null && _selection$row_focus !== void 0 ? _selection$row_focus : -1;
|
|
75513
|
+
break;
|
|
75514
|
+
case "column":
|
|
75515
|
+
column_focus = (_selection$column_foc = selection.column_focus) !== null && _selection$column_foc !== void 0 ? _selection$column_foc : -1;
|
|
75516
|
+
break;
|
|
75517
|
+
case "both":
|
|
75518
|
+
row_focus = (_selection$row_focus2 = selection.row_focus) !== null && _selection$row_focus2 !== void 0 ? _selection$row_focus2 : -1;
|
|
75519
|
+
column_focus = (_selection$column_foc2 = selection.column_focus) !== null && _selection$column_foc2 !== void 0 ? _selection$column_foc2 : -1;
|
|
75520
|
+
break;
|
|
75521
|
+
case "unfreeze-row":
|
|
75522
|
+
row_focus = -1;
|
|
75523
|
+
break;
|
|
75524
|
+
case "unfreeze-column":
|
|
75525
|
+
column_focus = -1;
|
|
75526
|
+
break;
|
|
75527
|
+
case "unfreeze-all":
|
|
75528
|
+
delete sheet.frozen;
|
|
75529
|
+
return;
|
|
75530
|
+
}
|
|
75531
|
+
var hasRow = row_focus >= 0;
|
|
75532
|
+
var hasCol = column_focus >= 0;
|
|
75533
|
+
if (!hasRow && !hasCol) {
|
|
75534
|
+
delete sheet.frozen;
|
|
75535
|
+
return;
|
|
75536
|
+
}
|
|
75537
|
+
var newType;
|
|
75538
|
+
if (hasRow && hasCol) {
|
|
75539
|
+
newType = "both";
|
|
75540
|
+
} else if (hasRow) {
|
|
75541
|
+
newType = "row";
|
|
75542
|
+
} else {
|
|
75543
|
+
newType = "column";
|
|
75544
|
+
}
|
|
75545
|
+
sheet.frozen = {
|
|
75546
|
+
type: newType,
|
|
75547
|
+
range: {
|
|
75548
|
+
row_focus: row_focus,
|
|
75549
|
+
column_focus: column_focus
|
|
75550
|
+
}
|
|
75551
|
+
};
|
|
75552
|
+
};
|
|
75553
|
+
|
|
75470
75554
|
function generateRandomSheetName(file, isPivotTable, ctx) {
|
|
75471
75555
|
var index = file.length;
|
|
75472
75556
|
var locale_pivotTable = locale(ctx).pivotTable;
|
|
@@ -79959,6 +80043,7 @@ exports.getFlattenedRange = getFlattenedRange;
|
|
|
79959
80043
|
exports.getFlowdata = getFlowdata;
|
|
79960
80044
|
exports.getFontSet = getFontSet;
|
|
79961
80045
|
exports.getFontStyleByCell = getFontStyleByCell;
|
|
80046
|
+
exports.getFreezeState = getFreezeState;
|
|
79962
80047
|
exports.getFrozenHandleLeft = getFrozenHandleLeft;
|
|
79963
80048
|
exports.getFrozenHandleTop = getFrozenHandleTop;
|
|
79964
80049
|
exports.getHintText = getHintText;
|
|
@@ -80161,6 +80246,7 @@ exports.showSelected = showSelected;
|
|
|
80161
80246
|
exports.sortDataRange = sortDataRange;
|
|
80162
80247
|
exports.sortSelection = sortSelection;
|
|
80163
80248
|
exports.storeSheetParamALL = storeSheetParamALL;
|
|
80249
|
+
exports.toggleFreeze = toggleFreeze;
|
|
80164
80250
|
exports.toolbarItemClickHandler = toolbarItemClickHandler;
|
|
80165
80251
|
exports.toolbarItemSelectedFunc = toolbarItemSelectedFunc;
|
|
80166
80252
|
exports.update = update;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
export declare const getFreezeState: (ctx: Context) => {
|
|
3
|
+
isRowFrozen: boolean;
|
|
4
|
+
isColFrozen: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type FreezeType = "row" | "column" | "both" | "unfreeze-row" | "unfreeze-column" | "unfreeze-all";
|
|
7
|
+
export declare const toggleFreeze: (ctx: Context, type: FreezeType) => void;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Context } from "../context";
|
|
2
2
|
import { Sheet } from "../types";
|
|
3
3
|
export * from "./patch";
|
|
4
|
+
export * from "./freeze";
|
|
4
5
|
export declare function generateRandomSheetName(file: Sheet[], isPivotTable: boolean, ctx: Context): string;
|
|
5
6
|
export declare function rgbToHex(color: string): string;
|
|
6
7
|
export declare function indexToColumnChar(n: number): string;
|