@koalarx/ui 21.0.9 → 21.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-number.mjs +19 -0
- package/fesm2022/koalarx-ui-shared-components-input-field-input-number.mjs.map +1 -0
- package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs +6 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-range.mjs +91 -0
- package/fesm2022/koalarx-ui-shared-components-input-field-range.mjs.map +1 -0
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs.map +1 -1
- package/package.json +9 -1
- package/shared/components/input-field/input-number/package.json +4 -0
- package/shared/components/input-field/range/package.json +4 -0
- package/theme/form.css +13 -6
- package/types/koalarx-ui-shared-components-input-field-input-number.d.ts +9 -0
- package/types/koalarx-ui-shared-components-input-field-range.d.ts +26 -0
|
@@ -67,11 +67,11 @@ class InputCheckbox extends InputFieldBase {
|
|
|
67
67
|
this.control().setValue(target.checked);
|
|
68
68
|
}
|
|
69
69
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputCheckbox, isStandalone: true, selector: "kl-input-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputCheckboxElement", first: true, predicate: ["inputCheckbox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputCheckbox\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputCheckbox, isStandalone: true, selector: "kl-input-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputCheckboxElement", first: true, predicate: ["inputCheckbox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputCheckbox\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
71
|
}
|
|
72
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputCheckbox, decorators: [{
|
|
73
73
|
type: Component,
|
|
74
|
-
args: [{ selector: 'kl-input-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule], template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputCheckbox\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
74
|
+
args: [{ selector: 'kl-input-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule], template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputCheckbox\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n" }]
|
|
75
75
|
}], ctorParameters: () => [], propDecorators: { inputCheckboxElement: [{ type: i0.ViewChild, args: ['inputCheckbox', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-checkbox.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-checkbox/input-checkbox.ts","../../projects/koala-ui/shared/components/input-field/input-checkbox/input-checkbox.html","../../projects/koala-ui/shared/components/input-field/input-checkbox/koalarx-ui-shared-components-input-field-input-checkbox.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\nexport type CheckboxColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type CheckboxSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-input-checkbox',\n templateUrl: './input-checkbox.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ReactiveFormsModule],\n})\nexport class InputCheckbox extends InputFieldBase {\n private readonly inputCheckboxElement =\n viewChild<ElementRef<HTMLInputElement>>('inputCheckbox');\n\n color = input<CheckboxColor>();\n size = input<CheckboxSize>();\n\n private getColorClass(): string {\n switch (this.color()) {\n case 'neutral':\n return 'checkbox-neutral';\n case 'primary':\n return 'checkbox-primary';\n case 'secondary':\n return 'checkbox-secondary';\n case 'accent':\n return 'checkbox-accent';\n case 'info':\n return 'checkbox-info';\n case 'success':\n return 'checkbox-success';\n case 'warning':\n return 'checkbox-warning';\n case 'error':\n return 'checkbox-error';\n case 'ghost':\n return 'checkbox-ghost';\n default:\n return 'checkbox';\n }\n }\n\n private getSizeClass(): string {\n switch (this.size()) {\n case 'extraSmall':\n return 'checkbox-xs';\n case 'small':\n return 'checkbox-sm';\n case 'medium':\n return 'checkbox-md';\n case 'large':\n return 'checkbox-lg';\n case 'extraLarge':\n return 'checkbox-xl';\n default:\n return 'checkbox';\n }\n }\n\n constructor() {\n super();\n\n effect(() => {\n const input = this.inputCheckboxElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getColorClass());\n }\n });\n\n effect(() => {\n const input = this.inputCheckboxElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getSizeClass());\n }\n });\n }\n\n toggle(event: Event) {\n const target = event.target as HTMLInputElement;\n this.control().setValue(target.checked);\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputCheckbox\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-checkbox.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-checkbox/input-checkbox.ts","../../projects/koala-ui/shared/components/input-field/input-checkbox/input-checkbox.html","../../projects/koala-ui/shared/components/input-field/input-checkbox/koalarx-ui-shared-components-input-field-input-checkbox.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\nexport type CheckboxColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type CheckboxSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-input-checkbox',\n templateUrl: './input-checkbox.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ReactiveFormsModule],\n})\nexport class InputCheckbox extends InputFieldBase {\n private readonly inputCheckboxElement =\n viewChild<ElementRef<HTMLInputElement>>('inputCheckbox');\n\n color = input<CheckboxColor>();\n size = input<CheckboxSize>();\n\n private getColorClass(): string {\n switch (this.color()) {\n case 'neutral':\n return 'checkbox-neutral';\n case 'primary':\n return 'checkbox-primary';\n case 'secondary':\n return 'checkbox-secondary';\n case 'accent':\n return 'checkbox-accent';\n case 'info':\n return 'checkbox-info';\n case 'success':\n return 'checkbox-success';\n case 'warning':\n return 'checkbox-warning';\n case 'error':\n return 'checkbox-error';\n case 'ghost':\n return 'checkbox-ghost';\n default:\n return 'checkbox';\n }\n }\n\n private getSizeClass(): string {\n switch (this.size()) {\n case 'extraSmall':\n return 'checkbox-xs';\n case 'small':\n return 'checkbox-sm';\n case 'medium':\n return 'checkbox-md';\n case 'large':\n return 'checkbox-lg';\n case 'extraLarge':\n return 'checkbox-xl';\n default:\n return 'checkbox';\n }\n }\n\n constructor() {\n super();\n\n effect(() => {\n const input = this.inputCheckboxElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getColorClass());\n }\n });\n\n effect(() => {\n const input = this.inputCheckboxElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getSizeClass());\n }\n });\n }\n\n toggle(event: Event) {\n const target = event.target as HTMLInputElement;\n this.control().setValue(target.checked);\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputCheckbox\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAmCM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC9B,IAAA,oBAAoB,GACnC,SAAS,CAA+B,eAAe,gEAAC;IAE1D,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiB;IAC9B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,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UAAA,EAAA,CAAA;kBANzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,mBAEZ,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,mBAAmB,CAAC,EAAA,QAAA,EAAA,+XAAA,EAAA;4GAIY,eAAe,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErC3D;;AAEG;;;;"}
|
|
@@ -10,11 +10,11 @@ class InputCurrency extends InputFieldBase {
|
|
|
10
10
|
decimalCount = input(2, ...(ngDevMode ? [{ debugName: "decimalCount" }] : []));
|
|
11
11
|
currentValue = linkedSignal(() => this.control().value, ...(ngDevMode ? [{ debugName: "currentValue" }] : []));
|
|
12
12
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputCurrency, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
14
|
}
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputCurrency, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
|
-
args: [{ selector: 'kl-input-currency', imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
17
|
+
args: [{ selector: 'kl-input-currency', imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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
|
}], propDecorators: { decimalCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalCount", required: false }] }] } });
|
|
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 {\n ChangeDetectionStrategy,\n Component,\n input,\n linkedSignal,\n} 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 changeDetection: ChangeDetectionStrategy.OnPush,\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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
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 {\n ChangeDetectionStrategy,\n Component,\n input,\n linkedSignal,\n} 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 changeDetection: ChangeDetectionStrategy.OnPush,\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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,YAAY,GAAG,KAAK,CAAS,CAAC,wDAAC;AAC/B,IAAA,YAAY,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,wDAAC;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,ECjB1B,y0BAiCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDnBY,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAG/D,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,OAAA,EAEpB,CAAC,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAA,eAAA,EAC1D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,y0BAAA,EAAA;;;AEfjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { InputFieldBase, InputField } from '@koalarx/ui/shared/components/input-field';
|
|
4
|
+
|
|
5
|
+
class InputNumber extends InputFieldBase {
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputNumber, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: InputNumber, isStandalone: true, selector: "kl-input-number", usesInheritance: true, ngImport: i0, template: "<kl-input-field\n type=\"number\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\">\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
|
+
}
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputNumber, decorators: [{
|
|
10
|
+
type: Component,
|
|
11
|
+
args: [{ selector: 'kl-input-number', imports: [InputField], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kl-input-field\n type=\"number\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\">\n\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-input-field>\n" }]
|
|
12
|
+
}] });
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Generated bundle index. Do not edit.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export { InputNumber };
|
|
19
|
+
//# sourceMappingURL=koalarx-ui-shared-components-input-field-input-number.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-number.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-number/input-number.ts","../../projects/koala-ui/shared/components/input-field/input-number/input-number.html","../../projects/koala-ui/shared/components/input-field/input-number/koalarx-ui-shared-components-input-field-input-number.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport {\n InputField,\n InputFieldBase,\n} from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-input-number',\n templateUrl: './input-number.html',\n imports: [InputField],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputNumber extends InputFieldBase {}\n","<kl-input-field\n type=\"number\"\n [control]=\"control()\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [hint]=\"hint()\">\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":";;;;AAYM,MAAO,WAAY,SAAQ,cAAc,CAAA;uGAAlC,WAAW,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZxB,0PAWA,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGT,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,WAElB,CAAC,UAAU,CAAC,EAAA,eAAA,EACJ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0PAAA,EAAA;;;AEVjD;;AAEG;;;;"}
|
|
@@ -53,11 +53,11 @@ class InputPassword extends InputFieldBase {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputPassword, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
57
|
}
|
|
58
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputPassword, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
|
-
args: [{ selector: 'kl-input-password', imports: [ReactiveFormsModule, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
60
|
+
args: [{ selector: 'kl-input-password', imports: [ReactiveFormsModule, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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
|
}], propDecorators: { enableStrongPasswordCheck: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableStrongPasswordCheck", required: false }] }] } });
|
|
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 ChangeDetectionStrategy,\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 changeDetection: ChangeDetectionStrategy.OnPush,\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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
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 ChangeDetectionStrategy,\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 changeDetection: ChangeDetectionStrategy.OnPush,\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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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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,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,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,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC1B1B,opDA4DA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDrCY,mBAAmB,uyBAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAG/B,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;+BACE,mBAAmB,EAAA,OAAA,EAEpB,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAA,eAAA,EAC1B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,opDAAA,EAAA;;;AExBjD;;AAEG;;;;"}
|
|
@@ -73,14 +73,18 @@ class InputRadio extends InputFieldBase {
|
|
|
73
73
|
!this.disableAutoTypeConversion()) {
|
|
74
74
|
value = Number(value);
|
|
75
75
|
}
|
|
76
|
+
if (this.control().value === value) {
|
|
77
|
+
this.control().setValue(null);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
76
80
|
this.control().setValue(value);
|
|
77
81
|
}
|
|
78
82
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputRadio, isStandalone: true, selector: "kl-input-radio", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disableAutoTypeConversion: { classPropertyName: "disableAutoTypeConversion", publicName: "disableAutoTypeConversion", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputRadioElement", first: true, predicate: ["inputRadio"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputRadio\n [id]=\"fieldId\"\n type=\"radio\"\n class=\"radio\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"value() === control().value\"\n [disabled]=\"disabled()\"\n (
|
|
83
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputRadio, isStandalone: true, selector: "kl-input-radio", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disableAutoTypeConversion: { classPropertyName: "disableAutoTypeConversion", publicName: "disableAutoTypeConversion", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputRadioElement", first: true, predicate: ["inputRadio"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputRadio\n [id]=\"fieldId\"\n type=\"radio\"\n class=\"radio\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"value() === control().value\"\n [disabled]=\"disabled()\"\n (click)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
80
84
|
}
|
|
81
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputRadio, decorators: [{
|
|
82
86
|
type: Component,
|
|
83
|
-
args: [{ selector: 'kl-input-radio', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputRadio\n [id]=\"fieldId\"\n type=\"radio\"\n class=\"radio\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"value() === control().value\"\n [disabled]=\"disabled()\"\n (
|
|
87
|
+
args: [{ selector: 'kl-input-radio', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputRadio\n [id]=\"fieldId\"\n type=\"radio\"\n class=\"radio\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"value() === control().value\"\n [disabled]=\"disabled()\"\n (click)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n" }]
|
|
84
88
|
}], ctorParameters: () => [], propDecorators: { inputRadioElement: [{ type: i0.ViewChild, args: ['inputRadio', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disableAutoTypeConversion: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableAutoTypeConversion", required: false }] }] } });
|
|
85
89
|
|
|
86
90
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-radio.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-radio/input-radio.ts","../../projects/koala-ui/shared/components/input-field/input-radio/input-radio.html","../../projects/koala-ui/shared/components/input-field/input-radio/koalarx-ui-shared-components-input-field-input-radio.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\nexport type RadioColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type RadioSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-input-radio',\n templateUrl: './input-radio.html',\n imports: [ReactiveFormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputRadio extends InputFieldBase {\n private readonly inputRadioElement =\n viewChild<ElementRef<HTMLInputElement>>('inputRadio');\n\n color = input<RadioColor>();\n size = input<RadioSize>();\n name = input.required<string>();\n value = input.required<string | number>();\n disableAutoTypeConversion = input(false, { transform: booleanAttribute });\n\n private getColorClass(): string {\n switch (this.color()) {\n case 'neutral':\n return 'radio-neutral';\n case 'primary':\n return 'radio-primary';\n case 'secondary':\n return 'radio-secondary';\n case 'accent':\n return 'radio-accent';\n case 'info':\n return 'radio-info';\n case 'success':\n return 'radio-success';\n case 'warning':\n return 'radio-warning';\n case 'error':\n return 'radio-error';\n case 'ghost':\n return 'radio-ghost';\n default:\n return 'radio';\n }\n }\n\n private getSizeClass(): string {\n switch (this.size()) {\n case 'extraSmall':\n return 'radio-xs';\n case 'small':\n return 'radio-sm';\n case 'medium':\n return 'radio-md';\n case 'large':\n return 'radio-lg';\n case 'extraLarge':\n return 'radio-xl';\n default:\n return 'radio';\n }\n }\n\n constructor() {\n super();\n\n effect(() => {\n const input = this.inputRadioElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getColorClass());\n }\n });\n\n effect(() => {\n const input = this.inputRadioElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getSizeClass());\n }\n });\n }\n\n toggle(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 this.control().setValue(value);\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputRadio\n [id]=\"fieldId\"\n type=\"radio\"\n class=\"radio\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"value() === control().value\"\n [disabled]=\"disabled()\"\n (
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-radio.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-radio/input-radio.ts","../../projects/koala-ui/shared/components/input-field/input-radio/input-radio.html","../../projects/koala-ui/shared/components/input-field/input-radio/koalarx-ui-shared-components-input-field-input-radio.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\nexport type RadioColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type RadioSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-input-radio',\n templateUrl: './input-radio.html',\n imports: [ReactiveFormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputRadio extends InputFieldBase {\n private readonly inputRadioElement =\n viewChild<ElementRef<HTMLInputElement>>('inputRadio');\n\n color = input<RadioColor>();\n size = input<RadioSize>();\n name = input.required<string>();\n value = input.required<string | number>();\n disableAutoTypeConversion = input(false, { transform: booleanAttribute });\n\n private getColorClass(): string {\n switch (this.color()) {\n case 'neutral':\n return 'radio-neutral';\n case 'primary':\n return 'radio-primary';\n case 'secondary':\n return 'radio-secondary';\n case 'accent':\n return 'radio-accent';\n case 'info':\n return 'radio-info';\n case 'success':\n return 'radio-success';\n case 'warning':\n return 'radio-warning';\n case 'error':\n return 'radio-error';\n case 'ghost':\n return 'radio-ghost';\n default:\n return 'radio';\n }\n }\n\n private getSizeClass(): string {\n switch (this.size()) {\n case 'extraSmall':\n return 'radio-xs';\n case 'small':\n return 'radio-sm';\n case 'medium':\n return 'radio-md';\n case 'large':\n return 'radio-lg';\n case 'extraLarge':\n return 'radio-xl';\n default:\n return 'radio';\n }\n }\n\n constructor() {\n super();\n\n effect(() => {\n const input = this.inputRadioElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getColorClass());\n }\n });\n\n effect(() => {\n const input = this.inputRadioElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getSizeClass());\n }\n });\n }\n\n toggle(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.control().value === value) {\n this.control().setValue(null);\n return;\n }\n\n this.control().setValue(value);\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputRadio\n [id]=\"fieldId\"\n type=\"radio\"\n class=\"radio\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"value() === control().value\"\n [disabled]=\"disabled()\"\n (click)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAoCM,MAAO,UAAW,SAAQ,cAAc,CAAA;AAC3B,IAAA,iBAAiB,GAChC,SAAS,CAA+B,YAAY,6DAAC;IAEvD,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAc;IAC3B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AACzB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAmB;IACzC,yBAAyB,GAAG,KAAK,CAAC,KAAK,sEAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAEjE,aAAa,GAAA;AACnB,QAAA,QAAQ,IAAI,CAAC,KAAK,EAAE;AAClB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,eAAe;AACxB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,eAAe;AACxB,YAAA,KAAK,WAAW;AACd,gBAAA,OAAO,iBAAiB;AAC1B,YAAA,KAAK,QAAQ;AACX,gBAAA,OAAO,cAAc;AACvB,YAAA,KAAK,MAAM;AACT,gBAAA,OAAO,YAAY;AACrB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,eAAe;AACxB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,eAAe;AACxB,YAAA,K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A,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,yBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtCxD;;AAEG;;;;"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, input, computed, linkedSignal, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
class InputRange {
|
|
7
|
+
destroyRef = inject(DestroyRef);
|
|
8
|
+
control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
9
|
+
min = input.required(...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
10
|
+
max = input.required(...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
11
|
+
step = input.required(...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
12
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
13
|
+
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
14
|
+
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
15
|
+
colorClass = computed(() => {
|
|
16
|
+
switch (this.color()) {
|
|
17
|
+
case 'neutral':
|
|
18
|
+
return 'range-neutral';
|
|
19
|
+
case 'primary':
|
|
20
|
+
return 'range-primary';
|
|
21
|
+
case 'secondary':
|
|
22
|
+
return 'range-secondary';
|
|
23
|
+
case 'accent':
|
|
24
|
+
return 'range-accent';
|
|
25
|
+
case 'info':
|
|
26
|
+
return 'range-info';
|
|
27
|
+
case 'success':
|
|
28
|
+
return 'range-success';
|
|
29
|
+
case 'warning':
|
|
30
|
+
return 'range-warning';
|
|
31
|
+
case 'error':
|
|
32
|
+
return 'range-error';
|
|
33
|
+
case 'ghost':
|
|
34
|
+
return 'range-ghost';
|
|
35
|
+
default:
|
|
36
|
+
return 'range';
|
|
37
|
+
}
|
|
38
|
+
}, ...(ngDevMode ? [{ debugName: "colorClass" }] : []));
|
|
39
|
+
sizeClass = computed(() => {
|
|
40
|
+
switch (this.size()) {
|
|
41
|
+
case 'extraSmall':
|
|
42
|
+
return 'range-xs';
|
|
43
|
+
case 'small':
|
|
44
|
+
return 'range-sm';
|
|
45
|
+
case 'medium':
|
|
46
|
+
return 'range-md';
|
|
47
|
+
case 'large':
|
|
48
|
+
return 'range-lg';
|
|
49
|
+
case 'extraLarge':
|
|
50
|
+
return 'range-xl';
|
|
51
|
+
default:
|
|
52
|
+
return '';
|
|
53
|
+
}
|
|
54
|
+
}, ...(ngDevMode ? [{ debugName: "sizeClass" }] : []));
|
|
55
|
+
steps = computed(() => {
|
|
56
|
+
const stepArray = [];
|
|
57
|
+
if (this.step() > 0) {
|
|
58
|
+
for (let i = this.min(); i <= this.max(); i += this.step()) {
|
|
59
|
+
stepArray.push(i);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return stepArray;
|
|
63
|
+
}, ...(ngDevMode ? [{ debugName: "steps" }] : []));
|
|
64
|
+
value = linkedSignal(() => this.control().value, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
65
|
+
constructor() {
|
|
66
|
+
afterRenderEffect(() => {
|
|
67
|
+
this.control()
|
|
68
|
+
.valueChanges.pipe(takeUntilDestroyed(this.destroyRef))
|
|
69
|
+
.subscribe((value) => {
|
|
70
|
+
this.value.set(value);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
setValue(event) {
|
|
75
|
+
const target = event.target;
|
|
76
|
+
this.control().setValue(target.value);
|
|
77
|
+
}
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputRange, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputRange, isStandalone: true, selector: "kl-input-range", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: true, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"w-full\">\n <input type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [value]=\"value()\"\n class=\"range w-full\"\n [class]=\"colorClass() + ' ' + sizeClass()\"\n [step]=\"step()\"\n (change)=\"setValue($event)\"\n />\n\n <div class=\"flex justify-between px-2.5 mt-2 text-xs\">\n @for (step of steps(); track $index) {\n <span>|</span>\n }\n </div>\n\n <div class=\"flex justify-between px-2.5 mt-2 text-xs\">\n @for (step of steps(); track $index) {\n <span>{{step}}</span>\n }\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputRange, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{ selector: 'kl-input-range', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"w-full\">\n <input type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [value]=\"value()\"\n class=\"range w-full\"\n [class]=\"colorClass() + ' ' + sizeClass()\"\n [step]=\"step()\"\n (change)=\"setValue($event)\"\n />\n\n <div class=\"flex justify-between px-2.5 mt-2 text-xs\">\n @for (step of steps(); track $index) {\n <span>|</span>\n }\n </div>\n\n <div class=\"flex justify-between px-2.5 mt-2 text-xs\">\n @for (step of steps(); track $index) {\n <span>{{step}}</span>\n }\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n" }]
|
|
84
|
+
}], ctorParameters: () => [], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: true }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: true }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Generated bundle index. Do not edit.
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
export { InputRange };
|
|
91
|
+
//# sourceMappingURL=koalarx-ui-shared-components-input-field-range.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-range.mjs","sources":["../../projects/koala-ui/shared/components/input-field/range/input-range.ts","../../projects/koala-ui/shared/components/input-field/range/input-range.html","../../projects/koala-ui/shared/components/input-field/range/koalarx-ui-shared-components-input-field-range.ts"],"sourcesContent":["import {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n linkedSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\n\nexport type RangeColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type RangeSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-input-range',\n templateUrl: './input-range.html',\n imports: [ReactiveFormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputRange {\n private destroyRef = inject(DestroyRef);\n\n control = input.required<FormControl>();\n min = input.required<number>();\n max = input.required<number>();\n step = input.required<number>();\n hint = input<string>('');\n color = input<RangeColor>();\n size = input<RangeSize>();\n\n colorClass = computed(() => {\n switch (this.color()) {\n case 'neutral':\n return 'range-neutral';\n case 'primary':\n return 'range-primary';\n case 'secondary':\n return 'range-secondary';\n case 'accent':\n return 'range-accent';\n case 'info':\n return 'range-info';\n case 'success':\n return 'range-success';\n case 'warning':\n return 'range-warning';\n case 'error':\n return 'range-error';\n case 'ghost':\n return 'range-ghost';\n default:\n return 'range';\n }\n });\n\n sizeClass = computed(() => {\n switch (this.size()) {\n case 'extraSmall':\n return 'range-xs';\n case 'small':\n return 'range-sm';\n case 'medium':\n return 'range-md';\n case 'large':\n return 'range-lg';\n case 'extraLarge':\n return 'range-xl';\n default:\n return '';\n }\n });\n\n steps = computed(() => {\n const stepArray = [];\n\n if (this.step() > 0) {\n for (let i = this.min(); i <= this.max(); i += this.step()) {\n stepArray.push(i);\n }\n }\n\n return stepArray;\n });\n\n value = linkedSignal(() => this.control().value);\n\n constructor() {\n afterRenderEffect(() => {\n this.control()\n .valueChanges.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n this.value.set(value);\n });\n });\n }\n\n setValue(event: Event) {\n const target = event.target as HTMLInputElement;\n this.control().setValue(target.value);\n }\n}\n","<div class=\"w-full\">\n <input type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [value]=\"value()\"\n class=\"range w-full\"\n [class]=\"colorClass() + ' ' + sizeClass()\"\n [step]=\"step()\"\n (change)=\"setValue($event)\"\n />\n\n <div class=\"flex justify-between px-2.5 mt-2 text-xs\">\n @for (step of steps(); track $index) {\n <span>|</span>\n }\n </div>\n\n <div class=\"flex justify-between px-2.5 mt-2 text-xs\">\n @for (step of steps(); track $index) {\n <span>{{step}}</span>\n }\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAqCa,UAAU,CAAA;AACb,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;AACvC,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,8CAAU;AAC9B,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,8CAAU;AAC9B,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;AAC/B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,gDAAC;IACxB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAc;IAC3B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AAEzB,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AACzB,QAAA,QAAQ,IAAI,CAAC,KAAK,EAAE;AAClB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,eAAe;AACxB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,eAAe;AACxB,YAAA,KAAK,WAAW;AACd,gBAAA,O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MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,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,QAAA,EAAA,EAAA,EAAA,QAAA,ECrCvB,4nBA2BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDOY,mBAAmB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGlB,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,WAEjB,CAAC,mBAAmB,CAAC,EAAA,eAAA,EACb,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4nBAAA,EAAA;;;AEnCjD;;AAEG;;;;"}
|
|
@@ -421,11 +421,11 @@ class Select extends InputFieldBase {
|
|
|
421
421
|
inputValue.click();
|
|
422
422
|
}
|
|
423
423
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Select, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Select, isStandalone: true, selector: "kl-select", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, internalFilter: { classPropertyName: "internalFilter", publicName: "internalFilter", isSignal: true, isRequired: false, transformFunction: null }, withoutFilter: { classPropertyName: "withoutFilter", publicName: "withoutFilter", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange", selectedItem: "selectedItem" }, viewQueries: [{ propertyName: "selectField", first: true, predicate: ["selectField"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kl-select-container relative w-full has-[select:disabled]:cursor-not-allowed\"\n [class.has-value]=\"hasValue()\">\n\n @if (label(); as label) {\n <label class=\"kl-select-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\"\n [attr.for]=\"fieldId\">\n @if (isDisabled()) {\n <span class=\"text-neutral-200 dark:text-neutral-600\">\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n } @else {\n <span>{{ label }} {{ isRequired() ? '*' : '' }}</span>\n }\n </label>\n }\n\n @if (!isDisabled() && hasValue()) {\n <div class=\"flex items-center justify-center h-full absolute top-0 right-7 z-10 pr-2\">\n <button class=\"kl-select-clear-button text-neutral-400 hover:cursor-pointer text-sm focus:shadow-none!\"\n type=\"button\"\n (click)=\"clear($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"kl-select-content\" #selectField>\n <button type=\"button\" class=\"kl-select-button flex disabled:border-neutral-200! disabled:dark:border-neutral-800!\"\n [attr.popovertarget]=\"fieldId\"\n popovertargetaction=\"toggle\">\n\n <span class=\"selectcontent flex flex-wrap gap-1 items-center w-full h-full\" [class.py-3]=\"multiple()\"></span>\n\n <span class=\"picker\">\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else {\n <i class=\"fa-solid fa-caret-down\"></i>\n }\n </span>\n </button>\n\n <div [id]=\"fieldId\" popover class=\"kl-select-options-container with-popover relative flex flex-col overflow-hidden bg-base-100 dark:bg-base-300\">\n @if (!withoutFilter()) {\n <div class=\"kl-select-filter-container border-b 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=\"w-full p-2 pr-3 pl-10 outline-none dark:placeholder:opacity-80\"\n #searchInput\n type=\"search\"\n [(ngModel)]=\"filter\"\n [placeholder]=\"translations.selectTypeSearch\"\n />\n </label>\n </div>\n }\n\n <div class=\"kl-select-options-content p-1 overflow-auto\">\n @for (item of optionList(); track $index) {\n @let optionLabelId = fieldId + '-' + item.value;\n\n <label class=\"kl-select-option-content relative py-1 px-2 pr-8 rounded-md text-neutral-900 dark:text-neutral-300 has-[input:checked]:bg-neutral-200 dark:has-[input:checked]:bg-neutral-700 hover:bg-neutral-300 dark:hover:bg-neutral-600 cursor-pointer\"\n [attr.for]=\"optionLabelId\"\n [attr.data-index]=\"$index\">\n <span class=\"w-full\">\n @let isChecked = multiple() ? (control().value || []).includes(item.value) : item.value === control().value;\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId\"\n [attr.value]=\"item.value\"\n [checked]=\"isChecked\"\n (change)=\"setValue($event)\"\n />\n <span>{{ item.label }}</span>\n </span>\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
424
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Select, isStandalone: true, selector: "kl-select", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, internalFilter: { classPropertyName: "internalFilter", publicName: "internalFilter", isSignal: true, isRequired: false, transformFunction: null }, withoutFilter: { classPropertyName: "withoutFilter", publicName: "withoutFilter", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange", selectedItem: "selectedItem" }, viewQueries: [{ propertyName: "selectField", first: true, predicate: ["selectField"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kl-select-container relative w-full has-[select:disabled]:cursor-not-allowed\"\n [class.has-value]=\"hasValue()\">\n\n @if (label(); as label) {\n <label class=\"kl-select-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\"\n [attr.for]=\"fieldId\">\n @if (isDisabled()) {\n <span class=\"text-neutral-200 dark:text-neutral-600\">\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n } @else {\n <span>{{ label }} {{ isRequired() ? '*' : '' }}</span>\n }\n </label>\n }\n\n @if (!isDisabled() && hasValue()) {\n <div class=\"flex items-center justify-center h-full absolute top-0 right-7 z-10 pr-2\">\n <button class=\"kl-select-clear-button text-neutral-400 hover:cursor-pointer text-sm focus:shadow-none!\"\n type=\"button\"\n (click)=\"clear($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"kl-select-content\" #selectField>\n <button type=\"button\" class=\"kl-select-button flex disabled:border-neutral-200! disabled:dark:border-neutral-800!\"\n [attr.popovertarget]=\"fieldId\"\n popovertargetaction=\"toggle\">\n\n <span class=\"selectcontent flex flex-wrap gap-1 items-center w-full h-full\" [class.py-3]=\"multiple()\"></span>\n\n <span class=\"picker\">\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else {\n <i class=\"fa-solid fa-caret-down\"></i>\n }\n </span>\n </button>\n\n <div [id]=\"fieldId\" popover class=\"kl-select-options-container with-popover relative flex flex-col overflow-hidden bg-base-100 dark:bg-base-300\">\n @if (!withoutFilter()) {\n <div class=\"kl-select-filter-container border-b 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=\"w-full p-2 pr-3 pl-10 outline-none dark:placeholder:opacity-80\"\n #searchInput\n type=\"search\"\n [(ngModel)]=\"filter\"\n [placeholder]=\"translations.selectTypeSearch\"\n />\n </label>\n </div>\n }\n\n <div class=\"kl-select-options-content p-1 overflow-auto\">\n @for (item of optionList(); track $index) {\n @let optionLabelId = fieldId + '-' + item.value;\n\n <label class=\"kl-select-option-content relative py-1 px-2 pr-8 rounded-md text-neutral-900 dark:text-neutral-300 has-[input:checked]:bg-neutral-200 dark:has-[input:checked]:bg-neutral-700 hover:bg-neutral-300 dark:hover:bg-neutral-600 cursor-pointer\"\n [attr.for]=\"optionLabelId\"\n [attr.data-index]=\"$index\">\n <span class=\"w-full\">\n @let isChecked = multiple() ? (control().value || []).includes(item.value) : item.value === control().value;\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId\"\n [attr.value]=\"item.value\"\n [checked]=\"isChecked\"\n (change)=\"setValue($event)\"\n />\n <span>{{ item.label }}</span>\n </span>\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\"><i class=\"fa-regular fa-circle-question\"></i> {{hint()}}</span>\n}\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: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }, { kind: "component", type: Loader, selector: "kl-loader", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
425
425
|
}
|
|
426
426
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Select, decorators: [{
|
|
427
427
|
type: Component,
|
|
428
|
-
args: [{ selector: 'kl-select', imports: [FormsModule, ReactiveFormsModule, FieldErrors, Loader], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kl-select-container relative w-full has-[select:disabled]:cursor-not-allowed\"\n [class.has-value]=\"hasValue()\">\n\n @if (label(); as label) {\n <label class=\"kl-select-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\"\n [attr.for]=\"fieldId\">\n @if (isDisabled()) {\n <span class=\"text-neutral-200 dark:text-neutral-600\">\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n } @else {\n <span>{{ label }} {{ isRequired() ? '*' : '' }}</span>\n }\n </label>\n }\n\n @if (!isDisabled() && hasValue()) {\n <div class=\"flex items-center justify-center h-full absolute top-0 right-7 z-10 pr-2\">\n <button class=\"kl-select-clear-button text-neutral-400 hover:cursor-pointer text-sm focus:shadow-none!\"\n type=\"button\"\n (click)=\"clear($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"kl-select-content\" #selectField>\n <button type=\"button\" class=\"kl-select-button flex disabled:border-neutral-200! disabled:dark:border-neutral-800!\"\n [attr.popovertarget]=\"fieldId\"\n popovertargetaction=\"toggle\">\n\n <span class=\"selectcontent flex flex-wrap gap-1 items-center w-full h-full\" [class.py-3]=\"multiple()\"></span>\n\n <span class=\"picker\">\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else {\n <i class=\"fa-solid fa-caret-down\"></i>\n }\n </span>\n </button>\n\n <div [id]=\"fieldId\" popover class=\"kl-select-options-container with-popover relative flex flex-col overflow-hidden bg-base-100 dark:bg-base-300\">\n @if (!withoutFilter()) {\n <div class=\"kl-select-filter-container border-b 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=\"w-full p-2 pr-3 pl-10 outline-none dark:placeholder:opacity-80\"\n #searchInput\n type=\"search\"\n [(ngModel)]=\"filter\"\n [placeholder]=\"translations.selectTypeSearch\"\n />\n </label>\n </div>\n }\n\n <div class=\"kl-select-options-content p-1 overflow-auto\">\n @for (item of optionList(); track $index) {\n @let optionLabelId = fieldId + '-' + item.value;\n\n <label class=\"kl-select-option-content relative py-1 px-2 pr-8 rounded-md text-neutral-900 dark:text-neutral-300 has-[input:checked]:bg-neutral-200 dark:has-[input:checked]:bg-neutral-700 hover:bg-neutral-300 dark:hover:bg-neutral-600 cursor-pointer\"\n [attr.for]=\"optionLabelId\"\n [attr.data-index]=\"$index\">\n <span class=\"w-full\">\n @let isChecked = multiple() ? (control().value || []).includes(item.value) : item.value === control().value;\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId\"\n [attr.value]=\"item.value\"\n [checked]=\"isChecked\"\n (change)=\"setValue($event)\"\n />\n <span>{{ item.label }}</span>\n </span>\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
428
|
+
args: [{ selector: 'kl-select', imports: [FormsModule, ReactiveFormsModule, FieldErrors, Loader], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kl-select-container relative w-full has-[select:disabled]:cursor-not-allowed\"\n [class.has-value]=\"hasValue()\">\n\n @if (label(); as label) {\n <label class=\"kl-select-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\"\n [attr.for]=\"fieldId\">\n @if (isDisabled()) {\n <span class=\"text-neutral-200 dark:text-neutral-600\">\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n } @else {\n <span>{{ label }} {{ isRequired() ? '*' : '' }}</span>\n }\n </label>\n }\n\n @if (!isDisabled() && hasValue()) {\n <div class=\"flex items-center justify-center h-full absolute top-0 right-7 z-10 pr-2\">\n <button class=\"kl-select-clear-button text-neutral-400 hover:cursor-pointer text-sm focus:shadow-none!\"\n type=\"button\"\n (click)=\"clear($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"kl-select-content\" #selectField>\n <button type=\"button\" class=\"kl-select-button flex disabled:border-neutral-200! disabled:dark:border-neutral-800!\"\n [attr.popovertarget]=\"fieldId\"\n popovertargetaction=\"toggle\">\n\n <span class=\"selectcontent flex flex-wrap gap-1 items-center w-full h-full\" [class.py-3]=\"multiple()\"></span>\n\n <span class=\"picker\">\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else {\n <i class=\"fa-solid fa-caret-down\"></i>\n }\n </span>\n </button>\n\n <div [id]=\"fieldId\" popover class=\"kl-select-options-container with-popover relative flex flex-col overflow-hidden bg-base-100 dark:bg-base-300\">\n @if (!withoutFilter()) {\n <div class=\"kl-select-filter-container border-b 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=\"w-full p-2 pr-3 pl-10 outline-none dark:placeholder:opacity-80\"\n #searchInput\n type=\"search\"\n [(ngModel)]=\"filter\"\n [placeholder]=\"translations.selectTypeSearch\"\n />\n </label>\n </div>\n }\n\n <div class=\"kl-select-options-content p-1 overflow-auto\">\n @for (item of optionList(); track $index) {\n @let optionLabelId = fieldId + '-' + item.value;\n\n <label class=\"kl-select-option-content relative py-1 px-2 pr-8 rounded-md text-neutral-900 dark:text-neutral-300 has-[input:checked]:bg-neutral-200 dark:has-[input:checked]:bg-neutral-700 hover:bg-neutral-300 dark:hover:bg-neutral-600 cursor-pointer\"\n [attr.for]=\"optionLabelId\"\n [attr.data-index]=\"$index\">\n <span class=\"w-full\">\n @let isChecked = multiple() ? (control().value || []).includes(item.value) : item.value === control().value;\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId\"\n [attr.value]=\"item.value\"\n [checked]=\"isChecked\"\n (change)=\"setValue($event)\"\n />\n <span>{{ item.label }}</span>\n </span>\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\"><i class=\"fa-regular fa-circle-question\"></i> {{hint()}}</span>\n}\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
429
429
|
}], ctorParameters: () => [], propDecorators: { selectField: [{ type: i0.ViewChild, args: ['selectField', { isSignal: true }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }, { type: i0.Output, args: ["filterChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], internalFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "internalFilter", required: false }] }], withoutFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "withoutFilter", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], selectedItem: [{ type: i0.Output, args: ["selectedItem"] }] } });
|
|
430
430
|
|
|
431
431
|
class SelectBuilder {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-select.mjs","sources":["../../projects/koala-ui/shared/components/input-field/select/accessibility/utils/change-selected-option.ts","../../projects/koala-ui/shared/components/input-field/select/accessibility/utils/update-scroll-position.ts","../../projects/koala-ui/shared/components/input-field/select/accessibility/on-keydown.ts","../../projects/koala-ui/shared/components/input-field/select/accessibility/index.ts","../../projects/koala-ui/shared/components/input-field/select/utils/ajust-options-container-size.ts","../../projects/koala-ui/shared/components/input-field/select/utils/generate-options-resource.ts","../../projects/koala-ui/shared/components/input-field/select/utils/is-loading-feedback.ts","../../projects/koala-ui/shared/components/input-field/select/utils/on-server-filter.ts","../../projects/koala-ui/shared/components/input-field/select/utils/options-loader.ts","../../projects/koala-ui/shared/components/input-field/select/select-option-badge.ts","../../projects/koala-ui/shared/components/input-field/select/select-option-badge.html","../../projects/koala-ui/shared/components/input-field/select/utils/set-selected-option-content.ts","../../projects/koala-ui/shared/components/input-field/select/select.ts","../../projects/koala-ui/shared/components/input-field/select/select.html","../../projects/koala-ui/shared/components/input-field/select/services/select-builder.ts","../../projects/koala-ui/shared/components/input-field/select/koalarx-ui-shared-components-input-field-select.ts"],"sourcesContent":["import { Select } from '../../select';\nimport { ScrollDirection } from './update-scroll-position';\n\nexport function changeSelectedOption(\n component: Select,\n direction: ScrollDirection = 'down'\n) {\n if (!component.selectElement.classList.contains('opened')) {\n return;\n }\n\n const options: NodeListOf<HTMLOptionElement | HTMLLabelElement> =\n component.selectElement.querySelectorAll(\n 'option, .kl-select-options-content .kl-select-option-content'\n );\n\n const selectedOption: HTMLOptionElement | HTMLLabelElement =\n component.selectElement.querySelector('option:checked') ??\n component.selectElement.querySelector(\n 'label.kl-select-option-content:has(input:checked)'\n )!;\n\n let newIndex = 0;\n\n if (selectedOption) {\n const currentIndex = Array.from(options).indexOf(selectedOption);\n\n if (direction === 'down') {\n newIndex =\n currentIndex + 1 < options.length ? currentIndex + 1 : currentIndex;\n } else {\n newIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : currentIndex;\n }\n }\n\n const option = options[newIndex];\n const event = new Event('change', { bubbles: true });\n\n if (option instanceof HTMLOptionElement) {\n option.selected = true;\n\n component.selectElement.dispatchEvent(event);\n } else {\n option.querySelector('input')!.checked = true;\n\n options.forEach((opt) => opt.classList.remove('active'));\n option.classList.toggle('active');\n\n option.querySelector('input')!.dispatchEvent(event);\n }\n}\n","import { Select } from '../../select';\n\nexport type ScrollDirection = 'down' | 'up';\n\nexport function updateScrollPosition(\n component: Select,\n direction: ScrollDirection = 'down'\n) {\n if (!component.selectElement.classList.contains('opened')) {\n return;\n }\n\n setTimeout(() => {\n const optionsContainer = component.selectElement.querySelector(\n '.kl-select-options-content'\n ) as HTMLDivElement;\n const focusedOptionElement =\n optionsContainer.querySelector('option:checked') ??\n component.selectElement.querySelector(\n 'label.kl-select-option-content:has(input:checked)'\n )!;\n\n if (focusedOptionElement) {\n optionsContainer.scrollTo({\n top:\n direction === 'down'\n ? optionsContainer.scrollTop +\n focusedOptionElement.getBoundingClientRect().height\n : optionsContainer.scrollTop -\n focusedOptionElement.getBoundingClientRect().height,\n });\n }\n }, 50);\n}\n","import { Select } from '../select';\nimport { changeSelectedOption } from './utils/change-selected-option';\nimport { updateScrollPosition } from './utils/update-scroll-position';\n\nexport function initOnKeyDownListener(component: Select) {\n function onKeyDown(event: KeyboardEvent) {\n switch (event.key) {\n case 'ArrowDown': {\n event.stopPropagation();\n event.preventDefault();\n\n changeSelectedOption(component, 'down');\n updateScrollPosition(component, 'down');\n break;\n }\n case 'ArrowUp': {\n event.stopPropagation();\n event.preventDefault();\n\n changeSelectedOption(component, 'up');\n updateScrollPosition(component, 'up');\n break;\n }\n }\n }\n\n addEventListener('keydown', onKeyDown);\n\n component.destroyRef.onDestroy(() => {\n removeEventListener('keydown', onKeyDown);\n });\n}\n","import { Select } from '../select';\nimport { initOnKeyDownListener } from './on-keydown';\n\nexport function assessibility(component: Select) {\n initOnKeyDownListener(component);\n}\n","import { afterRenderEffect } from '@angular/core';\nimport { Select } from '../select';\n\nexport function ajustOptionsContainerSize(component: Select) {\n afterRenderEffect(() => {\n const selectElement = component.selectElement;\n const optionsContainer = selectElement.parentElement?.querySelector(\n '.kl-select-options-container'\n ) as HTMLElement;\n\n function setMaxWidth() {\n const currentWidth = selectElement.offsetWidth;\n selectElement.style.setProperty('--select-width', `${currentWidth}px`);\n }\n\n function setMaxHeight() {\n const optionsRect = selectElement.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const sizeDiscount = 16 + optionsRect.height;\n\n let availableHeight = viewportHeight - optionsRect.top - sizeDiscount;\n\n if (availableHeight < 150) {\n availableHeight =\n viewportHeight - (viewportHeight - optionsRect.bottom) - sizeDiscount;\n selectElement.style.setProperty('--select-position-area', 'top');\n } else {\n selectElement.style.setProperty('--select-position-area', 'bottom');\n }\n\n optionsContainer.style.maxHeight = `${availableHeight}px`;\n }\n\n function getFilterInput() {\n return optionsContainer.querySelector(\n '.kl-select-filter-container input'\n ) as HTMLInputElement | null;\n }\n\n function disableFilter() {\n const filterInput = getFilterInput();\n\n if (filterInput) {\n filterInput.disabled = true;\n }\n }\n\n function enableAndFocusFilter() {\n const filterInput = getFilterInput();\n\n if (filterInput) {\n filterInput.disabled = false;\n filterInput.focus();\n }\n }\n\n function touchControl() {\n component.control().markAsTouched();\n }\n\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n component.selectElement.classList.add('opened');\n setMaxWidth();\n setMaxHeight();\n enableAndFocusFilter();\n touchControl();\n } else {\n component.selectElement.classList.remove('opened');\n disableFilter();\n }\n });\n });\n\n setMaxWidth();\n\n observer.observe(optionsContainer);\n component.destroyRef.onDestroy(() => observer.unobserve(optionsContainer));\n });\n}\n","import {\n isSignal,\n ResourceRef,\n runInInjectionContext,\n Signal,\n} from '@angular/core';\nimport { Select } from '../select';\nimport {\n OptionsResource,\n SelectDataOptionsFn,\n SelectList,\n} from '../select.type';\n\nexport function generateOptionsResource(component: Select) {\n const options = component.options();\n\n let optionsResource: OptionsResource;\n\n if (Object.hasOwn(options, 'value')) {\n optionsResource = { onServer: options as ResourceRef<SelectList> };\n } else if (isSignal(options)) {\n optionsResource = {\n inMemoryWithLoading: options as Signal<SelectList>,\n };\n } else if (typeof options === 'function') {\n const resourceFnOptions = options as SelectDataOptionsFn;\n\n optionsResource = {\n onDemand: runInInjectionContext(component.injector, () =>\n resourceFnOptions(component.requestOptionsParams)\n ),\n };\n } else {\n optionsResource = { inMemory: options as SelectList };\n }\n\n component.optionsResource.set(optionsResource);\n}\n","import { effect } from '@angular/core';\nimport { delay } from '@koalarx/utils/KlDelay';\nimport { Select } from '../select';\n\nexport function isLoadingFeedback(component: Select) {\n effect(async () => {\n const isLoading = component.isLoading();\n\n if (!isLoading) {\n while (!component.selectField()) {\n await delay(50);\n }\n\n const selectedContent = component.selectElement.querySelector(\n '.selectcontent'\n ) as HTMLElement;\n\n selectedContent.style.opacity = '0';\n\n if (!component.disabled()) {\n component.isDisabled.set(false);\n }\n\n await delay(1);\n\n selectedContent.style.opacity = '1';\n } else {\n component.isDisabled.set(true);\n }\n });\n}\n","import { effect } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { debounceTime } from 'rxjs/internal/operators/debounceTime';\nimport { Select } from '../select';\n\nexport function onServerFilter(component: Select) {\n toObservable(component.filter, { injector: component.injector })\n .pipe(debounceTime(300), takeUntilDestroyed(component.destroyRef))\n .subscribe((value) => component.filteredValue.set(value ?? null));\n\n effect(\n () => {\n if (component.optionsResource()?.onDemand) {\n component.requestOptionsParams.set({\n filter: component.filteredValue(),\n internalFilter: component.internalFilter(),\n currentValue: component.control().value,\n });\n }\n },\n { injector: component.injector }\n );\n}\n","import { effect } from '@angular/core';\nimport { Select } from '../select';\n\nexport function loadOptions(component: Select) {\n effect(() => {\n const options = component.optionsResource();\n\n if (!options) {\n return;\n }\n\n const { onDemand, onServer, inMemory, inMemoryWithLoading } = options;\n\n if (onDemand) {\n component.optionList.set(onDemand.value());\n component.isLoading.set(onDemand.isLoading());\n } else if (onServer) {\n component.optionList.set(component.applyFilter(onServer.value()));\n component.isLoading.set(onServer.isLoading());\n } else if (inMemory) {\n component.optionList.set(component.applyFilter(inMemory));\n component.isLoading.set(false);\n } else if (inMemoryWithLoading) {\n const optionsWithLoading = inMemoryWithLoading();\n component.optionList.set(component.applyFilter(optionsWithLoading ?? []));\n component.isLoading.set(!optionsWithLoading);\n }\n });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'kl-select-option-badge',\n templateUrl: './select-option-badge.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectOptionBadge {\n removeCallback: (event: MouseEvent) => void = () => {\n throw new Error('Remove callback not set');\n };\n}\n","<span class=\"flex items-center badge badge-outline badge-primary badge-sm rounded-sm bg-primary/20 dark:text-neutral-300 dark:border-primary\">\n <ng-content />\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer\"\n (click)=\"removeCallback($event)\">\n </i>\n</span>\n","import { createComponent } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { isEmpty } from '@koalarx/ui/shared/utils';\nimport { delay } from '@koalarx/utils/KlDelay';\nimport { debounceTime } from 'rxjs/internal/operators/debounceTime';\nimport { Select } from '../select';\nimport { SelectOptionBadge } from '../select-option-badge';\n\nfunction hasValue(value: any) {\n return Array.isArray(value) ? value.length > 0 : !isEmpty(value);\n}\n\nfunction createBadgeElement(component: Select, content: Node, value: any) {\n const badgeComponent = createComponent(SelectOptionBadge, {\n environmentInjector: component.appRef.injector,\n projectableNodes: [[content]],\n });\n\n badgeComponent.instance.removeCallback = (event: MouseEvent) =>\n component.removeOption(event);\n\n const element: HTMLElement = badgeComponent.location.nativeElement;\n const spanElement = element.firstElementChild as HTMLSpanElement;\n\n spanElement.dataset['value'] = value;\n\n return element;\n}\n\nasync function appendSelectedOptionContent(component: Select, value: any) {\n while (component.isLoading()) {\n await delay(50);\n }\n\n const selectedContent = component.selectElement.querySelector(\n '.selectcontent'\n ) as HTMLElement;\n\n if (!Array.isArray(value)) {\n value = isEmpty(value) ? [] : [value];\n }\n\n if (!component.multiple()) {\n selectedContent.innerHTML = '';\n }\n\n selectedContent\n .querySelectorAll<HTMLSpanElement>('span[data-value]')\n .forEach((node) => {\n if (!value.map(String).includes(node.dataset['value'])) {\n node.parentElement!.remove();\n }\n });\n\n for (const v of value) {\n const optionData = component\n .selectedOptions()\n .find((item) => String(item.value) === String(v));\n\n if (!optionData) {\n continue;\n }\n\n const optionContent = document.createElement('span');\n optionContent.dataset['value'] = String(v);\n optionContent.innerHTML = optionData?.label ?? v;\n\n if (selectedContent.querySelector(`[data-value=\"${v}\"]`)) {\n continue;\n }\n\n const optionBadge = component.multiple()\n ? createBadgeElement(component, optionContent, v)\n : optionContent;\n\n selectedContent.appendChild(optionBadge);\n }\n\n component.hasValue.set(hasValue(value));\n\n component.selectElement\n .querySelectorAll<HTMLInputElement>('input[type=checkbox]')\n .forEach((input) => {\n input.checked = value.map(String).includes(input.value);\n });\n}\n\nfunction setSelectedOptionsOnComponent(component: Select, value: any) {\n component.selectedOptions.set(\n component\n .optionList()\n .filter((item) =>\n Array.isArray(value)\n ? value.map(String).includes(String(item.value))\n : String(item.value) === String(value)\n )\n );\n}\n\nexport async function setSelectedOptionContent(component: Select) {\n const value = component.control().value;\n\n component.hasValue.set(hasValue(value));\n\n while (component.isLoading()) {\n await delay(50);\n }\n\n setSelectedOptionsOnComponent(component, value);\n\n await appendSelectedOptionContent(component, value);\n\n component\n .control()\n .valueChanges.pipe(\n debounceTime(50),\n takeUntilDestroyed(component.destroyRef)\n )\n .subscribe((value) => {\n setSelectedOptionsOnComponent(component, value);\n appendSelectedOptionContent(component, value);\n });\n}\n","import {\n ApplicationRef,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n OnInit,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Loader } from '@koalarx/ui/core/components/loader';\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 { assessibility } from './accessibility';\nimport {\n OptionsResource,\n SelectDataOptions,\n SelectDataOptionsFnParams,\n SelectList,\n SelectValue,\n} from './select.type';\nimport { ajustOptionsContainerSize } from './utils/ajust-options-container-size';\nimport { generateOptionsResource } from './utils/generate-options-resource';\nimport { isLoadingFeedback } from './utils/is-loading-feedback';\nimport { onServerFilter } from './utils/on-server-filter';\nimport { loadOptions } from './utils/options-loader';\nimport { setSelectedOptionContent } from './utils/set-selected-option-content';\n\n@Component({\n selector: 'kl-select',\n templateUrl: './select.html',\n imports: [FormsModule, ReactiveFormsModule, FieldErrors, Loader],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Select extends InputFieldBase implements OnInit {\n readonly appRef = inject(ApplicationRef);\n readonly destroyRef = inject(DestroyRef);\n readonly injector = inject(Injector);\n readonly selectField = viewChild<ElementRef<HTMLDivElement>>('selectField');\n\n readonly optionsResource = signal<OptionsResource | null>(null);\n readonly optionList = signal<SelectList>([]);\n readonly selectedOptions = signal<SelectList>([]);\n readonly isLoading = signal<boolean>(true);\n readonly requestOptionsParams = signal<SelectDataOptionsFnParams>({\n filter: null,\n currentValue: null,\n internalFilter: null,\n });\n readonly translations = inject(AppConfig).translation.form;\n readonly supportsExperimentalSelect = !CSS.supports(\n 'appearance',\n 'base-select'\n );\n readonly hasValue = signal<boolean>(false);\n\n filter = model<string>();\n filteredValue = signal<string | null>(null);\n\n options = input.required<SelectDataOptions>();\n internalFilter = input<string | null>(null);\n withoutFilter = input(false, { transform: booleanAttribute });\n multiple = input(false, { transform: booleanAttribute });\n selectedItem = output<any | null>();\n\n get selectElement() {\n const selectField = this.selectField();\n\n if (!selectField) {\n throw new Error('Select element not found');\n }\n\n return selectField.nativeElement;\n }\n\n constructor() {\n super();\n\n loadOptions(this);\n ajustOptionsContainerSize(this);\n isLoadingFeedback(this);\n assessibility(this);\n }\n\n ngOnInit() {\n onServerFilter(this);\n generateOptionsResource(this);\n setSelectedOptionContent(this);\n }\n\n applyFilter(options: SelectList) {\n const filter = this.filter() ?? '';\n\n return options.filter((option) =>\n option.label.toLowerCase().includes(filter.toLowerCase())\n );\n }\n\n setValue(event: Event) {\n const select = event.target as HTMLInputElement;\n const value: SelectValue = select.value;\n\n if (this.multiple()) {\n const selectedOptionsElements = this.selectElement.querySelectorAll(\n '.kl-select-options-content input[type=\"checkbox\"]:checked'\n ) as NodeListOf<HTMLInputElement>;\n\n const values: string[] = [];\n\n selectedOptionsElements.forEach((option) => values.push(option.value));\n\n if (select.checked) {\n this.selectedOptions.update((current) => [\n ...current,\n this.optionList().find((item) => String(item.value) === value)!,\n ]);\n } else {\n this.selectedOptions.update((current) =>\n current.filter((item) => String(item.value) !== value)\n );\n }\n\n const selectedValues = this.selectedOptions().map((item) => item.value);\n\n this.control().setValue(selectedValues, { emitEvent: true });\n\n return;\n }\n\n const selectedOption = this.optionList().find(\n (item) => String(item.value) === value\n );\n\n if (selectedOption) {\n this.selectedOptions.set([selectedOption]);\n this.control().setValue(selectedOption.value, { emitEvent: true });\n }\n\n this.selectedItem.emit(selectedOption?.data ?? null);\n }\n\n clear(event: MouseEvent) {\n event.preventDefault();\n this.selectedOptions.set([]);\n this.control().setValue(null);\n }\n\n removeOption(event: MouseEvent) {\n event.preventDefault();\n\n const target = event.target as HTMLSpanElement;\n const value = target.parentElement?.dataset['value'];\n\n const inputValue = this.selectElement.querySelector(\n `.kl-select-options-content input[value=\"${value}\"]`\n ) as HTMLInputElement;\n\n inputValue.click();\n }\n}\n","<div class=\"kl-select-container relative w-full has-[select:disabled]:cursor-not-allowed\"\n [class.has-value]=\"hasValue()\">\n\n @if (label(); as label) {\n <label class=\"kl-select-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\"\n [attr.for]=\"fieldId\">\n @if (isDisabled()) {\n <span class=\"text-neutral-200 dark:text-neutral-600\">\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n } @else {\n <span>{{ label }} {{ isRequired() ? '*' : '' }}</span>\n }\n </label>\n }\n\n @if (!isDisabled() && hasValue()) {\n <div class=\"flex items-center justify-center h-full absolute top-0 right-7 z-10 pr-2\">\n <button class=\"kl-select-clear-button text-neutral-400 hover:cursor-pointer text-sm focus:shadow-none!\"\n type=\"button\"\n (click)=\"clear($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"kl-select-content\" #selectField>\n <button type=\"button\" class=\"kl-select-button flex disabled:border-neutral-200! disabled:dark:border-neutral-800!\"\n [attr.popovertarget]=\"fieldId\"\n popovertargetaction=\"toggle\">\n\n <span class=\"selectcontent flex flex-wrap gap-1 items-center w-full h-full\" [class.py-3]=\"multiple()\"></span>\n\n <span class=\"picker\">\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else {\n <i class=\"fa-solid fa-caret-down\"></i>\n }\n </span>\n </button>\n\n <div [id]=\"fieldId\" popover class=\"kl-select-options-container with-popover relative flex flex-col overflow-hidden bg-base-100 dark:bg-base-300\">\n @if (!withoutFilter()) {\n <div class=\"kl-select-filter-container border-b 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=\"w-full p-2 pr-3 pl-10 outline-none dark:placeholder:opacity-80\"\n #searchInput\n type=\"search\"\n [(ngModel)]=\"filter\"\n [placeholder]=\"translations.selectTypeSearch\"\n />\n </label>\n </div>\n }\n\n <div class=\"kl-select-options-content p-1 overflow-auto\">\n @for (item of optionList(); track $index) {\n @let optionLabelId = fieldId + '-' + item.value;\n\n <label class=\"kl-select-option-content relative py-1 px-2 pr-8 rounded-md text-neutral-900 dark:text-neutral-300 has-[input:checked]:bg-neutral-200 dark:has-[input:checked]:bg-neutral-700 hover:bg-neutral-300 dark:hover:bg-neutral-600 cursor-pointer\"\n [attr.for]=\"optionLabelId\"\n [attr.data-index]=\"$index\">\n <span class=\"w-full\">\n @let isChecked = multiple() ? (control().value || []).includes(item.value) : item.value === control().value;\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId\"\n [attr.value]=\"item.value\"\n [checked]=\"isChecked\"\n (change)=\"setValue($event)\"\n />\n <span>{{ item.label }}</span>\n </span>\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\">\n <i class=\"fa-regular fa-circle-question\"></i> {{hint()}}\n </span>\n}\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","import { Injectable, ResourceRef, Signal } from '@angular/core';\nimport { SelectDataOptionsFn, SelectList } from '../select.type';\n\n@Injectable({ providedIn: 'root' })\nexport class SelectBuilder {\n onDemand(config: SelectDataOptionsFn) {\n return config;\n }\n\n onServer(config: ResourceRef<SelectList>) {\n return config;\n }\n\n inMemory(config: SelectList) {\n return config;\n }\n\n inMemoryWithLoading(config: Signal<SelectList>) {\n return config;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;SAGgB,oBAAoB,CAClC,SAAiB,EACjB,YAA6B,MAAM,EAAA;AAEnC,IAAA,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACzD;;IAGF,MAAM,OAAO,GACX,SAAS,CAAC,aAAa,CAAC,gBAAgB,CACtC,8DAA8D,CAC/D;IAEH,MAAM,cAAc,GAClB,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC;AACvD,QAAA,SAAS,CAAC,aAAa,CAAC,aAAa,CACnC,mDAAmD,CACnD;IAEJ,IAAI,QAAQ,GAAG,CAAC;IAEhB,IAAI,cAAc,EAAE;AAClB,QAAA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;AAEhE,QAAA,IAAI,SAAS,KAAK,MAAM,EAAE;YACxB,QAAQ;AACN,gBAAA,YAAY,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,YAAY,GAAG,CAAC,GAAG,YAAY;;aAChE;AACL,YAAA,QAAQ,GAAG,YAAY,GAAG,CAAC,I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,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ME1C/D,aAAa,CAAA;AACxB,IAAA,QAAQ,CAAC,MAA2B,EAAA;AAClC,QAAA,OAAO,MAAM;;AAGf,IAAA,QAAQ,CAAC,MAA+B,EAAA;AACtC,QAAA,OAAO,MAAM;;AAGf,IAAA,QAAQ,CAAC,MAAkB,EAAA;AACzB,QAAA,OAAO,MAAM;;AAGf,IAAA,mBAAmB,CAAC,MAA0B,EAAA;AAC5C,QAAA,OAAO,MAAM;;uGAdJ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACHlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-select.mjs","sources":["../../projects/koala-ui/shared/components/input-field/select/accessibility/utils/change-selected-option.ts","../../projects/koala-ui/shared/components/input-field/select/accessibility/utils/update-scroll-position.ts","../../projects/koala-ui/shared/components/input-field/select/accessibility/on-keydown.ts","../../projects/koala-ui/shared/components/input-field/select/accessibility/index.ts","../../projects/koala-ui/shared/components/input-field/select/utils/ajust-options-container-size.ts","../../projects/koala-ui/shared/components/input-field/select/utils/generate-options-resource.ts","../../projects/koala-ui/shared/components/input-field/select/utils/is-loading-feedback.ts","../../projects/koala-ui/shared/components/input-field/select/utils/on-server-filter.ts","../../projects/koala-ui/shared/components/input-field/select/utils/options-loader.ts","../../projects/koala-ui/shared/components/input-field/select/select-option-badge.ts","../../projects/koala-ui/shared/components/input-field/select/select-option-badge.html","../../projects/koala-ui/shared/components/input-field/select/utils/set-selected-option-content.ts","../../projects/koala-ui/shared/components/input-field/select/select.ts","../../projects/koala-ui/shared/components/input-field/select/select.html","../../projects/koala-ui/shared/components/input-field/select/services/select-builder.ts","../../projects/koala-ui/shared/components/input-field/select/koalarx-ui-shared-components-input-field-select.ts"],"sourcesContent":["import { Select } from '../../select';\nimport { ScrollDirection } from './update-scroll-position';\n\nexport function changeSelectedOption(\n component: Select,\n direction: ScrollDirection = 'down'\n) {\n if (!component.selectElement.classList.contains('opened')) {\n return;\n }\n\n const options: NodeListOf<HTMLOptionElement | HTMLLabelElement> =\n component.selectElement.querySelectorAll(\n 'option, .kl-select-options-content .kl-select-option-content'\n );\n\n const selectedOption: HTMLOptionElement | HTMLLabelElement =\n component.selectElement.querySelector('option:checked') ??\n component.selectElement.querySelector(\n 'label.kl-select-option-content:has(input:checked)'\n )!;\n\n let newIndex = 0;\n\n if (selectedOption) {\n const currentIndex = Array.from(options).indexOf(selectedOption);\n\n if (direction === 'down') {\n newIndex =\n currentIndex + 1 < options.length ? currentIndex + 1 : currentIndex;\n } else {\n newIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : currentIndex;\n }\n }\n\n const option = options[newIndex];\n const event = new Event('change', { bubbles: true });\n\n if (option instanceof HTMLOptionElement) {\n option.selected = true;\n\n component.selectElement.dispatchEvent(event);\n } else {\n option.querySelector('input')!.checked = true;\n\n options.forEach((opt) => opt.classList.remove('active'));\n option.classList.toggle('active');\n\n option.querySelector('input')!.dispatchEvent(event);\n }\n}\n","import { Select } from '../../select';\n\nexport type ScrollDirection = 'down' | 'up';\n\nexport function updateScrollPosition(\n component: Select,\n direction: ScrollDirection = 'down'\n) {\n if (!component.selectElement.classList.contains('opened')) {\n return;\n }\n\n setTimeout(() => {\n const optionsContainer = component.selectElement.querySelector(\n '.kl-select-options-content'\n ) as HTMLDivElement;\n const focusedOptionElement =\n optionsContainer.querySelector('option:checked') ??\n component.selectElement.querySelector(\n 'label.kl-select-option-content:has(input:checked)'\n )!;\n\n if (focusedOptionElement) {\n optionsContainer.scrollTo({\n top:\n direction === 'down'\n ? optionsContainer.scrollTop +\n focusedOptionElement.getBoundingClientRect().height\n : optionsContainer.scrollTop -\n focusedOptionElement.getBoundingClientRect().height,\n });\n }\n }, 50);\n}\n","import { Select } from '../select';\nimport { changeSelectedOption } from './utils/change-selected-option';\nimport { updateScrollPosition } from './utils/update-scroll-position';\n\nexport function initOnKeyDownListener(component: Select) {\n function onKeyDown(event: KeyboardEvent) {\n switch (event.key) {\n case 'ArrowDown': {\n event.stopPropagation();\n event.preventDefault();\n\n changeSelectedOption(component, 'down');\n updateScrollPosition(component, 'down');\n break;\n }\n case 'ArrowUp': {\n event.stopPropagation();\n event.preventDefault();\n\n changeSelectedOption(component, 'up');\n updateScrollPosition(component, 'up');\n break;\n }\n }\n }\n\n addEventListener('keydown', onKeyDown);\n\n component.destroyRef.onDestroy(() => {\n removeEventListener('keydown', onKeyDown);\n });\n}\n","import { Select } from '../select';\nimport { initOnKeyDownListener } from './on-keydown';\n\nexport function assessibility(component: Select) {\n initOnKeyDownListener(component);\n}\n","import { afterRenderEffect } from '@angular/core';\nimport { Select } from '../select';\n\nexport function ajustOptionsContainerSize(component: Select) {\n afterRenderEffect(() => {\n const selectElement = component.selectElement;\n const optionsContainer = selectElement.parentElement?.querySelector(\n '.kl-select-options-container'\n ) as HTMLElement;\n\n function setMaxWidth() {\n const currentWidth = selectElement.offsetWidth;\n selectElement.style.setProperty('--select-width', `${currentWidth}px`);\n }\n\n function setMaxHeight() {\n const optionsRect = selectElement.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const sizeDiscount = 16 + optionsRect.height;\n\n let availableHeight = viewportHeight - optionsRect.top - sizeDiscount;\n\n if (availableHeight < 150) {\n availableHeight =\n viewportHeight - (viewportHeight - optionsRect.bottom) - sizeDiscount;\n selectElement.style.setProperty('--select-position-area', 'top');\n } else {\n selectElement.style.setProperty('--select-position-area', 'bottom');\n }\n\n optionsContainer.style.maxHeight = `${availableHeight}px`;\n }\n\n function getFilterInput() {\n return optionsContainer.querySelector(\n '.kl-select-filter-container input'\n ) as HTMLInputElement | null;\n }\n\n function disableFilter() {\n const filterInput = getFilterInput();\n\n if (filterInput) {\n filterInput.disabled = true;\n }\n }\n\n function enableAndFocusFilter() {\n const filterInput = getFilterInput();\n\n if (filterInput) {\n filterInput.disabled = false;\n filterInput.focus();\n }\n }\n\n function touchControl() {\n component.control().markAsTouched();\n }\n\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n component.selectElement.classList.add('opened');\n setMaxWidth();\n setMaxHeight();\n enableAndFocusFilter();\n touchControl();\n } else {\n component.selectElement.classList.remove('opened');\n disableFilter();\n }\n });\n });\n\n setMaxWidth();\n\n observer.observe(optionsContainer);\n component.destroyRef.onDestroy(() => observer.unobserve(optionsContainer));\n });\n}\n","import {\n isSignal,\n ResourceRef,\n runInInjectionContext,\n Signal,\n} from '@angular/core';\nimport { Select } from '../select';\nimport {\n OptionsResource,\n SelectDataOptionsFn,\n SelectList,\n} from '../select.type';\n\nexport function generateOptionsResource(component: Select) {\n const options = component.options();\n\n let optionsResource: OptionsResource;\n\n if (Object.hasOwn(options, 'value')) {\n optionsResource = { onServer: options as ResourceRef<SelectList> };\n } else if (isSignal(options)) {\n optionsResource = {\n inMemoryWithLoading: options as Signal<SelectList>,\n };\n } else if (typeof options === 'function') {\n const resourceFnOptions = options as SelectDataOptionsFn;\n\n optionsResource = {\n onDemand: runInInjectionContext(component.injector, () =>\n resourceFnOptions(component.requestOptionsParams)\n ),\n };\n } else {\n optionsResource = { inMemory: options as SelectList };\n }\n\n component.optionsResource.set(optionsResource);\n}\n","import { effect } from '@angular/core';\nimport { delay } from '@koalarx/utils/KlDelay';\nimport { Select } from '../select';\n\nexport function isLoadingFeedback(component: Select) {\n effect(async () => {\n const isLoading = component.isLoading();\n\n if (!isLoading) {\n while (!component.selectField()) {\n await delay(50);\n }\n\n const selectedContent = component.selectElement.querySelector(\n '.selectcontent'\n ) as HTMLElement;\n\n selectedContent.style.opacity = '0';\n\n if (!component.disabled()) {\n component.isDisabled.set(false);\n }\n\n await delay(1);\n\n selectedContent.style.opacity = '1';\n } else {\n component.isDisabled.set(true);\n }\n });\n}\n","import { effect } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { debounceTime } from 'rxjs/internal/operators/debounceTime';\nimport { Select } from '../select';\n\nexport function onServerFilter(component: Select) {\n toObservable(component.filter, { injector: component.injector })\n .pipe(debounceTime(300), takeUntilDestroyed(component.destroyRef))\n .subscribe((value) => component.filteredValue.set(value ?? null));\n\n effect(\n () => {\n if (component.optionsResource()?.onDemand) {\n component.requestOptionsParams.set({\n filter: component.filteredValue(),\n internalFilter: component.internalFilter(),\n currentValue: component.control().value,\n });\n }\n },\n { injector: component.injector }\n );\n}\n","import { effect } from '@angular/core';\nimport { Select } from '../select';\n\nexport function loadOptions(component: Select) {\n effect(() => {\n const options = component.optionsResource();\n\n if (!options) {\n return;\n }\n\n const { onDemand, onServer, inMemory, inMemoryWithLoading } = options;\n\n if (onDemand) {\n component.optionList.set(onDemand.value());\n component.isLoading.set(onDemand.isLoading());\n } else if (onServer) {\n component.optionList.set(component.applyFilter(onServer.value()));\n component.isLoading.set(onServer.isLoading());\n } else if (inMemory) {\n component.optionList.set(component.applyFilter(inMemory));\n component.isLoading.set(false);\n } else if (inMemoryWithLoading) {\n const optionsWithLoading = inMemoryWithLoading();\n component.optionList.set(component.applyFilter(optionsWithLoading ?? []));\n component.isLoading.set(!optionsWithLoading);\n }\n });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'kl-select-option-badge',\n templateUrl: './select-option-badge.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectOptionBadge {\n removeCallback: (event: MouseEvent) => void = () => {\n throw new Error('Remove callback not set');\n };\n}\n","<span class=\"flex items-center badge badge-outline badge-primary badge-sm rounded-sm bg-primary/20 dark:text-neutral-300 dark:border-primary\">\n <ng-content />\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer\"\n (click)=\"removeCallback($event)\">\n </i>\n</span>\n","import { createComponent } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { isEmpty } from '@koalarx/ui/shared/utils';\nimport { delay } from '@koalarx/utils/KlDelay';\nimport { debounceTime } from 'rxjs/internal/operators/debounceTime';\nimport { Select } from '../select';\nimport { SelectOptionBadge } from '../select-option-badge';\n\nfunction hasValue(value: any) {\n return Array.isArray(value) ? value.length > 0 : !isEmpty(value);\n}\n\nfunction createBadgeElement(component: Select, content: Node, value: any) {\n const badgeComponent = createComponent(SelectOptionBadge, {\n environmentInjector: component.appRef.injector,\n projectableNodes: [[content]],\n });\n\n badgeComponent.instance.removeCallback = (event: MouseEvent) =>\n component.removeOption(event);\n\n const element: HTMLElement = badgeComponent.location.nativeElement;\n const spanElement = element.firstElementChild as HTMLSpanElement;\n\n spanElement.dataset['value'] = value;\n\n return element;\n}\n\nasync function appendSelectedOptionContent(component: Select, value: any) {\n while (component.isLoading()) {\n await delay(50);\n }\n\n const selectedContent = component.selectElement.querySelector(\n '.selectcontent'\n ) as HTMLElement;\n\n if (!Array.isArray(value)) {\n value = isEmpty(value) ? [] : [value];\n }\n\n if (!component.multiple()) {\n selectedContent.innerHTML = '';\n }\n\n selectedContent\n .querySelectorAll<HTMLSpanElement>('span[data-value]')\n .forEach((node) => {\n if (!value.map(String).includes(node.dataset['value'])) {\n node.parentElement!.remove();\n }\n });\n\n for (const v of value) {\n const optionData = component\n .selectedOptions()\n .find((item) => String(item.value) === String(v));\n\n if (!optionData) {\n continue;\n }\n\n const optionContent = document.createElement('span');\n optionContent.dataset['value'] = String(v);\n optionContent.innerHTML = optionData?.label ?? v;\n\n if (selectedContent.querySelector(`[data-value=\"${v}\"]`)) {\n continue;\n }\n\n const optionBadge = component.multiple()\n ? createBadgeElement(component, optionContent, v)\n : optionContent;\n\n selectedContent.appendChild(optionBadge);\n }\n\n component.hasValue.set(hasValue(value));\n\n component.selectElement\n .querySelectorAll<HTMLInputElement>('input[type=checkbox]')\n .forEach((input) => {\n input.checked = value.map(String).includes(input.value);\n });\n}\n\nfunction setSelectedOptionsOnComponent(component: Select, value: any) {\n component.selectedOptions.set(\n component\n .optionList()\n .filter((item) =>\n Array.isArray(value)\n ? value.map(String).includes(String(item.value))\n : String(item.value) === String(value)\n )\n );\n}\n\nexport async function setSelectedOptionContent(component: Select) {\n const value = component.control().value;\n\n component.hasValue.set(hasValue(value));\n\n while (component.isLoading()) {\n await delay(50);\n }\n\n setSelectedOptionsOnComponent(component, value);\n\n await appendSelectedOptionContent(component, value);\n\n component\n .control()\n .valueChanges.pipe(\n debounceTime(50),\n takeUntilDestroyed(component.destroyRef)\n )\n .subscribe((value) => {\n setSelectedOptionsOnComponent(component, value);\n appendSelectedOptionContent(component, value);\n });\n}\n","import {\n ApplicationRef,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n OnInit,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Loader } from '@koalarx/ui/core/components/loader';\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 { assessibility } from './accessibility';\nimport {\n OptionsResource,\n SelectDataOptions,\n SelectDataOptionsFnParams,\n SelectList,\n SelectValue,\n} from './select.type';\nimport { ajustOptionsContainerSize } from './utils/ajust-options-container-size';\nimport { generateOptionsResource } from './utils/generate-options-resource';\nimport { isLoadingFeedback } from './utils/is-loading-feedback';\nimport { onServerFilter } from './utils/on-server-filter';\nimport { loadOptions } from './utils/options-loader';\nimport { setSelectedOptionContent } from './utils/set-selected-option-content';\n\n@Component({\n selector: 'kl-select',\n templateUrl: './select.html',\n imports: [FormsModule, ReactiveFormsModule, FieldErrors, Loader],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Select extends InputFieldBase implements OnInit {\n readonly appRef = inject(ApplicationRef);\n readonly destroyRef = inject(DestroyRef);\n readonly injector = inject(Injector);\n readonly selectField = viewChild<ElementRef<HTMLDivElement>>('selectField');\n\n readonly optionsResource = signal<OptionsResource | null>(null);\n readonly optionList = signal<SelectList>([]);\n readonly selectedOptions = signal<SelectList>([]);\n readonly isLoading = signal<boolean>(true);\n readonly requestOptionsParams = signal<SelectDataOptionsFnParams>({\n filter: null,\n currentValue: null,\n internalFilter: null,\n });\n readonly translations = inject(AppConfig).translation.form;\n readonly supportsExperimentalSelect = !CSS.supports(\n 'appearance',\n 'base-select'\n );\n readonly hasValue = signal<boolean>(false);\n\n filter = model<string>();\n filteredValue = signal<string | null>(null);\n\n options = input.required<SelectDataOptions>();\n internalFilter = input<string | null>(null);\n withoutFilter = input(false, { transform: booleanAttribute });\n multiple = input(false, { transform: booleanAttribute });\n selectedItem = output<any | null>();\n\n get selectElement() {\n const selectField = this.selectField();\n\n if (!selectField) {\n throw new Error('Select element not found');\n }\n\n return selectField.nativeElement;\n }\n\n constructor() {\n super();\n\n loadOptions(this);\n ajustOptionsContainerSize(this);\n isLoadingFeedback(this);\n assessibility(this);\n }\n\n ngOnInit() {\n onServerFilter(this);\n generateOptionsResource(this);\n setSelectedOptionContent(this);\n }\n\n applyFilter(options: SelectList) {\n const filter = this.filter() ?? '';\n\n return options.filter((option) =>\n option.label.toLowerCase().includes(filter.toLowerCase())\n );\n }\n\n setValue(event: Event) {\n const select = event.target as HTMLInputElement;\n const value: SelectValue = select.value;\n\n if (this.multiple()) {\n const selectedOptionsElements = this.selectElement.querySelectorAll(\n '.kl-select-options-content input[type=\"checkbox\"]:checked'\n ) as NodeListOf<HTMLInputElement>;\n\n const values: string[] = [];\n\n selectedOptionsElements.forEach((option) => values.push(option.value));\n\n if (select.checked) {\n this.selectedOptions.update((current) => [\n ...current,\n this.optionList().find((item) => String(item.value) === value)!,\n ]);\n } else {\n this.selectedOptions.update((current) =>\n current.filter((item) => String(item.value) !== value)\n );\n }\n\n const selectedValues = this.selectedOptions().map((item) => item.value);\n\n this.control().setValue(selectedValues, { emitEvent: true });\n\n return;\n }\n\n const selectedOption = this.optionList().find(\n (item) => String(item.value) === value\n );\n\n if (selectedOption) {\n this.selectedOptions.set([selectedOption]);\n this.control().setValue(selectedOption.value, { emitEvent: true });\n }\n\n this.selectedItem.emit(selectedOption?.data ?? null);\n }\n\n clear(event: MouseEvent) {\n event.preventDefault();\n this.selectedOptions.set([]);\n this.control().setValue(null);\n }\n\n removeOption(event: MouseEvent) {\n event.preventDefault();\n\n const target = event.target as HTMLSpanElement;\n const value = target.parentElement?.dataset['value'];\n\n const inputValue = this.selectElement.querySelector(\n `.kl-select-options-content input[value=\"${value}\"]`\n ) as HTMLInputElement;\n\n inputValue.click();\n }\n}\n","<div class=\"kl-select-container relative w-full has-[select:disabled]:cursor-not-allowed\"\n [class.has-value]=\"hasValue()\">\n\n @if (label(); as label) {\n <label class=\"kl-select-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\"\n [attr.for]=\"fieldId\">\n @if (isDisabled()) {\n <span class=\"text-neutral-200 dark:text-neutral-600\">\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n } @else {\n <span>{{ label }} {{ isRequired() ? '*' : '' }}</span>\n }\n </label>\n }\n\n @if (!isDisabled() && hasValue()) {\n <div class=\"flex items-center justify-center h-full absolute top-0 right-7 z-10 pr-2\">\n <button class=\"kl-select-clear-button text-neutral-400 hover:cursor-pointer text-sm focus:shadow-none!\"\n type=\"button\"\n (click)=\"clear($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"kl-select-content\" #selectField>\n <button type=\"button\" class=\"kl-select-button flex disabled:border-neutral-200! disabled:dark:border-neutral-800!\"\n [attr.popovertarget]=\"fieldId\"\n popovertargetaction=\"toggle\">\n\n <span class=\"selectcontent flex flex-wrap gap-1 items-center w-full h-full\" [class.py-3]=\"multiple()\"></span>\n\n <span class=\"picker\">\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else {\n <i class=\"fa-solid fa-caret-down\"></i>\n }\n </span>\n </button>\n\n <div [id]=\"fieldId\" popover class=\"kl-select-options-container with-popover relative flex flex-col overflow-hidden bg-base-100 dark:bg-base-300\">\n @if (!withoutFilter()) {\n <div class=\"kl-select-filter-container border-b 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=\"w-full p-2 pr-3 pl-10 outline-none dark:placeholder:opacity-80\"\n #searchInput\n type=\"search\"\n [(ngModel)]=\"filter\"\n [placeholder]=\"translations.selectTypeSearch\"\n />\n </label>\n </div>\n }\n\n <div class=\"kl-select-options-content p-1 overflow-auto\">\n @for (item of optionList(); track $index) {\n @let optionLabelId = fieldId + '-' + item.value;\n\n <label class=\"kl-select-option-content relative py-1 px-2 pr-8 rounded-md text-neutral-900 dark:text-neutral-300 has-[input:checked]:bg-neutral-200 dark:has-[input:checked]:bg-neutral-700 hover:bg-neutral-300 dark:hover:bg-neutral-600 cursor-pointer\"\n [attr.for]=\"optionLabelId\"\n [attr.data-index]=\"$index\">\n <span class=\"w-full\">\n @let isChecked = multiple() ? (control().value || []).includes(item.value) : item.value === control().value;\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId\"\n [attr.value]=\"item.value\"\n [checked]=\"isChecked\"\n (change)=\"setValue($event)\"\n />\n <span>{{ item.label }}</span>\n </span>\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n\n@if (hint()) {\n <span class=\"hint-content\"><i class=\"fa-regular fa-circle-question\"></i> {{hint()}}</span>\n}\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","import { Injectable, ResourceRef, Signal } from '@angular/core';\nimport { SelectDataOptionsFn, SelectList } from '../select.type';\n\n@Injectable({ providedIn: 'root' })\nexport class SelectBuilder {\n onDemand(config: SelectDataOptionsFn) {\n return config;\n }\n\n onServer(config: ResourceRef<SelectList>) {\n return config;\n }\n\n inMemory(config: SelectList) {\n return config;\n }\n\n inMemoryWithLoading(config: Signal<SelectList>) {\n return config;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;SAGgB,oBAAoB,CAClC,SAAiB,EACjB,YAA6B,MAAM,EAAA;AAEnC,IAAA,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACzD;;IAGF,MAAM,OAAO,GACX,SAAS,CAAC,aAAa,CAAC,gBAAgB,CACtC,8DAA8D,CAC/D;IAEH,MAAM,cAAc,GAClB,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC;AACvD,QAAA,SAAS,CAAC,aAAa,CAAC,aAAa,CACnC,mDAAmD,CACnD;IAEJ,IAAI,QAAQ,GAAG,CAAC;IAEhB,IAAI,cAAc,EAAE;AAClB,QAAA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;AAEhE,QAAA,IAAI,SAAS,KAAK,MAAM,EAAE;YAC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
69
69
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Switcher, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Switcher, isStandalone: true, selector: "kl-switcher", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "switcherElement", first: true, predicate: ["inputSwitcher"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputSwitcher\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"toggle\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
70
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Switcher, isStandalone: true, selector: "kl-switcher", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "switcherElement", first: true, predicate: ["inputSwitcher"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputSwitcher\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"toggle\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"><i class=\"fa-regular fa-circle-question\"></i> {{hint()}}</span>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
71
|
}
|
|
72
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Switcher, decorators: [{
|
|
73
73
|
type: Component,
|
|
74
|
-
args: [{ selector: 'kl-switcher', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputSwitcher\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"toggle\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
74
|
+
args: [{ selector: 'kl-switcher', imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputSwitcher\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"toggle\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"><i class=\"fa-regular fa-circle-question\"></i> {{hint()}}</span>\n}\n" }]
|
|
75
75
|
}], ctorParameters: () => [], propDecorators: { switcherElement: [{ type: i0.ViewChild, args: ['inputSwitcher', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-switcher.mjs","sources":["../../projects/koala-ui/shared/components/input-field/switcher/switcher.ts","../../projects/koala-ui/shared/components/input-field/switcher/switcher.html","../../projects/koala-ui/shared/components/input-field/switcher/koalarx-ui-shared-components-input-field-switcher.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\nexport type SwitcherColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type SwitcherSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-switcher',\n templateUrl: './switcher.html',\n imports: [ReactiveFormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Switcher extends InputFieldBase {\n private readonly switcherElement =\n viewChild<ElementRef<HTMLInputElement>>('inputSwitcher');\n\n color = input<SwitcherColor>();\n size = input<SwitcherSize>();\n\n private getColorClass(): string {\n switch (this.color()) {\n case 'neutral':\n return 'toggle-neutral';\n case 'primary':\n return 'toggle-primary';\n case 'secondary':\n return 'toggle-secondary';\n case 'accent':\n return 'toggle-accent';\n case 'info':\n return 'toggle-info';\n case 'success':\n return 'toggle-success';\n case 'warning':\n return 'toggle-warning';\n case 'error':\n return 'toggle-error';\n case 'ghost':\n return 'toggle-ghost';\n default:\n return 'toggle';\n }\n }\n\n private getSizeClass(): string {\n switch (this.size()) {\n case 'extraSmall':\n return 'toggle-xs';\n case 'small':\n return 'toggle-sm';\n case 'medium':\n return 'toggle-md';\n case 'large':\n return 'toggle-lg';\n case 'extraLarge':\n return 'toggle-xl';\n default:\n return 'toggle';\n }\n }\n\n constructor() {\n super();\n\n effect(() => {\n const input = this.switcherElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getColorClass());\n }\n });\n\n effect(() => {\n const input = this.switcherElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getSizeClass());\n }\n });\n }\n\n toggle(event: Event) {\n const target = event.target as HTMLInputElement;\n this.control().setValue(target.checked);\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputSwitcher\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"toggle\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-switcher.mjs","sources":["../../projects/koala-ui/shared/components/input-field/switcher/switcher.ts","../../projects/koala-ui/shared/components/input-field/switcher/switcher.html","../../projects/koala-ui/shared/components/input-field/switcher/koalarx-ui-shared-components-input-field-switcher.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\nexport type SwitcherColor =\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost';\n\nexport type SwitcherSize =\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n\n@Component({\n selector: 'kl-switcher',\n templateUrl: './switcher.html',\n imports: [ReactiveFormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Switcher extends InputFieldBase {\n private readonly switcherElement =\n viewChild<ElementRef<HTMLInputElement>>('inputSwitcher');\n\n color = input<SwitcherColor>();\n size = input<SwitcherSize>();\n\n private getColorClass(): string {\n switch (this.color()) {\n case 'neutral':\n return 'toggle-neutral';\n case 'primary':\n return 'toggle-primary';\n case 'secondary':\n return 'toggle-secondary';\n case 'accent':\n return 'toggle-accent';\n case 'info':\n return 'toggle-info';\n case 'success':\n return 'toggle-success';\n case 'warning':\n return 'toggle-warning';\n case 'error':\n return 'toggle-error';\n case 'ghost':\n return 'toggle-ghost';\n default:\n return 'toggle';\n }\n }\n\n private getSizeClass(): string {\n switch (this.size()) {\n case 'extraSmall':\n return 'toggle-xs';\n case 'small':\n return 'toggle-sm';\n case 'medium':\n return 'toggle-md';\n case 'large':\n return 'toggle-lg';\n case 'extraLarge':\n return 'toggle-xl';\n default:\n return 'toggle';\n }\n }\n\n constructor() {\n super();\n\n effect(() => {\n const input = this.switcherElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getColorClass());\n }\n });\n\n effect(() => {\n const input = this.switcherElement()?.nativeElement;\n\n if (input) {\n input.classList.add(this.getSizeClass());\n }\n });\n }\n\n toggle(event: Event) {\n const target = event.target as HTMLInputElement;\n this.control().setValue(target.checked);\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"flex items-center gap-2 cursor-pointer\">\n <input #inputSwitcher\n [id]=\"fieldId\"\n type=\"checkbox\"\n class=\"toggle\"\n [checked]=\"control().value\"\n [disabled]=\"disabled()\"\n (change)=\"toggle($event)\"\n />\n\n <ng-content />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"><i class=\"fa-regular fa-circle-question\"></i> {{hint()}}</span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAmCM,MAAO,QAAS,SAAQ,cAAc,CAAA;AACzB,IAAA,eAAe,GAC9B,SAAS,CAA+B,eAAe,2DAAC;IAE1D,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiB;IAC9B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAgB;IAEpB,aAAa,GAAA;AACnB,QAAA,QAAQ,IAAI,CAAC,KAAK,EAAE;AAClB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,gBAAgB;AACzB,YAAA,KAAK,SAAS;AACZ,gBAAA,OAAO,gBAAgB;AAC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,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErC3D;;AAEG;;;;"}
|
|
@@ -19,11 +19,11 @@ class Textarea extends InputFieldBase {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Textarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23
23
|
}
|
|
24
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Textarea, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
|
-
args: [{ selector: 'kl-textarea', imports: [ReactiveFormsModule, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
26
|
+
args: [{ selector: 'kl-textarea', imports: [ReactiveFormsModule, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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: () => [], propDecorators: { textareaElement: [{ type: i0.ViewChild, args: ['textareaElement', { isSignal: true }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resizeble: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeble", required: false }] }] } });
|
|
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 ChangeDetectionStrategy,\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 changeDetection: ChangeDetectionStrategy.OnPush,\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]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\"
|
|
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 ChangeDetectionStrategy,\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 changeDetection: ChangeDetectionStrategy.OnPush,\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]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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":";;;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AAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBrB,kvBA4BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDZY,mBAAmB,uyBAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAG/B,QAAQ,EAAA,UAAA,EAAA,CAAA;kBANpB,SAAS;+BACE,aAAa,EAAA,OAAA,EAEd,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAA,eAAA,EAC1B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kvBAAA,EAAA;uGAIF,iBAAiB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErBhE;;AAEG;;;;"}
|
|
@@ -61,11 +61,11 @@ class InputField extends InputFieldBase {
|
|
|
61
61
|
min = input(...(ngDevMode ? [undefined, { debugName: "min" }] : []));
|
|
62
62
|
max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : []));
|
|
63
63
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
64
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
65
65
|
}
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputField, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
|
-
args: [{ selector: 'kl-input-field', imports: [ReactiveFormsModule, InputMask, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
68
|
+
args: [{ selector: 'kl-input-field', imports: [ReactiveFormsModule, InputMask, FieldErrors], changeDetection: ChangeDetectionStrategy.OnPush, 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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
69
69
|
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
|
|
70
70
|
|
|
71
71
|
/**
|
|
@@ -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 ElementRef,\n inject,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { CURRENT_THEME } from '@koalarx/ui/core/config';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly required = signal(false);\n\n readonly isDisabled = linkedSignal(() => this.disabled());\n readonly isRequired = this.required.asReadonly();\n 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 hint = input<string>();\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n\n effect(() => {\n CURRENT_THEME();\n\n if (\n this.elementRef.nativeElement?.tagName.toLowerCase() !==\n 'kl-input-field'\n ) {\n const container = this.elementRef.nativeElement.parentElement;\n\n if (container) {\n const containerBgColor = this.getBgColorParent(container);\n\n this.elementRef.nativeElement.style = `--bg-input: ${containerBgColor}`;\n }\n }\n });\n }\n\n private getBgColorParent(element: HTMLElement): string {\n const containerBgColor = window.getComputedStyle(element).backgroundColor;\n\n if (!containerBgColor || containerBgColor === 'rgba(0, 0, 0, 0)') {\n if (!element.parentElement) {\n return 'var(--color-base-100)';\n }\n\n return this.getBgColorParent(element.parentElement!);\n }\n\n return containerBgColor;\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\"
|
|
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 ElementRef,\n inject,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { CURRENT_THEME } from '@koalarx/ui/core/config';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly required = signal(false);\n\n readonly isDisabled = linkedSignal(() => this.disabled());\n readonly isRequired = this.required.asReadonly();\n 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 hint = input<string>();\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n\n effect(() => {\n CURRENT_THEME();\n\n if (\n this.elementRef.nativeElement?.tagName.toLowerCase() !==\n 'kl-input-field'\n ) {\n const container = this.elementRef.nativeElement.parentElement;\n\n if (container) {\n const containerBgColor = this.getBgColorParent(container);\n\n this.elementRef.nativeElement.style = `--bg-input: ${containerBgColor}`;\n }\n }\n });\n }\n\n private getBgColorParent(element: HTMLElement): string {\n const containerBgColor = window.getComputedStyle(element).backgroundColor;\n\n if (!containerBgColor || containerBgColor === 'rgba(0, 0, 0, 0)') {\n if (!element.parentElement) {\n return 'var(--color-base-100)';\n }\n\n return this.getBgColorParent(element.parentElement!);\n }\n\n return containerBgColor;\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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()\n ? label() + (isRequired() ? '*' : '')\n : 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@if (hint()) {\n <span class=\"hint-content\">{{hint()}}</span>\n}\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":";;;;;;;;;MAesB,cAAc,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC;IAEhC,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAChD,IAAA,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AACvC,IAAA,OAAO,GAAG,YAAY,CAAC,EAAE,EAAE;AAClC,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC;AAEF,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;IACvC,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACvB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;IAC/B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACtB,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD,I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vBjD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalarx/ui",
|
|
3
|
-
"version": "21.0
|
|
3
|
+
"version": "21.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=21.0.0",
|
|
6
6
|
"@angular/core": ">=21.0.0"
|
|
@@ -190,6 +190,10 @@
|
|
|
190
190
|
"types": "./types/koalarx-ui-shared-components-input-field-input-month.d.ts",
|
|
191
191
|
"default": "./fesm2022/koalarx-ui-shared-components-input-field-input-month.mjs"
|
|
192
192
|
},
|
|
193
|
+
"./shared/components/input-field/input-number": {
|
|
194
|
+
"types": "./types/koalarx-ui-shared-components-input-field-input-number.d.ts",
|
|
195
|
+
"default": "./fesm2022/koalarx-ui-shared-components-input-field-input-number.mjs"
|
|
196
|
+
},
|
|
193
197
|
"./shared/components/input-field/input-password": {
|
|
194
198
|
"types": "./types/koalarx-ui-shared-components-input-field-input-password.d.ts",
|
|
195
199
|
"default": "./fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs"
|
|
@@ -210,6 +214,10 @@
|
|
|
210
214
|
"types": "./types/koalarx-ui-shared-components-input-field-input-url.d.ts",
|
|
211
215
|
"default": "./fesm2022/koalarx-ui-shared-components-input-field-input-url.mjs"
|
|
212
216
|
},
|
|
217
|
+
"./shared/components/input-field/range": {
|
|
218
|
+
"types": "./types/koalarx-ui-shared-components-input-field-range.d.ts",
|
|
219
|
+
"default": "./fesm2022/koalarx-ui-shared-components-input-field-range.mjs"
|
|
220
|
+
},
|
|
213
221
|
"./shared/components/input-field/select": {
|
|
214
222
|
"types": "./types/koalarx-ui-shared-components-input-field-select.d.ts",
|
|
215
223
|
"default": "./fesm2022/koalarx-ui-shared-components-input-field-select.mjs"
|
package/theme/form.css
CHANGED
|
@@ -36,12 +36,16 @@ button:focus {
|
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
38
|
gap: 0.5rem;
|
|
39
|
-
padding: 0.
|
|
40
|
-
color: var(--color-neutral-
|
|
41
|
-
font-size:
|
|
39
|
+
padding: 0.2rem 0 0.5rem;
|
|
40
|
+
color: var(--color-neutral-500);
|
|
41
|
+
font-size: var(--text-sm);
|
|
42
42
|
text-transform: uppercase;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.dark .hint-content {
|
|
46
|
+
color: var(--color-neutral-700);
|
|
47
|
+
}
|
|
48
|
+
|
|
45
49
|
kl-select .kl-select-container {
|
|
46
50
|
position: relative;
|
|
47
51
|
overflow: unset;
|
|
@@ -131,9 +135,12 @@ kl-select .kl-select-options-container[popover] {
|
|
|
131
135
|
transform: translateY(-1rem);
|
|
132
136
|
opacity: 0;
|
|
133
137
|
overflow: hidden;
|
|
134
|
-
transition:
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
transition:
|
|
139
|
+
transform 0.3s ease allow-discrete,
|
|
140
|
+
opacity 0.3s ease allow-discrete,
|
|
141
|
+
display 0.3s allow-discrete,
|
|
142
|
+
overlay 0.3s allow-discrete,
|
|
143
|
+
height 0.3s allow-discrete;
|
|
137
144
|
position-area: var(--select-position-area, bottom);
|
|
138
145
|
}
|
|
139
146
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputFieldBase } from '@koalarx/ui/shared/components/input-field';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class InputNumber extends InputFieldBase {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputNumber, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputNumber, "kl-input-number", never, {}, {}, never, ["[errors]"], true, never>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { InputNumber };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
type RangeColor = 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'ghost';
|
|
5
|
+
type RangeSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';
|
|
6
|
+
declare class InputRange {
|
|
7
|
+
private destroyRef;
|
|
8
|
+
control: _angular_core.InputSignal<FormControl<any>>;
|
|
9
|
+
min: _angular_core.InputSignal<number>;
|
|
10
|
+
max: _angular_core.InputSignal<number>;
|
|
11
|
+
step: _angular_core.InputSignal<number>;
|
|
12
|
+
hint: _angular_core.InputSignal<string>;
|
|
13
|
+
color: _angular_core.InputSignal<RangeColor | undefined>;
|
|
14
|
+
size: _angular_core.InputSignal<RangeSize | undefined>;
|
|
15
|
+
colorClass: _angular_core.Signal<"range-neutral" | "range-primary" | "range-secondary" | "range-accent" | "range-info" | "range-success" | "range-warning" | "range-error" | "range-ghost" | "range">;
|
|
16
|
+
sizeClass: _angular_core.Signal<"" | "range-xs" | "range-sm" | "range-md" | "range-lg" | "range-xl">;
|
|
17
|
+
steps: _angular_core.Signal<number[]>;
|
|
18
|
+
value: _angular_core.WritableSignal<any>;
|
|
19
|
+
constructor();
|
|
20
|
+
setValue(event: Event): void;
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputRange, never>;
|
|
22
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputRange, "kl-input-range", never, { "control": { "alias": "control"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": true; "isSignal": true; }; "step": { "alias": "step"; "required": true; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { InputRange };
|
|
26
|
+
export type { RangeColor, RangeSize };
|