@mediusinc/mng-commons 5.4.0-rc.3 → 5.4.0-rc.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/core/data-list/data-list-params-helpers.d.ts +1 -1
- package/core/data-list/data-list.model.d.ts +1 -0
- package/core/helpers/type-helpers.d.ts +12 -0
- package/esm2022/core/data-list/data-list-params-helpers.mjs +29 -5
- package/esm2022/core/data-list/data-list.model.mjs +1 -1
- package/esm2022/core/helpers/type-helpers.mjs +1 -1
- package/esm2022/filter/descriptors/filter-generic.descriptor.mjs +21 -0
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +1 -1
- package/esm2022/filter/descriptors/filter.descriptor.mjs +40 -1
- package/esm2022/filter/index.mjs +3 -1
- package/esm2022/filter/models/filter-generic-property.model.mjs +2 -0
- package/esm2022/form/components/dropdown/dropdown.component.mjs +159 -10
- package/esm2022/table/api/descriptors/table.descriptor.mjs +51 -2
- package/esm2022/table/components/column-filter/column-filter.component.mjs +2 -2
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +4 -1
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +42 -9
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +95 -11
- package/esm2022/table/components/table/table.component.mjs +54 -10
- package/esm2022/table/helpers/filters.mjs +32 -2
- package/esm2022/table/services/table-feature-config.token.mjs +1 -1
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +2 -2
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +11 -10
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +16 -2
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +2 -1
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +2 -2
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +2 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +28 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +61 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +156 -7
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +50 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +227 -42
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +26 -10
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +7 -6
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter-generic.descriptor.d.ts +11 -0
- package/filter/descriptors/filter.descriptor.d.ts +21 -2
- package/filter/index.d.ts +2 -0
- package/filter/models/filter-generic-property.model.d.ts +7 -0
- package/form/components/dropdown/dropdown.component.d.ts +27 -1
- package/i18n/en.json +4 -0
- package/i18n/sl.json +4 -0
- package/package.json +7 -7
- package/table/api/descriptors/table.descriptor.d.ts +33 -1
- package/table/components/filter/filter-form/filter-form.component.d.ts +11 -2
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +21 -1
- package/table/components/table/table.component.d.ts +18 -3
- package/table/helpers/filters.d.ts +9 -1
- package/table/services/table-feature-config.token.d.ts +1 -0
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +6 -4
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +10 -1
- package/version-info.json +5 -5
|
@@ -3181,7 +3181,7 @@ class DataLanguageDropdownComponent {
|
|
|
3181
3181
|
this.viewContainer?.reloadTable({});
|
|
3182
3182
|
}
|
|
3183
3183
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DataLanguageDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3184
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.5", type: DataLanguageDropdownComponent, isStandalone: true, selector: "mng-data-language-dropdown", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: true, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { trigger: "trigger" }, ngImport: i0, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider()\" [ngModel]=\"commons.appDataLocale()\" [showClear]=\"false\" (valueChange)=\"updateDataLocale($event)\"></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", "appendTo"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3184
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.5", type: DataLanguageDropdownComponent, isStandalone: true, selector: "mng-data-language-dropdown", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: true, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { trigger: "trigger" }, ngImport: i0, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider()\" [ngModel]=\"commons.appDataLocale()\" [showClear]=\"false\" (valueChange)=\"updateDataLocale($event)\"></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", "allowInput", "appendTo", "inlineSearch", "searchTrim"], outputs: ["valueChange", "blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3185
3185
|
}
|
|
3186
3186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
|
|
3187
3187
|
type: Component,
|
|
@@ -3489,6 +3489,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
3489
3489
|
type: Injectable
|
|
3490
3490
|
}] });
|
|
3491
3491
|
|
|
3492
|
+
// eslint-disable-next-line @angular-eslint/prefer-standalone
|
|
3492
3493
|
class ACommonsFormlyFieldType extends FieldType {
|
|
3493
3494
|
constructor() {
|
|
3494
3495
|
super(...arguments);
|
|
@@ -3664,7 +3665,7 @@ class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
|
|
|
3664
3665
|
});
|
|
3665
3666
|
}
|
|
3666
3667
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3667
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", 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 ?? 'mng-formly-field-dropdown'\">\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", "appendTo"], 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 }); }
|
|
3668
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", 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 ?? 'mng-formly-field-dropdown'\">\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", "allowInput", "appendTo", "inlineSearch", "searchTrim"], 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 }); }
|
|
3668
3669
|
}
|
|
3669
3670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
|
|
3670
3671
|
type: Component,
|
|
@@ -3895,7 +3896,7 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
3895
3896
|
}
|
|
3896
3897
|
}
|
|
3897
3898
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3898
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, 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 ?? 'mng-formly-field-input mng-formly-field-input-number'\"\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 >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></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 ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></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\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\">\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 ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\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 (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\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 @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\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 ban\"></i>\n </div>\n </span>\n }\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\">\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\"\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", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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"] }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "variant", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autofocus", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9$1.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", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3899
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, 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 ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></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 ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></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\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\">\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 ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\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 (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\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 @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\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 ban\"></i>\n </div>\n </span>\n }\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\">\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\"\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", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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"] }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "variant", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autofocus", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9$1.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", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3899
3900
|
}
|
|
3900
3901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
|
|
3901
3902
|
type: Component,
|
|
@@ -3917,7 +3918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
3917
3918
|
ComponentDirective,
|
|
3918
3919
|
InputTrimDirective,
|
|
3919
3920
|
FormlyFieldLabelPipe
|
|
3920
|
-
], 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 ?? 'mng-formly-field-input mng-formly-field-input-number'\"\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 >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></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 ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></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\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\">\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 ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\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 (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\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 @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\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 ban\"></i>\n </div>\n </span>\n }\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\">\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\"\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" }]
|
|
3921
|
+
], 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 ?? 'mng-formly-field-input mng-formly-field-input-number'\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [prefix]=\"descriptor.numberPrefix\"\n [suffix]=\"descriptor.numberSuffix\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName ?? ''\"\n >{{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-switch'\"></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 ?? 'mng-formly-field-input mng-formly-field-input-radio'\"></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\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName ?? 'mng-formly-field-input mng-formly-field-input-textarea'\">\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 ?? 'mng-formly-field-input mng-formly-field-input-mask'\">\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 (descriptor.imagePreview) {\n @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: file.objectURL\n }\">\n </ng-container>\n } @else if (!isFileImageSvg(file) || descriptor.imagePreviewAllowSvg) {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\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 @if (descriptor.imagePreviewComponent) {\n <ng-container\n [mngComponent]=\"descriptor.imagePreviewComponent\"\n [inputs]=\"{\n imageUrl: imageFormArray.at(idx).value\n }\">\n </ng-container>\n } @else if (!isUrlSvgImage(imageFormArray.at(idx).value) || descriptor.imagePreviewAllowSvg) {\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 ban\"></i>\n </div>\n </span>\n }\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\">\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\"\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" }]
|
|
3921
3922
|
}] });
|
|
3922
3923
|
|
|
3923
3924
|
class FormlyFieldLabelComponent extends ACommonsFormlyFieldType {
|
|
@@ -4485,11 +4486,11 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4485
4486
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
4486
4487
|
}
|
|
4487
4488
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4488
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [
|
|
4489
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "pipe", type: FormlyFieldLabelPipe, name: "mngFormlyFieldLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4489
4490
|
}
|
|
4490
4491
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4491
4492
|
type: Component,
|
|
4492
|
-
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle, FormlyFieldLabelPipe], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [
|
|
4493
|
+
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle, FormlyFieldLabelPipe], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex justify-content-end align-items-center\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">\n {{ descriptor | mngFormlyFieldLabel: editorDescriptor | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <div>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
|
|
4493
4494
|
}], propDecorators: { addTableComponent: [{
|
|
4494
4495
|
type: ViewChild,
|
|
4495
4496
|
args: ['addTableComponent']
|