@mediusinc/mng-commons 5.0.1-rc.0 → 5.1.0-rc.0

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.
Files changed (61) hide show
  1. package/core/descriptors/model.descriptor.d.ts +1 -1
  2. package/core/error/error-helpers.d.ts +18 -1
  3. package/core/i18n/i18n-type.d.ts +0 -9
  4. package/core/services/commons-configuration.service.d.ts +12 -0
  5. package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
  6. package/esm2022/core/error/error-helpers.mjs +20 -1
  7. package/esm2022/core/i18n/i18n-type.mjs +1 -34
  8. package/esm2022/core/services/commons-configuration.service.mjs +16 -1
  9. package/esm2022/model/descriptors/model.descriptor.mjs +1 -1
  10. package/esm2022/model/helpers/i18n.mjs +7 -10
  11. package/esm2022/table/api/descriptors/table.descriptor.mjs +2 -2
  12. package/esm2022/tableview/api/editor/models/field-action-context.model.mjs +1 -1
  13. package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
  14. package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
  15. package/esm2022/tableview/api/editor/models/formly-options.model.mjs +2 -0
  16. package/esm2022/tableview/api/index.mjs +2 -1
  17. package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +9 -4
  18. package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +4 -5
  19. package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +8 -10
  20. package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +4 -4
  21. package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +5 -5
  22. package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +8 -9
  23. package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +5 -5
  24. package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +5 -4
  25. package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +4 -5
  26. package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +5 -5
  27. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +7 -8
  28. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +4 -5
  29. package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +4 -3
  30. package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +23 -0
  31. package/fesm2022/mediusinc-mng-commons-core.mjs +96 -95
  32. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  33. package/fesm2022/mediusinc-mng-commons-model.mjs +7 -10
  34. package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
  35. package/fesm2022/mediusinc-mng-commons-table-api.mjs +1 -1
  36. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  37. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  38. package/fesm2022/mediusinc-mng-commons-tableview.mjs +59 -46
  39. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  40. package/model/descriptors/model.descriptor.d.ts +3 -3
  41. package/model/helpers/i18n.d.ts +1 -3
  42. package/package.json +1 -1
  43. package/tableview/api/editor/models/field-action-context.model.d.ts +3 -3
  44. package/tableview/api/editor/models/form-editor.interface.d.ts +1 -8
  45. package/tableview/api/editor/models/formly-options.model.d.ts +15 -0
  46. package/tableview/api/index.d.ts +1 -0
  47. package/tableview/editor/components/editor/form-editor.component.d.ts +3 -11
  48. package/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.d.ts +3 -4
  49. package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +3 -7
  50. package/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.d.ts +3 -4
  51. package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +3 -4
  52. package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +3 -6
  53. package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +3 -4
  54. package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +3 -4
  55. package/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.d.ts +5 -6
  56. package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +3 -4
  57. package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +3 -4
  58. package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +3 -4
  59. package/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +2 -3
  60. package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +12 -0
  61. package/version-info.json +6 -6
@@ -1,7 +1,7 @@
1
1
  import * as i2 from '@angular/common';
2
2
  import { AsyncPipe, NgTemplateOutlet, JsonPipe, NgStyle, DatePipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, Injectable, signal, inject, Injector, DestroyRef, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, Optional, HostListener, EventEmitter, contentChildren, Input, Output, ViewChildren, ViewChild, LOCALE_ID, HostBinding } from '@angular/core';
4
+ import { InjectionToken, Injectable, signal, inject, Injector, DestroyRef, input, booleanAttribute, output, viewChild, computed, effect, Component, ChangeDetectionStrategy, Optional, untracked, HostListener, EventEmitter, contentChildren, Input, Output, ViewChildren, ViewChild, Directive, LOCALE_ID, HostBinding } from '@angular/core';
5
5
  import { takeUntilDestroyed, toSignal, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
6
6
  import * as i1 from '@angular/router';
7
7
  import { NavigationEnd, Router, ActivatedRoute, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
@@ -2057,11 +2057,13 @@ class FormEditorComponent {
2057
2057
  this.submitButtonElementRef = viewChild('submitButton');
2058
2058
  // formly specifics
2059
2059
  this._form = new UntypedFormGroup({});
2060
+ this._formlyStateDisabledSubject = new BehaviorSubject(false);
2060
2061
  this._formlyOptions = {
2061
2062
  formState: {
2062
2063
  add: false,
2063
2064
  edit: false,
2064
- disabled: false
2065
+ disabled: false,
2066
+ disabled$: this._formlyStateDisabledSubject.asObservable().pipe(distinctUntilChanged())
2065
2067
  }
2066
2068
  };
2067
2069
  this._formlyFields = []; // initialized in ngOnInit, should not be changed after
@@ -2079,6 +2081,9 @@ class FormEditorComponent {
2079
2081
  { allowSignalWrites: true });
2080
2082
  effect(() => {
2081
2083
  this._formlyOptions.formState.disabled = this.isFormDisabled() || this._formlyOptions.formState.descriptor?.disabled === true || this._formlyOptions.formState.details;
2084
+ untracked(() => {
2085
+ this._formlyStateDisabledSubject.next(this._formlyOptions.formState.disabled);
2086
+ });
2082
2087
  });
2083
2088
  }
2084
2089
  ngOnInit() {
@@ -3113,14 +3118,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3113
3118
  type: Injectable
3114
3119
  }] });
3115
3120
 
3116
- class FormlyFieldActionComponent extends FieldType {
3121
+ class ACommonsFormlyFieldType extends FieldType {
3122
+ get descriptor() {
3123
+ return this.props.descriptor;
3124
+ }
3125
+ get options() {
3126
+ return this.field.options;
3127
+ }
3128
+ get formState() {
3129
+ return this.options?.formState || {};
3130
+ }
3131
+ ngOnInit() {
3132
+ this.props.fieldComponent = this;
3133
+ }
3134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ACommonsFormlyFieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3135
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: ACommonsFormlyFieldType, usesInheritance: true, ngImport: i0 }); }
3136
+ }
3137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ACommonsFormlyFieldType, decorators: [{
3138
+ type: Directive
3139
+ }] });
3140
+
3141
+ class FormlyFieldActionComponent extends ACommonsFormlyFieldType {
3117
3142
  constructor() {
3118
3143
  super(...arguments);
3119
3144
  this.buttonClass = 'p-button-primary';
3120
3145
  }
3121
3146
  ngOnInit() {
3122
- this.descriptor = this.props.descriptor;
3123
- this.props.fieldComponent = this;
3147
+ super.ngOnInit();
3124
3148
  this.buttonClass = this.descriptor.button.styleClass.build();
3125
3149
  }
3126
3150
  ngOnDestroy() {
@@ -3163,21 +3187,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3163
3187
  args: [{ standalone: true, selector: 'mng-formly-field-action', imports: [ButtonModule, RippleModule, TranslateModule, TooltipModule, JsonPipe, MessageModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n" }]
3164
3188
  }] });
3165
3189
 
3166
- class FormlyFieldAutocompleteComponent extends FieldType {
3190
+ class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
3167
3191
  constructor() {
3168
3192
  super(...arguments);
3169
3193
  this.destroyRef = inject(DestroyRef);
3170
- this.subscriptions = [];
3171
3194
  }
3172
3195
  ngOnInit() {
3173
- this.aFormControl = this.formControl;
3174
- this.descriptor = this.props.descriptor;
3175
- this.props.fieldComponent = this;
3196
+ super.ngOnInit();
3176
3197
  // emit lifecycle event
3177
3198
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, this, {
3178
3199
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT
3179
3200
  });
3180
- this.aFormControl.valueChanges.pipe(startWith(this.aFormControl.value), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(v => {
3201
+ this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(v => {
3181
3202
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, this, {
3182
3203
  value: v
3183
3204
  });
@@ -3196,20 +3217,20 @@ class FormlyFieldAutocompleteComponent extends FieldType {
3196
3217
  });
3197
3218
  }
3198
3219
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3199
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3200
3221
  }
3201
3222
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
3202
3223
  type: Component,
3203
- args: [{ standalone: true, selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n" }]
3224
+ args: [{ standalone: true, selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n" }]
3204
3225
  }] });
3205
3226
 
3206
- class FormlyFieldCustomComponent extends FieldType {
3227
+ class FormlyFieldCustomComponent extends ACommonsFormlyFieldType {
3207
3228
  constructor() {
3208
3229
  super(...arguments);
3209
3230
  this.inputs = {};
3210
3231
  }
3211
3232
  ngOnInit() {
3212
- this.descriptor = this.props.descriptor;
3233
+ super.ngOnInit();
3213
3234
  this.inputs = {
3214
3235
  field: this.field,
3215
3236
  model: this.model,
@@ -3238,20 +3259,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3238
3259
  }]
3239
3260
  }] });
3240
3261
 
3241
- class FormlyFieldDropdownComponent extends FieldType {
3262
+ class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
3242
3263
  constructor() {
3243
3264
  super(...arguments);
3244
3265
  this.destroyRef = inject(DestroyRef);
3245
3266
  }
3246
3267
  ngOnInit() {
3247
- this.dFormControl = this.formControl;
3248
- this.descriptor = this.props.descriptor;
3249
- this.props.fieldComponent = this;
3268
+ super.ngOnInit();
3250
3269
  // emit lifecycle event
3251
3270
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, this, {
3252
3271
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT
3253
3272
  });
3254
- this.dFormControl.valueChanges.pipe(startWith(this.dFormControl.value), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(v => {
3273
+ this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(v => {
3255
3274
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, this, {
3256
3275
  value: v
3257
3276
  });
@@ -3265,22 +3284,21 @@ class FormlyFieldDropdownComponent extends FieldType {
3265
3284
  });
3266
3285
  }
3267
3286
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3268
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur", "loading", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3287
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur", "loading", "disabled"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3269
3288
  }
3270
3289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
3271
3290
  type: Component,
3272
- args: [{ standalone: true, selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
3291
+ args: [{ standalone: true, selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"$any(formControl)\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
3273
3292
  }] });
3274
3293
 
3275
- class FormlyFieldFieldsetComponent extends FieldType {
3294
+ class FormlyFieldFieldsetComponent extends ACommonsFormlyFieldType {
3276
3295
  constructor() {
3277
3296
  super(...arguments);
3278
3297
  this.typeFieldset = FieldGroupTypeEnum.Fieldset;
3279
3298
  this.typeLogical = FieldGroupTypeEnum.Logical;
3280
3299
  }
3281
3300
  ngOnInit() {
3282
- this.descriptor = this.props.descriptor;
3283
- this.props.fieldComponent = this;
3301
+ super.ngOnInit();
3284
3302
  }
3285
3303
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3286
3304
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$4.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -3290,7 +3308,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3290
3308
  args: [{ standalone: true, selector: 'mng-formly-field-fieldset', imports: [FieldsetModule, FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n" }]
3291
3309
  }] });
3292
3310
 
3293
- class FormlyFieldInputComponent extends FieldType {
3311
+ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
3294
3312
  constructor() {
3295
3313
  super(...arguments);
3296
3314
  this.NUMBER_MIN_SAFE = Number.MIN_SAFE_INTEGER;
@@ -3305,8 +3323,8 @@ class FormlyFieldInputComponent extends FieldType {
3305
3323
  this.imageFormArray = this.formBuilder.array([]);
3306
3324
  }
3307
3325
  ngOnInit() {
3326
+ super.ngOnInit();
3308
3327
  this.iFormControl = this.formControl;
3309
- this.descriptor = this.props.descriptor;
3310
3328
  this.props.fieldComponent = this;
3311
3329
  this.formEditorComponent = this.props.formEditorComponent;
3312
3330
  if (this.descriptor.fieldType === FieldInputTypeEnum.Currency) {
@@ -3458,14 +3476,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3458
3476
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin ?? NUMBER_MIN_SAFE : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax ?? NUMBER_MAX_SAFE : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n" }]
3459
3477
  }] });
3460
3478
 
3461
- class FormlyFieldLabelComponent extends FieldType {
3479
+ class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
3462
3480
  constructor() {
3463
3481
  super(...arguments);
3464
3482
  this.className = 'hidden';
3465
3483
  }
3466
3484
  ngOnInit() {
3467
- this.descriptor = this.props.descriptor;
3468
- this.props.fieldComponent = this;
3485
+ super.ngOnInit();
3469
3486
  this.formControl?.patchValue(this.descriptor.label);
3470
3487
  }
3471
3488
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
@@ -3479,7 +3496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3479
3496
  args: ['class']
3480
3497
  }] } });
3481
3498
 
3482
- class FormlyFieldLookupDialogComponent extends FieldType {
3499
+ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
3483
3500
  constructor(injector) {
3484
3501
  super();
3485
3502
  this.injector = injector;
@@ -3498,8 +3515,7 @@ class FormlyFieldLookupDialogComponent extends FieldType {
3498
3515
  this.dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();
3499
3516
  }
3500
3517
  ngOnInit() {
3501
- this.descriptor = this.props.descriptor;
3502
- this.props.fieldComponent = this;
3518
+ super.ngOnInit();
3503
3519
  // emit lifecycle event
3504
3520
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, this, {
3505
3521
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT
@@ -3663,7 +3679,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3663
3679
  args: [TableComponent]
3664
3680
  }] } });
3665
3681
 
3666
- class FormlyFieldTableDialogFormComponent extends FieldType {
3682
+ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
3667
3683
  constructor() {
3668
3684
  super(...arguments);
3669
3685
  this.injector = inject(Injector);
@@ -3676,8 +3692,7 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
3676
3692
  this.isEnabled$ = this.isDisabledSubject.asObservable().pipe(distinctUntilChanged(), map(e => !e));
3677
3693
  }
3678
3694
  ngOnInit() {
3679
- this.descriptor = this.props.descriptor;
3680
- this.props.fieldComponent = this;
3695
+ super.ngOnInit();
3681
3696
  const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.View);
3682
3697
  const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Add);
3683
3698
  const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Edit);
@@ -3723,7 +3738,7 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
3723
3738
  })
3724
3739
  .withRunNotificationSuccess(undefined, undefined, false)
3725
3740
  .withRunNotificationError(undefined, undefined, false)
3726
- .withIsVisibleFunction(() => of(!this.options?.formState.disabled))
3741
+ .withIsVisibleFunction(() => this.formState.disabled$.pipe(map(v => !v)))
3727
3742
  .withIsEnabledFunction(() => this.isEnabled$);
3728
3743
  addAction.button.withLabel(null).withIcon('pi pi-plus');
3729
3744
  this.actions.push(addAction);
@@ -3754,7 +3769,7 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
3754
3769
  })
3755
3770
  .withRunNotificationSuccess(undefined, undefined, false)
3756
3771
  .withRunNotificationError(undefined, undefined, false)
3757
- .withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : of(!this.formControl?.disabled)))
3772
+ .withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.formState.disabled$.pipe(map(v => !v))))
3758
3773
  .withIsEnabledFunction(() => this.isEnabled$);
3759
3774
  editAction.button.withLabel(null).withIcon('pi pi-pencil');
3760
3775
  this.actions.push(editAction);
@@ -3796,7 +3811,7 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
3796
3811
  })
3797
3812
  .withRunNotificationSuccess(undefined, undefined, false)
3798
3813
  .withRunNotificationError(undefined, undefined, false)
3799
- .withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : of(!this.options?.formState.disabled)))
3814
+ .withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.formState.disabled$.pipe(map(v => !v))))
3800
3815
  .withIsEnabledFunction(() => this.isEnabled$);
3801
3816
  deleteAction.button.withLabel(null).withIcon('pi pi-trash');
3802
3817
  this.actions.push(deleteAction);
@@ -3862,7 +3877,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3862
3877
  args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
3863
3878
  }] });
3864
3879
 
3865
- class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3880
+ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType {
3866
3881
  constructor() {
3867
3882
  super(...arguments);
3868
3883
  this.injector = inject(Injector);
@@ -3883,8 +3898,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3883
3898
  this.searchDebounceSubject = new Subject();
3884
3899
  }
3885
3900
  ngOnInit() {
3886
- this.descriptor = this.props.descriptor;
3887
- this.props.fieldComponent = this;
3901
+ super.ngOnInit();
3888
3902
  this.dialogIsLoadingSubject.next(false);
3889
3903
  if (this.descriptor.lookupTableDataProvider.serviceType) {
3890
3904
  this.dialogDataProviderService = this.injector.get(this.descriptor.lookupTableDataProvider.serviceType);
@@ -4035,7 +4049,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4035
4049
  args: ['addTableComponent']
4036
4050
  }] } });
4037
4051
 
4038
- class FormlyFieldTabsComponent extends FieldType {
4052
+ class FormlyFieldTabsComponent extends ACommonsFormlyFieldType {
4039
4053
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4040
4054
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of field.fieldGroup; track tab) {\n <p-tabPanel [header]=\"tab.props?.label! | translate\" [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$6.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$6.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4041
4055
  }
@@ -4095,7 +4109,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4095
4109
  args: [{ standalone: true, selector: 'mng-formly-field-wrapper', imports: [TranslateModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field'\">\n <div class=\"grid mt-0\">\n @if (props.label) {\n <label [for]=\"key\" class=\"col\" [class]=\"props['descriptor']?.['labelClassName'] ?? ''\"\n >{{ props!.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n" }]
4096
4110
  }] });
4097
4111
 
4098
- class FormlyFieldDatepickerComponent extends FieldType {
4112
+ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
4099
4113
  constructor() {
4100
4114
  super(...arguments);
4101
4115
  this.dpFormControl = new FormControl();
@@ -4107,8 +4121,7 @@ class FormlyFieldDatepickerComponent extends FieldType {
4107
4121
  this.dateTimeWithMillis = this.moduleConfig?.serialization?.dateTimeWithMillis ?? true;
4108
4122
  }
4109
4123
  ngOnInit() {
4110
- this.descriptor = this.props.descriptor;
4111
- this.props.fieldComponent = this;
4124
+ super.ngOnInit();
4112
4125
  // emit lifecycle event
4113
4126
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, this, {
4114
4127
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT