@smartbit4all/ng-client 1.0.17 → 1.0.19

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.
@@ -25,8 +25,9 @@ import * as i3$2 from '@angular/material/snack-bar';
25
25
  import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
26
26
  import { Validators } from '@angular/forms';
27
27
  import * as i5$1 from '@smartbit4all/form';
28
- import { SmartFormWidgetType, SmartFormWidgetDirection, SmartValidatorName, SmartformModule } from '@smartbit4all/form';
28
+ import { SmartFormWidgetType, SmartValidatorName, SmartFormWidgetDirection, SmartformModule } from '@smartbit4all/form';
29
29
  import { __decorate, __param } from 'tslib';
30
+ import { SmarttreeGenericService } from '@smartbit4all/tree';
30
31
 
31
32
  /**
32
33
  * Custom HttpParameterCodec
@@ -3308,26 +3309,30 @@ class UiActionInputDialogComponent {
3308
3309
  else {
3309
3310
  type = SmartFormWidgetType.TEXT_BOX;
3310
3311
  }
3312
+ let widgets = [
3313
+ {
3314
+ key: inputName,
3315
+ label: '',
3316
+ type,
3317
+ value: '',
3318
+ validators: [
3319
+ {
3320
+ validator: Validators.required,
3321
+ name: SmartValidatorName.required,
3322
+ errorMessage: 'Ez a mező kötelező',
3323
+ },
3324
+ ],
3325
+ placeholder: this.descriptor[this.dialogType].placeholder ?? '',
3326
+ showLabel: true,
3327
+ },
3328
+ ];
3329
+ if (widgets[0].type === SmartFormWidgetType.TEXT_FIELD && this.descriptor[this.dialogType]?.mask) {
3330
+ widgets[0].mask = this.descriptor[this.dialogType]?.mask;
3331
+ }
3311
3332
  this.folderForm = {
3312
3333
  direction: SmartFormWidgetDirection.COL,
3313
3334
  model,
3314
- widgets: [
3315
- {
3316
- key: inputName,
3317
- label: '',
3318
- type,
3319
- value: '',
3320
- validators: [
3321
- {
3322
- validator: Validators.required,
3323
- name: SmartValidatorName.required,
3324
- errorMessage: 'Ez a mező kötelező',
3325
- },
3326
- ],
3327
- placeholder: this.descriptor[this.dialogType].placeholder ?? '',
3328
- showLabel: true,
3329
- },
3330
- ],
3335
+ widgets,
3331
3336
  };
3332
3337
  }
3333
3338
  save() {
@@ -3737,6 +3742,7 @@ class SmartSubject extends Subject {
3737
3742
 
3738
3743
  let SmartComponentApiClient = class SmartComponentApiClient {
3739
3744
  constructor(inject, auth, pageName) {
3745
+ this.inject = inject;
3740
3746
  this.auth = auth;
3741
3747
  this.pageName = pageName;
3742
3748
  this._destroy$ = new Subject();
@@ -3778,6 +3784,15 @@ let SmartComponentApiClient = class SmartComponentApiClient {
3778
3784
  this._data = model;
3779
3785
  this.dataChanged.next();
3780
3786
  }
3787
+ get smartTreeService() {
3788
+ return this._smartTreeService;
3789
+ }
3790
+ set smartTreeService(smartTreeService) {
3791
+ if (this._smartTreeService !== undefined) {
3792
+ throw Error('The default tree has already set up!');
3793
+ }
3794
+ this._smartTreeService = smartTreeService;
3795
+ }
3781
3796
  _ngOnInit() {
3782
3797
  this.run();
3783
3798
  }
@@ -3856,6 +3871,12 @@ let SmartComponentApiClient = class SmartComponentApiClient {
3856
3871
  }
3857
3872
  return smartGrid;
3858
3873
  }
3874
+ setUpDefaultTree(treeId) {
3875
+ this.smartTreeService = new SmarttreeGenericService(this.inject, this.pageName, treeId);
3876
+ }
3877
+ createTreeService(treeId) {
3878
+ return new SmarttreeGenericService(this.inject, this.pageName, treeId);
3879
+ }
3859
3880
  };
3860
3881
  SmartComponentApiClient = __decorate([
3861
3882
  __param(2, Inject('pageName'))