@thalassic/ui 22.5.1 → 22.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/thalassic-ui-fontawesome.mjs +44 -0
- package/fesm2022/thalassic-ui-fontawesome.mjs.map +1 -0
- package/fesm2022/thalassic-ui.mjs +1311 -123
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/types/thalassic-ui-fontawesome.d.ts +32 -0
- package/types/thalassic-ui.d.ts +472 -16
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, ViewContainerRef, DestroyRef, viewChild, Component, contentChild, forwardRef, output, effect, ElementRef, afterNextRender,
|
|
2
|
+
import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, ViewContainerRef, DestroyRef, viewChild, Component, contentChild, forwardRef, Injectable, makeEnvironmentProviders, output, effect, ElementRef, afterNextRender, numberAttribute, viewChildren, contentChildren, isDevMode, untracked, TemplateRef, Renderer2 } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { TemplatePortal, ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
5
5
|
import { takeUntilDestroyed, rxResource, toObservable } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { filter,
|
|
6
|
+
import { filter, throwError, map, shareReplay, of, Subscription, takeUntil } from 'rxjs';
|
|
7
7
|
import { Router, ActivatedRoute, RouterLink, NavigationStart } from '@angular/router';
|
|
8
|
-
import { LocationStrategy, NgTemplateOutlet } from '@angular/common';
|
|
8
|
+
import { LocationStrategy, NgTemplateOutlet, NgComponentOutlet } from '@angular/common';
|
|
9
9
|
import { startOfWeek, startOfMonth, endOfWeek, endOfMonth, addDays, eachDayOfInterval, format, startOfDay, isBefore, isAfter, isToday, differenceInCalendarDays, isSameMonth, addHours, differenceInMinutes, isSameDay, isSameWeek, addMonths, addWeeks, subMonths, setMonth, subYears, addYears, getYear, getMonth, getHours, getMinutes, setHours, setMinutes, setYear } from 'date-fns';
|
|
10
|
+
import { HttpClient } from '@angular/common/http';
|
|
11
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
10
12
|
import { Grid, GridRow, GridCell } from '@angular/aria/grid';
|
|
11
13
|
import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
12
14
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
13
15
|
import { CdkDialogContainer, DialogRef, Dialog as Dialog$1 } from '@angular/cdk/dialog';
|
|
14
16
|
import { Directionality } from '@angular/cdk/bidi';
|
|
15
17
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
16
|
-
import { HttpClient } from '@angular/common/http';
|
|
17
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
18
18
|
import { Menu as Menu$1, MenuItem } from '@angular/aria/menu';
|
|
19
19
|
import * as i1 from '@angular/aria/tabs';
|
|
20
20
|
import { TabPanel, TabList, Tab as Tab$1, Tabs as Tabs$1 } from '@angular/aria/tabs';
|
|
@@ -708,6 +708,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
708
708
|
}, template: "<div class=\"tls-alert-icon\"></div>\n<div class=\"tls-alert-body\">\n @if (!hideLabel()) {\n <span class=\"tls-alert-body__label\">{{ displayLabel() }}</span>\n }\n <span class=\"tls-alert-body__content\">\n <ng-content></ng-content>\n </span>\n</div>\n" }]
|
|
709
709
|
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLabel", required: false }] }] } });
|
|
710
710
|
|
|
711
|
+
const DEFAULT_BADGE_CONFIG = {
|
|
712
|
+
color: 'primary',
|
|
713
|
+
variant: 'filled',
|
|
714
|
+
position: 'top-end',
|
|
715
|
+
size: 'md',
|
|
716
|
+
max: 99,
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
const BADGE_CONFIG = new InjectionToken('BADGE_CONFIG', {
|
|
720
|
+
factory: () => DEFAULT_BADGE_CONFIG,
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
class Badge {
|
|
724
|
+
// Injections
|
|
725
|
+
_config = inject(BADGE_CONFIG);
|
|
726
|
+
// Inputs
|
|
727
|
+
value = input(/* @ts-ignore */
|
|
728
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
729
|
+
max = input(this._config.max, /* @ts-ignore */
|
|
730
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
731
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
732
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
733
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
734
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
735
|
+
position = input(this._config.position, /* @ts-ignore */
|
|
736
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
737
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
738
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
739
|
+
dot = input(false, { ...(ngDevMode ? { debugName: "dot" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
740
|
+
showZero = input(false, { ...(ngDevMode ? { debugName: "showZero" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
741
|
+
hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
742
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
743
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
744
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
745
|
+
// Computed
|
|
746
|
+
visible = computed(() => {
|
|
747
|
+
if (this.hidden())
|
|
748
|
+
return false;
|
|
749
|
+
if (this.dot())
|
|
750
|
+
return true;
|
|
751
|
+
const value = this.value();
|
|
752
|
+
if (value === undefined || value === '')
|
|
753
|
+
return false;
|
|
754
|
+
if (typeof value === 'number' && value === 0 && !this.showZero())
|
|
755
|
+
return false;
|
|
756
|
+
if (value === '0' && !this.showZero())
|
|
757
|
+
return false;
|
|
758
|
+
return true;
|
|
759
|
+
}, /* @ts-ignore */
|
|
760
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
761
|
+
displayValue = computed(() => {
|
|
762
|
+
if (this.dot())
|
|
763
|
+
return '';
|
|
764
|
+
const value = this.value();
|
|
765
|
+
if (typeof value === 'number' && value > this.max())
|
|
766
|
+
return `${this.max()}+`;
|
|
767
|
+
return `${value}`;
|
|
768
|
+
}, /* @ts-ignore */
|
|
769
|
+
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
770
|
+
decorative = computed(() => {
|
|
771
|
+
if (this.ariaLabel())
|
|
772
|
+
return false;
|
|
773
|
+
return this.dot();
|
|
774
|
+
}, /* @ts-ignore */
|
|
775
|
+
...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
|
|
776
|
+
hostClasses = computed(() => {
|
|
777
|
+
const className = 'tls-badge';
|
|
778
|
+
const array = [className];
|
|
779
|
+
array.push(`${className}--${this.color()}`);
|
|
780
|
+
array.push(`${className}--${this.variant()}`);
|
|
781
|
+
array.push(`${className}--${this.position()}`);
|
|
782
|
+
array.push(`${className}--${this.size()}`);
|
|
783
|
+
if (this.dot())
|
|
784
|
+
array.push(`${className}--dot`);
|
|
785
|
+
if (this.inset())
|
|
786
|
+
array.push(`${className}--inset`);
|
|
787
|
+
return array;
|
|
788
|
+
}, /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
790
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Badge, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
791
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Badge, isStandalone: true, selector: "tls-badge", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, dot: { classPropertyName: "dot", publicName: "dot", isSignal: true, isRequired: false, transformFunction: null }, showZero: { classPropertyName: "showZero", publicName: "showZero", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<ng-content />\n\n@if (visible()) {\n <span\n class=\"tls-badge__indicator\"\n role=\"status\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n animate.enter=\"tls-badge__indicator--enter\"\n animate.leave=\"tls-badge__indicator--leave\"\n >\n @if (!dot()) {\n {{ displayValue() }}\n }\n </span>\n}\n" });
|
|
792
|
+
}
|
|
793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Badge, decorators: [{
|
|
794
|
+
type: Component,
|
|
795
|
+
args: [{ selector: 'tls-badge', imports: [], host: {
|
|
796
|
+
'[class]': 'hostClasses()',
|
|
797
|
+
}, template: "<ng-content />\n\n@if (visible()) {\n <span\n class=\"tls-badge__indicator\"\n role=\"status\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n animate.enter=\"tls-badge__indicator--enter\"\n animate.leave=\"tls-badge__indicator--leave\"\n >\n @if (!dot()) {\n {{ displayValue() }}\n }\n </span>\n}\n" }]
|
|
798
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], dot: [{ type: i0.Input, args: [{ isSignal: true, alias: "dot", required: false }] }], showZero: [{ type: i0.Input, args: [{ isSignal: true, alias: "showZero", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
799
|
+
|
|
711
800
|
const DEFAULT_BUTTON_CONFIG = {
|
|
712
801
|
color: 'primary',
|
|
713
802
|
variant: 'filled',
|
|
@@ -863,6 +952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
863
952
|
const DEFAULT_TOGGLE_GROUP_CONFIG = {
|
|
864
953
|
size: 'md',
|
|
865
954
|
color: 'primary',
|
|
955
|
+
variant: 'filled',
|
|
866
956
|
orientation: 'horizontal',
|
|
867
957
|
multiple: false,
|
|
868
958
|
unselectable: false,
|
|
@@ -886,6 +976,8 @@ class ToggleGroup extends SelectionGroup {
|
|
|
886
976
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
887
977
|
color = input(this._config.color, /* @ts-ignore */
|
|
888
978
|
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
979
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
980
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
889
981
|
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
890
982
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
891
983
|
/** Whether the group stretches to fill its container's width with equal-width options. */
|
|
@@ -898,6 +990,7 @@ class ToggleGroup extends SelectionGroup {
|
|
|
898
990
|
className,
|
|
899
991
|
`${className}--${this.size()}`,
|
|
900
992
|
`${className}--${this.color()}`,
|
|
993
|
+
`${className}--${this.variant()}`,
|
|
901
994
|
`${className}--${this.orientation()}`,
|
|
902
995
|
];
|
|
903
996
|
if (this.fluid())
|
|
@@ -906,7 +999,7 @@ class ToggleGroup extends SelectionGroup {
|
|
|
906
999
|
}, /* @ts-ignore */
|
|
907
1000
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
908
1001
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
909
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ToggleGroup, isStandalone: true, selector: "tls-toggle-group", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, unselectable: { classPropertyName: "unselectable", publicName: "unselectable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "labelledBy()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "invalid() ? 'true' : null" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], queries: [{ propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (option of normalizedOptions(); track option.value; let index = $index) {\n <button\n type=\"button\"\n class=\"tls-toggle-group__option\"\n [class.tls-toggle-group__option--selected]=\"isSelected(option.value)\"\n [class.tls-toggle-group__option--disabled]=\"option.disabled\"\n [attr.aria-pressed]=\"isSelected(option.value)\"\n [disabled]=\"disabled() || option.disabled\"\n (click)=\"select(option)\"\n (blur)=\"touched.set(true)\"\n >\n @if (optionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"optionContext(option, index)\" />\n } @else {\n {{ option.label }}\n }\n </button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1002
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ToggleGroup, isStandalone: true, selector: "tls-toggle-group", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, unselectable: { classPropertyName: "unselectable", publicName: "unselectable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "labelledBy()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "invalid() ? 'true' : null" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], queries: [{ propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@for (option of normalizedOptions(); track option.value; let index = $index) {\n <button\n type=\"button\"\n class=\"tls-toggle-group__option\"\n [class.tls-toggle-group__option--selected]=\"isSelected(option.value)\"\n [class.tls-toggle-group__option--disabled]=\"option.disabled\"\n [attr.aria-pressed]=\"isSelected(option.value)\"\n [disabled]=\"disabled() || option.disabled\"\n (click)=\"select(option)\"\n (blur)=\"touched.set(true)\"\n >\n @if (optionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"optionContext(option, index)\" />\n } @else {\n {{ option.label }}\n }\n </button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
910
1003
|
}
|
|
911
1004
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, decorators: [{
|
|
912
1005
|
type: Component,
|
|
@@ -918,7 +1011,213 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
918
1011
|
'[attr.aria-describedby]': 'describedBy()',
|
|
919
1012
|
'[attr.aria-invalid]': "invalid() ? 'true' : null",
|
|
920
1013
|
}, template: "@for (option of normalizedOptions(); track option.value; let index = $index) {\n <button\n type=\"button\"\n class=\"tls-toggle-group__option\"\n [class.tls-toggle-group__option--selected]=\"isSelected(option.value)\"\n [class.tls-toggle-group__option--disabled]=\"option.disabled\"\n [attr.aria-pressed]=\"isSelected(option.value)\"\n [disabled]=\"disabled() || option.disabled\"\n (click)=\"select(option)\"\n (blur)=\"touched.set(true)\"\n >\n @if (optionTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"optionContext(option, index)\" />\n } @else {\n {{ option.label }}\n }\n </button>\n}\n" }]
|
|
921
|
-
}], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], unselectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "unselectable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }] } });
|
|
1014
|
+
}], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], unselectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "unselectable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }] } });
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Built-in SVG for every {@link systemIcon}. A coherent 24×24 stroked set drawn
|
|
1018
|
+
* with `currentColor`, no intrinsic width/height so each icon scales to its
|
|
1019
|
+
* host box. Consumers override individual entries via `provideThalassicIcons`.
|
|
1020
|
+
*/
|
|
1021
|
+
const DEFAULT_ICONS = {
|
|
1022
|
+
check: svg('<polyline points="20 6 9 17 4 12" />'),
|
|
1023
|
+
indeterminate: svg('<line x1="5" y1="12" x2="19" y2="12" />'),
|
|
1024
|
+
'chevron-up': svg('<polyline points="18 15 12 9 6 15" />'),
|
|
1025
|
+
'chevron-down': svg('<polyline points="6 9 12 15 18 9" />'),
|
|
1026
|
+
'chevron-left': svg('<polyline points="15 18 9 12 15 6" />'),
|
|
1027
|
+
'chevron-right': svg('<polyline points="9 18 15 12 9 6" />'),
|
|
1028
|
+
'chevrons-left': svg('<polyline points="11 17 6 12 11 7" /><polyline points="18 17 13 12 18 7" />'),
|
|
1029
|
+
'chevrons-right': svg('<polyline points="13 17 18 12 13 7" /><polyline points="6 17 11 12 6 7" />'),
|
|
1030
|
+
close: svg('<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />'),
|
|
1031
|
+
success: svg('<circle cx="12" cy="12" r="10" /><polyline points="8 12 11 15 16 9" />'),
|
|
1032
|
+
warning: svg('<path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" />' +
|
|
1033
|
+
'<line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />'),
|
|
1034
|
+
error: svg('<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />'),
|
|
1035
|
+
info: svg('<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />'),
|
|
1036
|
+
};
|
|
1037
|
+
function svg(body) {
|
|
1038
|
+
return ('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" ' +
|
|
1039
|
+
'stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
|
|
1040
|
+
body +
|
|
1041
|
+
'</svg>');
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Consumer-supplied overrides for the built-in {@link systemIcon} set, merged
|
|
1046
|
+
* over {@link DEFAULT_ICONS} by {@link IconRegistry}. Provide it with
|
|
1047
|
+
* `provideThalassicIcons`.
|
|
1048
|
+
*/
|
|
1049
|
+
const ICON_REGISTRY = new InjectionToken('ICON_REGISTRY');
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Resolves a {@link systemIcon} name to its {@link iconRenderer}, applying any
|
|
1053
|
+
* consumer overrides from {@link ICON_REGISTRY} over {@link DEFAULT_ICONS}.
|
|
1054
|
+
*/
|
|
1055
|
+
class IconRegistry {
|
|
1056
|
+
// Injections
|
|
1057
|
+
_overrides = inject(ICON_REGISTRY, { optional: true });
|
|
1058
|
+
// State
|
|
1059
|
+
_icons = {
|
|
1060
|
+
...DEFAULT_ICONS,
|
|
1061
|
+
...this._overrides,
|
|
1062
|
+
};
|
|
1063
|
+
// Public methods
|
|
1064
|
+
resolve(name) {
|
|
1065
|
+
return this._icons[name];
|
|
1066
|
+
}
|
|
1067
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1068
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconRegistry, providedIn: 'root' });
|
|
1069
|
+
}
|
|
1070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconRegistry, decorators: [{
|
|
1071
|
+
type: Injectable,
|
|
1072
|
+
args: [{ providedIn: 'root' }]
|
|
1073
|
+
}] });
|
|
1074
|
+
|
|
1075
|
+
class IconService {
|
|
1076
|
+
_http = inject(HttpClient);
|
|
1077
|
+
_sanitizer = inject(DomSanitizer);
|
|
1078
|
+
_cache = new Map();
|
|
1079
|
+
getSvgContent(url, allowedSources) {
|
|
1080
|
+
if (allowedSources.length > 0 && !this._isUrlAllowed(url, allowedSources)) {
|
|
1081
|
+
return throwError(() => new Error('SVG URL not from trusted source'));
|
|
1082
|
+
}
|
|
1083
|
+
const cache = this._cache.get(url);
|
|
1084
|
+
if (!cache) {
|
|
1085
|
+
const svg$ = this._http.get(url, { responseType: 'text' }).pipe(map(svg => this._sanitizeSvg(svg)), shareReplay(1));
|
|
1086
|
+
this._cache.set(url, svg$);
|
|
1087
|
+
return svg$;
|
|
1088
|
+
}
|
|
1089
|
+
return cache;
|
|
1090
|
+
}
|
|
1091
|
+
sanitizeSvg(svg) {
|
|
1092
|
+
return this._sanitizeSvg(svg);
|
|
1093
|
+
}
|
|
1094
|
+
// Private methods
|
|
1095
|
+
_isUrlAllowed(url, allowedSource) {
|
|
1096
|
+
return allowedSource.some(source => url.startsWith(source));
|
|
1097
|
+
}
|
|
1098
|
+
_sanitizeSvg(svg) {
|
|
1099
|
+
const safeSvg = this._makeSafe(svg);
|
|
1100
|
+
return this._sanitizer.bypassSecurityTrustHtml(safeSvg);
|
|
1101
|
+
}
|
|
1102
|
+
_makeSafe(svg) {
|
|
1103
|
+
return (svg
|
|
1104
|
+
// Remove script tags
|
|
1105
|
+
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
|
|
1106
|
+
// Remove event handlers (onclick, onload, onmouseover, etc.)
|
|
1107
|
+
.replace(/on\w+\s*=\s*["'][^"']*["']/gi, '')
|
|
1108
|
+
// Remove external xlink:href (keep internal references starting with #)
|
|
1109
|
+
.replace(/xlink:href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
1110
|
+
// Remove external href in <use>, <image>, <a> tags (keep internal #refs)
|
|
1111
|
+
.replace(/href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
1112
|
+
// Remove data URIs with HTML content
|
|
1113
|
+
.replace(/href\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
1114
|
+
.replace(/src\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
1115
|
+
// Remove javascript: protocol
|
|
1116
|
+
.replace(/javascript:/gi, '')
|
|
1117
|
+
// Remove import statements in style
|
|
1118
|
+
.replace(/@import/gi, ''));
|
|
1119
|
+
}
|
|
1120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1121
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
1122
|
+
}
|
|
1123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, decorators: [{
|
|
1124
|
+
type: Injectable,
|
|
1125
|
+
args: [{ providedIn: 'root' }]
|
|
1126
|
+
}] });
|
|
1127
|
+
|
|
1128
|
+
const DEFAULT_ICON_CONFIG = {
|
|
1129
|
+
allowedSources: [],
|
|
1130
|
+
};
|
|
1131
|
+
|
|
1132
|
+
const ICON_CONFIG = new InjectionToken('ICON_CONFIG', {
|
|
1133
|
+
factory: () => DEFAULT_ICON_CONFIG,
|
|
1134
|
+
});
|
|
1135
|
+
|
|
1136
|
+
class Icon {
|
|
1137
|
+
// Injections
|
|
1138
|
+
_iconService = inject(IconService);
|
|
1139
|
+
_iconRegistry = inject(IconRegistry);
|
|
1140
|
+
_config = inject(ICON_CONFIG);
|
|
1141
|
+
// Inputs
|
|
1142
|
+
/** A semantic icon from the registry — overridable via `provideThalassicIcons`. */
|
|
1143
|
+
name = input(/* @ts-ignore */
|
|
1144
|
+
...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1145
|
+
/** A URL to an SVG or image for arbitrary content icons. Ignored when `name` is set. */
|
|
1146
|
+
iconSrc = input(/* @ts-ignore */
|
|
1147
|
+
...(ngDevMode ? [undefined, { debugName: "iconSrc" }] : /* istanbul ignore next */ []));
|
|
1148
|
+
alt = input('', /* @ts-ignore */
|
|
1149
|
+
...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
1150
|
+
allowedSources = input(this._config.allowedSources, /* @ts-ignore */
|
|
1151
|
+
...(ngDevMode ? [{ debugName: "allowedSources" }] : /* istanbul ignore next */ []));
|
|
1152
|
+
// Computed
|
|
1153
|
+
_renderer = computed(() => {
|
|
1154
|
+
const name = this.name();
|
|
1155
|
+
if (!name)
|
|
1156
|
+
return undefined;
|
|
1157
|
+
return this._iconRegistry.resolve(name);
|
|
1158
|
+
}, /* @ts-ignore */
|
|
1159
|
+
...(ngDevMode ? [{ debugName: "_renderer" }] : /* istanbul ignore next */ []));
|
|
1160
|
+
registryComponent = computed(() => {
|
|
1161
|
+
const renderer = this._renderer();
|
|
1162
|
+
if (!renderer || typeof renderer === 'string')
|
|
1163
|
+
return null;
|
|
1164
|
+
return renderer;
|
|
1165
|
+
}, /* @ts-ignore */
|
|
1166
|
+
...(ngDevMode ? [{ debugName: "registryComponent" }] : /* istanbul ignore next */ []));
|
|
1167
|
+
registrySvg = computed(() => {
|
|
1168
|
+
const renderer = this._renderer();
|
|
1169
|
+
if (typeof renderer !== 'string')
|
|
1170
|
+
return null;
|
|
1171
|
+
return this._iconService.sanitizeSvg(renderer);
|
|
1172
|
+
}, /* @ts-ignore */
|
|
1173
|
+
...(ngDevMode ? [{ debugName: "registrySvg" }] : /* istanbul ignore next */ []));
|
|
1174
|
+
isSvgSrc = computed(() => {
|
|
1175
|
+
const src = this.iconSrc();
|
|
1176
|
+
if (!src)
|
|
1177
|
+
return false;
|
|
1178
|
+
return src.endsWith('.svg');
|
|
1179
|
+
}, /* @ts-ignore */
|
|
1180
|
+
...(ngDevMode ? [{ debugName: "isSvgSrc" }] : /* istanbul ignore next */ []));
|
|
1181
|
+
_svgContentResource = rxResource({
|
|
1182
|
+
defaultValue: '',
|
|
1183
|
+
params: () => ({
|
|
1184
|
+
iconSrc: this.iconSrc(),
|
|
1185
|
+
name: this.name(),
|
|
1186
|
+
allowedSources: this.allowedSources(),
|
|
1187
|
+
}),
|
|
1188
|
+
stream: ({ params }) => {
|
|
1189
|
+
if (params.name || !params.iconSrc)
|
|
1190
|
+
return of('');
|
|
1191
|
+
return this._iconService.getSvgContent(params.iconSrc, params.allowedSources);
|
|
1192
|
+
},
|
|
1193
|
+
});
|
|
1194
|
+
// Accessors
|
|
1195
|
+
get svgContent() {
|
|
1196
|
+
return this._svgContentResource.value.asReadonly();
|
|
1197
|
+
}
|
|
1198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Icon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Icon, isStandalone: true, selector: "tls-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, allowedSources: { classPropertyName: "allowedSources", publicName: "allowedSources", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tls-icon" }, ngImport: i0, template: "@if (name()) {\n @if (registryComponent(); as iconComponent) {\n <ng-container [ngComponentOutlet]=\"iconComponent\" />\n } @else {\n <span [innerHTML]=\"registrySvg()\" class=\"tls-svg-icon\"></span>\n }\n} @else if (isSvgSrc() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n}\n", dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] });
|
|
1200
|
+
}
|
|
1201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Icon, decorators: [{
|
|
1202
|
+
type: Component,
|
|
1203
|
+
args: [{ selector: 'tls-icon', imports: [NgComponentOutlet], host: { class: 'tls-icon' }, template: "@if (name()) {\n @if (registryComponent(); as iconComponent) {\n <ng-container [ngComponentOutlet]=\"iconComponent\" />\n } @else {\n <span [innerHTML]=\"registrySvg()\" class=\"tls-svg-icon\"></span>\n }\n} @else if (isSvgSrc() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n}\n" }]
|
|
1204
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], allowedSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedSources", required: false }] }] } });
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Override any of the library's built-in {@link systemIcon}s with your own kit.
|
|
1208
|
+
* Each entry is raw SVG markup or a component class; names left unset keep the
|
|
1209
|
+
* library defaults. Register once in the application config:
|
|
1210
|
+
*
|
|
1211
|
+
* ```ts
|
|
1212
|
+
* provideThalassicIcons({
|
|
1213
|
+
* close: '<svg>…</svg>',
|
|
1214
|
+
* 'chevron-down': MyChevronComponent,
|
|
1215
|
+
* })
|
|
1216
|
+
* ```
|
|
1217
|
+
*/
|
|
1218
|
+
function provideThalassicIcons(icons) {
|
|
1219
|
+
return makeEnvironmentProviders([{ provide: ICON_REGISTRY, useValue: icons }]);
|
|
1220
|
+
}
|
|
922
1221
|
|
|
923
1222
|
const DAYS_IN_WEEK = 7;
|
|
924
1223
|
/**
|
|
@@ -1691,13 +1990,13 @@ class Calendar {
|
|
|
1691
1990
|
return `${format(start, 'MMM d')} – ${format(end, 'MMM d, yyyy')}`;
|
|
1692
1991
|
}
|
|
1693
1992
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Calendar, isStandalone: true, selector: "tls-calendar", inputs: { events: { classPropertyName: "events", publicName: "events", 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 }, hourStart: { classPropertyName: "hourStart", publicName: "hourStart", isSignal: true, isRequired: false, transformFunction: null }, hourEnd: { classPropertyName: "hourEnd", publicName: "hourEnd", isSignal: true, isRequired: false, transformFunction: null }, showAllDayRow: { classPropertyName: "showAllDayRow", publicName: "showAllDayRow", isSignal: true, isRequired: false, transformFunction: null }, maxEventsPerDay: { classPropertyName: "maxEventsPerDay", publicName: "maxEventsPerDay", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { eventSelect: "eventSelect", dateSelect: "dateSelect", rangeChange: "rangeChange", view: "viewChange", activeDate: "activeDateChange" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "eventTemplate", first: true, predicate: ["eventTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tls-calendar__header\">\n <div class=\"tls-calendar__nav\">\n <tls-button\n variant=\"text\"\n size=\"sm\"\n ariaLabel=\"Previous\"\n class=\"tls-calendar__nav-button\"\n (click)=\"previous()\"\n >\n <
|
|
1993
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Calendar, isStandalone: true, selector: "tls-calendar", inputs: { events: { classPropertyName: "events", publicName: "events", 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 }, hourStart: { classPropertyName: "hourStart", publicName: "hourStart", isSignal: true, isRequired: false, transformFunction: null }, hourEnd: { classPropertyName: "hourEnd", publicName: "hourEnd", isSignal: true, isRequired: false, transformFunction: null }, showAllDayRow: { classPropertyName: "showAllDayRow", publicName: "showAllDayRow", isSignal: true, isRequired: false, transformFunction: null }, maxEventsPerDay: { classPropertyName: "maxEventsPerDay", publicName: "maxEventsPerDay", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { eventSelect: "eventSelect", dateSelect: "dateSelect", rangeChange: "rangeChange", view: "viewChange", activeDate: "activeDateChange" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "eventTemplate", first: true, predicate: ["eventTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tls-calendar__header\">\n <div class=\"tls-calendar__nav\">\n <tls-button\n variant=\"text\"\n size=\"sm\"\n ariaLabel=\"Previous\"\n class=\"tls-calendar__nav-button\"\n (click)=\"previous()\"\n >\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </tls-button>\n\n <tls-button variant=\"outlined\" size=\"sm\" [disabled]=\"isViewingToday()\" (click)=\"today()\">\n Today\n </tls-button>\n\n <tls-button\n variant=\"text\"\n size=\"sm\"\n ariaLabel=\"Next\"\n class=\"tls-calendar__nav-button\"\n (click)=\"next()\"\n >\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </tls-button>\n </div>\n\n <h2 class=\"tls-calendar__title\">{{ title() }}</h2>\n\n <tls-toggle-group\n class=\"tls-calendar__views\"\n size=\"sm\"\n [options]=\"viewOptions\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [multiple]=\"false\"\n [unselectable]=\"false\"\n [value]=\"[view()]\"\n (valueChange)=\"onViewChange($event)\"\n />\n</div>\n\n@switch (view()) {\n @case ('month') {\n <tls-calendar-month-view\n [activeDate]=\"activeDate()\"\n [events]=\"events()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n [maxEventsPerDay]=\"maxEventsPerDay()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n @case ('week') {\n <tls-calendar-time-grid\n view=\"week\"\n [days]=\"timeGridDays()\"\n [events]=\"events()\"\n [hourStart]=\"hourStart()\"\n [hourEnd]=\"hourEnd()\"\n [showAllDayRow]=\"showAllDayRow()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n @case ('day') {\n <tls-calendar-time-grid\n view=\"day\"\n [days]=\"timeGridDays()\"\n [events]=\"events()\"\n [hourStart]=\"hourStart()\"\n [hourEnd]=\"hourEnd()\"\n [showAllDayRow]=\"showAllDayRow()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n @case ('agenda') {\n <tls-calendar-agenda-view\n [activeDate]=\"activeDate()\"\n [events]=\"events()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n}\n", dependencies: [{ kind: "component", type: Button, selector: "tls-button", inputs: ["label", "ariaLabel", "ariaLabelledby", "type", "href", "tabindex"] }, { kind: "component", type: ToggleGroup, selector: "tls-toggle-group", inputs: ["multiple", "unselectable", "size", "color", "variant", "orientation", "fluid"] }, { kind: "component", type: CalendarMonthView, selector: "tls-calendar-month-view", inputs: ["activeDate", "events", "weekStartsOn", "weekDays", "maxEventsPerDay", "eventTemplate", "label"], outputs: ["dateSelect", "eventSelect"] }, { kind: "component", type: CalendarTimeGrid, selector: "tls-calendar-time-grid", inputs: ["days", "events", "view", "hourStart", "hourEnd", "showAllDayRow", "eventTemplate", "label"], outputs: ["dateSelect", "eventSelect"] }, { kind: "component", type: CalendarAgendaView, selector: "tls-calendar-agenda-view", inputs: ["activeDate", "events", "eventTemplate", "label"], outputs: ["dateSelect", "eventSelect"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
1695
1994
|
}
|
|
1696
1995
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, decorators: [{
|
|
1697
1996
|
type: Component,
|
|
1698
|
-
args: [{ selector: 'tls-calendar', imports: [Button, ToggleGroup, CalendarMonthView, CalendarTimeGrid, CalendarAgendaView], host: {
|
|
1997
|
+
args: [{ selector: 'tls-calendar', imports: [Button, ToggleGroup, CalendarMonthView, CalendarTimeGrid, CalendarAgendaView, Icon], host: {
|
|
1699
1998
|
'[class]': 'hostClasses()',
|
|
1700
|
-
}, template: "<div class=\"tls-calendar__header\">\n <div class=\"tls-calendar__nav\">\n <tls-button\n variant=\"text\"\n size=\"sm\"\n ariaLabel=\"Previous\"\n class=\"tls-calendar__nav-button\"\n (click)=\"previous()\"\n >\n <
|
|
1999
|
+
}, template: "<div class=\"tls-calendar__header\">\n <div class=\"tls-calendar__nav\">\n <tls-button\n variant=\"text\"\n size=\"sm\"\n ariaLabel=\"Previous\"\n class=\"tls-calendar__nav-button\"\n (click)=\"previous()\"\n >\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </tls-button>\n\n <tls-button variant=\"outlined\" size=\"sm\" [disabled]=\"isViewingToday()\" (click)=\"today()\">\n Today\n </tls-button>\n\n <tls-button\n variant=\"text\"\n size=\"sm\"\n ariaLabel=\"Next\"\n class=\"tls-calendar__nav-button\"\n (click)=\"next()\"\n >\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </tls-button>\n </div>\n\n <h2 class=\"tls-calendar__title\">{{ title() }}</h2>\n\n <tls-toggle-group\n class=\"tls-calendar__views\"\n size=\"sm\"\n [options]=\"viewOptions\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [multiple]=\"false\"\n [unselectable]=\"false\"\n [value]=\"[view()]\"\n (valueChange)=\"onViewChange($event)\"\n />\n</div>\n\n@switch (view()) {\n @case ('month') {\n <tls-calendar-month-view\n [activeDate]=\"activeDate()\"\n [events]=\"events()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n [maxEventsPerDay]=\"maxEventsPerDay()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n @case ('week') {\n <tls-calendar-time-grid\n view=\"week\"\n [days]=\"timeGridDays()\"\n [events]=\"events()\"\n [hourStart]=\"hourStart()\"\n [hourEnd]=\"hourEnd()\"\n [showAllDayRow]=\"showAllDayRow()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n @case ('day') {\n <tls-calendar-time-grid\n view=\"day\"\n [days]=\"timeGridDays()\"\n [events]=\"events()\"\n [hourStart]=\"hourStart()\"\n [hourEnd]=\"hourEnd()\"\n [showAllDayRow]=\"showAllDayRow()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n @case ('agenda') {\n <tls-calendar-agenda-view\n [activeDate]=\"activeDate()\"\n [events]=\"events()\"\n [eventTemplate]=\"eventTemplate()\"\n [label]=\"ariaLabel() ?? title()\"\n (dateSelect)=\"dateSelect.emit($event)\"\n (eventSelect)=\"eventSelect.emit($event)\"\n />\n }\n}\n" }]
|
|
1701
2000
|
}], ctorParameters: () => [], propDecorators: { events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: false }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: false }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: false }] }], hourStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStart", required: false }] }], hourEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourEnd", required: false }] }], showAllDayRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllDayRow", required: false }] }], maxEventsPerDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxEventsPerDay", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], eventSelect: [{ type: i0.Output, args: ["eventSelect"] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], activeDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeDate", required: false }] }, { type: i0.Output, args: ["activeDateChange"] }], eventTemplate: [{ type: i0.ContentChild, args: ['eventTemplate', { isSignal: true }] }] } });
|
|
1702
2001
|
|
|
1703
2002
|
const DEFAULT_CHIP_CONFIG = {
|
|
@@ -2286,11 +2585,11 @@ class Dialog extends CdkDialogContainer {
|
|
|
2286
2585
|
this._dialogRef.close();
|
|
2287
2586
|
}
|
|
2288
2587
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Dialog, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2289
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Dialog, isStandalone: true, selector: "tls-dialog", host: { properties: { "class": "hostClasses" } }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-dialog__close\" type=\"button\" aria-label=\"Close dialog\" (click)=\"close()\">\n <
|
|
2588
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Dialog, isStandalone: true, selector: "tls-dialog", host: { properties: { "class": "hostClasses" } }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-dialog__close\" type=\"button\" aria-label=\"Close dialog\" (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"] }] });
|
|
2290
2589
|
}
|
|
2291
2590
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Dialog, decorators: [{
|
|
2292
2591
|
type: Component,
|
|
2293
|
-
args: [{ selector: 'tls-dialog', imports: [CdkPortalOutlet], host: { '[class]': 'hostClasses' }, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-dialog__close\" type=\"button\" aria-label=\"Close dialog\" (click)=\"close()\">\n <
|
|
2592
|
+
args: [{ selector: 'tls-dialog', imports: [CdkPortalOutlet, Icon], host: { '[class]': 'hostClasses' }, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-dialog__close\" type=\"button\" aria-label=\"Close dialog\" (click)=\"close()\">\n <tls-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n" }]
|
|
2294
2593
|
}] });
|
|
2295
2594
|
|
|
2296
2595
|
class DialogService {
|
|
@@ -2476,14 +2775,14 @@ class Drawer extends CdkDialogContainer {
|
|
|
2476
2775
|
});
|
|
2477
2776
|
}
|
|
2478
2777
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2479
|
-
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: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" aria-label=\"Close drawer\" (click)=\"close()\">\n <
|
|
2778
|
+
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: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" aria-label=\"Close drawer\" (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"] }] });
|
|
2480
2779
|
}
|
|
2481
2780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Drawer, decorators: [{
|
|
2482
2781
|
type: Component,
|
|
2483
|
-
args: [{ selector: 'tls-drawer', imports: [CdkPortalOutlet], host: {
|
|
2782
|
+
args: [{ selector: 'tls-drawer', imports: [CdkPortalOutlet, Icon], host: {
|
|
2484
2783
|
'[class]': 'hostClasses()',
|
|
2485
2784
|
'[style.--tls-drawer-size]': 'customSize',
|
|
2486
|
-
}, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" aria-label=\"Close drawer\" (click)=\"close()\">\n <
|
|
2785
|
+
}, template: "<ng-template cdkPortalOutlet />\n@if (config.closeable) {\n <button class=\"tls-drawer__close\" type=\"button\" aria-label=\"Close drawer\" (click)=\"close()\">\n <tls-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n" }]
|
|
2487
2786
|
}] });
|
|
2488
2787
|
|
|
2489
2788
|
/**
|
|
@@ -2854,15 +3153,15 @@ class Checkbox extends CheckboxFormControl {
|
|
|
2854
3153
|
this.toggle();
|
|
2855
3154
|
}
|
|
2856
3155
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Checkbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2857
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
3156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Checkbox, isStandalone: true, selector: "tls-checkbox", inputs: { indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indeterminate: "indeterminateChange", checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, properties: { "class": "hostClasses()", "tabindex": "-1" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Checkbox) }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [attr.id]=\"effectiveInputId()\"\n [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-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<tls-icon\n class=\"tls-checkbox-icon\"\n [name]=\"indeterminate() ? 'indeterminate' : 'check'\"\n aria-hidden=\"true\"\n/>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
2858
3157
|
}
|
|
2859
3158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Checkbox, decorators: [{
|
|
2860
3159
|
type: Component,
|
|
2861
|
-
args: [{ selector: 'tls-checkbox', imports: [], host: {
|
|
3160
|
+
args: [{ selector: 'tls-checkbox', imports: [Icon], host: {
|
|
2862
3161
|
role: 'checkbox',
|
|
2863
3162
|
'[class]': 'hostClasses()',
|
|
2864
3163
|
'[tabindex]': '-1',
|
|
2865
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Checkbox) }], template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [attr.id]=\"effectiveInputId()\"\n [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-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<
|
|
3164
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Checkbox) }], template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [attr.id]=\"effectiveInputId()\"\n [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-describedby]=\"describedBy()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<tls-icon\n class=\"tls-checkbox-icon\"\n [name]=\"indeterminate() ? 'indeterminate' : 'check'\"\n aria-hidden=\"true\"\n/>\n" }]
|
|
2866
3165
|
}], propDecorators: { indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
2867
3166
|
|
|
2868
3167
|
const DEFAULT_LOADER_CONFIG = {
|
|
@@ -3077,11 +3376,11 @@ class DatePickerCalendar {
|
|
|
3077
3376
|
return isToday(day);
|
|
3078
3377
|
}
|
|
3079
3378
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DatePickerCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3080
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DatePickerCalendar, isStandalone: true, selector: "tls-date-picker-calendar", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: true, transformFunction: null }, weekDays: { classPropertyName: "weekDays", publicName: "weekDays", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { daySelect: "daySelect", viewDateChange: "viewDateChange", navigateUp: "navigateUp" }, host: { classAttribute: "tls-date-picker-calendar" }, ngImport: i0, template: "<div class=\"tls-date-picker-calendar__header\">\n <button type=\"button\" class=\"tls-date-picker-calendar__nav\" (click)=\"prevMonth()\">\n <
|
|
3379
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DatePickerCalendar, isStandalone: true, selector: "tls-date-picker-calendar", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: true, transformFunction: null }, weekDays: { classPropertyName: "weekDays", publicName: "weekDays", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { daySelect: "daySelect", viewDateChange: "viewDateChange", navigateUp: "navigateUp" }, host: { classAttribute: "tls-date-picker-calendar" }, ngImport: i0, template: "<div class=\"tls-date-picker-calendar__header\">\n <button type=\"button\" class=\"tls-date-picker-calendar__nav\" (click)=\"prevMonth()\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" class=\"tls-date-picker-calendar__header-button\" (click)=\"navigateUp.emit()\">\n {{ headerLabel() }}\n </button>\n <button type=\"button\" class=\"tls-date-picker-calendar__nav\" (click)=\"nextMonth()\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n</div>\n\n<div class=\"tls-date-picker-calendar__grid\">\n @for (day of displayedWeekDays(); track day) {\n <span class=\"tls-date-picker-calendar__weekday\">{{ day }}</span>\n }\n @for (day of days(); track day.getTime()) {\n <button\n type=\"button\"\n class=\"tls-date-picker-calendar__day\"\n [class.tls-date-picker-calendar__day--outside]=\"!isInCurrentMonth(day)\"\n [class.tls-date-picker-calendar__day--today]=\"isTodayDay(day)\"\n [class.tls-date-picker-calendar__day--selected]=\"isSelectedDay(day)\"\n (click)=\"daySelect.emit(day)\"\n >\n {{ getDayLabel(day) }}\n </button>\n }\n</div>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
3081
3380
|
}
|
|
3082
3381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DatePickerCalendar, decorators: [{
|
|
3083
3382
|
type: Component,
|
|
3084
|
-
args: [{ selector: 'tls-date-picker-calendar', imports: [], host: { class: 'tls-date-picker-calendar' }, template: "<div class=\"tls-date-picker-calendar__header\">\n <button type=\"button\" class=\"tls-date-picker-calendar__nav\" (click)=\"prevMonth()\">\n <
|
|
3383
|
+
args: [{ selector: 'tls-date-picker-calendar', imports: [Icon], host: { class: 'tls-date-picker-calendar' }, template: "<div class=\"tls-date-picker-calendar__header\">\n <button type=\"button\" class=\"tls-date-picker-calendar__nav\" (click)=\"prevMonth()\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" class=\"tls-date-picker-calendar__header-button\" (click)=\"navigateUp.emit()\">\n {{ headerLabel() }}\n </button>\n <button type=\"button\" class=\"tls-date-picker-calendar__nav\" (click)=\"nextMonth()\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n</div>\n\n<div class=\"tls-date-picker-calendar__grid\">\n @for (day of displayedWeekDays(); track day) {\n <span class=\"tls-date-picker-calendar__weekday\">{{ day }}</span>\n }\n @for (day of days(); track day.getTime()) {\n <button\n type=\"button\"\n class=\"tls-date-picker-calendar__day\"\n [class.tls-date-picker-calendar__day--outside]=\"!isInCurrentMonth(day)\"\n [class.tls-date-picker-calendar__day--today]=\"isTodayDay(day)\"\n [class.tls-date-picker-calendar__day--selected]=\"isSelectedDay(day)\"\n (click)=\"daySelect.emit(day)\"\n >\n {{ getDayLabel(day) }}\n </button>\n }\n</div>\n" }]
|
|
3085
3384
|
}], propDecorators: { viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: true }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: true }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: true }] }], daySelect: [{ type: i0.Output, args: ["daySelect"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }], navigateUp: [{ type: i0.Output, args: ["navigateUp"] }] } });
|
|
3086
3385
|
|
|
3087
3386
|
const DEFAULT_DATE_TIME_PICKER_CONFIG = {
|
|
@@ -3134,11 +3433,11 @@ class MonthPicker {
|
|
|
3134
3433
|
return isSameMonth(new Date(), setMonth(this.viewDate(), monthIndex));
|
|
3135
3434
|
}
|
|
3136
3435
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MonthPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MonthPicker, isStandalone: true, selector: "tls-month-picker", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { monthSelect: "monthSelect", viewDateChange: "viewDateChange", navigateUp: "navigateUp" }, host: { classAttribute: "tls-month-picker" }, ngImport: i0, template: "<div class=\"tls-month-picker__header\">\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"prevYear()\">\n <
|
|
3436
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MonthPicker, isStandalone: true, selector: "tls-month-picker", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { monthSelect: "monthSelect", viewDateChange: "viewDateChange", navigateUp: "navigateUp" }, host: { classAttribute: "tls-month-picker" }, ngImport: i0, template: "<div class=\"tls-month-picker__header\">\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"prevYear()\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" class=\"tls-month-picker__header-button\" (click)=\"navigateUp.emit()\">\n {{ yearLabel() }}\n </button>\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"nextYear()\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n</div>\n<div class=\"tls-month-picker__grid\">\n @for (month of months; track month) {\n <button\n type=\"button\"\n class=\"tls-month-picker__cell\"\n [class.tls-month-picker__cell--selected]=\"isSelectedMonth(month)\"\n [class.tls-month-picker__cell--current]=\"isCurrentMonth(month)\"\n (click)=\"selectMonth(month)\"\n >\n {{ getMonthLabel(month) }}\n </button>\n }\n</div>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
3138
3437
|
}
|
|
3139
3438
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MonthPicker, decorators: [{
|
|
3140
3439
|
type: Component,
|
|
3141
|
-
args: [{ selector: 'tls-month-picker', imports: [], host: { class: 'tls-month-picker' }, template: "<div class=\"tls-month-picker__header\">\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"prevYear()\">\n <
|
|
3440
|
+
args: [{ selector: 'tls-month-picker', imports: [Icon], host: { class: 'tls-month-picker' }, template: "<div class=\"tls-month-picker__header\">\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"prevYear()\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" class=\"tls-month-picker__header-button\" (click)=\"navigateUp.emit()\">\n {{ yearLabel() }}\n </button>\n <button type=\"button\" class=\"tls-month-picker__nav\" (click)=\"nextYear()\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n</div>\n<div class=\"tls-month-picker__grid\">\n @for (month of months; track month) {\n <button\n type=\"button\"\n class=\"tls-month-picker__cell\"\n [class.tls-month-picker__cell--selected]=\"isSelectedMonth(month)\"\n [class.tls-month-picker__cell--current]=\"isCurrentMonth(month)\"\n (click)=\"selectMonth(month)\"\n >\n {{ getMonthLabel(month) }}\n </button>\n }\n</div>\n" }]
|
|
3142
3441
|
}], propDecorators: { viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: true }] }], monthSelect: [{ type: i0.Output, args: ["monthSelect"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }], navigateUp: [{ type: i0.Output, args: ["navigateUp"] }] } });
|
|
3143
3442
|
|
|
3144
3443
|
class TimePicker {
|
|
@@ -3180,11 +3479,11 @@ class TimePicker {
|
|
|
3180
3479
|
this.timeChange.emit(setMinutes(this._baseDate, (this.minutes() + 59) % 60));
|
|
3181
3480
|
}
|
|
3182
3481
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3183
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: TimePicker, isStandalone: true, selector: "tls-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { timeChange: "timeChange" }, host: { classAttribute: "tls-time-picker" }, ngImport: i0, template: "<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementHours()\">\n <
|
|
3482
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: TimePicker, isStandalone: true, selector: "tls-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { timeChange: "timeChange" }, host: { classAttribute: "tls-time-picker" }, ngImport: i0, template: "<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementHours()\">\n <tls-icon name=\"chevron-up\" aria-hidden=\"true\" />\n </button>\n <span class=\"tls-time-picker__value\">{{ hoursLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementHours()\">\n <tls-icon name=\"chevron-down\" aria-hidden=\"true\" />\n </button>\n</div>\n\n<span class=\"tls-time-picker__separator\">:</span>\n\n<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementMinutes()\">\n <tls-icon name=\"chevron-up\" aria-hidden=\"true\" />\n </button>\n <span class=\"tls-time-picker__value\">{{ minutesLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementMinutes()\">\n <tls-icon name=\"chevron-down\" aria-hidden=\"true\" />\n </button>\n</div>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
3184
3483
|
}
|
|
3185
3484
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TimePicker, decorators: [{
|
|
3186
3485
|
type: Component,
|
|
3187
|
-
args: [{ selector: 'tls-time-picker', imports: [], host: { class: 'tls-time-picker' }, template: "<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementHours()\">\n <
|
|
3486
|
+
args: [{ selector: 'tls-time-picker', imports: [Icon], host: { class: 'tls-time-picker' }, template: "<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementHours()\">\n <tls-icon name=\"chevron-up\" aria-hidden=\"true\" />\n </button>\n <span class=\"tls-time-picker__value\">{{ hoursLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementHours()\">\n <tls-icon name=\"chevron-down\" aria-hidden=\"true\" />\n </button>\n</div>\n\n<span class=\"tls-time-picker__separator\">:</span>\n\n<div class=\"tls-time-picker__column\">\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"incrementMinutes()\">\n <tls-icon name=\"chevron-up\" aria-hidden=\"true\" />\n </button>\n <span class=\"tls-time-picker__value\">{{ minutesLabel() }}</span>\n <button type=\"button\" class=\"tls-time-picker__arrow\" (click)=\"decrementMinutes()\">\n <tls-icon name=\"chevron-down\" aria-hidden=\"true\" />\n </button>\n</div>\n" }]
|
|
3188
3487
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], timeChange: [{ type: i0.Output, args: ["timeChange"] }] } });
|
|
3189
3488
|
|
|
3190
3489
|
class YearPicker {
|
|
@@ -3229,11 +3528,11 @@ class YearPicker {
|
|
|
3229
3528
|
return getYear(new Date()) === year;
|
|
3230
3529
|
}
|
|
3231
3530
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: YearPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3232
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: YearPicker, isStandalone: true, selector: "tls-year-picker", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, yearsPerPage: { classPropertyName: "yearsPerPage", publicName: "yearsPerPage", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { yearSelect: "yearSelect", viewDateChange: "viewDateChange" }, host: { classAttribute: "tls-year-picker" }, ngImport: i0, template: "<div class=\"tls-year-picker__header\">\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"prevPage()\">\n <
|
|
3531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: YearPicker, isStandalone: true, selector: "tls-year-picker", inputs: { viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: true, transformFunction: null }, yearsPerPage: { classPropertyName: "yearsPerPage", publicName: "yearsPerPage", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { yearSelect: "yearSelect", viewDateChange: "viewDateChange" }, host: { classAttribute: "tls-year-picker" }, ngImport: i0, template: "<div class=\"tls-year-picker__header\">\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"prevPage()\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <span class=\"tls-year-picker__range\">{{ rangeLabel() }}</span>\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"nextPage()\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n</div>\n<div class=\"tls-year-picker__grid\">\n @for (year of years(); track year) {\n <button\n type=\"button\"\n class=\"tls-year-picker__cell\"\n [class.tls-year-picker__cell--selected]=\"isSelectedYear(year)\"\n [class.tls-year-picker__cell--current]=\"isCurrentYear(year)\"\n (click)=\"selectYear(year)\"\n >\n {{ year }}\n </button>\n }\n</div>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
3233
3532
|
}
|
|
3234
3533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: YearPicker, decorators: [{
|
|
3235
3534
|
type: Component,
|
|
3236
|
-
args: [{ selector: 'tls-year-picker', imports: [], host: { class: 'tls-year-picker' }, template: "<div class=\"tls-year-picker__header\">\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"prevPage()\">\n <
|
|
3535
|
+
args: [{ selector: 'tls-year-picker', imports: [Icon], host: { class: 'tls-year-picker' }, template: "<div class=\"tls-year-picker__header\">\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"prevPage()\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <span class=\"tls-year-picker__range\">{{ rangeLabel() }}</span>\n <button type=\"button\" class=\"tls-year-picker__nav\" (click)=\"nextPage()\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n</div>\n<div class=\"tls-year-picker__grid\">\n @for (year of years(); track year) {\n <button\n type=\"button\"\n class=\"tls-year-picker__cell\"\n [class.tls-year-picker__cell--selected]=\"isSelectedYear(year)\"\n [class.tls-year-picker__cell--current]=\"isCurrentYear(year)\"\n (click)=\"selectYear(year)\"\n >\n {{ year }}\n </button>\n }\n</div>\n" }]
|
|
3237
3536
|
}], propDecorators: { viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: true }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: true }] }], yearsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "yearsPerPage", required: true }] }], yearSelect: [{ type: i0.Output, args: ["yearSelect"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }] } });
|
|
3238
3537
|
|
|
3239
3538
|
class DateTimePicker extends ValueFormControl {
|
|
@@ -4132,13 +4431,13 @@ class MultiSelect extends AbstractSelect {
|
|
|
4132
4431
|
this.toggleOption(option);
|
|
4133
4432
|
}
|
|
4134
4433
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MultiSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4135
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MultiSelect, isStandalone: true, selector: "tls-multi-select", 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 }, maxLabels: { classPropertyName: "maxLabels", publicName: "maxLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => MultiSelect) }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"tls-multi-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-multi-select__value\" [class.tls-form-control__placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholder() }}\n </span>\n <div class=\"tls-multi-select__icon\" aria-hidden=\"true\" [class.tls-multi-select__icon--hidden]=\"pending()\">\n <
|
|
4434
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MultiSelect, isStandalone: true, selector: "tls-multi-select", 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 }, maxLabels: { classPropertyName: "maxLabels", publicName: "maxLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => MultiSelect) }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"tls-multi-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-multi-select__value\" [class.tls-form-control__placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholder() }}\n </span>\n <div class=\"tls-multi-select__icon\" aria-hidden=\"true\" [class.tls-multi-select__icon--hidden]=\"pending()\">\n <tls-icon class=\"tls-multi-select__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n </div>\n</button>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-multi-select__clear\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <tls-icon class=\"tls-multi-select__clear-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n@if (pending()) {\n <tls-loader class=\"tls-multi-select__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n\n<ng-template #panel>\n <ul\n class=\"tls-multi-select__panel\"\n animate.enter=\"tls-multi-select__panel--enter\"\n animate.leave=\"tls-multi-select__panel--leave\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n >\n @for (option of normalizedOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-multi-select__option\"\n [class.tls-multi-select__option--selected]=\"isSelected(option)\"\n [class.tls-multi-select__option--active]=\"index === activeIndex()\"\n [class.tls-multi-select__option--disabled]=\"option.disabled\"\n >\n <button\n class=\"tls-multi-select__option-button\"\n role=\"option\"\n [id]=\"optionId(index)\"\n [disabled]=\"option.disabled\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled\"\n (click)=\"toggleOption(option)\"\n (mouseenter)=\"onOptionHover(index, option.disabled)\"\n >\n <span class=\"tls-multi-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option)) {\n <tls-icon class=\"tls-multi-select__option-check\" name=\"check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\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"] }] });
|
|
4136
4435
|
}
|
|
4137
4436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MultiSelect, decorators: [{
|
|
4138
4437
|
type: Component,
|
|
4139
|
-
args: [{ selector: 'tls-multi-select', imports: [Loader], host: {
|
|
4438
|
+
args: [{ selector: 'tls-multi-select', imports: [Loader, Icon], host: {
|
|
4140
4439
|
'[class]': 'hostClasses()',
|
|
4141
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => MultiSelect) }], template: "<button\n #trigger\n type=\"button\"\n class=\"tls-multi-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-multi-select__value\" [class.tls-form-control__placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholder() }}\n </span>\n <div class=\"tls-multi-select__icon\" aria-hidden=\"true\" [class.tls-multi-select__icon--hidden]=\"pending()\">\n <
|
|
4440
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => MultiSelect) }], template: "<button\n #trigger\n type=\"button\"\n class=\"tls-multi-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-multi-select__value\" [class.tls-form-control__placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholder() }}\n </span>\n <div class=\"tls-multi-select__icon\" aria-hidden=\"true\" [class.tls-multi-select__icon--hidden]=\"pending()\">\n <tls-icon class=\"tls-multi-select__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n </div>\n</button>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-multi-select__clear\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <tls-icon class=\"tls-multi-select__clear-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n@if (pending()) {\n <tls-loader class=\"tls-multi-select__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n\n<ng-template #panel>\n <ul\n class=\"tls-multi-select__panel\"\n animate.enter=\"tls-multi-select__panel--enter\"\n animate.leave=\"tls-multi-select__panel--leave\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n >\n @for (option of normalizedOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-multi-select__option\"\n [class.tls-multi-select__option--selected]=\"isSelected(option)\"\n [class.tls-multi-select__option--active]=\"index === activeIndex()\"\n [class.tls-multi-select__option--disabled]=\"option.disabled\"\n >\n <button\n class=\"tls-multi-select__option-button\"\n role=\"option\"\n [id]=\"optionId(index)\"\n [disabled]=\"option.disabled\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled\"\n (click)=\"toggleOption(option)\"\n (mouseenter)=\"onOptionHover(index, option.disabled)\"\n >\n <span class=\"tls-multi-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option)) {\n <tls-icon class=\"tls-multi-select__option-check\" name=\"check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n</ng-template>\n" }]
|
|
4142
4441
|
}], 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 }] }], maxLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLabels", required: false }] }] } });
|
|
4143
4442
|
|
|
4144
4443
|
const DEFAULT_SELECT_CONFIG = {
|
|
@@ -4197,13 +4496,13 @@ class Select extends AbstractSelect {
|
|
|
4197
4496
|
this.select(option);
|
|
4198
4497
|
}
|
|
4199
4498
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Select, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4200
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Select, isStandalone: true, selector: "tls-select", 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 } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Select) }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"tls-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-select__value\" [class.tls-form-control__placeholder]=\"!selectedLabel()\">\n {{ selectedLabel() || placeholder() }}\n </span>\n <div class=\"tls-select__icon\" aria-hidden=\"true\" [class.tls-select__icon--hidden]=\"pending()\">\n <
|
|
4499
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Select, isStandalone: true, selector: "tls-select", 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 } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Select) }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"tls-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-select__value\" [class.tls-form-control__placeholder]=\"!selectedLabel()\">\n {{ selectedLabel() || placeholder() }}\n </span>\n <div class=\"tls-select__icon\" aria-hidden=\"true\" [class.tls-select__icon--hidden]=\"pending()\">\n <tls-icon class=\"tls-select__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n </div>\n</button>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-select__clear\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <tls-icon class=\"tls-select__clear-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n@if (pending()) {\n <tls-loader class=\"tls-select__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n\n<ng-template #panel>\n <ul\n class=\"tls-select__panel\"\n animate.enter=\"tls-select__panel--enter\"\n animate.leave=\"tls-select__panel--leave\"\n role=\"listbox\"\n [id]=\"listboxId\"\n >\n @for (option of normalizedOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-select__option\"\n [class.tls-select__option--selected]=\"option.value === value()\"\n [class.tls-select__option--active]=\"index === activeIndex()\"\n [class.tls-select__option--disabled]=\"option.disabled\"\n >\n <button\n class=\"tls-select__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 (click)=\"select(option)\"\n (mouseenter)=\"onOptionHover(index, option.disabled)\"\n >{{ option.label }}\n </button>\n </li>\n }\n </ul>\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"] }] });
|
|
4201
4500
|
}
|
|
4202
4501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Select, decorators: [{
|
|
4203
4502
|
type: Component,
|
|
4204
|
-
args: [{ selector: 'tls-select', imports: [Loader], host: {
|
|
4503
|
+
args: [{ selector: 'tls-select', imports: [Loader, Icon], host: {
|
|
4205
4504
|
'[class]': 'hostClasses()',
|
|
4206
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Select) }], template: "<button\n #trigger\n type=\"button\"\n class=\"tls-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-select__value\" [class.tls-form-control__placeholder]=\"!selectedLabel()\">\n {{ selectedLabel() || placeholder() }}\n </span>\n <div class=\"tls-select__icon\" aria-hidden=\"true\" [class.tls-select__icon--hidden]=\"pending()\">\n <
|
|
4505
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Select) }], template: "<button\n #trigger\n type=\"button\"\n class=\"tls-select__trigger\"\n role=\"combobox\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [tabindex]=\"disabled() ? -1 : tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown)=\"onKeydown($event)\"\n>\n <span class=\"tls-select__value\" [class.tls-form-control__placeholder]=\"!selectedLabel()\">\n {{ selectedLabel() || placeholder() }}\n </span>\n <div class=\"tls-select__icon\" aria-hidden=\"true\" [class.tls-select__icon--hidden]=\"pending()\">\n <tls-icon class=\"tls-select__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n </div>\n</button>\n@if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"tls-select__clear\"\n tabindex=\"-1\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <tls-icon class=\"tls-select__clear-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n}\n@if (pending()) {\n <tls-loader class=\"tls-select__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n\n<ng-template #panel>\n <ul\n class=\"tls-select__panel\"\n animate.enter=\"tls-select__panel--enter\"\n animate.leave=\"tls-select__panel--leave\"\n role=\"listbox\"\n [id]=\"listboxId\"\n >\n @for (option of normalizedOptions(); track option.value; let index = $index) {\n <li\n class=\"tls-select__option\"\n [class.tls-select__option--selected]=\"option.value === value()\"\n [class.tls-select__option--active]=\"index === activeIndex()\"\n [class.tls-select__option--disabled]=\"option.disabled\"\n >\n <button\n class=\"tls-select__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 (click)=\"select(option)\"\n (mouseenter)=\"onOptionHover(index, option.disabled)\"\n >{{ option.label }}\n </button>\n </li>\n }\n </ul>\n</ng-template>\n" }]
|
|
4207
4506
|
}], 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 }] }] } });
|
|
4208
4507
|
|
|
4209
4508
|
const DEFAULT_SWITCH_CONFIG = {
|
|
@@ -4318,98 +4617,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
4318
4617
|
args: [{ selector: 'tls-textarea', imports: [CdkTextareaAutosize, Loader], host: { class: 'tls-textarea' }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\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]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style.resize]=\"effectiveResize()\"\n [value]=\"value()\"\n [cdkTextareaAutosize]=\"autosize()\"\n [cdkAutosizeMinRows]=\"rows()\"\n [cdkAutosizeMaxRows]=\"maxRows()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n></textarea>\n@if (pending()) {\n <tls-loader class=\"tls-form-control__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n", styles: [":host{--tls-textarea-width: 200px;position:relative;display:inline-block;width:var(--tls-textarea-width)}:host .tls-form-control{width:100%}:host .tls-form-control__spinner{position:absolute;inset-block-start:var(--spacing-2);inset-inline-end:var(--spacing-3);pointer-events:none}:host .tls-form-control--pending{padding-inline-end:var(--spacing-8)}:host:has(.tls-form-control--fluid){--tls-textarea-width: 100%}\n"] }]
|
|
4319
4618
|
}], 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 }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], autosize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosize", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }] } });
|
|
4320
4619
|
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
getSvgContent(url, allowedSources) {
|
|
4326
|
-
if (allowedSources.length > 0 && !this._isUrlAllowed(url, allowedSources)) {
|
|
4327
|
-
return throwError(() => new Error('SVG URL not from trusted source'));
|
|
4328
|
-
}
|
|
4329
|
-
const cache = this._cache.get(url);
|
|
4330
|
-
if (!cache) {
|
|
4331
|
-
const svg$ = this._http.get(url, { responseType: 'text' }).pipe(map(svg => this._sanitizeSvg(svg)), shareReplay(1));
|
|
4332
|
-
this._cache.set(url, svg$);
|
|
4333
|
-
return svg$;
|
|
4334
|
-
}
|
|
4335
|
-
return cache;
|
|
4336
|
-
}
|
|
4337
|
-
// Private methods
|
|
4338
|
-
_isUrlAllowed(url, allowedSource) {
|
|
4339
|
-
return allowedSource.some(source => url.startsWith(source));
|
|
4340
|
-
}
|
|
4341
|
-
_sanitizeSvg(svg) {
|
|
4342
|
-
const safeSvg = this._makeSafe(svg);
|
|
4343
|
-
return this._sanitizer.bypassSecurityTrustHtml(safeSvg);
|
|
4344
|
-
}
|
|
4345
|
-
_makeSafe(svg) {
|
|
4346
|
-
return (svg
|
|
4347
|
-
// Remove script tags
|
|
4348
|
-
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
|
|
4349
|
-
// Remove event handlers (onclick, onload, onmouseover, etc.)
|
|
4350
|
-
.replace(/on\w+\s*=\s*["'][^"']*["']/gi, '')
|
|
4351
|
-
// Remove external xlink:href (keep internal references starting with #)
|
|
4352
|
-
.replace(/xlink:href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
4353
|
-
// Remove external href in <use>, <image>, <a> tags (keep internal #refs)
|
|
4354
|
-
.replace(/href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
4355
|
-
// Remove data URIs with HTML content
|
|
4356
|
-
.replace(/href\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
4357
|
-
.replace(/src\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
4358
|
-
// Remove javascript: protocol
|
|
4359
|
-
.replace(/javascript:/gi, '')
|
|
4360
|
-
// Remove import statements in style
|
|
4361
|
-
.replace(/@import/gi, ''));
|
|
4362
|
-
}
|
|
4363
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4364
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
4365
|
-
}
|
|
4366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconService, decorators: [{
|
|
4367
|
-
type: Injectable,
|
|
4368
|
-
args: [{ providedIn: 'root' }]
|
|
4369
|
-
}] });
|
|
4370
|
-
|
|
4371
|
-
const DEFAULT_ICON_CONFIG = {
|
|
4372
|
-
allowedSources: [],
|
|
4620
|
+
const DEFAULT_IMAGE_COMPARE_CONFIG = {
|
|
4621
|
+
orientation: 'horizontal',
|
|
4622
|
+
position: 50,
|
|
4623
|
+
keyboardStep: 5,
|
|
4373
4624
|
};
|
|
4374
4625
|
|
|
4375
|
-
const
|
|
4376
|
-
factory: () =>
|
|
4626
|
+
const IMAGE_COMPARE_CONFIG = new InjectionToken('IMAGE_COMPARE_CONFIG', {
|
|
4627
|
+
factory: () => DEFAULT_IMAGE_COMPARE_CONFIG,
|
|
4377
4628
|
});
|
|
4378
4629
|
|
|
4379
|
-
class
|
|
4630
|
+
class ImageCompare {
|
|
4380
4631
|
// Injections
|
|
4381
|
-
|
|
4382
|
-
|
|
4632
|
+
_config = inject(IMAGE_COMPARE_CONFIG);
|
|
4633
|
+
_elementRef = inject(ElementRef);
|
|
4634
|
+
_directionality = inject(Directionality);
|
|
4383
4635
|
// Inputs
|
|
4384
|
-
|
|
4385
|
-
...(ngDevMode ? [{ debugName: "
|
|
4386
|
-
|
|
4387
|
-
...(ngDevMode ? [{ debugName: "
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4636
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
4637
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
4638
|
+
keyboardStep = input(this._config.keyboardStep, /* @ts-ignore */
|
|
4639
|
+
...(ngDevMode ? [{ debugName: "keyboardStep" }] : /* istanbul ignore next */ []));
|
|
4640
|
+
/**
|
|
4641
|
+
* Divider position as a percentage (0–100) from the layout-start edge. Two-way
|
|
4642
|
+
* bound so consumers can drive or persist it while interaction updates it.
|
|
4643
|
+
*/
|
|
4644
|
+
position = model(this._config.position, /* @ts-ignore */
|
|
4645
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
4646
|
+
/** Accessible name for the divider slider. */
|
|
4647
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
4648
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4649
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
4650
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
4651
|
+
// State
|
|
4652
|
+
_handle = viewChild.required('handle');
|
|
4653
|
+
_dragging = signal(false, /* @ts-ignore */
|
|
4654
|
+
...(ngDevMode ? [{ debugName: "_dragging" }] : /* istanbul ignore next */ []));
|
|
4655
|
+
// Computed
|
|
4656
|
+
isHorizontal = computed(() => this.orientation() === 'horizontal', /* @ts-ignore */
|
|
4657
|
+
...(ngDevMode ? [{ debugName: "isHorizontal" }] : /* istanbul ignore next */ []));
|
|
4658
|
+
clampedPosition = computed(() => Math.min(100, Math.max(0, this.position())), /* @ts-ignore */
|
|
4659
|
+
...(ngDevMode ? [{ debugName: "clampedPosition" }] : /* istanbul ignore next */ []));
|
|
4660
|
+
valueNow = computed(() => Math.round(this.clampedPosition()), /* @ts-ignore */
|
|
4661
|
+
...(ngDevMode ? [{ debugName: "valueNow" }] : /* istanbul ignore next */ []));
|
|
4662
|
+
hostClasses = computed(() => {
|
|
4663
|
+
const className = 'tls-image-compare';
|
|
4664
|
+
const array = [className];
|
|
4665
|
+
array.push(`${className}--${this.orientation()}`);
|
|
4666
|
+
if (this._dragging())
|
|
4667
|
+
array.push(`${className}--dragging`);
|
|
4668
|
+
return array;
|
|
4392
4669
|
}, /* @ts-ignore */
|
|
4393
|
-
...(ngDevMode ? [{ debugName: "
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4670
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4671
|
+
// Clip the leading (before) layer to a band running from the layout-start edge
|
|
4672
|
+
// to the divider. `clip-path` is physical, so resolve the inset per axis — and
|
|
4673
|
+
// for RTL — explicitly, since logical properties cannot express it.
|
|
4674
|
+
clipPath = computed(() => {
|
|
4675
|
+
const remainder = 100 - this.clampedPosition();
|
|
4676
|
+
if (!this.isHorizontal())
|
|
4677
|
+
return `inset(0 0 ${remainder}% 0)`;
|
|
4678
|
+
return this._isRtl() ? `inset(0 0 0 ${remainder}%)` : `inset(0 ${remainder}% 0 0)`;
|
|
4679
|
+
}, /* @ts-ignore */
|
|
4680
|
+
...(ngDevMode ? [{ debugName: "clipPath" }] : /* istanbul ignore next */ []));
|
|
4681
|
+
// Protected methods
|
|
4682
|
+
onPointerDown(event) {
|
|
4683
|
+
// Ignore non-primary mouse buttons; touch/pen report button 0.
|
|
4684
|
+
if (event.pointerType === 'mouse' && event.button !== 0)
|
|
4685
|
+
return;
|
|
4686
|
+
event.preventDefault();
|
|
4687
|
+
// `preventDefault` suppresses the default focus, so focus the slider handle
|
|
4688
|
+
// explicitly — otherwise the arrow keys wouldn't work after a pointer drag.
|
|
4689
|
+
this._handle().nativeElement.focus();
|
|
4690
|
+
this._dragging.set(true);
|
|
4691
|
+
this._elementRef.nativeElement.setPointerCapture(event.pointerId);
|
|
4692
|
+
this._updateFromPointer(event);
|
|
4693
|
+
}
|
|
4694
|
+
onPointerMove(event) {
|
|
4695
|
+
if (!this._dragging())
|
|
4696
|
+
return;
|
|
4697
|
+
this._updateFromPointer(event);
|
|
4405
4698
|
}
|
|
4406
|
-
|
|
4407
|
-
|
|
4699
|
+
onPointerUp(event) {
|
|
4700
|
+
if (!this._dragging())
|
|
4701
|
+
return;
|
|
4702
|
+
this._elementRef.nativeElement.releasePointerCapture(event.pointerId);
|
|
4703
|
+
this._dragging.set(false);
|
|
4704
|
+
}
|
|
4705
|
+
// Pointer capture is already released once the browser cancels the pointer, so
|
|
4706
|
+
// this only resets drag state (calling `releasePointerCapture` here can throw).
|
|
4707
|
+
onPointerCancel() {
|
|
4708
|
+
this._dragging.set(false);
|
|
4709
|
+
}
|
|
4710
|
+
onHandleKeydown(event) {
|
|
4711
|
+
const step = this.keyboardStep();
|
|
4712
|
+
const horizontal = this.isHorizontal();
|
|
4713
|
+
const rtl = this._isRtl();
|
|
4714
|
+
const current = this.clampedPosition();
|
|
4715
|
+
let desired;
|
|
4716
|
+
switch (event.key) {
|
|
4717
|
+
case 'ArrowLeft':
|
|
4718
|
+
if (!horizontal)
|
|
4719
|
+
return;
|
|
4720
|
+
desired = current + (rtl ? step : -step);
|
|
4721
|
+
break;
|
|
4722
|
+
case 'ArrowRight':
|
|
4723
|
+
if (!horizontal)
|
|
4724
|
+
return;
|
|
4725
|
+
desired = current + (rtl ? -step : step);
|
|
4726
|
+
break;
|
|
4727
|
+
case 'ArrowUp':
|
|
4728
|
+
if (horizontal)
|
|
4729
|
+
return;
|
|
4730
|
+
desired = current - step;
|
|
4731
|
+
break;
|
|
4732
|
+
case 'ArrowDown':
|
|
4733
|
+
if (horizontal)
|
|
4734
|
+
return;
|
|
4735
|
+
desired = current + step;
|
|
4736
|
+
break;
|
|
4737
|
+
case 'Home':
|
|
4738
|
+
desired = 0;
|
|
4739
|
+
break;
|
|
4740
|
+
case 'End':
|
|
4741
|
+
desired = 100;
|
|
4742
|
+
break;
|
|
4743
|
+
default:
|
|
4744
|
+
return;
|
|
4745
|
+
}
|
|
4746
|
+
event.preventDefault();
|
|
4747
|
+
this._setPosition(desired);
|
|
4748
|
+
}
|
|
4749
|
+
// Private methods
|
|
4750
|
+
_isRtl() {
|
|
4751
|
+
return this._directionality.value === 'rtl';
|
|
4752
|
+
}
|
|
4753
|
+
_updateFromPointer(event) {
|
|
4754
|
+
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
4755
|
+
let ratio;
|
|
4756
|
+
if (this.isHorizontal()) {
|
|
4757
|
+
if (rect.width <= 0)
|
|
4758
|
+
return;
|
|
4759
|
+
ratio = (event.clientX - rect.left) / rect.width;
|
|
4760
|
+
if (this._isRtl())
|
|
4761
|
+
ratio = 1 - ratio;
|
|
4762
|
+
}
|
|
4763
|
+
else {
|
|
4764
|
+
if (rect.height <= 0)
|
|
4765
|
+
return;
|
|
4766
|
+
ratio = (event.clientY - rect.top) / rect.height;
|
|
4767
|
+
}
|
|
4768
|
+
this._setPosition(ratio * 100);
|
|
4769
|
+
}
|
|
4770
|
+
_setPosition(value) {
|
|
4771
|
+
this.position.set(Math.min(100, Math.max(0, value)));
|
|
4772
|
+
}
|
|
4773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ImageCompare, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4774
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: ImageCompare, isStandalone: true, selector: "tls-image-compare", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, keyboardStep: { classPropertyName: "keyboardStep", publicName: "keyboardStep", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", 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: { position: "positionChange" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "onPointerUp($event)", "pointercancel": "onPointerCancel()" }, properties: { "class": "hostClasses()" } }, viewQueries: [{ propertyName: "_handle", first: true, predicate: ["handle"], descendants: true, isSignal: true }], ngImport: i0, 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" });
|
|
4408
4775
|
}
|
|
4409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type:
|
|
4776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ImageCompare, decorators: [{
|
|
4410
4777
|
type: Component,
|
|
4411
|
-
args: [{ selector: 'tls-
|
|
4412
|
-
|
|
4778
|
+
args: [{ selector: 'tls-image-compare', imports: [], host: {
|
|
4779
|
+
'[class]': 'hostClasses()',
|
|
4780
|
+
'(pointerdown)': 'onPointerDown($event)',
|
|
4781
|
+
'(pointermove)': 'onPointerMove($event)',
|
|
4782
|
+
'(pointerup)': 'onPointerUp($event)',
|
|
4783
|
+
'(pointercancel)': 'onPointerCancel()',
|
|
4784
|
+
}, 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" }]
|
|
4785
|
+
}], 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 }] }] } });
|
|
4413
4786
|
|
|
4414
4787
|
class MenuItemComponent {
|
|
4415
4788
|
key = input.required(/* @ts-ignore */
|
|
@@ -4527,7 +4900,7 @@ class Menu {
|
|
|
4527
4900
|
this.close();
|
|
4528
4901
|
}
|
|
4529
4902
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4530
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Menu, isStandalone: true, selector: "tls-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_customItems", predicate: MenuItemComponent, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }, { propertyName: "dividerTemplate", first: true, predicate: ["dividerTemplate"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["iconTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n animate.enter=\"tls-menu--enter\"\n animate.leave=\"tls-menu--leave\"\n [id]=\"id\"\n ngMenu\n tabindex=\"-1\"\n [softDisabled]=\"false\"\n (itemSelected)=\"onItemClick($event)\"\n (keydown.escape)=\"close()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else if (actionItem.link) {\n <a\n ngMenuItem\n [value]=\"actionItem\"\n [disabled]=\"actionItem.disabled ?? false\"\n class=\"tls-menu__item\"\n [routerLink]=\"actionItem.link\"\n [class.tls-menu__item--disabled]=\"actionItem.disabled ?? false\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </a>\n } @else {\n <button\n ngMenuItem\n [value]=\"actionItem\"\n [disabled]=\"actionItem.disabled ?? false\"\n class=\"tls-menu__item\"\n [attr.disabled]=\"actionItem.disabled ? '' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </button>\n }\n\n <ng-template #actionItemContent let-actionItem>\n @if (actionItem.icon) {\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem.icon, data: actionItem }\" />\n } @else {\n <tls-icon class=\"tls-menu__item-icon\" [iconSrc]=\"actionItem.icon\" />\n }\n }\n <span class=\"tls-menu__item-label\">{{ actionItem.label }}</span>\n @if (actionItem.shortcut) {\n <kbd class=\"tls-menu__item-shortcut\">{{ actionItem.shortcut }}</kbd>\n }\n </ng-template>\n }\n @case ('label') {\n @let labelItem = item;\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: labelItem }\" />\n } @else {\n <span class=\"tls-menu__label\" aria-hidden=\"true\">{{ labelItem.label }}</span>\n }\n }\n @case ('divider') {\n @if (dividerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <hr class=\"tls-menu__divider\" role=\"separator\" aria-hidden=\"true\" />\n }\n }\n @case ('custom') {\n @if (customTemplates().get(item.key); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n }\n }\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: Menu$1, selector: "[ngMenu]", inputs: ["id", "wrap", "typeaheadDelay", "disabled", "softDisabled", "expansionDelay"], outputs: ["itemSelected"], exportAs: ["ngMenu"] }, { kind: "directive", type: MenuItem, selector: "[ngMenuItem]", inputs: ["id", "value", "disabled", "searchTerm", "role", "submenu"], outputs: ["searchTermChange"], exportAs: ["ngMenuItem"] }] });
|
|
4903
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Menu, isStandalone: true, selector: "tls-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_customItems", predicate: MenuItemComponent, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }, { propertyName: "dividerTemplate", first: true, predicate: ["dividerTemplate"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["iconTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n animate.enter=\"tls-menu--enter\"\n animate.leave=\"tls-menu--leave\"\n [id]=\"id\"\n ngMenu\n tabindex=\"-1\"\n [softDisabled]=\"false\"\n (itemSelected)=\"onItemClick($event)\"\n (keydown.escape)=\"close()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else if (actionItem.link) {\n <a\n ngMenuItem\n [value]=\"actionItem\"\n [disabled]=\"actionItem.disabled ?? false\"\n class=\"tls-menu__item\"\n [routerLink]=\"actionItem.link\"\n [class.tls-menu__item--disabled]=\"actionItem.disabled ?? false\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </a>\n } @else {\n <button\n ngMenuItem\n [value]=\"actionItem\"\n [disabled]=\"actionItem.disabled ?? false\"\n class=\"tls-menu__item\"\n [attr.disabled]=\"actionItem.disabled ? '' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </button>\n }\n\n <ng-template #actionItemContent let-actionItem>\n @if (actionItem.icon) {\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem.icon, data: actionItem }\" />\n } @else {\n <tls-icon class=\"tls-menu__item-icon\" [iconSrc]=\"actionItem.icon\" />\n }\n }\n <span class=\"tls-menu__item-label\">{{ actionItem.label }}</span>\n @if (actionItem.shortcut) {\n <kbd class=\"tls-menu__item-shortcut\">{{ actionItem.shortcut }}</kbd>\n }\n </ng-template>\n }\n @case ('label') {\n @let labelItem = item;\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: labelItem }\" />\n } @else {\n <span class=\"tls-menu__label\" aria-hidden=\"true\">{{ labelItem.label }}</span>\n }\n }\n @case ('divider') {\n @if (dividerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <hr class=\"tls-menu__divider\" role=\"separator\" aria-hidden=\"true\" />\n }\n }\n @case ('custom') {\n @if (customTemplates().get(item.key); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n }\n }\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: Menu$1, selector: "[ngMenu]", inputs: ["id", "wrap", "typeaheadDelay", "disabled", "softDisabled", "expansionDelay"], outputs: ["itemSelected"], exportAs: ["ngMenu"] }, { kind: "directive", type: MenuItem, selector: "[ngMenuItem]", inputs: ["id", "value", "disabled", "searchTerm", "role", "submenu"], outputs: ["searchTermChange"], exportAs: ["ngMenuItem"] }] });
|
|
4531
4904
|
}
|
|
4532
4905
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, decorators: [{
|
|
4533
4906
|
type: Component,
|
|
@@ -4896,16 +5269,16 @@ class Pagination {
|
|
|
4896
5269
|
];
|
|
4897
5270
|
}
|
|
4898
5271
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Pagination, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4899
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Pagination, isStandalone: true, selector: "tls-pagination", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, boundaries: { classPropertyName: "boundaries", publicName: "boundaries", isSignal: true, isRequired: false, transformFunction: null }, siblings: { classPropertyName: "siblings", publicName: "siblings", isSignal: true, isRequired: false, transformFunction: null }, showFirstButton: { classPropertyName: "showFirstButton", publicName: "showFirstButton", isSignal: true, isRequired: false, transformFunction: null }, showLastButton: { classPropertyName: "showLastButton", publicName: "showLastButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "navigation" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "ariaLabelledby() ?? null" } }, ngImport: i0, template: "@if (showFirstButton()) {\n <button\n id=\"tls-pagination-first\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"firstPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <
|
|
5272
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Pagination, isStandalone: true, selector: "tls-pagination", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, boundaries: { classPropertyName: "boundaries", publicName: "boundaries", isSignal: true, isRequired: false, transformFunction: null }, siblings: { classPropertyName: "siblings", publicName: "siblings", isSignal: true, isRequired: false, transformFunction: null }, showFirstButton: { classPropertyName: "showFirstButton", publicName: "showFirstButton", isSignal: true, isRequired: false, transformFunction: null }, showLastButton: { classPropertyName: "showLastButton", publicName: "showLastButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "navigation" }, properties: { "class": "classes()", "attr.aria-label": "ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "ariaLabelledby() ?? null" } }, ngImport: i0, template: "@if (showFirstButton()) {\n <button\n id=\"tls-pagination-first\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"firstPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevrons-left\" aria-hidden=\"true\" />\n </span>\n </button>\n}\n\n<button\n id=\"tls-pagination-prev\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"prevPage()\"\n>\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </span>\n</button>\n\n<ul class=\"tls-pagination__list\">\n @for (item of visiblePages(); track $index) {\n <li class=\"tls-pagination__item\">\n @if (item === 'gap') {\n <span class=\"tls-pagination__gap\">...</span>\n } @else {\n <button\n class=\"tls-pagination__item-button\"\n [class.tls-pagination__item-button--active]=\"value() === item\"\n (click)=\"setPage(item)\"\n >\n {{ item }}\n </button>\n }\n </li>\n }\n</ul>\n\n<button\n id=\"tls-pagination-next\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === pageCount()\"\n (click)=\"nextPage()\"\n>\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </span>\n</button>\n\n@if (showLastButton()) {\n <button\n id=\"tls-pagination-last\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === pageCount()\"\n (click)=\"lastPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevrons-right\" aria-hidden=\"true\" />\n </span>\n </button>\n}\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
4900
5273
|
}
|
|
4901
5274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Pagination, decorators: [{
|
|
4902
5275
|
type: Component,
|
|
4903
|
-
args: [{ selector: 'tls-pagination', host: {
|
|
5276
|
+
args: [{ selector: 'tls-pagination', imports: [Icon], host: {
|
|
4904
5277
|
role: 'navigation',
|
|
4905
5278
|
'[class]': 'classes()',
|
|
4906
5279
|
'[attr.aria-label]': 'ariaLabelledby() ? null : ariaLabel()',
|
|
4907
5280
|
'[attr.aria-labelledby]': 'ariaLabelledby() ?? null',
|
|
4908
|
-
}, template: "@if (showFirstButton()) {\n <button\n id=\"tls-pagination-first\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"firstPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <
|
|
5281
|
+
}, template: "@if (showFirstButton()) {\n <button\n id=\"tls-pagination-first\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"firstPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevrons-left\" aria-hidden=\"true\" />\n </span>\n </button>\n}\n\n<button\n id=\"tls-pagination-prev\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === 1\"\n (click)=\"prevPage()\"\n>\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </span>\n</button>\n\n<ul class=\"tls-pagination__list\">\n @for (item of visiblePages(); track $index) {\n <li class=\"tls-pagination__item\">\n @if (item === 'gap') {\n <span class=\"tls-pagination__gap\">...</span>\n } @else {\n <button\n class=\"tls-pagination__item-button\"\n [class.tls-pagination__item-button--active]=\"value() === item\"\n (click)=\"setPage(item)\"\n >\n {{ item }}\n </button>\n }\n </li>\n }\n</ul>\n\n<button\n id=\"tls-pagination-next\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === pageCount()\"\n (click)=\"nextPage()\"\n>\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </span>\n</button>\n\n@if (showLastButton()) {\n <button\n id=\"tls-pagination-last\"\n class=\"tls-pagination__button\"\n [disabled]=\"value() === pageCount()\"\n (click)=\"lastPage()\"\n >\n <span class=\"tls-pagination__button-icon\">\n <tls-icon name=\"chevrons-right\" aria-hidden=\"true\" />\n </span>\n </button>\n}\n" }]
|
|
4909
5282
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], boundaries: [{ type: i0.Input, args: [{ isSignal: true, alias: "boundaries", required: false }] }], siblings: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblings", required: false }] }], showFirstButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstButton", required: false }] }], showLastButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLastButton", required: false }] }] } });
|
|
4910
5283
|
|
|
4911
5284
|
const DEFAULT_PAGINATION_QUERY_SYNC_CONFIG = {
|
|
@@ -4918,8 +5291,9 @@ class PaginationQuerySyncDirective extends QuerySyncDirective {
|
|
|
4918
5291
|
_pagination = inject(Pagination);
|
|
4919
5292
|
_config = inject(PAGINATION_QUERY_SYNC_CONFIG);
|
|
4920
5293
|
// Inputs
|
|
4921
|
-
|
|
4922
|
-
|
|
5294
|
+
// The selector doubles as the input, so a valueless `tlsPaginationQuerySync` binds `''`.
|
|
5295
|
+
// Coerce an empty value back to the configured default param key.
|
|
5296
|
+
tlsPaginationQuerySync = input(this._config.paramKey, { ...(ngDevMode ? { debugName: "tlsPaginationQuerySync" } : /* istanbul ignore next */ {}), transform: (value) => value || this._config.paramKey });
|
|
4923
5297
|
constructor() {
|
|
4924
5298
|
super();
|
|
4925
5299
|
effect(() => {
|
|
@@ -5022,6 +5396,390 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
5022
5396
|
}]
|
|
5023
5397
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }] } });
|
|
5024
5398
|
|
|
5399
|
+
/** Overshoot past a collapsible panel's `min` (in %) that snaps it shut mid-resize. */
|
|
5400
|
+
const COLLAPSE_SNAP_OVERSHOOT = 5;
|
|
5401
|
+
|
|
5402
|
+
const DEFAULT_SPLITTER_CONFIG = {
|
|
5403
|
+
orientation: 'horizontal',
|
|
5404
|
+
keyboardStep: 5,
|
|
5405
|
+
};
|
|
5406
|
+
|
|
5407
|
+
const SPLITTER_CONFIG = new InjectionToken('SPLITTER_CONFIG', {
|
|
5408
|
+
factory: () => DEFAULT_SPLITTER_CONFIG,
|
|
5409
|
+
});
|
|
5410
|
+
|
|
5411
|
+
let nextPanelId = 0;
|
|
5412
|
+
class SplitterPanel {
|
|
5413
|
+
// Injections
|
|
5414
|
+
_elementRef = inject(ElementRef);
|
|
5415
|
+
// State
|
|
5416
|
+
id = `tls-splitter-panel-${nextPanelId++}`;
|
|
5417
|
+
// Inputs
|
|
5418
|
+
/**
|
|
5419
|
+
* Current size of the panel as a percentage of the splitter. Two-way bound so
|
|
5420
|
+
* the owning splitter can update it during a resize and consumers can persist
|
|
5421
|
+
* the resulting layout. `null` requests an auto share of the remaining space.
|
|
5422
|
+
*/
|
|
5423
|
+
size = model(null, /* @ts-ignore */
|
|
5424
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5425
|
+
min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
5426
|
+
max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
5427
|
+
collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5428
|
+
collapsed = model(false, /* @ts-ignore */
|
|
5429
|
+
...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
5430
|
+
// Computed
|
|
5431
|
+
resolvedSize = computed(() => this.size() ?? 0, /* @ts-ignore */
|
|
5432
|
+
...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
5433
|
+
hostClasses = computed(() => {
|
|
5434
|
+
const className = 'tls-splitter-panel';
|
|
5435
|
+
const array = [className];
|
|
5436
|
+
if (this.collapsed())
|
|
5437
|
+
array.push(`${className}--collapsed`);
|
|
5438
|
+
return array;
|
|
5439
|
+
}, /* @ts-ignore */
|
|
5440
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
5441
|
+
// Accessors
|
|
5442
|
+
get element() {
|
|
5443
|
+
return this._elementRef.nativeElement;
|
|
5444
|
+
}
|
|
5445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SplitterPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5446
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: SplitterPanel, isStandalone: true, selector: "tls-splitter-panel", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange", collapsed: "collapsedChange" }, host: { properties: { "class": "hostClasses()", "id": "id", "style.flex-grow": "resolvedSize()", "style.flex-basis.%": "0", "style.flex-shrink": "1" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
5447
|
+
}
|
|
5448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SplitterPanel, decorators: [{
|
|
5449
|
+
type: Component,
|
|
5450
|
+
args: [{
|
|
5451
|
+
selector: 'tls-splitter-panel',
|
|
5452
|
+
imports: [],
|
|
5453
|
+
template: '<ng-content></ng-content>',
|
|
5454
|
+
host: {
|
|
5455
|
+
'[class]': 'hostClasses()',
|
|
5456
|
+
'[id]': 'id',
|
|
5457
|
+
// Panels are weighted flex items: `size` acts as the grow weight while
|
|
5458
|
+
// `flex-basis: 0` lets the weights fully partition the container.
|
|
5459
|
+
'[style.flex-grow]': 'resolvedSize()',
|
|
5460
|
+
'[style.flex-basis.%]': '0',
|
|
5461
|
+
'[style.flex-shrink]': '1',
|
|
5462
|
+
},
|
|
5463
|
+
}]
|
|
5464
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }] } });
|
|
5465
|
+
|
|
5466
|
+
class Splitter {
|
|
5467
|
+
// Injections
|
|
5468
|
+
_config = inject(SPLITTER_CONFIG);
|
|
5469
|
+
_elementRef = inject(ElementRef);
|
|
5470
|
+
_directionality = inject(Directionality);
|
|
5471
|
+
// Inputs
|
|
5472
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
5473
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
5474
|
+
keyboardStep = input(this._config.keyboardStep, /* @ts-ignore */
|
|
5475
|
+
...(ngDevMode ? [{ debugName: "keyboardStep" }] : /* istanbul ignore next */ []));
|
|
5476
|
+
/** Accessible name for the group of panels and their separators. */
|
|
5477
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
5478
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
5479
|
+
ariaLabelledby = input(undefined, /* @ts-ignore */
|
|
5480
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
5481
|
+
// State
|
|
5482
|
+
// `descendants: false` scopes the query to this splitter's own panels; without
|
|
5483
|
+
// it a nested `tls-splitter`'s panels would be counted here too.
|
|
5484
|
+
panels = contentChildren(SplitterPanel, { ...(ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {}), descendants: false });
|
|
5485
|
+
_activeSeam = signal(null, /* @ts-ignore */
|
|
5486
|
+
...(ngDevMode ? [{ debugName: "_activeSeam" }] : /* istanbul ignore next */ []));
|
|
5487
|
+
// Transient drag bookkeeping, captured on pointer down.
|
|
5488
|
+
_dragContainerSize = 0;
|
|
5489
|
+
_dragStartCoordinate = 0;
|
|
5490
|
+
_dragStartSize = 0;
|
|
5491
|
+
// Restore sizes for collapsed panels, keyed by the panel that owns them.
|
|
5492
|
+
_collapsedSizes = new WeakMap();
|
|
5493
|
+
_collapsedFlags = new WeakMap();
|
|
5494
|
+
// Computed
|
|
5495
|
+
isHorizontal = computed(() => this.orientation() === 'horizontal', /* @ts-ignore */
|
|
5496
|
+
...(ngDevMode ? [{ debugName: "isHorizontal" }] : /* istanbul ignore next */ []));
|
|
5497
|
+
ariaOrientation = computed(() => this.isHorizontal() ? 'vertical' : 'horizontal', /* @ts-ignore */
|
|
5498
|
+
...(ngDevMode ? [{ debugName: "ariaOrientation" }] : /* istanbul ignore next */ []));
|
|
5499
|
+
hostClasses = computed(() => {
|
|
5500
|
+
const className = 'tls-splitter';
|
|
5501
|
+
const array = [className];
|
|
5502
|
+
array.push(`${className}--${this.orientation()}`);
|
|
5503
|
+
if (this._activeSeam() !== null)
|
|
5504
|
+
array.push(`${className}--resizing`);
|
|
5505
|
+
return array;
|
|
5506
|
+
}, /* @ts-ignore */
|
|
5507
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
5508
|
+
seams = computed(() => {
|
|
5509
|
+
const panels = this.panels();
|
|
5510
|
+
if (panels.length < 2)
|
|
5511
|
+
return [];
|
|
5512
|
+
const sizes = panels.map(panel => panel.size() ?? 0);
|
|
5513
|
+
const total = sizes.reduce((sum, size) => sum + size, 0);
|
|
5514
|
+
if (total <= 0)
|
|
5515
|
+
return [];
|
|
5516
|
+
const seams = [];
|
|
5517
|
+
let cumulative = 0;
|
|
5518
|
+
for (let index = 0; index < panels.length - 1; index++) {
|
|
5519
|
+
const leading = panels[index];
|
|
5520
|
+
const trailing = panels[index + 1];
|
|
5521
|
+
const pairSum = sizes[index] + sizes[index + 1];
|
|
5522
|
+
// Bound the reported range by the whole pair, not just the leading
|
|
5523
|
+
// panel's own min/max, so it matches what a resize can actually reach.
|
|
5524
|
+
const valueMin = Math.round((this._lowerBound(leading, trailing, pairSum) / total) * 100);
|
|
5525
|
+
const valueMax = Math.round((this._upperBound(leading, trailing, pairSum) / total) * 100);
|
|
5526
|
+
const valueNow = Math.min(Math.max(Math.round((sizes[index] / total) * 100), valueMin), valueMax);
|
|
5527
|
+
cumulative += sizes[index];
|
|
5528
|
+
seams.push({
|
|
5529
|
+
index,
|
|
5530
|
+
position: (cumulative / total) * 100,
|
|
5531
|
+
valueNow,
|
|
5532
|
+
valueMin,
|
|
5533
|
+
valueMax,
|
|
5534
|
+
controls: `${leading.id} ${trailing.id}`,
|
|
5535
|
+
});
|
|
5536
|
+
}
|
|
5537
|
+
return seams;
|
|
5538
|
+
}, /* @ts-ignore */
|
|
5539
|
+
...(ngDevMode ? [{ debugName: "seams" }] : /* istanbul ignore next */ []));
|
|
5540
|
+
constructor() {
|
|
5541
|
+
// Resolve `null` panel sizes into an equal share of the remaining space,
|
|
5542
|
+
// then normalize the whole set to sum to 100%.
|
|
5543
|
+
effect(() => this._initializeSizes());
|
|
5544
|
+
// Reflect each panel's `collapsed` model into a size of 0, restoring the
|
|
5545
|
+
// previous size (from its neighbour) when it expands again.
|
|
5546
|
+
effect(() => this._syncCollapsedPanels());
|
|
5547
|
+
}
|
|
5548
|
+
// Protected methods
|
|
5549
|
+
onGutterPointerDown(seamIndex, event) {
|
|
5550
|
+
const panels = this.panels();
|
|
5551
|
+
const leading = panels[seamIndex];
|
|
5552
|
+
const trailing = panels[seamIndex + 1];
|
|
5553
|
+
if (!leading || !trailing)
|
|
5554
|
+
return;
|
|
5555
|
+
event.preventDefault();
|
|
5556
|
+
// `preventDefault` suppresses the default focus, so focus the gutter
|
|
5557
|
+
// explicitly — otherwise the arrow keys wouldn't work after a pointer drag.
|
|
5558
|
+
const gutter = event.target;
|
|
5559
|
+
gutter.focus();
|
|
5560
|
+
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
5561
|
+
this._dragContainerSize = this.isHorizontal() ? rect.width : rect.height;
|
|
5562
|
+
this._dragStartCoordinate = this.isHorizontal() ? event.clientX : event.clientY;
|
|
5563
|
+
this._dragStartSize = leading.size() ?? 0;
|
|
5564
|
+
this._activeSeam.set(seamIndex);
|
|
5565
|
+
gutter.setPointerCapture(event.pointerId);
|
|
5566
|
+
}
|
|
5567
|
+
onGutterPointerMove(seamIndex, event) {
|
|
5568
|
+
if (this._activeSeam() !== seamIndex)
|
|
5569
|
+
return;
|
|
5570
|
+
if (this._dragContainerSize <= 0)
|
|
5571
|
+
return;
|
|
5572
|
+
const coordinate = this.isHorizontal() ? event.clientX : event.clientY;
|
|
5573
|
+
let deltaPixels = coordinate - this._dragStartCoordinate;
|
|
5574
|
+
if (this.isHorizontal() && this._isRtl())
|
|
5575
|
+
deltaPixels = -deltaPixels;
|
|
5576
|
+
const deltaPercent = (deltaPixels / this._dragContainerSize) * 100;
|
|
5577
|
+
this._applySeamSize(seamIndex, this._dragStartSize + deltaPercent);
|
|
5578
|
+
}
|
|
5579
|
+
onGutterPointerUp(seamIndex, event) {
|
|
5580
|
+
if (this._activeSeam() !== seamIndex)
|
|
5581
|
+
return;
|
|
5582
|
+
event.target.releasePointerCapture(event.pointerId);
|
|
5583
|
+
this._activeSeam.set(null);
|
|
5584
|
+
}
|
|
5585
|
+
// Pointer capture is already released once the browser cancels the pointer, so
|
|
5586
|
+
// this only resets drag state (calling `releasePointerCapture` here can throw).
|
|
5587
|
+
onGutterPointerCancel(seamIndex) {
|
|
5588
|
+
if (this._activeSeam() !== seamIndex)
|
|
5589
|
+
return;
|
|
5590
|
+
this._activeSeam.set(null);
|
|
5591
|
+
}
|
|
5592
|
+
onGutterKeydown(seamIndex, event) {
|
|
5593
|
+
const panels = this.panels();
|
|
5594
|
+
const leading = panels[seamIndex];
|
|
5595
|
+
const trailing = panels[seamIndex + 1];
|
|
5596
|
+
if (!leading || !trailing)
|
|
5597
|
+
return;
|
|
5598
|
+
const step = this.keyboardStep();
|
|
5599
|
+
const horizontal = this.isHorizontal();
|
|
5600
|
+
const rtl = this._isRtl();
|
|
5601
|
+
const pairSum = (leading.size() ?? 0) + (trailing.size() ?? 0);
|
|
5602
|
+
const current = leading.size() ?? 0;
|
|
5603
|
+
let desired;
|
|
5604
|
+
switch (event.key) {
|
|
5605
|
+
case 'ArrowLeft':
|
|
5606
|
+
if (!horizontal)
|
|
5607
|
+
return;
|
|
5608
|
+
desired = current + (rtl ? step : -step);
|
|
5609
|
+
break;
|
|
5610
|
+
case 'ArrowRight':
|
|
5611
|
+
if (!horizontal)
|
|
5612
|
+
return;
|
|
5613
|
+
desired = current + (rtl ? -step : step);
|
|
5614
|
+
break;
|
|
5615
|
+
case 'ArrowUp':
|
|
5616
|
+
if (horizontal)
|
|
5617
|
+
return;
|
|
5618
|
+
desired = current - step;
|
|
5619
|
+
break;
|
|
5620
|
+
case 'ArrowDown':
|
|
5621
|
+
if (horizontal)
|
|
5622
|
+
return;
|
|
5623
|
+
desired = current + step;
|
|
5624
|
+
break;
|
|
5625
|
+
case 'Home':
|
|
5626
|
+
desired = this._lowerBound(leading, trailing, pairSum);
|
|
5627
|
+
break;
|
|
5628
|
+
case 'End':
|
|
5629
|
+
desired = this._upperBound(leading, trailing, pairSum);
|
|
5630
|
+
break;
|
|
5631
|
+
default:
|
|
5632
|
+
return;
|
|
5633
|
+
}
|
|
5634
|
+
event.preventDefault();
|
|
5635
|
+
// Keyboard steps are discrete, so collapse/expand can't rely on the pointer
|
|
5636
|
+
// path's overshoot. Resolve it explicitly from the key's direction instead.
|
|
5637
|
+
const shrinkLeading = desired < current;
|
|
5638
|
+
const growLeading = desired > current;
|
|
5639
|
+
if (leading.collapsed() && growLeading)
|
|
5640
|
+
return this._expand(leading, trailing);
|
|
5641
|
+
if (trailing.collapsed() && shrinkLeading)
|
|
5642
|
+
return this._expand(trailing, leading);
|
|
5643
|
+
// Pushing a panel that already sits at its min further shut collapses it.
|
|
5644
|
+
if (leading.collapsible() && shrinkLeading && (leading.size() ?? 0) <= leading.min()) {
|
|
5645
|
+
return this._collapse(leading, trailing, pairSum);
|
|
5646
|
+
}
|
|
5647
|
+
if (trailing.collapsible() && growLeading && (trailing.size() ?? 0) <= trailing.min()) {
|
|
5648
|
+
return this._collapse(trailing, leading, pairSum);
|
|
5649
|
+
}
|
|
5650
|
+
this._applySeamSize(seamIndex, desired);
|
|
5651
|
+
}
|
|
5652
|
+
// Private methods
|
|
5653
|
+
_isRtl() {
|
|
5654
|
+
return this._directionality.value === 'rtl';
|
|
5655
|
+
}
|
|
5656
|
+
_lowerBound(leading, trailing, pairSum) {
|
|
5657
|
+
return Math.max(leading.min(), pairSum - trailing.max());
|
|
5658
|
+
}
|
|
5659
|
+
_upperBound(leading, trailing, pairSum) {
|
|
5660
|
+
return Math.min(leading.max(), pairSum - trailing.min());
|
|
5661
|
+
}
|
|
5662
|
+
// Sets the leading panel to `desiredSize`, clamped so both panels honour their
|
|
5663
|
+
// min/max, and gives the remainder of the pair to the trailing panel. A
|
|
5664
|
+
// `collapsible` panel dragged past its `min` snaps shut instead of clamping.
|
|
5665
|
+
_applySeamSize(seamIndex, desiredSize) {
|
|
5666
|
+
const panels = this.panels();
|
|
5667
|
+
const leading = panels[seamIndex];
|
|
5668
|
+
const trailing = panels[seamIndex + 1];
|
|
5669
|
+
if (!leading || !trailing)
|
|
5670
|
+
return;
|
|
5671
|
+
const pairSum = (leading.size() ?? 0) + (trailing.size() ?? 0);
|
|
5672
|
+
if (leading.collapsible() && desiredSize < leading.min() - COLLAPSE_SNAP_OVERSHOOT) {
|
|
5673
|
+
this._collapse(leading, trailing, pairSum);
|
|
5674
|
+
return;
|
|
5675
|
+
}
|
|
5676
|
+
if (trailing.collapsible() && pairSum - desiredSize < trailing.min() - COLLAPSE_SNAP_OVERSHOOT) {
|
|
5677
|
+
this._collapse(trailing, leading, pairSum);
|
|
5678
|
+
return;
|
|
5679
|
+
}
|
|
5680
|
+
const lower = this._lowerBound(leading, trailing, pairSum);
|
|
5681
|
+
const upper = this._upperBound(leading, trailing, pairSum);
|
|
5682
|
+
if (lower > upper)
|
|
5683
|
+
return;
|
|
5684
|
+
const leadingSize = Math.min(Math.max(desiredSize, lower), upper);
|
|
5685
|
+
// A valid resize sits both panels at or above their min, so neither stays
|
|
5686
|
+
// collapsed — clear any collapsed state the pair still carries.
|
|
5687
|
+
this._setCollapsedState(leading, false);
|
|
5688
|
+
this._setCollapsedState(trailing, false);
|
|
5689
|
+
leading.size.set(leadingSize);
|
|
5690
|
+
trailing.size.set(pairSum - leadingSize);
|
|
5691
|
+
}
|
|
5692
|
+
// Collapses `panel` to zero, handing its space to `neighbour`. Expanding again
|
|
5693
|
+
// restores the panel to its `min`.
|
|
5694
|
+
_collapse(panel, neighbour, pairSum) {
|
|
5695
|
+
this._collapsedSizes.set(panel, panel.min());
|
|
5696
|
+
this._setCollapsedState(panel, true);
|
|
5697
|
+
this._setCollapsedState(neighbour, false);
|
|
5698
|
+
panel.size.set(0);
|
|
5699
|
+
neighbour.size.set(pairSum);
|
|
5700
|
+
}
|
|
5701
|
+
// Expands a collapsed `panel` back to its restore size, taking the space from
|
|
5702
|
+
// `neighbour`. Bounded by whatever the neighbour can actually give up.
|
|
5703
|
+
_expand(panel, neighbour) {
|
|
5704
|
+
const pairSum = (panel.size() ?? 0) + (neighbour.size() ?? 0);
|
|
5705
|
+
const restore = Math.min(this._collapsedSizes.get(panel) ?? panel.min(), pairSum);
|
|
5706
|
+
this._setCollapsedState(panel, false);
|
|
5707
|
+
panel.size.set(restore);
|
|
5708
|
+
neighbour.size.set(pairSum - restore);
|
|
5709
|
+
}
|
|
5710
|
+
// Updates a panel's `collapsed` model from an interactive resize. Pre-syncing
|
|
5711
|
+
// the flag keeps `_syncCollapsedPanels` from re-running its own size handling.
|
|
5712
|
+
_setCollapsedState(panel, collapsed) {
|
|
5713
|
+
if (panel.collapsed() === collapsed)
|
|
5714
|
+
return;
|
|
5715
|
+
this._collapsedFlags.set(panel, collapsed);
|
|
5716
|
+
panel.collapsed.set(collapsed);
|
|
5717
|
+
}
|
|
5718
|
+
_initializeSizes() {
|
|
5719
|
+
const panels = this.panels();
|
|
5720
|
+
if (panels.length === 0)
|
|
5721
|
+
return;
|
|
5722
|
+
const sizes = panels.map(panel => panel.size());
|
|
5723
|
+
const providedTotal = sizes.reduce((sum, size) => sum + (size ?? 0), 0);
|
|
5724
|
+
const autoCount = sizes.filter(size => size === null).length;
|
|
5725
|
+
// Fully specified and already summing to 100% — nothing to resolve.
|
|
5726
|
+
if (autoCount === 0 && Math.round(providedTotal) === 100)
|
|
5727
|
+
return;
|
|
5728
|
+
untracked(() => {
|
|
5729
|
+
const remaining = Math.max(0, 100 - providedTotal);
|
|
5730
|
+
const autoShare = autoCount > 0 ? remaining / autoCount : 0;
|
|
5731
|
+
let resolved = sizes.map(size => (size === null ? autoShare : size));
|
|
5732
|
+
// Providing sizes that already exceed 100% scales the whole set down.
|
|
5733
|
+
const total = resolved.reduce((sum, size) => sum + size, 0);
|
|
5734
|
+
if (total > 0 && total !== 100)
|
|
5735
|
+
resolved = resolved.map(size => (size / total) * 100);
|
|
5736
|
+
panels.forEach((panel, index) => panel.size.set(resolved[index]));
|
|
5737
|
+
});
|
|
5738
|
+
}
|
|
5739
|
+
_syncCollapsedPanels() {
|
|
5740
|
+
const panels = this.panels();
|
|
5741
|
+
for (const panel of panels) {
|
|
5742
|
+
const collapsed = panel.collapsed();
|
|
5743
|
+
const previous = this._collapsedFlags.get(panel) ?? false;
|
|
5744
|
+
if (collapsed === previous)
|
|
5745
|
+
continue;
|
|
5746
|
+
this._collapsedFlags.set(panel, collapsed);
|
|
5747
|
+
untracked(() => this._toggleCollapse(panel, collapsed));
|
|
5748
|
+
}
|
|
5749
|
+
}
|
|
5750
|
+
_toggleCollapse(panel, collapsed) {
|
|
5751
|
+
const panels = this.panels();
|
|
5752
|
+
const index = panels.indexOf(panel);
|
|
5753
|
+
const neighbour = panels[index + 1] ?? panels[index - 1];
|
|
5754
|
+
if (!neighbour)
|
|
5755
|
+
return;
|
|
5756
|
+
if (collapsed) {
|
|
5757
|
+
const size = panel.size() ?? 0;
|
|
5758
|
+
this._collapsedSizes.set(panel, size);
|
|
5759
|
+
panel.size.set(0);
|
|
5760
|
+
neighbour.size.set((neighbour.size() ?? 0) + size);
|
|
5761
|
+
return;
|
|
5762
|
+
}
|
|
5763
|
+
const restore = this._collapsedSizes.get(panel) ?? 0;
|
|
5764
|
+
const available = Math.min(restore, neighbour.size() ?? 0);
|
|
5765
|
+
panel.size.set(available);
|
|
5766
|
+
neighbour.size.set((neighbour.size() ?? 0) - available);
|
|
5767
|
+
}
|
|
5768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Splitter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Splitter, isStandalone: true, selector: "tls-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, keyboardStep: { classPropertyName: "keyboardStep", publicName: "keyboardStep", 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 } }, host: { attributes: { "role": "group" }, properties: { "class": "hostClasses()", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "ariaLabelledby() ?? null" } }, queries: [{ propertyName: "panels", predicate: SplitterPanel, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n@for (seam of seams(); track seam.index) {\n <div\n class=\"tls-splitter-gutter\"\n role=\"separator\"\n tabindex=\"0\"\n [attr.aria-orientation]=\"ariaOrientation()\"\n [attr.aria-valuenow]=\"seam.valueNow\"\n [attr.aria-valuemin]=\"seam.valueMin\"\n [attr.aria-valuemax]=\"seam.valueMax\"\n [attr.aria-controls]=\"seam.controls\"\n [style.inset-inline-start.%]=\"isHorizontal() ? seam.position : null\"\n [style.inset-block-start.%]=\"isHorizontal() ? null : seam.position\"\n (pointerdown)=\"onGutterPointerDown(seam.index, $event)\"\n (pointermove)=\"onGutterPointerMove(seam.index, $event)\"\n (pointerup)=\"onGutterPointerUp(seam.index, $event)\"\n (pointercancel)=\"onGutterPointerCancel(seam.index)\"\n (keydown)=\"onGutterKeydown(seam.index, $event)\"\n >\n <span class=\"tls-splitter-gutter__handle\" aria-hidden=\"true\"></span>\n </div>\n}\n" });
|
|
5770
|
+
}
|
|
5771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Splitter, decorators: [{
|
|
5772
|
+
type: Component,
|
|
5773
|
+
args: [{ selector: 'tls-splitter', imports: [], host: {
|
|
5774
|
+
'[class]': 'hostClasses()',
|
|
5775
|
+
role: 'group',
|
|
5776
|
+
'[attr.aria-label]': 'ariaLabel() ?? null',
|
|
5777
|
+
'[attr.aria-labelledby]': 'ariaLabelledby() ?? null',
|
|
5778
|
+
}, template: "<ng-content></ng-content>\n\n@for (seam of seams(); track seam.index) {\n <div\n class=\"tls-splitter-gutter\"\n role=\"separator\"\n tabindex=\"0\"\n [attr.aria-orientation]=\"ariaOrientation()\"\n [attr.aria-valuenow]=\"seam.valueNow\"\n [attr.aria-valuemin]=\"seam.valueMin\"\n [attr.aria-valuemax]=\"seam.valueMax\"\n [attr.aria-controls]=\"seam.controls\"\n [style.inset-inline-start.%]=\"isHorizontal() ? seam.position : null\"\n [style.inset-block-start.%]=\"isHorizontal() ? null : seam.position\"\n (pointerdown)=\"onGutterPointerDown(seam.index, $event)\"\n (pointermove)=\"onGutterPointerMove(seam.index, $event)\"\n (pointerup)=\"onGutterPointerUp(seam.index, $event)\"\n (pointercancel)=\"onGutterPointerCancel(seam.index)\"\n (keydown)=\"onGutterKeydown(seam.index, $event)\"\n >\n <span class=\"tls-splitter-gutter__handle\" aria-hidden=\"true\"></span>\n </div>\n}\n" }]
|
|
5779
|
+
}], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], keyboardStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardStep", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SplitterPanel), { ...{
|
|
5780
|
+
descendants: false,
|
|
5781
|
+
}, isSignal: true }] }] } });
|
|
5782
|
+
|
|
5025
5783
|
const DEFAULT_STEP_CONFIG = {
|
|
5026
5784
|
color: 'primary',
|
|
5027
5785
|
};
|
|
@@ -5364,8 +6122,9 @@ class TabsQuerySyncDirective extends QuerySyncDirective {
|
|
|
5364
6122
|
_tabs = inject(Tabs);
|
|
5365
6123
|
_config = inject(TABS_QUERY_SYNC_CONFIG);
|
|
5366
6124
|
// Inputs
|
|
5367
|
-
|
|
5368
|
-
|
|
6125
|
+
// The selector doubles as the input, so a valueless `tlsTabsQuerySync` binds `''`.
|
|
6126
|
+
// Coerce an empty value back to the configured default param key.
|
|
6127
|
+
tlsTabsQuerySync = input(this._config.paramKey, { ...(ngDevMode ? { debugName: "tlsTabsQuerySync" } : /* istanbul ignore next */ {}), transform: (value) => value || this._config.paramKey });
|
|
5369
6128
|
constructor() {
|
|
5370
6129
|
super();
|
|
5371
6130
|
effect(() => {
|
|
@@ -5392,6 +6151,421 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
5392
6151
|
}]
|
|
5393
6152
|
}], ctorParameters: () => [], propDecorators: { tlsTabsQuerySync: [{ type: i0.Input, args: [{ isSignal: true, alias: "tlsTabsQuerySync", required: false }] }] } });
|
|
5394
6153
|
|
|
6154
|
+
/** Status glyph rendered in the leading icon slot, derived from the toast color. */
|
|
6155
|
+
const ICON_BY_COLOR = {
|
|
6156
|
+
primary: 'info',
|
|
6157
|
+
secondary: 'info',
|
|
6158
|
+
tertiary: 'info',
|
|
6159
|
+
success: 'success',
|
|
6160
|
+
info: 'info',
|
|
6161
|
+
warning: 'warning',
|
|
6162
|
+
danger: 'error',
|
|
6163
|
+
};
|
|
6164
|
+
/**
|
|
6165
|
+
* Presentational contents of a single toast: an optional leading status icon,
|
|
6166
|
+
* a title and message, an optional action button, and an optional close button.
|
|
6167
|
+
* Owns no timing or stacking logic — the host element is positioned by
|
|
6168
|
+
* `ToastOutlet`, and dismissal is reported through the `dismissed` output.
|
|
6169
|
+
*/
|
|
6170
|
+
class Toast {
|
|
6171
|
+
// Inputs
|
|
6172
|
+
message = input.required(/* @ts-ignore */
|
|
6173
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
6174
|
+
title = input(undefined, /* @ts-ignore */
|
|
6175
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
6176
|
+
color = input.required(/* @ts-ignore */
|
|
6177
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
6178
|
+
closable = input(true, /* @ts-ignore */
|
|
6179
|
+
...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
|
|
6180
|
+
showIcon = input(true, /* @ts-ignore */
|
|
6181
|
+
...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
6182
|
+
showProgress = input(true, /* @ts-ignore */
|
|
6183
|
+
...(ngDevMode ? [{ debugName: "showProgress" }] : /* istanbul ignore next */ []));
|
|
6184
|
+
/** Auto-dismiss delay in ms driving the countdown bar; `0` renders no bar. */
|
|
6185
|
+
duration = input(0, /* @ts-ignore */
|
|
6186
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
6187
|
+
/** Freezes the countdown bar, kept in lockstep with the paused auto-dismiss timer. */
|
|
6188
|
+
paused = input(false, /* @ts-ignore */
|
|
6189
|
+
...(ngDevMode ? [{ debugName: "paused" }] : /* istanbul ignore next */ []));
|
|
6190
|
+
action = input(undefined, /* @ts-ignore */
|
|
6191
|
+
...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
6192
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
6193
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
6194
|
+
// Outputs
|
|
6195
|
+
dismissed = output();
|
|
6196
|
+
actionTriggered = output();
|
|
6197
|
+
// Computed
|
|
6198
|
+
hostClasses = computed(() => {
|
|
6199
|
+
const classes = ['tls-toast', `tls-toast--${this.color()}`];
|
|
6200
|
+
if (this.paused())
|
|
6201
|
+
classes.push('tls-toast--paused');
|
|
6202
|
+
return classes;
|
|
6203
|
+
}, /* @ts-ignore */
|
|
6204
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
6205
|
+
icon = computed(() => ICON_BY_COLOR[this.color()], /* @ts-ignore */
|
|
6206
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
6207
|
+
// The countdown bar only makes sense for a toast that actually auto-dismisses.
|
|
6208
|
+
progressVisible = computed(() => this.showProgress() && this.duration() > 0, /* @ts-ignore */
|
|
6209
|
+
...(ngDevMode ? [{ debugName: "progressVisible" }] : /* istanbul ignore next */ []));
|
|
6210
|
+
// CSS animation duration for the countdown bar, matching the auto-dismiss delay.
|
|
6211
|
+
progressDuration = computed(() => `${this.duration()}ms`, /* @ts-ignore */
|
|
6212
|
+
...(ngDevMode ? [{ debugName: "progressDuration" }] : /* istanbul ignore next */ []));
|
|
6213
|
+
// Urgent severities announce assertively; the rest announce politely.
|
|
6214
|
+
role = computed(() => {
|
|
6215
|
+
const urgent = ['warning', 'danger'];
|
|
6216
|
+
return urgent.includes(this.color()) ? 'alert' : 'status';
|
|
6217
|
+
}, /* @ts-ignore */
|
|
6218
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
6219
|
+
// Protected methods
|
|
6220
|
+
onAction() {
|
|
6221
|
+
this.actionTriggered.emit();
|
|
6222
|
+
}
|
|
6223
|
+
onClose() {
|
|
6224
|
+
this.dismissed.emit();
|
|
6225
|
+
}
|
|
6226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Toast, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6227
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Toast, isStandalone: true, selector: "tls-toast", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, paused: { classPropertyName: "paused", publicName: "paused", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed", actionTriggered: "actionTriggered" }, host: { attributes: { "animate.enter": "tls-toast--enter", "animate.leave": "tls-toast--leave" }, properties: { "class": "hostClasses()", "attr.role": "role()", "attr.aria-label": "ariaLabel() ?? null" } }, ngImport: i0, template: "<!--\n The surface is a deliberate wrapper, not a redundant one: the host element is\n the stacking layer positioned by `ToastOutlet` (transform / scale / z-index),\n while the surface is the visible card that plays the enter / leave animation \u2014\n keeping the two transforms on separate elements so they never conflict.\n-->\n<div class=\"tls-toast__surface\">\n @if (showIcon()) {\n <tls-icon class=\"tls-toast__icon\" [name]=\"icon()\" aria-hidden=\"true\" />\n }\n\n <div class=\"tls-toast__body\">\n @if (title(); as title) {\n <p class=\"tls-toast__title\">{{ title }}</p>\n }\n <p class=\"tls-toast__message\">{{ message() }}</p>\n </div>\n\n @if (action(); as action) {\n <tls-button\n class=\"tls-toast__action\"\n variant=\"text\"\n size=\"sm\"\n [color]=\"color()\"\n [label]=\"action.label\"\n (click)=\"onAction()\"\n />\n }\n\n @if (closable()) {\n <button type=\"button\" class=\"tls-toast__close\" aria-label=\"Dismiss\" (click)=\"onClose()\">\n <tls-icon class=\"tls-toast__close-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n }\n\n @if (progressVisible()) {\n <span class=\"tls-toast__progress\" [style.--tls-toast-duration]=\"progressDuration()\" aria-hidden=\"true\"></span>\n }\n</div>\n", dependencies: [{ kind: "component", type: Button, selector: "tls-button", inputs: ["label", "ariaLabel", "ariaLabelledby", "type", "href", "tabindex"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }] });
|
|
6228
|
+
}
|
|
6229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Toast, decorators: [{
|
|
6230
|
+
type: Component,
|
|
6231
|
+
args: [{ selector: 'tls-toast', imports: [Button, Icon], host: {
|
|
6232
|
+
'[class]': 'hostClasses()',
|
|
6233
|
+
'[attr.role]': 'role()',
|
|
6234
|
+
'[attr.aria-label]': 'ariaLabel() ?? null',
|
|
6235
|
+
'animate.enter': 'tls-toast--enter',
|
|
6236
|
+
'animate.leave': 'tls-toast--leave',
|
|
6237
|
+
}, template: "<!--\n The surface is a deliberate wrapper, not a redundant one: the host element is\n the stacking layer positioned by `ToastOutlet` (transform / scale / z-index),\n while the surface is the visible card that plays the enter / leave animation \u2014\n keeping the two transforms on separate elements so they never conflict.\n-->\n<div class=\"tls-toast__surface\">\n @if (showIcon()) {\n <tls-icon class=\"tls-toast__icon\" [name]=\"icon()\" aria-hidden=\"true\" />\n }\n\n <div class=\"tls-toast__body\">\n @if (title(); as title) {\n <p class=\"tls-toast__title\">{{ title }}</p>\n }\n <p class=\"tls-toast__message\">{{ message() }}</p>\n </div>\n\n @if (action(); as action) {\n <tls-button\n class=\"tls-toast__action\"\n variant=\"text\"\n size=\"sm\"\n [color]=\"color()\"\n [label]=\"action.label\"\n (click)=\"onAction()\"\n />\n }\n\n @if (closable()) {\n <button type=\"button\" class=\"tls-toast__close\" aria-label=\"Dismiss\" (click)=\"onClose()\">\n <tls-icon class=\"tls-toast__close-icon\" name=\"close\" aria-hidden=\"true\" />\n </button>\n }\n\n @if (progressVisible()) {\n <span class=\"tls-toast__progress\" [style.--tls-toast-duration]=\"progressDuration()\" aria-hidden=\"true\"></span>\n }\n</div>\n" }]
|
|
6238
|
+
}], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: true }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], showProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "showProgress", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], paused: [{ type: i0.Input, args: [{ isSignal: true, alias: "paused", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], actionTriggered: [{ type: i0.Output, args: ["actionTriggered"] }] } });
|
|
6239
|
+
|
|
6240
|
+
// Base stacking order applied to the front toast; toasts further back subtract
|
|
6241
|
+
// their depth from this so the newest always paints on top.
|
|
6242
|
+
const TOAST_BASE_Z_INDEX = 1000;
|
|
6243
|
+
// Collapsed-pile geometry. `PEEK` is how far (px) each toast behind the front one
|
|
6244
|
+
// is pushed toward the viewport center so its edge shows; `SCALE_STEP` shrinks it
|
|
6245
|
+
// per depth; `VISIBLE_DEPTH` is how many toasts behind the front stay visible
|
|
6246
|
+
// before the rest fade out.
|
|
6247
|
+
const TOAST_COLLAPSED_PEEK = 14;
|
|
6248
|
+
const TOAST_COLLAPSED_SCALE_STEP = 0.05;
|
|
6249
|
+
const TOAST_COLLAPSED_MIN_SCALE = 0.8;
|
|
6250
|
+
const TOAST_COLLAPSED_VISIBLE_DEPTH = 3;
|
|
6251
|
+
// Vertical gap (px) between toasts when the stack is expanded into a list. Kept
|
|
6252
|
+
// in sync with `--spacing-3` in `_toast.scss`; it is a transform offset computed
|
|
6253
|
+
// in TypeScript, so it lives here as a number rather than a spacing token.
|
|
6254
|
+
const TOAST_EXPANDED_GAP = 12;
|
|
6255
|
+
// Upper bound for how long to keep the outlet overlay's pane alive after a toast
|
|
6256
|
+
// starts leaving, so Angular's `animate.leave` can finish. Disposal happens on
|
|
6257
|
+
// `animationend`; this only fires when no exit animation runs (e.g. the `none`
|
|
6258
|
+
// motion level).
|
|
6259
|
+
const TOAST_LEAVE_ANIMATION_FALLBACK_MS = 500;
|
|
6260
|
+
|
|
6261
|
+
const DEFAULT_TOAST_CONFIG = {
|
|
6262
|
+
position: 'top-end',
|
|
6263
|
+
stacking: 'collapsed',
|
|
6264
|
+
duration: 5000,
|
|
6265
|
+
max: 5,
|
|
6266
|
+
color: 'primary',
|
|
6267
|
+
severityColors: {
|
|
6268
|
+
success: 'success',
|
|
6269
|
+
info: 'info',
|
|
6270
|
+
warning: 'warning',
|
|
6271
|
+
danger: 'danger',
|
|
6272
|
+
},
|
|
6273
|
+
closable: true,
|
|
6274
|
+
showIcon: true,
|
|
6275
|
+
showProgress: true,
|
|
6276
|
+
pauseOnHover: true,
|
|
6277
|
+
};
|
|
6278
|
+
|
|
6279
|
+
const TOAST_CONFIG = new InjectionToken('TOAST_CONFIG', {
|
|
6280
|
+
factory: () => DEFAULT_TOAST_CONFIG,
|
|
6281
|
+
});
|
|
6282
|
+
|
|
6283
|
+
/**
|
|
6284
|
+
* Imperative toast (snackbar) API. Enqueues transient notifications into a single
|
|
6285
|
+
* globally-positioned stack rendered by {@link ToastOutlet}. The newest toast sits
|
|
6286
|
+
* in front; older ones pile behind it (or list out, per the configured stacking).
|
|
6287
|
+
* Auto-dismiss timers are paused while the stack is hovered or focused.
|
|
6288
|
+
*/
|
|
6289
|
+
class ToastService {
|
|
6290
|
+
// Injections
|
|
6291
|
+
_overlay = inject(Overlay);
|
|
6292
|
+
_config = inject(TOAST_CONFIG);
|
|
6293
|
+
// State
|
|
6294
|
+
_toasts = signal([], /* @ts-ignore */
|
|
6295
|
+
...(ngDevMode ? [{ debugName: "_toasts" }] : /* istanbul ignore next */ []));
|
|
6296
|
+
_timers = new Map();
|
|
6297
|
+
_overlayRef = null;
|
|
6298
|
+
_paused = false;
|
|
6299
|
+
_counter = 0;
|
|
6300
|
+
// Accessors
|
|
6301
|
+
/** The live toasts, newest first. Consumed by {@link ToastOutlet}. */
|
|
6302
|
+
toasts = this._toasts.asReadonly();
|
|
6303
|
+
/** Resolved toast configuration. Consumed by {@link ToastOutlet}. */
|
|
6304
|
+
get config() {
|
|
6305
|
+
return this._config;
|
|
6306
|
+
}
|
|
6307
|
+
// Public methods
|
|
6308
|
+
show(options) {
|
|
6309
|
+
this._ensureOutlet();
|
|
6310
|
+
const duration = options.duration ?? this._config.duration;
|
|
6311
|
+
const toast = {
|
|
6312
|
+
id: ++this._counter,
|
|
6313
|
+
message: options.message,
|
|
6314
|
+
title: options.title,
|
|
6315
|
+
color: options.color ?? this._config.color,
|
|
6316
|
+
duration,
|
|
6317
|
+
closable: options.closable ?? this._config.closable,
|
|
6318
|
+
showIcon: options.showIcon ?? this._config.showIcon,
|
|
6319
|
+
showProgress: options.showProgress ?? this._config.showProgress,
|
|
6320
|
+
action: options.action,
|
|
6321
|
+
ariaLabel: options.ariaLabel,
|
|
6322
|
+
};
|
|
6323
|
+
// Newest first; trim the oldest past the cap so the stack stays bounded.
|
|
6324
|
+
this._toasts.update(toasts => [toast, ...toasts].slice(0, this._config.max));
|
|
6325
|
+
this._pruneOrphanTimers();
|
|
6326
|
+
if (duration > 0)
|
|
6327
|
+
this._startTimer(toast.id, duration);
|
|
6328
|
+
return { id: toast.id, dismiss: () => this.dismiss(toast.id) };
|
|
6329
|
+
}
|
|
6330
|
+
success(message, options) {
|
|
6331
|
+
return this.show({ ...options, message, color: this._config.severityColors.success });
|
|
6332
|
+
}
|
|
6333
|
+
info(message, options) {
|
|
6334
|
+
return this.show({ ...options, message, color: this._config.severityColors.info });
|
|
6335
|
+
}
|
|
6336
|
+
warning(message, options) {
|
|
6337
|
+
return this.show({ ...options, message, color: this._config.severityColors.warning });
|
|
6338
|
+
}
|
|
6339
|
+
danger(message, options) {
|
|
6340
|
+
return this.show({ ...options, message, color: this._config.severityColors.danger });
|
|
6341
|
+
}
|
|
6342
|
+
dismiss(id) {
|
|
6343
|
+
this._clearTimer(id);
|
|
6344
|
+
this._toasts.update(toasts => toasts.filter(toast => toast.id !== id));
|
|
6345
|
+
}
|
|
6346
|
+
clear() {
|
|
6347
|
+
for (const id of this._timers.keys())
|
|
6348
|
+
this._clearTimer(id);
|
|
6349
|
+
this._toasts.set([]);
|
|
6350
|
+
}
|
|
6351
|
+
/** Freezes every auto-dismiss timer, preserving each toast's remaining time. */
|
|
6352
|
+
pause() {
|
|
6353
|
+
if (this._paused)
|
|
6354
|
+
return;
|
|
6355
|
+
this._paused = true;
|
|
6356
|
+
const now = Date.now();
|
|
6357
|
+
for (const timer of this._timers.values()) {
|
|
6358
|
+
if (timer.handle === null)
|
|
6359
|
+
continue;
|
|
6360
|
+
clearTimeout(timer.handle);
|
|
6361
|
+
timer.handle = null;
|
|
6362
|
+
timer.remaining = Math.max(timer.remaining - (now - timer.startedAt), 0);
|
|
6363
|
+
}
|
|
6364
|
+
}
|
|
6365
|
+
/** Resumes every paused auto-dismiss timer from its remaining time. */
|
|
6366
|
+
resume() {
|
|
6367
|
+
if (!this._paused)
|
|
6368
|
+
return;
|
|
6369
|
+
this._paused = false;
|
|
6370
|
+
for (const [id, timer] of this._timers) {
|
|
6371
|
+
if (timer.handle !== null)
|
|
6372
|
+
continue;
|
|
6373
|
+
this._startTimer(id, timer.remaining);
|
|
6374
|
+
}
|
|
6375
|
+
}
|
|
6376
|
+
// Private methods
|
|
6377
|
+
_startTimer(id, remaining) {
|
|
6378
|
+
if (this._paused) {
|
|
6379
|
+
this._timers.set(id, { remaining, startedAt: Date.now(), handle: null });
|
|
6380
|
+
return;
|
|
6381
|
+
}
|
|
6382
|
+
const handle = setTimeout(() => this.dismiss(id), remaining);
|
|
6383
|
+
this._timers.set(id, { remaining, startedAt: Date.now(), handle });
|
|
6384
|
+
}
|
|
6385
|
+
_clearTimer(id) {
|
|
6386
|
+
const timer = this._timers.get(id);
|
|
6387
|
+
if (!timer)
|
|
6388
|
+
return;
|
|
6389
|
+
if (timer.handle !== null)
|
|
6390
|
+
clearTimeout(timer.handle);
|
|
6391
|
+
this._timers.delete(id);
|
|
6392
|
+
}
|
|
6393
|
+
// Drops timers whose toast was trimmed by the `max` cap without an explicit dismiss.
|
|
6394
|
+
_pruneOrphanTimers() {
|
|
6395
|
+
const live = new Set(this._toasts().map(toast => toast.id));
|
|
6396
|
+
for (const id of this._timers.keys()) {
|
|
6397
|
+
if (!live.has(id))
|
|
6398
|
+
this._clearTimer(id);
|
|
6399
|
+
}
|
|
6400
|
+
}
|
|
6401
|
+
_ensureOutlet() {
|
|
6402
|
+
if (this._overlayRef)
|
|
6403
|
+
return;
|
|
6404
|
+
this._overlayRef = this._overlay.create({
|
|
6405
|
+
positionStrategy: this._overlay.position().global().top('0').left('0'),
|
|
6406
|
+
scrollStrategy: this._overlay.scrollStrategies.noop(),
|
|
6407
|
+
hasBackdrop: false,
|
|
6408
|
+
panelClass: 'tls-toast-overlay',
|
|
6409
|
+
});
|
|
6410
|
+
this._overlayRef.attach(new ComponentPortal(ToastOutlet));
|
|
6411
|
+
}
|
|
6412
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6413
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastService, providedIn: 'root' });
|
|
6414
|
+
}
|
|
6415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastService, decorators: [{
|
|
6416
|
+
type: Injectable,
|
|
6417
|
+
args: [{ providedIn: 'root' }]
|
|
6418
|
+
}] });
|
|
6419
|
+
|
|
6420
|
+
/**
|
|
6421
|
+
* Single instance rendered into a global CDK overlay by {@link ToastService}. Lays
|
|
6422
|
+
* every live toast out as one anchored stack: collapsed into a hover-to-expand
|
|
6423
|
+
* pile, or an always-open list, per the resolved config. Each toast's host is the
|
|
6424
|
+
* stacking layer, positioned here via transform / scale / z-index computed from
|
|
6425
|
+
* the toasts' measured heights; hovering or focusing the region expands the pile
|
|
6426
|
+
* and pauses the auto-dismiss timers.
|
|
6427
|
+
*/
|
|
6428
|
+
class ToastOutlet {
|
|
6429
|
+
// Injections
|
|
6430
|
+
_service = inject(ToastService);
|
|
6431
|
+
_destroyRef = inject(DestroyRef);
|
|
6432
|
+
// State
|
|
6433
|
+
toasts = this._service.toasts;
|
|
6434
|
+
_pointerInside = signal(false, /* @ts-ignore */
|
|
6435
|
+
...(ngDevMode ? [{ debugName: "_pointerInside" }] : /* istanbul ignore next */ []));
|
|
6436
|
+
_focusInside = signal(false, /* @ts-ignore */
|
|
6437
|
+
...(ngDevMode ? [{ debugName: "_focusInside" }] : /* istanbul ignore next */ []));
|
|
6438
|
+
// Natural (untransformed) height of each toast host, aligned to `toasts()`
|
|
6439
|
+
// (index 0 = front). Drives the expanded list offsets and the region's
|
|
6440
|
+
// hover-catching height.
|
|
6441
|
+
_heights = signal([], /* @ts-ignore */
|
|
6442
|
+
...(ngDevMode ? [{ debugName: "_heights" }] : /* istanbul ignore next */ []));
|
|
6443
|
+
_toastElements = viewChildren('toastEl', { ...(ngDevMode ? { debugName: "_toastElements" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
6444
|
+
_resizeObserver = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(() => this._measure());
|
|
6445
|
+
// Computed
|
|
6446
|
+
position = computed(() => this._service.config.position, /* @ts-ignore */
|
|
6447
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
6448
|
+
expanded = computed(() => this._service.config.stacking === 'expanded' || this._interacting(), /* @ts-ignore */
|
|
6449
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
6450
|
+
// Auto-dismiss is frozen while interacting (when `pauseOnHover` is on); the
|
|
6451
|
+
// countdown bars mirror that so they stay in lockstep with the timers.
|
|
6452
|
+
paused = computed(() => this._service.config.pauseOnHover && this._interacting(), /* @ts-ignore */
|
|
6453
|
+
...(ngDevMode ? [{ debugName: "paused" }] : /* istanbul ignore next */ []));
|
|
6454
|
+
regionClasses = computed(() => {
|
|
6455
|
+
const [blockEdge, inlineEdge] = this.position().split('-');
|
|
6456
|
+
const classes = [
|
|
6457
|
+
'tls-toast-region',
|
|
6458
|
+
`tls-toast-region--${blockEdge}`,
|
|
6459
|
+
`tls-toast-region--${inlineEdge}`,
|
|
6460
|
+
];
|
|
6461
|
+
if (this.expanded())
|
|
6462
|
+
classes.push('tls-toast-region--expanded');
|
|
6463
|
+
return classes;
|
|
6464
|
+
}, /* @ts-ignore */
|
|
6465
|
+
...(ngDevMode ? [{ debugName: "regionClasses" }] : /* istanbul ignore next */ []));
|
|
6466
|
+
// Height of the hover-catching region: the full expanded list, or the collapsed
|
|
6467
|
+
// pile's footprint (front toast plus the visible peeks behind it).
|
|
6468
|
+
regionHeight = computed(() => {
|
|
6469
|
+
const heights = this._heights();
|
|
6470
|
+
if (heights.length === 0)
|
|
6471
|
+
return 0;
|
|
6472
|
+
if (this.expanded()) {
|
|
6473
|
+
const total = heights.reduce((sum, height) => sum + height, 0);
|
|
6474
|
+
return total + (heights.length - 1) * TOAST_EXPANDED_GAP;
|
|
6475
|
+
}
|
|
6476
|
+
const front = heights[0];
|
|
6477
|
+
const depth = Math.min(heights.length - 1, TOAST_COLLAPSED_VISIBLE_DEPTH);
|
|
6478
|
+
return front + depth * TOAST_COLLAPSED_PEEK;
|
|
6479
|
+
}, /* @ts-ignore */
|
|
6480
|
+
...(ngDevMode ? [{ debugName: "regionHeight" }] : /* istanbul ignore next */ []));
|
|
6481
|
+
layouts = computed(() => {
|
|
6482
|
+
const heights = this._heights();
|
|
6483
|
+
const expanded = this.expanded();
|
|
6484
|
+
const stacksUpward = this.position().startsWith('bottom');
|
|
6485
|
+
const sign = stacksUpward ? -1 : 1;
|
|
6486
|
+
return this.toasts().map((_, frontIndex) => {
|
|
6487
|
+
const zIndex = `${TOAST_BASE_Z_INDEX - frontIndex}`;
|
|
6488
|
+
if (expanded) {
|
|
6489
|
+
let offset = 0;
|
|
6490
|
+
for (let ahead = 0; ahead < frontIndex; ahead++) {
|
|
6491
|
+
offset += (heights[ahead] ?? 0) + TOAST_EXPANDED_GAP;
|
|
6492
|
+
}
|
|
6493
|
+
return { transform: `translateY(${sign * offset}px)`, depthOpacity: '1', zIndex };
|
|
6494
|
+
}
|
|
6495
|
+
const depth = Math.min(frontIndex, TOAST_COLLAPSED_VISIBLE_DEPTH);
|
|
6496
|
+
const translate = sign * depth * TOAST_COLLAPSED_PEEK;
|
|
6497
|
+
const scale = Math.max(1 - depth * TOAST_COLLAPSED_SCALE_STEP, TOAST_COLLAPSED_MIN_SCALE);
|
|
6498
|
+
const depthOpacity = frontIndex > TOAST_COLLAPSED_VISIBLE_DEPTH ? '0' : '1';
|
|
6499
|
+
return { transform: `translateY(${translate}px) scale(${scale})`, depthOpacity, zIndex };
|
|
6500
|
+
});
|
|
6501
|
+
}, /* @ts-ignore */
|
|
6502
|
+
...(ngDevMode ? [{ debugName: "layouts" }] : /* istanbul ignore next */ []));
|
|
6503
|
+
_interacting = computed(() => this._pointerInside() || this._focusInside(), /* @ts-ignore */
|
|
6504
|
+
...(ngDevMode ? [{ debugName: "_interacting" }] : /* istanbul ignore next */ []));
|
|
6505
|
+
// Constructor
|
|
6506
|
+
constructor() {
|
|
6507
|
+
// Re-observe the rendered toasts whenever the set changes, and take a fresh
|
|
6508
|
+
// measurement so the expanded offsets and region height stay accurate.
|
|
6509
|
+
effect(() => {
|
|
6510
|
+
const elements = this._toastElements();
|
|
6511
|
+
const observer = this._resizeObserver;
|
|
6512
|
+
if (observer) {
|
|
6513
|
+
observer.disconnect();
|
|
6514
|
+
for (const element of elements)
|
|
6515
|
+
observer.observe(element.nativeElement);
|
|
6516
|
+
}
|
|
6517
|
+
this._measure();
|
|
6518
|
+
});
|
|
6519
|
+
// Pause auto-dismiss while the stack is hovered or focused; resume on leave.
|
|
6520
|
+
effect(() => {
|
|
6521
|
+
const interacting = this._interacting();
|
|
6522
|
+
if (!this._service.config.pauseOnHover)
|
|
6523
|
+
return;
|
|
6524
|
+
if (interacting) {
|
|
6525
|
+
this._service.pause();
|
|
6526
|
+
}
|
|
6527
|
+
else {
|
|
6528
|
+
this._service.resume();
|
|
6529
|
+
}
|
|
6530
|
+
});
|
|
6531
|
+
this._destroyRef.onDestroy(() => {
|
|
6532
|
+
if (this._resizeObserver)
|
|
6533
|
+
this._resizeObserver.disconnect();
|
|
6534
|
+
});
|
|
6535
|
+
}
|
|
6536
|
+
// Protected methods
|
|
6537
|
+
onDismiss(id) {
|
|
6538
|
+
this._service.dismiss(id);
|
|
6539
|
+
}
|
|
6540
|
+
onAction(toast) {
|
|
6541
|
+
if (toast.action)
|
|
6542
|
+
toast.action.handler();
|
|
6543
|
+
this._service.dismiss(toast.id);
|
|
6544
|
+
}
|
|
6545
|
+
onPointerEnter() {
|
|
6546
|
+
this._pointerInside.set(true);
|
|
6547
|
+
}
|
|
6548
|
+
onPointerLeave() {
|
|
6549
|
+
this._pointerInside.set(false);
|
|
6550
|
+
}
|
|
6551
|
+
onFocusIn() {
|
|
6552
|
+
this._focusInside.set(true);
|
|
6553
|
+
}
|
|
6554
|
+
onFocusOut() {
|
|
6555
|
+
this._focusInside.set(false);
|
|
6556
|
+
}
|
|
6557
|
+
// Private methods
|
|
6558
|
+
_measure() {
|
|
6559
|
+
this._heights.set(this._toastElements().map(element => element.nativeElement.offsetHeight));
|
|
6560
|
+
}
|
|
6561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastOutlet, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ToastOutlet, isStandalone: true, selector: "tls-toast-outlet", host: { classAttribute: "tls-toast-outlet" }, viewQueries: [{ propertyName: "_toastElements", predicate: ["toastEl"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"regionClasses()\"\n role=\"region\"\n aria-label=\"Notifications\"\n [style.height.px]=\"regionHeight()\"\n (mouseenter)=\"onPointerEnter()\"\n (mouseleave)=\"onPointerLeave()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n>\n @for (toast of toasts(); track toast.id; let index = $index) {\n <tls-toast\n #toastEl\n [style.transform]=\"layouts()[index].transform\"\n [style.z-index]=\"layouts()[index].zIndex\"\n [style.--tls-toast-depth-opacity]=\"layouts()[index].depthOpacity\"\n [message]=\"toast.message\"\n [title]=\"toast.title\"\n [color]=\"toast.color\"\n [duration]=\"toast.duration\"\n [paused]=\"paused()\"\n [closable]=\"toast.closable\"\n [showIcon]=\"toast.showIcon\"\n [showProgress]=\"toast.showProgress\"\n [action]=\"toast.action\"\n [ariaLabel]=\"toast.ariaLabel\"\n (dismissed)=\"onDismiss(toast.id)\"\n (actionTriggered)=\"onAction(toast)\"\n ></tls-toast>\n }\n</div>\n", dependencies: [{ kind: "component", type: Toast, selector: "tls-toast", inputs: ["message", "title", "color", "closable", "showIcon", "showProgress", "duration", "paused", "action", "ariaLabel"], outputs: ["dismissed", "actionTriggered"] }] });
|
|
6563
|
+
}
|
|
6564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastOutlet, decorators: [{
|
|
6565
|
+
type: Component,
|
|
6566
|
+
args: [{ selector: 'tls-toast-outlet', imports: [Toast], host: { class: 'tls-toast-outlet' }, template: "<div\n [class]=\"regionClasses()\"\n role=\"region\"\n aria-label=\"Notifications\"\n [style.height.px]=\"regionHeight()\"\n (mouseenter)=\"onPointerEnter()\"\n (mouseleave)=\"onPointerLeave()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n>\n @for (toast of toasts(); track toast.id; let index = $index) {\n <tls-toast\n #toastEl\n [style.transform]=\"layouts()[index].transform\"\n [style.z-index]=\"layouts()[index].zIndex\"\n [style.--tls-toast-depth-opacity]=\"layouts()[index].depthOpacity\"\n [message]=\"toast.message\"\n [title]=\"toast.title\"\n [color]=\"toast.color\"\n [duration]=\"toast.duration\"\n [paused]=\"paused()\"\n [closable]=\"toast.closable\"\n [showIcon]=\"toast.showIcon\"\n [showProgress]=\"toast.showProgress\"\n [action]=\"toast.action\"\n [ariaLabel]=\"toast.ariaLabel\"\n (dismissed)=\"onDismiss(toast.id)\"\n (actionTriggered)=\"onAction(toast)\"\n ></tls-toast>\n }\n</div>\n" }]
|
|
6567
|
+
}], ctorParameters: () => [], propDecorators: { _toastElements: [{ type: i0.ViewChildren, args: ['toastEl', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
6568
|
+
|
|
5395
6569
|
class Tooltip {
|
|
5396
6570
|
static _counter = 0;
|
|
5397
6571
|
id = `tls-tooltip-${++Tooltip._counter}`;
|
|
@@ -5700,6 +6874,10 @@ const provideThalassicUIConfig = (config) => {
|
|
|
5700
6874
|
useValue: deepMerge(DEFAULT_FORM_ITEM_CONFIG, config.components.formItem),
|
|
5701
6875
|
},
|
|
5702
6876
|
{ provide: ICON_CONFIG, useValue: deepMerge(DEFAULT_ICON_CONFIG, config.components.icon) },
|
|
6877
|
+
{
|
|
6878
|
+
provide: IMAGE_COMPARE_CONFIG,
|
|
6879
|
+
useValue: deepMerge(DEFAULT_IMAGE_COMPARE_CONFIG, config.components.imageCompare),
|
|
6880
|
+
},
|
|
5703
6881
|
{ provide: INPUT_CONFIG, useValue: deepMerge(DEFAULT_INPUT_CONFIG, config.components.input) },
|
|
5704
6882
|
{
|
|
5705
6883
|
provide: LOADER_CONFIG,
|
|
@@ -5742,6 +6920,10 @@ const provideThalassicUIConfig = (config) => {
|
|
|
5742
6920
|
provide: SKELETON_CONFIG,
|
|
5743
6921
|
useValue: deepMerge(DEFAULT_SKELETON_CONFIG, config.components.skeleton),
|
|
5744
6922
|
},
|
|
6923
|
+
{
|
|
6924
|
+
provide: SPLITTER_CONFIG,
|
|
6925
|
+
useValue: deepMerge(DEFAULT_SPLITTER_CONFIG, config.components.splitter),
|
|
6926
|
+
},
|
|
5745
6927
|
{
|
|
5746
6928
|
provide: STEPPER_CONFIG,
|
|
5747
6929
|
useValue: deepMerge(DEFAULT_STEPPER_CONFIG, config.components.stepper),
|
|
@@ -5760,6 +6942,12 @@ const provideThalassicUIConfig = (config) => {
|
|
|
5760
6942
|
provide: TEXTAREA_CONFIG,
|
|
5761
6943
|
useValue: deepMerge(DEFAULT_TEXTAREA_CONFIG, config.components.textarea),
|
|
5762
6944
|
},
|
|
6945
|
+
{
|
|
6946
|
+
provide: TOAST_CONFIG,
|
|
6947
|
+
// `severityColors` is a deep-partial override; deepMerge merges it recursively,
|
|
6948
|
+
// but its `Partial<T>` signature only models a shallow partial, so cast to it.
|
|
6949
|
+
useValue: deepMerge(DEFAULT_TOAST_CONFIG, config.components.toast),
|
|
6950
|
+
},
|
|
5763
6951
|
{
|
|
5764
6952
|
provide: TOGGLE_GROUP_CONFIG,
|
|
5765
6953
|
useValue: deepMerge(DEFAULT_TOGGLE_GROUP_CONFIG, config.components.toggleGroup),
|
|
@@ -5775,5 +6963,5 @@ const provideThalassicUIConfig = (config) => {
|
|
|
5775
6963
|
* Generated bundle index. Do not edit.
|
|
5776
6964
|
*/
|
|
5777
6965
|
|
|
5778
|
-
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, 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_ALERT_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_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_LOADER_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_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, Drawer, DrawerRef, DrawerService, FILE_INPUT_CONFIG, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, ICON_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, Input, InputDirective, InputNumber, LOADER_CONFIG, Loader, MENU_CONFIG, MULTI_SELECT_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TEXTAREA_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, ToggleGroup, TooltipDirective, ValueFormControl, provideThalassicUIConfig };
|
|
6966
|
+
export { ALERT_CONFIG, Alert, BADGE_CONFIG, BUTTON_CONFIG, Badge, 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_ALERT_CONFIG, DEFAULT_BADGE_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_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_LOADER_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_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, Drawer, DrawerRef, DrawerService, FILE_INPUT_CONFIG, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, Input, InputDirective, InputNumber, LOADER_CONFIG, Loader, MENU_CONFIG, MULTI_SELECT_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Splitter, SplitterPanel, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastOutlet, ToastService, ToggleGroup, TooltipDirective, ValueFormControl, provideThalassicIcons, provideThalassicUIConfig };
|
|
5779
6967
|
//# sourceMappingURL=thalassic-ui.mjs.map
|