@flusys/ng-ui 6.0.0-rc.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/fesm2022/flusys-ng-ui.mjs +1743 -382
- package/fesm2022/flusys-ng-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/flusys-ng-ui.d.ts +63 -5
|
@@ -326,7 +326,7 @@ class ButtonComponent {
|
|
|
326
326
|
}), /* @ts-ignore */
|
|
327
327
|
...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
328
328
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
329
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ButtonComponent, isStandalone: true, selector: "f-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: true, isRequired: false, transformFunction: null }, badgeClass: { classPropertyName: "badgeClass", publicName: "badgeClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, host: { classAttribute: "relative
|
|
329
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ButtonComponent, isStandalone: true, selector: "f-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: true, isRequired: false, transformFunction: null }, badgeClass: { classPropertyName: "badgeClass", publicName: "badgeClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, host: { classAttribute: "relative" }, queries: [{ propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
330
330
|
<button
|
|
331
331
|
[type]="type()"
|
|
332
332
|
[disabled]="isDisabled()"
|
|
@@ -345,9 +345,15 @@ class ButtonComponent {
|
|
|
345
345
|
@if (loading()) {
|
|
346
346
|
@if (iconPos() === 'left' || iconPos() === 'top') {
|
|
347
347
|
@if (loadingIconTemplate()) {
|
|
348
|
-
<ng-container
|
|
348
|
+
<ng-container
|
|
349
|
+
[ngTemplateOutlet]="loadingIconTemplate()"
|
|
350
|
+
></ng-container>
|
|
349
351
|
} @else {
|
|
350
|
-
<ui-icon
|
|
352
|
+
<ui-icon
|
|
353
|
+
[name]="loadingIcon() || 'loader-circle'"
|
|
354
|
+
[spin]="true"
|
|
355
|
+
class="shrink-0"
|
|
356
|
+
></ui-icon>
|
|
351
357
|
}
|
|
352
358
|
}
|
|
353
359
|
} @else if (icon() && (iconPos() === 'left' || iconPos() === 'top')) {
|
|
@@ -364,9 +370,15 @@ class ButtonComponent {
|
|
|
364
370
|
@if (loading()) {
|
|
365
371
|
@if (iconPos() === 'right' || iconPos() === 'bottom') {
|
|
366
372
|
@if (loadingIconTemplate()) {
|
|
367
|
-
<ng-container
|
|
373
|
+
<ng-container
|
|
374
|
+
[ngTemplateOutlet]="loadingIconTemplate()"
|
|
375
|
+
></ng-container>
|
|
368
376
|
} @else {
|
|
369
|
-
<ui-icon
|
|
377
|
+
<ui-icon
|
|
378
|
+
[name]="loadingIcon() || 'loader-circle'"
|
|
379
|
+
[spin]="true"
|
|
380
|
+
class="shrink-0"
|
|
381
|
+
></ui-icon>
|
|
370
382
|
}
|
|
371
383
|
}
|
|
372
384
|
} @else if (icon() && (iconPos() === 'right' || iconPos() === 'bottom')) {
|
|
@@ -412,9 +424,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
412
424
|
@if (loading()) {
|
|
413
425
|
@if (iconPos() === 'left' || iconPos() === 'top') {
|
|
414
426
|
@if (loadingIconTemplate()) {
|
|
415
|
-
<ng-container
|
|
427
|
+
<ng-container
|
|
428
|
+
[ngTemplateOutlet]="loadingIconTemplate()"
|
|
429
|
+
></ng-container>
|
|
416
430
|
} @else {
|
|
417
|
-
<ui-icon
|
|
431
|
+
<ui-icon
|
|
432
|
+
[name]="loadingIcon() || 'loader-circle'"
|
|
433
|
+
[spin]="true"
|
|
434
|
+
class="shrink-0"
|
|
435
|
+
></ui-icon>
|
|
418
436
|
}
|
|
419
437
|
}
|
|
420
438
|
} @else if (icon() && (iconPos() === 'left' || iconPos() === 'top')) {
|
|
@@ -431,9 +449,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
431
449
|
@if (loading()) {
|
|
432
450
|
@if (iconPos() === 'right' || iconPos() === 'bottom') {
|
|
433
451
|
@if (loadingIconTemplate()) {
|
|
434
|
-
<ng-container
|
|
452
|
+
<ng-container
|
|
453
|
+
[ngTemplateOutlet]="loadingIconTemplate()"
|
|
454
|
+
></ng-container>
|
|
435
455
|
} @else {
|
|
436
|
-
<ui-icon
|
|
456
|
+
<ui-icon
|
|
457
|
+
[name]="loadingIcon() || 'loader-circle'"
|
|
458
|
+
[spin]="true"
|
|
459
|
+
class="shrink-0"
|
|
460
|
+
></ui-icon>
|
|
437
461
|
}
|
|
438
462
|
}
|
|
439
463
|
} @else if (icon() && (iconPos() === 'right' || iconPos() === 'bottom')) {
|
|
@@ -455,7 +479,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
455
479
|
}
|
|
456
480
|
`,
|
|
457
481
|
host: {
|
|
458
|
-
class: 'relative
|
|
482
|
+
class: 'relative',
|
|
459
483
|
},
|
|
460
484
|
}]
|
|
461
485
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], plain: [{ type: i0.Input, args: [{ isSignal: true, alias: "plain", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], badgeSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeSeverity", required: false }] }], badgeClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeClass", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { isSignal: true }] }] } });
|
|
@@ -2274,6 +2298,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2274
2298
|
}]
|
|
2275
2299
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], binary: [{ type: i0.Input, args: [{ isSignal: true, alias: "binary", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], onChangeEvent: [{ type: i0.Output, args: ["onChange"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], touch: [{ type: i0.Output, args: ["touch"] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
2276
2300
|
|
|
2301
|
+
// `capture: true` is required because scroll events on inner scroll containers don't bubble to window.
|
|
2302
|
+
function repositionOnScroll(isActive, reposition) {
|
|
2303
|
+
effect(onCleanup => {
|
|
2304
|
+
if (!isActive() || typeof window === 'undefined')
|
|
2305
|
+
return;
|
|
2306
|
+
window.addEventListener('scroll', reposition, true);
|
|
2307
|
+
window.addEventListener('resize', reposition);
|
|
2308
|
+
onCleanup(() => {
|
|
2309
|
+
window.removeEventListener('scroll', reposition, true);
|
|
2310
|
+
window.removeEventListener('resize', reposition);
|
|
2311
|
+
});
|
|
2312
|
+
});
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2277
2315
|
class PopoverComponent {
|
|
2278
2316
|
dismissable = input(true, { ...(ngDevMode ? { debugName: "dismissable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2279
2317
|
appendTo = input('body', /* @ts-ignore */
|
|
@@ -2344,6 +2382,7 @@ class PopoverComponent {
|
|
|
2344
2382
|
.pipe(takeUntilDestroyed())
|
|
2345
2383
|
.subscribe(() => this._windowWidth.set(window.innerWidth));
|
|
2346
2384
|
}
|
|
2385
|
+
repositionOnScroll(() => this.visible() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
2347
2386
|
}
|
|
2348
2387
|
toggle(event) {
|
|
2349
2388
|
this._anchor = event.target;
|
|
@@ -2489,8 +2528,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2489
2528
|
`, styles: ["@keyframes popover-in{0%{opacity:0;transform:scale(.95) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.popover-panel{animation:popover-in .15s cubic-bezier(.16,1,.3,1);transform-origin:top}\n"] }]
|
|
2490
2529
|
}], ctorParameters: () => [], propDecorators: { dismissable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissable", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], showCloseIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseIcon", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], focusOnShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnShow", required: false }] }], returnFocusOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnFocusOnHide", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], breakpoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoints", required: false }] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
2491
2530
|
|
|
2492
|
-
const MONTH_NAMES = [
|
|
2493
|
-
|
|
2531
|
+
const MONTH_NAMES = [
|
|
2532
|
+
'January',
|
|
2533
|
+
'February',
|
|
2534
|
+
'March',
|
|
2535
|
+
'April',
|
|
2536
|
+
'May',
|
|
2537
|
+
'June',
|
|
2538
|
+
'July',
|
|
2539
|
+
'August',
|
|
2540
|
+
'September',
|
|
2541
|
+
'October',
|
|
2542
|
+
'November',
|
|
2543
|
+
'December',
|
|
2544
|
+
];
|
|
2545
|
+
const MONTH_SHORT_NAMES = [
|
|
2546
|
+
'Jan',
|
|
2547
|
+
'Feb',
|
|
2548
|
+
'Mar',
|
|
2549
|
+
'Apr',
|
|
2550
|
+
'May',
|
|
2551
|
+
'Jun',
|
|
2552
|
+
'Jul',
|
|
2553
|
+
'Aug',
|
|
2554
|
+
'Sep',
|
|
2555
|
+
'Oct',
|
|
2556
|
+
'Nov',
|
|
2557
|
+
'Dec',
|
|
2558
|
+
];
|
|
2494
2559
|
const DAY_NAMES = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
2495
2560
|
function stripTime(date) {
|
|
2496
2561
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
@@ -2498,7 +2563,9 @@ function stripTime(date) {
|
|
|
2498
2563
|
function isSameDay(a, b) {
|
|
2499
2564
|
if (!a || !b)
|
|
2500
2565
|
return false;
|
|
2501
|
-
return a.getFullYear() === b.getFullYear() &&
|
|
2566
|
+
return (a.getFullYear() === b.getFullYear() &&
|
|
2567
|
+
a.getMonth() === b.getMonth() &&
|
|
2568
|
+
a.getDate() === b.getDate());
|
|
2502
2569
|
}
|
|
2503
2570
|
function addDays(date, n) {
|
|
2504
2571
|
const d = new Date(date);
|
|
@@ -2547,7 +2614,14 @@ function formatTime(date, hourFormat, showSeconds) {
|
|
|
2547
2614
|
function parseDate(text, format) {
|
|
2548
2615
|
if (!text.trim())
|
|
2549
2616
|
return null;
|
|
2550
|
-
const patternMap = {
|
|
2617
|
+
const patternMap = {
|
|
2618
|
+
yyyy: '(\\d{4})',
|
|
2619
|
+
yy: '(\\d{2})',
|
|
2620
|
+
mm: '(\\d{2})',
|
|
2621
|
+
m: '(\\d{1,2})',
|
|
2622
|
+
dd: '(\\d{2})',
|
|
2623
|
+
d: '(\\d{1,2})',
|
|
2624
|
+
};
|
|
2551
2625
|
const tokens = format.match(/yyyy|yy|mm|m|dd|d|[^a-zA-Z]+/g) ?? [];
|
|
2552
2626
|
let regexStr = '';
|
|
2553
2627
|
const order = [];
|
|
@@ -2630,7 +2704,7 @@ class DatePickerComponent {
|
|
|
2630
2704
|
showOtherMonths = input(true, { ...(ngDevMode ? { debugName: "showOtherMonths" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2631
2705
|
selectOtherMonths = input(false, { ...(ngDevMode ? { debugName: "selectOtherMonths" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2632
2706
|
firstDayOfWeek = input(0, { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
2633
|
-
appendTo = input('
|
|
2707
|
+
appendTo = input('body', /* @ts-ignore */
|
|
2634
2708
|
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
2635
2709
|
styleClass = input('', /* @ts-ignore */
|
|
2636
2710
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
@@ -2659,7 +2733,7 @@ class DatePickerComponent {
|
|
|
2659
2733
|
viewYear = this._viewYear.asReadonly();
|
|
2660
2734
|
_gridMode = signal('date', /* @ts-ignore */
|
|
2661
2735
|
...(ngDevMode ? [{ debugName: "_gridMode" }] : /* istanbul ignore next */ []));
|
|
2662
|
-
gridMode = computed(() =>
|
|
2736
|
+
gridMode = computed(() => this.view() !== 'date' ? this.view() : this._gridMode(), /* @ts-ignore */
|
|
2663
2737
|
...(ngDevMode ? [{ debugName: "gridMode" }] : /* istanbul ignore next */ []));
|
|
2664
2738
|
_focusedDate = signal(null, /* @ts-ignore */
|
|
2665
2739
|
...(ngDevMode ? [{ debugName: "_focusedDate" }] : /* istanbul ignore next */ []));
|
|
@@ -2686,7 +2760,9 @@ class DatePickerComponent {
|
|
|
2686
2760
|
...(ngDevMode ? [{ debugName: "popoverRef" }] : /* istanbul ignore next */ []));
|
|
2687
2761
|
_inputRef = viewChild('inputEl', /* @ts-ignore */
|
|
2688
2762
|
...(ngDevMode ? [{ debugName: "_inputRef" }] : /* istanbul ignore next */ []));
|
|
2689
|
-
open = computed(() =>
|
|
2763
|
+
open = computed(() => this.appendTo() === 'body'
|
|
2764
|
+
? (this.popoverRef()?.visible() ?? false)
|
|
2765
|
+
: this._open(), /* @ts-ignore */
|
|
2690
2766
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
2691
2767
|
_el = inject(ElementRef);
|
|
2692
2768
|
_onChange = () => { };
|
|
@@ -2701,7 +2777,7 @@ class DatePickerComponent {
|
|
|
2701
2777
|
fTemplates = contentChildren(FTemplateDirective, /* @ts-ignore */
|
|
2702
2778
|
...(ngDevMode ? [{ debugName: "fTemplates" }] : /* istanbul ignore next */ []));
|
|
2703
2779
|
namedTemplate(name) {
|
|
2704
|
-
return this.fTemplates().find(t => t.fTemplate() === name)?.templateRef ?? null;
|
|
2780
|
+
return (this.fTemplates().find((t) => t.fTemplate() === name)?.templateRef ?? null);
|
|
2705
2781
|
}
|
|
2706
2782
|
headerTpl = computed(() => this.headerRef() ?? this.namedTemplate('header'), /* @ts-ignore */
|
|
2707
2783
|
...(ngDevMode ? [{ debugName: "headerTpl" }] : /* istanbul ignore next */ []));
|
|
@@ -2742,7 +2818,7 @@ class DatePickerComponent {
|
|
|
2742
2818
|
if (v == null)
|
|
2743
2819
|
return false;
|
|
2744
2820
|
if (Array.isArray(v))
|
|
2745
|
-
return v.some(d => d instanceof Date);
|
|
2821
|
+
return v.some((d) => d instanceof Date);
|
|
2746
2822
|
return true;
|
|
2747
2823
|
}, /* @ts-ignore */
|
|
2748
2824
|
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -2756,12 +2832,17 @@ class DatePickerComponent {
|
|
|
2756
2832
|
if (this.timeOnly())
|
|
2757
2833
|
return formatTime(d, this.hourFormat(), this.showSeconds());
|
|
2758
2834
|
const base = this.formatDate(d, fmt);
|
|
2759
|
-
return this.showTime()
|
|
2835
|
+
return this.showTime()
|
|
2836
|
+
? `${base} ${formatTime(d, this.hourFormat(), this.showSeconds())}`
|
|
2837
|
+
: base;
|
|
2760
2838
|
};
|
|
2761
2839
|
if (mode === 'single' && v instanceof Date)
|
|
2762
2840
|
return withTime(v);
|
|
2763
2841
|
if (mode === 'multiple' && Array.isArray(v))
|
|
2764
|
-
return v
|
|
2842
|
+
return v
|
|
2843
|
+
.filter((d) => d instanceof Date)
|
|
2844
|
+
.map(withTime)
|
|
2845
|
+
.join(', ');
|
|
2765
2846
|
if (mode === 'range' && Array.isArray(v)) {
|
|
2766
2847
|
const [start, end] = v;
|
|
2767
2848
|
if (!start)
|
|
@@ -2774,9 +2855,15 @@ class DatePickerComponent {
|
|
|
2774
2855
|
wrapperClass = computed(() => {
|
|
2775
2856
|
const showInvalid = this.invalid() && this.touched();
|
|
2776
2857
|
const stateClass = this.open()
|
|
2777
|
-
?
|
|
2778
|
-
|
|
2779
|
-
|
|
2858
|
+
? showInvalid
|
|
2859
|
+
? 'border-red-400'
|
|
2860
|
+
: 'border-primary'
|
|
2861
|
+
: showInvalid
|
|
2862
|
+
? 'border-red-400 hover:border-red-300'
|
|
2863
|
+
: 'border-(--f-form-field-border-color) hover:border-(--f-form-field-hover-border-color)';
|
|
2864
|
+
const disabledClass = this.disabled()
|
|
2865
|
+
? 'opacity-60 cursor-not-allowed'
|
|
2866
|
+
: '';
|
|
2780
2867
|
return `flex items-center border rounded-lg overflow-hidden bg-(--f-form-field-background) focus-within:ring-focus transition-all duration-[var(--f-transition-duration)] ${stateClass} ${disabledClass}`;
|
|
2781
2868
|
}, /* @ts-ignore */
|
|
2782
2869
|
...(ngDevMode ? [{ debugName: "wrapperClass" }] : /* istanbul ignore next */ []));
|
|
@@ -2787,17 +2874,23 @@ class DatePickerComponent {
|
|
|
2787
2874
|
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
2788
2875
|
prevAriaLabel = computed(() => {
|
|
2789
2876
|
switch (this.gridMode()) {
|
|
2790
|
-
case 'month':
|
|
2791
|
-
|
|
2792
|
-
|
|
2877
|
+
case 'month':
|
|
2878
|
+
return 'Previous year';
|
|
2879
|
+
case 'year':
|
|
2880
|
+
return 'Previous years';
|
|
2881
|
+
default:
|
|
2882
|
+
return 'Previous month';
|
|
2793
2883
|
}
|
|
2794
2884
|
}, /* @ts-ignore */
|
|
2795
2885
|
...(ngDevMode ? [{ debugName: "prevAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2796
2886
|
nextAriaLabel = computed(() => {
|
|
2797
2887
|
switch (this.gridMode()) {
|
|
2798
|
-
case 'month':
|
|
2799
|
-
|
|
2800
|
-
|
|
2888
|
+
case 'month':
|
|
2889
|
+
return 'Next year';
|
|
2890
|
+
case 'year':
|
|
2891
|
+
return 'Next years';
|
|
2892
|
+
default:
|
|
2893
|
+
return 'Next month';
|
|
2801
2894
|
}
|
|
2802
2895
|
}, /* @ts-ignore */
|
|
2803
2896
|
...(ngDevMode ? [{ debugName: "nextAriaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -2842,7 +2935,7 @@ class DatePickerComponent {
|
|
|
2842
2935
|
return new Date();
|
|
2843
2936
|
}
|
|
2844
2937
|
syncViewToDate(date) {
|
|
2845
|
-
const inView = this.calendarMonths().some(m => m.month === date.getMonth() && m.year === date.getFullYear());
|
|
2938
|
+
const inView = this.calendarMonths().some((m) => m.month === date.getMonth() && m.year === date.getFullYear());
|
|
2846
2939
|
if (!inView) {
|
|
2847
2940
|
this._viewMonth.set(date.getMonth());
|
|
2848
2941
|
this._viewYear.set(date.getFullYear());
|
|
@@ -2872,7 +2965,7 @@ class DatePickerComponent {
|
|
|
2872
2965
|
return true;
|
|
2873
2966
|
if (this.disabledDays().includes(date.getDay()))
|
|
2874
2967
|
return true;
|
|
2875
|
-
if (this.disabledDates().some(d => isSameDay(d, date)))
|
|
2968
|
+
if (this.disabledDates().some((d) => isSameDay(d, date)))
|
|
2876
2969
|
return true;
|
|
2877
2970
|
return false;
|
|
2878
2971
|
}
|
|
@@ -2913,7 +3006,7 @@ class DatePickerComponent {
|
|
|
2913
3006
|
selected = isSameDay(value, date);
|
|
2914
3007
|
}
|
|
2915
3008
|
else if (mode === 'multiple' && Array.isArray(value)) {
|
|
2916
|
-
selected = value.some(d => isSameDay(d, date));
|
|
3009
|
+
selected = value.some((d) => isSameDay(d, date));
|
|
2917
3010
|
}
|
|
2918
3011
|
else if (mode === 'range' && Array.isArray(value)) {
|
|
2919
3012
|
const [start, end] = value;
|
|
@@ -2941,7 +3034,11 @@ class DatePickerComponent {
|
|
|
2941
3034
|
return `${base} text-(--f-text-muted-color) opacity-60 rounded-md`;
|
|
2942
3035
|
}
|
|
2943
3036
|
if (this.selectionMode() === 'range' && (day.rangeStart || day.rangeEnd)) {
|
|
2944
|
-
const shape = day.rangeStart && day.rangeEnd
|
|
3037
|
+
const shape = day.rangeStart && day.rangeEnd
|
|
3038
|
+
? 'rounded-md'
|
|
3039
|
+
: day.rangeStart
|
|
3040
|
+
? 'rounded-l-md'
|
|
3041
|
+
: 'rounded-r-md';
|
|
2945
3042
|
return `${base} bg-primary text-primary-contrast ${shape}`;
|
|
2946
3043
|
}
|
|
2947
3044
|
if (day.inRange) {
|
|
@@ -2974,7 +3071,9 @@ class DatePickerComponent {
|
|
|
2974
3071
|
return pad2(n);
|
|
2975
3072
|
}
|
|
2976
3073
|
onDocumentClick(e) {
|
|
2977
|
-
if (this.appendTo() === 'self' &&
|
|
3074
|
+
if (this.appendTo() === 'self' &&
|
|
3075
|
+
this.open() &&
|
|
3076
|
+
!this._el.nativeElement.contains(e.target)) {
|
|
2978
3077
|
this._open.set(false);
|
|
2979
3078
|
}
|
|
2980
3079
|
}
|
|
@@ -3016,7 +3115,7 @@ class DatePickerComponent {
|
|
|
3016
3115
|
if (this.appendTo() === 'body')
|
|
3017
3116
|
this.popoverRef()?.toggle(event);
|
|
3018
3117
|
else
|
|
3019
|
-
this._open.update(v => !v);
|
|
3118
|
+
this._open.update((v) => !v);
|
|
3020
3119
|
}
|
|
3021
3120
|
closePanel() {
|
|
3022
3121
|
if (this.appendTo() === 'body')
|
|
@@ -3063,8 +3162,10 @@ class DatePickerComponent {
|
|
|
3063
3162
|
return;
|
|
3064
3163
|
}
|
|
3065
3164
|
if (mode === 'multiple') {
|
|
3066
|
-
const arr = Array.isArray(this.value())
|
|
3067
|
-
|
|
3165
|
+
const arr = Array.isArray(this.value())
|
|
3166
|
+
? [...this.value()]
|
|
3167
|
+
: [];
|
|
3168
|
+
const idx = arr.findIndex((d) => isSameDay(d, finalDate));
|
|
3068
3169
|
if (idx >= 0)
|
|
3069
3170
|
arr.splice(idx, 1);
|
|
3070
3171
|
else
|
|
@@ -3074,7 +3175,9 @@ class DatePickerComponent {
|
|
|
3074
3175
|
this.onSelect.emit(finalDate);
|
|
3075
3176
|
return;
|
|
3076
3177
|
}
|
|
3077
|
-
const cur = Array.isArray(this.value())
|
|
3178
|
+
const cur = Array.isArray(this.value())
|
|
3179
|
+
? this.value()
|
|
3180
|
+
: [];
|
|
3078
3181
|
const [start, end] = cur;
|
|
3079
3182
|
let next;
|
|
3080
3183
|
if (!start || (start && end)) {
|
|
@@ -3145,11 +3248,11 @@ class DatePickerComponent {
|
|
|
3145
3248
|
this.prevMonth();
|
|
3146
3249
|
break;
|
|
3147
3250
|
case 'month':
|
|
3148
|
-
this._viewYear.update(y => y - 1);
|
|
3251
|
+
this._viewYear.update((y) => y - 1);
|
|
3149
3252
|
this.emitNavChange();
|
|
3150
3253
|
break;
|
|
3151
3254
|
case 'year':
|
|
3152
|
-
this._viewYear.update(y => y - 12);
|
|
3255
|
+
this._viewYear.update((y) => y - 12);
|
|
3153
3256
|
this.emitNavChange();
|
|
3154
3257
|
break;
|
|
3155
3258
|
}
|
|
@@ -3160,11 +3263,11 @@ class DatePickerComponent {
|
|
|
3160
3263
|
this.nextMonth();
|
|
3161
3264
|
break;
|
|
3162
3265
|
case 'month':
|
|
3163
|
-
this._viewYear.update(y => y + 1);
|
|
3266
|
+
this._viewYear.update((y) => y + 1);
|
|
3164
3267
|
this.emitNavChange();
|
|
3165
3268
|
break;
|
|
3166
3269
|
case 'year':
|
|
3167
|
-
this._viewYear.update(y => y + 12);
|
|
3270
|
+
this._viewYear.update((y) => y + 12);
|
|
3168
3271
|
this.emitNavChange();
|
|
3169
3272
|
break;
|
|
3170
3273
|
}
|
|
@@ -3172,19 +3275,19 @@ class DatePickerComponent {
|
|
|
3172
3275
|
prevMonth() {
|
|
3173
3276
|
if (this.viewMonth() === 0) {
|
|
3174
3277
|
this._viewMonth.set(11);
|
|
3175
|
-
this._viewYear.update(y => y - 1);
|
|
3278
|
+
this._viewYear.update((y) => y - 1);
|
|
3176
3279
|
}
|
|
3177
3280
|
else
|
|
3178
|
-
this._viewMonth.update(m => m - 1);
|
|
3281
|
+
this._viewMonth.update((m) => m - 1);
|
|
3179
3282
|
this.emitNavChange();
|
|
3180
3283
|
}
|
|
3181
3284
|
nextMonth() {
|
|
3182
3285
|
if (this.viewMonth() === 11) {
|
|
3183
3286
|
this._viewMonth.set(0);
|
|
3184
|
-
this._viewYear.update(y => y + 1);
|
|
3287
|
+
this._viewYear.update((y) => y + 1);
|
|
3185
3288
|
}
|
|
3186
3289
|
else
|
|
3187
|
-
this._viewMonth.update(m => m + 1);
|
|
3290
|
+
this._viewMonth.update((m) => m + 1);
|
|
3188
3291
|
this.emitNavChange();
|
|
3189
3292
|
}
|
|
3190
3293
|
onGridKeyDown(event) {
|
|
@@ -3240,19 +3343,52 @@ class DatePickerComponent {
|
|
|
3240
3343
|
this.commitValue(combineDateTime(v, this._timeHour(), this._timeMinute(), this._timeSecond()));
|
|
3241
3344
|
}
|
|
3242
3345
|
}
|
|
3243
|
-
incrementHour() {
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3346
|
+
incrementHour() {
|
|
3347
|
+
this._timeHour.update((h) => (h + 1) % 24);
|
|
3348
|
+
this.commitTimeChange();
|
|
3349
|
+
}
|
|
3350
|
+
decrementHour() {
|
|
3351
|
+
this._timeHour.update((h) => (h + 23) % 24);
|
|
3352
|
+
this.commitTimeChange();
|
|
3353
|
+
}
|
|
3354
|
+
incrementMinute() {
|
|
3355
|
+
this._timeMinute.update((m) => (m + 1) % 60);
|
|
3356
|
+
this.commitTimeChange();
|
|
3357
|
+
}
|
|
3358
|
+
decrementMinute() {
|
|
3359
|
+
this._timeMinute.update((m) => (m + 59) % 60);
|
|
3360
|
+
this.commitTimeChange();
|
|
3361
|
+
}
|
|
3362
|
+
incrementSecond() {
|
|
3363
|
+
this._timeSecond.update((s) => (s + 1) % 60);
|
|
3364
|
+
this.commitTimeChange();
|
|
3365
|
+
}
|
|
3366
|
+
decrementSecond() {
|
|
3367
|
+
this._timeSecond.update((s) => (s + 59) % 60);
|
|
3368
|
+
this.commitTimeChange();
|
|
3369
|
+
}
|
|
3370
|
+
togglePeriod() {
|
|
3371
|
+
this._timeHour.update((h) => (h + 12) % 24);
|
|
3372
|
+
this.commitTimeChange();
|
|
3373
|
+
}
|
|
3374
|
+
writeValue(v) {
|
|
3375
|
+
this._value.set(v ?? null);
|
|
3376
|
+
}
|
|
3377
|
+
registerOnChange(fn) {
|
|
3378
|
+
this._onChange = fn;
|
|
3379
|
+
}
|
|
3380
|
+
registerOnTouched(fn) {
|
|
3381
|
+
this._onTouched = fn;
|
|
3382
|
+
}
|
|
3253
3383
|
setDisabledState() { }
|
|
3254
3384
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3255
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DatePickerComponent, isStandalone: true, selector: "f-datepicker", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", 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 }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", 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 }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconDisplay: { classPropertyName: "iconDisplay", publicName: "iconDisplay", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, showOtherMonths: { classPropertyName: "showOtherMonths", publicName: "showOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, selectOtherMonths: { classPropertyName: "selectOtherMonths", publicName: "selectOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", onSelect: "onSelect", onShow: "onShow", onHide: "onHide", onClearClick: "onClearClick", onTodayClick: "onTodayClick", onMonthChange: "onMonthChange", onYearChange: "onYearChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
3385
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DatePickerComponent, isStandalone: true, selector: "f-datepicker", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", 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 }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", 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 }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconDisplay: { classPropertyName: "iconDisplay", publicName: "iconDisplay", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, showOtherMonths: { classPropertyName: "showOtherMonths", publicName: "showOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, selectOtherMonths: { classPropertyName: "selectOtherMonths", publicName: "selectOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", onSelect: "onSelect", onShow: "onShow", onHide: "onHide", onClearClick: "onClearClick", onTodayClick: "onTodayClick", onMonthChange: "onMonthChange", onYearChange: "onYearChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
3386
|
+
{
|
|
3387
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3388
|
+
useExisting: forwardRef(() => DatePickerComponent),
|
|
3389
|
+
multi: true,
|
|
3390
|
+
},
|
|
3391
|
+
], queries: [{ propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "dateRef", first: true, predicate: ["date"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "popoverRef", first: true, predicate: ["pop"], descendants: true, isSignal: true }, { propertyName: "_inputRef", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3256
3392
|
@if (inline()) {
|
|
3257
3393
|
<div [class]="inlinePanelClass()">
|
|
3258
3394
|
<ng-container [ngTemplateOutlet]="panelContent" />
|
|
@@ -3261,7 +3397,9 @@ class DatePickerComponent {
|
|
|
3261
3397
|
<div class="relative">
|
|
3262
3398
|
<div [class]="wrapperClass()">
|
|
3263
3399
|
@if (iconDisplay() === 'input' && showIcon()) {
|
|
3264
|
-
<span
|
|
3400
|
+
<span
|
|
3401
|
+
class="inline-flex items-center justify-center pl-2 text-(--f-form-field-placeholder-color)"
|
|
3402
|
+
>
|
|
3265
3403
|
<ui-icon name="calendar" class="text-sm"></ui-icon>
|
|
3266
3404
|
</span>
|
|
3267
3405
|
}
|
|
@@ -3281,12 +3419,22 @@ class DatePickerComponent {
|
|
|
3281
3419
|
(change)="onInputChange($any($event.target).value)"
|
|
3282
3420
|
/>
|
|
3283
3421
|
@if (showClear() && hasValue() && !disabled() && !readonly()) {
|
|
3284
|
-
<button
|
|
3422
|
+
<button
|
|
3423
|
+
type="button"
|
|
3424
|
+
class="inline-flex items-center justify-center px-1 text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) cursor-pointer"
|
|
3425
|
+
(click)="clear($event)"
|
|
3426
|
+
aria-label="Clear"
|
|
3427
|
+
>
|
|
3285
3428
|
<ui-icon name="times" class="text-xs"></ui-icon>
|
|
3286
3429
|
</button>
|
|
3287
3430
|
}
|
|
3288
3431
|
@if (showIcon() && iconDisplay() === 'button') {
|
|
3289
|
-
<button
|
|
3432
|
+
<button
|
|
3433
|
+
type="button"
|
|
3434
|
+
class="inline-flex items-center justify-center px-2 text-(--f-form-field-placeholder-color) border-l border-(--f-content-border-color) cursor-pointer"
|
|
3435
|
+
(click)="toggleCalendar($event)"
|
|
3436
|
+
aria-label="Choose date"
|
|
3437
|
+
>
|
|
3290
3438
|
<ui-icon name="calendar" class="text-sm"></ui-icon>
|
|
3291
3439
|
</button>
|
|
3292
3440
|
}
|
|
@@ -3299,7 +3447,10 @@ class DatePickerComponent {
|
|
|
3299
3447
|
</div>
|
|
3300
3448
|
</f-popover>
|
|
3301
3449
|
} @else if (open()) {
|
|
3302
|
-
<div
|
|
3450
|
+
<div
|
|
3451
|
+
class="absolute z-50 mt-1 bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-[0_8px_30px_rgb(0,0,0,0.1)] p-3 min-w-64"
|
|
3452
|
+
(keydown.escape)="closeAndFocusInput()"
|
|
3453
|
+
>
|
|
3303
3454
|
<ng-container [ngTemplateOutlet]="panelContent" />
|
|
3304
3455
|
</div>
|
|
3305
3456
|
}
|
|
@@ -3309,25 +3460,56 @@ class DatePickerComponent {
|
|
|
3309
3460
|
<ng-template #panelContent>
|
|
3310
3461
|
@if (gridMode() === 'date') {
|
|
3311
3462
|
<div class="flex gap-4">
|
|
3312
|
-
@for (
|
|
3313
|
-
|
|
3463
|
+
@for (
|
|
3464
|
+
mv of calendarMonths();
|
|
3465
|
+
track mv.month + '-' + mv.year;
|
|
3466
|
+
let i = $index
|
|
3467
|
+
) {
|
|
3468
|
+
<div class="w-full">
|
|
3314
3469
|
<div class="flex items-center justify-between mb-3">
|
|
3315
3470
|
@if (headerTpl()) {
|
|
3316
|
-
<ng-container
|
|
3471
|
+
<ng-container
|
|
3472
|
+
[ngTemplateOutlet]="headerTpl()"
|
|
3473
|
+
[ngTemplateOutletContext]="{ $implicit: mv }"
|
|
3474
|
+
/>
|
|
3317
3475
|
} @else {
|
|
3318
3476
|
@if (i === 0) {
|
|
3319
|
-
<button
|
|
3477
|
+
<button
|
|
3478
|
+
type="button"
|
|
3479
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3480
|
+
[attr.aria-label]="prevAriaLabel()"
|
|
3481
|
+
(click)="onPrevClick()"
|
|
3482
|
+
>
|
|
3320
3483
|
<ui-icon name="chevron-left" class="text-xs"></ui-icon>
|
|
3321
3484
|
</button>
|
|
3322
3485
|
} @else {
|
|
3323
3486
|
<span class="w-6"></span>
|
|
3324
3487
|
}
|
|
3325
3488
|
<span class="flex items-center gap-1">
|
|
3326
|
-
<button
|
|
3327
|
-
|
|
3489
|
+
<button
|
|
3490
|
+
type="button"
|
|
3491
|
+
class="text-sm font-semibold px-1 py-0.5 rounded-md hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3492
|
+
[disabled]="view() !== 'date'"
|
|
3493
|
+
(click)="onHeaderMonthClick()"
|
|
3494
|
+
>
|
|
3495
|
+
{{ MONTHS[mv.month] }}
|
|
3496
|
+
</button>
|
|
3497
|
+
<button
|
|
3498
|
+
type="button"
|
|
3499
|
+
class="text-sm font-semibold px-1 py-0.5 rounded-md hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3500
|
+
[disabled]="view() !== 'date'"
|
|
3501
|
+
(click)="onHeaderYearClick()"
|
|
3502
|
+
>
|
|
3503
|
+
{{ mv.year }}
|
|
3504
|
+
</button>
|
|
3328
3505
|
</span>
|
|
3329
3506
|
@if (i === calendarMonths().length - 1) {
|
|
3330
|
-
<button
|
|
3507
|
+
<button
|
|
3508
|
+
type="button"
|
|
3509
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3510
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
3511
|
+
(click)="onNextClick()"
|
|
3512
|
+
>
|
|
3331
3513
|
<ui-icon name="chevron-right" class="text-xs"></ui-icon>
|
|
3332
3514
|
</button>
|
|
3333
3515
|
} @else {
|
|
@@ -3337,11 +3519,23 @@ class DatePickerComponent {
|
|
|
3337
3519
|
</div>
|
|
3338
3520
|
<div class="grid grid-cols-7 gap-0.5 mb-1">
|
|
3339
3521
|
@for (d of orderedDayNames(); track d) {
|
|
3340
|
-
<div
|
|
3522
|
+
<div
|
|
3523
|
+
class="text-center text-xs text-(--f-text-muted-color) py-1"
|
|
3524
|
+
>
|
|
3525
|
+
{{ d }}
|
|
3526
|
+
</div>
|
|
3341
3527
|
}
|
|
3342
3528
|
</div>
|
|
3343
|
-
<div
|
|
3344
|
-
|
|
3529
|
+
<div
|
|
3530
|
+
class="grid grid-cols-7 gap-0.5"
|
|
3531
|
+
role="grid"
|
|
3532
|
+
[attr.aria-label]="MONTHS[mv.month] + ' ' + mv.year"
|
|
3533
|
+
(keydown)="onGridKeyDown($event)"
|
|
3534
|
+
>
|
|
3535
|
+
@for (
|
|
3536
|
+
day of daysFor(mv.month, mv.year);
|
|
3537
|
+
track day.date.getTime()
|
|
3538
|
+
) {
|
|
3345
3539
|
@if (day.otherMonth && !showOtherMonths()) {
|
|
3346
3540
|
<span class="invisible"></span>
|
|
3347
3541
|
} @else {
|
|
@@ -3358,7 +3552,10 @@ class DatePickerComponent {
|
|
|
3358
3552
|
(focus)="onDayFocus(day)"
|
|
3359
3553
|
>
|
|
3360
3554
|
@if (dateTpl()) {
|
|
3361
|
-
<ng-container
|
|
3555
|
+
<ng-container
|
|
3556
|
+
[ngTemplateOutlet]="dateTpl()"
|
|
3557
|
+
[ngTemplateOutletContext]="{ $implicit: day.date }"
|
|
3558
|
+
/>
|
|
3362
3559
|
} @else {
|
|
3363
3560
|
{{ day.day }}
|
|
3364
3561
|
}
|
|
@@ -3371,15 +3568,36 @@ class DatePickerComponent {
|
|
|
3371
3568
|
</div>
|
|
3372
3569
|
} @else if (gridMode() === 'month') {
|
|
3373
3570
|
<div class="flex items-center justify-between mb-3">
|
|
3374
|
-
<button
|
|
3571
|
+
<button
|
|
3572
|
+
type="button"
|
|
3573
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3574
|
+
[attr.aria-label]="prevAriaLabel()"
|
|
3575
|
+
(click)="onPrevClick()"
|
|
3576
|
+
>
|
|
3375
3577
|
<ui-icon name="chevron-left" class="text-xs"></ui-icon>
|
|
3376
3578
|
</button>
|
|
3377
|
-
<button
|
|
3378
|
-
|
|
3579
|
+
<button
|
|
3580
|
+
type="button"
|
|
3581
|
+
class="text-sm font-semibold px-1 py-0.5 rounded-md hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3582
|
+
[disabled]="view() !== 'date'"
|
|
3583
|
+
(click)="onHeaderYearClick()"
|
|
3584
|
+
>
|
|
3585
|
+
{{ viewYear() }}
|
|
3586
|
+
</button>
|
|
3587
|
+
<button
|
|
3588
|
+
type="button"
|
|
3589
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3590
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
3591
|
+
(click)="onNextClick()"
|
|
3592
|
+
>
|
|
3379
3593
|
<ui-icon name="chevron-right" class="text-xs"></ui-icon>
|
|
3380
3594
|
</button>
|
|
3381
3595
|
</div>
|
|
3382
|
-
<div
|
|
3596
|
+
<div
|
|
3597
|
+
class="grid grid-cols-3 gap-1.5"
|
|
3598
|
+
role="grid"
|
|
3599
|
+
[attr.aria-label]="'Select month'"
|
|
3600
|
+
>
|
|
3383
3601
|
@for (m of MONTH_SHORT; track m; let i = $index) {
|
|
3384
3602
|
<button
|
|
3385
3603
|
type="button"
|
|
@@ -3389,20 +3607,39 @@ class DatePickerComponent {
|
|
|
3389
3607
|
[class.bg-primary]="i === viewMonth()"
|
|
3390
3608
|
[class.text-primary-contrast]="i === viewMonth()"
|
|
3391
3609
|
(click)="selectMonth(i)"
|
|
3392
|
-
>
|
|
3610
|
+
>
|
|
3611
|
+
{{ m }}
|
|
3612
|
+
</button>
|
|
3393
3613
|
}
|
|
3394
3614
|
</div>
|
|
3395
3615
|
} @else {
|
|
3396
3616
|
<div class="flex items-center justify-between mb-3">
|
|
3397
|
-
<button
|
|
3617
|
+
<button
|
|
3618
|
+
type="button"
|
|
3619
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3620
|
+
[attr.aria-label]="prevAriaLabel()"
|
|
3621
|
+
(click)="onPrevClick()"
|
|
3622
|
+
>
|
|
3398
3623
|
<ui-icon name="chevron-left" class="text-xs"></ui-icon>
|
|
3399
3624
|
</button>
|
|
3400
|
-
<span class="text-sm font-semibold"
|
|
3401
|
-
|
|
3625
|
+
<span class="text-sm font-semibold"
|
|
3626
|
+
>{{ yearGridYears()[0] }} -
|
|
3627
|
+
{{ yearGridYears()[yearGridYears().length - 1] }}</span
|
|
3628
|
+
>
|
|
3629
|
+
<button
|
|
3630
|
+
type="button"
|
|
3631
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3632
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
3633
|
+
(click)="onNextClick()"
|
|
3634
|
+
>
|
|
3402
3635
|
<ui-icon name="chevron-right" class="text-xs"></ui-icon>
|
|
3403
3636
|
</button>
|
|
3404
3637
|
</div>
|
|
3405
|
-
<div
|
|
3638
|
+
<div
|
|
3639
|
+
class="grid grid-cols-3 gap-1.5"
|
|
3640
|
+
role="grid"
|
|
3641
|
+
[attr.aria-label]="'Select year'"
|
|
3642
|
+
>
|
|
3406
3643
|
@for (y of yearGridYears(); track y) {
|
|
3407
3644
|
<button
|
|
3408
3645
|
type="button"
|
|
@@ -3412,34 +3649,92 @@ class DatePickerComponent {
|
|
|
3412
3649
|
[class.bg-primary]="y === viewYear()"
|
|
3413
3650
|
[class.text-primary-contrast]="y === viewYear()"
|
|
3414
3651
|
(click)="selectYear(y)"
|
|
3415
|
-
>
|
|
3652
|
+
>
|
|
3653
|
+
{{ y }}
|
|
3654
|
+
</button>
|
|
3416
3655
|
}
|
|
3417
3656
|
</div>
|
|
3418
3657
|
}
|
|
3419
3658
|
|
|
3420
3659
|
@if (gridMode() === 'date' && (showTime() || timeOnly())) {
|
|
3421
|
-
<div
|
|
3660
|
+
<div
|
|
3661
|
+
class="flex items-center justify-center gap-2 mt-3 pt-3 border-t border-(--f-content-border-color)"
|
|
3662
|
+
>
|
|
3422
3663
|
<div class="flex flex-col items-center">
|
|
3423
|
-
<button
|
|
3424
|
-
|
|
3425
|
-
|
|
3664
|
+
<button
|
|
3665
|
+
type="button"
|
|
3666
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3667
|
+
(click)="incrementHour()"
|
|
3668
|
+
aria-label="Increment hour"
|
|
3669
|
+
>
|
|
3670
|
+
<ui-icon name="chevron-up" class="text-xs"></ui-icon>
|
|
3671
|
+
</button>
|
|
3672
|
+
<span class="text-sm font-mono tabular-nums w-6 text-center">{{
|
|
3673
|
+
displayHourText()
|
|
3674
|
+
}}</span>
|
|
3675
|
+
<button
|
|
3676
|
+
type="button"
|
|
3677
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3678
|
+
(click)="decrementHour()"
|
|
3679
|
+
aria-label="Decrement hour"
|
|
3680
|
+
>
|
|
3681
|
+
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
3682
|
+
</button>
|
|
3426
3683
|
</div>
|
|
3427
3684
|
<span class="text-sm font-semibold">:</span>
|
|
3428
3685
|
<div class="flex flex-col items-center">
|
|
3429
|
-
<button
|
|
3430
|
-
|
|
3431
|
-
|
|
3686
|
+
<button
|
|
3687
|
+
type="button"
|
|
3688
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3689
|
+
(click)="incrementMinute()"
|
|
3690
|
+
aria-label="Increment minute"
|
|
3691
|
+
>
|
|
3692
|
+
<ui-icon name="chevron-up" class="text-xs"></ui-icon>
|
|
3693
|
+
</button>
|
|
3694
|
+
<span class="text-sm font-mono tabular-nums w-6 text-center">{{
|
|
3695
|
+
pad2(timeMinute())
|
|
3696
|
+
}}</span>
|
|
3697
|
+
<button
|
|
3698
|
+
type="button"
|
|
3699
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3700
|
+
(click)="decrementMinute()"
|
|
3701
|
+
aria-label="Decrement minute"
|
|
3702
|
+
>
|
|
3703
|
+
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
3704
|
+
</button>
|
|
3432
3705
|
</div>
|
|
3433
3706
|
@if (showSeconds()) {
|
|
3434
3707
|
<span class="text-sm font-semibold">:</span>
|
|
3435
3708
|
<div class="flex flex-col items-center">
|
|
3436
|
-
<button
|
|
3437
|
-
|
|
3438
|
-
|
|
3709
|
+
<button
|
|
3710
|
+
type="button"
|
|
3711
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3712
|
+
(click)="incrementSecond()"
|
|
3713
|
+
aria-label="Increment second"
|
|
3714
|
+
>
|
|
3715
|
+
<ui-icon name="chevron-up" class="text-xs"></ui-icon>
|
|
3716
|
+
</button>
|
|
3717
|
+
<span class="text-sm font-mono tabular-nums w-6 text-center">{{
|
|
3718
|
+
pad2(timeSecond())
|
|
3719
|
+
}}</span>
|
|
3720
|
+
<button
|
|
3721
|
+
type="button"
|
|
3722
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3723
|
+
(click)="decrementSecond()"
|
|
3724
|
+
aria-label="Decrement second"
|
|
3725
|
+
>
|
|
3726
|
+
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
3727
|
+
</button>
|
|
3439
3728
|
</div>
|
|
3440
3729
|
}
|
|
3441
3730
|
@if (hourFormat() === '12') {
|
|
3442
|
-
<button
|
|
3731
|
+
<button
|
|
3732
|
+
type="button"
|
|
3733
|
+
class="ml-1 px-2 py-1 text-xs font-semibold rounded-md border border-(--f-content-border-color) hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3734
|
+
(click)="togglePeriod()"
|
|
3735
|
+
>
|
|
3736
|
+
{{ isPM() ? 'PM' : 'AM' }}
|
|
3737
|
+
</button>
|
|
3443
3738
|
}
|
|
3444
3739
|
</div>
|
|
3445
3740
|
}
|
|
@@ -3449,9 +3744,23 @@ class DatePickerComponent {
|
|
|
3449
3744
|
<ng-container [ngTemplateOutlet]="footerTpl()" />
|
|
3450
3745
|
</div>
|
|
3451
3746
|
} @else if (showButtonBar()) {
|
|
3452
|
-
<div
|
|
3453
|
-
|
|
3454
|
-
|
|
3747
|
+
<div
|
|
3748
|
+
class="flex items-center justify-between mt-3 pt-2 border-t border-(--f-content-border-color)"
|
|
3749
|
+
>
|
|
3750
|
+
<button
|
|
3751
|
+
type="button"
|
|
3752
|
+
class="text-xs font-medium text-primary hover:underline cursor-pointer"
|
|
3753
|
+
(click)="handleTodayClick()"
|
|
3754
|
+
>
|
|
3755
|
+
Today
|
|
3756
|
+
</button>
|
|
3757
|
+
<button
|
|
3758
|
+
type="button"
|
|
3759
|
+
class="text-xs font-medium text-(--f-text-muted-color) hover:underline cursor-pointer"
|
|
3760
|
+
(click)="handleClearClick()"
|
|
3761
|
+
>
|
|
3762
|
+
Clear
|
|
3763
|
+
</button>
|
|
3455
3764
|
</div>
|
|
3456
3765
|
}
|
|
3457
3766
|
</ng-template>
|
|
@@ -3462,7 +3771,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3462
3771
|
args: [{
|
|
3463
3772
|
selector: 'f-datepicker',
|
|
3464
3773
|
imports: [UiIconComponent, NgTemplateOutlet, PopoverComponent],
|
|
3465
|
-
providers: [
|
|
3774
|
+
providers: [
|
|
3775
|
+
{
|
|
3776
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3777
|
+
useExisting: forwardRef(() => DatePickerComponent),
|
|
3778
|
+
multi: true,
|
|
3779
|
+
},
|
|
3780
|
+
],
|
|
3466
3781
|
host: {
|
|
3467
3782
|
'[class]': 'hostClass()',
|
|
3468
3783
|
'[style]': 'style()',
|
|
@@ -3477,7 +3792,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3477
3792
|
<div class="relative">
|
|
3478
3793
|
<div [class]="wrapperClass()">
|
|
3479
3794
|
@if (iconDisplay() === 'input' && showIcon()) {
|
|
3480
|
-
<span
|
|
3795
|
+
<span
|
|
3796
|
+
class="inline-flex items-center justify-center pl-2 text-(--f-form-field-placeholder-color)"
|
|
3797
|
+
>
|
|
3481
3798
|
<ui-icon name="calendar" class="text-sm"></ui-icon>
|
|
3482
3799
|
</span>
|
|
3483
3800
|
}
|
|
@@ -3497,12 +3814,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3497
3814
|
(change)="onInputChange($any($event.target).value)"
|
|
3498
3815
|
/>
|
|
3499
3816
|
@if (showClear() && hasValue() && !disabled() && !readonly()) {
|
|
3500
|
-
<button
|
|
3817
|
+
<button
|
|
3818
|
+
type="button"
|
|
3819
|
+
class="inline-flex items-center justify-center px-1 text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) cursor-pointer"
|
|
3820
|
+
(click)="clear($event)"
|
|
3821
|
+
aria-label="Clear"
|
|
3822
|
+
>
|
|
3501
3823
|
<ui-icon name="times" class="text-xs"></ui-icon>
|
|
3502
3824
|
</button>
|
|
3503
3825
|
}
|
|
3504
3826
|
@if (showIcon() && iconDisplay() === 'button') {
|
|
3505
|
-
<button
|
|
3827
|
+
<button
|
|
3828
|
+
type="button"
|
|
3829
|
+
class="inline-flex items-center justify-center px-2 text-(--f-form-field-placeholder-color) border-l border-(--f-content-border-color) cursor-pointer"
|
|
3830
|
+
(click)="toggleCalendar($event)"
|
|
3831
|
+
aria-label="Choose date"
|
|
3832
|
+
>
|
|
3506
3833
|
<ui-icon name="calendar" class="text-sm"></ui-icon>
|
|
3507
3834
|
</button>
|
|
3508
3835
|
}
|
|
@@ -3515,7 +3842,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3515
3842
|
</div>
|
|
3516
3843
|
</f-popover>
|
|
3517
3844
|
} @else if (open()) {
|
|
3518
|
-
<div
|
|
3845
|
+
<div
|
|
3846
|
+
class="absolute z-50 mt-1 bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-[0_8px_30px_rgb(0,0,0,0.1)] p-3 min-w-64"
|
|
3847
|
+
(keydown.escape)="closeAndFocusInput()"
|
|
3848
|
+
>
|
|
3519
3849
|
<ng-container [ngTemplateOutlet]="panelContent" />
|
|
3520
3850
|
</div>
|
|
3521
3851
|
}
|
|
@@ -3525,25 +3855,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3525
3855
|
<ng-template #panelContent>
|
|
3526
3856
|
@if (gridMode() === 'date') {
|
|
3527
3857
|
<div class="flex gap-4">
|
|
3528
|
-
@for (
|
|
3529
|
-
|
|
3858
|
+
@for (
|
|
3859
|
+
mv of calendarMonths();
|
|
3860
|
+
track mv.month + '-' + mv.year;
|
|
3861
|
+
let i = $index
|
|
3862
|
+
) {
|
|
3863
|
+
<div class="w-full">
|
|
3530
3864
|
<div class="flex items-center justify-between mb-3">
|
|
3531
3865
|
@if (headerTpl()) {
|
|
3532
|
-
<ng-container
|
|
3866
|
+
<ng-container
|
|
3867
|
+
[ngTemplateOutlet]="headerTpl()"
|
|
3868
|
+
[ngTemplateOutletContext]="{ $implicit: mv }"
|
|
3869
|
+
/>
|
|
3533
3870
|
} @else {
|
|
3534
3871
|
@if (i === 0) {
|
|
3535
|
-
<button
|
|
3872
|
+
<button
|
|
3873
|
+
type="button"
|
|
3874
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3875
|
+
[attr.aria-label]="prevAriaLabel()"
|
|
3876
|
+
(click)="onPrevClick()"
|
|
3877
|
+
>
|
|
3536
3878
|
<ui-icon name="chevron-left" class="text-xs"></ui-icon>
|
|
3537
3879
|
</button>
|
|
3538
3880
|
} @else {
|
|
3539
3881
|
<span class="w-6"></span>
|
|
3540
3882
|
}
|
|
3541
3883
|
<span class="flex items-center gap-1">
|
|
3542
|
-
<button
|
|
3543
|
-
|
|
3884
|
+
<button
|
|
3885
|
+
type="button"
|
|
3886
|
+
class="text-sm font-semibold px-1 py-0.5 rounded-md hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3887
|
+
[disabled]="view() !== 'date'"
|
|
3888
|
+
(click)="onHeaderMonthClick()"
|
|
3889
|
+
>
|
|
3890
|
+
{{ MONTHS[mv.month] }}
|
|
3891
|
+
</button>
|
|
3892
|
+
<button
|
|
3893
|
+
type="button"
|
|
3894
|
+
class="text-sm font-semibold px-1 py-0.5 rounded-md hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3895
|
+
[disabled]="view() !== 'date'"
|
|
3896
|
+
(click)="onHeaderYearClick()"
|
|
3897
|
+
>
|
|
3898
|
+
{{ mv.year }}
|
|
3899
|
+
</button>
|
|
3544
3900
|
</span>
|
|
3545
3901
|
@if (i === calendarMonths().length - 1) {
|
|
3546
|
-
<button
|
|
3902
|
+
<button
|
|
3903
|
+
type="button"
|
|
3904
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3905
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
3906
|
+
(click)="onNextClick()"
|
|
3907
|
+
>
|
|
3547
3908
|
<ui-icon name="chevron-right" class="text-xs"></ui-icon>
|
|
3548
3909
|
</button>
|
|
3549
3910
|
} @else {
|
|
@@ -3553,11 +3914,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3553
3914
|
</div>
|
|
3554
3915
|
<div class="grid grid-cols-7 gap-0.5 mb-1">
|
|
3555
3916
|
@for (d of orderedDayNames(); track d) {
|
|
3556
|
-
<div
|
|
3917
|
+
<div
|
|
3918
|
+
class="text-center text-xs text-(--f-text-muted-color) py-1"
|
|
3919
|
+
>
|
|
3920
|
+
{{ d }}
|
|
3921
|
+
</div>
|
|
3557
3922
|
}
|
|
3558
3923
|
</div>
|
|
3559
|
-
<div
|
|
3560
|
-
|
|
3924
|
+
<div
|
|
3925
|
+
class="grid grid-cols-7 gap-0.5"
|
|
3926
|
+
role="grid"
|
|
3927
|
+
[attr.aria-label]="MONTHS[mv.month] + ' ' + mv.year"
|
|
3928
|
+
(keydown)="onGridKeyDown($event)"
|
|
3929
|
+
>
|
|
3930
|
+
@for (
|
|
3931
|
+
day of daysFor(mv.month, mv.year);
|
|
3932
|
+
track day.date.getTime()
|
|
3933
|
+
) {
|
|
3561
3934
|
@if (day.otherMonth && !showOtherMonths()) {
|
|
3562
3935
|
<span class="invisible"></span>
|
|
3563
3936
|
} @else {
|
|
@@ -3574,7 +3947,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3574
3947
|
(focus)="onDayFocus(day)"
|
|
3575
3948
|
>
|
|
3576
3949
|
@if (dateTpl()) {
|
|
3577
|
-
<ng-container
|
|
3950
|
+
<ng-container
|
|
3951
|
+
[ngTemplateOutlet]="dateTpl()"
|
|
3952
|
+
[ngTemplateOutletContext]="{ $implicit: day.date }"
|
|
3953
|
+
/>
|
|
3578
3954
|
} @else {
|
|
3579
3955
|
{{ day.day }}
|
|
3580
3956
|
}
|
|
@@ -3587,15 +3963,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3587
3963
|
</div>
|
|
3588
3964
|
} @else if (gridMode() === 'month') {
|
|
3589
3965
|
<div class="flex items-center justify-between mb-3">
|
|
3590
|
-
<button
|
|
3966
|
+
<button
|
|
3967
|
+
type="button"
|
|
3968
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3969
|
+
[attr.aria-label]="prevAriaLabel()"
|
|
3970
|
+
(click)="onPrevClick()"
|
|
3971
|
+
>
|
|
3591
3972
|
<ui-icon name="chevron-left" class="text-xs"></ui-icon>
|
|
3592
3973
|
</button>
|
|
3593
|
-
<button
|
|
3594
|
-
|
|
3974
|
+
<button
|
|
3975
|
+
type="button"
|
|
3976
|
+
class="text-sm font-semibold px-1 py-0.5 rounded-md hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
3977
|
+
[disabled]="view() !== 'date'"
|
|
3978
|
+
(click)="onHeaderYearClick()"
|
|
3979
|
+
>
|
|
3980
|
+
{{ viewYear() }}
|
|
3981
|
+
</button>
|
|
3982
|
+
<button
|
|
3983
|
+
type="button"
|
|
3984
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
3985
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
3986
|
+
(click)="onNextClick()"
|
|
3987
|
+
>
|
|
3595
3988
|
<ui-icon name="chevron-right" class="text-xs"></ui-icon>
|
|
3596
3989
|
</button>
|
|
3597
3990
|
</div>
|
|
3598
|
-
<div
|
|
3991
|
+
<div
|
|
3992
|
+
class="grid grid-cols-3 gap-1.5"
|
|
3993
|
+
role="grid"
|
|
3994
|
+
[attr.aria-label]="'Select month'"
|
|
3995
|
+
>
|
|
3599
3996
|
@for (m of MONTH_SHORT; track m; let i = $index) {
|
|
3600
3997
|
<button
|
|
3601
3998
|
type="button"
|
|
@@ -3605,20 +4002,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3605
4002
|
[class.bg-primary]="i === viewMonth()"
|
|
3606
4003
|
[class.text-primary-contrast]="i === viewMonth()"
|
|
3607
4004
|
(click)="selectMonth(i)"
|
|
3608
|
-
>
|
|
4005
|
+
>
|
|
4006
|
+
{{ m }}
|
|
4007
|
+
</button>
|
|
3609
4008
|
}
|
|
3610
4009
|
</div>
|
|
3611
4010
|
} @else {
|
|
3612
4011
|
<div class="flex items-center justify-between mb-3">
|
|
3613
|
-
<button
|
|
4012
|
+
<button
|
|
4013
|
+
type="button"
|
|
4014
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4015
|
+
[attr.aria-label]="prevAriaLabel()"
|
|
4016
|
+
(click)="onPrevClick()"
|
|
4017
|
+
>
|
|
3614
4018
|
<ui-icon name="chevron-left" class="text-xs"></ui-icon>
|
|
3615
4019
|
</button>
|
|
3616
|
-
<span class="text-sm font-semibold"
|
|
3617
|
-
|
|
4020
|
+
<span class="text-sm font-semibold"
|
|
4021
|
+
>{{ yearGridYears()[0] }} -
|
|
4022
|
+
{{ yearGridYears()[yearGridYears().length - 1] }}</span
|
|
4023
|
+
>
|
|
4024
|
+
<button
|
|
4025
|
+
type="button"
|
|
4026
|
+
class="inline-flex items-center justify-center p-1 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4027
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
4028
|
+
(click)="onNextClick()"
|
|
4029
|
+
>
|
|
3618
4030
|
<ui-icon name="chevron-right" class="text-xs"></ui-icon>
|
|
3619
4031
|
</button>
|
|
3620
4032
|
</div>
|
|
3621
|
-
<div
|
|
4033
|
+
<div
|
|
4034
|
+
class="grid grid-cols-3 gap-1.5"
|
|
4035
|
+
role="grid"
|
|
4036
|
+
[attr.aria-label]="'Select year'"
|
|
4037
|
+
>
|
|
3622
4038
|
@for (y of yearGridYears(); track y) {
|
|
3623
4039
|
<button
|
|
3624
4040
|
type="button"
|
|
@@ -3628,34 +4044,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3628
4044
|
[class.bg-primary]="y === viewYear()"
|
|
3629
4045
|
[class.text-primary-contrast]="y === viewYear()"
|
|
3630
4046
|
(click)="selectYear(y)"
|
|
3631
|
-
>
|
|
4047
|
+
>
|
|
4048
|
+
{{ y }}
|
|
4049
|
+
</button>
|
|
3632
4050
|
}
|
|
3633
4051
|
</div>
|
|
3634
4052
|
}
|
|
3635
4053
|
|
|
3636
4054
|
@if (gridMode() === 'date' && (showTime() || timeOnly())) {
|
|
3637
|
-
<div
|
|
4055
|
+
<div
|
|
4056
|
+
class="flex items-center justify-center gap-2 mt-3 pt-3 border-t border-(--f-content-border-color)"
|
|
4057
|
+
>
|
|
3638
4058
|
<div class="flex flex-col items-center">
|
|
3639
|
-
<button
|
|
3640
|
-
|
|
3641
|
-
|
|
4059
|
+
<button
|
|
4060
|
+
type="button"
|
|
4061
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4062
|
+
(click)="incrementHour()"
|
|
4063
|
+
aria-label="Increment hour"
|
|
4064
|
+
>
|
|
4065
|
+
<ui-icon name="chevron-up" class="text-xs"></ui-icon>
|
|
4066
|
+
</button>
|
|
4067
|
+
<span class="text-sm font-mono tabular-nums w-6 text-center">{{
|
|
4068
|
+
displayHourText()
|
|
4069
|
+
}}</span>
|
|
4070
|
+
<button
|
|
4071
|
+
type="button"
|
|
4072
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4073
|
+
(click)="decrementHour()"
|
|
4074
|
+
aria-label="Decrement hour"
|
|
4075
|
+
>
|
|
4076
|
+
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
4077
|
+
</button>
|
|
3642
4078
|
</div>
|
|
3643
4079
|
<span class="text-sm font-semibold">:</span>
|
|
3644
4080
|
<div class="flex flex-col items-center">
|
|
3645
|
-
<button
|
|
3646
|
-
|
|
3647
|
-
|
|
4081
|
+
<button
|
|
4082
|
+
type="button"
|
|
4083
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4084
|
+
(click)="incrementMinute()"
|
|
4085
|
+
aria-label="Increment minute"
|
|
4086
|
+
>
|
|
4087
|
+
<ui-icon name="chevron-up" class="text-xs"></ui-icon>
|
|
4088
|
+
</button>
|
|
4089
|
+
<span class="text-sm font-mono tabular-nums w-6 text-center">{{
|
|
4090
|
+
pad2(timeMinute())
|
|
4091
|
+
}}</span>
|
|
4092
|
+
<button
|
|
4093
|
+
type="button"
|
|
4094
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4095
|
+
(click)="decrementMinute()"
|
|
4096
|
+
aria-label="Decrement minute"
|
|
4097
|
+
>
|
|
4098
|
+
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
4099
|
+
</button>
|
|
3648
4100
|
</div>
|
|
3649
4101
|
@if (showSeconds()) {
|
|
3650
4102
|
<span class="text-sm font-semibold">:</span>
|
|
3651
4103
|
<div class="flex flex-col items-center">
|
|
3652
|
-
<button
|
|
3653
|
-
|
|
3654
|
-
|
|
4104
|
+
<button
|
|
4105
|
+
type="button"
|
|
4106
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4107
|
+
(click)="incrementSecond()"
|
|
4108
|
+
aria-label="Increment second"
|
|
4109
|
+
>
|
|
4110
|
+
<ui-icon name="chevron-up" class="text-xs"></ui-icon>
|
|
4111
|
+
</button>
|
|
4112
|
+
<span class="text-sm font-mono tabular-nums w-6 text-center">{{
|
|
4113
|
+
pad2(timeSecond())
|
|
4114
|
+
}}</span>
|
|
4115
|
+
<button
|
|
4116
|
+
type="button"
|
|
4117
|
+
class="p-0.5 hover:bg-(--f-content-hover-background) rounded-md cursor-pointer"
|
|
4118
|
+
(click)="decrementSecond()"
|
|
4119
|
+
aria-label="Decrement second"
|
|
4120
|
+
>
|
|
4121
|
+
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
4122
|
+
</button>
|
|
3655
4123
|
</div>
|
|
3656
4124
|
}
|
|
3657
4125
|
@if (hourFormat() === '12') {
|
|
3658
|
-
<button
|
|
4126
|
+
<button
|
|
4127
|
+
type="button"
|
|
4128
|
+
class="ml-1 px-2 py-1 text-xs font-semibold rounded-md border border-(--f-content-border-color) hover:bg-(--f-content-hover-background) cursor-pointer"
|
|
4129
|
+
(click)="togglePeriod()"
|
|
4130
|
+
>
|
|
4131
|
+
{{ isPM() ? 'PM' : 'AM' }}
|
|
4132
|
+
</button>
|
|
3659
4133
|
}
|
|
3660
4134
|
</div>
|
|
3661
4135
|
}
|
|
@@ -3665,9 +4139,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3665
4139
|
<ng-container [ngTemplateOutlet]="footerTpl()" />
|
|
3666
4140
|
</div>
|
|
3667
4141
|
} @else if (showButtonBar()) {
|
|
3668
|
-
<div
|
|
3669
|
-
|
|
3670
|
-
|
|
4142
|
+
<div
|
|
4143
|
+
class="flex items-center justify-between mt-3 pt-2 border-t border-(--f-content-border-color)"
|
|
4144
|
+
>
|
|
4145
|
+
<button
|
|
4146
|
+
type="button"
|
|
4147
|
+
class="text-xs font-medium text-primary hover:underline cursor-pointer"
|
|
4148
|
+
(click)="handleTodayClick()"
|
|
4149
|
+
>
|
|
4150
|
+
Today
|
|
4151
|
+
</button>
|
|
4152
|
+
<button
|
|
4153
|
+
type="button"
|
|
4154
|
+
class="text-xs font-medium text-(--f-text-muted-color) hover:underline cursor-pointer"
|
|
4155
|
+
(click)="handleClearClick()"
|
|
4156
|
+
>
|
|
4157
|
+
Clear
|
|
4158
|
+
</button>
|
|
3671
4159
|
</div>
|
|
3672
4160
|
}
|
|
3673
4161
|
</ng-template>
|
|
@@ -4896,6 +5384,7 @@ class MultiSelectComponent {
|
|
|
4896
5384
|
queueMicrotask(() => this._filterInputRef()?.nativeElement.focus());
|
|
4897
5385
|
}
|
|
4898
5386
|
});
|
|
5387
|
+
repositionOnScroll(() => this.open() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
4899
5388
|
}
|
|
4900
5389
|
onDocumentClick(e) {
|
|
4901
5390
|
if (this.open() && !this._el.nativeElement.contains(e.target)) {
|
|
@@ -4906,6 +5395,47 @@ class MultiSelectComponent {
|
|
|
4906
5395
|
...(ngDevMode ? [{ debugName: "_triggerRef" }] : /* istanbul ignore next */ []));
|
|
4907
5396
|
_filterInputRef = viewChild('filterInput', /* @ts-ignore */
|
|
4908
5397
|
...(ngDevMode ? [{ debugName: "_filterInputRef" }] : /* istanbul ignore next */ []));
|
|
5398
|
+
_panelRef = viewChild('panel', /* @ts-ignore */
|
|
5399
|
+
...(ngDevMode ? [{ debugName: "_panelRef" }] : /* istanbul ignore next */ []));
|
|
5400
|
+
_panelTop = signal(0, /* @ts-ignore */
|
|
5401
|
+
...(ngDevMode ? [{ debugName: "_panelTop" }] : /* istanbul ignore next */ []));
|
|
5402
|
+
_panelLeft = signal(0, /* @ts-ignore */
|
|
5403
|
+
...(ngDevMode ? [{ debugName: "_panelLeft" }] : /* istanbul ignore next */ []));
|
|
5404
|
+
_panelWidth = signal(0, /* @ts-ignore */
|
|
5405
|
+
...(ngDevMode ? [{ debugName: "_panelWidth" }] : /* istanbul ignore next */ []));
|
|
5406
|
+
panelClass = computed(() => {
|
|
5407
|
+
const position = this.appendTo() === 'body' ? 'fixed' : 'absolute w-full mt-1';
|
|
5408
|
+
return `${position} z-50 bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-lg overflow-hidden`;
|
|
5409
|
+
}, /* @ts-ignore */
|
|
5410
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
5411
|
+
panelStyle = computed(() => {
|
|
5412
|
+
if (this.appendTo() !== 'body')
|
|
5413
|
+
return {};
|
|
5414
|
+
return { top: `${this._panelTop()}px`, left: `${this._panelLeft()}px`, width: `${this._panelWidth()}px` };
|
|
5415
|
+
}, /* @ts-ignore */
|
|
5416
|
+
...(ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
5417
|
+
position() {
|
|
5418
|
+
const anchorEl = this._triggerRef()?.nativeElement;
|
|
5419
|
+
if (!anchorEl || typeof window === 'undefined')
|
|
5420
|
+
return;
|
|
5421
|
+
const rect = anchorEl.getBoundingClientRect();
|
|
5422
|
+
this._panelTop.set(rect.bottom + 4);
|
|
5423
|
+
this._panelLeft.set(Math.max(8, rect.left));
|
|
5424
|
+
this._panelWidth.set(rect.width);
|
|
5425
|
+
}
|
|
5426
|
+
adjustForViewport() {
|
|
5427
|
+
const panelEl = this._panelRef()?.nativeElement;
|
|
5428
|
+
const anchorEl = this._triggerRef()?.nativeElement;
|
|
5429
|
+
if (!panelEl || !anchorEl || typeof window === 'undefined')
|
|
5430
|
+
return;
|
|
5431
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
5432
|
+
const panelRect = panelEl.getBoundingClientRect();
|
|
5433
|
+
const gap = 4;
|
|
5434
|
+
this._panelLeft.set(Math.max(8, Math.min(anchorRect.left, window.innerWidth - panelRect.width - 8)));
|
|
5435
|
+
if (anchorRect.bottom + panelRect.height + gap > window.innerHeight) {
|
|
5436
|
+
this._panelTop.set(Math.max(8, anchorRect.top - panelRect.height - gap));
|
|
5437
|
+
}
|
|
5438
|
+
}
|
|
4909
5439
|
triggerClass = computed(() => {
|
|
4910
5440
|
const base = 'w-full min-h-[38px] flex items-center gap-2 px-3 py-1.5 text-sm rounded-lg border bg-(--f-form-field-background) focus:outline-none focus-visible:ring-focus transition-all duration-[var(--f-transition-duration)]';
|
|
4911
5441
|
const showInvalid = this.invalid() && this.touched();
|
|
@@ -4960,6 +5490,8 @@ class MultiSelectComponent {
|
|
|
4960
5490
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
4961
5491
|
style = input(null, /* @ts-ignore */
|
|
4962
5492
|
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
5493
|
+
appendTo = input('self', /* @ts-ignore */
|
|
5494
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
4963
5495
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4964
5496
|
autofocus = input(false, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4965
5497
|
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -5181,6 +5713,10 @@ class MultiSelectComponent {
|
|
|
5181
5713
|
this.onShow.emit();
|
|
5182
5714
|
if (this.lazy())
|
|
5183
5715
|
this.onLazyLoad.emit({ filter: this.filterText() });
|
|
5716
|
+
if (this.appendTo() === 'body') {
|
|
5717
|
+
this.position();
|
|
5718
|
+
setTimeout(() => this.adjustForViewport(), 0);
|
|
5719
|
+
}
|
|
5184
5720
|
}
|
|
5185
5721
|
closeList() {
|
|
5186
5722
|
this._open.set(false);
|
|
@@ -5339,7 +5875,7 @@ class MultiSelectComponent {
|
|
|
5339
5875
|
registerOnTouched(fn) { this._onTouched = fn; }
|
|
5340
5876
|
setDisabledState() { }
|
|
5341
5877
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5342
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: MultiSelectComponent, isStandalone: true, selector: "f-multiselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectionLimit: { classPropertyName: "selectionLimit", publicName: "selectionLimit", isSignal: true, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, clearIcon: { classPropertyName: "clearIcon", publicName: "clearIcon", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", onFocus: "onFocus", onChange: "onChange", onFilter: "onFilter", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad", onSelectAllChange: "onSelectAllChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true }], queries: [{ propertyName: "selectedItemRef", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "itemRef", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "emptyFilterRef", first: true, predicate: ["emptyfilter"], descendants: true, isSignal: true }, { propertyName: "loaderRef", first: true, predicate: ["loader"], descendants: true, isSignal: true }, { propertyName: "filterRef", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "_filterInputRef", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
5878
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: MultiSelectComponent, isStandalone: true, selector: "f-multiselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectionLimit: { classPropertyName: "selectionLimit", publicName: "selectionLimit", isSignal: true, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, clearIcon: { classPropertyName: "clearIcon", publicName: "clearIcon", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", onFocus: "onFocus", onChange: "onChange", onFilter: "onFilter", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad", onSelectAllChange: "onSelectAllChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true }], queries: [{ propertyName: "selectedItemRef", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "itemRef", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "emptyFilterRef", first: true, predicate: ["emptyfilter"], descendants: true, isSignal: true }, { propertyName: "loaderRef", first: true, predicate: ["loader"], descendants: true, isSignal: true }, { propertyName: "filterRef", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "_filterInputRef", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
5343
5879
|
<div class="relative w-full">
|
|
5344
5880
|
<div
|
|
5345
5881
|
#trigger
|
|
@@ -5397,7 +5933,7 @@ class MultiSelectComponent {
|
|
|
5397
5933
|
</div>
|
|
5398
5934
|
|
|
5399
5935
|
@if (open()) {
|
|
5400
|
-
<div class="
|
|
5936
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
5401
5937
|
@if (headerTpl()) {
|
|
5402
5938
|
<div class="border-b border-(--f-content-border-color)">
|
|
5403
5939
|
<ng-container [ngTemplateOutlet]="headerTpl()" />
|
|
@@ -5595,7 +6131,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5595
6131
|
</div>
|
|
5596
6132
|
|
|
5597
6133
|
@if (open()) {
|
|
5598
|
-
<div class="
|
|
6134
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
5599
6135
|
@if (headerTpl()) {
|
|
5600
6136
|
<div class="border-b border-(--f-content-border-color)">
|
|
5601
6137
|
<ng-container [ngTemplateOutlet]="headerTpl()" />
|
|
@@ -5724,7 +6260,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5724
6260
|
</ng-template>
|
|
5725
6261
|
`,
|
|
5726
6262
|
}]
|
|
5727
|
-
}], ctorParameters: () => [], propDecorators: { _triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], _filterInputRef: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectionLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionLimit", required: false }] }], showToggleAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAll", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], clearIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIcon", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onSelectAllChange: [{ type: i0.Output, args: ["onSelectAllChange"] }], selectedItemRef: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], itemRef: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], emptyFilterRef: [{ type: i0.ContentChild, args: ['emptyfilter', { isSignal: true }] }], loaderRef: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], filterRef: [{ type: i0.ContentChild, args: ['filter', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
6263
|
+
}], ctorParameters: () => [], propDecorators: { _triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], _filterInputRef: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], _panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectionLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionLimit", required: false }] }], showToggleAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAll", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], clearIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIcon", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onSelectAllChange: [{ type: i0.Output, args: ["onSelectAllChange"] }], selectedItemRef: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], itemRef: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], emptyFilterRef: [{ type: i0.ContentChild, args: ['emptyfilter', { isSignal: true }] }], loaderRef: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], filterRef: [{ type: i0.ContentChild, args: ['filter', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
5728
6264
|
|
|
5729
6265
|
class PasswordComponent {
|
|
5730
6266
|
toggleMask = input(true, { ...(ngDevMode ? { debugName: "toggleMask" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -6226,7 +6762,8 @@ class SelectComponent {
|
|
|
6226
6762
|
afterNextRender(() => {
|
|
6227
6763
|
if (!this.autofocus())
|
|
6228
6764
|
return;
|
|
6229
|
-
const el = this._editableInputRef()?.nativeElement ??
|
|
6765
|
+
const el = this._editableInputRef()?.nativeElement ??
|
|
6766
|
+
this._triggerRef()?.nativeElement;
|
|
6230
6767
|
el?.focus();
|
|
6231
6768
|
});
|
|
6232
6769
|
effect(() => {
|
|
@@ -6241,6 +6778,7 @@ class SelectComponent {
|
|
|
6241
6778
|
queueMicrotask(() => this._filterInputRef()?.nativeElement.focus());
|
|
6242
6779
|
}
|
|
6243
6780
|
});
|
|
6781
|
+
repositionOnScroll(() => this.open() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
6244
6782
|
}
|
|
6245
6783
|
onDocumentClick(e) {
|
|
6246
6784
|
if (this.open() && !this._el.nativeElement.contains(e.target)) {
|
|
@@ -6289,6 +6827,8 @@ class SelectComponent {
|
|
|
6289
6827
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
6290
6828
|
style = input(null, /* @ts-ignore */
|
|
6291
6829
|
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
6830
|
+
appendTo = input('self', /* @ts-ignore */
|
|
6831
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
6292
6832
|
editable = input(false, { ...(ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
6293
6833
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
6294
6834
|
autofocus = input(false, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -6330,6 +6870,51 @@ class SelectComponent {
|
|
|
6330
6870
|
...(ngDevMode ? [{ debugName: "_editableInputRef" }] : /* istanbul ignore next */ []));
|
|
6331
6871
|
_filterInputRef = viewChild('filterInput', /* @ts-ignore */
|
|
6332
6872
|
...(ngDevMode ? [{ debugName: "_filterInputRef" }] : /* istanbul ignore next */ []));
|
|
6873
|
+
_panelRef = viewChild('panel', /* @ts-ignore */
|
|
6874
|
+
...(ngDevMode ? [{ debugName: "_panelRef" }] : /* istanbul ignore next */ []));
|
|
6875
|
+
_panelTop = signal(0, /* @ts-ignore */
|
|
6876
|
+
...(ngDevMode ? [{ debugName: "_panelTop" }] : /* istanbul ignore next */ []));
|
|
6877
|
+
_panelLeft = signal(0, /* @ts-ignore */
|
|
6878
|
+
...(ngDevMode ? [{ debugName: "_panelLeft" }] : /* istanbul ignore next */ []));
|
|
6879
|
+
_panelWidth = signal(0, /* @ts-ignore */
|
|
6880
|
+
...(ngDevMode ? [{ debugName: "_panelWidth" }] : /* istanbul ignore next */ []));
|
|
6881
|
+
panelClass = computed(() => {
|
|
6882
|
+
const position = this.appendTo() === 'body' ? 'fixed' : 'absolute w-full mt-1';
|
|
6883
|
+
return `${position} z-50 bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-lg overflow-hidden`;
|
|
6884
|
+
}, /* @ts-ignore */
|
|
6885
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
6886
|
+
panelStyle = computed(() => {
|
|
6887
|
+
if (this.appendTo() !== 'body')
|
|
6888
|
+
return {};
|
|
6889
|
+
return {
|
|
6890
|
+
top: `${this._panelTop()}px`,
|
|
6891
|
+
left: `${this._panelLeft()}px`,
|
|
6892
|
+
width: `${this._panelWidth()}px`,
|
|
6893
|
+
};
|
|
6894
|
+
}, /* @ts-ignore */
|
|
6895
|
+
...(ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
6896
|
+
position() {
|
|
6897
|
+
const anchorEl = this._triggerRef()?.nativeElement;
|
|
6898
|
+
if (!anchorEl || typeof window === 'undefined')
|
|
6899
|
+
return;
|
|
6900
|
+
const rect = anchorEl.getBoundingClientRect();
|
|
6901
|
+
this._panelTop.set(rect.bottom + 4);
|
|
6902
|
+
this._panelLeft.set(Math.max(8, rect.left));
|
|
6903
|
+
this._panelWidth.set(rect.width);
|
|
6904
|
+
}
|
|
6905
|
+
adjustForViewport() {
|
|
6906
|
+
const panelEl = this._panelRef()?.nativeElement;
|
|
6907
|
+
const anchorEl = this._triggerRef()?.nativeElement;
|
|
6908
|
+
if (!panelEl || !anchorEl || typeof window === 'undefined')
|
|
6909
|
+
return;
|
|
6910
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
6911
|
+
const panelRect = panelEl.getBoundingClientRect();
|
|
6912
|
+
const gap = 4;
|
|
6913
|
+
this._panelLeft.set(Math.max(8, Math.min(anchorRect.left, window.innerWidth - panelRect.width - 8)));
|
|
6914
|
+
if (anchorRect.bottom + panelRect.height + gap > window.innerHeight) {
|
|
6915
|
+
this._panelTop.set(Math.max(8, anchorRect.top - panelRect.height - gap));
|
|
6916
|
+
}
|
|
6917
|
+
}
|
|
6333
6918
|
selectedItemRef = contentChild('selectedItem', /* @ts-ignore */
|
|
6334
6919
|
...(ngDevMode ? [{ debugName: "selectedItemRef" }] : /* istanbul ignore next */ []));
|
|
6335
6920
|
itemRef = contentChild('item', /* @ts-ignore */
|
|
@@ -6351,7 +6936,7 @@ class SelectComponent {
|
|
|
6351
6936
|
fTemplates = contentChildren(FTemplateDirective, /* @ts-ignore */
|
|
6352
6937
|
...(ngDevMode ? [{ debugName: "fTemplates" }] : /* istanbul ignore next */ []));
|
|
6353
6938
|
namedTemplate(name) {
|
|
6354
|
-
return this.fTemplates().find(t => t.fTemplate() === name)?.templateRef ?? null;
|
|
6939
|
+
return (this.fTemplates().find((t) => t.fTemplate() === name)?.templateRef ?? null);
|
|
6355
6940
|
}
|
|
6356
6941
|
selectedItemTpl = computed(() => this.selectedItemRef() ?? this.namedTemplate('selectedItem'), /* @ts-ignore */
|
|
6357
6942
|
...(ngDevMode ? [{ debugName: "selectedItemTpl" }] : /* istanbul ignore next */ []));
|
|
@@ -6385,20 +6970,32 @@ class SelectComponent {
|
|
|
6385
6970
|
...(ngDevMode ? [{ debugName: "listId" }] : /* istanbul ignore next */ []));
|
|
6386
6971
|
filterFieldList = computed(() => {
|
|
6387
6972
|
const by = this.filterBy();
|
|
6388
|
-
return by
|
|
6973
|
+
return by
|
|
6974
|
+
? by
|
|
6975
|
+
.split(',')
|
|
6976
|
+
.map((f) => f.trim())
|
|
6977
|
+
.filter(Boolean)
|
|
6978
|
+
: [this.optionLabel()];
|
|
6389
6979
|
}, /* @ts-ignore */
|
|
6390
6980
|
...(ngDevMode ? [{ debugName: "filterFieldList" }] : /* istanbul ignore next */ []));
|
|
6391
6981
|
matchesFilter(raw, query) {
|
|
6392
6982
|
const locale = this.filterLocale() || undefined;
|
|
6393
|
-
const s = locale
|
|
6983
|
+
const s = locale
|
|
6984
|
+
? String(raw ?? '').toLocaleLowerCase(locale)
|
|
6985
|
+
: String(raw ?? '').toLowerCase();
|
|
6394
6986
|
const q = locale ? query.toLocaleLowerCase(locale) : query.toLowerCase();
|
|
6395
6987
|
switch (this.filterMatchMode()) {
|
|
6396
|
-
case 'startsWith':
|
|
6397
|
-
|
|
6398
|
-
case '
|
|
6399
|
-
|
|
6988
|
+
case 'startsWith':
|
|
6989
|
+
return s.startsWith(q);
|
|
6990
|
+
case 'endsWith':
|
|
6991
|
+
return s.endsWith(q);
|
|
6992
|
+
case 'equals':
|
|
6993
|
+
return s === q;
|
|
6994
|
+
case 'notEquals':
|
|
6995
|
+
return s !== q;
|
|
6400
6996
|
case 'contains':
|
|
6401
|
-
default:
|
|
6997
|
+
default:
|
|
6998
|
+
return s.includes(q);
|
|
6402
6999
|
}
|
|
6403
7000
|
}
|
|
6404
7001
|
optionMatchesQuery(opt, query) {
|
|
@@ -6407,36 +7004,41 @@ class SelectComponent {
|
|
|
6407
7004
|
if (opt === null || typeof opt !== 'object')
|
|
6408
7005
|
return this.matchesFilter(opt, query);
|
|
6409
7006
|
const rec = opt;
|
|
6410
|
-
return this.filterFieldList().some(f => this.matchesFilter(rec[f], query));
|
|
7007
|
+
return this.filterFieldList().some((f) => this.matchesFilter(rec[f], query));
|
|
6411
7008
|
}
|
|
6412
7009
|
filteredOptions = computed(() => {
|
|
6413
7010
|
const opts = this.options();
|
|
6414
7011
|
const q = this.filterText();
|
|
6415
7012
|
if (!q)
|
|
6416
7013
|
return opts;
|
|
6417
|
-
return opts.filter(o => this.optionMatchesQuery(o, q));
|
|
7014
|
+
return opts.filter((o) => this.optionMatchesQuery(o, q));
|
|
6418
7015
|
}, /* @ts-ignore */
|
|
6419
7016
|
...(ngDevMode ? [{ debugName: "filteredOptions" }] : /* istanbul ignore next */ []));
|
|
6420
7017
|
allLeafOptions = computed(() => {
|
|
6421
7018
|
if (!this.group())
|
|
6422
7019
|
return this.options();
|
|
6423
7020
|
const groups = this.options();
|
|
6424
|
-
return groups.flatMap(g => g[this.optionGroupChildren()] ?? []);
|
|
7021
|
+
return groups.flatMap((g) => g[this.optionGroupChildren()] ?? []);
|
|
6425
7022
|
}, /* @ts-ignore */
|
|
6426
7023
|
...(ngDevMode ? [{ debugName: "allLeafOptions" }] : /* istanbul ignore next */ []));
|
|
6427
7024
|
flatItems = computed(() => {
|
|
6428
7025
|
const q = this.filterText();
|
|
6429
7026
|
if (!this.group()) {
|
|
6430
|
-
return this.filteredOptions().map(o => ({ kind: 'option', option: o }));
|
|
7027
|
+
return this.filteredOptions().map((o) => ({ kind: 'option', option: o }));
|
|
6431
7028
|
}
|
|
6432
7029
|
const groups = this.options();
|
|
6433
7030
|
const out = [];
|
|
6434
7031
|
for (const g of groups) {
|
|
6435
7032
|
const children = g[this.optionGroupChildren()] ?? [];
|
|
6436
|
-
const filteredChildren = q
|
|
7033
|
+
const filteredChildren = q
|
|
7034
|
+
? children.filter((o) => this.optionMatchesQuery(o, q))
|
|
7035
|
+
: children;
|
|
6437
7036
|
if (!filteredChildren.length)
|
|
6438
7037
|
continue;
|
|
6439
|
-
out.push({
|
|
7038
|
+
out.push({
|
|
7039
|
+
kind: 'group',
|
|
7040
|
+
label: String(g[this.optionGroupLabel()] ?? ''),
|
|
7041
|
+
});
|
|
6440
7042
|
for (const c of filteredChildren)
|
|
6441
7043
|
out.push({ kind: 'option', option: c });
|
|
6442
7044
|
}
|
|
@@ -6445,7 +7047,7 @@ class SelectComponent {
|
|
|
6445
7047
|
...(ngDevMode ? [{ debugName: "flatItems" }] : /* istanbul ignore next */ []));
|
|
6446
7048
|
navigableOptions = computed(() => this.flatItems()
|
|
6447
7049
|
.filter((i) => i.kind === 'option')
|
|
6448
|
-
.map(i => i.option), /* @ts-ignore */
|
|
7050
|
+
.map((i) => i.option), /* @ts-ignore */
|
|
6449
7051
|
...(ngDevMode ? [{ debugName: "navigableOptions" }] : /* istanbul ignore next */ []));
|
|
6450
7052
|
activeDescendantId = computed(() => {
|
|
6451
7053
|
const idx = this._focusedOptionIndex();
|
|
@@ -6474,7 +7076,7 @@ class SelectComponent {
|
|
|
6474
7076
|
const v = this.value();
|
|
6475
7077
|
if (v == null)
|
|
6476
7078
|
return '';
|
|
6477
|
-
const found = this.allLeafOptions().find(o => this.getOptionValue(o) === v);
|
|
7079
|
+
const found = this.allLeafOptions().find((o) => this.getOptionValue(o) === v);
|
|
6478
7080
|
return found ? this.getOptionLabel(found) : String(v);
|
|
6479
7081
|
}, /* @ts-ignore */
|
|
6480
7082
|
...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -6482,9 +7084,17 @@ class SelectComponent {
|
|
|
6482
7084
|
const base = 'w-full flex items-center justify-between px-3 py-2 text-sm rounded-lg border bg-(--f-form-field-background) text-(--f-form-field-color) focus:outline-none focus-visible:ring-focus transition-all duration-[var(--f-transition-duration)]';
|
|
6483
7085
|
const showInvalid = this.invalid() && this.touched();
|
|
6484
7086
|
const stateClass = this.open()
|
|
6485
|
-
?
|
|
6486
|
-
|
|
6487
|
-
|
|
7087
|
+
? showInvalid
|
|
7088
|
+
? 'border-red-400'
|
|
7089
|
+
: 'border-primary'
|
|
7090
|
+
: showInvalid
|
|
7091
|
+
? 'border-red-400 hover:border-red-300'
|
|
7092
|
+
: 'border-(--f-form-field-border-color) hover:border-(--f-form-field-hover-border-color)';
|
|
7093
|
+
const disabledClass = this.disabled()
|
|
7094
|
+
? 'opacity-60 cursor-not-allowed'
|
|
7095
|
+
: this.readonly()
|
|
7096
|
+
? 'cursor-default'
|
|
7097
|
+
: 'cursor-pointer';
|
|
6488
7098
|
return `${base} ${stateClass} ${disabledClass}`;
|
|
6489
7099
|
}, /* @ts-ignore */
|
|
6490
7100
|
...(ngDevMode ? [{ debugName: "triggerClass" }] : /* istanbul ignore next */ []));
|
|
@@ -6492,7 +7102,7 @@ class SelectComponent {
|
|
|
6492
7102
|
const v = this.value();
|
|
6493
7103
|
if (v == null)
|
|
6494
7104
|
return null;
|
|
6495
|
-
return this.allLeafOptions().find(o => this.getOptionValue(o) === v) ?? null;
|
|
7105
|
+
return (this.allLeafOptions().find((o) => this.getOptionValue(o) === v) ?? null);
|
|
6496
7106
|
}, /* @ts-ignore */
|
|
6497
7107
|
...(ngDevMode ? [{ debugName: "selectedOption" }] : /* istanbul ignore next */ []));
|
|
6498
7108
|
getOptionLabel(opt) {
|
|
@@ -6517,7 +7127,7 @@ class SelectComponent {
|
|
|
6517
7127
|
if (this.readonly())
|
|
6518
7128
|
return;
|
|
6519
7129
|
this._editableOverride.set(text);
|
|
6520
|
-
const match = this.allLeafOptions().find(o => this.getOptionLabel(o) === text);
|
|
7130
|
+
const match = this.allLeafOptions().find((o) => this.getOptionLabel(o) === text);
|
|
6521
7131
|
const v = match ? this.getOptionValue(match) : text;
|
|
6522
7132
|
this._value.set(v);
|
|
6523
7133
|
this._onChange(v);
|
|
@@ -6546,6 +7156,10 @@ class SelectComponent {
|
|
|
6546
7156
|
this.onShow.emit();
|
|
6547
7157
|
if (this.lazy())
|
|
6548
7158
|
this.onLazyLoad.emit({ filter: this.filterText() });
|
|
7159
|
+
if (this.appendTo() === 'body') {
|
|
7160
|
+
this.position();
|
|
7161
|
+
setTimeout(() => this.adjustForViewport(), 0);
|
|
7162
|
+
}
|
|
6549
7163
|
}
|
|
6550
7164
|
closeList() {
|
|
6551
7165
|
this._open.set(false);
|
|
@@ -6569,15 +7183,19 @@ class SelectComponent {
|
|
|
6569
7183
|
}
|
|
6570
7184
|
focusFirstOrSelected() {
|
|
6571
7185
|
const opts = this.navigableOptions();
|
|
6572
|
-
const idx = opts.findIndex(o => this.getOptionValue(o) === this.value());
|
|
6573
|
-
this._focusedOptionIndex.set(idx >= 0 ? idx :
|
|
7186
|
+
const idx = opts.findIndex((o) => this.getOptionValue(o) === this.value());
|
|
7187
|
+
this._focusedOptionIndex.set(idx >= 0 ? idx : opts.length ? 0 : -1);
|
|
6574
7188
|
}
|
|
6575
7189
|
moveFocus(delta) {
|
|
6576
7190
|
const len = this.navigableOptions().length;
|
|
6577
7191
|
if (!len)
|
|
6578
7192
|
return;
|
|
6579
7193
|
const cur = this._focusedOptionIndex();
|
|
6580
|
-
const next = cur < 0
|
|
7194
|
+
const next = cur < 0
|
|
7195
|
+
? delta > 0
|
|
7196
|
+
? 0
|
|
7197
|
+
: len - 1
|
|
7198
|
+
: Math.min(len - 1, Math.max(0, cur + delta));
|
|
6581
7199
|
this._focusedOptionIndex.set(next);
|
|
6582
7200
|
}
|
|
6583
7201
|
_typeaheadStr = '';
|
|
@@ -6588,13 +7206,15 @@ class SelectComponent {
|
|
|
6588
7206
|
this._typeaheadStr += char.toLowerCase();
|
|
6589
7207
|
if (this._typeaheadTimer)
|
|
6590
7208
|
clearTimeout(this._typeaheadTimer);
|
|
6591
|
-
this._typeaheadTimer = setTimeout(() => {
|
|
7209
|
+
this._typeaheadTimer = setTimeout(() => {
|
|
7210
|
+
this._typeaheadStr = '';
|
|
7211
|
+
}, 500);
|
|
6592
7212
|
const opts = this.navigableOptions();
|
|
6593
7213
|
if (!opts.length)
|
|
6594
7214
|
return;
|
|
6595
7215
|
const start = this._focusedOptionIndex() + 1;
|
|
6596
7216
|
const ordered = [...opts.slice(start), ...opts.slice(0, start)];
|
|
6597
|
-
const match = ordered.find(o => this.getOptionLabel(o).toLowerCase().startsWith(this._typeaheadStr));
|
|
7217
|
+
const match = ordered.find((o) => this.getOptionLabel(o).toLowerCase().startsWith(this._typeaheadStr));
|
|
6598
7218
|
if (match)
|
|
6599
7219
|
this._focusedOptionIndex.set(opts.indexOf(match));
|
|
6600
7220
|
}
|
|
@@ -6655,17 +7275,33 @@ class SelectComponent {
|
|
|
6655
7275
|
this.closeList();
|
|
6656
7276
|
break;
|
|
6657
7277
|
default:
|
|
6658
|
-
if (!this.editable() &&
|
|
7278
|
+
if (!this.editable() &&
|
|
7279
|
+
event.key.length === 1 &&
|
|
7280
|
+
!event.altKey &&
|
|
7281
|
+
!event.ctrlKey &&
|
|
7282
|
+
!event.metaKey) {
|
|
6659
7283
|
this.typeahead(event.key);
|
|
6660
7284
|
}
|
|
6661
7285
|
}
|
|
6662
7286
|
}
|
|
6663
|
-
writeValue(val) {
|
|
6664
|
-
|
|
6665
|
-
|
|
7287
|
+
writeValue(val) {
|
|
7288
|
+
this._value.set(val);
|
|
7289
|
+
}
|
|
7290
|
+
registerOnChange(fn) {
|
|
7291
|
+
this._onChange = fn;
|
|
7292
|
+
}
|
|
7293
|
+
registerOnTouched(fn) {
|
|
7294
|
+
this._onTouched = fn;
|
|
7295
|
+
}
|
|
6666
7296
|
setDisabledState() { }
|
|
6667
7297
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6668
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SelectComponent, isStandalone: true, selector: "f-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, clearIcon: { classPropertyName: "clearIcon", publicName: "clearIcon", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFilter: "onFilter", onChange: "onChange", onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
7298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SelectComponent, isStandalone: true, selector: "f-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, clearIcon: { classPropertyName: "clearIcon", publicName: "clearIcon", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFilter: "onFilter", onChange: "onChange", onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
7299
|
+
{
|
|
7300
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7301
|
+
useExisting: forwardRef(() => SelectComponent),
|
|
7302
|
+
multi: true,
|
|
7303
|
+
},
|
|
7304
|
+
], queries: [{ propertyName: "selectedItemRef", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "itemRef", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "emptyFilterRef", first: true, predicate: ["emptyfilter"], descendants: true, isSignal: true }, { propertyName: "loaderRef", first: true, predicate: ["loader"], descendants: true, isSignal: true }, { propertyName: "filterRef", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "_editableInputRef", first: true, predicate: ["editableInputEl"], descendants: true, isSignal: true }, { propertyName: "_filterInputRef", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }, { propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
6669
7305
|
<div class="relative w-full">
|
|
6670
7306
|
<button
|
|
6671
7307
|
#trigger
|
|
@@ -6700,25 +7336,45 @@ class SelectComponent {
|
|
|
6700
7336
|
/>
|
|
6701
7337
|
} @else if (selectedItemTpl() && selectedOption() != null) {
|
|
6702
7338
|
<span class="flex-1 min-w-0 truncate text-left">
|
|
6703
|
-
<ng-container
|
|
7339
|
+
<ng-container
|
|
7340
|
+
[ngTemplateOutlet]="selectedItemTpl()"
|
|
7341
|
+
[ngTemplateOutletContext]="{ $implicit: selectedOption() }"
|
|
7342
|
+
/>
|
|
6704
7343
|
</span>
|
|
6705
7344
|
} @else {
|
|
6706
|
-
<span
|
|
7345
|
+
<span
|
|
7346
|
+
data-select-label
|
|
7347
|
+
class="flex-1 min-w-0 truncate text-left"
|
|
7348
|
+
[class.text-(--f-form-field-placeholder-color)]="!selectedLabel()"
|
|
7349
|
+
>{{ selectedLabel() || placeholder() }}</span
|
|
7350
|
+
>
|
|
6707
7351
|
}
|
|
6708
7352
|
<span class="flex items-center gap-1 shrink-0">
|
|
6709
7353
|
@if (showClear() && value() != null && !disabled() && !readonly()) {
|
|
6710
|
-
<ui-icon
|
|
7354
|
+
<ui-icon
|
|
7355
|
+
[name]="clearIcon()"
|
|
7356
|
+
class="text-xs text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) shrink-0"
|
|
7357
|
+
(click)="clear($event)"
|
|
7358
|
+
></ui-icon>
|
|
6711
7359
|
}
|
|
6712
7360
|
@if (loading()) {
|
|
6713
|
-
<ui-icon
|
|
7361
|
+
<ui-icon
|
|
7362
|
+
[name]="loadingIcon()"
|
|
7363
|
+
[spin]="true"
|
|
7364
|
+
class="text-xs text-(--f-form-field-placeholder-color) shrink-0"
|
|
7365
|
+
></ui-icon>
|
|
6714
7366
|
} @else {
|
|
6715
|
-
<ui-icon
|
|
7367
|
+
<ui-icon
|
|
7368
|
+
[name]="dropdownIcon()"
|
|
7369
|
+
class="text-xs text-(--f-form-field-placeholder-color) transition-transform duration-[var(--f-transition-duration)] shrink-0"
|
|
7370
|
+
[class.rotate-180]="open()"
|
|
7371
|
+
></ui-icon>
|
|
6716
7372
|
}
|
|
6717
7373
|
</span>
|
|
6718
7374
|
</button>
|
|
6719
7375
|
|
|
6720
7376
|
@if (open()) {
|
|
6721
|
-
<div class="
|
|
7377
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
6722
7378
|
@if (headerTpl()) {
|
|
6723
7379
|
<div class="border-b border-(--f-content-border-color)">
|
|
6724
7380
|
<ng-container [ngTemplateOutlet]="headerTpl()" />
|
|
@@ -6727,10 +7383,21 @@ class SelectComponent {
|
|
|
6727
7383
|
@if (filter()) {
|
|
6728
7384
|
<div class="p-2 border-b border-(--f-content-border-color)">
|
|
6729
7385
|
@if (filterTpl()) {
|
|
6730
|
-
<ng-container
|
|
7386
|
+
<ng-container
|
|
7387
|
+
[ngTemplateOutlet]="filterTpl()"
|
|
7388
|
+
[ngTemplateOutletContext]="{
|
|
7389
|
+
$implicit: filterText(),
|
|
7390
|
+
filter: setFilterFn,
|
|
7391
|
+
}"
|
|
7392
|
+
/>
|
|
6731
7393
|
} @else {
|
|
6732
|
-
<div
|
|
6733
|
-
|
|
7394
|
+
<div
|
|
7395
|
+
class="flex items-center gap-2 px-2 py-1.5 bg-(--f-content-hover-background) rounded-lg border border-(--f-content-border-color)"
|
|
7396
|
+
>
|
|
7397
|
+
<ui-icon
|
|
7398
|
+
name="search"
|
|
7399
|
+
class="text-xs text-(--f-text-muted-color) shrink-0"
|
|
7400
|
+
></ui-icon>
|
|
6734
7401
|
<input
|
|
6735
7402
|
#filterInput
|
|
6736
7403
|
type="text"
|
|
@@ -6745,24 +7412,43 @@ class SelectComponent {
|
|
|
6745
7412
|
}
|
|
6746
7413
|
</div>
|
|
6747
7414
|
}
|
|
6748
|
-
<div
|
|
7415
|
+
<div
|
|
7416
|
+
data-select-list
|
|
7417
|
+
[id]="listId()"
|
|
7418
|
+
role="listbox"
|
|
7419
|
+
class="max-h-56 overflow-auto py-1"
|
|
7420
|
+
>
|
|
6749
7421
|
@if (loading()) {
|
|
6750
7422
|
@if (loaderTpl()) {
|
|
6751
7423
|
<ng-container [ngTemplateOutlet]="loaderTpl()" />
|
|
6752
7424
|
} @else {
|
|
6753
7425
|
<div class="py-6 flex flex-col items-center gap-2">
|
|
6754
|
-
<ui-icon
|
|
7426
|
+
<ui-icon
|
|
7427
|
+
[name]="loadingIcon()"
|
|
7428
|
+
[spin]="true"
|
|
7429
|
+
class="text-xl text-(--f-text-muted-color)"
|
|
7430
|
+
></ui-icon>
|
|
6755
7431
|
</div>
|
|
6756
7432
|
}
|
|
6757
7433
|
} @else if (virtualScroll()) {
|
|
6758
|
-
<f-scroller
|
|
7434
|
+
<f-scroller
|
|
7435
|
+
[items]="flatItems()"
|
|
7436
|
+
[itemSize]="virtualScrollItemSize()"
|
|
7437
|
+
scrollHeight="14rem"
|
|
7438
|
+
>
|
|
6759
7439
|
<ng-template let-item let-i="index">
|
|
6760
|
-
<ng-container
|
|
7440
|
+
<ng-container
|
|
7441
|
+
[ngTemplateOutlet]="rowTpl"
|
|
7442
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: i }"
|
|
7443
|
+
/>
|
|
6761
7444
|
</ng-template>
|
|
6762
7445
|
</f-scroller>
|
|
6763
7446
|
} @else {
|
|
6764
7447
|
@for (item of flatItems(); track $index) {
|
|
6765
|
-
<ng-container
|
|
7448
|
+
<ng-container
|
|
7449
|
+
[ngTemplateOutlet]="rowTpl"
|
|
7450
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: $index }"
|
|
7451
|
+
/>
|
|
6766
7452
|
} @empty {
|
|
6767
7453
|
<ng-container [ngTemplateOutlet]="emptyStateTpl" />
|
|
6768
7454
|
}
|
|
@@ -6779,9 +7465,14 @@ class SelectComponent {
|
|
|
6779
7465
|
|
|
6780
7466
|
<ng-template #rowTpl let-item let-i="index">
|
|
6781
7467
|
@if (item.kind === 'group') {
|
|
6782
|
-
<div
|
|
7468
|
+
<div
|
|
7469
|
+
class="h-full flex items-center px-3 py-1.5 text-xs font-semibold uppercase tracking-wide text-(--f-text-muted-color) bg-(--f-content-hover-background)"
|
|
7470
|
+
>
|
|
6783
7471
|
@if (groupTpl()) {
|
|
6784
|
-
<ng-container
|
|
7472
|
+
<ng-container
|
|
7473
|
+
[ngTemplateOutlet]="groupTpl()"
|
|
7474
|
+
[ngTemplateOutletContext]="{ $implicit: item.label }"
|
|
7475
|
+
/>
|
|
6785
7476
|
} @else {
|
|
6786
7477
|
{{ item.label }}
|
|
6787
7478
|
}
|
|
@@ -6802,7 +7493,10 @@ class SelectComponent {
|
|
|
6802
7493
|
}
|
|
6803
7494
|
<span class="flex-1 truncate">
|
|
6804
7495
|
@if (itemTpl()) {
|
|
6805
|
-
<ng-container
|
|
7496
|
+
<ng-container
|
|
7497
|
+
[ngTemplateOutlet]="itemTpl()"
|
|
7498
|
+
[ngTemplateOutletContext]="{ $implicit: item.option }"
|
|
7499
|
+
/>
|
|
6806
7500
|
} @else {
|
|
6807
7501
|
{{ getOptionLabel(item.option) }}
|
|
6808
7502
|
}
|
|
@@ -6819,15 +7513,25 @@ class SelectComponent {
|
|
|
6819
7513
|
<ng-container [ngTemplateOutlet]="emptyFilterTpl()" />
|
|
6820
7514
|
} @else if (filterText()) {
|
|
6821
7515
|
<div class="py-6 flex flex-col items-center gap-2">
|
|
6822
|
-
<ui-icon
|
|
6823
|
-
|
|
7516
|
+
<ui-icon
|
|
7517
|
+
name="search"
|
|
7518
|
+
class="text-2xl text-(--f-text-muted-color)"
|
|
7519
|
+
></ui-icon>
|
|
7520
|
+
<span class="text-sm text-(--f-text-muted-color)">{{
|
|
7521
|
+
emptyFilterMessage()
|
|
7522
|
+
}}</span>
|
|
6824
7523
|
</div>
|
|
6825
7524
|
} @else if (emptyTpl()) {
|
|
6826
7525
|
<ng-container [ngTemplateOutlet]="emptyTpl()" />
|
|
6827
7526
|
} @else {
|
|
6828
7527
|
<div class="py-6 flex flex-col items-center gap-2">
|
|
6829
|
-
<ui-icon
|
|
6830
|
-
|
|
7528
|
+
<ui-icon
|
|
7529
|
+
name="inbox"
|
|
7530
|
+
class="text-2xl text-(--f-text-muted-color)"
|
|
7531
|
+
></ui-icon>
|
|
7532
|
+
<span class="text-sm text-(--f-text-muted-color)">{{
|
|
7533
|
+
emptyMessage()
|
|
7534
|
+
}}</span>
|
|
6831
7535
|
</div>
|
|
6832
7536
|
}
|
|
6833
7537
|
</ng-template>
|
|
@@ -6838,7 +7542,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6838
7542
|
args: [{
|
|
6839
7543
|
selector: 'f-select',
|
|
6840
7544
|
imports: [UiIconComponent, NgTemplateOutlet, ScrollerComponent],
|
|
6841
|
-
providers: [
|
|
7545
|
+
providers: [
|
|
7546
|
+
{
|
|
7547
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7548
|
+
useExisting: forwardRef(() => SelectComponent),
|
|
7549
|
+
multi: true,
|
|
7550
|
+
},
|
|
7551
|
+
],
|
|
6842
7552
|
host: {
|
|
6843
7553
|
'[class]': 'hostClass()',
|
|
6844
7554
|
'[style]': 'style()',
|
|
@@ -6879,25 +7589,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6879
7589
|
/>
|
|
6880
7590
|
} @else if (selectedItemTpl() && selectedOption() != null) {
|
|
6881
7591
|
<span class="flex-1 min-w-0 truncate text-left">
|
|
6882
|
-
<ng-container
|
|
7592
|
+
<ng-container
|
|
7593
|
+
[ngTemplateOutlet]="selectedItemTpl()"
|
|
7594
|
+
[ngTemplateOutletContext]="{ $implicit: selectedOption() }"
|
|
7595
|
+
/>
|
|
6883
7596
|
</span>
|
|
6884
7597
|
} @else {
|
|
6885
|
-
<span
|
|
7598
|
+
<span
|
|
7599
|
+
data-select-label
|
|
7600
|
+
class="flex-1 min-w-0 truncate text-left"
|
|
7601
|
+
[class.text-(--f-form-field-placeholder-color)]="!selectedLabel()"
|
|
7602
|
+
>{{ selectedLabel() || placeholder() }}</span
|
|
7603
|
+
>
|
|
6886
7604
|
}
|
|
6887
7605
|
<span class="flex items-center gap-1 shrink-0">
|
|
6888
7606
|
@if (showClear() && value() != null && !disabled() && !readonly()) {
|
|
6889
|
-
<ui-icon
|
|
7607
|
+
<ui-icon
|
|
7608
|
+
[name]="clearIcon()"
|
|
7609
|
+
class="text-xs text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) shrink-0"
|
|
7610
|
+
(click)="clear($event)"
|
|
7611
|
+
></ui-icon>
|
|
6890
7612
|
}
|
|
6891
7613
|
@if (loading()) {
|
|
6892
|
-
<ui-icon
|
|
7614
|
+
<ui-icon
|
|
7615
|
+
[name]="loadingIcon()"
|
|
7616
|
+
[spin]="true"
|
|
7617
|
+
class="text-xs text-(--f-form-field-placeholder-color) shrink-0"
|
|
7618
|
+
></ui-icon>
|
|
6893
7619
|
} @else {
|
|
6894
|
-
<ui-icon
|
|
7620
|
+
<ui-icon
|
|
7621
|
+
[name]="dropdownIcon()"
|
|
7622
|
+
class="text-xs text-(--f-form-field-placeholder-color) transition-transform duration-[var(--f-transition-duration)] shrink-0"
|
|
7623
|
+
[class.rotate-180]="open()"
|
|
7624
|
+
></ui-icon>
|
|
6895
7625
|
}
|
|
6896
7626
|
</span>
|
|
6897
7627
|
</button>
|
|
6898
7628
|
|
|
6899
7629
|
@if (open()) {
|
|
6900
|
-
<div class="
|
|
7630
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
6901
7631
|
@if (headerTpl()) {
|
|
6902
7632
|
<div class="border-b border-(--f-content-border-color)">
|
|
6903
7633
|
<ng-container [ngTemplateOutlet]="headerTpl()" />
|
|
@@ -6906,10 +7636,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6906
7636
|
@if (filter()) {
|
|
6907
7637
|
<div class="p-2 border-b border-(--f-content-border-color)">
|
|
6908
7638
|
@if (filterTpl()) {
|
|
6909
|
-
<ng-container
|
|
7639
|
+
<ng-container
|
|
7640
|
+
[ngTemplateOutlet]="filterTpl()"
|
|
7641
|
+
[ngTemplateOutletContext]="{
|
|
7642
|
+
$implicit: filterText(),
|
|
7643
|
+
filter: setFilterFn,
|
|
7644
|
+
}"
|
|
7645
|
+
/>
|
|
6910
7646
|
} @else {
|
|
6911
|
-
<div
|
|
6912
|
-
|
|
7647
|
+
<div
|
|
7648
|
+
class="flex items-center gap-2 px-2 py-1.5 bg-(--f-content-hover-background) rounded-lg border border-(--f-content-border-color)"
|
|
7649
|
+
>
|
|
7650
|
+
<ui-icon
|
|
7651
|
+
name="search"
|
|
7652
|
+
class="text-xs text-(--f-text-muted-color) shrink-0"
|
|
7653
|
+
></ui-icon>
|
|
6913
7654
|
<input
|
|
6914
7655
|
#filterInput
|
|
6915
7656
|
type="text"
|
|
@@ -6924,24 +7665,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6924
7665
|
}
|
|
6925
7666
|
</div>
|
|
6926
7667
|
}
|
|
6927
|
-
<div
|
|
7668
|
+
<div
|
|
7669
|
+
data-select-list
|
|
7670
|
+
[id]="listId()"
|
|
7671
|
+
role="listbox"
|
|
7672
|
+
class="max-h-56 overflow-auto py-1"
|
|
7673
|
+
>
|
|
6928
7674
|
@if (loading()) {
|
|
6929
7675
|
@if (loaderTpl()) {
|
|
6930
7676
|
<ng-container [ngTemplateOutlet]="loaderTpl()" />
|
|
6931
7677
|
} @else {
|
|
6932
7678
|
<div class="py-6 flex flex-col items-center gap-2">
|
|
6933
|
-
<ui-icon
|
|
7679
|
+
<ui-icon
|
|
7680
|
+
[name]="loadingIcon()"
|
|
7681
|
+
[spin]="true"
|
|
7682
|
+
class="text-xl text-(--f-text-muted-color)"
|
|
7683
|
+
></ui-icon>
|
|
6934
7684
|
</div>
|
|
6935
7685
|
}
|
|
6936
7686
|
} @else if (virtualScroll()) {
|
|
6937
|
-
<f-scroller
|
|
7687
|
+
<f-scroller
|
|
7688
|
+
[items]="flatItems()"
|
|
7689
|
+
[itemSize]="virtualScrollItemSize()"
|
|
7690
|
+
scrollHeight="14rem"
|
|
7691
|
+
>
|
|
6938
7692
|
<ng-template let-item let-i="index">
|
|
6939
|
-
<ng-container
|
|
7693
|
+
<ng-container
|
|
7694
|
+
[ngTemplateOutlet]="rowTpl"
|
|
7695
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: i }"
|
|
7696
|
+
/>
|
|
6940
7697
|
</ng-template>
|
|
6941
7698
|
</f-scroller>
|
|
6942
7699
|
} @else {
|
|
6943
7700
|
@for (item of flatItems(); track $index) {
|
|
6944
|
-
<ng-container
|
|
7701
|
+
<ng-container
|
|
7702
|
+
[ngTemplateOutlet]="rowTpl"
|
|
7703
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: $index }"
|
|
7704
|
+
/>
|
|
6945
7705
|
} @empty {
|
|
6946
7706
|
<ng-container [ngTemplateOutlet]="emptyStateTpl" />
|
|
6947
7707
|
}
|
|
@@ -6958,9 +7718,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6958
7718
|
|
|
6959
7719
|
<ng-template #rowTpl let-item let-i="index">
|
|
6960
7720
|
@if (item.kind === 'group') {
|
|
6961
|
-
<div
|
|
7721
|
+
<div
|
|
7722
|
+
class="h-full flex items-center px-3 py-1.5 text-xs font-semibold uppercase tracking-wide text-(--f-text-muted-color) bg-(--f-content-hover-background)"
|
|
7723
|
+
>
|
|
6962
7724
|
@if (groupTpl()) {
|
|
6963
|
-
<ng-container
|
|
7725
|
+
<ng-container
|
|
7726
|
+
[ngTemplateOutlet]="groupTpl()"
|
|
7727
|
+
[ngTemplateOutletContext]="{ $implicit: item.label }"
|
|
7728
|
+
/>
|
|
6964
7729
|
} @else {
|
|
6965
7730
|
{{ item.label }}
|
|
6966
7731
|
}
|
|
@@ -6981,7 +7746,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6981
7746
|
}
|
|
6982
7747
|
<span class="flex-1 truncate">
|
|
6983
7748
|
@if (itemTpl()) {
|
|
6984
|
-
<ng-container
|
|
7749
|
+
<ng-container
|
|
7750
|
+
[ngTemplateOutlet]="itemTpl()"
|
|
7751
|
+
[ngTemplateOutletContext]="{ $implicit: item.option }"
|
|
7752
|
+
/>
|
|
6985
7753
|
} @else {
|
|
6986
7754
|
{{ getOptionLabel(item.option) }}
|
|
6987
7755
|
}
|
|
@@ -6998,21 +7766,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6998
7766
|
<ng-container [ngTemplateOutlet]="emptyFilterTpl()" />
|
|
6999
7767
|
} @else if (filterText()) {
|
|
7000
7768
|
<div class="py-6 flex flex-col items-center gap-2">
|
|
7001
|
-
<ui-icon
|
|
7002
|
-
|
|
7769
|
+
<ui-icon
|
|
7770
|
+
name="search"
|
|
7771
|
+
class="text-2xl text-(--f-text-muted-color)"
|
|
7772
|
+
></ui-icon>
|
|
7773
|
+
<span class="text-sm text-(--f-text-muted-color)">{{
|
|
7774
|
+
emptyFilterMessage()
|
|
7775
|
+
}}</span>
|
|
7003
7776
|
</div>
|
|
7004
7777
|
} @else if (emptyTpl()) {
|
|
7005
7778
|
<ng-container [ngTemplateOutlet]="emptyTpl()" />
|
|
7006
7779
|
} @else {
|
|
7007
7780
|
<div class="py-6 flex flex-col items-center gap-2">
|
|
7008
|
-
<ui-icon
|
|
7009
|
-
|
|
7781
|
+
<ui-icon
|
|
7782
|
+
name="inbox"
|
|
7783
|
+
class="text-2xl text-(--f-text-muted-color)"
|
|
7784
|
+
></ui-icon>
|
|
7785
|
+
<span class="text-sm text-(--f-text-muted-color)">{{
|
|
7786
|
+
emptyMessage()
|
|
7787
|
+
}}</span>
|
|
7010
7788
|
</div>
|
|
7011
7789
|
}
|
|
7012
7790
|
</ng-template>
|
|
7013
7791
|
`,
|
|
7014
7792
|
}]
|
|
7015
|
-
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], clearIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIcon", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], checkmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkmark", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], _triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], _editableInputRef: [{ type: i0.ViewChild, args: ['editableInputEl', { isSignal: true }] }], _filterInputRef: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], selectedItemRef: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], itemRef: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], emptyFilterRef: [{ type: i0.ContentChild, args: ['emptyfilter', { isSignal: true }] }], loaderRef: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], filterRef: [{ type: i0.ContentChild, args: ['filter', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
7793
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], clearIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIcon", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], checkmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkmark", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], _triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], _editableInputRef: [{ type: i0.ViewChild, args: ['editableInputEl', { isSignal: true }] }], _filterInputRef: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], _panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], selectedItemRef: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], itemRef: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], emptyFilterRef: [{ type: i0.ContentChild, args: ['emptyfilter', { isSignal: true }] }], loaderRef: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], filterRef: [{ type: i0.ContentChild, args: ['filter', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
7016
7794
|
|
|
7017
7795
|
class SelectButtonComponent {
|
|
7018
7796
|
options = input([], /* @ts-ignore */
|
|
@@ -10962,12 +11740,26 @@ class SortIconComponent {
|
|
|
10962
11740
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SortIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10963
11741
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SortIconComponent, isStandalone: true, selector: "f-sorticon", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
10964
11742
|
<span class="inline-flex items-center gap-0.5 ml-1">
|
|
10965
|
-
<span class="inline-flex flex-col
|
|
10966
|
-
<ui-icon
|
|
10967
|
-
|
|
11743
|
+
<span class="inline-flex flex-col leading-none">
|
|
11744
|
+
<ui-icon
|
|
11745
|
+
name="chevron-up"
|
|
11746
|
+
[class]="
|
|
11747
|
+
'h-[10px] w-[10px] ' +
|
|
11748
|
+
(direction() === 1 ? 'opacity-100 text-primary' : 'opacity-40')
|
|
11749
|
+
"
|
|
11750
|
+
></ui-icon>
|
|
11751
|
+
<ui-icon
|
|
11752
|
+
name="chevron-down"
|
|
11753
|
+
[class]="
|
|
11754
|
+
'h-[10px] w-[10px] ' +
|
|
11755
|
+
(direction() === -1 ? 'opacity-100 text-primary' : 'opacity-40')
|
|
11756
|
+
"
|
|
11757
|
+
></ui-icon>
|
|
10968
11758
|
</span>
|
|
10969
11759
|
@if (priority() !== null) {
|
|
10970
|
-
<sup class="text-[9px] font-semibold text-primary">{{
|
|
11760
|
+
<sup class="text-[9px] font-semibold text-primary">{{
|
|
11761
|
+
priority()
|
|
11762
|
+
}}</sup>
|
|
10971
11763
|
}
|
|
10972
11764
|
</span>
|
|
10973
11765
|
`, isInline: true, dependencies: [{ kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }] });
|
|
@@ -10979,12 +11771,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
10979
11771
|
imports: [UiIconComponent],
|
|
10980
11772
|
template: `
|
|
10981
11773
|
<span class="inline-flex items-center gap-0.5 ml-1">
|
|
10982
|
-
<span class="inline-flex flex-col
|
|
10983
|
-
<ui-icon
|
|
10984
|
-
|
|
11774
|
+
<span class="inline-flex flex-col leading-none">
|
|
11775
|
+
<ui-icon
|
|
11776
|
+
name="chevron-up"
|
|
11777
|
+
[class]="
|
|
11778
|
+
'h-[10px] w-[10px] ' +
|
|
11779
|
+
(direction() === 1 ? 'opacity-100 text-primary' : 'opacity-40')
|
|
11780
|
+
"
|
|
11781
|
+
></ui-icon>
|
|
11782
|
+
<ui-icon
|
|
11783
|
+
name="chevron-down"
|
|
11784
|
+
[class]="
|
|
11785
|
+
'h-[10px] w-[10px] ' +
|
|
11786
|
+
(direction() === -1 ? 'opacity-100 text-primary' : 'opacity-40')
|
|
11787
|
+
"
|
|
11788
|
+
></ui-icon>
|
|
10985
11789
|
</span>
|
|
10986
11790
|
@if (priority() !== null) {
|
|
10987
|
-
<sup class="text-[9px] font-semibold text-primary">{{
|
|
11791
|
+
<sup class="text-[9px] font-semibold text-primary">{{
|
|
11792
|
+
priority()
|
|
11793
|
+
}}</sup>
|
|
10988
11794
|
}
|
|
10989
11795
|
</span>
|
|
10990
11796
|
`,
|
|
@@ -11328,6 +12134,63 @@ class AutoCompleteComponent {
|
|
|
11328
12134
|
_el = inject(ElementRef);
|
|
11329
12135
|
_id = `f-autocomplete-${nextAutoCompleteId++}`;
|
|
11330
12136
|
listboxId = `${this._id}-list`;
|
|
12137
|
+
anchorRef = viewChild('anchor', /* @ts-ignore */
|
|
12138
|
+
...(ngDevMode ? [{ debugName: "anchorRef" }] : /* istanbul ignore next */ []));
|
|
12139
|
+
panelRef = viewChild('panel', /* @ts-ignore */
|
|
12140
|
+
...(ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []));
|
|
12141
|
+
_panelTop = signal(0, /* @ts-ignore */
|
|
12142
|
+
...(ngDevMode ? [{ debugName: "_panelTop" }] : /* istanbul ignore next */ []));
|
|
12143
|
+
_panelLeft = signal(0, /* @ts-ignore */
|
|
12144
|
+
...(ngDevMode ? [{ debugName: "_panelLeft" }] : /* istanbul ignore next */ []));
|
|
12145
|
+
_panelWidth = signal(0, /* @ts-ignore */
|
|
12146
|
+
...(ngDevMode ? [{ debugName: "_panelWidth" }] : /* istanbul ignore next */ []));
|
|
12147
|
+
panelClass = computed(() => {
|
|
12148
|
+
const position = this.appendTo() === 'body' ? 'fixed' : 'absolute w-full mt-1';
|
|
12149
|
+
return `${position} z-50 bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-lg overflow-hidden`;
|
|
12150
|
+
}, /* @ts-ignore */
|
|
12151
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
12152
|
+
panelStyle = computed(() => {
|
|
12153
|
+
if (this.appendTo() !== 'body')
|
|
12154
|
+
return {};
|
|
12155
|
+
return {
|
|
12156
|
+
top: `${this._panelTop()}px`,
|
|
12157
|
+
left: `${this._panelLeft()}px`,
|
|
12158
|
+
width: `${this._panelWidth()}px`,
|
|
12159
|
+
};
|
|
12160
|
+
}, /* @ts-ignore */
|
|
12161
|
+
...(ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
12162
|
+
position() {
|
|
12163
|
+
const anchorEl = this.anchorRef()?.nativeElement;
|
|
12164
|
+
if (!anchorEl || typeof window === 'undefined')
|
|
12165
|
+
return;
|
|
12166
|
+
const rect = anchorEl.getBoundingClientRect();
|
|
12167
|
+
this._panelTop.set(rect.bottom + 4);
|
|
12168
|
+
this._panelLeft.set(Math.max(8, rect.left));
|
|
12169
|
+
this._panelWidth.set(rect.width);
|
|
12170
|
+
}
|
|
12171
|
+
adjustForViewport() {
|
|
12172
|
+
const panelEl = this.panelRef()?.nativeElement;
|
|
12173
|
+
const anchorEl = this.anchorRef()?.nativeElement;
|
|
12174
|
+
if (!panelEl || !anchorEl || typeof window === 'undefined')
|
|
12175
|
+
return;
|
|
12176
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
12177
|
+
const panelRect = panelEl.getBoundingClientRect();
|
|
12178
|
+
const gap = 4;
|
|
12179
|
+
this._panelLeft.set(Math.max(8, Math.min(anchorRect.left, window.innerWidth - panelRect.width - 8)));
|
|
12180
|
+
if (anchorRect.bottom + panelRect.height + gap > window.innerHeight) {
|
|
12181
|
+
this._panelTop.set(Math.max(8, anchorRect.top - panelRect.height - gap));
|
|
12182
|
+
}
|
|
12183
|
+
}
|
|
12184
|
+
openPanel() {
|
|
12185
|
+
if (this.appendTo() === 'body') {
|
|
12186
|
+
this.position();
|
|
12187
|
+
setTimeout(() => this.adjustForViewport(), 0);
|
|
12188
|
+
}
|
|
12189
|
+
this._open.set(true);
|
|
12190
|
+
}
|
|
12191
|
+
constructor() {
|
|
12192
|
+
repositionOnScroll(() => this.open() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
12193
|
+
}
|
|
11331
12194
|
onDocumentClick(e) {
|
|
11332
12195
|
if (this.open() && !this._el.nativeElement.contains(e.target)) {
|
|
11333
12196
|
this._open.set(false);
|
|
@@ -11359,6 +12222,8 @@ class AutoCompleteComponent {
|
|
|
11359
12222
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
11360
12223
|
style = input(null, /* @ts-ignore */
|
|
11361
12224
|
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
12225
|
+
appendTo = input('self', /* @ts-ignore */
|
|
12226
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
11362
12227
|
virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11363
12228
|
virtualScrollItemSize = input(38, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
11364
12229
|
scrollHeight = input('14rem', /* @ts-ignore */
|
|
@@ -11411,19 +12276,34 @@ class AutoCompleteComponent {
|
|
|
11411
12276
|
...(ngDevMode ? [{ debugName: "loaderRef" }] : /* istanbul ignore next */ []));
|
|
11412
12277
|
fTemplates = contentChildren(FTemplateDirective, /* @ts-ignore */
|
|
11413
12278
|
...(ngDevMode ? [{ debugName: "fTemplates" }] : /* istanbul ignore next */ []));
|
|
11414
|
-
itemTpl = computed(() => this.itemRef() ??
|
|
12279
|
+
itemTpl = computed(() => this.itemRef() ??
|
|
12280
|
+
this.fTemplates().find((t) => t.fTemplate() === 'item')?.templateRef ??
|
|
12281
|
+
null, /* @ts-ignore */
|
|
11415
12282
|
...(ngDevMode ? [{ debugName: "itemTpl" }] : /* istanbul ignore next */ []));
|
|
11416
|
-
groupTpl = computed(() => this.groupRef() ??
|
|
12283
|
+
groupTpl = computed(() => this.groupRef() ??
|
|
12284
|
+
this.fTemplates().find((t) => t.fTemplate() === 'group')?.templateRef ??
|
|
12285
|
+
null, /* @ts-ignore */
|
|
11417
12286
|
...(ngDevMode ? [{ debugName: "groupTpl" }] : /* istanbul ignore next */ []));
|
|
11418
|
-
headerTpl = computed(() => this.headerRef() ??
|
|
12287
|
+
headerTpl = computed(() => this.headerRef() ??
|
|
12288
|
+
this.fTemplates().find((t) => t.fTemplate() === 'header')?.templateRef ??
|
|
12289
|
+
null, /* @ts-ignore */
|
|
11419
12290
|
...(ngDevMode ? [{ debugName: "headerTpl" }] : /* istanbul ignore next */ []));
|
|
11420
|
-
footerTpl = computed(() => this.footerRef() ??
|
|
12291
|
+
footerTpl = computed(() => this.footerRef() ??
|
|
12292
|
+
this.fTemplates().find((t) => t.fTemplate() === 'footer')?.templateRef ??
|
|
12293
|
+
null, /* @ts-ignore */
|
|
11421
12294
|
...(ngDevMode ? [{ debugName: "footerTpl" }] : /* istanbul ignore next */ []));
|
|
11422
|
-
emptyTpl = computed(() => this.emptyRef() ??
|
|
12295
|
+
emptyTpl = computed(() => this.emptyRef() ??
|
|
12296
|
+
this.fTemplates().find((t) => t.fTemplate() === 'empty')?.templateRef ??
|
|
12297
|
+
null, /* @ts-ignore */
|
|
11423
12298
|
...(ngDevMode ? [{ debugName: "emptyTpl" }] : /* istanbul ignore next */ []));
|
|
11424
|
-
selectedItemTpl = computed(() => this.selectedItemRef() ??
|
|
12299
|
+
selectedItemTpl = computed(() => this.selectedItemRef() ??
|
|
12300
|
+
this.fTemplates().find((t) => t.fTemplate() === 'selectedItem')
|
|
12301
|
+
?.templateRef ??
|
|
12302
|
+
null, /* @ts-ignore */
|
|
11425
12303
|
...(ngDevMode ? [{ debugName: "selectedItemTpl" }] : /* istanbul ignore next */ []));
|
|
11426
|
-
loaderTpl = computed(() => this.loaderRef() ??
|
|
12304
|
+
loaderTpl = computed(() => this.loaderRef() ??
|
|
12305
|
+
this.fTemplates().find((t) => t.fTemplate() === 'loader')?.templateRef ??
|
|
12306
|
+
null, /* @ts-ignore */
|
|
11427
12307
|
...(ngDevMode ? [{ debugName: "loaderTpl" }] : /* istanbul ignore next */ []));
|
|
11428
12308
|
filteredSuggestions = computed(() => this.suggestions(), /* @ts-ignore */
|
|
11429
12309
|
...(ngDevMode ? [{ debugName: "filteredSuggestions" }] : /* istanbul ignore next */ []));
|
|
@@ -11432,18 +12312,26 @@ class AutoCompleteComponent {
|
|
|
11432
12312
|
if (!this.group())
|
|
11433
12313
|
return list;
|
|
11434
12314
|
const groups = list;
|
|
11435
|
-
return groups.flatMap(g =>
|
|
12315
|
+
return groups.flatMap((g) => g[this.optionGroupChildren()] ?? []);
|
|
11436
12316
|
}, /* @ts-ignore */
|
|
11437
12317
|
...(ngDevMode ? [{ debugName: "flatSuggestions" }] : /* istanbul ignore next */ []));
|
|
11438
12318
|
rows = computed(() => {
|
|
11439
12319
|
if (!this.group()) {
|
|
11440
|
-
return this.filteredSuggestions().map((item, i) => ({
|
|
12320
|
+
return this.filteredSuggestions().map((item, i) => ({
|
|
12321
|
+
type: 'item',
|
|
12322
|
+
item,
|
|
12323
|
+
flatIndex: i,
|
|
12324
|
+
}));
|
|
11441
12325
|
}
|
|
11442
12326
|
const groups = this.filteredSuggestions();
|
|
11443
12327
|
const rows = [];
|
|
11444
12328
|
let flatIndex = 0;
|
|
11445
12329
|
for (const g of groups) {
|
|
11446
|
-
rows.push({
|
|
12330
|
+
rows.push({
|
|
12331
|
+
type: 'group',
|
|
12332
|
+
groupItem: g,
|
|
12333
|
+
groupLabel: String(g[this.optionGroupLabel()] ?? ''),
|
|
12334
|
+
});
|
|
11447
12335
|
const children = g[this.optionGroupChildren()] ?? [];
|
|
11448
12336
|
for (const item of children) {
|
|
11449
12337
|
rows.push({ type: 'item', item, flatIndex: flatIndex++ });
|
|
@@ -11467,7 +12355,7 @@ class AutoCompleteComponent {
|
|
|
11467
12355
|
onDropdownButtonClick(e) {
|
|
11468
12356
|
this.onDropdownClick.emit(e);
|
|
11469
12357
|
this.completeMethod.emit({ originalEvent: e, query: this.query });
|
|
11470
|
-
this.
|
|
12358
|
+
this.openPanel();
|
|
11471
12359
|
this._activeIndex.set(-1);
|
|
11472
12360
|
}
|
|
11473
12361
|
wrapperClass = computed(() => {
|
|
@@ -11493,15 +12381,18 @@ class AutoCompleteComponent {
|
|
|
11493
12381
|
}
|
|
11494
12382
|
this._debounce = setTimeout(() => {
|
|
11495
12383
|
this.completeMethod.emit({ originalEvent: new Event('input'), query: q });
|
|
11496
|
-
this.
|
|
12384
|
+
this.openPanel();
|
|
11497
12385
|
this._activeIndex.set(-1);
|
|
11498
12386
|
}, this.delay());
|
|
11499
12387
|
}
|
|
11500
12388
|
_handleFocus() {
|
|
11501
12389
|
this.focusEvent.emit();
|
|
11502
12390
|
if (this.completeOnFocus() && this.query.length >= this.minLength()) {
|
|
11503
|
-
this.completeMethod.emit({
|
|
11504
|
-
|
|
12391
|
+
this.completeMethod.emit({
|
|
12392
|
+
originalEvent: new Event('focus'),
|
|
12393
|
+
query: this.query,
|
|
12394
|
+
});
|
|
12395
|
+
this.openPanel();
|
|
11505
12396
|
}
|
|
11506
12397
|
}
|
|
11507
12398
|
_handleBlur() {
|
|
@@ -11518,11 +12409,11 @@ class AutoCompleteComponent {
|
|
|
11518
12409
|
const len = this.flatSuggestions().length;
|
|
11519
12410
|
if (e.key === 'ArrowDown') {
|
|
11520
12411
|
e.preventDefault();
|
|
11521
|
-
this._activeIndex.update(i => Math.min(i + 1, len - 1));
|
|
12412
|
+
this._activeIndex.update((i) => Math.min(i + 1, len - 1));
|
|
11522
12413
|
}
|
|
11523
12414
|
else if (e.key === 'ArrowUp') {
|
|
11524
12415
|
e.preventDefault();
|
|
11525
|
-
this._activeIndex.update(i => Math.max(i - 1, -1));
|
|
12416
|
+
this._activeIndex.update((i) => Math.max(i - 1, -1));
|
|
11526
12417
|
}
|
|
11527
12418
|
else if (e.key === 'Enter') {
|
|
11528
12419
|
e.preventDefault();
|
|
@@ -11533,7 +12424,10 @@ class AutoCompleteComponent {
|
|
|
11533
12424
|
else if (e.key === 'Escape') {
|
|
11534
12425
|
this._open.set(false);
|
|
11535
12426
|
}
|
|
11536
|
-
else if (e.key === 'Backspace' &&
|
|
12427
|
+
else if (e.key === 'Backspace' &&
|
|
12428
|
+
this.multiple() &&
|
|
12429
|
+
this.query === '' &&
|
|
12430
|
+
this.selectedItems().length) {
|
|
11537
12431
|
this.removeChip(this.selectedItems().length - 1, e);
|
|
11538
12432
|
}
|
|
11539
12433
|
}
|
|
@@ -11542,13 +12436,17 @@ class AutoCompleteComponent {
|
|
|
11542
12436
|
return;
|
|
11543
12437
|
const el = e.target;
|
|
11544
12438
|
if (el.scrollHeight - el.scrollTop - el.clientHeight < 40) {
|
|
11545
|
-
this.onLazyLoad.emit({
|
|
12439
|
+
this.onLazyLoad.emit({
|
|
12440
|
+
originalEvent: e,
|
|
12441
|
+
first: 0,
|
|
12442
|
+
last: this.flatSuggestions().length,
|
|
12443
|
+
});
|
|
11546
12444
|
}
|
|
11547
12445
|
}
|
|
11548
12446
|
selectItem(e, item) {
|
|
11549
12447
|
e.preventDefault();
|
|
11550
12448
|
if (this.multiple()) {
|
|
11551
|
-
this._selectedItems.update(arr => [...arr, item]);
|
|
12449
|
+
this._selectedItems.update((arr) => [...arr, item]);
|
|
11552
12450
|
this.query = '';
|
|
11553
12451
|
const val = this.selectedItems();
|
|
11554
12452
|
this._onChange(val);
|
|
@@ -11567,7 +12465,7 @@ class AutoCompleteComponent {
|
|
|
11567
12465
|
}
|
|
11568
12466
|
removeChip(idx, e) {
|
|
11569
12467
|
const removed = this.selectedItems()[idx];
|
|
11570
|
-
this._selectedItems.update(arr => arr.filter((_, i) => i !== idx));
|
|
12468
|
+
this._selectedItems.update((arr) => arr.filter((_, i) => i !== idx));
|
|
11571
12469
|
this.onUnselect.emit({ originalEvent: e, value: removed });
|
|
11572
12470
|
this._onChange(this.selectedItems());
|
|
11573
12471
|
}
|
|
@@ -11593,12 +12491,27 @@ class AutoCompleteComponent {
|
|
|
11593
12491
|
this.query = val ? this.getLabel(val) : '';
|
|
11594
12492
|
}
|
|
11595
12493
|
}
|
|
11596
|
-
registerOnChange(fn) {
|
|
11597
|
-
|
|
12494
|
+
registerOnChange(fn) {
|
|
12495
|
+
this._onChange = fn;
|
|
12496
|
+
}
|
|
12497
|
+
registerOnTouched(fn) {
|
|
12498
|
+
this._onTouched = fn;
|
|
12499
|
+
}
|
|
11598
12500
|
setDisabledState() { }
|
|
11599
12501
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AutoCompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11600
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AutoCompleteComponent, isStandalone: true, selector: "f-autocomplete", inputs: { suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onDropdownClick: "onDropdownClick", onClear: "onClear", focusEvent: "focusEvent", blurEvent: "blurEvent", onChange: "onChange", onLazyLoad: "onLazyLoad" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
11601
|
-
|
|
12502
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AutoCompleteComponent, isStandalone: true, selector: "f-autocomplete", inputs: { suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onDropdownClick: "onDropdownClick", onClear: "onClear", focusEvent: "focusEvent", blurEvent: "blurEvent", onChange: "onChange", onLazyLoad: "onLazyLoad" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
12503
|
+
{
|
|
12504
|
+
provide: NG_VALUE_ACCESSOR,
|
|
12505
|
+
useExisting: forwardRef(() => AutoCompleteComponent),
|
|
12506
|
+
multi: true,
|
|
12507
|
+
},
|
|
12508
|
+
], queries: [{ propertyName: "itemRef", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "selectedItemRef", first: true, predicate: ["selectedItem"], descendants: true, isSignal: true }, { propertyName: "loaderRef", first: true, predicate: ["loader"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "anchorRef", first: true, predicate: ["anchor"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
12509
|
+
<div
|
|
12510
|
+
#anchor
|
|
12511
|
+
class="relative w-full"
|
|
12512
|
+
[class.opacity-60]="disabled()"
|
|
12513
|
+
[class.pointer-events-none]="disabled()"
|
|
12514
|
+
>
|
|
11602
12515
|
@if (multiple()) {
|
|
11603
12516
|
<div class="relative">
|
|
11604
12517
|
<div
|
|
@@ -11608,13 +12521,23 @@ class AutoCompleteComponent {
|
|
|
11608
12521
|
(click)="inputEl.focus()"
|
|
11609
12522
|
>
|
|
11610
12523
|
@for (chip of selectedItems(); track $index) {
|
|
11611
|
-
<span
|
|
12524
|
+
<span
|
|
12525
|
+
class="inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-primary/10 text-primary text-xs font-medium"
|
|
12526
|
+
>
|
|
11612
12527
|
@if (selectedItemTpl()) {
|
|
11613
|
-
<ng-container
|
|
12528
|
+
<ng-container
|
|
12529
|
+
[ngTemplateOutlet]="selectedItemTpl()"
|
|
12530
|
+
[ngTemplateOutletContext]="{ $implicit: chip }"
|
|
12531
|
+
/>
|
|
11614
12532
|
} @else {
|
|
11615
12533
|
{{ getLabel(chip) }}
|
|
11616
12534
|
}
|
|
11617
|
-
<button
|
|
12535
|
+
<button
|
|
12536
|
+
type="button"
|
|
12537
|
+
aria-label="Remove"
|
|
12538
|
+
class="inline-flex items-center justify-center hover:text-primary-emphasis cursor-pointer"
|
|
12539
|
+
(click)="removeChip($index, $event)"
|
|
12540
|
+
>
|
|
11618
12541
|
<ui-icon name="times" class="text-[10px]"></ui-icon>
|
|
11619
12542
|
</button>
|
|
11620
12543
|
</span>
|
|
@@ -11634,14 +12557,24 @@ class AutoCompleteComponent {
|
|
|
11634
12557
|
aria-haspopup="listbox"
|
|
11635
12558
|
[attr.aria-expanded]="open()"
|
|
11636
12559
|
[attr.aria-controls]="listboxId"
|
|
11637
|
-
[attr.aria-activedescendant]="
|
|
12560
|
+
[attr.aria-activedescendant]="
|
|
12561
|
+
activeIndex() >= 0 ? listboxId + '-' + activeIndex() : null
|
|
12562
|
+
"
|
|
11638
12563
|
/>
|
|
11639
12564
|
</div>
|
|
11640
12565
|
<span class="absolute right-2 top-0 h-full flex items-center gap-1">
|
|
11641
12566
|
@if (loading()) {
|
|
11642
|
-
<ui-icon
|
|
12567
|
+
<ui-icon
|
|
12568
|
+
[name]="loadingIcon()"
|
|
12569
|
+
[spin]="true"
|
|
12570
|
+
class="text-xs text-(--f-form-field-placeholder-color)"
|
|
12571
|
+
></ui-icon>
|
|
11643
12572
|
} @else if (showClear() && selectedItems().length && !disabled()) {
|
|
11644
|
-
<ui-icon
|
|
12573
|
+
<ui-icon
|
|
12574
|
+
name="x"
|
|
12575
|
+
class="text-xs text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) cursor-pointer"
|
|
12576
|
+
(click)="clear($event)"
|
|
12577
|
+
></ui-icon>
|
|
11645
12578
|
}
|
|
11646
12579
|
</span>
|
|
11647
12580
|
</div>
|
|
@@ -11662,17 +12595,33 @@ class AutoCompleteComponent {
|
|
|
11662
12595
|
aria-haspopup="listbox"
|
|
11663
12596
|
[attr.aria-expanded]="open()"
|
|
11664
12597
|
[attr.aria-controls]="listboxId"
|
|
11665
|
-
[attr.aria-activedescendant]="
|
|
12598
|
+
[attr.aria-activedescendant]="
|
|
12599
|
+
activeIndex() >= 0 ? listboxId + '-' + activeIndex() : null
|
|
12600
|
+
"
|
|
11666
12601
|
/>
|
|
11667
|
-
<span
|
|
12602
|
+
<span
|
|
12603
|
+
class="absolute right-0 top-0 h-full flex items-center gap-1 pr-3"
|
|
12604
|
+
>
|
|
11668
12605
|
@if (loading()) {
|
|
11669
|
-
<ui-icon
|
|
12606
|
+
<ui-icon
|
|
12607
|
+
[name]="loadingIcon()"
|
|
12608
|
+
[spin]="true"
|
|
12609
|
+
class="text-xs text-(--f-form-field-placeholder-color)"
|
|
12610
|
+
></ui-icon>
|
|
11670
12611
|
} @else {
|
|
11671
12612
|
@if (showClear() && query && !disabled()) {
|
|
11672
|
-
<ui-icon
|
|
12613
|
+
<ui-icon
|
|
12614
|
+
name="x"
|
|
12615
|
+
class="text-xs text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) cursor-pointer"
|
|
12616
|
+
(click)="clear($event)"
|
|
12617
|
+
></ui-icon>
|
|
11673
12618
|
}
|
|
11674
12619
|
@if (dropdown()) {
|
|
11675
|
-
<button
|
|
12620
|
+
<button
|
|
12621
|
+
type="button"
|
|
12622
|
+
class="inline-flex items-center text-(--f-text-muted-color) hover:text-(--f-text-hover-color)"
|
|
12623
|
+
(click)="onDropdownButtonClick($event)"
|
|
12624
|
+
>
|
|
11676
12625
|
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
11677
12626
|
</button>
|
|
11678
12627
|
}
|
|
@@ -11682,7 +12631,7 @@ class AutoCompleteComponent {
|
|
|
11682
12631
|
}
|
|
11683
12632
|
|
|
11684
12633
|
@if (open()) {
|
|
11685
|
-
<div class="
|
|
12634
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
11686
12635
|
@if (headerTpl()) {
|
|
11687
12636
|
<div class="p-2 border-b border-(--f-content-border-color)">
|
|
11688
12637
|
<ng-container [ngTemplateOutlet]="headerTpl()" />
|
|
@@ -11694,11 +12643,17 @@ class AutoCompleteComponent {
|
|
|
11694
12643
|
@if (loaderTpl()) {
|
|
11695
12644
|
<ng-container [ngTemplateOutlet]="loaderTpl()" />
|
|
11696
12645
|
} @else {
|
|
11697
|
-
<ui-icon
|
|
12646
|
+
<ui-icon
|
|
12647
|
+
[name]="loadingIcon()"
|
|
12648
|
+
[spin]="true"
|
|
12649
|
+
class="text-lg text-(--f-text-muted-color)"
|
|
12650
|
+
></ui-icon>
|
|
11698
12651
|
}
|
|
11699
12652
|
</div>
|
|
11700
12653
|
} @else if (flatSuggestions().length === 0) {
|
|
11701
|
-
<div
|
|
12654
|
+
<div
|
|
12655
|
+
class="px-3 py-6 flex flex-col items-center gap-2 text-(--f-text-muted-color)"
|
|
12656
|
+
>
|
|
11702
12657
|
@if (emptyTpl()) {
|
|
11703
12658
|
<ng-container [ngTemplateOutlet]="emptyTpl()" />
|
|
11704
12659
|
} @else {
|
|
@@ -11707,18 +12662,29 @@ class AutoCompleteComponent {
|
|
|
11707
12662
|
}
|
|
11708
12663
|
</div>
|
|
11709
12664
|
} @else if (virtualScroll() && !group()) {
|
|
11710
|
-
<f-scroller
|
|
12665
|
+
<f-scroller
|
|
12666
|
+
[items]="flatSuggestions()"
|
|
12667
|
+
[itemSize]="virtualScrollItemSize()"
|
|
12668
|
+
[scrollHeight]="scrollHeight()"
|
|
12669
|
+
>
|
|
11711
12670
|
<ng-template let-item let-i="index">
|
|
11712
12671
|
<div
|
|
11713
12672
|
[id]="listboxId + '-' + i"
|
|
11714
12673
|
role="option"
|
|
11715
12674
|
[attr.aria-selected]="i === activeIndex()"
|
|
11716
12675
|
class="px-3 py-2 text-sm cursor-pointer flex items-center gap-2 transition-colors"
|
|
11717
|
-
[class]="
|
|
12676
|
+
[class]="
|
|
12677
|
+
i === activeIndex()
|
|
12678
|
+
? 'bg-(--f-highlight-background) text-(--f-highlight-color)'
|
|
12679
|
+
: 'text-(--f-text-color) hover:bg-(--f-content-hover-background)'
|
|
12680
|
+
"
|
|
11718
12681
|
(mousedown)="selectItem($event, item)"
|
|
11719
12682
|
>
|
|
11720
12683
|
@if (itemTpl()) {
|
|
11721
|
-
<ng-container
|
|
12684
|
+
<ng-container
|
|
12685
|
+
[ngTemplateOutlet]="itemTpl()"
|
|
12686
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: i }"
|
|
12687
|
+
/>
|
|
11722
12688
|
} @else {
|
|
11723
12689
|
<span class="flex-1 truncate">{{ getLabel(item) }}</span>
|
|
11724
12690
|
}
|
|
@@ -11726,12 +12692,24 @@ class AutoCompleteComponent {
|
|
|
11726
12692
|
</ng-template>
|
|
11727
12693
|
</f-scroller>
|
|
11728
12694
|
} @else {
|
|
11729
|
-
<ul
|
|
12695
|
+
<ul
|
|
12696
|
+
[id]="listboxId"
|
|
12697
|
+
class="overflow-auto py-1"
|
|
12698
|
+
[style.max-height]="scrollHeight()"
|
|
12699
|
+
role="listbox"
|
|
12700
|
+
[attr.aria-multiselectable]="multiple()"
|
|
12701
|
+
(scroll)="onListScroll($event)"
|
|
12702
|
+
>
|
|
11730
12703
|
@for (row of rows(); track $index) {
|
|
11731
12704
|
@if (row.type === 'group') {
|
|
11732
|
-
<li
|
|
12705
|
+
<li
|
|
12706
|
+
class="px-3 py-1.5 text-xs font-semibold text-(--f-text-muted-color) uppercase tracking-wide"
|
|
12707
|
+
>
|
|
11733
12708
|
@if (groupTpl()) {
|
|
11734
|
-
<ng-container
|
|
12709
|
+
<ng-container
|
|
12710
|
+
[ngTemplateOutlet]="groupTpl()"
|
|
12711
|
+
[ngTemplateOutletContext]="{ $implicit: row.groupItem }"
|
|
12712
|
+
/>
|
|
11735
12713
|
} @else {
|
|
11736
12714
|
{{ row.groupLabel }}
|
|
11737
12715
|
}
|
|
@@ -11742,13 +12720,25 @@ class AutoCompleteComponent {
|
|
|
11742
12720
|
role="option"
|
|
11743
12721
|
[attr.aria-selected]="row.flatIndex === activeIndex()"
|
|
11744
12722
|
class="px-3 py-2 text-sm cursor-pointer flex items-center gap-2 transition-colors"
|
|
11745
|
-
[class]="
|
|
12723
|
+
[class]="
|
|
12724
|
+
row.flatIndex === activeIndex()
|
|
12725
|
+
? 'bg-(--f-highlight-background) text-(--f-highlight-color)'
|
|
12726
|
+
: 'text-(--f-text-color) hover:bg-(--f-content-hover-background)'
|
|
12727
|
+
"
|
|
11746
12728
|
(mousedown)="selectItem($event, row.item)"
|
|
11747
12729
|
>
|
|
11748
12730
|
@if (itemTpl()) {
|
|
11749
|
-
<ng-container
|
|
12731
|
+
<ng-container
|
|
12732
|
+
[ngTemplateOutlet]="itemTpl()"
|
|
12733
|
+
[ngTemplateOutletContext]="{
|
|
12734
|
+
$implicit: row.item,
|
|
12735
|
+
index: row.flatIndex,
|
|
12736
|
+
}"
|
|
12737
|
+
/>
|
|
11750
12738
|
} @else {
|
|
11751
|
-
<span class="flex-1 truncate">{{
|
|
12739
|
+
<span class="flex-1 truncate">{{
|
|
12740
|
+
getLabel(row.item)
|
|
12741
|
+
}}</span>
|
|
11752
12742
|
}
|
|
11753
12743
|
</li>
|
|
11754
12744
|
}
|
|
@@ -11771,14 +12761,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11771
12761
|
args: [{
|
|
11772
12762
|
selector: 'f-autocomplete',
|
|
11773
12763
|
imports: [UiIconComponent, FormsModule, NgTemplateOutlet, ScrollerComponent],
|
|
11774
|
-
providers: [
|
|
12764
|
+
providers: [
|
|
12765
|
+
{
|
|
12766
|
+
provide: NG_VALUE_ACCESSOR,
|
|
12767
|
+
useExisting: forwardRef(() => AutoCompleteComponent),
|
|
12768
|
+
multi: true,
|
|
12769
|
+
},
|
|
12770
|
+
],
|
|
11775
12771
|
host: {
|
|
11776
12772
|
'[class]': 'hostClass()',
|
|
11777
12773
|
'[style]': 'style()',
|
|
11778
12774
|
'(document:click)': 'onDocumentClick($event)',
|
|
11779
12775
|
},
|
|
11780
12776
|
template: `
|
|
11781
|
-
<div
|
|
12777
|
+
<div
|
|
12778
|
+
#anchor
|
|
12779
|
+
class="relative w-full"
|
|
12780
|
+
[class.opacity-60]="disabled()"
|
|
12781
|
+
[class.pointer-events-none]="disabled()"
|
|
12782
|
+
>
|
|
11782
12783
|
@if (multiple()) {
|
|
11783
12784
|
<div class="relative">
|
|
11784
12785
|
<div
|
|
@@ -11788,13 +12789,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11788
12789
|
(click)="inputEl.focus()"
|
|
11789
12790
|
>
|
|
11790
12791
|
@for (chip of selectedItems(); track $index) {
|
|
11791
|
-
<span
|
|
12792
|
+
<span
|
|
12793
|
+
class="inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-primary/10 text-primary text-xs font-medium"
|
|
12794
|
+
>
|
|
11792
12795
|
@if (selectedItemTpl()) {
|
|
11793
|
-
<ng-container
|
|
12796
|
+
<ng-container
|
|
12797
|
+
[ngTemplateOutlet]="selectedItemTpl()"
|
|
12798
|
+
[ngTemplateOutletContext]="{ $implicit: chip }"
|
|
12799
|
+
/>
|
|
11794
12800
|
} @else {
|
|
11795
12801
|
{{ getLabel(chip) }}
|
|
11796
12802
|
}
|
|
11797
|
-
<button
|
|
12803
|
+
<button
|
|
12804
|
+
type="button"
|
|
12805
|
+
aria-label="Remove"
|
|
12806
|
+
class="inline-flex items-center justify-center hover:text-primary-emphasis cursor-pointer"
|
|
12807
|
+
(click)="removeChip($index, $event)"
|
|
12808
|
+
>
|
|
11798
12809
|
<ui-icon name="times" class="text-[10px]"></ui-icon>
|
|
11799
12810
|
</button>
|
|
11800
12811
|
</span>
|
|
@@ -11814,14 +12825,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11814
12825
|
aria-haspopup="listbox"
|
|
11815
12826
|
[attr.aria-expanded]="open()"
|
|
11816
12827
|
[attr.aria-controls]="listboxId"
|
|
11817
|
-
[attr.aria-activedescendant]="
|
|
12828
|
+
[attr.aria-activedescendant]="
|
|
12829
|
+
activeIndex() >= 0 ? listboxId + '-' + activeIndex() : null
|
|
12830
|
+
"
|
|
11818
12831
|
/>
|
|
11819
12832
|
</div>
|
|
11820
12833
|
<span class="absolute right-2 top-0 h-full flex items-center gap-1">
|
|
11821
12834
|
@if (loading()) {
|
|
11822
|
-
<ui-icon
|
|
12835
|
+
<ui-icon
|
|
12836
|
+
[name]="loadingIcon()"
|
|
12837
|
+
[spin]="true"
|
|
12838
|
+
class="text-xs text-(--f-form-field-placeholder-color)"
|
|
12839
|
+
></ui-icon>
|
|
11823
12840
|
} @else if (showClear() && selectedItems().length && !disabled()) {
|
|
11824
|
-
<ui-icon
|
|
12841
|
+
<ui-icon
|
|
12842
|
+
name="x"
|
|
12843
|
+
class="text-xs text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) cursor-pointer"
|
|
12844
|
+
(click)="clear($event)"
|
|
12845
|
+
></ui-icon>
|
|
11825
12846
|
}
|
|
11826
12847
|
</span>
|
|
11827
12848
|
</div>
|
|
@@ -11842,17 +12863,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11842
12863
|
aria-haspopup="listbox"
|
|
11843
12864
|
[attr.aria-expanded]="open()"
|
|
11844
12865
|
[attr.aria-controls]="listboxId"
|
|
11845
|
-
[attr.aria-activedescendant]="
|
|
12866
|
+
[attr.aria-activedescendant]="
|
|
12867
|
+
activeIndex() >= 0 ? listboxId + '-' + activeIndex() : null
|
|
12868
|
+
"
|
|
11846
12869
|
/>
|
|
11847
|
-
<span
|
|
12870
|
+
<span
|
|
12871
|
+
class="absolute right-0 top-0 h-full flex items-center gap-1 pr-3"
|
|
12872
|
+
>
|
|
11848
12873
|
@if (loading()) {
|
|
11849
|
-
<ui-icon
|
|
12874
|
+
<ui-icon
|
|
12875
|
+
[name]="loadingIcon()"
|
|
12876
|
+
[spin]="true"
|
|
12877
|
+
class="text-xs text-(--f-form-field-placeholder-color)"
|
|
12878
|
+
></ui-icon>
|
|
11850
12879
|
} @else {
|
|
11851
12880
|
@if (showClear() && query && !disabled()) {
|
|
11852
|
-
<ui-icon
|
|
12881
|
+
<ui-icon
|
|
12882
|
+
name="x"
|
|
12883
|
+
class="text-xs text-(--f-form-field-placeholder-color) hover:text-(--f-text-color) cursor-pointer"
|
|
12884
|
+
(click)="clear($event)"
|
|
12885
|
+
></ui-icon>
|
|
11853
12886
|
}
|
|
11854
12887
|
@if (dropdown()) {
|
|
11855
|
-
<button
|
|
12888
|
+
<button
|
|
12889
|
+
type="button"
|
|
12890
|
+
class="inline-flex items-center text-(--f-text-muted-color) hover:text-(--f-text-hover-color)"
|
|
12891
|
+
(click)="onDropdownButtonClick($event)"
|
|
12892
|
+
>
|
|
11856
12893
|
<ui-icon name="chevron-down" class="text-xs"></ui-icon>
|
|
11857
12894
|
</button>
|
|
11858
12895
|
}
|
|
@@ -11862,7 +12899,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11862
12899
|
}
|
|
11863
12900
|
|
|
11864
12901
|
@if (open()) {
|
|
11865
|
-
<div class="
|
|
12902
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
11866
12903
|
@if (headerTpl()) {
|
|
11867
12904
|
<div class="p-2 border-b border-(--f-content-border-color)">
|
|
11868
12905
|
<ng-container [ngTemplateOutlet]="headerTpl()" />
|
|
@@ -11874,11 +12911,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11874
12911
|
@if (loaderTpl()) {
|
|
11875
12912
|
<ng-container [ngTemplateOutlet]="loaderTpl()" />
|
|
11876
12913
|
} @else {
|
|
11877
|
-
<ui-icon
|
|
12914
|
+
<ui-icon
|
|
12915
|
+
[name]="loadingIcon()"
|
|
12916
|
+
[spin]="true"
|
|
12917
|
+
class="text-lg text-(--f-text-muted-color)"
|
|
12918
|
+
></ui-icon>
|
|
11878
12919
|
}
|
|
11879
12920
|
</div>
|
|
11880
12921
|
} @else if (flatSuggestions().length === 0) {
|
|
11881
|
-
<div
|
|
12922
|
+
<div
|
|
12923
|
+
class="px-3 py-6 flex flex-col items-center gap-2 text-(--f-text-muted-color)"
|
|
12924
|
+
>
|
|
11882
12925
|
@if (emptyTpl()) {
|
|
11883
12926
|
<ng-container [ngTemplateOutlet]="emptyTpl()" />
|
|
11884
12927
|
} @else {
|
|
@@ -11887,18 +12930,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11887
12930
|
}
|
|
11888
12931
|
</div>
|
|
11889
12932
|
} @else if (virtualScroll() && !group()) {
|
|
11890
|
-
<f-scroller
|
|
12933
|
+
<f-scroller
|
|
12934
|
+
[items]="flatSuggestions()"
|
|
12935
|
+
[itemSize]="virtualScrollItemSize()"
|
|
12936
|
+
[scrollHeight]="scrollHeight()"
|
|
12937
|
+
>
|
|
11891
12938
|
<ng-template let-item let-i="index">
|
|
11892
12939
|
<div
|
|
11893
12940
|
[id]="listboxId + '-' + i"
|
|
11894
12941
|
role="option"
|
|
11895
12942
|
[attr.aria-selected]="i === activeIndex()"
|
|
11896
12943
|
class="px-3 py-2 text-sm cursor-pointer flex items-center gap-2 transition-colors"
|
|
11897
|
-
[class]="
|
|
12944
|
+
[class]="
|
|
12945
|
+
i === activeIndex()
|
|
12946
|
+
? 'bg-(--f-highlight-background) text-(--f-highlight-color)'
|
|
12947
|
+
: 'text-(--f-text-color) hover:bg-(--f-content-hover-background)'
|
|
12948
|
+
"
|
|
11898
12949
|
(mousedown)="selectItem($event, item)"
|
|
11899
12950
|
>
|
|
11900
12951
|
@if (itemTpl()) {
|
|
11901
|
-
<ng-container
|
|
12952
|
+
<ng-container
|
|
12953
|
+
[ngTemplateOutlet]="itemTpl()"
|
|
12954
|
+
[ngTemplateOutletContext]="{ $implicit: item, index: i }"
|
|
12955
|
+
/>
|
|
11902
12956
|
} @else {
|
|
11903
12957
|
<span class="flex-1 truncate">{{ getLabel(item) }}</span>
|
|
11904
12958
|
}
|
|
@@ -11906,12 +12960,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11906
12960
|
</ng-template>
|
|
11907
12961
|
</f-scroller>
|
|
11908
12962
|
} @else {
|
|
11909
|
-
<ul
|
|
12963
|
+
<ul
|
|
12964
|
+
[id]="listboxId"
|
|
12965
|
+
class="overflow-auto py-1"
|
|
12966
|
+
[style.max-height]="scrollHeight()"
|
|
12967
|
+
role="listbox"
|
|
12968
|
+
[attr.aria-multiselectable]="multiple()"
|
|
12969
|
+
(scroll)="onListScroll($event)"
|
|
12970
|
+
>
|
|
11910
12971
|
@for (row of rows(); track $index) {
|
|
11911
12972
|
@if (row.type === 'group') {
|
|
11912
|
-
<li
|
|
12973
|
+
<li
|
|
12974
|
+
class="px-3 py-1.5 text-xs font-semibold text-(--f-text-muted-color) uppercase tracking-wide"
|
|
12975
|
+
>
|
|
11913
12976
|
@if (groupTpl()) {
|
|
11914
|
-
<ng-container
|
|
12977
|
+
<ng-container
|
|
12978
|
+
[ngTemplateOutlet]="groupTpl()"
|
|
12979
|
+
[ngTemplateOutletContext]="{ $implicit: row.groupItem }"
|
|
12980
|
+
/>
|
|
11915
12981
|
} @else {
|
|
11916
12982
|
{{ row.groupLabel }}
|
|
11917
12983
|
}
|
|
@@ -11922,13 +12988,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11922
12988
|
role="option"
|
|
11923
12989
|
[attr.aria-selected]="row.flatIndex === activeIndex()"
|
|
11924
12990
|
class="px-3 py-2 text-sm cursor-pointer flex items-center gap-2 transition-colors"
|
|
11925
|
-
[class]="
|
|
12991
|
+
[class]="
|
|
12992
|
+
row.flatIndex === activeIndex()
|
|
12993
|
+
? 'bg-(--f-highlight-background) text-(--f-highlight-color)'
|
|
12994
|
+
: 'text-(--f-text-color) hover:bg-(--f-content-hover-background)'
|
|
12995
|
+
"
|
|
11926
12996
|
(mousedown)="selectItem($event, row.item)"
|
|
11927
12997
|
>
|
|
11928
12998
|
@if (itemTpl()) {
|
|
11929
|
-
<ng-container
|
|
12999
|
+
<ng-container
|
|
13000
|
+
[ngTemplateOutlet]="itemTpl()"
|
|
13001
|
+
[ngTemplateOutletContext]="{
|
|
13002
|
+
$implicit: row.item,
|
|
13003
|
+
index: row.flatIndex,
|
|
13004
|
+
}"
|
|
13005
|
+
/>
|
|
11930
13006
|
} @else {
|
|
11931
|
-
<span class="flex-1 truncate">{{
|
|
13007
|
+
<span class="flex-1 truncate">{{
|
|
13008
|
+
getLabel(row.item)
|
|
13009
|
+
}}</span>
|
|
11932
13010
|
}
|
|
11933
13011
|
</li>
|
|
11934
13012
|
}
|
|
@@ -11946,7 +13024,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
11946
13024
|
</div>
|
|
11947
13025
|
`,
|
|
11948
13026
|
}]
|
|
11949
|
-
}], propDecorators: { suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onUnselect: [{ type: i0.Output, args: ["onUnselect"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], focusEvent: [{ type: i0.Output, args: ["focusEvent"] }], blurEvent: [{ type: i0.Output, args: ["blurEvent"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], itemRef: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], selectedItemRef: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], loaderRef: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
13027
|
+
}], ctorParameters: () => [], propDecorators: { anchorRef: [{ type: i0.ViewChild, args: ['anchor', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onUnselect: [{ type: i0.Output, args: ["onUnselect"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], focusEvent: [{ type: i0.Output, args: ["focusEvent"] }], blurEvent: [{ type: i0.Output, args: ["blurEvent"] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], itemRef: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], selectedItemRef: [{ type: i0.ContentChild, args: ['selectedItem', { isSignal: true }] }], loaderRef: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
11950
13028
|
|
|
11951
13029
|
function hexToRgb(hex) {
|
|
11952
13030
|
const clean = hex.replace('#', '');
|
|
@@ -12896,6 +13974,9 @@ class SplitButtonComponent {
|
|
|
12896
13974
|
...(ngDevMode ? [{ debugName: "_menuLeft" }] : /* istanbul ignore next */ []));
|
|
12897
13975
|
menuTop = this._menuTop.asReadonly();
|
|
12898
13976
|
menuLeft = this._menuLeft.asReadonly();
|
|
13977
|
+
constructor() {
|
|
13978
|
+
repositionOnScroll(() => this.open() && this.appendTo() === 'body', () => { this.positionMenu(); this.adjustMenuForViewport(); });
|
|
13979
|
+
}
|
|
12899
13980
|
groupClass = computed(() => {
|
|
12900
13981
|
const shape = this.rounded() ? 'rounded-full' : 'rounded-lg';
|
|
12901
13982
|
const raisedCls = this.raised() ? 'shadow-md' : '';
|
|
@@ -13201,7 +14282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
13201
14282
|
</div>
|
|
13202
14283
|
`,
|
|
13203
14284
|
}]
|
|
13204
|
-
}], propDecorators: { _group: [{ type: i0.ViewChild, args: ['group', { isSignal: true }] }], _dropdownBtn: [{ type: i0.ViewChild, args: ['dropdownButton', { isSignal: true }] }], _menuPanel: [{ type: i0.ViewChild, args: ['menuPanel', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], menuStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuStyleClass", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], expandAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandAriaLabel", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }] } });
|
|
14285
|
+
}], ctorParameters: () => [], propDecorators: { _group: [{ type: i0.ViewChild, args: ['group', { isSignal: true }] }], _dropdownBtn: [{ type: i0.ViewChild, args: ['dropdownButton', { isSignal: true }] }], _menuPanel: [{ type: i0.ViewChild, args: ['menuPanel', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], menuStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuStyleClass", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], expandAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandAriaLabel", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }] } });
|
|
13205
14286
|
|
|
13206
14287
|
let _uidCounter$3 = 0;
|
|
13207
14288
|
function assignKey$3(node) {
|
|
@@ -13267,8 +14348,9 @@ class TreeTableTogglerComponent {
|
|
|
13267
14348
|
[attr.aria-expanded]="rowNode().expanded"
|
|
13268
14349
|
>
|
|
13269
14350
|
<ui-icon
|
|
13270
|
-
|
|
13271
|
-
class="text-xs"
|
|
14351
|
+
name="chevron-right"
|
|
14352
|
+
class="text-xs transition-transform duration-150"
|
|
14353
|
+
[class.rotate-90]="rowNode().expanded"
|
|
13272
14354
|
></ui-icon>
|
|
13273
14355
|
</button>
|
|
13274
14356
|
} @else {
|
|
@@ -13290,8 +14372,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
13290
14372
|
[attr.aria-expanded]="rowNode().expanded"
|
|
13291
14373
|
>
|
|
13292
14374
|
<ui-icon
|
|
13293
|
-
|
|
13294
|
-
class="text-xs"
|
|
14375
|
+
name="chevron-right"
|
|
14376
|
+
class="text-xs transition-transform duration-150"
|
|
14377
|
+
[class.rotate-90]="rowNode().expanded"
|
|
13295
14378
|
></ui-icon>
|
|
13296
14379
|
</button>
|
|
13297
14380
|
} @else {
|
|
@@ -14187,6 +15270,9 @@ function assignKey$2(node) {
|
|
|
14187
15270
|
}
|
|
14188
15271
|
class TreeSelectComponent {
|
|
14189
15272
|
_el = inject(ElementRef);
|
|
15273
|
+
constructor() {
|
|
15274
|
+
repositionOnScroll(() => this.open() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
15275
|
+
}
|
|
14190
15276
|
options = input([], /* @ts-ignore */
|
|
14191
15277
|
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
14192
15278
|
placeholder = input('Select', /* @ts-ignore */
|
|
@@ -14215,8 +15301,53 @@ class TreeSelectComponent {
|
|
|
14215
15301
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
14216
15302
|
style = input(null, /* @ts-ignore */
|
|
14217
15303
|
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
15304
|
+
appendTo = input('self', /* @ts-ignore */
|
|
15305
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
14218
15306
|
hostClass = computed(() => `block w-full ${this.styleClass()}`, /* @ts-ignore */
|
|
14219
15307
|
...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
15308
|
+
triggerRef = viewChild('trigger', /* @ts-ignore */
|
|
15309
|
+
...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
|
|
15310
|
+
panelRef = viewChild('panel', /* @ts-ignore */
|
|
15311
|
+
...(ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []));
|
|
15312
|
+
_panelTop = signal(0, /* @ts-ignore */
|
|
15313
|
+
...(ngDevMode ? [{ debugName: "_panelTop" }] : /* istanbul ignore next */ []));
|
|
15314
|
+
_panelLeft = signal(0, /* @ts-ignore */
|
|
15315
|
+
...(ngDevMode ? [{ debugName: "_panelLeft" }] : /* istanbul ignore next */ []));
|
|
15316
|
+
_panelWidth = signal(0, /* @ts-ignore */
|
|
15317
|
+
...(ngDevMode ? [{ debugName: "_panelWidth" }] : /* istanbul ignore next */ []));
|
|
15318
|
+
panelClass = computed(() => {
|
|
15319
|
+
const position = this.appendTo() === 'body' ? 'fixed' : 'absolute w-full mt-1';
|
|
15320
|
+
return `${position} z-50 bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-lg overflow-hidden`;
|
|
15321
|
+
}, /* @ts-ignore */
|
|
15322
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
15323
|
+
panelStyle = computed(() => {
|
|
15324
|
+
if (this.appendTo() !== 'body')
|
|
15325
|
+
return {};
|
|
15326
|
+
return { top: `${this._panelTop()}px`, left: `${this._panelLeft()}px`, width: `${this._panelWidth()}px` };
|
|
15327
|
+
}, /* @ts-ignore */
|
|
15328
|
+
...(ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
15329
|
+
position() {
|
|
15330
|
+
const anchorEl = this.triggerRef()?.nativeElement;
|
|
15331
|
+
if (!anchorEl || typeof window === 'undefined')
|
|
15332
|
+
return;
|
|
15333
|
+
const rect = anchorEl.getBoundingClientRect();
|
|
15334
|
+
this._panelTop.set(rect.bottom + 4);
|
|
15335
|
+
this._panelLeft.set(Math.max(8, rect.left));
|
|
15336
|
+
this._panelWidth.set(rect.width);
|
|
15337
|
+
}
|
|
15338
|
+
adjustForViewport() {
|
|
15339
|
+
const panelEl = this.panelRef()?.nativeElement;
|
|
15340
|
+
const anchorEl = this.triggerRef()?.nativeElement;
|
|
15341
|
+
if (!panelEl || !anchorEl || typeof window === 'undefined')
|
|
15342
|
+
return;
|
|
15343
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
15344
|
+
const panelRect = panelEl.getBoundingClientRect();
|
|
15345
|
+
const gap = 4;
|
|
15346
|
+
this._panelLeft.set(Math.max(8, Math.min(anchorRect.left, window.innerWidth - panelRect.width - 8)));
|
|
15347
|
+
if (anchorRect.bottom + panelRect.height + gap > window.innerHeight) {
|
|
15348
|
+
this._panelTop.set(Math.max(8, anchorRect.top - panelRect.height - gap));
|
|
15349
|
+
}
|
|
15350
|
+
}
|
|
14220
15351
|
_open = signal(false, /* @ts-ignore */
|
|
14221
15352
|
...(ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []));
|
|
14222
15353
|
open = this._open.asReadonly();
|
|
@@ -14323,8 +15454,14 @@ class TreeSelectComponent {
|
|
|
14323
15454
|
if (this.disabled())
|
|
14324
15455
|
return;
|
|
14325
15456
|
this._open.update(v => !v);
|
|
14326
|
-
if (!this.open())
|
|
15457
|
+
if (!this.open()) {
|
|
14327
15458
|
this._onTouched();
|
|
15459
|
+
return;
|
|
15460
|
+
}
|
|
15461
|
+
if (this.appendTo() === 'body') {
|
|
15462
|
+
this.position();
|
|
15463
|
+
setTimeout(() => this.adjustForViewport(), 0);
|
|
15464
|
+
}
|
|
14328
15465
|
}
|
|
14329
15466
|
onTriggerKeyDown(e) {
|
|
14330
15467
|
if (this.disabled())
|
|
@@ -14475,9 +15612,10 @@ class TreeSelectComponent {
|
|
|
14475
15612
|
registerOnTouched(fn) { this._onTouched = fn; }
|
|
14476
15613
|
setDisabledState() { }
|
|
14477
15614
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14478
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TreeSelectComponent, isStandalone: true, selector: "f-treeselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TreeSelectComponent), multi: true }], queries: [{ propertyName: "valueRef", first: true, predicate: ["value"], descendants: true, isSignal: true }, { propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], ngImport: i0, template: `
|
|
15615
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TreeSelectComponent, isStandalone: true, selector: "f-treeselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TreeSelectComponent), multi: true }], queries: [{ propertyName: "valueRef", first: true, predicate: ["value"], descendants: true, isSignal: true }, { propertyName: "headerRef", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
14479
15616
|
<div class="relative w-full">
|
|
14480
15617
|
<div
|
|
15618
|
+
#trigger
|
|
14481
15619
|
role="combobox"
|
|
14482
15620
|
aria-haspopup="tree"
|
|
14483
15621
|
[attr.aria-expanded]="open()"
|
|
@@ -14524,7 +15662,7 @@ class TreeSelectComponent {
|
|
|
14524
15662
|
</div>
|
|
14525
15663
|
|
|
14526
15664
|
@if (open()) {
|
|
14527
|
-
<div class="
|
|
15665
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
14528
15666
|
@if (headerTpl()) {
|
|
14529
15667
|
<ng-container [ngTemplateOutlet]="headerTpl()" [ngTemplateOutletContext]="{ $implicit: options() }" />
|
|
14530
15668
|
}
|
|
@@ -14581,7 +15719,7 @@ class TreeSelectComponent {
|
|
|
14581
15719
|
>
|
|
14582
15720
|
@if (!row.leaf) {
|
|
14583
15721
|
<button type="button" class="inline-flex items-center justify-center w-5 h-5 rounded-md hover:bg-(--f-content-hover-background) shrink-0 cursor-pointer" (click)="toggleExpand($event, row.key)">
|
|
14584
|
-
<ui-icon
|
|
15722
|
+
<ui-icon name="chevron-right" class="text-[10px] transition-transform duration-150" [class.rotate-90]="isExpanded(row.key)"></ui-icon>
|
|
14585
15723
|
</button>
|
|
14586
15724
|
} @else {
|
|
14587
15725
|
<span class="inline-block w-5 h-5 shrink-0"></span>
|
|
@@ -14616,6 +15754,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
14616
15754
|
template: `
|
|
14617
15755
|
<div class="relative w-full">
|
|
14618
15756
|
<div
|
|
15757
|
+
#trigger
|
|
14619
15758
|
role="combobox"
|
|
14620
15759
|
aria-haspopup="tree"
|
|
14621
15760
|
[attr.aria-expanded]="open()"
|
|
@@ -14662,7 +15801,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
14662
15801
|
</div>
|
|
14663
15802
|
|
|
14664
15803
|
@if (open()) {
|
|
14665
|
-
<div class="
|
|
15804
|
+
<div #panel [class]="panelClass()" [style]="panelStyle()">
|
|
14666
15805
|
@if (headerTpl()) {
|
|
14667
15806
|
<ng-container [ngTemplateOutlet]="headerTpl()" [ngTemplateOutletContext]="{ $implicit: options() }" />
|
|
14668
15807
|
}
|
|
@@ -14719,7 +15858,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
14719
15858
|
>
|
|
14720
15859
|
@if (!row.leaf) {
|
|
14721
15860
|
<button type="button" class="inline-flex items-center justify-center w-5 h-5 rounded-md hover:bg-(--f-content-hover-background) shrink-0 cursor-pointer" (click)="toggleExpand($event, row.key)">
|
|
14722
|
-
<ui-icon
|
|
15861
|
+
<ui-icon name="chevron-right" class="text-[10px] transition-transform duration-150" [class.rotate-90]="isExpanded(row.key)"></ui-icon>
|
|
14723
15862
|
</button>
|
|
14724
15863
|
} @else {
|
|
14725
15864
|
<span class="inline-block w-5 h-5 shrink-0"></span>
|
|
@@ -14744,7 +15883,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
14744
15883
|
</ng-template>
|
|
14745
15884
|
`,
|
|
14746
15885
|
}]
|
|
14747
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], propagateSelectionDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionDown", required: false }] }], propagateSelectionUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionUp", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], valueRef: [{ type: i0.ContentChild, args: ['value', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
15886
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], propagateSelectionDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionDown", required: false }] }], propagateSelectionUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionUp", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], valueRef: [{ type: i0.ContentChild, args: ['value', { isSignal: true }] }], headerRef: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerRef: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
14748
15887
|
|
|
14749
15888
|
class OverlayBadgeComponent {
|
|
14750
15889
|
value = input('', /* @ts-ignore */
|
|
@@ -14840,8 +15979,9 @@ class FieldsetComponent {
|
|
|
14840
15979
|
>
|
|
14841
15980
|
@if (toggleable()) {
|
|
14842
15981
|
<ui-icon
|
|
14843
|
-
|
|
14844
|
-
class="text-xs"
|
|
15982
|
+
name="chevron-right"
|
|
15983
|
+
class="text-xs transition-transform duration-150"
|
|
15984
|
+
[class.rotate-90]="!collapsed()"
|
|
14845
15985
|
></ui-icon>
|
|
14846
15986
|
}
|
|
14847
15987
|
@if (legendTemplateResolved()) {
|
|
@@ -14886,8 +16026,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
14886
16026
|
>
|
|
14887
16027
|
@if (toggleable()) {
|
|
14888
16028
|
<ui-icon
|
|
14889
|
-
|
|
14890
|
-
class="text-xs"
|
|
16029
|
+
name="chevron-right"
|
|
16030
|
+
class="text-xs transition-transform duration-150"
|
|
16031
|
+
[class.rotate-90]="!collapsed()"
|
|
14891
16032
|
></ui-icon>
|
|
14892
16033
|
}
|
|
14893
16034
|
@if (legendTemplateResolved()) {
|
|
@@ -15381,6 +16522,9 @@ class MenuComponent {
|
|
|
15381
16522
|
...(ngDevMode ? [{ debugName: "_left" }] : /* istanbul ignore next */ []));
|
|
15382
16523
|
_openedAt = 0;
|
|
15383
16524
|
_anchor = null;
|
|
16525
|
+
constructor() {
|
|
16526
|
+
repositionOnScroll(() => this.popup() && this.visible() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
16527
|
+
}
|
|
15384
16528
|
fTemplates = contentChildren(FTemplateDirective, /* @ts-ignore */
|
|
15385
16529
|
...(ngDevMode ? [{ debugName: "fTemplates" }] : /* istanbul ignore next */ []));
|
|
15386
16530
|
namedTemplate(name) {
|
|
@@ -15738,7 +16882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
15738
16882
|
}
|
|
15739
16883
|
`,
|
|
15740
16884
|
}]
|
|
15741
|
-
}], propDecorators: { containerRef: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
16885
|
+
}], ctorParameters: () => [], propDecorators: { containerRef: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
15742
16886
|
|
|
15743
16887
|
const SUBMENU_ESTIMATED_WIDTH$2 = 192;
|
|
15744
16888
|
class MenubarComponent {
|
|
@@ -19372,6 +20516,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
19372
20516
|
|
|
19373
20517
|
class CascadeSelectComponent {
|
|
19374
20518
|
_el = inject(ElementRef);
|
|
20519
|
+
constructor() {
|
|
20520
|
+
repositionOnScroll(() => this.open() && this.appendTo() === 'body', () => { this.position(); this.adjustForViewport(); });
|
|
20521
|
+
}
|
|
19375
20522
|
options = input([], /* @ts-ignore */
|
|
19376
20523
|
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
19377
20524
|
optionLabel = input('label', /* @ts-ignore */
|
|
@@ -19398,8 +20545,50 @@ class CascadeSelectComponent {
|
|
|
19398
20545
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
19399
20546
|
style = input(null, /* @ts-ignore */
|
|
19400
20547
|
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
20548
|
+
appendTo = input('self', /* @ts-ignore */
|
|
20549
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
19401
20550
|
hostClass = computed(() => `block w-full ${this.styleClass()}`, /* @ts-ignore */
|
|
19402
20551
|
...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
20552
|
+
triggerRef = viewChild('trigger', /* @ts-ignore */
|
|
20553
|
+
...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
|
|
20554
|
+
panelRef = viewChild('panel', /* @ts-ignore */
|
|
20555
|
+
...(ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []));
|
|
20556
|
+
_panelTop = signal(0, /* @ts-ignore */
|
|
20557
|
+
...(ngDevMode ? [{ debugName: "_panelTop" }] : /* istanbul ignore next */ []));
|
|
20558
|
+
_panelLeft = signal(0, /* @ts-ignore */
|
|
20559
|
+
...(ngDevMode ? [{ debugName: "_panelLeft" }] : /* istanbul ignore next */ []));
|
|
20560
|
+
panelClass = computed(() => {
|
|
20561
|
+
const position = this.appendTo() === 'body' ? 'fixed' : 'absolute mt-1';
|
|
20562
|
+
return `${position} z-50 flex bg-(--f-overlay-popover-background) border border-(--f-content-border-color) rounded-lg shadow-lg overflow-hidden`;
|
|
20563
|
+
}, /* @ts-ignore */
|
|
20564
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
20565
|
+
panelStyle = computed(() => {
|
|
20566
|
+
if (this.appendTo() !== 'body')
|
|
20567
|
+
return {};
|
|
20568
|
+
return { top: `${this._panelTop()}px`, left: `${this._panelLeft()}px` };
|
|
20569
|
+
}, /* @ts-ignore */
|
|
20570
|
+
...(ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
20571
|
+
position() {
|
|
20572
|
+
const anchorEl = this.triggerRef()?.nativeElement;
|
|
20573
|
+
if (!anchorEl || typeof window === 'undefined')
|
|
20574
|
+
return;
|
|
20575
|
+
const rect = anchorEl.getBoundingClientRect();
|
|
20576
|
+
this._panelTop.set(rect.bottom + 4);
|
|
20577
|
+
this._panelLeft.set(Math.max(8, rect.left));
|
|
20578
|
+
}
|
|
20579
|
+
adjustForViewport() {
|
|
20580
|
+
const panelEl = this.panelRef()?.nativeElement;
|
|
20581
|
+
const anchorEl = this.triggerRef()?.nativeElement;
|
|
20582
|
+
if (!panelEl || !anchorEl || typeof window === 'undefined')
|
|
20583
|
+
return;
|
|
20584
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
20585
|
+
const panelRect = panelEl.getBoundingClientRect();
|
|
20586
|
+
const gap = 4;
|
|
20587
|
+
this._panelLeft.set(Math.max(8, Math.min(anchorRect.left, window.innerWidth - panelRect.width - 8)));
|
|
20588
|
+
if (anchorRect.bottom + panelRect.height + gap > window.innerHeight) {
|
|
20589
|
+
this._panelTop.set(Math.max(8, anchorRect.top - panelRect.height - gap));
|
|
20590
|
+
}
|
|
20591
|
+
}
|
|
19403
20592
|
_open = signal(false, /* @ts-ignore */
|
|
19404
20593
|
...(ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []));
|
|
19405
20594
|
open = this._open.asReadonly();
|
|
@@ -19499,6 +20688,10 @@ class CascadeSelectComponent {
|
|
|
19499
20688
|
this._activePath.set([]);
|
|
19500
20689
|
this._focusedPath.set([]);
|
|
19501
20690
|
}
|
|
20691
|
+
if (this.appendTo() === 'body') {
|
|
20692
|
+
this.position();
|
|
20693
|
+
setTimeout(() => this.adjustForViewport(), 0);
|
|
20694
|
+
}
|
|
19502
20695
|
}
|
|
19503
20696
|
closePanel() {
|
|
19504
20697
|
this._open.set(false);
|
|
@@ -19645,15 +20838,16 @@ class CascadeSelectComponent {
|
|
|
19645
20838
|
}
|
|
19646
20839
|
setDisabledState() { }
|
|
19647
20840
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CascadeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19648
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CascadeSelectComponent, isStandalone: true, selector: "f-cascadeselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionChildren: { classPropertyName: "optionChildren", publicName: "optionChildren", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
20841
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CascadeSelectComponent, isStandalone: true, selector: "f-cascadeselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionChildren: { classPropertyName: "optionChildren", publicName: "optionChildren", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class": "hostClass()", "style": "style()" } }, providers: [
|
|
19649
20842
|
{
|
|
19650
20843
|
provide: NG_VALUE_ACCESSOR,
|
|
19651
20844
|
useExisting: forwardRef(() => CascadeSelectComponent),
|
|
19652
20845
|
multi: true,
|
|
19653
20846
|
},
|
|
19654
|
-
], queries: [{ propertyName: "valueRef", first: true, predicate: ["value"], descendants: true, isSignal: true }, { propertyName: "optionRef", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], ngImport: i0, template: `
|
|
20847
|
+
], queries: [{ propertyName: "valueRef", first: true, predicate: ["value"], descendants: true, isSignal: true }, { propertyName: "optionRef", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "emptyRef", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "fTemplates", predicate: FTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
19655
20848
|
<div class="relative w-full">
|
|
19656
20849
|
<button
|
|
20850
|
+
#trigger
|
|
19657
20851
|
type="button"
|
|
19658
20852
|
role="combobox"
|
|
19659
20853
|
aria-haspopup="tree"
|
|
@@ -19696,7 +20890,9 @@ class CascadeSelectComponent {
|
|
|
19696
20890
|
|
|
19697
20891
|
@if (open()) {
|
|
19698
20892
|
<div
|
|
19699
|
-
|
|
20893
|
+
#panel
|
|
20894
|
+
[class]="panelClass()"
|
|
20895
|
+
[style]="panelStyle()"
|
|
19700
20896
|
role="tree"
|
|
19701
20897
|
>
|
|
19702
20898
|
@if (levels()[0].length) {
|
|
@@ -19780,6 +20976,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
19780
20976
|
template: `
|
|
19781
20977
|
<div class="relative w-full">
|
|
19782
20978
|
<button
|
|
20979
|
+
#trigger
|
|
19783
20980
|
type="button"
|
|
19784
20981
|
role="combobox"
|
|
19785
20982
|
aria-haspopup="tree"
|
|
@@ -19822,7 +21019,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
19822
21019
|
|
|
19823
21020
|
@if (open()) {
|
|
19824
21021
|
<div
|
|
19825
|
-
|
|
21022
|
+
#panel
|
|
21023
|
+
[class]="panelClass()"
|
|
21024
|
+
[style]="panelStyle()"
|
|
19826
21025
|
role="tree"
|
|
19827
21026
|
>
|
|
19828
21027
|
@if (levels()[0].length) {
|
|
@@ -19886,7 +21085,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
19886
21085
|
</div>
|
|
19887
21086
|
`,
|
|
19888
21087
|
}]
|
|
19889
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionChildren", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], valueRef: [{ type: i0.ContentChild, args: ['value', { isSignal: true }] }], optionRef: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
21088
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionChildren", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], valueRef: [{ type: i0.ContentChild, args: ['value', { isSignal: true }] }], optionRef: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }], groupRef: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], emptyRef: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], fTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FTemplateDirective), { isSignal: true }] }] } });
|
|
19890
21089
|
|
|
19891
21090
|
const PRESETS$1 = {
|
|
19892
21091
|
pint: /\d/,
|
|
@@ -21031,7 +22230,7 @@ class TreeComponent {
|
|
|
21031
22230
|
@if (row.loading) {
|
|
21032
22231
|
<ui-icon name="loader-circle" [spin]="true" class="text-[10px]"></ui-icon>
|
|
21033
22232
|
} @else {
|
|
21034
|
-
<ui-icon
|
|
22233
|
+
<ui-icon name="chevron-right" class="text-[10px] transition-transform duration-150" [class.rotate-90]="isExpanded(row.key)"></ui-icon>
|
|
21035
22234
|
}
|
|
21036
22235
|
</button>
|
|
21037
22236
|
} @else {
|
|
@@ -21144,7 +22343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
21144
22343
|
@if (row.loading) {
|
|
21145
22344
|
<ui-icon name="loader-circle" [spin]="true" class="text-[10px]"></ui-icon>
|
|
21146
22345
|
} @else {
|
|
21147
|
-
<ui-icon
|
|
22346
|
+
<ui-icon name="chevron-right" class="text-[10px] transition-transform duration-150" [class.rotate-90]="isExpanded(row.key)"></ui-icon>
|
|
21148
22347
|
}
|
|
21149
22348
|
</button>
|
|
21150
22349
|
} @else {
|
|
@@ -22336,7 +23535,7 @@ class OrganizationChartComponent {
|
|
|
22336
23535
|
@if (togglerIconTpl()) {
|
|
22337
23536
|
<ng-container [ngTemplateOutlet]="togglerIconTpl()" [ngTemplateOutletContext]="{ $implicit: isExpanded(node) }" />
|
|
22338
23537
|
} @else {
|
|
22339
|
-
<ui-icon
|
|
23538
|
+
<ui-icon name="chevron-down" class="text-[10px] transition-transform duration-150" [class.rotate-180]="isExpanded(node)"></ui-icon>
|
|
22340
23539
|
}
|
|
22341
23540
|
</button>
|
|
22342
23541
|
}
|
|
@@ -22397,7 +23596,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
22397
23596
|
@if (togglerIconTpl()) {
|
|
22398
23597
|
<ng-container [ngTemplateOutlet]="togglerIconTpl()" [ngTemplateOutletContext]="{ $implicit: isExpanded(node) }" />
|
|
22399
23598
|
} @else {
|
|
22400
|
-
<ui-icon
|
|
23599
|
+
<ui-icon name="chevron-down" class="text-[10px] transition-transform duration-150" [class.rotate-180]="isExpanded(node)"></ui-icon>
|
|
22401
23600
|
}
|
|
22402
23601
|
</button>
|
|
22403
23602
|
}
|
|
@@ -23408,29 +24607,39 @@ class GalleriaComponent {
|
|
|
23408
24607
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
23409
24608
|
hostClass = computed(() => `block w-full ${this.styleClass()}`.trim(), /* @ts-ignore */
|
|
23410
24609
|
...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
23411
|
-
isThumbVertical = computed(() => this.thumbnailsPosition() === 'left' ||
|
|
24610
|
+
isThumbVertical = computed(() => this.thumbnailsPosition() === 'left' ||
|
|
24611
|
+
this.thumbnailsPosition() === 'right', /* @ts-ignore */
|
|
23412
24612
|
...(ngDevMode ? [{ debugName: "isThumbVertical" }] : /* istanbul ignore next */ []));
|
|
23413
24613
|
containerFlexClass = computed(() => {
|
|
23414
24614
|
if (this.isThumbVertical())
|
|
23415
|
-
return this.thumbnailsPosition() === 'left'
|
|
23416
|
-
|
|
24615
|
+
return this.thumbnailsPosition() === 'left'
|
|
24616
|
+
? 'flex-row'
|
|
24617
|
+
: 'flex-row-reverse';
|
|
24618
|
+
return this.thumbnailsPosition() === 'top'
|
|
24619
|
+
? 'flex-col-reverse'
|
|
24620
|
+
: 'flex-col';
|
|
23417
24621
|
}, /* @ts-ignore */
|
|
23418
24622
|
...(ngDevMode ? [{ debugName: "containerFlexClass" }] : /* istanbul ignore next */ []));
|
|
23419
24623
|
activeItem = computed(() => this.value()[this.activeIndex()] ?? null, /* @ts-ignore */
|
|
23420
24624
|
...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
23421
24625
|
indices = computed(() => Array.from({ length: this.value().length }, (_, i) => i), /* @ts-ignore */
|
|
23422
24626
|
...(ngDevMode ? [{ debugName: "indices" }] : /* istanbul ignore next */ []));
|
|
23423
|
-
isForwardDisabled = computed(() => this.value().length === 0 ||
|
|
24627
|
+
isForwardDisabled = computed(() => this.value().length === 0 ||
|
|
24628
|
+
(!this.circular() && this.activeIndex() >= this.value().length - 1), /* @ts-ignore */
|
|
23424
24629
|
...(ngDevMode ? [{ debugName: "isForwardDisabled" }] : /* istanbul ignore next */ []));
|
|
23425
|
-
isBackwardDisabled = computed(() => this.value().length === 0 ||
|
|
24630
|
+
isBackwardDisabled = computed(() => this.value().length === 0 ||
|
|
24631
|
+
(!this.circular() && this.activeIndex() <= 0), /* @ts-ignore */
|
|
23426
24632
|
...(ngDevMode ? [{ debugName: "isBackwardDisabled" }] : /* istanbul ignore next */ []));
|
|
23427
24633
|
fTemplates = contentChildren(FTemplateDirective, /* @ts-ignore */
|
|
23428
24634
|
...(ngDevMode ? [{ debugName: "fTemplates" }] : /* istanbul ignore next */ []));
|
|
23429
|
-
itemTpl = computed(() => this.fTemplates().find(t => t.fTemplate() === 'item')?.templateRef ??
|
|
24635
|
+
itemTpl = computed(() => this.fTemplates().find((t) => t.fTemplate() === 'item')?.templateRef ??
|
|
24636
|
+
null, /* @ts-ignore */
|
|
23430
24637
|
...(ngDevMode ? [{ debugName: "itemTpl" }] : /* istanbul ignore next */ []));
|
|
23431
|
-
thumbnailTpl = computed(() => this.fTemplates().find(t => t.fTemplate() === 'thumbnail')
|
|
24638
|
+
thumbnailTpl = computed(() => this.fTemplates().find((t) => t.fTemplate() === 'thumbnail')
|
|
24639
|
+
?.templateRef ?? null, /* @ts-ignore */
|
|
23432
24640
|
...(ngDevMode ? [{ debugName: "thumbnailTpl" }] : /* istanbul ignore next */ []));
|
|
23433
|
-
captionTpl = computed(() => this.fTemplates().find(t => t.fTemplate() === 'caption')?.templateRef ??
|
|
24641
|
+
captionTpl = computed(() => this.fTemplates().find((t) => t.fTemplate() === 'caption')?.templateRef ??
|
|
24642
|
+
null, /* @ts-ignore */
|
|
23434
24643
|
...(ngDevMode ? [{ debugName: "captionTpl" }] : /* istanbul ignore next */ []));
|
|
23435
24644
|
thumbStrip = viewChild('thumbStrip', /* @ts-ignore */
|
|
23436
24645
|
...(ngDevMode ? [{ debugName: "thumbStrip" }] : /* istanbul ignore next */ []));
|
|
@@ -23449,7 +24658,11 @@ class GalleriaComponent {
|
|
|
23449
24658
|
if (!strip)
|
|
23450
24659
|
return;
|
|
23451
24660
|
const active = strip.children.item(index);
|
|
23452
|
-
active?.scrollIntoView({
|
|
24661
|
+
active?.scrollIntoView({
|
|
24662
|
+
behavior: 'smooth',
|
|
24663
|
+
block: 'nearest',
|
|
24664
|
+
inline: 'center',
|
|
24665
|
+
});
|
|
23453
24666
|
});
|
|
23454
24667
|
}
|
|
23455
24668
|
setIndex(i) {
|
|
@@ -23477,7 +24690,9 @@ class GalleriaComponent {
|
|
|
23477
24690
|
else if (this.circular())
|
|
23478
24691
|
this.setIndex(len - 1);
|
|
23479
24692
|
}
|
|
23480
|
-
selectIndex(i) {
|
|
24693
|
+
selectIndex(i) {
|
|
24694
|
+
this.setIndex(i);
|
|
24695
|
+
}
|
|
23481
24696
|
onKeydown(event) {
|
|
23482
24697
|
if (event.key === 'ArrowRight') {
|
|
23483
24698
|
event.preventDefault();
|
|
@@ -23531,32 +24746,58 @@ class GalleriaComponent {
|
|
|
23531
24746
|
}
|
|
23532
24747
|
|
|
23533
24748
|
<ng-template #contentTpl>
|
|
23534
|
-
<div
|
|
24749
|
+
<div
|
|
24750
|
+
role="region"
|
|
24751
|
+
aria-roledescription="carousel"
|
|
24752
|
+
tabindex="0"
|
|
24753
|
+
(keydown)="onKeydown($event)"
|
|
24754
|
+
>
|
|
23535
24755
|
<div class="flex gap-2" [class]="containerFlexClass()">
|
|
23536
|
-
<div
|
|
24756
|
+
<div
|
|
24757
|
+
class="relative bg-black/90 rounded-lg overflow-hidden flex-1 min-w-0"
|
|
24758
|
+
[style.height]="height()"
|
|
24759
|
+
>
|
|
23537
24760
|
@if (itemTpl()) {
|
|
23538
|
-
<ng-container
|
|
24761
|
+
<ng-container
|
|
24762
|
+
[ngTemplateOutlet]="itemTpl()!"
|
|
24763
|
+
[ngTemplateOutletContext]="{ $implicit: activeItem() }"
|
|
24764
|
+
/>
|
|
23539
24765
|
} @else if (activeItem()) {
|
|
23540
|
-
<img
|
|
24766
|
+
<img
|
|
24767
|
+
[src]="activeItem()!.itemImageSrc"
|
|
24768
|
+
[alt]="activeItem()!.alt ?? ''"
|
|
24769
|
+
class="w-full h-full object-contain"
|
|
24770
|
+
/>
|
|
23541
24771
|
}
|
|
23542
24772
|
|
|
23543
24773
|
@if (showItemNavigators() && value().length > 1) {
|
|
23544
|
-
<button
|
|
24774
|
+
<button
|
|
24775
|
+
type="button"
|
|
24776
|
+
aria-label="Previous"
|
|
23545
24777
|
class="absolute left-2 top-1/2 -translate-y-1/2 w-9 h-9 rounded-full bg-black/40 hover:bg-black/60 text-white flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:pointer-events-none"
|
|
23546
24778
|
[disabled]="isBackwardDisabled()"
|
|
23547
24779
|
(click)="prev()"
|
|
23548
|
-
|
|
23549
|
-
|
|
24780
|
+
>
|
|
24781
|
+
<ui-icon name="chevron-left" class="text-sm"></ui-icon>
|
|
24782
|
+
</button>
|
|
24783
|
+
<button
|
|
24784
|
+
type="button"
|
|
24785
|
+
aria-label="Next"
|
|
23550
24786
|
class="absolute right-2 top-1/2 -translate-y-1/2 w-9 h-9 rounded-full bg-black/40 hover:bg-black/60 text-white flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:pointer-events-none"
|
|
23551
24787
|
[disabled]="isForwardDisabled()"
|
|
23552
24788
|
(click)="next()"
|
|
23553
|
-
|
|
24789
|
+
>
|
|
24790
|
+
<ui-icon name="chevron-right" class="text-sm"></ui-icon>
|
|
24791
|
+
</button>
|
|
23554
24792
|
}
|
|
23555
24793
|
|
|
23556
24794
|
@if (showIndicators() && value().length > 1) {
|
|
23557
|
-
<div
|
|
24795
|
+
<div
|
|
24796
|
+
class="absolute bottom-2 left-0 right-0 flex justify-center gap-1.5"
|
|
24797
|
+
>
|
|
23558
24798
|
@for (i of indices(); track i) {
|
|
23559
|
-
<button
|
|
24799
|
+
<button
|
|
24800
|
+
type="button"
|
|
23560
24801
|
[attr.aria-label]="'Page ' + (i + 1)"
|
|
23561
24802
|
[attr.aria-selected]="i === activeIndex()"
|
|
23562
24803
|
class="w-2 h-2 rounded-full transition-colors cursor-pointer"
|
|
@@ -23568,45 +24809,92 @@ class GalleriaComponent {
|
|
|
23568
24809
|
}
|
|
23569
24810
|
|
|
23570
24811
|
@if (captionTpl() && activeItem()) {
|
|
23571
|
-
<div
|
|
23572
|
-
|
|
24812
|
+
<div
|
|
24813
|
+
class="absolute bottom-0 left-0 right-0 bg-black/60 text-white p-3"
|
|
24814
|
+
>
|
|
24815
|
+
<ng-container
|
|
24816
|
+
[ngTemplateOutlet]="captionTpl()!"
|
|
24817
|
+
[ngTemplateOutletContext]="{ $implicit: activeItem() }"
|
|
24818
|
+
/>
|
|
23573
24819
|
</div>
|
|
23574
24820
|
}
|
|
23575
24821
|
</div>
|
|
23576
24822
|
|
|
23577
24823
|
@if (showThumbnails() && value().length > 1) {
|
|
23578
|
-
<div
|
|
24824
|
+
<div
|
|
24825
|
+
class="flex items-center gap-2 justify-between"
|
|
24826
|
+
[class.flex-col]="isThumbVertical()"
|
|
24827
|
+
>
|
|
23579
24828
|
@if (showThumbnailNavigators()) {
|
|
23580
|
-
<button
|
|
24829
|
+
<button
|
|
24830
|
+
type="button"
|
|
24831
|
+
aria-label="Previous thumbnails"
|
|
23581
24832
|
class="w-7 h-7 shrink-0 flex items-center justify-center rounded-full border border-(--f-content-border-color) hover:bg-(--f-content-hover-background) cursor-pointer transition-colors"
|
|
23582
24833
|
(click)="scrollThumbnails(-1)"
|
|
23583
|
-
|
|
24834
|
+
>
|
|
24835
|
+
<ui-icon
|
|
24836
|
+
[name]="isThumbVertical() ? 'chevron-up' : 'chevron-left'"
|
|
24837
|
+
class="text-xs"
|
|
24838
|
+
></ui-icon>
|
|
24839
|
+
</button>
|
|
23584
24840
|
}
|
|
23585
24841
|
|
|
23586
|
-
<div
|
|
24842
|
+
<div
|
|
24843
|
+
#thumbStrip
|
|
24844
|
+
class="flex gap-2 overflow-auto py-1 scroll-smooth"
|
|
24845
|
+
[class.flex-col]="isThumbVertical()"
|
|
24846
|
+
[style.max-height]="isThumbVertical() ? height() : null"
|
|
24847
|
+
>
|
|
23587
24848
|
@for (item of value(); track $index) {
|
|
23588
|
-
<button
|
|
24849
|
+
<button
|
|
24850
|
+
type="button"
|
|
23589
24851
|
class="shrink-0 rounded-md overflow-hidden border-2 transition-colors cursor-pointer"
|
|
23590
|
-
[style.width]="
|
|
24852
|
+
[style.width]="
|
|
24853
|
+
isThumbVertical()
|
|
24854
|
+
? '4rem'
|
|
24855
|
+
: 'calc(' + 100 / numVisible() + '% - 0.5rem)'
|
|
24856
|
+
"
|
|
23591
24857
|
style="height: 4rem;"
|
|
23592
|
-
[class]="
|
|
23593
|
-
|
|
24858
|
+
[class]="
|
|
24859
|
+
$index === activeIndex()
|
|
24860
|
+
? 'border-primary'
|
|
24861
|
+
: 'border-transparent opacity-70 hover:opacity-100'
|
|
24862
|
+
"
|
|
24863
|
+
[attr.aria-current]="
|
|
24864
|
+
$index === activeIndex() ? 'true' : null
|
|
24865
|
+
"
|
|
23594
24866
|
(click)="selectIndex($index)"
|
|
23595
24867
|
>
|
|
23596
24868
|
@if (thumbnailTpl()) {
|
|
23597
|
-
<ng-container
|
|
24869
|
+
<ng-container
|
|
24870
|
+
[ngTemplateOutlet]="thumbnailTpl()!"
|
|
24871
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
24872
|
+
/>
|
|
23598
24873
|
} @else {
|
|
23599
|
-
<img
|
|
24874
|
+
<img
|
|
24875
|
+
[src]="item.thumbnailImageSrc ?? item.itemImageSrc"
|
|
24876
|
+
[alt]="item.alt ?? ''"
|
|
24877
|
+
class="w-full h-full object-cover"
|
|
24878
|
+
/>
|
|
23600
24879
|
}
|
|
23601
24880
|
</button>
|
|
23602
24881
|
}
|
|
23603
24882
|
</div>
|
|
23604
24883
|
|
|
23605
24884
|
@if (showThumbnailNavigators()) {
|
|
23606
|
-
<button
|
|
24885
|
+
<button
|
|
24886
|
+
type="button"
|
|
24887
|
+
aria-label="Next thumbnails"
|
|
23607
24888
|
class="w-7 h-7 shrink-0 flex items-center justify-center rounded-full border border-(--f-content-border-color) hover:bg-(--f-content-hover-background) cursor-pointer transition-colors"
|
|
23608
24889
|
(click)="scrollThumbnails(1)"
|
|
23609
|
-
|
|
24890
|
+
>
|
|
24891
|
+
<ui-icon
|
|
24892
|
+
[name]="
|
|
24893
|
+
isThumbVertical() ? 'chevron-down' : 'chevron-right'
|
|
24894
|
+
"
|
|
24895
|
+
class="text-xs"
|
|
24896
|
+
></ui-icon>
|
|
24897
|
+
</button>
|
|
23610
24898
|
}
|
|
23611
24899
|
</div>
|
|
23612
24900
|
}
|
|
@@ -23640,32 +24928,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
23640
24928
|
}
|
|
23641
24929
|
|
|
23642
24930
|
<ng-template #contentTpl>
|
|
23643
|
-
<div
|
|
24931
|
+
<div
|
|
24932
|
+
role="region"
|
|
24933
|
+
aria-roledescription="carousel"
|
|
24934
|
+
tabindex="0"
|
|
24935
|
+
(keydown)="onKeydown($event)"
|
|
24936
|
+
>
|
|
23644
24937
|
<div class="flex gap-2" [class]="containerFlexClass()">
|
|
23645
|
-
<div
|
|
24938
|
+
<div
|
|
24939
|
+
class="relative bg-black/90 rounded-lg overflow-hidden flex-1 min-w-0"
|
|
24940
|
+
[style.height]="height()"
|
|
24941
|
+
>
|
|
23646
24942
|
@if (itemTpl()) {
|
|
23647
|
-
<ng-container
|
|
24943
|
+
<ng-container
|
|
24944
|
+
[ngTemplateOutlet]="itemTpl()!"
|
|
24945
|
+
[ngTemplateOutletContext]="{ $implicit: activeItem() }"
|
|
24946
|
+
/>
|
|
23648
24947
|
} @else if (activeItem()) {
|
|
23649
|
-
<img
|
|
24948
|
+
<img
|
|
24949
|
+
[src]="activeItem()!.itemImageSrc"
|
|
24950
|
+
[alt]="activeItem()!.alt ?? ''"
|
|
24951
|
+
class="w-full h-full object-contain"
|
|
24952
|
+
/>
|
|
23650
24953
|
}
|
|
23651
24954
|
|
|
23652
24955
|
@if (showItemNavigators() && value().length > 1) {
|
|
23653
|
-
<button
|
|
24956
|
+
<button
|
|
24957
|
+
type="button"
|
|
24958
|
+
aria-label="Previous"
|
|
23654
24959
|
class="absolute left-2 top-1/2 -translate-y-1/2 w-9 h-9 rounded-full bg-black/40 hover:bg-black/60 text-white flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:pointer-events-none"
|
|
23655
24960
|
[disabled]="isBackwardDisabled()"
|
|
23656
24961
|
(click)="prev()"
|
|
23657
|
-
|
|
23658
|
-
|
|
24962
|
+
>
|
|
24963
|
+
<ui-icon name="chevron-left" class="text-sm"></ui-icon>
|
|
24964
|
+
</button>
|
|
24965
|
+
<button
|
|
24966
|
+
type="button"
|
|
24967
|
+
aria-label="Next"
|
|
23659
24968
|
class="absolute right-2 top-1/2 -translate-y-1/2 w-9 h-9 rounded-full bg-black/40 hover:bg-black/60 text-white flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:pointer-events-none"
|
|
23660
24969
|
[disabled]="isForwardDisabled()"
|
|
23661
24970
|
(click)="next()"
|
|
23662
|
-
|
|
24971
|
+
>
|
|
24972
|
+
<ui-icon name="chevron-right" class="text-sm"></ui-icon>
|
|
24973
|
+
</button>
|
|
23663
24974
|
}
|
|
23664
24975
|
|
|
23665
24976
|
@if (showIndicators() && value().length > 1) {
|
|
23666
|
-
<div
|
|
24977
|
+
<div
|
|
24978
|
+
class="absolute bottom-2 left-0 right-0 flex justify-center gap-1.5"
|
|
24979
|
+
>
|
|
23667
24980
|
@for (i of indices(); track i) {
|
|
23668
|
-
<button
|
|
24981
|
+
<button
|
|
24982
|
+
type="button"
|
|
23669
24983
|
[attr.aria-label]="'Page ' + (i + 1)"
|
|
23670
24984
|
[attr.aria-selected]="i === activeIndex()"
|
|
23671
24985
|
class="w-2 h-2 rounded-full transition-colors cursor-pointer"
|
|
@@ -23677,45 +24991,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
23677
24991
|
}
|
|
23678
24992
|
|
|
23679
24993
|
@if (captionTpl() && activeItem()) {
|
|
23680
|
-
<div
|
|
23681
|
-
|
|
24994
|
+
<div
|
|
24995
|
+
class="absolute bottom-0 left-0 right-0 bg-black/60 text-white p-3"
|
|
24996
|
+
>
|
|
24997
|
+
<ng-container
|
|
24998
|
+
[ngTemplateOutlet]="captionTpl()!"
|
|
24999
|
+
[ngTemplateOutletContext]="{ $implicit: activeItem() }"
|
|
25000
|
+
/>
|
|
23682
25001
|
</div>
|
|
23683
25002
|
}
|
|
23684
25003
|
</div>
|
|
23685
25004
|
|
|
23686
25005
|
@if (showThumbnails() && value().length > 1) {
|
|
23687
|
-
<div
|
|
25006
|
+
<div
|
|
25007
|
+
class="flex items-center gap-2 justify-between"
|
|
25008
|
+
[class.flex-col]="isThumbVertical()"
|
|
25009
|
+
>
|
|
23688
25010
|
@if (showThumbnailNavigators()) {
|
|
23689
|
-
<button
|
|
25011
|
+
<button
|
|
25012
|
+
type="button"
|
|
25013
|
+
aria-label="Previous thumbnails"
|
|
23690
25014
|
class="w-7 h-7 shrink-0 flex items-center justify-center rounded-full border border-(--f-content-border-color) hover:bg-(--f-content-hover-background) cursor-pointer transition-colors"
|
|
23691
25015
|
(click)="scrollThumbnails(-1)"
|
|
23692
|
-
|
|
25016
|
+
>
|
|
25017
|
+
<ui-icon
|
|
25018
|
+
[name]="isThumbVertical() ? 'chevron-up' : 'chevron-left'"
|
|
25019
|
+
class="text-xs"
|
|
25020
|
+
></ui-icon>
|
|
25021
|
+
</button>
|
|
23693
25022
|
}
|
|
23694
25023
|
|
|
23695
|
-
<div
|
|
25024
|
+
<div
|
|
25025
|
+
#thumbStrip
|
|
25026
|
+
class="flex gap-2 overflow-auto py-1 scroll-smooth"
|
|
25027
|
+
[class.flex-col]="isThumbVertical()"
|
|
25028
|
+
[style.max-height]="isThumbVertical() ? height() : null"
|
|
25029
|
+
>
|
|
23696
25030
|
@for (item of value(); track $index) {
|
|
23697
|
-
<button
|
|
25031
|
+
<button
|
|
25032
|
+
type="button"
|
|
23698
25033
|
class="shrink-0 rounded-md overflow-hidden border-2 transition-colors cursor-pointer"
|
|
23699
|
-
[style.width]="
|
|
25034
|
+
[style.width]="
|
|
25035
|
+
isThumbVertical()
|
|
25036
|
+
? '4rem'
|
|
25037
|
+
: 'calc(' + 100 / numVisible() + '% - 0.5rem)'
|
|
25038
|
+
"
|
|
23700
25039
|
style="height: 4rem;"
|
|
23701
|
-
[class]="
|
|
23702
|
-
|
|
25040
|
+
[class]="
|
|
25041
|
+
$index === activeIndex()
|
|
25042
|
+
? 'border-primary'
|
|
25043
|
+
: 'border-transparent opacity-70 hover:opacity-100'
|
|
25044
|
+
"
|
|
25045
|
+
[attr.aria-current]="
|
|
25046
|
+
$index === activeIndex() ? 'true' : null
|
|
25047
|
+
"
|
|
23703
25048
|
(click)="selectIndex($index)"
|
|
23704
25049
|
>
|
|
23705
25050
|
@if (thumbnailTpl()) {
|
|
23706
|
-
<ng-container
|
|
25051
|
+
<ng-container
|
|
25052
|
+
[ngTemplateOutlet]="thumbnailTpl()!"
|
|
25053
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
25054
|
+
/>
|
|
23707
25055
|
} @else {
|
|
23708
|
-
<img
|
|
25056
|
+
<img
|
|
25057
|
+
[src]="item.thumbnailImageSrc ?? item.itemImageSrc"
|
|
25058
|
+
[alt]="item.alt ?? ''"
|
|
25059
|
+
class="w-full h-full object-cover"
|
|
25060
|
+
/>
|
|
23709
25061
|
}
|
|
23710
25062
|
</button>
|
|
23711
25063
|
}
|
|
23712
25064
|
</div>
|
|
23713
25065
|
|
|
23714
25066
|
@if (showThumbnailNavigators()) {
|
|
23715
|
-
<button
|
|
25067
|
+
<button
|
|
25068
|
+
type="button"
|
|
25069
|
+
aria-label="Next thumbnails"
|
|
23716
25070
|
class="w-7 h-7 shrink-0 flex items-center justify-center rounded-full border border-(--f-content-border-color) hover:bg-(--f-content-hover-background) cursor-pointer transition-colors"
|
|
23717
25071
|
(click)="scrollThumbnails(1)"
|
|
23718
|
-
|
|
25072
|
+
>
|
|
25073
|
+
<ui-icon
|
|
25074
|
+
[name]="
|
|
25075
|
+
isThumbVertical() ? 'chevron-down' : 'chevron-right'
|
|
25076
|
+
"
|
|
25077
|
+
class="text-xs"
|
|
25078
|
+
></ui-icon>
|
|
25079
|
+
</button>
|
|
23719
25080
|
}
|
|
23720
25081
|
</div>
|
|
23721
25082
|
}
|