ontimize-web-ngx 15.5.7 → 15.5.9
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/lib/components/o-service-base-component.class.mjs +10 -1
- package/esm2020/lib/components/tree/o-tree-dao.service.mjs +32 -1
- package/esm2020/lib/components/tree/o-tree.component.mjs +236 -33
- package/esm2020/lib/components/tree/o-tree.datasource.mjs +29 -15
- package/esm2020/lib/components/tree/o-tree.module.mjs +1 -1
- package/esm2020/lib/components/tree/tree-node/tree-node.component.mjs +2 -20
- package/esm2020/lib/i18n/i18n.mjs +7 -4
- package/esm2020/lib/services/state/index.mjs +3 -1
- package/esm2020/lib/services/state/o-tree-component-state.class.mjs +1 -1
- package/esm2020/lib/services/state/o-tree-component-state.service.mjs +54 -14
- package/esm2020/lib/types/tree-flat-node.type.mjs +1 -1
- package/fesm2015/ontimize-web-ngx.mjs +392 -61
- package/fesm2015/ontimize-web-ngx.mjs.map +1 -1
- package/fesm2020/ontimize-web-ngx.mjs +388 -61
- package/fesm2020/ontimize-web-ngx.mjs.map +1 -1
- package/lib/components/o-service-base-component.class.d.ts +3 -0
- package/lib/components/tree/o-tree-dao.service.d.ts +4 -2
- package/lib/components/tree/o-tree.component.d.ts +30 -3
- package/lib/components/tree/o-tree.datasource.d.ts +3 -0
- package/lib/components/tree/tree-node/tree-node.component.d.ts +0 -4
- package/lib/i18n/i18n.d.ts +3 -0
- package/lib/services/state/index.d.ts +2 -0
- package/lib/services/state/o-tree-component-state.class.d.ts +3 -0
- package/lib/services/state/o-tree-component-state.service.d.ts +4 -1
- package/lib/types/tree-flat-node.type.d.ts +5 -1
- package/package.json +1 -1
|
@@ -101,6 +101,9 @@ export declare abstract class AbstractOServiceBaseComponent<T extends AbstractCo
|
|
|
101
101
|
getComponentFilter(existingFilter?: any): any;
|
|
102
102
|
getSqlTypes(): any;
|
|
103
103
|
getParentKeysValues(): {};
|
|
104
|
+
getForm(): OFormComponent;
|
|
105
|
+
getParentKeysEquivalence(): {};
|
|
106
|
+
getDataService(): any;
|
|
104
107
|
protected updateStateStorage(): void;
|
|
105
108
|
protected setData(data: any, sqlTypes?: any, replace?: boolean): void;
|
|
106
109
|
protected registerLocalStorageServiceRouteChange(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
2
|
import { OTreeFlatNode } from '../../types/tree-flat-node.type';
|
|
3
|
+
import { ServiceResponse } from '../../interfaces/service-response.interface';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class OTreeDao {
|
|
5
6
|
protected _isLoadingResults: boolean;
|
|
@@ -9,10 +10,11 @@ export declare class OTreeDao {
|
|
|
9
10
|
get data(): any[];
|
|
10
11
|
rootLevelNodes: OTreeFlatNode[];
|
|
11
12
|
flatNodeMap: Map<OTreeFlatNode, any>;
|
|
12
|
-
setDataArray(data: Array<any>):
|
|
13
|
+
setDataArray(data: Array<any>): Observable<any[]>;
|
|
13
14
|
get isLoadingResults(): boolean;
|
|
14
15
|
set isLoadingResults(val: boolean);
|
|
15
16
|
protected cleanTimer(): void;
|
|
17
|
+
queryNodeChildren(flatNode: OTreeFlatNode, recursive: boolean): Observable<ServiceResponse>;
|
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<OTreeDao, never>;
|
|
17
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<OTreeDao>;
|
|
18
20
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
2
2
|
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
3
3
|
import { AfterViewInit, ElementRef, EventEmitter, Injector, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
4
|
-
import { Subscription } from 'rxjs';
|
|
4
|
+
import { Observable, Subscription } from 'rxjs';
|
|
5
|
+
import { ServiceResponse } from '../../interfaces/service-response.interface';
|
|
5
6
|
import { OTreeComponentStateService } from '../../services/state/o-tree-component-state.service';
|
|
6
|
-
import { OPermissions } from '../../types';
|
|
7
7
|
import { OTreePermissions } from '../../types/o-tree-permissions.type';
|
|
8
8
|
import { OTreeFlatNode } from '../../types/tree-flat-node.type';
|
|
9
9
|
import { OFormComponent } from '../form/o-form.component';
|
|
@@ -11,6 +11,11 @@ import { AbstractOServiceComponent } from '../o-service-component.class';
|
|
|
11
11
|
import { OTreeDao } from './o-tree-dao.service';
|
|
12
12
|
import { OTreeDataSource } from './o-tree.datasource';
|
|
13
13
|
import { OTreeNodeComponent } from './tree-node/tree-node.component';
|
|
14
|
+
import { OPermissions } from '../../types/o-permissions.type';
|
|
15
|
+
import { SQLOrder } from '../../types/sql-order.type';
|
|
16
|
+
import { OQueryDataArgs } from '../../types/query-data-args.type';
|
|
17
|
+
import { MatPaginator } from '@angular/material/paginator';
|
|
18
|
+
import { OTreeComponentStateClass } from '../../services/state/o-tree-component-state.class';
|
|
14
19
|
import * as i0 from "@angular/core";
|
|
15
20
|
export declare const DEFAULT_INPUTS_O_TREE: string[];
|
|
16
21
|
export declare const DEFAULT_OUTPUTS_O_TREE: string[];
|
|
@@ -24,6 +29,9 @@ export declare class OTreeComponent extends AbstractOServiceComponent<OTreeCompo
|
|
|
24
29
|
getComponentFilter(existingFilter?: any): any;
|
|
25
30
|
hasChild: (_: number, _nodeData: OTreeFlatNode) => boolean;
|
|
26
31
|
hasNoContent: (_: number, _nodeData: OTreeFlatNode) => boolean;
|
|
32
|
+
hasLoadMore: (node: OTreeFlatNode) => boolean;
|
|
33
|
+
onLoadMore(event: Event, node: OTreeFlatNode): void;
|
|
34
|
+
isLastChildAndHasMore(node: OTreeFlatNode): boolean;
|
|
27
35
|
dataSource: OTreeDataSource;
|
|
28
36
|
refreshButton: boolean;
|
|
29
37
|
deleteButton: boolean;
|
|
@@ -42,7 +50,6 @@ export declare class OTreeComponent extends AbstractOServiceComponent<OTreeCompo
|
|
|
42
50
|
childreNodes: OTreeFlatNode[];
|
|
43
51
|
nodesArray: OTreeFlatNode[];
|
|
44
52
|
ancestors: any[];
|
|
45
|
-
checklistSelection: SelectionModel<OTreeFlatNode>;
|
|
46
53
|
onNodeSelected: EventEmitter<any>;
|
|
47
54
|
onNodeExpanded: EventEmitter<any>;
|
|
48
55
|
onNodeCollapsed: EventEmitter<any>;
|
|
@@ -55,6 +62,7 @@ export declare class OTreeComponent extends AbstractOServiceComponent<OTreeCompo
|
|
|
55
62
|
parentNodeTemplate: TemplateRef<any>;
|
|
56
63
|
treeFlattener: any;
|
|
57
64
|
treeControl: FlatTreeControl<OTreeFlatNode, OTreeFlatNode>;
|
|
65
|
+
matpaginator: MatPaginator;
|
|
58
66
|
set nodeTemplate(value: TemplateRef<any>);
|
|
59
67
|
treeNode: OTreeNodeComponent;
|
|
60
68
|
protected permissions: OTreePermissions;
|
|
@@ -63,12 +71,14 @@ export declare class OTreeComponent extends AbstractOServiceComponent<OTreeCompo
|
|
|
63
71
|
enabledDeleteButton: boolean;
|
|
64
72
|
protected subscription: Subscription;
|
|
65
73
|
route: string;
|
|
74
|
+
sortColumnArray: SQLOrder[];
|
|
66
75
|
get showTreeMenuButton(): boolean;
|
|
67
76
|
constructor(injector: Injector, elRef: ElementRef, form: OFormComponent);
|
|
68
77
|
ngOnInit(): void;
|
|
69
78
|
initialize(): void;
|
|
70
79
|
protected initializeDao(): void;
|
|
71
80
|
initializeParams(): void;
|
|
81
|
+
get state(): OTreeComponentStateClass;
|
|
72
82
|
ngAfterViewInit(): void;
|
|
73
83
|
ngOnDestroy(): void;
|
|
74
84
|
registerTreeNode(oTreeNode: OTreeNodeComponent): void;
|
|
@@ -102,6 +112,23 @@ export declare class OTreeComponent extends AbstractOServiceComponent<OTreeCompo
|
|
|
102
112
|
protected navigateToViewDetail(node: OTreeFlatNode): void;
|
|
103
113
|
isSelectedNode(node: OTreeFlatNode): boolean;
|
|
104
114
|
onItemDetailClick(node: OTreeFlatNode): void;
|
|
115
|
+
get selection(): SelectionModel<any>;
|
|
116
|
+
getSelectedItems(): any[];
|
|
117
|
+
parseSortColumn(): void;
|
|
118
|
+
getQueryArguments(filter: object, ovrrArgs?: OQueryDataArgs): any[];
|
|
119
|
+
private shouldBeRoot;
|
|
120
|
+
protected createTreeNode(flatNode: OTreeFlatNode): any;
|
|
121
|
+
protected getFlatNodeIdentifier(flatNode: OTreeFlatNode): string;
|
|
122
|
+
private addChildToParent;
|
|
123
|
+
addParentToRootIfNoGrandparentSelected(parent: OTreeFlatNode, parentKey: string, selectedKeys: Set<string>, nodeMap: Map<string, any>, rootNodes: any[]): void;
|
|
124
|
+
private ensureNodeInMap;
|
|
125
|
+
private getSelectedNodeKeys;
|
|
126
|
+
getSelectedFlatNodes(): OTreeFlatNode[];
|
|
127
|
+
getParentNode(node: any): OTreeFlatNode;
|
|
128
|
+
reloadData(clearSelectedItems?: boolean): void;
|
|
129
|
+
getLogicalLevel(node: OTreeFlatNode): number;
|
|
130
|
+
hasFakeRoot(): boolean;
|
|
131
|
+
childQueryData(flatNode: OTreeFlatNode): Observable<ServiceResponse> | Observable<any>;
|
|
105
132
|
static ɵfac: i0.ɵɵFactoryDeclaration<OTreeComponent, [null, null, { optional: true; }]>;
|
|
106
133
|
static ɵcmp: i0.ɵɵComponentDeclaration<OTreeComponent, "o-tree", never, { "oattr": "attr"; "service": "service"; "entity": "entity"; "columns": "columns"; "keys": "keys"; "parentKeys": "parent-keys"; "queryMethod": "query-method"; "insertButton": "insert-button"; "refreshButton": "refresh-button"; "deleteButton": "delete-button"; "visibleColumns": "visible-columns"; "selectAllCheckbox": "select-all-checkbox"; "separator": "separator"; "parentColumn": "parent-column"; "sortColumn": "sort-column"; "selectAllCheckboxVisible": "select-all-checkbox-visible"; "filterCaseSensitive": "filter-case-sensitive"; "quickFilter": "quick-filter"; "quickFilterPlaceholder": "quick-filter-placeholder"; "quickFilterColumns": "quick-filter-columns"; "detailMode": "detail-mode"; "detailFormRoute": "detail-form-route"; "showButtonsText": "show-buttons-text"; "rootTitle": "root-title"; "recursive": "recursive"; "route": "route"; }, { "onNodeSelected": "onNodeSelected"; "onNodeExpanded": "onNodeExpanded"; "onNodeCollapsed": "onNodeCollapsed"; "onLoadNextLevel": "onLoadNextLevel"; "onDataLoaded": "onDataLoaded"; "onNodeClick": "onNodeClick"; }, ["leafNodeTemplate", "parentNodeTemplate", "nodeTemplate", "treeNode"], ["[o-tree-button]"], false, never>;
|
|
107
134
|
}
|
|
@@ -5,6 +5,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
5
5
|
import { OTreeDao } from './o-tree-dao.service';
|
|
6
6
|
import { OTreeComponent } from './o-tree.component';
|
|
7
7
|
import { OTreeFlatNode } from '../../types/tree-flat-node.type';
|
|
8
|
+
import { MatPaginator } from '@angular/material/paginator';
|
|
8
9
|
export declare class OTreeDataSource implements DataSource<OTreeFlatNode> {
|
|
9
10
|
private oTree;
|
|
10
11
|
private _treeControl;
|
|
@@ -12,6 +13,8 @@ export declare class OTreeDataSource implements DataSource<OTreeFlatNode> {
|
|
|
12
13
|
dataChange: BehaviorSubject<OTreeFlatNode[]>;
|
|
13
14
|
translateService: any;
|
|
14
15
|
protected _database: OTreeDao;
|
|
16
|
+
resultsLength: number;
|
|
17
|
+
protected _paginator: MatPaginator;
|
|
15
18
|
get data(): OTreeFlatNode[];
|
|
16
19
|
set data(value: OTreeFlatNode[]);
|
|
17
20
|
constructor(oTree: OTreeComponent, _treeControl: FlatTreeControl<OTreeFlatNode>, injector: Injector);
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, Injector, OnInit } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs/internal/Observable';
|
|
3
|
-
import { ServiceResponse } from '../../../interfaces/service-response.interface';
|
|
4
2
|
import { OFormComponent } from '../../form';
|
|
5
3
|
import { OTreeComponent } from '../o-tree.component';
|
|
6
|
-
import { OTreeFlatNode } from '../../../types/tree-flat-node.type';
|
|
7
4
|
import * as i0 from "@angular/core";
|
|
8
5
|
export declare class OTreeNodeComponent extends OTreeComponent implements OnInit, AfterViewInit {
|
|
9
6
|
injector: Injector;
|
|
@@ -12,7 +9,6 @@ export declare class OTreeNodeComponent extends OTreeComponent implements OnInit
|
|
|
12
9
|
constructor(injector: Injector, elementRef: ElementRef, form: OFormComponent, parentComponent: OTreeComponent, parentNode: OTreeNodeComponent);
|
|
13
10
|
ngOnInit(): void;
|
|
14
11
|
ngAfterViewInit(): void;
|
|
15
|
-
childQueryData(node: OTreeFlatNode): Observable<ServiceResponse> | Observable<any>;
|
|
16
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<OTreeNodeComponent, [null, null, { optional: true; }, { optional: true; }, { optional: true; skipSelf: true; }]>;
|
|
17
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<OTreeNodeComponent, "o-tree-node", never, {}, {}, never, never, false, never>;
|
|
18
14
|
}
|
package/lib/i18n/i18n.d.ts
CHANGED
|
@@ -308,6 +308,7 @@ export declare const MAP: {
|
|
|
308
308
|
'EXPORT.DIALOG.EXPORT_BUTTON': string;
|
|
309
309
|
'EXPORT.DIALOG.ADVANCED_OPTIONS': string;
|
|
310
310
|
'EXPORT.DIALOG.FILE_NAME.PLACEHOLDER': string;
|
|
311
|
+
'O_TREE.LOAD_MORE': string;
|
|
311
312
|
};
|
|
312
313
|
es: {
|
|
313
314
|
LANGUAGE: string;
|
|
@@ -609,6 +610,7 @@ export declare const MAP: {
|
|
|
609
610
|
'EXPORT.DIALOG.FILE_NAME.PLACEHOLDER': string;
|
|
610
611
|
'DATERANGE.PLACEHOLDER_STARTDATE': string;
|
|
611
612
|
'DATERANGE.PLACEHOLDER_ENDDATE': string;
|
|
613
|
+
'O_TREE.LOAD_MORE': string;
|
|
612
614
|
};
|
|
613
615
|
pt: {
|
|
614
616
|
LANGUAGE: string;
|
|
@@ -889,5 +891,6 @@ export declare const MAP: {
|
|
|
889
891
|
'REPORT.COLUMN.FALSEVALUE': string;
|
|
890
892
|
'DATERANGE.PLACEHOLDER_STARTDATE': string;
|
|
891
893
|
'DATERANGE.PLACEHOLDER_ENDDATE': string;
|
|
894
|
+
'O_TREE.LOAD_MORE': string;
|
|
892
895
|
};
|
|
893
896
|
};
|
|
@@ -8,3 +8,5 @@ export * from './o-list-component-state.class';
|
|
|
8
8
|
export * from './o-list-component-state.service';
|
|
9
9
|
export * from './o-table-component-state.service';
|
|
10
10
|
export * from './o-table-component-state.class';
|
|
11
|
+
export * from './o-tree-component-state.class';
|
|
12
|
+
export * from './o-tree-component-state.service';
|
|
@@ -6,8 +6,11 @@ export declare class OTreeComponentStateService extends AbstractComponentStateSe
|
|
|
6
6
|
initialize(component: OTreeComponent): void;
|
|
7
7
|
initializeState(state: OTreeComponentStateClass): void;
|
|
8
8
|
getDataToStore(): any;
|
|
9
|
-
protected
|
|
9
|
+
protected getTreePropertiesToStore(properties: string[]): any;
|
|
10
10
|
protected getTreePropertyToStore(property: string): any;
|
|
11
|
+
getQuickFilterState(): any;
|
|
12
|
+
protected getPageState(): any;
|
|
13
|
+
protected getSelectionState(): any;
|
|
11
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<OTreeComponentStateService, never>;
|
|
12
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<OTreeComponentStateService>;
|
|
13
16
|
}
|
|
@@ -7,8 +7,12 @@ export type OTreeFlatNode = {
|
|
|
7
7
|
rootNode?: boolean;
|
|
8
8
|
expandable: boolean;
|
|
9
9
|
node?: OTreeComponent | OTreeNodeComponent;
|
|
10
|
-
|
|
10
|
+
childNode?: OTreeNodeComponent;
|
|
11
11
|
data: any;
|
|
12
12
|
isLoading?: boolean;
|
|
13
13
|
route?: string;
|
|
14
|
+
hasMore?: boolean;
|
|
15
|
+
startIndex?: number;
|
|
16
|
+
offset?: number;
|
|
17
|
+
totalQueryRecordsNumber?: number;
|
|
14
18
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ontimize-web-ngx",
|
|
3
3
|
"homepage": "https://github.com/OntimizeWeb/ontimize-web-ngx#readme",
|
|
4
|
-
"version": "15.5.
|
|
4
|
+
"version": "15.5.9",
|
|
5
5
|
"description": "Ontimize Web framework using Angular 15",
|
|
6
6
|
"bugs": "https://github.com/OntimizeWeb/ontimize-web-ngx/issues",
|
|
7
7
|
"author": "Imatia S.L.",
|