@smartbit4all/ng-client 1.1.31 → 1.1.33
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 +12 -3
- package/esm2020/lib/smart-client/smart-file-uploader/smart-file-uploader.component.mjs +47 -0
- package/esm2020/lib/smart-ng-client.module.mjs +30 -10
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +2 -2
- package/esm2020/projects.mjs +7 -6
- package/fesm2015/smartbit4all-ng-client.mjs +85 -19
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +86 -19
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +9 -1
- package/lib/smart-client/smart-file-uploader/smart-file-uploader.component.d.ts +18 -0
- package/lib/smart-ng-client.module.d.ts +7 -3
- package/package.json +1 -1
- package/projects.d.ts +6 -5
- package/smartbit4all-ng-client-1.1.33.tgz +0 -0
- package/smartbit4all-ng-client-1.1.31.tgz +0 -0
|
@@ -4018,10 +4018,10 @@ class UiActionFileUploadDialogComponent {
|
|
|
4018
4018
|
}
|
|
4019
4019
|
}
|
|
4020
4020
|
UiActionFileUploadDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, deps: [{ token: UiActionFileUploadDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4021
|
-
UiActionFileUploadDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [""], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }] });
|
|
4021
|
+
UiActionFileUploadDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }] });
|
|
4022
4022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
|
|
4023
4023
|
type: Component,
|
|
4024
|
-
args: [{ selector: 'lib-ui-action-file-upload-dialog', template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [""] }]
|
|
4024
|
+
args: [{ selector: 'lib-ui-action-file-upload-dialog', template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
4025
4025
|
}], ctorParameters: function () { return [{ type: UiActionFileUploadDialogService }, { type: UiActionDescriptorService }]; } });
|
|
4026
4026
|
|
|
4027
4027
|
class UiActionFileUploadDialogService extends SmartdialogService {
|
|
@@ -4409,21 +4409,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4409
4409
|
}]
|
|
4410
4410
|
}] });
|
|
4411
4411
|
|
|
4412
|
-
class SmartNgClientModule {
|
|
4413
|
-
}
|
|
4414
|
-
SmartNgClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4415
|
-
SmartNgClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, imports: [SmartSessionModule, SmartViewContextModule], exports: [SmartSessionModule, SmartViewContextModule] });
|
|
4416
|
-
SmartNgClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, providers: [SmartNgClientService], imports: [[SmartSessionModule, SmartViewContextModule], SmartSessionModule, SmartViewContextModule] });
|
|
4417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, decorators: [{
|
|
4418
|
-
type: NgModule,
|
|
4419
|
-
args: [{
|
|
4420
|
-
declarations: [],
|
|
4421
|
-
imports: [SmartSessionModule, SmartViewContextModule],
|
|
4422
|
-
exports: [SmartSessionModule, SmartViewContextModule],
|
|
4423
|
-
providers: [SmartNgClientService],
|
|
4424
|
-
}]
|
|
4425
|
-
}] });
|
|
4426
|
-
|
|
4427
4412
|
var UiActionDialogType;
|
|
4428
4413
|
(function (UiActionDialogType) {
|
|
4429
4414
|
UiActionDialogType["inputDialog"] = "inputDialog";
|
|
@@ -4435,6 +4420,79 @@ var UiActionDialogType;
|
|
|
4435
4420
|
* Public API Surface of smart-view-context
|
|
4436
4421
|
*/
|
|
4437
4422
|
|
|
4423
|
+
class SmartFileUploaderComponent {
|
|
4424
|
+
constructor(uiActionService, uiActionDescriptorService) {
|
|
4425
|
+
this.uiActionService = uiActionService;
|
|
4426
|
+
this.uiActionDescriptorService = uiActionDescriptorService;
|
|
4427
|
+
}
|
|
4428
|
+
ngOnChanges(changes) {
|
|
4429
|
+
this.config = changes['config'].currentValue;
|
|
4430
|
+
}
|
|
4431
|
+
async setUp() {
|
|
4432
|
+
this.uiActionModel = this.config?.smartComponent.uiActionModels.find((uiActionModel) => uiActionModel.uiAction.code === this.config?.uiActionCode);
|
|
4433
|
+
if (!this.uiActionModel) {
|
|
4434
|
+
throw new Error(`UiAction with code ${this.config?.uiActionCode} could not found`);
|
|
4435
|
+
}
|
|
4436
|
+
const descriptor = await this.uiActionDescriptorService.getActionDescriptor(this.uiActionModel.uiAction);
|
|
4437
|
+
this.i18n = {
|
|
4438
|
+
addFile: descriptor.upload?.title ?? 'dokumentum hozzáadása',
|
|
4439
|
+
browseOrDrag: descriptor.upload?.description ?? 'tallózás vagy behúzás',
|
|
4440
|
+
formats: descriptor.upload?.formats ?? '',
|
|
4441
|
+
maxSize: descriptor.upload?.maxSize ?? '',
|
|
4442
|
+
upload: descriptor.upload?.uploadButtonTitle,
|
|
4443
|
+
};
|
|
4444
|
+
}
|
|
4445
|
+
executeUpload(files) {
|
|
4446
|
+
this.uiActionModel.uiAction.params = {
|
|
4447
|
+
...this.uiActionModel.uiAction.params,
|
|
4448
|
+
_files: files,
|
|
4449
|
+
isMultiple: this.config?.isMultiple,
|
|
4450
|
+
param: 'INPUT',
|
|
4451
|
+
};
|
|
4452
|
+
this.uiActionService.uiActionModel = this.uiActionModel;
|
|
4453
|
+
this.uiActionService.execute(this.uiActionModel.uiAction);
|
|
4454
|
+
}
|
|
4455
|
+
}
|
|
4456
|
+
SmartFileUploaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartFileUploaderComponent, deps: [{ token: UiActionService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4457
|
+
SmartFileUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartFileUploaderComponent, selector: "smart-file-uploader4sc", inputs: { config: "config" }, usesOnChanges: true, ngImport: i0, template: "<smartfileuploader\n *ngIf=\"i18n\"\n [i18n]=\"i18n\"\n [fileFormats]=\"config?.fileFormats\"\n [isMultiple]=\"config?.isMultiple\"\n [maxSizeMb]=\"config?.maxSizeMb\"\n [uploadCallback]=\"executeUpload.bind(this)\"\n></smartfileuploader>\n", styles: [""], components: [{ type: i5.SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartFileUploaderComponent, decorators: [{
|
|
4459
|
+
type: Component,
|
|
4460
|
+
args: [{ selector: 'smart-file-uploader4sc', template: "<smartfileuploader\n *ngIf=\"i18n\"\n [i18n]=\"i18n\"\n [fileFormats]=\"config?.fileFormats\"\n [isMultiple]=\"config?.isMultiple\"\n [maxSizeMb]=\"config?.maxSizeMb\"\n [uploadCallback]=\"executeUpload.bind(this)\"\n></smartfileuploader>\n", styles: [""] }]
|
|
4461
|
+
}], ctorParameters: function () { return [{ type: UiActionService }, { type: UiActionDescriptorService }]; }, propDecorators: { config: [{
|
|
4462
|
+
type: Input
|
|
4463
|
+
}] } });
|
|
4464
|
+
|
|
4465
|
+
class SmartNgClientModule {
|
|
4466
|
+
}
|
|
4467
|
+
SmartNgClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4468
|
+
SmartNgClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, declarations: [SmartFileUploaderComponent], imports: [BrowserModule,
|
|
4469
|
+
MatCommonModule,
|
|
4470
|
+
SmartSessionModule,
|
|
4471
|
+
SmartViewContextModule,
|
|
4472
|
+
SmartformModule], exports: [SmartSessionModule, SmartViewContextModule, SmartFileUploaderComponent] });
|
|
4473
|
+
SmartNgClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, providers: [SmartNgClientService], imports: [[
|
|
4474
|
+
BrowserModule,
|
|
4475
|
+
MatCommonModule,
|
|
4476
|
+
SmartSessionModule,
|
|
4477
|
+
SmartViewContextModule,
|
|
4478
|
+
SmartformModule,
|
|
4479
|
+
], SmartSessionModule, SmartViewContextModule] });
|
|
4480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, decorators: [{
|
|
4481
|
+
type: NgModule,
|
|
4482
|
+
args: [{
|
|
4483
|
+
declarations: [SmartFileUploaderComponent],
|
|
4484
|
+
imports: [
|
|
4485
|
+
BrowserModule,
|
|
4486
|
+
MatCommonModule,
|
|
4487
|
+
SmartSessionModule,
|
|
4488
|
+
SmartViewContextModule,
|
|
4489
|
+
SmartformModule,
|
|
4490
|
+
],
|
|
4491
|
+
exports: [SmartSessionModule, SmartViewContextModule, SmartFileUploaderComponent],
|
|
4492
|
+
providers: [SmartNgClientService],
|
|
4493
|
+
}]
|
|
4494
|
+
}] });
|
|
4495
|
+
|
|
4438
4496
|
class SmartAuthService {
|
|
4439
4497
|
constructor() {
|
|
4440
4498
|
this.bffApisHaveBeenSetUp = false;
|
|
@@ -4577,7 +4635,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
4577
4635
|
delete uiActionRequest.params['_files'];
|
|
4578
4636
|
delete uiActionRequest.params['isMultiple'];
|
|
4579
4637
|
if (!isMultiple) {
|
|
4580
|
-
await this.viewContext.performUploadAction(this.uuid, uiActionRequest, param, files);
|
|
4638
|
+
await this.viewContext.performUploadAction(this.uuid, uiActionRequest, param, files[0]);
|
|
4581
4639
|
}
|
|
4582
4640
|
else {
|
|
4583
4641
|
await this.viewContext.performUploadMultipleAction(this.uuid, uiActionRequest, param, files);
|
|
@@ -4631,6 +4689,15 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
4631
4689
|
this.widgets.addWidget(treeId, treeService);
|
|
4632
4690
|
return treeService;
|
|
4633
4691
|
}
|
|
4692
|
+
addFileUploader(uiActionCode, fileFormats, maxSizeMb, isMultiple) {
|
|
4693
|
+
return {
|
|
4694
|
+
uiActionCode,
|
|
4695
|
+
smartComponent: this,
|
|
4696
|
+
fileFormats,
|
|
4697
|
+
isMultiple,
|
|
4698
|
+
maxSizeMb,
|
|
4699
|
+
};
|
|
4700
|
+
}
|
|
4634
4701
|
// #region handle changes
|
|
4635
4702
|
handleValueChanges(valueChange) {
|
|
4636
4703
|
let dataChange;
|
|
@@ -4834,5 +4901,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4834
4901
|
* Generated bundle index. Do not edit.
|
|
4835
4902
|
*/
|
|
4836
4903
|
|
|
4837
|
-
export { APIS, ApiModule, ApiQueueService, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
|
|
4904
|
+
export { APIS, ApiModule, ApiQueueService, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartFileUploaderComponent, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
|
|
4838
4905
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|