@thalassic/ui 22.18.1 → 22.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/thalassic-ui.mjs +898 -151
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/thalassic-ui.d.ts +417 -38
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, PLATFORM_ID, DestroyRef, numberAttribute, output, viewChild, contentChild, Component, ViewContainerRef, DOCUMENT, afterRenderEffect, linkedSignal,
|
|
2
|
+
import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, PLATFORM_ID, DestroyRef, numberAttribute, output, viewChild, contentChild, Component, ViewContainerRef, DOCUMENT, afterRenderEffect, linkedSignal, Service, Renderer2, effect, ElementRef, Injectable, makeEnvironmentProviders, TemplateRef, forwardRef, afterNextRender, Injector, RendererStyleFlags2, viewChildren, untracked, contentChildren, isDevMode, provideEnvironmentInitializer } from '@angular/core';
|
|
3
3
|
import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
4
4
|
import { startOfWeek, startOfMonth, endOfWeek, endOfMonth, addDays, eachDayOfInterval, startOfDay, isSameMonth, format, isSameDay, subMonths, isBefore, isAfter, differenceInCalendarDays, addHours, differenceInMinutes, isSameWeek, addMonths, addWeeks, isToday, setMonth, subYears, addYears, getYear, getMonth, getHours, getMinutes, setMinutes, setHours, setYear } from 'date-fns';
|
|
5
5
|
import { isPlatformBrowser, NgTemplateOutlet, NgComponentOutlet, LocationStrategy } from '@angular/common';
|
|
@@ -15,11 +15,12 @@ import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
|
15
15
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
16
16
|
import { CdkDialogContainer, DialogRef as DialogRef$1, Dialog as Dialog$1 } from '@angular/cdk/dialog';
|
|
17
17
|
import { Directionality } from '@angular/cdk/bidi';
|
|
18
|
+
import * as i1 from '@thalassic/core';
|
|
19
|
+
import { PanDirective, SWIPE_DEFAULT_MIN_VELOCITY, PAN_CONFIG, DEFAULT_PAN_CONFIG, deepMerge } from '@thalassic/core';
|
|
18
20
|
import { Menu as Menu$1, MenuItem } from '@angular/aria/menu';
|
|
19
|
-
import * as i1 from '@angular/aria/tabs';
|
|
21
|
+
import * as i1$1 from '@angular/aria/tabs';
|
|
20
22
|
import { TabPanel, TabList, Tab as Tab$1, Tabs as Tabs$1, TabContent } from '@angular/aria/tabs';
|
|
21
23
|
import { CdkTable, CdkHeaderCell, CdkCell, CdkCellDef, CdkHeaderCellDef, CdkColumnDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef } from '@angular/cdk/table';
|
|
22
|
-
import { deepMerge } from '@thalassic/core';
|
|
23
24
|
|
|
24
25
|
const DEFAULT_ACCESSIBILITY_CONFIG = {
|
|
25
26
|
expandTouchTargets: true,
|
|
@@ -786,9 +787,12 @@ function afterLeaveAnimation(element, onDone) {
|
|
|
786
787
|
const timeoutId = window.setTimeout(finalize, LEAVE_ANIMATION_FALLBACK_MS);
|
|
787
788
|
// The `--leave` class applies on the next change detection; on the following
|
|
788
789
|
// frame, finalize at once if no animation is running. When motion is enabled
|
|
789
|
-
// the computed `animationName`
|
|
790
|
+
// the computed `animationName` names the keyframes, so this cannot finalize
|
|
791
|
+
// early. An engine that resolves no animation reports either `none` or an
|
|
792
|
+
// empty string, and both mean the same thing here.
|
|
790
793
|
requestAnimationFrame(() => {
|
|
791
|
-
|
|
794
|
+
const animationName = getComputedStyle(element).animationName;
|
|
795
|
+
if (animationName === 'none' || animationName === '')
|
|
792
796
|
finalize();
|
|
793
797
|
});
|
|
794
798
|
}
|
|
@@ -977,6 +981,12 @@ class AbstractSelect extends ValueFormControl {
|
|
|
977
981
|
* opens it from the ones that follow while it stays open.
|
|
978
982
|
*/
|
|
979
983
|
_panelWasOpen = false;
|
|
984
|
+
/**
|
|
985
|
+
* Whether the virtualized viewport last rendered with nothing in it. Its height is sized to
|
|
986
|
+
* the options, so an empty list collapses it to zero — and a measurement taken then would
|
|
987
|
+
* describe a viewport that no longer exists once options arrive.
|
|
988
|
+
*/
|
|
989
|
+
_viewportWasCollapsed = true;
|
|
980
990
|
/**
|
|
981
991
|
* Keeps the active option visible inside the scrolling panel. Focus stays on the
|
|
982
992
|
* trigger and only `aria-activedescendant` moves, so the browser never scrolls the
|
|
@@ -993,17 +1003,22 @@ class AbstractSelect extends ValueFormControl {
|
|
|
993
1003
|
if (!isOpen)
|
|
994
1004
|
return;
|
|
995
1005
|
const virtualScroll = this.virtualScrollRef();
|
|
996
|
-
// The
|
|
997
|
-
//
|
|
998
|
-
|
|
999
|
-
|
|
1006
|
+
// The option elements are re-created when the visible list changes, so the scroll
|
|
1007
|
+
// has to re-run then too, not only when the index moves.
|
|
1008
|
+
const optionCount = this.visibleOptions().length;
|
|
1009
|
+
const viewportWasCollapsed = this._viewportWasCollapsed;
|
|
1010
|
+
this._viewportWasCollapsed = optionCount === 0;
|
|
1011
|
+
// The overlay pane is attached (and re-attached — it is reused across opens) after the
|
|
1012
|
+
// panel's view is created, so the viewport's cached measurement is stale until it is
|
|
1013
|
+
// re-measured in the first render of an open panel. A panel opened on an empty list —
|
|
1014
|
+
// everything filtered out, or a list still being fetched — measures a viewport of no
|
|
1015
|
+
// height, so the first options to arrive call for a fresh measurement too.
|
|
1016
|
+
if (virtualScroll && (!wasOpen || (viewportWasCollapsed && optionCount > 0))) {
|
|
1000
1017
|
virtualScroll.checkViewportSize();
|
|
1018
|
+
}
|
|
1001
1019
|
const index = this.activeIndex();
|
|
1002
1020
|
if (index < 0)
|
|
1003
1021
|
return;
|
|
1004
|
-
// The option elements are re-created when the visible list changes, so the scroll
|
|
1005
|
-
// has to re-run then too, not only when the index moves.
|
|
1006
|
-
this.visibleOptions();
|
|
1007
1022
|
if (virtualScroll) {
|
|
1008
1023
|
// `aria-activedescendant` may only reference a rendered element; scrolling the
|
|
1009
1024
|
// index into view keeps it inside the rendered window, and the viewport's render
|
|
@@ -1092,12 +1107,19 @@ class AbstractSelect extends ValueFormControl {
|
|
|
1092
1107
|
array.push(`${this.CLASS_NAME}--${this.size()}`);
|
|
1093
1108
|
if (this.fluid())
|
|
1094
1109
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
1095
|
-
return array.concat(this.controlClasses());
|
|
1110
|
+
return array.concat(this.hostStateClasses(), this.controlClasses());
|
|
1096
1111
|
}, /* @ts-ignore */
|
|
1097
1112
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1098
1113
|
get listboxId() {
|
|
1099
1114
|
return `${this.uniqueId}-listbox`;
|
|
1100
1115
|
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Host modifiers for states only one control has, listed alongside the shared ones. Read from
|
|
1118
|
+
* within the host-class computation, so signals a control reads here stay reactive.
|
|
1119
|
+
*/
|
|
1120
|
+
hostStateClasses() {
|
|
1121
|
+
return [];
|
|
1122
|
+
}
|
|
1101
1123
|
/**
|
|
1102
1124
|
* Narrows the option list shown in the panel. The listbox controls show every option; an editable
|
|
1103
1125
|
* combobox overrides this to filter by the typed query.
|
|
@@ -1394,12 +1416,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
1394
1416
|
}]
|
|
1395
1417
|
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }, { type: i0.Output, args: ["contentChange"] }], templateData: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateData", required: false }] }, { type: i0.Output, args: ["templateDataChange"] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: true }] }, { type: i0.Output, args: ["colorChange"] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: true }] }, { type: i0.Output, args: ["arrowChange"] }], arrowPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrowPosition", required: false }] }, { type: i0.Output, args: ["arrowPositionChange"] }] } });
|
|
1396
1418
|
|
|
1419
|
+
/**
|
|
1420
|
+
* Owns the one tooltip overlay every trigger shares. A single tooltip is visible at a time
|
|
1421
|
+
* across the page: opening one asks whoever holds the current tooltip to let go first, so a
|
|
1422
|
+
* hovered element and a focused element elsewhere cannot leave two bubbles on screen.
|
|
1423
|
+
*
|
|
1424
|
+
* Every call names the trigger making it and is ignored unless that trigger holds the visible
|
|
1425
|
+
* tooltip, so one tearing itself down can never close a tooltip that has since moved on.
|
|
1426
|
+
*/
|
|
1397
1427
|
class TooltipService {
|
|
1398
1428
|
// Injections
|
|
1399
1429
|
_overlay = inject(Overlay);
|
|
1400
1430
|
// State
|
|
1431
|
+
_owner = null;
|
|
1401
1432
|
_overlayRef = null;
|
|
1402
1433
|
_tooltipRef = null;
|
|
1434
|
+
_positionStrategy = null;
|
|
1403
1435
|
_positionSubscription = null;
|
|
1404
1436
|
/**
|
|
1405
1437
|
* Edge the visible tooltip settled on. The strategy applies its position while the portal is
|
|
@@ -1407,8 +1439,9 @@ class TooltipService {
|
|
|
1407
1439
|
*/
|
|
1408
1440
|
_arrowPosition = null;
|
|
1409
1441
|
// Public methods
|
|
1410
|
-
show(origin, positions) {
|
|
1411
|
-
this.
|
|
1442
|
+
show(owner, origin, positions) {
|
|
1443
|
+
this._releaseOwner();
|
|
1444
|
+
this._owner = owner;
|
|
1412
1445
|
this._overlayRef = this._overlay.create({
|
|
1413
1446
|
positionStrategy: this._createPositionStrategy(origin, positions),
|
|
1414
1447
|
scrollStrategy: this._overlay.scrollStrategies.reposition(),
|
|
@@ -1417,29 +1450,39 @@ class TooltipService {
|
|
|
1417
1450
|
this._tooltipRef.instance.arrowPosition.set(this._arrowPosition);
|
|
1418
1451
|
return this._tooltipRef;
|
|
1419
1452
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1453
|
+
/** Re-anchors the visible tooltip, following a cursor it is bound to. */
|
|
1454
|
+
move(owner, point) {
|
|
1455
|
+
if (this._owner !== owner)
|
|
1456
|
+
return;
|
|
1457
|
+
const overlayRef = this._overlayRef;
|
|
1458
|
+
const positionStrategy = this._positionStrategy;
|
|
1459
|
+
if (!overlayRef || !positionStrategy)
|
|
1422
1460
|
return;
|
|
1423
|
-
|
|
1461
|
+
// Re-targeting the strategy already attached, rather than building a replacement, keeps a
|
|
1462
|
+
// stream of pointer moves from allocating a strategy and a subscription per event.
|
|
1463
|
+
positionStrategy.setOrigin(point);
|
|
1464
|
+
overlayRef.updatePosition();
|
|
1424
1465
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1466
|
+
/**
|
|
1467
|
+
* Detaches the tooltip so Angular's `animate.leave` plays the exit animation, then disposes the
|
|
1468
|
+
* pane once that animation finishes. The pane is kept alive in the meantime so it is not torn
|
|
1469
|
+
* down mid-animation.
|
|
1470
|
+
*/
|
|
1471
|
+
hide(owner) {
|
|
1472
|
+
if (this._owner !== owner)
|
|
1430
1473
|
return;
|
|
1431
1474
|
const overlayRef = this._overlayRef;
|
|
1432
1475
|
this._overlayRef = null;
|
|
1433
1476
|
this._reset();
|
|
1477
|
+
if (!overlayRef)
|
|
1478
|
+
return;
|
|
1434
1479
|
overlayRef.detach();
|
|
1435
1480
|
disposeAfterLeaveAnimation(overlayRef);
|
|
1436
1481
|
}
|
|
1437
|
-
dispose() {
|
|
1438
|
-
if (
|
|
1482
|
+
dispose(owner) {
|
|
1483
|
+
if (this._owner !== owner)
|
|
1439
1484
|
return;
|
|
1440
|
-
this.
|
|
1441
|
-
this._overlayRef = null;
|
|
1442
|
-
this._reset();
|
|
1485
|
+
this._disposeOverlay();
|
|
1443
1486
|
}
|
|
1444
1487
|
// Private methods
|
|
1445
1488
|
/**
|
|
@@ -1460,22 +1503,42 @@ class TooltipService {
|
|
|
1460
1503
|
return;
|
|
1461
1504
|
tooltipRef.instance.arrowPosition.set(this._arrowPosition);
|
|
1462
1505
|
});
|
|
1506
|
+
this._positionStrategy = positionStrategy;
|
|
1463
1507
|
return positionStrategy;
|
|
1464
1508
|
}
|
|
1509
|
+
/** Takes the tooltip back from its owner, so the next one starts from an empty stage. */
|
|
1510
|
+
_releaseOwner() {
|
|
1511
|
+
const owner = this._owner;
|
|
1512
|
+
if (owner)
|
|
1513
|
+
owner.releaseTooltip();
|
|
1514
|
+
// An owner that did not let go leaves its overlay behind, and it cannot outlive the tooltip
|
|
1515
|
+
// replacing it.
|
|
1516
|
+
this._disposeOverlay();
|
|
1517
|
+
}
|
|
1518
|
+
_disposeOverlay() {
|
|
1519
|
+
const overlayRef = this._overlayRef;
|
|
1520
|
+
this._overlayRef = null;
|
|
1521
|
+
this._reset();
|
|
1522
|
+
if (!overlayRef)
|
|
1523
|
+
return;
|
|
1524
|
+
overlayRef.dispose();
|
|
1525
|
+
}
|
|
1465
1526
|
/** Drops everything tied to the overlay that just went away. */
|
|
1466
1527
|
_reset() {
|
|
1528
|
+
this._owner = null;
|
|
1467
1529
|
this._tooltipRef = null;
|
|
1530
|
+
this._positionStrategy = null;
|
|
1468
1531
|
this._arrowPosition = null;
|
|
1469
1532
|
if (!this._positionSubscription)
|
|
1470
1533
|
return;
|
|
1471
1534
|
this._positionSubscription.unsubscribe();
|
|
1472
1535
|
this._positionSubscription = null;
|
|
1473
1536
|
}
|
|
1474
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.
|
|
1475
|
-
static ɵprov = i0.ɵɵ
|
|
1537
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1538
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.5", ngImport: i0, type: TooltipService });
|
|
1476
1539
|
}
|
|
1477
1540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipService, decorators: [{
|
|
1478
|
-
type:
|
|
1541
|
+
type: Service
|
|
1479
1542
|
}] });
|
|
1480
1543
|
|
|
1481
1544
|
const DEFAULT_TOOLTIP_CONFIG = {
|
|
@@ -1496,11 +1559,15 @@ const TOOLTIP_CONFIG = new InjectionToken('TOOLTIP_CONFIG', {
|
|
|
1496
1559
|
* Shared machinery behind every tooltip trigger: the appearance inputs, the overlay lifecycle,
|
|
1497
1560
|
* and the `aria-describedby` link. A subclass owns only *when* a tooltip opens and *which*
|
|
1498
1561
|
* element it anchors to — `[tlsTooltip]` binds its own host, `[tlsTooltipDelegate]` resolves an
|
|
1499
|
-
* item out of a delegated event — and
|
|
1562
|
+
* item out of a delegated event — and records or drops show requests accordingly.
|
|
1500
1563
|
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1564
|
+
* A tooltip can be asked for by a hover, by keyboard focus, and by a tap at the same time. Each
|
|
1565
|
+
* source is tracked on its own and the most recent one is the tooltip on screen, so an
|
|
1566
|
+
* interaction ending only takes back what it asked for: a pointer leaving an element that is
|
|
1567
|
+
* still focused does not dismiss the tooltip focus is entitled to (WCAG 1.4.13).
|
|
1568
|
+
*
|
|
1569
|
+
* The tooltip overlay itself is shared across the page, so opening one here closes any other
|
|
1570
|
+
* trigger's.
|
|
1504
1571
|
*/
|
|
1505
1572
|
class TooltipTrigger {
|
|
1506
1573
|
// Injections
|
|
@@ -1524,10 +1591,21 @@ class TooltipTrigger {
|
|
|
1524
1591
|
tooltipArrow = input(this._config.arrow, /* @ts-ignore */
|
|
1525
1592
|
...(ngDevMode ? [{ debugName: "tooltipArrow" }] : /* istanbul ignore next */ []));
|
|
1526
1593
|
// State
|
|
1594
|
+
/**
|
|
1595
|
+
* Live show requests, keyed by the source that made them and held in the order they arrived.
|
|
1596
|
+
* The last one in is the one on screen; emptying the map hides the tooltip.
|
|
1597
|
+
*/
|
|
1598
|
+
_requests = new Map();
|
|
1527
1599
|
/** Element the visible tooltip is anchored to, `null` while nothing is shown. */
|
|
1528
1600
|
_anchor = null;
|
|
1601
|
+
_tooltipRef = signal(null, /* @ts-ignore */
|
|
1602
|
+
...(ngDevMode ? [{ debugName: "_tooltipRef" }] : /* istanbul ignore next */ []));
|
|
1529
1603
|
/** Id of the description the visible tooltip added, so only that one is taken back. */
|
|
1530
1604
|
_describedById = null;
|
|
1605
|
+
/** Element that description was put on, which is not always the anchor. */
|
|
1606
|
+
_describedElement = null;
|
|
1607
|
+
/** Teardown of the document listeners that only run while a tooltip is visible. */
|
|
1608
|
+
_dismissListeners = [];
|
|
1531
1609
|
// Computed
|
|
1532
1610
|
_positions = computed(() => {
|
|
1533
1611
|
const positions = this.tooltipPositions();
|
|
@@ -1536,91 +1614,211 @@ class TooltipTrigger {
|
|
|
1536
1614
|
return buildOverlayPositions(this.tooltipPosition(), this.tooltipOffset());
|
|
1537
1615
|
}, /* @ts-ignore */
|
|
1538
1616
|
...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
1617
|
+
constructor() {
|
|
1618
|
+
// A tooltip already on screen when the trigger is disabled goes with it.
|
|
1619
|
+
effect(() => {
|
|
1620
|
+
if (this.tooltipDisabled())
|
|
1621
|
+
this._hideAll();
|
|
1622
|
+
});
|
|
1623
|
+
// Appearance is applied when the tooltip opens and kept live from there, so an input
|
|
1624
|
+
// changing under a visible tooltip reaches it.
|
|
1625
|
+
effect(() => {
|
|
1626
|
+
const tooltipRef = this._tooltipRef();
|
|
1627
|
+
if (!tooltipRef)
|
|
1628
|
+
return;
|
|
1629
|
+
tooltipRef.instance.color.set(this.tooltipColor());
|
|
1630
|
+
tooltipRef.instance.arrow.set(this.tooltipArrow());
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1539
1633
|
// Accessors
|
|
1540
1634
|
/** Anchor of the visible tooltip, for a subclass deciding whether an event concerns it. */
|
|
1541
1635
|
get anchor() {
|
|
1542
1636
|
return this._anchor;
|
|
1543
1637
|
}
|
|
1544
|
-
//
|
|
1545
|
-
/**
|
|
1546
|
-
|
|
1547
|
-
this.
|
|
1638
|
+
// Public methods
|
|
1639
|
+
/** Gives up the shared tooltip, along with every reason this trigger was showing one. */
|
|
1640
|
+
releaseTooltip() {
|
|
1641
|
+
this._requests.clear();
|
|
1642
|
+
this._close();
|
|
1548
1643
|
}
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
*/
|
|
1553
|
-
_show(anchor, content, data = null, point) {
|
|
1644
|
+
// Protected methods
|
|
1645
|
+
/** Records `source` as wanting the tooltip described by `request`, and shows it. */
|
|
1646
|
+
_show(source, request) {
|
|
1554
1647
|
if (this.tooltipDisabled())
|
|
1555
1648
|
return;
|
|
1556
|
-
// Re-showing for the anchor already open would rebuild the overlay for nothing.
|
|
1557
|
-
if (this._anchor === anchor)
|
|
1558
|
-
return;
|
|
1559
1649
|
// Nothing to render — empty content would show a bare bubble.
|
|
1560
|
-
if (!content)
|
|
1650
|
+
if (!request.content)
|
|
1651
|
+
return;
|
|
1652
|
+
// Re-inserting moves the request to the end, keeping the map in the order requests arrived.
|
|
1653
|
+
this._requests.delete(source);
|
|
1654
|
+
this._requests.set(source, request);
|
|
1655
|
+
this._present();
|
|
1656
|
+
}
|
|
1657
|
+
/** Takes back what `source` asked for, leaving a tooltip any other source still wants. */
|
|
1658
|
+
_hide(source) {
|
|
1659
|
+
if (!this._requests.delete(source))
|
|
1660
|
+
return;
|
|
1661
|
+
this._present();
|
|
1662
|
+
}
|
|
1663
|
+
/** Drops every reason at once — a dismissal, rather than the end of one interaction. */
|
|
1664
|
+
_hideAll() {
|
|
1665
|
+
if (this._requests.size === 0)
|
|
1561
1666
|
return;
|
|
1562
|
-
this.
|
|
1563
|
-
this.
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1667
|
+
this._requests.clear();
|
|
1668
|
+
this._present();
|
|
1669
|
+
}
|
|
1670
|
+
/** Whether a tap is what is currently holding the tooltip on `anchor`, which another tap ends. */
|
|
1671
|
+
_isTapped(anchor) {
|
|
1672
|
+
const request = this._requests.get('touch');
|
|
1673
|
+
if (!request)
|
|
1674
|
+
return false;
|
|
1675
|
+
return request.anchor === anchor;
|
|
1676
|
+
}
|
|
1677
|
+
/** Re-states the content of every live request, so an input changing reaches a visible tooltip. */
|
|
1678
|
+
_updateContent(content, data) {
|
|
1679
|
+
if (this._requests.size === 0)
|
|
1680
|
+
return;
|
|
1681
|
+
if (!content) {
|
|
1682
|
+
this._hideAll();
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1685
|
+
for (const [source, request] of this._requests) {
|
|
1686
|
+
this._requests.set(source, { ...request, content, data });
|
|
1687
|
+
}
|
|
1688
|
+
this._present();
|
|
1689
|
+
}
|
|
1690
|
+
// Private methods
|
|
1691
|
+
/** Brings the tooltip in line with the requests: the newest one, or none at all. */
|
|
1692
|
+
_present() {
|
|
1693
|
+
const request = this._latestRequest();
|
|
1694
|
+
if (!request) {
|
|
1695
|
+
this._close();
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
if (this._anchor !== request.anchor) {
|
|
1699
|
+
this._close();
|
|
1700
|
+
this._open(request);
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
const tooltipRef = this._tooltipRef();
|
|
1704
|
+
if (tooltipRef)
|
|
1705
|
+
this._applyContent(tooltipRef, request);
|
|
1706
|
+
}
|
|
1707
|
+
_open(request) {
|
|
1708
|
+
this._anchor = request.anchor;
|
|
1709
|
+
const origin = this.tooltipOrigin() === 'cursor' && request.point ? request.point : request.anchor;
|
|
1710
|
+
const tooltipRef = this._tooltipService.show(this, origin, this._positions());
|
|
1568
1711
|
tooltipRef.instance.color.set(this.tooltipColor());
|
|
1569
1712
|
tooltipRef.instance.arrow.set(this.tooltipArrow());
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
return;
|
|
1574
|
-
this._describedById = tooltipRef.instance.id;
|
|
1575
|
-
addDescribedBy(this._renderer, anchor, this._describedById);
|
|
1713
|
+
this._tooltipRef.set(tooltipRef);
|
|
1714
|
+
this._applyContent(tooltipRef, request);
|
|
1715
|
+
this._listenWhileVisible();
|
|
1576
1716
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
if (!anchor)
|
|
1717
|
+
_close() {
|
|
1718
|
+
if (!this._anchor)
|
|
1580
1719
|
return;
|
|
1581
1720
|
this._anchor = null;
|
|
1582
|
-
this.
|
|
1583
|
-
this.
|
|
1721
|
+
this._tooltipRef.set(null);
|
|
1722
|
+
this._unlisten();
|
|
1723
|
+
this._tooltipService.hide(this);
|
|
1724
|
+
this._undescribe();
|
|
1725
|
+
}
|
|
1726
|
+
_applyContent(tooltipRef, request) {
|
|
1727
|
+
tooltipRef.instance.content.set(request.content);
|
|
1728
|
+
tooltipRef.instance.templateData.set(request.data);
|
|
1729
|
+
this._describe(tooltipRef, request);
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Links the described element to the tooltip, following focus as it moves between controls the
|
|
1733
|
+
* anchor wraps. A description identical to the accessible name would be announced twice; the
|
|
1734
|
+
* tooltip is purely visual then and the link is omitted.
|
|
1735
|
+
*/
|
|
1736
|
+
_describe(tooltipRef, request) {
|
|
1737
|
+
const element = request.describedElement;
|
|
1738
|
+
if (element.getAttribute('aria-label') === request.content) {
|
|
1739
|
+
this._undescribe();
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1742
|
+
if (this._describedElement === element && this._describedById)
|
|
1743
|
+
return;
|
|
1744
|
+
this._undescribe();
|
|
1745
|
+
this._describedElement = element;
|
|
1746
|
+
this._describedById = tooltipRef.instance.id;
|
|
1747
|
+
addDescribedBy(this._renderer, element, this._describedById);
|
|
1584
1748
|
}
|
|
1585
|
-
// Private methods
|
|
1586
1749
|
/** Takes back only the description this trigger added, leaving the consumer's own intact. */
|
|
1587
|
-
_undescribe(
|
|
1750
|
+
_undescribe() {
|
|
1751
|
+
const element = this._describedElement;
|
|
1588
1752
|
const describedById = this._describedById;
|
|
1589
|
-
|
|
1590
|
-
return;
|
|
1753
|
+
this._describedElement = null;
|
|
1591
1754
|
this._describedById = null;
|
|
1592
|
-
|
|
1755
|
+
if (!element || !describedById)
|
|
1756
|
+
return;
|
|
1757
|
+
removeDescribedBy(this._renderer, element, describedById);
|
|
1758
|
+
}
|
|
1759
|
+
_latestRequest() {
|
|
1760
|
+
let latest = null;
|
|
1761
|
+
for (const request of this._requests.values())
|
|
1762
|
+
latest = request;
|
|
1763
|
+
return latest;
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Binds the dismissals that belong to a visible tooltip and nothing else, so a page full of
|
|
1767
|
+
* triggers carries no document listeners for the tooltips it is not showing.
|
|
1768
|
+
*/
|
|
1769
|
+
_listenWhileVisible() {
|
|
1770
|
+
this._unlisten();
|
|
1771
|
+
this._dismissListeners.push(this._renderer.listen('document', 'keydown', (event) => {
|
|
1772
|
+
// Dismissible without moving the pointer or focus (WCAG 1.4.13).
|
|
1773
|
+
if (event.key === 'Escape')
|
|
1774
|
+
this._hideAll();
|
|
1775
|
+
}),
|
|
1776
|
+
// A tap leaves no pointer to move away and no Escape key to press, so the next tap
|
|
1777
|
+
// outside the anchor is what takes the tooltip back.
|
|
1778
|
+
this._renderer.listen('document', 'pointerdown', (event) => {
|
|
1779
|
+
if (event.pointerType !== 'touch')
|
|
1780
|
+
return;
|
|
1781
|
+
if (!this._requests.has('touch'))
|
|
1782
|
+
return;
|
|
1783
|
+
const anchor = this._anchor;
|
|
1784
|
+
const target = event.target;
|
|
1785
|
+
if (anchor && target instanceof Node && anchor.contains(target))
|
|
1786
|
+
return;
|
|
1787
|
+
this._hideAll();
|
|
1788
|
+
}));
|
|
1789
|
+
}
|
|
1790
|
+
_unlisten() {
|
|
1791
|
+
for (const unlisten of this._dismissListeners)
|
|
1792
|
+
unlisten();
|
|
1793
|
+
this._dismissListeners = [];
|
|
1593
1794
|
}
|
|
1594
1795
|
// Lifecycle
|
|
1595
1796
|
ngOnDestroy() {
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
this._undescribe(anchor);
|
|
1797
|
+
this._undescribe();
|
|
1798
|
+
this._requests.clear();
|
|
1599
1799
|
this._anchor = null;
|
|
1600
|
-
this.
|
|
1800
|
+
this._tooltipRef.set(null);
|
|
1801
|
+
this._unlisten();
|
|
1802
|
+
this._tooltipService.dispose(this);
|
|
1601
1803
|
}
|
|
1602
1804
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1603
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipTrigger, isStandalone: true, inputs: { tooltipDisabled: { classPropertyName: "tooltipDisabled", publicName: "tooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, tooltipOrigin: { classPropertyName: "tooltipOrigin", publicName: "tooltipOrigin", isSignal: true, isRequired: false, transformFunction: null }, tooltipPositions: { classPropertyName: "tooltipPositions", publicName: "tooltipPositions", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipOffset: { classPropertyName: "tooltipOffset", publicName: "tooltipOffset", isSignal: true, isRequired: false, transformFunction: null }, tooltipColor: { classPropertyName: "tooltipColor", publicName: "tooltipColor", isSignal: true, isRequired: false, transformFunction: null }, tooltipArrow: { classPropertyName: "tooltipArrow", publicName: "tooltipArrow", isSignal: true, isRequired: false, transformFunction: null } },
|
|
1805
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipTrigger, isStandalone: true, inputs: { tooltipDisabled: { classPropertyName: "tooltipDisabled", publicName: "tooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, tooltipOrigin: { classPropertyName: "tooltipOrigin", publicName: "tooltipOrigin", isSignal: true, isRequired: false, transformFunction: null }, tooltipPositions: { classPropertyName: "tooltipPositions", publicName: "tooltipPositions", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipOffset: { classPropertyName: "tooltipOffset", publicName: "tooltipOffset", isSignal: true, isRequired: false, transformFunction: null }, tooltipColor: { classPropertyName: "tooltipColor", publicName: "tooltipColor", isSignal: true, isRequired: false, transformFunction: null }, tooltipArrow: { classPropertyName: "tooltipArrow", publicName: "tooltipArrow", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
1604
1806
|
}
|
|
1605
1807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipTrigger, decorators: [{
|
|
1606
|
-
type: Directive
|
|
1607
|
-
|
|
1608
|
-
host: {
|
|
1609
|
-
'(document:keydown.escape)': 'onEscape()',
|
|
1610
|
-
},
|
|
1611
|
-
}]
|
|
1612
|
-
}], propDecorators: { tooltipDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipDisabled", required: false }] }], tooltipOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipOrigin", required: false }] }], tooltipPositions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPositions", required: false }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], tooltipOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipOffset", required: false }] }], tooltipColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipColor", required: false }] }], tooltipArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipArrow", required: false }] }] } });
|
|
1808
|
+
type: Directive
|
|
1809
|
+
}], ctorParameters: () => [], propDecorators: { tooltipDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipDisabled", required: false }] }], tooltipOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipOrigin", required: false }] }], tooltipPositions: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPositions", required: false }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], tooltipOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipOffset", required: false }] }], tooltipColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipColor", required: false }] }], tooltipArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipArrow", required: false }] }] } });
|
|
1613
1810
|
|
|
1614
1811
|
/**
|
|
1615
1812
|
* Serves tooltips for a whole subtree from one instance. Any descendant carrying the content
|
|
1616
1813
|
* attribute (`data-tooltip` by default) gets a tooltip, without each one needing its own
|
|
1617
1814
|
* `[tlsTooltip]`. Events are delegated to this host, so a grid of hundreds of cells costs one
|
|
1618
|
-
* directive
|
|
1815
|
+
* directive and one set of listeners rather than one of each per cell.
|
|
1619
1816
|
*
|
|
1620
1817
|
* Interaction matches `[tlsTooltip]`: hover for mouse and pen, tap-to-toggle for touch, show
|
|
1621
1818
|
* on keyboard focus, dismiss on Escape without moving the pointer or focus (WCAG 1.4.13), and
|
|
1622
|
-
* `aria-describedby` linking the
|
|
1623
|
-
*
|
|
1819
|
+
* `aria-describedby` linking the visible tooltip to the item — or, when focus is inside a
|
|
1820
|
+
* composite item, to the control holding it — joining any description that element already
|
|
1821
|
+
* carries, and omitted entirely when its `aria-label` already says the same thing.
|
|
1624
1822
|
*
|
|
1625
1823
|
* Trade-off: content is a plain string read from an attribute when the tooltip opens, so a
|
|
1626
1824
|
* `TemplateRef` tooltip is not available here and an attribute change while the tooltip is
|
|
@@ -1648,23 +1846,21 @@ class TooltipDelegateDirective extends TooltipTrigger {
|
|
|
1648
1846
|
// A touch "over" is a tap, not a hover — toggle instead. The default is not prevented,
|
|
1649
1847
|
// so the tap still activates an interactive item.
|
|
1650
1848
|
if (event.pointerType === 'touch') {
|
|
1651
|
-
if (this.
|
|
1652
|
-
this._hide();
|
|
1849
|
+
if (this._isTapped(item)) {
|
|
1850
|
+
this._hide('touch');
|
|
1653
1851
|
}
|
|
1654
1852
|
else {
|
|
1655
|
-
this._showItem(item);
|
|
1853
|
+
this._showItem('touch', item);
|
|
1656
1854
|
}
|
|
1657
1855
|
return;
|
|
1658
1856
|
}
|
|
1659
|
-
this._showItem(item, { x: event.clientX, y: event.clientY });
|
|
1857
|
+
this._showItem('hover', item, { x: event.clientX, y: event.clientY });
|
|
1660
1858
|
}
|
|
1661
1859
|
onPointerMove(event) {
|
|
1662
1860
|
if (event.pointerType === 'touch')
|
|
1663
1861
|
return;
|
|
1664
|
-
if (!this.anchor)
|
|
1665
|
-
return;
|
|
1666
1862
|
if (this.tooltipOrigin() === 'cursor') {
|
|
1667
|
-
this._tooltipService.move({ x: event.clientX, y: event.clientY }
|
|
1863
|
+
this._tooltipService.move(this, { x: event.clientX, y: event.clientY });
|
|
1668
1864
|
}
|
|
1669
1865
|
}
|
|
1670
1866
|
onPointerOut(event) {
|
|
@@ -1672,25 +1868,27 @@ class TooltipDelegateDirective extends TooltipTrigger {
|
|
|
1672
1868
|
// hiding here would undo the toggle the tap just made.
|
|
1673
1869
|
if (event.pointerType === 'touch')
|
|
1674
1870
|
return;
|
|
1675
|
-
|
|
1871
|
+
// Crossing into another item — or between children of the one being left — is not a leave:
|
|
1872
|
+
// the `pointerover` that follows re-anchors the tooltip without it ever coming down.
|
|
1873
|
+
if (this._resolveItem(event.relatedTarget))
|
|
1676
1874
|
return;
|
|
1677
|
-
|
|
1678
|
-
if (this._resolveItem(event.relatedTarget) === this.anchor)
|
|
1679
|
-
return;
|
|
1680
|
-
this._hide();
|
|
1875
|
+
this._hide('hover');
|
|
1681
1876
|
}
|
|
1682
1877
|
onFocusIn(event) {
|
|
1683
1878
|
const item = this._resolveItem(event.target);
|
|
1684
1879
|
if (!item)
|
|
1685
1880
|
return;
|
|
1686
|
-
// No cursor to anchor to; a focus-triggered tooltip always anchors to the item.
|
|
1687
|
-
|
|
1881
|
+
// No cursor to anchor to; a focus-triggered tooltip always anchors to the item. An item that
|
|
1882
|
+
// is a composite holds the control focus actually landed on, and that is what it describes.
|
|
1883
|
+
const focused = event.target;
|
|
1884
|
+
this._showItem('focus', item, null, focused instanceof HTMLElement ? focused : null);
|
|
1688
1885
|
}
|
|
1689
1886
|
onFocusOut(event) {
|
|
1690
1887
|
// Focus moving between children of the same item is not a leave.
|
|
1691
|
-
|
|
1888
|
+
const item = this._resolveItem(event.relatedTarget);
|
|
1889
|
+
if (item && item === this.anchor)
|
|
1692
1890
|
return;
|
|
1693
|
-
this._hide();
|
|
1891
|
+
this._hide('focus');
|
|
1694
1892
|
}
|
|
1695
1893
|
// Private methods
|
|
1696
1894
|
/** The tooltip-owning ancestor of `target` within this subtree, if there is one. */
|
|
@@ -1705,20 +1903,25 @@ class TooltipDelegateDirective extends TooltipTrigger {
|
|
|
1705
1903
|
return null;
|
|
1706
1904
|
return item;
|
|
1707
1905
|
}
|
|
1708
|
-
_showItem(item, point) {
|
|
1906
|
+
_showItem(source, item, point = null, describedElement = null) {
|
|
1709
1907
|
const content = item.getAttribute(this.contentAttribute());
|
|
1710
1908
|
if (!content)
|
|
1711
1909
|
return;
|
|
1712
|
-
this._show(
|
|
1910
|
+
this._show(source, {
|
|
1911
|
+
anchor: item,
|
|
1912
|
+
describedElement: describedElement ?? item,
|
|
1913
|
+
content,
|
|
1914
|
+
data: null,
|
|
1915
|
+
point,
|
|
1916
|
+
});
|
|
1713
1917
|
}
|
|
1714
1918
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDelegateDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1715
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipDelegateDirective, isStandalone: true, selector: "[tlsTooltipDelegate]", inputs: { contentAttribute: { classPropertyName: "contentAttribute", publicName: "tlsTooltipDelegate", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerover": "onPointerOver($event)", "pointermove": "onPointerMove($event)", "pointerout": "onPointerOut($event)", "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)" } },
|
|
1919
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipDelegateDirective, isStandalone: true, selector: "[tlsTooltipDelegate]", inputs: { contentAttribute: { classPropertyName: "contentAttribute", publicName: "tlsTooltipDelegate", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerover": "onPointerOver($event)", "pointermove": "onPointerMove($event)", "pointerout": "onPointerOut($event)", "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
1716
1920
|
}
|
|
1717
1921
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDelegateDirective, decorators: [{
|
|
1718
1922
|
type: Directive,
|
|
1719
1923
|
args: [{
|
|
1720
1924
|
selector: '[tlsTooltipDelegate]',
|
|
1721
|
-
providers: [TooltipService],
|
|
1722
1925
|
host: {
|
|
1723
1926
|
'(pointerover)': 'onPointerOver($event)',
|
|
1724
1927
|
'(pointermove)': 'onPointerMove($event)',
|
|
@@ -1730,46 +1933,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
1730
1933
|
}], propDecorators: { contentAttribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "tlsTooltipDelegate", required: false }] }] } });
|
|
1731
1934
|
|
|
1732
1935
|
/**
|
|
1733
|
-
* Attaches a tooltip to the host element. Shows on hover and on
|
|
1734
|
-
*
|
|
1735
|
-
*
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
1936
|
+
* Attaches a tooltip to the host element. Shows on hover and on focus landing anywhere inside
|
|
1937
|
+
* the host — a host that only wraps its real control is served as well as one that is the
|
|
1938
|
+
* control — toggles on touch, and dismisses on Escape without moving the pointer or focus
|
|
1939
|
+
* (WCAG 1.4.13). While visible the tooltip is linked with `aria-describedby` to the element it
|
|
1940
|
+
* describes: the host, or the control inside it that holds focus, since a description is only
|
|
1941
|
+
* announced on the element that has it. The link joins any description that element already
|
|
1942
|
+
* carries rather than replacing it, and leaves that one behind when the tooltip hides.
|
|
1738
1943
|
*
|
|
1739
1944
|
* Interaction is driven by pointer events, branching on `pointerType`: mouse
|
|
1740
1945
|
* and pen get hover semantics, touch gets tap-to-toggle. A single stream avoids
|
|
1741
1946
|
* the synthesized mouse events browsers replay after a tap.
|
|
1742
1947
|
*
|
|
1948
|
+
* Content is live: a tooltip already on screen follows the input it was opened with.
|
|
1949
|
+
*
|
|
1743
1950
|
* Serving many elements at once costs one instance each; `[tlsTooltipDelegate]`
|
|
1744
1951
|
* serves a whole subtree from one instead.
|
|
1745
1952
|
*/
|
|
1746
1953
|
class TooltipDirective extends TooltipTrigger {
|
|
1747
1954
|
// Injections
|
|
1748
|
-
|
|
1955
|
+
_element = inject(ElementRef).nativeElement;
|
|
1749
1956
|
// Inputs
|
|
1750
1957
|
content = input('', { ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'tlsTooltip' });
|
|
1751
1958
|
data = input(null, /* @ts-ignore */
|
|
1752
1959
|
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1960
|
+
constructor() {
|
|
1961
|
+
super();
|
|
1962
|
+
// The text of a visible tooltip follows the input, so a label that changes under a pointer
|
|
1963
|
+
// resting on it is not a stale one until the next hover.
|
|
1964
|
+
effect(() => this._updateContent(this.content(), this.data()));
|
|
1965
|
+
}
|
|
1753
1966
|
// Protected methods
|
|
1754
1967
|
onPointerEnter(event) {
|
|
1755
1968
|
// A touch "enter" is a tap, not a hover — toggle instead. The default is
|
|
1756
1969
|
// not prevented, so the tap still activates an interactive host.
|
|
1757
1970
|
if (event.pointerType === 'touch') {
|
|
1758
|
-
if (this.
|
|
1759
|
-
this._hide();
|
|
1971
|
+
if (this._isTapped(this._element)) {
|
|
1972
|
+
this._hide('touch');
|
|
1760
1973
|
}
|
|
1761
1974
|
else {
|
|
1762
|
-
this._showHost();
|
|
1975
|
+
this._showHost('touch');
|
|
1763
1976
|
}
|
|
1764
1977
|
return;
|
|
1765
1978
|
}
|
|
1766
|
-
this._showHost({ x: event.clientX, y: event.clientY });
|
|
1979
|
+
this._showHost('hover', { x: event.clientX, y: event.clientY });
|
|
1767
1980
|
}
|
|
1768
1981
|
onPointerMove(event) {
|
|
1769
1982
|
if (event.pointerType === 'touch')
|
|
1770
1983
|
return;
|
|
1771
1984
|
if (this.tooltipOrigin() === 'cursor') {
|
|
1772
|
-
this._tooltipService.move({ x: event.clientX, y: event.clientY }
|
|
1985
|
+
this._tooltipService.move(this, { x: event.clientX, y: event.clientY });
|
|
1773
1986
|
}
|
|
1774
1987
|
}
|
|
1775
1988
|
onPointerLeave(event) {
|
|
@@ -1777,36 +1990,50 @@ class TooltipDirective extends TooltipTrigger {
|
|
|
1777
1990
|
// same gesture; hiding here would undo the toggle the tap just made.
|
|
1778
1991
|
if (event.pointerType === 'touch')
|
|
1779
1992
|
return;
|
|
1780
|
-
this._hide();
|
|
1993
|
+
this._hide('hover');
|
|
1781
1994
|
}
|
|
1782
|
-
|
|
1995
|
+
onFocusIn(event) {
|
|
1996
|
+
// `focus` does not bubble, so a host that only wraps its real control — a button component
|
|
1997
|
+
// whose <button> is inside the template — would never hear about the focus its own tooltip
|
|
1998
|
+
// is for. `focusin` does, and the control that took focus is what the tooltip describes.
|
|
1999
|
+
const focused = event.target;
|
|
1783
2000
|
// No cursor to anchor to; a focus-triggered tooltip always anchors to the element.
|
|
1784
|
-
this._showHost();
|
|
2001
|
+
this._showHost('focus', null, focused instanceof HTMLElement ? focused : null);
|
|
1785
2002
|
}
|
|
1786
|
-
|
|
1787
|
-
|
|
2003
|
+
onFocusOut(event) {
|
|
2004
|
+
// Focus moving between controls inside the host is not a leave.
|
|
2005
|
+
const next = event.relatedTarget;
|
|
2006
|
+
if (next instanceof Node && this._element.contains(next))
|
|
2007
|
+
return;
|
|
2008
|
+
this._hide('focus');
|
|
1788
2009
|
}
|
|
1789
2010
|
// Private methods
|
|
1790
|
-
_showHost(point) {
|
|
1791
|
-
|
|
2011
|
+
_showHost(source, point = null, describedElement = null) {
|
|
2012
|
+
const anchor = this._element;
|
|
2013
|
+
this._show(source, {
|
|
2014
|
+
anchor,
|
|
2015
|
+
describedElement: describedElement ?? anchor,
|
|
2016
|
+
content: this.content(),
|
|
2017
|
+
data: this.data(),
|
|
2018
|
+
point,
|
|
2019
|
+
});
|
|
1792
2020
|
}
|
|
1793
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, deps:
|
|
1794
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipDirective, isStandalone: true, selector: "[tlsTooltip]", inputs: { content: { classPropertyName: "content", publicName: "tlsTooltip", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerenter": "onPointerEnter($event)", "pointermove": "onPointerMove($event)", "pointerleave": "onPointerLeave($event)", "
|
|
2021
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2022
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: TooltipDirective, isStandalone: true, selector: "[tlsTooltip]", inputs: { content: { classPropertyName: "content", publicName: "tlsTooltip", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerenter": "onPointerEnter($event)", "pointermove": "onPointerMove($event)", "pointerleave": "onPointerLeave($event)", "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
1795
2023
|
}
|
|
1796
2024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
1797
2025
|
type: Directive,
|
|
1798
2026
|
args: [{
|
|
1799
2027
|
selector: '[tlsTooltip]',
|
|
1800
|
-
providers: [TooltipService],
|
|
1801
2028
|
host: {
|
|
1802
2029
|
'(pointerenter)': 'onPointerEnter($event)',
|
|
1803
2030
|
'(pointermove)': 'onPointerMove($event)',
|
|
1804
2031
|
'(pointerleave)': 'onPointerLeave($event)',
|
|
1805
|
-
'(
|
|
1806
|
-
'(
|
|
2032
|
+
'(focusin)': 'onFocusIn($event)',
|
|
2033
|
+
'(focusout)': 'onFocusOut($event)',
|
|
1807
2034
|
},
|
|
1808
2035
|
}]
|
|
1809
|
-
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "tlsTooltip", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
2036
|
+
}], ctorParameters: () => [], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "tlsTooltip", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
1810
2037
|
|
|
1811
2038
|
/** Days in a calendar week; the grid renders one weekday row each. */
|
|
1812
2039
|
const DAYS_PER_WEEK$1 = 7;
|
|
@@ -2118,13 +2345,13 @@ class ActivityHeatmap {
|
|
|
2118
2345
|
return buildActivityThresholds(maxCount, this.resolvedLevels());
|
|
2119
2346
|
}
|
|
2120
2347
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActivityHeatmap, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2121
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ActivityHeatmap, isStandalone: true, selector: "tls-activity-heatmap", inputs: { entries: { classPropertyName: "entries", publicName: "entries", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, levels: { classPropertyName: "levels", publicName: "levels", isSignal: true, isRequired: false, transformFunction: null }, thresholds: { classPropertyName: "thresholds", publicName: "thresholds", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, weekDays: { classPropertyName: "weekDays", publicName: "weekDays", isSignal: true, isRequired: false, transformFunction: null }, weekdayLabelInterval: { classPropertyName: "weekdayLabelInterval", publicName: "weekdayLabelInterval", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showMonthLabels: { classPropertyName: "showMonthLabels", publicName: "showMonthLabels", isSignal: true, isRequired: false, transformFunction: null }, showWeekdayLabels: { classPropertyName: "showWeekdayLabels", publicName: "showWeekdayLabels", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, showTooltip: { classPropertyName: "showTooltip", publicName: "showTooltip", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { daySelect: "daySelect" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<div class=\"tls-activity-heatmap__viewport\">\n <div class=\"tls-activity-heatmap__chart\" [style.--tls-activity-heatmap-weeks]=\"weekCount()\">\n @if (showMonthLabels()) {\n <!-- Month headings repeat the dates already announced on every cell, so they stay decorative. -->\n <div class=\"tls-activity-heatmap__months\" aria-hidden=\"true\">\n @for (month of months(); track month.column) {\n <span\n class=\"tls-activity-heatmap__month\"\n [style.grid-column]=\"month.column + ' / span ' + month.span\"\n >\n {{ month.label }}\n </span>\n }\n </div>\n }\n\n @if (showWeekdayLabels()) {\n <div class=\"tls-activity-heatmap__weekdays\" aria-hidden=\"true\">\n @for (row of rows(); track $index) {\n <span class=\"tls-activity-heatmap__weekday\">{{ row.label }}</span>\n }\n </div>\n }\n\n <!-- One delegated tooltip serves every cell, so a year of days costs a single directive\n
|
|
2348
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ActivityHeatmap, isStandalone: true, selector: "tls-activity-heatmap", inputs: { entries: { classPropertyName: "entries", publicName: "entries", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, levels: { classPropertyName: "levels", publicName: "levels", isSignal: true, isRequired: false, transformFunction: null }, thresholds: { classPropertyName: "thresholds", publicName: "thresholds", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, weekDays: { classPropertyName: "weekDays", publicName: "weekDays", isSignal: true, isRequired: false, transformFunction: null }, weekdayLabelInterval: { classPropertyName: "weekdayLabelInterval", publicName: "weekdayLabelInterval", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showMonthLabels: { classPropertyName: "showMonthLabels", publicName: "showMonthLabels", isSignal: true, isRequired: false, transformFunction: null }, showWeekdayLabels: { classPropertyName: "showWeekdayLabels", publicName: "showWeekdayLabels", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, showTooltip: { classPropertyName: "showTooltip", publicName: "showTooltip", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { daySelect: "daySelect" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<div class=\"tls-activity-heatmap__viewport\">\n <div class=\"tls-activity-heatmap__chart\" [style.--tls-activity-heatmap-weeks]=\"weekCount()\">\n @if (showMonthLabels()) {\n <!-- Month headings repeat the dates already announced on every cell, so they stay decorative. -->\n <div class=\"tls-activity-heatmap__months\" aria-hidden=\"true\">\n @for (month of months(); track month.column) {\n <span\n class=\"tls-activity-heatmap__month\"\n [style.grid-column]=\"month.column + ' / span ' + month.span\"\n >\n {{ month.label }}\n </span>\n }\n </div>\n }\n\n @if (showWeekdayLabels()) {\n <div class=\"tls-activity-heatmap__weekdays\" aria-hidden=\"true\">\n @for (row of rows(); track $index) {\n <span class=\"tls-activity-heatmap__weekday\">{{ row.label }}</span>\n }\n </div>\n }\n\n <!-- One delegated tooltip serves every cell, so a year of days costs a single directive\n instead of one per cell. -->\n <div\n ngGrid\n tlsTooltipDelegate\n class=\"tls-activity-heatmap__grid\"\n rowWrap=\"nowrap\"\n colWrap=\"nowrap\"\n [tooltipDisabled]=\"!showTooltip()\"\n [attr.aria-label]=\"gridLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n >\n @for (row of rows(); track $index) {\n <div ngGridRow class=\"tls-activity-heatmap__row\">\n @for (day of row.days; track day.date.getTime()) {\n <!-- Padding days stay navigable so arrow keys never dead-end on the grid's corners;\n they are only unselectable and announce themselves as outside the range. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- ngGridCell manages role and roving tabindex -->\n <div\n ngGridCell\n class=\"tls-activity-heatmap__day\"\n [class.tls-activity-heatmap__day--outside]=\"!day.inRange\"\n [class.tls-activity-heatmap__day--today]=\"day.isToday\"\n [selectable]=\"day.inRange\"\n [style.--tls-activity-heatmap-intensity]=\"intensity(day.level)\"\n [attr.aria-label]=\"day.label\"\n [attr.data-tooltip]=\"day.inRange ? day.label : null\"\n (click)=\"onDaySelect(day)\"\n (keydown.enter)=\"onDaySelect(day)\"\n (keydown.space)=\"onDaySpace($event, day)\"\n ></div>\n }\n </div>\n }\n </div>\n </div>\n</div>\n\n@if (showLegend()) {\n <div class=\"tls-activity-heatmap__legend\">\n <span class=\"tls-activity-heatmap__legend-label\">{{ legendLess }}</span>\n\n <!-- Sample swatches carry no information the \"less \u2026 more\" captions don't already give. -->\n @for (level of legendLevels(); track level) {\n <span\n class=\"tls-activity-heatmap__legend-swatch\"\n aria-hidden=\"true\"\n [style.--tls-activity-heatmap-intensity]=\"intensity(level)\"\n ></span>\n }\n\n <span class=\"tls-activity-heatmap__legend-label\">{{ legendMore }}</span>\n </div>\n}\n", dependencies: [{ kind: "directive", type: Grid, selector: "[ngGrid]", inputs: ["enableSelection", "disabled", "softDisabled", "focusMode", "rowWrap", "colWrap", "multi", "selectionMode", "tabindex"], exportAs: ["ngGrid"] }, { kind: "directive", type: GridRow, selector: "[ngGridRow]", inputs: ["rowIndex"], exportAs: ["ngGridRow"] }, { kind: "directive", type: GridCell, selector: "[ngGridCell]", inputs: ["id", "role", "rowSpan", "colSpan", "rowIndex", "colIndex", "disabled", "selected", "selectable", "tabindex"], outputs: ["selectedChange"], exportAs: ["ngGridCell"] }, { kind: "directive", type: TooltipDelegateDirective, selector: "[tlsTooltipDelegate]", inputs: ["tlsTooltipDelegate"] }] });
|
|
2122
2349
|
}
|
|
2123
2350
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActivityHeatmap, decorators: [{
|
|
2124
2351
|
type: Component,
|
|
2125
2352
|
args: [{ selector: 'tls-activity-heatmap', imports: [Grid, GridRow, GridCell, TooltipDelegateDirective], host: {
|
|
2126
2353
|
'[class]': 'hostClasses()',
|
|
2127
|
-
}, template: "<div class=\"tls-activity-heatmap__viewport\">\n <div class=\"tls-activity-heatmap__chart\" [style.--tls-activity-heatmap-weeks]=\"weekCount()\">\n @if (showMonthLabels()) {\n <!-- Month headings repeat the dates already announced on every cell, so they stay decorative. -->\n <div class=\"tls-activity-heatmap__months\" aria-hidden=\"true\">\n @for (month of months(); track month.column) {\n <span\n class=\"tls-activity-heatmap__month\"\n [style.grid-column]=\"month.column + ' / span ' + month.span\"\n >\n {{ month.label }}\n </span>\n }\n </div>\n }\n\n @if (showWeekdayLabels()) {\n <div class=\"tls-activity-heatmap__weekdays\" aria-hidden=\"true\">\n @for (row of rows(); track $index) {\n <span class=\"tls-activity-heatmap__weekday\">{{ row.label }}</span>\n }\n </div>\n }\n\n <!-- One delegated tooltip serves every cell, so a year of days costs a single directive\n
|
|
2354
|
+
}, template: "<div class=\"tls-activity-heatmap__viewport\">\n <div class=\"tls-activity-heatmap__chart\" [style.--tls-activity-heatmap-weeks]=\"weekCount()\">\n @if (showMonthLabels()) {\n <!-- Month headings repeat the dates already announced on every cell, so they stay decorative. -->\n <div class=\"tls-activity-heatmap__months\" aria-hidden=\"true\">\n @for (month of months(); track month.column) {\n <span\n class=\"tls-activity-heatmap__month\"\n [style.grid-column]=\"month.column + ' / span ' + month.span\"\n >\n {{ month.label }}\n </span>\n }\n </div>\n }\n\n @if (showWeekdayLabels()) {\n <div class=\"tls-activity-heatmap__weekdays\" aria-hidden=\"true\">\n @for (row of rows(); track $index) {\n <span class=\"tls-activity-heatmap__weekday\">{{ row.label }}</span>\n }\n </div>\n }\n\n <!-- One delegated tooltip serves every cell, so a year of days costs a single directive\n instead of one per cell. -->\n <div\n ngGrid\n tlsTooltipDelegate\n class=\"tls-activity-heatmap__grid\"\n rowWrap=\"nowrap\"\n colWrap=\"nowrap\"\n [tooltipDisabled]=\"!showTooltip()\"\n [attr.aria-label]=\"gridLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n >\n @for (row of rows(); track $index) {\n <div ngGridRow class=\"tls-activity-heatmap__row\">\n @for (day of row.days; track day.date.getTime()) {\n <!-- Padding days stay navigable so arrow keys never dead-end on the grid's corners;\n they are only unselectable and announce themselves as outside the range. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- ngGridCell manages role and roving tabindex -->\n <div\n ngGridCell\n class=\"tls-activity-heatmap__day\"\n [class.tls-activity-heatmap__day--outside]=\"!day.inRange\"\n [class.tls-activity-heatmap__day--today]=\"day.isToday\"\n [selectable]=\"day.inRange\"\n [style.--tls-activity-heatmap-intensity]=\"intensity(day.level)\"\n [attr.aria-label]=\"day.label\"\n [attr.data-tooltip]=\"day.inRange ? day.label : null\"\n (click)=\"onDaySelect(day)\"\n (keydown.enter)=\"onDaySelect(day)\"\n (keydown.space)=\"onDaySpace($event, day)\"\n ></div>\n }\n </div>\n }\n </div>\n </div>\n</div>\n\n@if (showLegend()) {\n <div class=\"tls-activity-heatmap__legend\">\n <span class=\"tls-activity-heatmap__legend-label\">{{ legendLess }}</span>\n\n <!-- Sample swatches carry no information the \"less \u2026 more\" captions don't already give. -->\n @for (level of legendLevels(); track level) {\n <span\n class=\"tls-activity-heatmap__legend-swatch\"\n aria-hidden=\"true\"\n [style.--tls-activity-heatmap-intensity]=\"intensity(level)\"\n ></span>\n }\n\n <span class=\"tls-activity-heatmap__legend-label\">{{ legendMore }}</span>\n </div>\n}\n" }]
|
|
2128
2355
|
}], propDecorators: { entries: [{ type: i0.Input, args: [{ isSignal: true, alias: "entries", required: false }] }], startDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDate", required: false }] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }], levels: [{ type: i0.Input, args: [{ isSignal: true, alias: "levels", required: false }] }], thresholds: [{ type: i0.Input, args: [{ isSignal: true, alias: "thresholds", required: false }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: false }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: false }] }], weekdayLabelInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekdayLabelInterval", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], showMonthLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMonthLabels", required: false }] }], showWeekdayLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeekdayLabels", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], showTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTooltip", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], daySelect: [{ type: i0.Output, args: ["daySelect"] }] } });
|
|
2129
2356
|
|
|
2130
2357
|
/**
|
|
@@ -4485,12 +4712,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
4485
4712
|
|
|
4486
4713
|
// Named size tokens, used to tell a preset apart from a custom CSS-length string.
|
|
4487
4714
|
const DRAWER_NAMED_SIZES = ['sm', 'md', 'lg', 'full', 'auto'];
|
|
4715
|
+
// Fraction of the panel's extent a drag must cover for the release to dismiss
|
|
4716
|
+
// rather than snap back. A flick commits regardless of distance, so this only
|
|
4717
|
+
// governs slow drags, where releasing past the panel's midpoint would feel late.
|
|
4718
|
+
const DRAWER_DISMISS_RATIO = 0.4;
|
|
4719
|
+
// Pointer types allowed to drag the panel. Dragging a panel shut is a touch
|
|
4720
|
+
// idiom; on a mouse the drag would instead fight text selection through the
|
|
4721
|
+
// gesture's slop, and the close button and Escape already serve that pointer.
|
|
4722
|
+
const DRAWER_DRAG_POINTER_TYPES = ['touch', 'pen'];
|
|
4488
4723
|
|
|
4489
4724
|
const DEFAULT_DRAWER_CONFIG = {
|
|
4490
4725
|
side: 'end',
|
|
4491
4726
|
size: 'md',
|
|
4492
4727
|
closeable: true,
|
|
4493
4728
|
backdropClose: true,
|
|
4729
|
+
escapeClose: true,
|
|
4494
4730
|
rounded: false,
|
|
4495
4731
|
grabber: false,
|
|
4496
4732
|
closeLabel: 'Close drawer',
|
|
@@ -4504,10 +4740,20 @@ class Drawer extends CdkDialogContainer {
|
|
|
4504
4740
|
// Injections
|
|
4505
4741
|
_tlsConfig = inject(DRAWER_CONFIG);
|
|
4506
4742
|
_dialogRef = inject(DialogRef$1);
|
|
4743
|
+
_directionality = inject(Directionality);
|
|
4744
|
+
// Named apart from the base container's own renderer and injector, which are
|
|
4745
|
+
// private to it. Both exist solely to serve the drag gesture.
|
|
4746
|
+
_dragRenderer = inject(Renderer2);
|
|
4747
|
+
_dragInjector = inject(Injector);
|
|
4507
4748
|
// State
|
|
4508
4749
|
_state = signal('enter', /* @ts-ignore */
|
|
4509
4750
|
...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
|
|
4751
|
+
_dragState = signal('idle', /* @ts-ignore */
|
|
4752
|
+
...(ngDevMode ? [{ debugName: "_dragState" }] : /* istanbul ignore next */ []));
|
|
4510
4753
|
_closing = false;
|
|
4754
|
+
// Panel extent along the drag axis, sampled once per gesture: the panel may be
|
|
4755
|
+
// sized by content or by a custom length, so only the rendered box is authoritative.
|
|
4756
|
+
_dragExtent = 0;
|
|
4511
4757
|
// Computed
|
|
4512
4758
|
hostClasses = computed(() => {
|
|
4513
4759
|
const classes = [
|
|
@@ -4518,9 +4764,32 @@ class Drawer extends CdkDialogContainer {
|
|
|
4518
4764
|
];
|
|
4519
4765
|
if (this._tlsConfig.rounded)
|
|
4520
4766
|
classes.push('tls-drawer--rounded');
|
|
4767
|
+
if (this._tlsConfig.grabber)
|
|
4768
|
+
classes.push('tls-drawer--grabber');
|
|
4769
|
+
const dragState = this._dragState();
|
|
4770
|
+
if (dragState !== 'idle')
|
|
4771
|
+
classes.push(`tls-drawer--${dragState}`);
|
|
4521
4772
|
return classes;
|
|
4522
4773
|
}, /* @ts-ignore */
|
|
4523
4774
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4775
|
+
constructor() {
|
|
4776
|
+
super();
|
|
4777
|
+
// Subscribed rather than bound through host listeners: `$event` on a host
|
|
4778
|
+
// listener for a host directive's output is typed as a bare `Event`, so the
|
|
4779
|
+
// payload would have to be cast back. `panMove` stays outside the Angular
|
|
4780
|
+
// zone through a direct subscription, which is the point of it.
|
|
4781
|
+
const pan = inject(PanDirective);
|
|
4782
|
+
const subscriptions = [
|
|
4783
|
+
pan.panStart.subscribe(() => this._onPanStart()),
|
|
4784
|
+
pan.panMove.subscribe(event => this._onPanMove(event)),
|
|
4785
|
+
pan.panEnd.subscribe(event => this._onPanEnd(event)),
|
|
4786
|
+
pan.panCancel.subscribe(() => this._onPanCancel()),
|
|
4787
|
+
];
|
|
4788
|
+
inject(DestroyRef).onDestroy(() => {
|
|
4789
|
+
for (const subscription of subscriptions)
|
|
4790
|
+
subscription.unsubscribe();
|
|
4791
|
+
});
|
|
4792
|
+
}
|
|
4524
4793
|
// Accessors
|
|
4525
4794
|
get config() {
|
|
4526
4795
|
return this._tlsConfig;
|
|
@@ -4546,6 +4815,154 @@ class Drawer extends CdkDialogContainer {
|
|
|
4546
4815
|
this.animatedClose();
|
|
4547
4816
|
}
|
|
4548
4817
|
// Private methods
|
|
4818
|
+
_onPanStart() {
|
|
4819
|
+
if (this._closing)
|
|
4820
|
+
return;
|
|
4821
|
+
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
4822
|
+
this._dragExtent = this._isInlineSide() ? rect.width : rect.height;
|
|
4823
|
+
this._dragState.set('dragging');
|
|
4824
|
+
// The backdrop tracks the finger for the drag's duration, so its own
|
|
4825
|
+
// transition — which exists to animate the settle — must not lag it.
|
|
4826
|
+
this._setBackdropTransition('none');
|
|
4827
|
+
}
|
|
4828
|
+
// Fired outside the Angular zone (see `PanDirective.panMove`), so it writes to
|
|
4829
|
+
// the DOM directly and never touches a signal.
|
|
4830
|
+
_onPanMove(event) {
|
|
4831
|
+
if (this._closing)
|
|
4832
|
+
return;
|
|
4833
|
+
this._applyDrag(this._dismissTravel(event));
|
|
4834
|
+
}
|
|
4835
|
+
_onPanEnd(event) {
|
|
4836
|
+
if (this._closing)
|
|
4837
|
+
return;
|
|
4838
|
+
// Either condition commits: a short flick is as clear an intent to dismiss as
|
|
4839
|
+
// a slow drag past the ratio, and requiring both would strand each on its own.
|
|
4840
|
+
const travelled = this._dragExtent > 0 && this._dismissTravel(event) / this._dragExtent >= DRAWER_DISMISS_RATIO;
|
|
4841
|
+
const flicked = this._dismissVelocity(event) >= SWIPE_DEFAULT_MIN_VELOCITY;
|
|
4842
|
+
if (travelled || flicked) {
|
|
4843
|
+
this._dragClose();
|
|
4844
|
+
return;
|
|
4845
|
+
}
|
|
4846
|
+
this._settleBack();
|
|
4847
|
+
}
|
|
4848
|
+
_onPanCancel() {
|
|
4849
|
+
if (this._closing)
|
|
4850
|
+
return;
|
|
4851
|
+
this._settleBack();
|
|
4852
|
+
}
|
|
4853
|
+
// Travel toward the panel's pinned edge in px. Negative while the finger moves
|
|
4854
|
+
// the other way, which the caller clamps away — the panel does not overshoot open.
|
|
4855
|
+
_dismissTravel(event) {
|
|
4856
|
+
switch (this._tlsConfig.side) {
|
|
4857
|
+
case 'top':
|
|
4858
|
+
return -event.deltaY;
|
|
4859
|
+
case 'bottom':
|
|
4860
|
+
return event.deltaY;
|
|
4861
|
+
case 'start':
|
|
4862
|
+
return -this._toLogical(event.deltaX);
|
|
4863
|
+
case 'end':
|
|
4864
|
+
return this._toLogical(event.deltaX);
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
// Release velocity toward the pinned edge in px/ms. Signed independently of
|
|
4868
|
+
// `_dismissTravel`: a drag that reverses into a flick must read as the flick.
|
|
4869
|
+
_dismissVelocity(event) {
|
|
4870
|
+
switch (this._tlsConfig.side) {
|
|
4871
|
+
case 'top':
|
|
4872
|
+
return -event.velocityY;
|
|
4873
|
+
case 'bottom':
|
|
4874
|
+
return event.velocityY;
|
|
4875
|
+
case 'start':
|
|
4876
|
+
return -this._toLogical(event.velocityX);
|
|
4877
|
+
case 'end':
|
|
4878
|
+
return this._toLogical(event.velocityX);
|
|
4879
|
+
}
|
|
4880
|
+
}
|
|
4881
|
+
// Horizontal quantities arrive physical; the inline sides are logical, so the
|
|
4882
|
+
// sign flips in RTL.
|
|
4883
|
+
_toLogical(physicalX) {
|
|
4884
|
+
return this._directionality.value === 'rtl' ? -physicalX : physicalX;
|
|
4885
|
+
}
|
|
4886
|
+
_isInlineSide() {
|
|
4887
|
+
const side = this._tlsConfig.side;
|
|
4888
|
+
return side === 'start' || side === 'end';
|
|
4889
|
+
}
|
|
4890
|
+
_applyDrag(travel) {
|
|
4891
|
+
const offset = Math.max(0, travel);
|
|
4892
|
+
this._dragRenderer.setStyle(this._elementRef.nativeElement, '--tls-drawer-drag', `${offset}px`, RendererStyleFlags2.DashCase);
|
|
4893
|
+
const backdrop = this._dialogRef.overlayRef.backdropElement;
|
|
4894
|
+
if (backdrop === null)
|
|
4895
|
+
return;
|
|
4896
|
+
const progress = this._dragExtent > 0 ? Math.min(1, offset / this._dragExtent) : 0;
|
|
4897
|
+
this._dragRenderer.setStyle(backdrop, 'opacity', `${1 - progress}`);
|
|
4898
|
+
}
|
|
4899
|
+
_setBackdropTransition(value) {
|
|
4900
|
+
const backdrop = this._dialogRef.overlayRef.backdropElement;
|
|
4901
|
+
if (backdrop === null)
|
|
4902
|
+
return;
|
|
4903
|
+
if (value === null) {
|
|
4904
|
+
this._dragRenderer.removeStyle(backdrop, 'transition');
|
|
4905
|
+
return;
|
|
4906
|
+
}
|
|
4907
|
+
this._dragRenderer.setStyle(backdrop, 'transition', value);
|
|
4908
|
+
}
|
|
4909
|
+
// Returns the panel to rest after a drag that did not commit.
|
|
4910
|
+
_settleBack() {
|
|
4911
|
+
this._settle(0, () => this._dragState.set('idle'));
|
|
4912
|
+
}
|
|
4913
|
+
// Continues the drag out to the pinned edge and disposes on arrival. A dismissal
|
|
4914
|
+
// that began as a drag cannot route through `animatedClose`: the slide-out
|
|
4915
|
+
// keyframe starts from `transform: none`, so the panel would snap back to fully
|
|
4916
|
+
// open for a frame before leaving.
|
|
4917
|
+
_dragClose() {
|
|
4918
|
+
this._closing = true;
|
|
4919
|
+
this._settle(this._dragExtent, () => this._dialogRef.close());
|
|
4920
|
+
}
|
|
4921
|
+
_settle(target, onDone) {
|
|
4922
|
+
this._dragState.set('settling');
|
|
4923
|
+
this._setBackdropTransition(null);
|
|
4924
|
+
// The settle transition lives on the `--settling` class, so the target value
|
|
4925
|
+
// must not be written until change detection has put that class on the host —
|
|
4926
|
+
// set in the same frame, the property would jump instead of animating.
|
|
4927
|
+
afterNextRender(() => {
|
|
4928
|
+
this._applyDrag(target);
|
|
4929
|
+
this._afterSettle(onDone);
|
|
4930
|
+
}, { injector: this._dragInjector });
|
|
4931
|
+
}
|
|
4932
|
+
// Runs `onDone` once the settle transition finishes, or at once when no
|
|
4933
|
+
// transition is emitted (the `none` motion level), so a drawer dismissed by
|
|
4934
|
+
// drag still closes when the user has asked for no motion.
|
|
4935
|
+
_afterSettle(onDone) {
|
|
4936
|
+
const host = this._elementRef.nativeElement;
|
|
4937
|
+
// `transitionDuration` is a comma-separated list, and is absent entirely
|
|
4938
|
+
// where the engine reports no transition at all, so the test is whether any
|
|
4939
|
+
// entry actually lasts — not equality against a single `0s`.
|
|
4940
|
+
const runs = getComputedStyle(host)
|
|
4941
|
+
.transitionDuration.split(',')
|
|
4942
|
+
.some(duration => parseFloat(duration) > 0);
|
|
4943
|
+
if (!runs) {
|
|
4944
|
+
onDone();
|
|
4945
|
+
return;
|
|
4946
|
+
}
|
|
4947
|
+
let settled = false;
|
|
4948
|
+
const finalize = () => {
|
|
4949
|
+
if (settled)
|
|
4950
|
+
return;
|
|
4951
|
+
settled = true;
|
|
4952
|
+
window.clearTimeout(timeoutId);
|
|
4953
|
+
host.removeEventListener('transitionend', onTransitionEnd);
|
|
4954
|
+
onDone();
|
|
4955
|
+
};
|
|
4956
|
+
// Only the panel's own transform settles it; ignore `transitionend` bubbling
|
|
4957
|
+
// up from animated content inside it.
|
|
4958
|
+
const onTransitionEnd = (event) => {
|
|
4959
|
+
if (event.target === host && event.propertyName === 'transform')
|
|
4960
|
+
finalize();
|
|
4961
|
+
};
|
|
4962
|
+
host.addEventListener('transitionend', onTransitionEnd);
|
|
4963
|
+
// Safety net if `transitionend` never arrives (e.g. the panel is torn down early).
|
|
4964
|
+
const timeoutId = window.setTimeout(finalize, LEAVE_ANIMATION_FALLBACK_MS);
|
|
4965
|
+
}
|
|
4549
4966
|
_sizeClass() {
|
|
4550
4967
|
const size = this._tlsConfig.size;
|
|
4551
4968
|
return this._isNamedSize(size) ? size : 'custom';
|
|
@@ -4553,16 +4970,16 @@ class Drawer extends CdkDialogContainer {
|
|
|
4553
4970
|
_isNamedSize(size) {
|
|
4554
4971
|
return DRAWER_NAMED_SIZES.includes(size);
|
|
4555
4972
|
}
|
|
4556
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, deps:
|
|
4557
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Drawer, isStandalone: true, selector: "tls-drawer", host: { properties: { "class": "hostClasses()", "style.--tls-drawer-size": "customSize" } }, usesInheritance: true, ngImport: i0, template: "@if (config.grabber) {\n <div class=\"tls-drawer__grabber\" aria-hidden=\"true\"></div>\n}\n<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" [attr.aria-label]=\"config.closeLabel\" (click)=\"close()\">\n <tls-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n", dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
4973
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4974
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Drawer, isStandalone: true, selector: "tls-drawer", host: { properties: { "class": "hostClasses()", "style.--tls-drawer-size": "customSize" } }, usesInheritance: true, hostDirectives: [{ directive: i1.PanDirective }], ngImport: i0, template: "@if (config.grabber) {\n <div class=\"tls-drawer__grabber\" aria-hidden=\"true\"></div>\n}\n<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" [attr.aria-label]=\"config.closeLabel\" (click)=\"close()\">\n <tls-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n", dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
4558
4975
|
}
|
|
4559
4976
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, decorators: [{
|
|
4560
4977
|
type: Component,
|
|
4561
|
-
args: [{ selector: 'tls-drawer', imports: [CdkPortalOutlet, Icon], host: {
|
|
4978
|
+
args: [{ selector: 'tls-drawer', imports: [CdkPortalOutlet, Icon], hostDirectives: [PanDirective], host: {
|
|
4562
4979
|
'[class]': 'hostClasses()',
|
|
4563
4980
|
'[style.--tls-drawer-size]': 'customSize',
|
|
4564
4981
|
}, template: "@if (config.grabber) {\n <div class=\"tls-drawer__grabber\" aria-hidden=\"true\"></div>\n}\n<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" [attr.aria-label]=\"config.closeLabel\" (click)=\"close()\">\n <tls-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n" }]
|
|
4565
|
-
}] });
|
|
4982
|
+
}], ctorParameters: () => [] });
|
|
4566
4983
|
|
|
4567
4984
|
/**
|
|
4568
4985
|
* Handle to an open drawer. Provided to the drawer's content component (inject it
|
|
@@ -4602,6 +5019,7 @@ class DrawerService {
|
|
|
4602
5019
|
size: config?.size ?? this._config.size,
|
|
4603
5020
|
closeable: config?.closeable ?? this._config.closeable,
|
|
4604
5021
|
backdropClose: config?.backdropClose ?? this._config.backdropClose,
|
|
5022
|
+
escapeClose: config?.escapeClose ?? this._config.escapeClose,
|
|
4605
5023
|
rounded: config?.rounded ?? this._config.rounded,
|
|
4606
5024
|
grabber: config?.grabber ?? this._config.grabber,
|
|
4607
5025
|
closeLabel: config?.closeLabel ?? this._config.closeLabel,
|
|
@@ -4610,7 +5028,10 @@ class DrawerService {
|
|
|
4610
5028
|
const dialogRef = this._dialog.open(component, {
|
|
4611
5029
|
container: {
|
|
4612
5030
|
type: Drawer,
|
|
4613
|
-
providers: () => [
|
|
5031
|
+
providers: () => [
|
|
5032
|
+
{ provide: DRAWER_CONFIG, useValue: resolvedConfig },
|
|
5033
|
+
{ provide: PAN_CONFIG, useValue: this._buildPanConfig(resolvedConfig) },
|
|
5034
|
+
],
|
|
4614
5035
|
},
|
|
4615
5036
|
// Built against the content injector so the drawer's content can `inject(DrawerRef)`
|
|
4616
5037
|
// to close itself. The same instance is returned to the caller below.
|
|
@@ -4644,6 +5065,22 @@ class DrawerService {
|
|
|
4644
5065
|
drawerRef.close();
|
|
4645
5066
|
}
|
|
4646
5067
|
// Private
|
|
5068
|
+
// The drag gesture lives on the drawer container, whose inputs cannot be bound
|
|
5069
|
+
// because the CDK instantiates it rather than a template, so its configuration
|
|
5070
|
+
// is handed down through the injector instead.
|
|
5071
|
+
_buildPanConfig(config) {
|
|
5072
|
+
return {
|
|
5073
|
+
...DEFAULT_PAN_CONFIG,
|
|
5074
|
+
// The grabber is the affordance for the gesture, so the pill and the drag
|
|
5075
|
+
// are one decision — a visible grabber is always draggable, and a panel
|
|
5076
|
+
// without one carries no gesture at all.
|
|
5077
|
+
enabled: config.grabber,
|
|
5078
|
+
// Locked to the panel's own axis so the browser keeps the cross axis and
|
|
5079
|
+
// content inside the drawer still scrolls natively.
|
|
5080
|
+
axis: config.side === 'top' || config.side === 'bottom' ? 'y' : 'x',
|
|
5081
|
+
pointerTypes: DRAWER_DRAG_POINTER_TYPES,
|
|
5082
|
+
};
|
|
5083
|
+
}
|
|
4647
5084
|
_buildPositionStrategy(side) {
|
|
4648
5085
|
const position = this._overlay.position().global();
|
|
4649
5086
|
const isRtl = this._directionality.value === 'rtl';
|
|
@@ -4661,14 +5098,16 @@ class DrawerService {
|
|
|
4661
5098
|
}
|
|
4662
5099
|
}
|
|
4663
5100
|
_wireDismissal(dialogRef, drawerRef, config) {
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
.pipe(takeUntil(dialogRef.closed))
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
5101
|
+
// Gated separately: a drawer that ignores backdrop clicks must still be
|
|
5102
|
+
// dismissable from the keyboard unless the caller opts out of that too.
|
|
5103
|
+
if (config.backdropClose) {
|
|
5104
|
+
dialogRef.backdropClick.pipe(takeUntil(dialogRef.closed)).subscribe(() => drawerRef.close());
|
|
5105
|
+
}
|
|
5106
|
+
if (config.escapeClose) {
|
|
5107
|
+
dialogRef.keydownEvents
|
|
5108
|
+
.pipe(takeUntil(dialogRef.closed), filter(event => event.key === 'Escape'))
|
|
5109
|
+
.subscribe(() => drawerRef.close());
|
|
5110
|
+
}
|
|
4672
5111
|
}
|
|
4673
5112
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4674
5113
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DrawerService, providedIn: 'root' });
|
|
@@ -5020,6 +5459,8 @@ const DEFAULT_AUTOCOMPLETE_CONFIG = {
|
|
|
5020
5459
|
clearable: false,
|
|
5021
5460
|
filterMode: 'contains',
|
|
5022
5461
|
emptyMessage: 'No results',
|
|
5462
|
+
loadingMessage: 'Loading',
|
|
5463
|
+
minQueryLength: 0,
|
|
5023
5464
|
clearLabel: 'Clear',
|
|
5024
5465
|
virtualScroll: false,
|
|
5025
5466
|
// The default option row: body-medium line-height (23px) plus block padding (2 × 8px).
|
|
@@ -5046,14 +5487,40 @@ class Autocomplete extends AbstractSelect {
|
|
|
5046
5487
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5047
5488
|
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5048
5489
|
clearable = input(this._config.clearable, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5490
|
+
/**
|
|
5491
|
+
* How the typed query narrows the options. `none` hands that job over entirely — the list is
|
|
5492
|
+
* shown as given, which is what a list fetched per query needs.
|
|
5493
|
+
*/
|
|
5049
5494
|
filterMode = input(this._config.filterMode, /* @ts-ignore */
|
|
5050
5495
|
...(ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []));
|
|
5496
|
+
/**
|
|
5497
|
+
* Whether a search is in flight. While raised the panel reports the loading state in place of
|
|
5498
|
+
* the empty message, so a list that has not arrived yet stops reading like one that came back
|
|
5499
|
+
* with nothing.
|
|
5500
|
+
*/
|
|
5501
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5502
|
+
/**
|
|
5503
|
+
* Characters the query must reach before it is emitted and before the panel shows options or
|
|
5504
|
+
* the empty message, so an empty field never asks for the whole collection. `0` places no
|
|
5505
|
+
* floor on it.
|
|
5506
|
+
*/
|
|
5507
|
+
minQueryLength = input(this._config.minQueryLength, { ...(ngDevMode ? { debugName: "minQueryLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
5051
5508
|
emptyMessage = input(this._config.emptyMessage, /* @ts-ignore */
|
|
5052
5509
|
...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
5510
|
+
loadingMessage = input(this._config.loadingMessage, /* @ts-ignore */
|
|
5511
|
+
...(ngDevMode ? [{ debugName: "loadingMessage" }] : /* istanbul ignore next */ []));
|
|
5053
5512
|
clearLabel = input(this._config.clearLabel, /* @ts-ignore */
|
|
5054
5513
|
...(ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []));
|
|
5055
5514
|
virtualScroll = input(this._config.virtualScroll, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5056
5515
|
virtualScrollItemSize = input(this._config.virtualScrollItemSize, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
5516
|
+
/**
|
|
5517
|
+
* The field's text, emitted as it is typed — the hook for answering a query from a source the
|
|
5518
|
+
* control does not hold. Only typing emits: committing a selection, clearing, and closing the
|
|
5519
|
+
* panel all rewrite the text too, and none of them is a search anyone asked for. Nothing is
|
|
5520
|
+
* emitted while the text is shorter than {@link minQueryLength}. Any debouncing belongs to the
|
|
5521
|
+
* listener.
|
|
5522
|
+
*/
|
|
5523
|
+
queryChange = output();
|
|
5057
5524
|
hasValue = computed(() => {
|
|
5058
5525
|
const value = this.value();
|
|
5059
5526
|
return value !== null && value !== undefined;
|
|
@@ -5075,6 +5542,31 @@ class Autocomplete extends AbstractSelect {
|
|
|
5075
5542
|
*/
|
|
5076
5543
|
query = linkedSignal(() => this.selectedLabel(), /* @ts-ignore */
|
|
5077
5544
|
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
5545
|
+
/** Whether the query has yet to reach the length below which the control stays silent. */
|
|
5546
|
+
belowMinQueryLength = computed(() => {
|
|
5547
|
+
// The label a committed selection puts in the field is not a query, however short it is,
|
|
5548
|
+
// so browsing an existing selection is never held to the floor a search has to clear.
|
|
5549
|
+
if (this.hasValue() && this.query() === this.selectedLabel())
|
|
5550
|
+
return false;
|
|
5551
|
+
return this.query().trim().length < this.minQueryLength();
|
|
5552
|
+
}, /* @ts-ignore */
|
|
5553
|
+
...(ngDevMode ? [{ debugName: "belowMinQueryLength" }] : /* istanbul ignore next */ []));
|
|
5554
|
+
/**
|
|
5555
|
+
* Whether the panel has anything to put in its box: options, the loading state, or the empty
|
|
5556
|
+
* message. A query under {@link minQueryLength} produces none of the three, and an empty box is
|
|
5557
|
+
* worse than no box at all.
|
|
5558
|
+
*/
|
|
5559
|
+
hasPanelContent = computed(() => {
|
|
5560
|
+
if (this.loading())
|
|
5561
|
+
return true;
|
|
5562
|
+
if (this.visibleOptions().length > 0)
|
|
5563
|
+
return true;
|
|
5564
|
+
return !this.belowMinQueryLength();
|
|
5565
|
+
}, /* @ts-ignore */
|
|
5566
|
+
...(ngDevMode ? [{ debugName: "hasPanelContent" }] : /* istanbul ignore next */ []));
|
|
5567
|
+
/** Whether work is outstanding on the control: async validation, or a search in flight. */
|
|
5568
|
+
busy = computed(() => this.pending() || this.loading(), /* @ts-ignore */
|
|
5569
|
+
...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
|
|
5078
5570
|
select(option) {
|
|
5079
5571
|
if (option.disabled)
|
|
5080
5572
|
return;
|
|
@@ -5089,6 +5581,10 @@ class Autocomplete extends AbstractSelect {
|
|
|
5089
5581
|
this.query.set(target.value);
|
|
5090
5582
|
this.open();
|
|
5091
5583
|
this.activeIndex.set(this.getInitialActiveIndex());
|
|
5584
|
+
// Typing is the only thing that emits; every other write of `query` re-derives it from the
|
|
5585
|
+
// committed selection, and a listener must not be sent a query nobody typed.
|
|
5586
|
+
if (!this.belowMinQueryLength())
|
|
5587
|
+
this.queryChange.emit(target.value);
|
|
5092
5588
|
}
|
|
5093
5589
|
onKeydown(event) {
|
|
5094
5590
|
if (event.key === 'ArrowDown') {
|
|
@@ -5131,6 +5627,12 @@ class Autocomplete extends AbstractSelect {
|
|
|
5131
5627
|
}
|
|
5132
5628
|
}
|
|
5133
5629
|
filterVisibleOptions(options) {
|
|
5630
|
+
if (this.belowMinQueryLength())
|
|
5631
|
+
return [];
|
|
5632
|
+
// The options are already the answer to the query, decided wherever the list came from;
|
|
5633
|
+
// filtering them again here could only drop rows that answer it.
|
|
5634
|
+
if (this.filterMode() === 'none')
|
|
5635
|
+
return options;
|
|
5134
5636
|
const query = this.query().trim().toLowerCase();
|
|
5135
5637
|
if (!query)
|
|
5136
5638
|
return options;
|
|
@@ -5142,6 +5644,11 @@ class Autocomplete extends AbstractSelect {
|
|
|
5142
5644
|
}
|
|
5143
5645
|
return options.filter(option => option.label.toLowerCase().includes(query));
|
|
5144
5646
|
}
|
|
5647
|
+
hostStateClasses() {
|
|
5648
|
+
if (!this.loading())
|
|
5649
|
+
return [];
|
|
5650
|
+
return [`${this.hostClassBase}--loading`];
|
|
5651
|
+
}
|
|
5145
5652
|
onClosed() {
|
|
5146
5653
|
// Discard an unmatched free-text query, restoring the committed selection's label (or empty).
|
|
5147
5654
|
this.query.set(this.selectedLabel());
|
|
@@ -5163,14 +5670,14 @@ class Autocomplete extends AbstractSelect {
|
|
|
5163
5670
|
this.select(option);
|
|
5164
5671
|
}
|
|
5165
5672
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Autocomplete, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5166
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Autocomplete, isStandalone: true, selector: "tls-autocomplete", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", 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 } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Autocomplete) }], usesInheritance: true, ngImport: i0, template: "<input\n #trigger\n type=\"text\"\n class=\"tls-autocomplete__trigger\"\n role=\"combobox\"\n autocomplete=\"off\"\n [attr.id]=\"effectiveInputId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"
|
|
5673
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Autocomplete, isStandalone: true, selector: "tls-autocomplete", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, loadingMessage: { classPropertyName: "loadingMessage", publicName: "loadingMessage", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", 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 } }, outputs: { value: "valueChange", queryChange: "queryChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Autocomplete) }], usesInheritance: true, ngImport: i0, template: "<input\n #trigger\n type=\"text\"\n class=\"tls-autocomplete__trigger\"\n role=\"combobox\"\n autocomplete=\"off\"\n [attr.id]=\"effectiveInputId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"busy() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [attr.aria-expanded]=\"isOpen()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [value]=\"query()\"\n (input)=\"onInput($event)\"\n (click)=\"open()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n/>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-autocomplete__clear\"\n tabindex=\"-1\"\n [attr.aria-label]=\"clearLabel()\"\n (click)=\"clear()\"\n >\n <tls-icon class=\"tls-autocomplete__clear-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n@if (pending()) {\n <tls-loader class=\"tls-autocomplete__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n\n<!--\n A live region is only announced reliably when it is already in the DOM before its text\n changes, so the region is permanent and the loading state writes into it. The panel's own\n notice is hidden from assistive technology to keep it from being read twice. Only a search\n behind an open panel is announced: a list nobody is looking at has nothing to report.\n-->\n<div class=\"tls-autocomplete__status\" role=\"status\">\n {{ loading() && isOpen() ? loadingMessage() : '' }}\n</div>\n\n<ng-template #panel>\n <ng-template #optionButton let-option let-index=\"index\" let-setsize=\"setsize\">\n <button\n class=\"tls-autocomplete__option-button\"\n role=\"option\"\n [id]=\"optionId(index)\"\n [disabled]=\"option.disabled\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-posinset]=\"setsize !== null ? index + 1 : null\"\n [attr.aria-setsize]=\"setsize\"\n (click)=\"select(option)\"\n (pointerenter)=\"onOptionHover($event, index, option.disabled)\"\n >\n @if (optionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"optionContext(option, index)\" />\n } @else {\n {{ option.label }}\n }\n </button>\n </ng-template>\n\n @if (virtualScroll()) {\n <div\n class=\"tls-autocomplete__panel tls-autocomplete__panel--virtual\"\n [class.tls-autocomplete__panel--hidden]=\"!hasPanelContent()\"\n animate.enter=\"tls-autocomplete__panel--enter\"\n animate.leave=\"tls-autocomplete__panel--leave\"\n >\n <tls-virtual-scroll\n [items]=\"visibleOptions()\"\n [itemSize]=\"virtualScrollItemSize()\"\n trackBy=\"value\"\n viewportRole=\"listbox\"\n [viewportId]=\"listboxId\"\n [focusable]=\"false\"\n [style.--tls-virtual-scroll-height]=\"virtualPanelHeight()\"\n >\n <ng-template #item let-option let-index=\"index\" let-count=\"count\">\n <div\n class=\"tls-autocomplete__option\"\n role=\"presentation\"\n [class.tls-autocomplete__option--selected]=\"option.value === value()\"\n [class.tls-autocomplete__option--active]=\"index === activeIndex()\"\n [class.tls-autocomplete__option--disabled]=\"option.disabled\"\n >\n <ng-container\n [ngTemplateOutlet]=\"optionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: index, setsize: count }\"\n />\n </div>\n </ng-template>\n </tls-virtual-scroll>\n @if (visibleOptions().length === 0) {\n @if (loading()) {\n <div class=\"tls-autocomplete__loading\" role=\"presentation\" aria-hidden=\"true\">\n <tls-loader size=\"xs\" />\n {{ loadingMessage() }}\n </div>\n } @else if (!belowMinQueryLength()) {\n <div class=\"tls-autocomplete__empty\" role=\"presentation\">{{ emptyMessage() }}</div>\n }\n }\n </div>\n } @else {\n <ul\n class=\"tls-autocomplete__panel\"\n [class.tls-autocomplete__panel--hidden]=\"!hasPanelContent()\"\n animate.enter=\"tls-autocomplete__panel--enter\"\n animate.leave=\"tls-autocomplete__panel--leave\"\n role=\"listbox\"\n [id]=\"listboxId\"\n >\n @for (option of visibleOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-autocomplete__option\"\n [class.tls-autocomplete__option--selected]=\"option.value === value()\"\n [class.tls-autocomplete__option--active]=\"index === activeIndex()\"\n [class.tls-autocomplete__option--disabled]=\"option.disabled\"\n >\n <ng-container\n [ngTemplateOutlet]=\"optionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: index, setsize: null }\"\n />\n </li>\n } @empty {\n @if (loading()) {\n <li class=\"tls-autocomplete__loading\" role=\"presentation\" aria-hidden=\"true\">\n <tls-loader size=\"xs\" />\n {{ loadingMessage() }}\n </li>\n } @else if (!belowMinQueryLength()) {\n <li class=\"tls-autocomplete__empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n }\n </ul>\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: Loader, selector: "tls-loader", inputs: ["size", "width", "widthRatio", "ariaLabel"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: VirtualScroll, selector: "tls-virtual-scroll", inputs: ["items", "itemSize", "minBufferPx", "maxBufferPx", "orientation", "appendOnly", "templateCacheSize", "trackBy", "viewportRole", "viewportId", "ariaMultiselectable", "focusable", "ariaLabel", "ariaLabelledby", "ariaDescribedby"], outputs: ["scrolledIndexChange"] }] });
|
|
5167
5674
|
}
|
|
5168
5675
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Autocomplete, decorators: [{
|
|
5169
5676
|
type: Component,
|
|
5170
5677
|
args: [{ selector: 'tls-autocomplete', imports: [Loader, Icon, NgTemplateOutlet, VirtualScroll], host: {
|
|
5171
5678
|
'[class]': 'hostClasses()',
|
|
5172
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Autocomplete) }], template: "<input\n #trigger\n type=\"text\"\n class=\"tls-autocomplete__trigger\"\n role=\"combobox\"\n autocomplete=\"off\"\n [attr.id]=\"effectiveInputId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"
|
|
5173
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }] } });
|
|
5679
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Autocomplete) }], template: "<input\n #trigger\n type=\"text\"\n class=\"tls-autocomplete__trigger\"\n role=\"combobox\"\n autocomplete=\"off\"\n [attr.id]=\"effectiveInputId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"busy() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [attr.aria-expanded]=\"isOpen()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [value]=\"query()\"\n (input)=\"onInput($event)\"\n (click)=\"open()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n/>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-autocomplete__clear\"\n tabindex=\"-1\"\n [attr.aria-label]=\"clearLabel()\"\n (click)=\"clear()\"\n >\n <tls-icon class=\"tls-autocomplete__clear-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n@if (pending()) {\n <tls-loader class=\"tls-autocomplete__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n\n<!--\n A live region is only announced reliably when it is already in the DOM before its text\n changes, so the region is permanent and the loading state writes into it. The panel's own\n notice is hidden from assistive technology to keep it from being read twice. Only a search\n behind an open panel is announced: a list nobody is looking at has nothing to report.\n-->\n<div class=\"tls-autocomplete__status\" role=\"status\">\n {{ loading() && isOpen() ? loadingMessage() : '' }}\n</div>\n\n<ng-template #panel>\n <ng-template #optionButton let-option let-index=\"index\" let-setsize=\"setsize\">\n <button\n class=\"tls-autocomplete__option-button\"\n role=\"option\"\n [id]=\"optionId(index)\"\n [disabled]=\"option.disabled\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-posinset]=\"setsize !== null ? index + 1 : null\"\n [attr.aria-setsize]=\"setsize\"\n (click)=\"select(option)\"\n (pointerenter)=\"onOptionHover($event, index, option.disabled)\"\n >\n @if (optionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"optionContext(option, index)\" />\n } @else {\n {{ option.label }}\n }\n </button>\n </ng-template>\n\n @if (virtualScroll()) {\n <div\n class=\"tls-autocomplete__panel tls-autocomplete__panel--virtual\"\n [class.tls-autocomplete__panel--hidden]=\"!hasPanelContent()\"\n animate.enter=\"tls-autocomplete__panel--enter\"\n animate.leave=\"tls-autocomplete__panel--leave\"\n >\n <tls-virtual-scroll\n [items]=\"visibleOptions()\"\n [itemSize]=\"virtualScrollItemSize()\"\n trackBy=\"value\"\n viewportRole=\"listbox\"\n [viewportId]=\"listboxId\"\n [focusable]=\"false\"\n [style.--tls-virtual-scroll-height]=\"virtualPanelHeight()\"\n >\n <ng-template #item let-option let-index=\"index\" let-count=\"count\">\n <div\n class=\"tls-autocomplete__option\"\n role=\"presentation\"\n [class.tls-autocomplete__option--selected]=\"option.value === value()\"\n [class.tls-autocomplete__option--active]=\"index === activeIndex()\"\n [class.tls-autocomplete__option--disabled]=\"option.disabled\"\n >\n <ng-container\n [ngTemplateOutlet]=\"optionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: index, setsize: count }\"\n />\n </div>\n </ng-template>\n </tls-virtual-scroll>\n @if (visibleOptions().length === 0) {\n @if (loading()) {\n <div class=\"tls-autocomplete__loading\" role=\"presentation\" aria-hidden=\"true\">\n <tls-loader size=\"xs\" />\n {{ loadingMessage() }}\n </div>\n } @else if (!belowMinQueryLength()) {\n <div class=\"tls-autocomplete__empty\" role=\"presentation\">{{ emptyMessage() }}</div>\n }\n }\n </div>\n } @else {\n <ul\n class=\"tls-autocomplete__panel\"\n [class.tls-autocomplete__panel--hidden]=\"!hasPanelContent()\"\n animate.enter=\"tls-autocomplete__panel--enter\"\n animate.leave=\"tls-autocomplete__panel--leave\"\n role=\"listbox\"\n [id]=\"listboxId\"\n >\n @for (option of visibleOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-autocomplete__option\"\n [class.tls-autocomplete__option--selected]=\"option.value === value()\"\n [class.tls-autocomplete__option--active]=\"index === activeIndex()\"\n [class.tls-autocomplete__option--disabled]=\"option.disabled\"\n >\n <ng-container\n [ngTemplateOutlet]=\"optionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: index, setsize: null }\"\n />\n </li>\n } @empty {\n @if (loading()) {\n <li class=\"tls-autocomplete__loading\" role=\"presentation\" aria-hidden=\"true\">\n <tls-loader size=\"xs\" />\n {{ loadingMessage() }}\n </li>\n } @else if (!belowMinQueryLength()) {\n <li class=\"tls-autocomplete__empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n }\n </ul>\n }\n</ng-template>\n" }]
|
|
5680
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], minQueryLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minQueryLength", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], loadingMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMessage", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], queryChange: [{ type: i0.Output, args: ["queryChange"] }] } });
|
|
5174
5681
|
|
|
5175
5682
|
const DEFAULT_CHECKBOX_CONFIG = {};
|
|
5176
5683
|
|
|
@@ -7695,6 +8202,240 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
7695
8202
|
}, template: "<div class=\"tls-image-compare__layer tls-image-compare__after\">\n <ng-content select=\"[after]\"></ng-content>\n</div>\n\n<div class=\"tls-image-compare__layer tls-image-compare__before\" [style.clip-path]=\"clipPath()\">\n <ng-content select=\"[before]\"></ng-content>\n</div>\n\n<div\n #handle\n class=\"tls-image-compare__handle\"\n role=\"slider\"\n tabindex=\"0\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuenow]=\"valueNow()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [style.inset-inline-start.%]=\"isHorizontal() ? clampedPosition() : null\"\n [style.inset-block-start.%]=\"isHorizontal() ? null : clampedPosition()\"\n (keydown)=\"onHandleKeydown($event)\"\n>\n <span class=\"tls-image-compare__grip\" aria-hidden=\"true\"></span>\n</div>\n" }]
|
|
7696
8203
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], keyboardStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardStep", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }, { type: i0.Output, args: ["positionChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], _handle: [{ type: i0.ViewChild, args: ['handle', { isSignal: true }] }] } });
|
|
7697
8204
|
|
|
8205
|
+
const DEFAULT_INFINITE_SCROLL_CONFIG = {
|
|
8206
|
+
rootMargin: 200,
|
|
8207
|
+
autoLoadLimit: 3,
|
|
8208
|
+
labels: {
|
|
8209
|
+
loading: 'Loading more items',
|
|
8210
|
+
complete: 'No more items',
|
|
8211
|
+
loadMore: 'Load more',
|
|
8212
|
+
},
|
|
8213
|
+
};
|
|
8214
|
+
|
|
8215
|
+
const INFINITE_SCROLL_CONFIG = new InjectionToken('INFINITE_SCROLL_CONFIG', { factory: () => DEFAULT_INFINITE_SCROLL_CONFIG });
|
|
8216
|
+
|
|
8217
|
+
/**
|
|
8218
|
+
* End-of-collection trigger that asks for the next page as the reader approaches it. The
|
|
8219
|
+
* host is the sentinel: it is placed immediately after the collection and watched with an
|
|
8220
|
+
* `IntersectionObserver`, so `loadMore` fires once it comes within `rootMargin` of the
|
|
8221
|
+
* scroll edge. It renders the loading, end-of-collection and manual-trigger states of that
|
|
8222
|
+
* cycle, and nothing else — the collection above it stays entirely the consumer's.
|
|
8223
|
+
*
|
|
8224
|
+
* ```html
|
|
8225
|
+
* @for (article of articles(); track article.id) {
|
|
8226
|
+
* <article>…</article>
|
|
8227
|
+
* }
|
|
8228
|
+
*
|
|
8229
|
+
* <tls-infinite-scroll
|
|
8230
|
+
* [loading]="loading()"
|
|
8231
|
+
* [complete]="loadedEverything()"
|
|
8232
|
+
* (loadMore)="loadNextPage()"
|
|
8233
|
+
* />
|
|
8234
|
+
* ```
|
|
8235
|
+
*
|
|
8236
|
+
* The component owns no data, so `loading` is how it learns what became of a request:
|
|
8237
|
+
* raising it suspends the watch, and lowering it re-checks the sentinel and asks for one
|
|
8238
|
+
* more page while the collection is still too short to fill the container. Until `loading`
|
|
8239
|
+
* moves, the request already made stands, and the sentinel sitting in view cannot turn into
|
|
8240
|
+
* a second one — so a consumer that never raises `loading` at all gets exactly one request
|
|
8241
|
+
* each time the sentinel is scrolled into view.
|
|
8242
|
+
*
|
|
8243
|
+
* Content that grows without end leaves anything below it unreachable, so the automatic
|
|
8244
|
+
* loads are rationed: after `autoLoadLimit` of them in a row the component stops watching
|
|
8245
|
+
* and renders a button, and the allowance is renewed each time that button is used. The
|
|
8246
|
+
* three states each accept replacement content —
|
|
8247
|
+
* `[tlsInfiniteScrollLoading]`, `[tlsInfiniteScrollComplete]`, `[tlsInfiniteScrollTrigger]`
|
|
8248
|
+
* — projected in place of the loader, the end notice and the button:
|
|
8249
|
+
*
|
|
8250
|
+
* ```html
|
|
8251
|
+
* <tls-infinite-scroll [loading]="loading()" (loadMore)="loadNextPage()">
|
|
8252
|
+
* <tls-skeleton tlsInfiniteScrollLoading height="64px" />
|
|
8253
|
+
* </tls-infinite-scroll>
|
|
8254
|
+
* ```
|
|
8255
|
+
*
|
|
8256
|
+
* Visibility is clipped by every scrolling ancestor, so a collection inside a panel triggers
|
|
8257
|
+
* without configuration — but the head start does not come for free with it: `rootMargin`
|
|
8258
|
+
* expands the root's box and nothing else, and the root is the viewport until one is named.
|
|
8259
|
+
* Left unset inside a panel, the next page is therefore requested only as the sentinel
|
|
8260
|
+
* reaches the panel's edge; pass that panel as `root` to get the margin back.
|
|
8261
|
+
*
|
|
8262
|
+
* The end notice is announced from `labels.complete`, whatever stands in the slot, so
|
|
8263
|
+
* replacement content belongs with a label that says the same thing.
|
|
8264
|
+
*/
|
|
8265
|
+
class InfiniteScroll {
|
|
8266
|
+
// Injections
|
|
8267
|
+
_config = inject(INFINITE_SCROLL_CONFIG);
|
|
8268
|
+
_elementRef = inject(ElementRef);
|
|
8269
|
+
_isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
8270
|
+
// Inputs
|
|
8271
|
+
/**
|
|
8272
|
+
* Whether a page is in flight. While it is raised nothing is watched and nothing is
|
|
8273
|
+
* emitted; lowering it re-measures the sentinel and requests the next page when the
|
|
8274
|
+
* collection still has not reached past the scroll edge.
|
|
8275
|
+
*/
|
|
8276
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8277
|
+
/** Whether the collection is exhausted. Ends the cycle and renders the end notice. */
|
|
8278
|
+
complete = input(false, { ...(ngDevMode ? { debugName: "complete" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8279
|
+
/**
|
|
8280
|
+
* Suspends the whole trigger without ending it: nothing is watched, nothing is rendered,
|
|
8281
|
+
* and the automatic allowance is kept for when it is lifted.
|
|
8282
|
+
*/
|
|
8283
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8284
|
+
/**
|
|
8285
|
+
* Renders the button from the start instead of loading on approach. The scroll position
|
|
8286
|
+
* then never triggers a request, which is what a collection whose items are expensive to
|
|
8287
|
+
* render — or one a reader is likely to scroll past — should do.
|
|
8288
|
+
*/
|
|
8289
|
+
manual = input(false, { ...(ngDevMode ? { debugName: "manual" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8290
|
+
/** Distance ahead of the scroll edge at which a load starts, in pixels. */
|
|
8291
|
+
rootMargin = input(this._config.rootMargin, { ...(ngDevMode ? { debugName: "rootMargin" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
8292
|
+
/** Consecutive automatic loads before the button takes over; `0` removes the limit. */
|
|
8293
|
+
autoLoadLimit = input(this._config.autoLoadLimit, { ...(ngDevMode ? { debugName: "autoLoadLimit" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
8294
|
+
/**
|
|
8295
|
+
* Element the sentinel's visibility is measured against. Left unset that is the viewport,
|
|
8296
|
+
* clipped by whatever scrolling ancestors lie in between — enough to trigger inside a
|
|
8297
|
+
* panel, but `rootMargin` then expands the viewport's box rather than the panel's, which
|
|
8298
|
+
* costs the head start. Name the scrolling container to measure the margin against it.
|
|
8299
|
+
*/
|
|
8300
|
+
root = input(null, /* @ts-ignore */
|
|
8301
|
+
...(ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []));
|
|
8302
|
+
// Outputs
|
|
8303
|
+
/**
|
|
8304
|
+
* Request for one more page. One request stands at a time: nothing follows it until
|
|
8305
|
+
* `loading` moves or the sentinel leaves view, whether it came from the scroll position
|
|
8306
|
+
* or from the button.
|
|
8307
|
+
*/
|
|
8308
|
+
loadMore = output();
|
|
8309
|
+
// State
|
|
8310
|
+
labels = this._config.labels;
|
|
8311
|
+
/** Automatic loads since the last time the button was used. */
|
|
8312
|
+
_automaticLoads = signal(0, /* @ts-ignore */
|
|
8313
|
+
...(ngDevMode ? [{ debugName: "_automaticLoads" }] : /* istanbul ignore next */ []));
|
|
8314
|
+
/**
|
|
8315
|
+
* Whether a request has gone out that nothing has accounted for yet. The sentinel keeps
|
|
8316
|
+
* reporting itself visible after a page is asked for — an observer started while it is in
|
|
8317
|
+
* view says so immediately — so without this a single request would be repeated for as
|
|
8318
|
+
* long as it takes the collection to grow past the scroll edge. Any change to `loading`
|
|
8319
|
+
* settles the outstanding request: raising it is the consumer taking the request on,
|
|
8320
|
+
* lowering it means the page has landed.
|
|
8321
|
+
*/
|
|
8322
|
+
_pending = linkedSignal({ ...(ngDevMode ? { debugName: "_pending" } : /* istanbul ignore next */ {}), source: this.loading,
|
|
8323
|
+
computation: () => false });
|
|
8324
|
+
// Computed
|
|
8325
|
+
state = computed(() => {
|
|
8326
|
+
// Suspension outranks every other state: a trigger told to stand down neither watches
|
|
8327
|
+
// nor reports, whatever the collection is doing meanwhile.
|
|
8328
|
+
if (this.disabled())
|
|
8329
|
+
return 'disabled';
|
|
8330
|
+
if (this.complete())
|
|
8331
|
+
return 'complete';
|
|
8332
|
+
if (this.loading())
|
|
8333
|
+
return 'loading';
|
|
8334
|
+
const limit = this.autoLoadLimit();
|
|
8335
|
+
if (this.manual() || (limit > 0 && this._automaticLoads() >= limit))
|
|
8336
|
+
return 'manual';
|
|
8337
|
+
return 'idle';
|
|
8338
|
+
}, /* @ts-ignore */
|
|
8339
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
8340
|
+
/** Text of the live region: empty in every state that has nothing to report. */
|
|
8341
|
+
announcement = computed(() => {
|
|
8342
|
+
const state = this.state();
|
|
8343
|
+
if (state === 'loading')
|
|
8344
|
+
return this.labels.loading;
|
|
8345
|
+
if (state === 'complete')
|
|
8346
|
+
return this.labels.complete;
|
|
8347
|
+
return '';
|
|
8348
|
+
}, /* @ts-ignore */
|
|
8349
|
+
...(ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []));
|
|
8350
|
+
hostClasses = computed(() => [
|
|
8351
|
+
'tls-infinite-scroll',
|
|
8352
|
+
`tls-infinite-scroll--${this.state()}`,
|
|
8353
|
+
], /* @ts-ignore */
|
|
8354
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
8355
|
+
/**
|
|
8356
|
+
* Whether the sentinel is under observation. Observation outlives the point at which the
|
|
8357
|
+
* component stops asking for pages: a request that the consumer never reports on is
|
|
8358
|
+
* settled by the sentinel leaving view, which only an observer still in place can see.
|
|
8359
|
+
*/
|
|
8360
|
+
_observing = computed(() => this.state() === 'idle', /* @ts-ignore */
|
|
8361
|
+
...(ngDevMode ? [{ debugName: "_observing" }] : /* istanbul ignore next */ []));
|
|
8362
|
+
/** Whether a report of the sentinel in view should turn into a request. */
|
|
8363
|
+
_requesting = computed(() => this._observing() && !this._pending(), /* @ts-ignore */
|
|
8364
|
+
...(ngDevMode ? [{ debugName: "_requesting" }] : /* istanbul ignore next */ []));
|
|
8365
|
+
/**
|
|
8366
|
+
* Margin as the observer takes it. A margin that does not resolve to a length is rejected
|
|
8367
|
+
* by the observer's constructor, so an unusable input falls back to the configured one
|
|
8368
|
+
* rather than leaving the collection with no trigger at all.
|
|
8369
|
+
*/
|
|
8370
|
+
_resolvedRootMargin = computed(() => {
|
|
8371
|
+
const margin = this.rootMargin();
|
|
8372
|
+
return `${Number.isFinite(margin) ? margin : this._config.rootMargin}px`;
|
|
8373
|
+
}, /* @ts-ignore */
|
|
8374
|
+
...(ngDevMode ? [{ debugName: "_resolvedRootMargin" }] : /* istanbul ignore next */ []));
|
|
8375
|
+
constructor() {
|
|
8376
|
+
effect(onCleanup => {
|
|
8377
|
+
if (!this._isBrowser)
|
|
8378
|
+
return;
|
|
8379
|
+
if (!this._observing())
|
|
8380
|
+
return;
|
|
8381
|
+
const observer = new IntersectionObserver(entries => {
|
|
8382
|
+
if (entries[entries.length - 1].isIntersecting) {
|
|
8383
|
+
this._loadAutomatically();
|
|
8384
|
+
return;
|
|
8385
|
+
}
|
|
8386
|
+
// The sentinel out of view is the end of whatever was asked for while it was in
|
|
8387
|
+
// view: the collection now reaches past the scroll edge, however it got there.
|
|
8388
|
+
this._pending.set(false);
|
|
8389
|
+
}, { root: this.root(), rootMargin: this._resolvedRootMargin() });
|
|
8390
|
+
// An observer reports the sentinel's current visibility as soon as it starts, so
|
|
8391
|
+
// re-arming after a page has arrived is what continues a collection too short to
|
|
8392
|
+
// reach past the scroll edge — no separate catch-up pass is needed.
|
|
8393
|
+
observer.observe(this._elementRef.nativeElement);
|
|
8394
|
+
onCleanup(() => observer.disconnect());
|
|
8395
|
+
});
|
|
8396
|
+
}
|
|
8397
|
+
// Public methods
|
|
8398
|
+
/**
|
|
8399
|
+
* Requests the next page as the button does, renewing the automatic allowance. Ignored
|
|
8400
|
+
* while a page is in flight, once the collection is exhausted and while suspended.
|
|
8401
|
+
*/
|
|
8402
|
+
load() {
|
|
8403
|
+
const state = this.state();
|
|
8404
|
+
if (state !== 'idle' && state !== 'manual')
|
|
8405
|
+
return;
|
|
8406
|
+
this._automaticLoads.set(0);
|
|
8407
|
+
this._emit();
|
|
8408
|
+
}
|
|
8409
|
+
/**
|
|
8410
|
+
* Renews the automatic allowance. A collection that is replaced rather than extended — a
|
|
8411
|
+
* new query, a changed filter — starts its own run of automatic loads, which this
|
|
8412
|
+
* restores. It emits nothing itself, but it does put the sentinel back under observation,
|
|
8413
|
+
* so a page is requested straight away when the shorter collection leaves it in view.
|
|
8414
|
+
*/
|
|
8415
|
+
reset() {
|
|
8416
|
+
this._automaticLoads.set(0);
|
|
8417
|
+
}
|
|
8418
|
+
// Private methods
|
|
8419
|
+
_loadAutomatically() {
|
|
8420
|
+
if (!untracked(this._requesting))
|
|
8421
|
+
return;
|
|
8422
|
+
this._automaticLoads.update(count => count + 1);
|
|
8423
|
+
this._emit();
|
|
8424
|
+
}
|
|
8425
|
+
_emit() {
|
|
8426
|
+
this._pending.set(true);
|
|
8427
|
+
this.loadMore.emit();
|
|
8428
|
+
}
|
|
8429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InfiniteScroll, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: InfiniteScroll, isStandalone: true, selector: "tls-infinite-scroll", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, complete: { classPropertyName: "complete", publicName: "complete", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, manual: { classPropertyName: "manual", publicName: "manual", isSignal: true, isRequired: false, transformFunction: null }, rootMargin: { classPropertyName: "rootMargin", publicName: "rootMargin", isSignal: true, isRequired: false, transformFunction: null }, autoLoadLimit: { classPropertyName: "autoLoadLimit", publicName: "autoLoadLimit", isSignal: true, isRequired: false, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadMore: "loadMore" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<!--\n A live region is only announced reliably when it is already in the DOM before its text\n changes, so the region is permanent and the states write into it. The visual side of\n those states is hidden from assistive technology to keep the notice from being read twice.\n-->\n<div class=\"announcement\" role=\"status\">{{ announcement() }}</div>\n\n@switch (state()) {\n @case ('loading') {\n <div class=\"state\" aria-hidden=\"true\">\n <ng-content select=\"[tlsInfiniteScrollLoading]\">\n <tls-loader size=\"sm\" />\n </ng-content>\n </div>\n }\n @case ('complete') {\n <div class=\"state\" aria-hidden=\"true\">\n <ng-content select=\"[tlsInfiniteScrollComplete]\">\n <span class=\"notice\">{{ labels.complete }}</span>\n </ng-content>\n </div>\n }\n @case ('manual') {\n <div class=\"state\">\n <ng-content select=\"[tlsInfiniteScrollTrigger]\">\n <tls-button variant=\"tonal\" [label]=\"labels.loadMore\" (click)=\"load()\" />\n </ng-content>\n </div>\n }\n}\n", styles: [".tls-container{container:tls-container/inline-size;height:100%;width:100%}.tls-container__content{height:100%;max-width:1536px;margin:0 auto}@container tls-container (max-width: 1536px){.tls-container__content{max-width:1280px}}@container tls-container (max-width: 1280px){.tls-container__content{max-width:1024px}}@container tls-container (max-width: 1024px){.tls-container__content{max-width:768px}}@container tls-container (max-width: 768px){.tls-container__content{max-width:640px}}@container tls-container (max-width: 640px){.tls-container__content{padding:0 16px}}.tls-container-media{height:100%;width:100%;max-width:1536px;margin:0 auto}@media(max-width:1536px){.tls-container-media{max-width:1280px}}@media(max-width:1280px){.tls-container-media{max-width:1024px}}@media(max-width:1024px){.tls-container-media{max-width:768px}}@media(max-width:768px){.tls-container-media{max-width:640px}}@media(max-width:640px){.tls-container-media{padding:0 16px;width:auto}}.--cursor-help{cursor:help}.--cursor-pointer{cursor:pointer}.--hidden{display:none}.--f-style-normal{font-style:normal}.--f-style-italic{font-style:italic}.--f-weight-thin{font-weight:100}.--f-weight-extralight{font-weight:200}.--f-weight-light{font-weight:var(--font-weight-light)}.--f-weight-normal{font-weight:var(--font-weight-regular)}.--f-weight-medium{font-weight:var(--font-weight-medium)}.--f-weight-semibold{font-weight:var(--font-weight-semibold)}.--f-weight-bold{font-weight:var(--font-weight-bold)}.--f-weight-extrabold{font-weight:800}.--f-weight-black{font-weight:900}.--row{display:flex;flex-direction:row}.--row-reverse{display:flex;flex-direction:row-reverse}.--column{display:flex;flex-direction:column}.--column-reverse{display:flex;flex-direction:column-reverse}.--flex-wrap{flex-wrap:wrap}.--flex-nowrap{flex-wrap:nowrap}.--justify-start{justify-content:flex-start}.--justify-end{justify-content:flex-end}.--justify-center{justify-content:center}.--justify-between{justify-content:space-between}.--justify-around{justify-content:space-around}.--justify-evenly{justify-content:space-evenly}.--items-start{align-items:flex-start}.--items-end{align-items:flex-end}.--items-center{align-items:center}.--items-baseline{align-items:baseline}.--items-stretch{align-items:stretch}.--gap-1{gap:var(--spacing-1)}.--gap-2{gap:var(--spacing-2)}.--gap-3{gap:var(--spacing-3)}.--gap-4{gap:var(--spacing-4)}.--gap-5{gap:var(--spacing-5)}.--gap-6{gap:var(--spacing-6)}.--gap-7{gap:var(--spacing-7)}.--gap-8{gap:var(--spacing-8)}.--gap-9{gap:var(--spacing-9)}.--gap-10{gap:var(--spacing-10)}.--gap-11{gap:var(--spacing-11)}.--gap-12{gap:var(--spacing-12)}.--gap-13{gap:var(--spacing-13)}.--gap-14{gap:var(--spacing-14)}.--gap-15{gap:var(--spacing-15)}.--gap-16{gap:var(--spacing-16)}.--gap-17{gap:var(--spacing-17)}.--gap-18{gap:var(--spacing-18)}.--gap-19{gap:var(--spacing-19)}.--gap-20{gap:var(--spacing-20)}.--text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-display-lg{font-size:var(--font-display-large-size);font-weight:var(--font-display-large-weight);line-height:var(--font-display-large-line-height);letter-spacing:var(--font-display-large-letter-spacing)}.text-display-md{font-size:var(--font-display-medium-size);font-weight:var(--font-display-medium-weight);line-height:var(--font-display-medium-line-height);letter-spacing:var(--font-display-medium-letter-spacing)}.text-display-sm{font-size:var(--font-display-small-size);font-weight:var(--font-display-small-weight);line-height:var(--font-display-small-line-height);letter-spacing:var(--font-display-small-letter-spacing)}h1,.text-headline-lg{font-size:var(--font-headline-large-size);font-weight:var(--font-headline-large-weight);line-height:var(--font-headline-large-line-height);letter-spacing:var(--font-headline-large-letter-spacing)}h2,.text-headline-md{font-size:var(--font-headline-medium-size);font-weight:var(--font-headline-medium-weight);line-height:var(--font-headline-medium-line-height);letter-spacing:var(--font-headline-medium-letter-spacing)}h3,.text-headline-sm{font-size:var(--font-headline-small-size);font-weight:var(--font-headline-small-weight);line-height:var(--font-headline-small-line-height);letter-spacing:var(--font-headline-small-letter-spacing)}h4,.text-title-lg{font-size:var(--font-title-large-size);font-weight:var(--font-title-large-weight);line-height:var(--font-title-large-line-height);letter-spacing:var(--font-title-large-letter-spacing)}h5,.text-title-md{font-size:var(--font-title-medium-size);font-weight:var(--font-title-medium-weight);line-height:var(--font-title-medium-line-height);letter-spacing:var(--font-title-medium-letter-spacing)}h6,.text-title-sm{font-size:var(--font-title-small-size);font-weight:var(--font-title-small-weight);line-height:var(--font-title-small-line-height);letter-spacing:var(--font-title-small-letter-spacing)}p,.text-body-lg{font-size:var(--font-body-large-size);font-weight:var(--font-body-large-weight);line-height:var(--font-body-large-line-height);letter-spacing:var(--font-body-large-letter-spacing)}.text-body-md{font-size:var(--font-body-medium-size);font-weight:var(--font-body-medium-weight);line-height:var(--font-body-medium-line-height);letter-spacing:var(--font-body-medium-letter-spacing)}small,.text-body-sm{font-size:var(--font-body-small-size);font-weight:var(--font-body-small-weight);line-height:var(--font-body-small-line-height);letter-spacing:var(--font-body-small-letter-spacing)}.text-label-lg{font-size:var(--font-label-large-size);font-weight:var(--font-label-large-weight);line-height:var(--font-label-large-line-height);letter-spacing:var(--font-label-large-letter-spacing)}.text-label-md{font-size:var(--font-label-medium-size);font-weight:var(--font-label-medium-weight);line-height:var(--font-label-medium-line-height);letter-spacing:var(--font-label-medium-letter-spacing)}.text-label-sm{font-size:var(--font-label-small-size);font-weight:var(--font-label-small-weight);line-height:var(--font-label-small-line-height);letter-spacing:var(--font-label-small-letter-spacing)}body{margin:0}ul,ol{margin:0;padding:0;list-style:none}h1,h2,h3,h4,h5,h6,p,blockquote{margin:0}button{padding:0;text-align:inherit;border:none;background-color:transparent;cursor:pointer}input,textarea{padding:0;border:0}table{border-spacing:0}hr{margin:0;border:none}a{text-decoration:none}:root{box-sizing:border-box;-webkit-text-size-adjust:100%;text-size-adjust:100%;color-scheme:light;font-family:var(--font-family-base),sans-serif;color:var(--color-on-surface);background-color:var(--color-surface)}:root.tls-dark{color-scheme:dark}*,*:before,*:after{box-sizing:inherit}button{font-family:inherit;color:inherit}img,svg{width:100%;height:100%}:host{min-height:1px;display:block}:host .announcement{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip-path:inset(50%)}:host .state{padding-block:var(--spacing-4);display:flex;align-items:center;justify-content:center}:host .notice{font-size:var(--font-body-small-size);line-height:var(--font-body-small-line-height);letter-spacing:var(--font-body-small-letter-spacing);color:var(--color-on-surface-variant)}\n"], dependencies: [{ kind: "component", type: Button, selector: "tls-button", inputs: ["label", "ariaLabel", "ariaLabelledby", "type", "href", "tabindex"] }, { kind: "component", type: Loader, selector: "tls-loader", inputs: ["size", "width", "widthRatio", "ariaLabel"] }] });
|
|
8431
|
+
}
|
|
8432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InfiniteScroll, decorators: [{
|
|
8433
|
+
type: Component,
|
|
8434
|
+
args: [{ selector: 'tls-infinite-scroll', imports: [Button, Loader], host: {
|
|
8435
|
+
'[class]': 'hostClasses()',
|
|
8436
|
+
}, template: "<!--\n A live region is only announced reliably when it is already in the DOM before its text\n changes, so the region is permanent and the states write into it. The visual side of\n those states is hidden from assistive technology to keep the notice from being read twice.\n-->\n<div class=\"announcement\" role=\"status\">{{ announcement() }}</div>\n\n@switch (state()) {\n @case ('loading') {\n <div class=\"state\" aria-hidden=\"true\">\n <ng-content select=\"[tlsInfiniteScrollLoading]\">\n <tls-loader size=\"sm\" />\n </ng-content>\n </div>\n }\n @case ('complete') {\n <div class=\"state\" aria-hidden=\"true\">\n <ng-content select=\"[tlsInfiniteScrollComplete]\">\n <span class=\"notice\">{{ labels.complete }}</span>\n </ng-content>\n </div>\n }\n @case ('manual') {\n <div class=\"state\">\n <ng-content select=\"[tlsInfiniteScrollTrigger]\">\n <tls-button variant=\"tonal\" [label]=\"labels.loadMore\" (click)=\"load()\" />\n </ng-content>\n </div>\n }\n}\n", styles: [".tls-container{container:tls-container/inline-size;height:100%;width:100%}.tls-container__content{height:100%;max-width:1536px;margin:0 auto}@container tls-container (max-width: 1536px){.tls-container__content{max-width:1280px}}@container tls-container (max-width: 1280px){.tls-container__content{max-width:1024px}}@container tls-container (max-width: 1024px){.tls-container__content{max-width:768px}}@container tls-container (max-width: 768px){.tls-container__content{max-width:640px}}@container tls-container (max-width: 640px){.tls-container__content{padding:0 16px}}.tls-container-media{height:100%;width:100%;max-width:1536px;margin:0 auto}@media(max-width:1536px){.tls-container-media{max-width:1280px}}@media(max-width:1280px){.tls-container-media{max-width:1024px}}@media(max-width:1024px){.tls-container-media{max-width:768px}}@media(max-width:768px){.tls-container-media{max-width:640px}}@media(max-width:640px){.tls-container-media{padding:0 16px;width:auto}}.--cursor-help{cursor:help}.--cursor-pointer{cursor:pointer}.--hidden{display:none}.--f-style-normal{font-style:normal}.--f-style-italic{font-style:italic}.--f-weight-thin{font-weight:100}.--f-weight-extralight{font-weight:200}.--f-weight-light{font-weight:var(--font-weight-light)}.--f-weight-normal{font-weight:var(--font-weight-regular)}.--f-weight-medium{font-weight:var(--font-weight-medium)}.--f-weight-semibold{font-weight:var(--font-weight-semibold)}.--f-weight-bold{font-weight:var(--font-weight-bold)}.--f-weight-extrabold{font-weight:800}.--f-weight-black{font-weight:900}.--row{display:flex;flex-direction:row}.--row-reverse{display:flex;flex-direction:row-reverse}.--column{display:flex;flex-direction:column}.--column-reverse{display:flex;flex-direction:column-reverse}.--flex-wrap{flex-wrap:wrap}.--flex-nowrap{flex-wrap:nowrap}.--justify-start{justify-content:flex-start}.--justify-end{justify-content:flex-end}.--justify-center{justify-content:center}.--justify-between{justify-content:space-between}.--justify-around{justify-content:space-around}.--justify-evenly{justify-content:space-evenly}.--items-start{align-items:flex-start}.--items-end{align-items:flex-end}.--items-center{align-items:center}.--items-baseline{align-items:baseline}.--items-stretch{align-items:stretch}.--gap-1{gap:var(--spacing-1)}.--gap-2{gap:var(--spacing-2)}.--gap-3{gap:var(--spacing-3)}.--gap-4{gap:var(--spacing-4)}.--gap-5{gap:var(--spacing-5)}.--gap-6{gap:var(--spacing-6)}.--gap-7{gap:var(--spacing-7)}.--gap-8{gap:var(--spacing-8)}.--gap-9{gap:var(--spacing-9)}.--gap-10{gap:var(--spacing-10)}.--gap-11{gap:var(--spacing-11)}.--gap-12{gap:var(--spacing-12)}.--gap-13{gap:var(--spacing-13)}.--gap-14{gap:var(--spacing-14)}.--gap-15{gap:var(--spacing-15)}.--gap-16{gap:var(--spacing-16)}.--gap-17{gap:var(--spacing-17)}.--gap-18{gap:var(--spacing-18)}.--gap-19{gap:var(--spacing-19)}.--gap-20{gap:var(--spacing-20)}.--text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-display-lg{font-size:var(--font-display-large-size);font-weight:var(--font-display-large-weight);line-height:var(--font-display-large-line-height);letter-spacing:var(--font-display-large-letter-spacing)}.text-display-md{font-size:var(--font-display-medium-size);font-weight:var(--font-display-medium-weight);line-height:var(--font-display-medium-line-height);letter-spacing:var(--font-display-medium-letter-spacing)}.text-display-sm{font-size:var(--font-display-small-size);font-weight:var(--font-display-small-weight);line-height:var(--font-display-small-line-height);letter-spacing:var(--font-display-small-letter-spacing)}h1,.text-headline-lg{font-size:var(--font-headline-large-size);font-weight:var(--font-headline-large-weight);line-height:var(--font-headline-large-line-height);letter-spacing:var(--font-headline-large-letter-spacing)}h2,.text-headline-md{font-size:var(--font-headline-medium-size);font-weight:var(--font-headline-medium-weight);line-height:var(--font-headline-medium-line-height);letter-spacing:var(--font-headline-medium-letter-spacing)}h3,.text-headline-sm{font-size:var(--font-headline-small-size);font-weight:var(--font-headline-small-weight);line-height:var(--font-headline-small-line-height);letter-spacing:var(--font-headline-small-letter-spacing)}h4,.text-title-lg{font-size:var(--font-title-large-size);font-weight:var(--font-title-large-weight);line-height:var(--font-title-large-line-height);letter-spacing:var(--font-title-large-letter-spacing)}h5,.text-title-md{font-size:var(--font-title-medium-size);font-weight:var(--font-title-medium-weight);line-height:var(--font-title-medium-line-height);letter-spacing:var(--font-title-medium-letter-spacing)}h6,.text-title-sm{font-size:var(--font-title-small-size);font-weight:var(--font-title-small-weight);line-height:var(--font-title-small-line-height);letter-spacing:var(--font-title-small-letter-spacing)}p,.text-body-lg{font-size:var(--font-body-large-size);font-weight:var(--font-body-large-weight);line-height:var(--font-body-large-line-height);letter-spacing:var(--font-body-large-letter-spacing)}.text-body-md{font-size:var(--font-body-medium-size);font-weight:var(--font-body-medium-weight);line-height:var(--font-body-medium-line-height);letter-spacing:var(--font-body-medium-letter-spacing)}small,.text-body-sm{font-size:var(--font-body-small-size);font-weight:var(--font-body-small-weight);line-height:var(--font-body-small-line-height);letter-spacing:var(--font-body-small-letter-spacing)}.text-label-lg{font-size:var(--font-label-large-size);font-weight:var(--font-label-large-weight);line-height:var(--font-label-large-line-height);letter-spacing:var(--font-label-large-letter-spacing)}.text-label-md{font-size:var(--font-label-medium-size);font-weight:var(--font-label-medium-weight);line-height:var(--font-label-medium-line-height);letter-spacing:var(--font-label-medium-letter-spacing)}.text-label-sm{font-size:var(--font-label-small-size);font-weight:var(--font-label-small-weight);line-height:var(--font-label-small-line-height);letter-spacing:var(--font-label-small-letter-spacing)}body{margin:0}ul,ol{margin:0;padding:0;list-style:none}h1,h2,h3,h4,h5,h6,p,blockquote{margin:0}button{padding:0;text-align:inherit;border:none;background-color:transparent;cursor:pointer}input,textarea{padding:0;border:0}table{border-spacing:0}hr{margin:0;border:none}a{text-decoration:none}:root{box-sizing:border-box;-webkit-text-size-adjust:100%;text-size-adjust:100%;color-scheme:light;font-family:var(--font-family-base),sans-serif;color:var(--color-on-surface);background-color:var(--color-surface)}:root.tls-dark{color-scheme:dark}*,*:before,*:after{box-sizing:inherit}button{font-family:inherit;color:inherit}img,svg{width:100%;height:100%}:host{min-height:1px;display:block}:host .announcement{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip-path:inset(50%)}:host .state{padding-block:var(--spacing-4);display:flex;align-items:center;justify-content:center}:host .notice{font-size:var(--font-body-small-size);line-height:var(--font-body-small-line-height);letter-spacing:var(--font-body-small-letter-spacing);color:var(--color-on-surface-variant)}\n"] }]
|
|
8437
|
+
}], ctorParameters: () => [], propDecorators: { loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], complete: [{ type: i0.Input, args: [{ isSignal: true, alias: "complete", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], manual: [{ type: i0.Input, args: [{ isSignal: true, alias: "manual", required: false }] }], rootMargin: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootMargin", required: false }] }], autoLoadLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoLoadLimit", required: false }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], loadMore: [{ type: i0.Output, args: ["loadMore"] }] } });
|
|
8438
|
+
|
|
7698
8439
|
const DEFAULT_KBD_CONFIG = {
|
|
7699
8440
|
size: 'md',
|
|
7700
8441
|
};
|
|
@@ -9001,7 +9742,7 @@ class Step {
|
|
|
9001
9742
|
}, /* @ts-ignore */
|
|
9002
9743
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
9003
9744
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9004
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Step, isStandalone: true, selector: "tls-step", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", 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 } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "iconTemplateRef", first: true, predicate: ["stepIcon"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.TabPanel, inputs: ["value", "value"] }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
9745
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Step, isStandalone: true, selector: "tls-step", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", 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 } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "iconTemplateRef", first: true, predicate: ["stepIcon"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.TabPanel, inputs: ["value", "value"] }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
9005
9746
|
}
|
|
9006
9747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, decorators: [{
|
|
9007
9748
|
type: Component,
|
|
@@ -9057,7 +9798,7 @@ class Stepper {
|
|
|
9057
9798
|
this.stepSelect.emit({ index, value });
|
|
9058
9799
|
}
|
|
9059
9800
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9060
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Stepper, isStandalone: true, selector: "tls-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepSelect: "stepSelect" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "steps", predicate: Step, isSignal: true }, { propertyName: "completedTemplateRef", first: true, predicate: ["completedTemplate"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.Tabs }], ngImport: i0, template: "<ul\n class=\"tls-stepper-header\"\n ngTabList\n [orientation]=\"orientation()\"\n [wrap]=\"false\"\n [softDisabled]=\"false\"\n [selectedTab]=\"active()\"\n (selectedTabChange)=\"onSelectedTabChange($event)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (step of steps(); track step.value(); let index = $index; let last = $last) {\n @let isCompleted = activeIndex() > index || completed();\n <li role=\"presentation\"\n class=\"tls-stepper-header__item\"\n [class]=\"`tls-stepper-header__item--${step.color()}`\"\n [class.tls-stepper-header__item--active]=\"ariaTab.selected()\"\n [class.tls-stepper-header__item--disabled]=\"step.disabled()\"\n [class.tls-stepper-header__item--unreachable]=\"linear() && index > activeIndex() + 1\"\n [class.tls-stepper-header__item--invalid]=\"step.invalid()\"\n [class.tls-stepper-header__item--completed]=\"isCompleted\">\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-stepper-header-button\"\n type=\"button\"\n [value]=\"step.value()\"\n [disabled]=\"step.disabled() || (linear() && index > activeIndex() + 1)\"\n >\n <span class=\"tls-stepper-header-button__index\">\n @if (isCompleted && step.completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (isCompleted && completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (step.iconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.iconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else {\n {{ index + 1 }}\n }\n </span>\n\n <span class=\"tls-stepper-header-button__text\">\n @if (step.label()) {\n <span class=\"tls-stepper-header-button__label\">{{ step.label() }}</span>\n }\n @if (step.description()) {\n <span class=\"tls-stepper-header-button__description\">{{ step.description() }}</span>\n }\n </span>\n\n @if (step.invalid()) {\n <span class=\"tls-stepper-header-button__state\">{{ labels.invalid }}</span>\n } @else if (isCompleted) {\n <span class=\"tls-stepper-header-button__state\">{{ labels.completed }}</span>\n }\n </button>\n @if (!last) {\n <div class=\"tls-stepper-header__divider\"></div>\n }\n </li>\n }\n</ul>\n<div class=\"tls-stepper-content\">\n <ng-content></ng-content>\n @if (completed() && completedTemplateRef()) {\n <div class=\"tls-stepper-content__template\">\n <ng-container [ngTemplateOutlet]=\"completedTemplateRef()\"></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab$1, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }] });
|
|
9801
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Stepper, isStandalone: true, selector: "tls-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepSelect: "stepSelect" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "steps", predicate: Step, isSignal: true }, { propertyName: "completedTemplateRef", first: true, predicate: ["completedTemplate"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.Tabs }], ngImport: i0, template: "<ul\n class=\"tls-stepper-header\"\n ngTabList\n [orientation]=\"orientation()\"\n [wrap]=\"false\"\n [softDisabled]=\"false\"\n [selectedTab]=\"active()\"\n (selectedTabChange)=\"onSelectedTabChange($event)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (step of steps(); track step.value(); let index = $index; let last = $last) {\n @let isCompleted = activeIndex() > index || completed();\n <li role=\"presentation\"\n class=\"tls-stepper-header__item\"\n [class]=\"`tls-stepper-header__item--${step.color()}`\"\n [class.tls-stepper-header__item--active]=\"ariaTab.selected()\"\n [class.tls-stepper-header__item--disabled]=\"step.disabled()\"\n [class.tls-stepper-header__item--unreachable]=\"linear() && index > activeIndex() + 1\"\n [class.tls-stepper-header__item--invalid]=\"step.invalid()\"\n [class.tls-stepper-header__item--completed]=\"isCompleted\">\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-stepper-header-button\"\n type=\"button\"\n [value]=\"step.value()\"\n [disabled]=\"step.disabled() || (linear() && index > activeIndex() + 1)\"\n >\n <span class=\"tls-stepper-header-button__index\">\n @if (isCompleted && step.completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (isCompleted && completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (step.iconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.iconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else {\n {{ index + 1 }}\n }\n </span>\n\n <span class=\"tls-stepper-header-button__text\">\n @if (step.label()) {\n <span class=\"tls-stepper-header-button__label\">{{ step.label() }}</span>\n }\n @if (step.description()) {\n <span class=\"tls-stepper-header-button__description\">{{ step.description() }}</span>\n }\n </span>\n\n @if (step.invalid()) {\n <span class=\"tls-stepper-header-button__state\">{{ labels.invalid }}</span>\n } @else if (isCompleted) {\n <span class=\"tls-stepper-header-button__state\">{{ labels.completed }}</span>\n }\n </button>\n @if (!last) {\n <div class=\"tls-stepper-header__divider\"></div>\n }\n </li>\n }\n</ul>\n<div class=\"tls-stepper-content\">\n <ng-content></ng-content>\n @if (completed() && completedTemplateRef()) {\n <div class=\"tls-stepper-content__template\">\n <ng-container [ngTemplateOutlet]=\"completedTemplateRef()\"></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab$1, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }] });
|
|
9061
9802
|
}
|
|
9062
9803
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, decorators: [{
|
|
9063
9804
|
type: Component,
|
|
@@ -9483,7 +10224,7 @@ class Tabs {
|
|
|
9483
10224
|
return match.value();
|
|
9484
10225
|
}
|
|
9485
10226
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9486
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Tabs, isStandalone: true, selector: "tls-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, headerPosition: { classPropertyName: "headerPosition", publicName: "headerPosition", isSignal: true, isRequired: false, transformFunction: null }, headerAlign: { classPropertyName: "headerAlign", publicName: "headerAlign", isSignal: true, isRequired: false, transformFunction: null }, itemsAlign: { classPropertyName: "itemsAlign", publicName: "itemsAlign", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "tabs", predicate: Tab, isSignal: true }], hostDirectives: [{ directive: i1.Tabs }], ngImport: i0, template: "<ul\n ngTabList\n [class]=\"headerClasses()\"\n [orientation]=\"orientation()\"\n [softDisabled]=\"false\"\n [(selectedTab)]=\"selected\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (tab of tabs(); track tab) {\n <li\n role=\"presentation\"\n class=\"tls-tab-header__item\"\n [class.tls-tab-header__item--active]=\"ariaTab.selected()\"\n [class.tls-tab-header__item--disabled]=\"tab.disabled()\"\n >\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-tab-header__item-control\"\n type=\"button\"\n [value]=\"tab.value()\"\n [disabled]=\"tab.disabled()\"\n [attr.aria-label]=\"tab.headerTemplateRef() ? tab.label() : null\"\n >\n @if (tab.headerTemplateRef(); as headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"headerTemplateRef\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </button>\n </li>\n }\n</ul>\n<div class=\"tls-tabs-content\">\n @for (tab of tabs(); track tab) {\n <div ngTabPanel class=\"tls-tab\" [value]=\"tab.value()\" [preserveContent]=\"true\">\n <ng-template ngTabContent>\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplateRef()\"></ng-container>\n </ng-template>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab$1, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }, { kind: "directive", type: TabPanel, selector: "[ngTabPanel]", inputs: ["id", "value"], exportAs: ["ngTabPanel"] }, { kind: "directive", type: TabContent, selector: "ng-template[ngTabContent]", exportAs: ["ngTabContent"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
10227
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Tabs, isStandalone: true, selector: "tls-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, headerPosition: { classPropertyName: "headerPosition", publicName: "headerPosition", isSignal: true, isRequired: false, transformFunction: null }, headerAlign: { classPropertyName: "headerAlign", publicName: "headerAlign", isSignal: true, isRequired: false, transformFunction: null }, itemsAlign: { classPropertyName: "itemsAlign", publicName: "itemsAlign", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "tabs", predicate: Tab, isSignal: true }], hostDirectives: [{ directive: i1$1.Tabs }], ngImport: i0, template: "<ul\n ngTabList\n [class]=\"headerClasses()\"\n [orientation]=\"orientation()\"\n [softDisabled]=\"false\"\n [(selectedTab)]=\"selected\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (tab of tabs(); track tab) {\n <li\n role=\"presentation\"\n class=\"tls-tab-header__item\"\n [class.tls-tab-header__item--active]=\"ariaTab.selected()\"\n [class.tls-tab-header__item--disabled]=\"tab.disabled()\"\n >\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-tab-header__item-control\"\n type=\"button\"\n [value]=\"tab.value()\"\n [disabled]=\"tab.disabled()\"\n [attr.aria-label]=\"tab.headerTemplateRef() ? tab.label() : null\"\n >\n @if (tab.headerTemplateRef(); as headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"headerTemplateRef\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </button>\n </li>\n }\n</ul>\n<div class=\"tls-tabs-content\">\n @for (tab of tabs(); track tab) {\n <div ngTabPanel class=\"tls-tab\" [value]=\"tab.value()\" [preserveContent]=\"true\">\n <ng-template ngTabContent>\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplateRef()\"></ng-container>\n </ng-template>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab$1, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }, { kind: "directive", type: TabPanel, selector: "[ngTabPanel]", inputs: ["id", "value"], exportAs: ["ngTabPanel"] }, { kind: "directive", type: TabContent, selector: "ng-template[ngTabContent]", exportAs: ["ngTabContent"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
9487
10228
|
}
|
|
9488
10229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, decorators: [{
|
|
9489
10230
|
type: Component,
|
|
@@ -10119,6 +10860,12 @@ const provideThalassicUIConfig = (config = {}) => {
|
|
|
10119
10860
|
provide: IMAGE_COMPARE_CONFIG,
|
|
10120
10861
|
useValue: deepMerge(DEFAULT_IMAGE_COMPARE_CONFIG, components.imageCompare),
|
|
10121
10862
|
},
|
|
10863
|
+
{
|
|
10864
|
+
provide: INFINITE_SCROLL_CONFIG,
|
|
10865
|
+
// `labels` is a deep-partial override; deepMerge merges it recursively, but its
|
|
10866
|
+
// `Partial<T>` signature only models a shallow partial, so cast to it.
|
|
10867
|
+
useValue: deepMerge(DEFAULT_INFINITE_SCROLL_CONFIG, components.infiniteScroll),
|
|
10868
|
+
},
|
|
10122
10869
|
{ provide: INPUT_CONFIG, useValue: deepMerge(DEFAULT_INPUT_CONFIG, components.input) },
|
|
10123
10870
|
{
|
|
10124
10871
|
provide: LOADER_CONFIG,
|
|
@@ -10232,5 +10979,5 @@ const provideThalassicUIConfig = (config = {}) => {
|
|
|
10232
10979
|
* Generated bundle index. Do not edit.
|
|
10233
10980
|
*/
|
|
10234
10981
|
|
|
10235
|
-
export { ACTIVITY_HEATMAP_CONFIG, ALERT_CONFIG, AUTOCOMPLETE_CONFIG, ActivityHeatmap, Alert, AlertIcon, Autocomplete, BADGE_CONFIG, BREADCRUMBS_CONFIG, BUTTON_CONFIG, Badge, Breadcrumbs, Button, ButtonDirective, CALENDAR_CONFIG, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, CONFIRM_CONFIG, Calendar, CalendarAgendaView, CalendarEventItem, CalendarMonthView, CalendarTimeGrid, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ACTIVITY_HEATMAP_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_AUTOCOMPLETE_CONFIG, DEFAULT_BADGE_CONFIG, DEFAULT_BREADCRUMBS_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CALENDAR_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_CONFIRM_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_DRAWER_CONFIG, DEFAULT_FILE_INPUT_CONFIG, DEFAULT_FORM_CONTROL_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_HIGHLIGHT_CONFIG, DEFAULT_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_KBD_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MARK_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_ODOMETER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PAGINATION_QUERY_SYNC_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_RATING_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SLIDER_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEPPER_LABELS, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TAB_NAV_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_BUTTON_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DEFAULT_TOOLTIP_CONTENT_ATTRIBUTE, DEFAULT_VIRTUAL_SCROLL_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DateTimePicker, Dialog, DialogBody, DialogFooter, DialogHeader, DialogRef, DialogService, DialogTitleDirective, Divider, Drawer, DrawerRef, DrawerService, FILE_INPUT_CONFIG, FORM_CONTROL, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileDropTargetDirective, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, HIGHLIGHT_CONFIG, Highlight, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, Input, InputDirective, InputNumber, KBD_CONFIG, Kbd, LOADER_CONFIG, Loader, MARK_CONFIG, MASK_TOKENS, MENU_CONFIG, MULTI_SELECT_CONFIG, Mark, MaskDirective, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, PROGRESS_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PinInput, Popover, Progress, RADIO_BUTTON_CONFIG, RATING_CONFIG, RadioButton, Rating, SELECT_CONFIG, SKELETON_CONFIG, SLIDER_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Slider, Splitter, SplitterPanel, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TAB_NAV_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_BUTTON_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, TabLinkDirective, TabNavDirective, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastOutlet, ToastService, ToggleButton, ToggleGroup, TooltipDelegateDirective, TooltipDirective, TooltipTrigger, VIRTUAL_SCROLL_CONFIG, ValueFormControl, VirtualScroll, acceptsFile, aggregateActivityEntries, applyMask, buildActivityMonthSegments, buildActivityThresholds, isTypeRejected, normalizeAccept, provideThalassicIcons, provideThalassicUIConfig, resolveActivityLevel };
|
|
10982
|
+
export { ACTIVITY_HEATMAP_CONFIG, ALERT_CONFIG, AUTOCOMPLETE_CONFIG, ActivityHeatmap, Alert, AlertIcon, Autocomplete, BADGE_CONFIG, BREADCRUMBS_CONFIG, BUTTON_CONFIG, Badge, Breadcrumbs, Button, ButtonDirective, CALENDAR_CONFIG, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, CONFIRM_CONFIG, Calendar, CalendarAgendaView, CalendarEventItem, CalendarMonthView, CalendarTimeGrid, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ACTIVITY_HEATMAP_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_AUTOCOMPLETE_CONFIG, DEFAULT_BADGE_CONFIG, DEFAULT_BREADCRUMBS_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CALENDAR_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_CONFIRM_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_DRAWER_CONFIG, DEFAULT_FILE_INPUT_CONFIG, DEFAULT_FORM_CONTROL_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_HIGHLIGHT_CONFIG, DEFAULT_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_INFINITE_SCROLL_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_KBD_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MARK_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_ODOMETER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PAGINATION_QUERY_SYNC_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_RATING_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SLIDER_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEPPER_LABELS, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TAB_NAV_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_BUTTON_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DEFAULT_TOOLTIP_CONTENT_ATTRIBUTE, DEFAULT_VIRTUAL_SCROLL_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DateTimePicker, Dialog, DialogBody, DialogFooter, DialogHeader, DialogRef, DialogService, DialogTitleDirective, Divider, Drawer, DrawerRef, DrawerService, FILE_INPUT_CONFIG, FORM_CONTROL, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileDropTargetDirective, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, HIGHLIGHT_CONFIG, Highlight, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, INFINITE_SCROLL_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, InfiniteScroll, Input, InputDirective, InputNumber, KBD_CONFIG, Kbd, LOADER_CONFIG, Loader, MARK_CONFIG, MASK_TOKENS, MENU_CONFIG, MULTI_SELECT_CONFIG, Mark, MaskDirective, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, PROGRESS_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PinInput, Popover, Progress, RADIO_BUTTON_CONFIG, RATING_CONFIG, RadioButton, Rating, SELECT_CONFIG, SKELETON_CONFIG, SLIDER_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Slider, Splitter, SplitterPanel, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TAB_NAV_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_BUTTON_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, TabLinkDirective, TabNavDirective, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastOutlet, ToastService, ToggleButton, ToggleGroup, TooltipDelegateDirective, TooltipDirective, TooltipTrigger, VIRTUAL_SCROLL_CONFIG, ValueFormControl, VirtualScroll, acceptsFile, aggregateActivityEntries, applyMask, buildActivityMonthSegments, buildActivityThresholds, isTypeRejected, normalizeAccept, provideThalassicIcons, provideThalassicUIConfig, resolveActivityLevel };
|
|
10236
10983
|
//# sourceMappingURL=thalassic-ui.mjs.map
|