@smartbit4all/ng-client 1.0.12 → 1.0.13
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 +36 -14
- package/esm2020/lib/smart-client/smart.component.mjs +12 -13
- package/esm2020/lib/smart-client/smart.service.mjs +12 -13
- package/esm2020/lib/view-context/api/api/view.service.mjs +118 -1
- package/esm2020/lib/view-context/smart-ui-action/ui-action-toolbar.component.mjs +13 -13
- package/esm2020/lib/view-context/smart-ui-action/ui-action.model.mjs +1 -1
- package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +26 -19
- package/esm2020/lib/view-context/smart-view-context.service.mjs +37 -33
- package/fesm2015/smartbit4all-ng-client.mjs +236 -77
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +225 -76
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +14 -6
- package/lib/smart-client/smart.component.d.ts +4 -5
- package/lib/smart-client/smart.service.d.ts +4 -5
- package/lib/view-context/api/api/view.service.d.ts +41 -0
- package/lib/view-context/smart-ui-action/ui-action-toolbar.component.d.ts +5 -5
- package/lib/view-context/smart-ui-action/ui-action.model.d.ts +4 -2
- package/lib/view-context/smart-ui-action/ui-action.service.d.ts +16 -6
- package/lib/view-context/smart-view-context.service.d.ts +10 -7
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.0.13.tgz +0 -0
- package/smartbit4all-ng-client-1.0.12.tgz +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { ComponentModel, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UseUiAction } from '../view-context/projects';
|
|
4
|
+
import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
|
|
5
|
+
import { GridOptions, SmartGrid } from '@smartbit4all/grid';
|
|
4
6
|
export declare abstract class SmartComponentApiClient<T> implements UseUiAction {
|
|
5
7
|
protected auth: SmartAuthenticationServiceInterface;
|
|
6
|
-
protected viewContext: SmartViewContextService;
|
|
7
8
|
protected pageName: string;
|
|
8
9
|
protected _destroy$: Subject<void>;
|
|
9
10
|
private detectChange;
|
|
@@ -20,16 +21,23 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction
|
|
|
20
21
|
dataChanged: Subject<void>;
|
|
21
22
|
submit: Subject<void>;
|
|
22
23
|
reSubscribeToChange: Subject<void>;
|
|
23
|
-
|
|
24
|
+
smartGrid?: SmartGrid;
|
|
25
|
+
protected viewContext: SmartViewContextService;
|
|
26
|
+
protected uiActionService: UiActionService;
|
|
27
|
+
protected uiActionDescriptorService: UiActionDescriptorService;
|
|
28
|
+
constructor(inject: Injector, auth: SmartAuthenticationServiceInterface, pageName: string);
|
|
24
29
|
_ngOnInit(): void;
|
|
25
30
|
_ngOnDestroy(): void;
|
|
26
31
|
initComponentByModel(): void;
|
|
27
32
|
initData(): void;
|
|
28
33
|
initActions(): void;
|
|
29
34
|
run(): void;
|
|
35
|
+
load(): Promise<void>;
|
|
30
36
|
getAdditionalParams(uiAction: UiAction): UiActionAdditionalParams;
|
|
31
37
|
getModel(): T | undefined;
|
|
32
38
|
performUiActionRequest(uiActionRequest: UiActionRequest): Promise<any>;
|
|
39
|
+
performWidgetActionRequest(uiActionRequest: UiActionRequest, widgetId: string, nodeId: string): Promise<any>;
|
|
40
|
+
performWidgetMainActionRequest(uiActionRequest: UiActionRequest, widgetId: string): Promise<any>;
|
|
33
41
|
handleSpecificDemandsAsynchronously(uiAction: UiAction, uiActionRequest: UiActionRequest): Promise<UiActionSpecificDemandResponse>;
|
|
34
|
-
|
|
42
|
+
addGrid(smartGrid: SmartGrid, options: GridOptions, useAsDefaultGrid?: boolean): SmartGrid;
|
|
35
43
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { SmartComponentApiClient } from "./smart-component-api-client";
|
|
1
|
+
import { Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
|
|
3
|
+
import { SmartComponentApiClient } from './smart-component-api-client';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare abstract class SmartComponent<T> extends SmartComponentApiClient<T> implements OnInit, OnDestroy {
|
|
7
|
-
constructor(
|
|
6
|
+
constructor(inject: Injector, auth: SmartAuthenticationServiceInterface, pageName: string);
|
|
8
7
|
ngOnInit(): void;
|
|
9
8
|
ngOnDestroy(): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartComponent<any>, never>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { SmartComponentApiClient } from "./smart-component-api-client";
|
|
1
|
+
import { Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
|
|
3
|
+
import { SmartComponentApiClient } from './smart-component-api-client';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare abstract class SmartService<T> extends SmartComponentApiClient<T> implements OnInit, OnDestroy {
|
|
7
|
-
constructor(
|
|
6
|
+
constructor(inject: Injector, auth: SmartAuthenticationServiceInterface, pageName: string);
|
|
8
7
|
ngOnInit(): void;
|
|
9
8
|
ngOnDestroy(): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartService<any>, never>;
|
|
@@ -164,6 +164,47 @@ export declare class ViewService {
|
|
|
164
164
|
httpHeaderAccept?: 'application/json';
|
|
165
165
|
context?: HttpContext;
|
|
166
166
|
}): Observable<HttpEvent<ViewContextChange>>;
|
|
167
|
+
/**
|
|
168
|
+
* Performs a widget UI action.
|
|
169
|
+
* @param uuid
|
|
170
|
+
* @param widgetId
|
|
171
|
+
* @param nodeId
|
|
172
|
+
* @param body
|
|
173
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
174
|
+
* @param reportProgress flag to report request and response progress.
|
|
175
|
+
*/
|
|
176
|
+
performWidgetAction(uuid: string, widgetId: string, nodeId: string, body: UiActionRequest, observe?: 'body', reportProgress?: boolean, options?: {
|
|
177
|
+
httpHeaderAccept?: 'application/json';
|
|
178
|
+
context?: HttpContext;
|
|
179
|
+
}): Observable<ViewContextChange>;
|
|
180
|
+
performWidgetAction(uuid: string, widgetId: string, nodeId: string, body: UiActionRequest, observe?: 'response', reportProgress?: boolean, options?: {
|
|
181
|
+
httpHeaderAccept?: 'application/json';
|
|
182
|
+
context?: HttpContext;
|
|
183
|
+
}): Observable<HttpResponse<ViewContextChange>>;
|
|
184
|
+
performWidgetAction(uuid: string, widgetId: string, nodeId: string, body: UiActionRequest, observe?: 'events', reportProgress?: boolean, options?: {
|
|
185
|
+
httpHeaderAccept?: 'application/json';
|
|
186
|
+
context?: HttpContext;
|
|
187
|
+
}): Observable<HttpEvent<ViewContextChange>>;
|
|
188
|
+
/**
|
|
189
|
+
* Performs a widget UI action.
|
|
190
|
+
* @param uuid
|
|
191
|
+
* @param widgetId
|
|
192
|
+
* @param body
|
|
193
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
194
|
+
* @param reportProgress flag to report request and response progress.
|
|
195
|
+
*/
|
|
196
|
+
performWidgetMainAction(uuid: string, widgetId: string, body: UiActionRequest, observe?: 'body', reportProgress?: boolean, options?: {
|
|
197
|
+
httpHeaderAccept?: 'application/json';
|
|
198
|
+
context?: HttpContext;
|
|
199
|
+
}): Observable<ViewContextChange>;
|
|
200
|
+
performWidgetMainAction(uuid: string, widgetId: string, body: UiActionRequest, observe?: 'response', reportProgress?: boolean, options?: {
|
|
201
|
+
httpHeaderAccept?: 'application/json';
|
|
202
|
+
context?: HttpContext;
|
|
203
|
+
}): Observable<HttpResponse<ViewContextChange>>;
|
|
204
|
+
performWidgetMainAction(uuid: string, widgetId: string, body: UiActionRequest, observe?: 'events', reportProgress?: boolean, options?: {
|
|
205
|
+
httpHeaderAccept?: 'application/json';
|
|
206
|
+
context?: HttpContext;
|
|
207
|
+
}): Observable<HttpEvent<ViewContextChange>>;
|
|
167
208
|
/**
|
|
168
209
|
* @param channel Smartlink\'s channel.
|
|
169
210
|
* @param uuid Smartlink\'s unique identifier
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OnChanges, OnDestroy, OnInit, SimpleChanges } from
|
|
2
|
-
import { UiActionButtonIconPos } from
|
|
3
|
-
import { UiActionDescriptorService } from
|
|
4
|
-
import { UiActionModel } from
|
|
5
|
-
import { UiActionService } from
|
|
1
|
+
import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { UiActionButtonIconPos } from '../api';
|
|
3
|
+
import { UiActionDescriptorService } from './ui-action.descriptor.service';
|
|
4
|
+
import { UiActionModel } from './ui-action.model';
|
|
5
|
+
import { UiActionService } from './ui-action.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class UiActionToolbarComponent implements OnInit, OnChanges, OnDestroy {
|
|
8
8
|
private service;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Subject } from
|
|
2
|
-
import { UiAction, UiActionDescriptor, UiActionRequest } from
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { UiAction, UiActionDescriptor, UiActionRequest } from '../api';
|
|
3
3
|
export interface UiActionModel {
|
|
4
4
|
uiAction: UiAction;
|
|
5
5
|
serviceToUse: UseUiAction;
|
|
@@ -13,6 +13,8 @@ export interface UseUiAction {
|
|
|
13
13
|
getAdditionalParams(uiAction: UiAction): UiActionAdditionalParams;
|
|
14
14
|
getModel(): any;
|
|
15
15
|
performUiActionRequest(uiActionRequest: UiActionRequest): Promise<any>;
|
|
16
|
+
performWidgetActionRequest(uiActionRequest: UiActionRequest, widgetId: string, nodeId: string): Promise<any>;
|
|
17
|
+
performWidgetMainActionRequest(uiActionRequest: UiActionRequest, widgetId: string): Promise<any>;
|
|
16
18
|
handleSpecificDemandsAsynchronously(uiAction: UiAction, uiActionRequest: UiActionRequest): Promise<UiActionSpecificDemandResponse>;
|
|
17
19
|
}
|
|
18
20
|
export interface UiActionSpecificDemandResponse {
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { MatSnackBar } from
|
|
2
|
-
import { UiAction } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { UiActionModel } from
|
|
1
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
2
|
+
import { UiAction } from '../api';
|
|
3
|
+
import { UiActionConfirmDialogService } from './dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service';
|
|
4
|
+
import { UiActionInputDialogService } from './dialogs/ui-action-input-dialog/ui-action-input-dialog.service';
|
|
5
|
+
import { UiActionModel } from './ui-action.model';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
export interface ExecuteUiActionOptions {
|
|
8
|
+
/**
|
|
9
|
+
* In case of using a grid: grid.identifier
|
|
10
|
+
*/
|
|
11
|
+
widgetId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* In case of using a grid: gridRow.id
|
|
14
|
+
*/
|
|
15
|
+
nodeId?: string;
|
|
16
|
+
}
|
|
7
17
|
export declare class UiActionService {
|
|
8
18
|
private confirmDialogService;
|
|
9
19
|
private textFieldDialogService;
|
|
10
20
|
private _snackBar;
|
|
11
21
|
uiActionModel: UiActionModel;
|
|
12
22
|
constructor(confirmDialogService: UiActionConfirmDialogService, textFieldDialogService: UiActionInputDialogService, _snackBar: MatSnackBar);
|
|
13
|
-
execute(uiAction: UiAction): Promise<void>;
|
|
23
|
+
execute(uiAction: UiAction, options?: ExecuteUiActionOptions): Promise<void>;
|
|
14
24
|
private handleInputType;
|
|
15
25
|
private handleInputTypeTextField;
|
|
16
26
|
private handleInputTypeUserSelect;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SmartdialogService } from
|
|
2
|
-
import { SmartNavigationService } from
|
|
3
|
-
import { Subject } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { SmartdialogService } from '@smartbit4all/dialog';
|
|
2
|
+
import { SmartNavigationService } from '@smartbit4all/navigation';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { SmartSessionService } from '../session/smart-session.service';
|
|
5
|
+
import { SmartSubject } from '../smart-client/smart.subject';
|
|
6
|
+
import { ComponentModel, MessageData, MessageResult, UiActionDescriptor, UiActionRequest, ViewConstraint, ViewContextData, ViewContextUpdate, ViewData, ViewService } from './api';
|
|
7
|
+
import { SmartTranslateService, SmartViewContextApiError, SmartViewContextApiErrors, SmartViewHandlerModel } from './smart-view-context.model';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class SmartViewContextService {
|
|
10
10
|
private view;
|
|
@@ -60,6 +60,9 @@ export declare class SmartViewContextService {
|
|
|
60
60
|
showPublishedView(channel: string, uuid: string): Promise<void>;
|
|
61
61
|
downloadResource(uuid: string, item: string): Promise<any>;
|
|
62
62
|
performAction(uuid: string, uiActionRequest: UiActionRequest): Promise<void>;
|
|
63
|
+
performWidgetAction(uuid: string, widgetId: string, nodeId: string, uiActionRequest: UiActionRequest): Promise<void>;
|
|
64
|
+
performWidgetMainAction(uuid: string, widgetId: string, uiActionRequest: UiActionRequest): Promise<void>;
|
|
65
|
+
private handlePerformActionResponse;
|
|
63
66
|
private handleChanges;
|
|
64
67
|
load(uuid: string): Promise<ComponentModel | undefined>;
|
|
65
68
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartViewContextService, never>;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|