@thalassic/ui 22.4.0 → 22.5.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.mjs +901 -332
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +2 -1
- package/types/thalassic-ui.d.ts +247 -30
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, ViewContainerRef, DestroyRef, viewChild, Component, contentChild,
|
|
2
|
+
import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, ViewContainerRef, DestroyRef, viewChild, Component, contentChild, forwardRef, output, effect, ElementRef, afterNextRender, Injectable, numberAttribute, viewChildren, contentChildren, isDevMode, untracked, TemplateRef, Renderer2, makeEnvironmentProviders } 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
6
|
import { filter, Subscription, takeUntil, throwError, map, shareReplay } from 'rxjs';
|
|
7
7
|
import { Router, ActivatedRoute, RouterLink, NavigationStart } from '@angular/router';
|
|
8
8
|
import { LocationStrategy, NgTemplateOutlet } from '@angular/common';
|
|
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 { Grid, GridRow, GridCell } from '@angular/aria/grid';
|
|
9
11
|
import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
10
12
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
11
13
|
import { CdkDialogContainer, DialogRef, Dialog as Dialog$1 } from '@angular/cdk/dialog';
|
|
12
14
|
import { Directionality } from '@angular/cdk/bidi';
|
|
13
|
-
import { format, startOfMonth, endOfMonth, eachDayOfInterval, endOfWeek, startOfWeek, subMonths, addMonths, isSameDay, isSameMonth, isToday, setMonth, subYears, addYears, getYear, getMonth, getHours, getMinutes, startOfDay, setHours, setMinutes, setYear } from 'date-fns';
|
|
14
15
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
15
16
|
import { HttpClient } from '@angular/common/http';
|
|
16
17
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
18
|
+
import { Menu as Menu$1, MenuItem } from '@angular/aria/menu';
|
|
19
|
+
import * as i1 from '@angular/aria/tabs';
|
|
20
|
+
import { TabPanel, TabList, Tab as Tab$1, Tabs as Tabs$1 } from '@angular/aria/tabs';
|
|
17
21
|
import { CdkTable, CdkHeaderCell, CdkCell, CdkCellDef, CdkHeaderCellDef, CdkColumnDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef } from '@angular/cdk/table';
|
|
18
22
|
import { deepMerge } from '@thalassic/core';
|
|
19
23
|
|
|
@@ -856,146 +860,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
856
860
|
}]
|
|
857
861
|
}] });
|
|
858
862
|
|
|
859
|
-
const
|
|
860
|
-
color: 'primary',
|
|
861
|
-
variant: 'filled',
|
|
863
|
+
const DEFAULT_TOGGLE_GROUP_CONFIG = {
|
|
862
864
|
size: 'md',
|
|
865
|
+
color: 'primary',
|
|
866
|
+
orientation: 'horizontal',
|
|
867
|
+
multiple: false,
|
|
868
|
+
unselectable: false,
|
|
869
|
+
fluid: false,
|
|
863
870
|
};
|
|
864
871
|
|
|
865
|
-
const
|
|
866
|
-
factory: () =>
|
|
872
|
+
const TOGGLE_GROUP_CONFIG = new InjectionToken('TOGGLE_GROUP_CONFIG', {
|
|
873
|
+
factory: () => DEFAULT_TOGGLE_GROUP_CONFIG,
|
|
867
874
|
});
|
|
868
875
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
...(ngDevMode ?
|
|
876
|
+
/**
|
|
877
|
+
* `value` is always an array — in single mode (`multiple = false`) it holds 0 or
|
|
878
|
+
* 1 items, read it as `value()[0]`. See {@link SelectionGroup} for the contract.
|
|
879
|
+
*/
|
|
880
|
+
class ToggleGroup extends SelectionGroup {
|
|
881
|
+
_config = inject(TOGGLE_GROUP_CONFIG);
|
|
882
|
+
CLASS_NAME = 'tls-toggle-group';
|
|
883
|
+
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
884
|
+
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
877
885
|
size = input(this._config.size, /* @ts-ignore */
|
|
878
886
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
dirty: false,
|
|
888
|
-
invalid: false,
|
|
889
|
-
pending: false,
|
|
890
|
-
}, /* @ts-ignore */
|
|
891
|
-
...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
892
|
-
startIconTemplate = contentChild('startIcon', /* @ts-ignore */
|
|
893
|
-
...(ngDevMode ? [{ debugName: "startIconTemplate" }] : /* istanbul ignore next */ []));
|
|
894
|
-
endIconTemplate = contentChild('endIcon', /* @ts-ignore */
|
|
895
|
-
...(ngDevMode ? [{ debugName: "endIconTemplate" }] : /* istanbul ignore next */ []));
|
|
887
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
888
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
889
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
890
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
891
|
+
/** Whether the group stretches to fill its container's width with equal-width options. */
|
|
892
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
893
|
+
optionTemplate = contentChild('option', /* @ts-ignore */
|
|
894
|
+
...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
896
895
|
classes = computed(() => {
|
|
897
|
-
const className =
|
|
898
|
-
const array = [
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
if (this.icon())
|
|
905
|
-
array.push(`${className}--icon`);
|
|
896
|
+
const className = this.CLASS_NAME;
|
|
897
|
+
const array = [
|
|
898
|
+
className,
|
|
899
|
+
`${className}--${this.size()}`,
|
|
900
|
+
`${className}--${this.color()}`,
|
|
901
|
+
`${className}--${this.orientation()}`,
|
|
902
|
+
];
|
|
906
903
|
if (this.fluid())
|
|
907
904
|
array.push(`${className}--fluid`);
|
|
908
|
-
return array;
|
|
905
|
+
return array.concat(this.controlClasses());
|
|
909
906
|
}, /* @ts-ignore */
|
|
910
907
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
911
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type:
|
|
912
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type:
|
|
908
|
+
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"] }] });
|
|
913
910
|
}
|
|
914
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type:
|
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, decorators: [{
|
|
915
912
|
type: Component,
|
|
916
|
-
args: [{ selector: 'tls-
|
|
913
|
+
args: [{ selector: 'tls-toggle-group', imports: [NgTemplateOutlet], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], host: {
|
|
914
|
+
role: 'group',
|
|
917
915
|
'[class]': 'classes()',
|
|
918
|
-
|
|
919
|
-
|
|
916
|
+
'[attr.aria-label]': 'ariaLabel() ?? null',
|
|
917
|
+
'[attr.aria-labelledby]': 'labelledBy()',
|
|
918
|
+
'[attr.aria-describedby]': 'describedBy()',
|
|
919
|
+
'[attr.aria-invalid]': "invalid() ? 'true' : null",
|
|
920
|
+
}, 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 }] }] } });
|
|
920
922
|
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
|
|
923
|
+
const DAYS_IN_WEEK = 7;
|
|
924
|
+
/**
|
|
925
|
+
* Every day shown in a month grid for the month containing `anchor`, starting at the
|
|
926
|
+
* first day of the first week (per `weekStartsOn`).
|
|
927
|
+
*
|
|
928
|
+
* With `weeks` omitted the span is the natural 5–6 weeks that cover the month. Passing a
|
|
929
|
+
* fixed `weeks` count returns exactly that many weeks, so the grid height never reflows
|
|
930
|
+
* between months.
|
|
931
|
+
*/
|
|
932
|
+
const buildMonthDays = (anchor, weekStartsOn, weeks) => {
|
|
933
|
+
const start = startOfWeek(startOfMonth(anchor), { weekStartsOn });
|
|
934
|
+
const end = weeks === undefined
|
|
935
|
+
? endOfWeek(endOfMonth(anchor), { weekStartsOn })
|
|
936
|
+
: addDays(start, weeks * DAYS_IN_WEEK - 1);
|
|
937
|
+
return eachDayOfInterval({ start, end });
|
|
924
938
|
};
|
|
925
939
|
|
|
926
|
-
const CHIP_CONTROL_CONFIG = new InjectionToken('CHIP_CONTROL_CONFIG', {
|
|
927
|
-
factory: () => DEFAULT_CHIP_CONTROL_CONFIG,
|
|
928
|
-
});
|
|
929
|
-
|
|
930
|
-
class ChipControl extends CheckboxFormControl {
|
|
931
|
-
CLASS_NAME = 'tls-chip';
|
|
932
|
-
_config = inject(CHIP_CONTROL_CONFIG);
|
|
933
|
-
_chip = inject(Chip);
|
|
934
|
-
checked = model(false, /* @ts-ignore */
|
|
935
|
-
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
936
|
-
checkedColor = input(this._config.checkedColor, /* @ts-ignore */
|
|
937
|
-
...(ngDevMode ? [{ debugName: "checkedColor" }] : /* istanbul ignore next */ []));
|
|
938
|
-
checkedVariant = input(this._config.checkedVariant, /* @ts-ignore */
|
|
939
|
-
...(ngDevMode ? [{ debugName: "checkedVariant" }] : /* istanbul ignore next */ []));
|
|
940
|
-
hostClasses = computed(() => {
|
|
941
|
-
const classes = ['tls-chip--control'];
|
|
942
|
-
if (this.checked()) {
|
|
943
|
-
classes.push('tls-chip--checked');
|
|
944
|
-
const color = this.checkedColor();
|
|
945
|
-
if (color)
|
|
946
|
-
classes.push(`tls-chip--checked-${color}`);
|
|
947
|
-
const variant = this.checkedVariant();
|
|
948
|
-
if (variant)
|
|
949
|
-
classes.push(`tls-chip--checked-${variant}`);
|
|
950
|
-
}
|
|
951
|
-
if (this.disabled())
|
|
952
|
-
classes.push('tls-chip--disabled');
|
|
953
|
-
return classes;
|
|
954
|
-
}, /* @ts-ignore */
|
|
955
|
-
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
956
|
-
constructor() {
|
|
957
|
-
super();
|
|
958
|
-
effect(() => this._chip.context.set({
|
|
959
|
-
checked: this.checked(),
|
|
960
|
-
disabled: this.disabled(),
|
|
961
|
-
readonly: this.readonly(),
|
|
962
|
-
touched: this.touched(),
|
|
963
|
-
dirty: this.dirty(),
|
|
964
|
-
invalid: this.invalid(),
|
|
965
|
-
pending: this.pending(),
|
|
966
|
-
}));
|
|
967
|
-
}
|
|
968
|
-
toggle() {
|
|
969
|
-
if (this.notInteractive())
|
|
970
|
-
return;
|
|
971
|
-
this.checked.update(prev => !prev);
|
|
972
|
-
}
|
|
973
|
-
onKeyboardToggle(event) {
|
|
974
|
-
event.preventDefault();
|
|
975
|
-
this.toggle();
|
|
976
|
-
}
|
|
977
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
978
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: ChipControl, isStandalone: true, selector: "tls-chip[tlsChipControl]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, checkedColor: { classPropertyName: "checkedColor", publicName: "checkedColor", isSignal: true, isRequired: false, transformFunction: null }, checkedVariant: { classPropertyName: "checkedVariant", publicName: "checkedVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, listeners: { "click": "toggle()", "blur": "touched.set(true)", "keydown.space": "onKeyboardToggle($event)", "keydown.enter": "onKeyboardToggle($event)" }, properties: { "class": "hostClasses()", "tabindex": "disabled() ? -1 : 0", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipControl) }], usesInheritance: true, ngImport: i0 });
|
|
979
|
-
}
|
|
980
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipControl, decorators: [{
|
|
981
|
-
type: Directive,
|
|
982
|
-
args: [{
|
|
983
|
-
selector: 'tls-chip[tlsChipControl]',
|
|
984
|
-
host: {
|
|
985
|
-
role: 'checkbox',
|
|
986
|
-
'[class]': 'hostClasses()',
|
|
987
|
-
'[tabindex]': 'disabled() ? -1 : 0',
|
|
988
|
-
'[attr.aria-checked]': 'checked()',
|
|
989
|
-
'[attr.aria-disabled]': 'disabled()',
|
|
990
|
-
'(click)': 'toggle()',
|
|
991
|
-
'(blur)': 'touched.set(true)',
|
|
992
|
-
'(keydown.space)': 'onKeyboardToggle($event)',
|
|
993
|
-
'(keydown.enter)': 'onKeyboardToggle($event)',
|
|
994
|
-
},
|
|
995
|
-
providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipControl) }],
|
|
996
|
-
}]
|
|
997
|
-
}], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], checkedColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkedColor", required: false }] }], checkedVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkedVariant", required: false }] }] } });
|
|
998
|
-
|
|
999
940
|
const OVERLAY_POSITION_MAP = {
|
|
1000
941
|
top: {
|
|
1001
942
|
originX: 'center',
|
|
@@ -1127,17 +1068,778 @@ const OVERLAY_POSITION_MAP = {
|
|
|
1127
1068
|
},
|
|
1128
1069
|
};
|
|
1129
1070
|
|
|
1130
|
-
const buildOverlayPositions = (position, offset) => {
|
|
1131
|
-
const preferred = OVERLAY_POSITION_MAP[position];
|
|
1132
|
-
const rest = Object.values(OVERLAY_POSITION_MAP).filter(p => p !== preferred);
|
|
1133
|
-
const positions = [preferred, ...rest];
|
|
1134
|
-
return positions.map(position => ({
|
|
1135
|
-
...position,
|
|
1136
|
-
offsetX: Math.sign(position.offsetX ?? 0) * offset.x,
|
|
1137
|
-
offsetY: Math.sign(position.offsetY ?? 0) * offset.y,
|
|
1138
|
-
}));
|
|
1071
|
+
const buildOverlayPositions = (position, offset) => {
|
|
1072
|
+
const preferred = OVERLAY_POSITION_MAP[position];
|
|
1073
|
+
const rest = Object.values(OVERLAY_POSITION_MAP).filter(p => p !== preferred);
|
|
1074
|
+
const positions = [preferred, ...rest];
|
|
1075
|
+
return positions.map(position => ({
|
|
1076
|
+
...position,
|
|
1077
|
+
offsetX: Math.sign(position.offsetX ?? 0) * offset.x,
|
|
1078
|
+
offsetY: Math.sign(position.offsetY ?? 0) * offset.y,
|
|
1079
|
+
}));
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
/** Reorders Sunday-first weekday labels so the one for `weekStartsOn` comes first. */
|
|
1083
|
+
const rotateWeekDays = (weekDays, weekStartsOn) => [
|
|
1084
|
+
...weekDays.slice(weekStartsOn),
|
|
1085
|
+
...weekDays.slice(0, weekStartsOn),
|
|
1086
|
+
];
|
|
1087
|
+
|
|
1088
|
+
/** Days in a calendar week. */
|
|
1089
|
+
const DAYS_PER_WEEK = 7;
|
|
1090
|
+
/** Fixed number of week rows in the month grid, so its height never reflows between months. */
|
|
1091
|
+
const MONTH_GRID_ROWS = 6;
|
|
1092
|
+
/** Default cap on events shown in a month day cell before a "+N more" affordance appears. */
|
|
1093
|
+
const DEFAULT_MAX_EVENTS_PER_DAY = 3;
|
|
1094
|
+
/** `date-fns` format token for the month/week/day title in the header. */
|
|
1095
|
+
const MONTH_TITLE_FORMAT = 'MMMM yyyy';
|
|
1096
|
+
/** `date-fns` format token for a day-of-month number. */
|
|
1097
|
+
const DAY_NUMBER_FORMAT = 'd';
|
|
1098
|
+
/** `date-fns` format token for the single-day view title, e.g. "Monday, July 20, 2026". */
|
|
1099
|
+
const DAY_TITLE_FORMAT = 'EEEE, MMMM d, yyyy';
|
|
1100
|
+
/** Pixel height of one hour row in the week/day time-grid; drives event positioning too. */
|
|
1101
|
+
const HOUR_HEIGHT = 48;
|
|
1102
|
+
/** Minimum rendered height (px) for a timed event, so brief events stay readable. */
|
|
1103
|
+
const MIN_EVENT_HEIGHT = 24;
|
|
1104
|
+
/** Vertical pixels per minute in the time-grid, derived from the hour row height. */
|
|
1105
|
+
const PX_PER_MINUTE = HOUR_HEIGHT / 60;
|
|
1106
|
+
/** `date-fns` format token for a time-grid column heading, e.g. "Mon 20". */
|
|
1107
|
+
const TIME_GRID_HEADING_FORMAT = 'EEE d';
|
|
1108
|
+
/** `date-fns` format token for an hour label in the time gutter, e.g. "9 AM". */
|
|
1109
|
+
const HOUR_LABEL_FORMAT = 'h a';
|
|
1110
|
+
/** `date-fns` format token for an agenda day's weekday, e.g. "Wednesday". */
|
|
1111
|
+
const AGENDA_WEEKDAY_FORMAT = 'EEEE';
|
|
1112
|
+
/** `date-fns` format token for an agenda day's date, e.g. "Jul 22". */
|
|
1113
|
+
const AGENDA_DATE_FORMAT = 'MMM d';
|
|
1114
|
+
/** Views that prefix an event chip with its start time; the month grid shows the title alone. */
|
|
1115
|
+
const TIME_AWARE_VIEWS = ['week', 'day', 'agenda'];
|
|
1116
|
+
/** View switcher options. */
|
|
1117
|
+
const CALENDAR_VIEW_OPTIONS = [
|
|
1118
|
+
{ label: 'Month', value: 'month' },
|
|
1119
|
+
{ label: 'Week', value: 'week' },
|
|
1120
|
+
{ label: 'Day', value: 'day' },
|
|
1121
|
+
{ label: 'Agenda', value: 'agenda' },
|
|
1122
|
+
];
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Renders a single event as an interactive chip. Owns color resolution, the consumer
|
|
1126
|
+
* template-slot fallback, and click-to-select; the containing view owns placement
|
|
1127
|
+
* (a month cell's list, a time-grid block, an agenda row).
|
|
1128
|
+
*/
|
|
1129
|
+
class CalendarEventItem {
|
|
1130
|
+
// Inputs
|
|
1131
|
+
event = input.required(/* @ts-ignore */
|
|
1132
|
+
...(ngDevMode ? [{ debugName: "event" }] : /* istanbul ignore next */ []));
|
|
1133
|
+
view = input.required(/* @ts-ignore */
|
|
1134
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
1135
|
+
template = input(undefined, /* @ts-ignore */
|
|
1136
|
+
...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
|
|
1137
|
+
// Outputs
|
|
1138
|
+
activate = output();
|
|
1139
|
+
// Computed
|
|
1140
|
+
classes = computed(() => {
|
|
1141
|
+
const classes = ['tls-calendar-event__button'];
|
|
1142
|
+
const color = this.event().color;
|
|
1143
|
+
if (color !== undefined)
|
|
1144
|
+
classes.push(`tls-calendar-event__button--${color}`);
|
|
1145
|
+
return classes;
|
|
1146
|
+
}, /* @ts-ignore */
|
|
1147
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1148
|
+
context = computed(() => ({
|
|
1149
|
+
$implicit: this.event(),
|
|
1150
|
+
view: this.view(),
|
|
1151
|
+
}), /* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
1153
|
+
/** Time-aware views prefix the start time; the month grid shows the title alone. */
|
|
1154
|
+
defaultLabel = computed(() => {
|
|
1155
|
+
const event = this.event();
|
|
1156
|
+
const view = this.view();
|
|
1157
|
+
if (TIME_AWARE_VIEWS.includes(view) && event.allDay !== true) {
|
|
1158
|
+
return `${format(event.start, 'p')} ${event.title}`;
|
|
1159
|
+
}
|
|
1160
|
+
return event.title;
|
|
1161
|
+
}, /* @ts-ignore */
|
|
1162
|
+
...(ngDevMode ? [{ debugName: "defaultLabel" }] : /* istanbul ignore next */ []));
|
|
1163
|
+
// Protected methods
|
|
1164
|
+
onClick(mouseEvent) {
|
|
1165
|
+
// Keep the click from also triggering the containing day cell / column selection.
|
|
1166
|
+
mouseEvent.stopPropagation();
|
|
1167
|
+
this.activate.emit(this.event());
|
|
1168
|
+
}
|
|
1169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarEventItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CalendarEventItem, isStandalone: true, selector: "tls-calendar-event", inputs: { event: { classPropertyName: "event", publicName: "event", isSignal: true, isRequired: true, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: true, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activate: "activate" }, host: { classAttribute: "tls-calendar-event" }, ngImport: i0, template: "<button\n type=\"button\"\n tabindex=\"-1\"\n [class]=\"classes()\"\n (click)=\"onClick($event)\"\n>\n @if (template(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />\n } @else {\n <span class=\"tls-calendar-event__label\">{{ defaultLabel() }}</span>\n }\n</button>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1171
|
+
}
|
|
1172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarEventItem, decorators: [{
|
|
1173
|
+
type: Component,
|
|
1174
|
+
args: [{ selector: 'tls-calendar-event', imports: [NgTemplateOutlet], host: { class: 'tls-calendar-event' }, template: "<button\n type=\"button\"\n tabindex=\"-1\"\n [class]=\"classes()\"\n (click)=\"onClick($event)\"\n>\n @if (template(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />\n } @else {\n <span class=\"tls-calendar-event__label\">{{ defaultLabel() }}</span>\n }\n</button>\n" }]
|
|
1175
|
+
}], propDecorators: { event: [{ type: i0.Input, args: [{ isSignal: true, alias: "event", required: true }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], activate: [{ type: i0.Output, args: ["activate"] }] } });
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Whether `event` overlaps the calendar day `day`. Compared at day granularity via `startOfDay`,
|
|
1179
|
+
* so a spring-forward day (only 23h long) never mis-buckets an event into an adjacent column.
|
|
1180
|
+
* `day` is expected at midnight.
|
|
1181
|
+
*/
|
|
1182
|
+
const eventCoversDay = (event, day) => {
|
|
1183
|
+
const start = startOfDay(event.start);
|
|
1184
|
+
const end = startOfDay(event.end ?? event.start);
|
|
1185
|
+
return !isBefore(day, start) && !isAfter(day, end);
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Events overlapping `day`, sorted by start time. A multi-day event is returned for every day
|
|
1190
|
+
* it covers, so callers bucketing events per day get it in each. `day` is expected at midnight.
|
|
1191
|
+
*/
|
|
1192
|
+
const eventsForDay = (day, events) => events
|
|
1193
|
+
.filter(event => eventCoversDay(event, day))
|
|
1194
|
+
.sort((first, second) => first.start.getTime() - second.start.getTime());
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* A chronological list of the active month's events grouped by day; days without events are
|
|
1198
|
+
* omitted. Reuses the shared event chip and template slot; carries list — not grid — semantics.
|
|
1199
|
+
*/
|
|
1200
|
+
class CalendarAgendaView {
|
|
1201
|
+
// Inputs
|
|
1202
|
+
activeDate = input.required(/* @ts-ignore */
|
|
1203
|
+
...(ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []));
|
|
1204
|
+
events = input.required(/* @ts-ignore */
|
|
1205
|
+
...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
|
|
1206
|
+
eventTemplate = input(undefined, /* @ts-ignore */
|
|
1207
|
+
...(ngDevMode ? [{ debugName: "eventTemplate" }] : /* istanbul ignore next */ []));
|
|
1208
|
+
/** Accessible name for the agenda list. */
|
|
1209
|
+
label = input(undefined, /* @ts-ignore */
|
|
1210
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1211
|
+
// Outputs
|
|
1212
|
+
dateSelect = output();
|
|
1213
|
+
eventSelect = output();
|
|
1214
|
+
// Computed
|
|
1215
|
+
days = computed(() => {
|
|
1216
|
+
const activeDate = this.activeDate();
|
|
1217
|
+
const events = this.events();
|
|
1218
|
+
return eachDayOfInterval({ start: startOfMonth(activeDate), end: endOfMonth(activeDate) })
|
|
1219
|
+
.map(date => ({
|
|
1220
|
+
date,
|
|
1221
|
+
weekday: format(date, AGENDA_WEEKDAY_FORMAT),
|
|
1222
|
+
dateLabel: format(date, AGENDA_DATE_FORMAT),
|
|
1223
|
+
isToday: isToday(date),
|
|
1224
|
+
events: eventsForDay(date, events),
|
|
1225
|
+
}))
|
|
1226
|
+
.filter(day => day.events.length > 0);
|
|
1227
|
+
}, /* @ts-ignore */
|
|
1228
|
+
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
1229
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarAgendaView, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CalendarAgendaView, isStandalone: true, selector: "tls-calendar-agenda-view", inputs: { activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: true, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: true, transformFunction: null }, eventTemplate: { classPropertyName: "eventTemplate", publicName: "eventTemplate", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateSelect: "dateSelect", eventSelect: "eventSelect" }, host: { attributes: { "role": "list" }, properties: { "attr.aria-label": "label() ?? null" }, classAttribute: "tls-calendar-agenda-view" }, ngImport: i0, template: "@for (day of days(); track day.date.getTime()) {\n <div class=\"tls-calendar-agenda-view__day\" role=\"listitem\">\n <button\n type=\"button\"\n class=\"tls-calendar-agenda-view__date\"\n [class.tls-calendar-agenda-view__date--today]=\"day.isToday\"\n (click)=\"dateSelect.emit(day.date)\"\n >\n <span class=\"tls-calendar-agenda-view__weekday\">{{ day.weekday }}</span>\n <span class=\"tls-calendar-agenda-view__date-label\">{{ day.dateLabel }}</span>\n </button>\n\n <ul class=\"tls-calendar-agenda-view__events\">\n @for (event of day.events; track event.id) {\n <li>\n <tls-calendar-event\n view=\"agenda\"\n [event]=\"event\"\n [template]=\"eventTemplate()\"\n (activate)=\"eventSelect.emit($event)\"\n />\n </li>\n }\n </ul>\n </div>\n} @empty {\n <p class=\"tls-calendar-agenda-view__empty\">No events</p>\n}\n", dependencies: [{ kind: "component", type: CalendarEventItem, selector: "tls-calendar-event", inputs: ["event", "view", "template"], outputs: ["activate"] }] });
|
|
1231
|
+
}
|
|
1232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarAgendaView, decorators: [{
|
|
1233
|
+
type: Component,
|
|
1234
|
+
args: [{ selector: 'tls-calendar-agenda-view', imports: [CalendarEventItem], host: {
|
|
1235
|
+
class: 'tls-calendar-agenda-view',
|
|
1236
|
+
role: 'list',
|
|
1237
|
+
'[attr.aria-label]': 'label() ?? null',
|
|
1238
|
+
}, template: "@for (day of days(); track day.date.getTime()) {\n <div class=\"tls-calendar-agenda-view__day\" role=\"listitem\">\n <button\n type=\"button\"\n class=\"tls-calendar-agenda-view__date\"\n [class.tls-calendar-agenda-view__date--today]=\"day.isToday\"\n (click)=\"dateSelect.emit(day.date)\"\n >\n <span class=\"tls-calendar-agenda-view__weekday\">{{ day.weekday }}</span>\n <span class=\"tls-calendar-agenda-view__date-label\">{{ day.dateLabel }}</span>\n </button>\n\n <ul class=\"tls-calendar-agenda-view__events\">\n @for (event of day.events; track event.id) {\n <li>\n <tls-calendar-event\n view=\"agenda\"\n [event]=\"event\"\n [template]=\"eventTemplate()\"\n (activate)=\"eventSelect.emit($event)\"\n />\n </li>\n }\n </ul>\n </div>\n} @empty {\n <p class=\"tls-calendar-agenda-view__empty\">No events</p>\n}\n" }]
|
|
1239
|
+
}], propDecorators: { activeDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeDate", required: true }] }], events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: true }] }], eventTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventTemplate", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], eventSelect: [{ type: i0.Output, args: ["eventSelect"] }] } });
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Clips each event to the given week and packs them into shared lanes (first-fit): every event
|
|
1243
|
+
* gets the lowest lane whose occupied day-columns don't overlap it, so a multi-day event keeps
|
|
1244
|
+
* one continuous bar and non-overlapping events share a lane. Longer, earlier events settle into
|
|
1245
|
+
* the top lanes.
|
|
1246
|
+
*/
|
|
1247
|
+
const assignWeekLanes = (weekDays, events) => {
|
|
1248
|
+
const weekStart = startOfDay(weekDays[0]);
|
|
1249
|
+
const lastColumn = weekDays.length - 1;
|
|
1250
|
+
const segments = events
|
|
1251
|
+
.map(event => {
|
|
1252
|
+
const startColumn = differenceInCalendarDays(startOfDay(event.start), weekStart);
|
|
1253
|
+
const endColumn = differenceInCalendarDays(startOfDay(event.end ?? event.start), weekStart);
|
|
1254
|
+
return { event, startColumn, endColumn, startTime: event.start.getTime() };
|
|
1255
|
+
})
|
|
1256
|
+
.filter(segment => segment.endColumn >= 0 && segment.startColumn <= lastColumn)
|
|
1257
|
+
.map(segment => ({
|
|
1258
|
+
event: segment.event,
|
|
1259
|
+
startColumn: Math.max(0, segment.startColumn),
|
|
1260
|
+
endColumn: Math.min(lastColumn, segment.endColumn),
|
|
1261
|
+
continuesBefore: segment.startColumn < 0,
|
|
1262
|
+
continuesAfter: segment.endColumn > lastColumn,
|
|
1263
|
+
startTime: segment.startTime,
|
|
1264
|
+
}));
|
|
1265
|
+
// Earliest column first, then longest span, then earliest real start — so bars settle top-down.
|
|
1266
|
+
segments.sort((first, second) => {
|
|
1267
|
+
if (first.startColumn !== second.startColumn)
|
|
1268
|
+
return first.startColumn - second.startColumn;
|
|
1269
|
+
const firstSpan = first.endColumn - first.startColumn;
|
|
1270
|
+
const secondSpan = second.endColumn - second.startColumn;
|
|
1271
|
+
if (firstSpan !== secondSpan)
|
|
1272
|
+
return secondSpan - firstSpan;
|
|
1273
|
+
return first.startTime - second.startTime;
|
|
1274
|
+
});
|
|
1275
|
+
const laneRanges = [];
|
|
1276
|
+
return segments.map(segment => {
|
|
1277
|
+
let lane = 0;
|
|
1278
|
+
for (;;) {
|
|
1279
|
+
if (laneRanges[lane] === undefined)
|
|
1280
|
+
laneRanges[lane] = [];
|
|
1281
|
+
const ranges = laneRanges[lane];
|
|
1282
|
+
const overlaps = ranges.some(([start, end]) => segment.startColumn <= end && start <= segment.endColumn);
|
|
1283
|
+
if (!overlaps) {
|
|
1284
|
+
ranges.push([segment.startColumn, segment.endColumn]);
|
|
1285
|
+
break;
|
|
1286
|
+
}
|
|
1287
|
+
lane++;
|
|
1288
|
+
}
|
|
1289
|
+
return {
|
|
1290
|
+
event: segment.event,
|
|
1291
|
+
startColumn: segment.startColumn,
|
|
1292
|
+
endColumn: segment.endColumn,
|
|
1293
|
+
lane,
|
|
1294
|
+
continuesBefore: segment.continuesBefore,
|
|
1295
|
+
continuesAfter: segment.continuesAfter,
|
|
1296
|
+
};
|
|
1297
|
+
});
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
class CalendarMonthView {
|
|
1301
|
+
// Inputs
|
|
1302
|
+
activeDate = input.required(/* @ts-ignore */
|
|
1303
|
+
...(ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []));
|
|
1304
|
+
events = input.required(/* @ts-ignore */
|
|
1305
|
+
...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
|
|
1306
|
+
weekStartsOn = input.required(/* @ts-ignore */
|
|
1307
|
+
...(ngDevMode ? [{ debugName: "weekStartsOn" }] : /* istanbul ignore next */ []));
|
|
1308
|
+
weekDays = input.required(/* @ts-ignore */
|
|
1309
|
+
...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
|
|
1310
|
+
maxEventsPerDay = input.required(/* @ts-ignore */
|
|
1311
|
+
...(ngDevMode ? [{ debugName: "maxEventsPerDay" }] : /* istanbul ignore next */ []));
|
|
1312
|
+
eventTemplate = input(undefined, /* @ts-ignore */
|
|
1313
|
+
...(ngDevMode ? [{ debugName: "eventTemplate" }] : /* istanbul ignore next */ []));
|
|
1314
|
+
/** Accessible name for the grid, announced when focus enters it. */
|
|
1315
|
+
label = input(undefined, /* @ts-ignore */
|
|
1316
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1317
|
+
// Outputs
|
|
1318
|
+
dateSelect = output();
|
|
1319
|
+
eventSelect = output();
|
|
1320
|
+
// Computed
|
|
1321
|
+
weekdayHeaders = computed(() => rotateWeekDays(this.weekDays(), this.weekStartsOn()), /* @ts-ignore */
|
|
1322
|
+
...(ngDevMode ? [{ debugName: "weekdayHeaders" }] : /* istanbul ignore next */ []));
|
|
1323
|
+
weeks = computed(() => {
|
|
1324
|
+
const activeDate = this.activeDate();
|
|
1325
|
+
const maxLanes = this.maxEventsPerDay();
|
|
1326
|
+
const events = this.events();
|
|
1327
|
+
// A fixed 6-week window keeps the grid height from reflowing between months.
|
|
1328
|
+
const days = buildMonthDays(activeDate, this.weekStartsOn(), MONTH_GRID_ROWS);
|
|
1329
|
+
const weeks = [];
|
|
1330
|
+
for (let index = 0; index < days.length; index += DAYS_PER_WEEK) {
|
|
1331
|
+
const weekDays = days.slice(index, index + DAYS_PER_WEEK);
|
|
1332
|
+
const segments = assignWeekLanes(weekDays, events);
|
|
1333
|
+
const hiddenPerColumn = new Array(weekDays.length).fill(0);
|
|
1334
|
+
const bars = [];
|
|
1335
|
+
for (const segment of segments) {
|
|
1336
|
+
if (segment.lane < maxLanes) {
|
|
1337
|
+
bars.push({
|
|
1338
|
+
event: segment.event,
|
|
1339
|
+
gridColumn: `${segment.startColumn + 1} / span ${segment.endColumn - segment.startColumn + 1}`,
|
|
1340
|
+
gridRow: `${segment.lane + 1}`,
|
|
1341
|
+
continuesBefore: segment.continuesBefore,
|
|
1342
|
+
continuesAfter: segment.continuesAfter,
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
else {
|
|
1346
|
+
for (let column = segment.startColumn; column <= segment.endColumn; column++) {
|
|
1347
|
+
hiddenPerColumn[column]++;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
const cells = weekDays.map((date, column) => ({
|
|
1352
|
+
date,
|
|
1353
|
+
dayNumber: format(date, DAY_NUMBER_FORMAT),
|
|
1354
|
+
inCurrentMonth: isSameMonth(date, activeDate),
|
|
1355
|
+
isToday: isToday(date),
|
|
1356
|
+
hiddenCount: hiddenPerColumn[column],
|
|
1357
|
+
}));
|
|
1358
|
+
weeks.push({ days: cells, bars });
|
|
1359
|
+
}
|
|
1360
|
+
return weeks;
|
|
1361
|
+
}, /* @ts-ignore */
|
|
1362
|
+
...(ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []));
|
|
1363
|
+
// Protected methods
|
|
1364
|
+
/** Space would scroll the page; consume it and select the focused day instead. */
|
|
1365
|
+
onDaySpace(event, date) {
|
|
1366
|
+
event.preventDefault();
|
|
1367
|
+
this.dateSelect.emit(date);
|
|
1368
|
+
}
|
|
1369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarMonthView, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1370
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CalendarMonthView, isStandalone: true, selector: "tls-calendar-month-view", inputs: { activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: true, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", 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 }, maxEventsPerDay: { classPropertyName: "maxEventsPerDay", publicName: "maxEventsPerDay", isSignal: true, isRequired: true, transformFunction: null }, eventTemplate: { classPropertyName: "eventTemplate", publicName: "eventTemplate", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateSelect: "dateSelect", eventSelect: "eventSelect" }, host: { classAttribute: "tls-calendar-month-view" }, ngImport: i0, template: "<div class=\"tls-calendar-month-view__weekdays\" aria-hidden=\"true\">\n @for (weekday of weekdayHeaders(); track weekday) {\n <span class=\"tls-calendar-month-view__weekday\">{{ weekday }}</span>\n }\n</div>\n\n<div\n ngGrid\n class=\"tls-calendar-month-view__grid\"\n rowWrap=\"nowrap\"\n colWrap=\"nowrap\"\n [attr.aria-label]=\"label() ?? null\"\n [style.--tls-calendar-max-lanes]=\"maxEventsPerDay()\"\n>\n @for (week of weeks(); track $index) {\n <div ngGridRow class=\"tls-calendar-month-view__week\">\n @for (cell of week.days; track cell.date.getTime()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- ngGridCell manages role and roving tabindex -->\n <div\n ngGridCell\n class=\"tls-calendar-month-view__day\"\n [class.tls-calendar-month-view__day--outside]=\"!cell.inCurrentMonth\"\n [class.tls-calendar-month-view__day--today]=\"cell.isToday\"\n (click)=\"dateSelect.emit(cell.date)\"\n (keydown.enter)=\"dateSelect.emit(cell.date)\"\n (keydown.space)=\"onDaySpace($event, cell.date)\"\n >\n <span class=\"tls-calendar-month-view__day-number\">{{ cell.dayNumber }}</span>\n\n @if (cell.hiddenCount > 0) {\n <span class=\"tls-calendar-month-view__more\">+{{ cell.hiddenCount }} more</span>\n }\n </div>\n }\n\n <!-- Event bars span day columns and stack by lane, overlaid on the cells above. -->\n <div class=\"tls-calendar-month-view__bars\">\n @for (bar of week.bars; track bar.event.id) {\n <tls-calendar-event\n view=\"month\"\n class=\"tls-calendar-month-view__bar\"\n [class.tls-calendar-month-view__bar--continues-before]=\"bar.continuesBefore\"\n [class.tls-calendar-month-view__bar--continues-after]=\"bar.continuesAfter\"\n [event]=\"bar.event\"\n [template]=\"eventTemplate()\"\n [style.grid-column]=\"bar.gridColumn\"\n [style.grid-row]=\"bar.gridRow\"\n (activate)=\"eventSelect.emit($event)\"\n />\n }\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: Grid, selector: "[ngGrid]", inputs: ["enableSelection", "disabled", "softDisabled", "focusMode", "rowWrap", "colWrap", "multi", "selectionMode", "tabindex"], exportAs: ["ngGrid"] }, { kind: "directive", type: GridRow, selector: "[ngGridRow]", inputs: ["rowIndex"], exportAs: ["ngGridRow"] }, { kind: "directive", type: GridCell, selector: "[ngGridCell]", inputs: ["id", "role", "rowSpan", "colSpan", "rowIndex", "colIndex", "disabled", "selected", "selectable", "tabindex"], outputs: ["selectedChange"], exportAs: ["ngGridCell"] }, { kind: "component", type: CalendarEventItem, selector: "tls-calendar-event", inputs: ["event", "view", "template"], outputs: ["activate"] }] });
|
|
1371
|
+
}
|
|
1372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarMonthView, decorators: [{
|
|
1373
|
+
type: Component,
|
|
1374
|
+
args: [{ selector: 'tls-calendar-month-view', imports: [Grid, GridRow, GridCell, CalendarEventItem], host: { class: 'tls-calendar-month-view' }, template: "<div class=\"tls-calendar-month-view__weekdays\" aria-hidden=\"true\">\n @for (weekday of weekdayHeaders(); track weekday) {\n <span class=\"tls-calendar-month-view__weekday\">{{ weekday }}</span>\n }\n</div>\n\n<div\n ngGrid\n class=\"tls-calendar-month-view__grid\"\n rowWrap=\"nowrap\"\n colWrap=\"nowrap\"\n [attr.aria-label]=\"label() ?? null\"\n [style.--tls-calendar-max-lanes]=\"maxEventsPerDay()\"\n>\n @for (week of weeks(); track $index) {\n <div ngGridRow class=\"tls-calendar-month-view__week\">\n @for (cell of week.days; track cell.date.getTime()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- ngGridCell manages role and roving tabindex -->\n <div\n ngGridCell\n class=\"tls-calendar-month-view__day\"\n [class.tls-calendar-month-view__day--outside]=\"!cell.inCurrentMonth\"\n [class.tls-calendar-month-view__day--today]=\"cell.isToday\"\n (click)=\"dateSelect.emit(cell.date)\"\n (keydown.enter)=\"dateSelect.emit(cell.date)\"\n (keydown.space)=\"onDaySpace($event, cell.date)\"\n >\n <span class=\"tls-calendar-month-view__day-number\">{{ cell.dayNumber }}</span>\n\n @if (cell.hiddenCount > 0) {\n <span class=\"tls-calendar-month-view__more\">+{{ cell.hiddenCount }} more</span>\n }\n </div>\n }\n\n <!-- Event bars span day columns and stack by lane, overlaid on the cells above. -->\n <div class=\"tls-calendar-month-view__bars\">\n @for (bar of week.bars; track bar.event.id) {\n <tls-calendar-event\n view=\"month\"\n class=\"tls-calendar-month-view__bar\"\n [class.tls-calendar-month-view__bar--continues-before]=\"bar.continuesBefore\"\n [class.tls-calendar-month-view__bar--continues-after]=\"bar.continuesAfter\"\n [event]=\"bar.event\"\n [template]=\"eventTemplate()\"\n [style.grid-column]=\"bar.gridColumn\"\n [style.grid-row]=\"bar.gridRow\"\n (activate)=\"eventSelect.emit($event)\"\n />\n }\n </div>\n </div>\n }\n</div>\n" }]
|
|
1375
|
+
}], propDecorators: { activeDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeDate", required: true }] }], events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: true }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: true }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: true }] }], maxEventsPerDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxEventsPerDay", required: true }] }], eventTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventTemplate", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], eventSelect: [{ type: i0.Output, args: ["eventSelect"] }] } });
|
|
1376
|
+
|
|
1377
|
+
const eventEnd = (event) => (event.end ?? event.start).getTime();
|
|
1378
|
+
/**
|
|
1379
|
+
* Lays overlapping timed events out into side-by-side lanes. Events are grouped into clusters
|
|
1380
|
+
* of transitively-overlapping items; within each cluster every event gets a `lane` index and
|
|
1381
|
+
* the cluster's total `laneCount`, so a view can size each event to `1 / laneCount` of the
|
|
1382
|
+
* column width and offset it by its lane. Touching events (one ends exactly as the next starts)
|
|
1383
|
+
* share a lane rather than colliding.
|
|
1384
|
+
*/
|
|
1385
|
+
const assignEventLanes = (events) => {
|
|
1386
|
+
const sorted = [...events].sort((first, second) => {
|
|
1387
|
+
const startDifference = first.start.getTime() - second.start.getTime();
|
|
1388
|
+
if (startDifference !== 0)
|
|
1389
|
+
return startDifference;
|
|
1390
|
+
// Longer events first so they anchor the leftmost lanes.
|
|
1391
|
+
return eventEnd(second) - eventEnd(first);
|
|
1392
|
+
});
|
|
1393
|
+
const result = [];
|
|
1394
|
+
let cluster = [];
|
|
1395
|
+
let laneEnds = [];
|
|
1396
|
+
let clusterEnd = 0;
|
|
1397
|
+
const flushCluster = () => {
|
|
1398
|
+
for (const item of cluster)
|
|
1399
|
+
item.laneCount = laneEnds.length;
|
|
1400
|
+
result.push(...cluster);
|
|
1401
|
+
cluster = [];
|
|
1402
|
+
laneEnds = [];
|
|
1403
|
+
clusterEnd = 0;
|
|
1404
|
+
};
|
|
1405
|
+
for (const event of sorted) {
|
|
1406
|
+
const start = event.start.getTime();
|
|
1407
|
+
const end = eventEnd(event);
|
|
1408
|
+
// A gap from every active event closes the current cluster.
|
|
1409
|
+
if (cluster.length > 0 && start >= clusterEnd)
|
|
1410
|
+
flushCluster();
|
|
1411
|
+
let lane = laneEnds.findIndex(laneEnd => laneEnd <= start);
|
|
1412
|
+
if (lane === -1) {
|
|
1413
|
+
lane = laneEnds.length;
|
|
1414
|
+
laneEnds.push(end);
|
|
1415
|
+
}
|
|
1416
|
+
else {
|
|
1417
|
+
laneEnds[lane] = end;
|
|
1418
|
+
}
|
|
1419
|
+
cluster.push({ event, lane, laneCount: 0 });
|
|
1420
|
+
clusterEnd = Math.max(clusterEnd, end);
|
|
1421
|
+
}
|
|
1422
|
+
flushCluster();
|
|
1423
|
+
return result;
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* A time-grid of one or more day columns with an hour axis. Timed events are positioned by
|
|
1428
|
+
* their start/end and laid side-by-side when they overlap; all-day and multi-day events sit in
|
|
1429
|
+
* a header row. Shared by the week (seven columns) and day (single column) views.
|
|
1430
|
+
*/
|
|
1431
|
+
class CalendarTimeGrid {
|
|
1432
|
+
// Inputs
|
|
1433
|
+
days = input.required(/* @ts-ignore */
|
|
1434
|
+
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
1435
|
+
events = input.required(/* @ts-ignore */
|
|
1436
|
+
...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
|
|
1437
|
+
view = input.required(/* @ts-ignore */
|
|
1438
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
1439
|
+
hourStart = input.required(/* @ts-ignore */
|
|
1440
|
+
...(ngDevMode ? [{ debugName: "hourStart" }] : /* istanbul ignore next */ []));
|
|
1441
|
+
hourEnd = input.required(/* @ts-ignore */
|
|
1442
|
+
...(ngDevMode ? [{ debugName: "hourEnd" }] : /* istanbul ignore next */ []));
|
|
1443
|
+
showAllDayRow = input.required(/* @ts-ignore */
|
|
1444
|
+
...(ngDevMode ? [{ debugName: "showAllDayRow" }] : /* istanbul ignore next */ []));
|
|
1445
|
+
eventTemplate = input(undefined, /* @ts-ignore */
|
|
1446
|
+
...(ngDevMode ? [{ debugName: "eventTemplate" }] : /* istanbul ignore next */ []));
|
|
1447
|
+
/** Accessible name for the time-grid region. */
|
|
1448
|
+
label = input(undefined, /* @ts-ignore */
|
|
1449
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1450
|
+
// Outputs
|
|
1451
|
+
dateSelect = output();
|
|
1452
|
+
eventSelect = output();
|
|
1453
|
+
// State
|
|
1454
|
+
hourHeight = HOUR_HEIGHT;
|
|
1455
|
+
// Computed
|
|
1456
|
+
hours = computed(() => {
|
|
1457
|
+
const hours = [];
|
|
1458
|
+
for (let hour = this.hourStart(); hour < this.hourEnd(); hour++)
|
|
1459
|
+
hours.push(hour);
|
|
1460
|
+
return hours;
|
|
1461
|
+
}, /* @ts-ignore */
|
|
1462
|
+
...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
|
|
1463
|
+
columns = computed(() => {
|
|
1464
|
+
const events = this.events();
|
|
1465
|
+
const hourStart = this.hourStart();
|
|
1466
|
+
const hourEnd = this.hourEnd();
|
|
1467
|
+
return this.days().map(day => {
|
|
1468
|
+
const dayStart = startOfDay(day);
|
|
1469
|
+
const windowStart = addHours(dayStart, hourStart);
|
|
1470
|
+
const windowEnd = addHours(dayStart, hourEnd);
|
|
1471
|
+
const dayEvents = events.filter(event => eventCoversDay(event, dayStart));
|
|
1472
|
+
const allDayEvents = dayEvents.filter(event => this._isAllDay(event));
|
|
1473
|
+
const timed = dayEvents.filter(event => !this._isAllDay(event));
|
|
1474
|
+
const timedEvents = assignEventLanes(timed).map(laid => {
|
|
1475
|
+
const start = this._clamp(laid.event.start, windowStart, windowEnd);
|
|
1476
|
+
const end = this._clamp(laid.event.end ?? laid.event.start, windowStart, windowEnd);
|
|
1477
|
+
return {
|
|
1478
|
+
event: laid.event,
|
|
1479
|
+
lane: laid.lane,
|
|
1480
|
+
laneCount: laid.laneCount,
|
|
1481
|
+
top: differenceInMinutes(start, windowStart) * PX_PER_MINUTE,
|
|
1482
|
+
height: Math.max(MIN_EVENT_HEIGHT, differenceInMinutes(end, start) * PX_PER_MINUTE),
|
|
1483
|
+
};
|
|
1484
|
+
});
|
|
1485
|
+
return { date: day, isToday: isToday(day), heading: format(day, TIME_GRID_HEADING_FORMAT), allDayEvents, timedEvents };
|
|
1486
|
+
});
|
|
1487
|
+
}, /* @ts-ignore */
|
|
1488
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1489
|
+
/** Vertical offset (px) of the current-time line, or null when now is off-screen. */
|
|
1490
|
+
nowOffset = computed(() => {
|
|
1491
|
+
if (!this.days().some(day => isToday(day)))
|
|
1492
|
+
return null;
|
|
1493
|
+
const now = new Date();
|
|
1494
|
+
const dayStart = startOfDay(now);
|
|
1495
|
+
const windowStart = addHours(dayStart, this.hourStart());
|
|
1496
|
+
const windowEnd = addHours(dayStart, this.hourEnd());
|
|
1497
|
+
if (now.getTime() < windowStart.getTime() || now.getTime() > windowEnd.getTime())
|
|
1498
|
+
return null;
|
|
1499
|
+
return differenceInMinutes(now, windowStart) * PX_PER_MINUTE;
|
|
1500
|
+
}, /* @ts-ignore */
|
|
1501
|
+
...(ngDevMode ? [{ debugName: "nowOffset" }] : /* istanbul ignore next */ []));
|
|
1502
|
+
// Protected methods
|
|
1503
|
+
hourLabel(hour) {
|
|
1504
|
+
return format(addHours(startOfDay(new Date()), hour), HOUR_LABEL_FORMAT);
|
|
1505
|
+
}
|
|
1506
|
+
laneOffset(layout) {
|
|
1507
|
+
return (layout.lane * 100) / layout.laneCount;
|
|
1508
|
+
}
|
|
1509
|
+
laneWidth(layout) {
|
|
1510
|
+
return 100 / layout.laneCount;
|
|
1511
|
+
}
|
|
1512
|
+
// Private methods
|
|
1513
|
+
_isAllDay(event) {
|
|
1514
|
+
return event.allDay === true || !isSameDay(event.start, event.end ?? event.start);
|
|
1515
|
+
}
|
|
1516
|
+
_clamp(date, min, max) {
|
|
1517
|
+
return new Date(Math.min(Math.max(date.getTime(), min.getTime()), max.getTime()));
|
|
1518
|
+
}
|
|
1519
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarTimeGrid, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1520
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CalendarTimeGrid, isStandalone: true, selector: "tls-calendar-time-grid", inputs: { days: { classPropertyName: "days", publicName: "days", isSignal: true, isRequired: true, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: true, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: true, transformFunction: null }, hourStart: { classPropertyName: "hourStart", publicName: "hourStart", isSignal: true, isRequired: true, transformFunction: null }, hourEnd: { classPropertyName: "hourEnd", publicName: "hourEnd", isSignal: true, isRequired: true, transformFunction: null }, showAllDayRow: { classPropertyName: "showAllDayRow", publicName: "showAllDayRow", isSignal: true, isRequired: true, transformFunction: null }, eventTemplate: { classPropertyName: "eventTemplate", publicName: "eventTemplate", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateSelect: "dateSelect", eventSelect: "eventSelect" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "label() ?? null", "style.--tls-calendar-hour-height.px": "hourHeight", "style.--tls-calendar-columns": "days().length" }, classAttribute: "tls-calendar-time-grid" }, ngImport: i0, template: "<div class=\"tls-calendar-time-grid__header\">\n <div class=\"tls-calendar-time-grid__gutter-spacer\"></div>\n @for (column of columns(); track column.date.getTime()) {\n <button\n type=\"button\"\n class=\"tls-calendar-time-grid__heading\"\n [class.tls-calendar-time-grid__heading--today]=\"column.isToday\"\n (click)=\"dateSelect.emit(column.date)\"\n >\n {{ column.heading }}\n </button>\n }\n</div>\n\n@if (showAllDayRow()) {\n <div class=\"tls-calendar-time-grid__all-day\">\n <div class=\"tls-calendar-time-grid__gutter-label\">All day</div>\n @for (column of columns(); track column.date.getTime()) {\n <div class=\"tls-calendar-time-grid__all-day-cell\">\n @for (event of column.allDayEvents; track event.id) {\n <tls-calendar-event\n [view]=\"view()\"\n [event]=\"event\"\n [template]=\"eventTemplate()\"\n (activate)=\"eventSelect.emit($event)\"\n />\n }\n </div>\n }\n </div>\n}\n\n<div class=\"tls-calendar-time-grid__body\">\n <div class=\"tls-calendar-time-grid__gutter\">\n @for (hour of hours(); track hour) {\n <div class=\"tls-calendar-time-grid__hour-label\">{{ hourLabel(hour) }}</div>\n }\n </div>\n\n @for (column of columns(); track column.date.getTime()) {\n <div\n class=\"tls-calendar-time-grid__column\"\n [class.tls-calendar-time-grid__column--today]=\"column.isToday\"\n >\n @for (hour of hours(); track hour) {\n <div class=\"tls-calendar-time-grid__hour-line\"></div>\n }\n\n @for (layout of column.timedEvents; track layout.event.id) {\n <tls-calendar-event\n class=\"tls-calendar-time-grid__event\"\n [view]=\"view()\"\n [event]=\"layout.event\"\n [template]=\"eventTemplate()\"\n [style.top.px]=\"layout.top\"\n [style.height.px]=\"layout.height\"\n [style.inset-inline-start.%]=\"laneOffset(layout)\"\n [style.width.%]=\"laneWidth(layout)\"\n (activate)=\"eventSelect.emit($event)\"\n />\n }\n\n @if (column.isToday && nowOffset() !== null) {\n <div class=\"tls-calendar-time-grid__now\" [style.top.px]=\"nowOffset()\"></div>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: CalendarEventItem, selector: "tls-calendar-event", inputs: ["event", "view", "template"], outputs: ["activate"] }] });
|
|
1521
|
+
}
|
|
1522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CalendarTimeGrid, decorators: [{
|
|
1523
|
+
type: Component,
|
|
1524
|
+
args: [{ selector: 'tls-calendar-time-grid', imports: [CalendarEventItem], host: {
|
|
1525
|
+
class: 'tls-calendar-time-grid',
|
|
1526
|
+
role: 'group',
|
|
1527
|
+
'[attr.aria-label]': 'label() ?? null',
|
|
1528
|
+
'[style.--tls-calendar-hour-height.px]': 'hourHeight',
|
|
1529
|
+
'[style.--tls-calendar-columns]': 'days().length',
|
|
1530
|
+
}, template: "<div class=\"tls-calendar-time-grid__header\">\n <div class=\"tls-calendar-time-grid__gutter-spacer\"></div>\n @for (column of columns(); track column.date.getTime()) {\n <button\n type=\"button\"\n class=\"tls-calendar-time-grid__heading\"\n [class.tls-calendar-time-grid__heading--today]=\"column.isToday\"\n (click)=\"dateSelect.emit(column.date)\"\n >\n {{ column.heading }}\n </button>\n }\n</div>\n\n@if (showAllDayRow()) {\n <div class=\"tls-calendar-time-grid__all-day\">\n <div class=\"tls-calendar-time-grid__gutter-label\">All day</div>\n @for (column of columns(); track column.date.getTime()) {\n <div class=\"tls-calendar-time-grid__all-day-cell\">\n @for (event of column.allDayEvents; track event.id) {\n <tls-calendar-event\n [view]=\"view()\"\n [event]=\"event\"\n [template]=\"eventTemplate()\"\n (activate)=\"eventSelect.emit($event)\"\n />\n }\n </div>\n }\n </div>\n}\n\n<div class=\"tls-calendar-time-grid__body\">\n <div class=\"tls-calendar-time-grid__gutter\">\n @for (hour of hours(); track hour) {\n <div class=\"tls-calendar-time-grid__hour-label\">{{ hourLabel(hour) }}</div>\n }\n </div>\n\n @for (column of columns(); track column.date.getTime()) {\n <div\n class=\"tls-calendar-time-grid__column\"\n [class.tls-calendar-time-grid__column--today]=\"column.isToday\"\n >\n @for (hour of hours(); track hour) {\n <div class=\"tls-calendar-time-grid__hour-line\"></div>\n }\n\n @for (layout of column.timedEvents; track layout.event.id) {\n <tls-calendar-event\n class=\"tls-calendar-time-grid__event\"\n [view]=\"view()\"\n [event]=\"layout.event\"\n [template]=\"eventTemplate()\"\n [style.top.px]=\"layout.top\"\n [style.height.px]=\"layout.height\"\n [style.inset-inline-start.%]=\"laneOffset(layout)\"\n [style.width.%]=\"laneWidth(layout)\"\n (activate)=\"eventSelect.emit($event)\"\n />\n }\n\n @if (column.isToday && nowOffset() !== null) {\n <div class=\"tls-calendar-time-grid__now\" [style.top.px]=\"nowOffset()\"></div>\n }\n </div>\n }\n</div>\n" }]
|
|
1531
|
+
}], propDecorators: { days: [{ type: i0.Input, args: [{ isSignal: true, alias: "days", required: true }] }], events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: true }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: true }] }], hourStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStart", required: true }] }], hourEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourEnd", required: true }] }], showAllDayRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllDayRow", required: true }] }], eventTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventTemplate", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], eventSelect: [{ type: i0.Output, args: ["eventSelect"] }] } });
|
|
1532
|
+
|
|
1533
|
+
const DEFAULT_CALENDAR_CONFIG = {
|
|
1534
|
+
view: 'month',
|
|
1535
|
+
weekStartsOn: 0,
|
|
1536
|
+
weekDays: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
1537
|
+
hourStart: 0,
|
|
1538
|
+
hourEnd: 24,
|
|
1539
|
+
showAllDayRow: true,
|
|
1540
|
+
maxEventsPerDay: DEFAULT_MAX_EVENTS_PER_DAY,
|
|
1541
|
+
};
|
|
1542
|
+
|
|
1543
|
+
const CALENDAR_CONFIG = new InjectionToken('CALENDAR_CONFIG', {
|
|
1544
|
+
factory: () => DEFAULT_CALENDAR_CONFIG,
|
|
1545
|
+
});
|
|
1546
|
+
|
|
1547
|
+
class Calendar {
|
|
1548
|
+
// Injections
|
|
1549
|
+
_config = inject(CALENDAR_CONFIG);
|
|
1550
|
+
// Inputs
|
|
1551
|
+
events = input([], /* @ts-ignore */
|
|
1552
|
+
...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
|
|
1553
|
+
weekStartsOn = input(this._config.weekStartsOn, /* @ts-ignore */
|
|
1554
|
+
...(ngDevMode ? [{ debugName: "weekStartsOn" }] : /* istanbul ignore next */ []));
|
|
1555
|
+
weekDays = input(this._config.weekDays, /* @ts-ignore */
|
|
1556
|
+
...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
|
|
1557
|
+
hourStart = input(this._config.hourStart, /* @ts-ignore */
|
|
1558
|
+
...(ngDevMode ? [{ debugName: "hourStart" }] : /* istanbul ignore next */ []));
|
|
1559
|
+
hourEnd = input(this._config.hourEnd, /* @ts-ignore */
|
|
1560
|
+
...(ngDevMode ? [{ debugName: "hourEnd" }] : /* istanbul ignore next */ []));
|
|
1561
|
+
showAllDayRow = input(this._config.showAllDayRow, /* @ts-ignore */
|
|
1562
|
+
...(ngDevMode ? [{ debugName: "showAllDayRow" }] : /* istanbul ignore next */ []));
|
|
1563
|
+
maxEventsPerDay = input(this._config.maxEventsPerDay, /* @ts-ignore */
|
|
1564
|
+
...(ngDevMode ? [{ debugName: "maxEventsPerDay" }] : /* istanbul ignore next */ []));
|
|
1565
|
+
/** Accessible name forwarded to the active view's grid. */
|
|
1566
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
1567
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1568
|
+
// Outputs
|
|
1569
|
+
eventSelect = output();
|
|
1570
|
+
dateSelect = output();
|
|
1571
|
+
/** Fires whenever the visible span changes, so consumers can lazy-load that window's events. */
|
|
1572
|
+
rangeChange = output();
|
|
1573
|
+
// State
|
|
1574
|
+
view = model(this._config.view, /* @ts-ignore */
|
|
1575
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
1576
|
+
/** Anchor date driving the visible range; navigation shifts it by the view's unit. */
|
|
1577
|
+
activeDate = model(new Date(), /* @ts-ignore */
|
|
1578
|
+
...(ngDevMode ? [{ debugName: "activeDate" }] : /* istanbul ignore next */ []));
|
|
1579
|
+
viewOptions = CALENDAR_VIEW_OPTIONS;
|
|
1580
|
+
eventTemplate = contentChild('eventTemplate', /* @ts-ignore */
|
|
1581
|
+
...(ngDevMode ? [{ debugName: "eventTemplate" }] : /* istanbul ignore next */ []));
|
|
1582
|
+
// Computed
|
|
1583
|
+
hostClasses = computed(() => [
|
|
1584
|
+
'tls-calendar',
|
|
1585
|
+
`tls-calendar--${this.view()}`,
|
|
1586
|
+
], /* @ts-ignore */
|
|
1587
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1588
|
+
/** Whether the active period already includes today, so "Today" would be a no-op. */
|
|
1589
|
+
isViewingToday = computed(() => {
|
|
1590
|
+
const activeDate = this.activeDate();
|
|
1591
|
+
const now = new Date();
|
|
1592
|
+
switch (this.view()) {
|
|
1593
|
+
case 'week':
|
|
1594
|
+
return isSameWeek(activeDate, now, { weekStartsOn: this.weekStartsOn() });
|
|
1595
|
+
case 'day':
|
|
1596
|
+
return isSameDay(activeDate, now);
|
|
1597
|
+
default:
|
|
1598
|
+
return isSameMonth(activeDate, now);
|
|
1599
|
+
}
|
|
1600
|
+
}, /* @ts-ignore */
|
|
1601
|
+
...(ngDevMode ? [{ debugName: "isViewingToday" }] : /* istanbul ignore next */ []));
|
|
1602
|
+
title = computed(() => {
|
|
1603
|
+
const activeDate = this.activeDate();
|
|
1604
|
+
switch (this.view()) {
|
|
1605
|
+
case 'week':
|
|
1606
|
+
return this._weekTitle(activeDate);
|
|
1607
|
+
case 'day':
|
|
1608
|
+
return format(activeDate, DAY_TITLE_FORMAT);
|
|
1609
|
+
default:
|
|
1610
|
+
return format(activeDate, MONTH_TITLE_FORMAT);
|
|
1611
|
+
}
|
|
1612
|
+
}, /* @ts-ignore */
|
|
1613
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1614
|
+
visibleRange = computed(() => {
|
|
1615
|
+
const activeDate = this.activeDate();
|
|
1616
|
+
const weekStartsOn = this.weekStartsOn();
|
|
1617
|
+
switch (this.view()) {
|
|
1618
|
+
case 'week': {
|
|
1619
|
+
const { start, end } = this._weekBounds(activeDate);
|
|
1620
|
+
return { start, end: startOfDay(addDays(end, 1)) };
|
|
1621
|
+
}
|
|
1622
|
+
case 'day': {
|
|
1623
|
+
const start = startOfDay(activeDate);
|
|
1624
|
+
return { start, end: addDays(start, 1) };
|
|
1625
|
+
}
|
|
1626
|
+
case 'agenda': {
|
|
1627
|
+
// The agenda lists the calendar month proper, not the padded grid window.
|
|
1628
|
+
return { start: startOfMonth(activeDate), end: startOfDay(addDays(endOfMonth(activeDate), 1)) };
|
|
1629
|
+
}
|
|
1630
|
+
default: {
|
|
1631
|
+
// Mirror the month view's fixed 6-week window.
|
|
1632
|
+
const days = buildMonthDays(activeDate, weekStartsOn, MONTH_GRID_ROWS);
|
|
1633
|
+
return { start: days[0], end: addDays(days[days.length - 1], 1) };
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
}, /* @ts-ignore */
|
|
1637
|
+
...(ngDevMode ? [{ debugName: "visibleRange" }] : /* istanbul ignore next */ []));
|
|
1638
|
+
/** Day columns fed to the time-grid: a full week for `week`, a single day for `day`. */
|
|
1639
|
+
timeGridDays = computed(() => {
|
|
1640
|
+
const activeDate = this.activeDate();
|
|
1641
|
+
if (this.view() === 'day')
|
|
1642
|
+
return [startOfDay(activeDate)];
|
|
1643
|
+
return eachDayOfInterval(this._weekBounds(activeDate));
|
|
1644
|
+
}, /* @ts-ignore */
|
|
1645
|
+
...(ngDevMode ? [{ debugName: "timeGridDays" }] : /* istanbul ignore next */ []));
|
|
1646
|
+
constructor() {
|
|
1647
|
+
// Surface the visible window so consumers can fetch events for it (fires on first render too).
|
|
1648
|
+
effect(() => this.rangeChange.emit(this.visibleRange()));
|
|
1649
|
+
}
|
|
1650
|
+
// Public methods
|
|
1651
|
+
/** Moves to the next period in the current view's unit. */
|
|
1652
|
+
next() {
|
|
1653
|
+
this._step(1);
|
|
1654
|
+
}
|
|
1655
|
+
/** Moves to the previous period in the current view's unit. */
|
|
1656
|
+
previous() {
|
|
1657
|
+
this._step(-1);
|
|
1658
|
+
}
|
|
1659
|
+
/** Snaps the anchor date back to today. */
|
|
1660
|
+
today() {
|
|
1661
|
+
this.activeDate.set(startOfDay(new Date()));
|
|
1662
|
+
}
|
|
1663
|
+
// Protected methods
|
|
1664
|
+
onViewChange(views) {
|
|
1665
|
+
const [selected] = views;
|
|
1666
|
+
if (selected)
|
|
1667
|
+
this.view.set(selected);
|
|
1668
|
+
}
|
|
1669
|
+
// Private methods
|
|
1670
|
+
_step(amount) {
|
|
1671
|
+
switch (this.view()) {
|
|
1672
|
+
case 'week':
|
|
1673
|
+
this.activeDate.update(date => addWeeks(date, amount));
|
|
1674
|
+
break;
|
|
1675
|
+
case 'day':
|
|
1676
|
+
this.activeDate.update(date => addDays(date, amount));
|
|
1677
|
+
break;
|
|
1678
|
+
default:
|
|
1679
|
+
this.activeDate.update(date => addMonths(date, amount));
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
_weekBounds(activeDate) {
|
|
1683
|
+
const weekStartsOn = this.weekStartsOn();
|
|
1684
|
+
return {
|
|
1685
|
+
start: startOfWeek(activeDate, { weekStartsOn }),
|
|
1686
|
+
end: endOfWeek(activeDate, { weekStartsOn }),
|
|
1687
|
+
};
|
|
1688
|
+
}
|
|
1689
|
+
_weekTitle(activeDate) {
|
|
1690
|
+
const { start, end } = this._weekBounds(activeDate);
|
|
1691
|
+
return `${format(start, 'MMM d')} – ${format(end, 'MMM d, yyyy')}`;
|
|
1692
|
+
}
|
|
1693
|
+
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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\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", "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"] }] });
|
|
1695
|
+
}
|
|
1696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Calendar, decorators: [{
|
|
1697
|
+
type: Component,
|
|
1698
|
+
args: [{ selector: 'tls-calendar', imports: [Button, ToggleGroup, CalendarMonthView, CalendarTimeGrid, CalendarAgendaView], host: {
|
|
1699
|
+
'[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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\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
|
+
}], 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
|
+
|
|
1703
|
+
const DEFAULT_CHIP_CONFIG = {
|
|
1704
|
+
color: 'primary',
|
|
1705
|
+
variant: 'filled',
|
|
1706
|
+
size: 'md',
|
|
1707
|
+
};
|
|
1708
|
+
|
|
1709
|
+
const CHIP_CONFIG = new InjectionToken('CHIP_CONFIG', {
|
|
1710
|
+
factory: () => DEFAULT_CHIP_CONFIG,
|
|
1711
|
+
});
|
|
1712
|
+
|
|
1713
|
+
class Chip {
|
|
1714
|
+
_config = inject(CHIP_CONFIG);
|
|
1715
|
+
label = input(/* @ts-ignore */
|
|
1716
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1717
|
+
color = input(this._config.color, /* @ts-ignore */
|
|
1718
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
1719
|
+
variant = input(this._config.variant, /* @ts-ignore */
|
|
1720
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1721
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
1722
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1723
|
+
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1724
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1725
|
+
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1726
|
+
context = signal({
|
|
1727
|
+
checked: false,
|
|
1728
|
+
disabled: false,
|
|
1729
|
+
readonly: false,
|
|
1730
|
+
touched: false,
|
|
1731
|
+
dirty: false,
|
|
1732
|
+
invalid: false,
|
|
1733
|
+
pending: false,
|
|
1734
|
+
}, /* @ts-ignore */
|
|
1735
|
+
...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
1736
|
+
startIconTemplate = contentChild('startIcon', /* @ts-ignore */
|
|
1737
|
+
...(ngDevMode ? [{ debugName: "startIconTemplate" }] : /* istanbul ignore next */ []));
|
|
1738
|
+
endIconTemplate = contentChild('endIcon', /* @ts-ignore */
|
|
1739
|
+
...(ngDevMode ? [{ debugName: "endIconTemplate" }] : /* istanbul ignore next */ []));
|
|
1740
|
+
classes = computed(() => {
|
|
1741
|
+
const className = 'tls-chip';
|
|
1742
|
+
const array = [className];
|
|
1743
|
+
array.push(`${className}--${this.color()}`);
|
|
1744
|
+
array.push(`${className}--${this.variant()}`);
|
|
1745
|
+
array.push(`${className}--${this.size()}`);
|
|
1746
|
+
if (this.rounded())
|
|
1747
|
+
array.push(`${className}--rounded`);
|
|
1748
|
+
if (this.icon())
|
|
1749
|
+
array.push(`${className}--icon`);
|
|
1750
|
+
if (this.fluid())
|
|
1751
|
+
array.push(`${className}--fluid`);
|
|
1752
|
+
return array;
|
|
1753
|
+
}, /* @ts-ignore */
|
|
1754
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1756
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Chip, isStandalone: true, selector: "tls-chip", inputs: { label: { classPropertyName: "label", publicName: "label", 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 }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, queries: [{ propertyName: "startIconTemplate", first: true, predicate: ["startIcon"], descendants: true, isSignal: true }, { propertyName: "endIconTemplate", first: true, predicate: ["endIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1757
|
+
}
|
|
1758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Chip, decorators: [{
|
|
1759
|
+
type: Component,
|
|
1760
|
+
args: [{ selector: 'tls-chip', imports: [NgTemplateOutlet], host: {
|
|
1761
|
+
'[class]': 'classes()',
|
|
1762
|
+
}, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n" }]
|
|
1763
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], startIconTemplate: [{ type: i0.ContentChild, args: ['startIcon', { isSignal: true }] }], endIconTemplate: [{ type: i0.ContentChild, args: ['endIcon', { isSignal: true }] }] } });
|
|
1764
|
+
|
|
1765
|
+
const DEFAULT_CHIP_CONTROL_CONFIG = {
|
|
1766
|
+
checkedColor: undefined,
|
|
1767
|
+
checkedVariant: undefined,
|
|
1139
1768
|
};
|
|
1140
1769
|
|
|
1770
|
+
const CHIP_CONTROL_CONFIG = new InjectionToken('CHIP_CONTROL_CONFIG', {
|
|
1771
|
+
factory: () => DEFAULT_CHIP_CONTROL_CONFIG,
|
|
1772
|
+
});
|
|
1773
|
+
|
|
1774
|
+
class ChipControl extends CheckboxFormControl {
|
|
1775
|
+
CLASS_NAME = 'tls-chip';
|
|
1776
|
+
_config = inject(CHIP_CONTROL_CONFIG);
|
|
1777
|
+
_chip = inject(Chip);
|
|
1778
|
+
checked = model(false, /* @ts-ignore */
|
|
1779
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
1780
|
+
checkedColor = input(this._config.checkedColor, /* @ts-ignore */
|
|
1781
|
+
...(ngDevMode ? [{ debugName: "checkedColor" }] : /* istanbul ignore next */ []));
|
|
1782
|
+
checkedVariant = input(this._config.checkedVariant, /* @ts-ignore */
|
|
1783
|
+
...(ngDevMode ? [{ debugName: "checkedVariant" }] : /* istanbul ignore next */ []));
|
|
1784
|
+
hostClasses = computed(() => {
|
|
1785
|
+
const classes = ['tls-chip--control'];
|
|
1786
|
+
if (this.checked()) {
|
|
1787
|
+
classes.push('tls-chip--checked');
|
|
1788
|
+
const color = this.checkedColor();
|
|
1789
|
+
if (color)
|
|
1790
|
+
classes.push(`tls-chip--checked-${color}`);
|
|
1791
|
+
const variant = this.checkedVariant();
|
|
1792
|
+
if (variant)
|
|
1793
|
+
classes.push(`tls-chip--checked-${variant}`);
|
|
1794
|
+
}
|
|
1795
|
+
if (this.disabled())
|
|
1796
|
+
classes.push('tls-chip--disabled');
|
|
1797
|
+
return classes;
|
|
1798
|
+
}, /* @ts-ignore */
|
|
1799
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
1800
|
+
constructor() {
|
|
1801
|
+
super();
|
|
1802
|
+
effect(() => this._chip.context.set({
|
|
1803
|
+
checked: this.checked(),
|
|
1804
|
+
disabled: this.disabled(),
|
|
1805
|
+
readonly: this.readonly(),
|
|
1806
|
+
touched: this.touched(),
|
|
1807
|
+
dirty: this.dirty(),
|
|
1808
|
+
invalid: this.invalid(),
|
|
1809
|
+
pending: this.pending(),
|
|
1810
|
+
}));
|
|
1811
|
+
}
|
|
1812
|
+
toggle() {
|
|
1813
|
+
if (this.notInteractive())
|
|
1814
|
+
return;
|
|
1815
|
+
this.checked.update(prev => !prev);
|
|
1816
|
+
}
|
|
1817
|
+
onKeyboardToggle(event) {
|
|
1818
|
+
event.preventDefault();
|
|
1819
|
+
this.toggle();
|
|
1820
|
+
}
|
|
1821
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1822
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: ChipControl, isStandalone: true, selector: "tls-chip[tlsChipControl]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, checkedColor: { classPropertyName: "checkedColor", publicName: "checkedColor", isSignal: true, isRequired: false, transformFunction: null }, checkedVariant: { classPropertyName: "checkedVariant", publicName: "checkedVariant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, listeners: { "click": "toggle()", "blur": "touched.set(true)", "keydown.space": "onKeyboardToggle($event)", "keydown.enter": "onKeyboardToggle($event)" }, properties: { "class": "hostClasses()", "tabindex": "disabled() ? -1 : 0", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipControl) }], usesInheritance: true, ngImport: i0 });
|
|
1823
|
+
}
|
|
1824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChipControl, decorators: [{
|
|
1825
|
+
type: Directive,
|
|
1826
|
+
args: [{
|
|
1827
|
+
selector: 'tls-chip[tlsChipControl]',
|
|
1828
|
+
host: {
|
|
1829
|
+
role: 'checkbox',
|
|
1830
|
+
'[class]': 'hostClasses()',
|
|
1831
|
+
'[tabindex]': 'disabled() ? -1 : 0',
|
|
1832
|
+
'[attr.aria-checked]': 'checked()',
|
|
1833
|
+
'[attr.aria-disabled]': 'disabled()',
|
|
1834
|
+
'(click)': 'toggle()',
|
|
1835
|
+
'(blur)': 'touched.set(true)',
|
|
1836
|
+
'(keydown.space)': 'onKeyboardToggle($event)',
|
|
1837
|
+
'(keydown.enter)': 'onKeyboardToggle($event)',
|
|
1838
|
+
},
|
|
1839
|
+
providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ChipControl) }],
|
|
1840
|
+
}]
|
|
1841
|
+
}], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], checkedColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkedColor", required: false }] }], checkedVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkedVariant", required: false }] }] } });
|
|
1842
|
+
|
|
1141
1843
|
const DEFAULT_CONFIRM_CONFIG = {
|
|
1142
1844
|
position: 'bottom',
|
|
1143
1845
|
offset: { x: 0, y: 4 },
|
|
@@ -2333,7 +3035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2333
3035
|
}]
|
|
2334
3036
|
}], propDecorators: { _templateRef: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
2335
3037
|
|
|
2336
|
-
class
|
|
3038
|
+
class DatePickerCalendar {
|
|
2337
3039
|
// Inputs
|
|
2338
3040
|
viewDate = input.required(/* @ts-ignore */
|
|
2339
3041
|
...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
@@ -2348,23 +3050,11 @@ class Calendar {
|
|
|
2348
3050
|
viewDateChange = output();
|
|
2349
3051
|
navigateUp = output();
|
|
2350
3052
|
// Computed
|
|
2351
|
-
displayedWeekDays = computed(() =>
|
|
2352
|
-
const startDay = this.weekStartsOn();
|
|
2353
|
-
const days = this.weekDays();
|
|
2354
|
-
return [...days.slice(startDay), ...days.slice(0, startDay)];
|
|
2355
|
-
}, /* @ts-ignore */
|
|
3053
|
+
displayedWeekDays = computed(() => rotateWeekDays(this.weekDays(), this.weekStartsOn()), /* @ts-ignore */
|
|
2356
3054
|
...(ngDevMode ? [{ debugName: "displayedWeekDays" }] : /* istanbul ignore next */ []));
|
|
2357
3055
|
headerLabel = computed(() => format(this.viewDate(), 'MMMM yyyy'), /* @ts-ignore */
|
|
2358
3056
|
...(ngDevMode ? [{ debugName: "headerLabel" }] : /* istanbul ignore next */ []));
|
|
2359
|
-
days = computed(() =>
|
|
2360
|
-
const monthStart = startOfMonth(this.viewDate());
|
|
2361
|
-
const monthEnd = endOfMonth(this.viewDate());
|
|
2362
|
-
const weekStartsOn = this.weekStartsOn();
|
|
2363
|
-
return eachDayOfInterval({
|
|
2364
|
-
start: startOfWeek(monthStart, { weekStartsOn }),
|
|
2365
|
-
end: endOfWeek(monthEnd, { weekStartsOn }),
|
|
2366
|
-
});
|
|
2367
|
-
}, /* @ts-ignore */
|
|
3057
|
+
days = computed(() => buildMonthDays(this.viewDate(), this.weekStartsOn()), /* @ts-ignore */
|
|
2368
3058
|
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
2369
3059
|
// Protected methods
|
|
2370
3060
|
prevMonth() {
|
|
@@ -2386,12 +3076,12 @@ class Calendar {
|
|
|
2386
3076
|
isTodayDay(day) {
|
|
2387
3077
|
return isToday(day);
|
|
2388
3078
|
}
|
|
2389
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type:
|
|
2390
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type:
|
|
3079
|
+
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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\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" });
|
|
2391
3081
|
}
|
|
2392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type:
|
|
3082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DatePickerCalendar, decorators: [{
|
|
2393
3083
|
type: Component,
|
|
2394
|
-
args: [{ selector: 'tls-calendar', imports: [], host: { class: 'tls-calendar' }, template: "<div class=\"tls-calendar__header\">\n <button type=\"button\" class=\"tls-calendar__nav\" (click)=\"prevMonth()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <button type=\"button\" class=\"tls-calendar__header-button\" (click)=\"navigateUp.emit()\">\n {{ headerLabel() }}\n </button>\n <button type=\"button\" class=\"tls-calendar__nav\" (click)=\"nextMonth()\">\n <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<div class=\"tls-calendar__grid\">\n @for (day of displayedWeekDays(); track day) {\n <span class=\"tls-calendar__weekday\">{{ day }}</span>\n }\n @for (day of days(); track day.getTime()) {\n <button\n type=\"button\"\n class=\"tls-calendar__day\"\n [class.tls-calendar__day--outside]=\"!isInCurrentMonth(day)\"\n [class.tls-calendar__day--today]=\"isTodayDay(day)\"\n [class.tls-calendar__day--selected]=\"isSelectedDay(day)\"\n (click)=\"daySelect.emit(day)\"\n >\n {{ getDayLabel(day) }}\n </button>\n }\n</div>\n" }]
|
|
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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M7 1L1 7L7 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\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 <svg viewBox=\"0 0 8 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M1 1L7 7L1 13\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\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" }]
|
|
2395
3085
|
}], 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"] }] } });
|
|
2396
3086
|
|
|
2397
3087
|
const DEFAULT_DATE_TIME_PICKER_CONFIG = {
|
|
@@ -2653,11 +3343,19 @@ class DateTimePicker extends ValueFormControl {
|
|
|
2653
3343
|
this.value.set(date);
|
|
2654
3344
|
}
|
|
2655
3345
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2656
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DateTimePicker, isStandalone: true, selector: "tls-date-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", 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 }, yearsPerPage: { classPropertyName: "yearsPerPage", publicName: "yearsPerPage", 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 } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => DateTimePicker) }], viewQueries: [{ propertyName: "popoverComponent", first: true, predicate: ["popoverRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #pickerTemplate>\n @switch (activeView()) {\n @case ('calendar') {\n <tls-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n }\n @case ('month-picker') {\n <tls-month-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n (monthSelect)=\"onMonthSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('year-picker')\"\n />\n }\n @case ('year-picker') {\n <tls-year-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [yearsPerPage]=\"yearsPerPage()\"\n (yearSelect)=\"onYearSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n />\n }\n @case ('time-picker') {\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n @case ('date-time') {\n <tls-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n }\n</ng-template>\n\n@if (inline()) {\n <div\n class=\"tls-date-time-picker__panel\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-date-time-picker__panel--disabled]=\"disabled()\"\n [class.tls-date-time-picker__panel--readonly]=\"readonly()\"\n [class.tls-date-time-picker__panel--invalid]=\"invalid()\"\n >\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"tls-date-time-picker__trigger\"\n aria-haspopup=\"dialog\"\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 [attr.aria-expanded]=\"popoverRef.isOpen()\"\n [disabled]=\"disabled()\"\n (click)=\"popoverRef.toggle($event)\"\n (blur)=\"touched.set(true)\"\n >\n <span [class.tls-form-control__placeholder]=\"!value()\">{{ triggerLabel() }}</span>\n @if (pending()) {\n <tls-loader class=\"tls-date-time-picker__spinner\" size=\"xs\" aria-hidden=\"true\" />\n }\n </button>\n <tls-popover #popoverRef position=\"bottom-start\">\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </tls-popover>\n}\n", dependencies: [{ kind: "component", type:
|
|
3346
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DateTimePicker, isStandalone: true, selector: "tls-date-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", 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 }, yearsPerPage: { classPropertyName: "yearsPerPage", publicName: "yearsPerPage", 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 } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => DateTimePicker) }], viewQueries: [{ propertyName: "popoverComponent", first: true, predicate: ["popoverRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #pickerTemplate>\n @switch (activeView()) {\n @case ('calendar') {\n <tls-date-picker-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n }\n @case ('month-picker') {\n <tls-month-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n (monthSelect)=\"onMonthSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('year-picker')\"\n />\n }\n @case ('year-picker') {\n <tls-year-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [yearsPerPage]=\"yearsPerPage()\"\n (yearSelect)=\"onYearSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n />\n }\n @case ('time-picker') {\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n @case ('date-time') {\n <tls-date-picker-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n }\n</ng-template>\n\n@if (inline()) {\n <div\n class=\"tls-date-time-picker__panel\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-date-time-picker__panel--disabled]=\"disabled()\"\n [class.tls-date-time-picker__panel--readonly]=\"readonly()\"\n [class.tls-date-time-picker__panel--invalid]=\"invalid()\"\n >\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"tls-date-time-picker__trigger\"\n aria-haspopup=\"dialog\"\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 [attr.aria-expanded]=\"popoverRef.isOpen()\"\n [disabled]=\"disabled()\"\n (click)=\"popoverRef.toggle($event)\"\n (blur)=\"touched.set(true)\"\n >\n <span [class.tls-form-control__placeholder]=\"!value()\">{{ triggerLabel() }}</span>\n @if (pending()) {\n <tls-loader class=\"tls-date-time-picker__spinner\" size=\"xs\" aria-hidden=\"true\" />\n }\n </button>\n <tls-popover #popoverRef position=\"bottom-start\">\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </tls-popover>\n}\n", dependencies: [{ kind: "component", type: DatePickerCalendar, selector: "tls-date-picker-calendar", inputs: ["viewDate", "selectedDate", "weekStartsOn", "weekDays"], outputs: ["daySelect", "viewDateChange", "navigateUp"] }, { kind: "component", type: MonthPicker, selector: "tls-month-picker", inputs: ["viewDate", "selectedDate"], outputs: ["monthSelect", "viewDateChange", "navigateUp"] }, { kind: "component", type: YearPicker, selector: "tls-year-picker", inputs: ["viewDate", "selectedDate", "yearsPerPage"], outputs: ["yearSelect", "viewDateChange"] }, { kind: "component", type: TimePicker, selector: "tls-time-picker", inputs: ["value"], outputs: ["timeChange"] }, { kind: "component", type: Popover, selector: "tls-popover", inputs: ["position", "offset", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Loader, selector: "tls-loader", inputs: ["size", "width", "widthRatio", "ariaLabel"] }] });
|
|
2657
3347
|
}
|
|
2658
3348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateTimePicker, decorators: [{
|
|
2659
3349
|
type: Component,
|
|
2660
|
-
args: [{ selector: 'tls-date-time-picker', imports: [
|
|
3350
|
+
args: [{ selector: 'tls-date-time-picker', imports: [
|
|
3351
|
+
DatePickerCalendar,
|
|
3352
|
+
MonthPicker,
|
|
3353
|
+
YearPicker,
|
|
3354
|
+
TimePicker,
|
|
3355
|
+
Popover,
|
|
3356
|
+
NgTemplateOutlet,
|
|
3357
|
+
Loader,
|
|
3358
|
+
], host: { '[class]': 'hostClasses()' }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => DateTimePicker) }], template: "<ng-template #pickerTemplate>\n @switch (activeView()) {\n @case ('calendar') {\n <tls-date-picker-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n }\n @case ('month-picker') {\n <tls-month-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n (monthSelect)=\"onMonthSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('year-picker')\"\n />\n }\n @case ('year-picker') {\n <tls-year-picker\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [yearsPerPage]=\"yearsPerPage()\"\n (yearSelect)=\"onYearSelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n />\n }\n @case ('time-picker') {\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n @case ('date-time') {\n <tls-date-picker-calendar\n [viewDate]=\"viewDate()\"\n [selectedDate]=\"value()\"\n [weekStartsOn]=\"weekStartsOn()\"\n [weekDays]=\"weekDays()\"\n (daySelect)=\"onDaySelect($event)\"\n (viewDateChange)=\"onViewDateChange($event)\"\n (navigateUp)=\"activeView.set('month-picker')\"\n />\n <tls-time-picker\n [value]=\"value()\"\n (timeChange)=\"onTimeChange($event)\"\n />\n }\n }\n</ng-template>\n\n@if (inline()) {\n <div\n class=\"tls-date-time-picker__panel\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.tls-date-time-picker__panel--disabled]=\"disabled()\"\n [class.tls-date-time-picker__panel--readonly]=\"readonly()\"\n [class.tls-date-time-picker__panel--invalid]=\"invalid()\"\n >\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"tls-date-time-picker__trigger\"\n aria-haspopup=\"dialog\"\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 [attr.aria-expanded]=\"popoverRef.isOpen()\"\n [disabled]=\"disabled()\"\n (click)=\"popoverRef.toggle($event)\"\n (blur)=\"touched.set(true)\"\n >\n <span [class.tls-form-control__placeholder]=\"!value()\">{{ triggerLabel() }}</span>\n @if (pending()) {\n <tls-loader class=\"tls-date-time-picker__spinner\" size=\"xs\" aria-hidden=\"true\" />\n }\n </button>\n <tls-popover #popoverRef position=\"bottom-start\">\n <ng-container [ngTemplateOutlet]=\"pickerTemplate\" />\n </tls-popover>\n}\n" }]
|
|
2661
3359
|
}], ctorParameters: () => [], propDecorators: { popoverComponent: [{ type: i0.ViewChild, args: ['popoverRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], 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 }] }], yearsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "yearsPerPage", required: false }] }], weekStartsOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartsOn", required: false }] }], weekDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDays", required: false }] }] } });
|
|
2662
3360
|
|
|
2663
3361
|
const DEFAULT_CHIP_GROUP_CONFIG = {
|
|
@@ -3620,66 +4318,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3620
4318
|
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"] }]
|
|
3621
4319
|
}], 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 }] }] } });
|
|
3622
4320
|
|
|
3623
|
-
const DEFAULT_TOGGLE_GROUP_CONFIG = {
|
|
3624
|
-
size: 'md',
|
|
3625
|
-
color: 'primary',
|
|
3626
|
-
orientation: 'horizontal',
|
|
3627
|
-
multiple: false,
|
|
3628
|
-
unselectable: false,
|
|
3629
|
-
fluid: false,
|
|
3630
|
-
};
|
|
3631
|
-
|
|
3632
|
-
const TOGGLE_GROUP_CONFIG = new InjectionToken('TOGGLE_GROUP_CONFIG', {
|
|
3633
|
-
factory: () => DEFAULT_TOGGLE_GROUP_CONFIG,
|
|
3634
|
-
});
|
|
3635
|
-
|
|
3636
|
-
/**
|
|
3637
|
-
* `value` is always an array — in single mode (`multiple = false`) it holds 0 or
|
|
3638
|
-
* 1 items, read it as `value()[0]`. See {@link SelectionGroup} for the contract.
|
|
3639
|
-
*/
|
|
3640
|
-
class ToggleGroup extends SelectionGroup {
|
|
3641
|
-
_config = inject(TOGGLE_GROUP_CONFIG);
|
|
3642
|
-
CLASS_NAME = 'tls-toggle-group';
|
|
3643
|
-
multiple = input(this._config.multiple, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3644
|
-
unselectable = input(this._config.unselectable, { ...(ngDevMode ? { debugName: "unselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3645
|
-
size = input(this._config.size, /* @ts-ignore */
|
|
3646
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3647
|
-
color = input(this._config.color, /* @ts-ignore */
|
|
3648
|
-
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3649
|
-
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
3650
|
-
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
3651
|
-
/** Whether the group stretches to fill its container's width with equal-width options. */
|
|
3652
|
-
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3653
|
-
optionTemplate = contentChild('option', /* @ts-ignore */
|
|
3654
|
-
...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
3655
|
-
classes = computed(() => {
|
|
3656
|
-
const className = this.CLASS_NAME;
|
|
3657
|
-
const array = [
|
|
3658
|
-
className,
|
|
3659
|
-
`${className}--${this.size()}`,
|
|
3660
|
-
`${className}--${this.color()}`,
|
|
3661
|
-
`${className}--${this.orientation()}`,
|
|
3662
|
-
];
|
|
3663
|
-
if (this.fluid())
|
|
3664
|
-
array.push(`${className}--fluid`);
|
|
3665
|
-
return array.concat(this.controlClasses());
|
|
3666
|
-
}, /* @ts-ignore */
|
|
3667
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3668
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3669
|
-
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"] }] });
|
|
3670
|
-
}
|
|
3671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleGroup, decorators: [{
|
|
3672
|
-
type: Component,
|
|
3673
|
-
args: [{ selector: 'tls-toggle-group', imports: [NgTemplateOutlet], providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => ToggleGroup) }], host: {
|
|
3674
|
-
role: 'group',
|
|
3675
|
-
'[class]': 'classes()',
|
|
3676
|
-
'[attr.aria-label]': 'ariaLabel() ?? null',
|
|
3677
|
-
'[attr.aria-labelledby]': 'labelledBy()',
|
|
3678
|
-
'[attr.aria-describedby]': 'describedBy()',
|
|
3679
|
-
'[attr.aria-invalid]': "invalid() ? 'true' : null",
|
|
3680
|
-
}, 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" }]
|
|
3681
|
-
}], 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 }] }] } });
|
|
3682
|
-
|
|
3683
4321
|
class IconService {
|
|
3684
4322
|
_http = inject(HttpClient);
|
|
3685
4323
|
_sanitizer = inject(DomSanitizer);
|
|
@@ -3889,11 +4527,11 @@ class Menu {
|
|
|
3889
4527
|
this.close();
|
|
3890
4528
|
}
|
|
3891
4529
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3892
|
-
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
|
|
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"] }] });
|
|
3893
4531
|
}
|
|
3894
4532
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Menu, decorators: [{
|
|
3895
4533
|
type: Component,
|
|
3896
|
-
args: [{ selector: 'tls-menu', imports: [NgTemplateOutlet, Icon, RouterLink], 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
|
|
4534
|
+
args: [{ selector: 'tls-menu', imports: [NgTemplateOutlet, Icon, RouterLink, Menu$1, MenuItem], 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" }]
|
|
3897
4535
|
}], ctorParameters: () => [], propDecorators: { _panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], _customItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItemComponent), { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['itemTemplate', { isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['labelTemplate', { isSignal: true }] }], dividerTemplate: [{ type: i0.ContentChild, args: ['dividerTemplate', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['iconTemplate', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }] } });
|
|
3898
4536
|
|
|
3899
4537
|
class MenuTriggerDirective {
|
|
@@ -4384,15 +5022,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
4384
5022
|
}]
|
|
4385
5023
|
}], 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 }] }] } });
|
|
4386
5024
|
|
|
4387
|
-
class StepperService {
|
|
4388
|
-
active = null;
|
|
4389
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4390
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService });
|
|
4391
|
-
}
|
|
4392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: StepperService, decorators: [{
|
|
4393
|
-
type: Injectable
|
|
4394
|
-
}] });
|
|
4395
|
-
|
|
4396
5025
|
const DEFAULT_STEP_CONFIG = {
|
|
4397
5026
|
color: 'primary',
|
|
4398
5027
|
};
|
|
@@ -4408,14 +5037,13 @@ const STEPPER_CONFIG = new InjectionToken('STEPPER_CONFIG', {
|
|
|
4408
5037
|
|
|
4409
5038
|
class Step {
|
|
4410
5039
|
_config = inject(STEPPER_CONFIG);
|
|
4411
|
-
|
|
5040
|
+
_tabPanel = inject(TabPanel);
|
|
4412
5041
|
iconTemplateRef = contentChild('stepIcon', /* @ts-ignore */
|
|
4413
5042
|
...(ngDevMode ? [{ debugName: "iconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4414
5043
|
completedIconTemplateRef = contentChild('stepCompletedIcon', /* @ts-ignore */
|
|
4415
5044
|
...(ngDevMode ? [{ debugName: "completedIconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4416
5045
|
// Inputs
|
|
4417
|
-
value =
|
|
4418
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
5046
|
+
value = this._tabPanel.value;
|
|
4419
5047
|
label = input(/* @ts-ignore */
|
|
4420
5048
|
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4421
5049
|
description = input(/* @ts-ignore */
|
|
@@ -4424,12 +5052,10 @@ class Step {
|
|
|
4424
5052
|
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
4425
5053
|
disabled = input(false, /* @ts-ignore */
|
|
4426
5054
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4427
|
-
_active = computed(() => this._stepperService.active?.() === this.value(), /* @ts-ignore */
|
|
4428
|
-
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
4429
5055
|
hostClasses = computed(() => {
|
|
4430
5056
|
const className = 'tls-step';
|
|
4431
5057
|
const array = [className];
|
|
4432
|
-
if (this.
|
|
5058
|
+
if (this._tabPanel.visible())
|
|
4433
5059
|
array.push(`${className}--active`);
|
|
4434
5060
|
if (this.disabled())
|
|
4435
5061
|
array.push(`${className}--disabled`);
|
|
@@ -4437,29 +5063,23 @@ class Step {
|
|
|
4437
5063
|
}, /* @ts-ignore */
|
|
4438
5064
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4439
5065
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4440
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Step, isStandalone: true, selector: "tls-step", inputs: {
|
|
5066
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Step, isStandalone: true, selector: "tls-step", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "iconTemplateRef", first: true, predicate: ["stepIcon"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.TabPanel, inputs: ["value", "value"] }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
4441
5067
|
}
|
|
4442
5068
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Step, decorators: [{
|
|
4443
5069
|
type: Component,
|
|
4444
|
-
args: [{ selector: 'tls-step', imports: [], host: {
|
|
5070
|
+
args: [{ selector: 'tls-step', imports: [], hostDirectives: [{ directive: TabPanel, inputs: ['value'] }], host: {
|
|
4445
5071
|
'[class]': 'hostClasses()',
|
|
4446
5072
|
}, template: "<ng-content></ng-content>\n" }]
|
|
4447
|
-
}], propDecorators: { iconTemplateRef: [{ type: i0.ContentChild, args: ['stepIcon', { isSignal: true }] }], completedIconTemplateRef: [{ type: i0.ContentChild, args: ['stepCompletedIcon', { isSignal: true }] }],
|
|
5073
|
+
}], propDecorators: { iconTemplateRef: [{ type: i0.ContentChild, args: ['stepIcon', { isSignal: true }] }], completedIconTemplateRef: [{ type: i0.ContentChild, args: ['stepCompletedIcon', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
4448
5074
|
|
|
4449
5075
|
class Stepper {
|
|
4450
|
-
static _counter = 0;
|
|
4451
|
-
panelId = `tls-stepper-panel-${++Stepper._counter}`;
|
|
4452
5076
|
_config = inject(STEPPER_CONFIG);
|
|
4453
|
-
_stepperService = inject(StepperService);
|
|
4454
|
-
_directionality = inject(Directionality);
|
|
4455
5077
|
steps = contentChildren(Step, /* @ts-ignore */
|
|
4456
5078
|
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
4457
5079
|
completedTemplateRef = contentChild('completedTemplate', /* @ts-ignore */
|
|
4458
5080
|
...(ngDevMode ? [{ debugName: "completedTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4459
5081
|
completedIconTemplateRef = contentChild('stepCompletedIcon', /* @ts-ignore */
|
|
4460
5082
|
...(ngDevMode ? [{ debugName: "completedIconTemplateRef" }] : /* istanbul ignore next */ []));
|
|
4461
|
-
_stepButtons = viewChildren('stepButton', /* @ts-ignore */
|
|
4462
|
-
...(ngDevMode ? [{ debugName: "_stepButtons" }] : /* istanbul ignore next */ []));
|
|
4463
5083
|
active = model.required(/* @ts-ignore */
|
|
4464
5084
|
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
4465
5085
|
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
@@ -4485,71 +5105,23 @@ class Stepper {
|
|
|
4485
5105
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4486
5106
|
activeIndex = computed(() => this.steps().findIndex(step => step.value() === this.active()), /* @ts-ignore */
|
|
4487
5107
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4488
|
-
constructor() {
|
|
4489
|
-
this._stepperService.active = this.active.asReadonly();
|
|
4490
|
-
}
|
|
4491
5108
|
// Protected methods
|
|
4492
|
-
|
|
4493
|
-
if (
|
|
4494
|
-
return;
|
|
4495
|
-
if (this.linear() && index > this.activeIndex() + 1)
|
|
4496
|
-
return;
|
|
4497
|
-
this.active.set(step.value());
|
|
4498
|
-
const eventData = {
|
|
4499
|
-
index: index,
|
|
4500
|
-
value: step.value(),
|
|
4501
|
-
};
|
|
4502
|
-
this.stepSelect.emit(eventData);
|
|
4503
|
-
}
|
|
4504
|
-
onKeydown(event, index) {
|
|
4505
|
-
const orientation = this.orientation();
|
|
4506
|
-
// Horizontal arrows are physical; swap them in RTL so Next still advances.
|
|
4507
|
-
const isRtl = this._directionality.value === 'rtl';
|
|
4508
|
-
const horizontalNext = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
|
4509
|
-
const horizontalPrev = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
|
4510
|
-
const keyNext = orientation === 'horizontal' ? horizontalNext : 'ArrowDown';
|
|
4511
|
-
const keyPrev = orientation === 'horizontal' ? horizontalPrev : 'ArrowUp';
|
|
4512
|
-
let target = null;
|
|
4513
|
-
switch (event.key) {
|
|
4514
|
-
case keyNext:
|
|
4515
|
-
target = this._nextFocusable(index, 1);
|
|
4516
|
-
break;
|
|
4517
|
-
case keyPrev:
|
|
4518
|
-
target = this._nextFocusable(index, -1);
|
|
4519
|
-
break;
|
|
4520
|
-
case 'Home':
|
|
4521
|
-
target = this._nextFocusable(-1, 1);
|
|
4522
|
-
break;
|
|
4523
|
-
case 'End':
|
|
4524
|
-
target = this._nextFocusable(this.steps().length, -1);
|
|
4525
|
-
break;
|
|
4526
|
-
default:
|
|
4527
|
-
return;
|
|
4528
|
-
}
|
|
4529
|
-
event.preventDefault();
|
|
4530
|
-
if (target === null)
|
|
5109
|
+
onSelectedTabChange(value) {
|
|
5110
|
+
if (value === undefined)
|
|
4531
5111
|
return;
|
|
4532
|
-
this.
|
|
4533
|
-
this.
|
|
4534
|
-
|
|
4535
|
-
// Private methods
|
|
4536
|
-
_nextFocusable(from, direction) {
|
|
4537
|
-
const steps = this.steps();
|
|
4538
|
-
for (let i = from + direction; i >= 0 && i < steps.length; i += direction) {
|
|
4539
|
-
if (!steps[i].disabled() && !(this.linear() && i > this.activeIndex() + 1))
|
|
4540
|
-
return i;
|
|
4541
|
-
}
|
|
4542
|
-
return null;
|
|
5112
|
+
const index = this.steps().findIndex(step => step.value() === value);
|
|
5113
|
+
this.active.set(value);
|
|
5114
|
+
this.stepSelect.emit({ index, value });
|
|
4543
5115
|
}
|
|
4544
5116
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4545
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Stepper, isStandalone: true, selector: "tls-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepSelect: "stepSelect" }, host: { properties: { "class": "hostClasses()" } },
|
|
5117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Stepper, isStandalone: true, selector: "tls-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepSelect: "stepSelect" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "steps", predicate: Step, isSignal: true }, { propertyName: "completedTemplateRef", first: true, predicate: ["completedTemplate"], descendants: true, isSignal: true }, { propertyName: "completedIconTemplateRef", first: true, predicate: ["stepCompletedIcon"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.Tabs }], ngImport: i0, template: "<ul\n class=\"tls-stepper-header\"\n ngTabList\n [orientation]=\"orientation()\"\n [wrap]=\"false\"\n [softDisabled]=\"false\"\n [selectedTab]=\"active()\"\n (selectedTabChange)=\"onSelectedTabChange($event)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (step of steps(); track step.value(); let index = $index; let last = $last) {\n <li role=\"presentation\"\n class=\"tls-stepper-header__item\"\n [class]=\"`tls-stepper-header--${step.color()}`\"\n [class.tls-stepper-header__item--active]=\"ariaTab.selected()\"\n [class.tls-stepper-header__item--disabled]=\"step.disabled()\"\n [class.tls-stepper-header__item--unreachable]=\"linear() && index > activeIndex() + 1\"\n [class.tls-stepper-header__item--completed]=\"activeIndex() > index || completed()\">\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-stepper-header-button\"\n type=\"button\"\n [value]=\"step.value()\"\n [disabled]=\"step.disabled() || (linear() && index > activeIndex() + 1)\"\n >\n <span class=\"tls-stepper-header-button__index\">\n @let isCompleted = activeIndex() > index || completed();\n @if (isCompleted && step.completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (isCompleted && completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (step.iconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.iconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else {\n {{ index + 1 }}\n }\n </span>\n\n <span class=\"tls-stepper-header-button__text\">\n @if (step.label()) {\n <span class=\"tls-stepper-header-button__label\">{{ step.label() }}</span>\n }\n @if (step.description()) {\n <span class=\"tls-stepper-header-button__description\">{{ step.description() }}</span>\n }\n </span>\n </button>\n @if (!last) {\n <div class=\"tls-stepper-header__divider\"></div>\n }\n </li>\n }\n</ul>\n<div class=\"tls-stepper-content\">\n <ng-content></ng-content>\n @if (completed() && completedTemplateRef()) {\n <div class=\"tls-stepper-content__template\">\n <ng-container [ngTemplateOutlet]=\"completedTemplateRef()\"></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab$1, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }] });
|
|
4546
5118
|
}
|
|
4547
5119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Stepper, decorators: [{
|
|
4548
5120
|
type: Component,
|
|
4549
|
-
args: [{ selector: 'tls-stepper', imports: [NgTemplateOutlet], host: {
|
|
5121
|
+
args: [{ selector: 'tls-stepper', imports: [NgTemplateOutlet, TabList, Tab$1], hostDirectives: [Tabs$1], host: {
|
|
4550
5122
|
'[class]': 'hostClasses()',
|
|
4551
|
-
},
|
|
4552
|
-
}],
|
|
5123
|
+
}, template: "<ul\n class=\"tls-stepper-header\"\n ngTabList\n [orientation]=\"orientation()\"\n [wrap]=\"false\"\n [softDisabled]=\"false\"\n [selectedTab]=\"active()\"\n (selectedTabChange)=\"onSelectedTabChange($event)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (step of steps(); track step.value(); let index = $index; let last = $last) {\n <li role=\"presentation\"\n class=\"tls-stepper-header__item\"\n [class]=\"`tls-stepper-header--${step.color()}`\"\n [class.tls-stepper-header__item--active]=\"ariaTab.selected()\"\n [class.tls-stepper-header__item--disabled]=\"step.disabled()\"\n [class.tls-stepper-header__item--unreachable]=\"linear() && index > activeIndex() + 1\"\n [class.tls-stepper-header__item--completed]=\"activeIndex() > index || completed()\">\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-stepper-header-button\"\n type=\"button\"\n [value]=\"step.value()\"\n [disabled]=\"step.disabled() || (linear() && index > activeIndex() + 1)\"\n >\n <span class=\"tls-stepper-header-button__index\">\n @let isCompleted = activeIndex() > index || completed();\n @if (isCompleted && step.completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (isCompleted && completedIconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"completedIconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else if (step.iconTemplateRef()) {\n <ng-container [ngTemplateOutlet]=\"step.iconTemplateRef() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: index }\"></ng-container>\n } @else {\n {{ index + 1 }}\n }\n </span>\n\n <span class=\"tls-stepper-header-button__text\">\n @if (step.label()) {\n <span class=\"tls-stepper-header-button__label\">{{ step.label() }}</span>\n }\n @if (step.description()) {\n <span class=\"tls-stepper-header-button__description\">{{ step.description() }}</span>\n }\n </span>\n </button>\n @if (!last) {\n <div class=\"tls-stepper-header__divider\"></div>\n }\n </li>\n }\n</ul>\n<div class=\"tls-stepper-content\">\n <ng-content></ng-content>\n @if (completed() && completedTemplateRef()) {\n <div class=\"tls-stepper-content__template\">\n <ng-container [ngTemplateOutlet]=\"completedTemplateRef()\"></ng-container>\n </div>\n }\n</div>\n" }]
|
|
5124
|
+
}], propDecorators: { steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Step), { isSignal: true }] }], completedTemplateRef: [{ type: i0.ContentChild, args: ['completedTemplate', { isSignal: true }] }], completedIconTemplateRef: [{ type: i0.ContentChild, args: ['stepCompletedIcon', { isSignal: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }, { type: i0.Output, args: ["activeChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], completed: [{ type: i0.Input, args: [{ isSignal: true, alias: "completed", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], stepSelect: [{ type: i0.Output, args: ["stepSelect"] }] } });
|
|
4553
5125
|
|
|
4554
5126
|
class TableColumn {
|
|
4555
5127
|
key = input.required(/* @ts-ignore */
|
|
@@ -4696,37 +5268,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
4696
5268
|
], host: {}, template: "<table\n cdk-table\n [class]=\"classes()\"\n [dataSource]=\"dataSource\"\n [trackBy]=\"resolvedTrackBy()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (column of effectiveColumnDefinitions(); track column.key) {\n <ng-container [cdkColumnDef]=\"column.key\">\n <!-- Header cell -->\n <th cdk-header-cell *cdkHeaderCellDef class=\"tls-table__header-cell\" [style.width]=\"column.width + 'px'\">\n {{ column.header }}\n </th>\n\n <!-- Row cell -->\n <td\n cdk-cell\n *cdkCellDef=\"let data; let index = index; let count = count; let first = first; let last = last; let even = even; let odd = odd\"\n class=\"tls-table__cell\"\n [style.text-align]=\"column.alignment\"\n >\n @if (column.template) {\n <ng-container\n [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: data[column.key],\n data: data,\n index: index,\n count: count,\n first: first,\n last: last,\n even: even,\n odd: odd\n }\"\n />\n } @else {\n {{ data[column.key] }}\n }\n </td>\n </ng-container>\n }\n\n <tr cdk-header-row *cdkHeaderRowDef=\"columns()\" class=\"tls-table__header-row\"></tr>\n\n <tr *cdkRowDef=\"let row; columns: columns()\" cdk-row class=\"tls-table__row\"></tr>\n</table>\n", styles: [":host{display:block}\n"] }]
|
|
4697
5269
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], columnDefinitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDefinitions", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], tableColumns: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableColumn), { isSignal: true }] }] } });
|
|
4698
5270
|
|
|
4699
|
-
class TabsService {
|
|
4700
|
-
selected = null;
|
|
4701
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4702
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService });
|
|
4703
|
-
}
|
|
4704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TabsService, decorators: [{
|
|
4705
|
-
type: Injectable
|
|
4706
|
-
}] });
|
|
4707
|
-
|
|
4708
5271
|
class Tab {
|
|
4709
|
-
|
|
5272
|
+
_tabPanel = inject(TabPanel);
|
|
4710
5273
|
// Inputs
|
|
4711
|
-
value =
|
|
4712
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
5274
|
+
value = this._tabPanel.value;
|
|
4713
5275
|
label = input.required(/* @ts-ignore */
|
|
4714
5276
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4715
5277
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4716
|
-
_active = computed(() => {
|
|
4717
|
-
if (!this._tabsService.selected)
|
|
4718
|
-
return false;
|
|
4719
|
-
const selected = this._tabsService.selected();
|
|
4720
|
-
if (selected)
|
|
4721
|
-
return this.value() === selected;
|
|
4722
|
-
else
|
|
4723
|
-
return false;
|
|
4724
|
-
}, /* @ts-ignore */
|
|
4725
|
-
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
4726
5278
|
hostClasses = computed(() => {
|
|
4727
5279
|
const className = 'tls-tab';
|
|
4728
5280
|
const array = [className];
|
|
4729
|
-
if (this.
|
|
5281
|
+
if (this._tabPanel.visible())
|
|
4730
5282
|
array.push(`${className}--active`);
|
|
4731
5283
|
if (this.disabled())
|
|
4732
5284
|
array.push(`${className}--disabled`);
|
|
@@ -4734,17 +5286,19 @@ class Tab {
|
|
|
4734
5286
|
}, /* @ts-ignore */
|
|
4735
5287
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4736
5288
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tab, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4737
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Tab, isStandalone: true, selector: "tls-tab", inputs: {
|
|
5289
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Tab, isStandalone: true, selector: "tls-tab", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, hostDirectives: [{ directive: i1.TabPanel, inputs: ["value", "value"] }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
4738
5290
|
}
|
|
4739
5291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tab, decorators: [{
|
|
4740
5292
|
type: Component,
|
|
4741
|
-
args: [{ selector: 'tls-tab', imports: [], host: {
|
|
5293
|
+
args: [{ selector: 'tls-tab', imports: [], hostDirectives: [{ directive: TabPanel, inputs: ['value'] }], host: {
|
|
4742
5294
|
'[class]': 'hostClasses()',
|
|
4743
5295
|
}, template: "<ng-content></ng-content>\n" }]
|
|
4744
|
-
}], propDecorators: {
|
|
5296
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
4745
5297
|
|
|
4746
5298
|
const DEFAULT_TABS_CONFIG = {
|
|
4747
5299
|
variant: 'flat',
|
|
5300
|
+
orientation: 'horizontal',
|
|
5301
|
+
headerPosition: 'start',
|
|
4748
5302
|
};
|
|
4749
5303
|
|
|
4750
5304
|
const TABS_CONFIG = new InjectionToken('TABS_CONFIG', {
|
|
@@ -4753,12 +5307,15 @@ const TABS_CONFIG = new InjectionToken('TABS_CONFIG', {
|
|
|
4753
5307
|
|
|
4754
5308
|
class Tabs {
|
|
4755
5309
|
_config = inject(TABS_CONFIG);
|
|
4756
|
-
_tabsService = inject(TabsService);
|
|
4757
5310
|
tabs = contentChildren(Tab, /* @ts-ignore */
|
|
4758
5311
|
...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
4759
5312
|
variant = input(this._config.variant, /* @ts-ignore */
|
|
4760
5313
|
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
4761
|
-
|
|
5314
|
+
orientation = input(this._config.orientation, /* @ts-ignore */
|
|
5315
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
5316
|
+
headerPosition = input(this._config.headerPosition, /* @ts-ignore */
|
|
5317
|
+
...(ngDevMode ? [{ debugName: "headerPosition" }] : /* istanbul ignore next */ []));
|
|
5318
|
+
selected = model(undefined, /* @ts-ignore */
|
|
4762
5319
|
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
4763
5320
|
/** Accessible name for the tablist. */
|
|
4764
5321
|
ariaLabel = input(undefined, /* @ts-ignore */
|
|
@@ -4769,21 +5326,29 @@ class Tabs {
|
|
|
4769
5326
|
const className = 'tls-tabs';
|
|
4770
5327
|
const array = [className];
|
|
4771
5328
|
array.push(`${className}--${this.variant()}`);
|
|
5329
|
+
array.push(`${className}--${this.orientation()}`);
|
|
5330
|
+
array.push(`${className}--header-${this.headerPosition()}`);
|
|
4772
5331
|
return array;
|
|
4773
5332
|
}, /* @ts-ignore */
|
|
4774
5333
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4775
5334
|
constructor() {
|
|
4776
|
-
|
|
5335
|
+
effect(() => {
|
|
5336
|
+
if (this.selected() !== undefined)
|
|
5337
|
+
return;
|
|
5338
|
+
const firstEnabledTab = this.tabs().find(tab => !tab.disabled());
|
|
5339
|
+
if (firstEnabledTab)
|
|
5340
|
+
this.selected.set(firstEnabledTab.value());
|
|
5341
|
+
});
|
|
4777
5342
|
}
|
|
4778
5343
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4779
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Tabs, isStandalone: true, selector: "tls-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { properties: { "class": "hostClasses()" } },
|
|
5344
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Tabs, isStandalone: true, selector: "tls-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, headerPosition: { classPropertyName: "headerPosition", publicName: "headerPosition", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "tabs", predicate: Tab, isSignal: true }], hostDirectives: [{ directive: i1.Tabs }], ngImport: i0, template: "<ul\n class=\"tls-tabs-header\"\n ngTabList\n [orientation]=\"orientation()\"\n [softDisabled]=\"false\"\n [(selectedTab)]=\"selected\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (tab of tabs(); track tab) {\n <li\n role=\"presentation\"\n class=\"tls-tabs-header__item\"\n [class.tls-tabs-header__item--active]=\"ariaTab.selected()\"\n [class.tls-tabs-header__item--disabled]=\"tab.disabled()\"\n >\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-tabs-header__item-button\"\n type=\"button\"\n [value]=\"tab.value()\"\n [disabled]=\"tab.disabled()\"\n >\n {{ tab.label() }}\n </button>\n </li>\n }\n</ul>\n<div class=\"tls-tabs-content\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab$1, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }] });
|
|
4780
5345
|
}
|
|
4781
5346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Tabs, decorators: [{
|
|
4782
5347
|
type: Component,
|
|
4783
|
-
args: [{ selector: 'tls-tabs', imports: [], host: {
|
|
5348
|
+
args: [{ selector: 'tls-tabs', imports: [TabList, Tab$1], hostDirectives: [Tabs$1], host: {
|
|
4784
5349
|
'[class]': 'hostClasses()',
|
|
4785
|
-
},
|
|
4786
|
-
}], ctorParameters: () => [], propDecorators: { tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Tab), { isSignal: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }] } });
|
|
5350
|
+
}, template: "<ul\n class=\"tls-tabs-header\"\n ngTabList\n [orientation]=\"orientation()\"\n [softDisabled]=\"false\"\n [(selectedTab)]=\"selected\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n>\n @for (tab of tabs(); track tab) {\n <li\n role=\"presentation\"\n class=\"tls-tabs-header__item\"\n [class.tls-tabs-header__item--active]=\"ariaTab.selected()\"\n [class.tls-tabs-header__item--disabled]=\"tab.disabled()\"\n >\n <button\n #ariaTab=\"ngTab\"\n ngTab\n class=\"tls-tabs-header__item-button\"\n type=\"button\"\n [value]=\"tab.value()\"\n [disabled]=\"tab.disabled()\"\n >\n {{ tab.label() }}\n </button>\n </li>\n }\n</ul>\n<div class=\"tls-tabs-content\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
5351
|
+
}], ctorParameters: () => [], propDecorators: { tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Tab), { isSignal: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], headerPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerPosition", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }] } });
|
|
4787
5352
|
|
|
4788
5353
|
const DEFAULT_TABS_QUERY_SYNC_CONFIG = {
|
|
4789
5354
|
paramKey: 'tab',
|
|
@@ -4804,7 +5369,7 @@ class TabsQuerySyncDirective extends QuerySyncDirective {
|
|
|
4804
5369
|
effect(() => {
|
|
4805
5370
|
const selected = this._tabs.selected();
|
|
4806
5371
|
const param = this.tlsTabsQuerySync();
|
|
4807
|
-
if (selected ===
|
|
5372
|
+
if (selected === undefined)
|
|
4808
5373
|
return;
|
|
4809
5374
|
this.syncToUrl(param, selected);
|
|
4810
5375
|
});
|
|
@@ -5087,6 +5652,10 @@ const provideThalassicUIConfig = (config) => {
|
|
|
5087
5652
|
provide: BUTTON_CONFIG,
|
|
5088
5653
|
useValue: deepMerge(DEFAULT_BUTTON_CONFIG, config.components.button),
|
|
5089
5654
|
},
|
|
5655
|
+
{
|
|
5656
|
+
provide: CALENDAR_CONFIG,
|
|
5657
|
+
useValue: deepMerge(DEFAULT_CALENDAR_CONFIG, config.components.calendar),
|
|
5658
|
+
},
|
|
5090
5659
|
{
|
|
5091
5660
|
provide: CHECKBOX_CONFIG,
|
|
5092
5661
|
useValue: deepMerge(DEFAULT_CHECKBOX_CONFIG, config.components.checkbox),
|
|
@@ -5204,5 +5773,5 @@ const provideThalassicUIConfig = (config) => {
|
|
|
5204
5773
|
* Generated bundle index. Do not edit.
|
|
5205
5774
|
*/
|
|
5206
5775
|
|
|
5207
|
-
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, CONFIRM_CONFIG, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_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 };
|
|
5776
|
+
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 };
|
|
5208
5777
|
//# sourceMappingURL=thalassic-ui.mjs.map
|