@vallift/ngl 22.0.21 → 22.0.23
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 +287 -101
- package/fesm2022/vallift-ngl.mjs.map +1 -1
- package/package.json +1 -1
- package/types/vallift-ngl.d.ts +68 -27
package/fesm2022/vallift-ngl.mjs
CHANGED
|
@@ -26,6 +26,13 @@ const DEFAULT_NGL_INPUT_CONFIG = {
|
|
|
26
26
|
const DEFAULT_NGL_BUTTON_CONFIG = {
|
|
27
27
|
size: 'md',
|
|
28
28
|
};
|
|
29
|
+
const DEFAULT_NGL_LIST_RESPONSE = {
|
|
30
|
+
data: 'data',
|
|
31
|
+
totalCount: 'totalCount',
|
|
32
|
+
pageNumber: 'pageNumber',
|
|
33
|
+
pageSize: 'pageSize',
|
|
34
|
+
totalPages: 'totalPages',
|
|
35
|
+
};
|
|
29
36
|
const NGL_CONFIG = new InjectionToken('NGL_CONFIG');
|
|
30
37
|
|
|
31
38
|
class BaseApiService {
|
|
@@ -550,6 +557,48 @@ var RequestState;
|
|
|
550
557
|
// }
|
|
551
558
|
// }
|
|
552
559
|
|
|
560
|
+
function readPath(source, path) {
|
|
561
|
+
if (source == null || path === '') {
|
|
562
|
+
return undefined;
|
|
563
|
+
}
|
|
564
|
+
return path.split('.').reduce((current, key) => {
|
|
565
|
+
if (current == null || typeof current !== 'object') {
|
|
566
|
+
return undefined;
|
|
567
|
+
}
|
|
568
|
+
return current[key];
|
|
569
|
+
}, source);
|
|
570
|
+
}
|
|
571
|
+
function readPathNumber(source, path) {
|
|
572
|
+
if (path == null) {
|
|
573
|
+
return undefined;
|
|
574
|
+
}
|
|
575
|
+
const paths = Array.isArray(path) ? path : [path];
|
|
576
|
+
for (const candidate of paths) {
|
|
577
|
+
const value = readPath(source, candidate);
|
|
578
|
+
if (value == null || value === '') {
|
|
579
|
+
continue;
|
|
580
|
+
}
|
|
581
|
+
const numberValue = Number(value);
|
|
582
|
+
if (!Number.isNaN(numberValue)) {
|
|
583
|
+
return numberValue;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return undefined;
|
|
587
|
+
}
|
|
588
|
+
function resolveListResponseConfig(partial) {
|
|
589
|
+
return {
|
|
590
|
+
...DEFAULT_NGL_LIST_RESPONSE,
|
|
591
|
+
...partial,
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
function getListResponseData(response, config = DEFAULT_NGL_LIST_RESPONSE) {
|
|
595
|
+
const data = readPath(response, config.data);
|
|
596
|
+
return Array.isArray(data) ? data : [];
|
|
597
|
+
}
|
|
598
|
+
function getListResponseTotalCount(response, config = DEFAULT_NGL_LIST_RESPONSE) {
|
|
599
|
+
return readPathNumber(response, config.totalCount) ?? 0;
|
|
600
|
+
}
|
|
601
|
+
|
|
553
602
|
class PaginationState {
|
|
554
603
|
responseSignal = signal(null, /* @ts-ignore */
|
|
555
604
|
...(ngDevMode ? [{ debugName: "responseSignal" }] : /* istanbul ignore next */ []));
|
|
@@ -563,6 +612,7 @@ class PaginationState {
|
|
|
563
612
|
...(ngDevMode ? [{ debugName: "errorSignal" }] : /* istanbul ignore next */ []));
|
|
564
613
|
stateSignal = signal(null, /* @ts-ignore */
|
|
565
614
|
...(ngDevMode ? [{ debugName: "stateSignal" }] : /* istanbul ignore next */ []));
|
|
615
|
+
listResponse;
|
|
566
616
|
response = this.responseSignal.asReadonly();
|
|
567
617
|
loading = this.loadingSignal.asReadonly();
|
|
568
618
|
success = this.successSignal.asReadonly();
|
|
@@ -581,6 +631,8 @@ class PaginationState {
|
|
|
581
631
|
...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
|
|
582
632
|
constructor() {
|
|
583
633
|
this.stateSignal.set(RequestState.idle);
|
|
634
|
+
const nglConfig = inject(NGL_CONFIG, { optional: true });
|
|
635
|
+
this.listResponse = resolveListResponseConfig(nglConfig?.listResponse);
|
|
584
636
|
}
|
|
585
637
|
notifyLoading() {
|
|
586
638
|
this.loadingSignal.set(true);
|
|
@@ -597,22 +649,25 @@ class PaginationState {
|
|
|
597
649
|
this.failedSignal.set(false);
|
|
598
650
|
this.errorSignal.set(null);
|
|
599
651
|
this.stateSignal.set(RequestState.success);
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
});
|
|
652
|
+
const data = getListResponseData(response, this.listResponse);
|
|
653
|
+
if (data.length > 0) {
|
|
654
|
+
this.items.update(prev => [...prev, ...data]);
|
|
604
655
|
}
|
|
605
|
-
|
|
606
|
-
|
|
656
|
+
const pageNumber = readPathNumber(response, this.listResponse.pageNumber);
|
|
657
|
+
if (pageNumber != null) {
|
|
658
|
+
this.pageNumber.set(pageNumber);
|
|
607
659
|
}
|
|
608
|
-
|
|
609
|
-
|
|
660
|
+
const pageSize = readPathNumber(response, this.listResponse.pageSize);
|
|
661
|
+
if (pageSize != null) {
|
|
662
|
+
this.pageSize.set(pageSize);
|
|
610
663
|
}
|
|
611
|
-
|
|
612
|
-
|
|
664
|
+
const totalRecords = readPathNumber(response, this.listResponse.totalCount);
|
|
665
|
+
if (totalRecords != null) {
|
|
666
|
+
this.totalRecords.set(totalRecords);
|
|
613
667
|
}
|
|
614
|
-
|
|
615
|
-
|
|
668
|
+
const totalPages = readPathNumber(response, this.listResponse.totalPages);
|
|
669
|
+
if (totalPages != null) {
|
|
670
|
+
this.totalPages.set(totalPages);
|
|
616
671
|
}
|
|
617
672
|
}
|
|
618
673
|
notifyError(errorMsg) {
|
|
@@ -1320,6 +1375,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1320
1375
|
}], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
|
|
1321
1376
|
|
|
1322
1377
|
class BaseTableComponent {
|
|
1378
|
+
nglConfig = inject(NGL_CONFIG, { optional: true });
|
|
1379
|
+
listResponse = resolveListResponseConfig(this.nglConfig?.listResponse);
|
|
1323
1380
|
pageSize = input(10, /* @ts-ignore */
|
|
1324
1381
|
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
1325
1382
|
state = input(/* @ts-ignore */
|
|
@@ -1335,8 +1392,14 @@ class BaseTableComponent {
|
|
|
1335
1392
|
onPageChange(event) {
|
|
1336
1393
|
this.pageChange.emit(event);
|
|
1337
1394
|
}
|
|
1395
|
+
getRows() {
|
|
1396
|
+
return getListResponseData(this.state()?.response(), this.listResponse);
|
|
1397
|
+
}
|
|
1398
|
+
getTotalCount() {
|
|
1399
|
+
return getListResponseTotalCount(this.state()?.response(), this.listResponse);
|
|
1400
|
+
}
|
|
1338
1401
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1339
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: BaseTableComponent, isStandalone: true, selector: "app-base-table", inputs: { pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, isHorizontallyScrollable: { classPropertyName: "isHorizontallyScrollable", publicName: "isHorizontallyScrollable", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"bg-white rounded-lg h-full\">\n <table class=\"w-full h-full min-w-full bg-white\" [ngClass]=\"isHorizontallyScrollable() ? 'overflow-x-auto' : ''\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr class=\"text-overline text-neutral-500 text-nowrap h-min\">\n <ng-content select=\"[head]\"></ng-content>\n </tr>\n <tr>\n <th colspan=\"100\">\n <div class=\"border-b border-neutral-200\"></div>\n </th>\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state()?.loading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-10 px-6 py-8\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state()?.success() && (
|
|
1402
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: BaseTableComponent, isStandalone: true, selector: "app-base-table", inputs: { pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, isHorizontallyScrollable: { classPropertyName: "isHorizontallyScrollable", publicName: "isHorizontallyScrollable", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"bg-white rounded-lg h-full\">\n <table class=\"w-full h-full min-w-full bg-white\" [ngClass]=\"isHorizontallyScrollable() ? 'overflow-x-auto' : ''\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr class=\"text-overline text-neutral-500 text-nowrap h-min\">\n <ng-content select=\"[head]\"></ng-content>\n </tr>\n <tr>\n <th colspan=\"100\">\n <div class=\"border-b border-neutral-200\"></div>\n </th>\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state()?.loading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-10 px-6 py-8\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state()?.success() && getRows().length <= 0) {\n <tbody>\n <tr>\n <td colspan=\"1000\">\n <div class=\"flex flex-col justify-center items-center gap-8 px-6 py-8\">\n <app-no-data-table></app-no-data-table>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <tbody class=\"h-full\"></tbody>\n\n\n <!-- Paginator-->\n <tbody class=\"bottom-0 sticky\">\n <tr>\n <td colspan=\"100\">\n <div class=\"bg-white w-full\">\n <app-pagination\n class=\"w-full\"\n [pageSize]=\"itemsPerPage()\"\n [totalItems]=\"getTotalCount()\"\n (pageChange)=\"onPageChange($event)\">\n </app-pagination>\n </div>\n </td>\n </tr>\n </tbody>\n\n </table>\n</div>\n\n\n<!--Example-->\n<!-- <app-base-table appTableResizableColumns sortableTable [state]=\"driverListState\">-->\n<!-- <ng-container head>-->\n<!-- <th class=\"p-4 text-left\">FULL NAME</th>-->\n<!-- <th class=\"p-4 text-center \">CONTACT</th>-->\n<!-- <th class=\"p-4 text-center \">HIRED DATA</th>-->\n<!-- <!– <th class=\"p-4 text-center \">LICENSE EXPIRING</th>–>-->\n<!-- <th class=\"p-4 text-center \">STATUS</th>-->\n<!-- <th class=\"p-4 text-center \"></th>-->\n<!-- </ng-container>-->\n\n<!-- <ng-container body>-->\n<!-- @for (item of driverListState.response()?.data; track item; ) {-->\n<!-- <tr class=\"border-b border-neutral-100 w-full\">-->\n<!-- <td class=\"px-4 py-2 text-left\">-->\n<!-- <div class=\"flex flex-col gap-2\">-->\n<!-- <span class=\"text-body2 text-neutral-800\">{{ item.fullName }}</span>-->\n<!-- <span class=\"text-caption text-neutral-500\">{{ item.code }}</span>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- <td class=\"px-4 py-2 text-center\">-->\n<!-- <div class=\"flex flex-col gap-2\">-->\n<!-- <span class=\"text-body2 text-info-500\">{{ item.email }}</span>-->\n<!-- <span class=\"text-body2 text-neutral-500\">{{ item.phoneNumber }}</span>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- <td class=\"px-4 text-body2 text-center\">{{ item.hiredDate | date:'MMM d, y' }}</td>-->\n<!-- <!– <td class=\"px-4 text-body2 text-center\">{{ item.licenseExpiringDate |date:'MMM d, y h:mm a' }}</td>–>-->\n<!-- <td class=\"px-4\">-->\n<!-- <div class=\"flex justify-center\">-->\n<!-- <app-driver-status-badge [driver]=\"item\"></app-driver-status-badge>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- <td class=\"p-4 cursor-pointer items-center\">-->\n<!-- <div class=\"flex justify-center items-center\">-->\n<!-- <app-button (click)=\"onViewDriverClicked(item)\" appearance=\"textType\" textButtonColor=\"text-info-500\">-->\n<!-- View-->\n<!-- </app-button>-->\n<!-- <app-context-menu-icon></app-context-menu-icon>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- </tr>-->\n<!-- }-->\n<!-- </ng-container>-->\n<!-- </app-base-table>-->\n", styles: [""], dependencies: [{ kind: "component", type: NoDataTableComponent, selector: "app-no-data-table", inputs: ["message"] }, { kind: "component", type: ShimmerComponent, selector: "app-shimmer", inputs: ["type", "count"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PaginationComponent, selector: "app-pagination", inputs: ["totalItems", "pageSizeOptions", "pageSize"], outputs: ["pageChange"] }] });
|
|
1340
1403
|
}
|
|
1341
1404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseTableComponent, decorators: [{
|
|
1342
1405
|
type: Component,
|
|
@@ -1345,7 +1408,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1345
1408
|
ShimmerComponent,
|
|
1346
1409
|
NgClass,
|
|
1347
1410
|
PaginationComponent
|
|
1348
|
-
], template: "<div class=\"bg-white rounded-lg h-full\">\n <table class=\"w-full h-full min-w-full bg-white\" [ngClass]=\"isHorizontallyScrollable() ? 'overflow-x-auto' : ''\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr class=\"text-overline text-neutral-500 text-nowrap h-min\">\n <ng-content select=\"[head]\"></ng-content>\n </tr>\n <tr>\n <th colspan=\"100\">\n <div class=\"border-b border-neutral-200\"></div>\n </th>\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state()?.loading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-10 px-6 py-8\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state()?.success() && (
|
|
1411
|
+
], template: "<div class=\"bg-white rounded-lg h-full\">\n <table class=\"w-full h-full min-w-full bg-white\" [ngClass]=\"isHorizontallyScrollable() ? 'overflow-x-auto' : ''\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr class=\"text-overline text-neutral-500 text-nowrap h-min\">\n <ng-content select=\"[head]\"></ng-content>\n </tr>\n <tr>\n <th colspan=\"100\">\n <div class=\"border-b border-neutral-200\"></div>\n </th>\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state()?.loading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-10 px-6 py-8\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state()?.success() && getRows().length <= 0) {\n <tbody>\n <tr>\n <td colspan=\"1000\">\n <div class=\"flex flex-col justify-center items-center gap-8 px-6 py-8\">\n <app-no-data-table></app-no-data-table>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <tbody class=\"h-full\"></tbody>\n\n\n <!-- Paginator-->\n <tbody class=\"bottom-0 sticky\">\n <tr>\n <td colspan=\"100\">\n <div class=\"bg-white w-full\">\n <app-pagination\n class=\"w-full\"\n [pageSize]=\"itemsPerPage()\"\n [totalItems]=\"getTotalCount()\"\n (pageChange)=\"onPageChange($event)\">\n </app-pagination>\n </div>\n </td>\n </tr>\n </tbody>\n\n </table>\n</div>\n\n\n<!--Example-->\n<!-- <app-base-table appTableResizableColumns sortableTable [state]=\"driverListState\">-->\n<!-- <ng-container head>-->\n<!-- <th class=\"p-4 text-left\">FULL NAME</th>-->\n<!-- <th class=\"p-4 text-center \">CONTACT</th>-->\n<!-- <th class=\"p-4 text-center \">HIRED DATA</th>-->\n<!-- <!– <th class=\"p-4 text-center \">LICENSE EXPIRING</th>–>-->\n<!-- <th class=\"p-4 text-center \">STATUS</th>-->\n<!-- <th class=\"p-4 text-center \"></th>-->\n<!-- </ng-container>-->\n\n<!-- <ng-container body>-->\n<!-- @for (item of driverListState.response()?.data; track item; ) {-->\n<!-- <tr class=\"border-b border-neutral-100 w-full\">-->\n<!-- <td class=\"px-4 py-2 text-left\">-->\n<!-- <div class=\"flex flex-col gap-2\">-->\n<!-- <span class=\"text-body2 text-neutral-800\">{{ item.fullName }}</span>-->\n<!-- <span class=\"text-caption text-neutral-500\">{{ item.code }}</span>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- <td class=\"px-4 py-2 text-center\">-->\n<!-- <div class=\"flex flex-col gap-2\">-->\n<!-- <span class=\"text-body2 text-info-500\">{{ item.email }}</span>-->\n<!-- <span class=\"text-body2 text-neutral-500\">{{ item.phoneNumber }}</span>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- <td class=\"px-4 text-body2 text-center\">{{ item.hiredDate | date:'MMM d, y' }}</td>-->\n<!-- <!– <td class=\"px-4 text-body2 text-center\">{{ item.licenseExpiringDate |date:'MMM d, y h:mm a' }}</td>–>-->\n<!-- <td class=\"px-4\">-->\n<!-- <div class=\"flex justify-center\">-->\n<!-- <app-driver-status-badge [driver]=\"item\"></app-driver-status-badge>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- <td class=\"p-4 cursor-pointer items-center\">-->\n<!-- <div class=\"flex justify-center items-center\">-->\n<!-- <app-button (click)=\"onViewDriverClicked(item)\" appearance=\"textType\" textButtonColor=\"text-info-500\">-->\n<!-- View-->\n<!-- </app-button>-->\n<!-- <app-context-menu-icon></app-context-menu-icon>-->\n<!-- </div>-->\n<!-- </td>-->\n<!-- </tr>-->\n<!-- }-->\n<!-- </ng-container>-->\n<!-- </app-base-table>-->\n" }]
|
|
1349
1412
|
}], propDecorators: { pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], isHorizontallyScrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isHorizontallyScrollable", required: false }] }], itemsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsPerPage", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
|
|
1350
1413
|
|
|
1351
1414
|
class SortableTableDirective {
|
|
@@ -2993,6 +3056,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
2993
3056
|
|
|
2994
3057
|
class DataTableComponent extends BaseControlValueAccessorV3 {
|
|
2995
3058
|
headerComponents;
|
|
3059
|
+
nglConfig = inject(NGL_CONFIG, { optional: true });
|
|
3060
|
+
listResponse = resolveListResponseConfig(this.nglConfig?.listResponse);
|
|
2996
3061
|
columnDefs = input.required(/* @ts-ignore */
|
|
2997
3062
|
...(ngDevMode ? [{ debugName: "columnDefs" }] : /* istanbul ignore next */ []));
|
|
2998
3063
|
state = input.required(/* @ts-ignore */
|
|
@@ -3027,6 +3092,12 @@ class DataTableComponent extends BaseControlValueAccessorV3 {
|
|
|
3027
3092
|
paginationEvent;
|
|
3028
3093
|
tableSortEvent;
|
|
3029
3094
|
searchText = '';
|
|
3095
|
+
getRows() {
|
|
3096
|
+
return getListResponseData(this.state().response(), this.listResponse);
|
|
3097
|
+
}
|
|
3098
|
+
getTotalCount() {
|
|
3099
|
+
return getListResponseTotalCount(this.state().response(), this.listResponse);
|
|
3100
|
+
}
|
|
3030
3101
|
ngAfterViewInit() {
|
|
3031
3102
|
let paginationEvent = {
|
|
3032
3103
|
pageNumber: 1, pageSize: this.pageSize()
|
|
@@ -3213,7 +3284,7 @@ class DataTableComponent extends BaseControlValueAccessorV3 {
|
|
|
3213
3284
|
this.onActionPerformed.emit($event);
|
|
3214
3285
|
}
|
|
3215
3286
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DataTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3216
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: DataTableComponent, isStandalone: true, selector: "app-data-table", inputs: { columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, enableHorizontallyScrollable: { classPropertyName: "enableHorizontallyScrollable", publicName: "enableHorizontallyScrollable", isSignal: true, isRequired: false, transformFunction: null }, enableResizableColumns: { classPropertyName: "enableResizableColumns", publicName: "enableResizableColumns", isSignal: true, isRequired: false, transformFunction: null }, enableClickableRows: { classPropertyName: "enableClickableRows", publicName: "enableClickableRows", isSignal: true, isRequired: false, transformFunction: null }, expandableComponent: { classPropertyName: "expandableComponent", publicName: "expandableComponent", isSignal: true, isRequired: false, transformFunction: null }, enableColumnsConfig: { classPropertyName: "enableColumnsConfig", publicName: "enableColumnsConfig", isSignal: true, isRequired: false, transformFunction: null }, filterComponent: { classPropertyName: "filterComponent", publicName: "filterComponent", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, disableInitialLoad: { classPropertyName: "disableInitialLoad", publicName: "disableInitialLoad", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", sortChanged: "sortChanged", tableStateChanged: "tableStateChanged", onActionPerformed: "onActionPerformed", filterChanged: "filterChanged", onRowClicked: "onRowClicked" }, queries: [{ propertyName: "headerComponents", predicate: ["filter"] }], viewQueries: [{ propertyName: "portal", first: true, predicate: CdkPortal, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col bg-white rounded-2xl overflow-clip h-full\">\n\n @if (enableSearch() || headerComponents.length > 0) {\n <div class=\"flex px-6 py-5 border-b border-neutral-100 justify-between\">\n @if (enableSearch()) {\n <app-text-input [iconSrc]=\"'assets/icons/search.svg'\"\n placeholder=\"Search...\"\n type=\"search\"\n [fullWidth]=\"false\"\n (changeValue)=\"onSearchTextChanged($event)\">\n </app-text-input>\n }\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n }\n\n <div class=\"grow h-full w-full min-w-full bg-white overflow-x-auto\">\n <table class=\"h-min w-full\"\n [ngClass]=\"[enableHorizontallyScrollable() ? 'overflow-x-auto' : '']\"\n [appTableResizableColumns]=\"enableResizableColumns()\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr sortableTable (sortChange)=\"onSortChanged($event)\" class=\"text-overline text-neutral-500 text-nowrap h-min\">\n\n @if (expandableComponent()) {\n <th class=\"sticky left-0 z-50 bg-white border-b border-gray-200 px-4 py-3\"></th>\n }\n\n @for (column of columnDefs(); track column) {\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <th\n [attr.data-sortable-key]=\"column.sortKey\"\n class=\"relative cursor-pointer border-b border-gray-200 px-4 py-3 text-caption font-semibold text-gray-700 uppercase tracking-wider\"\n [ngClass]=\"getThTrClass(column)\">\n {{ column.title }}\n </th>\n }\n }\n\n @if (enableColumnsConfig()) {\n <th\n class=\"sticky right-0 bg-white flex justify-center cursor-pointer items-center border-b border-gray-200 px-1.5 py-3\">\n <div\n #columnsConfigTriggerElement\n (click)=\"onColumnSettingsClicked(columnsConfigTriggerElement)\"\n class=\"flex justify-center items-center h-[28px] w-[28px] cursor-pointer rounded-full hover:bg-neutral-100 transition-all duration-500\">\n <svg class=\"h-[16px] w-[16px] text-neutral-600\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n d=\"M12 8C13.0608 8 14.0782 8.42143 14.8284 9.17157C15.5785 9.92172 16 10.9391 16 12C16 13.0609 15.5785 14.0783 14.8284 14.8284C14.0782 15.5786 13.0608 16 12 16C10.9391 16 9.92168 15.5786 9.17153 14.8284C8.42139 14.0783 7.99996 13.0609 7.99996 12C7.99996 10.9391 8.42139 9.92172 9.17153 9.17157C9.92168 8.42143 10.9391 8 12 8ZM12 10C11.4695 10 10.9608 10.2107 10.5857 10.5858C10.2107 10.9609 9.99996 11.4696 9.99996 12C9.99996 12.5304 10.2107 13.0391 10.5857 13.4142C10.9608 13.7893 11.4695 14 12 14C12.5304 14 13.0391 13.7893 13.4142 13.4142C13.7892 13.0391 14 12.5304 14 12C14 11.4696 13.7892 10.9609 13.4142 10.5858C13.0391 10.2107 12.5304 10 12 10ZM9.99996 22C9.74996 22 9.53996 21.82 9.49996 21.58L9.12996 18.93C8.49996 18.68 7.95996 18.34 7.43996 17.94L4.94996 18.95C4.72996 19.03 4.45996 18.95 4.33996 18.73L2.33996 15.27C2.20996 15.05 2.26996 14.78 2.45996 14.63L4.56996 12.97L4.49996 12L4.56996 11L2.45996 9.37C2.26996 9.22 2.20996 8.95 2.33996 8.73L4.33996 5.27C4.45996 5.05 4.72996 4.96 4.94996 5.05L7.43996 6.05C7.95996 5.66 8.49996 5.32 9.12996 5.07L9.49996 2.42C9.53996 2.18 9.74996 2 9.99996 2H14C14.25 2 14.46 2.18 14.5 2.42L14.87 5.07C15.5 5.32 16.04 5.66 16.56 6.05L19.05 5.05C19.27 4.96 19.54 5.05 19.66 5.27L21.66 8.73C21.79 8.95 21.73 9.22 21.54 9.37L19.43 11L19.5 12L19.43 13L21.54 14.63C21.73 14.78 21.79 15.05 21.66 15.27L19.66 18.73C19.54 18.95 19.27 19.04 19.05 18.95L16.56 17.95C16.04 18.34 15.5 18.68 14.87 18.93L14.5 21.58C14.46 21.82 14.25 22 14 22H9.99996ZM11.25 4L10.88 6.61C9.67996 6.86 8.61996 7.5 7.84996 8.39L5.43996 7.35L4.68996 8.65L6.79996 10.2C6.39996 11.37 6.39996 12.64 6.79996 13.8L4.67996 15.36L5.42996 16.66L7.85996 15.62C8.62996 16.5 9.67996 17.14 10.87 17.38L11.24 20H12.76L13.13 17.39C14.32 17.14 15.37 16.5 16.14 15.62L18.57 16.66L19.32 15.36L17.2 13.81C17.6 12.64 17.6 11.37 17.2 10.2L19.31 8.65L18.56 7.35L16.15 8.39C15.38 7.5 14.32 6.86 13.12 6.62L12.75 4H11.25Z\"\n fill=\"currentColor\"/>\n </svg>\n </div>\n </th>\n }\n\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state().initialLoading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-6 px-6 py-4\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state().success() && (state().response()?.data ?? []).length <= 0) {\n <tbody>\n <tr>\n <td colspan=\"1000\">\n <div class=\"flex flex-col justify-center items-center gap-8 px-6 py-8\">\n <app-no-data-table></app-no-data-table>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n @if ((state().response()?.data ?? []).length > 0) {\n <tbody class=\"\">\n @for (item of state().response()?.data ?? []; track i; let i = $index) {\n <tr (click)=\"_onRowClicked(item)\"\n [ngClass]=\"[enableClickableRows() ? 'hover:bg-neutral-50 cursor-pointer' : '']\">\n\n @if (expandableComponent()) {\n <td class=\"sticky left-0 bg-white z-50 px-1 py-2 border-b border-gray-100 w-min select-none\">\n <div\n (click)=\"onRowExpandedClicked(i)\"\n class=\"mx-auto flex items-center justify-center h-[40px] w-[40px] rounded-full bg-neutral-50 hover:bg-neutral-100 cursor-pointer transition-all duration-500\">\n <svg class=\"h-[20px] w-[20px] text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path d=\"M7.41 8.58L12 13.17L16.59 8.58L18 10L12 16L6 10L7.41 8.58Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n </td>\n }\n\n @for (column of columnDefs(); track column) {\n\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <td\n class=\"px-4 py-3 border-b border-gray-100 relative text-body2 text-gray-800\"\n [ngClass]=\"[getThTrClass(column)]\">\n\n @switch (column.type) {\n @default {\n <span class=\"text-body2 text-neutral-700\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('text') {\n <span class=\"text-body2 text-neutral-700 text-nowrap\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('date') {\n <div class=\"flex items-center gap-3\" [ngClass]=\"[getFlexJustify(column)]\">\n @if (column.dateConfig?.showIcon == undefined ? true : (column.dateConfig?.showIcon)) {\n <svg class=\"h-4 w-4 text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n 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 fill=\"currentColor\"/>\n </svg>\n }\n\n @let date = getPropertyValue(item, column);\n @if (date && date != 'null') {\n <span\n class=\"text-body2 text-nowrap\">{{ date | date:column.dateConfig?.dateFormat ?? 'MMM d, y, h:mm a' }}</span>\n }\n </div>\n }\n @case ('badge') {\n @let badgeProperty = getBadgeProperty(item, column);\n <div class=\"flex items-center\" [ngClass]=\"getFlexJustify(column)\">\n <app-status-badge [backgroundColorClass]=\"badgeProperty?.backgroundColorClass ?? null\"\n [indicatorColor]=\"badgeProperty?.indicatorColorClass ?? null\"\n [borderColorClass]=\"badgeProperty?.borderColorClass ?? null\"\n [textColorClass]=\"badgeProperty?.textColorClass ?? null\"\n [isUpperCase]=\"true\"\n [status]=\"badgeProperty?.displayText ?? 'Unknown'\">\n </app-status-badge>\n </div>\n }\n @case ('custom') {\n @if (column.component) {\n <div class=\"flex items-center\">\n <app-dynamic-renderer\n [component]=\"column.component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n }\n }\n @case ('actions') {\n\n <div class=\"flex items-center gap-3\" [ngClass]=\"getFlexJustify(column)\">\n @if (column.actionsConfig?.iconActions) {\n @for (iconAction of column.actionsConfig?.iconActions ?? []; track iconAction) {\n <div\n (click)=\"_onActionClicked(iconAction.actionKey, item, $event)\"\n class=\"flex items-center justify-center h-[36px] w-[36px] cursor-pointer rounded-full hover:bg-neutral-100\">\n <!-- <app-svg-icon class=\"text-neutral-500\"-->\n <!-- [matTooltip]=\"iconAction.label\"-->\n <!-- matTooltipClass=\"mt-2\"-->\n <!-- [src]=\"iconAction.iconPath\"-->\n <!-- [size]=\"20\"></app-svg-icon>-->\n <app-svg-icon class=\"text-neutral-500\"\n [src]=\"iconAction.iconPath\"\n [size]=\"20\"></app-svg-icon>\n </div>\n }\n }\n @if (column.actionsConfig?.threeDotMenuActions) {\n <app-context-menu-button (onActionClicked)=\"_onActionClicked($event, item, null)\"\n [actions]=\"getContextMenuActions(column.actionsConfig?.threeDotMenuActions ?? [])\"></app-context-menu-button>\n }\n\n @if (column.actionsConfig?.textMenuActions) {\n @for (textAction of column.actionsConfig?.textMenuActions ?? []; track textAction) {\n <app-text-button-small\n (click)=\"_onActionClicked(textAction.actionKey, item, $event)\">{{ textAction.label }}\n </app-text-button-small>\n }\n }\n\n @if (column.actionsConfig?.components) {\n <div class=\"flex items-center\">\n @for (component of (column.actionsConfig?.components ?? []); track $index) {\n <app-dynamic-renderer\n [component]=\"component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n }\n </div>\n }\n\n </div>\n\n }\n\n }\n\n </td>\n }\n\n }\n\n @if (enableColumnsConfig()) {\n <td\n class=\"px-1 py-3 border-b border-gray-100 w-min\">\n </td>\n }\n </tr>\n\n @if (expandableComponent()) {\n @if (i == expandedRowIndex()) {\n <tr class=\"transition-all duration-700\">\n <td colspan=\"100\">\n <div class=\"mx-4 my-4 p-4 bg-neutral-50 rounded-lg\">\n <app-dynamic-renderer\n [component]=\"expandableComponent()\"\n [rowData]=\"item\"\n (actionPerformed)=\"onCellActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n\n </td>\n </tr>\n }\n }\n\n }\n\n </tbody>\n }\n\n <tbody class=\"h-full\"></tbody>\n\n\n </table>\n </div>\n\n <app-pagination\n [pageSize]=\"pageSize()\"\n [totalItems]=\"state().response()?.totalCount ?? 0\"\n (pageChange)=\"onPageChange($event)\">\n </app-pagination>\n</div>\n\n<ng-template cdkPortal>\n <div\n class=\"flex flex-col gap-3 px-2 py-2 bg-white rounded-md max-h-[400px] border border-neutral-200 shadow-2\">\n <div class=\"flex flex-col overflow-y-scroll\">\n @for (column of columnDefs(); track column; let index = $index) {\n @if (column.type != 'actions') {\n <div class=\"grow flex items-center min-w-[200px] px-1\">\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n <app-checkbox [title]=\"column.title\" [ngModel]=\"isColumnVisible\"\n (valueChanged)=\"onColumnVisibleOrHide($event, column)\"></app-checkbox>\n </div>\n }\n }\n </div>\n\n <span (click)=\"onSelectAllColumnClicked()\" class=\"px-4 text-overline text-info-500 cursor-pointer\">Select All</span>\n </div>\n</ng-template>\n\n", styles: [""], dependencies: [{ kind: "component", type: PaginationComponent, selector: "app-pagination", inputs: ["totalItems", "pageSizeOptions", "pageSize"], outputs: ["pageChange"] }, { kind: "component", type: NoDataTableComponent, selector: "app-no-data-table", inputs: ["message"] }, { kind: "component", type: ShimmerComponent, selector: "app-shimmer", inputs: ["type", "count"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: StatusBadgeComponent, selector: "app-status-badge", inputs: ["status", "backgroundColorClass", "indicatorColor", "textColorClass", "borderColorClass", "isUpperCase"] }, { kind: "directive", type: SortableTableDirective, selector: "[sortableTable]", outputs: ["sortChange"] }, { kind: "directive", type: TableResizableColumnsDirective, selector: "[appTableResizableColumns]", inputs: ["appTableResizableColumns"] }, { kind: "directive", type: CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "component", type: CheckboxComponent, selector: "app-checkbox", inputs: ["title"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TextInputComponent, selector: "app-text-input", inputs: ["appearance", "type", "viewType", "size", "iconSrc", "actionIcon", "label", "fullWidth", "placeholder", "errorMessages", "showErrorSpace", "mask", "debounceSearchEnabled", "autoFocus"], outputs: ["changeValue", "actionIconClicked"] }, { kind: "component", type: TextButtonSmall, selector: "app-text-button-small" }, { kind: "component", type: DynamicRendererComponent, selector: "app-dynamic-renderer", inputs: ["component", "rowData", "data", "rowPosition", "isLastRow"], outputs: ["actionPerformed"] }, { kind: "component", type: ContextMenuButtonComponent, selector: "app-context-menu-button", inputs: ["actions", "positionPreference"], outputs: ["onActionClicked"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
|
|
3287
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: DataTableComponent, isStandalone: true, selector: "app-data-table", inputs: { columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, enableHorizontallyScrollable: { classPropertyName: "enableHorizontallyScrollable", publicName: "enableHorizontallyScrollable", isSignal: true, isRequired: false, transformFunction: null }, enableResizableColumns: { classPropertyName: "enableResizableColumns", publicName: "enableResizableColumns", isSignal: true, isRequired: false, transformFunction: null }, enableClickableRows: { classPropertyName: "enableClickableRows", publicName: "enableClickableRows", isSignal: true, isRequired: false, transformFunction: null }, expandableComponent: { classPropertyName: "expandableComponent", publicName: "expandableComponent", isSignal: true, isRequired: false, transformFunction: null }, enableColumnsConfig: { classPropertyName: "enableColumnsConfig", publicName: "enableColumnsConfig", isSignal: true, isRequired: false, transformFunction: null }, filterComponent: { classPropertyName: "filterComponent", publicName: "filterComponent", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, disableInitialLoad: { classPropertyName: "disableInitialLoad", publicName: "disableInitialLoad", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", sortChanged: "sortChanged", tableStateChanged: "tableStateChanged", onActionPerformed: "onActionPerformed", filterChanged: "filterChanged", onRowClicked: "onRowClicked" }, queries: [{ propertyName: "headerComponents", predicate: ["filter"] }], viewQueries: [{ propertyName: "portal", first: true, predicate: CdkPortal, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col bg-white rounded-2xl overflow-clip h-full\">\n\n @if (enableSearch() || headerComponents.length > 0) {\n <div class=\"flex px-6 py-5 border-b border-neutral-100 justify-between\">\n @if (enableSearch()) {\n <app-text-input [iconSrc]=\"'assets/icons/search.svg'\"\n placeholder=\"Search...\"\n type=\"search\"\n [fullWidth]=\"false\"\n (changeValue)=\"onSearchTextChanged($event)\">\n </app-text-input>\n }\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n }\n\n <div class=\"grow h-full w-full min-w-full bg-white overflow-x-auto\">\n <table class=\"h-min w-full\"\n [ngClass]=\"[enableHorizontallyScrollable() ? 'overflow-x-auto' : '']\"\n [appTableResizableColumns]=\"enableResizableColumns()\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr sortableTable (sortChange)=\"onSortChanged($event)\" class=\"text-overline text-neutral-500 text-nowrap h-min\">\n\n @if (expandableComponent()) {\n <th class=\"sticky left-0 z-50 bg-white border-b border-gray-200 px-4 py-3\"></th>\n }\n\n @for (column of columnDefs(); track column) {\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <th\n [attr.data-sortable-key]=\"column.sortKey\"\n class=\"relative cursor-pointer border-b border-gray-200 px-4 py-3 text-caption font-semibold text-gray-700 uppercase tracking-wider\"\n [ngClass]=\"getThTrClass(column)\">\n {{ column.title }}\n </th>\n }\n }\n\n @if (enableColumnsConfig()) {\n <th\n class=\"sticky right-0 bg-white flex justify-center cursor-pointer items-center border-b border-gray-200 px-1.5 py-3\">\n <div\n #columnsConfigTriggerElement\n (click)=\"onColumnSettingsClicked(columnsConfigTriggerElement)\"\n class=\"flex justify-center items-center h-[28px] w-[28px] cursor-pointer rounded-full hover:bg-neutral-100 transition-all duration-500\">\n <svg class=\"h-[16px] w-[16px] text-neutral-600\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n d=\"M12 8C13.0608 8 14.0782 8.42143 14.8284 9.17157C15.5785 9.92172 16 10.9391 16 12C16 13.0609 15.5785 14.0783 14.8284 14.8284C14.0782 15.5786 13.0608 16 12 16C10.9391 16 9.92168 15.5786 9.17153 14.8284C8.42139 14.0783 7.99996 13.0609 7.99996 12C7.99996 10.9391 8.42139 9.92172 9.17153 9.17157C9.92168 8.42143 10.9391 8 12 8ZM12 10C11.4695 10 10.9608 10.2107 10.5857 10.5858C10.2107 10.9609 9.99996 11.4696 9.99996 12C9.99996 12.5304 10.2107 13.0391 10.5857 13.4142C10.9608 13.7893 11.4695 14 12 14C12.5304 14 13.0391 13.7893 13.4142 13.4142C13.7892 13.0391 14 12.5304 14 12C14 11.4696 13.7892 10.9609 13.4142 10.5858C13.0391 10.2107 12.5304 10 12 10ZM9.99996 22C9.74996 22 9.53996 21.82 9.49996 21.58L9.12996 18.93C8.49996 18.68 7.95996 18.34 7.43996 17.94L4.94996 18.95C4.72996 19.03 4.45996 18.95 4.33996 18.73L2.33996 15.27C2.20996 15.05 2.26996 14.78 2.45996 14.63L4.56996 12.97L4.49996 12L4.56996 11L2.45996 9.37C2.26996 9.22 2.20996 8.95 2.33996 8.73L4.33996 5.27C4.45996 5.05 4.72996 4.96 4.94996 5.05L7.43996 6.05C7.95996 5.66 8.49996 5.32 9.12996 5.07L9.49996 2.42C9.53996 2.18 9.74996 2 9.99996 2H14C14.25 2 14.46 2.18 14.5 2.42L14.87 5.07C15.5 5.32 16.04 5.66 16.56 6.05L19.05 5.05C19.27 4.96 19.54 5.05 19.66 5.27L21.66 8.73C21.79 8.95 21.73 9.22 21.54 9.37L19.43 11L19.5 12L19.43 13L21.54 14.63C21.73 14.78 21.79 15.05 21.66 15.27L19.66 18.73C19.54 18.95 19.27 19.04 19.05 18.95L16.56 17.95C16.04 18.34 15.5 18.68 14.87 18.93L14.5 21.58C14.46 21.82 14.25 22 14 22H9.99996ZM11.25 4L10.88 6.61C9.67996 6.86 8.61996 7.5 7.84996 8.39L5.43996 7.35L4.68996 8.65L6.79996 10.2C6.39996 11.37 6.39996 12.64 6.79996 13.8L4.67996 15.36L5.42996 16.66L7.85996 15.62C8.62996 16.5 9.67996 17.14 10.87 17.38L11.24 20H12.76L13.13 17.39C14.32 17.14 15.37 16.5 16.14 15.62L18.57 16.66L19.32 15.36L17.2 13.81C17.6 12.64 17.6 11.37 17.2 10.2L19.31 8.65L18.56 7.35L16.15 8.39C15.38 7.5 14.32 6.86 13.12 6.62L12.75 4H11.25Z\"\n fill=\"currentColor\"/>\n </svg>\n </div>\n </th>\n }\n\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state().initialLoading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-6 px-6 py-4\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state().success() && getRows().length <= 0) {\n <tbody>\n <tr>\n <td colspan=\"1000\">\n <div class=\"flex flex-col justify-center items-center gap-8 px-6 py-8\">\n <app-no-data-table></app-no-data-table>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n @if (getRows().length > 0) {\n <tbody class=\"\">\n @for (item of getRows(); track i; let i = $index) {\n <tr (click)=\"_onRowClicked(item)\"\n [ngClass]=\"[enableClickableRows() ? 'hover:bg-neutral-50 cursor-pointer' : '']\">\n\n @if (expandableComponent()) {\n <td class=\"sticky left-0 bg-white z-50 px-1 py-2 border-b border-gray-100 w-min select-none\">\n <div\n (click)=\"onRowExpandedClicked(i)\"\n class=\"mx-auto flex items-center justify-center h-[40px] w-[40px] rounded-full bg-neutral-50 hover:bg-neutral-100 cursor-pointer transition-all duration-500\">\n <svg class=\"h-[20px] w-[20px] text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path d=\"M7.41 8.58L12 13.17L16.59 8.58L18 10L12 16L6 10L7.41 8.58Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n </td>\n }\n\n @for (column of columnDefs(); track column) {\n\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <td\n class=\"px-4 py-3 border-b border-gray-100 relative text-body2 text-gray-800\"\n [ngClass]=\"[getThTrClass(column)]\">\n\n @switch (column.type) {\n @default {\n <span class=\"text-body2 text-neutral-700\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('text') {\n <span class=\"text-body2 text-neutral-700 text-nowrap\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('date') {\n <div class=\"flex items-center gap-3\" [ngClass]=\"[getFlexJustify(column)]\">\n @if (column.dateConfig?.showIcon == undefined ? true : (column.dateConfig?.showIcon)) {\n <svg class=\"h-4 w-4 text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n 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 fill=\"currentColor\"/>\n </svg>\n }\n\n @let date = getPropertyValue(item, column);\n @if (date && date != 'null') {\n <span\n class=\"text-body2 text-nowrap\">{{ date | date:column.dateConfig?.dateFormat ?? 'MMM d, y, h:mm a' }}</span>\n }\n </div>\n }\n @case ('badge') {\n @let badgeProperty = getBadgeProperty(item, column);\n <div class=\"flex items-center\" [ngClass]=\"getFlexJustify(column)\">\n <app-status-badge [backgroundColorClass]=\"badgeProperty?.backgroundColorClass ?? null\"\n [indicatorColor]=\"badgeProperty?.indicatorColorClass ?? null\"\n [borderColorClass]=\"badgeProperty?.borderColorClass ?? null\"\n [textColorClass]=\"badgeProperty?.textColorClass ?? null\"\n [isUpperCase]=\"true\"\n [status]=\"badgeProperty?.displayText ?? 'Unknown'\">\n </app-status-badge>\n </div>\n }\n @case ('custom') {\n @if (column.component) {\n <div class=\"flex items-center\">\n <app-dynamic-renderer\n [component]=\"column.component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n }\n }\n @case ('actions') {\n\n <div class=\"flex items-center gap-3\" [ngClass]=\"getFlexJustify(column)\">\n @if (column.actionsConfig?.iconActions) {\n @for (iconAction of column.actionsConfig?.iconActions ?? []; track iconAction) {\n <div\n (click)=\"_onActionClicked(iconAction.actionKey, item, $event)\"\n class=\"flex items-center justify-center h-[36px] w-[36px] cursor-pointer rounded-full hover:bg-neutral-100\">\n <!-- <app-svg-icon class=\"text-neutral-500\"-->\n <!-- [matTooltip]=\"iconAction.label\"-->\n <!-- matTooltipClass=\"mt-2\"-->\n <!-- [src]=\"iconAction.iconPath\"-->\n <!-- [size]=\"20\"></app-svg-icon>-->\n <app-svg-icon class=\"text-neutral-500\"\n [src]=\"iconAction.iconPath\"\n [size]=\"20\"></app-svg-icon>\n </div>\n }\n }\n @if (column.actionsConfig?.threeDotMenuActions) {\n <app-context-menu-button (onActionClicked)=\"_onActionClicked($event, item, null)\"\n [actions]=\"getContextMenuActions(column.actionsConfig?.threeDotMenuActions ?? [])\"></app-context-menu-button>\n }\n\n @if (column.actionsConfig?.textMenuActions) {\n @for (textAction of column.actionsConfig?.textMenuActions ?? []; track textAction) {\n <app-text-button-small\n (click)=\"_onActionClicked(textAction.actionKey, item, $event)\">{{ textAction.label }}\n </app-text-button-small>\n }\n }\n\n @if (column.actionsConfig?.components) {\n <div class=\"flex items-center\">\n @for (component of (column.actionsConfig?.components ?? []); track $index) {\n <app-dynamic-renderer\n [component]=\"component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n }\n </div>\n }\n\n </div>\n\n }\n\n }\n\n </td>\n }\n\n }\n\n @if (enableColumnsConfig()) {\n <td\n class=\"px-1 py-3 border-b border-gray-100 w-min\">\n </td>\n }\n </tr>\n\n @if (expandableComponent()) {\n @if (i == expandedRowIndex()) {\n <tr class=\"transition-all duration-700\">\n <td colspan=\"100\">\n <div class=\"mx-4 my-4 p-4 bg-neutral-50 rounded-lg\">\n <app-dynamic-renderer\n [component]=\"expandableComponent()\"\n [rowData]=\"item\"\n (actionPerformed)=\"onCellActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n\n </td>\n </tr>\n }\n }\n\n }\n\n </tbody>\n }\n\n <tbody class=\"h-full\"></tbody>\n\n\n </table>\n </div>\n\n <app-pagination\n [pageSize]=\"pageSize()\"\n [totalItems]=\"getTotalCount()\"\n (pageChange)=\"onPageChange($event)\">\n </app-pagination>\n</div>\n\n<ng-template cdkPortal>\n <div\n class=\"flex flex-col gap-3 px-2 py-2 bg-white rounded-md max-h-[400px] border border-neutral-200 shadow-2\">\n <div class=\"flex flex-col overflow-y-scroll\">\n @for (column of columnDefs(); track column; let index = $index) {\n @if (column.type != 'actions') {\n <div class=\"grow flex items-center min-w-[200px] px-1\">\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n <app-checkbox [title]=\"column.title\" [ngModel]=\"isColumnVisible\"\n (valueChanged)=\"onColumnVisibleOrHide($event, column)\"></app-checkbox>\n </div>\n }\n }\n </div>\n\n <span (click)=\"onSelectAllColumnClicked()\" class=\"px-4 text-overline text-info-500 cursor-pointer\">Select All</span>\n </div>\n</ng-template>\n\n", styles: [""], dependencies: [{ kind: "component", type: PaginationComponent, selector: "app-pagination", inputs: ["totalItems", "pageSizeOptions", "pageSize"], outputs: ["pageChange"] }, { kind: "component", type: NoDataTableComponent, selector: "app-no-data-table", inputs: ["message"] }, { kind: "component", type: ShimmerComponent, selector: "app-shimmer", inputs: ["type", "count"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "component", type: StatusBadgeComponent, selector: "app-status-badge", inputs: ["status", "backgroundColorClass", "indicatorColor", "textColorClass", "borderColorClass", "isUpperCase"] }, { kind: "directive", type: SortableTableDirective, selector: "[sortableTable]", outputs: ["sortChange"] }, { kind: "directive", type: TableResizableColumnsDirective, selector: "[appTableResizableColumns]", inputs: ["appTableResizableColumns"] }, { kind: "directive", type: CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "component", type: CheckboxComponent, selector: "app-checkbox", inputs: ["title"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TextInputComponent, selector: "app-text-input", inputs: ["appearance", "type", "viewType", "size", "iconSrc", "actionIcon", "label", "fullWidth", "placeholder", "errorMessages", "showErrorSpace", "mask", "debounceSearchEnabled", "autoFocus"], outputs: ["changeValue", "actionIconClicked"] }, { kind: "component", type: TextButtonSmall, selector: "app-text-button-small" }, { kind: "component", type: DynamicRendererComponent, selector: "app-dynamic-renderer", inputs: ["component", "rowData", "data", "rowPosition", "isLastRow"], outputs: ["actionPerformed"] }, { kind: "component", type: ContextMenuButtonComponent, selector: "app-context-menu-button", inputs: ["actions", "positionPreference"], outputs: ["onActionClicked"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
|
|
3217
3288
|
}
|
|
3218
3289
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
3219
3290
|
type: Component,
|
|
@@ -3234,7 +3305,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
3234
3305
|
TextButtonSmall,
|
|
3235
3306
|
DynamicRendererComponent,
|
|
3236
3307
|
ContextMenuButtonComponent
|
|
3237
|
-
], template: "<div class=\"flex flex-col bg-white rounded-2xl overflow-clip h-full\">\n\n @if (enableSearch() || headerComponents.length > 0) {\n <div class=\"flex px-6 py-5 border-b border-neutral-100 justify-between\">\n @if (enableSearch()) {\n <app-text-input [iconSrc]=\"'assets/icons/search.svg'\"\n placeholder=\"Search...\"\n type=\"search\"\n [fullWidth]=\"false\"\n (changeValue)=\"onSearchTextChanged($event)\">\n </app-text-input>\n }\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n }\n\n <div class=\"grow h-full w-full min-w-full bg-white overflow-x-auto\">\n <table class=\"h-min w-full\"\n [ngClass]=\"[enableHorizontallyScrollable() ? 'overflow-x-auto' : '']\"\n [appTableResizableColumns]=\"enableResizableColumns()\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr sortableTable (sortChange)=\"onSortChanged($event)\" class=\"text-overline text-neutral-500 text-nowrap h-min\">\n\n @if (expandableComponent()) {\n <th class=\"sticky left-0 z-50 bg-white border-b border-gray-200 px-4 py-3\"></th>\n }\n\n @for (column of columnDefs(); track column) {\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <th\n [attr.data-sortable-key]=\"column.sortKey\"\n class=\"relative cursor-pointer border-b border-gray-200 px-4 py-3 text-caption font-semibold text-gray-700 uppercase tracking-wider\"\n [ngClass]=\"getThTrClass(column)\">\n {{ column.title }}\n </th>\n }\n }\n\n @if (enableColumnsConfig()) {\n <th\n class=\"sticky right-0 bg-white flex justify-center cursor-pointer items-center border-b border-gray-200 px-1.5 py-3\">\n <div\n #columnsConfigTriggerElement\n (click)=\"onColumnSettingsClicked(columnsConfigTriggerElement)\"\n class=\"flex justify-center items-center h-[28px] w-[28px] cursor-pointer rounded-full hover:bg-neutral-100 transition-all duration-500\">\n <svg class=\"h-[16px] w-[16px] text-neutral-600\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n d=\"M12 8C13.0608 8 14.0782 8.42143 14.8284 9.17157C15.5785 9.92172 16 10.9391 16 12C16 13.0609 15.5785 14.0783 14.8284 14.8284C14.0782 15.5786 13.0608 16 12 16C10.9391 16 9.92168 15.5786 9.17153 14.8284C8.42139 14.0783 7.99996 13.0609 7.99996 12C7.99996 10.9391 8.42139 9.92172 9.17153 9.17157C9.92168 8.42143 10.9391 8 12 8ZM12 10C11.4695 10 10.9608 10.2107 10.5857 10.5858C10.2107 10.9609 9.99996 11.4696 9.99996 12C9.99996 12.5304 10.2107 13.0391 10.5857 13.4142C10.9608 13.7893 11.4695 14 12 14C12.5304 14 13.0391 13.7893 13.4142 13.4142C13.7892 13.0391 14 12.5304 14 12C14 11.4696 13.7892 10.9609 13.4142 10.5858C13.0391 10.2107 12.5304 10 12 10ZM9.99996 22C9.74996 22 9.53996 21.82 9.49996 21.58L9.12996 18.93C8.49996 18.68 7.95996 18.34 7.43996 17.94L4.94996 18.95C4.72996 19.03 4.45996 18.95 4.33996 18.73L2.33996 15.27C2.20996 15.05 2.26996 14.78 2.45996 14.63L4.56996 12.97L4.49996 12L4.56996 11L2.45996 9.37C2.26996 9.22 2.20996 8.95 2.33996 8.73L4.33996 5.27C4.45996 5.05 4.72996 4.96 4.94996 5.05L7.43996 6.05C7.95996 5.66 8.49996 5.32 9.12996 5.07L9.49996 2.42C9.53996 2.18 9.74996 2 9.99996 2H14C14.25 2 14.46 2.18 14.5 2.42L14.87 5.07C15.5 5.32 16.04 5.66 16.56 6.05L19.05 5.05C19.27 4.96 19.54 5.05 19.66 5.27L21.66 8.73C21.79 8.95 21.73 9.22 21.54 9.37L19.43 11L19.5 12L19.43 13L21.54 14.63C21.73 14.78 21.79 15.05 21.66 15.27L19.66 18.73C19.54 18.95 19.27 19.04 19.05 18.95L16.56 17.95C16.04 18.34 15.5 18.68 14.87 18.93L14.5 21.58C14.46 21.82 14.25 22 14 22H9.99996ZM11.25 4L10.88 6.61C9.67996 6.86 8.61996 7.5 7.84996 8.39L5.43996 7.35L4.68996 8.65L6.79996 10.2C6.39996 11.37 6.39996 12.64 6.79996 13.8L4.67996 15.36L5.42996 16.66L7.85996 15.62C8.62996 16.5 9.67996 17.14 10.87 17.38L11.24 20H12.76L13.13 17.39C14.32 17.14 15.37 16.5 16.14 15.62L18.57 16.66L19.32 15.36L17.2 13.81C17.6 12.64 17.6 11.37 17.2 10.2L19.31 8.65L18.56 7.35L16.15 8.39C15.38 7.5 14.32 6.86 13.12 6.62L12.75 4H11.25Z\"\n fill=\"currentColor\"/>\n </svg>\n </div>\n </th>\n }\n\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state().initialLoading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-6 px-6 py-4\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state().success() && (state().response()?.data ?? []).length <= 0) {\n <tbody>\n <tr>\n <td colspan=\"1000\">\n <div class=\"flex flex-col justify-center items-center gap-8 px-6 py-8\">\n <app-no-data-table></app-no-data-table>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n @if ((state().response()?.data ?? []).length > 0) {\n <tbody class=\"\">\n @for (item of state().response()?.data ?? []; track i; let i = $index) {\n <tr (click)=\"_onRowClicked(item)\"\n [ngClass]=\"[enableClickableRows() ? 'hover:bg-neutral-50 cursor-pointer' : '']\">\n\n @if (expandableComponent()) {\n <td class=\"sticky left-0 bg-white z-50 px-1 py-2 border-b border-gray-100 w-min select-none\">\n <div\n (click)=\"onRowExpandedClicked(i)\"\n class=\"mx-auto flex items-center justify-center h-[40px] w-[40px] rounded-full bg-neutral-50 hover:bg-neutral-100 cursor-pointer transition-all duration-500\">\n <svg class=\"h-[20px] w-[20px] text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path d=\"M7.41 8.58L12 13.17L16.59 8.58L18 10L12 16L6 10L7.41 8.58Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n </td>\n }\n\n @for (column of columnDefs(); track column) {\n\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <td\n class=\"px-4 py-3 border-b border-gray-100 relative text-body2 text-gray-800\"\n [ngClass]=\"[getThTrClass(column)]\">\n\n @switch (column.type) {\n @default {\n <span class=\"text-body2 text-neutral-700\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('text') {\n <span class=\"text-body2 text-neutral-700 text-nowrap\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('date') {\n <div class=\"flex items-center gap-3\" [ngClass]=\"[getFlexJustify(column)]\">\n @if (column.dateConfig?.showIcon == undefined ? true : (column.dateConfig?.showIcon)) {\n <svg class=\"h-4 w-4 text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n 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 fill=\"currentColor\"/>\n </svg>\n }\n\n @let date = getPropertyValue(item, column);\n @if (date && date != 'null') {\n <span\n class=\"text-body2 text-nowrap\">{{ date | date:column.dateConfig?.dateFormat ?? 'MMM d, y, h:mm a' }}</span>\n }\n </div>\n }\n @case ('badge') {\n @let badgeProperty = getBadgeProperty(item, column);\n <div class=\"flex items-center\" [ngClass]=\"getFlexJustify(column)\">\n <app-status-badge [backgroundColorClass]=\"badgeProperty?.backgroundColorClass ?? null\"\n [indicatorColor]=\"badgeProperty?.indicatorColorClass ?? null\"\n [borderColorClass]=\"badgeProperty?.borderColorClass ?? null\"\n [textColorClass]=\"badgeProperty?.textColorClass ?? null\"\n [isUpperCase]=\"true\"\n [status]=\"badgeProperty?.displayText ?? 'Unknown'\">\n </app-status-badge>\n </div>\n }\n @case ('custom') {\n @if (column.component) {\n <div class=\"flex items-center\">\n <app-dynamic-renderer\n [component]=\"column.component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n }\n }\n @case ('actions') {\n\n <div class=\"flex items-center gap-3\" [ngClass]=\"getFlexJustify(column)\">\n @if (column.actionsConfig?.iconActions) {\n @for (iconAction of column.actionsConfig?.iconActions ?? []; track iconAction) {\n <div\n (click)=\"_onActionClicked(iconAction.actionKey, item, $event)\"\n class=\"flex items-center justify-center h-[36px] w-[36px] cursor-pointer rounded-full hover:bg-neutral-100\">\n <!-- <app-svg-icon class=\"text-neutral-500\"-->\n <!-- [matTooltip]=\"iconAction.label\"-->\n <!-- matTooltipClass=\"mt-2\"-->\n <!-- [src]=\"iconAction.iconPath\"-->\n <!-- [size]=\"20\"></app-svg-icon>-->\n <app-svg-icon class=\"text-neutral-500\"\n [src]=\"iconAction.iconPath\"\n [size]=\"20\"></app-svg-icon>\n </div>\n }\n }\n @if (column.actionsConfig?.threeDotMenuActions) {\n <app-context-menu-button (onActionClicked)=\"_onActionClicked($event, item, null)\"\n [actions]=\"getContextMenuActions(column.actionsConfig?.threeDotMenuActions ?? [])\"></app-context-menu-button>\n }\n\n @if (column.actionsConfig?.textMenuActions) {\n @for (textAction of column.actionsConfig?.textMenuActions ?? []; track textAction) {\n <app-text-button-small\n (click)=\"_onActionClicked(textAction.actionKey, item, $event)\">{{ textAction.label }}\n </app-text-button-small>\n }\n }\n\n @if (column.actionsConfig?.components) {\n <div class=\"flex items-center\">\n @for (component of (column.actionsConfig?.components ?? []); track $index) {\n <app-dynamic-renderer\n [component]=\"component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n }\n </div>\n }\n\n </div>\n\n }\n\n }\n\n </td>\n }\n\n }\n\n @if (enableColumnsConfig()) {\n <td\n class=\"px-1 py-3 border-b border-gray-100 w-min\">\n </td>\n }\n </tr>\n\n @if (expandableComponent()) {\n @if (i == expandedRowIndex()) {\n <tr class=\"transition-all duration-700\">\n <td colspan=\"100\">\n <div class=\"mx-4 my-4 p-4 bg-neutral-50 rounded-lg\">\n <app-dynamic-renderer\n [component]=\"expandableComponent()\"\n [rowData]=\"item\"\n (actionPerformed)=\"onCellActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n\n </td>\n </tr>\n }\n }\n\n }\n\n </tbody>\n }\n\n <tbody class=\"h-full\"></tbody>\n\n\n </table>\n </div>\n\n <app-pagination\n [pageSize]=\"pageSize()\"\n [totalItems]=\"state().response()?.totalCount ?? 0\"\n (pageChange)=\"onPageChange($event)\">\n </app-pagination>\n</div>\n\n<ng-template cdkPortal>\n <div\n class=\"flex flex-col gap-3 px-2 py-2 bg-white rounded-md max-h-[400px] border border-neutral-200 shadow-2\">\n <div class=\"flex flex-col overflow-y-scroll\">\n @for (column of columnDefs(); track column; let index = $index) {\n @if (column.type != 'actions') {\n <div class=\"grow flex items-center min-w-[200px] px-1\">\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n <app-checkbox [title]=\"column.title\" [ngModel]=\"isColumnVisible\"\n (valueChanged)=\"onColumnVisibleOrHide($event, column)\"></app-checkbox>\n </div>\n }\n }\n </div>\n\n <span (click)=\"onSelectAllColumnClicked()\" class=\"px-4 text-overline text-info-500 cursor-pointer\">Select All</span>\n </div>\n</ng-template>\n\n" }]
|
|
3308
|
+
], template: "<div class=\"flex flex-col bg-white rounded-2xl overflow-clip h-full\">\n\n @if (enableSearch() || headerComponents.length > 0) {\n <div class=\"flex px-6 py-5 border-b border-neutral-100 justify-between\">\n @if (enableSearch()) {\n <app-text-input [iconSrc]=\"'assets/icons/search.svg'\"\n placeholder=\"Search...\"\n type=\"search\"\n [fullWidth]=\"false\"\n (changeValue)=\"onSearchTextChanged($event)\">\n </app-text-input>\n }\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n }\n\n <div class=\"grow h-full w-full min-w-full bg-white overflow-x-auto\">\n <table class=\"h-min w-full\"\n [ngClass]=\"[enableHorizontallyScrollable() ? 'overflow-x-auto' : '']\"\n [appTableResizableColumns]=\"enableResizableColumns()\">\n\n <!-- Table header-->\n <thead class=\"sticky top-0 bg-white z-10\">\n <tr sortableTable (sortChange)=\"onSortChanged($event)\" class=\"text-overline text-neutral-500 text-nowrap h-min\">\n\n @if (expandableComponent()) {\n <th class=\"sticky left-0 z-50 bg-white border-b border-gray-200 px-4 py-3\"></th>\n }\n\n @for (column of columnDefs(); track column) {\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <th\n [attr.data-sortable-key]=\"column.sortKey\"\n class=\"relative cursor-pointer border-b border-gray-200 px-4 py-3 text-caption font-semibold text-gray-700 uppercase tracking-wider\"\n [ngClass]=\"getThTrClass(column)\">\n {{ column.title }}\n </th>\n }\n }\n\n @if (enableColumnsConfig()) {\n <th\n class=\"sticky right-0 bg-white flex justify-center cursor-pointer items-center border-b border-gray-200 px-1.5 py-3\">\n <div\n #columnsConfigTriggerElement\n (click)=\"onColumnSettingsClicked(columnsConfigTriggerElement)\"\n class=\"flex justify-center items-center h-[28px] w-[28px] cursor-pointer rounded-full hover:bg-neutral-100 transition-all duration-500\">\n <svg class=\"h-[16px] w-[16px] text-neutral-600\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n d=\"M12 8C13.0608 8 14.0782 8.42143 14.8284 9.17157C15.5785 9.92172 16 10.9391 16 12C16 13.0609 15.5785 14.0783 14.8284 14.8284C14.0782 15.5786 13.0608 16 12 16C10.9391 16 9.92168 15.5786 9.17153 14.8284C8.42139 14.0783 7.99996 13.0609 7.99996 12C7.99996 10.9391 8.42139 9.92172 9.17153 9.17157C9.92168 8.42143 10.9391 8 12 8ZM12 10C11.4695 10 10.9608 10.2107 10.5857 10.5858C10.2107 10.9609 9.99996 11.4696 9.99996 12C9.99996 12.5304 10.2107 13.0391 10.5857 13.4142C10.9608 13.7893 11.4695 14 12 14C12.5304 14 13.0391 13.7893 13.4142 13.4142C13.7892 13.0391 14 12.5304 14 12C14 11.4696 13.7892 10.9609 13.4142 10.5858C13.0391 10.2107 12.5304 10 12 10ZM9.99996 22C9.74996 22 9.53996 21.82 9.49996 21.58L9.12996 18.93C8.49996 18.68 7.95996 18.34 7.43996 17.94L4.94996 18.95C4.72996 19.03 4.45996 18.95 4.33996 18.73L2.33996 15.27C2.20996 15.05 2.26996 14.78 2.45996 14.63L4.56996 12.97L4.49996 12L4.56996 11L2.45996 9.37C2.26996 9.22 2.20996 8.95 2.33996 8.73L4.33996 5.27C4.45996 5.05 4.72996 4.96 4.94996 5.05L7.43996 6.05C7.95996 5.66 8.49996 5.32 9.12996 5.07L9.49996 2.42C9.53996 2.18 9.74996 2 9.99996 2H14C14.25 2 14.46 2.18 14.5 2.42L14.87 5.07C15.5 5.32 16.04 5.66 16.56 6.05L19.05 5.05C19.27 4.96 19.54 5.05 19.66 5.27L21.66 8.73C21.79 8.95 21.73 9.22 21.54 9.37L19.43 11L19.5 12L19.43 13L21.54 14.63C21.73 14.78 21.79 15.05 21.66 15.27L19.66 18.73C19.54 18.95 19.27 19.04 19.05 18.95L16.56 17.95C16.04 18.34 15.5 18.68 14.87 18.93L14.5 21.58C14.46 21.82 14.25 22 14 22H9.99996ZM11.25 4L10.88 6.61C9.67996 6.86 8.61996 7.5 7.84996 8.39L5.43996 7.35L4.68996 8.65L6.79996 10.2C6.39996 11.37 6.39996 12.64 6.79996 13.8L4.67996 15.36L5.42996 16.66L7.85996 15.62C8.62996 16.5 9.67996 17.14 10.87 17.38L11.24 20H12.76L13.13 17.39C14.32 17.14 15.37 16.5 16.14 15.62L18.57 16.66L19.32 15.36L17.2 13.81C17.6 12.64 17.6 11.37 17.2 10.2L19.31 8.65L18.56 7.35L16.15 8.39C15.38 7.5 14.32 6.86 13.12 6.62L12.75 4H11.25Z\"\n fill=\"currentColor\"/>\n </svg>\n </div>\n </th>\n }\n\n </tr>\n </thead>\n\n <!-- List Items-->\n <tbody class=\"h-min\">\n <ng-content select=\"[body]\"></ng-content>\n </tbody>\n\n <!-- Shimmer-->\n @if (state().initialLoading()) {\n <tbody class=\"bg-white text-center py-14\">\n <tr>\n <td colspan=\"100\" class=\"h-min\">\n <div class=\"flex flex-col gap-6 px-6 py-4\">\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n <app-shimmer type=\"multiline\"></app-shimmer>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n <!-- No Table Indicator-->\n @if (state().success() && getRows().length <= 0) {\n <tbody>\n <tr>\n <td colspan=\"1000\">\n <div class=\"flex flex-col justify-center items-center gap-8 px-6 py-8\">\n <app-no-data-table></app-no-data-table>\n </div>\n </td>\n </tr>\n </tbody>\n }\n\n @if (getRows().length > 0) {\n <tbody class=\"\">\n @for (item of getRows(); track i; let i = $index) {\n <tr (click)=\"_onRowClicked(item)\"\n [ngClass]=\"[enableClickableRows() ? 'hover:bg-neutral-50 cursor-pointer' : '']\">\n\n @if (expandableComponent()) {\n <td class=\"sticky left-0 bg-white z-50 px-1 py-2 border-b border-gray-100 w-min select-none\">\n <div\n (click)=\"onRowExpandedClicked(i)\"\n class=\"mx-auto flex items-center justify-center h-[40px] w-[40px] rounded-full bg-neutral-50 hover:bg-neutral-100 cursor-pointer transition-all duration-500\">\n <svg class=\"h-[20px] w-[20px] text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path d=\"M7.41 8.58L12 13.17L16.59 8.58L18 10L12 16L6 10L7.41 8.58Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n </td>\n }\n\n @for (column of columnDefs(); track column) {\n\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n @if (isColumnVisible) {\n <td\n class=\"px-4 py-3 border-b border-gray-100 relative text-body2 text-gray-800\"\n [ngClass]=\"[getThTrClass(column)]\">\n\n @switch (column.type) {\n @default {\n <span class=\"text-body2 text-neutral-700\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('text') {\n <span class=\"text-body2 text-neutral-700 text-nowrap\"\n [ngClass]=\"column.textConfig?.textColorClass\">{{ getPropertyValue(item, column) }}</span>\n }\n @case ('date') {\n <div class=\"flex items-center gap-3\" [ngClass]=\"[getFlexJustify(column)]\">\n @if (column.dateConfig?.showIcon == undefined ? true : (column.dateConfig?.showIcon)) {\n <svg class=\"h-4 w-4 text-neutral-500\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\n fill=\"none\">\n <path\n 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 fill=\"currentColor\"/>\n </svg>\n }\n\n @let date = getPropertyValue(item, column);\n @if (date && date != 'null') {\n <span\n class=\"text-body2 text-nowrap\">{{ date | date:column.dateConfig?.dateFormat ?? 'MMM d, y, h:mm a' }}</span>\n }\n </div>\n }\n @case ('badge') {\n @let badgeProperty = getBadgeProperty(item, column);\n <div class=\"flex items-center\" [ngClass]=\"getFlexJustify(column)\">\n <app-status-badge [backgroundColorClass]=\"badgeProperty?.backgroundColorClass ?? null\"\n [indicatorColor]=\"badgeProperty?.indicatorColorClass ?? null\"\n [borderColorClass]=\"badgeProperty?.borderColorClass ?? null\"\n [textColorClass]=\"badgeProperty?.textColorClass ?? null\"\n [isUpperCase]=\"true\"\n [status]=\"badgeProperty?.displayText ?? 'Unknown'\">\n </app-status-badge>\n </div>\n }\n @case ('custom') {\n @if (column.component) {\n <div class=\"flex items-center\">\n <app-dynamic-renderer\n [component]=\"column.component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n }\n }\n @case ('actions') {\n\n <div class=\"flex items-center gap-3\" [ngClass]=\"getFlexJustify(column)\">\n @if (column.actionsConfig?.iconActions) {\n @for (iconAction of column.actionsConfig?.iconActions ?? []; track iconAction) {\n <div\n (click)=\"_onActionClicked(iconAction.actionKey, item, $event)\"\n class=\"flex items-center justify-center h-[36px] w-[36px] cursor-pointer rounded-full hover:bg-neutral-100\">\n <!-- <app-svg-icon class=\"text-neutral-500\"-->\n <!-- [matTooltip]=\"iconAction.label\"-->\n <!-- matTooltipClass=\"mt-2\"-->\n <!-- [src]=\"iconAction.iconPath\"-->\n <!-- [size]=\"20\"></app-svg-icon>-->\n <app-svg-icon class=\"text-neutral-500\"\n [src]=\"iconAction.iconPath\"\n [size]=\"20\"></app-svg-icon>\n </div>\n }\n }\n @if (column.actionsConfig?.threeDotMenuActions) {\n <app-context-menu-button (onActionClicked)=\"_onActionClicked($event, item, null)\"\n [actions]=\"getContextMenuActions(column.actionsConfig?.threeDotMenuActions ?? [])\"></app-context-menu-button>\n }\n\n @if (column.actionsConfig?.textMenuActions) {\n @for (textAction of column.actionsConfig?.textMenuActions ?? []; track textAction) {\n <app-text-button-small\n (click)=\"_onActionClicked(textAction.actionKey, item, $event)\">{{ textAction.label }}\n </app-text-button-small>\n }\n }\n\n @if (column.actionsConfig?.components) {\n <div class=\"flex items-center\">\n @for (component of (column.actionsConfig?.components ?? []); track $index) {\n <app-dynamic-renderer\n [component]=\"component\"\n [rowData]=\"item\"\n [data]=\"column.customConfig?.data\"\n [rowPosition]=\"$index + 1\"\n [isLastRow]=\"$last\"\n (actionPerformed)=\"onRowActionPerformed($event)\">\n </app-dynamic-renderer>\n }\n </div>\n }\n\n </div>\n\n }\n\n }\n\n </td>\n }\n\n }\n\n @if (enableColumnsConfig()) {\n <td\n class=\"px-1 py-3 border-b border-gray-100 w-min\">\n </td>\n }\n </tr>\n\n @if (expandableComponent()) {\n @if (i == expandedRowIndex()) {\n <tr class=\"transition-all duration-700\">\n <td colspan=\"100\">\n <div class=\"mx-4 my-4 p-4 bg-neutral-50 rounded-lg\">\n <app-dynamic-renderer\n [component]=\"expandableComponent()\"\n [rowData]=\"item\"\n (actionPerformed)=\"onCellActionPerformed($event)\">\n </app-dynamic-renderer>\n </div>\n\n </td>\n </tr>\n }\n }\n\n }\n\n </tbody>\n }\n\n <tbody class=\"h-full\"></tbody>\n\n\n </table>\n </div>\n\n <app-pagination\n [pageSize]=\"pageSize()\"\n [totalItems]=\"getTotalCount()\"\n (pageChange)=\"onPageChange($event)\">\n </app-pagination>\n</div>\n\n<ng-template cdkPortal>\n <div\n class=\"flex flex-col gap-3 px-2 py-2 bg-white rounded-md max-h-[400px] border border-neutral-200 shadow-2\">\n <div class=\"flex flex-col overflow-y-scroll\">\n @for (column of columnDefs(); track column; let index = $index) {\n @if (column.type != 'actions') {\n <div class=\"grow flex items-center min-w-[200px] px-1\">\n @let isColumnVisible = column.visible || column.visible == undefined || false;\n <app-checkbox [title]=\"column.title\" [ngModel]=\"isColumnVisible\"\n (valueChanged)=\"onColumnVisibleOrHide($event, column)\"></app-checkbox>\n </div>\n }\n }\n </div>\n\n <span (click)=\"onSelectAllColumnClicked()\" class=\"px-4 text-overline text-info-500 cursor-pointer\">Select All</span>\n </div>\n</ng-template>\n\n" }]
|
|
3238
3309
|
}], propDecorators: { headerComponents: [{
|
|
3239
3310
|
type: ContentChildren,
|
|
3240
3311
|
args: ['filter']
|
|
@@ -7469,6 +7540,22 @@ function getFloatingOutlineLabelClasses(size, hasAbsolutePrefixIcon) {
|
|
|
7469
7540
|
peer-[:not(:placeholder-shown)]:scale-90 peer-[:not(:placeholder-shown)]:text-caption
|
|
7470
7541
|
peer-[:not(:placeholder-shown)]:px-1 peer-[:not(:placeholder-shown)]:bg-page`;
|
|
7471
7542
|
}
|
|
7543
|
+
function getPrefixTextAdornmentClasses(enableBackground, appearance) {
|
|
7544
|
+
const base = 'flex shrink-0 items-center self-stretch whitespace-nowrap px-3 text-role-caption';
|
|
7545
|
+
const backgroundClasses = enableBackground
|
|
7546
|
+
? 'border-r border-default bg-page-secondary'
|
|
7547
|
+
: '';
|
|
7548
|
+
const roundedClasses = enableBackground && appearance === 'floatingOutline' ? 'rounded-l-xl' : '';
|
|
7549
|
+
return [base, backgroundClasses, roundedClasses].filter(Boolean).join(' ');
|
|
7550
|
+
}
|
|
7551
|
+
function getPostfixTextAdornmentClasses(enableBackground, appearance) {
|
|
7552
|
+
const base = 'flex shrink-0 items-center self-stretch whitespace-nowrap px-3 text-role-caption';
|
|
7553
|
+
const backgroundClasses = enableBackground
|
|
7554
|
+
? 'border-l border-default bg-page-secondary'
|
|
7555
|
+
: '';
|
|
7556
|
+
const roundedClasses = enableBackground && appearance === 'floatingOutline' ? 'rounded-r-xl' : '';
|
|
7557
|
+
return [base, backgroundClasses, roundedClasses].filter(Boolean).join(' ');
|
|
7558
|
+
}
|
|
7472
7559
|
|
|
7473
7560
|
const defaultSignalFormErrors = {
|
|
7474
7561
|
required: () => 'Required',
|
|
@@ -7585,6 +7672,8 @@ class BaseFormControl {
|
|
|
7585
7672
|
...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
7586
7673
|
disabled = input(false, /* @ts-ignore */
|
|
7587
7674
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
7675
|
+
readonly = input(false, /* @ts-ignore */
|
|
7676
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
7588
7677
|
invalid = input(false, /* @ts-ignore */
|
|
7589
7678
|
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
7590
7679
|
required = input(false, /* @ts-ignore */
|
|
@@ -7600,7 +7689,7 @@ class BaseFormControl {
|
|
|
7600
7689
|
errorMessage = computed(() => getSignalValidationErrorMessage(this.errors(), this.signalFormErrors), /* @ts-ignore */
|
|
7601
7690
|
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
7602
7691
|
setValue(value) {
|
|
7603
|
-
if (this.disabled()) {
|
|
7692
|
+
if (this.disabled() || this.readonly()) {
|
|
7604
7693
|
return;
|
|
7605
7694
|
}
|
|
7606
7695
|
this.value.set(value);
|
|
@@ -7615,11 +7704,11 @@ class BaseFormControl {
|
|
|
7615
7704
|
}
|
|
7616
7705
|
}
|
|
7617
7706
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseFormControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
7618
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: BaseFormControl, isStandalone: true, inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, isFocused: { classPropertyName: "isFocused", publicName: "isFocused", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", isFocused: "isFocusedChange" }, ngImport: i0 });
|
|
7707
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: BaseFormControl, isStandalone: true, inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, isFocused: { classPropertyName: "isFocused", publicName: "isFocused", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", isFocused: "isFocusedChange" }, ngImport: i0 });
|
|
7619
7708
|
}
|
|
7620
7709
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseFormControl, decorators: [{
|
|
7621
7710
|
type: Directive
|
|
7622
|
-
}], 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"] }] } });
|
|
7711
|
+
}], 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 }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", 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"] }] } });
|
|
7623
7712
|
|
|
7624
7713
|
class BaseSignalTextInputControl extends BaseFormControl {
|
|
7625
7714
|
nglConfig = inject(NGL_CONFIG, { optional: true });
|
|
@@ -7646,8 +7735,6 @@ class SignalTextField extends BaseSignalTextInputControl {
|
|
|
7646
7735
|
// Input configuration
|
|
7647
7736
|
inputType = input('text', /* @ts-ignore */
|
|
7648
7737
|
...(ngDevMode ? [{ debugName: "inputType" }] : /* istanbul ignore next */ []));
|
|
7649
|
-
readonly = input(false, /* @ts-ignore */
|
|
7650
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
7651
7738
|
maskPattern = input(null, { ...(ngDevMode ? { debugName: "maskPattern" } : /* istanbul ignore next */ {}), alias: 'mask' });
|
|
7652
7739
|
// Adornments
|
|
7653
7740
|
prefixText = input('', /* @ts-ignore */
|
|
@@ -7658,6 +7745,10 @@ class SignalTextField extends BaseSignalTextInputControl {
|
|
|
7658
7745
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
7659
7746
|
postfixIcon = input(/* @ts-ignore */
|
|
7660
7747
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
7748
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
7749
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
7750
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
7751
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
7661
7752
|
// Native HTML attributes
|
|
7662
7753
|
id = input(/* @ts-ignore */
|
|
7663
7754
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -7701,6 +7792,10 @@ class SignalTextField extends BaseSignalTextInputControl {
|
|
|
7701
7792
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
7702
7793
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
7703
7794
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
7795
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
7796
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
7797
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
7798
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
7704
7799
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
7705
7800
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
7706
7801
|
hasValue = computed(() => {
|
|
@@ -7775,12 +7870,12 @@ class SignalTextField extends BaseSignalTextInputControl {
|
|
|
7775
7870
|
}
|
|
7776
7871
|
}
|
|
7777
7872
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7778
|
-
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"] }] });
|
|
7873
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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]=\"postfixTextAdornmentClasses()\"\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"] }] });
|
|
7779
7874
|
}
|
|
7780
7875
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextField, decorators: [{
|
|
7781
7876
|
type: Component,
|
|
7782
|
-
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
|
|
7783
|
-
}], 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 }] }],
|
|
7877
|
+
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]=\"prefixTextAdornmentClasses()\"\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]=\"postfixTextAdornmentClasses()\"\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" }]
|
|
7878
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
7784
7879
|
type: ViewChild,
|
|
7785
7880
|
args: ['inputRef']
|
|
7786
7881
|
}] } });
|
|
@@ -7935,8 +8030,6 @@ class SignalNumberField extends BaseSignalTextInputControl {
|
|
|
7935
8030
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
7936
8031
|
hint = input('', /* @ts-ignore */
|
|
7937
8032
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
7938
|
-
readonly = input(false, /* @ts-ignore */
|
|
7939
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
7940
8033
|
prefixText = input('', /* @ts-ignore */
|
|
7941
8034
|
...(ngDevMode ? [{ debugName: "prefixText" }] : /* istanbul ignore next */ []));
|
|
7942
8035
|
prefixIcon = input(/* @ts-ignore */
|
|
@@ -7945,6 +8038,10 @@ class SignalNumberField extends BaseSignalTextInputControl {
|
|
|
7945
8038
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
7946
8039
|
postfixIcon = input(/* @ts-ignore */
|
|
7947
8040
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
8041
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
8042
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
8043
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
8044
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
7948
8045
|
id = input(/* @ts-ignore */
|
|
7949
8046
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
7950
8047
|
fieldName = input(/* @ts-ignore */
|
|
@@ -7989,6 +8086,10 @@ class SignalNumberField extends BaseSignalTextInputControl {
|
|
|
7989
8086
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
7990
8087
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
7991
8088
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
8089
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
8090
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
8091
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
8092
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
7992
8093
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
7993
8094
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
7994
8095
|
hasValue = computed(() => this.value() != null, /* @ts-ignore */
|
|
@@ -8096,14 +8197,14 @@ class SignalNumberField extends BaseSignalTextInputControl {
|
|
|
8096
8197
|
}
|
|
8097
8198
|
}
|
|
8098
8199
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalNumberField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8099
|
-
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"] }] });
|
|
8200
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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]=\"postfixTextAdornmentClasses()\"\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"] }] });
|
|
8100
8201
|
}
|
|
8101
8202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalNumberField, decorators: [{
|
|
8102
8203
|
type: Component,
|
|
8103
8204
|
args: [{ selector: 'lib-signal-number-field', imports: [AppSvgIconComponent, BaseSignalInput, HintIcon], host: {
|
|
8104
8205
|
'[class.hide-number-spin]': 'hideSpinButtons()',
|
|
8105
|
-
}, 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
|
|
8106
|
-
}], 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 }] }],
|
|
8206
|
+
}, 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]=\"prefixTextAdornmentClasses()\"\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]=\"postfixTextAdornmentClasses()\"\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"] }]
|
|
8207
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
8107
8208
|
type: ViewChild,
|
|
8108
8209
|
args: ['inputRef']
|
|
8109
8210
|
}] } });
|
|
@@ -8629,8 +8730,6 @@ class SignalPhoneNumberField extends BaseSignalTextInputControl {
|
|
|
8629
8730
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
8630
8731
|
hint = input('', /* @ts-ignore */
|
|
8631
8732
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
8632
|
-
readonly = input(false, /* @ts-ignore */
|
|
8633
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
8634
8733
|
phoneNumbers = input(phoneNumbersAll, /* @ts-ignore */
|
|
8635
8734
|
...(ngDevMode ? [{ debugName: "phoneNumbers" }] : /* istanbul ignore next */ []));
|
|
8636
8735
|
defaultCountryId = input('IN', /* @ts-ignore */
|
|
@@ -8874,7 +8973,7 @@ class SignalPhoneNumberField extends BaseSignalTextInputControl {
|
|
|
8874
8973
|
}
|
|
8875
8974
|
}
|
|
8876
8975
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalPhoneNumberField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8877
|
-
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"] }] });
|
|
8976
|
+
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 }, 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()\"\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"] }] });
|
|
8878
8977
|
}
|
|
8879
8978
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalPhoneNumberField, decorators: [{
|
|
8880
8979
|
type: Component,
|
|
@@ -8884,8 +8983,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
8884
8983
|
HintIcon,
|
|
8885
8984
|
NgxMaskDirective,
|
|
8886
8985
|
SignalPhoneCountryPanelComponent,
|
|
8887
|
-
], 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()
|
|
8888
|
-
}], 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 }] }],
|
|
8986
|
+
], 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()\"\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" }]
|
|
8987
|
+
}], 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 }] }], 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: [{
|
|
8889
8988
|
type: ViewChild,
|
|
8890
8989
|
args: ['inputRef']
|
|
8891
8990
|
}], countryButton: [{
|
|
@@ -8931,8 +9030,6 @@ class SignalTextarea extends BaseSignalTextInputControl {
|
|
|
8931
9030
|
hint = input('', /* @ts-ignore */
|
|
8932
9031
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
8933
9032
|
// Textarea configuration
|
|
8934
|
-
readonly = input(false, /* @ts-ignore */
|
|
8935
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
8936
9033
|
rows = input(3, /* @ts-ignore */
|
|
8937
9034
|
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
8938
9035
|
resize = input('vertical', /* @ts-ignore */
|
|
@@ -9029,12 +9126,12 @@ class SignalTextarea extends BaseSignalTextInputControl {
|
|
|
9029
9126
|
}
|
|
9030
9127
|
}
|
|
9031
9128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9032
|
-
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 },
|
|
9129
|
+
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 }, 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"] }] });
|
|
9033
9130
|
}
|
|
9034
9131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTextarea, decorators: [{
|
|
9035
9132
|
type: Component,
|
|
9036
9133
|
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" }]
|
|
9037
|
-
}], 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 }] }],
|
|
9134
|
+
}], 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 }] }], 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: [{
|
|
9038
9135
|
type: ViewChild,
|
|
9039
9136
|
args: ['textareaRef']
|
|
9040
9137
|
}] } });
|
|
@@ -9063,6 +9160,8 @@ class SignalCheckbox extends BaseFormControl {
|
|
|
9063
9160
|
...(ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []));
|
|
9064
9161
|
isActive = computed(() => !!this.isChecked() || this.isIndeterminate(), /* @ts-ignore */
|
|
9065
9162
|
...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
9163
|
+
isInteractive = computed(() => !this.disabled() && !this.readonly(), /* @ts-ignore */
|
|
9164
|
+
...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
|
|
9066
9165
|
boxAppearanceClasses = computed(() => {
|
|
9067
9166
|
const size = this.size() === 'sm' ? 'w-4 h-4' : this.size() === 'lg' ? 'w-6 h-6' : 'w-5 h-5';
|
|
9068
9167
|
return `relative shrink-0 inline-flex items-center justify-center rounded-sm border-2 transition-all duration-200 bg-surface ${size}`;
|
|
@@ -9082,8 +9181,12 @@ class SignalCheckbox extends BaseFormControl {
|
|
|
9082
9181
|
labelTextClasses = computed(() => {
|
|
9083
9182
|
const typography = this.size() === 'sm' ? 'text-caption' : this.size() === 'lg' ? 'text-body1' : 'text-body2';
|
|
9084
9183
|
const color = this.disabled() ? 'text-role-disabled' : 'text-role-body';
|
|
9085
|
-
const hover = this.
|
|
9086
|
-
const cursor = this.disabled()
|
|
9184
|
+
const hover = this.isInteractive() ? ' group-hover:text-primary-hover' : '';
|
|
9185
|
+
const cursor = this.disabled()
|
|
9186
|
+
? 'cursor-not-allowed'
|
|
9187
|
+
: this.readonly()
|
|
9188
|
+
? 'cursor-default'
|
|
9189
|
+
: 'cursor-pointer';
|
|
9087
9190
|
return `${typography} ${color} ${cursor} inline-flex items-center leading-none select-none transition-colors duration-200${hover}`;
|
|
9088
9191
|
}, /* @ts-ignore */
|
|
9089
9192
|
...(ngDevMode ? [{ debugName: "labelTextClasses" }] : /* istanbul ignore next */ []));
|
|
@@ -9115,7 +9218,7 @@ class SignalCheckbox extends BaseFormControl {
|
|
|
9115
9218
|
}
|
|
9116
9219
|
}
|
|
9117
9220
|
onChange(event) {
|
|
9118
|
-
if (this.
|
|
9221
|
+
if (!this.isInteractive()) {
|
|
9119
9222
|
return;
|
|
9120
9223
|
}
|
|
9121
9224
|
const checked = event.target.checked;
|
|
@@ -9124,7 +9227,7 @@ class SignalCheckbox extends BaseFormControl {
|
|
|
9124
9227
|
this.valueChange.emit(checked);
|
|
9125
9228
|
}
|
|
9126
9229
|
onKeyDown(event) {
|
|
9127
|
-
if (event.key !== 'Enter' || this.
|
|
9230
|
+
if (event.key !== 'Enter' || !this.isInteractive()) {
|
|
9128
9231
|
return;
|
|
9129
9232
|
}
|
|
9130
9233
|
event.preventDefault();
|
|
@@ -9136,11 +9239,11 @@ class SignalCheckbox extends BaseFormControl {
|
|
|
9136
9239
|
this.valueChange.emit(nextValue);
|
|
9137
9240
|
}
|
|
9138
9241
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9139
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalCheckbox, isStandalone: true, selector: "lib-signal-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indeterminate: "indeterminateChange", valueChange: "valueChange" }, viewQueries: [{ propertyName: "checkboxRef", first: true, predicate: ["checkboxRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"checkboxId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"!disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"checkboxId()\">\n <input\n #checkboxRef\n type=\"checkbox\"\n class=\"sr-only\"\n [id]=\"checkboxId()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabled()\"\n [attr.aria-checked]=\"isIndeterminate() ? 'mixed' : isChecked()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isActive() && !showError()\"\n [class.bg-surface-primary]=\"isActive() && !showError()\"\n [class.border-default]=\"!isActive() && !showError()\"\n [class.border-error]=\"showError()\"\n [class.group-hover:border-primary-hover]=\"
|
|
9242
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalCheckbox, isStandalone: true, selector: "lib-signal-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indeterminate: "indeterminateChange", valueChange: "valueChange" }, viewQueries: [{ propertyName: "checkboxRef", first: true, predicate: ["checkboxRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"checkboxId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-default]=\"readonly() && !disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"checkboxId()\">\n <input\n #checkboxRef\n type=\"checkbox\"\n class=\"sr-only\"\n [id]=\"checkboxId()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-checked]=\"isIndeterminate() ? 'mixed' : isChecked()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isActive() && !showError()\"\n [class.bg-surface-primary]=\"isActive() && !showError()\"\n [class.border-default]=\"!isActive() && !showError()\"\n [class.border-error]=\"showError()\"\n [class.group-hover:border-primary-hover]=\"isInteractive() && !showError()\"\n [class.group-hover:shadow-sm]=\"isInteractive()\"\n [class.group-hover:scale-105]=\"isInteractive()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute text-white transition-opacity duration-200\"\n [class]=\"checkmarkSizeClasses()\"\n [class.opacity-0]=\"!isChecked() || isIndeterminate()\"\n [class.opacity-100]=\"isChecked() && !isIndeterminate()\">\n <path\n fill-rule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\" />\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute text-white transition-opacity duration-200\"\n [class]=\"checkmarkSizeClasses()\"\n [class.opacity-0]=\"!isIndeterminate()\"\n [class.opacity-100]=\"isIndeterminate()\">\n <path\n d=\"M4 10h12\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\" />\n </svg>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"checkboxId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\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"] }] });
|
|
9140
9243
|
}
|
|
9141
9244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalCheckbox, decorators: [{
|
|
9142
9245
|
type: Component,
|
|
9143
|
-
args: [{ selector: 'lib-signal-checkbox', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"checkboxId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"!disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"checkboxId()\">\n <input\n #checkboxRef\n type=\"checkbox\"\n class=\"sr-only\"\n [id]=\"checkboxId()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabled()\"\n [attr.aria-checked]=\"isIndeterminate() ? 'mixed' : isChecked()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isActive() && !showError()\"\n [class.bg-surface-primary]=\"isActive() && !showError()\"\n [class.border-default]=\"!isActive() && !showError()\"\n [class.border-error]=\"showError()\"\n [class.group-hover:border-primary-hover]=\"
|
|
9246
|
+
args: [{ selector: 'lib-signal-checkbox', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"checkboxId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-default]=\"readonly() && !disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"checkboxId()\">\n <input\n #checkboxRef\n type=\"checkbox\"\n class=\"sr-only\"\n [id]=\"checkboxId()\"\n [checked]=\"isChecked()\"\n [disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-checked]=\"isIndeterminate() ? 'mixed' : isChecked()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isActive() && !showError()\"\n [class.bg-surface-primary]=\"isActive() && !showError()\"\n [class.border-default]=\"!isActive() && !showError()\"\n [class.border-error]=\"showError()\"\n [class.group-hover:border-primary-hover]=\"isInteractive() && !showError()\"\n [class.group-hover:shadow-sm]=\"isInteractive()\"\n [class.group-hover:scale-105]=\"isInteractive()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute text-white transition-opacity duration-200\"\n [class]=\"checkmarkSizeClasses()\"\n [class.opacity-0]=\"!isChecked() || isIndeterminate()\"\n [class.opacity-100]=\"isChecked() && !isIndeterminate()\">\n <path\n fill-rule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\" />\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute text-white transition-opacity duration-200\"\n [class]=\"checkmarkSizeClasses()\"\n [class.opacity-0]=\"!isIndeterminate()\"\n [class.opacity-100]=\"isIndeterminate()\">\n <path\n d=\"M4 10h12\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\" />\n </svg>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"checkboxId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
9144
9247
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], checkboxRef: [{
|
|
9145
9248
|
type: ViewChild,
|
|
9146
9249
|
args: ['checkboxRef']
|
|
@@ -9173,6 +9276,10 @@ class SignalRadio extends BaseFormControl {
|
|
|
9173
9276
|
...(ngDevMode ? [{ debugName: "effectiveValue" }] : /* istanbul ignore next */ []));
|
|
9174
9277
|
effectiveDisabled = computed(() => this.inGroup() ? this.group.disabled() || this.disabled() : this.disabled(), /* @ts-ignore */
|
|
9175
9278
|
...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
9279
|
+
effectiveReadonly = computed(() => this.inGroup() ? this.group.readonly() : this.readonly(), /* @ts-ignore */
|
|
9280
|
+
...(ngDevMode ? [{ debugName: "effectiveReadonly" }] : /* istanbul ignore next */ []));
|
|
9281
|
+
isInteractive = computed(() => !this.effectiveDisabled() && !this.effectiveReadonly(), /* @ts-ignore */
|
|
9282
|
+
...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
|
|
9176
9283
|
effectiveGroupName = computed(() => {
|
|
9177
9284
|
if (this.inGroup()) {
|
|
9178
9285
|
return this.group.effectiveGroupName();
|
|
@@ -9218,8 +9325,12 @@ class SignalRadio extends BaseFormControl {
|
|
|
9218
9325
|
? 'text-body1'
|
|
9219
9326
|
: 'text-body2';
|
|
9220
9327
|
const color = this.effectiveDisabled() ? 'text-role-disabled' : 'text-role-body';
|
|
9221
|
-
const hover = this.
|
|
9222
|
-
const cursor = this.effectiveDisabled()
|
|
9328
|
+
const hover = this.isInteractive() ? ' group-hover:text-primary-hover' : '';
|
|
9329
|
+
const cursor = this.effectiveDisabled()
|
|
9330
|
+
? 'cursor-not-allowed'
|
|
9331
|
+
: this.effectiveReadonly()
|
|
9332
|
+
? 'cursor-default'
|
|
9333
|
+
: 'cursor-pointer';
|
|
9223
9334
|
return `${typography} ${color} ${cursor} inline-flex items-center leading-none select-none transition-colors duration-200${hover}`;
|
|
9224
9335
|
}, /* @ts-ignore */
|
|
9225
9336
|
...(ngDevMode ? [{ debugName: "labelTextClasses" }] : /* istanbul ignore next */ []));
|
|
@@ -9235,7 +9346,7 @@ class SignalRadio extends BaseFormControl {
|
|
|
9235
9346
|
}, /* @ts-ignore */
|
|
9236
9347
|
...(ngDevMode ? [{ debugName: "dotSizeClasses" }] : /* istanbul ignore next */ []));
|
|
9237
9348
|
onChange(event) {
|
|
9238
|
-
if (this.
|
|
9349
|
+
if (!this.isInteractive()) {
|
|
9239
9350
|
return;
|
|
9240
9351
|
}
|
|
9241
9352
|
const inputEl = event.target;
|
|
@@ -9245,7 +9356,7 @@ class SignalRadio extends BaseFormControl {
|
|
|
9245
9356
|
this.selectOption();
|
|
9246
9357
|
}
|
|
9247
9358
|
onKeyDown(event) {
|
|
9248
|
-
if ((event.key !== 'Enter' && event.key !== ' ') || this.
|
|
9359
|
+
if ((event.key !== 'Enter' && event.key !== ' ') || !this.isInteractive()) {
|
|
9249
9360
|
return;
|
|
9250
9361
|
}
|
|
9251
9362
|
event.preventDefault();
|
|
@@ -9280,11 +9391,11 @@ class SignalRadio extends BaseFormControl {
|
|
|
9280
9391
|
this.valueChange.emit(selected);
|
|
9281
9392
|
}
|
|
9282
9393
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalRadio, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9283
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalRadio, isStandalone: true, selector: "lib-signal-radio", inputs: { groupName: { classPropertyName: "groupName", publicName: "groupName", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"!inGroup() && showRequiredIndicator()\"\n [showError]=\"!inGroup() && showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"radioId()\">\n\n <div\n input\n class=\"group flex items-center gap-3\"\n [class.w-full]=\"!inGroup()\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"!effectiveDisabled()\"\n [class.cursor-not-allowed]=\"effectiveDisabled()\"\n [class.opacity-70]=\"effectiveDisabled()\"\n [for]=\"radioId()\">\n <input\n type=\"radio\"\n class=\"sr-only\"\n [id]=\"radioId()\"\n [name]=\"effectiveGroupName()\"\n [checked]=\"isSelected()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.aria-checked]=\"isSelected()\"\n [attr.aria-required]=\"!inGroup() && showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"effectiveShowError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isSelected() && !effectiveShowError()\"\n [class.border-default]=\"!isSelected() && !effectiveShowError()\"\n [class.border-error]=\"effectiveShowError()\"\n [class.group-hover:border-primary-hover]=\"
|
|
9394
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalRadio, isStandalone: true, selector: "lib-signal-radio", inputs: { groupName: { classPropertyName: "groupName", publicName: "groupName", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"!inGroup() && showRequiredIndicator()\"\n [showError]=\"!inGroup() && showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"radioId()\">\n\n <div\n input\n class=\"group flex items-center gap-3\"\n [class.w-full]=\"!inGroup()\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-default]=\"effectiveReadonly() && !effectiveDisabled()\"\n [class.cursor-not-allowed]=\"effectiveDisabled()\"\n [class.opacity-70]=\"effectiveDisabled()\"\n [for]=\"radioId()\">\n <input\n type=\"radio\"\n class=\"sr-only\"\n [id]=\"radioId()\"\n [name]=\"effectiveGroupName()\"\n [checked]=\"isSelected()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"effectiveReadonly() || null\"\n [attr.aria-checked]=\"isSelected()\"\n [attr.aria-required]=\"!inGroup() && showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"effectiveShowError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isSelected() && !effectiveShowError()\"\n [class.border-default]=\"!isSelected() && !effectiveShowError()\"\n [class.border-error]=\"effectiveShowError()\"\n [class.group-hover:border-primary-hover]=\"isInteractive() && !effectiveShowError()\"\n [class.group-hover:shadow-sm]=\"isInteractive()\"\n [class.group-hover:scale-105]=\"isInteractive()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !effectiveShowError()\"\n [class.ring-error-subtle]=\"isFocused() && effectiveShowError()\">\n <div\n class=\"rounded-full bg-surface-primary transition-opacity duration-200\"\n [class]=\"dotSizeClasses()\"\n [class.opacity-0]=\"!isSelected()\"\n [class.opacity-100]=\"isSelected()\"></div>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"radioId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (!inGroup() && showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\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"] }] });
|
|
9284
9395
|
}
|
|
9285
9396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalRadio, decorators: [{
|
|
9286
9397
|
type: Component,
|
|
9287
|
-
args: [{ selector: 'lib-signal-radio', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"!inGroup() && showRequiredIndicator()\"\n [showError]=\"!inGroup() && showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"radioId()\">\n\n <div\n input\n class=\"group flex items-center gap-3\"\n [class.w-full]=\"!inGroup()\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"!effectiveDisabled()\"\n [class.cursor-not-allowed]=\"effectiveDisabled()\"\n [class.opacity-70]=\"effectiveDisabled()\"\n [for]=\"radioId()\">\n <input\n type=\"radio\"\n class=\"sr-only\"\n [id]=\"radioId()\"\n [name]=\"effectiveGroupName()\"\n [checked]=\"isSelected()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.aria-checked]=\"isSelected()\"\n [attr.aria-required]=\"!inGroup() && showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"effectiveShowError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isSelected() && !effectiveShowError()\"\n [class.border-default]=\"!isSelected() && !effectiveShowError()\"\n [class.border-error]=\"effectiveShowError()\"\n [class.group-hover:border-primary-hover]=\"
|
|
9398
|
+
args: [{ selector: 'lib-signal-radio', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"!inGroup() && showRequiredIndicator()\"\n [showError]=\"!inGroup() && showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"radioId()\">\n\n <div\n input\n class=\"group flex items-center gap-3\"\n [class.w-full]=\"!inGroup()\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-default]=\"effectiveReadonly() && !effectiveDisabled()\"\n [class.cursor-not-allowed]=\"effectiveDisabled()\"\n [class.opacity-70]=\"effectiveDisabled()\"\n [for]=\"radioId()\">\n <input\n type=\"radio\"\n class=\"sr-only\"\n [id]=\"radioId()\"\n [name]=\"effectiveGroupName()\"\n [checked]=\"isSelected()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"effectiveReadonly() || null\"\n [attr.aria-checked]=\"isSelected()\"\n [attr.aria-required]=\"!inGroup() && showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"effectiveShowError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"boxAppearanceClasses()\"\n [class.border-primary]=\"isSelected() && !effectiveShowError()\"\n [class.border-default]=\"!isSelected() && !effectiveShowError()\"\n [class.border-error]=\"effectiveShowError()\"\n [class.group-hover:border-primary-hover]=\"isInteractive() && !effectiveShowError()\"\n [class.group-hover:shadow-sm]=\"isInteractive()\"\n [class.group-hover:scale-105]=\"isInteractive()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !effectiveShowError()\"\n [class.ring-error-subtle]=\"isFocused() && effectiveShowError()\">\n <div\n class=\"rounded-full bg-surface-primary transition-opacity duration-200\"\n [class]=\"dotSizeClasses()\"\n [class.opacity-0]=\"!isSelected()\"\n [class.opacity-100]=\"isSelected()\"></div>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"radioId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (!inGroup() && showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
9288
9399
|
}], propDecorators: { groupName: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupName", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
9289
9400
|
|
|
9290
9401
|
let nextGroupId = 0;
|
|
@@ -9314,6 +9425,9 @@ class SignalRadioGroup extends BaseFormControl {
|
|
|
9314
9425
|
...(ngDevMode ? [{ debugName: "hasOptions" }] : /* istanbul ignore next */ []));
|
|
9315
9426
|
showGroupError = this.showError;
|
|
9316
9427
|
setValue(value) {
|
|
9428
|
+
if (this.readonly()) {
|
|
9429
|
+
return;
|
|
9430
|
+
}
|
|
9317
9431
|
super.setValue(value);
|
|
9318
9432
|
}
|
|
9319
9433
|
markOptionFocus() {
|
|
@@ -9357,6 +9471,8 @@ class SignalSwitch extends BaseFormControl {
|
|
|
9357
9471
|
...(ngDevMode ? [{ debugName: "switchId" }] : /* istanbul ignore next */ []));
|
|
9358
9472
|
isOn = computed(() => !!this.value(), /* @ts-ignore */
|
|
9359
9473
|
...(ngDevMode ? [{ debugName: "isOn" }] : /* istanbul ignore next */ []));
|
|
9474
|
+
isInteractive = computed(() => !this.disabled() && !this.readonly(), /* @ts-ignore */
|
|
9475
|
+
...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
|
|
9360
9476
|
trackClasses = computed(() => {
|
|
9361
9477
|
const size = this.size() === 'sm' ? 'w-8 h-4' : this.size() === 'lg' ? 'w-12 h-6' : 'w-10 h-5';
|
|
9362
9478
|
return `relative shrink-0 inline-flex items-center rounded-full transition-colors duration-200 p-0.5 ${size}`;
|
|
@@ -9403,13 +9519,17 @@ class SignalSwitch extends BaseFormControl {
|
|
|
9403
9519
|
labelTextClasses = computed(() => {
|
|
9404
9520
|
const typography = this.size() === 'sm' ? 'text-caption' : this.size() === 'lg' ? 'text-body1' : 'text-body2';
|
|
9405
9521
|
const color = this.disabled() ? 'text-role-disabled' : 'text-role-body';
|
|
9406
|
-
const hover = this.
|
|
9407
|
-
const cursor = this.disabled()
|
|
9522
|
+
const hover = this.isInteractive() ? ' group-hover:text-primary-hover' : '';
|
|
9523
|
+
const cursor = this.disabled()
|
|
9524
|
+
? 'cursor-not-allowed'
|
|
9525
|
+
: this.readonly()
|
|
9526
|
+
? 'cursor-default'
|
|
9527
|
+
: 'cursor-pointer';
|
|
9408
9528
|
return `${typography} ${color} ${cursor} inline-flex items-center leading-none select-none transition-colors duration-200${hover}`;
|
|
9409
9529
|
}, /* @ts-ignore */
|
|
9410
9530
|
...(ngDevMode ? [{ debugName: "labelTextClasses" }] : /* istanbul ignore next */ []));
|
|
9411
9531
|
onChange(event) {
|
|
9412
|
-
if (this.
|
|
9532
|
+
if (!this.isInteractive()) {
|
|
9413
9533
|
return;
|
|
9414
9534
|
}
|
|
9415
9535
|
const checked = event.target.checked;
|
|
@@ -9417,7 +9537,7 @@ class SignalSwitch extends BaseFormControl {
|
|
|
9417
9537
|
this.valueChange.emit(checked);
|
|
9418
9538
|
}
|
|
9419
9539
|
onKeyDown(event) {
|
|
9420
|
-
if ((event.key !== 'Enter' && event.key !== ' ') || this.
|
|
9540
|
+
if ((event.key !== 'Enter' && event.key !== ' ') || !this.isInteractive()) {
|
|
9421
9541
|
return;
|
|
9422
9542
|
}
|
|
9423
9543
|
event.preventDefault();
|
|
@@ -9428,11 +9548,11 @@ class SignalSwitch extends BaseFormControl {
|
|
|
9428
9548
|
this.valueChange.emit(nextValue);
|
|
9429
9549
|
}
|
|
9430
9550
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9431
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalSwitch, isStandalone: true, selector: "lib-signal-switch", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"switchId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"!disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"switchId()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"sr-only\"\n [id]=\"switchId()\"\n [checked]=\"isOn()\"\n [disabled]=\"disabled()\"\n [attr.aria-checked]=\"isOn()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"trackClasses()\"\n [class.bg-page-secondary]=\"!isOn() && !showError()\"\n [class.bg-surface-primary]=\"isOn() && !showError()\"\n [class.bg-surface-error-subtle]=\"showError()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\">\n <div\n [class]=\"thumbAppearanceClasses() + ' ' + thumbClasses() + ' ' + thumbTranslateClasses()\"></div>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"switchId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\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"] }] });
|
|
9551
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalSwitch, isStandalone: true, selector: "lib-signal-switch", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"switchId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-default]=\"readonly() && !disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"switchId()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"sr-only\"\n [id]=\"switchId()\"\n [checked]=\"isOn()\"\n [disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-checked]=\"isOn()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"trackClasses()\"\n [class.bg-page-secondary]=\"!isOn() && !showError()\"\n [class.bg-surface-primary]=\"isOn() && !showError()\"\n [class.bg-surface-error-subtle]=\"showError()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\">\n <div\n [class]=\"thumbAppearanceClasses() + ' ' + thumbClasses() + ' ' + thumbTranslateClasses()\"></div>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"switchId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\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"] }] });
|
|
9432
9552
|
}
|
|
9433
9553
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalSwitch, decorators: [{
|
|
9434
9554
|
type: Component,
|
|
9435
|
-
args: [{ selector: 'lib-signal-switch', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"switchId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"!disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"switchId()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"sr-only\"\n [id]=\"switchId()\"\n [checked]=\"isOn()\"\n [disabled]=\"disabled()\"\n [attr.aria-checked]=\"isOn()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"trackClasses()\"\n [class.bg-page-secondary]=\"!isOn() && !showError()\"\n [class.bg-surface-primary]=\"isOn() && !showError()\"\n [class.bg-surface-error-subtle]=\"showError()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\">\n <div\n [class]=\"thumbAppearanceClasses() + ' ' + thumbClasses() + ' ' + thumbTranslateClasses()\"></div>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"switchId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
9555
|
+
args: [{ selector: 'lib-signal-switch', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"switchId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <label\n class=\"inline-flex shrink-0 items-center select-none\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-default]=\"readonly() && !disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n [class.opacity-70]=\"disabled()\"\n [for]=\"switchId()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"sr-only\"\n [id]=\"switchId()\"\n [checked]=\"isOn()\"\n [disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-checked]=\"isOn()\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" />\n\n <div\n [class]=\"trackClasses()\"\n [class.bg-page-secondary]=\"!isOn() && !showError()\"\n [class.bg-surface-primary]=\"isOn() && !showError()\"\n [class.bg-surface-error-subtle]=\"showError()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\">\n <div\n [class]=\"thumbAppearanceClasses() + ' ' + thumbClasses() + ' ' + thumbTranslateClasses()\"></div>\n </div>\n </label>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <label [for]=\"switchId()\" [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
9436
9556
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
9437
9557
|
|
|
9438
9558
|
function getPathValue(obj, path) {
|
|
@@ -9694,8 +9814,6 @@ class SignalDropdown extends BaseSignalTextInputControl {
|
|
|
9694
9814
|
noOptionsMessage = input('No options available', /* @ts-ignore */
|
|
9695
9815
|
...(ngDevMode ? [{ debugName: "noOptionsMessage" }] : /* istanbul ignore next */ []));
|
|
9696
9816
|
// Input configuration
|
|
9697
|
-
readonly = input(false, /* @ts-ignore */
|
|
9698
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
9699
9817
|
// Adornments
|
|
9700
9818
|
prefixText = input('', /* @ts-ignore */
|
|
9701
9819
|
...(ngDevMode ? [{ debugName: "prefixText" }] : /* istanbul ignore next */ []));
|
|
@@ -9705,6 +9823,10 @@ class SignalDropdown extends BaseSignalTextInputControl {
|
|
|
9705
9823
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
9706
9824
|
postfixIcon = input(/* @ts-ignore */
|
|
9707
9825
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
9826
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
9827
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
9828
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
9829
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
9708
9830
|
// Native HTML attributes
|
|
9709
9831
|
id = input(/* @ts-ignore */
|
|
9710
9832
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -9760,6 +9882,10 @@ class SignalDropdown extends BaseSignalTextInputControl {
|
|
|
9760
9882
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
9761
9883
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
9762
9884
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
9885
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
9886
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
9887
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
9888
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
9763
9889
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
9764
9890
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
9765
9891
|
hasSelection = computed(() => {
|
|
@@ -10005,7 +10131,7 @@ class SignalDropdown extends BaseSignalTextInputControl {
|
|
|
10005
10131
|
}
|
|
10006
10132
|
}
|
|
10007
10133
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10008
|
-
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"] }] });
|
|
10134
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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.aria-readonly]=\"readonly() || null\"\n [class.cursor-default]=\"readonly() && !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]=\"postfixTextAdornmentClasses()\"\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"] }] });
|
|
10009
10135
|
}
|
|
10010
10136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDropdown, decorators: [{
|
|
10011
10137
|
type: Component,
|
|
@@ -10015,8 +10141,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
10015
10141
|
CdkConnectedOverlay,
|
|
10016
10142
|
HintIcon,
|
|
10017
10143
|
SignalDropdownPanelComponent,
|
|
10018
|
-
], 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" }]
|
|
10019
|
-
}], 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 }] }],
|
|
10144
|
+
], 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]=\"prefixTextAdornmentClasses()\"\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.aria-readonly]=\"readonly() || null\"\n [class.cursor-default]=\"readonly() && !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]=\"postfixTextAdornmentClasses()\"\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" }]
|
|
10145
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
10020
10146
|
type: ViewChild,
|
|
10021
10147
|
args: ['triggerButton']
|
|
10022
10148
|
}], dropdownButton: [{
|
|
@@ -10247,8 +10373,6 @@ class SignalMultiSelectDropdown extends BaseSignalTextInputControl {
|
|
|
10247
10373
|
noOptionsMessage = input('No options available', /* @ts-ignore */
|
|
10248
10374
|
...(ngDevMode ? [{ debugName: "noOptionsMessage" }] : /* istanbul ignore next */ []));
|
|
10249
10375
|
// Input configuration
|
|
10250
|
-
readonly = input(false, /* @ts-ignore */
|
|
10251
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
10252
10376
|
selectionDisplay = input('count', /* @ts-ignore */
|
|
10253
10377
|
...(ngDevMode ? [{ debugName: "selectionDisplay" }] : /* istanbul ignore next */ []));
|
|
10254
10378
|
selectedCountLabel = input('selected', /* @ts-ignore */
|
|
@@ -10268,6 +10392,10 @@ class SignalMultiSelectDropdown extends BaseSignalTextInputControl {
|
|
|
10268
10392
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
10269
10393
|
postfixIcon = input(/* @ts-ignore */
|
|
10270
10394
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
10395
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
10396
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
10397
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
10398
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
10271
10399
|
// Native HTML attributes
|
|
10272
10400
|
id = input(/* @ts-ignore */
|
|
10273
10401
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -10328,6 +10456,10 @@ class SignalMultiSelectDropdown extends BaseSignalTextInputControl {
|
|
|
10328
10456
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
10329
10457
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
10330
10458
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
10459
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
10460
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
10461
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
10462
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
10331
10463
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
10332
10464
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
10333
10465
|
hasSelection = computed(() => this.getCurrentValues().length > 0, /* @ts-ignore */
|
|
@@ -10609,7 +10741,7 @@ class SignalMultiSelectDropdown extends BaseSignalTextInputControl {
|
|
|
10609
10741
|
}
|
|
10610
10742
|
}
|
|
10611
10743
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalMultiSelectDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10612
|
-
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"] }] });
|
|
10744
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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.aria-readonly]=\"readonly() || null\"\n [class.cursor-default]=\"readonly() && !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]=\"postfixTextAdornmentClasses()\"\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"] }] });
|
|
10613
10745
|
}
|
|
10614
10746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalMultiSelectDropdown, decorators: [{
|
|
10615
10747
|
type: Component,
|
|
@@ -10619,8 +10751,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
10619
10751
|
CdkConnectedOverlay,
|
|
10620
10752
|
HintIcon,
|
|
10621
10753
|
SignalMultiSelectDropdownPanelComponent,
|
|
10622
|
-
], 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" }]
|
|
10623
|
-
}], 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 }] }],
|
|
10754
|
+
], 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]=\"prefixTextAdornmentClasses()\"\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.aria-readonly]=\"readonly() || null\"\n [class.cursor-default]=\"readonly() && !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]=\"postfixTextAdornmentClasses()\"\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" }]
|
|
10755
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
10624
10756
|
type: ViewChild,
|
|
10625
10757
|
args: ['triggerButton']
|
|
10626
10758
|
}], dropdownButton: [{
|
|
@@ -10913,6 +11045,9 @@ class SignalDatePicker extends BaseFormControl {
|
|
|
10913
11045
|
return isMonthEnabled(month, this.activeYear(), this.constraints());
|
|
10914
11046
|
}
|
|
10915
11047
|
onDaySelected(day) {
|
|
11048
|
+
if (this.readonly() || this.disabled()) {
|
|
11049
|
+
return;
|
|
11050
|
+
}
|
|
10916
11051
|
const selected = new Date(this.activeYear(), this.activeMonth(), day);
|
|
10917
11052
|
this.setValue(selected);
|
|
10918
11053
|
this.dateSelected.emit(selected);
|
|
@@ -11227,8 +11362,6 @@ class SignalDateField extends BaseSignalTextInputControl {
|
|
|
11227
11362
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
11228
11363
|
hint = input('', /* @ts-ignore */
|
|
11229
11364
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
11230
|
-
readonly = input(false, /* @ts-ignore */
|
|
11231
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
11232
11365
|
dateFormat = input('mmddyyyy', /* @ts-ignore */
|
|
11233
11366
|
...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
|
|
11234
11367
|
showCalendarIcon = input(true, /* @ts-ignore */
|
|
@@ -11243,6 +11376,10 @@ class SignalDateField extends BaseSignalTextInputControl {
|
|
|
11243
11376
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
11244
11377
|
postfixIcon = input(/* @ts-ignore */
|
|
11245
11378
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
11379
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
11380
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
11381
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
11382
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
11246
11383
|
id = input(/* @ts-ignore */
|
|
11247
11384
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
11248
11385
|
fieldName = input(/* @ts-ignore */
|
|
@@ -11321,6 +11458,10 @@ class SignalDateField extends BaseSignalTextInputControl {
|
|
|
11321
11458
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
11322
11459
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
11323
11460
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
11461
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
11462
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
11463
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
11464
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
11324
11465
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
11325
11466
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
11326
11467
|
hasValue = computed(() => this.value() != null, /* @ts-ignore */
|
|
@@ -11536,7 +11677,7 @@ class SignalDateField extends BaseSignalTextInputControl {
|
|
|
11536
11677
|
}
|
|
11537
11678
|
}
|
|
11538
11679
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11539
|
-
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"] }] });
|
|
11680
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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()\"\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]=\"postfixTextAdornmentClasses()\"\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()\"\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"] }] });
|
|
11540
11681
|
}
|
|
11541
11682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateField, decorators: [{
|
|
11542
11683
|
type: Component,
|
|
@@ -11546,8 +11687,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
11546
11687
|
CdkConnectedOverlay,
|
|
11547
11688
|
HintIcon,
|
|
11548
11689
|
SignalDateFieldPanelComponent,
|
|
11549
|
-
], 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"] }]
|
|
11550
|
-
}], 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 }] }],
|
|
11690
|
+
], 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]=\"prefixTextAdornmentClasses()\"\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()\"\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]=\"postfixTextAdornmentClasses()\"\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()\"\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"] }]
|
|
11691
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
11551
11692
|
type: ViewChild,
|
|
11552
11693
|
args: ['inputRef']
|
|
11553
11694
|
}], fieldWrapper: [{
|
|
@@ -11775,6 +11916,9 @@ class SignalDateRangePicker extends BaseFormControl {
|
|
|
11775
11916
|
return isMonthEnabled(month, this.activeYear(), this.constraints());
|
|
11776
11917
|
}
|
|
11777
11918
|
onDaySelected(day) {
|
|
11919
|
+
if (this.readonly() || this.disabled()) {
|
|
11920
|
+
return;
|
|
11921
|
+
}
|
|
11778
11922
|
const selectedDate = new Date(this.activeYear(), this.activeMonth(), day);
|
|
11779
11923
|
const currentStart = this.startDate();
|
|
11780
11924
|
if (!currentStart || selectedDate < currentStart) {
|
|
@@ -11805,6 +11949,9 @@ class SignalDateRangePicker extends BaseFormControl {
|
|
|
11805
11949
|
}
|
|
11806
11950
|
}
|
|
11807
11951
|
clearSelection() {
|
|
11952
|
+
if (this.readonly() || this.disabled()) {
|
|
11953
|
+
return;
|
|
11954
|
+
}
|
|
11808
11955
|
this.startDate.set(null);
|
|
11809
11956
|
this.endDate.set(null);
|
|
11810
11957
|
this.hoveredDate.set(null);
|
|
@@ -12106,8 +12253,6 @@ class SignalDateRangeField extends BaseSignalTextInputControl {
|
|
|
12106
12253
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
12107
12254
|
hint = input('', /* @ts-ignore */
|
|
12108
12255
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
12109
|
-
readonly = input(false, /* @ts-ignore */
|
|
12110
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
12111
12256
|
dateFormat = input('mmddyyyy', /* @ts-ignore */
|
|
12112
12257
|
...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
|
|
12113
12258
|
showCalendarIcon = input(true, /* @ts-ignore */
|
|
@@ -12122,6 +12267,10 @@ class SignalDateRangeField extends BaseSignalTextInputControl {
|
|
|
12122
12267
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
12123
12268
|
postfixIcon = input(/* @ts-ignore */
|
|
12124
12269
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
12270
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
12271
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
12272
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
12273
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
12125
12274
|
id = input(/* @ts-ignore */
|
|
12126
12275
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
12127
12276
|
fieldName = input(/* @ts-ignore */
|
|
@@ -12190,6 +12339,10 @@ class SignalDateRangeField extends BaseSignalTextInputControl {
|
|
|
12190
12339
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
12191
12340
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
12192
12341
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
12342
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
12343
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
12344
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
12345
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
12193
12346
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
12194
12347
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
12195
12348
|
hasValue = computed(() => this.value() != null, /* @ts-ignore */
|
|
@@ -12416,7 +12569,7 @@ class SignalDateRangeField extends BaseSignalTextInputControl {
|
|
|
12416
12569
|
}
|
|
12417
12570
|
}
|
|
12418
12571
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateRangeField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12419
|
-
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"] }] });
|
|
12572
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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()\"\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]=\"postfixTextAdornmentClasses()\"\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()\"\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"] }] });
|
|
12420
12573
|
}
|
|
12421
12574
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalDateRangeField, decorators: [{
|
|
12422
12575
|
type: Component,
|
|
@@ -12427,8 +12580,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
12427
12580
|
HintIcon,
|
|
12428
12581
|
NgxMaskDirective,
|
|
12429
12582
|
SignalDateRangeFieldPanelComponent,
|
|
12430
|
-
], 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" }]
|
|
12431
|
-
}], 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 }] }],
|
|
12583
|
+
], 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]=\"prefixTextAdornmentClasses()\"\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()\"\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]=\"postfixTextAdornmentClasses()\"\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()\"\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" }]
|
|
12584
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
12432
12585
|
type: ViewChild,
|
|
12433
12586
|
args: ['inputRef']
|
|
12434
12587
|
}], fieldWrapper: [{
|
|
@@ -12643,18 +12796,30 @@ class SignalTimePicker extends BaseFormControl {
|
|
|
12643
12796
|
return formatTimeDigits(this.minutes());
|
|
12644
12797
|
}
|
|
12645
12798
|
onHourUp() {
|
|
12799
|
+
if (this.readonly() || this.disabled()) {
|
|
12800
|
+
return;
|
|
12801
|
+
}
|
|
12646
12802
|
this.hours.update((prev) => stepHourSpinner(prev, 1, this.is24HourFormat()));
|
|
12647
12803
|
this.commitValue();
|
|
12648
12804
|
}
|
|
12649
12805
|
onHourDown() {
|
|
12806
|
+
if (this.readonly() || this.disabled()) {
|
|
12807
|
+
return;
|
|
12808
|
+
}
|
|
12650
12809
|
this.hours.update((prev) => stepHourSpinner(prev, -1, this.is24HourFormat()));
|
|
12651
12810
|
this.commitValue();
|
|
12652
12811
|
}
|
|
12653
12812
|
onMinuteUp() {
|
|
12813
|
+
if (this.readonly() || this.disabled()) {
|
|
12814
|
+
return;
|
|
12815
|
+
}
|
|
12654
12816
|
this.minutes.update((prev) => stepMinuteSpinner(prev, 1));
|
|
12655
12817
|
this.commitValue();
|
|
12656
12818
|
}
|
|
12657
12819
|
onMinuteDown() {
|
|
12820
|
+
if (this.readonly() || this.disabled()) {
|
|
12821
|
+
return;
|
|
12822
|
+
}
|
|
12658
12823
|
this.minutes.update((prev) => stepMinuteSpinner(prev, -1));
|
|
12659
12824
|
this.commitValue();
|
|
12660
12825
|
}
|
|
@@ -12681,6 +12846,9 @@ class SignalTimePicker extends BaseFormControl {
|
|
|
12681
12846
|
}
|
|
12682
12847
|
}
|
|
12683
12848
|
setPeriod(nextPeriod) {
|
|
12849
|
+
if (this.readonly() || this.disabled()) {
|
|
12850
|
+
return;
|
|
12851
|
+
}
|
|
12684
12852
|
if (this.is24HourFormat() || this.period() === nextPeriod) {
|
|
12685
12853
|
return;
|
|
12686
12854
|
}
|
|
@@ -12688,6 +12856,9 @@ class SignalTimePicker extends BaseFormControl {
|
|
|
12688
12856
|
this.commitValue();
|
|
12689
12857
|
}
|
|
12690
12858
|
toggle24HourFormat(enabled) {
|
|
12859
|
+
if (this.readonly() || this.disabled()) {
|
|
12860
|
+
return;
|
|
12861
|
+
}
|
|
12691
12862
|
if (this.is24HourFormat() === enabled) {
|
|
12692
12863
|
return;
|
|
12693
12864
|
}
|
|
@@ -12709,6 +12880,9 @@ class SignalTimePicker extends BaseFormControl {
|
|
|
12709
12880
|
this.commitValue();
|
|
12710
12881
|
}
|
|
12711
12882
|
validateHours(event) {
|
|
12883
|
+
if (this.readonly() || this.disabled()) {
|
|
12884
|
+
return;
|
|
12885
|
+
}
|
|
12712
12886
|
const inputElement = event.target;
|
|
12713
12887
|
const inputHours = parseInt(inputElement.value, 10);
|
|
12714
12888
|
if (Number.isNaN(inputHours)) {
|
|
@@ -12727,6 +12901,9 @@ class SignalTimePicker extends BaseFormControl {
|
|
|
12727
12901
|
inputElement.value = this.formattedHours();
|
|
12728
12902
|
}
|
|
12729
12903
|
validateMinutes(event) {
|
|
12904
|
+
if (this.readonly() || this.disabled()) {
|
|
12905
|
+
return;
|
|
12906
|
+
}
|
|
12730
12907
|
const inputElement = event.target;
|
|
12731
12908
|
const inputMinutes = parseInt(inputElement.value, 10);
|
|
12732
12909
|
if (Number.isNaN(inputMinutes)) {
|
|
@@ -12853,8 +13030,6 @@ class SignalTimeField extends BaseSignalTextInputControl {
|
|
|
12853
13030
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
12854
13031
|
hint = input('', /* @ts-ignore */
|
|
12855
13032
|
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
12856
|
-
readonly = input(false, /* @ts-ignore */
|
|
12857
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
12858
13033
|
timeFormat = input('12h', /* @ts-ignore */
|
|
12859
13034
|
...(ngDevMode ? [{ debugName: "timeFormat" }] : /* istanbul ignore next */ []));
|
|
12860
13035
|
showClockIcon = input(true, /* @ts-ignore */
|
|
@@ -12869,6 +13044,10 @@ class SignalTimeField extends BaseSignalTextInputControl {
|
|
|
12869
13044
|
...(ngDevMode ? [{ debugName: "postfixText" }] : /* istanbul ignore next */ []));
|
|
12870
13045
|
postfixIcon = input(/* @ts-ignore */
|
|
12871
13046
|
...(ngDevMode ? [undefined, { debugName: "postfixIcon" }] : /* istanbul ignore next */ []));
|
|
13047
|
+
enablePrefixBackground = input(false, /* @ts-ignore */
|
|
13048
|
+
...(ngDevMode ? [{ debugName: "enablePrefixBackground" }] : /* istanbul ignore next */ []));
|
|
13049
|
+
enablePostfixBackground = input(false, /* @ts-ignore */
|
|
13050
|
+
...(ngDevMode ? [{ debugName: "enablePostfixBackground" }] : /* istanbul ignore next */ []));
|
|
12872
13051
|
id = input(/* @ts-ignore */
|
|
12873
13052
|
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
12874
13053
|
fieldName = input(/* @ts-ignore */
|
|
@@ -12925,6 +13104,10 @@ class SignalTimeField extends BaseSignalTextInputControl {
|
|
|
12925
13104
|
...(ngDevMode ? [{ debugName: "hasAbsolutePrefixIcon" }] : /* istanbul ignore next */ []));
|
|
12926
13105
|
hasPostfixText = computed(() => !!this.postfixText(), /* @ts-ignore */
|
|
12927
13106
|
...(ngDevMode ? [{ debugName: "hasPostfixText" }] : /* istanbul ignore next */ []));
|
|
13107
|
+
prefixTextAdornmentClasses = computed(() => getPrefixTextAdornmentClasses(this.enablePrefixBackground(), this.appearance()), /* @ts-ignore */
|
|
13108
|
+
...(ngDevMode ? [{ debugName: "prefixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
13109
|
+
postfixTextAdornmentClasses = computed(() => getPostfixTextAdornmentClasses(this.enablePostfixBackground(), this.appearance()), /* @ts-ignore */
|
|
13110
|
+
...(ngDevMode ? [{ debugName: "postfixTextAdornmentClasses" }] : /* istanbul ignore next */ []));
|
|
12928
13111
|
hasAbsolutePostfixIcon = computed(() => !!this.postfixIcon() && !this.hasPostfixText(), /* @ts-ignore */
|
|
12929
13112
|
...(ngDevMode ? [{ debugName: "hasAbsolutePostfixIcon" }] : /* istanbul ignore next */ []));
|
|
12930
13113
|
hasValue = computed(() => this.value() != null, /* @ts-ignore */
|
|
@@ -13156,7 +13339,7 @@ class SignalTimeField extends BaseSignalTextInputControl {
|
|
|
13156
13339
|
}
|
|
13157
13340
|
}
|
|
13158
13341
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTimeField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13159
|
-
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"] }] });
|
|
13342
|
+
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 }, 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 }, enablePrefixBackground: { classPropertyName: "enablePrefixBackground", publicName: "enablePrefixBackground", isSignal: true, isRequired: false, transformFunction: null }, enablePostfixBackground: { classPropertyName: "enablePostfixBackground", publicName: "enablePostfixBackground", 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]=\"prefixTextAdornmentClasses()\"\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()\"\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]=\"postfixTextAdornmentClasses()\"\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()\"\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"] }] });
|
|
13160
13343
|
}
|
|
13161
13344
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalTimeField, decorators: [{
|
|
13162
13345
|
type: Component,
|
|
@@ -13166,8 +13349,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
13166
13349
|
CdkConnectedOverlay,
|
|
13167
13350
|
HintIcon,
|
|
13168
13351
|
SignalTimeFieldPanelComponent,
|
|
13169
|
-
], 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"] }]
|
|
13170
|
-
}], 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 }] }],
|
|
13352
|
+
], 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]=\"prefixTextAdornmentClasses()\"\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()\"\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]=\"postfixTextAdornmentClasses()\"\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()\"\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"] }]
|
|
13353
|
+
}], 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 }] }], 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 }] }], enablePrefixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrefixBackground", required: false }] }], enablePostfixBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePostfixBackground", 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: [{
|
|
13171
13354
|
type: ViewChild,
|
|
13172
13355
|
args: ['inputRef']
|
|
13173
13356
|
}], fieldWrapper: [{
|
|
@@ -13231,6 +13414,8 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13231
13414
|
...(ngDevMode ? [{ debugName: "digitIndices" }] : /* istanbul ignore next */ []));
|
|
13232
13415
|
focusedIndex = signal(0, /* @ts-ignore */
|
|
13233
13416
|
...(ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []));
|
|
13417
|
+
isInteractive = computed(() => !this.disabled() && !this.readonly(), /* @ts-ignore */
|
|
13418
|
+
...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
|
|
13234
13419
|
digits = signal([], /* @ts-ignore */
|
|
13235
13420
|
...(ngDevMode ? [{ debugName: "digits" }] : /* istanbul ignore next */ []));
|
|
13236
13421
|
maskedAt = signal([], /* @ts-ignore */
|
|
@@ -13262,6 +13447,9 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13262
13447
|
if (this.disabled()) {
|
|
13263
13448
|
classes.push('bg-surface-disabled border-disabled cursor-not-allowed');
|
|
13264
13449
|
}
|
|
13450
|
+
else if (this.readonly()) {
|
|
13451
|
+
classes.push('border-default cursor-default');
|
|
13452
|
+
}
|
|
13265
13453
|
else if (this.showError()) {
|
|
13266
13454
|
classes.push('border-error');
|
|
13267
13455
|
}
|
|
@@ -13283,6 +13471,9 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13283
13471
|
if (this.disabled()) {
|
|
13284
13472
|
classes.push('cursor-not-allowed');
|
|
13285
13473
|
}
|
|
13474
|
+
else if (this.readonly()) {
|
|
13475
|
+
classes.push('cursor-default');
|
|
13476
|
+
}
|
|
13286
13477
|
else {
|
|
13287
13478
|
classes.push('cursor-text');
|
|
13288
13479
|
}
|
|
@@ -13316,7 +13507,7 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13316
13507
|
this.onBlur();
|
|
13317
13508
|
}
|
|
13318
13509
|
onInput(event, index) {
|
|
13319
|
-
if (this.
|
|
13510
|
+
if (!this.isInteractive()) {
|
|
13320
13511
|
return;
|
|
13321
13512
|
}
|
|
13322
13513
|
const inputEl = event.target;
|
|
@@ -13337,7 +13528,7 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13337
13528
|
}
|
|
13338
13529
|
}
|
|
13339
13530
|
onKeyDown(event, index) {
|
|
13340
|
-
if (this.
|
|
13531
|
+
if (!this.isInteractive()) {
|
|
13341
13532
|
return;
|
|
13342
13533
|
}
|
|
13343
13534
|
if (event.key === 'Backspace') {
|
|
@@ -13382,7 +13573,7 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13382
13573
|
}
|
|
13383
13574
|
}
|
|
13384
13575
|
onPaste(event, index) {
|
|
13385
|
-
if (this.
|
|
13576
|
+
if (!this.isInteractive()) {
|
|
13386
13577
|
return;
|
|
13387
13578
|
}
|
|
13388
13579
|
event.preventDefault();
|
|
@@ -13407,7 +13598,7 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13407
13598
|
this.focusIndex(focusIndex);
|
|
13408
13599
|
}
|
|
13409
13600
|
onCellClick(index) {
|
|
13410
|
-
if (this.
|
|
13601
|
+
if (!this.isInteractive()) {
|
|
13411
13602
|
return;
|
|
13412
13603
|
}
|
|
13413
13604
|
this.focusIndex(index);
|
|
@@ -13504,11 +13695,11 @@ class SignalOtpField extends BaseFormControl {
|
|
|
13504
13695
|
}
|
|
13505
13696
|
}
|
|
13506
13697
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalOtpField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13507
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalOtpField, isStandalone: true, selector: "lib-signal-otp-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, maskMode: { classPropertyName: "maskMode", publicName: "maskMode", isSignal: true, isRequired: false, transformFunction: null }, maskDelayMs: { classPropertyName: "maskDelayMs", publicName: "maskDelayMs", isSignal: true, isRequired: false, transformFunction: null }, obscureChar: { classPropertyName: "obscureChar", publicName: "obscureChar", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completed: "completed" }, viewQueries: [{ propertyName: "digitInputs", predicate: ["digitInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"!!label()\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n role=\"group\"\n class=\"flex flex-wrap gap-2\"\n [attr.aria-label]=\"label() || 'One-time password'\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\">\n\n @for (index of digitIndices(); track index) {\n <div\n class=\"group\"\n [class]=\"cellClasses(index)\"\n (click)=\"onCellClick(index)\">\n @if (shouldShowOverlay(index)) {\n <span\n class=\"pointer-events-none absolute inset-0 flex items-center justify-center text-lg font-semibold text-role-body\"\n aria-hidden=\"true\">\n {{ displayChar(index) }}\n </span>\n }\n\n <input\n #digitInput\n class=\"relative z-10\"\n [class]=\"inputClasses(index)\"\n [type]=\"maskMode() === 'alwaysObscure' ? 'password' : 'text'\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [id]=\"index === 0 ? inputId() : null\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'Digit ' + (index + 1) + ' of ' + length()\"\n (input)=\"onInput($event, index)\"\n (keydown)=\"onKeyDown($event, index)\"\n (paste)=\"onPaste($event, index)\"\n (focus)=\"onCellFocus(index)\"\n (blur)=\"onCellBlur()\" />\n </div>\n }\n </div>\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"] }] });
|
|
13698
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalOtpField, isStandalone: true, selector: "lib-signal-otp-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, maskMode: { classPropertyName: "maskMode", publicName: "maskMode", isSignal: true, isRequired: false, transformFunction: null }, maskDelayMs: { classPropertyName: "maskDelayMs", publicName: "maskDelayMs", isSignal: true, isRequired: false, transformFunction: null }, obscureChar: { classPropertyName: "obscureChar", publicName: "obscureChar", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completed: "completed" }, viewQueries: [{ propertyName: "digitInputs", predicate: ["digitInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"!!label()\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n role=\"group\"\n class=\"flex flex-wrap gap-2\"\n [attr.aria-label]=\"label() || 'One-time password'\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\">\n\n @for (index of digitIndices(); track index) {\n <div\n class=\"group\"\n [class]=\"cellClasses(index)\"\n (click)=\"onCellClick(index)\">\n @if (shouldShowOverlay(index)) {\n <span\n class=\"pointer-events-none absolute inset-0 flex items-center justify-center text-lg font-semibold text-role-body\"\n aria-hidden=\"true\">\n {{ displayChar(index) }}\n </span>\n }\n\n <input\n #digitInput\n class=\"relative z-10\"\n [class]=\"inputClasses(index)\"\n [type]=\"maskMode() === 'alwaysObscure' ? 'password' : 'text'\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [id]=\"index === 0 ? inputId() : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-label]=\"'Digit ' + (index + 1) + ' of ' + length()\"\n (input)=\"onInput($event, index)\"\n (keydown)=\"onKeyDown($event, index)\"\n (paste)=\"onPaste($event, index)\"\n (focus)=\"onCellFocus(index)\"\n (blur)=\"onCellBlur()\" />\n </div>\n }\n </div>\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"] }] });
|
|
13508
13699
|
}
|
|
13509
13700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalOtpField, decorators: [{
|
|
13510
13701
|
type: Component,
|
|
13511
|
-
args: [{ selector: 'lib-signal-otp-field', imports: [BaseSignalInput], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"!!label()\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n role=\"group\"\n class=\"flex flex-wrap gap-2\"\n [attr.aria-label]=\"label() || 'One-time password'\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\">\n\n @for (index of digitIndices(); track index) {\n <div\n class=\"group\"\n [class]=\"cellClasses(index)\"\n (click)=\"onCellClick(index)\">\n @if (shouldShowOverlay(index)) {\n <span\n class=\"pointer-events-none absolute inset-0 flex items-center justify-center text-lg font-semibold text-role-body\"\n aria-hidden=\"true\">\n {{ displayChar(index) }}\n </span>\n }\n\n <input\n #digitInput\n class=\"relative z-10\"\n [class]=\"inputClasses(index)\"\n [type]=\"maskMode() === 'alwaysObscure' ? 'password' : 'text'\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [id]=\"index === 0 ? inputId() : null\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'Digit ' + (index + 1) + ' of ' + length()\"\n (input)=\"onInput($event, index)\"\n (keydown)=\"onKeyDown($event, index)\"\n (paste)=\"onPaste($event, index)\"\n (focus)=\"onCellFocus(index)\"\n (blur)=\"onCellBlur()\" />\n </div>\n }\n </div>\n</lib-base-signal-input>\n" }]
|
|
13702
|
+
args: [{ selector: 'lib-signal-otp-field', imports: [BaseSignalInput], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"!!label()\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"inputId()\">\n\n <div\n input\n role=\"group\"\n class=\"flex flex-wrap gap-2\"\n [attr.aria-label]=\"label() || 'One-time password'\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\">\n\n @for (index of digitIndices(); track index) {\n <div\n class=\"group\"\n [class]=\"cellClasses(index)\"\n (click)=\"onCellClick(index)\">\n @if (shouldShowOverlay(index)) {\n <span\n class=\"pointer-events-none absolute inset-0 flex items-center justify-center text-lg font-semibold text-role-body\"\n aria-hidden=\"true\">\n {{ displayChar(index) }}\n </span>\n }\n\n <input\n #digitInput\n class=\"relative z-10\"\n [class]=\"inputClasses(index)\"\n [type]=\"maskMode() === 'alwaysObscure' ? 'password' : 'text'\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n maxlength=\"1\"\n autocomplete=\"one-time-code\"\n [id]=\"index === 0 ? inputId() : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-label]=\"'Digit ' + (index + 1) + ' of ' + length()\"\n (input)=\"onInput($event, index)\"\n (keydown)=\"onKeyDown($event, index)\"\n (paste)=\"onPaste($event, index)\"\n (focus)=\"onCellFocus(index)\"\n (blur)=\"onCellBlur()\" />\n </div>\n }\n </div>\n</lib-base-signal-input>\n" }]
|
|
13512
13703
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], maskMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "maskMode", required: false }] }], maskDelayMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "maskDelayMs", required: false }] }], obscureChar: [{ type: i0.Input, args: [{ isSignal: true, alias: "obscureChar", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], completed: [{ type: i0.Output, args: ["completed"] }], digitInputs: [{
|
|
13513
13704
|
type: ViewChildren,
|
|
13514
13705
|
args: ['digitInput']
|
|
@@ -13600,8 +13791,6 @@ class SignalRating extends BaseFormControl {
|
|
|
13600
13791
|
...(ngDevMode ? [{ debugName: "maxStars" }] : /* istanbul ignore next */ []));
|
|
13601
13792
|
allowClear = input(true, /* @ts-ignore */
|
|
13602
13793
|
...(ngDevMode ? [{ debugName: "allowClear" }] : /* istanbul ignore next */ []));
|
|
13603
|
-
readonly = input(false, /* @ts-ignore */
|
|
13604
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
13605
13794
|
valueChange = output();
|
|
13606
13795
|
instanceId = ++nextRatingId;
|
|
13607
13796
|
hoverRating = signal(null, /* @ts-ignore */
|
|
@@ -13713,12 +13902,12 @@ class SignalRating extends BaseFormControl {
|
|
|
13713
13902
|
this.valueChange.emit(clamped);
|
|
13714
13903
|
}
|
|
13715
13904
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalRating, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13716
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalRating, isStandalone: true, selector: "lib-signal-rating", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxStars: { classPropertyName: "maxStars", publicName: "maxStars", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }
|
|
13905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalRating, isStandalone: true, selector: "lib-signal-rating", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxStars: { classPropertyName: "maxStars", publicName: "maxStars", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"ratingId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <div\n [id]=\"ratingId()\"\n role=\"slider\"\n tabindex=\"0\"\n [class]=\"sliderClasses()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n (mousemove)=\"onRowMouseMove($event)\"\n (mouseleave)=\"onRowMouseLeave()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\">\n @for (starIndex of starIndices(); track starIndex) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"inline-flex shrink-0 items-center justify-center rounded-sm p-0.5 transition-transform duration-150 disabled:pointer-events-none\"\n [class.hover:scale-110]=\"isInteractive()\"\n [disabled]=\"!isInteractive()\"\n (click)=\"onStarClick($event, starIndex)\">\n @switch (getStarFillFor(starIndex)) {\n @case ('full') {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"text-primary\"\n [attr.width]=\"iconSize()\"\n [attr.height]=\"iconSize()\"\n aria-hidden=\"true\">\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\" />\n </svg>\n }\n @case ('half') {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [attr.width]=\"iconSize()\"\n [attr.height]=\"iconSize()\"\n aria-hidden=\"true\">\n <defs>\n <clipPath [attr.id]=\"'signal-rating-half-' + ratingId() + '-' + starIndex\">\n <rect x=\"0\" y=\"0\" width=\"12\" height=\"24\" />\n </clipPath>\n </defs>\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n fill=\"currentColor\"\n class=\"text-role-placeholder\" />\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n fill=\"currentColor\"\n class=\"text-primary\"\n [attr.clip-path]=\"'url(#signal-rating-half-' + ratingId() + '-' + starIndex + ')'\" />\n </svg>\n }\n @default {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"text-role-placeholder\"\n [attr.width]=\"iconSize()\"\n [attr.height]=\"iconSize()\"\n aria-hidden=\"true\">\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\" />\n </svg>\n }\n }\n </button>\n }\n </div>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <span [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </span>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\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"] }] });
|
|
13717
13906
|
}
|
|
13718
13907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalRating, decorators: [{
|
|
13719
13908
|
type: Component,
|
|
13720
13909
|
args: [{ selector: 'lib-signal-rating', imports: [BaseSignalInput, HintIcon], template: "<lib-base-signal-input\n [showExternalLabel]=\"false\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [inputId]=\"ratingId()\">\n\n <div input class=\"group flex w-full items-center gap-3\">\n <div\n [id]=\"ratingId()\"\n role=\"slider\"\n tabindex=\"0\"\n [class]=\"sliderClasses()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n (mousemove)=\"onRowMouseMove($event)\"\n (mouseleave)=\"onRowMouseLeave()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\">\n @for (starIndex of starIndices(); track starIndex) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"inline-flex shrink-0 items-center justify-center rounded-sm p-0.5 transition-transform duration-150 disabled:pointer-events-none\"\n [class.hover:scale-110]=\"isInteractive()\"\n [disabled]=\"!isInteractive()\"\n (click)=\"onStarClick($event, starIndex)\">\n @switch (getStarFillFor(starIndex)) {\n @case ('full') {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"text-primary\"\n [attr.width]=\"iconSize()\"\n [attr.height]=\"iconSize()\"\n aria-hidden=\"true\">\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\" />\n </svg>\n }\n @case ('half') {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n [attr.width]=\"iconSize()\"\n [attr.height]=\"iconSize()\"\n aria-hidden=\"true\">\n <defs>\n <clipPath [attr.id]=\"'signal-rating-half-' + ratingId() + '-' + starIndex\">\n <rect x=\"0\" y=\"0\" width=\"12\" height=\"24\" />\n </clipPath>\n </defs>\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n fill=\"currentColor\"\n class=\"text-role-placeholder\" />\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n fill=\"currentColor\"\n class=\"text-primary\"\n [attr.clip-path]=\"'url(#signal-rating-half-' + ratingId() + '-' + starIndex + ')'\" />\n </svg>\n }\n @default {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"text-role-placeholder\"\n [attr.width]=\"iconSize()\"\n [attr.height]=\"iconSize()\"\n aria-hidden=\"true\">\n <path\n d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\" />\n </svg>\n }\n }\n </button>\n }\n </div>\n\n @if (label()) {\n <div class=\"inline-flex min-w-0 flex-1 items-center gap-1\" [class]=\"labelRowClasses()\">\n <span [class]=\"labelTextClasses()\">\n {{ label() }}\n @if (showRequiredIndicator()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </span>\n\n @if (hint()) {\n <lib-hint-icon [hint]=\"hint()\" [size]=\"14\" />\n }\n </div>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
13721
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxStars: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxStars", required: false }] }], allowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClear", required: false }] }],
|
|
13910
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxStars: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxStars", required: false }] }], allowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClear", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
13722
13911
|
|
|
13723
13912
|
let nextSliderId = 0;
|
|
13724
13913
|
class SignalSlider extends BaseFormControl {
|
|
@@ -13737,8 +13926,6 @@ class SignalSlider extends BaseFormControl {
|
|
|
13737
13926
|
...(ngDevMode ? [{ debugName: "sliderMax" }] : /* istanbul ignore next */ []));
|
|
13738
13927
|
sliderStep = input(1, /* @ts-ignore */
|
|
13739
13928
|
...(ngDevMode ? [{ debugName: "sliderStep" }] : /* istanbul ignore next */ []));
|
|
13740
|
-
readonly = input(false, /* @ts-ignore */
|
|
13741
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
13742
13929
|
showValueLabel = input(false, /* @ts-ignore */
|
|
13743
13930
|
...(ngDevMode ? [{ debugName: "showValueLabel" }] : /* istanbul ignore next */ []));
|
|
13744
13931
|
showValueBubble = input(true, /* @ts-ignore */
|
|
@@ -13921,12 +14108,12 @@ class SignalSlider extends BaseFormControl {
|
|
|
13921
14108
|
this.valueChange.emit(snapped);
|
|
13922
14109
|
}
|
|
13923
14110
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13924
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalSlider, isStandalone: true, selector: "lib-signal-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, sliderMin: { classPropertyName: "sliderMin", publicName: "sliderMin", isSignal: true, isRequired: false, transformFunction: null }, sliderMax: { classPropertyName: "sliderMax", publicName: "sliderMax", isSignal: true, isRequired: false, transformFunction: null }, sliderStep: { classPropertyName: "sliderStep", publicName: "sliderStep", isSignal: true, isRequired: false, transformFunction: null },
|
|
14111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalSlider, isStandalone: true, selector: "lib-signal-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, sliderMin: { classPropertyName: "sliderMin", publicName: "sliderMin", isSignal: true, isRequired: false, transformFunction: null }, sliderMax: { classPropertyName: "sliderMax", publicName: "sliderMax", isSignal: true, isRequired: false, transformFunction: null }, sliderStep: { classPropertyName: "sliderStep", publicName: "sliderStep", isSignal: true, isRequired: false, transformFunction: null }, showValueLabel: { classPropertyName: "showValueLabel", publicName: "showValueLabel", isSignal: true, isRequired: false, transformFunction: null }, showValueBubble: { classPropertyName: "showValueBubble", publicName: "showValueBubble", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "trackRef", first: true, predicate: ["trackRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"true\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"sliderId()\">\n\n <div input class=\"flex w-full items-center gap-3\">\n <div\n #trackRef\n class=\"relative flex-1 touch-none select-none overflow-visible\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-not-allowed]=\"!isInteractive()\"\n [class.opacity-70]=\"disabled()\"\n (pointerdown)=\"onTrackPointerDown($event)\">\n <div\n class=\"relative w-full rounded-full bg-page-secondary\"\n [class]=\"trackHeightClass()\">\n <div\n class=\"absolute inset-y-0 left-0 rounded-full bg-surface-primary\"\n [class.transition-[width]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [style.width.%]=\"visualPercent()\"></div>\n </div>\n\n @if (showValueBubble()) {\n <div\n class=\"absolute z-30 -translate-x-1/2 pointer-events-none\"\n [class]=\"bubbleOffsetClass()\"\n [class.transition-none]=\"isDragging()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [style.left.%]=\"visualPercent()\">\n <div\n class=\"relative flex items-center justify-center rounded-full bg-surface-primary px-2.5 py-1 text-caption tabular-nums text-role-on-color-body shadow-md transition-[opacity,transform] duration-200 ease-out\"\n [class.opacity-0]=\"!showBubble()\"\n [class.opacity-100]=\"showBubble()\"\n [class.scale-90]=\"!showBubble()\"\n [class.scale-100]=\"showBubble()\"\n [class.translate-y-0.5]=\"!showBubble()\"\n [class.translate-y-0]=\"showBubble()\"\n [attr.aria-hidden]=\"!showBubble()\">\n {{ bubbleDisplayValue() }}\n </div>\n </div>\n }\n\n <button\n type=\"button\"\n tabindex=\"0\"\n role=\"slider\"\n class=\"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-surface-primary shadow-sm outline-none\"\n [class]=\"thumbSizeClass()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\"\n [style.left.%]=\"visualPercent()\"\n [attr.aria-valuemin]=\"effectiveMin()\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"visualDisplayValue()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [disabled]=\"!isInteractive()\"\n (pointerdown)=\"onThumbPointerDown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"></button>\n </div>\n\n @if (showValueLabel()) {\n <span\n class=\"min-w-[2.5rem] shrink-0 text-right text-body2 tabular-nums\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-body]=\"!disabled()\">\n {{ visualDisplayValue() }}\n </span>\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"] }] });
|
|
13925
14112
|
}
|
|
13926
14113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalSlider, decorators: [{
|
|
13927
14114
|
type: Component,
|
|
13928
14115
|
args: [{ selector: 'lib-signal-slider', imports: [BaseSignalInput], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"true\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"sliderId()\">\n\n <div input class=\"flex w-full items-center gap-3\">\n <div\n #trackRef\n class=\"relative flex-1 touch-none select-none overflow-visible\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-not-allowed]=\"!isInteractive()\"\n [class.opacity-70]=\"disabled()\"\n (pointerdown)=\"onTrackPointerDown($event)\">\n <div\n class=\"relative w-full rounded-full bg-page-secondary\"\n [class]=\"trackHeightClass()\">\n <div\n class=\"absolute inset-y-0 left-0 rounded-full bg-surface-primary\"\n [class.transition-[width]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [style.width.%]=\"visualPercent()\"></div>\n </div>\n\n @if (showValueBubble()) {\n <div\n class=\"absolute z-30 -translate-x-1/2 pointer-events-none\"\n [class]=\"bubbleOffsetClass()\"\n [class.transition-none]=\"isDragging()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [style.left.%]=\"visualPercent()\">\n <div\n class=\"relative flex items-center justify-center rounded-full bg-surface-primary px-2.5 py-1 text-caption tabular-nums text-role-on-color-body shadow-md transition-[opacity,transform] duration-200 ease-out\"\n [class.opacity-0]=\"!showBubble()\"\n [class.opacity-100]=\"showBubble()\"\n [class.scale-90]=\"!showBubble()\"\n [class.scale-100]=\"showBubble()\"\n [class.translate-y-0.5]=\"!showBubble()\"\n [class.translate-y-0]=\"showBubble()\"\n [attr.aria-hidden]=\"!showBubble()\">\n {{ bubbleDisplayValue() }}\n </div>\n </div>\n }\n\n <button\n type=\"button\"\n tabindex=\"0\"\n role=\"slider\"\n class=\"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-surface-primary shadow-sm outline-none\"\n [class]=\"thumbSizeClass()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [class.ring-4]=\"isFocused()\"\n [class.ring-primary-subtle]=\"isFocused() && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && showError()\"\n [style.left.%]=\"visualPercent()\"\n [attr.aria-valuemin]=\"effectiveMin()\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"visualDisplayValue()\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-required]=\"showRequiredIndicator() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [disabled]=\"!isInteractive()\"\n (pointerdown)=\"onThumbPointerDown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"></button>\n </div>\n\n @if (showValueLabel()) {\n <span\n class=\"min-w-[2.5rem] shrink-0 text-right text-body2 tabular-nums\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-body]=\"!disabled()\">\n {{ visualDisplayValue() }}\n </span>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
13929
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], sliderMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMin", required: false }] }], sliderMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMax", required: false }] }], sliderStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderStep", required: false }] }],
|
|
14116
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], sliderMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMin", required: false }] }], sliderMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMax", required: false }] }], sliderStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderStep", required: false }] }], showValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValueLabel", required: false }] }], showValueBubble: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValueBubble", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], trackRef: [{
|
|
13930
14117
|
type: ViewChild,
|
|
13931
14118
|
args: ['trackRef']
|
|
13932
14119
|
}] } });
|
|
@@ -13948,8 +14135,6 @@ class SignalRangeSlider extends BaseFormControl {
|
|
|
13948
14135
|
...(ngDevMode ? [{ debugName: "sliderMax" }] : /* istanbul ignore next */ []));
|
|
13949
14136
|
sliderStep = input(1, /* @ts-ignore */
|
|
13950
14137
|
...(ngDevMode ? [{ debugName: "sliderStep" }] : /* istanbul ignore next */ []));
|
|
13951
|
-
readonly = input(false, /* @ts-ignore */
|
|
13952
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
13953
14138
|
showValueLabel = input(false, /* @ts-ignore */
|
|
13954
14139
|
...(ngDevMode ? [{ debugName: "showValueLabel" }] : /* istanbul ignore next */ []));
|
|
13955
14140
|
showValueBubble = input(true, /* @ts-ignore */
|
|
@@ -14200,12 +14385,12 @@ class SignalRangeSlider extends BaseFormControl {
|
|
|
14200
14385
|
this.valueChange.emit(next);
|
|
14201
14386
|
}
|
|
14202
14387
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalRangeSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
14203
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalRangeSlider, isStandalone: true, selector: "lib-signal-range-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, sliderMin: { classPropertyName: "sliderMin", publicName: "sliderMin", isSignal: true, isRequired: false, transformFunction: null }, sliderMax: { classPropertyName: "sliderMax", publicName: "sliderMax", isSignal: true, isRequired: false, transformFunction: null }, sliderStep: { classPropertyName: "sliderStep", publicName: "sliderStep", isSignal: true, isRequired: false, transformFunction: null },
|
|
14388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SignalRangeSlider, isStandalone: true, selector: "lib-signal-range-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, sliderMin: { classPropertyName: "sliderMin", publicName: "sliderMin", isSignal: true, isRequired: false, transformFunction: null }, sliderMax: { classPropertyName: "sliderMax", publicName: "sliderMax", isSignal: true, isRequired: false, transformFunction: null }, sliderStep: { classPropertyName: "sliderStep", publicName: "sliderStep", isSignal: true, isRequired: false, transformFunction: null }, showValueLabel: { classPropertyName: "showValueLabel", publicName: "showValueLabel", isSignal: true, isRequired: false, transformFunction: null }, showValueBubble: { classPropertyName: "showValueBubble", publicName: "showValueBubble", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "trackRef", first: true, predicate: ["trackRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"true\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"sliderId()\">\n\n <div input class=\"flex w-full items-center gap-3\">\n <div\n #trackRef\n role=\"group\"\n class=\"relative flex-1 touch-none select-none overflow-visible\"\n [attr.aria-label]=\"label() || 'Range slider'\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-not-allowed]=\"!isInteractive()\"\n [class.opacity-70]=\"disabled()\"\n (pointerdown)=\"onTrackPointerDown($event)\">\n <div\n class=\"relative w-full rounded-full bg-page-secondary\"\n [class]=\"trackHeightClass()\">\n <div\n class=\"absolute inset-y-0 rounded-full bg-surface-primary\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.transition-[width]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [style.left.%]=\"visualStartPercent()\"\n [style.width.%]=\"visualActiveWidthPercent()\"></div>\n </div>\n\n @if (showValueBubble()) {\n <div\n class=\"absolute z-30 -translate-x-1/2 pointer-events-none\"\n [class]=\"bubbleOffsetClass()\"\n [class.transition-none]=\"isDragging()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [style.left.%]=\"bubblePercent()\">\n <div\n class=\"relative flex items-center justify-center rounded-full bg-surface-primary px-2.5 py-1 text-caption tabular-nums text-role-on-color-body shadow-md transition-[opacity,transform] duration-200 ease-out\"\n [class.opacity-0]=\"!showBubble()\"\n [class.opacity-100]=\"showBubble()\"\n [class.scale-90]=\"!showBubble()\"\n [class.scale-100]=\"showBubble()\"\n [class.translate-y-0.5]=\"!showBubble()\"\n [class.translate-y-0]=\"showBubble()\"\n [attr.aria-hidden]=\"!showBubble()\">\n {{ bubbleDisplayValue() }}\n </div>\n </div>\n }\n\n <button\n type=\"button\"\n tabindex=\"0\"\n role=\"slider\"\n aria-hidden=\"false\"\n class=\"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-surface-primary shadow-sm outline-none\"\n [class]=\"thumbSizeClass()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [class.ring-4]=\"isFocused() && focusedThumb() === 'start'\"\n [class.ring-primary-subtle]=\"isFocused() && focusedThumb() === 'start' && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && focusedThumb() === 'start' && showError()\"\n [class.z-20]=\"activeThumb() === 'start'\"\n [style.left.%]=\"visualStartPercent()\"\n [attr.aria-valuemin]=\"effectiveMin()\"\n [attr.aria-valuemax]=\"visualDisplayRange().end\"\n [attr.aria-valuenow]=\"visualDisplayRange().start\"\n [attr.aria-valuetext]=\"'Start ' + visualDisplayRange().start\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [disabled]=\"!isInteractive()\"\n (pointerdown)=\"onThumbPointerDown($event, 'start')\"\n (focus)=\"onThumbFocus('start')\"\n (blur)=\"onThumbBlur($event)\"\n (keydown)=\"onThumbKeyDown($event, 'start')\"></button>\n\n <button\n type=\"button\"\n tabindex=\"0\"\n role=\"slider\"\n aria-hidden=\"false\"\n class=\"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-surface-primary shadow-sm outline-none\"\n [class]=\"thumbSizeClass()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [class.ring-4]=\"isFocused() && focusedThumb() === 'end'\"\n [class.ring-primary-subtle]=\"isFocused() && focusedThumb() === 'end' && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && focusedThumb() === 'end' && showError()\"\n [class.z-20]=\"activeThumb() === 'end'\"\n [style.left.%]=\"visualEndPercent()\"\n [attr.aria-valuemin]=\"visualDisplayRange().start\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"visualDisplayRange().end\"\n [attr.aria-valuetext]=\"'End ' + visualDisplayRange().end\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [disabled]=\"!isInteractive()\"\n (pointerdown)=\"onThumbPointerDown($event, 'end')\"\n (focus)=\"onThumbFocus('end')\"\n (blur)=\"onThumbBlur($event)\"\n (keydown)=\"onThumbKeyDown($event, 'end')\"></button>\n </div>\n\n @if (showValueLabel()) {\n <span\n class=\"min-w-[4.5rem] shrink-0 text-right text-body2 tabular-nums\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-body]=\"!disabled()\">\n {{ visualDisplayRange().start }}\u2013{{ visualDisplayRange().end }}\n </span>\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"] }] });
|
|
14204
14389
|
}
|
|
14205
14390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalRangeSlider, decorators: [{
|
|
14206
14391
|
type: Component,
|
|
14207
14392
|
args: [{ selector: 'lib-signal-range-slider', imports: [BaseSignalInput], template: "<lib-base-signal-input\n [label]=\"label()\"\n [showExternalLabel]=\"true\"\n [showRequired]=\"showRequiredIndicator()\"\n [showError]=\"showError()\"\n [errorMessage]=\"errorMessage()\"\n [disabled]=\"disabled()\"\n [hint]=\"hint()\"\n [inputId]=\"sliderId()\">\n\n <div input class=\"flex w-full items-center gap-3\">\n <div\n #trackRef\n role=\"group\"\n class=\"relative flex-1 touch-none select-none overflow-visible\"\n [attr.aria-label]=\"label() || 'Range slider'\"\n [attr.aria-valuetext]=\"ariaValueText()\"\n [class.cursor-pointer]=\"isInteractive()\"\n [class.cursor-not-allowed]=\"!isInteractive()\"\n [class.opacity-70]=\"disabled()\"\n (pointerdown)=\"onTrackPointerDown($event)\">\n <div\n class=\"relative w-full rounded-full bg-page-secondary\"\n [class]=\"trackHeightClass()\">\n <div\n class=\"absolute inset-y-0 rounded-full bg-surface-primary\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.transition-[width]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [style.left.%]=\"visualStartPercent()\"\n [style.width.%]=\"visualActiveWidthPercent()\"></div>\n </div>\n\n @if (showValueBubble()) {\n <div\n class=\"absolute z-30 -translate-x-1/2 pointer-events-none\"\n [class]=\"bubbleOffsetClass()\"\n [class.transition-none]=\"isDragging()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [style.left.%]=\"bubblePercent()\">\n <div\n class=\"relative flex items-center justify-center rounded-full bg-surface-primary px-2.5 py-1 text-caption tabular-nums text-role-on-color-body shadow-md transition-[opacity,transform] duration-200 ease-out\"\n [class.opacity-0]=\"!showBubble()\"\n [class.opacity-100]=\"showBubble()\"\n [class.scale-90]=\"!showBubble()\"\n [class.scale-100]=\"showBubble()\"\n [class.translate-y-0.5]=\"!showBubble()\"\n [class.translate-y-0]=\"showBubble()\"\n [attr.aria-hidden]=\"!showBubble()\">\n {{ bubbleDisplayValue() }}\n </div>\n </div>\n }\n\n <button\n type=\"button\"\n tabindex=\"0\"\n role=\"slider\"\n aria-hidden=\"false\"\n class=\"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-surface-primary shadow-sm outline-none\"\n [class]=\"thumbSizeClass()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [class.ring-4]=\"isFocused() && focusedThumb() === 'start'\"\n [class.ring-primary-subtle]=\"isFocused() && focusedThumb() === 'start' && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && focusedThumb() === 'start' && showError()\"\n [class.z-20]=\"activeThumb() === 'start'\"\n [style.left.%]=\"visualStartPercent()\"\n [attr.aria-valuemin]=\"effectiveMin()\"\n [attr.aria-valuemax]=\"visualDisplayRange().end\"\n [attr.aria-valuenow]=\"visualDisplayRange().start\"\n [attr.aria-valuetext]=\"'Start ' + visualDisplayRange().start\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [disabled]=\"!isInteractive()\"\n (pointerdown)=\"onThumbPointerDown($event, 'start')\"\n (focus)=\"onThumbFocus('start')\"\n (blur)=\"onThumbBlur($event)\"\n (keydown)=\"onThumbKeyDown($event, 'start')\"></button>\n\n <button\n type=\"button\"\n tabindex=\"0\"\n role=\"slider\"\n aria-hidden=\"false\"\n class=\"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-surface-primary shadow-sm outline-none\"\n [class]=\"thumbSizeClass()\"\n [class.transition-[left]]=\"!isDragging()\"\n [class.duration-75]=\"!isDragging()\"\n [class.transition-none]=\"isDragging()\"\n [class.ring-4]=\"isFocused() && focusedThumb() === 'end'\"\n [class.ring-primary-subtle]=\"isFocused() && focusedThumb() === 'end' && !showError()\"\n [class.ring-error-subtle]=\"isFocused() && focusedThumb() === 'end' && showError()\"\n [class.z-20]=\"activeThumb() === 'end'\"\n [style.left.%]=\"visualEndPercent()\"\n [attr.aria-valuemin]=\"visualDisplayRange().start\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"visualDisplayRange().end\"\n [attr.aria-valuetext]=\"'End ' + visualDisplayRange().end\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [disabled]=\"!isInteractive()\"\n (pointerdown)=\"onThumbPointerDown($event, 'end')\"\n (focus)=\"onThumbFocus('end')\"\n (blur)=\"onThumbBlur($event)\"\n (keydown)=\"onThumbKeyDown($event, 'end')\"></button>\n </div>\n\n @if (showValueLabel()) {\n <span\n class=\"min-w-[4.5rem] shrink-0 text-right text-body2 tabular-nums\"\n [class.text-role-disabled]=\"disabled()\"\n [class.text-role-body]=\"!disabled()\">\n {{ visualDisplayRange().start }}\u2013{{ visualDisplayRange().end }}\n </span>\n }\n </div>\n\n</lib-base-signal-input>\n" }]
|
|
14208
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], sliderMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMin", required: false }] }], sliderMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMax", required: false }] }], sliderStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderStep", required: false }] }],
|
|
14393
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], sliderMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMin", required: false }] }], sliderMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderMax", required: false }] }], sliderStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "sliderStep", required: false }] }], showValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValueLabel", required: false }] }], showValueBubble: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValueBubble", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], trackRef: [{
|
|
14209
14394
|
type: ViewChild,
|
|
14210
14395
|
args: ['trackRef']
|
|
14211
14396
|
}] } });
|
|
@@ -14526,7 +14711,7 @@ function getSignalButtonSpinnerBorderClass(appearance, disabled) {
|
|
|
14526
14711
|
if (disabled) {
|
|
14527
14712
|
return 'border-disabled';
|
|
14528
14713
|
}
|
|
14529
|
-
return appearance === 'primary' ? 'border-
|
|
14714
|
+
return appearance === 'primary' ? 'border-primary-on-color' : 'border-primary';
|
|
14530
14715
|
}
|
|
14531
14716
|
|
|
14532
14717
|
class SignalButton {
|
|
@@ -14818,6 +15003,7 @@ function provideNglConfig(config) {
|
|
|
14818
15003
|
...config,
|
|
14819
15004
|
input: { ...DEFAULT_NGL_INPUT_CONFIG, ...config.input },
|
|
14820
15005
|
button: { ...DEFAULT_NGL_BUTTON_CONFIG, ...config.button },
|
|
15006
|
+
listResponse: { ...DEFAULT_NGL_LIST_RESPONSE, ...config.listResponse },
|
|
14821
15007
|
};
|
|
14822
15008
|
const providers = [
|
|
14823
15009
|
provideEnvironmentNgxMask(),
|
|
@@ -14910,5 +15096,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
14910
15096
|
* Generated bundle index. Do not edit.
|
|
14911
15097
|
*/
|
|
14912
15098
|
|
|
14913
|
-
export { AlertDialogComponent, AppErrorComponent, AppSvgIconComponent, BaseApiService, BaseControlValueAccessor, BaseControlValueAccessorV2, BaseControlValueAccessorV3, BaseInputComponent, BaseOverlayComponent, BaseSignalInput, 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, SignalError, 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, getSignalFieldErrorMessage, getSignalValidationErrorMessage, isDynamicType, isValid, jsonEqual, jwtDecode, mmddyyyyDateValidatorAsync, onlyFutureDateValidator, onlyPastDateValidator, openLink, phoneNumbers, phoneNumbersAll, printInvalidFields, provideNglConfig, resolveTemplateWithObject, toSentenceCase, validateSignalForm };
|
|
15099
|
+
export { AlertDialogComponent, AppErrorComponent, AppSvgIconComponent, BaseApiService, BaseControlValueAccessor, BaseControlValueAccessorV2, BaseControlValueAccessorV3, BaseInputComponent, BaseOverlayComponent, BaseSignalInput, BaseTableComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ClickOutsideDirective, CloseButtonComponent, ColorConverterService, ColorFormats, ColorPickerComponent, ColorPickerDirective, ContextMenuButtonComponent, ContextMenuIconComponent, DEFAULT_NGL_BUTTON_CONFIG, DEFAULT_NGL_INPUT_CONFIG, DEFAULT_NGL_LIST_RESPONSE, 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, SignalError, 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, getSignalFieldErrorMessage, getSignalValidationErrorMessage, isDynamicType, isValid, jsonEqual, jwtDecode, mmddyyyyDateValidatorAsync, onlyFutureDateValidator, onlyPastDateValidator, openLink, phoneNumbers, phoneNumbersAll, printInvalidFields, provideNglConfig, resolveTemplateWithObject, toSentenceCase, validateSignalForm };
|
|
14914
15100
|
//# sourceMappingURL=vallift-ngl.mjs.map
|