@smartbit4all/ng-client 1.2.1 → 2.0.1
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/smart-client/smart-component-api-client.mjs +2 -2
- package/esm2020/lib/smart-ng-client.module.mjs +15 -4
- package/esm2020/lib/smart-tree/projects.mjs +9 -0
- package/esm2020/lib/smart-tree/smarttree-generic.service.mjs +292 -0
- package/esm2020/lib/smart-tree/smarttree.component.mjs +181 -0
- package/esm2020/lib/smart-tree/smarttree.model.mjs +7 -0
- package/esm2020/lib/smart-tree/smarttree.module.mjs +54 -0
- package/esm2020/lib/smart-tree/smarttree.node.model.mjs +6 -0
- package/esm2020/lib/smart-tree/smarttree.service.interface.mjs +2 -0
- package/esm2020/lib/smart-tree/smarttree.service.mjs +47 -0
- package/esm2020/lib/smart-tree/tree-api/api/tree.service.mjs +644 -0
- package/esm2020/lib/smart-tree/tree-api/configuration.mjs +91 -0
- package/esm2020/lib/smart-tree/tree-api/encoder.mjs +19 -0
- package/esm2020/lib/smart-tree/tree-api/param.mjs +2 -0
- package/esm2020/lib/smart-tree/tree-api/variables.mjs +9 -0
- package/esm2020/projects.mjs +2 -1
- package/fesm2015/smartbit4all-ng-client.mjs +1421 -70
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +1383 -70
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +1 -1
- package/lib/smart-ng-client.module.d.ts +2 -1
- package/lib/smart-tree/projects.d.ts +5 -0
- package/lib/smart-tree/smarttree-generic.service.d.ts +50 -0
- package/lib/smart-tree/smarttree.component.d.ts +42 -0
- package/lib/smart-tree/smarttree.model.d.ts +41 -0
- package/lib/smart-tree/smarttree.module.d.ts +15 -0
- package/lib/smart-tree/smarttree.node.model.d.ts +13 -0
- package/lib/smart-tree/smarttree.service.d.ts +24 -0
- package/lib/smart-tree/smarttree.service.interface.d.ts +43 -0
- package/lib/smart-tree/tree-api/api/tree.service.d.ts +177 -0
- package/lib/smart-tree/tree-api/configuration.d.ts +104 -0
- package/lib/smart-tree/tree-api/encoder.d.ts +11 -0
- package/lib/smart-tree/tree-api/param.d.ts +37 -0
- package/lib/smart-tree/tree-api/variables.d.ts +8 -0
- package/package.json +1 -1
- package/projects.d.ts +1 -0
- package/smartbit4all-ng-client-2.0.1.tgz +0 -0
- package/src/lib/smart-tree/tree-api/README.md +226 -0
- package/smartbit4all-ng-client-1.2.1.tgz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { SmartForm, SmartformComponent } from '@smartbit4all/form';
|
|
3
3
|
import { GridOptions, SmartGrid, SmartGridComponent } from '@smartbit4all/grid';
|
|
4
|
-
import { SmarttreeGenericService } from '
|
|
4
|
+
import { SmarttreeGenericService } from '../smart-tree/projects';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import { ComponentModel, SmartTranslateService, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UseUiAction } from '../view-context/projects';
|
|
7
7
|
import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
|
|
@@ -6,8 +6,9 @@ import * as i4 from "./session/smart-session.module";
|
|
|
6
6
|
import * as i5 from "./view-context/smart-view-context.module";
|
|
7
7
|
import * as i6 from "@smartbit4all/form";
|
|
8
8
|
import * as i7 from "@smartbit4all/expandable-section";
|
|
9
|
+
import * as i8 from "./smart-tree/smarttree.module";
|
|
9
10
|
export declare class SmartNgClientModule {
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartNgClientModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SmartNgClientModule, [typeof i1.SmartFileUploaderComponent], [typeof i2.BrowserModule, typeof i3.MatCommonModule, typeof i4.SmartSessionModule, typeof i5.SmartViewContextModule, typeof i6.SmartformModule, typeof i7.SmartExpandableSectionModule], [typeof i4.SmartSessionModule, typeof i5.SmartViewContextModule, typeof i1.SmartFileUploaderComponent]>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SmartNgClientModule, [typeof i1.SmartFileUploaderComponent], [typeof i2.BrowserModule, typeof i3.MatCommonModule, typeof i4.SmartSessionModule, typeof i5.SmartViewContextModule, typeof i6.SmartformModule, typeof i7.SmartExpandableSectionModule], [typeof i4.SmartSessionModule, typeof i5.SmartViewContextModule, typeof i1.SmartFileUploaderComponent, typeof i8.SmarttreeModule]>;
|
|
12
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<SmartNgClientModule>;
|
|
13
14
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptor, UiActionRequest, UiActionSpecificDemandResponse, UseUiAction } from '../view-context/projects';
|
|
3
|
+
import { SmartTreeNode } from './smarttree.model';
|
|
4
|
+
import { SmarttreeService } from './smarttree.service';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export interface SmarttreeConfiguration {
|
|
8
|
+
treeid: string;
|
|
9
|
+
viewContextName: string;
|
|
10
|
+
pageName: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class SmarttreeGenericService extends SmarttreeService<SmartTreeNode[]> implements UseUiAction {
|
|
13
|
+
protected pageName: string;
|
|
14
|
+
protected treeId: string;
|
|
15
|
+
submit: Subject<void>;
|
|
16
|
+
reSubscribeToChange: Subject<void>;
|
|
17
|
+
uiActionDescriptors: Map<string, UiActionDescriptor>;
|
|
18
|
+
selectedNode?: SmartTreeNode;
|
|
19
|
+
viewContextName: string;
|
|
20
|
+
protected viewContext: SmartViewContextService;
|
|
21
|
+
private service;
|
|
22
|
+
private uiActionDescriptorService;
|
|
23
|
+
private uiActionService;
|
|
24
|
+
constructor(inject: Injector, pageName: string, treeId: string);
|
|
25
|
+
constructUiActionModels(uiActions: UiAction[]): void;
|
|
26
|
+
configureTree(configuration: SmarttreeConfiguration): void;
|
|
27
|
+
initialize(): Promise<void>;
|
|
28
|
+
downloadTree(): Promise<SmartTreeNode[]>;
|
|
29
|
+
downloadChildren(parentNode: SmartTreeNode): Promise<SmartTreeNode[]>;
|
|
30
|
+
onTreeNodeOpen(treeNode: SmartTreeNode): Promise<void>;
|
|
31
|
+
onTreeNodeClick(treeNode: SmartTreeNode): void;
|
|
32
|
+
selectFolder(folderUri: string, treeNode?: SmartTreeNode): Promise<void>;
|
|
33
|
+
updateTreeOnTheFly(): Promise<void>;
|
|
34
|
+
syncTree(): Promise<void>;
|
|
35
|
+
deepSearchTreeNode(identifier: string, nodes: SmartTreeNode[]): SmartTreeNode | undefined;
|
|
36
|
+
findSelected(nodes: SmartTreeNode[]): void;
|
|
37
|
+
createButtonsForTreeNodes(nodes: SmartTreeNode[]): SmartTreeNode[];
|
|
38
|
+
doAction(args: any[]): Promise<void>;
|
|
39
|
+
protected getAllNodes(nodes: SmartTreeNode[]): SmartTreeNode[];
|
|
40
|
+
protected cacheActionDesciptors(nodes: SmartTreeNode[]): Promise<void>;
|
|
41
|
+
getLabelByAction(action: UiAction): string;
|
|
42
|
+
getAdditionalParams(uiAction: UiAction): UiActionAdditionalParams;
|
|
43
|
+
getModel(): {};
|
|
44
|
+
performUiActionRequest(uiActionRequest: UiActionRequest): Promise<any>;
|
|
45
|
+
performNodeUiActionRequest(uiActionRequest: UiActionRequest): Promise<any>;
|
|
46
|
+
performMainUiActionRequest(uiActionRequest: UiActionRequest): Promise<any>;
|
|
47
|
+
handleSpecificDemandsAsynchronously(uiAction: UiAction, uiActionRequest: UiActionRequest): Promise<UiActionSpecificDemandResponse>;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SmarttreeGenericService, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SmarttreeGenericService>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { NestedTreeControl } from '@angular/cdk/tree';
|
|
2
|
+
import { ChangeDetectorRef, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
3
|
+
import { MatMenuTrigger } from '@angular/material/menu';
|
|
4
|
+
import { MatTreeNestedDataSource } from '@angular/material/tree';
|
|
5
|
+
import { SmartTreeModel, SmartTreeNode, SmartTreeNodeButton, SmartTreeNodeButtonType } from './smarttree.model';
|
|
6
|
+
import { TreeStyle } from './smarttree.node.model';
|
|
7
|
+
import { SmarttreeService } from './smarttree.service';
|
|
8
|
+
import { UiActionModel } from '../view-context/projects';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class SmartTreeComponent implements OnInit, OnDestroy {
|
|
11
|
+
private cdr;
|
|
12
|
+
private _destroy$;
|
|
13
|
+
trigger: QueryList<MatMenuTrigger>;
|
|
14
|
+
tree: any;
|
|
15
|
+
treeControl: NestedTreeControl<SmartTreeNode, SmartTreeNode>;
|
|
16
|
+
dataSource: MatTreeNestedDataSource<SmartTreeNode>;
|
|
17
|
+
tempActiveNode?: SmartTreeNode;
|
|
18
|
+
treeData?: SmartTreeModel;
|
|
19
|
+
treeStyle?: TreeStyle;
|
|
20
|
+
treeService: SmarttreeService<any>;
|
|
21
|
+
smartTreeNodeButtonType: typeof SmartTreeNodeButtonType;
|
|
22
|
+
errorMessage?: string;
|
|
23
|
+
uiActionModels: UiActionModel[];
|
|
24
|
+
constructor(cdr: ChangeDetectorRef);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
getIfExpanded(node: SmartTreeNode): boolean;
|
|
28
|
+
expandTreeNodes(): void;
|
|
29
|
+
expandTreeNodesDeeply(nodes: SmartTreeNode[]): void;
|
|
30
|
+
onNodeClick(event: any, node: SmartTreeNode): void;
|
|
31
|
+
onOpenNode(event: any, node: SmartTreeNode): void;
|
|
32
|
+
hasChild: (_: number, node: SmartTreeNode) => boolean;
|
|
33
|
+
getNodeStyle(node: SmartTreeNode): {};
|
|
34
|
+
getNodePadding(node: SmartTreeNode): {};
|
|
35
|
+
customButtonClicked(event: any, button: SmartTreeNodeButton, close?: boolean): void;
|
|
36
|
+
getClassesForTreeNode(node: SmartTreeNode): string[];
|
|
37
|
+
getInnerClassesForTreeNode(node: SmartTreeNode): string[];
|
|
38
|
+
getClassesForTreeNodeChildren(node: SmartTreeNode): string[];
|
|
39
|
+
getCustomClass(cssClass: string, plusProperty: any): string;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SmartTreeComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SmartTreeComponent, "smart-tree", never, { "treeStyle": "treeStyle"; "treeService": "treeService"; }, {}, never, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { UiAction } from '../view-context/projects';
|
|
2
|
+
export interface SmartTreeModel {
|
|
3
|
+
identifier?: string;
|
|
4
|
+
rootNodes: Array<SmartTreeNode>;
|
|
5
|
+
selectedNodeIdentifier?: string;
|
|
6
|
+
navigationUrlsByNodeType?: Array<SmartTreeNodeType>;
|
|
7
|
+
}
|
|
8
|
+
export interface SmartTreeNode {
|
|
9
|
+
icon?: string;
|
|
10
|
+
caption: string;
|
|
11
|
+
classes?: Array<string>;
|
|
12
|
+
hasChildren: boolean;
|
|
13
|
+
childrenNodes: Array<SmartTreeNode>;
|
|
14
|
+
expanded: boolean;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
childrenNodesLoaded: boolean;
|
|
17
|
+
level: number;
|
|
18
|
+
shortDescription?: string;
|
|
19
|
+
identifier?: string;
|
|
20
|
+
objectUri?: string;
|
|
21
|
+
nodeType: string;
|
|
22
|
+
button?: SmartTreeNodeButton;
|
|
23
|
+
actions?: Array<UiAction>;
|
|
24
|
+
}
|
|
25
|
+
export interface SmartTreeNodeButton {
|
|
26
|
+
icon?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
type: SmartTreeNodeButtonType;
|
|
29
|
+
menuItemButtons?: SmartTreeNodeButton[];
|
|
30
|
+
callback?: (...args: any[]) => any;
|
|
31
|
+
args?: any[];
|
|
32
|
+
}
|
|
33
|
+
export declare enum SmartTreeNodeButtonType {
|
|
34
|
+
MENU = "MENU",
|
|
35
|
+
ICON = "ICON",
|
|
36
|
+
NORMAL = "NORMAL"
|
|
37
|
+
}
|
|
38
|
+
export interface SmartTreeNodeType {
|
|
39
|
+
nodeType: string;
|
|
40
|
+
navigationUrl: any[];
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./smarttree.component";
|
|
3
|
+
import * as i2 from "@angular/platform-browser";
|
|
4
|
+
import * as i3 from "@angular/material/core";
|
|
5
|
+
import * as i4 from "@angular/material/button";
|
|
6
|
+
import * as i5 from "@angular/material/icon";
|
|
7
|
+
import * as i6 from "@angular/material/tree";
|
|
8
|
+
import * as i7 from "@angular/material/menu";
|
|
9
|
+
import * as i8 from "@smartbit4all/icon";
|
|
10
|
+
import * as i9 from "../view-context/smart-view-context.module";
|
|
11
|
+
export declare class SmarttreeModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SmarttreeModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SmarttreeModule, [typeof i1.SmartTreeComponent], [typeof i2.BrowserModule, typeof i3.MatCommonModule, typeof i4.MatButtonModule, typeof i5.MatIconModule, typeof i6.MatTreeModule, typeof i7.MatMenuModule, typeof i8.SmartIconModule, typeof i9.SmartViewContextModule], [typeof i1.SmartTreeComponent]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SmarttreeModule>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface TreeStyle {
|
|
2
|
+
arrowPosition?: TreeArrowPosition;
|
|
3
|
+
levelBackgroundColor?: string[];
|
|
4
|
+
color?: string;
|
|
5
|
+
activeStyle?: {
|
|
6
|
+
color: string;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare enum TreeArrowPosition {
|
|
11
|
+
START = 0,
|
|
12
|
+
END = 1
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { SmartTreeModel, SmartTreeNode } from './smarttree.model';
|
|
3
|
+
import { SmarttreeServiceDescriptor } from './smarttree.service.interface';
|
|
4
|
+
import { UiActionModel } from '../view-context/projects';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SmarttreeService<T> implements SmarttreeServiceDescriptor<T> {
|
|
7
|
+
errorMessage: string;
|
|
8
|
+
treeFromBackend: T | undefined;
|
|
9
|
+
smartTreeModel: SmartTreeModel | undefined;
|
|
10
|
+
smartTreeModelChanged: Subject<SmartTreeModel>;
|
|
11
|
+
protected _uiActionModels: UiActionModel[] | undefined;
|
|
12
|
+
uiActionModelsChanged: Subject<void>;
|
|
13
|
+
get uiActionModels(): UiActionModel[] | undefined;
|
|
14
|
+
set uiActionModels(uiActionModels: UiActionModel[] | undefined);
|
|
15
|
+
constructor();
|
|
16
|
+
initialize(): Promise<void>;
|
|
17
|
+
downloadTree(): Promise<T>;
|
|
18
|
+
downloadChildren(parentNode: SmartTreeNode): Promise<T>;
|
|
19
|
+
onTreeNodeClick(treeNode: SmartTreeNode): void;
|
|
20
|
+
onTreeNodeOpen(treeNode: SmartTreeNode): void;
|
|
21
|
+
syncTree(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SmarttreeService<any>, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SmarttreeService<any>>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { SmartTreeModel, SmartTreeNode } from './smarttree.model';
|
|
3
|
+
import { UiActionModel } from '../view-context/projects';
|
|
4
|
+
/**
|
|
5
|
+
* T - TreeNodeList
|
|
6
|
+
* N - TreeNode
|
|
7
|
+
*/
|
|
8
|
+
export interface SmarttreeServiceDescriptor<T> {
|
|
9
|
+
errorMessage: string;
|
|
10
|
+
treeFromBackend: T | undefined;
|
|
11
|
+
smartTreeModel: SmartTreeModel | undefined;
|
|
12
|
+
smartTreeModelChanged: Subject<SmartTreeModel>;
|
|
13
|
+
uiActionModelsChanged: Subject<void>;
|
|
14
|
+
get uiActionModels(): UiActionModel[] | undefined;
|
|
15
|
+
set uiActionModels(uiActions: UiActionModel[] | undefined);
|
|
16
|
+
/**
|
|
17
|
+
* Initializes the SmartTree.
|
|
18
|
+
*/
|
|
19
|
+
initialize(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* BFF API call, downloads the tree from the backend and returns it.
|
|
22
|
+
*/
|
|
23
|
+
downloadTree(): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* BFF API call, downloads the children of a parentNode and returns it.
|
|
26
|
+
* @param parentNode
|
|
27
|
+
*/
|
|
28
|
+
downloadChildren(parentNode: SmartTreeNode): Promise<T>;
|
|
29
|
+
/**
|
|
30
|
+
* Handles the on click event for the treeNode.
|
|
31
|
+
* @param treeNode
|
|
32
|
+
*/
|
|
33
|
+
onTreeNodeClick(treeNode: SmartTreeNode): void;
|
|
34
|
+
/**
|
|
35
|
+
* handles the open click event for the treeNode.
|
|
36
|
+
* @param treeNode
|
|
37
|
+
*/
|
|
38
|
+
onTreeNodeOpen(treeNode: SmartTreeNode): void;
|
|
39
|
+
/**
|
|
40
|
+
* Synchronise the tree and emits a smartTreeModelChanged event.
|
|
41
|
+
*/
|
|
42
|
+
syncTree(): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { UiAction, UiActionRequest } from '../view-context/projects';
|
|
4
|
+
import { Configuration } from '../configuration';
|
|
5
|
+
import { SmartTreeNode } from '../../smarttree.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class TreeService {
|
|
8
|
+
protected httpClient: HttpClient;
|
|
9
|
+
protected basePath: string;
|
|
10
|
+
defaultHeaders: HttpHeaders;
|
|
11
|
+
configuration: Configuration;
|
|
12
|
+
encoder: HttpParameterCodec;
|
|
13
|
+
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
|
|
14
|
+
private addToHttpParams;
|
|
15
|
+
private addToHttpParamsRecursive;
|
|
16
|
+
/**
|
|
17
|
+
* Collapses the given treenode. The viewcontext will hold the appropriate instruction for the ui. Returns the collapsed SmartTreeNode.
|
|
18
|
+
* @param viewUuid
|
|
19
|
+
* @param treeId
|
|
20
|
+
* @param nodeId
|
|
21
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
22
|
+
* @param reportProgress flag to report request and response progress.
|
|
23
|
+
*/
|
|
24
|
+
collapseNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'body', reportProgress?: boolean, options?: {
|
|
25
|
+
httpHeaderAccept?: 'application/json';
|
|
26
|
+
context?: HttpContext;
|
|
27
|
+
}): Observable<SmartTreeNode>;
|
|
28
|
+
collapseNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'response', reportProgress?: boolean, options?: {
|
|
29
|
+
httpHeaderAccept?: 'application/json';
|
|
30
|
+
context?: HttpContext;
|
|
31
|
+
}): Observable<HttpResponse<SmartTreeNode>>;
|
|
32
|
+
collapseNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'events', reportProgress?: boolean, options?: {
|
|
33
|
+
httpHeaderAccept?: 'application/json';
|
|
34
|
+
context?: HttpContext;
|
|
35
|
+
}): Observable<HttpEvent<SmartTreeNode>>;
|
|
36
|
+
/**
|
|
37
|
+
* Expands the given treenode. The viewcontext will hold the appropriate instruction for the ui, if any. Returns the expanded SmartTreeNode.
|
|
38
|
+
* @param viewUuid
|
|
39
|
+
* @param treeId
|
|
40
|
+
* @param nodeId
|
|
41
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
42
|
+
* @param reportProgress flag to report request and response progress.
|
|
43
|
+
*/
|
|
44
|
+
expandNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'body', reportProgress?: boolean, options?: {
|
|
45
|
+
httpHeaderAccept?: 'application/json';
|
|
46
|
+
context?: HttpContext;
|
|
47
|
+
}): Observable<SmartTreeNode>;
|
|
48
|
+
expandNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'response', reportProgress?: boolean, options?: {
|
|
49
|
+
httpHeaderAccept?: 'application/json';
|
|
50
|
+
context?: HttpContext;
|
|
51
|
+
}): Observable<HttpResponse<SmartTreeNode>>;
|
|
52
|
+
expandNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'events', reportProgress?: boolean, options?: {
|
|
53
|
+
httpHeaderAccept?: 'application/json';
|
|
54
|
+
context?: HttpContext;
|
|
55
|
+
}): Observable<HttpEvent<SmartTreeNode>>;
|
|
56
|
+
/**
|
|
57
|
+
* Query the child nodes of the tree\'s node given in the parameter
|
|
58
|
+
* @param viewUuid
|
|
59
|
+
* @param treeId
|
|
60
|
+
* @param nodeId
|
|
61
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
62
|
+
* @param reportProgress flag to report request and response progress.
|
|
63
|
+
*/
|
|
64
|
+
getChildrenNodes(viewUuid: string, treeId: string, nodeId: string, observe?: 'body', reportProgress?: boolean, options?: {
|
|
65
|
+
httpHeaderAccept?: 'application/json';
|
|
66
|
+
context?: HttpContext;
|
|
67
|
+
}): Observable<Array<SmartTreeNode>>;
|
|
68
|
+
getChildrenNodes(viewUuid: string, treeId: string, nodeId: string, observe?: 'response', reportProgress?: boolean, options?: {
|
|
69
|
+
httpHeaderAccept?: 'application/json';
|
|
70
|
+
context?: HttpContext;
|
|
71
|
+
}): Observable<HttpResponse<Array<SmartTreeNode>>>;
|
|
72
|
+
getChildrenNodes(viewUuid: string, treeId: string, nodeId: string, observe?: 'events', reportProgress?: boolean, options?: {
|
|
73
|
+
httpHeaderAccept?: 'application/json';
|
|
74
|
+
context?: HttpContext;
|
|
75
|
+
}): Observable<HttpEvent<Array<SmartTreeNode>>>;
|
|
76
|
+
/**
|
|
77
|
+
* Query all tree nodes.
|
|
78
|
+
* @param viewUuid
|
|
79
|
+
* @param treeId
|
|
80
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
81
|
+
* @param reportProgress flag to report request and response progress.
|
|
82
|
+
*/
|
|
83
|
+
getMainActions(viewUuid: string, treeId: string, observe?: 'body', reportProgress?: boolean, options?: {
|
|
84
|
+
httpHeaderAccept?: 'application/json';
|
|
85
|
+
context?: HttpContext;
|
|
86
|
+
}): Observable<Array<UiAction>>;
|
|
87
|
+
getMainActions(viewUuid: string, treeId: string, observe?: 'response', reportProgress?: boolean, options?: {
|
|
88
|
+
httpHeaderAccept?: 'application/json';
|
|
89
|
+
context?: HttpContext;
|
|
90
|
+
}): Observable<HttpResponse<Array<UiAction>>>;
|
|
91
|
+
getMainActions(viewUuid: string, treeId: string, observe?: 'events', reportProgress?: boolean, options?: {
|
|
92
|
+
httpHeaderAccept?: 'application/json';
|
|
93
|
+
context?: HttpContext;
|
|
94
|
+
}): Observable<HttpEvent<Array<UiAction>>>;
|
|
95
|
+
/**
|
|
96
|
+
* Query all tree nodes.
|
|
97
|
+
* @param viewUuid
|
|
98
|
+
* @param treeId
|
|
99
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
100
|
+
* @param reportProgress flag to report request and response progress.
|
|
101
|
+
*/
|
|
102
|
+
getRootNodes(viewUuid: string, treeId: string, observe?: 'body', reportProgress?: boolean, options?: {
|
|
103
|
+
httpHeaderAccept?: 'application/json';
|
|
104
|
+
context?: HttpContext;
|
|
105
|
+
}): Observable<Array<SmartTreeNode>>;
|
|
106
|
+
getRootNodes(viewUuid: string, treeId: string, observe?: 'response', reportProgress?: boolean, options?: {
|
|
107
|
+
httpHeaderAccept?: 'application/json';
|
|
108
|
+
context?: HttpContext;
|
|
109
|
+
}): Observable<HttpResponse<Array<SmartTreeNode>>>;
|
|
110
|
+
getRootNodes(viewUuid: string, treeId: string, observe?: 'events', reportProgress?: boolean, options?: {
|
|
111
|
+
httpHeaderAccept?: 'application/json';
|
|
112
|
+
context?: HttpContext;
|
|
113
|
+
}): Observable<HttpEvent<Array<SmartTreeNode>>>;
|
|
114
|
+
/**
|
|
115
|
+
* Performs an action on the given treenode. The viewcontext will hold the appropriate instruction for the ui. Returns the SmartTreeNode which the action was performed on.
|
|
116
|
+
* @param viewUuid
|
|
117
|
+
* @param treeId
|
|
118
|
+
* @param nodeId
|
|
119
|
+
* @param body
|
|
120
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
121
|
+
* @param reportProgress flag to report request and response progress.
|
|
122
|
+
*/
|
|
123
|
+
performAction(viewUuid: string, treeId: string, nodeId: string, body: UiActionRequest, observe?: 'body', reportProgress?: boolean, options?: {
|
|
124
|
+
httpHeaderAccept?: 'application/json';
|
|
125
|
+
context?: HttpContext;
|
|
126
|
+
}): Observable<Array<SmartTreeNode>>;
|
|
127
|
+
performAction(viewUuid: string, treeId: string, nodeId: string, body: UiActionRequest, observe?: 'response', reportProgress?: boolean, options?: {
|
|
128
|
+
httpHeaderAccept?: 'application/json';
|
|
129
|
+
context?: HttpContext;
|
|
130
|
+
}): Observable<HttpResponse<Array<SmartTreeNode>>>;
|
|
131
|
+
performAction(viewUuid: string, treeId: string, nodeId: string, body: UiActionRequest, observe?: 'events', reportProgress?: boolean, options?: {
|
|
132
|
+
httpHeaderAccept?: 'application/json';
|
|
133
|
+
context?: HttpContext;
|
|
134
|
+
}): Observable<HttpEvent<Array<SmartTreeNode>>>;
|
|
135
|
+
/**
|
|
136
|
+
* Performs an action on the given treenode. The viewcontext will hold the appropriate instruction for the ui. Returns the SmartTreeNode which the action was performed on.
|
|
137
|
+
* @param viewUuid
|
|
138
|
+
* @param treeId
|
|
139
|
+
* @param body
|
|
140
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
141
|
+
* @param reportProgress flag to report request and response progress.
|
|
142
|
+
*/
|
|
143
|
+
performMainAction(viewUuid: string, treeId: string, body: UiActionRequest, observe?: 'body', reportProgress?: boolean, options?: {
|
|
144
|
+
httpHeaderAccept?: 'application/json';
|
|
145
|
+
context?: HttpContext;
|
|
146
|
+
}): Observable<Array<SmartTreeNode>>;
|
|
147
|
+
performMainAction(viewUuid: string, treeId: string, body: UiActionRequest, observe?: 'response', reportProgress?: boolean, options?: {
|
|
148
|
+
httpHeaderAccept?: 'application/json';
|
|
149
|
+
context?: HttpContext;
|
|
150
|
+
}): Observable<HttpResponse<Array<SmartTreeNode>>>;
|
|
151
|
+
performMainAction(viewUuid: string, treeId: string, body: UiActionRequest, observe?: 'events', reportProgress?: boolean, options?: {
|
|
152
|
+
httpHeaderAccept?: 'application/json';
|
|
153
|
+
context?: HttpContext;
|
|
154
|
+
}): Observable<HttpEvent<Array<SmartTreeNode>>>;
|
|
155
|
+
/**
|
|
156
|
+
* Collapses the given treenode. The viewcontext will hold the appropriate instruction for the ui. Returns the collapsed SmartTreeNode.
|
|
157
|
+
* @param viewUuid
|
|
158
|
+
* @param treeId
|
|
159
|
+
* @param nodeId
|
|
160
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
161
|
+
* @param reportProgress flag to report request and response progress.
|
|
162
|
+
*/
|
|
163
|
+
selectNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'body', reportProgress?: boolean, options?: {
|
|
164
|
+
httpHeaderAccept?: 'application/json';
|
|
165
|
+
context?: HttpContext;
|
|
166
|
+
}): Observable<SmartTreeNode>;
|
|
167
|
+
selectNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'response', reportProgress?: boolean, options?: {
|
|
168
|
+
httpHeaderAccept?: 'application/json';
|
|
169
|
+
context?: HttpContext;
|
|
170
|
+
}): Observable<HttpResponse<SmartTreeNode>>;
|
|
171
|
+
selectNode(viewUuid: string, treeId: string, nodeId: string, observe?: 'events', reportProgress?: boolean, options?: {
|
|
172
|
+
httpHeaderAccept?: 'application/json';
|
|
173
|
+
context?: HttpContext;
|
|
174
|
+
}): Observable<HttpEvent<SmartTreeNode>>;
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeService, [null, { optional: true; }, { optional: true; }]>;
|
|
176
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TreeService>;
|
|
177
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { HttpParameterCodec } from '@angular/common/http';
|
|
2
|
+
import { Param } from './param';
|
|
3
|
+
export interface ConfigurationParameters {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Since 5.0. Use credentials instead
|
|
6
|
+
*/
|
|
7
|
+
apiKeys?: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
username?: string;
|
|
11
|
+
password?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Since 5.0. Use credentials instead
|
|
14
|
+
*/
|
|
15
|
+
accessToken?: string | (() => string);
|
|
16
|
+
basePath?: string;
|
|
17
|
+
withCredentials?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Takes care of encoding query- and form-parameters.
|
|
20
|
+
*/
|
|
21
|
+
encoder?: HttpParameterCodec;
|
|
22
|
+
/**
|
|
23
|
+
* Override the default method for encoding path parameters in various
|
|
24
|
+
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
|
|
25
|
+
* <p>
|
|
26
|
+
* See {@link README.md} for more details
|
|
27
|
+
* </p>
|
|
28
|
+
*/
|
|
29
|
+
encodeParam?: (param: Param) => string;
|
|
30
|
+
/**
|
|
31
|
+
* The keys are the names in the securitySchemes section of the OpenAPI
|
|
32
|
+
* document. They should map to the value used for authentication
|
|
33
|
+
* minus any standard prefixes such as 'Basic' or 'Bearer'.
|
|
34
|
+
*/
|
|
35
|
+
credentials?: {
|
|
36
|
+
[key: string]: string | (() => string | undefined);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export declare class Configuration {
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Since 5.0. Use credentials instead
|
|
42
|
+
*/
|
|
43
|
+
apiKeys?: {
|
|
44
|
+
[key: string]: string;
|
|
45
|
+
};
|
|
46
|
+
username?: string;
|
|
47
|
+
password?: string;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Since 5.0. Use credentials instead
|
|
50
|
+
*/
|
|
51
|
+
accessToken?: string | (() => string);
|
|
52
|
+
basePath?: string;
|
|
53
|
+
withCredentials?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Takes care of encoding query- and form-parameters.
|
|
56
|
+
*/
|
|
57
|
+
encoder?: HttpParameterCodec;
|
|
58
|
+
/**
|
|
59
|
+
* Encoding of various path parameter
|
|
60
|
+
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
|
|
61
|
+
* <p>
|
|
62
|
+
* See {@link README.md} for more details
|
|
63
|
+
* </p>
|
|
64
|
+
*/
|
|
65
|
+
encodeParam: (param: Param) => string;
|
|
66
|
+
/**
|
|
67
|
+
* The keys are the names in the securitySchemes section of the OpenAPI
|
|
68
|
+
* document. They should map to the value used for authentication
|
|
69
|
+
* minus any standard prefixes such as 'Basic' or 'Bearer'.
|
|
70
|
+
*/
|
|
71
|
+
credentials: {
|
|
72
|
+
[key: string]: string | (() => string | undefined);
|
|
73
|
+
};
|
|
74
|
+
constructor(configurationParameters?: ConfigurationParameters);
|
|
75
|
+
/**
|
|
76
|
+
* Select the correct content-type to use for a request.
|
|
77
|
+
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
|
78
|
+
* If no content type is found return the first found type if the contentTypes is not empty
|
|
79
|
+
* @param contentTypes - the array of content types that are available for selection
|
|
80
|
+
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
81
|
+
*/
|
|
82
|
+
selectHeaderContentType(contentTypes: string[]): string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Select the correct accept content-type to use for a request.
|
|
85
|
+
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
|
86
|
+
* If no content type is found return the first found type if the contentTypes is not empty
|
|
87
|
+
* @param accepts - the array of content types that are available for selection.
|
|
88
|
+
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
89
|
+
*/
|
|
90
|
+
selectHeaderAccept(accepts: string[]): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Check if the given MIME is a JSON MIME.
|
|
93
|
+
* JSON MIME examples:
|
|
94
|
+
* application/json
|
|
95
|
+
* application/json; charset=UTF8
|
|
96
|
+
* APPLICATION/JSON
|
|
97
|
+
* application/vnd.company+json
|
|
98
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
99
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
100
|
+
*/
|
|
101
|
+
isJsonMime(mime: string): boolean;
|
|
102
|
+
lookupCredential(key: string): string | undefined;
|
|
103
|
+
private defaultEncodeParam;
|
|
104
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpParameterCodec } from '@angular/common/http';
|
|
2
|
+
/**
|
|
3
|
+
* Custom HttpParameterCodec
|
|
4
|
+
* Workaround for https://github.com/angular/angular/issues/18261
|
|
5
|
+
*/
|
|
6
|
+
export declare class CustomHttpParameterCodec implements HttpParameterCodec {
|
|
7
|
+
encodeKey(k: string): string;
|
|
8
|
+
encodeValue(v: string): string;
|
|
9
|
+
decodeKey(k: string): string;
|
|
10
|
+
decodeValue(v: string): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard parameter styles defined by OpenAPI spec
|
|
3
|
+
*/
|
|
4
|
+
export declare type StandardParamStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
5
|
+
/**
|
|
6
|
+
* The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user.
|
|
7
|
+
*/
|
|
8
|
+
export declare type ParamStyle = StandardParamStyle | string;
|
|
9
|
+
/**
|
|
10
|
+
* Standard parameter locations defined by OpenAPI spec
|
|
11
|
+
*/
|
|
12
|
+
export declare type ParamLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
13
|
+
/**
|
|
14
|
+
* Standard types as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
|
|
15
|
+
*/
|
|
16
|
+
export declare type StandardDataType = "integer" | "number" | "boolean" | "string" | "object" | "array";
|
|
17
|
+
/**
|
|
18
|
+
* Standard {@link DataType}s plus your own types/classes.
|
|
19
|
+
*/
|
|
20
|
+
export declare type DataType = StandardDataType | string;
|
|
21
|
+
/**
|
|
22
|
+
* Standard formats as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
|
|
23
|
+
*/
|
|
24
|
+
export declare type StandardDataFormat = "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "date-time" | "password";
|
|
25
|
+
export declare type DataFormat = StandardDataFormat | string;
|
|
26
|
+
/**
|
|
27
|
+
* The parameter to encode.
|
|
28
|
+
*/
|
|
29
|
+
export interface Param {
|
|
30
|
+
name: string;
|
|
31
|
+
value: unknown;
|
|
32
|
+
in: ParamLocation;
|
|
33
|
+
style: ParamStyle;
|
|
34
|
+
explode: boolean;
|
|
35
|
+
dataType: DataType;
|
|
36
|
+
dataFormat: DataFormat | undefined;
|
|
37
|
+
}
|
package/package.json
CHANGED
package/projects.d.ts
CHANGED
|
Binary file
|