UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

129 lines 6.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ScrollDirectionRowIndexDiff = exports.ScrollDirection = exports.ScrollbarPositionType = exports.BRUSH_AUTO_SCROLL_INITIAL_CONFIG = exports.InterceptType = exports.SortMethodType = exports.InteractionKeyboardKey = exports.InteractionBrushSelectionStage = exports.INTERACTION_STATE_INFO_KEY = exports.SHAPE_ATTRS_MAP = exports.SHAPE_STYLE_MAP = exports.HOVER_FOCUS_DURATION = exports.CellType = exports.InteractionStateName = exports.InteractionName = void 0; var InteractionName; (function (InteractionName) { InteractionName["CORNER_CELL_CLICK"] = "cornerCellClick"; InteractionName["DATA_CELL_CLICK"] = "dataCellClick"; InteractionName["ROW_CELL_CLICK"] = "rowCellClick"; InteractionName["COL_CELL_CLICK"] = "colCellClick"; InteractionName["MERGED_CELLS_CLICK"] = "mergedCellsClick"; InteractionName["ROW_COLUMN_CLICK"] = "rowColumnClick"; InteractionName["HEADER_CELL_LINK_CLICK"] = "headerCellLinkClick"; InteractionName["PREVIEW_CLICK"] = "previewClick"; InteractionName["HOVER"] = "hover"; InteractionName["DATA_CELL_BRUSH_SELECTION"] = "dataCellBrushSelection"; InteractionName["ROW_CELL_BRUSH_SELECTION"] = "rowCellBrushSelection"; InteractionName["COL_CELL_BRUSH_SELECTION"] = "colCellBrushSelection"; InteractionName["COL_ROW_RESIZE"] = "rowColResize"; InteractionName["DATA_CELL_MULTI_SELECTION"] = "dataCellMultiSelection"; InteractionName["ROW_CELL_MULTI_SELECTION"] = "rowCellMultiSelection"; InteractionName["COL_CELL_MULTI_SELECTION"] = "colCellMultiSelection"; InteractionName["RANGE_SELECTION"] = "rangeSelection"; InteractionName["SELECTED_CELL_MOVE"] = "selectedCellMove"; InteractionName["GLOBAL_RESET"] = "globalReset"; })(InteractionName || (exports.InteractionName = InteractionName = {})); var InteractionStateName; (function (InteractionStateName) { InteractionStateName["ALL_SELECTED"] = "allSelected"; InteractionStateName["SELECTED"] = "selected"; InteractionStateName["ROW_CELL_BRUSH_SELECTED"] = "rowCellBrushSelected"; InteractionStateName["COL_CELL_BRUSH_SELECTED"] = "colCellBrushSelected"; InteractionStateName["DATA_CELL_BRUSH_SELECTED"] = "dataCellBrushSelected"; InteractionStateName["UNSELECTED"] = "unselected"; InteractionStateName["HOVER"] = "hover"; InteractionStateName["HOVER_FOCUS"] = "hoverFocus"; InteractionStateName["HIGHLIGHT"] = "highlight"; InteractionStateName["SEARCH_RESULT"] = "searchResult"; InteractionStateName["PREPARE_SELECT"] = "prepareSelect"; })(InteractionStateName || (exports.InteractionStateName = InteractionStateName = {})); var CellType; (function (CellType) { CellType["DATA_CELL"] = "dataCell"; CellType["ROW_CELL"] = "rowCell"; CellType["COL_CELL"] = "colCell"; CellType["SERIES_NUMBER_CELL"] = "seriesNumberCell"; CellType["CORNER_CELL"] = "cornerCell"; CellType["MERGED_CELL"] = "mergedCell"; })(CellType || (exports.CellType = CellType = {})); exports.HOVER_FOCUS_DURATION = 800; // 主题配置和canvas属性的映射 exports.SHAPE_STYLE_MAP = { textOpacity: 'fillOpacity', backgroundOpacity: 'fillOpacity', backgroundColor: 'fill', borderOpacity: 'strokeOpacity', borderColor: 'stroke', borderWidth: 'lineWidth', opacity: 'opacity', }; // 设置属性的时候实际对应改变的shape映射 exports.SHAPE_ATTRS_MAP = { textShape: ['textOpacity'], textShapes: ['textOpacity'], linkFieldShape: ['opacity'], interactiveBgShape: ['backgroundColor', 'backgroundOpacity'], interactiveBorderShape: ['borderColor', 'borderOpacity', 'borderWidth'], }; exports.INTERACTION_STATE_INFO_KEY = 'interactionStateInfo'; var InteractionBrushSelectionStage; (function (InteractionBrushSelectionStage) { InteractionBrushSelectionStage["CLICK"] = "click"; InteractionBrushSelectionStage["UN_DRAGGED"] = "unDragged"; InteractionBrushSelectionStage["DRAGGED"] = "dragged"; })(InteractionBrushSelectionStage || (exports.InteractionBrushSelectionStage = InteractionBrushSelectionStage = {})); var InteractionKeyboardKey; (function (InteractionKeyboardKey) { InteractionKeyboardKey["SHIFT"] = "Shift"; InteractionKeyboardKey["COPY"] = "c"; InteractionKeyboardKey["ESC"] = "Escape"; InteractionKeyboardKey["META"] = "Meta"; InteractionKeyboardKey["CONTROL"] = "Control"; InteractionKeyboardKey["ARROW_UP"] = "ArrowUp"; InteractionKeyboardKey["ARROW_DOWN"] = "ArrowDown"; InteractionKeyboardKey["ARROW_LEFT"] = "ArrowLeft"; InteractionKeyboardKey["ARROW_RIGHT"] = "ArrowRight"; })(InteractionKeyboardKey || (exports.InteractionKeyboardKey = InteractionKeyboardKey = {})); var SortMethodType; (function (SortMethodType) { SortMethodType["ASC"] = "ASC"; SortMethodType["DESC"] = "DESC"; })(SortMethodType || (exports.SortMethodType = SortMethodType = {})); var InterceptType; (function (InterceptType) { InterceptType["HOVER"] = "hover"; InterceptType["CLICK"] = "click"; InterceptType["DATA_CELL_BRUSH_SELECTION"] = "dataCellBrushSelection"; InterceptType["ROW_CELL_BRUSH_SELECTION"] = "rowCellBrushSelection"; InterceptType["COL_CELL_BRUSH_SELECTION"] = "colCellBrushSelection"; InterceptType["MULTI_SELECTION"] = "multiSelection"; InterceptType["RESIZE"] = "resize"; })(InterceptType || (exports.InterceptType = InterceptType = {})); exports.BRUSH_AUTO_SCROLL_INITIAL_CONFIG = { x: { value: 0, scroll: false, }, y: { value: 0, scroll: false, }, }; var ScrollbarPositionType; (function (ScrollbarPositionType) { ScrollbarPositionType["CONTENT"] = "content"; ScrollbarPositionType["CANVAS"] = "canvas"; })(ScrollbarPositionType || (exports.ScrollbarPositionType = ScrollbarPositionType = {})); var ScrollDirection; (function (ScrollDirection) { ScrollDirection["SCROLL_UP"] = "scrollUp"; ScrollDirection["SCROLL_DOWN"] = "scrollDown"; ScrollDirection["SCROLL_LEFT"] = "scrollLeft"; ScrollDirection["SCROLL_RIGHT"] = "scrollRight"; })(ScrollDirection || (exports.ScrollDirection = ScrollDirection = {})); var ScrollDirectionRowIndexDiff; (function (ScrollDirectionRowIndexDiff) { ScrollDirectionRowIndexDiff[ScrollDirectionRowIndexDiff["SCROLL_UP"] = -1] = "SCROLL_UP"; ScrollDirectionRowIndexDiff[ScrollDirectionRowIndexDiff["SCROLL_DOWN"] = 1] = "SCROLL_DOWN"; })(ScrollDirectionRowIndexDiff || (exports.ScrollDirectionRowIndexDiff = ScrollDirectionRowIndexDiff = {})); //# sourceMappingURL=interaction.js.map