@ngstarter-ui/components 21.0.17 → 21.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-registry.json +49 -12
- package/fesm2022/ngstarter-ui-components-chips.mjs +72 -38
- package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-picker.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-CpZ5gJOc.mjs → ngstarter-ui-components-content-editor-code-block.component-Czb0bvcr.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-CpZ5gJOc.mjs.map → ngstarter-ui-components-content-editor-code-block.component-Czb0bvcr.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-ghm0_0AF.mjs → ngstarter-ui-components-content-editor-embed-block-c8Pq0Jdq.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-ghm0_0AF.mjs.map → ngstarter-ui-components-content-editor-embed-block-c8Pq0Jdq.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-C1FH89Sj.mjs → ngstarter-ui-components-content-editor-heading-block.component-CT5g3MLZ.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-C1FH89Sj.mjs.map → ngstarter-ui-components-content-editor-heading-block.component-CT5g3MLZ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-ahCIfpvQ.mjs → ngstarter-ui-components-content-editor-image-block.component-Cp_Yo7zI.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-ahCIfpvQ.mjs.map → ngstarter-ui-components-content-editor-image-block.component-Cp_Yo7zI.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-guhW_EyK.mjs → ngstarter-ui-components-content-editor-list-block.component-BvineUWy.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-guhW_EyK.mjs.map → ngstarter-ui-components-content-editor-list-block.component-BvineUWy.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DNLTNGYa.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-4_TqxgpH.mjs} +13 -13
- package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DNLTNGYa.mjs.map → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-4_TqxgpH.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-DjgGUc7s.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-sH44U1I8.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-DjgGUc7s.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-sH44U1I8.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-B3pek1H6.mjs → ngstarter-ui-components-content-editor-quote-block.component-CA3KoZ-u.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-B3pek1H6.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-CA3KoZ-u.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-bgBNjf4d.mjs → ngstarter-ui-components-content-editor-table-block.component-GTZiYUjU.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-bgBNjf4d.mjs.map → ngstarter-ui-components-content-editor-table-block.component-GTZiYUjU.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-DPlYe-_8.mjs → ngstarter-ui-components-content-editor-video-block.component-CzMZ1s6C.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-DPlYe-_8.mjs.map → ngstarter-ui-components-content-editor-video-block.component-CzMZ1s6C.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-field.mjs +9 -9
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/{ngstarter-ui-components-form-renderer-autocomplete-many-field-C3Zf-MoV.mjs → ngstarter-ui-components-form-renderer-autocomplete-many-field-BLhfO1zC.mjs} +3 -3
- package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BLhfO1zC.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs → ngstarter-ui-components-form-renderer-datepicker-field-DRSVe0gK.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs.map → ngstarter-ui-components-form-renderer-datepicker-field-DRSVe0gK.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-form-renderer-input-field-UaMfHCtj.mjs → ngstarter-ui-components-form-renderer-input-field-DpGLKZjz.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-form-renderer-input-field-UaMfHCtj.mjs.map → ngstarter-ui-components-form-renderer-input-field-DpGLKZjz.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs → ngstarter-ui-components-form-renderer-select-field-CCbpYyZo.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs.map → ngstarter-ui-components-form-renderer-select-field-CCbpYyZo.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs → ngstarter-ui-components-form-renderer-textarea-field-D89GlMDO.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs.map → ngstarter-ui-components-form-renderer-textarea-field-D89GlMDO.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs → ngstarter-ui-components-form-renderer-timezone-field-C9wz7zPg.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs.map → ngstarter-ui-components-form-renderer-timezone-field-C9wz7zPg.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-form-renderer.mjs +6 -6
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +3 -2
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-panel.mjs +8 -4
- package/fesm2022/ngstarter-ui-components-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +118 -11
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-text-editor.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngstarter-ui-components-chips.d.ts +15 -6
- package/types/ngstarter-ui-components-form-field.d.ts +3 -2
- package/types/ngstarter-ui-components-option.d.ts +3 -1
- package/types/ngstarter-ui-components-panel.d.ts +3 -1
- package/types/ngstarter-ui-components-select.d.ts +43 -4
- package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-C3Zf-MoV.mjs.map +0 -1
|
@@ -96,7 +96,7 @@ class AutocompleteManyField {
|
|
|
96
96
|
this.control().setValue(value);
|
|
97
97
|
}
|
|
98
98
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AutocompleteManyField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: AutocompleteManyField, isStandalone: true, selector: "ngs-autocomplete-many-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-chip-grid #chipGrid>\n @for (option of value; track option) {\n <ngs-chip-row (removed)=\"remove(option)\">\n {{ option[bindName] }}\n <button ngsChipRemove>\n <ngs-icon name=\"fluent:dismiss-circle-24-regular\"/>\n </button>\n </ngs-chip-row>\n }\n
|
|
99
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: AutocompleteManyField, isStandalone: true, selector: "ngs-autocomplete-many-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-chip-grid #chipGrid>\n @for (option of value; track option) {\n <ngs-chip-row (removed)=\"remove(option)\">\n {{ option[bindName] }}\n <button ngsChipRemove>\n <ngs-icon name=\"fluent:dismiss-circle-24-regular\"/>\n </button>\n </ngs-chip-row>\n }\n <input [placeholder]=\"config().placeholder\"\n #input\n maxlength=\"30\"\n [formControl]=\"chipsCtrl\"\n [ngsChipInputFor]=\"chipGrid\"\n [ngsAutocomplete]=\"autocomplete\"\n [ngsChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (chipInputTokenEnd)=\"add($event)\">\n </ngs-chip-grid>\n @if (isLoading) {\n <div class=\"loader\">\n <ngs-progress-spinner\n mode=\"indeterminate\"\n [diameter]=\"20\"/>\n </div>\n }\n <ngs-autocomplete #autocomplete=\"ngsAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track option) {\n <ngs-option [value]=\"option\">{{ option[bindName] }}</ngs-option>\n }\n\n @if (!(filteredOptions$ | async)?.length && !isLoading && chipsCtrl.value) {\n <ngs-option disabled>\n No search results found.\n </ngs-option>\n }\n </ngs-autocomplete>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}:host .loader{position:absolute;right:0;top:50%;transform:translateY(-50%)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "component", type: Autocomplete, selector: "ngs-autocomplete", inputs: ["aria-label", "aria-labelledby", "autoActiveFirstOption", "autoSelectActiveOption", "class", "disableRipple", "displayWith", "hideSingleSelectionIndicator", "panelWidth", "requireSelection"], outputs: ["closed", "opened", "optionActivated", "optionSelected"], exportAs: ["ngsAutocomplete"] }, { kind: "directive", type: AutocompleteTrigger, selector: "[ngsAutocomplete]", inputs: ["ngsAutocomplete"], exportAs: ["ngsAutocompleteTrigger"] }, { kind: "component", type: ChipGrid, selector: "ngs-chip-grid", inputs: ["id", "placeholder", "required", "disabled"], outputs: ["valueChange"] }, { kind: "directive", type: ChipInput, selector: "input[ngsChipInputFor]", inputs: ["ngsChipInputFor", "ngsChipInputSeparatorKeyCodes", "ngsChipInputAddOnBlur"], outputs: ["chipInputTokenEnd"] }, { kind: "directive", type: ChipRemove, selector: "ngs-chip-remove, [ngsChipRemove]" }, { kind: "component", type: ChipRow, selector: "ngs-chip-row", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: Option, selector: "ngs-option", inputs: ["value", "data", "disabled", "selected"], outputs: ["onSelectionChange"], exportAs: ["ngsOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ProgressSpinner, selector: "ngs-progress-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["ngsProgressSpinner"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
100
100
|
}
|
|
101
101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AutocompleteManyField, decorators: [{
|
|
102
102
|
type: Component,
|
|
@@ -117,8 +117,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
117
117
|
ReactiveFormsModule,
|
|
118
118
|
ProgressSpinner,
|
|
119
119
|
AsyncPipe
|
|
120
|
-
], template: "@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-chip-grid #chipGrid>\n @for (option of value; track option) {\n <ngs-chip-row (removed)=\"remove(option)\">\n {{ option[bindName] }}\n <button ngsChipRemove>\n <ngs-icon name=\"fluent:dismiss-circle-24-regular\"/>\n </button>\n </ngs-chip-row>\n }\n
|
|
120
|
+
], template: "@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-chip-grid #chipGrid>\n @for (option of value; track option) {\n <ngs-chip-row (removed)=\"remove(option)\">\n {{ option[bindName] }}\n <button ngsChipRemove>\n <ngs-icon name=\"fluent:dismiss-circle-24-regular\"/>\n </button>\n </ngs-chip-row>\n }\n <input [placeholder]=\"config().placeholder\"\n #input\n maxlength=\"30\"\n [formControl]=\"chipsCtrl\"\n [ngsChipInputFor]=\"chipGrid\"\n [ngsAutocomplete]=\"autocomplete\"\n [ngsChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (chipInputTokenEnd)=\"add($event)\">\n </ngs-chip-grid>\n @if (isLoading) {\n <div class=\"loader\">\n <ngs-progress-spinner\n mode=\"indeterminate\"\n [diameter]=\"20\"/>\n </div>\n }\n <ngs-autocomplete #autocomplete=\"ngsAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track option) {\n <ngs-option [value]=\"option\">{{ option[bindName] }}</ngs-option>\n }\n\n @if (!(filteredOptions$ | async)?.length && !isLoading && chipsCtrl.value) {\n <ngs-option disabled>\n No search results found.\n </ngs-option>\n }\n </ngs-autocomplete>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}:host .loader{position:absolute;right:0;top:50%;transform:translateY(-50%)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
121
121
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
122
122
|
|
|
123
123
|
export { AutocompleteManyField };
|
|
124
|
-
//# sourceMappingURL=ngstarter-ui-components-form-renderer-autocomplete-many-field-
|
|
124
|
+
//# sourceMappingURL=ngstarter-ui-components-form-renderer-autocomplete-many-field-BLhfO1zC.mjs.map
|
package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BLhfO1zC.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-form-renderer-autocomplete-many-field-BLhfO1zC.mjs","sources":["../../../projects/components/form-renderer/src/fields/autocomplete-many-field/autocomplete-many-field.ts","../../../projects/components/form-renderer/src/fields/autocomplete-many-field/autocomplete-many-field.html"],"sourcesContent":["import { Component, ElementRef, inject, input, OnInit, viewChild } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport {\n Autocomplete,\n AutocompleteSelectedEvent,\n AutocompleteTrigger\n} from '@ngstarter-ui/components/autocomplete';\nimport { Option } from '@ngstarter-ui/components/option';\nimport { ChipGrid, ChipInput, ChipInputEvent, ChipRemove, ChipRow } from '@ngstarter-ui/components/chips';\nimport { ComponentConfig } from '../../models/form-config.model';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { Error, FormField, Hint, Label } from '@ngstarter-ui/components/form-field';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { catchError, debounceTime, distinctUntilChanged, Observable, of, startWith, switchMap, tap } from 'rxjs';\nimport { ProgressSpinner } from '@ngstarter-ui/components/spinner';\nimport { AsyncPipe } from '@angular/common';\nimport { HttpClient, HttpParams } from '@angular/common/http';\n\n@Component({\n selector: 'ngs-autocomplete-many-field',\n imports: [\n FormsModule,\n Autocomplete,\n AutocompleteTrigger,\n ChipGrid,\n ChipInput,\n ChipRemove,\n ChipRow,\n Error,\n FormField,\n Hint,\n Icon,\n Label,\n Option,\n ReactiveFormsModule,\n ProgressSpinner,\n AsyncPipe\n ],\n templateUrl: './autocomplete-many-field.html',\n styleUrl: './autocomplete-many-field.scss'\n})\nexport class AutocompleteManyField implements OnInit {\n private httpClient = inject(HttpClient);\n\n control = input.required<FormControl>();\n config = input.required<ComponentConfig>();\n\n readonly separatorKeysCodes: number[] = [ENTER, COMMA];\n readonly chipsCtrl = new FormControl('');\n readonly input = viewChild.required<ElementRef<HTMLInputElement>>('input');\n readonly value: any[] = [];\n\n filteredOptions$!: Observable<any[]>;\n isLoading = false;\n\n ngOnInit() {\n this.filteredOptions$ = this.chipsCtrl.valueChanges.pipe(\n startWith(''),\n tap(() => this.isLoading = true),\n debounceTime(300),\n distinctUntilChanged(),\n switchMap((query: any) => {\n if (!query || !query.trim()) {\n return of([]);\n }\n const params = new HttpParams().set('query', query || '');\n return this.httpClient.get<any[]>(this.config().payload?.['autocompleteUrl'], {\n params\n });\n }),\n tap(() => this.isLoading = false)\n );\n }\n\n getErrorMessage(): string {\n const errors = this.control().errors;\n\n if (!errors) {\n return '';\n }\n\n const errorKey = Object.keys(errors)[0];\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\n return validator?.message || 'Invalid value';\n }\n\n get options() {\n return this.config()?.payload?.['options'] || [];\n }\n\n get bindValue() {\n return this.config().bindValue || 'id';\n }\n\n get bindName() {\n return this.config().bindName || 'name';\n }\n\n add(event: ChipInputEvent): void {\n const name = (event.value || '').trim();\n const hasValue = this.value.find(\n v => v[this.bindName].toLowerCase() === name.toLowerCase()\n );\n\n if (name && !hasValue) {\n this.value.push({\n [this.bindValue]: null,\n [this.bindName]: name,\n });\n }\n\n event.chipInput!.clear();\n this.chipsCtrl.setValue(null);\n this.isLoading = false;\n this.calculateControlValue();\n }\n\n remove(chip: any): void {\n const index = this.value.indexOf(chip);\n\n if (index >= 0) {\n this.value.splice(index, 1);\n this.calculateControlValue();\n }\n }\n\n onSelected(event: AutocompleteSelectedEvent): void {\n const hasValue = this.value.find(\n v => v[this.bindName].toLowerCase() === (event.option.value as any)[this.bindName].toLowerCase()\n );\n\n if (!hasValue) {\n this.value.push(event.option.value);\n }\n\n this.input().nativeElement.value = '';\n this.chipsCtrl.setValue(null);\n this.calculateControlValue();\n this.isLoading = false;\n }\n\n private calculateControlValue() {\n const value = this.value.map(v => {\n const itemValue = v[this.bindValue];\n\n if (itemValue) {\n return {\n [this.bindValue]: itemValue,\n };\n }\n\n return v;\n });\n this.control().setValue(value);\n }\n}\n","@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-chip-grid #chipGrid>\n @for (option of value; track option) {\n <ngs-chip-row (removed)=\"remove(option)\">\n {{ option[bindName] }}\n <button ngsChipRemove>\n <ngs-icon name=\"fluent:dismiss-circle-24-regular\"/>\n </button>\n </ngs-chip-row>\n }\n <input [placeholder]=\"config().placeholder\"\n #input\n maxlength=\"30\"\n [formControl]=\"chipsCtrl\"\n [ngsChipInputFor]=\"chipGrid\"\n [ngsAutocomplete]=\"autocomplete\"\n [ngsChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (chipInputTokenEnd)=\"add($event)\">\n </ngs-chip-grid>\n @if (isLoading) {\n <div class=\"loader\">\n <ngs-progress-spinner\n mode=\"indeterminate\"\n [diameter]=\"20\"/>\n </div>\n }\n <ngs-autocomplete #autocomplete=\"ngsAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track option) {\n <ngs-option [value]=\"option\">{{ option[bindName] }}</ngs-option>\n }\n\n @if (!(filteredOptions$ | async)?.length && !isLoading && chipsCtrl.value) {\n <ngs-option disabled>\n No search results found.\n </ngs-option>\n }\n </ngs-autocomplete>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAyCa,qBAAqB,CAAA;AACxB,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAmB;AAEjC,IAAA,kBAAkB,GAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AAC7C,IAAA,SAAS,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AAC/B,IAAA,KAAK,GAAG,SAAS,CAAC,QAAQ,CAA+B,OAAO,CAAC;IACjE,KAAK,GAAU,EAAE;AAE1B,IAAA,gBAAgB;IAChB,SAAS,GAAG,KAAK;IAEjB,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CACtD,SAAS,CAAC,EAAE,CAAC,EACb,GAAG,CAAC,MAAM,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAChC,YAAY,CAAC,GAAG,CAAC,EACjB,oBAA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AA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,eAAe,6JACf,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,CAAA;;2FAKA,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAvBjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,6BAA6B,EAAA,OAAA,EAC9B;wBACP,WAAW;wBACX,YAAY;wBACZ,mBAAmB;wBACnB,QAAQ;wBACR,SAAS;wBACT,UAAU;wBACV,OAAO;wBACP,KAAK;wBACL,SAAS;wBACT,IAAI;wBACJ,IAAI;wBACJ,KAAK;wBACL,MAAM;wBACN,mBAAmB;wBACnB,eAAe;wBACf;AACD,qBAAA,EAAA,QAAA,EAAA,glDAAA,EAAA,MAAA,EAAA,CAAA,sMAAA,CAAA,EAAA;2PAYiE,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -20,7 +20,7 @@ class DatepickerField {
|
|
|
20
20
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DatepickerField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
21
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DatepickerField, isStandalone: true, selector: "ngs-datepicker-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
22
22
|
provideNativeDateAdapter()
|
|
23
|
-
], exportAs: ["ngsDatepickerField"], ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <input ngsInput [ngsDatepicker]=\"picker\" [formControl]=\"control()\" readonly>\n <ngs-datepicker-toggle ngsSuffix [for]=\"picker\" />\n <ngs-datepicker #picker />\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "directive", type: Suffix, selector: "[ngsSuffix]" }, { kind: "component", type: DatepickerToggle, selector: "ngs-datepicker-toggle", inputs: ["for"], exportAs: ["ngsDatepickerToggle"] }, { kind: "component", type: Datepicker, selector: "ngs-datepicker", inputs: ["startAt", "calendarHeaderComponent", "quickPresets", "showQuickPresets"], exportAs: ["ngsDatepicker"] }, { kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty"], exportAs: ["ngsFormField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: DatepickerInput, selector: "input[ngsDatepicker]", inputs: ["ngsDatepicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23
|
+
], exportAs: ["ngsDatepickerField"], ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <input ngsInput [ngsDatepicker]=\"picker\" [formControl]=\"control()\" readonly>\n <ngs-datepicker-toggle ngsSuffix [for]=\"picker\" />\n <ngs-datepicker #picker />\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "directive", type: Suffix, selector: "[ngsSuffix]" }, { kind: "component", type: DatepickerToggle, selector: "ngs-datepicker-toggle", inputs: ["for"], exportAs: ["ngsDatepickerToggle"] }, { kind: "component", type: Datepicker, selector: "ngs-datepicker", inputs: ["startAt", "calendarHeaderComponent", "quickPresets", "showQuickPresets"], exportAs: ["ngsDatepicker"] }, { kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: DatepickerInput, selector: "input[ngsDatepicker]", inputs: ["ngsDatepicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24
24
|
}
|
|
25
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DatepickerField, decorators: [{
|
|
26
26
|
type: Component,
|
|
@@ -41,4 +41,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
41
41
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
42
42
|
|
|
43
43
|
export { DatepickerField };
|
|
44
|
-
//# sourceMappingURL=ngstarter-ui-components-form-renderer-datepicker-field-
|
|
44
|
+
//# sourceMappingURL=ngstarter-ui-components-form-renderer-datepicker-field-DRSVe0gK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-form-renderer-datepicker-field-
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-form-renderer-datepicker-field-DRSVe0gK.mjs","sources":["../../../projects/components/form-renderer/src/fields/datepicker-field/datepicker-field.ts","../../../projects/components/form-renderer/src/fields/datepicker-field/datepicker-field.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { ComponentConfig } from '../../models/form-config.model';\nimport { Error, FormField, Hint, Label, Suffix } from '@ngstarter-ui/components/form-field';\nimport { Datepicker, DatepickerInput, DatepickerToggle, provideNativeDateAdapter } from '@ngstarter-ui/components/datepicker';\nimport { Input } from '@ngstarter-ui/components/input';\n\n@Component({\n selector: 'ngs-datepicker-field',\n exportAs: 'ngsDatepickerField',\n providers: [\n provideNativeDateAdapter()\n ],\n imports: [\n Hint,\n Input,\n Suffix,\n DatepickerToggle,\n Datepicker,\n Error,\n Label,\n FormField,\n ReactiveFormsModule,\n DatepickerInput\n ],\n templateUrl: './datepicker-field.html',\n styleUrl: './datepicker-field.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DatepickerField {\n control = input.required<FormControl>();\n config = input.required<ComponentConfig>();\n\n getErrorMessage(): string {\n const errors = this.control().errors;\n if (!errors) return '';\n const errorKey = Object.keys(errors)[0];\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\n return validator?.message || 'Invalid value';\n }\n}\n","@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <input ngsInput [ngsDatepicker]=\"picker\" [formControl]=\"control()\" readonly>\n <ngs-datepicker-toggle ngsSuffix [for]=\"picker\" />\n <ngs-datepicker #picker />\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n"],"names":[],"mappings":";;;;;;;;MA6Ba,eAAe,CAAA;AAC1B,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;AACpC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;QACtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;IAC9C;uGAVW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,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AAA,EAAA,WAAA,EAAA,IAAA,EACV,KAAK,sDACL,KAAK,EAAA,QAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACL,SAAS,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,EAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACT,mBAAmB,0kBACnB,eAAe,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAMN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAtB3B,SAAS;+BACE,sBAAsB,EAAA,QAAA,EACtB,oBAAoB,EAAA,SAAA,EACnB;AACT,wBAAA,wBAAwB;qBACzB,EAAA,OAAA,EACQ;wBACP,IAAI;wBACJ,KAAK;wBACL,MAAM;wBACN,gBAAgB;wBAChB,UAAU;wBACV,KAAK;wBACL,KAAK;wBACL,SAAS;wBACT,mBAAmB;wBACnB;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4cAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA;;;;;"}
|
|
@@ -17,7 +17,7 @@ class InputField {
|
|
|
17
17
|
return validator?.message || 'Invalid value';
|
|
18
18
|
}
|
|
19
19
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: InputField, isStandalone: true, selector: "ngs-input-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <input ngsInput\n [type]=\"config().inputType || 'text'\"\n [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"\n [readonly]=\"config().readonly\">\n @if (config().hint) {\n <ngs-hint>{{ config().hint }}</ngs-hint>\n }\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty"], exportAs: ["ngsFormField"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: InputField, isStandalone: true, selector: "ngs-input-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <input ngsInput\n [type]=\"config().inputType || 'text'\"\n [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"\n [readonly]=\"config().readonly\">\n @if (config().hint) {\n <ngs-hint>{{ config().hint }}</ngs-hint>\n }\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
21
|
}
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputField, decorators: [{
|
|
23
23
|
type: Component,
|
|
@@ -32,4 +32,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
32
32
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
33
33
|
|
|
34
34
|
export { InputField };
|
|
35
|
-
//# sourceMappingURL=ngstarter-ui-components-form-renderer-input-field-
|
|
35
|
+
//# sourceMappingURL=ngstarter-ui-components-form-renderer-input-field-DpGLKZjz.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-form-renderer-input-field-
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-form-renderer-input-field-DpGLKZjz.mjs","sources":["../../../projects/components/form-renderer/src/fields/input-field/input-field.ts","../../../projects/components/form-renderer/src/fields/input-field/input-field.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { ComponentConfig } from '../../models/form-config.model';\nimport { Error, FormField, Hint, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\n\n@Component({\n selector: 'ngs-input-field',\n imports: [\n ReactiveFormsModule,\n Error,\n Hint,\n Label,\n Input,\n FormField\n ],\n templateUrl: './input-field.html',\n styleUrl: './input-field.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InputField {\n control = input.required<FormControl>();\n config = input.required<ComponentConfig>();\n\n getErrorMessage(): string {\n const errors = this.control().errors;\n if (!errors) return '';\n const errorKey = Object.keys(errors)[0];\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\n return validator?.message || 'Invalid value';\n }\n}\n","@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <input ngsInput\n [type]=\"config().inputType || 'text'\"\n [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"\n [readonly]=\"config().readonly\">\n @if (config().hint) {\n <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EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,mBAAmB;wBACnB,KAAK;wBACL,IAAI;wBACJ,KAAK;wBACL,KAAK;wBACL;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,whBAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA;;;;;"}
|
|
@@ -20,7 +20,7 @@ class SelectField {
|
|
|
20
20
|
return this.config()?.payload?.['options'] || [];
|
|
21
21
|
}
|
|
22
22
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SelectField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: SelectField, isStandalone: true, selector: "ngs-select-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngsSelectField"], ngImport: i0, template: "@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-select [formControl]=\"control()\">\n @for (option of options; track option.value) {\n <ngs-option [value]=\"option.value\">{{ option.label }}</ngs-option>\n }\n </ngs-select>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Option, selector: "ngs-option", inputs: ["value", "disabled", "selected"], outputs: ["onSelectionChange"], exportAs: ["ngsOption"] }, { kind: "component", type: Select, selector: "ngs-select", inputs: ["id", "placeholder", "disabled", "required", "multiple", "hideCheckIcon", "
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: SelectField, isStandalone: true, selector: "ngs-select-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngsSelectField"], ngImport: i0, template: "@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-select [formControl]=\"control()\">\n @for (option of options; track option.value) {\n <ngs-option [value]=\"option.value\">{{ option.label }}</ngs-option>\n }\n </ngs-select>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Option, selector: "ngs-option", inputs: ["value", "data", "disabled", "selected"], outputs: ["onSelectionChange"], exportAs: ["ngsOption"] }, { kind: "component", type: Select, selector: "ngs-select", inputs: ["id", "placeholder", "disabled", "required", "multiple", "hideCheckIcon", "clearable", "aria-label", "tabIndex", "aria-describedby", "value"], outputs: ["selectionChange", "opened", "closed", "valueChange"], exportAs: ["ngsSelect"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24
24
|
}
|
|
25
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: SelectField, decorators: [{
|
|
26
26
|
type: Component,
|
|
@@ -36,4 +36,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
36
36
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
37
37
|
|
|
38
38
|
export { SelectField };
|
|
39
|
-
//# sourceMappingURL=ngstarter-ui-components-form-renderer-select-field-
|
|
39
|
+
//# sourceMappingURL=ngstarter-ui-components-form-renderer-select-field-CCbpYyZo.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-form-renderer-select-field-
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-form-renderer-select-field-CCbpYyZo.mjs","sources":["../../../projects/components/form-renderer/src/fields/select-field/select-field.ts","../../../projects/components/form-renderer/src/fields/select-field/select-field.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { ComponentConfig } from '../../models/form-config.model';\nimport { Error, FormField, Hint, Label } from '@ngstarter-ui/components/form-field';\nimport { Option, Select } from '@ngstarter-ui/components/select';\n\n@Component({\n selector: 'ngs-select-field',\n exportAs: 'ngsSelectField',\n imports: [\n Error,\n Hint,\n Option,\n Select,\n Label,\n FormField,\n ReactiveFormsModule\n ],\n templateUrl: './select-field.html',\n styleUrl: './select-field.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectField {\n control = input.required<FormControl>();\n config = input.required<ComponentConfig>();\n\n getErrorMessage(): string {\n const errors = this.control().errors;\n if (!errors) return '';\n const errorKey = Object.keys(errors)[0];\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\n return validator?.message || 'Invalid value';\n }\n\n get options() {\n return this.config()?.payload?.['options'] || [];\n }\n}\n","@if (control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-select [formControl]=\"control()\">\n @for (option of options; track option.value) {\n <ngs-option [value]=\"option.value\">{{ option.label }}</ngs-option>\n }\n </ngs-select>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n"],"names":[],"mappings":";;;;;;;MAsBa,WAAW,CAAA;AACtB,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;AACpC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;QACtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;IAC9C;AAEA,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE;IAClD;uGAdW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,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AA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACN,KAAK,EAAA,QAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACL,SAAS,gJACT,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAMV,WAAW,EAAA,UAAA,EAAA,CAAA;kBAhBvB,SAAS;+BACE,kBAAkB,EAAA,QAAA,EAClB,gBAAgB,EAAA,OAAA,EACjB;wBACP,KAAK;wBACL,IAAI;wBACJ,MAAM;wBACN,MAAM;wBACN,KAAK;wBACL,SAAS;wBACT;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2eAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA;;;;;"}
|
|
@@ -18,7 +18,7 @@ class TextareaField {
|
|
|
18
18
|
return validator?.message || 'Invalid value';
|
|
19
19
|
}
|
|
20
20
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TextareaField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: TextareaField, isStandalone: true, selector: "ngs-textarea-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngsTextareaField"], ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <textarea ngsInput\n [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"\n [readonly]=\"config().readonly\"\n ngsTextareaAutoSize></textarea>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TextareaAutoSize, selector: "textarea[ngsTextareaAutoSize]", inputs: ["minRows", "maxRows"], exportAs: ["ngsTextareaAutoSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: TextareaField, isStandalone: true, selector: "ngs-textarea-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngsTextareaField"], ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <textarea ngsInput\n [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"\n [readonly]=\"config().readonly\"\n ngsTextareaAutoSize></textarea>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TextareaAutoSize, selector: "textarea[ngsTextareaAutoSize]", inputs: ["minRows", "maxRows"], exportAs: ["ngsTextareaAutoSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
22
|
}
|
|
23
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TextareaField, decorators: [{
|
|
24
24
|
type: Component,
|
|
@@ -34,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
34
34
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
35
35
|
|
|
36
36
|
export { TextareaField };
|
|
37
|
-
//# sourceMappingURL=ngstarter-ui-components-form-renderer-textarea-field-
|
|
37
|
+
//# sourceMappingURL=ngstarter-ui-components-form-renderer-textarea-field-D89GlMDO.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-form-renderer-textarea-field-
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-form-renderer-textarea-field-D89GlMDO.mjs","sources":["../../../projects/components/form-renderer/src/fields/textarea-field/textarea-field.ts","../../../projects/components/form-renderer/src/fields/textarea-field/textarea-field.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { ComponentConfig } from '../../models/form-config.model';\nimport { Error, FormField, Hint, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { TextareaAutoSize } from '@ngstarter-ui/components/core';\n\n@Component({\n selector: 'ngs-textarea-field',\n exportAs: 'ngsTextareaField',\n imports: [\n Error,\n Hint,\n Label,\n FormField,\n Input,\n ReactiveFormsModule,\n TextareaAutoSize\n ],\n templateUrl: './textarea-field.html',\n styleUrl: './textarea-field.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TextareaField {\n control = input.required<FormControl>();\n config = input.required<ComponentConfig>();\n\n getErrorMessage(): string {\n const errors = this.control().errors;\n if (!errors) return '';\n const errorKey = Object.keys(errors)[0];\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\n return validator?.message || 'Invalid value';\n }\n}\n","@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <textarea ngsInput\n [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"\n [readonly]=\"config().readonly\"\n ngsTextareaAutoSize></textarea>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n"],"names":[],"mappings":";;;;;;;;MAuBa,aAAa,CAAA;AACxB,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;AACpC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;QACtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;IAC9C;uGAVW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA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,CAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAMP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAhBzB,SAAS;+BACE,oBAAoB,EAAA,QAAA,EACpB,kBAAkB,EAAA,OAAA,EACnB;wBACP,KAAK;wBACL,IAAI;wBACJ,KAAK;wBACL,SAAS;wBACT,KAAK;wBACL,mBAAmB;wBACnB;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0fAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA;;;;;"}
|
|
@@ -17,7 +17,7 @@ class TimezoneField {
|
|
|
17
17
|
return validator?.message || 'Invalid value';
|
|
18
18
|
}
|
|
19
19
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TimezoneField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: TimezoneField, isStandalone: true, selector: "ngs-timezone-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngsTimezoneField"], ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-timezone-select [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"/>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty"], exportAs: ["ngsFormField"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: TimezoneSelect, selector: "ngs-timezone-select", inputs: ["aria-describedby", "locale", "placeholder", "required", "disabled", "value", "searchTerm"], outputs: ["valueChange", "searchTermChange", "opened", "closed"], exportAs: ["ngsTimezoneSelect"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }] });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: TimezoneField, isStandalone: true, selector: "ngs-timezone-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ngsTimezoneField"], ngImport: i0, template: "@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-timezone-select [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"/>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n", styles: [":host{display:block}:host ngs-form-field{width:100%}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Error, selector: "ngs-error" }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: TimezoneSelect, selector: "ngs-timezone-select", inputs: ["aria-describedby", "locale", "placeholder", "required", "disabled", "value", "searchTerm"], outputs: ["valueChange", "searchTermChange", "opened", "closed"], exportAs: ["ngsTimezoneSelect"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"] }] });
|
|
21
21
|
}
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TimezoneField, decorators: [{
|
|
23
23
|
type: Component,
|
|
@@ -32,4 +32,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
32
32
|
}], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
33
33
|
|
|
34
34
|
export { TimezoneField };
|
|
35
|
-
//# sourceMappingURL=ngstarter-ui-components-form-renderer-timezone-field-
|
|
35
|
+
//# sourceMappingURL=ngstarter-ui-components-form-renderer-timezone-field-C9wz7zPg.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-form-renderer-timezone-field-
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-form-renderer-timezone-field-C9wz7zPg.mjs","sources":["../../../projects/components/form-renderer/src/fields/timezone-field/timezone-field.ts","../../../projects/components/form-renderer/src/fields/timezone-field/timezone-field.html"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { ComponentConfig } from '../../models/form-config.model';\nimport { TimezoneSelect } from '@ngstarter-ui/components/timezone-select';\nimport { Error, FormField, Hint, Label } from '@ngstarter-ui/components/form-field';\n\n@Component({\n selector: 'ngs-timezone-field',\n exportAs: 'ngsTimezoneField',\n imports: [\n Error,\n FormField,\n Label,\n TimezoneSelect,\n ReactiveFormsModule,\n Hint\n ],\n templateUrl: './timezone-field.html',\n styleUrl: './timezone-field.scss'\n})\nexport class TimezoneField {\n control = input.required<FormControl>();\n config = input.required<ComponentConfig>();\n\n getErrorMessage(): string {\n const errors = this.control().errors;\n if (!errors) return '';\n const errorKey = Object.keys(errors)[0];\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\n return validator?.message || 'Invalid value';\n }\n}\n","@if(control() && config()) {\n <ngs-form-field>\n <ngs-label>{{ config().label }}</ngs-label>\n <ngs-timezone-select [formControl]=\"control()\"\n [placeholder]=\"config().placeholder || ''\"/>\n <ngs-hint>{{ config().hint }}</ngs-hint>\n @if (control().invalid && control().touched) {\n <ngs-error>{{ getErrorMessage() }}</ngs-error>\n }\n </ngs-form-field>\n}\n"],"names":[],"mappings":";;;;;;;MAoBa,aAAa,CAAA;AACxB,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;AACpC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;QACtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;IAC9C;uGAVW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA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A,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACd,mBAAmB,0TACnB,IAAI,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKK,aAAa,EAAA,UAAA,EAAA,CAAA;kBAdzB,SAAS;+BACE,oBAAoB,EAAA,QAAA,EACpB,kBAAkB,EAAA,OAAA,EACnB;wBACP,KAAK;wBACL,SAAS;wBACT,KAAK;wBACL,cAAc;wBACd,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,2ZAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA;;;;;"}
|
|
@@ -16,20 +16,20 @@ class ComponentRegistryService {
|
|
|
16
16
|
this.registerDefaultComponents();
|
|
17
17
|
}
|
|
18
18
|
registerDefaultComponents() {
|
|
19
|
-
this.componentMap.set('input', () => import('./ngstarter-ui-components-form-renderer-input-field-
|
|
20
|
-
this.componentMap.set('textarea', () => import('./ngstarter-ui-components-form-renderer-textarea-field-
|
|
19
|
+
this.componentMap.set('input', () => import('./ngstarter-ui-components-form-renderer-input-field-DpGLKZjz.mjs').then(c => c.InputField));
|
|
20
|
+
this.componentMap.set('textarea', () => import('./ngstarter-ui-components-form-renderer-textarea-field-D89GlMDO.mjs')
|
|
21
21
|
.then(c => c.TextareaField));
|
|
22
|
-
this.componentMap.set('select', () => import('./ngstarter-ui-components-form-renderer-select-field-
|
|
22
|
+
this.componentMap.set('select', () => import('./ngstarter-ui-components-form-renderer-select-field-CCbpYyZo.mjs')
|
|
23
23
|
.then(c => c.SelectField));
|
|
24
24
|
this.componentMap.set('checkbox', () => import('./ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs')
|
|
25
25
|
.then(c => c.CheckboxField));
|
|
26
|
-
this.componentMap.set('datepicker', () => import('./ngstarter-ui-components-form-renderer-datepicker-field-
|
|
26
|
+
this.componentMap.set('datepicker', () => import('./ngstarter-ui-components-form-renderer-datepicker-field-DRSVe0gK.mjs')
|
|
27
27
|
.then(c => c.DatepickerField));
|
|
28
28
|
this.componentMap.set('toggle', () => import('./ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs')
|
|
29
29
|
.then(c => c.ToggleField));
|
|
30
30
|
this.componentMap.set('radioGroup', () => import('./ngstarter-ui-components-form-renderer-radio-group-field-DUCSU3iT.mjs')
|
|
31
31
|
.then(c => c.RadioGroupField));
|
|
32
|
-
this.componentMap.set('timezone', () => import('./ngstarter-ui-components-form-renderer-timezone-field-
|
|
32
|
+
this.componentMap.set('timezone', () => import('./ngstarter-ui-components-form-renderer-timezone-field-C9wz7zPg.mjs')
|
|
33
33
|
.then(c => c.TimezoneField));
|
|
34
34
|
this.componentMap.set('image', () => import('./ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs')
|
|
35
35
|
.then(c => c.ImageContent));
|
|
@@ -37,7 +37,7 @@ class ComponentRegistryService {
|
|
|
37
37
|
.then(c => c.TextContent));
|
|
38
38
|
this.componentMap.set('divider', () => import('./ngstarter-ui-components-form-renderer-divider-content-D8Sffofu.mjs')
|
|
39
39
|
.then(c => c.DividerContent));
|
|
40
|
-
this.componentMap.set('autocompleteMany', () => import('./ngstarter-ui-components-form-renderer-autocomplete-many-field-
|
|
40
|
+
this.componentMap.set('autocompleteMany', () => import('./ngstarter-ui-components-form-renderer-autocomplete-many-field-BLhfO1zC.mjs')
|
|
41
41
|
.then(c => c.AutocompleteManyField));
|
|
42
42
|
if (this.globalRegistry) {
|
|
43
43
|
const globalRegistry = this.globalRegistry;
|