@mediusinc/mng-commons 0.9.1 → 0.9.4
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/assets/i18n/sl.json +1 -1
- package/dev-scripts/version-info.js +4 -2
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +25 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +32 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +12 -8
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +19 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +30 -3
- package/fesm2015/mediusinc-mng-commons.mjs +110 -12
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +107 -12
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +5 -2
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +2 -0
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +3 -2
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +3 -2
- package/package.json +1 -1
- package/scss/mng-overrides/_mixins.scss +2 -0
- package/scss/{theme/default/_mng-variables.scss → mng-overrides/_variables.scss} +0 -0
- package/scss/theme/default/_mng-variables-theme-dark.scss +1 -1
- package/scss/theme/default/_mng-variables-theme-light.scss +1 -1
- package/version-info.json +5 -5
|
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import * as i1$6 from '@angular/common/http';
|
|
4
4
|
import { HttpErrorResponse, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { InjectionToken, Injectable, Pipe, Inject, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, Directive, ContentChildren, ViewChild, forwardRef, ViewChildren, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
6
|
+
import { InjectionToken, Injectable, Pipe, Inject, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, Directive, ContentChildren, ViewChild, forwardRef, LOCALE_ID, ViewChildren, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
7
7
|
import * as i4$1 from '@angular/forms';
|
|
8
8
|
import { Validators, FormGroup, FormArray, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i1 from '@angular/router';
|
|
@@ -6151,7 +6151,16 @@ class MngFormEditorComponent {
|
|
|
6151
6151
|
const formValue = this.form.getRawValue();
|
|
6152
6152
|
this.descriptor.fields.forEach(field => {
|
|
6153
6153
|
if (field && field.setter) {
|
|
6154
|
-
field.
|
|
6154
|
+
const splitPath = field.property.split('.');
|
|
6155
|
+
let fieldValue = formValue;
|
|
6156
|
+
for (let i = 0; i < splitPath.length; i++) {
|
|
6157
|
+
const currentSubPath = splitPath[i];
|
|
6158
|
+
if (typeof fieldValue[currentSubPath] !== 'object') {
|
|
6159
|
+
fieldValue[currentSubPath] = {};
|
|
6160
|
+
}
|
|
6161
|
+
fieldValue = fieldValue[currentSubPath];
|
|
6162
|
+
}
|
|
6163
|
+
field.setter(formValue, fieldValue);
|
|
6155
6164
|
}
|
|
6156
6165
|
});
|
|
6157
6166
|
return formValue;
|
|
@@ -6229,7 +6238,20 @@ class MngFormEditorComponent {
|
|
|
6229
6238
|
const formModel = JSON.parse(JSON.stringify(item ?? {}));
|
|
6230
6239
|
this.descriptor.fields.forEach(field => {
|
|
6231
6240
|
if (field.getter && item) {
|
|
6232
|
-
|
|
6241
|
+
const splitPath = field.property.split('.');
|
|
6242
|
+
let currentObject = formModel;
|
|
6243
|
+
for (let i = 0; i < splitPath.length; i++) {
|
|
6244
|
+
const currentSubPath = splitPath[i];
|
|
6245
|
+
if (i === splitPath.length - 1) {
|
|
6246
|
+
currentObject[currentSubPath] = field.getter(item);
|
|
6247
|
+
}
|
|
6248
|
+
else {
|
|
6249
|
+
if (typeof currentObject[currentSubPath] !== 'object') {
|
|
6250
|
+
currentObject[currentSubPath] = {};
|
|
6251
|
+
}
|
|
6252
|
+
currentObject = currentObject[currentSubPath];
|
|
6253
|
+
}
|
|
6254
|
+
}
|
|
6233
6255
|
}
|
|
6234
6256
|
});
|
|
6235
6257
|
if (typeof this.formOptions.resetModel === 'function') {
|
|
@@ -6905,21 +6927,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
6905
6927
|
}] } });
|
|
6906
6928
|
|
|
6907
6929
|
class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
6930
|
+
constructor() {
|
|
6931
|
+
super(...arguments);
|
|
6932
|
+
this.subscriptions = [];
|
|
6933
|
+
}
|
|
6908
6934
|
ngOnInit() {
|
|
6909
6935
|
this.aFormControl = this.formControl;
|
|
6910
6936
|
this.descriptor = this.to['descriptor'];
|
|
6937
|
+
// emit lifecycle event
|
|
6938
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
6939
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6940
|
+
});
|
|
6941
|
+
const subscription = this.aFormControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6942
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldAutocompleteComponent, this, {
|
|
6943
|
+
value: v
|
|
6944
|
+
});
|
|
6945
|
+
});
|
|
6946
|
+
this.subscriptions.push(subscription);
|
|
6947
|
+
}
|
|
6948
|
+
ngAfterViewInit() {
|
|
6949
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
6950
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT
|
|
6951
|
+
});
|
|
6952
|
+
}
|
|
6953
|
+
ngOnDestroy() {
|
|
6954
|
+
this.subscriptions.forEach(value => value.unsubscribe());
|
|
6955
|
+
// emit lifecycle event
|
|
6956
|
+
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldAutocompleteComponent, this, {
|
|
6957
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6958
|
+
});
|
|
6911
6959
|
}
|
|
6912
6960
|
}
|
|
6913
6961
|
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6914
|
-
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6962
|
+
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6915
6963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
6916
6964
|
type: Component,
|
|
6917
|
-
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
6965
|
+
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [itemsValueProperty]=\"$any(descriptor.itemsValueProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
6918
6966
|
}] });
|
|
6919
6967
|
|
|
6920
6968
|
class MngFormlyFieldInputComponent extends FieldType {
|
|
6921
|
-
constructor() {
|
|
6922
|
-
super(
|
|
6969
|
+
constructor(applicationLocale) {
|
|
6970
|
+
super();
|
|
6971
|
+
this.applicationLocale = applicationLocale;
|
|
6923
6972
|
this.numberFieldMode = 'decimal';
|
|
6924
6973
|
this.files = [];
|
|
6925
6974
|
this.subscriptions = [];
|
|
@@ -6987,12 +7036,15 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
6987
7036
|
}
|
|
6988
7037
|
}
|
|
6989
7038
|
}
|
|
6990
|
-
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, deps:
|
|
6991
|
-
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"$any(descriptor.locale)\"\n [mode]=\"$any(numberFieldMode)\"\n [currency]=\"$any(currency)\"\n [currencyDisplay]=\"$any(descriptor.currencyDisplay)\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(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 </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n *ngSwitchCase=\"'file'\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"$any(descriptor.fileAccept)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n </p-fileUpload>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$3.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$2.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }, { type: i7.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler"] }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i11.InputText, selector: "[pInputText]" }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7039
|
+
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
7040
|
+
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"$any(descriptor.locale ?? applicationLocale)\"\n [mode]=\"$any(numberFieldMode)\"\n [currency]=\"$any(currency)\"\n [currencyDisplay]=\"$any(descriptor.currencyDisplay)\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(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 </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n *ngSwitchCase=\"'file'\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"$any(descriptor.fileAccept)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n </p-fileUpload>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", components: [{ type: i1$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$3.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$2.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }, { type: i7.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler"] }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i11.InputText, selector: "[pInputText]" }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6992
7041
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
6993
7042
|
type: Component,
|
|
6994
|
-
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"$any(descriptor.locale)\"\n [mode]=\"$any(numberFieldMode)\"\n [currency]=\"$any(currency)\"\n [currencyDisplay]=\"$any(descriptor.currencyDisplay)\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(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 </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n *ngSwitchCase=\"'file'\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"$any(descriptor.fileAccept)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n </p-fileUpload>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
6995
|
-
}]
|
|
7043
|
+
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"$any(descriptor.locale ?? applicationLocale)\"\n [mode]=\"$any(numberFieldMode)\"\n [currency]=\"$any(currency)\"\n [currencyDisplay]=\"$any(descriptor.currencyDisplay)\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(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 </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n *ngSwitchCase=\"'file'\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"$any(descriptor.fileAccept)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n </p-fileUpload>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
7044
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
7045
|
+
type: Inject,
|
|
7046
|
+
args: [LOCALE_ID]
|
|
7047
|
+
}] }]; } });
|
|
6996
7048
|
|
|
6997
7049
|
class MngFormlyFieldLabelComponent {
|
|
6998
7050
|
constructor() {
|
|
@@ -8111,8 +8163,16 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8111
8163
|
if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
|
|
8112
8164
|
this.formControl.patchValue([]);
|
|
8113
8165
|
}
|
|
8166
|
+
// emit lifecycle event
|
|
8167
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldTableDialogFormComponent, this, {
|
|
8168
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
8169
|
+
});
|
|
8114
8170
|
let subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value)).subscribe(v => {
|
|
8115
8171
|
this.itemsSubject.next(v);
|
|
8172
|
+
// emit lifecycle event
|
|
8173
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldTableDialogFormComponent, this, {
|
|
8174
|
+
value: v
|
|
8175
|
+
});
|
|
8116
8176
|
});
|
|
8117
8177
|
this.subscriptions.push(subscription);
|
|
8118
8178
|
this.isDisabledSubject.next(this.formControl.disabled);
|
|
@@ -8126,8 +8186,17 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8126
8186
|
});
|
|
8127
8187
|
this.subscriptions.push(subscription);
|
|
8128
8188
|
}
|
|
8189
|
+
ngAfterViewInit() {
|
|
8190
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldTableDialogFormComponent, this, {
|
|
8191
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT
|
|
8192
|
+
});
|
|
8193
|
+
}
|
|
8129
8194
|
ngOnDestroy() {
|
|
8130
8195
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
8196
|
+
// emit lifecycle event
|
|
8197
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldTableDialogFormComponent, this, {
|
|
8198
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
8199
|
+
});
|
|
8131
8200
|
}
|
|
8132
8201
|
}
|
|
8133
8202
|
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -8169,14 +8238,32 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
8169
8238
|
if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
|
|
8170
8239
|
this.formControl.patchValue([]);
|
|
8171
8240
|
}
|
|
8172
|
-
|
|
8241
|
+
// emit lifecycle event
|
|
8242
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldTableDialogMultiselectComponent, this, {
|
|
8243
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
8244
|
+
});
|
|
8245
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
8173
8246
|
this.itemsSubject.next(v);
|
|
8247
|
+
// emit lifecycle event
|
|
8248
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldTableDialogMultiselectComponent, this, {
|
|
8249
|
+
value: v
|
|
8250
|
+
});
|
|
8174
8251
|
});
|
|
8175
8252
|
this.subscriptions.push(subscription);
|
|
8176
8253
|
}
|
|
8254
|
+
ngAfterViewInit() {
|
|
8255
|
+
// emit lifecycle event
|
|
8256
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldTableDialogMultiselectComponent, this, {
|
|
8257
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT
|
|
8258
|
+
});
|
|
8259
|
+
}
|
|
8177
8260
|
ngOnDestroy() {
|
|
8178
8261
|
this.lookupDataProviderSubscription?.unsubscribe();
|
|
8179
8262
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
8263
|
+
// emit lifecycle event
|
|
8264
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ComponentLifecycle, MngFormlyFieldTableDialogMultiselectComponent, this, {
|
|
8265
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
8266
|
+
});
|
|
8180
8267
|
}
|
|
8181
8268
|
openAddDialog() {
|
|
8182
8269
|
if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {
|
|
@@ -8202,12 +8289,20 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
8202
8289
|
}
|
|
8203
8290
|
this.dialogSelectedAddItems = [];
|
|
8204
8291
|
this.isDialogVisible = true;
|
|
8292
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.DialogLifecycle, MngFormlyFieldTableDialogMultiselectComponent, this, {
|
|
8293
|
+
eventSubtype: MngFormFieldEventDialogSubtype.VISIBILITY,
|
|
8294
|
+
dialogVisible: true
|
|
8295
|
+
});
|
|
8205
8296
|
}
|
|
8206
8297
|
onSelectionChange(items) {
|
|
8207
8298
|
this.dialogSelectedAddItems = items;
|
|
8208
8299
|
}
|
|
8209
8300
|
hideDialog() {
|
|
8210
8301
|
this.isDialogVisible = false;
|
|
8302
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.DialogLifecycle, MngFormlyFieldTableDialogMultiselectComponent, this, {
|
|
8303
|
+
eventSubtype: MngFormFieldEventDialogSubtype.VISIBILITY,
|
|
8304
|
+
dialogVisible: false
|
|
8305
|
+
});
|
|
8211
8306
|
}
|
|
8212
8307
|
addItems() {
|
|
8213
8308
|
let value = this.formControl.value;
|