@kominal/common-angular 0.0.7 → 0.0.9

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.
@@ -1,15 +1,20 @@
1
+ import * as i3 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
1
3
  import * as i0 from '@angular/core';
2
- import { input, Component } from '@angular/core';
4
+ import { input, Component, inject, Pipe, computed, signal, effect } from '@angular/core';
3
5
  import * as i2 from '@angular/forms';
4
- import { ReactiveFormsModule } from '@angular/forms';
5
- import * as i2$1 from 'primeng/datepicker';
6
- import { DatePickerModule } from 'primeng/datepicker';
7
- import { TranslatePipe } from '@ngx-translate/core';
8
- import * as i1 from 'primeng/dropdown';
6
+ import { Validators, ReactiveFormsModule } from '@angular/forms';
7
+ import { TranslatePipe, TranslateService, TranslateModule } from '@ngx-translate/core';
8
+ import * as i2$1 from 'primeng/dropdown';
9
9
  import { DropdownModule } from 'primeng/dropdown';
10
- import * as i1$1 from 'primeng/inputtext';
10
+ import * as i4 from 'primeng/selectbutton';
11
+ import { SelectButtonModule } from 'primeng/selectbutton';
12
+ import { startWith, map } from 'rxjs';
13
+ import * as i2$2 from 'primeng/datepicker';
14
+ import { DatePickerModule } from 'primeng/datepicker';
15
+ import * as i1 from 'primeng/inputtext';
11
16
  import { InputTextModule } from 'primeng/inputtext';
12
- import * as i1$2 from 'primeng/textarea';
17
+ import * as i1$1 from 'primeng/textarea';
13
18
  import { TextareaModule } from 'primeng/textarea';
14
19
 
15
20
  class LabelComponent {
@@ -23,11 +28,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
23
28
  args: [{ selector: 'app-label', imports: [TranslatePipe], template: "<span>{{ label() | translate }}</span>\r\n" }]
24
29
  }] });
25
30
 
31
+ class TranslateSelectItemsPipe {
32
+ translateService = inject(TranslateService);
33
+ transform(value) {
34
+ return this.translateService.onLangChange.pipe(startWith(this.translateService.currentLang), map(() => value.map((item) => ({
35
+ label: this.translateService.instant(item.label),
36
+ value: item.value,
37
+ }))));
38
+ }
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslateSelectItemsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
40
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: TranslateSelectItemsPipe, isStandalone: true, name: "translateSelectItems" });
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslateSelectItemsPipe, decorators: [{
43
+ type: Pipe,
44
+ args: [{
45
+ name: 'translateSelectItems',
46
+ standalone: true,
47
+ }]
48
+ }] });
49
+
50
+ function toSelectItems(name, type) {
51
+ return Object.values(type).map((value) => ({ label: `enums.${name}.${value}`, value }));
52
+ }
53
+
54
+ class EnumInputComponent {
55
+ label = input.required();
56
+ enum = input.required();
57
+ enumName = input.required();
58
+ formElement = input.required();
59
+ mode = input('DROPDOWN');
60
+ options = computed(() => toSelectItems(this.enumName(), this.enum()));
61
+ required = signal(false);
62
+ constructor() {
63
+ effect(() => {
64
+ const formElement = this.formElement();
65
+ formElement.statusChanges.pipe(startWith(undefined)).subscribe(() => this.required.set(formElement.hasValidator(Validators.required)));
66
+ }, { allowSignalWrites: true });
67
+ }
68
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: EnumInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: EnumInputComponent, isStandalone: true, selector: "app-enum-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, enum: { classPropertyName: "enum", publicName: "enum", isSignal: true, isRequired: true, transformFunction: null }, enumName: { classPropertyName: "enumName", publicName: "enumName", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "w-full" }, ngImport: i0, template: "<div class=\"flex-column flex w-full gap-1\">\r\n <app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n @if (mode() === 'DROPDOWN') {\r\n <p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"(options() | translateSelectItems | async) || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"!required()\"\r\n ></p-dropdown>\r\n }\r\n @if (mode() === 'BUTTON') {\r\n <p-selectButton [formControl]=\"formElement()\" [options]=\"(options() | translateSelectItems | async) || []\" optionLabel=\"label\" optionValue=\"value\" />\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i2$1.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateSelectItemsPipe, name: "translateSelectItems" }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }, { kind: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i4.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "size", "disabled", "dataKey", "autofocus"], outputs: ["onOptionClick", "onChange"] }] });
70
+ }
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: EnumInputComponent, decorators: [{
72
+ type: Component,
73
+ args: [{ selector: 'app-enum-input', standalone: true, imports: [ReactiveFormsModule, DropdownModule, CommonModule, TranslateSelectItemsPipe, TranslateModule, LabelComponent, SelectButtonModule], host: { class: 'w-full' }, template: "<div class=\"flex-column flex w-full gap-1\">\r\n <app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n @if (mode() === 'DROPDOWN') {\r\n <p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"(options() | translateSelectItems | async) || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"!required()\"\r\n ></p-dropdown>\r\n }\r\n @if (mode() === 'BUTTON') {\r\n <p-selectButton [formControl]=\"formElement()\" [options]=\"(options() | translateSelectItems | async) || []\" optionLabel=\"label\" optionValue=\"value\" />\r\n }\r\n</div>\r\n" }]
74
+ }], ctorParameters: () => [] });
75
+
26
76
  class InputDateComponent {
27
77
  label = input.required();
28
78
  formElement = input.required();
29
79
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputDateComponent, isStandalone: true, selector: "app-input-date", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-datepicker [readonlyInput]=\"true\" [formControl]=\"formElement()\" styleClass=\"w-full\" dateFormat=\"dd.mm.yyyy\" />\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$1.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] });
80
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputDateComponent, isStandalone: true, selector: "app-input-date", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-datepicker [readonlyInput]=\"true\" [formControl]=\"formElement()\" styleClass=\"w-full\" dateFormat=\"dd.mm.yyyy\" />\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] });
31
81
  }
32
82
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputDateComponent, decorators: [{
33
83
  type: Component,
@@ -39,7 +89,7 @@ class InputSelectComponent {
39
89
  formElement = input.required();
40
90
  options = input.required();
41
91
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
42
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputSelectComponent, isStandalone: true, selector: "app-input-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"options() || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n></p-dropdown>\r\n", dependencies: [{ kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i1.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
92
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputSelectComponent, isStandalone: true, selector: "app-input-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"options() || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n></p-dropdown>\r\n", dependencies: [{ kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i2$1.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
43
93
  }
44
94
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputSelectComponent, decorators: [{
45
95
  type: Component,
@@ -50,7 +100,7 @@ class InputTextComponent {
50
100
  label = input.required();
51
101
  formElement = input.required();
52
102
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
53
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputTextComponent, isStandalone: true, selector: "app-input-text", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n", dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1$1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
103
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputTextComponent, isStandalone: true, selector: "app-input-text", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n", dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
54
104
  }
55
105
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputTextComponent, decorators: [{
56
106
  type: Component,
@@ -61,11 +111,11 @@ class InputTextareaComponent {
61
111
  label = input.required();
62
112
  formElement = input.required();
63
113
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputTextareaComponent, isStandalone: true, selector: "app-input-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<textarea pInputTextarea [autoResize]=\"true\" [formControl]=\"formElement()\"></textarea>\r\n", dependencies: [{ kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i1$2.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
114
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputTextareaComponent, isStandalone: true, selector: "app-input-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<textarea pInputTextarea [autoResize]=\"true\" [formControl]=\"formElement()\"></textarea>\r\n", dependencies: [{ kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i1$1.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
65
115
  }
66
116
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputTextareaComponent, decorators: [{
67
117
  type: Component,
68
- args: [{ selector: 'app-input-textarea', imports: [TextareaModule, ReactiveFormsModule, LabelComponent], template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<textarea pInputTextarea [autoResize]=\"true\" [formControl]=\"formElement()\"></textarea>\r\n" }]
118
+ args: [{ selector: 'app-input-textarea', imports: [TextareaModule, ReactiveFormsModule, LabelComponent], host: { class: 'flex flex-col gap-1 w-full' }, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<textarea pInputTextarea [autoResize]=\"true\" [formControl]=\"formElement()\"></textarea>\r\n" }]
69
119
  }] });
70
120
 
71
121
  /*
@@ -76,5 +126,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
76
126
  * Generated bundle index. Do not edit.
77
127
  */
78
128
 
79
- export { InputDateComponent, InputSelectComponent, InputTextComponent, InputTextareaComponent };
129
+ export { EnumInputComponent, InputDateComponent, InputSelectComponent, InputTextComponent, InputTextareaComponent, TranslateSelectItemsPipe, toSelectItems };
80
130
  //# sourceMappingURL=kominal-common-angular.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kominal-common-angular.mjs","sources":["../../../projects/common-angular/src/lib/label/label.component.ts","../../../projects/common-angular/src/lib/label/label.component.html","../../../projects/common-angular/src/lib/input-date/input-date.component.ts","../../../projects/common-angular/src/lib/input-date/input-date.component.html","../../../projects/common-angular/src/lib/input-select/input-select.component.ts","../../../projects/common-angular/src/lib/input-select/input-select.component.html","../../../projects/common-angular/src/lib/input-text/input-text.component.ts","../../../projects/common-angular/src/lib/input-text/input-text.component.html","../../../projects/common-angular/src/lib/input-textarea/input-textarea.component.ts","../../../projects/common-angular/src/lib/input-textarea/input-textarea.component.html","../../../projects/common-angular/src/public-api.ts","../../../projects/common-angular/src/kominal-common-angular.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\nimport { TranslatePipe } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'app-label',\r\n imports: [TranslatePipe],\r\n templateUrl: './label.component.html',\r\n})\r\nexport class LabelComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<AbstractControl>();\r\n}\r\n","<span>{{ label() | translate }}</span>\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-date',\r\n imports: [ReactiveFormsModule, LabelComponent, DatePickerModule],\r\n templateUrl: './input-date.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputDateComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<Date>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-datepicker [readonlyInput]=\"true\" [formControl]=\"formElement()\" styleClass=\"w-full\" dateFormat=\"dd.mm.yyyy\" />\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { SelectItem } from 'primeng/api';\r\nimport { DropdownModule } from 'primeng/dropdown';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-select',\r\n imports: [DropdownModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-select.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputSelectComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n public options = input.required<SelectItem[]>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"options() || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n></p-dropdown>\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-text',\r\n imports: [InputTextModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-text.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputTextComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TextareaModule } from 'primeng/textarea';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-textarea',\r\n imports: [TextareaModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-textarea.component.html',\r\n})\r\nexport class InputTextareaComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<textarea pInputTextarea [autoResize]=\"true\" [formControl]=\"formElement()\"></textarea>\r\n","/*\r\n * Public API Surface of common-angular\r\n */\r\n\r\nexport * from './lib/input-date/input-date.component';\r\nexport * from './lib/input-select/input-select.component';\r\nexport * from './lib/input-text/input-text.component';\r\nexport * from './lib/input-textarea/input-textarea.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;MASa,cAAc,CAAA;AAClB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;AAChC,IAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,EAAmB;wGAF3C,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECT3B,4CACA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EDKY,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;4FAGZ,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,aAAa,CAAC,EAAA,QAAA,EAAA,4CAAA,EAAA;;;MEKb,kBAAkB,CAAA;AACtB,IAAA,KAAK,GAAG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AAA,EAAA,oBAAoB,WACrB,CAAC,cAAc,EAAE,mBAAmB,EAAE,cAAc,CAAC,EAAA,QAAA,EAAA,qKAAA,EAAA;;;AEPhE;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"kominal-common-angular.mjs","sources":["../../../projects/common-angular/src/lib/label/label.component.ts","../../../projects/common-angular/src/lib/label/label.component.html","../../../projects/common-angular/src/lib/pipes/translate-select-items.pipe.ts","../../../projects/common-angular/src/lib/util.ts","../../../projects/common-angular/src/lib/enum-input/enum-input.component.ts","../../../projects/common-angular/src/lib/enum-input/enum-input.component.html","../../../projects/common-angular/src/lib/input-date/input-date.component.ts","../../../projects/common-angular/src/lib/input-date/input-date.component.html","../../../projects/common-angular/src/lib/input-select/input-select.component.ts","../../../projects/common-angular/src/lib/input-select/input-select.component.html","../../../projects/common-angular/src/lib/input-text/input-text.component.ts","../../../projects/common-angular/src/lib/input-text/input-text.component.html","../../../projects/common-angular/src/lib/input-textarea/input-textarea.component.ts","../../../projects/common-angular/src/lib/input-textarea/input-textarea.component.html","../../../projects/common-angular/src/public-api.ts","../../../projects/common-angular/src/kominal-common-angular.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\nimport { TranslatePipe } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'app-label',\r\n imports: [TranslatePipe],\r\n templateUrl: './label.component.html',\r\n})\r\nexport class LabelComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<AbstractControl>();\r\n}\r\n","<span>{{ label() | translate }}</span>\r\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { SelectItem } from 'primeng/api';\nimport { map, Observable, startWith } from 'rxjs';\n\n@Pipe({\n name: 'translateSelectItems',\n standalone: true,\n})\nexport class TranslateSelectItemsPipe implements PipeTransform {\n private translateService = inject(TranslateService);\n\n public transform(value: SelectItem[]): Observable<SelectItem[]> {\n return this.translateService.onLangChange.pipe(\n startWith(this.translateService.currentLang),\n map((): SelectItem[] =>\n value.map((item) => ({\n label: this.translateService.instant(item.label!),\n value: item.value,\n })),\n ),\n );\n }\n}\n","import { SelectItem } from 'primeng/api';\n\nexport function toSelectItems(name: string, type: any): SelectItem<string>[] {\n return Object.values<any>(type).map((value) => ({ label: `enums.${name}.${value}`, value }));\n}\n","import { CommonModule } from '@angular/common';\r\nimport { Component, computed, effect, input, signal } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { DropdownModule } from 'primeng/dropdown';\r\nimport { SelectButtonModule } from 'primeng/selectbutton';\r\nimport { startWith } from 'rxjs';\r\nimport { LabelComponent } from '../label/label.component';\r\nimport { TranslateSelectItemsPipe } from '../pipes/translate-select-items.pipe';\r\nimport { toSelectItems } from '../util';\r\n\r\n@Component({\r\n selector: 'app-enum-input',\r\n standalone: true,\r\n imports: [ReactiveFormsModule, DropdownModule, CommonModule, TranslateSelectItemsPipe, TranslateModule, LabelComponent, SelectButtonModule],\r\n templateUrl: './enum-input.component.html',\r\n host: { class: 'w-full' },\r\n})\r\nexport class EnumInputComponent {\r\n public label = input.required<string>();\r\n public enum = input.required<any>();\r\n public enumName = input.required<string>();\r\n public formElement = input.required<FormControl<any>>();\r\n public mode = input<'DROPDOWN' | 'BUTTON'>('DROPDOWN');\r\n\r\n public options = computed(() => toSelectItems(this.enumName(), this.enum()));\r\n\r\n public required = signal(false);\r\n\r\n public constructor() {\r\n effect(\r\n () => {\r\n const formElement = this.formElement();\r\n formElement.statusChanges.pipe(startWith(undefined)).subscribe(() => this.required.set(formElement.hasValidator(Validators.required)));\r\n },\r\n { allowSignalWrites: true },\r\n );\r\n }\r\n}\r\n","<div class=\"flex-column flex w-full gap-1\">\r\n <app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n @if (mode() === 'DROPDOWN') {\r\n <p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"(options() | translateSelectItems | async) || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"!required()\"\r\n ></p-dropdown>\r\n }\r\n @if (mode() === 'BUTTON') {\r\n <p-selectButton [formControl]=\"formElement()\" [options]=\"(options() | translateSelectItems | async) || []\" optionLabel=\"label\" optionValue=\"value\" />\r\n }\r\n</div>\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-date',\r\n imports: [ReactiveFormsModule, LabelComponent, DatePickerModule],\r\n templateUrl: './input-date.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputDateComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<Date>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-datepicker [readonlyInput]=\"true\" [formControl]=\"formElement()\" styleClass=\"w-full\" dateFormat=\"dd.mm.yyyy\" />\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { SelectItem } from 'primeng/api';\r\nimport { DropdownModule } from 'primeng/dropdown';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-select',\r\n imports: [DropdownModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-select.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputSelectComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n public options = input.required<SelectItem[]>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<p-dropdown\r\n [filter]=\"true\"\r\n class=\"w-full\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [formControl]=\"formElement()\"\r\n [options]=\"options() || []\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n></p-dropdown>\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-text',\r\n imports: [InputTextModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-text.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputTextComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TextareaModule } from 'primeng/textarea';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-textarea',\r\n imports: [TextareaModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-textarea.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputTextareaComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<textarea pInputTextarea [autoResize]=\"true\" [formControl]=\"formElement()\"></textarea>\r\n","/*\r\n * Public API Surface of common-angular\r\n */\r\n\r\nexport * from './lib/enum-input/enum-input.component';\r\nexport * from './lib/input-date/input-date.component';\r\nexport * from './lib/input-select/input-select.component';\r\nexport * from './lib/input-text/input-text.component';\r\nexport * from './lib/input-textarea/input-textarea.component';\r\nexport * from './lib/pipes/translate-select-items.pipe';\r\nexport * from './lib/util';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1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EACrB,OAAA,EAAA,CAAC,cAAc,EAAE,mBAAmB,EAAE,cAAc,CAAC,EAExD,IAAA,EAAA,EAAE,KAAK,EAAE,4BAA4B,EAAE,EAAA,QAAA,EAAA,qKAAA,EAAA;;;AET/C;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,14 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EnumInputComponent {
4
+ label: import("@angular/core").InputSignal<string>;
5
+ enum: import("@angular/core").InputSignal<any>;
6
+ enumName: import("@angular/core").InputSignal<string>;
7
+ formElement: import("@angular/core").InputSignal<FormControl<any>>;
8
+ mode: import("@angular/core").InputSignal<"DROPDOWN" | "BUTTON">;
9
+ options: import("@angular/core").Signal<import("primeng/api").SelectItem<string>[]>;
10
+ required: import("@angular/core").WritableSignal<boolean>;
11
+ constructor();
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumInputComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<EnumInputComponent, "app-enum-input", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "enum": { "alias": "enum"; "required": true; "isSignal": true; }; "enumName": { "alias": "enumName"; "required": true; "isSignal": true; }; "formElement": { "alias": "formElement"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { SelectItem } from 'primeng/api';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TranslateSelectItemsPipe implements PipeTransform {
6
+ private translateService;
7
+ transform(value: SelectItem[]): Observable<SelectItem[]>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateSelectItemsPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslateSelectItemsPipe, "translateSelectItems", true>;
10
+ }
package/lib/util.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { SelectItem } from 'primeng/api';
2
+ export declare function toSelectItems(name: string, type: any): SelectItem<string>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kominal/common-angular",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",
package/public-api.d.ts CHANGED
@@ -1,4 +1,7 @@
1
+ export * from './lib/enum-input/enum-input.component';
1
2
  export * from './lib/input-date/input-date.component';
2
3
  export * from './lib/input-select/input-select.component';
3
4
  export * from './lib/input-text/input-text.component';
4
5
  export * from './lib/input-textarea/input-textarea.component';
6
+ export * from './lib/pipes/translate-select-items.pipe';
7
+ export * from './lib/util';