@koalarx/ui 20.0.26 → 20.0.28
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-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-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-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/fesm2022/koalarx-ui-shared-components-snackbar.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-snackbar.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-vertical-menu.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-utils.mjs +1 -1
- package/fesm2022/koalarx-ui-shared-utils.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10,11 +10,11 @@ class InputCurrency extends InputFieldBase {
|
|
|
10
10
|
decimalCount = input(2);
|
|
11
11
|
currentValue = linkedSignal(() => this.control().value);
|
|
12
12
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCurrency, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCurrency, isStandalone: true, selector: "kl-input-currency", inputs: { decimalCount: { classPropertyName: "decimalCount", publicName: "decimalCount", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: InputCurrencyMask, selector: "input[currencyMask]", inputs: ["decimalCount"], outputs: ["currencyValue"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputCurrency, isStandalone: true, selector: "kl-input-currency", inputs: { decimalCount: { classPropertyName: "decimalCount", publicName: "decimalCount", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: InputCurrencyMask, selector: "input[currencyMask]", inputs: ["decimalCount"], outputs: ["currencyValue"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
14
14
|
}
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputCurrency, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
|
-
args: [{ selector: 'kl-input-currency', imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
17
|
+
args: [{ selector: 'kl-input-currency', imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
18
18
|
}] });
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-currency.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.ts","../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.html","../../projects/koala-ui/shared/components/input-field/input-currency/koalarx-ui-shared-components-input-field-input-currency.ts"],"sourcesContent":["import { Component, input, linkedSignal } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputCurrencyMask } from '@koalarx/ui/shared/directives';\n\n@Component({\n selector: 'kl-input-currency',\n templateUrl: './input-currency.html',\n imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors],\n})\nexport class InputCurrency extends InputFieldBase {\n decimalCount = input<number>(2);\n currentValue = linkedSignal(() => this.control().value);\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n type=\"tel\"\n currencyMask\n [decimalCount]=\"decimalCount()\"\n (currencyValue)=\"control().setValue($event)\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,YAAY,GAAG,KAAK,CAAS,CAAC,CAAC;AAC/B,IAAA,YAAY,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC;uGAF5C,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX1B,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-currency.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.ts","../../projects/koala-ui/shared/components/input-field/input-currency/input-currency.html","../../projects/koala-ui/shared/components/input-field/input-currency/koalarx-ui-shared-components-input-field-input-currency.ts"],"sourcesContent":["import { Component, input, linkedSignal } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { InputCurrencyMask } from '@koalarx/ui/shared/directives';\n\n@Component({\n selector: 'kl-input-currency',\n templateUrl: './input-currency.html',\n imports: [ReactiveFormsModule, FormsModule, InputCurrencyMask, FieldErrors],\n})\nexport class InputCurrency extends InputFieldBase {\n decimalCount = input<number>(2);\n currentValue = linkedSignal(() => this.control().value);\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,YAAY,GAAG,KAAK,CAAS,CAAC,CAAC;AAC/B,IAAA,YAAY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word, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputPassword, isStandalone: true, selector: "kl-input-password", inputs: { enableStrongPasswordCheck: { classPropertyName: "enableStrongPasswordCheck", publicName: "enableStrongPasswordCheck", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputPassword, isStandalone: true, selector: "kl-input-password", inputs: { enableStrongPasswordCheck: { classPropertyName: "enableStrongPasswordCheck", publicName: "enableStrongPasswordCheck", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
57
57
|
}
|
|
58
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputPassword, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
|
-
args: [{ selector: 'kl-input-password', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
60
|
+
args: [{ selector: 'kl-input-password', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
61
61
|
}] });
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-input-password.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-password/has-lowercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-number-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-special-characters-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-uppercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.html","../../projects/koala-ui/shared/components/input-field/input-password/koalarx-ui-shared-components-input-field-input-password.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\n\nexport function HasLowercaseValidator(control: AbstractControl) {\n if (!/[a-z]/.test(control.value)) {\n return { hasLowercase: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasNumberValidator(control: AbstractControl) {\n if (!/\\d/.test(control.value)) {\n return { hasNumber: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasSpecialCharactersValidator(control: AbstractControl) {\n if (!/[ `!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?~]/.test(control.value)) {\n return { hasSpecialCharacters: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasUppercaseValidator(control: AbstractControl) {\n if (!/[A-Z]/.test(control.value)) {\n return { hasUppercase: true };\n }\n\n return null;\n}\n","import {\n booleanAttribute,\n Component,\n inject,\n input,\n OnInit,\n signal,\n} from '@angular/core';\nimport { ReactiveFormsModule, Validators } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { HasLowercaseValidator } from './has-lowercase-validator';\nimport { HasNumberValidator } from './has-number-validator';\nimport { HasSpecialCharactersValidator } from './has-special-characters-validator';\nimport { HasUppercaseValidator } from './has-uppercase-validator';\n\ntype InputPasswordType = 'password' | 'text';\n\n@Component({\n selector: 'kl-input-password',\n templateUrl: './input-password.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class InputPassword extends InputFieldBase implements OnInit {\n readonly translations = inject(AppConfig).translation.form;\n\n type = signal<InputPasswordType>('password');\n enableStrongPasswordCheck = input(false, { transform: booleanAttribute });\n\n togglePasswordVisibility() {\n this.type.set(this.type() === 'password' ? 'text' : 'password');\n }\n\n ngOnInit(): void {\n if (this.enableStrongPasswordCheck()) {\n this.control().addValidators([\n HasSpecialCharactersValidator,\n HasLowercaseValidator,\n HasUppercaseValidator,\n HasNumberValidator,\n Validators.minLength(8),\n ]);\n }\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [type]=\"type()\"\n />\n\n <button class=\"cursor-pointer\" type=\"button\" (click)=\"togglePasswordVisibility()\">\n @if (type() === 'password') {\n <i class=\"fa-regular fa-eye-slash\"></i>\n } @else {\n <i class=\"fa-regular fa-eye\"></i>\n }\n </button>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n @if (control().errors?.['hasSpecialCharacters']) {\n {{translations.invalidPasswordHasSpecialCharacters}}<br/>\n }\n\n @if (control().errors?.['hasUppercase']) {\n {{translations.invalidPasswordHasUppercase}}<br/>\n }\n\n @if (control().errors?.['hasLowercase']) {\n {{translations.invalidPasswordHasLowercase}}<br/>\n }\n\n @if (control().errors?.['hasNumber']) {\n {{translations.invalidPasswordHasNumber}}<br/>\n }\n\n @if (control().errors?.['minlength']) {\n {{translations.invalidMinLength(control().errors?.['minlength'].requiredLength)}}<br/>\n }\n\n @if (control().errors?.['confirmPassword']) {\n {{translations.invalidConfirmPassword}}<br/>\n }\n\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEM,SAAU,qBAAqB,CAAC,OAAwB,EAAA;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;;AAG/B,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,kBAAkB,CAAC,OAAwB,EAAA;IACzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC7B,QAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;;AAG5B,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,6BAA6B,CAAC,OAAwB,EAAA;IACpE,IAAI,CAAC,wCAAwC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjE,QAAA,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE;;AAGvC,IAAA,OAAO,IAAI;AACb;;ACNM,SAAU,qBAAqB,CAAC,OAAwB,EAAA;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChC,QAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;;AAG/B,IAAA,OAAO,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shared/components/input-field/input-password/has-lowercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-number-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-special-characters-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/has-uppercase-validator.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.ts","../../projects/koala-ui/shared/components/input-field/input-password/input-password.html","../../projects/koala-ui/shared/components/input-field/input-password/koalarx-ui-shared-components-input-field-input-password.ts"],"sourcesContent":["import { AbstractControl } from '@angular/forms';\n\nexport function HasLowercaseValidator(control: AbstractControl) {\n if (!/[a-z]/.test(control.value)) {\n return { hasLowercase: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasNumberValidator(control: AbstractControl) {\n if (!/\\d/.test(control.value)) {\n return { hasNumber: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasSpecialCharactersValidator(control: AbstractControl) {\n if (!/[ `!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?~]/.test(control.value)) {\n return { hasSpecialCharacters: true };\n }\n\n return null;\n}\n","import { AbstractControl } from '@angular/forms';\n\nexport function HasUppercaseValidator(control: AbstractControl) {\n if (!/[A-Z]/.test(control.value)) {\n return { hasUppercase: true };\n }\n\n return null;\n}\n","import {\n booleanAttribute,\n Component,\n inject,\n input,\n OnInit,\n signal,\n} from '@angular/core';\nimport { ReactiveFormsModule, Validators } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\nimport { HasLowercaseValidator } from './has-lowercase-validator';\nimport { HasNumberValidator } from './has-number-validator';\nimport { HasSpecialCharactersValidator } from './has-special-characters-validator';\nimport { HasUppercaseValidator } from './has-uppercase-validator';\n\ntype InputPasswordType = 'password' | 'text';\n\n@Component({\n selector: 'kl-input-password',\n templateUrl: './input-password.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class InputPassword extends InputFieldBase implements OnInit {\n readonly translations = inject(AppConfig).translation.form;\n\n type = signal<InputPasswordType>('password');\n enableStrongPasswordCheck = input(false, { transform: booleanAttribute });\n\n togglePasswordVisibility() {\n this.type.set(this.type() === 'password' ? 'text' : 'password');\n }\n\n ngOnInit(): void {\n if (this.enableStrongPasswordCheck()) {\n this.control().addValidators([\n HasSpecialCharactersValidator,\n HasLowercaseValidator,\n HasUppercaseValidator,\n HasNumberValidator,\n Validators.minLength(8),\n ]);\n }\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full\">\n @if (label(); as label) {\n <span class=\"label\">\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<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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|
|
20
20
|
}
|
|
21
21
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Textarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: Textarea, isStandalone: true, selector: "kl-textarea", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resizeble: { classPropertyName: "resizeble", publicName: "resizeble", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "textareaElement", first: true, predicate: ["textareaElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: Textarea, isStandalone: true, selector: "kl-textarea", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resizeble: { classPropertyName: "resizeble", publicName: "resizeble", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "textareaElement", first: true, predicate: ["textareaElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
23
23
|
}
|
|
24
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Textarea, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
|
-
args: [{ selector: 'kl-textarea', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
26
|
+
args: [{ selector: 'kl-textarea', imports: [ReactiveFormsModule, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
27
27
|
}], ctorParameters: () => [] });
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field-textarea.mjs","sources":["../../projects/koala-ui/shared/components/input-field/textarea/textarea.ts","../../projects/koala-ui/shared/components/input-field/textarea/textarea.html","../../projects/koala-ui/shared/components/input-field/textarea/koalarx-ui-shared-components-input-field-textarea.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-textarea',\n templateUrl: './textarea.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class Textarea extends InputFieldBase {\n private readonly textareaElement =\n viewChild<ElementRef<HTMLTextAreaElement>>('textareaElement');\n\n rows = input<number>(3);\n resizeble = input(false, { transform: booleanAttribute });\n\n constructor() {\n super();\n\n effect(() => {\n const textarea = this.textareaElement()?.nativeElement;\n\n if (textarea) {\n textarea.style.resize = this.resizeble() ? 'vertical' : 'none';\n }\n });\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBM,MAAO,QAAS,SAAQ,cAAc,CAAA;AACzB,IAAA,eAAe,GAC9B,SAAS,CAAkC,iBAAiB,CAAC;AAE/D,IAAA,IAAI,GAAG,KAAK,CAAS,CAAC,CAAC;IACvB,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAEzD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAEP,MAAM,CAAC,MAAK;YACV,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,EAAE,aAAa;YAEtD,IAAI,QAAQ,EAAE;AACZ,gBAAA,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,UAAU,GAAG,MAAM;;AAElE,SAAC,CAAC;;uGAhBO,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,ECjBrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field-textarea.mjs","sources":["../../projects/koala-ui/shared/components/input-field/textarea/textarea.ts","../../projects/koala-ui/shared/components/input-field/textarea/textarea.html","../../projects/koala-ui/shared/components/input-field/textarea/koalarx-ui-shared-components-input-field-textarea.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n effect,\n ElementRef,\n input,\n viewChild,\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputFieldBase } from '@koalarx/ui/shared/components/input-field';\n\n@Component({\n selector: 'kl-textarea',\n templateUrl: './textarea.html',\n imports: [ReactiveFormsModule, FieldErrors],\n})\nexport class Textarea extends InputFieldBase {\n private readonly textareaElement =\n viewChild<ElementRef<HTMLTextAreaElement>>('textareaElement');\n\n rows = input<number>(3);\n resizeble = input(false, { transform: booleanAttribute });\n\n constructor() {\n super();\n\n effect(() => {\n const textarea = this.textareaElement()?.nativeElement;\n\n if (textarea) {\n textarea.style.resize = this.resizeble() ? 'vertical' : 'none';\n }\n });\n }\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label textarea validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <textarea class=\"w-full h-full\" #textareaElement\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [required]=\"isRequired()\"\n [placeholder]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [rows]=\"rows()\">\n </textarea>\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBM,MAAO,QAAS,SAAQ,cAAc,CAAA;AACzB,IAAA,eAAe,GAC9B,SAAS,CAAkC,iBAAiB,CAAC;AAE/D,IAAA,IAAI,GAAG,KAAK,CAAS,CAAC,CAAC;IACvB,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAEzD,IAAA,WAAA,G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,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE/B,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAEd,OAAA,EAAA,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,2qBAAA,EAAA;;;AEf7C;;AAEG;;;;"}
|
|
@@ -37,11 +37,11 @@ class InputField extends InputFieldBase {
|
|
|
37
37
|
min = input();
|
|
38
38
|
max = input();
|
|
39
39
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputField, isStandalone: true, selector: "kl-input-field", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: InputMask, selector: "input[mask]", inputs: ["mask"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }] });
|
|
40
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputField, isStandalone: true, selector: "kl-input-field", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<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"] }] });
|
|
41
41
|
}
|
|
42
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputField, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
|
-
args: [{ selector: 'kl-input-field', imports: [ReactiveFormsModule, InputMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
44
|
+
args: [{ selector: 'kl-input-field', imports: [ReactiveFormsModule, InputMask, FieldErrors], template: "<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
45
45
|
}] });
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-input-field.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-field.base.ts","../../projects/koala-ui/shared/components/input-field/input-field.ts","../../projects/koala-ui/shared/components/input-field/input-field.html","../../projects/koala-ui/shared/components/input-field/koalarx-ui-shared-components-input-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n effect,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly required = signal(false);\n protected readonly isDisabled = linkedSignal(() => this.disabled());\n protected readonly isRequired = this.required.asReadonly();\n protected readonly fieldId = randomString(10, {\n lowercase: true,\n uppercase: true,\n });\n\n control = input.required<FormControl>();\n label = input<string>();\n placeholder = input<string>('');\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputMask } from '@koalarx/ui/shared/directives';\nimport { InputFieldBase } from './input-field.base';\n\ntype InputTypeField =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'time'\n | 'search';\n\n@Component({\n selector: 'kl-input-field',\n templateUrl: './input-field.html',\n imports: [ReactiveFormsModule, InputMask, FieldErrors],\n})\nexport class InputField extends InputFieldBase {\n type = input<InputTypeField>('text');\n mask = input<string>('');\n min = input<string>();\n max = input<string>();\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYsB,cAAc,CAAA;AACjB,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;IACtB,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;AAChD,IAAA,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AACvC,IAAA,OAAO,GAAG,YAAY,CAAC,EAAE,EAAE;AAC5C,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC;AAEF,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAe;IACvC,KAAK,GAAG,KAAK,EAAU;AACvB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,C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AAI,GAAG,KAAK,CAAiB,MAAM,CAAC;AACpC,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;IACxB,GAAG,GAAG,KAAK,EAAU;IACrB,GAAG,GAAG,KAAK,EAAU;uGAJV,UAAU,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,2jBCxBvB,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-input-field.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-field.base.ts","../../projects/koala-ui/shared/components/input-field/input-field.ts","../../projects/koala-ui/shared/components/input-field/input-field.html","../../projects/koala-ui/shared/components/input-field/koalarx-ui-shared-components-input-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n effect,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly required = signal(false);\n protected readonly isDisabled = linkedSignal(() => this.disabled());\n protected readonly isRequired = this.required.asReadonly();\n protected readonly fieldId = randomString(10, {\n lowercase: true,\n uppercase: true,\n });\n\n control = input.required<FormControl>();\n label = input<string>();\n placeholder = input<string>('');\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputMask } from '@koalarx/ui/shared/directives';\nimport { InputFieldBase } from './input-field.base';\n\ntype InputTypeField =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'time'\n | 'search';\n\n@Component({\n selector: 'kl-input-field',\n templateUrl: './input-field.html',\n imports: [ReactiveFormsModule, InputMask, FieldErrors],\n})\nexport class InputField extends InputFieldBase {\n type = input<InputTypeField>('text');\n mask = input<string>('');\n min = input<string>();\n max = input<string>();\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"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<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYsB,cAAc,CAAA;AACjB,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;IACtB,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;AAChD,IAAA,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AACvC,IAAA,OAAO,GAAG,YAAY,CAAC,EAAE,EAAE;AAC5C,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC;AAEF,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAe;IACvC,KAAK,GAAG,KAAK,EAAU;AACvB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC;IAC/B,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAA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,WAEjB,CAAC,mBAAmB,EAAE,SAAS,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,2tBAAA,EAAA;;;AEtBxD;;AAEG;;;;"}
|
|
@@ -178,11 +178,11 @@ class SnackbarContent {
|
|
|
178
178
|
this.snackbarRef.dismiss();
|
|
179
179
|
}
|
|
180
180
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SnackbarContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SnackbarContent, isStandalone: true, selector: "kl-snackbar-content", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, timeout: { classPropertyName: "timeout", publicName: "timeout", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "alertContentRef", first: true, predicate: ["alertContent"], descendants: true, isSignal: true }, { propertyName: "alertIconRef", first: true, predicate: ["alertIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "<div role=\"alert\" #alertContent class=\"relative alert alert-outline bg-base-100! max-w-1/4 rounded-sm\">\n <i #alertIcon class=\"h-6 w-6 shrink-0 stroke-current text-2xl fa-solid\"></i>\n <span [innerHTML]=\"message()\"></span>\n <div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"dismiss()\">OK</button>\n </div>\n @if (timePast() > 0) {\n <progress class=\"absolute left-0 bottom-0 progress w-full opacity-20\"\n [value]=\"timePast()\"\n [max]=\"timeout()\">\n </progress>\n }\n</div>\n" });
|
|
181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SnackbarContent, isStandalone: true, selector: "kl-snackbar-content", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, timeout: { classPropertyName: "timeout", publicName: "timeout", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "alertContentRef", first: true, predicate: ["alertContent"], descendants: true, isSignal: true }, { propertyName: "alertIconRef", first: true, predicate: ["alertIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "<div role=\"alert\" #alertContent class=\"relative alert alert-outline bg-base-100! w-full md:max-w-1/4 rounded-sm\">\n <i #alertIcon class=\"h-6 w-6 shrink-0 stroke-current text-2xl fa-solid\"></i>\n <span [innerHTML]=\"message()\"></span>\n <div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"dismiss()\">OK</button>\n </div>\n @if (timePast() > 0) {\n <progress class=\"absolute left-0 bottom-0 progress w-full opacity-20\"\n [value]=\"timePast()\"\n [max]=\"timeout()\">\n </progress>\n }\n</div>\n" });
|
|
182
182
|
}
|
|
183
183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SnackbarContent, decorators: [{
|
|
184
184
|
type: Component,
|
|
185
|
-
args: [{ selector: 'kl-snackbar-content', template: "<div role=\"alert\" #alertContent class=\"relative alert alert-outline bg-base-100! max-w-1/4 rounded-sm\">\n <i #alertIcon class=\"h-6 w-6 shrink-0 stroke-current text-2xl fa-solid\"></i>\n <span [innerHTML]=\"message()\"></span>\n <div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"dismiss()\">OK</button>\n </div>\n @if (timePast() > 0) {\n <progress class=\"absolute left-0 bottom-0 progress w-full opacity-20\"\n [value]=\"timePast()\"\n [max]=\"timeout()\">\n </progress>\n }\n</div>\n" }]
|
|
185
|
+
args: [{ selector: 'kl-snackbar-content', template: "<div role=\"alert\" #alertContent class=\"relative alert alert-outline bg-base-100! w-full md:max-w-1/4 rounded-sm\">\n <i #alertIcon class=\"h-6 w-6 shrink-0 stroke-current text-2xl fa-solid\"></i>\n <span [innerHTML]=\"message()\"></span>\n <div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"dismiss()\">OK</button>\n </div>\n @if (timePast() > 0) {\n <progress class=\"absolute left-0 bottom-0 progress w-full opacity-20\"\n [value]=\"timePast()\"\n [max]=\"timeout()\">\n </progress>\n }\n</div>\n" }]
|
|
186
186
|
}], ctorParameters: () => [] });
|
|
187
187
|
|
|
188
188
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-snackbar.mjs","sources":["../../projects/koala-ui/shared/components/snackbar/snackbar.ts","../../projects/koala-ui/shared/components/snackbar/snackbar-ref.ts","../../projects/koala-ui/shared/components/snackbar/snackbar-content.ts","../../projects/koala-ui/shared/components/snackbar/snackbar-content.html","../../projects/koala-ui/shared/components/snackbar/koalarx-ui-shared-components-snackbar.ts"],"sourcesContent":["import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n inputBinding,\n} from '@angular/core';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { SnackbarContent } from './snackbar-content';\nimport { SNACKBAR_REF_TOKEN, SnackbarRef } from './snackbar-ref';\n\nexport const SNACKBAR_CONFIG = new InjectionToken('SnackbarConfig');\nexport const SNACKBAR_APP_REF = new InjectionToken('SnackbarAppRef');\n\nexport type SnackbarType = 'info' | 'success' | 'warning' | 'error';\n\nexport interface SnackbarConfig {\n type: SnackbarType;\n message: string;\n timeout?: number;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Snackbar {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n success(message: string, timeout = 5000) {\n this.open({\n type: 'success',\n message,\n timeout,\n });\n }\n\n warning(message: string, timeout = 5000) {\n this.open({\n type: 'warning',\n message,\n timeout,\n });\n }\n\n error(message: string, timeout = 5000) {\n this.open({\n type: 'error',\n message,\n timeout,\n });\n }\n\n info(message: string, timeout = 5000) {\n this.open({\n type: 'info',\n message,\n timeout,\n });\n }\n\n open(config: SnackbarConfig) {\n const main = document.querySelector<HTMLElement>(\n 'kl-snackbar-container div'\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n container.id = elementId;\n container.classList.add('flex', 'item-center', 'justify-end');\n\n const componentRef = createComponent(SnackbarContent, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: SNACKBAR_CONFIG, useValue: config },\n { provide: SNACKBAR_APP_REF, useValue: this.appRef },\n {\n provide: SNACKBAR_REF_TOKEN,\n useValue: () => componentRef,\n },\n {\n provide: SnackbarRef,\n deps: [SNACKBAR_CONFIG, SNACKBAR_APP_REF, SNACKBAR_REF_TOKEN],\n },\n ],\n }),\n bindings: [\n inputBinding('type', () => config.type),\n inputBinding('message', () => config.message),\n inputBinding('timeout', () => config.timeout ?? 0),\n ],\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n} from '@angular/core';\nimport { SNACKBAR_APP_REF } from './snackbar';\nimport { SnackbarContent } from './snackbar-content';\n\nexport const SNACKBAR_REF_TOKEN = new InjectionToken('SnackbarRefToken');\n\n@Injectable()\nexport class SnackbarRef {\n private readonly appRef = inject<ApplicationRef>(SNACKBAR_APP_REF);\n private readonly componentRef =\n inject<() => ComponentRef<SnackbarContent>>(SNACKBAR_REF_TOKEN);\n\n dismiss() {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n }\n}\n","import {\n Component,\n effect,\n ElementRef,\n inject,\n input,\n OnInit,\n signal,\n viewChild,\n} from '@angular/core';\nimport { SnackbarType } from './snackbar';\nimport { SnackbarRef } from './snackbar-ref';\nimport { interval } from 'rxjs/internal/observable/interval';\nimport { startWith } from 'rxjs/internal/operators/startWith';\nimport { map } from 'rxjs/internal/operators/map';\n\n@Component({\n selector: 'kl-snackbar-content',\n templateUrl: './snackbar-content.html',\n})\nexport class SnackbarContent implements OnInit {\n private readonly alertContentRef =\n viewChild<ElementRef<HTMLDivElement>>('alertContent');\n private readonly alertIconRef =\n viewChild<ElementRef<HTMLElement>>('alertIcon');\n private readonly snackbarRef = inject(SnackbarRef);\n\n type = input.required<SnackbarType>();\n message = input.required<string>();\n timeout = input<number>(0);\n timePast = signal(0);\n\n constructor() {\n effect(() => this.addAlertClass());\n effect(() => this.addIconClass());\n }\n\n private addAlertClass() {\n const alertContent = this.alertContentRef()?.nativeElement;\n\n if (alertContent) {\n let className = `alert-${this.type()}`;\n\n switch (this.type()) {\n case 'info':\n className = 'alert-info';\n break;\n case 'success':\n className = 'alert-success';\n break;\n case 'warning':\n className = 'alert-warning';\n break;\n case 'error':\n className = 'alert-error';\n break;\n }\n\n alertContent.classList.add(className);\n }\n }\n\n private addIconClass() {\n const alertIcon = this.alertIconRef()?.nativeElement;\n\n if (alertIcon) {\n let className = '';\n\n switch (this.type()) {\n case 'info':\n className = 'fa-circle-info';\n break;\n case 'success':\n className = 'fa-circle-check';\n break;\n case 'warning':\n className = 'fa-triangle-exclamation';\n break;\n case 'error':\n className = 'fa-circle-xmark';\n break;\n }\n\n alertIcon.classList.add(className);\n }\n }\n\n ngOnInit(): void {\n const timeout = this.timeout();\n\n if (timeout > 0) {\n const timePastInterval = interval(1000)\n .pipe(\n startWith(0),\n map(() => this.timePast.update((past) => past + 1000)),\n map(() => this.timePast())\n )\n .subscribe((timePast) => {\n if (timePast > timeout) {\n timePastInterval?.unsubscribe();\n this.dismiss();\n }\n });\n }\n }\n\n dismiss() {\n this.snackbarRef.dismiss();\n }\n}\n","<div role=\"alert\" #alertContent class=\"relative alert alert-outline bg-base-100! max-w-1/4 rounded-sm\">\n <i #alertIcon class=\"h-6 w-6 shrink-0 stroke-current text-2xl fa-solid\"></i>\n <span [innerHTML]=\"message()\"></span>\n <div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"dismiss()\">OK</button>\n </div>\n @if (timePast() > 0) {\n <progress class=\"absolute left-0 bottom-0 progress w-full opacity-20\"\n [value]=\"timePast()\"\n [max]=\"timeout()\">\n </progress>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,eAAe,GAAG,IAAI,cAAc,CAAC,gBAAgB;MACrD,gBAAgB,GAAG,IAAI,cAAc,CAAC,gBAAgB;MAWtD,QAAQ,CAAA;AACF,IAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE/C,iBAAiB,GAAA;AACvB,QAAA,IAAI,SAAiB;AAErB,QAAA,GAAG;AACD,YAAA,SAAS,GAAG,YAAY,CAAC,EAAE,EAAE;AAC3B,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,iBAAiB,EAAE,KAAK;AACzB,aAAA,CAAC;AACJ,SAAC,QAAQ,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC;AAE3C,QAAA,OAAO,SAAS;;AAGlB,IAAA,OAAO,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QACrC,IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE,SAAS;YACf,OAAO;YACP,OAAO;AACR,SAAA,CAAC;;AAGJ,IAAA,OAAO,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QACrC,IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE,SAAS;YACf,OAAO;YACP,OAAO;AACR,SAAA,CAAC;;AAGJ,IAAA,KAAK,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QACnC,IAAI,CAAC,IA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BAAqB,EAAA,QAAA,EAAA,8gBAAA,EAAA;;;AEjBjC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-snackbar.mjs","sources":["../../projects/koala-ui/shared/components/snackbar/snackbar.ts","../../projects/koala-ui/shared/components/snackbar/snackbar-ref.ts","../../projects/koala-ui/shared/components/snackbar/snackbar-content.ts","../../projects/koala-ui/shared/components/snackbar/snackbar-content.html","../../projects/koala-ui/shared/components/snackbar/koalarx-ui-shared-components-snackbar.ts"],"sourcesContent":["import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n inputBinding,\n} from '@angular/core';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { SnackbarContent } from './snackbar-content';\nimport { SNACKBAR_REF_TOKEN, SnackbarRef } from './snackbar-ref';\n\nexport const SNACKBAR_CONFIG = new InjectionToken('SnackbarConfig');\nexport const SNACKBAR_APP_REF = new InjectionToken('SnackbarAppRef');\n\nexport type SnackbarType = 'info' | 'success' | 'warning' | 'error';\n\nexport interface SnackbarConfig {\n type: SnackbarType;\n message: string;\n timeout?: number;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Snackbar {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n success(message: string, timeout = 5000) {\n this.open({\n type: 'success',\n message,\n timeout,\n });\n }\n\n warning(message: string, timeout = 5000) {\n this.open({\n type: 'warning',\n message,\n timeout,\n });\n }\n\n error(message: string, timeout = 5000) {\n this.open({\n type: 'error',\n message,\n timeout,\n });\n }\n\n info(message: string, timeout = 5000) {\n this.open({\n type: 'info',\n message,\n timeout,\n });\n }\n\n open(config: SnackbarConfig) {\n const main = document.querySelector<HTMLElement>(\n 'kl-snackbar-container div'\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n container.id = elementId;\n container.classList.add('flex', 'item-center', 'justify-end');\n\n const componentRef = createComponent(SnackbarContent, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: SNACKBAR_CONFIG, useValue: config },\n { provide: SNACKBAR_APP_REF, useValue: this.appRef },\n {\n provide: SNACKBAR_REF_TOKEN,\n useValue: () => componentRef,\n },\n {\n provide: SnackbarRef,\n deps: [SNACKBAR_CONFIG, SNACKBAR_APP_REF, SNACKBAR_REF_TOKEN],\n },\n ],\n }),\n bindings: [\n inputBinding('type', () => config.type),\n inputBinding('message', () => config.message),\n inputBinding('timeout', () => config.timeout ?? 0),\n ],\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n} from '@angular/core';\nimport { SNACKBAR_APP_REF } from './snackbar';\nimport { SnackbarContent } from './snackbar-content';\n\nexport const SNACKBAR_REF_TOKEN = new InjectionToken('SnackbarRefToken');\n\n@Injectable()\nexport class SnackbarRef {\n private readonly appRef = inject<ApplicationRef>(SNACKBAR_APP_REF);\n private readonly componentRef =\n inject<() => ComponentRef<SnackbarContent>>(SNACKBAR_REF_TOKEN);\n\n dismiss() {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n }\n}\n","import {\n Component,\n effect,\n ElementRef,\n inject,\n input,\n OnInit,\n signal,\n viewChild,\n} from '@angular/core';\nimport { SnackbarType } from './snackbar';\nimport { SnackbarRef } from './snackbar-ref';\nimport { interval } from 'rxjs/internal/observable/interval';\nimport { startWith } from 'rxjs/internal/operators/startWith';\nimport { map } from 'rxjs/internal/operators/map';\n\n@Component({\n selector: 'kl-snackbar-content',\n templateUrl: './snackbar-content.html',\n})\nexport class SnackbarContent implements OnInit {\n private readonly alertContentRef =\n viewChild<ElementRef<HTMLDivElement>>('alertContent');\n private readonly alertIconRef =\n viewChild<ElementRef<HTMLElement>>('alertIcon');\n private readonly snackbarRef = inject(SnackbarRef);\n\n type = input.required<SnackbarType>();\n message = input.required<string>();\n timeout = input<number>(0);\n timePast = signal(0);\n\n constructor() {\n effect(() => this.addAlertClass());\n effect(() => this.addIconClass());\n }\n\n private addAlertClass() {\n const alertContent = this.alertContentRef()?.nativeElement;\n\n if (alertContent) {\n let className = `alert-${this.type()}`;\n\n switch (this.type()) {\n case 'info':\n className = 'alert-info';\n break;\n case 'success':\n className = 'alert-success';\n break;\n case 'warning':\n className = 'alert-warning';\n break;\n case 'error':\n className = 'alert-error';\n break;\n }\n\n alertContent.classList.add(className);\n }\n }\n\n private addIconClass() {\n const alertIcon = this.alertIconRef()?.nativeElement;\n\n if (alertIcon) {\n let className = '';\n\n switch (this.type()) {\n case 'info':\n className = 'fa-circle-info';\n break;\n case 'success':\n className = 'fa-circle-check';\n break;\n case 'warning':\n className = 'fa-triangle-exclamation';\n break;\n case 'error':\n className = 'fa-circle-xmark';\n break;\n }\n\n alertIcon.classList.add(className);\n }\n }\n\n ngOnInit(): void {\n const timeout = this.timeout();\n\n if (timeout > 0) {\n const timePastInterval = interval(1000)\n .pipe(\n startWith(0),\n map(() => this.timePast.update((past) => past + 1000)),\n map(() => this.timePast())\n )\n .subscribe((timePast) => {\n if (timePast > timeout) {\n timePastInterval?.unsubscribe();\n this.dismiss();\n }\n });\n }\n }\n\n dismiss() {\n this.snackbarRef.dismiss();\n }\n}\n","<div role=\"alert\" #alertContent class=\"relative alert alert-outline bg-base-100! w-full md:max-w-1/4 rounded-sm\">\n <i #alertIcon class=\"h-6 w-6 shrink-0 stroke-current text-2xl fa-solid\"></i>\n <span [innerHTML]=\"message()\"></span>\n <div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"dismiss()\">OK</button>\n </div>\n @if (timePast() > 0) {\n <progress class=\"absolute left-0 bottom-0 progress w-full opacity-20\"\n [value]=\"timePast()\"\n [max]=\"timeout()\">\n </progress>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,eAAe,GAAG,IAAI,cAAc,CAAC,gBAAgB;MACrD,gBAAgB,GAAG,IAAI,cAAc,CAAC,gBAAgB;MAWtD,QAAQ,CAAA;AACF,IAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE/C,iBAAiB,GAAA;AACvB,QAAA,IAAI,SAAiB;AAErB,QAAA,GAAG;AACD,YAAA,SAAS,GAAG,YAAY,CAAC,EAAE,EAAE;AAC3B,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,iBAAiB,EAAE,KAAK;AACzB,aAAA,CAAC;AACJ,SAAC,QAAQ,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC;AAE3C,QAAA,OAAO,SAAS;;AAGlB,IAAA,OAAO,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QACrC,IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE,SAAS;YACf,OAAO;YACP,OAAO;AACR,SAAA,CAAC;;AAGJ,IAAA,OAAO,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QACrC,IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE,SAAS;YACf,OAAO;YACP,OAAO;AACR,SAAA,CAAC;;AAGJ,IAAA,KAAK,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QACnC,IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE,OAAO;YACb,OAAO;YACP,OAAO;AACR,SAAA,CAAC;;AAGJ,IAAA,IAAI,CAAC,OAAe,EAAE,OAAO,GAAG,IAAI,EAAA;QAClC,IAAI,CAAC,IAAI,CAAC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
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: VerticalMenuContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: VerticalMenuContainer, isStandalone: true, selector: "kl-vertical-menu-container", ngImport: i0, template: "<ul class=\"menu rounded-box w-
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: VerticalMenuContainer, isStandalone: true, selector: "kl-vertical-menu-container", ngImport: i0, template: "<ul class=\"menu rounded-box w-full\">\n <li class=\"menu-title\">\n <ng-content select=\"[title]\" />\n </li>\n <ng-content select=\"[items]\" />\n</ul>\n" });
|
|
8
8
|
}
|
|
9
9
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: VerticalMenuContainer, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
|
-
args: [{ selector: 'kl-vertical-menu-container', template: "<ul class=\"menu rounded-box w-
|
|
11
|
+
args: [{ selector: 'kl-vertical-menu-container', template: "<ul class=\"menu rounded-box w-full\">\n <li class=\"menu-title\">\n <ng-content select=\"[title]\" />\n </li>\n <ng-content select=\"[items]\" />\n</ul>\n" }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
14
|
class VerticalMenuItem {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-vertical-menu.mjs","sources":["../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-container.ts","../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-container.html","../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-item.ts","../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-item.html","../../projects/koala-ui/shared/components/vertical-menu/koalarx-ui-shared-components-vertical-menu.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'kl-vertical-menu-container',\n templateUrl: './vertical-menu-container.html',\n})\nexport class VerticalMenuContainer {}\n","<ul class=\"menu rounded-box w-
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-vertical-menu.mjs","sources":["../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-container.ts","../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-container.html","../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-item.ts","../../projects/koala-ui/shared/components/vertical-menu/vertical-menu-item.html","../../projects/koala-ui/shared/components/vertical-menu/koalarx-ui-shared-components-vertical-menu.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'kl-vertical-menu-container',\n templateUrl: './vertical-menu-container.html',\n})\nexport class VerticalMenuContainer {}\n","<ul class=\"menu rounded-box w-full\">\n <li class=\"menu-title\">\n <ng-content select=\"[title]\" />\n </li>\n <ng-content select=\"[items]\" />\n</ul>\n","import { Component, input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\n@Component({\n selector: 'kl-vertical-menu-item',\n templateUrl: './vertical-menu-item.html',\n imports: [RouterLink, RouterLinkActive],\n})\nexport class VerticalMenuItem {\n link = input.required<string>();\n}\n","<li>\n <a class=\"opacity-70\"\n [routerLink]=\"link()\"\n routerLinkActive=\"opacity-100\">\n <ng-content />\n </a>\n</li>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,qBAAqB,CAAA;uGAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,sFCNlC,mKAMA,EAAA,CAAA;;2FDAa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;+BAC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/generate-query-selector.ts","../../projects/koala-ui/shared/utils/http-error-feedback-alert.ts","../../projects/koala-ui/shared/utils/koalarx-ui-shared-utils.ts"],"sourcesContent":["export function isEmpty(value: any) {\n return value === null || value === undefined || value === ''\n}\n","export function generateQuerySelector(elem: HTMLElement): string {\n const { tagName, id, className, parentElement } = elem;\n\n let str = '';\n\n if (id !== '' && id.match(/^[a-z].*/)) {\n str += `#${id}`;\n return str;\n }\n\n str = tagName.toLowerCase();\n\n if (className) {\n str +=\n '.' +\n className\n .replace(/(^\\s)/gm, '')\n .replace(/(\\s{2,})/gm, ' ')\n .split(/\\s/)\n .filter((c) => !/[[,\\]]/.test(c))\n .join('.');\n }\n\n const needNthPart = (el: HTMLElement): boolean => {\n let sib = el.previousElementSibling;\n\n if (!el.className) {\n return true;\n }\n\n while (sib) {\n if (el.className !== sib.className) {\n return false;\n }\n\n sib = sib.previousElementSibling;\n }\n\n return false;\n };\n\n const getNthPart = (el: HTMLElement): string => {\n let childIndex = 1;\n\n let sib = el.previousElementSibling;\n while (sib) {\n childIndex++;\n sib = sib.previousElementSibling;\n }\n\n return `:nth-child(${childIndex})`;\n };\n\n if (needNthPart(elem)) {\n str += getNthPart(elem);\n }\n\n if (!parentElement) {\n return str;\n }\n\n return `${generateQuerySelector(parentElement)} > ${str}`;\n}\n","import { HttpErrorResponse } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { AppConfig } from '@koalarx/ui/core/config';\r\nimport { Snackbar } from '@koalarx/ui/shared/components/snackbar';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class HttpErrorFeedbackAlert {\r\n private readonly snackbar = inject(Snackbar);\r\n private readonly appConfig = inject(AppConfig);\r\n\r\n tapError(error: HttpErrorResponse) {\r\n const httpClientErrorsMiddleware =\r\n this.appConfig.httpClientErrorsMiddleware;\r\n const translations = this.appConfig.translation.feedbackRequestInterceptor;\r\n const statusCode = error.status.toString();\r\n\r\n if (statusCode.charAt(0) === '4') {\r\n console.warn(error);\r\n\r\n this.snackbar.warning(\r\n httpClientErrorsMiddleware?.handleError(error) ??\r\n (translations as any)[statusCode]\r\n );\r\n return;\r\n } else if (statusCode.charAt(0) === '5') {\r\n console.error(error);\r\n\r\n this.snackbar.error(\r\n httpClientErrorsMiddleware?.handleError(error) ??\r\n (translations as any)[statusCode]\r\n );\r\n return;\r\n } else {\r\n console.info(error);\r\n\r\n this.snackbar.info(\r\n httpClientErrorsMiddleware?.handleError(error) ??\r\n translations.unknowError\r\n );\r\n return;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAM,SAAU,OAAO,CAAC,KAAU,EAAA;IAChC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;AAC9D;;ACFM,SAAU,qBAAqB,CAAC,IAAiB,EAAA;IACrD,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI;IAEtD,IAAI,GAAG,GAAG,EAAE;IAEZ,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;AACrC,QAAA,GAAG,IAAI,CAAA,CAAA,EAAI,EAAE,CAAA,CAAE;AACf,QAAA,OAAO,GAAG;;AAGZ,IAAA,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE;IAE3B,IAAI,SAAS,EAAE;QACb,GAAG;YACD,GAAG;gBACH;AACG,qBAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,qBAAA,OAAO,CAAC,YAAY,EAAE,GAAG;qBACzB,KAAK,CAAC,IAAI;AACV,qBAAA,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-utils.mjs","sources":["../../projects/koala-ui/shared/utils/is-empty.ts","../../projects/koala-ui/shared/utils/generate-query-selector.ts","../../projects/koala-ui/shared/utils/http-error-feedback-alert.ts","../../projects/koala-ui/shared/utils/koalarx-ui-shared-utils.ts"],"sourcesContent":["export function isEmpty(value: any) {\n return value === null || value === undefined || value === ''\n}\n","export function generateQuerySelector(elem: HTMLElement): string {\n const { tagName, id, className, parentElement } = elem;\n\n let str = '';\n\n if (id !== '' && id.match(/^[a-z].*/)) {\n str += `#${id}`;\n return str;\n }\n\n str = tagName.toLowerCase();\n\n if (className) {\n str +=\n '.' +\n className\n .replace(/(^\\s)/gm, '')\n .replace(/(\\s{2,})/gm, ' ')\n .split(/\\s/)\n .filter((c) => !/[[,\\],:]/.test(c))\n .join('.');\n }\n\n const needNthPart = (el: HTMLElement): boolean => {\n let sib = el.previousElementSibling;\n\n if (!el.className) {\n return true;\n }\n\n while (sib) {\n if (el.className !== sib.className) {\n return false;\n }\n\n sib = sib.previousElementSibling;\n }\n\n return false;\n };\n\n const getNthPart = (el: HTMLElement): string => {\n let childIndex = 1;\n\n let sib = el.previousElementSibling;\n while (sib) {\n childIndex++;\n sib = sib.previousElementSibling;\n }\n\n return `:nth-child(${childIndex})`;\n };\n\n if (needNthPart(elem)) {\n str += getNthPart(elem);\n }\n\n if (!parentElement) {\n return str;\n }\n\n return `${generateQuerySelector(parentElement)} > ${str}`;\n}\n","import { HttpErrorResponse } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { AppConfig } from '@koalarx/ui/core/config';\r\nimport { Snackbar } from '@koalarx/ui/shared/components/snackbar';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class HttpErrorFeedbackAlert {\r\n private readonly snackbar = inject(Snackbar);\r\n private readonly appConfig = inject(AppConfig);\r\n\r\n tapError(error: HttpErrorResponse) {\r\n const httpClientErrorsMiddleware =\r\n this.appConfig.httpClientErrorsMiddleware;\r\n const translations = this.appConfig.translation.feedbackRequestInterceptor;\r\n const statusCode = error.status.toString();\r\n\r\n if (statusCode.charAt(0) === '4') {\r\n console.warn(error);\r\n\r\n this.snackbar.warning(\r\n httpClientErrorsMiddleware?.handleError(error) ??\r\n (translations as any)[statusCode]\r\n );\r\n return;\r\n } else if (statusCode.charAt(0) === '5') {\r\n console.error(error);\r\n\r\n this.snackbar.error(\r\n httpClientErrorsMiddleware?.handleError(error) ??\r\n (translations as any)[statusCode]\r\n );\r\n return;\r\n } else {\r\n console.info(error);\r\n\r\n this.snackbar.info(\r\n httpClientErrorsMiddleware?.handleError(error) ??\r\n translations.unknowError\r\n );\r\n return;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAM,SAAU,OAAO,CAAC,KAAU,EAAA;IAChC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;AAC9D;;ACFM,SAAU,qBAAqB,CAAC,IAAiB,EAAA;IACrD,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI;IAEtD,IAAI,GAAG,GAAG,EAAE;IAEZ,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;AACrC,QAAA,GAAG,IAAI,CAAA,CAAA,EAAI,EAAE,CAAA,CAAE;AACf,QAAA,OAAO,GAAG;;AAGZ,IAAA,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE;IAE3B,IAAI,SAAS,EAAE;QACb,GAAG;YACD,GAAG;gBACH;AACG,qBAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,qBAAA,OAAO,CAAC,YAAY,EAAE,GAAG;qBACzB,KAAK,CAAC,IAAI;AACV,qBAAA,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;qBACjC,IAAI,CAAC,GAAG,CAAC;;AAGhB,IAAA,MAAM,WAAW,GAAG,CAAC,EAAe,KAAa;AAC/C,QAAA,IAAI,GAAG,GAAG,EAAE,CAAC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