@guiexpert/table 1.1.9 → 1.1.11
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/index.cjs +9 -9
- package/index.js +299 -220
- package/lib/table/ele-scope.d.ts +1 -0
- package/lib/table/render-scope.d.ts +40 -24
- package/lib/table/service/convenience-dom.service.d.ts +1 -2
- package/lib/table/table-scope.d.ts +6 -1
- package/package.json +1 -1
package/lib/table/ele-scope.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare class EleScope {
|
|
|
30
30
|
protected borderFixedEast: HTMLDivElement;
|
|
31
31
|
protected hoverRow: HTMLDivElement;
|
|
32
32
|
protected hoverColumn: HTMLDivElement;
|
|
33
|
+
protected draggingColumn: HTMLDivElement;
|
|
33
34
|
protected scrollTop: number;
|
|
34
35
|
protected areaBodyWestGeo: GeoData;
|
|
35
36
|
protected areaBodyCenterGeo: GeoData;
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import { EleScope } from
|
|
2
|
-
import { TableModelIf } from
|
|
3
|
-
import { ConvenienceDomService } from
|
|
4
|
-
import { TableOptionsIf } from
|
|
5
|
-
import { CellRange } from
|
|
6
|
-
import { RendererCleanupFnType } from
|
|
7
|
-
import { AreaIdent } from
|
|
8
|
-
import { SideIdent } from
|
|
9
|
-
import { DivScope } from
|
|
10
|
-
import { AreaModelIf } from
|
|
11
|
-
import { ArgsAdjustColumnsToRowParentParams } from
|
|
12
|
-
import { ArgsRenderCellDiv } from
|
|
13
|
-
import { StoreStateScrollPosService } from
|
|
14
|
-
import { GeMouseEvent } from
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
1
|
+
import { EleScope } from './ele-scope';
|
|
2
|
+
import { TableModelIf } from './data/tablemodel/table-model.if';
|
|
3
|
+
import { ConvenienceDomService } from './service/convenience-dom.service';
|
|
4
|
+
import { TableOptionsIf } from './data/options/table-options.if';
|
|
5
|
+
import { CellRange } from './data/common/cell-range';
|
|
6
|
+
import { RendererCleanupFnType } from './renderer/renderer-cleanup-fn.type';
|
|
7
|
+
import { AreaIdent } from './data/tablemodel/area-ident.type';
|
|
8
|
+
import { SideIdent } from './data/side-ident.type';
|
|
9
|
+
import { DivScope } from './data/div-scope.type';
|
|
10
|
+
import { AreaModelIf } from './data/tablemodel/areamodel/area-model.if';
|
|
11
|
+
import { ArgsAdjustColumnsToRowParentParams } from './data/common/args-adjust-columns-to-row-parent-params';
|
|
12
|
+
import { ArgsRenderCellDiv } from './data/common/args-render-cell-div';
|
|
13
|
+
import { StoreStateScrollPosService } from './service/store-state-scroll-pos.service';
|
|
14
|
+
import { GeMouseEvent } from './data/common/event/ge-mouse-event';
|
|
15
|
+
import { GeoData } from './data/geo-data';
|
|
16
|
+
import { SelectionModelIf } from './selection/selection-model.if';
|
|
17
|
+
import { GetT } from './data/common/get-t';
|
|
18
|
+
import { FocusModelIf } from './focus/focus-model.if';
|
|
19
|
+
import { ColAndRowspanModel } from './data/tablemodel/areamodel/col-and-rowspan-model';
|
|
20
|
+
import { AreaObjectMapType } from './data/common/area-map.type';
|
|
21
|
+
import { TableCellUpdateEventIf } from './data/common/event/input/table-cell-update-event.if';
|
|
21
22
|
export declare class RenderScope extends EleScope {
|
|
23
|
+
protected dragging: boolean;
|
|
24
|
+
protected editing: boolean;
|
|
25
|
+
protected storedColumnWidths: number[];
|
|
22
26
|
protected storeScrollPosStateService?: StoreStateScrollPosService;
|
|
23
27
|
protected getSelectionModel?: GetT<SelectionModelIf>;
|
|
24
28
|
protected getFocusModel?: GetT<FocusModelIf>;
|
|
@@ -42,7 +46,6 @@ export declare class RenderScope extends EleScope {
|
|
|
42
46
|
private editorRendererRow?;
|
|
43
47
|
private removables;
|
|
44
48
|
constructor(hostElement: HTMLDivElement, tableModel: TableModelIf, dom: ConvenienceDomService, tableOptions: TableOptionsIf);
|
|
45
|
-
protected editing: boolean;
|
|
46
49
|
isEditing(): boolean;
|
|
47
50
|
resetEditorRenderer(): void;
|
|
48
51
|
/**
|
|
@@ -58,8 +61,10 @@ export declare class RenderScope extends EleScope {
|
|
|
58
61
|
adjustAfterScrolling(): void;
|
|
59
62
|
checkForScrollPosSaving(): void;
|
|
60
63
|
updateCells(events: TableCellUpdateEventIf[], repaintAll?: boolean): void;
|
|
64
|
+
rerenderCellContent({ area, rowIndex, columnIndex, value, cssClasses }: TableCellUpdateEventIf): void;
|
|
65
|
+
protected storeColumnWidths(): void;
|
|
61
66
|
protected getAreaAndSideIdentByAttr(srcElement: HTMLElement): [AreaIdent | undefined, SideIdent | undefined];
|
|
62
|
-
protected getArea(
|
|
67
|
+
protected getArea(areaIdent: AreaIdent, sideIdent: SideIdent): DivScope;
|
|
63
68
|
protected adjustBody(): void;
|
|
64
69
|
protected getNumberByAttr(srcElement: HTMLElement, key: string): number;
|
|
65
70
|
protected getStringByAttr(srcElement: HTMLElement, key: string): string;
|
|
@@ -82,14 +87,25 @@ export declare class RenderScope extends EleScope {
|
|
|
82
87
|
protected applyCssClasses(ele: HTMLDivElement, cssClasses?: {
|
|
83
88
|
[key: string]: boolean;
|
|
84
89
|
}): void;
|
|
85
|
-
rerenderCellContent({ area, rowIndex, columnIndex, value, cssClasses }: TableCellUpdateEventIf): void;
|
|
86
90
|
protected getColumnWidths(startIndex: number, endIndex: number): number[];
|
|
87
91
|
protected getRowHeights(startIndex: number, endIndex: number, areaModel: AreaModelIf): number[];
|
|
88
92
|
protected adjustHoverRows(mouseMoveEvent: GeMouseEvent): void;
|
|
89
93
|
protected hideHoverRow(): void;
|
|
90
94
|
protected adjustHoverColumns(mouseMoveEvent: GeMouseEvent): void;
|
|
91
95
|
protected hideHoverColumn(): void;
|
|
92
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Executes a function after a specified delay, ensuring that the function is called only once within that delay period.
|
|
98
|
+
*
|
|
99
|
+
* @param {() => void} fn - The function to be executed.
|
|
100
|
+
* @param {number} [delay=1000] - The delay in milliseconds before executing the function.
|
|
101
|
+
*
|
|
102
|
+
* @return {undefined}
|
|
103
|
+
*/
|
|
104
|
+
protected debounce(fn: () => void, delay?: number): void;
|
|
105
|
+
protected adjustDraggingColumn(mouseMoveEvent: GeMouseEvent, sourceColumnIndex: number, firstDraggingRendering: boolean): void;
|
|
106
|
+
protected renderContentOfDraggingColumn(columnGeo: GeoData): void;
|
|
107
|
+
protected renderContentOfDraggingColumnForArea(columnGeo: GeoData, areaIdent: AreaIdent, y?: number): number;
|
|
108
|
+
protected hideDraggingColumn(): void;
|
|
93
109
|
private renderDragTargetDiv;
|
|
94
110
|
private renderSelectedBackgroundDiv;
|
|
95
111
|
private renderCell;
|
|
@@ -10,7 +10,7 @@ import { SideIdent } from "../data/side-ident.type";
|
|
|
10
10
|
import { SortState } from "../data/common/sort-state.type";
|
|
11
11
|
import { SortedOptionsIf } from "../data/options/sorted-options.if";
|
|
12
12
|
import { HtmlStyle } from "./data/html-style.type";
|
|
13
|
-
interface AddColumnDivPara {
|
|
13
|
+
export interface AddColumnDivPara {
|
|
14
14
|
parent: HTMLDivElement;
|
|
15
15
|
geo: GeoData;
|
|
16
16
|
rowIndex: number;
|
|
@@ -58,4 +58,3 @@ export declare class ConvenienceDomService {
|
|
|
58
58
|
applyStyleString(div: HTMLDivElement, style: string): void;
|
|
59
59
|
private getDivOrCreateDiv;
|
|
60
60
|
}
|
|
61
|
-
export {};
|
|
@@ -46,6 +46,9 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
46
46
|
private mouseStartColumnIndex;
|
|
47
47
|
private dragFrom;
|
|
48
48
|
private dragTo;
|
|
49
|
+
private lastDragFrom;
|
|
50
|
+
private lastDragTo;
|
|
51
|
+
private firstDraggingRendering;
|
|
49
52
|
constructor(hostElement: HTMLDivElement, tableModel: TableModelIf, domService: DomServiceIf, tableOptions: TableOptionsIf, eventListener: EventListenerIf, copyService?: CopyServiceIf);
|
|
50
53
|
/**
|
|
51
54
|
* Creates a TableScope instance.
|
|
@@ -102,8 +105,9 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
102
105
|
* Handles mouse dragging on the frame.
|
|
103
106
|
*
|
|
104
107
|
* @param {GeMouseEvent} mouseEvent - The mouse event object.
|
|
108
|
+
* @param startMouseEvent
|
|
105
109
|
*/
|
|
106
|
-
mouseDraggingOnFrame(mouseEvent: GeMouseEvent): void;
|
|
110
|
+
mouseDraggingOnFrame(mouseEvent: GeMouseEvent, startMouseEvent: GeMouseEvent | undefined): void;
|
|
107
111
|
/**
|
|
108
112
|
* Handles the end of mouse dragging event on a frame.
|
|
109
113
|
*
|
|
@@ -209,6 +213,7 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
209
213
|
* @returns {FocusModelIf | undefined} The focus model if it exists, or undefined otherwise.
|
|
210
214
|
*/
|
|
211
215
|
focusModel(): FocusModelIf | undefined;
|
|
216
|
+
setDragging(dragging: boolean): void;
|
|
212
217
|
/**
|
|
213
218
|
* Changes the focus cell using the specified deltas.
|
|
214
219
|
*
|