@worktile/theia 15.1.7 → 15.1.10
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/esm2020/plugins/table/components/table.component.mjs +35 -41
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +3 -3
- package/esm2020/plugins/table/table.store.mjs +3 -1
- package/esm2020/plugins/table/table.types.mjs +2 -2
- package/esm2020/plugins/table/utils/get-grid-columns.mjs +78 -2
- package/fesm2015/worktile-theia.mjs +116 -44
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +111 -41
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/table/components/table.component.d.ts +2 -6
- package/plugins/table/components/table.component.scss +0 -6
- package/plugins/table/table.store.d.ts +1 -0
- package/plugins/table/table.types.d.ts +1 -1
- package/plugins/table/utils/get-grid-columns.d.ts +30 -0
package/package.json
CHANGED
|
@@ -41,8 +41,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
41
41
|
isRightShadow: boolean;
|
|
42
42
|
isLeftShadow: boolean;
|
|
43
43
|
previousScrollContainer: string;
|
|
44
|
-
|
|
45
|
-
get columns(): TheTableColumn[];
|
|
44
|
+
columns: TheTableColumn[];
|
|
46
45
|
get nativeElement(): HTMLElement;
|
|
47
46
|
get tbodyNativeElement(): HTMLElement;
|
|
48
47
|
tableWrapper: ElementRef<HTMLElement>;
|
|
@@ -60,12 +59,9 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
60
59
|
onContextChange(): void;
|
|
61
60
|
constructor(elementRef: ElementRef<HTMLElement>, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, tableService: TableService, theTableContextMenuService: TheTableContextMenuService, freezeColumnPipe: TableFreezeColumnPipe, freezeRowPipe: TableFreezeRowPipe, renderer: Renderer2, contextService: TheContextService, config: TheModeConfig);
|
|
62
61
|
ngOnInit(): void;
|
|
63
|
-
/**
|
|
64
|
-
* 打印模式下,按照原宽度比例基于当前表格宽度计算列宽
|
|
65
|
-
*/
|
|
66
|
-
calcPrintColumnsWidth(): void;
|
|
67
62
|
getWrapperWidth(): number;
|
|
68
63
|
ngAfterViewInit(): void;
|
|
64
|
+
getColumnGroups(): void;
|
|
69
65
|
setHeaderRowShadow(): void;
|
|
70
66
|
calcHeaderRowShadow(): {
|
|
71
67
|
height: any;
|
|
@@ -748,9 +748,6 @@ $top-cell-z-index: 13;
|
|
|
748
748
|
.the-numbered-table:not(.the-table-with-sticky-column) .the-table-wrapper {
|
|
749
749
|
padding-left: 0;
|
|
750
750
|
}
|
|
751
|
-
.the-sticky-row {
|
|
752
|
-
grid-template-columns: 45px;
|
|
753
|
-
}
|
|
754
751
|
.the-table-number-col {
|
|
755
752
|
position: sticky;
|
|
756
753
|
left: 0;
|
|
@@ -761,10 +758,7 @@ $top-cell-z-index: 13;
|
|
|
761
758
|
left: 0;
|
|
762
759
|
z-index: $top-cell-z-index;
|
|
763
760
|
background-color: variables.$gray-100;
|
|
764
|
-
border: 1px solid variables.$gray-300;
|
|
765
|
-
border-bottom: none;
|
|
766
761
|
text-align: center;
|
|
767
|
-
grid-template-columns: 45px;
|
|
768
762
|
}
|
|
769
763
|
// 存在序列号、标题列时,正确设置标题列 sticky left
|
|
770
764
|
.the-table-numbered .the-sticky-cell {
|
|
@@ -26,7 +26,7 @@ export declare const TABLE_INSERT_MASK = 19;
|
|
|
26
26
|
export declare const TABLE_BORDER = 1;
|
|
27
27
|
export declare const TABLE_PADDING = 8;
|
|
28
28
|
export declare const TABLE_CONTROL = 11;
|
|
29
|
-
export declare const TABLE_NUMBER_COLUMN =
|
|
29
|
+
export declare const TABLE_NUMBER_COLUMN = 45;
|
|
30
30
|
export declare const TableWithStickyRowClass = "the-table-with-sticky-row";
|
|
31
31
|
export interface TheTableColumn {
|
|
32
32
|
width: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TableElement } from '../../../custom-types';
|
|
1
2
|
/**
|
|
2
3
|
* 获取标题行网格列宽值
|
|
3
4
|
* @param editor
|
|
@@ -7,3 +8,32 @@
|
|
|
7
8
|
*/
|
|
8
9
|
export declare const getGridColumns: (headerRow: HTMLElement, cellsWidth: number[]) => string;
|
|
9
10
|
export declare const getColumnsWidth: (cellRow: HTMLElement, isColgroup?: boolean) => any[];
|
|
11
|
+
/**
|
|
12
|
+
* 计算表格列宽
|
|
13
|
+
* @param isReadonly
|
|
14
|
+
* @param element
|
|
15
|
+
* @param tableWidth
|
|
16
|
+
* @param mode
|
|
17
|
+
* @returns number[]
|
|
18
|
+
*/
|
|
19
|
+
export declare const calcColumnGroups: (isReadonly: boolean, element: TableElement, tableWidth: number, mode: string) => import("../table.types").TheTableColumn[];
|
|
20
|
+
/**
|
|
21
|
+
* 计算表格列宽
|
|
22
|
+
* @param element
|
|
23
|
+
* @param tableWidth
|
|
24
|
+
* @param minWidthPx
|
|
25
|
+
* @returns number[]
|
|
26
|
+
*/
|
|
27
|
+
export declare const calcColumnWidth: (element: TableElement, tableWidth: number, minWidthPx: number) => {
|
|
28
|
+
width: number;
|
|
29
|
+
}[];
|
|
30
|
+
/**
|
|
31
|
+
* 打印模式下,按照原宽度比例基于当前表格宽度计算列宽
|
|
32
|
+
* 1. 所有列的最小列宽总和大于表格宽度时,所有列返回最小宽度
|
|
33
|
+
* @param element
|
|
34
|
+
* @param minWidthPx
|
|
35
|
+
* @returns number[]
|
|
36
|
+
*/
|
|
37
|
+
export declare const calcPrintColumnWidth: (element: TableElement, minWidthPx: number) => {
|
|
38
|
+
width: number;
|
|
39
|
+
}[];
|