@vallift/ngl 22.0.4 → 22.0.5
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/vallift-ngl.mjs +401 -82
- package/fesm2022/vallift-ngl.mjs.map +1 -1
- package/package.json +1 -1
- package/types/vallift-ngl.d.ts +128 -46
package/fesm2022/vallift-ngl.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, signal, input, output, Component, Input, ElementRef, DOCUMENT, Renderer2, EventEmitter, Output, RendererFactory2, HostListener, Directive, computed, ChangeDetectorRef, model, ViewChild, EnvironmentInjector, ApplicationRef, Injector, createComponent, Inject, Pipe, ViewContainerRef, ContentChildren, ChangeDetectionStrategy, effect, viewChild, DestroyRef, ViewChildren, makeEnvironmentProviders, PLATFORM_ID, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable, signal, input, output, Component, Input, ElementRef, DOCUMENT, Renderer2, EventEmitter, Output, RendererFactory2, HostListener, Directive, computed, ChangeDetectorRef, model, ViewChild, EnvironmentInjector, ApplicationRef, Injector, createComponent, Inject, Pipe, ViewContainerRef, ContentChildren, ChangeDetectionStrategy, effect, viewChild, DestroyRef, ViewChildren, resource, makeEnvironmentProviders, PLATFORM_ID, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common/http';
|
|
4
4
|
import { HttpClient, HttpHeaders, HttpRequest } from '@angular/common/http';
|
|
5
5
|
import { retry, throwError, Subject, debounceTime, of, fromEvent, filter as filter$1, take, combineLatest } from 'rxjs';
|
|
@@ -17,7 +17,15 @@ import { NgxMaskDirective, provideEnvironmentNgxMask } from 'ngx-mask';
|
|
|
17
17
|
import * as i2 from '@angular/platform-browser';
|
|
18
18
|
import { isValidDate } from 'rxjs/internal/util/isDate';
|
|
19
19
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
20
|
+
import { validateAsync, validate, required, min, max } from '@angular/forms/signals';
|
|
20
21
|
|
|
22
|
+
const DEFAULT_NGL_INPUT_CONFIG = {
|
|
23
|
+
appearance: 'outline',
|
|
24
|
+
size: 'md',
|
|
25
|
+
};
|
|
26
|
+
const DEFAULT_NGL_BUTTON_CONFIG = {
|
|
27
|
+
size: 'md',
|
|
28
|
+
};
|
|
21
29
|
const NGL_CONFIG = new InjectionToken('NGL_CONFIG');
|
|
22
30
|
|
|
23
31
|
class BaseApiService {
|
|
@@ -7462,7 +7470,52 @@ function getFloatingOutlineLabelClasses(size, hasAbsolutePrefixIcon) {
|
|
|
7462
7470
|
peer-[:not(:placeholder-shown)]:px-1 peer-[:not(:placeholder-shown)]:bg-page`;
|
|
7463
7471
|
}
|
|
7464
7472
|
|
|
7465
|
-
|
|
7473
|
+
const defaultSignalFormErrors = {
|
|
7474
|
+
required: () => 'Required',
|
|
7475
|
+
email: () => 'Enter a valid email address',
|
|
7476
|
+
minLength: (error) => {
|
|
7477
|
+
const minLength = error.minLength;
|
|
7478
|
+
return minLength != null
|
|
7479
|
+
? `Minimum ${minLength} characters required`
|
|
7480
|
+
: 'Minimum characters required';
|
|
7481
|
+
},
|
|
7482
|
+
maxLength: (error) => {
|
|
7483
|
+
const maxLength = error.maxLength;
|
|
7484
|
+
return maxLength != null
|
|
7485
|
+
? `Maximum ${maxLength} characters allowed`
|
|
7486
|
+
: 'Maximum characters allowed';
|
|
7487
|
+
},
|
|
7488
|
+
pattern: () => 'Invalid value',
|
|
7489
|
+
min: (error) => {
|
|
7490
|
+
const minValue = error.min;
|
|
7491
|
+
return minValue != null ? `Minimum ${minValue} required` : 'Minimum value required';
|
|
7492
|
+
},
|
|
7493
|
+
max: (error) => {
|
|
7494
|
+
const maxValue = error.max;
|
|
7495
|
+
return maxValue != null ? `Maximum ${maxValue} allowed` : 'Maximum value allowed';
|
|
7496
|
+
},
|
|
7497
|
+
minDate: () => 'Date is too early',
|
|
7498
|
+
maxDate: () => 'Date is too late',
|
|
7499
|
+
invalidDate: () => 'Invalid date',
|
|
7500
|
+
invalidDateRange: () => 'End date must be on or after the start date',
|
|
7501
|
+
matchFields: () => 'Values do not match',
|
|
7502
|
+
phone: () => 'Enter a valid phone number',
|
|
7503
|
+
integerOnly: () => 'Must be a whole number',
|
|
7504
|
+
unique: () => 'Value is already taken',
|
|
7505
|
+
};
|
|
7506
|
+
const SIGNAL_FORM_ERRORS = new InjectionToken('SIGNAL_FORM_ERRORS', {
|
|
7507
|
+
providedIn: 'root',
|
|
7508
|
+
factory: () => defaultSignalFormErrors,
|
|
7509
|
+
});
|
|
7510
|
+
|
|
7511
|
+
function defaultMessageForKind(kind, error, customMessages) {
|
|
7512
|
+
const resolver = customMessages[kind];
|
|
7513
|
+
if (resolver) {
|
|
7514
|
+
const resolved = resolver(error);
|
|
7515
|
+
if (resolved) {
|
|
7516
|
+
return resolved;
|
|
7517
|
+
}
|
|
7518
|
+
}
|
|
7466
7519
|
switch (kind) {
|
|
7467
7520
|
case 'required':
|
|
7468
7521
|
return 'Required';
|
|
@@ -7482,11 +7535,35 @@ function defaultMessageForKind(kind, error) {
|
|
|
7482
7535
|
}
|
|
7483
7536
|
case 'pattern':
|
|
7484
7537
|
return 'Invalid value';
|
|
7538
|
+
case 'min': {
|
|
7539
|
+
const minValue = error.min;
|
|
7540
|
+
return minValue != null ? `Minimum ${minValue} required` : 'Minimum value required';
|
|
7541
|
+
}
|
|
7542
|
+
case 'max': {
|
|
7543
|
+
const maxValue = error.max;
|
|
7544
|
+
return maxValue != null ? `Maximum ${maxValue} allowed` : 'Maximum value allowed';
|
|
7545
|
+
}
|
|
7546
|
+
case 'minDate':
|
|
7547
|
+
return 'Date is too early';
|
|
7548
|
+
case 'maxDate':
|
|
7549
|
+
return 'Date is too late';
|
|
7550
|
+
case 'invalidDate':
|
|
7551
|
+
return 'Invalid date';
|
|
7552
|
+
case 'invalidDateRange':
|
|
7553
|
+
return 'End date must be on or after the start date';
|
|
7554
|
+
case 'matchFields':
|
|
7555
|
+
return 'Values do not match';
|
|
7556
|
+
case 'phone':
|
|
7557
|
+
return 'Enter a valid phone number';
|
|
7558
|
+
case 'integerOnly':
|
|
7559
|
+
return 'Must be a whole number';
|
|
7560
|
+
case 'unique':
|
|
7561
|
+
return 'Value is already taken';
|
|
7485
7562
|
default:
|
|
7486
7563
|
return 'Invalid value';
|
|
7487
7564
|
}
|
|
7488
7565
|
}
|
|
7489
|
-
function getSignalValidationErrorMessage(errors) {
|
|
7566
|
+
function getSignalValidationErrorMessage(errors, customMessages = defaultSignalFormErrors) {
|
|
7490
7567
|
if (!errors.length) {
|
|
7491
7568
|
return null;
|
|
7492
7569
|
}
|
|
@@ -7494,13 +7571,11 @@ function getSignalValidationErrorMessage(errors) {
|
|
|
7494
7571
|
if (error.message) {
|
|
7495
7572
|
return error.message;
|
|
7496
7573
|
}
|
|
7497
|
-
|
|
7498
|
-
// return customMessages[error.kind];
|
|
7499
|
-
// }
|
|
7500
|
-
return defaultMessageForKind(error.kind, error);
|
|
7574
|
+
return defaultMessageForKind(error.kind, error, customMessages);
|
|
7501
7575
|
}
|
|
7502
7576
|
|
|
7503
7577
|
class BaseFormControl {
|
|
7578
|
+
signalFormErrors = inject(SIGNAL_FORM_ERRORS);
|
|
7504
7579
|
value = model(null, /* @ts-ignore */
|
|
7505
7580
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
7506
7581
|
errors = input([], /* @ts-ignore */
|
|
@@ -7519,7 +7594,7 @@ class BaseFormControl {
|
|
|
7519
7594
|
...(ngDevMode ? [{ debugName: "showRequiredIndicator" }] : /* istanbul ignore next */ []));
|
|
7520
7595
|
showError = computed(() => this.invalid() && this.touched(), /* @ts-ignore */
|
|
7521
7596
|
...(ngDevMode ? [{ debugName: "showError" }] : /* istanbul ignore next */ []));
|
|
7522
|
-
errorMessage = computed(() => getSignalValidationErrorMessage(this.errors()), /* @ts-ignore */
|
|
7597
|
+
errorMessage = computed(() => getSignalValidationErrorMessage(this.errors(), this.signalFormErrors), /* @ts-ignore */
|
|
7523
7598
|
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
7524
7599
|
setValue(value) {
|
|
7525
7600
|
if (this.disabled()) {
|
|
@@ -7543,8 +7618,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
7543
7618
|
type: Directive
|
|
7544
7619
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], isFocused: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFocused", required: false }] }, { type: i0.Output, args: ["isFocusedChange"] }] } });
|
|
7545
7620
|
|
|
7621
|
+
class BaseSignalTextInputControl extends BaseFormControl {
|
|
7622
|
+
nglConfig = inject(NGL_CONFIG, { optional: true });
|
|
7623
|
+
appearance = input(this.nglConfig?.input?.appearance ?? DEFAULT_NGL_INPUT_CONFIG.appearance, /* @ts-ignore */
|
|
7624
|
+
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
7625
|
+
size = input(this.nglConfig?.input?.size ?? DEFAULT_NGL_INPUT_CONFIG.size, /* @ts-ignore */
|
|
7626
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7627
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseSignalTextInputControl, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
7628
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: BaseSignalTextInputControl, isStandalone: true, inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
7629
|
+
}
|
|
7630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseSignalTextInputControl, decorators: [{
|
|
7631
|
+
type: Directive
|
|
7632
|
+
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
7633
|
+
|
|
7546
7634
|
let nextInputId = 0;
|
|
7547
|
-
class SignalTextField extends
|
|
7635
|
+
class SignalTextField extends BaseSignalTextInputControl {
|
|
7548
7636
|
// Label & content
|
|
7549
7637
|
label = input('', /* @ts-ignore */
|
|
7550
7638
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -7558,11 +7646,6 @@ class SignalTextField extends BaseFormControl {
|
|
|
7558
7646
|
readonly = input(false, /* @ts-ignore */
|
|
7559
7647
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
7560
7648
|
maskPattern = input(null, { ...(ngDevMode ? { debugName: "maskPattern" } : /* istanbul ignore next */ {}), alias: 'mask' });
|
|
7561
|
-
// Appearance
|
|
7562
|
-
appearance = input('outline', /* @ts-ignore */
|
|
7563
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
7564
|
-
size = input('md', /* @ts-ignore */
|
|
7565
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7566
7649
|
// Adornments
|
|
7567
7650
|
prefixText = input('', /* @ts-ignore */
|
|
7568
7651
|
...(ngDevMode ? [{ debugName: "prefixText" }] : /* istanbul ignore next */ []));
|
|
@@ -7689,12 +7772,12 @@ class SignalTextField extends BaseFormControl {
|
|
|
7689
7772
|
}
|
|
7690
7773
|
}
|
|
7691
7774
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7692
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalTextField, isStandalone: true, selector: "lib-signal-text-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, inputType: { classPropertyName: "inputType", publicName: "inputType", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, maskPattern: { classPropertyName: "maskPattern", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", enter: "enter", clear: "clear", keyDown: "keyDown", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n <input\n #inputRef\n class=\"h-full w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [type]=\"inputType()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.pattern]=\"pattern()[0]?.source ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (hasAbsolutePostfixIcon() || (showInFieldHint() && !hasPostfixText()) || hasAbsoluteClear()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }] });
|
|
7775
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalTextField, isStandalone: true, selector: "lib-signal-text-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, inputType: { classPropertyName: "inputType", publicName: "inputType", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, maskPattern: { classPropertyName: "maskPattern", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", enter: "enter", clear: "clear", keyDown: "keyDown", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n <input\n #inputRef\n class=\"h-full w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [type]=\"inputType()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.pattern]=\"pattern()[0]?.source ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (hasAbsolutePostfixIcon() || (showInFieldHint() && !hasPostfixText()) || hasAbsoluteClear()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }] });
|
|
7693
7776
|
}
|
|
7694
7777
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextField, decorators: [{
|
|
7695
7778
|
type: Component,
|
|
7696
7779
|
args: [{ selector: 'lib-signal-text-field', imports: [AppSvgIconComponent, BaseSignalInput, HintIcon, NgxMaskDirective], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n <input\n #inputRef\n class=\"h-full w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [type]=\"inputType()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.pattern]=\"pattern()[0]?.source ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (hasAbsolutePostfixIcon() || (showInFieldHint() && !hasPostfixText()) || hasAbsoluteClear()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
7697
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], inputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputType", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], maskPattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }],
|
|
7780
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], inputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputType", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], maskPattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], enter: [{ type: i0.Output, args: ["enter"] }], clear: [{ type: i0.Output, args: ["clear"] }], keyDown: [{ type: i0.Output, args: ["keyDown"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], inputRef: [{
|
|
7698
7781
|
type: ViewChild,
|
|
7699
7782
|
args: ['inputRef']
|
|
7700
7783
|
}] } });
|
|
@@ -7842,17 +7925,13 @@ function commitNumberValue(value, min, max, step) {
|
|
|
7842
7925
|
}
|
|
7843
7926
|
|
|
7844
7927
|
let nextNumberFieldId = 0;
|
|
7845
|
-
class SignalNumberField extends
|
|
7928
|
+
class SignalNumberField extends BaseSignalTextInputControl {
|
|
7846
7929
|
label = input('', /* @ts-ignore */
|
|
7847
7930
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
7848
7931
|
placeholder = input('', /* @ts-ignore */
|
|
7849
7932
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
7850
7933
|
hint = input('', /* @ts-ignore */
|
|
7851
7934
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
7852
|
-
appearance = input('outline', /* @ts-ignore */
|
|
7853
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
7854
|
-
size = input('md', /* @ts-ignore */
|
|
7855
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7856
7935
|
readonly = input(false, /* @ts-ignore */
|
|
7857
7936
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
7858
7937
|
prefixText = input('', /* @ts-ignore */
|
|
@@ -8014,14 +8093,14 @@ class SignalNumberField extends BaseFormControl {
|
|
|
8014
8093
|
}
|
|
8015
8094
|
}
|
|
8016
8095
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalNumberField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8017
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalNumberField, isStandalone: true, selector: "lib-signal-number-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, numberMin: { classPropertyName: "numberMin", publicName: "numberMin", isSignal: true, isRequired: false, transformFunction: null }, numberMax: { classPropertyName: "numberMax", publicName: "numberMax", isSignal: true, isRequired: false, transformFunction: null }, numberStep: { classPropertyName: "numberStep", publicName: "numberStep", isSignal: true, isRequired: false, transformFunction: null }, hideSpinButtons: { classPropertyName: "hideSpinButtons", publicName: "hideSpinButtons", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", enter: "enter", clear: "clear", keyDown: "keyDown", postfixIconClick: "postfixIconClick" }, host: { properties: { "class.hide-number-spin": "hideSpinButtons()" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n <input\n #inputRef\n class=\"h-full w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n type=\"number\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"numberInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.min]=\"numberMin() ?? null\"\n [attr.max]=\"numberMax() ?? null\"\n [attr.step]=\"numberStep() ?? null\"\n [attr.inputmode]=\"inputMode()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (hasAbsolutePostfixIcon() || (showInFieldHint() && !hasPostfixText()) || hasAbsoluteClear()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: [":host(.hide-number-spin) input[type=number]::-webkit-inner-spin-button,:host(.hide-number-spin) input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}:host(.hide-number-spin) input[type=number]{-moz-appearance:textfield}\n"], dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }] });
|
|
8096
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalNumberField, isStandalone: true, selector: "lib-signal-number-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, numberMin: { classPropertyName: "numberMin", publicName: "numberMin", isSignal: true, isRequired: false, transformFunction: null }, numberMax: { classPropertyName: "numberMax", publicName: "numberMax", isSignal: true, isRequired: false, transformFunction: null }, numberStep: { classPropertyName: "numberStep", publicName: "numberStep", isSignal: true, isRequired: false, transformFunction: null }, hideSpinButtons: { classPropertyName: "hideSpinButtons", publicName: "hideSpinButtons", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", enter: "enter", clear: "clear", keyDown: "keyDown", postfixIconClick: "postfixIconClick" }, host: { properties: { "class.hide-number-spin": "hideSpinButtons()" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n <input\n #inputRef\n class=\"h-full w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n type=\"number\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"numberInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.min]=\"numberMin() ?? null\"\n [attr.max]=\"numberMax() ?? null\"\n [attr.step]=\"numberStep() ?? null\"\n [attr.inputmode]=\"inputMode()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (hasAbsolutePostfixIcon() || (showInFieldHint() && !hasPostfixText()) || hasAbsoluteClear()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: [":host(.hide-number-spin) input[type=number]::-webkit-inner-spin-button,:host(.hide-number-spin) input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}:host(.hide-number-spin) input[type=number]{-moz-appearance:textfield}\n"], dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }] });
|
|
8018
8097
|
}
|
|
8019
8098
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalNumberField, decorators: [{
|
|
8020
8099
|
type: Component,
|
|
8021
8100
|
args: [{ selector: 'lib-signal-number-field', imports: [AppSvgIconComponent, BaseSignalInput, HintIcon], host: {
|
|
8022
8101
|
'[class.hide-number-spin]': 'hideSpinButtons()',
|
|
8023
8102
|
}, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n <input\n #inputRef\n class=\"h-full w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n type=\"number\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"numberInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.min]=\"numberMin() ?? null\"\n [attr.max]=\"numberMax() ?? null\"\n [attr.step]=\"numberStep() ?? null\"\n [attr.inputmode]=\"inputMode()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (hasAbsolutePostfixIcon() || (showInFieldHint() && !hasPostfixText()) || hasAbsoluteClear()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: [":host(.hide-number-spin) input[type=number]::-webkit-inner-spin-button,:host(.hide-number-spin) input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}:host(.hide-number-spin) input[type=number]{-moz-appearance:textfield}\n"] }]
|
|
8024
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }],
|
|
8103
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], numberMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberMin", required: false }] }], numberMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberMax", required: false }] }], numberStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberStep", required: false }] }], hideSpinButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideSpinButtons", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], enter: [{ type: i0.Output, args: ["enter"] }], clear: [{ type: i0.Output, args: ["clear"] }], keyDown: [{ type: i0.Output, args: ["keyDown"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], inputRef: [{
|
|
8025
8104
|
type: ViewChild,
|
|
8026
8105
|
args: ['inputRef']
|
|
8027
8106
|
}] } });
|
|
@@ -8538,7 +8617,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
8538
8617
|
}], propDecorators: { countries: [{ type: i0.Input, args: [{ isSignal: true, alias: "countries", required: false }] }], selectedCountry: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCountry", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], listboxLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "listboxLabelledBy", required: false }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], noOptionsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noOptionsMessage", required: false }] }], countrySelected: [{ type: i0.Output, args: ["countrySelected"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], searchField: [{ type: i0.ViewChild, args: ['searchField', { isSignal: true }] }] } });
|
|
8539
8618
|
|
|
8540
8619
|
let nextPhoneFieldId = 0;
|
|
8541
|
-
class SignalPhoneNumberField extends
|
|
8620
|
+
class SignalPhoneNumberField extends BaseSignalTextInputControl {
|
|
8542
8621
|
cdr = inject(ChangeDetectorRef);
|
|
8543
8622
|
overlay = inject(Overlay);
|
|
8544
8623
|
label = input('', /* @ts-ignore */
|
|
@@ -8547,10 +8626,6 @@ class SignalPhoneNumberField extends BaseFormControl {
|
|
|
8547
8626
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
8548
8627
|
hint = input('', /* @ts-ignore */
|
|
8549
8628
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
8550
|
-
appearance = input('outline', /* @ts-ignore */
|
|
8551
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
8552
|
-
size = input('md', /* @ts-ignore */
|
|
8553
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
8554
8629
|
readonly = input(false, /* @ts-ignore */
|
|
8555
8630
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
8556
8631
|
phoneNumbers = input(phoneNumbersAll, /* @ts-ignore */
|
|
@@ -8796,7 +8871,7 @@ class SignalPhoneNumberField extends BaseFormControl {
|
|
|
8796
8871
|
}
|
|
8797
8872
|
}
|
|
8798
8873
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalPhoneNumberField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8799
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalPhoneNumberField, isStandalone: true, selector: "lib-signal-phone-number-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, phoneNumbers: { classPropertyName: "phoneNumbers", publicName: "phoneNumbers", isSignal: true, isRequired: false, transformFunction: null }, defaultCountryId: { classPropertyName: "defaultCountryId", publicName: "defaultCountryId", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", enter: "enter", clear: "clear", keyDown: "keyDown", countryChange: "countryChange" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "countryButton", first: true, predicate: ["countryButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n <button\n #countryButton\n type=\"button\"\n class=\"flex shrink-0 items-center gap-1 self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption cursor-pointer transition-colors duration-200 ease-in-out hover:bg-page-secondary/80 disabled:cursor-not-allowed\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isCountryPickerOpen() && !showError() && !disabled()\"\n [id]=\"countryButtonId()\"\n [disabled]=\"disabled() || readonly()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isCountryPickerOpen()\"\n [attr.aria-controls]=\"countryButtonId() + '-panel'\"\n (click)=\"toggleCountryPicker()\"\n (keydown)=\"onCountryButtonKeyDown($event)\">\n <span class=\"text-base leading-none\" aria-hidden=\"true\">{{ selectedCountry().flag }}</span>\n <span>+{{ selectedCountry().dialCode }}</span>\n <span\n class=\"flex items-center justify-center\"\n [class.rotate-180]=\"isCountryPickerOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </button>\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"tel\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [mask]=\"activeMask()\"\n [showMaskTyped]=\"isFocused()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"nationalInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.inputmode]=\"'tel'\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (hasAbsoluteClear() || showInFieldHint()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"countryButton\"\n [cdkConnectedOverlayOpen]=\"isCountryPickerOpen()\"\n (overlayOutsideClick)=\"closeCountryPicker()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-phone-country-panel\n [panelId]=\"countryButtonId() + '-panel'\"\n [countries]=\"countries()\"\n [selectedCountry]=\"selectedCountry()\"\n [iconSize]=\"iconSize()\"\n [panelWidth]=\"countryPanelWidth()\"\n [listboxLabelledBy]=\"countryButtonId()\"\n (countrySelected)=\"onCountrySelected($event)\"\n (dismissed)=\"closeCountryPicker()\" />\n </ng-template>\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: SignalPhoneCountryPanelComponent, selector: "lib-signal-phone-country-panel", inputs: ["countries", "selectedCountry", "iconSize", "panelWidth", "listboxLabelledBy", "panelId", "noOptionsMessage"], outputs: ["countrySelected", "dismissed"] }] });
|
|
8874
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalPhoneNumberField, isStandalone: true, selector: "lib-signal-phone-number-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, phoneNumbers: { classPropertyName: "phoneNumbers", publicName: "phoneNumbers", isSignal: true, isRequired: false, transformFunction: null }, defaultCountryId: { classPropertyName: "defaultCountryId", publicName: "defaultCountryId", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", enter: "enter", clear: "clear", keyDown: "keyDown", countryChange: "countryChange" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "countryButton", first: true, predicate: ["countryButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n <button\n #countryButton\n type=\"button\"\n class=\"flex shrink-0 items-center gap-1 self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption cursor-pointer transition-colors duration-200 ease-in-out hover:bg-page-secondary/80 disabled:cursor-not-allowed\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isCountryPickerOpen() && !showError() && !disabled()\"\n [id]=\"countryButtonId()\"\n [disabled]=\"disabled() || readonly()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isCountryPickerOpen()\"\n [attr.aria-controls]=\"countryButtonId() + '-panel'\"\n (click)=\"toggleCountryPicker()\"\n (keydown)=\"onCountryButtonKeyDown($event)\">\n <span class=\"text-base leading-none\" aria-hidden=\"true\">{{ selectedCountry().flag }}</span>\n <span>+{{ selectedCountry().dialCode }}</span>\n <span\n class=\"flex items-center justify-center\"\n [class.rotate-180]=\"isCountryPickerOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </button>\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"tel\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [mask]=\"activeMask()\"\n [showMaskTyped]=\"isFocused()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"nationalInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.inputmode]=\"'tel'\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (hasAbsoluteClear() || showInFieldHint()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"countryButton\"\n [cdkConnectedOverlayOpen]=\"isCountryPickerOpen()\"\n (overlayOutsideClick)=\"closeCountryPicker()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-phone-country-panel\n [panelId]=\"countryButtonId() + '-panel'\"\n [countries]=\"countries()\"\n [selectedCountry]=\"selectedCountry()\"\n [iconSize]=\"iconSize()\"\n [panelWidth]=\"countryPanelWidth()\"\n [listboxLabelledBy]=\"countryButtonId()\"\n (countrySelected)=\"onCountrySelected($event)\"\n (dismissed)=\"closeCountryPicker()\" />\n </ng-template>\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: SignalPhoneCountryPanelComponent, selector: "lib-signal-phone-country-panel", inputs: ["countries", "selectedCountry", "iconSize", "panelWidth", "listboxLabelledBy", "panelId", "noOptionsMessage"], outputs: ["countrySelected", "dismissed"] }] });
|
|
8800
8875
|
}
|
|
8801
8876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalPhoneNumberField, decorators: [{
|
|
8802
8877
|
type: Component,
|
|
@@ -8807,7 +8882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
8807
8882
|
NgxMaskDirective,
|
|
8808
8883
|
SignalPhoneCountryPanelComponent,
|
|
8809
8884
|
], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n <button\n #countryButton\n type=\"button\"\n class=\"flex shrink-0 items-center gap-1 self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption cursor-pointer transition-colors duration-200 ease-in-out hover:bg-page-secondary/80 disabled:cursor-not-allowed\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"isCountryPickerOpen() && !showError() && !disabled()\"\n [id]=\"countryButtonId()\"\n [disabled]=\"disabled() || readonly()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isCountryPickerOpen()\"\n [attr.aria-controls]=\"countryButtonId() + '-panel'\"\n (click)=\"toggleCountryPicker()\"\n (keydown)=\"onCountryButtonKeyDown($event)\">\n <span class=\"text-base leading-none\" aria-hidden=\"true\">{{ selectedCountry().flag }}</span>\n <span>+{{ selectedCountry().dialCode }}</span>\n <span\n class=\"flex items-center justify-center\"\n [class.rotate-180]=\"isCountryPickerOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </button>\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"tel\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [mask]=\"activeMask()\"\n [showMaskTyped]=\"isFocused()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"nationalInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.inputmode]=\"'tel'\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onKeyDown($event)\">\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isCountryPickerOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (hasAbsoluteClear() || showInFieldHint()) {\n <div\n class=\"absolute inset-y-0 right-0 flex items-center gap-0.5\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"countryButton\"\n [cdkConnectedOverlayOpen]=\"isCountryPickerOpen()\"\n (overlayOutsideClick)=\"closeCountryPicker()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-phone-country-panel\n [panelId]=\"countryButtonId() + '-panel'\"\n [countries]=\"countries()\"\n [selectedCountry]=\"selectedCountry()\"\n [iconSize]=\"iconSize()\"\n [panelWidth]=\"countryPanelWidth()\"\n [listboxLabelledBy]=\"countryButtonId()\"\n (countrySelected)=\"onCountrySelected($event)\"\n (dismissed)=\"closeCountryPicker()\" />\n </ng-template>\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
8810
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }],
|
|
8885
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], phoneNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "phoneNumbers", required: false }] }], defaultCountryId: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCountryId", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], enter: [{ type: i0.Output, args: ["enter"] }], clear: [{ type: i0.Output, args: ["clear"] }], keyDown: [{ type: i0.Output, args: ["keyDown"] }], countryChange: [{ type: i0.Output, args: ["countryChange"] }], inputRef: [{
|
|
8811
8886
|
type: ViewChild,
|
|
8812
8887
|
args: ['inputRef']
|
|
8813
8888
|
}], countryButton: [{
|
|
@@ -8844,7 +8919,7 @@ function getAbsoluteTrailingTopClasses(size) {
|
|
|
8844
8919
|
}
|
|
8845
8920
|
|
|
8846
8921
|
let nextTextareaId = 0;
|
|
8847
|
-
class SignalTextarea extends
|
|
8922
|
+
class SignalTextarea extends BaseSignalTextInputControl {
|
|
8848
8923
|
// Label & content
|
|
8849
8924
|
label = input('', /* @ts-ignore */
|
|
8850
8925
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -8859,11 +8934,6 @@ class SignalTextarea extends BaseFormControl {
|
|
|
8859
8934
|
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
8860
8935
|
resize = input('vertical', /* @ts-ignore */
|
|
8861
8936
|
...(ngDevMode ? [{ debugName: "resize" }] : /* istanbul ignore next */ []));
|
|
8862
|
-
// Appearance
|
|
8863
|
-
appearance = input('outline', /* @ts-ignore */
|
|
8864
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
8865
|
-
size = input('md', /* @ts-ignore */
|
|
8866
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
8867
8937
|
// Native HTML attributes
|
|
8868
8938
|
id = input(/* @ts-ignore */
|
|
8869
8939
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -8956,12 +9026,12 @@ class SignalTextarea extends BaseFormControl {
|
|
|
8956
9026
|
}
|
|
8957
9027
|
}
|
|
8958
9028
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
8959
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalTextarea, isStandalone: true, selector: "lib-signal-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null },
|
|
9029
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalTextarea, isStandalone: true, selector: "lib-signal-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", clear: "clear", keyDown: "keyDown" }, viewQueries: [{ propertyName: "textareaRef", first: true, predicate: ["textareaRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-start w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline' && resize() === 'none'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline' || resize() !== 'none'\"\n [class]=\"appearanceWrapperClasses()\">\n <div class=\"relative flex min-w-0 flex-1 items-start\">\n <textarea\n #textareaRef\n class=\"w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"textareaSizeClasses() + ' ' + horizontalPaddingClasses() + ' ' + textareaResizeClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [rows]=\"rows()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"></textarea>\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showInFieldHint() || showClear()) {\n <div\n class=\"absolute right-0 flex items-center gap-0.5\"\n [class]=\"absoluteTrailingTopClasses()\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (showClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }] });
|
|
8960
9030
|
}
|
|
8961
9031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextarea, decorators: [{
|
|
8962
9032
|
type: Component,
|
|
8963
9033
|
args: [{ selector: 'lib-signal-textarea', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n class=\"relative flex items-start w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline' && resize() === 'none'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline' || resize() !== 'none'\"\n [class]=\"appearanceWrapperClasses()\">\n <div class=\"relative flex min-w-0 flex-1 items-start\">\n <textarea\n #textareaRef\n class=\"w-full transition\n placeholder:text-role-placeholder\n outline-none\n bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"textareaSizeClasses() + ' ' + horizontalPaddingClasses() + ' ' + textareaResizeClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [rows]=\"rows()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (input)=\"updateValue($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"></textarea>\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"isFocused() && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showInFieldHint() || showClear()) {\n <div\n class=\"absolute right-0 flex items-center gap-0.5\"\n [class]=\"absoluteTrailingTopClasses()\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\" />\n }\n @if (showClear()) {\n <button\n type=\"button\"\n (click)=\"onClear()\"\n aria-label=\"Clear\"\n class=\"p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
8964
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }],
|
|
9034
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], clear: [{ type: i0.Output, args: ["clear"] }], keyDown: [{ type: i0.Output, args: ["keyDown"] }], textareaRef: [{
|
|
8965
9035
|
type: ViewChild,
|
|
8966
9036
|
args: ['textareaRef']
|
|
8967
9037
|
}] } });
|
|
@@ -9597,7 +9667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
9597
9667
|
}] });
|
|
9598
9668
|
|
|
9599
9669
|
let nextDropdownId = 0;
|
|
9600
|
-
class SignalDropdown extends
|
|
9670
|
+
class SignalDropdown extends BaseSignalTextInputControl {
|
|
9601
9671
|
cdr = inject(ChangeDetectorRef);
|
|
9602
9672
|
overlay = inject(Overlay);
|
|
9603
9673
|
overlayService = inject(OverlayService);
|
|
@@ -9623,11 +9693,6 @@ class SignalDropdown extends BaseFormControl {
|
|
|
9623
9693
|
// Input configuration
|
|
9624
9694
|
readonly = input(false, /* @ts-ignore */
|
|
9625
9695
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
9626
|
-
// Appearance
|
|
9627
|
-
appearance = input('outline', /* @ts-ignore */
|
|
9628
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
9629
|
-
size = input('md', /* @ts-ignore */
|
|
9630
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
9631
9696
|
// Adornments
|
|
9632
9697
|
prefixText = input('', /* @ts-ignore */
|
|
9633
9698
|
...(ngDevMode ? [{ debugName: "prefixText" }] : /* istanbul ignore next */ []));
|
|
@@ -9937,7 +10002,7 @@ class SignalDropdown extends BaseFormControl {
|
|
|
9937
10002
|
}
|
|
9938
10003
|
}
|
|
9939
10004
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9940
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalDropdown, isStandalone: true, selector: "lib-signal-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valuePath: { classPropertyName: "valuePath", publicName: "valuePath", isSignal: true, isRequired: false, transformFunction: null }, displayPath: { classPropertyName: "displayPath", publicName: "displayPath", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, noOptionsMessage: { classPropertyName: "noOptionsMessage", publicName: "noOptionsMessage", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true }, { propertyName: "peerInputRef", first: true, predicate: ["peerInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #dropdownButton\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n #peerInputRef\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [id]=\"inputId()\"\n [value]=\"peerInputValue()\" />\n }\n\n <button\n #triggerButton\n type=\"button\"\n class=\"relative h-full w-full text-left transition outline-none bg-transparent border-0 rounded-none truncate\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-placeholder]=\"!hasSelection() && !disabled() && !usesPeerFloatingLabel()\"\n [class.text-role-body]=\"hasSelection() && !disabled()\"\n [id]=\"usesPeerFloatingLabel() ? null : inputId()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (click)=\"toggleDropdown()\"\n (focus)=\"onTriggerFocus()\"\n (blur)=\"onTriggerBlur($event)\"\n (keydown)=\"onTriggerKeyDown($event)\">\n {{ triggerDisplayText() }}\n </button>\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggleDropdown()\"\n class=\"flex shrink-0 items-center justify-center p-2 cursor-pointer\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n <span\n class=\"flex items-center justify-center p-2 pointer-events-none\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"dropdownButton\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeDropdown()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-dropdown-panel\n [items]=\"items()\"\n [valuePath]=\"valuePath()\"\n [displayPath]=\"displayPath()\"\n [displayValue]=\"displayValue()\"\n [noOptionsMessage]=\"noOptionsMessage()\"\n [selectedItem]=\"selectedItem()\"\n [iconSize]=\"iconSize()\"\n [dropdownWidth]=\"dropdownWidth()\"\n [listboxLabelledBy]=\"inputId()\"\n (itemSelected)=\"onItemSelected($event)\"\n (dismissed)=\"closeDropdown()\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalDropdownPanelComponent, selector: "lib-signal-dropdown-panel", inputs: ["items", "valuePath", "displayPath", "displayValue", "noOptionsMessage", "selectedItem", "iconSize", "dropdownWidth", "listboxLabelledBy", "fullWidth"], outputs: ["itemSelected", "dismissed"] }] });
|
|
10005
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalDropdown, isStandalone: true, selector: "lib-signal-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valuePath: { classPropertyName: "valuePath", publicName: "valuePath", isSignal: true, isRequired: false, transformFunction: null }, displayPath: { classPropertyName: "displayPath", publicName: "displayPath", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, noOptionsMessage: { classPropertyName: "noOptionsMessage", publicName: "noOptionsMessage", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true }, { propertyName: "peerInputRef", first: true, predicate: ["peerInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #dropdownButton\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n #peerInputRef\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [id]=\"inputId()\"\n [value]=\"peerInputValue()\" />\n }\n\n <button\n #triggerButton\n type=\"button\"\n class=\"relative h-full w-full text-left transition outline-none bg-transparent border-0 rounded-none truncate\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-placeholder]=\"!hasSelection() && !disabled() && !usesPeerFloatingLabel()\"\n [class.text-role-body]=\"hasSelection() && !disabled()\"\n [id]=\"usesPeerFloatingLabel() ? null : inputId()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (click)=\"toggleDropdown()\"\n (focus)=\"onTriggerFocus()\"\n (blur)=\"onTriggerBlur($event)\"\n (keydown)=\"onTriggerKeyDown($event)\">\n {{ triggerDisplayText() }}\n </button>\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggleDropdown()\"\n class=\"flex shrink-0 items-center justify-center p-2 cursor-pointer\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n <span\n class=\"flex items-center justify-center p-2 pointer-events-none\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"dropdownButton\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeDropdown()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-dropdown-panel\n [items]=\"items()\"\n [valuePath]=\"valuePath()\"\n [displayPath]=\"displayPath()\"\n [displayValue]=\"displayValue()\"\n [noOptionsMessage]=\"noOptionsMessage()\"\n [selectedItem]=\"selectedItem()\"\n [iconSize]=\"iconSize()\"\n [dropdownWidth]=\"dropdownWidth()\"\n [listboxLabelledBy]=\"inputId()\"\n (itemSelected)=\"onItemSelected($event)\"\n (dismissed)=\"closeDropdown()\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalDropdownPanelComponent, selector: "lib-signal-dropdown-panel", inputs: ["items", "valuePath", "displayPath", "displayValue", "noOptionsMessage", "selectedItem", "iconSize", "dropdownWidth", "listboxLabelledBy", "fullWidth"], outputs: ["itemSelected", "dismissed"] }] });
|
|
9941
10006
|
}
|
|
9942
10007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDropdown, decorators: [{
|
|
9943
10008
|
type: Component,
|
|
@@ -9948,7 +10013,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
9948
10013
|
HintIcon,
|
|
9949
10014
|
SignalDropdownPanelComponent,
|
|
9950
10015
|
], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #dropdownButton\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n #peerInputRef\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [id]=\"inputId()\"\n [value]=\"peerInputValue()\" />\n }\n\n <button\n #triggerButton\n type=\"button\"\n class=\"relative h-full w-full text-left transition outline-none bg-transparent border-0 rounded-none truncate\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-placeholder]=\"!hasSelection() && !disabled() && !usesPeerFloatingLabel()\"\n [class.text-role-body]=\"hasSelection() && !disabled()\"\n [id]=\"usesPeerFloatingLabel() ? null : inputId()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (click)=\"toggleDropdown()\"\n (focus)=\"onTriggerFocus()\"\n (blur)=\"onTriggerBlur($event)\"\n (keydown)=\"onTriggerKeyDown($event)\">\n {{ triggerDisplayText() }}\n </button>\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggleDropdown()\"\n class=\"flex shrink-0 items-center justify-center p-2 cursor-pointer\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n <span\n class=\"flex items-center justify-center p-2 pointer-events-none\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"dropdownButton\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeDropdown()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-dropdown-panel\n [items]=\"items()\"\n [valuePath]=\"valuePath()\"\n [displayPath]=\"displayPath()\"\n [displayValue]=\"displayValue()\"\n [noOptionsMessage]=\"noOptionsMessage()\"\n [selectedItem]=\"selectedItem()\"\n [iconSize]=\"iconSize()\"\n [dropdownWidth]=\"dropdownWidth()\"\n [listboxLabelledBy]=\"inputId()\"\n (itemSelected)=\"onItemSelected($event)\"\n (dismissed)=\"closeDropdown()\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
9951
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], valuePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePath", required: false }] }], displayPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayPath", required: false }] }], displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: false }] }], noOptionsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noOptionsMessage", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }],
|
|
10016
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], valuePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePath", required: false }] }], displayPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayPath", required: false }] }], displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: false }] }], noOptionsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noOptionsMessage", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], mobilePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobilePresentation", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], triggerButton: [{
|
|
9952
10017
|
type: ViewChild,
|
|
9953
10018
|
args: ['triggerButton']
|
|
9954
10019
|
}], dropdownButton: [{
|
|
@@ -10155,7 +10220,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
10155
10220
|
}] });
|
|
10156
10221
|
|
|
10157
10222
|
let nextMultiSelectDropdownId = 0;
|
|
10158
|
-
class SignalMultiSelectDropdown extends
|
|
10223
|
+
class SignalMultiSelectDropdown extends BaseSignalTextInputControl {
|
|
10159
10224
|
cdr = inject(ChangeDetectorRef);
|
|
10160
10225
|
overlay = inject(Overlay);
|
|
10161
10226
|
overlayService = inject(OverlayService);
|
|
@@ -10181,11 +10246,6 @@ class SignalMultiSelectDropdown extends BaseFormControl {
|
|
|
10181
10246
|
// Input configuration
|
|
10182
10247
|
readonly = input(false, /* @ts-ignore */
|
|
10183
10248
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
10184
|
-
// Appearance
|
|
10185
|
-
appearance = input('outline', /* @ts-ignore */
|
|
10186
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
10187
|
-
size = input('md', /* @ts-ignore */
|
|
10188
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
10189
10249
|
selectionDisplay = input('count', /* @ts-ignore */
|
|
10190
10250
|
...(ngDevMode ? [{ debugName: "selectionDisplay" }] : /* istanbul ignore next */ []));
|
|
10191
10251
|
selectedCountLabel = input('selected', /* @ts-ignore */
|
|
@@ -10546,7 +10606,7 @@ class SignalMultiSelectDropdown extends BaseFormControl {
|
|
|
10546
10606
|
}
|
|
10547
10607
|
}
|
|
10548
10608
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalMultiSelectDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10549
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalMultiSelectDropdown, isStandalone: true, selector: "lib-signal-multi-select-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valuePath: { classPropertyName: "valuePath", publicName: "valuePath", isSignal: true, isRequired: false, transformFunction: null }, displayPath: { classPropertyName: "displayPath", publicName: "displayPath", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, noOptionsMessage: { classPropertyName: "noOptionsMessage", publicName: "noOptionsMessage", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, selectionDisplay: { classPropertyName: "selectionDisplay", publicName: "selectionDisplay", isSignal: true, isRequired: false, transformFunction: null }, selectedCountLabel: { classPropertyName: "selectedCountLabel", publicName: "selectedCountLabel", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, mobileOkLabel: { classPropertyName: "mobileOkLabel", publicName: "mobileOkLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true }, { propertyName: "peerInputRef", first: true, predicate: ["peerInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #dropdownButton\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n #peerInputRef\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [id]=\"inputId()\"\n [value]=\"peerInputValue()\" />\n }\n\n <button\n #triggerButton\n type=\"button\"\n class=\"h-full text-left transition outline-none bg-transparent border-0 rounded-none cursor-pointer\"\n [class.absolute]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.inset-0]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.z-0]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.relative]=\"!(selectionDisplay() === 'chips' && hasSelection())\"\n [class.w-full]=\"!(selectionDisplay() === 'chips' && hasSelection())\"\n [class.truncate]=\"selectionDisplay() !== 'chips'\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-placeholder]=\"!hasSelection() && !disabled() && !usesPeerFloatingLabel()\"\n [class.text-role-body]=\"hasSelection() && !disabled()\"\n [id]=\"usesPeerFloatingLabel() ? null : inputId()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (click)=\"toggleDropdown()\"\n (focus)=\"onTriggerFocus()\"\n (blur)=\"onTriggerBlur($event)\"\n (keydown)=\"onTriggerKeyDown($event)\">\n @if (!(selectionDisplay() === 'chips' && hasSelection())) {\n {{ triggerDisplayText() }}\n }\n </button>\n\n @if (selectionDisplay() === 'chips' && hasSelection()) {\n <div class=\"relative z-10 flex min-w-0 flex-1 flex-wrap items-center gap-1 py-0.5 pointer-events-none\">\n @for (item of selectedItems(); track getItemValue(item)) {\n <span\n class=\"inline-flex max-w-full items-center gap-1 rounded-full bg-page-secondary px-2 py-0.5 text-caption text-role-body\">\n <span class=\"truncate\">{{ getDisplayString(item) }}</span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Remove\"\n class=\"pointer-events-auto inline-flex shrink-0 items-center justify-center rounded-full text-role-caption hover:text-primary-hover\"\n (click)=\"onRemoveItem(item, $event)\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"h-3.5 w-3.5\"\n aria-hidden=\"true\">\n <path d=\"M12 2C17.53 2 22 6.47 22 12C22 17.53 17.53 22 12 22C6.47 22 2 17.53 2 12C2 6.47 6.47 2 12 2ZM15.59 7L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z\" />\n </svg>\n </button>\n </span>\n }\n </div>\n }\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggleDropdown()\"\n class=\"flex shrink-0 items-center justify-center p-2 cursor-pointer\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n <span\n class=\"flex items-center justify-center p-2 pointer-events-none\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"dropdownButton\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeDropdown()\"\n (overlayOutsideClick)=\"closeDropdown()\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-multi-select-dropdown-panel\n [items]=\"items()\"\n [valuePath]=\"valuePath()\"\n [displayPath]=\"displayPath()\"\n [displayValue]=\"displayValue()\"\n [noOptionsMessage]=\"noOptionsMessage()\"\n [selectedValues]=\"currentValues()\"\n [showSelectAll]=\"showSelectAll()\"\n [selectAllLabel]=\"selectAllLabel()\"\n [clearAllLabel]=\"clearAllLabel()\"\n [iconSize]=\"iconSize()\"\n [dropdownWidth]=\"dropdownWidth()\"\n [listboxLabelledBy]=\"inputId()\"\n (valueChange)=\"applyValue($event)\"\n (dismissed)=\"closeDropdown()\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalMultiSelectDropdownPanelComponent, selector: "lib-signal-multi-select-dropdown-panel", inputs: ["items", "valuePath", "displayPath", "displayValue", "noOptionsMessage", "selectedValues", "showSelectAll", "selectAllLabel", "clearAllLabel", "iconSize", "dropdownWidth", "listboxLabelledBy", "fullWidth"], outputs: ["valueChange", "dismissed"] }] });
|
|
10609
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalMultiSelectDropdown, isStandalone: true, selector: "lib-signal-multi-select-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valuePath: { classPropertyName: "valuePath", publicName: "valuePath", isSignal: true, isRequired: false, transformFunction: null }, displayPath: { classPropertyName: "displayPath", publicName: "displayPath", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, noOptionsMessage: { classPropertyName: "noOptionsMessage", publicName: "noOptionsMessage", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, selectionDisplay: { classPropertyName: "selectionDisplay", publicName: "selectionDisplay", isSignal: true, isRequired: false, transformFunction: null }, selectedCountLabel: { classPropertyName: "selectedCountLabel", publicName: "selectedCountLabel", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, mobileOkLabel: { classPropertyName: "mobileOkLabel", publicName: "mobileOkLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true }, { propertyName: "peerInputRef", first: true, predicate: ["peerInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #dropdownButton\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n #peerInputRef\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [id]=\"inputId()\"\n [value]=\"peerInputValue()\" />\n }\n\n <button\n #triggerButton\n type=\"button\"\n class=\"h-full text-left transition outline-none bg-transparent border-0 rounded-none cursor-pointer\"\n [class.absolute]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.inset-0]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.z-0]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.relative]=\"!(selectionDisplay() === 'chips' && hasSelection())\"\n [class.w-full]=\"!(selectionDisplay() === 'chips' && hasSelection())\"\n [class.truncate]=\"selectionDisplay() !== 'chips'\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-placeholder]=\"!hasSelection() && !disabled() && !usesPeerFloatingLabel()\"\n [class.text-role-body]=\"hasSelection() && !disabled()\"\n [id]=\"usesPeerFloatingLabel() ? null : inputId()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (click)=\"toggleDropdown()\"\n (focus)=\"onTriggerFocus()\"\n (blur)=\"onTriggerBlur($event)\"\n (keydown)=\"onTriggerKeyDown($event)\">\n @if (!(selectionDisplay() === 'chips' && hasSelection())) {\n {{ triggerDisplayText() }}\n }\n </button>\n\n @if (selectionDisplay() === 'chips' && hasSelection()) {\n <div class=\"relative z-10 flex min-w-0 flex-1 flex-wrap items-center gap-1 py-0.5 pointer-events-none\">\n @for (item of selectedItems(); track getItemValue(item)) {\n <span\n class=\"inline-flex max-w-full items-center gap-1 rounded-full bg-page-secondary px-2 py-0.5 text-caption text-role-body\">\n <span class=\"truncate\">{{ getDisplayString(item) }}</span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Remove\"\n class=\"pointer-events-auto inline-flex shrink-0 items-center justify-center rounded-full text-role-caption hover:text-primary-hover\"\n (click)=\"onRemoveItem(item, $event)\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"h-3.5 w-3.5\"\n aria-hidden=\"true\">\n <path d=\"M12 2C17.53 2 22 6.47 22 12C22 17.53 17.53 22 12 22C6.47 22 2 17.53 2 12C2 6.47 6.47 2 12 2ZM15.59 7L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z\" />\n </svg>\n </button>\n </span>\n }\n </div>\n }\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggleDropdown()\"\n class=\"flex shrink-0 items-center justify-center p-2 cursor-pointer\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n <span\n class=\"flex items-center justify-center p-2 pointer-events-none\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"dropdownButton\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeDropdown()\"\n (overlayOutsideClick)=\"closeDropdown()\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-multi-select-dropdown-panel\n [items]=\"items()\"\n [valuePath]=\"valuePath()\"\n [displayPath]=\"displayPath()\"\n [displayValue]=\"displayValue()\"\n [noOptionsMessage]=\"noOptionsMessage()\"\n [selectedValues]=\"currentValues()\"\n [showSelectAll]=\"showSelectAll()\"\n [selectAllLabel]=\"selectAllLabel()\"\n [clearAllLabel]=\"clearAllLabel()\"\n [iconSize]=\"iconSize()\"\n [dropdownWidth]=\"dropdownWidth()\"\n [listboxLabelledBy]=\"inputId()\"\n (valueChange)=\"applyValue($event)\"\n (dismissed)=\"closeDropdown()\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalMultiSelectDropdownPanelComponent, selector: "lib-signal-multi-select-dropdown-panel", inputs: ["items", "valuePath", "displayPath", "displayValue", "noOptionsMessage", "selectedValues", "showSelectAll", "selectAllLabel", "clearAllLabel", "iconSize", "dropdownWidth", "listboxLabelledBy", "fullWidth"], outputs: ["valueChange", "dismissed"] }] });
|
|
10550
10610
|
}
|
|
10551
10611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalMultiSelectDropdown, decorators: [{
|
|
10552
10612
|
type: Component,
|
|
@@ -10557,7 +10617,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
10557
10617
|
HintIcon,
|
|
10558
10618
|
SignalMultiSelectDropdownPanelComponent,
|
|
10559
10619
|
], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #dropdownButton\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n #peerInputRef\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [id]=\"inputId()\"\n [value]=\"peerInputValue()\" />\n }\n\n <button\n #triggerButton\n type=\"button\"\n class=\"h-full text-left transition outline-none bg-transparent border-0 rounded-none cursor-pointer\"\n [class.absolute]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.inset-0]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.z-0]=\"selectionDisplay() === 'chips' && hasSelection()\"\n [class.relative]=\"!(selectionDisplay() === 'chips' && hasSelection())\"\n [class.w-full]=\"!(selectionDisplay() === 'chips' && hasSelection())\"\n [class.truncate]=\"selectionDisplay() !== 'chips'\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-placeholder]=\"!hasSelection() && !disabled() && !usesPeerFloatingLabel()\"\n [class.text-role-body]=\"hasSelection() && !disabled()\"\n [id]=\"usesPeerFloatingLabel() ? null : inputId()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n (click)=\"toggleDropdown()\"\n (focus)=\"onTriggerFocus()\"\n (blur)=\"onTriggerBlur($event)\"\n (keydown)=\"onTriggerKeyDown($event)\">\n @if (!(selectionDisplay() === 'chips' && hasSelection())) {\n {{ triggerDisplayText() }}\n }\n </button>\n\n @if (selectionDisplay() === 'chips' && hasSelection()) {\n <div class=\"relative z-10 flex min-w-0 flex-1 flex-wrap items-center gap-1 py-0.5 pointer-events-none\">\n @for (item of selectedItems(); track getItemValue(item)) {\n <span\n class=\"inline-flex max-w-full items-center gap-1 rounded-full bg-page-secondary px-2 py-0.5 text-caption text-role-body\">\n <span class=\"truncate\">{{ getDisplayString(item) }}</span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Remove\"\n class=\"pointer-events-auto inline-flex shrink-0 items-center justify-center rounded-full text-role-caption hover:text-primary-hover\"\n (click)=\"onRemoveItem(item, $event)\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"h-3.5 w-3.5\"\n aria-hidden=\"true\">\n <path d=\"M12 2C17.53 2 22 6.47 22 12C22 17.53 17.53 22 12 22C6.47 22 2 17.53 2 12C2 6.47 6.47 2 12 2ZM15.59 7L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z\" />\n </svg>\n </button>\n </span>\n }\n </div>\n }\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggleDropdown()\"\n class=\"flex shrink-0 items-center justify-center p-2 cursor-pointer\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </button>\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n <span\n class=\"flex items-center justify-center p-2 pointer-events-none\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.rotate-180]=\"isOpen()\"\n [class.transition-transform]=\"true\"\n [class.duration-200]=\"true\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\" />\n </svg>\n </span>\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"dropdownButton\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeDropdown()\"\n (overlayOutsideClick)=\"closeDropdown()\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-multi-select-dropdown-panel\n [items]=\"items()\"\n [valuePath]=\"valuePath()\"\n [displayPath]=\"displayPath()\"\n [displayValue]=\"displayValue()\"\n [noOptionsMessage]=\"noOptionsMessage()\"\n [selectedValues]=\"currentValues()\"\n [showSelectAll]=\"showSelectAll()\"\n [selectAllLabel]=\"selectAllLabel()\"\n [clearAllLabel]=\"clearAllLabel()\"\n [iconSize]=\"iconSize()\"\n [dropdownWidth]=\"dropdownWidth()\"\n [listboxLabelledBy]=\"inputId()\"\n (valueChange)=\"applyValue($event)\"\n (dismissed)=\"closeDropdown()\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
10560
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], valuePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePath", required: false }] }], displayPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayPath", required: false }] }], displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: false }] }], noOptionsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noOptionsMessage", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }],
|
|
10620
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], valuePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePath", required: false }] }], displayPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayPath", required: false }] }], displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: false }] }], noOptionsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noOptionsMessage", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], selectionDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionDisplay", required: false }] }], selectedCountLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCountLabel", required: false }] }], showSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectAll", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], clearAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAllLabel", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], mobilePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobilePresentation", required: false }] }], mobileOkLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileOkLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], triggerButton: [{
|
|
10561
10621
|
type: ViewChild,
|
|
10562
10622
|
args: ['triggerButton']
|
|
10563
10623
|
}], dropdownButton: [{
|
|
@@ -11153,7 +11213,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
11153
11213
|
}] });
|
|
11154
11214
|
|
|
11155
11215
|
let nextDateFieldId = 0;
|
|
11156
|
-
class SignalDateField extends
|
|
11216
|
+
class SignalDateField extends BaseSignalTextInputControl {
|
|
11157
11217
|
cdr = inject(ChangeDetectorRef);
|
|
11158
11218
|
overlay = inject(Overlay);
|
|
11159
11219
|
overlayService = inject(OverlayService);
|
|
@@ -11166,10 +11226,6 @@ class SignalDateField extends BaseFormControl {
|
|
|
11166
11226
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
11167
11227
|
readonly = input(false, /* @ts-ignore */
|
|
11168
11228
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
11169
|
-
appearance = input('outline', /* @ts-ignore */
|
|
11170
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
11171
|
-
size = input('md', /* @ts-ignore */
|
|
11172
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
11173
11229
|
dateFormat = input('mmddyyyy', /* @ts-ignore */
|
|
11174
11230
|
...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
|
|
11175
11231
|
showCalendarIcon = input(true, /* @ts-ignore */
|
|
@@ -11477,7 +11533,7 @@ class SignalDateField extends BaseFormControl {
|
|
|
11477
11533
|
}
|
|
11478
11534
|
}
|
|
11479
11535
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11480
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalDateField, isStandalone: true, selector: "lib-signal-date-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyPast: { classPropertyName: "allowOnlyPast", publicName: "allowOnlyPast", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyFuture: { classPropertyName: "allowOnlyFuture", publicName: "allowOnlyFuture", isSignal: true, isRequired: false, transformFunction: null }, allowToday: { classPropertyName: "allowToday", publicName: "allowToday", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelected: "dateSelected", clear: "clear", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "fieldWrapper", first: true, predicate: ["fieldWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"date\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : inputPlaceholder()\"\n [value]=\"dateInputValue()\"\n [min]=\"nativeMinDate()\"\n [max]=\"nativeMaxDate()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeCalendar()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-date-field-panel\n [selectedDate]=\"value()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [allowOnlyPast]=\"allowOnlyPast()\"\n [allowOnlyFuture]=\"allowOnlyFuture()\"\n [allowToday]=\"allowToday()\"\n [disabledDays]=\"disabledDays()\"\n [disabledDates]=\"disabledDates()\"\n (dateSelected)=\"onDatePicked($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: ["input[type=date]::-webkit-calendar-picker-indicator{display:none}input[type=date]::-moz-calendar-picker-indicator{display:none}\n"], dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalDateFieldPanelComponent, selector: "lib-signal-date-field-panel", inputs: ["embedded", "selectedDate", "minDate", "maxDate", "allowOnlyPast", "allowOnlyFuture", "allowToday", "disabledDays", "disabledDates"], outputs: ["dateSelected"] }] });
|
|
11536
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalDateField, isStandalone: true, selector: "lib-signal-date-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyPast: { classPropertyName: "allowOnlyPast", publicName: "allowOnlyPast", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyFuture: { classPropertyName: "allowOnlyFuture", publicName: "allowOnlyFuture", isSignal: true, isRequired: false, transformFunction: null }, allowToday: { classPropertyName: "allowToday", publicName: "allowToday", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelected: "dateSelected", clear: "clear", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "fieldWrapper", first: true, predicate: ["fieldWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"date\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : inputPlaceholder()\"\n [value]=\"dateInputValue()\"\n [min]=\"nativeMinDate()\"\n [max]=\"nativeMaxDate()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeCalendar()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-date-field-panel\n [selectedDate]=\"value()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [allowOnlyPast]=\"allowOnlyPast()\"\n [allowOnlyFuture]=\"allowOnlyFuture()\"\n [allowToday]=\"allowToday()\"\n [disabledDays]=\"disabledDays()\"\n [disabledDates]=\"disabledDates()\"\n (dateSelected)=\"onDatePicked($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: ["input[type=date]::-webkit-calendar-picker-indicator{display:none}input[type=date]::-moz-calendar-picker-indicator{display:none}\n"], dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalDateFieldPanelComponent, selector: "lib-signal-date-field-panel", inputs: ["embedded", "selectedDate", "minDate", "maxDate", "allowOnlyPast", "allowOnlyFuture", "allowToday", "disabledDays", "disabledDates"], outputs: ["dateSelected"] }] });
|
|
11481
11537
|
}
|
|
11482
11538
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateField, decorators: [{
|
|
11483
11539
|
type: Component,
|
|
@@ -11488,7 +11544,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
11488
11544
|
HintIcon,
|
|
11489
11545
|
SignalDateFieldPanelComponent,
|
|
11490
11546
|
], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"date\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : inputPlaceholder()\"\n [value]=\"dateInputValue()\"\n [min]=\"nativeMinDate()\"\n [max]=\"nativeMaxDate()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeCalendar()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-date-field-panel\n [selectedDate]=\"value()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [allowOnlyPast]=\"allowOnlyPast()\"\n [allowOnlyFuture]=\"allowOnlyFuture()\"\n [allowToday]=\"allowToday()\"\n [disabledDays]=\"disabledDays()\"\n [disabledDates]=\"disabledDates()\"\n (dateSelected)=\"onDatePicked($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: ["input[type=date]::-webkit-calendar-picker-indicator{display:none}input[type=date]::-moz-calendar-picker-indicator{display:none}\n"] }]
|
|
11491
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }],
|
|
11547
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], showCalendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarIcon", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], mobilePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobilePresentation", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], allowOnlyPast: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowOnlyPast", required: false }] }], allowOnlyFuture: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowOnlyFuture", required: false }] }], allowToday: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowToday", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], dateSelected: [{ type: i0.Output, args: ["dateSelected"] }], clear: [{ type: i0.Output, args: ["clear"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], inputRef: [{
|
|
11492
11548
|
type: ViewChild,
|
|
11493
11549
|
args: ['inputRef']
|
|
11494
11550
|
}], fieldWrapper: [{
|
|
@@ -12036,7 +12092,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
12036
12092
|
}] });
|
|
12037
12093
|
|
|
12038
12094
|
let nextDateRangeFieldId = 0;
|
|
12039
|
-
class SignalDateRangeField extends
|
|
12095
|
+
class SignalDateRangeField extends BaseSignalTextInputControl {
|
|
12040
12096
|
cdr = inject(ChangeDetectorRef);
|
|
12041
12097
|
overlay = inject(Overlay);
|
|
12042
12098
|
overlayService = inject(OverlayService);
|
|
@@ -12049,10 +12105,6 @@ class SignalDateRangeField extends BaseFormControl {
|
|
|
12049
12105
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
12050
12106
|
readonly = input(false, /* @ts-ignore */
|
|
12051
12107
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
12052
|
-
appearance = input('outline', /* @ts-ignore */
|
|
12053
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
12054
|
-
size = input('md', /* @ts-ignore */
|
|
12055
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
12056
12108
|
dateFormat = input('mmddyyyy', /* @ts-ignore */
|
|
12057
12109
|
...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
|
|
12058
12110
|
showCalendarIcon = input(true, /* @ts-ignore */
|
|
@@ -12361,7 +12413,7 @@ class SignalDateRangeField extends BaseFormControl {
|
|
|
12361
12413
|
}
|
|
12362
12414
|
}
|
|
12363
12415
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateRangeField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12364
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalDateRangeField, isStandalone: true, selector: "lib-signal-date-range-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyPast: { classPropertyName: "allowOnlyPast", publicName: "allowOnlyPast", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyFuture: { classPropertyName: "allowOnlyFuture", publicName: "allowOnlyFuture", isSignal: true, isRequired: false, transformFunction: null }, allowToday: { classPropertyName: "allowToday", publicName: "allowToday", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateRangeSelected: "dateRangeSelected", clear: "clear", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "fieldWrapper", first: true, predicate: ["fieldWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"text\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n mask=\"00/00/0000 - 00/00/0000\"\n [showMaskTyped]=\"isFocused()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : (placeholder() || maskPlaceholder())\"\n [value]=\"textInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeCalendar()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-date-range-field-panel\n [selectedRange]=\"value()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [allowOnlyPast]=\"allowOnlyPast()\"\n [allowOnlyFuture]=\"allowOnlyFuture()\"\n [allowToday]=\"allowToday()\"\n [disabledDays]=\"disabledDays()\"\n [disabledDates]=\"disabledDates()\"\n (dateRangeSelected)=\"onRangePicked($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: SignalDateRangeFieldPanelComponent, selector: "lib-signal-date-range-field-panel", inputs: ["embedded", "selectedRange", "minDate", "maxDate", "allowOnlyPast", "allowOnlyFuture", "allowToday", "disabledDays", "disabledDates"], outputs: ["dateRangeSelected"] }] });
|
|
12416
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalDateRangeField, isStandalone: true, selector: "lib-signal-date-range-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyPast: { classPropertyName: "allowOnlyPast", publicName: "allowOnlyPast", isSignal: true, isRequired: false, transformFunction: null }, allowOnlyFuture: { classPropertyName: "allowOnlyFuture", publicName: "allowOnlyFuture", isSignal: true, isRequired: false, transformFunction: null }, allowToday: { classPropertyName: "allowToday", publicName: "allowToday", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateRangeSelected: "dateRangeSelected", clear: "clear", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "fieldWrapper", first: true, predicate: ["fieldWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"text\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n mask=\"00/00/0000 - 00/00/0000\"\n [showMaskTyped]=\"isFocused()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : (placeholder() || maskPlaceholder())\"\n [value]=\"textInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeCalendar()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-date-range-field-panel\n [selectedRange]=\"value()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [allowOnlyPast]=\"allowOnlyPast()\"\n [allowOnlyFuture]=\"allowOnlyFuture()\"\n [allowToday]=\"allowToday()\"\n [disabledDays]=\"disabledDays()\"\n [disabledDates]=\"disabledDates()\"\n (dateRangeSelected)=\"onRangePicked($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: SignalDateRangeFieldPanelComponent, selector: "lib-signal-date-range-field-panel", inputs: ["embedded", "selectedRange", "minDate", "maxDate", "allowOnlyPast", "allowOnlyFuture", "allowToday", "disabledDays", "disabledDates"], outputs: ["dateRangeSelected"] }] });
|
|
12365
12417
|
}
|
|
12366
12418
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateRangeField, decorators: [{
|
|
12367
12419
|
type: Component,
|
|
@@ -12373,7 +12425,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
12373
12425
|
NgxMaskDirective,
|
|
12374
12426
|
SignalDateRangeFieldPanelComponent,
|
|
12375
12427
|
], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"text\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n mask=\"00/00/0000 - 00/00/0000\"\n [showMaskTyped]=\"isFocused()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : (placeholder() || maskPlaceholder())\"\n [value]=\"textInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showCalendarIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open calendar\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openCalendar($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19 19H5V8H19M16 1V3H8V1H6V3H5C3.89 3 3 3.89 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 3.89 20.1 3 19 3H18V1M17 12H12V17H17V12Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n (overlayOutsideClick)=\"closeCalendar()\"\n [cdkConnectedOverlayBackdropClass]=\"['bg-black', 'bg-opacity-20']\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-date-range-field-panel\n [selectedRange]=\"value()\"\n [minDate]=\"minDate()\"\n [maxDate]=\"maxDate()\"\n [allowOnlyPast]=\"allowOnlyPast()\"\n [allowOnlyFuture]=\"allowOnlyFuture()\"\n [allowToday]=\"allowToday()\"\n [disabledDays]=\"disabledDays()\"\n [disabledDates]=\"disabledDates()\"\n (dateRangeSelected)=\"onRangePicked($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
12376
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }],
|
|
12428
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], showCalendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarIcon", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], mobilePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobilePresentation", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], allowOnlyPast: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowOnlyPast", required: false }] }], allowOnlyFuture: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowOnlyFuture", required: false }] }], allowToday: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowToday", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], dateRangeSelected: [{ type: i0.Output, args: ["dateRangeSelected"] }], clear: [{ type: i0.Output, args: ["clear"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], inputRef: [{
|
|
12377
12429
|
type: ViewChild,
|
|
12378
12430
|
args: ['inputRef']
|
|
12379
12431
|
}], fieldWrapper: [{
|
|
@@ -12787,7 +12839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
12787
12839
|
}] });
|
|
12788
12840
|
|
|
12789
12841
|
let nextTimeFieldId = 0;
|
|
12790
|
-
class SignalTimeField extends
|
|
12842
|
+
class SignalTimeField extends BaseSignalTextInputControl {
|
|
12791
12843
|
cdr = inject(ChangeDetectorRef);
|
|
12792
12844
|
overlay = inject(Overlay);
|
|
12793
12845
|
overlayService = inject(OverlayService);
|
|
@@ -12800,10 +12852,6 @@ class SignalTimeField extends BaseFormControl {
|
|
|
12800
12852
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
12801
12853
|
readonly = input(false, /* @ts-ignore */
|
|
12802
12854
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
12803
|
-
appearance = input('outline', /* @ts-ignore */
|
|
12804
|
-
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
12805
|
-
size = input('md', /* @ts-ignore */
|
|
12806
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
12807
12855
|
timeFormat = input('12h', /* @ts-ignore */
|
|
12808
12856
|
...(ngDevMode ? [{ debugName: "timeFormat" }] : /* istanbul ignore next */ []));
|
|
12809
12857
|
showClockIcon = input(true, /* @ts-ignore */
|
|
@@ -13105,7 +13153,7 @@ class SignalTimeField extends BaseFormControl {
|
|
|
13105
13153
|
}
|
|
13106
13154
|
}
|
|
13107
13155
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTimeField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13108
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalTimeField, isStandalone: true, selector: "lib-signal-time-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, showClockIcon: { classPropertyName: "showClockIcon", publicName: "showClockIcon", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, okLabel: { classPropertyName: "okLabel", publicName: "okLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", timeSelected: "timeSelected", clear: "clear", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "fieldWrapper", first: true, predicate: ["fieldWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"time\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : inputPlaceholder()\"\n [value]=\"timeInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showClockIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open time picker\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openClock($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20ZM12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2ZM17 13.9L16.3 15.2L11 12.3V7H12.5V11.4L17 13.9Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showClockIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open time picker\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openClock($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20ZM12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2ZM17 13.9L16.3 15.2L11 12.3V7H12.5V11.4L17 13.9Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeClock()\"\n (overlayOutsideClick)=\"closeClock()\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-time-field-panel\n [selectedTime]=\"value()\"\n [timeFormat]=\"timeFormat()\"\n [okLabel]=\"okLabel()\"\n (confirmed)=\"onTimeConfirmed($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: ["input[type=time]::-webkit-calendar-picker-indicator{display:none}input[type=time]::-moz-calendar-picker-indicator{display:none}\n"], dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalTimeFieldPanelComponent, selector: "lib-signal-time-field-panel", inputs: ["embedded", "selectedTime", "timeFormat", "okLabel", "draftTime"], outputs: ["confirmed", "draftTimeChange"] }] });
|
|
13156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalTimeField, isStandalone: true, selector: "lib-signal-time-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, showClockIcon: { classPropertyName: "showClockIcon", publicName: "showClockIcon", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, prefixText: { classPropertyName: "prefixText", publicName: "prefixText", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, postfixText: { classPropertyName: "postfixText", publicName: "postfixText", isSignal: true, isRequired: false, transformFunction: null }, postfixIcon: { classPropertyName: "postfixIcon", publicName: "postfixIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, debounceValueChange: { classPropertyName: "debounceValueChange", publicName: "debounceValueChange", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, mobilePresentation: { classPropertyName: "mobilePresentation", publicName: "mobilePresentation", isSignal: true, isRequired: false, transformFunction: null }, okLabel: { classPropertyName: "okLabel", publicName: "okLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", timeSelected: "timeSelected", clear: "clear", postfixIconClick: "postfixIconClick" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "fieldWrapper", first: true, predicate: ["fieldWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"time\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : inputPlaceholder()\"\n [value]=\"timeInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showClockIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open time picker\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openClock($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20ZM12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2ZM17 13.9L16.3 15.2L11 12.3V7H12.5V11.4L17 13.9Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showClockIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open time picker\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openClock($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20ZM12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2ZM17 13.9L16.3 15.2L11 12.3V7H12.5V11.4L17 13.9Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeClock()\"\n (overlayOutsideClick)=\"closeClock()\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-time-field-panel\n [selectedTime]=\"value()\"\n [timeFormat]=\"timeFormat()\"\n [okLabel]=\"okLabel()\"\n (confirmed)=\"onTimeConfirmed($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: ["input[type=time]::-webkit-calendar-picker-indicator{display:none}input[type=time]::-moz-calendar-picker-indicator{display:none}\n"], dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: BaseSignalInput, selector: "lib-base-signal-input", inputs: ["label", "showExternalLabel", "showRequired", "showError", "errorMessage", "disabled", "hint", "inputId"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: HintIcon, selector: "lib-hint-icon", inputs: ["hint", "size"] }, { kind: "component", type: SignalTimeFieldPanelComponent, selector: "lib-signal-time-field-panel", inputs: ["embedded", "selectedTime", "timeFormat", "okLabel", "draftTime"], outputs: ["confirmed", "draftTimeChange"] }] });
|
|
13109
13157
|
}
|
|
13110
13158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTimeField, decorators: [{
|
|
13111
13159
|
type: Component,
|
|
@@ -13116,7 +13164,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
13116
13164
|
HintIcon,
|
|
13117
13165
|
SignalTimeFieldPanelComponent,
|
|
13118
13166
|
], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"appearance() === 'outline' || appearance() === 'fill'\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n #fieldWrapper\n input\n class=\"relative flex items-center w-full rounded-xl transition-colors duration-200 ease-in-out\"\n [class.overflow-hidden]=\"appearance() !== 'floatingOutline'\"\n [class.overflow-visible]=\"appearance() === 'floatingOutline'\"\n [class]=\"appearanceWrapperClasses() + ' ' + wrapperHeightClasses()\">\n\n @if (prefixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-r border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-l-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ prefixText() }}\n </div>\n }\n\n @if (prefixIcon() && hasPrefixText()) {\n <div\n class=\"flex shrink-0 items-center justify-center self-stretch border-default pl-3\"\n [class.text-role-placeholder]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"></app-svg-icon>\n </div>\n }\n\n <div class=\"relative flex h-full min-w-0 flex-1 items-center\">\n @if (hasAbsolutePrefixIcon()) {\n <app-svg-icon [size]=\"iconSize()\" [src]=\"prefixIcon()!\"\n class=\"absolute pointer-events-none\"\n [class.ml-3]=\"appearance() !== 'ghost'\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"></app-svg-icon>\n }\n\n @if (usesPeerFloatingLabel()) {\n <input\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n readonly\n class=\"peer pointer-events-none absolute h-full w-full opacity-0 border-0 bg-transparent placeholder-transparent\"\n placeholder=\" \"\n [value]=\"peerInputValue()\" />\n }\n\n <input\n #inputRef\n type=\"time\"\n class=\"h-full w-full transition placeholder:text-role-placeholder outline-none bg-transparent border-0 rounded-none\"\n [class.peer]=\"usesPeerFloatingLabel()\"\n [class]=\"inputSizeClasses() + ' ' + horizontalPaddingClasses()\"\n [class.placeholder-transparent]=\"usesPeerFloatingLabel()\"\n [class.text-role-disabled]=\"disabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"usesPeerFloatingLabel() ? ' ' : inputPlaceholder()\"\n [value]=\"timeInputValue()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"fieldName()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"isOpen()\"\n (input)=\"onInputChanged($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onInputKeyDown($event)\" />\n\n @if (appearance() === 'floating' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'floatingOutline' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"floatingOutlineLabelClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n @if (appearance() === 'ifta' && label()) {\n <label\n [attr.for]=\"inputId()\"\n [class]=\"iftaLabelClasses() + ' ' + inFieldLabelLeftClasses()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n\n @if (showClear() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n\n @if (showInFieldHint() && hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1\"\n [hint]=\"hint()\"\n [size]=\"14\" />\n }\n\n @if (postfixIcon() && hasPostfixText()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n\n @if (hasPostfixText()) {\n @if (showClockIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open time picker\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openClock($event)\"\n class=\"flex shrink-0 items-center justify-center p-2 rounded-full hover:bg-page-secondary cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20ZM12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2ZM17 13.9L16.3 15.2L11 12.3V7H12.5V11.4L17 13.9Z\" />\n </svg>\n </button>\n }\n }\n\n @if (postfixText()) {\n <div\n class=\"flex shrink-0 items-center self-stretch whitespace-nowrap border-l border-default bg-page-secondary px-3 text-role-caption\"\n [class.rounded-r-xl]=\"appearance() === 'floatingOutline'\"\n [class.text-role-disabled]=\"disabled()\">\n {{ postfixText() }}\n </div>\n }\n\n @if (!hasPostfixText()) {\n <div\n class=\"absolute inset-y-0 right-0 z-10 flex items-center gap-0.5 pointer-events-none\"\n [class.mr-3]=\"appearance() !== 'ghost'\">\n @if (showInFieldHint() && !hasPostfixText()) {\n <lib-hint-icon\n class=\"flex shrink-0 items-center px-1 pointer-events-auto\"\n [hint]=\"hint()\"\n [size]=\"inFieldHintIconSize\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\" />\n }\n @if (hasAbsoluteClear()) {\n <button\n type=\"button\"\n (click)=\"onClear($event)\"\n aria-label=\"Clear\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover text-role-caption\">\n <svg\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z\" />\n </svg>\n </button>\n }\n @if (hasAbsolutePostfixIcon()) {\n <button\n type=\"button\"\n (click)=\"onPostfixIconClick($event)\"\n [disabled]=\"disabled()\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-primary]=\"(isFocused() || isOpen()) && !showError() && !disabled()\"\n [class.text-error]=\"showError() && !disabled()\">\n <app-svg-icon [size]=\"iconSize()\" [src]=\"postfixIcon()!\"></app-svg-icon>\n </button>\n }\n @if (showClockIcon()) {\n <button\n type=\"button\"\n aria-label=\"Open time picker\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"openClock($event)\"\n class=\"pointer-events-auto p-2 rounded-full hover:bg-page-secondary flex items-center justify-center cursor-pointer transition-colors duration-200 ease-in-out hover:text-primary-hover disabled:cursor-not-allowed\"\n [class.text-role-caption]=\"!disabled()\"\n [class.text-role-disabled]=\"disabled()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [style.width.px]=\"iconSize()\"\n [style.height.px]=\"iconSize()\"\n aria-hidden=\"true\">\n <path d=\"M12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20ZM12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2ZM17 13.9L16.3 15.2L11 12.3V7H12.5V11.4L17 13.9Z\" />\n </svg>\n </button>\n }\n </div>\n }\n\n @if (!isMobile()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"fieldWrapper\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeClock()\"\n (overlayOutsideClick)=\"closeClock()\"\n [cdkConnectedOverlayPositions]=\"[\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ]\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy()\"\n [cdkConnectedOverlayOffsetY]=\"10\">\n <lib-signal-time-field-panel\n [selectedTime]=\"value()\"\n [timeFormat]=\"timeFormat()\"\n [okLabel]=\"okLabel()\"\n (confirmed)=\"onTimeConfirmed($event)\" />\n </ng-template>\n }\n </div>\n\n</lib-base-signal-input>\n", styles: ["input[type=time]::-webkit-calendar-picker-indicator{display:none}input[type=time]::-moz-calendar-picker-indicator{display:none}\n"] }]
|
|
13119
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }],
|
|
13167
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", required: false }] }], showClockIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClockIcon", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], postfixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixText", required: false }] }], postfixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfixIcon", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], fieldName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldName", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], debounceValueChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceValueChange", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], mobilePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobilePresentation", required: false }] }], okLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "okLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], timeSelected: [{ type: i0.Output, args: ["timeSelected"] }], clear: [{ type: i0.Output, args: ["clear"] }], postfixIconClick: [{ type: i0.Output, args: ["postfixIconClick"] }], inputRef: [{
|
|
13120
13168
|
type: ViewChild,
|
|
13121
13169
|
args: ['inputRef']
|
|
13122
13170
|
}], fieldWrapper: [{
|
|
@@ -14159,6 +14207,264 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
14159
14207
|
args: ['trackRef']
|
|
14160
14208
|
}] } });
|
|
14161
14209
|
|
|
14210
|
+
function signalValidationError(kind, message) {
|
|
14211
|
+
return { kind, message };
|
|
14212
|
+
}
|
|
14213
|
+
|
|
14214
|
+
const DEFAULT_TAKEN_MESSAGE = 'Username is already taken';
|
|
14215
|
+
const DEFAULT_ERROR_MESSAGE = 'Could not verify username availability';
|
|
14216
|
+
function isUsernameTaken(username, takenUsernames) {
|
|
14217
|
+
const normalized = username.trim().toLowerCase();
|
|
14218
|
+
return takenUsernames.some((name) => name.toLowerCase() === normalized);
|
|
14219
|
+
}
|
|
14220
|
+
function uniqueUsername(path, config) {
|
|
14221
|
+
const takenUsernames = config?.takenUsernames ?? ['admin', 'root', 'test'];
|
|
14222
|
+
const checkDelayMs = config?.checkDelayMs ?? 300;
|
|
14223
|
+
const debounceMs = config?.debounceMs ?? 400;
|
|
14224
|
+
validateAsync(path, {
|
|
14225
|
+
params: ({ value }) => value()?.trim() ?? '',
|
|
14226
|
+
debounce: debounceMs,
|
|
14227
|
+
when: ({ value }) => !!value()?.trim(),
|
|
14228
|
+
factory: (params) => resource({
|
|
14229
|
+
params: () => params(),
|
|
14230
|
+
loader: async ({ params: username }) => {
|
|
14231
|
+
if (!username) {
|
|
14232
|
+
return { taken: false };
|
|
14233
|
+
}
|
|
14234
|
+
await new Promise((resolve) => setTimeout(resolve, checkDelayMs));
|
|
14235
|
+
return { taken: isUsernameTaken(username, takenUsernames) };
|
|
14236
|
+
},
|
|
14237
|
+
}),
|
|
14238
|
+
onSuccess: (result) => {
|
|
14239
|
+
if (!result?.taken) {
|
|
14240
|
+
return undefined;
|
|
14241
|
+
}
|
|
14242
|
+
return signalValidationError('unique', config?.message ?? DEFAULT_TAKEN_MESSAGE);
|
|
14243
|
+
},
|
|
14244
|
+
onError: () => signalValidationError('unique', DEFAULT_ERROR_MESSAGE),
|
|
14245
|
+
});
|
|
14246
|
+
}
|
|
14247
|
+
|
|
14248
|
+
const DEFAULT_MESSAGE$4 = 'Values do not match';
|
|
14249
|
+
function matchFieldsValidator(otherPath, config) {
|
|
14250
|
+
return ({ value, valueOf }) => {
|
|
14251
|
+
const current = value();
|
|
14252
|
+
const other = valueOf(otherPath);
|
|
14253
|
+
if (current === other) {
|
|
14254
|
+
return undefined;
|
|
14255
|
+
}
|
|
14256
|
+
return signalValidationError('matchFields', config?.message ?? DEFAULT_MESSAGE$4);
|
|
14257
|
+
};
|
|
14258
|
+
}
|
|
14259
|
+
function matchFields(path, otherPath, config) {
|
|
14260
|
+
validate(path, matchFieldsValidator(otherPath, config));
|
|
14261
|
+
}
|
|
14262
|
+
function requiredWhen(path, when, config) {
|
|
14263
|
+
required(path, {
|
|
14264
|
+
message: config?.message ?? 'Required',
|
|
14265
|
+
when,
|
|
14266
|
+
});
|
|
14267
|
+
}
|
|
14268
|
+
|
|
14269
|
+
const REGEX_WITH_SLASHES = /^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$/;
|
|
14270
|
+
const REGEX_WITHOUT_SLASHES = /^(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])\d{4}$/;
|
|
14271
|
+
const DEFAULT_FORMAT_MESSAGE = 'Invalid date format. Use mm/dd/yyyy or mmddyyyy.';
|
|
14272
|
+
const DEFAULT_INVALID_MESSAGE = 'Invalid date. Make sure the day, month, and year are correct.';
|
|
14273
|
+
function isValidCalendarDate(year, month, day) {
|
|
14274
|
+
const date = new Date(year, month - 1, day);
|
|
14275
|
+
return (date.getFullYear() === year && date.getMonth() + 1 === month && date.getDate() === day);
|
|
14276
|
+
}
|
|
14277
|
+
function validateMmddyyyyDateValue(value) {
|
|
14278
|
+
if (!value) {
|
|
14279
|
+
return null;
|
|
14280
|
+
}
|
|
14281
|
+
if (REGEX_WITH_SLASHES.test(value)) {
|
|
14282
|
+
const [month, day, year] = value.split('/').map(Number);
|
|
14283
|
+
return isValidCalendarDate(year, month, day) ? null : DEFAULT_INVALID_MESSAGE;
|
|
14284
|
+
}
|
|
14285
|
+
if (REGEX_WITHOUT_SLASHES.test(value)) {
|
|
14286
|
+
const month = Number(value.substring(0, 2));
|
|
14287
|
+
const day = Number(value.substring(2, 4));
|
|
14288
|
+
const year = Number(value.substring(4, 8));
|
|
14289
|
+
return isValidCalendarDate(year, month, day) ? null : DEFAULT_INVALID_MESSAGE;
|
|
14290
|
+
}
|
|
14291
|
+
return DEFAULT_FORMAT_MESSAGE;
|
|
14292
|
+
}
|
|
14293
|
+
function mmddyyyyDateValidator(config) {
|
|
14294
|
+
return ({ value }) => {
|
|
14295
|
+
const errorMessage = validateMmddyyyyDateValue(value());
|
|
14296
|
+
if (!errorMessage) {
|
|
14297
|
+
return undefined;
|
|
14298
|
+
}
|
|
14299
|
+
return signalValidationError('invalidDate', config?.message ?? errorMessage);
|
|
14300
|
+
};
|
|
14301
|
+
}
|
|
14302
|
+
function mmddyyyyDate(path, config) {
|
|
14303
|
+
validate(path, mmddyyyyDateValidator(config));
|
|
14304
|
+
}
|
|
14305
|
+
function mmddyyyyDateAsync(path, config) {
|
|
14306
|
+
const debounceMs = config?.debounceMs ?? 500;
|
|
14307
|
+
validateAsync(path, {
|
|
14308
|
+
params: ({ value }) => value(),
|
|
14309
|
+
debounce: debounceMs,
|
|
14310
|
+
factory: (params) => resource({
|
|
14311
|
+
params: () => params(),
|
|
14312
|
+
loader: async ({ params: dateValue }) => {
|
|
14313
|
+
if (!dateValue) {
|
|
14314
|
+
return null;
|
|
14315
|
+
}
|
|
14316
|
+
await new Promise((resolve) => setTimeout(resolve, debounceMs));
|
|
14317
|
+
return validateMmddyyyyDateValue(dateValue);
|
|
14318
|
+
},
|
|
14319
|
+
}),
|
|
14320
|
+
onSuccess: (errorMessage) => {
|
|
14321
|
+
if (!errorMessage) {
|
|
14322
|
+
return undefined;
|
|
14323
|
+
}
|
|
14324
|
+
return signalValidationError('invalidDate', config?.message ?? errorMessage);
|
|
14325
|
+
},
|
|
14326
|
+
onError: () => signalValidationError('invalidDate', config?.message ?? DEFAULT_INVALID_MESSAGE),
|
|
14327
|
+
});
|
|
14328
|
+
}
|
|
14329
|
+
|
|
14330
|
+
const DEFAULT_INTEGER_MESSAGE = 'Must be a whole number';
|
|
14331
|
+
function integerOnlyValidator(config) {
|
|
14332
|
+
return ({ value }) => {
|
|
14333
|
+
const current = value();
|
|
14334
|
+
if (current == null) {
|
|
14335
|
+
return undefined;
|
|
14336
|
+
}
|
|
14337
|
+
return Number.isInteger(current)
|
|
14338
|
+
? undefined
|
|
14339
|
+
: signalValidationError('integerOnly', config?.message ?? DEFAULT_INTEGER_MESSAGE);
|
|
14340
|
+
};
|
|
14341
|
+
}
|
|
14342
|
+
function integerOnly(path, config) {
|
|
14343
|
+
validate(path, integerOnlyValidator(config));
|
|
14344
|
+
}
|
|
14345
|
+
function numberRange(path, minValue, maxValue, config) {
|
|
14346
|
+
min(path, minValue, {
|
|
14347
|
+
message: config?.minMessage ??
|
|
14348
|
+
(typeof minValue === 'number' ? `Minimum ${minValue} required` : 'Minimum value required'),
|
|
14349
|
+
});
|
|
14350
|
+
max(path, maxValue, {
|
|
14351
|
+
message: config?.maxMessage ??
|
|
14352
|
+
(typeof maxValue === 'number' ? `Maximum ${maxValue} allowed` : 'Maximum value allowed'),
|
|
14353
|
+
});
|
|
14354
|
+
}
|
|
14355
|
+
|
|
14356
|
+
const DEFAULT_MESSAGE$3 = 'Date must be in the future.';
|
|
14357
|
+
function startOfToday$1() {
|
|
14358
|
+
const today = new Date();
|
|
14359
|
+
today.setHours(0, 0, 0, 0);
|
|
14360
|
+
return today;
|
|
14361
|
+
}
|
|
14362
|
+
function createOnlyFutureDateValidator(config) {
|
|
14363
|
+
return ({ value }) => {
|
|
14364
|
+
const date = value();
|
|
14365
|
+
if (!date) {
|
|
14366
|
+
return undefined;
|
|
14367
|
+
}
|
|
14368
|
+
return date > startOfToday$1()
|
|
14369
|
+
? undefined
|
|
14370
|
+
: signalValidationError('invalidDate', config?.message ?? DEFAULT_MESSAGE$3);
|
|
14371
|
+
};
|
|
14372
|
+
}
|
|
14373
|
+
function onlyFutureDate(path, config) {
|
|
14374
|
+
validate(path, createOnlyFutureDateValidator(config));
|
|
14375
|
+
}
|
|
14376
|
+
|
|
14377
|
+
const DEFAULT_MESSAGE$2 = 'Date must be in the past.';
|
|
14378
|
+
function startOfToday() {
|
|
14379
|
+
const today = new Date();
|
|
14380
|
+
today.setHours(0, 0, 0, 0);
|
|
14381
|
+
return today;
|
|
14382
|
+
}
|
|
14383
|
+
function createOnlyPastDateValidator(config) {
|
|
14384
|
+
return ({ value }) => {
|
|
14385
|
+
const date = value();
|
|
14386
|
+
if (!date) {
|
|
14387
|
+
return undefined;
|
|
14388
|
+
}
|
|
14389
|
+
return date < startOfToday()
|
|
14390
|
+
? undefined
|
|
14391
|
+
: signalValidationError('invalidDate', config?.message ?? DEFAULT_MESSAGE$2);
|
|
14392
|
+
};
|
|
14393
|
+
}
|
|
14394
|
+
function onlyPastDate(path, config) {
|
|
14395
|
+
validate(path, createOnlyPastDateValidator(config));
|
|
14396
|
+
}
|
|
14397
|
+
|
|
14398
|
+
const E164_PATTERN = /^\+[1-9]\d{6,14}$/;
|
|
14399
|
+
const DEFAULT_MESSAGE$1 = 'Enter a valid phone number';
|
|
14400
|
+
function phoneNumberValidator(config) {
|
|
14401
|
+
return ({ value }) => {
|
|
14402
|
+
const phoneValue = value()?.trim() ?? '';
|
|
14403
|
+
if (!phoneValue) {
|
|
14404
|
+
return undefined;
|
|
14405
|
+
}
|
|
14406
|
+
if (!E164_PATTERN.test(phoneValue)) {
|
|
14407
|
+
return signalValidationError('phone', config?.message ?? DEFAULT_MESSAGE$1);
|
|
14408
|
+
}
|
|
14409
|
+
const parsed = parseE164(phoneValue, DEFAULT_PHONE_COUNTRIES);
|
|
14410
|
+
if (!parsed) {
|
|
14411
|
+
return signalValidationError('phone', config?.message ?? DEFAULT_MESSAGE$1);
|
|
14412
|
+
}
|
|
14413
|
+
const nationalDigits = extractDigits(parsed.nationalDigits);
|
|
14414
|
+
const minNationalDigits = config?.minNationalDigits ?? 4;
|
|
14415
|
+
const maxNationalLength = getMaxNationalLength(parsed.country);
|
|
14416
|
+
if (nationalDigits.length < minNationalDigits) {
|
|
14417
|
+
return signalValidationError('phone', config?.message ?? DEFAULT_MESSAGE$1);
|
|
14418
|
+
}
|
|
14419
|
+
if (maxNationalLength != null && nationalDigits.length > maxNationalLength) {
|
|
14420
|
+
return signalValidationError('phone', config?.message ?? DEFAULT_MESSAGE$1);
|
|
14421
|
+
}
|
|
14422
|
+
return undefined;
|
|
14423
|
+
};
|
|
14424
|
+
}
|
|
14425
|
+
function phoneNumber(path, config) {
|
|
14426
|
+
validate(path, phoneNumberValidator(config));
|
|
14427
|
+
}
|
|
14428
|
+
|
|
14429
|
+
const DEFAULT_MESSAGE = 'End date must be on or after the start date.';
|
|
14430
|
+
function validateDateRangeValidator(config) {
|
|
14431
|
+
return ({ value }) => {
|
|
14432
|
+
const range = value();
|
|
14433
|
+
if (!range?.startDate || !range?.endDate) {
|
|
14434
|
+
return undefined;
|
|
14435
|
+
}
|
|
14436
|
+
return range.startDate <= range.endDate
|
|
14437
|
+
? undefined
|
|
14438
|
+
: signalValidationError('invalidDateRange', config?.message ?? DEFAULT_MESSAGE);
|
|
14439
|
+
};
|
|
14440
|
+
}
|
|
14441
|
+
function validateDateRange(path, config) {
|
|
14442
|
+
validate(path, validateDateRangeValidator(config));
|
|
14443
|
+
}
|
|
14444
|
+
|
|
14445
|
+
const SignalFormValidators = {
|
|
14446
|
+
matchFields,
|
|
14447
|
+
requiredWhen,
|
|
14448
|
+
onlyPastDate,
|
|
14449
|
+
onlyFutureDate,
|
|
14450
|
+
mmddyyyyDate,
|
|
14451
|
+
mmddyyyyDateAsync,
|
|
14452
|
+
validateDateRange,
|
|
14453
|
+
phoneNumber,
|
|
14454
|
+
integerOnly,
|
|
14455
|
+
numberRange,
|
|
14456
|
+
uniqueUsername,
|
|
14457
|
+
matchFieldsValidator,
|
|
14458
|
+
createOnlyPastDateValidator,
|
|
14459
|
+
createOnlyFutureDateValidator,
|
|
14460
|
+
mmddyyyyDateValidator,
|
|
14461
|
+
validateDateRangeValidator,
|
|
14462
|
+
phoneNumberValidator,
|
|
14463
|
+
integerOnlyValidator,
|
|
14464
|
+
signalValidationError,
|
|
14465
|
+
validateMmddyyyyDateValue,
|
|
14466
|
+
};
|
|
14467
|
+
|
|
14162
14468
|
function validateSignalForm(signalForm) {
|
|
14163
14469
|
const root = signalForm();
|
|
14164
14470
|
root.markAsTouched();
|
|
@@ -14222,11 +14528,12 @@ function getSignalButtonSpinnerBorderClass(appearance, disabled) {
|
|
|
14222
14528
|
|
|
14223
14529
|
class SignalButton {
|
|
14224
14530
|
parentSignalForm = inject(SignalFormDirective, { optional: true });
|
|
14531
|
+
nglConfig = inject(NGL_CONFIG, { optional: true });
|
|
14225
14532
|
type = input('button', /* @ts-ignore */
|
|
14226
14533
|
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
14227
14534
|
appearance = input('primary', /* @ts-ignore */
|
|
14228
14535
|
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
14229
|
-
size = input(
|
|
14536
|
+
size = input(this.nglConfig?.button?.size ?? DEFAULT_NGL_BUTTON_CONFIG.size, /* @ts-ignore */
|
|
14230
14537
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
14231
14538
|
disabled = input(false, /* @ts-ignore */
|
|
14232
14539
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -14261,11 +14568,11 @@ class SignalButton {
|
|
|
14261
14568
|
this.clicked.emit();
|
|
14262
14569
|
}
|
|
14263
14570
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14264
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalButton, isStandalone: true, selector: "lib-signal-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [class]=\"buttonClasses()\"\n [attr.aria-busy]=\"loading() || null\"\n (click)=\"onClick($event)\">\n @if (iconSrc()) {\n <app-svg-icon\n [src]=\"iconSrc()!\"\n [size]=\"iconSize()\"\n [class]=\"iconClasses() + (loading() ? ' invisible' : '')\" />\n }\n\n <span [class.invisible]=\"loading()\">\n <ng-content />\n </span>\n\n @if (loading()) {\n <app-spinner\n class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\"\n [borderColor]=\"spinnerBorderClass()\" />\n }\n</button>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: SpinnerComponent, selector: "app-spinner", inputs: ["borderColor"] }] });
|
|
14571
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalButton, isStandalone: true, selector: "lib-signal-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n class=\"cursor-pointer\"\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [class]=\"buttonClasses()\"\n [attr.aria-busy]=\"loading() || null\"\n (click)=\"onClick($event)\">\n @if (iconSrc()) {\n <app-svg-icon\n [src]=\"iconSrc()!\"\n [size]=\"iconSize()\"\n [class]=\"iconClasses() + (loading() ? ' invisible' : '')\" />\n }\n\n <span [class.invisible]=\"loading()\">\n <ng-content />\n </span>\n\n @if (loading()) {\n <app-spinner\n class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\"\n [borderColor]=\"spinnerBorderClass()\" />\n }\n</button>\n", dependencies: [{ kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: SpinnerComponent, selector: "app-spinner", inputs: ["borderColor"] }] });
|
|
14265
14572
|
}
|
|
14266
14573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalButton, decorators: [{
|
|
14267
14574
|
type: Component,
|
|
14268
|
-
args: [{ selector: 'lib-signal-button', imports: [AppSvgIconComponent, SpinnerComponent], template: "<button\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [class]=\"buttonClasses()\"\n [attr.aria-busy]=\"loading() || null\"\n (click)=\"onClick($event)\">\n @if (iconSrc()) {\n <app-svg-icon\n [src]=\"iconSrc()!\"\n [size]=\"iconSize()\"\n [class]=\"iconClasses() + (loading() ? ' invisible' : '')\" />\n }\n\n <span [class.invisible]=\"loading()\">\n <ng-content />\n </span>\n\n @if (loading()) {\n <app-spinner\n class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\"\n [borderColor]=\"spinnerBorderClass()\" />\n }\n</button>\n" }]
|
|
14575
|
+
args: [{ selector: 'lib-signal-button', imports: [AppSvgIconComponent, SpinnerComponent], template: "<button\n class=\"cursor-pointer\"\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [class]=\"buttonClasses()\"\n [attr.aria-busy]=\"loading() || null\"\n (click)=\"onClick($event)\">\n @if (iconSrc()) {\n <app-svg-icon\n [src]=\"iconSrc()!\"\n [size]=\"iconSize()\"\n [class]=\"iconClasses() + (loading() ? ' invisible' : '')\" />\n }\n\n <span [class.invisible]=\"loading()\">\n <ng-content />\n </span>\n\n @if (loading()) {\n <app-spinner\n class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\"\n [borderColor]=\"spinnerBorderClass()\" />\n }\n</button>\n" }]
|
|
14269
14576
|
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
14270
14577
|
|
|
14271
14578
|
class DateUtils {
|
|
@@ -14483,13 +14790,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
14483
14790
|
}], ctorParameters: () => [] });
|
|
14484
14791
|
|
|
14485
14792
|
function provideNglConfig(config) {
|
|
14486
|
-
|
|
14793
|
+
const fullConfig = {
|
|
14794
|
+
...config,
|
|
14795
|
+
input: { ...DEFAULT_NGL_INPUT_CONFIG, ...config.input },
|
|
14796
|
+
button: { ...DEFAULT_NGL_BUTTON_CONFIG, ...config.button },
|
|
14797
|
+
};
|
|
14798
|
+
const providers = [
|
|
14487
14799
|
provideEnvironmentNgxMask(),
|
|
14488
14800
|
{
|
|
14489
14801
|
provide: NGL_CONFIG,
|
|
14490
|
-
useValue:
|
|
14802
|
+
useValue: fullConfig,
|
|
14491
14803
|
},
|
|
14492
|
-
]
|
|
14804
|
+
];
|
|
14805
|
+
if (config.formErrors) {
|
|
14806
|
+
providers.push({
|
|
14807
|
+
provide: SIGNAL_FORM_ERRORS,
|
|
14808
|
+
useValue: { ...defaultSignalFormErrors, ...config.formErrors },
|
|
14809
|
+
});
|
|
14810
|
+
}
|
|
14811
|
+
return makeEnvironmentProviders(providers);
|
|
14493
14812
|
}
|
|
14494
14813
|
|
|
14495
14814
|
class ThemeService {
|
|
@@ -14567,5 +14886,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
14567
14886
|
* Generated bundle index. Do not edit.
|
|
14568
14887
|
*/
|
|
14569
14888
|
|
|
14570
|
-
export { AlertDialogComponent, AppErrorComponent, AppSvgIconComponent, BaseApiService, BaseControlValueAccessor, BaseControlValueAccessorV2, BaseControlValueAccessorV3, BaseInputComponent, BaseOverlayComponent, BaseTableComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ClickOutsideDirective, CloseButtonComponent, ColorConverterService, ColorFormats, ColorPickerComponent, ColorPickerDirective, ContextMenuButtonComponent, ContextMenuIconComponent, DEFAULT_PHONE_COUNTRIES, DataTableComponent, DateInputComponent, DatePickerComponent, DatePickerOverlayComponent, DateRangePickerComponent, DateUtils, DropdownComponent, DynamicRendererComponent, EnvBannerComponent, FORM_ERRORS, FileUploaderComponent, FormValidationUtils, HumanizeFormMessagesPipe, InfiniteScrollDirective, InfiniteScrollModule, InputDateFormat, InvalidControlScrollContainerDirective, InvalidControlScrollDirective, InvalidTokenError, ListviewComponent, LoaderComponent, LoaderService, MultiSelectDropdownAppearance, MultiSelectDropdownComponent, MultiSelectionFieldComponent, NGL_CONFIG, NetworkImageComponent, NglService, NoDataComponent, NoDataTableComponent, NumberInputComponent, OpenFloatingMenuDirective, OverlayContextMenuComponent, OverlayService, OverlayWizardUtils, PaginationComponent, PaginationState, PhoneNumberInputComponent, RadioButtonComponent, RequestState, ResizableColumnDirective, ResponsiveHelperComponent, SharedConstants, ShimmerComponent, SignalButton, SignalCheckbox, SignalDateField, SignalDatePicker, SignalDateRangeField, SignalDateRangePicker, SignalDropdown, SignalFormDirective, SignalMultiSelectDropdown, SignalNumberField, SignalOtpField, SignalPhoneNumberField, SignalRadio, SignalRadioGroup, SignalRangeSlider, SignalRating, SignalSlider, SignalSwitch, SignalTextField, SignalTextarea, SignalTimeField, SignalTimePicker, SingleItemPickerInputComponent, SingleSelectionFieldComponent, SortableTableDirective, SpinnerComponent, State, StatusBadgeComponent, SvgUrlIconComponent, SwitchComponent, TableCustomComponent, TableResizableColumnsDirective, TemplateResolverArrayUtil, TemplateResolverFormat, TextAreaInputComponent, TextInputComponent, ThemeService, TimePickerComponent, ToastComponent, ToastService, ToasterComponent, TooltipDirective, UnsavedAwareDirective, arrayToCSV, arrayToSeparator, arrayToSpaceSeparator, deepEqual, defaultErrors, getDynamicTypeStructure, getSignalButtonClasses, getSignalButtonIconClasses, getSignalButtonSpinnerBorderClass, isDynamicType, isValid, jsonEqual, jwtDecode, mmddyyyyDateValidatorAsync, onlyFutureDateValidator, onlyPastDateValidator, openLink, phoneNumbers, phoneNumbersAll, printInvalidFields, provideNglConfig, resolveTemplateWithObject, toSentenceCase, validateSignalForm };
|
|
14889
|
+
export { AlertDialogComponent, AppErrorComponent, AppSvgIconComponent, BaseApiService, BaseControlValueAccessor, BaseControlValueAccessorV2, BaseControlValueAccessorV3, BaseInputComponent, BaseOverlayComponent, BaseTableComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ClickOutsideDirective, CloseButtonComponent, ColorConverterService, ColorFormats, ColorPickerComponent, ColorPickerDirective, ContextMenuButtonComponent, ContextMenuIconComponent, DEFAULT_NGL_BUTTON_CONFIG, DEFAULT_NGL_INPUT_CONFIG, DEFAULT_PHONE_COUNTRIES, DataTableComponent, DateInputComponent, DatePickerComponent, DatePickerOverlayComponent, DateRangePickerComponent, DateUtils, DropdownComponent, DynamicRendererComponent, EnvBannerComponent, FORM_ERRORS, FileUploaderComponent, FormValidationUtils, HumanizeFormMessagesPipe, InfiniteScrollDirective, InfiniteScrollModule, InputDateFormat, InvalidControlScrollContainerDirective, InvalidControlScrollDirective, InvalidTokenError, ListviewComponent, LoaderComponent, LoaderService, MultiSelectDropdownAppearance, MultiSelectDropdownComponent, MultiSelectionFieldComponent, NGL_CONFIG, NetworkImageComponent, NglService, NoDataComponent, NoDataTableComponent, NumberInputComponent, OpenFloatingMenuDirective, OverlayContextMenuComponent, OverlayService, OverlayWizardUtils, PaginationComponent, PaginationState, PhoneNumberInputComponent, RadioButtonComponent, RequestState, ResizableColumnDirective, ResponsiveHelperComponent, SIGNAL_FORM_ERRORS, SharedConstants, ShimmerComponent, SignalButton, SignalCheckbox, SignalDateField, SignalDatePicker, SignalDateRangeField, SignalDateRangePicker, SignalDropdown, SignalFormDirective, SignalFormValidators, SignalMultiSelectDropdown, SignalNumberField, SignalOtpField, SignalPhoneNumberField, SignalRadio, SignalRadioGroup, SignalRangeSlider, SignalRating, SignalSlider, SignalSwitch, SignalTextField, SignalTextarea, SignalTimeField, SignalTimePicker, SingleItemPickerInputComponent, SingleSelectionFieldComponent, SortableTableDirective, SpinnerComponent, State, StatusBadgeComponent, SvgUrlIconComponent, SwitchComponent, TableCustomComponent, TableResizableColumnsDirective, TemplateResolverArrayUtil, TemplateResolverFormat, TextAreaInputComponent, TextInputComponent, ThemeService, TimePickerComponent, ToastComponent, ToastService, ToasterComponent, TooltipDirective, UnsavedAwareDirective, arrayToCSV, arrayToSeparator, arrayToSpaceSeparator, deepEqual, defaultErrors, defaultSignalFormErrors, getDynamicTypeStructure, getSignalButtonClasses, getSignalButtonIconClasses, getSignalButtonSpinnerBorderClass, getSignalValidationErrorMessage, isDynamicType, isValid, jsonEqual, jwtDecode, mmddyyyyDateValidatorAsync, onlyFutureDateValidator, onlyPastDateValidator, openLink, phoneNumbers, phoneNumbersAll, printInvalidFields, provideNglConfig, resolveTemplateWithObject, toSentenceCase, validateSignalForm };
|
|
14571
14890
|
//# sourceMappingURL=vallift-ngl.mjs.map
|