@guiexpert/table 1.0.13 → 1.0.15

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.
@@ -3,6 +3,7 @@ import { ColumnDefIf } from "../tablemodel/column/column-def.if";
3
3
  import { CellRendererIf } from "../../renderer/cell-render.if";
4
4
  import { AreaObjectMapType } from "./area-map.type";
5
5
  export declare class CheckboxColumnDef implements ColumnDefIf {
6
+ type: string;
6
7
  property: string;
7
8
  headerLabel: string;
8
9
  width: SizeIf;
@@ -1,9 +1,9 @@
1
- import { TreeRow } from "./tree-row";
2
1
  export interface TreeRowIf<T> {
2
+ type?: 'TreeRow' | '';
3
3
  data: T;
4
4
  expanded: boolean;
5
- children: TreeRow<T>[] | undefined;
6
- parent: TreeRow<T> | undefined;
5
+ children: TreeRowIf<T>[] | undefined;
6
+ parent: TreeRowIf<T> | undefined;
7
7
  deep: number;
8
8
  checked: boolean;
9
9
  keep: boolean;
@@ -7,5 +7,6 @@ export declare class TreeRow<T> implements TreeRowIf<T> {
7
7
  deep: number;
8
8
  checked: boolean;
9
9
  keep: boolean;
10
+ type: 'TreeRow' | '';
10
11
  constructor(data: T, expanded: boolean, children: TreeRowIf<T>[] | undefined, parent: TreeRowIf<T> | undefined, deep?: number, checked?: boolean, keep?: boolean);
11
12
  }
@@ -5,33 +5,35 @@ import { ColumnDefIf } from "../column/column-def.if";
5
5
  import { FilterFunction } from "../../common/filter-function";
6
6
  import { SorterService } from "../../../service/sorter.service";
7
7
  import { SortItem } from "../../common/sort-item";
8
+ import { TreeRowIf } from "../../common/tree-row-if";
8
9
  export declare class AreaModelTree<S> extends AbstractAreaModel<TreeRow<S>> {
9
10
  areaIdent: AreaIdent;
10
- readonly rows: TreeRow<S>[];
11
+ readonly rows: TreeRowIf<S>[];
11
12
  defaultRowHeight: number;
12
13
  protected columnDefs: ColumnDefIf[];
14
+ type: string;
13
15
  protected readonly properties: string[];
14
16
  protected sorterService: SorterService;
15
17
  private readonly service;
16
18
  private filteredFlattenRows;
17
19
  private flattenRows;
18
20
  private lastPredictFn?;
19
- constructor(areaIdent: AreaIdent, rows: TreeRow<S>[], defaultRowHeight: number, columnDefs?: ColumnDefIf[]);
21
+ constructor(areaIdent: AreaIdent, rows: TreeRowIf<S>[], defaultRowHeight: number, columnDefs?: ColumnDefIf[]);
20
22
  changeColumnOrder(sourceColumnIndex: number, targetColumnIndex: number): void;
21
23
  recalcVisibleTreeRows(): void;
22
- getFilteredFlattenRows(): TreeRow<S>[];
24
+ getFilteredFlattenRows(): TreeRowIf<S>[];
23
25
  getRowCount(): number;
24
26
  getValueAt(rowIndex: number, columnIndex: number): any;
25
27
  getRowHeight(_rowIndex: number): number;
26
28
  getCustomClassesAt(rowIndex: number, _columnIndex: number): string[];
27
- getRowByIndex(idx: number): TreeRow<S> | undefined;
29
+ getRowByIndex(idx: number): TreeRowIf<S> | undefined;
28
30
  getValueByT(t: S, property: string): any;
29
31
  externalFilterChanged<S>(predictFn: FilterFunction<S>): void;
30
32
  doSort(sortItems: SortItem[]): boolean;
31
33
  toggleExpandCollapseAll(expanded: boolean): void;
32
- setAllParentsOk(item: TreeRow<any>): boolean;
34
+ setAllParentsOk(item: TreeRowIf<any>): boolean;
33
35
  setValue(rowIndex: number, columnIndex: number, value: any): boolean;
34
- protected genericTreeTableSortComparator(property: string, f: number): (a: TreeRow<S>, b: TreeRow<S>) => number;
36
+ protected genericTreeTableSortComparator(property: string, f: number): (a: TreeRowIf<S>, b: TreeRowIf<S>) => number;
35
37
  private expandAllRecursive;
36
38
  private doFiltering;
37
39
  private getPropertyValue;
@@ -1,6 +1,6 @@
1
- import { TreeRow } from "../data/common/tree-row";
1
+ import { TreeRowIf } from "../data/common/tree-row-if";
2
2
  export declare class TreeFactory {
3
- static buildTreeRows<T>(data: T[], childrenProperty?: string, deepMaxLimit?: number): TreeRow<T>[];
4
- static buildTreeRow<T>(data: T, childrenProperty?: string, parent?: TreeRow<T>, //, false , '0', '0'),
5
- deep?: number, deepMaxLimit?: number): TreeRow<T>;
3
+ static buildTreeRows<T>(data: T[], childrenProperty?: string, deepMaxLimit?: number): TreeRowIf<T>[];
4
+ static buildTreeRow<T>(data: T, childrenProperty?: string, parent?: TreeRowIf<T>, //, false , '0', '0'),
5
+ deep?: number, deepMaxLimit?: number): TreeRowIf<T>;
6
6
  }
@@ -0,0 +1,3 @@
1
+ export declare function isTreeRow(row: any): boolean;
2
+ export declare function isAreaModelTree(model: any): boolean;
3
+ export declare function isCheckboxColumnDef(o: any): boolean;
@@ -1,5 +1,5 @@
1
- import { TreeRow } from "../data/common/tree-row";
1
+ import { TreeRowIf } from "../data/common/tree-row-if";
2
2
  export declare class TreeRowService {
3
- flattenTree<T>(rows: TreeRow<T>[], ret?: TreeRow<T>[]): TreeRow<T>[];
4
- isVisible(row: TreeRow<any>): boolean;
3
+ flattenTree<T>(rows: TreeRowIf<T>[], ret?: TreeRowIf<T>[]): TreeRowIf<T>[];
4
+ isVisible(row: TreeRowIf<any>): boolean;
5
5
  }
@@ -30,11 +30,12 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
30
30
  private mouseStartColumnIndex;
31
31
  private dragFrom;
32
32
  private dragTo;
33
+ static create(hostElement: HTMLDivElement, tableModel: TableModelIf, tableOptions?: TableOptionsIf, eventListener?: EventListenerIf, domService?: DomServiceIf): TableScope;
33
34
  constructor(hostElement: HTMLDivElement, tableModel: TableModelIf, domService: DomServiceIf, tableOptions: TableOptionsIf, eventListener: EventListenerIf);
34
35
  onActionTriggered(actionId: ActionId): boolean;
35
36
  updateModelValueAfterEdit(areaIdent: AreaIdent, rowIndex: number, columnIndex: number, value: string): void;
36
37
  getApi(): TableApi;
37
- firstInit(): void;
38
+ firstInit(): TableScope;
38
39
  createGeMouseEvent(mouseEvent: MouseEvent): GeMouseEvent;
39
40
  onMouseDown(mouseEvent: GeMouseEvent): void;
40
41
  mouseDraggingOnFrame(mouseEvent: GeMouseEvent): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiexpert/table",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
@@ -11,7 +11,11 @@
11
11
  "entryFile": "src/index.ts"
12
12
  },
13
13
  "scripts": {
14
- "npm-pub:svelte-table": "npm publish --access public"
14
+ "typedoc:json": "npx typedoc --json ../../apps/table-website/src/assets/json/doctype.json src/index.ts",
15
+ "typedoc:docs-html": "npx typedoc --out ../../apps/table-website/src/assets/docs src/index.ts",
16
+ "typedoc:docs-html-custom-css": "npx typedoc --customCss ./doc.css --out ../../apps/table-website/src/assets/docs src/index.ts",
17
+ "typedoc:docs-md": "npx typedoc --plugin typedoc-plugin-markdown --out ../../apps/table-website/src/assets/docsmd src/index.ts",
18
+ "npm-pub:table": "npm publish --access public"
15
19
  },
16
20
  "exports": {
17
21
  ".": {