@smartbit4all/ng-client 1.1.30 → 1.1.32
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 +16 -2
- package/esm2020/lib/view-context/api/api/view.service.mjs +161 -3
- package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
- package/esm2020/lib/view-context/api/model/models.mjs +4 -1
- package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +13 -0
- package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +4 -2
- package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +13 -0
- package/esm2020/lib/view-context/api/model/uploadedFile.mjs +13 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +68 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +53 -0
- package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +32 -5
- package/esm2020/lib/view-context/smart-view-context.module.mjs +5 -2
- package/esm2020/lib/view-context/smart-view-context.service.mjs +27 -1
- package/fesm2015/smartbit4all-ng-client.mjs +360 -15
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +385 -15
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/view-context/api/api/view.service.d.ts +47 -0
- package/lib/view-context/api/model/componentModel.d.ts +4 -0
- package/lib/view-context/api/model/models.d.ts +3 -0
- package/lib/view-context/api/model/uiActionConstraint.d.ts +22 -0
- package/lib/view-context/api/model/uiActionDescriptor.d.ts +2 -0
- package/lib/view-context/api/model/uiActionInputType.d.ts +3 -1
- package/lib/view-context/api/model/uiActionUploadDescriptor.d.ts +23 -0
- package/lib/view-context/api/model/uploadedFile.d.ts +19 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.d.ts +30 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +22 -0
- package/lib/view-context/smart-ui-action/ui-action.service.d.ts +4 -1
- package/lib/view-context/smart-view-context.module.d.ts +10 -9
- package/lib/view-context/smart-view-context.service.d.ts +4 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.1.32.tgz +0 -0
- package/smartbit4all-ng-client-1.1.30.tgz +0 -0
|
@@ -17,6 +17,11 @@ export declare class ViewService {
|
|
|
17
17
|
configuration: Configuration;
|
|
18
18
|
encoder: HttpParameterCodec;
|
|
19
19
|
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
|
|
20
|
+
/**
|
|
21
|
+
* @param consumes string[] mime-types
|
|
22
|
+
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
|
23
|
+
*/
|
|
24
|
+
private canConsumeForm;
|
|
20
25
|
private addToHttpParams;
|
|
21
26
|
private addToHttpParamsRecursive;
|
|
22
27
|
/**
|
|
@@ -261,6 +266,48 @@ export declare class ViewService {
|
|
|
261
266
|
httpHeaderAccept?: 'application/json';
|
|
262
267
|
context?: HttpContext;
|
|
263
268
|
}): Observable<HttpEvent<ViewContextData>>;
|
|
269
|
+
/**
|
|
270
|
+
* Performs an upload UI action.
|
|
271
|
+
* @param uuid
|
|
272
|
+
* @param uiActionRequest Stringify-d UiActionRequest.
|
|
273
|
+
* @param param Parameter name to use when converting uploaded file to BinaryData.
|
|
274
|
+
* @param content
|
|
275
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
276
|
+
* @param reportProgress flag to report request and response progress.
|
|
277
|
+
*/
|
|
278
|
+
uploadAction(uuid: string, uiActionRequest?: string, param?: string, content?: Blob, observe?: 'body', reportProgress?: boolean, options?: {
|
|
279
|
+
httpHeaderAccept?: 'application/json';
|
|
280
|
+
context?: HttpContext;
|
|
281
|
+
}): Observable<ViewContextChange>;
|
|
282
|
+
uploadAction(uuid: string, uiActionRequest?: string, param?: string, content?: Blob, observe?: 'response', reportProgress?: boolean, options?: {
|
|
283
|
+
httpHeaderAccept?: 'application/json';
|
|
284
|
+
context?: HttpContext;
|
|
285
|
+
}): Observable<HttpResponse<ViewContextChange>>;
|
|
286
|
+
uploadAction(uuid: string, uiActionRequest?: string, param?: string, content?: Blob, observe?: 'events', reportProgress?: boolean, options?: {
|
|
287
|
+
httpHeaderAccept?: 'application/json';
|
|
288
|
+
context?: HttpContext;
|
|
289
|
+
}): Observable<HttpEvent<ViewContextChange>>;
|
|
290
|
+
/**
|
|
291
|
+
* Performs a generic UI action.
|
|
292
|
+
* @param uuid
|
|
293
|
+
* @param uiActionRequest Stringify-d UiActionRequest.
|
|
294
|
+
* @param param Parameter name to use when converting uploaded file to BinaryData.
|
|
295
|
+
* @param contents
|
|
296
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
297
|
+
* @param reportProgress flag to report request and response progress.
|
|
298
|
+
*/
|
|
299
|
+
uploadMultipleAction(uuid: string, uiActionRequest?: string, param?: string, contents?: Array<Blob>, observe?: 'body', reportProgress?: boolean, options?: {
|
|
300
|
+
httpHeaderAccept?: 'application/json';
|
|
301
|
+
context?: HttpContext;
|
|
302
|
+
}): Observable<ViewContextChange>;
|
|
303
|
+
uploadMultipleAction(uuid: string, uiActionRequest?: string, param?: string, contents?: Array<Blob>, observe?: 'response', reportProgress?: boolean, options?: {
|
|
304
|
+
httpHeaderAccept?: 'application/json';
|
|
305
|
+
context?: HttpContext;
|
|
306
|
+
}): Observable<HttpResponse<ViewContextChange>>;
|
|
307
|
+
uploadMultipleAction(uuid: string, uiActionRequest?: string, param?: string, contents?: Array<Blob>, observe?: 'events', reportProgress?: boolean, options?: {
|
|
308
|
+
httpHeaderAccept?: 'application/json';
|
|
309
|
+
context?: HttpContext;
|
|
310
|
+
}): Observable<HttpEvent<ViewContextChange>>;
|
|
264
311
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewService, [null, { optional: true; }, { optional: true; }]>;
|
|
265
312
|
static ɵprov: i0.ɵɵInjectableDeclaration<ViewService>;
|
|
266
313
|
}
|
|
@@ -16,11 +16,14 @@ export * from './uiAction';
|
|
|
16
16
|
export * from './uiActionButtonDescriptor';
|
|
17
17
|
export * from './uiActionButtonIconPos';
|
|
18
18
|
export * from './uiActionButtonType';
|
|
19
|
+
export * from './uiActionConstraint';
|
|
19
20
|
export * from './uiActionDescriptor';
|
|
20
21
|
export * from './uiActionDialogDescriptor';
|
|
21
22
|
export * from './uiActionFeedbackType';
|
|
22
23
|
export * from './uiActionInputType';
|
|
23
24
|
export * from './uiActionRequest';
|
|
25
|
+
export * from './uiActionUploadDescriptor';
|
|
26
|
+
export * from './uploadedFile';
|
|
24
27
|
export * from './valueSet';
|
|
25
28
|
export * from './view';
|
|
26
29
|
export * from './viewApiError';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View API
|
|
3
|
+
* View API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: info@it4all.hu
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The UiAction constraint is responsible for the constraints belong to a given action (button, menu option etc.) on the view. The UI must identify the action by the dataName that is a path of the data name separated by dot like dataSheet.field.
|
|
14
|
+
*/
|
|
15
|
+
export interface UiActionConstraint {
|
|
16
|
+
/**
|
|
17
|
+
* The path format is the following - dataSheet.actionCode.
|
|
18
|
+
*/
|
|
19
|
+
path?: string;
|
|
20
|
+
visible?: boolean;
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { UiActionButtonIconPos } from './uiActionButtonIconPos';
|
|
13
13
|
import { UiActionFeedbackType } from './uiActionFeedbackType';
|
|
14
14
|
import { UiActionDialogDescriptor } from './uiActionDialogDescriptor';
|
|
15
|
+
import { UiActionUploadDescriptor } from './uiActionUploadDescriptor';
|
|
15
16
|
import { UiActionButtonType } from './uiActionButtonType';
|
|
16
17
|
/**
|
|
17
18
|
* Describes the appearance (as a button) and the properties of the related dialogs of a UiAction.
|
|
@@ -29,6 +30,7 @@ export interface UiActionDescriptor {
|
|
|
29
30
|
input2Dialog?: UiActionDialogDescriptor;
|
|
30
31
|
feedbackType?: UiActionFeedbackType;
|
|
31
32
|
feedbackText?: string;
|
|
33
|
+
upload?: UiActionUploadDescriptor;
|
|
32
34
|
}
|
|
33
35
|
export declare namespace UiActionDescriptor {
|
|
34
36
|
}
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
export declare type UiActionInputType = 'none' | 'textfield' | 'textarea' | 'user_select';
|
|
12
|
+
export declare type UiActionInputType = 'none' | 'textfield' | 'textarea' | 'user_select' | 'file' | 'multiple_files';
|
|
13
13
|
export declare const UiActionInputType: {
|
|
14
14
|
None: UiActionInputType;
|
|
15
15
|
Textfield: UiActionInputType;
|
|
16
16
|
Textarea: UiActionInputType;
|
|
17
17
|
UserSelect: UiActionInputType;
|
|
18
|
+
File: UiActionInputType;
|
|
19
|
+
MultipleFiles: UiActionInputType;
|
|
18
20
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View API
|
|
3
|
+
* View API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: info@it4all.hu
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Describes the look of an upload component that is related to a specific UiAction.
|
|
14
|
+
*/
|
|
15
|
+
export interface UiActionUploadDescriptor {
|
|
16
|
+
title: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
maxSize?: string;
|
|
19
|
+
formats?: string;
|
|
20
|
+
uploadButtonTitle?: string;
|
|
21
|
+
backgroundColour?: string;
|
|
22
|
+
textColour?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View API
|
|
3
|
+
* View API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: info@it4all.hu
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Information about uploaded file.
|
|
14
|
+
*/
|
|
15
|
+
export interface UploadedFile {
|
|
16
|
+
filename?: string;
|
|
17
|
+
size?: number;
|
|
18
|
+
data?: any;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { SmartFileUploaderI18n } from '@smartbit4all/form';
|
|
3
|
+
import { UiActionDescriptor } from '../../../api';
|
|
4
|
+
import { UiActionDescriptorService } from '../../ui-action.descriptor.service';
|
|
5
|
+
import { UiActionFileUploadDialogService } from './ui-action-file-upload-dialog.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class UiActionFileUploadDialogComponent implements OnDestroy {
|
|
8
|
+
private service;
|
|
9
|
+
private manager;
|
|
10
|
+
code: string;
|
|
11
|
+
dialogType: 'dialog' | 'inputDialog' | 'input2Dialog';
|
|
12
|
+
descriptor?: UiActionDescriptor;
|
|
13
|
+
i18n?: SmartFileUploaderI18n;
|
|
14
|
+
maxSizeMb?: number;
|
|
15
|
+
fileFormats?: string[];
|
|
16
|
+
isMultiple?: boolean;
|
|
17
|
+
constructor(service: UiActionFileUploadDialogService, manager: UiActionDescriptorService);
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
setUp(): Promise<void>;
|
|
20
|
+
getTitle(): string;
|
|
21
|
+
getText(): string;
|
|
22
|
+
getActionButtonLabel(): string;
|
|
23
|
+
getActionButtonColor(): string;
|
|
24
|
+
getCancelButtonLabel(): string;
|
|
25
|
+
getCancelButtonColor(): string;
|
|
26
|
+
upload(files: any[]): void;
|
|
27
|
+
cancel(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiActionFileUploadDialogComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiActionFileUploadDialogComponent, "lib-ui-action-file-upload-dialog", never, {}, {}, never, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { SmartdialogService } from '@smartbit4all/dialog';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { UiAction } from '../../../api';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class UiActionFileUploadDialogService extends SmartdialogService {
|
|
8
|
+
_destroy$: Subject<void>;
|
|
9
|
+
inputTypeName: 'inputDialog' | 'input2Dialog';
|
|
10
|
+
action: UiAction;
|
|
11
|
+
nodeName?: string;
|
|
12
|
+
onAction: Subject<void>;
|
|
13
|
+
files?: any;
|
|
14
|
+
isMultiple: boolean;
|
|
15
|
+
constructor(dialog: MatDialog, router: Router);
|
|
16
|
+
setDataAndOpenDialog(action: UiAction, nodeName?: string): void;
|
|
17
|
+
openDialog(): void;
|
|
18
|
+
onSave(files: any[]): Promise<void>;
|
|
19
|
+
cancel(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiActionFileUploadDialogService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UiActionFileUploadDialogService>;
|
|
22
|
+
}
|
|
@@ -4,6 +4,7 @@ import { UiAction } from '../api';
|
|
|
4
4
|
import { UiActionConfirmDialogService } from './dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service';
|
|
5
5
|
import { UiActionInputDialogService } from './dialogs/ui-action-input-dialog/ui-action-input-dialog.service';
|
|
6
6
|
import { UiActionModel } from './ui-action.model';
|
|
7
|
+
import { UiActionFileUploadDialogService } from './dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export interface ExecuteUiActionOptions {
|
|
9
10
|
/**
|
|
@@ -18,14 +19,16 @@ export interface ExecuteUiActionOptions {
|
|
|
18
19
|
export declare class UiActionService implements OnDestroy {
|
|
19
20
|
private confirmDialogService;
|
|
20
21
|
private textFieldDialogService;
|
|
22
|
+
private fileUploadDialogService;
|
|
21
23
|
private _snackBar;
|
|
22
24
|
uiActionModel: UiActionModel;
|
|
23
25
|
private _destroy$;
|
|
24
|
-
constructor(confirmDialogService: UiActionConfirmDialogService, textFieldDialogService: UiActionInputDialogService, _snackBar: MatSnackBar);
|
|
26
|
+
constructor(confirmDialogService: UiActionConfirmDialogService, textFieldDialogService: UiActionInputDialogService, fileUploadDialogService: UiActionFileUploadDialogService, _snackBar: MatSnackBar);
|
|
25
27
|
ngOnDestroy(): void;
|
|
26
28
|
execute(uiAction: UiAction, options?: ExecuteUiActionOptions): Promise<void>;
|
|
27
29
|
private handleInputType;
|
|
28
30
|
private handleInputTypeTextField;
|
|
31
|
+
private handleInputTypeUpload;
|
|
29
32
|
private handleInputTypeUserSelect;
|
|
30
33
|
private performAction;
|
|
31
34
|
showSavedSnackbar(uiAction: UiAction): void;
|
|
@@ -5,16 +5,17 @@ import * as i3 from "./smart-view-redirect/smart-view-redirect";
|
|
|
5
5
|
import * as i4 from "./smart-ui-action/ui-action-toolbar.component";
|
|
6
6
|
import * as i5 from "./smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component";
|
|
7
7
|
import * as i6 from "./smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component";
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "@angular/common
|
|
10
|
-
import * as i9 from "@angular/
|
|
11
|
-
import * as i10 from "@angular/material/
|
|
12
|
-
import * as i11 from "@angular/material/
|
|
13
|
-
import * as i12 from "@angular/material/
|
|
14
|
-
import * as i13 from "@
|
|
15
|
-
import * as i14 from "@smartbit4all/
|
|
8
|
+
import * as i7 from "./smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component";
|
|
9
|
+
import * as i8 from "@angular/common";
|
|
10
|
+
import * as i9 from "@angular/common/http";
|
|
11
|
+
import * as i10 from "@angular/material/core";
|
|
12
|
+
import * as i11 from "@angular/material/button";
|
|
13
|
+
import * as i12 from "@angular/material/icon";
|
|
14
|
+
import * as i13 from "@angular/material/snack-bar";
|
|
15
|
+
import * as i14 from "@smartbit4all/icon";
|
|
16
|
+
import * as i15 from "@smartbit4all/form";
|
|
16
17
|
export declare class SmartViewContextModule {
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartViewContextModule, never>;
|
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SmartViewContextModule, [typeof i1.MessageDialogComponent, typeof i2.SmartViewContextErrorDialogComponent, typeof i3.SmartViewRedirect, typeof i4.UiActionToolbarComponent, typeof i5.UiActionInputDialogComponent, typeof i6.UiActionConfirmDialogComponent], [typeof
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SmartViewContextModule, [typeof i1.MessageDialogComponent, typeof i2.SmartViewContextErrorDialogComponent, typeof i3.SmartViewRedirect, typeof i4.UiActionToolbarComponent, typeof i5.UiActionInputDialogComponent, typeof i6.UiActionConfirmDialogComponent, typeof i7.UiActionFileUploadDialogComponent], [typeof i8.CommonModule, typeof i9.HttpClientModule, typeof i10.MatCommonModule, typeof i11.MatButtonModule, typeof i12.MatIconModule, typeof i13.MatSnackBarModule, typeof i14.SmartIconModule, typeof i15.SmartformModule], [typeof i4.UiActionToolbarComponent, typeof i5.UiActionInputDialogComponent]>;
|
|
19
20
|
static ɵinj: i0.ɵɵInjectorDeclaration<SmartViewContextModule>;
|
|
20
21
|
}
|
|
@@ -71,10 +71,14 @@ export declare class SmartViewContextService implements OnDestroy {
|
|
|
71
71
|
performAction(uuid: string, uiActionRequest: UiActionRequest): Promise<void>;
|
|
72
72
|
performWidgetAction(uuid: string, widgetId: string, nodeId: string, uiActionRequest: UiActionRequest): Promise<void>;
|
|
73
73
|
performWidgetMainAction(uuid: string, widgetId: string, uiActionRequest: UiActionRequest): Promise<void>;
|
|
74
|
+
performUploadAction(uuid: string, uiActionRequest: UiActionRequest, param: 'INPUT' | 'INPUT2', content: any): Promise<void>;
|
|
75
|
+
performUploadMultipleAction(uuid: string, uiActionRequest: UiActionRequest, param: 'INPUT' | 'INPUT2', content: any[]): Promise<void>;
|
|
74
76
|
dataChanged(uuid: string, dataChange: DataChange): Promise<void>;
|
|
75
77
|
private _performAction;
|
|
76
78
|
private _performWidgetAction;
|
|
77
79
|
private _performWidgetMainAction;
|
|
80
|
+
private _performUploadAction;
|
|
81
|
+
private _performUploadMultipleAction;
|
|
78
82
|
private _dataChanged;
|
|
79
83
|
handlePerformActionResponse(viewContextChange: ViewContextChange | undefined): Promise<void>;
|
|
80
84
|
private handleChanges;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|