@koalarx/ui 20.0.18 → 20.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.
Files changed (24) hide show
  1. package/fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs +2 -2
  2. package/fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs.map +1 -1
  3. package/fesm2022/koalarx-ui-shared-components-input-field-input-cnpj.mjs +2 -2
  4. package/fesm2022/koalarx-ui-shared-components-input-field-input-cnpj.mjs.map +1 -1
  5. package/fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs +2 -2
  6. package/fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs.map +1 -1
  7. package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs +2 -2
  8. package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs.map +1 -1
  9. package/fesm2022/koalarx-ui-shared-components-input-field-input-email.mjs +2 -2
  10. package/fesm2022/koalarx-ui-shared-components-input-field-input-email.mjs.map +1 -1
  11. package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs +2 -2
  12. package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs.map +1 -1
  13. package/fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs +2 -2
  14. package/fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs.map +1 -1
  15. package/fesm2022/koalarx-ui-shared-components-input-field-input-time.mjs +2 -2
  16. package/fesm2022/koalarx-ui-shared-components-input-field-input-time.mjs.map +1 -1
  17. package/fesm2022/koalarx-ui-shared-components-input-field-input-url.mjs +2 -2
  18. package/fesm2022/koalarx-ui-shared-components-input-field-input-url.mjs.map +1 -1
  19. package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs +2 -2
  20. package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs.map +1 -1
  21. package/fesm2022/koalarx-ui-shared-components-input-field.mjs +4 -3
  22. package/fesm2022/koalarx-ui-shared-components-input-field.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/shared/components/input-field/index.d.ts +2 -1
@@ -552,11 +552,11 @@ class AutocompleteField extends InputFieldBase {
552
552
  this.autocompleteValue.makeAutofill();
553
553
  }
554
554
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AutocompleteField, deps: [], target: i0.ɵɵFactoryTarget.Component });
555
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: AutocompleteField, isStandalone: true, selector: "kl-autocomplete-field", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, placeholderSearchField: { classPropertyName: "placeholderSearchField", publicName: "placeholderSearchField", isSignal: true, isRequired: false, transformFunction: null }, disableAutoTypeConversion: { classPropertyName: "disableAutoTypeConversion", publicName: "disableAutoTypeConversion", isSignal: true, isRequired: false, transformFunction: null } }, providers: [Autocomplete, AutocompleteValue], usesInheritance: true, ngImport: i0, template: "<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label()}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"autocompleteValue.currentValue()\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "component", type: Loader, selector: "kl-loader", inputs: ["size"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }, { kind: "directive", type: HookChange, selector: "[hookChange]", inputs: ["hookChange"] }] });
555
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: AutocompleteField, isStandalone: true, selector: "kl-autocomplete-field", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, placeholderSearchField: { classPropertyName: "placeholderSearchField", publicName: "placeholderSearchField", isSignal: true, isRequired: false, transformFunction: null }, disableAutoTypeConversion: { classPropertyName: "disableAutoTypeConversion", publicName: "disableAutoTypeConversion", isSignal: true, isRequired: false, transformFunction: null } }, providers: [Autocomplete, AutocompleteValue], usesInheritance: true, ngImport: i0, template: "<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n @if (label(); as label) {\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n }\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"autocompleteValue.currentValue()\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "component", type: Loader, selector: "kl-loader", inputs: ["size"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }, { kind: "directive", type: HookChange, selector: "[hookChange]", inputs: ["hookChange"] }] });
556
556
  }
557
557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AutocompleteField, decorators: [{
558
558
  type: Component,
559
- args: [{ selector: 'kl-autocomplete-field', providers: [Autocomplete, AutocompleteValue], imports: [Loader, FieldErrors, HookChange], template: "<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label()}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"autocompleteValue.currentValue()\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
559
+ args: [{ selector: 'kl-autocomplete-field', providers: [Autocomplete, AutocompleteValue], imports: [Loader, FieldErrors, HookChange], template: "<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n @if (label(); as label) {\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n }\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"autocompleteValue.currentValue()\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
560
560
  }], ctorParameters: () => [] });
561
561
 
562
562
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-autocomplete.mjs","sources":["../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-ref.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-options.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-options.html","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-builder.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-value.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-field.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-field.html","../../projects/koala-ui/shared/components/input-field/autocomplete/koalarx-ui-shared-components-input-field-autocomplete.ts"],"sourcesContent":["import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n Type,\n} from '@angular/core';\nimport { AUTOCOMPLETE_APP_REF } from './autocomplete';\n\nexport const AUTOCOMPLETE_REF_TOKEN = new InjectionToken(\n 'AutocompleteRefToken'\n);\n\n@Injectable()\nexport class AutocompleteRef {\n private readonly appRef = inject<ApplicationRef>(AUTOCOMPLETE_APP_REF);\n private readonly componentRef = inject<() => ComponentRef<Type<any>>>(\n AUTOCOMPLETE_REF_TOKEN\n );\n\n close() {\n setTimeout(() => {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n });\n }\n}\n","import {\n booleanAttribute,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n OnInit,\n Signal,\n signal,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { AutocompleteRef } from './autocomplete-ref';\nimport { AutocompleteList, AutocompleteValue } from './autocomplete-value';\nimport { KlArray } from '@koalarx/utils';\n\n@Component({\n selector: 'kl-autocomplete-options',\n templateUrl: './autocomplete-options.html',\n imports: [ReactiveFormsModule],\n})\nexport class AutocompleteOptions implements OnInit, OnDestroy {\n private readonly autocompleteRef = inject(AutocompleteRef);\n private readonly viewContainerRef =\n inject<ViewContainerRef>(ViewContainerRef);\n private firstLoad = true;\n\n fieldId = input.required<string>();\n options = input.required<Signal<AutocompleteList>>();\n control = input.required<FormControl>();\n multiple = input.required<boolean>();\n autocompleteValue = input.required<AutocompleteValue>();\n placeholderSearchField = input<string | undefined>();\n disableAutoTypeConversion = input(false, { transform: booleanAttribute });\n list = linkedSignal(() => {\n const options = this.options()();\n return new KlArray(options).split(100)[0];\n });\n\n optionFocused = signal(0);\n\n searchInputRef = viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n constructor() {\n effect(() => {\n const hasValue = !!this.autocompleteValue().currentValue();\n\n if (this.firstLoad) {\n this.firstLoad = false;\n return;\n }\n\n if (hasValue && !this.multiple()) {\n this.close();\n }\n });\n\n effect(() => {\n const options = this.options()();\n if (options.length > 0) {\n this.optionFocused.set(0);\n }\n });\n }\n\n private updateScrollPosition(direction: 'down' | 'up' = 'down') {\n setTimeout(() => {\n const containerElement =\n this.viewContainerRef.element.nativeElement.querySelector(\n '.kl-autocomplete-options-container'\n ) as HTMLDivElement;\n const focusedOptionElement = containerElement.querySelector(\n 'label.active'\n ) as HTMLDivElement;\n\n if (focusedOptionElement) {\n containerElement.scrollTo({\n top:\n direction === 'down'\n ? containerElement.scrollTop +\n focusedOptionElement.getBoundingClientRect().height\n : containerElement.scrollTop -\n focusedOptionElement.getBoundingClientRect().height,\n });\n }\n });\n }\n\n private onKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowDown': {\n event.stopPropagation();\n event.preventDefault();\n\n this.optionFocused.update((value) => {\n if (value < this.options()().length - 1) {\n return value + 1;\n }\n return value;\n });\n this.updateScrollPosition('down');\n break;\n }\n case 'ArrowUp': {\n event.stopPropagation();\n event.preventDefault();\n\n this.optionFocused.update((value) => {\n if (value > 0) {\n return value - 1;\n }\n return value;\n });\n this.updateScrollPosition('up');\n break;\n }\n }\n };\n\n private onKeyup = (event: KeyboardEvent) => {\n const containerElement: HTMLDivElement =\n this.viewContainerRef.element.nativeElement;\n\n switch (event.key) {\n case 'Enter': {\n event.stopPropagation();\n event.preventDefault();\n\n const focusedOption = this.options()()[this.optionFocused()];\n\n if (focusedOption) {\n containerElement\n .querySelectorAll<HTMLInputElement>('input')\n .item(this.optionFocused() + 1)\n .click();\n }\n break;\n }\n case 'Escape': {\n event.stopPropagation();\n event.preventDefault();\n\n this.close();\n break;\n }\n }\n };\n\n private onClick = (event: MouseEvent) => {\n const containerElement: HTMLDivElement =\n this.viewContainerRef.element.nativeElement;\n const insideClick = containerElement.contains(event.target as Node);\n\n if (!insideClick) {\n event.stopPropagation();\n event.preventDefault();\n this.close();\n }\n };\n\n private onScroll = (event: Event) => {\n const container = this.viewContainerRef.element.nativeElement.querySelector(\n '.kl-autocomplete-options-container'\n );\n const target = event.target as HTMLElement;\n\n if (!container || !target.tagName) return;\n\n if (target !== container) {\n this.close();\n }\n };\n\n private close() {\n if (this.autocompleteValue().filterControl.value) {\n this.autocompleteValue().filterControl.reset();\n }\n\n this.autocompleteRef.close();\n }\n\n ngOnDestroy() {\n document.removeEventListener('keyup', this.onKeyup);\n document.removeEventListener('keydown', this.onKeyDown);\n document.removeEventListener('click', this.onClick);\n window.removeEventListener('scroll', this.onScroll, true);\n }\n\n ngOnInit() {\n this.searchInputRef()?.nativeElement.focus();\n\n setTimeout(() => {\n document.addEventListener('keyup', this.onKeyup);\n document.addEventListener('keydown', this.onKeyDown);\n document.addEventListener('click', this.onClick);\n window.addEventListener('scroll', this.onScroll, true);\n }, 150);\n }\n\n setValue(event: Event) {\n const target = event.target as HTMLInputElement;\n\n let value: string | number = target.value;\n\n if (\n !Number.isNaN(parseInt(value as any)) &&\n !/^0+[1-9]\\d*$/.test(value) &&\n !this.disableAutoTypeConversion()\n ) {\n value = Number(value);\n }\n\n if (this.multiple()) {\n const check = target.checked;\n\n let currentValue = this.control().value;\n\n if (!Array.isArray(currentValue)) {\n currentValue = [currentValue];\n }\n\n if (check) {\n this.control().setValue([...currentValue, value]);\n } else {\n this.control().setValue(currentValue.filter((v: any) => v !== value));\n }\n } else {\n this.control().setValue(value);\n }\n }\n}\n","<div class=\"bg-base-300 overflow-hidden shadow border border-neutral-200 dark:border-neutral-700 rounded-lg flex flex-col w-full\"\n [attr.aria-labelledby]=\"fieldId()\">\n\n <div class=\"border-b border-neutral-200 dark:border-neutral-700\">\n <label class=\"flex items-center text-sm\">\n <i class=\"fa-solid fa-magnifying-glass opacity-60 absolute top-3 left-4\"></i>\n <input class=\"p-2 pr-3 pl-10 outline-none placeholder:opacity-60\"\n #searchInput\n type=\"search\"\n [formControl]=\"autocompleteValue().filterControl\"\n placeholder=\"Type to Search...\"\n />\n </label>\n </div>\n\n <div class=\"kl-autocomplete-options-container flex flex-col overflow-auto p-1\">\n @for (item of list(); track $index) {\n @let optionLabelId = fieldId() + '-' + item.value;\n\n <label class=\"relative py-1 px-2 pr-8 rounded-md\"\n [attr.for]=\"optionLabelId\"\n [class.active]=\"$index === optionFocused()\"\n (mouseover)=\"optionFocused.set($index)\">\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId()\"\n [attr.value]=\"item.value\"\n [checked]=\"multiple()\n ? control().value?.includes(item.value)\n : item.value === control().value\"\n (change)=\"setValue($event)\"\n />\n {{item.label}}\n </label>\n }\n </div>\n</div>\n","import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n inputBinding,\n Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { GENERIC_COMPONENT_CONTAINER_NAME } from '@koalarx/ui/core/config';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { AutocompleteOptions } from './autocomplete-options';\nimport { AUTOCOMPLETE_REF_TOKEN, AutocompleteRef } from './autocomplete-ref';\nimport { AutocompleteList, AutocompleteValue } from './autocomplete-value';\n\nexport type AutocompleteAfterCloseTrigger = string | Record<string, any>;\nexport type AutocompleteAfterCloseTriggerFn = (\n trigger: AutocompleteAfterCloseTrigger\n) => void;\nexport const AUTOCOMPLETE_APP_REF = new InjectionToken('AutocompleteAppRef');\n\nexport interface AutocompleteOpenData {\n fieldId: string;\n options: Signal<AutocompleteList>;\n control: FormControl<any>;\n multiple: boolean;\n autocompleteValue: AutocompleteValue;\n placeholderSearchField?: string;\n disableAutoTypeConversion?: boolean;\n}\n\n@Injectable()\nexport class Autocomplete {\n private readonly appRef = inject(ApplicationRef);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n private positionOnScreen(container: HTMLDivElement) {\n const autocompleteField = this.viewContainerRef.element\n .nativeElement as HTMLElement;\n const currentTop = window.scrollY;\n const position = autocompleteField.getBoundingClientRect();\n\n if (position) {\n const screenHeight = document.body.clientHeight;\n const maxHeight = (screenHeight * 40) / 100;\n let top = position.bottom;\n let height = Math.abs(screenHeight - top);\n\n if (height > maxHeight) {\n height = maxHeight;\n }\n\n const percentFillOnScreen = (height * 100) / screenHeight;\n\n if (percentFillOnScreen <= 20) {\n height = Math.abs(screenHeight - (screenHeight - position.top));\n\n if (height > maxHeight) {\n height = maxHeight;\n }\n\n top = position.top - height;\n }\n\n top += currentTop;\n\n container.style.position = 'absolute';\n container.style.display = 'flex';\n container.style.top = `${top}px`;\n container.style.left = `${position.left}px`;\n container.style.width = `${position.width}px`;\n container.style.height = `auto`;\n container.style.maxHeight = `${height}px`;\n container.style.zIndex = '99';\n container.style.overflow = 'hidden';\n\n const selectedOptions =\n autocompleteField.querySelector<HTMLDivElement>('.selected-options');\n\n if (selectedOptions) {\n selectedOptions.onchange = () =>\n setTimeout(() => {\n this.positionOnScreen(container);\n }, 50);\n }\n }\n }\n\n open(data: AutocompleteOpenData) {\n const main = document.querySelector<HTMLElement>(\n GENERIC_COMPONENT_CONTAINER_NAME\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n\n container.id = elementId;\n\n this.positionOnScreen(container);\n\n const componentRef = createComponent(AutocompleteOptions, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: AUTOCOMPLETE_APP_REF, useValue: this.appRef },\n {\n provide: AUTOCOMPLETE_REF_TOKEN,\n useValue: () => componentRef,\n },\n {\n provide: AutocompleteRef,\n deps: [AUTOCOMPLETE_APP_REF, AUTOCOMPLETE_REF_TOKEN],\n },\n ],\n }),\n bindings: [\n ...Object.keys(data).map((key) =>\n inputBinding(key, () => (data as any)[key])\n ),\n ],\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import { Injectable, ResourceRef, Signal } from '@angular/core';\nimport {\n AutocompleteDataOptionsFn,\n AutocompleteList,\n} from './autocomplete-value';\n\n@Injectable({ providedIn: 'root' })\nexport class AutocompleteBuilder {\n onDemand(config: AutocompleteDataOptionsFn) {\n return config;\n }\n\n onServer(config: ResourceRef<AutocompleteList>) {\n return config;\n }\n\n inMemory(config: AutocompleteList) {\n return config;\n }\n\n inMemoryWithLoading(config: Signal<AutocompleteList>) {\n return config;\n }\n}\n","import {\n DestroyRef,\n inject,\n Injectable,\n linkedSignal,\n ResourceRef,\n signal,\n Signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl } from '@angular/forms';\nimport { isEmpty } from '@koalarx/ui/shared/utils';\nimport { delay } from '@koalarx/utils/KlDelay';\nimport { debounceTime } from 'rxjs/internal/operators/debounceTime';\n\nexport type AutocompleteOptionValue = string | number | null;\n\nexport interface AutocompleteOption<TData = any> {\n label: string;\n value: AutocompleteOptionValue;\n data?: TData;\n}\n\nexport type AutocompleteList = AutocompleteOption[];\nexport interface AutocompleteDataOptionsFnParams {\n filter?: string | null;\n autofill?: any | null;\n}\n\nexport type AutocompleteDataOptionsFn = (\n data: Signal<AutocompleteDataOptionsFnParams>\n) => ResourceRef<AutocompleteList>;\n\nexport type AutocompleteDataOptions =\n | AutocompleteDataOptionsFn\n | ResourceRef<AutocompleteList>\n | Signal<AutocompleteList>\n | AutocompleteList;\n\n@Injectable()\nexport class AutocompleteValue {\n private readonly destroyRef = inject(DestroyRef);\n private readonly _filter = signal<string | null>('');\n private _control?: FormControl<any>;\n private readonly _currentValue = signal<\n AutocompleteOption | AutocompleteOption[] | null\n >(null);\n private _multiple = false;\n private _options?: Signal<AutocompleteList>;\n private _autofill = signal<any | null>(null);\n private _isLoading?: Signal<boolean>;\n private readonly _requestOptionsParams =\n signal<AutocompleteDataOptionsFnParams>({\n filter: null,\n autofill: null,\n });\n\n private readonly _selectedOption = linkedSignal(() => {\n const currentValue = this._currentValue();\n\n if (Array.isArray(currentValue)) {\n return null;\n }\n\n return currentValue;\n });\n\n private readonly _selectedOptions = linkedSignal(() => {\n const currentValue = this._currentValue();\n\n if (Array.isArray(currentValue)) {\n return currentValue;\n }\n\n return [];\n });\n\n private readonly _hasValue = linkedSignal(() => {\n const currentValue = this._currentValue();\n const value = Array.isArray(currentValue)\n ? currentValue\n : currentValue?.value;\n\n if (Array.isArray(value)) {\n return value.length > 0;\n } else if (typeof value === 'number') {\n return value >= 0;\n }\n\n return !!value;\n });\n\n filterControl = new FormControl<string | null>('');\n\n get filter() {\n return this._filter.asReadonly();\n }\n\n get hasValue() {\n return this._hasValue.asReadonly();\n }\n\n get currentValue() {\n return this._currentValue.asReadonly();\n }\n\n get selectedOption() {\n return this._selectedOption.asReadonly();\n }\n\n get selectedOptions() {\n return this._selectedOptions.asReadonly();\n }\n\n get autofill() {\n return this._autofill.asReadonly();\n }\n\n get requestOptionsParams() {\n return this._requestOptionsParams.asReadonly();\n }\n\n private async selectOption(value: any) {\n while (this._isLoading!()) {\n await delay(100);\n }\n\n if (!this._options) {\n return;\n }\n\n const options = this._multiple\n ? this._options()?.filter((opt) => `${value}`?.includes(`${opt.value}`))\n : this._options()?.find((opt) => `${opt.value}` === `${value}`);\n\n if (options) {\n this._currentValue.update(() => {\n if (this._multiple) {\n if (Array.isArray(options)) {\n return options;\n }\n\n return [options];\n }\n\n return options;\n });\n }\n }\n\n async makeAutofill() {\n if (!isEmpty(this._control?.value)) {\n while (this._isLoading!()) {\n await delay(100);\n }\n\n this.selectOption(this._control?.value);\n\n const currentValue = this._currentValue();\n\n if (\n (this._multiple &&\n ((Array.isArray(currentValue) && currentValue.length === 0) ||\n !Array.isArray(currentValue))) ||\n (!this._multiple && isEmpty(currentValue))\n ) {\n this._autofill.set(this._control?.value);\n this._requestOptionsParams.update((params) => ({\n ...params,\n autofill: this._autofill(),\n }));\n }\n }\n }\n\n init(\n control: FormControl<any>,\n options: Signal<AutocompleteList>,\n isLoading: Signal<boolean>,\n multiple = false\n ) {\n this._control = control;\n this._options = options;\n this._multiple = multiple;\n this._isLoading = isLoading;\n\n this.filterControl.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(500))\n .subscribe((value) => {\n this._autofill.set(null);\n this._filter.set(value);\n this._requestOptionsParams.update(() => ({\n filter: value,\n autofill: null,\n }));\n });\n\n this._control.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => this.selectOption(value));\n }\n\n clear(event: MouseEvent) {\n event.preventDefault();\n this._control?.setValue(null);\n this._currentValue.set(null);\n this._requestOptionsParams.update(() => ({\n filter: null,\n autofill: null,\n }));\n }\n\n remove(event: MouseEvent, value: AutocompleteOptionValue) {\n event.preventDefault();\n if (!this._multiple) {\n return;\n }\n\n if (!this._control) {\n return;\n }\n\n const currentValue = this._control.value;\n\n this._control?.setValue(\n currentValue.filter((v: AutocompleteOptionValue) => v !== value)\n );\n }\n}\n","import {\n booleanAttribute,\n Component,\n effect,\n inject,\n Injector,\n input,\n isSignal,\n OnInit,\n ResourceRef,\n runInInjectionContext,\n Signal,\n signal,\n} from '@angular/core';\nimport { Loader } from '@koalarx/ui/core/components/loader';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { HookChange } from '@koalarx/ui/shared/directives';\nimport { isEmpty } from '@koalarx/ui/shared/utils';\nimport { Autocomplete } from './autocomplete';\nimport {\n AutocompleteDataOptions,\n AutocompleteDataOptionsFn,\n AutocompleteList,\n AutocompleteValue,\n} from './autocomplete-value';\n\ninterface OptionsResource {\n onDemand?: ResourceRef<AutocompleteList>;\n onServer?: ResourceRef<AutocompleteList>;\n inMemory?: AutocompleteList;\n inMemoryWithLoading?: Signal<AutocompleteList>;\n}\n\n@Component({\n selector: 'kl-autocomplete-field',\n templateUrl: './autocomplete-field.html',\n providers: [Autocomplete, AutocompleteValue],\n imports: [Loader, FieldErrors, HookChange],\n})\nexport class AutocompleteField extends InputFieldBase implements OnInit {\n private readonly injector = inject(Injector);\n\n readonly autocompleteValue = inject(AutocompleteValue);\n readonly autocomplete = inject(Autocomplete);\n\n options = input.required<AutocompleteDataOptions>();\n multiple = input(false, { transform: booleanAttribute });\n placeholderSearchField = input<string>();\n disableAutoTypeConversion = input(false, { transform: booleanAttribute });\n\n isLoading = signal<boolean>(false);\n optionList = signal<AutocompleteList>([]);\n\n optionsResource = signal<OptionsResource | null>(null);\n\n constructor() {\n super();\n\n effect(() => {\n const optionList = this.optionList();\n const autofill = this.autocompleteValue.autofill();\n\n if (optionList.length > 0 && !isEmpty(autofill)) {\n this.autocompleteValue.makeAutofill();\n }\n });\n\n effect(() => {\n const options = this.optionsResource();\n\n if (!options) {\n return;\n }\n\n const { onDemand, onServer, inMemory, inMemoryWithLoading } = options;\n\n if (onDemand) {\n this.optionList.set(onDemand.value());\n this.isLoading.set(onDemand.isLoading());\n } else if (onServer) {\n this.optionList.set(this.applyFilter(onServer.value()));\n this.isLoading.set(onServer.isLoading());\n } else if (inMemory) {\n this.optionList.set(this.applyFilter(inMemory));\n this.isLoading.set(false);\n } else if (inMemoryWithLoading) {\n const optionsWithLoading = inMemoryWithLoading();\n this.optionList.set(this.applyFilter(optionsWithLoading ?? []));\n this.isLoading.set(!optionsWithLoading);\n }\n });\n }\n\n private applyFilter(options: AutocompleteList) {\n const filter = this.autocompleteValue.filter() ?? '';\n return options.filter((option) =>\n option.label.toLowerCase().includes(filter.toLowerCase())\n );\n }\n\n private generateOptionsResource(): OptionsResource {\n const options = this.options();\n\n if (Object.hasOwn(options, 'value')) {\n return { onServer: options as ResourceRef<AutocompleteList> };\n } else if (isSignal(options)) {\n return {\n inMemoryWithLoading: options as Signal<AutocompleteList>,\n };\n } else if (typeof options === 'function') {\n const resourceFnOptions = options as AutocompleteDataOptionsFn;\n return {\n onDemand: runInInjectionContext(this.injector, () =>\n resourceFnOptions(this.autocompleteValue.requestOptionsParams)\n ),\n };\n }\n\n return { inMemory: options as AutocompleteList };\n }\n\n open() {\n this.autocomplete.open({\n fieldId: this.fieldId,\n options: this.optionList,\n control: this.control(),\n multiple: this.multiple(),\n autocompleteValue: this.autocompleteValue,\n placeholderSearchField: this.placeholderSearchField(),\n disableAutoTypeConversion: this.disableAutoTypeConversion(),\n });\n }\n\n ngOnInit(): void {\n this.autocompleteValue.init(\n this.control(),\n this.optionList,\n this.isLoading,\n this.multiple()\n );\n this.optionsResource.set(this.generateOptionsResource());\n this.autocompleteValue.makeAutofill();\n }\n}\n","<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label()}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"autocompleteValue.currentValue()\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-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tB,SAAA,EAAA,CAAC,YAAY,EAAE,iBAAiB,CAAC,EACnC,OAAA,EAAA,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAA,QAAA,EAAA,woDAAA,EAAA;;;AEtC5C;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-autocomplete.mjs","sources":["../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-ref.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-options.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-options.html","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-builder.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-value.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-field.ts","../../projects/koala-ui/shared/components/input-field/autocomplete/autocomplete-field.html","../../projects/koala-ui/shared/components/input-field/autocomplete/koalarx-ui-shared-components-input-field-autocomplete.ts"],"sourcesContent":["import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n Type,\n} from '@angular/core';\nimport { AUTOCOMPLETE_APP_REF } from './autocomplete';\n\nexport const AUTOCOMPLETE_REF_TOKEN = new InjectionToken(\n 'AutocompleteRefToken'\n);\n\n@Injectable()\nexport class AutocompleteRef {\n private readonly appRef = inject<ApplicationRef>(AUTOCOMPLETE_APP_REF);\n private readonly componentRef = inject<() => ComponentRef<Type<any>>>(\n AUTOCOMPLETE_REF_TOKEN\n );\n\n close() {\n setTimeout(() => {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n });\n }\n}\n","import {\n booleanAttribute,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n OnInit,\n Signal,\n signal,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { AutocompleteRef } from './autocomplete-ref';\nimport { AutocompleteList, AutocompleteValue } from './autocomplete-value';\nimport { KlArray } from '@koalarx/utils';\n\n@Component({\n selector: 'kl-autocomplete-options',\n templateUrl: './autocomplete-options.html',\n imports: [ReactiveFormsModule],\n})\nexport class AutocompleteOptions implements OnInit, OnDestroy {\n private readonly autocompleteRef = inject(AutocompleteRef);\n private readonly viewContainerRef =\n inject<ViewContainerRef>(ViewContainerRef);\n private firstLoad = true;\n\n fieldId = input.required<string>();\n options = input.required<Signal<AutocompleteList>>();\n control = input.required<FormControl>();\n multiple = input.required<boolean>();\n autocompleteValue = input.required<AutocompleteValue>();\n placeholderSearchField = input<string | undefined>();\n disableAutoTypeConversion = input(false, { transform: booleanAttribute });\n list = linkedSignal(() => {\n const options = this.options()();\n return new KlArray(options).split(100)[0];\n });\n\n optionFocused = signal(0);\n\n searchInputRef = viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n constructor() {\n effect(() => {\n const hasValue = !!this.autocompleteValue().currentValue();\n\n if (this.firstLoad) {\n this.firstLoad = false;\n return;\n }\n\n if (hasValue && !this.multiple()) {\n this.close();\n }\n });\n\n effect(() => {\n const options = this.options()();\n if (options.length > 0) {\n this.optionFocused.set(0);\n }\n });\n }\n\n private updateScrollPosition(direction: 'down' | 'up' = 'down') {\n setTimeout(() => {\n const containerElement =\n this.viewContainerRef.element.nativeElement.querySelector(\n '.kl-autocomplete-options-container'\n ) as HTMLDivElement;\n const focusedOptionElement = containerElement.querySelector(\n 'label.active'\n ) as HTMLDivElement;\n\n if (focusedOptionElement) {\n containerElement.scrollTo({\n top:\n direction === 'down'\n ? containerElement.scrollTop +\n focusedOptionElement.getBoundingClientRect().height\n : containerElement.scrollTop -\n focusedOptionElement.getBoundingClientRect().height,\n });\n }\n });\n }\n\n private onKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowDown': {\n event.stopPropagation();\n event.preventDefault();\n\n this.optionFocused.update((value) => {\n if (value < this.options()().length - 1) {\n return value + 1;\n }\n return value;\n });\n this.updateScrollPosition('down');\n break;\n }\n case 'ArrowUp': {\n event.stopPropagation();\n event.preventDefault();\n\n this.optionFocused.update((value) => {\n if (value > 0) {\n return value - 1;\n }\n return value;\n });\n this.updateScrollPosition('up');\n break;\n }\n }\n };\n\n private onKeyup = (event: KeyboardEvent) => {\n const containerElement: HTMLDivElement =\n this.viewContainerRef.element.nativeElement;\n\n switch (event.key) {\n case 'Enter': {\n event.stopPropagation();\n event.preventDefault();\n\n const focusedOption = this.options()()[this.optionFocused()];\n\n if (focusedOption) {\n containerElement\n .querySelectorAll<HTMLInputElement>('input')\n .item(this.optionFocused() + 1)\n .click();\n }\n break;\n }\n case 'Escape': {\n event.stopPropagation();\n event.preventDefault();\n\n this.close();\n break;\n }\n }\n };\n\n private onClick = (event: MouseEvent) => {\n const containerElement: HTMLDivElement =\n this.viewContainerRef.element.nativeElement;\n const insideClick = containerElement.contains(event.target as Node);\n\n if (!insideClick) {\n event.stopPropagation();\n event.preventDefault();\n this.close();\n }\n };\n\n private onScroll = (event: Event) => {\n const container = this.viewContainerRef.element.nativeElement.querySelector(\n '.kl-autocomplete-options-container'\n );\n const target = event.target as HTMLElement;\n\n if (!container || !target.tagName) return;\n\n if (target !== container) {\n this.close();\n }\n };\n\n private close() {\n if (this.autocompleteValue().filterControl.value) {\n this.autocompleteValue().filterControl.reset();\n }\n\n this.autocompleteRef.close();\n }\n\n ngOnDestroy() {\n document.removeEventListener('keyup', this.onKeyup);\n document.removeEventListener('keydown', this.onKeyDown);\n document.removeEventListener('click', this.onClick);\n window.removeEventListener('scroll', this.onScroll, true);\n }\n\n ngOnInit() {\n this.searchInputRef()?.nativeElement.focus();\n\n setTimeout(() => {\n document.addEventListener('keyup', this.onKeyup);\n document.addEventListener('keydown', this.onKeyDown);\n document.addEventListener('click', this.onClick);\n window.addEventListener('scroll', this.onScroll, true);\n }, 150);\n }\n\n setValue(event: Event) {\n const target = event.target as HTMLInputElement;\n\n let value: string | number = target.value;\n\n if (\n !Number.isNaN(parseInt(value as any)) &&\n !/^0+[1-9]\\d*$/.test(value) &&\n !this.disableAutoTypeConversion()\n ) {\n value = Number(value);\n }\n\n if (this.multiple()) {\n const check = target.checked;\n\n let currentValue = this.control().value;\n\n if (!Array.isArray(currentValue)) {\n currentValue = [currentValue];\n }\n\n if (check) {\n this.control().setValue([...currentValue, value]);\n } else {\n this.control().setValue(currentValue.filter((v: any) => v !== value));\n }\n } else {\n this.control().setValue(value);\n }\n }\n}\n","<div class=\"bg-base-300 overflow-hidden shadow border border-neutral-200 dark:border-neutral-700 rounded-lg flex flex-col w-full\"\n [attr.aria-labelledby]=\"fieldId()\">\n\n <div class=\"border-b border-neutral-200 dark:border-neutral-700\">\n <label class=\"flex items-center text-sm\">\n <i class=\"fa-solid fa-magnifying-glass opacity-60 absolute top-3 left-4\"></i>\n <input class=\"p-2 pr-3 pl-10 outline-none placeholder:opacity-60\"\n #searchInput\n type=\"search\"\n [formControl]=\"autocompleteValue().filterControl\"\n placeholder=\"Type to Search...\"\n />\n </label>\n </div>\n\n <div class=\"kl-autocomplete-options-container flex flex-col overflow-auto p-1\">\n @for (item of list(); track $index) {\n @let optionLabelId = fieldId() + '-' + item.value;\n\n <label class=\"relative py-1 px-2 pr-8 rounded-md\"\n [attr.for]=\"optionLabelId\"\n [class.active]=\"$index === optionFocused()\"\n (mouseover)=\"optionFocused.set($index)\">\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId()\"\n [attr.value]=\"item.value\"\n [checked]=\"multiple()\n ? control().value?.includes(item.value)\n : item.value === control().value\"\n (change)=\"setValue($event)\"\n />\n {{item.label}}\n </label>\n }\n </div>\n</div>\n","import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n inputBinding,\n Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { GENERIC_COMPONENT_CONTAINER_NAME } from '@koalarx/ui/core/config';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { AutocompleteOptions } from './autocomplete-options';\nimport { AUTOCOMPLETE_REF_TOKEN, AutocompleteRef } from './autocomplete-ref';\nimport { AutocompleteList, AutocompleteValue } from './autocomplete-value';\n\nexport type AutocompleteAfterCloseTrigger = string | Record<string, any>;\nexport type AutocompleteAfterCloseTriggerFn = (\n trigger: AutocompleteAfterCloseTrigger\n) => void;\nexport const AUTOCOMPLETE_APP_REF = new InjectionToken('AutocompleteAppRef');\n\nexport interface AutocompleteOpenData {\n fieldId: string;\n options: Signal<AutocompleteList>;\n control: FormControl<any>;\n multiple: boolean;\n autocompleteValue: AutocompleteValue;\n placeholderSearchField?: string;\n disableAutoTypeConversion?: boolean;\n}\n\n@Injectable()\nexport class Autocomplete {\n private readonly appRef = inject(ApplicationRef);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n private positionOnScreen(container: HTMLDivElement) {\n const autocompleteField = this.viewContainerRef.element\n .nativeElement as HTMLElement;\n const currentTop = window.scrollY;\n const position = autocompleteField.getBoundingClientRect();\n\n if (position) {\n const screenHeight = document.body.clientHeight;\n const maxHeight = (screenHeight * 40) / 100;\n let top = position.bottom;\n let height = Math.abs(screenHeight - top);\n\n if (height > maxHeight) {\n height = maxHeight;\n }\n\n const percentFillOnScreen = (height * 100) / screenHeight;\n\n if (percentFillOnScreen <= 20) {\n height = Math.abs(screenHeight - (screenHeight - position.top));\n\n if (height > maxHeight) {\n height = maxHeight;\n }\n\n top = position.top - height;\n }\n\n top += currentTop;\n\n container.style.position = 'absolute';\n container.style.display = 'flex';\n container.style.top = `${top}px`;\n container.style.left = `${position.left}px`;\n container.style.width = `${position.width}px`;\n container.style.height = `auto`;\n container.style.maxHeight = `${height}px`;\n container.style.zIndex = '99';\n container.style.overflow = 'hidden';\n\n const selectedOptions =\n autocompleteField.querySelector<HTMLDivElement>('.selected-options');\n\n if (selectedOptions) {\n selectedOptions.onchange = () =>\n setTimeout(() => {\n this.positionOnScreen(container);\n }, 50);\n }\n }\n }\n\n open(data: AutocompleteOpenData) {\n const main = document.querySelector<HTMLElement>(\n GENERIC_COMPONENT_CONTAINER_NAME\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n\n container.id = elementId;\n\n this.positionOnScreen(container);\n\n const componentRef = createComponent(AutocompleteOptions, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: AUTOCOMPLETE_APP_REF, useValue: this.appRef },\n {\n provide: AUTOCOMPLETE_REF_TOKEN,\n useValue: () => componentRef,\n },\n {\n provide: AutocompleteRef,\n deps: [AUTOCOMPLETE_APP_REF, AUTOCOMPLETE_REF_TOKEN],\n },\n ],\n }),\n bindings: [\n ...Object.keys(data).map((key) =>\n inputBinding(key, () => (data as any)[key])\n ),\n ],\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import { Injectable, ResourceRef, Signal } from '@angular/core';\nimport {\n AutocompleteDataOptionsFn,\n AutocompleteList,\n} from './autocomplete-value';\n\n@Injectable({ providedIn: 'root' })\nexport class AutocompleteBuilder {\n onDemand(config: AutocompleteDataOptionsFn) {\n return config;\n }\n\n onServer(config: ResourceRef<AutocompleteList>) {\n return config;\n }\n\n inMemory(config: AutocompleteList) {\n return config;\n }\n\n inMemoryWithLoading(config: Signal<AutocompleteList>) {\n return config;\n }\n}\n","import {\n DestroyRef,\n inject,\n Injectable,\n linkedSignal,\n ResourceRef,\n signal,\n Signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl } from '@angular/forms';\nimport { isEmpty } from '@koalarx/ui/shared/utils';\nimport { delay } from '@koalarx/utils/KlDelay';\nimport { debounceTime } from 'rxjs/internal/operators/debounceTime';\n\nexport type AutocompleteOptionValue = string | number | null;\n\nexport interface AutocompleteOption<TData = any> {\n label: string;\n value: AutocompleteOptionValue;\n data?: TData;\n}\n\nexport type AutocompleteList = AutocompleteOption[];\nexport interface AutocompleteDataOptionsFnParams {\n filter?: string | null;\n autofill?: any | null;\n}\n\nexport type AutocompleteDataOptionsFn = (\n data: Signal<AutocompleteDataOptionsFnParams>\n) => ResourceRef<AutocompleteList>;\n\nexport type AutocompleteDataOptions =\n | AutocompleteDataOptionsFn\n | ResourceRef<AutocompleteList>\n | Signal<AutocompleteList>\n | AutocompleteList;\n\n@Injectable()\nexport class AutocompleteValue {\n private readonly destroyRef = inject(DestroyRef);\n private readonly _filter = signal<string | null>('');\n private _control?: FormControl<any>;\n private readonly _currentValue = signal<\n AutocompleteOption | AutocompleteOption[] | null\n >(null);\n private _multiple = false;\n private _options?: Signal<AutocompleteList>;\n private _autofill = signal<any | null>(null);\n private _isLoading?: Signal<boolean>;\n private readonly _requestOptionsParams =\n signal<AutocompleteDataOptionsFnParams>({\n filter: null,\n autofill: null,\n });\n\n private readonly _selectedOption = linkedSignal(() => {\n const currentValue = this._currentValue();\n\n if (Array.isArray(currentValue)) {\n return null;\n }\n\n return currentValue;\n });\n\n private readonly _selectedOptions = linkedSignal(() => {\n const currentValue = this._currentValue();\n\n if (Array.isArray(currentValue)) {\n return currentValue;\n }\n\n return [];\n });\n\n private readonly _hasValue = linkedSignal(() => {\n const currentValue = this._currentValue();\n const value = Array.isArray(currentValue)\n ? currentValue\n : currentValue?.value;\n\n if (Array.isArray(value)) {\n return value.length > 0;\n } else if (typeof value === 'number') {\n return value >= 0;\n }\n\n return !!value;\n });\n\n filterControl = new FormControl<string | null>('');\n\n get filter() {\n return this._filter.asReadonly();\n }\n\n get hasValue() {\n return this._hasValue.asReadonly();\n }\n\n get currentValue() {\n return this._currentValue.asReadonly();\n }\n\n get selectedOption() {\n return this._selectedOption.asReadonly();\n }\n\n get selectedOptions() {\n return this._selectedOptions.asReadonly();\n }\n\n get autofill() {\n return this._autofill.asReadonly();\n }\n\n get requestOptionsParams() {\n return this._requestOptionsParams.asReadonly();\n }\n\n private async selectOption(value: any) {\n while (this._isLoading!()) {\n await delay(100);\n }\n\n if (!this._options) {\n return;\n }\n\n const options = this._multiple\n ? this._options()?.filter((opt) => `${value}`?.includes(`${opt.value}`))\n : this._options()?.find((opt) => `${opt.value}` === `${value}`);\n\n if (options) {\n this._currentValue.update(() => {\n if (this._multiple) {\n if (Array.isArray(options)) {\n return options;\n }\n\n return [options];\n }\n\n return options;\n });\n }\n }\n\n async makeAutofill() {\n if (!isEmpty(this._control?.value)) {\n while (this._isLoading!()) {\n await delay(100);\n }\n\n this.selectOption(this._control?.value);\n\n const currentValue = this._currentValue();\n\n if (\n (this._multiple &&\n ((Array.isArray(currentValue) && currentValue.length === 0) ||\n !Array.isArray(currentValue))) ||\n (!this._multiple && isEmpty(currentValue))\n ) {\n this._autofill.set(this._control?.value);\n this._requestOptionsParams.update((params) => ({\n ...params,\n autofill: this._autofill(),\n }));\n }\n }\n }\n\n init(\n control: FormControl<any>,\n options: Signal<AutocompleteList>,\n isLoading: Signal<boolean>,\n multiple = false\n ) {\n this._control = control;\n this._options = options;\n this._multiple = multiple;\n this._isLoading = isLoading;\n\n this.filterControl.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(500))\n .subscribe((value) => {\n this._autofill.set(null);\n this._filter.set(value);\n this._requestOptionsParams.update(() => ({\n filter: value,\n autofill: null,\n }));\n });\n\n this._control.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => this.selectOption(value));\n }\n\n clear(event: MouseEvent) {\n event.preventDefault();\n this._control?.setValue(null);\n this._currentValue.set(null);\n this._requestOptionsParams.update(() => ({\n filter: null,\n autofill: null,\n }));\n }\n\n remove(event: MouseEvent, value: AutocompleteOptionValue) {\n event.preventDefault();\n if (!this._multiple) {\n return;\n }\n\n if (!this._control) {\n return;\n }\n\n const currentValue = this._control.value;\n\n this._control?.setValue(\n currentValue.filter((v: AutocompleteOptionValue) => v !== value)\n );\n }\n}\n","import {\n booleanAttribute,\n Component,\n effect,\n inject,\n Injector,\n input,\n isSignal,\n OnInit,\n ResourceRef,\n runInInjectionContext,\n Signal,\n signal,\n} from '@angular/core';\nimport { Loader } from '@koalarx/ui/core/components/loader';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { HookChange } from '@koalarx/ui/shared/directives';\nimport { isEmpty } from '@koalarx/ui/shared/utils';\nimport { Autocomplete } from './autocomplete';\nimport {\n AutocompleteDataOptions,\n AutocompleteDataOptionsFn,\n AutocompleteList,\n AutocompleteValue,\n} from './autocomplete-value';\n\ninterface OptionsResource {\n onDemand?: ResourceRef<AutocompleteList>;\n onServer?: ResourceRef<AutocompleteList>;\n inMemory?: AutocompleteList;\n inMemoryWithLoading?: Signal<AutocompleteList>;\n}\n\n@Component({\n selector: 'kl-autocomplete-field',\n templateUrl: './autocomplete-field.html',\n providers: [Autocomplete, AutocompleteValue],\n imports: [Loader, FieldErrors, HookChange],\n})\nexport class AutocompleteField extends InputFieldBase implements OnInit {\n private readonly injector = inject(Injector);\n\n readonly autocompleteValue = inject(AutocompleteValue);\n readonly autocomplete = inject(Autocomplete);\n\n options = input.required<AutocompleteDataOptions>();\n multiple = input(false, { transform: booleanAttribute });\n placeholderSearchField = input<string>();\n disableAutoTypeConversion = input(false, { transform: booleanAttribute });\n\n isLoading = signal<boolean>(false);\n optionList = signal<AutocompleteList>([]);\n\n optionsResource = signal<OptionsResource | null>(null);\n\n constructor() {\n super();\n\n effect(() => {\n const optionList = this.optionList();\n const autofill = this.autocompleteValue.autofill();\n\n if (optionList.length > 0 && !isEmpty(autofill)) {\n this.autocompleteValue.makeAutofill();\n }\n });\n\n effect(() => {\n const options = this.optionsResource();\n\n if (!options) {\n return;\n }\n\n const { onDemand, onServer, inMemory, inMemoryWithLoading } = options;\n\n if (onDemand) {\n this.optionList.set(onDemand.value());\n this.isLoading.set(onDemand.isLoading());\n } else if (onServer) {\n this.optionList.set(this.applyFilter(onServer.value()));\n this.isLoading.set(onServer.isLoading());\n } else if (inMemory) {\n this.optionList.set(this.applyFilter(inMemory));\n this.isLoading.set(false);\n } else if (inMemoryWithLoading) {\n const optionsWithLoading = inMemoryWithLoading();\n this.optionList.set(this.applyFilter(optionsWithLoading ?? []));\n this.isLoading.set(!optionsWithLoading);\n }\n });\n }\n\n private applyFilter(options: AutocompleteList) {\n const filter = this.autocompleteValue.filter() ?? '';\n return options.filter((option) =>\n option.label.toLowerCase().includes(filter.toLowerCase())\n );\n }\n\n private generateOptionsResource(): OptionsResource {\n const options = this.options();\n\n if (Object.hasOwn(options, 'value')) {\n return { onServer: options as ResourceRef<AutocompleteList> };\n } else if (isSignal(options)) {\n return {\n inMemoryWithLoading: options as Signal<AutocompleteList>,\n };\n } else if (typeof options === 'function') {\n const resourceFnOptions = options as AutocompleteDataOptionsFn;\n return {\n onDemand: runInInjectionContext(this.injector, () =>\n resourceFnOptions(this.autocompleteValue.requestOptionsParams)\n ),\n };\n }\n\n return { inMemory: options as AutocompleteList };\n }\n\n open() {\n this.autocomplete.open({\n fieldId: this.fieldId,\n options: this.optionList,\n control: this.control(),\n multiple: this.multiple(),\n autocompleteValue: this.autocompleteValue,\n placeholderSearchField: this.placeholderSearchField(),\n disableAutoTypeConversion: this.disableAutoTypeConversion(),\n });\n }\n\n ngOnInit(): void {\n this.autocompleteValue.init(\n this.control(),\n this.optionList,\n this.isLoading,\n this.multiple()\n );\n this.optionsResource.set(this.generateOptionsResource());\n this.autocompleteValue.makeAutofill();\n }\n}\n","<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n @if (label(); as label) {\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n }\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"autocompleteValue.currentValue()\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAUa,sBAAsB,GAAG,IAAI,cAAc,CACtD,sBAAsB;MAIX,eAAe,CAAA;AACT,IAAA,MAAM,GAAG,MAAM,CAAiB,oBAAoB,CAAC;AACrD,IAAA,YAAY,GAAG,MAAM,CACpC,sBAAsB,CACvB;IAED,KAAK,GAAA;QACH,UAAU,CAAC,MAAK;AACd,YAAA,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE;AAC7B,YAAA,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EA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EAAA,iBAAA,EAAA,wBAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,yBAAA,EAAA,EAAA,iBAAA,EAAA,2BAAA,EAAA,UAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,YAAY,EAAE,iBAAiB,CAAC,ECrC9C,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,8qDA8CA,EDRY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAM,EAAE,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,WAAW,+EAAE,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE9B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAEtB,SAAA,EAAA,CAAC,YAAY,EAAE,iBAAiB,CAAC,EACnC,OAAA,EAAA,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAA,QAAA,EAAA,8qDAAA,EAAA;;;AEtC5C;;AAEG;;;;"}
@@ -22,11 +22,11 @@ class InputCnpj extends InputFieldBase {
22
22
  });
23
23
  }
24
24
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCnpj, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCnpj, isStandalone: true, selector: "kl-input-cnpj", usesInheritance: true, ngImport: i0, template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n mask=\"AA.AAA.AAA/AAAA-AA\">\n\n <ng-container errors>\n @if (control().errors?.['cnpjInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCNPJ }}</div>\n }\n </ng-container>\n</kl-input-text>\n", dependencies: [{ kind: "component", type: InputText, selector: "kl-input-text", inputs: ["mask"] }] });
25
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCnpj, isStandalone: true, selector: "kl-input-cnpj", usesInheritance: true, ngImport: i0, template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n mask=\"AA.AAA.AAA/AAAA-AA\">\n\n <ng-container errors>\n @if (control().errors?.['cnpjInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCNPJ }}</div>\n }\n </ng-container>\n</kl-input-text>\n", dependencies: [{ kind: "component", type: InputText, selector: "kl-input-text", inputs: ["mask"] }] });
26
26
  }
27
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCnpj, decorators: [{
28
28
  type: Component,
29
- args: [{ selector: 'kl-input-cnpj', imports: [InputText], template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n mask=\"AA.AAA.AAA/AAAA-AA\">\n\n <ng-container errors>\n @if (control().errors?.['cnpjInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCNPJ }}</div>\n }\n </ng-container>\n</kl-input-text>\n" }]
29
+ args: [{ selector: 'kl-input-cnpj', imports: [InputText], template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n mask=\"AA.AAA.AAA/AAAA-AA\">\n\n <ng-container errors>\n @if (control().errors?.['cnpjInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCNPJ }}</div>\n }\n </ng-container>\n</kl-input-text>\n" }]
30
30
  }], ctorParameters: () => [] });
31
31
 
32
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-cnpj.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-cnpj/cnpj.validator.ts","../../projects/koala-ui/shared/components/input-field/input-cnpj/input-cnpj.ts","../../projects/koala-ui/shared/components/input-field/input-cnpj/input-cnpj.html","../../projects/koala-ui/shared/components/input-field/input-cnpj/koalarx-ui-shared-components-input-field-input-cnpj.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\r\nimport { validateCnpj } from '@koalarx/utils/KlString';\r\n\r\nexport function CNPJValidator(control: AbstractControl) {\r\n if (control.value && !validateCnpj(control.value)) {\r\n return { cnpjInvalid: true };\r\n }\r\n\r\n return null;\r\n}\r\n","import { Component, effect, inject } from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputText } from '@koalarx/ui/shared/components/input-field/input-text';\nimport { CNPJValidator } from './cnpj.validator';\n\n@Component({\n selector: 'kl-input-cnpj',\n templateUrl: './input-cnpj.html',\n imports: [InputText],\n})\nexport class InputCnpj extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(CNPJValidator);\n });\n }\n}\n","<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n mask=\"AA.AAA.AAA/AAAA-AA\">\n\n <ng-container errors>\n @if (control().errors?.['cnpjInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCNPJ }}</div>\n }\n </ng-container>\n</kl-input-text>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGM,SAAU,aAAa,CAAC,OAAwB,EAAA;AACpD,IAAA,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjD,QAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE;;AAG9B,IAAA,OAAO,IAAI;AACb;;ACEM,MAAO,SAAU,SAAQ,cAAc,CAAA;IAClC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC;AACtC,SAAC,CAAC;;uGAVO,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,mSAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,SAAS,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAER,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,SAAS,CAAC,EAAA,QAAA,EAAA,mSAAA,EAAA;;;AETtB;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-cnpj.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-cnpj/cnpj.validator.ts","../../projects/koala-ui/shared/components/input-field/input-cnpj/input-cnpj.ts","../../projects/koala-ui/shared/components/input-field/input-cnpj/input-cnpj.html","../../projects/koala-ui/shared/components/input-field/input-cnpj/koalarx-ui-shared-components-input-field-input-cnpj.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\r\nimport { validateCnpj } from '@koalarx/utils/KlString';\r\n\r\nexport function CNPJValidator(control: AbstractControl) {\r\n if (control.value && !validateCnpj(control.value)) {\r\n return { cnpjInvalid: true };\r\n }\r\n\r\n return null;\r\n}\r\n","import { Component, effect, inject } from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputText } from '@koalarx/ui/shared/components/input-field/input-text';\nimport { CNPJValidator } from './cnpj.validator';\n\n@Component({\n selector: 'kl-input-cnpj',\n templateUrl: './input-cnpj.html',\n imports: [InputText],\n})\nexport class InputCnpj extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(CNPJValidator);\n });\n }\n}\n","<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n mask=\"AA.AAA.AAA/AAAA-AA\">\n\n <ng-container errors>\n @if (control().errors?.['cnpjInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCNPJ }}</div>\n }\n </ng-container>\n</kl-input-text>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGM,SAAU,aAAa,CAAC,OAAwB,EAAA;AACpD,IAAA,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjD,QAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE;;AAG9B,IAAA,OAAO,IAAI;AACb;;ACEM,MAAO,SAAU,SAAQ,cAAc,CAAA;IAClC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC;AACtC,SAAC,CAAC;;uGAVO,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,sUAYA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHY,SAAS,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAER,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,SAAS,CAAC,EAAA,QAAA,EAAA,sUAAA,EAAA;;;AETtB;;AAEG;;;;"}
@@ -22,11 +22,11 @@ class InputCpf extends InputFieldBase {
22
22
  });
23
23
  }
24
24
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCpf, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCpf, isStandalone: true, selector: "kl-input-cpf", usesInheritance: true, ngImport: i0, template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n", dependencies: [{ kind: "component", type: InputText, selector: "kl-input-text", inputs: ["mask"] }] });
25
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCpf, isStandalone: true, selector: "kl-input-cpf", usesInheritance: true, ngImport: i0, template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n", dependencies: [{ kind: "component", type: InputText, selector: "kl-input-text", inputs: ["mask"] }] });
26
26
  }
27
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCpf, decorators: [{
28
28
  type: Component,
29
- args: [{ selector: 'kl-input-cpf', imports: [InputText], template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n" }]
29
+ args: [{ selector: 'kl-input-cpf', imports: [InputText], template: "<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n" }]
30
30
  }], ctorParameters: () => [] });
31
31
 
32
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-cpf.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-cpf/cpf.validator.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.html","../../projects/koala-ui/shared/components/input-field/input-cpf/koalarx-ui-shared-components-input-field-input-cpf.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\r\nimport { validateCpf } from '@koalarx/utils/KlString';\r\n\r\nexport function CPFValidator(control: AbstractControl) {\r\n if (control.value && !validateCpf(control.value)) {\r\n return { cpfInvalid: true };\r\n }\r\n\r\n return null;\r\n}\r\n","import { Component, effect, inject } from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputText } from '@koalarx/ui/shared/components/input-field/input-text';\nimport { CPFValidator } from './cpf.validator';\n\n@Component({\n selector: 'kl-input-cpf',\n templateUrl: './input-cpf.html',\n imports: [InputText],\n})\nexport class InputCpf extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(CPFValidator);\n });\n }\n}\n","<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGM,SAAU,YAAY,CAAC,OAAwB,EAAA;AACnD,IAAA,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChD,QAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG7B,IAAA,OAAO,IAAI;AACb;;ACEM,MAAO,QAAS,SAAQ,cAAc,CAAA;IACjC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;AACrC,SAAC,CAAC;;uGAVO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXrB,6RAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,SAAS,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAER,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,SAAS,CAAC,EAAA,QAAA,EAAA,6RAAA,EAAA;;;AETtB;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-cpf.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-cpf/cpf.validator.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.ts","../../projects/koala-ui/shared/components/input-field/input-cpf/input-cpf.html","../../projects/koala-ui/shared/components/input-field/input-cpf/koalarx-ui-shared-components-input-field-input-cpf.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\r\nimport { validateCpf } from '@koalarx/utils/KlString';\r\n\r\nexport function CPFValidator(control: AbstractControl) {\r\n if (control.value && !validateCpf(control.value)) {\r\n return { cpfInvalid: true };\r\n }\r\n\r\n return null;\r\n}\r\n","import { Component, effect, inject } from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputText } from '@koalarx/ui/shared/components/input-field/input-text';\nimport { CPFValidator } from './cpf.validator';\n\n@Component({\n selector: 'kl-input-cpf',\n templateUrl: './input-cpf.html',\n imports: [InputText],\n})\nexport class InputCpf extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(CPFValidator);\n });\n }\n}\n","<kl-input-text\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n mask=\"000.000.000-00\">\n\n <ng-container errors>\n @if (control().errors?.['cpfInvalid']) {\n <div class=\"error-message\">{{ translations.invalidCPF }}</div>\n }\n </ng-container>\n</kl-input-text>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGM,SAAU,YAAY,CAAC,OAAwB,EAAA;AACnD,IAAA,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChD,QAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG7B,IAAA,OAAO,IAAI;AACb;;ACEM,MAAO,QAAS,SAAQ,cAAc,CAAA;IACjC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;AACrC,SAAC,CAAC;;uGAVO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXrB,gUAYA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHY,SAAS,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAER,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,SAAS,CAAC,EAAA,QAAA,EAAA,gUAAA,EAAA;;;AETtB;;AAEG;;;;"}
@@ -10,11 +10,11 @@ class InputCurrency extends InputFieldBase {
10
10
  decimalCount = input(2);
11
11
  currentValue = linkedSignal(() => this.control().value);
12
12
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCurrency, deps: null, target: i0.ɵɵFactoryTarget.Component });
13
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCurrency, isStandalone: true, selector: "kl-input-currency", inputs: { decimalCount: { classPropertyName: "decimalCount", publicName: "decimalCount", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: InputCurrencyMask, selector: "input[currencyMask]", inputs: ["decimalCount"], outputs: ["currencyValue"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
13
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCurrency, isStandalone: true, selector: "kl-input-currency", inputs: { decimalCount: { classPropertyName: "decimalCount", publicName: "decimalCount", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: InputCurrencyMask, selector: "input[currencyMask]", inputs: ["decimalCount"], outputs: ["currencyValue"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
14
14
  }
15
15
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCurrency, decorators: [{
16
16
  type: Component,
17
- args: [{ selector: 'kl-input-currency', imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
17
+ args: [{ selector: 'kl-input-currency', imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
18
18
  }] });
19
19
 
20
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-currency.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.ts","../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.html","../../projects/koala-ui/shared/components/input-field/input-currency/koalarx-ui-shared-components-input-field-input-currency.ts"],"sourcesContent":["import { Component, input, linkedSignal } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputCurrencyMask } from '@koalarx/ui/shared/directives';\n\n@Component({\n selector: 'kl-input-currency',\n templateUrl: './input-currency.html',\n imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors],\n})\nexport class InputCurrency extends InputFieldBase {\n decimalCount = input<number>(2);\n currentValue = linkedSignal(() => this.control().value);\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,YAAY,GAAG,KAAK,CAAS,CAAC,CAAC;AAC/B,IAAA,YAAY,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC;uGAF5C,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX1B,2tBA2BA,EDlBY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,syBAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE/D,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,SAAS;+BACE,mBAAmB,EAAA,OAAA,EAEpB,CAAC,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,2tBAAA,EAAA;;;AET7E;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-currency.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.ts","../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.html","../../projects/koala-ui/shared/components/input-field/input-currency/koalarx-ui-shared-components-input-field-input-currency.ts"],"sourcesContent":["import { Component, input, linkedSignal } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputCurrencyMask } from '@koalarx/ui/shared/directives';\n\n@Component({\n selector: 'kl-input-currency',\n templateUrl: './input-currency.html',\n imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors],\n})\nexport class InputCurrency extends InputFieldBase {\n decimalCount = input<number>(2);\n currentValue = linkedSignal(() => this.control().value);\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,YAAY,GAAG,KAAK,CAAS,CAAC,CAAC;AAC/B,IAAA,YAAY,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC;uGAF5C,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX1B,osBA2BA,EDlBY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,syBAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE/D,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,SAAS;+BACE,mBAAmB,EAAA,OAAA,EAEpB,CAAC,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,osBAAA,EAAA;;;AET7E;;AAEG;;;;"}
@@ -12,11 +12,11 @@ class InputEmail extends InputFieldBase {
12
12
  });
13
13
  }
14
14
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputEmail, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: InputEmail, isStandalone: true, selector: "kl-input-email", usesInheritance: true, ngImport: i0, template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n type=\"email\"\n/>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: InputEmail, isStandalone: true, selector: "kl-input-email", usesInheritance: true, ngImport: i0, template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n type=\"email\"\n/>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
16
16
  }
17
17
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputEmail, decorators: [{
18
18
  type: Component,
19
- args: [{ selector: 'kl-input-email', imports: [InputField], template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n type=\"email\"\n/>\n" }]
19
+ args: [{ selector: 'kl-input-email', imports: [InputField], template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n type=\"email\"\n/>\n" }]
20
20
  }], ctorParameters: () => [] });
21
21
 
22
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-email.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-email/input-email.ts","../../projects/koala-ui/shared/components/input-field/input-email/input-email.html","../../projects/koala-ui/shared/components/input-field/input-email/koalarx-ui-shared-components-input-field-input-email.ts"],"sourcesContent":["import { Component, effect } from '@angular/core';\nimport { Validators } from '@angular/forms';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-email',\n templateUrl: './input-email.html',\n imports: [InputField],\n})\nexport class InputEmail extends InputFieldBase {\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(Validators.email);\n });\n }\n}\n","<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n type=\"email\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYM,MAAO,UAAW,SAAQ,cAAc,CAAA;AAC5C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC;AACzC,SAAC,CAAC;;uGARO,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZvB,2FAKA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDKY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;+BACE,gBAAgB,EAAA,OAAA,EAEjB,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,2FAAA,EAAA;;;AEVvB;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-email.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-email/input-email.ts","../../projects/koala-ui/shared/components/input-field/input-email/input-email.html","../../projects/koala-ui/shared/components/input-field/input-email/koalarx-ui-shared-components-input-field-input-email.ts"],"sourcesContent":["import { Component, effect } from '@angular/core';\nimport { Validators } from '@angular/forms';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-email',\n templateUrl: './input-email.html',\n imports: [InputField],\n})\nexport class InputEmail extends InputFieldBase {\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(Validators.email);\n });\n }\n}\n","<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n type=\"email\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYM,MAAO,UAAW,SAAQ,cAAc,CAAA;AAC5C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAE9B,YAAA,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC;AACzC,SAAC,CAAC;;uGARO,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZvB,8HAMA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;+BACE,gBAAgB,EAAA,OAAA,EAEjB,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,8HAAA,EAAA;;;AEVvB;;AAEG;;;;"}
@@ -53,11 +53,11 @@ class InputPassword extends InputFieldBase {
53
53
  }
54
54
  }
55
55
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputPassword, deps: null, target: i0.ɵɵFactoryTarget.Component });
56
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputPassword, isStandalone: true, selector: "kl-input-password", inputs: { enableStrongPasswordCheck: { classPropertyName: "enableStrongPasswordCheck", publicName: "enableStrongPasswordCheck", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
56
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputPassword, isStandalone: true, selector: "kl-input-password", inputs: { enableStrongPasswordCheck: { classPropertyName: "enableStrongPasswordCheck", publicName: "enableStrongPasswordCheck", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
57
57
  }
58
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputPassword, decorators: [{
59
59
  type: Component,
60
- args: [{ selector: 'kl-input-password', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
60
+ args: [{ selector: 'kl-input-password', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
61
61
  }] });
62
62
 
63
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-password.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-password/has-lowercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-number-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-special-characters-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-uppercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.html","../../projects/koala-ui/shared/components/input-field/input-password/koalarx-ui-shared-components-input-field-input-password.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\n\nexport function HasLowercaseValidator(control: AbstractControl) {\n if (!/[a-z]/.test(control.value)) {\n return { hasLowercase: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasNumberValidator(control: AbstractControl) {\n if (!/\\d/.test(control.value)) {\n return { hasNumber: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasSpecialCharactersValidator(control: AbstractControl) {\n if (!/[ `!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?~]/.test(control.value)) {\n return { hasSpecialCharacters: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasUppercaseValidator(control: AbstractControl) {\n if (!/[A-Z]/.test(control.value)) {\n return { hasUppercase: true };\n }\n\n return null;\n}\n","import {\n booleanAttribute,\n Component,\n inject,\n input,\n OnInit,\n signal,\n} from '@angular/core';\nimport { ReactiveFormsModule, Validators } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { HasLowercaseValidator } from './has-lowercase-validator';\nimport { HasNumberValidator } from './has-number-validator';\nimport { HasSpecialCharactersValidator } from './has-special-characters-validator';\nimport { HasUppercaseValidator } from './has-uppercase-validator';\n\ntype InputPasswordType = 'password' | 'text';\n\n@Component({\n selector: 'kl-input-password',\n templateUrl: './input-password.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class InputPassword extends InputFieldBase implements OnInit {\n readonly translations = inject(AppConfig).translation.form;\n\n type = signal<InputPasswordType>('password');\n enableStrongPasswordCheck = input(false, { transform: booleanAttribute });\n\n togglePasswordVisibility() {\n this.type.set(this.type() === 'password' ? 'text' : 'password');\n }\n\n ngOnInit(): void {\n if (this.enableStrongPasswordCheck()) {\n this.control().addValidators([\n HasSpecialCharactersValidator,\n HasLowercaseValidator,\n HasUppercaseValidator,\n HasNumberValidator,\n Validators.minLength(8),\n ]);\n }\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEM,SAAU,qBAAqB,CAAC,OAAwB,EAAA;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;;AAG/B,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,kBAAkB,CAAC,OAAwB,EAAA;IACzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC7B,QAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;;AAG5B,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,6BAA6B,CAAC,OAAwB,EAAA;IACpE,IAAI,CAAC,wCAAwC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjE,QAAA,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE;;AAGvC,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,qBAAqB,CAAC,OAAwB,EAAA;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;;AAG/B,IAAA,OAAO,IAAI;AACb;;ACgBM,MAAO,aAAc,SAAQ,cAAc,CAAA;IACtC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,IAAI,GAAG,MAAM,CAAoB,UAAU,CAAC;IAC5C,yBAAyB,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAEzE,wBAAwB,GAAA;QACtB,IAAI,CAAC,IAAI,CAAC,GAAG,C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7C;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-password.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-password/has-lowercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-number-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-special-characters-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-uppercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.html","../../projects/koala-ui/shared/components/input-field/input-password/koalarx-ui-shared-components-input-field-input-password.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\n\nexport function HasLowercaseValidator(control: AbstractControl) {\n if (!/[a-z]/.test(control.value)) {\n return { hasLowercase: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasNumberValidator(control: AbstractControl) {\n if (!/\\d/.test(control.value)) {\n return { hasNumber: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasSpecialCharactersValidator(control: AbstractControl) {\n if (!/[ `!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?~]/.test(control.value)) {\n return { hasSpecialCharacters: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasUppercaseValidator(control: AbstractControl) {\n if (!/[A-Z]/.test(control.value)) {\n return { hasUppercase: true };\n }\n\n return null;\n}\n","import {\n booleanAttribute,\n Component,\n inject,\n input,\n OnInit,\n signal,\n} from '@angular/core';\nimport { ReactiveFormsModule, Validators } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { HasLowercaseValidator } from './has-lowercase-validator';\nimport { HasNumberValidator } from './has-number-validator';\nimport { HasSpecialCharactersValidator } from './has-special-characters-validator';\nimport { HasUppercaseValidator } from './has-uppercase-validator';\n\ntype InputPasswordType = 'password' | 'text';\n\n@Component({\n selector: 'kl-input-password',\n templateUrl: './input-password.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class InputPassword extends InputFieldBase implements OnInit {\n readonly translations = inject(AppConfig).translation.form;\n\n type = signal<InputPasswordType>('password');\n enableStrongPasswordCheck = input(false, { transform: booleanAttribute });\n\n togglePasswordVisibility() {\n this.type.set(this.type() === 'password' ? 'text' : 'password');\n }\n\n ngOnInit(): void {\n if (this.enableStrongPasswordCheck()) {\n this.control().addValidators([\n HasSpecialCharactersValidator,\n HasLowercaseValidator,\n HasUppercaseValidator,\n HasNumberValidator,\n Validators.minLength(8),\n ]);\n }\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEM,SAAU,qBAAqB,CAAC,OAAwB,EAAA;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;;AAG/B,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,kBAAkB,CAAC,OAAwB,EAAA;IACzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC7B,QAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;;AAG5B,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,6BAA6B,CAAC,OAAwB,EAAA;IACpE,IAAI,CAAC,wCAAwC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjE,QAAA,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE;;AAGvC,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,qBAAqB,CAAC,OAAwB,EAAA;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;;AAG/B,IAAA,OAAO,IAAI;AACb;;ACgBM,MAAO,aAAc,SAAQ,cAAc,CAAA;IACtC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,IAAI,GAAG,MAAM,CAAoB,UAAU,CAAC;IAC5C,yBAAyB,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAEzE,wBAAwB,GAAA;QACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,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 +5,11 @@ import { InputFieldBase, InputField } from '@koalarx/ui/shared/components/input-
5
5
  class InputText extends InputFieldBase {
6
6
  mask = input('');
7
7
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputText, deps: null, target: i0.ɵɵFactoryTarget.Component });
8
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: InputText, isStandalone: true, selector: "kl-input-text", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<kl-input-field\n type=\"text\"\n [control]=\"control()\"\n [label]=\"label()\"\n [mask]=\"mask()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: InputText, isStandalone: true, selector: "kl-input-text", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<kl-input-field\n type=\"text\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [mask]=\"mask()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
9
9
  }
10
10
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputText, decorators: [{
11
11
  type: Component,
12
- args: [{ selector: 'kl-input-text', imports: [InputField], template: "<kl-input-field\n type=\"text\"\n [control]=\"control()\"\n [label]=\"label()\"\n [mask]=\"mask()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n" }]
12
+ args: [{ selector: 'kl-input-text', imports: [InputField], template: "<kl-input-field\n type=\"text\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [mask]=\"mask()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n" }]
13
13
  }] });
14
14
 
15
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-text.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-text/input-text.ts","../../projects/koala-ui/shared/components/input-field/input-text/input-text.html","../../projects/koala-ui/shared/components/input-field/input-text/koalarx-ui-shared-components-input-field-input-text.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-text',\n templateUrl: './input-text.html',\n imports: [InputField],\n})\nexport class InputText extends InputFieldBase {\n mask = input<string>('');\n}\n","<kl-input-field\n type=\"text\"\n [control]=\"control()\"\n [label]=\"label()\"\n [mask]=\"mask()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWM,MAAO,SAAU,SAAQ,cAAc,CAAA;AAC3C,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;uGADb,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,qNAUA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDDY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,qNAAA,EAAA;;;AETvB;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-text.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-text/input-text.ts","../../projects/koala-ui/shared/components/input-field/input-text/input-text.html","../../projects/koala-ui/shared/components/input-field/input-text/koalarx-ui-shared-components-input-field-input-text.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-text',\n templateUrl: './input-text.html',\n imports: [InputField],\n})\nexport class InputText extends InputFieldBase {\n mask = input<string>('');\n}\n","<kl-input-field\n type=\"text\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [mask]=\"mask()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWM,MAAO,SAAU,SAAQ,cAAc,CAAA;AAC3C,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;uGADb,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,wPAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,wPAAA,EAAA;;;AETvB;;AAEG;;;;"}
@@ -6,11 +6,11 @@ class InputTime extends InputFieldBase {
6
6
  min = input();
7
7
  max = input();
8
8
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputTime, deps: null, target: i0.ɵɵFactoryTarget.Component });
9
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: InputTime, isStandalone: true, selector: "kl-input-time", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<kl-input-field\n type=\"time\"\n [control]=\"control()\"\n [label]=\"label()\"\n [min]=\"min()\"\n [max]=\"max()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
9
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: InputTime, isStandalone: true, selector: "kl-input-time", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<kl-input-field\n type=\"time\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [min]=\"min()\"\n [max]=\"max()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
10
10
  }
11
11
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputTime, decorators: [{
12
12
  type: Component,
13
- args: [{ selector: 'kl-input-time', imports: [InputField], template: "<kl-input-field\n type=\"time\"\n [control]=\"control()\"\n [label]=\"label()\"\n [min]=\"min()\"\n [max]=\"max()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n" }]
13
+ args: [{ selector: 'kl-input-time', imports: [InputField], template: "<kl-input-field\n type=\"time\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [min]=\"min()\"\n [max]=\"max()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n" }]
14
14
  }] });
15
15
 
16
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-time.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-time/input-time.ts","../../projects/koala-ui/shared/components/input-field/input-time/input-time.html","../../projects/koala-ui/shared/components/input-field/input-time/koalarx-ui-shared-components-input-field-input-time.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-time',\n templateUrl: './input-time.html',\n imports: [InputField],\n})\nexport class InputTime extends InputFieldBase {\n min = input<string>();\n max = input<string>();\n}\n","<kl-input-field\n type=\"time\"\n [control]=\"control()\"\n [label]=\"label()\"\n [min]=\"min()\"\n [max]=\"max()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWM,MAAO,SAAU,SAAQ,cAAc,CAAA;IAC3C,GAAG,GAAG,KAAK,EAAU;IACrB,GAAG,GAAG,KAAK,EAAU;uGAFV,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,sOAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,sOAAA,EAAA;;;AETvB;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-time.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-time/input-time.ts","../../projects/koala-ui/shared/components/input-field/input-time/input-time.html","../../projects/koala-ui/shared/components/input-field/input-time/koalarx-ui-shared-components-input-field-input-time.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-time',\n templateUrl: './input-time.html',\n imports: [InputField],\n})\nexport class InputTime extends InputFieldBase {\n min = input<string>();\n max = input<string>();\n}\n","<kl-input-field\n type=\"time\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [min]=\"min()\"\n [max]=\"max()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWM,MAAO,SAAU,SAAQ,cAAc,CAAA;IAC3C,GAAG,GAAG,KAAK,EAAU;IACrB,GAAG,GAAG,KAAK,EAAU;uGAFV,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,yQAYA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,eAAe,EAAA,OAAA,EAEhB,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,yQAAA,EAAA;;;AETvB;;AAEG;;;;"}
@@ -14,11 +14,11 @@ class InputUrl extends InputFieldBase {
14
14
  });
15
15
  }
16
16
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputUrl, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputUrl, isStandalone: true, selector: "kl-input-url", usesInheritance: true, ngImport: i0, template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n type=\"url\">\n\n <ng-container errors>\n @if (control().errors?.['pattern']) {\n <div class=\"error-message\">{{ translations.invalidURL }}</div>\n }\n </ng-container>\n</kl-input-field>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
17
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputUrl, isStandalone: true, selector: "kl-input-url", usesInheritance: true, ngImport: i0, template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n type=\"url\">\n\n <ng-container errors>\n @if (control().errors?.['pattern']) {\n <div class=\"error-message\">{{ translations.invalidURL }}</div>\n }\n </ng-container>\n</kl-input-field>\n", dependencies: [{ kind: "component", type: InputField, selector: "kl-input-field", inputs: ["type", "mask", "min", "max"] }] });
18
18
  }
19
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputUrl, decorators: [{
20
20
  type: Component,
21
- args: [{ selector: 'kl-input-url', imports: [InputField], template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n type=\"url\">\n\n <ng-container errors>\n @if (control().errors?.['pattern']) {\n <div class=\"error-message\">{{ translations.invalidURL }}</div>\n }\n </ng-container>\n</kl-input-field>\n" }]
21
+ args: [{ selector: 'kl-input-url', imports: [InputField], template: "<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n type=\"url\">\n\n <ng-container errors>\n @if (control().errors?.['pattern']) {\n <div class=\"error-message\">{{ translations.invalidURL }}</div>\n }\n </ng-container>\n</kl-input-field>\n" }]
22
22
  }], ctorParameters: () => [] });
23
23
 
24
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-input-url.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-url/input-url.ts","../../projects/koala-ui/shared/components/input-field/input-url/input-url.html","../../projects/koala-ui/shared/components/input-field/input-url/koalarx-ui-shared-components-input-field-input-url.ts"],"sourcesContent":["import { Component, effect, inject } from '@angular/core';\nimport { Validators } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-url',\n templateUrl: './input-url.html',\n imports: [InputField],\n})\nexport class InputUrl extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(\n Validators.pattern(/^(https?|ftp):\\/\\/[^\\s/$.?#].[^\\s]*$/)\n );\n });\n }\n}\n","<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n type=\"url\">\n\n <ng-container errors>\n @if (control().errors?.['pattern']) {\n <div class=\"error-message\">{{ translations.invalidURL }}</div>\n }\n </ng-container>\n</kl-input-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaM,MAAO,QAAS,SAAQ,cAAc,CAAA;IACjC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;YAE9B,OAAO,CAAC,aAAa,CACnB,UAAU,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAC3D;AACH,SAAC,CAAC;;uGAZO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbrB,iRAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDAY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,iRAAA,EAAA;;;AEXvB;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-input-url.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-url/input-url.ts","../../projects/koala-ui/shared/components/input-field/input-url/input-url.html","../../projects/koala-ui/shared/components/input-field/input-url/koalarx-ui-shared-components-input-field-input-url.ts"],"sourcesContent":["import { Component, effect, inject } from '@angular/core';\nimport { Validators } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-url',\n templateUrl: './input-url.html',\n imports: [InputField],\n})\nexport class InputUrl extends InputFieldBase {\n readonly translations = inject(AppConfig).translation.form;\n\n constructor() {\n super();\n\n effect(() => {\n const control = this.control();\n\n control.addValidators(\n Validators.pattern(/^(https?|ftp):\\/\\/[^\\s/$.?#].[^\\s]*$/)\n );\n });\n }\n}\n","<kl-input-field\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n type=\"url\">\n\n <ng-container errors>\n @if (control().errors?.['pattern']) {\n <div class=\"error-message\">{{ translations.invalidURL }}</div>\n }\n </ng-container>\n</kl-input-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaM,MAAO,QAAS,SAAQ,cAAc,CAAA;IACjC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAE1D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;YAE9B,OAAO,CAAC,aAAa,CACnB,UAAU,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAC3D;AACH,SAAC,CAAC;;uGAZO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbrB,oTAYA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDDY,UAAU,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAET,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,oTAAA,EAAA;;;AEXvB;;AAEG;;;;"}
@@ -19,11 +19,11 @@ class Textarea extends InputFieldBase {
19
19
  });
20
20
  }
21
21
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Textarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: Textarea, isStandalone: true, selector: "kl-textarea", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resizeble: { classPropertyName: "resizeble", publicName: "resizeble", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "textareaElement", first: true, predicate: ["textareaElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
22
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: Textarea, isStandalone: true, selector: "kl-textarea", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resizeble: { classPropertyName: "resizeble", publicName: "resizeble", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "textareaElement", first: true, predicate: ["textareaElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
23
23
  }
24
24
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Textarea, decorators: [{
25
25
  type: Component,
26
- args: [{ selector: 'kl-textarea', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
26
+ args: [{ selector: 'kl-textarea', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
27
27
  }], ctorParameters: () => [] });
28
28
 
29
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field-textarea.mjs","sources":["../../projects/koala-ui/shared/components/input-field/textarea/textarea.ts","../../projects/koala-ui/shared/components/input-field/textarea/textarea.html","../../projects/koala-ui/shared/components/input-field/textarea/koalarx-ui-shared-components-input-field-textarea.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-textarea',\n templateUrl: './textarea.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class Textarea extends InputFieldBase {\n private readonly textareaElement =\n viewChild<ElementRef<HTMLTextAreaElement>>('textareaElement');\n\n rows = input<number>(3);\n resizeble = input(false, { transform: booleanAttribute });\n\n constructor() {\n super();\n\n effect(() => {\n const textarea = this.textareaElement()?.nativeElement;\n\n if (textarea) {\n textarea.style.resize = this.resizeble() ? 'vertical' : 'none';\n }\n });\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBM,MAAO,QAAS,SAAQ,cAAc,CAAA;AACzB,IAAA,eAAe,GAC9B,SAAS,CAAkC,iBAAiB,CAAC;AAE/D,IAAA,IAAI,GAAG,KAAK,CAAS,CAAC,CAAC;IACvB,SAAS,GAAG,KAAK,CA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AA,EAAA,mBAAmB,uyBAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE/B,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAEd,OAAA,EAAA,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,wkBAAA,EAAA;;;AEf7C;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field-textarea.mjs","sources":["../../projects/koala-ui/shared/components/input-field/textarea/textarea.ts","../../projects/koala-ui/shared/components/input-field/textarea/textarea.html","../../projects/koala-ui/shared/components/input-field/textarea/koalarx-ui-shared-components-input-field-textarea.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-textarea',\n templateUrl: './textarea.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class Textarea extends InputFieldBase {\n private readonly textareaElement =\n viewChild<ElementRef<HTMLTextAreaElement>>('textareaElement');\n\n rows = input<number>(3);\n resizeble = input(false, { transform: booleanAttribute });\n\n constructor() {\n super();\n\n effect(() => {\n const textarea = this.textareaElement()?.nativeElement;\n\n if (textarea) {\n textarea.style.resize = this.resizeble() ? 'vertical' : 'none';\n }\n });\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBM,MAAO,QAAS,SAAQ,cAAc,CAAA;AACzB,IAAA,eAAe,GAC9B,SAAS,CAAkC,iBAAiB,CAAC;AAE/D,IAAA,IAAI,GAAG,KAAK,CAAS,CAAC,CAAC;IACvB,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAEzD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;YACV,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,EAAE,aAAa;YAEtD,IAAI,QAAQ,EAAE;AACZ,gBAAA,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,UAAU,GAAG,MAAM;;AAElE,SAAC,CAAC;;uGAhBO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,ECjBrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,6mBAsBA,EDPY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,uyBAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE/B,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAEd,OAAA,EAAA,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,6mBAAA,EAAA;;;AEf7C;;AAEG;;;;"}
@@ -16,6 +16,7 @@ class InputFieldBase {
16
16
  });
17
17
  control = input.required();
18
18
  label = input('');
19
+ placeholder = input('');
19
20
  disabled = input(false, { transform: booleanAttribute });
20
21
  constructor() {
21
22
  effect(() => this.checkIsRequired(this.control()));
@@ -24,7 +25,7 @@ class InputFieldBase {
24
25
  this.required.set(control.hasValidator(Validators.required));
25
26
  }
26
27
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputFieldBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: InputFieldBase, isStandalone: true, inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
28
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: InputFieldBase, isStandalone: true, inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
28
29
  }
29
30
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputFieldBase, decorators: [{
30
31
  type: Directive
@@ -36,11 +37,11 @@ class InputField extends InputFieldBase {
36
37
  min = input();
37
38
  max = input();
38
39
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputField, deps: null, target: i0.ɵɵFactoryTarget.Component });
39
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputField, isStandalone: true, selector: "kl-input-field", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: InputMask, selector: "input[mask]", inputs: ["mask"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
40
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputField, isStandalone: true, selector: "kl-input-field", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: InputMask, selector: "input[mask]", inputs: ["mask"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
40
41
  }
41
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputField, decorators: [{
42
43
  type: Component,
43
- args: [{ selector: 'kl-input-field', imports: [ReactiveFormsModule, InputMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
44
+ args: [{ selector: 'kl-input-field', imports: [ReactiveFormsModule, InputMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
44
45
  }] });
45
46
 
46
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-field.base.ts","../../projects/koala-ui/shared/components/input-field/input-field.ts","../../projects/koala-ui/shared/components/input-field/input-field.html","../../projects/koala-ui/shared/components/input-field/koalarx-ui-shared-components-input-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n effect,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly required = signal(false);\n protected readonly isDisabled = linkedSignal(() => this.disabled());\n protected readonly isRequired = this.required.asReadonly();\n protected readonly fieldId = randomString(10, {\n lowercase: true,\n uppercase: true,\n });\n\n control = input.required<FormControl>();\n label = input<string>('');\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputMask } from '@koalarx/ui/shared/directives';\nimport { InputFieldBase } from './input-field.base';\n\ntype InputTypeField =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'time'\n | 'search';\n\n@Component({\n selector: 'kl-input-field',\n templateUrl: './input-field.html',\n imports: [ReactiveFormsModule, InputMask, FieldErrors],\n})\nexport class InputField extends InputFieldBase {\n type = input<InputTypeField>('text');\n mask = input<string>('');\n min = input<string>();\n max = input<string>();\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label() + (isRequired() ? ' *' : '')\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYsB,cAAc,CAAA;AACjB,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;IACtB,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;AAChD,IAAA,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AACvC,IAAA,OAAO,GAAG,YAAY,CAAC,EAAE,EAAE;AAC5C,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAA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AAgB,WAEjB,CAAC,mBAAmB,EAAE,SAAS,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,orBAAA,EAAA;;;AEtBxD;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-field.base.ts","../../projects/koala-ui/shared/components/input-field/input-field.ts","../../projects/koala-ui/shared/components/input-field/input-field.html","../../projects/koala-ui/shared/components/input-field/koalarx-ui-shared-components-input-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n effect,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly required = signal(false);\n protected readonly isDisabled = linkedSignal(() => this.disabled());\n protected readonly isRequired = this.required.asReadonly();\n protected readonly fieldId = randomString(10, {\n lowercase: true,\n uppercase: true,\n });\n\n control = input.required<FormControl>();\n label = input<string>('');\n placeholder = input<string>('');\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputMask } from '@koalarx/ui/shared/directives';\nimport { InputFieldBase } from './input-field.base';\n\ntype InputTypeField =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'time'\n | 'search';\n\n@Component({\n selector: 'kl-input-field',\n templateUrl: './input-field.html',\n imports: [ReactiveFormsModule, InputMask, FieldErrors],\n})\nexport class InputField extends InputFieldBase {\n type = input<InputTypeField>('text');\n mask = input<string>('');\n min = input<string>();\n max = input<string>();\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYsB,cAAc,CAAA;AACjB,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;IACtB,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;AAChD,IAAA,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AACvC,IAAA,OAAO,GAAG,YAAY,CAAC,EAAE,EAAE;AAC5C,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC;AAEF,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAe;AACvC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AACzB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC;IAC/B,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAExD,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;;AAG5C,IAAA,eAAe,CAAC,OAAoB,EAAA;AAC1C,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC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,11 +8,12 @@ declare abstract class InputFieldBase {
8
8
  protected readonly fieldId: string;
9
9
  control: _angular_core.InputSignal<FormControl<any>>;
10
10
  label: _angular_core.InputSignal<string>;
11
+ placeholder: _angular_core.InputSignal<string>;
11
12
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
12
13
  constructor();
13
14
  private checkIsRequired;
14
15
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputFieldBase, never>;
15
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<InputFieldBase, never, never, { "control": { "alias": "control"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<InputFieldBase, never, never, { "control": { "alias": "control"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
17
  }
17
18
 
18
19
  type InputTypeField = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'search';