@smartbit4all/ng-client 3.1.15 → 3.1.17

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.
@@ -7532,6 +7532,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
7532
7532
  args: [MAT_SNACK_BAR_DATA]
7533
7533
  }] }, { type: SmartViewContextService }, { type: UiActionDescriptorService }]; } });
7534
7534
 
7535
+ class InvalidFieldsSnackBarComponent {
7536
+ constructor(data) {
7537
+ this.data = data;
7538
+ }
7539
+ ngOnInit() { }
7540
+ }
7541
+ InvalidFieldsSnackBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: InvalidFieldsSnackBarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }], target: i0.ɵɵFactoryTarget.Component });
7542
+ InvalidFieldsSnackBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: InvalidFieldsSnackBarComponent, selector: "app-invalid-fields-snack-bar", ngImport: i0, template: "<div class=\"invalidFieldsSnackBar\">\r\n <!-- <div class=\"invalidFieldsSnackBarContainer\" *ngIf=\"data.message\">\r\n <span class=\"successSnakBarContainer\" matSnackBarLabel>\r\n {{ data.message }}\r\n </span>\r\n </div> -->\r\n <div class=\"invalidFieldsSnackBarContainer\">\r\n <span class=\"invalidFieldsMessage\" matSnackBarLabel> Hi\u00E1nyos vagy hib\u00E1s adatok! </span>\r\n </div>\r\n</div>\r\n", styles: [".invalidFieldsSnackBar ::ng-deep .mat-snack-bar-container{text-align:center;border-radius:2rem}.invalidFieldsMessage{color:#fff}\n"] });
7543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: InvalidFieldsSnackBarComponent, decorators: [{
7544
+ type: Component,
7545
+ args: [{ selector: 'app-invalid-fields-snack-bar', template: "<div class=\"invalidFieldsSnackBar\">\r\n <!-- <div class=\"invalidFieldsSnackBarContainer\" *ngIf=\"data.message\">\r\n <span class=\"successSnakBarContainer\" matSnackBarLabel>\r\n {{ data.message }}\r\n </span>\r\n </div> -->\r\n <div class=\"invalidFieldsSnackBarContainer\">\r\n <span class=\"invalidFieldsMessage\" matSnackBarLabel> Hi\u00E1nyos vagy hib\u00E1s adatok! </span>\r\n </div>\r\n</div>\r\n", styles: [".invalidFieldsSnackBar ::ng-deep .mat-snack-bar-container{text-align:center;border-radius:2rem}.invalidFieldsMessage{color:#fff}\n"] }]
7546
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
7547
+ type: Inject,
7548
+ args: [MAT_SNACK_BAR_DATA]
7549
+ }] }]; } });
7550
+
7535
7551
  class UiActionConfirmDialogComponent {
7536
7552
  constructor(service, manager) {
7537
7553
  this.service = service;
@@ -7920,8 +7936,9 @@ class UiActionService {
7920
7936
  }
7921
7937
  else {
7922
7938
  this.uiActionModel.serviceToUse.submitForm(validate);
7923
- if (validate &&
7924
- this.uiActionModel.serviceToUse.getInvalidFields().invalidFieldKeys.length) {
7939
+ let invalidFields = this.uiActionModel.serviceToUse.getInvalidFields();
7940
+ if (validate && invalidFields.invalidFieldKeys.length) {
7941
+ this.showInvalidFieldsSnackbar(invalidFields);
7925
7942
  return;
7926
7943
  }
7927
7944
  }
@@ -8055,6 +8072,13 @@ class UiActionService {
8055
8072
  data: uiAction,
8056
8073
  });
8057
8074
  }
8075
+ showInvalidFieldsSnackbar(invalidFields) {
8076
+ this._snackBar.openFromComponent(InvalidFieldsSnackBarComponent, {
8077
+ duration: 5 * 1000,
8078
+ panelClass: ['backgroundColor-warn'],
8079
+ data: invalidFields,
8080
+ });
8081
+ }
8058
8082
  }
8059
8083
  UiActionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UiActionService, deps: [{ token: UiActionConfirmDialogService }, { token: UiActionInputDialogService }, { token: UiActionFileUploadDialogService }, { token: i1$3.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
8060
8084
  UiActionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UiActionService, providedIn: 'root' });
@@ -8174,7 +8198,8 @@ SmartViewContextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
8174
8198
  UiActionToolbarComponent,
8175
8199
  UiActionInputDialogComponent,
8176
8200
  UiActionConfirmDialogComponent,
8177
- UiActionFileUploadDialogComponent], imports: [CommonModule,
8201
+ UiActionFileUploadDialogComponent,
8202
+ InvalidFieldsSnackBarComponent], imports: [CommonModule,
8178
8203
  HttpClientModule,
8179
8204
  MatCommonModule,
8180
8205
  MatButtonModule,
@@ -8211,6 +8236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
8211
8236
  UiActionInputDialogComponent,
8212
8237
  UiActionConfirmDialogComponent,
8213
8238
  UiActionFileUploadDialogComponent,
8239
+ InvalidFieldsSnackBarComponent,
8214
8240
  ],
8215
8241
  imports: [
8216
8242
  CommonModule,
@@ -12553,7 +12579,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
12553
12579
  // this.model = await this.viewContext.load(this.uuid);
12554
12580
  await this.viewContext.load2(this.uuid);
12555
12581
  }
12556
- async execute(uiAction, options) {
12582
+ async executeUiAction(uiAction, options) {
12557
12583
  this.uiActionService.uiActionModel = {
12558
12584
  serviceToUse: this,
12559
12585
  uiAction: uiAction,