ud-components 0.8.2 → 0.8.3

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.
@@ -1,22 +1,27 @@
1
- import * as i1$2 from '@angular/common';
2
- import { CommonModule, formatDate, NgTemplateOutlet, DOCUMENT, AsyncPipe, NgClass, NgStyle, DatePipe } from '@angular/common';
3
1
  import * as i0 from '@angular/core';
4
- import { ViewChild, Input, CUSTOM_ELEMENTS_SCHEMA, Component, inject, EventEmitter, forwardRef, Output, HostBinding, signal, Inject, Pipe, input, computed, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, ViewContainerRef, effect, Directive, Optional, Injectable, DestroyRef, LOCALE_ID, isSignal, ContentChild, ContentChildren, output, viewChild, NgZone, ViewChildren, HostListener } from '@angular/core';
2
+ import { Pipe, input, computed, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, ElementRef, ViewContainerRef, effect, Directive, NgZone, DestroyRef, viewChild, signal, HostListener, ViewChild, Input, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, forwardRef, Output, HostBinding, Inject, Optional, Injectable, LOCALE_ID, isSignal, ContentChild, ContentChildren, output, ViewChildren } from '@angular/core';
3
+ import * as i2$1 from '@angular/material/button';
4
+ import { MatIconButton, MatButtonModule } from '@angular/material/button';
5
+ import * as i3 from '@angular/material/icon';
6
+ import { MatIcon, MatIconModule } from '@angular/material/icon';
7
+ import { MatDrawer, MatDrawerContainer, MatDrawerContent } from '@angular/material/sidenav';
8
+ import { MatToolbar } from '@angular/material/toolbar';
9
+ import * as i1$2 from '@angular/common';
10
+ import { formatDate, NgTemplateOutlet, DOCUMENT, AsyncPipe, CommonModule, NgClass, NgStyle, DatePipe } from '@angular/common';
11
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
+ import { Router, NavigationEnd, RouterLink } from '@angular/router';
13
+ import { isObservable, of, filter, map, Subject, startWith, takeUntil, interval, debounceTime, distinctUntilChanged } from 'rxjs';
14
+ import { Overlay } from '@angular/cdk/overlay';
15
+ import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
5
16
  import * as i1 from '@angular/forms';
6
17
  import { ControlContainer, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormControl, FormGroupDirective, FormGroup, Validators } from '@angular/forms';
7
- import { Subject, startWith, takeUntil, interval, isObservable, of, debounceTime, distinctUntilChanged, filter, map as map$1 } from 'rxjs';
8
18
  import * as i1$1 from '@angular/material/snack-bar';
9
19
  import { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';
10
20
  import { trigger, state, style, transition, animate } from '@angular/animations';
11
21
  import { SelectionModel } from '@angular/cdk/collections';
12
- import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
13
- import * as i2$1 from '@angular/material/button';
14
- import { MatButtonModule, MatIconButton } from '@angular/material/button';
15
22
  import { MatCardContent, MatCardHeader, MatCard } from '@angular/material/card';
16
23
  import * as i2 from '@angular/material/datepicker';
17
24
  import { MatDatepickerModule } from '@angular/material/datepicker';
18
- import * as i3 from '@angular/material/icon';
19
- import { MatIcon, MatIconModule } from '@angular/material/icon';
20
25
  import { MatFormField, MatPrefix, MatSuffix, MatLabel, MatInput, MatError } from '@angular/material/input';
21
26
  import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
22
27
  import { MatPaginator } from '@angular/material/paginator';
@@ -24,9 +29,6 @@ import * as i4 from '@angular/material/progress-spinner';
24
29
  import { MatProgressSpinnerModule, MatProgressSpinner } from '@angular/material/progress-spinner';
25
30
  import { MatChip, MatChipSet, MatChipGrid, MatChipInput, MatChipRow, MatChipRemove } from '@angular/material/chips';
26
31
  import { MatSelect, MatSelectTrigger, MatOption } from '@angular/material/select';
27
- import { Overlay } from '@angular/cdk/overlay';
28
- import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
29
- import { RouterLink, Router, NavigationEnd } from '@angular/router';
30
32
  import { MatSort } from '@angular/material/sort';
31
33
  import { MatRow, MatHeaderRow, MatCell, MatColumnDef, MatHeaderCell, MatCellDef, MatHeaderCellDef, MatTable, MatHeaderRowDef, MatRowDef, MatNoDataRow } from '@angular/material/table';
32
34
  import * as i1$4 from '@ngx-translate/core';
@@ -35,7 +37,7 @@ import * as i1$3 from '@angular/material/dialog';
35
37
  import { MAT_DIALOG_DATA, MatDialogContent, MatDialog, MatDialogConfig } from '@angular/material/dialog';
36
38
  import * as i2$2 from '@angular/material/autocomplete';
37
39
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
38
- import { map } from 'rxjs/operators';
40
+ import { map as map$1 } from 'rxjs/operators';
39
41
  import * as i2$3 from '@angular/cdk/text-field';
40
42
  import { TextFieldModule } from '@angular/cdk/text-field';
41
43
  import * as i2$4 from '@angular/material/timepicker';
@@ -53,1034 +55,1146 @@ import { MatFormField as MatFormField$1 } from '@angular/material/form-field';
53
55
  import { ENTER, COMMA } from '@angular/cdk/keycodes';
54
56
  import { signalStoreFeature, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
55
57
 
56
- class CarouselComponent {
57
- pictures = [];
58
- height = 300;
59
- direction = 'horizontal';
60
- autoplay = true;
61
- objectFit = 'cover';
62
- swiperRef;
63
- lightboxBackdrop;
64
- activeIndex = 0;
65
- lightboxIndex = null;
66
- lightboxShouldFocus = false;
67
- get lightboxOpen() {
68
- return this.lightboxIndex !== null;
69
- }
70
- openLightbox(index) {
71
- this.lightboxIndex = index;
72
- this.lightboxShouldFocus = true;
73
- }
74
- ngAfterViewChecked() {
75
- if (this.lightboxShouldFocus && this.lightboxBackdrop) {
76
- this.lightboxShouldFocus = false;
77
- setTimeout(() => this.lightboxBackdrop?.nativeElement.focus(), 0);
58
+ const capitalize = (word) => word ? word.charAt(0).toUpperCase() + word.slice(1) : word;
59
+ const pluralize = (word) => /(?<!e)y\b/.test(word) ? word.replace(/(?<!e)y\b/, 'ies') : `${word}s`;
60
+ const spaceCase = (word) => word.replace(/[-_]+/g, ' ');
61
+ const inListValidator = (list) => {
62
+ return (control) => {
63
+ const value = String(control.value);
64
+ return list.includes(value) ? { inList: true } : null;
65
+ };
66
+ };
67
+ const updateArray = (items, item, propertyId = 'id', addToEnd = true) => items.some(i => i[propertyId] === item[propertyId])
68
+ ? items.map(i => (i[propertyId] === item[propertyId] ? item : i))
69
+ : addToEnd
70
+ ? [...items, item]
71
+ : [item, ...items];
72
+ const formatPhoneNumber = (value) => {
73
+ // Remove all non-digits
74
+ const digitsOnly = value.replace(/\D/g, '');
75
+ // Format based on length
76
+ let formattedValue = '';
77
+ if (digitsOnly.length >= 10) {
78
+ // Format as (XXX) XXX-XXXX for 10+ digits
79
+ const match = digitsOnly.match(/^(\d{3})(\d{3})(\d{4})(\d*)$/);
80
+ if (match) {
81
+ formattedValue = `(${match[1]}) ${match[2]}-${match[3]}`;
82
+ if (match[4]) {
83
+ formattedValue += ` ext. ${match[4]}`;
84
+ }
85
+ }
86
+ else {
87
+ // Fallback for different lengths
88
+ formattedValue = digitsOnly.replace(/^(\d{3})(\d{3})(\d{0,4}).*/, '($1) $2-$3');
78
89
  }
79
90
  }
80
- closeLightbox() {
81
- this.lightboxIndex = null;
82
- }
83
- lightboxPrev() {
84
- if (this.lightboxIndex === null)
85
- return;
86
- this.lightboxIndex = (this.lightboxIndex - 1 + this.pictures.length) % this.pictures.length;
87
- }
88
- lightboxNext() {
89
- if (this.lightboxIndex === null)
90
- return;
91
- this.lightboxIndex = (this.lightboxIndex + 1) % this.pictures.length;
91
+ else if (digitsOnly.length >= 7) {
92
+ // Format as XXX-XXXX for 7-9 digits
93
+ formattedValue = digitsOnly.replace(/^(\d{3})(\d{0,4})/, '$1-$2');
92
94
  }
93
- onLightboxKeydown(event) {
94
- if (event.key === 'Escape')
95
- this.closeLightbox();
96
- if (event.key === 'ArrowLeft')
97
- this.lightboxPrev();
98
- if (event.key === 'ArrowRight')
99
- this.lightboxNext();
95
+ else if (digitsOnly.length >= 4) {
96
+ // Format as XXX-X for 4-6 digits
97
+ formattedValue = digitsOnly.replace(/^(\d{3})(\d{0,3})/, '$1-$2');
100
98
  }
101
- ngAfterViewInit() {
102
- const el = this.swiperRef.nativeElement;
103
- Object.assign(el, { autoplay: this.autoplay });
104
- el.initialize();
105
- el.addEventListener('swiperslidechange', () => {
106
- this.activeIndex = el.swiper.realIndex;
107
- });
99
+ else {
100
+ // Keep as is for less than 4 digits
101
+ formattedValue = digitsOnly;
108
102
  }
109
- ngOnChanges(changes) {
110
- if (changes['autoplay'] && !changes['autoplay'].firstChange) {
111
- const swiper = this.swiperRef?.nativeElement?.swiper;
112
- if (!swiper)
113
- return;
114
- if (this.autoplay) {
115
- swiper.autoplay.start();
116
- }
117
- else {
118
- swiper.autoplay.stop();
119
- }
120
- }
103
+ return formattedValue;
104
+ };
105
+ // Parse local date string to Date object without time zone offset
106
+ function parseLocalDate(dateString) {
107
+ const [year, month, day] = dateString.split('-');
108
+ return new Date(Number(year), Number(month) - 1, Number(day));
109
+ }
110
+ // Format Date to Day Month Year HH:mm (LocalDateTime)
111
+ // Example: Tue Feb 12 2022 12:00 without commas
112
+ function formatLocalDateTimeLongForm(date) {
113
+ return date
114
+ .toLocaleString('en-US', {
115
+ weekday: 'short',
116
+ month: 'short',
117
+ day: '2-digit',
118
+ year: 'numeric',
119
+ hour: '2-digit',
120
+ minute: '2-digit',
121
+ })
122
+ .replace(',', '');
123
+ }
124
+ // Format Date to YYYY-MM-DDTHH:mm:ss (LocalDateTime)
125
+ function formatLocalDateTime(date) {
126
+ const year = date.getFullYear();
127
+ const month = String(date.getMonth() + 1).padStart(2, '0');
128
+ const day = String(date.getDate()).padStart(2, '0');
129
+ const hours = String(date.getHours()).padStart(2, '0');
130
+ const minutes = String(date.getMinutes()).padStart(2, '0');
131
+ const seconds = String(date.getSeconds()).padStart(2, '0');
132
+ return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
133
+ }
134
+ // Format Date to HH:mm:ss (LocalTime)
135
+ function formatLocalTime(date) {
136
+ const hours = String(date.getHours()).padStart(2, '0');
137
+ const minutes = String(date.getMinutes()).padStart(2, '0');
138
+ const seconds = String(date.getSeconds()).padStart(2, '0');
139
+ return `${hours}:${minutes}:${seconds}`;
140
+ }
141
+ // Format Date to HH:mm (LocalTime)
142
+ function formatLocalTimeWithMinutes(date) {
143
+ const hours = String(date.getHours()).padStart(2, '0');
144
+ const minutes = String(date.getMinutes()).padStart(2, '0');
145
+ return `${hours}:${minutes}`;
146
+ }
147
+ // Format Date to HH:mm with AM/PM format (LocalTime)
148
+ function formatLocalTimeWithMinutesAmPm(date) {
149
+ const hours = Number.parseInt(String(date.getHours()));
150
+ const minutes = String(date.getMinutes()).padStart(2, '0');
151
+ const ampm = hours >= 12 ? 'PM' : 'AM';
152
+ const normalizedHour = hours % 12 === 0 ? 12 : hours % 12;
153
+ return `${normalizedHour.toString().padStart(2, '0')}:${minutes} ${ampm}`;
154
+ }
155
+ // Format Date to YYYY-MM-DD (LocalDate)
156
+ function formatLocalDate(date) {
157
+ const year = date.getFullYear();
158
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based
159
+ const day = String(date.getDate()).padStart(2, '0');
160
+ return `${year}-${month}-${day}`;
161
+ }
162
+ /**
163
+ * Formats an ISO date string to a readable format
164
+ * @param isoString - Date string in ISO format (e.g., "2025-09-12T21:30:00")
165
+ * @returns Formatted date string (e.g., "September 12, 2025, 9:30 PM")
166
+ */
167
+ function formatStringDateTime(isoString) {
168
+ const date = new Date(isoString);
169
+ // Check if date is valid
170
+ if (isNaN(date.getTime())) {
171
+ throw new Error('Invalid date string provided');
121
172
  }
122
- prev() {
123
- this.swiperRef.nativeElement.swiper.slidePrev();
173
+ const options = {
174
+ year: 'numeric',
175
+ month: 'long',
176
+ day: 'numeric',
177
+ hour: 'numeric',
178
+ minute: '2-digit',
179
+ hour12: true,
180
+ };
181
+ return date.toLocaleDateString('en-US', options);
182
+ }
183
+ /**
184
+ * Formats an ISO date string to a readable format
185
+ * @param isoString - Date string in ISO format (e.g., "2025-09-12")
186
+ * @returns Formatted date string (e.g., "September 12, 2025")
187
+ */
188
+ function formatStringDate(isoString) {
189
+ const date = new Date(isoString);
190
+ // Check if date is valid
191
+ if (isNaN(date.getTime())) {
192
+ throw new Error('Invalid date string provided');
124
193
  }
125
- next() {
126
- this.swiperRef.nativeElement.swiper.slideNext();
194
+ const options = {
195
+ year: 'numeric',
196
+ month: 'long',
197
+ day: 'numeric',
198
+ };
199
+ return date.toLocaleDateString('en-US', options);
200
+ }
201
+ /**
202
+ * Format YYYY-MM to localized month year format
203
+ * @param dateStr Format: "2025-11"
204
+ * @param locale Language indicator
205
+ * @returns Format: "Nov 2025" (or localized equivalent)
206
+ */
207
+ function formatMonthYear(dateStr, locale) {
208
+ const [year, month] = dateStr.split('-');
209
+ // Create date as first day of the month
210
+ const date = new Date(parseInt(year), parseInt(month) - 1, 1);
211
+ // Use Angular's formatDate with current locale
212
+ // 'MMM yyyy' format gives "Nov 2025", "déc. 2025" for French, etc.
213
+ return formatDate(date, 'MMM yyyy', locale);
214
+ }
215
+
216
+ class CapitalizePipe {
217
+ transform(value) {
218
+ return value ? capitalize(value) : '';
127
219
  }
128
- goTo(index) {
129
- this.swiperRef.nativeElement.swiper.slideTo(index);
220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
221
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: CapitalizePipe, isStandalone: true, name: "capitalize" });
222
+ }
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CapitalizePipe, decorators: [{
224
+ type: Pipe,
225
+ args: [{
226
+ name: 'capitalize',
227
+ }]
228
+ }] });
229
+
230
+ class ToObservablePipe {
231
+ transform(value) {
232
+ return isObservable(value) ? value : of(value);
130
233
  }
131
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
132
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CarouselComponent, isStandalone: true, selector: "ud-carousel", inputs: { pictures: "pictures", height: "height", direction: "direction", autoplay: "autoplay", objectFit: "objectFit" }, viewQueries: [{ propertyName: "swiperRef", first: true, predicate: ["swiperRef"], descendants: true }, { propertyName: "lightboxBackdrop", first: true, predicate: ["lightboxBackdrop"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"ud-carousel\">\n <swiper-container\n #swiperRef\n init=\"false\"\n [slidesPerView]=\"1\"\n [pagination]=\"false\"\n [direction]=\"direction\"\n [style.height.px]=\"height\">\n @for (picture of pictures; track $index) {\n <swiper-slide>\n <img\n [src]=\"picture\"\n alt=\"Slide {{ $index + 1 }}\"\n [style.object-fit]=\"objectFit\"\n (click)=\"openLightbox($index)\"\n class=\"ud-slide-img\" />\n </swiper-slide>\n }\n </swiper-container>\n\n <button class=\"ud-nav ud-nav-prev\" (click)=\"prev()\" aria-label=\"Previous slide\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n <button class=\"ud-nav ud-nav-next\" (click)=\"next()\" aria-label=\"Next slide\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-pagination\">\n @for (picture of pictures; track $index) {\n <button\n class=\"ud-dot\"\n [class.active]=\"activeIndex === $index\"\n (click)=\"goTo($index)\"\n [attr.aria-label]=\"'Go to slide ' + ($index + 1)\">\n </button>\n }\n </div>\n</div>\n\n@if (lightboxOpen) {\n <div\n #lightboxBackdrop\n class=\"ud-lightbox-backdrop\"\n (click)=\"closeLightbox()\"\n (keydown)=\"onLightboxKeydown($event)\"\n tabindex=\"0\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Image fullscreen view\">\n\n <button class=\"ud-lightbox-close\" (click)=\"closeLightbox()\" aria-label=\"Close\">\n <span class=\"material-icons-outlined\">close</span>\n </button>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-prev\"\n (click)=\"$event.stopPropagation(); lightboxPrev()\"\n aria-label=\"Previous image\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n\n <div class=\"ud-lightbox-img-wrap\" (click)=\"$event.stopPropagation()\">\n <img\n [src]=\"pictures[lightboxIndex!]\"\n alt=\"Fullscreen image {{ lightboxIndex! + 1 }}\"\n class=\"ud-lightbox-img\" />\n </div>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-next\"\n (click)=\"$event.stopPropagation(); lightboxNext()\"\n aria-label=\"Next image\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-lightbox-counter\">\n {{ lightboxIndex! + 1 }} / {{ pictures.length }}\n </div>\n </div>\n}\n", styles: [":host{display:block;width:100%}.ud-carousel{position:relative;width:100%;border-radius:12px;overflow:hidden}.ud-carousel:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:80px;background:linear-gradient(to top,rgba(15,20,30,.6) 0%,transparent 100%);border-radius:0 0 12px 12px;pointer-events:none;z-index:5}swiper-container{width:100%;border-radius:12px}swiper-slide{display:flex;justify-content:center;align-items:center;background:#1b2535;overflow:hidden}swiper-slide .ud-slide-img{display:block;width:100%;height:100%;cursor:zoom-in}.ud-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:10;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:none;background:#0f141e73;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;cursor:pointer;opacity:.8;transition:background .2s ease,opacity .2s ease,transform .2s ease}.ud-nav span{font-size:22px;line-height:1;display:flex}.ud-nav:hover{background:#0f141ed1;opacity:1;transform:translateY(-50%) scale(1.08)}.ud-nav.ud-nav-prev{left:12px}.ud-nav.ud-nav-next{right:12px}.ud-lightbox-backdrop{position:fixed;inset:0;z-index:1000;background:#000000e0;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;animation:ud-lightbox-in .2s ease;outline:none}@keyframes ud-lightbox-in{0%{opacity:0}to{opacity:1}}.ud-lightbox-img-wrap{max-width:calc(100vw - 120px);max-height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center}.ud-lightbox-img{max-width:100%;max-height:calc(100vh - 80px);border-radius:10px;box-shadow:0 24px 64px #0009;object-fit:contain;display:block;animation:ud-lightbox-scale-in .22s cubic-bezier(.34,1.56,.64,1)}@keyframes ud-lightbox-scale-in{0%{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}.ud-lightbox-close{position:fixed;top:20px;right:20px;z-index:1001;width:44px;height:44px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-close span{font-size:22px}.ud-lightbox-close:hover{background:#ffffff38;transform:scale(1.1)}.ud-lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);z-index:1001;width:52px;height:52px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-nav span{font-size:28px}.ud-lightbox-nav:hover{background:#ffffff38}.ud-lightbox-nav.ud-lightbox-prev{left:16px}.ud-lightbox-nav.ud-lightbox-prev:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-nav.ud-lightbox-next{right:16px}.ud-lightbox-nav.ud-lightbox-next:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-counter{position:fixed;bottom:20px;left:50%;transform:translate(-50%);color:#ffffffb3;font-size:14px;font-weight:500;letter-spacing:.05em;z-index:1001}.ud-pagination{position:absolute;bottom:14px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:6px;z-index:10}.ud-dot{display:block;height:8px;width:8px;border-radius:100px;border:none;padding:0;background:#ffffff73;cursor:pointer;transition:width .3s cubic-bezier(.34,1.56,.64,1),background .25s ease}.ud-dot.active{width:28px;background:#fff}.ud-dot:hover:not(.active){background:#ffffffbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
234
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToObservablePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
235
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: ToObservablePipe, isStandalone: true, name: "toObservable" });
133
236
  }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CarouselComponent, decorators: [{
135
- type: Component,
136
- args: [{ selector: 'ud-carousel', imports: [CommonModule], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<div class=\"ud-carousel\">\n <swiper-container\n #swiperRef\n init=\"false\"\n [slidesPerView]=\"1\"\n [pagination]=\"false\"\n [direction]=\"direction\"\n [style.height.px]=\"height\">\n @for (picture of pictures; track $index) {\n <swiper-slide>\n <img\n [src]=\"picture\"\n alt=\"Slide {{ $index + 1 }}\"\n [style.object-fit]=\"objectFit\"\n (click)=\"openLightbox($index)\"\n class=\"ud-slide-img\" />\n </swiper-slide>\n }\n </swiper-container>\n\n <button class=\"ud-nav ud-nav-prev\" (click)=\"prev()\" aria-label=\"Previous slide\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n <button class=\"ud-nav ud-nav-next\" (click)=\"next()\" aria-label=\"Next slide\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-pagination\">\n @for (picture of pictures; track $index) {\n <button\n class=\"ud-dot\"\n [class.active]=\"activeIndex === $index\"\n (click)=\"goTo($index)\"\n [attr.aria-label]=\"'Go to slide ' + ($index + 1)\">\n </button>\n }\n </div>\n</div>\n\n@if (lightboxOpen) {\n <div\n #lightboxBackdrop\n class=\"ud-lightbox-backdrop\"\n (click)=\"closeLightbox()\"\n (keydown)=\"onLightboxKeydown($event)\"\n tabindex=\"0\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Image fullscreen view\">\n\n <button class=\"ud-lightbox-close\" (click)=\"closeLightbox()\" aria-label=\"Close\">\n <span class=\"material-icons-outlined\">close</span>\n </button>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-prev\"\n (click)=\"$event.stopPropagation(); lightboxPrev()\"\n aria-label=\"Previous image\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n\n <div class=\"ud-lightbox-img-wrap\" (click)=\"$event.stopPropagation()\">\n <img\n [src]=\"pictures[lightboxIndex!]\"\n alt=\"Fullscreen image {{ lightboxIndex! + 1 }}\"\n class=\"ud-lightbox-img\" />\n </div>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-next\"\n (click)=\"$event.stopPropagation(); lightboxNext()\"\n aria-label=\"Next image\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-lightbox-counter\">\n {{ lightboxIndex! + 1 }} / {{ pictures.length }}\n </div>\n </div>\n}\n", styles: [":host{display:block;width:100%}.ud-carousel{position:relative;width:100%;border-radius:12px;overflow:hidden}.ud-carousel:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:80px;background:linear-gradient(to top,rgba(15,20,30,.6) 0%,transparent 100%);border-radius:0 0 12px 12px;pointer-events:none;z-index:5}swiper-container{width:100%;border-radius:12px}swiper-slide{display:flex;justify-content:center;align-items:center;background:#1b2535;overflow:hidden}swiper-slide .ud-slide-img{display:block;width:100%;height:100%;cursor:zoom-in}.ud-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:10;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:none;background:#0f141e73;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;cursor:pointer;opacity:.8;transition:background .2s ease,opacity .2s ease,transform .2s ease}.ud-nav span{font-size:22px;line-height:1;display:flex}.ud-nav:hover{background:#0f141ed1;opacity:1;transform:translateY(-50%) scale(1.08)}.ud-nav.ud-nav-prev{left:12px}.ud-nav.ud-nav-next{right:12px}.ud-lightbox-backdrop{position:fixed;inset:0;z-index:1000;background:#000000e0;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;animation:ud-lightbox-in .2s ease;outline:none}@keyframes ud-lightbox-in{0%{opacity:0}to{opacity:1}}.ud-lightbox-img-wrap{max-width:calc(100vw - 120px);max-height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center}.ud-lightbox-img{max-width:100%;max-height:calc(100vh - 80px);border-radius:10px;box-shadow:0 24px 64px #0009;object-fit:contain;display:block;animation:ud-lightbox-scale-in .22s cubic-bezier(.34,1.56,.64,1)}@keyframes ud-lightbox-scale-in{0%{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}.ud-lightbox-close{position:fixed;top:20px;right:20px;z-index:1001;width:44px;height:44px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-close span{font-size:22px}.ud-lightbox-close:hover{background:#ffffff38;transform:scale(1.1)}.ud-lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);z-index:1001;width:52px;height:52px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-nav span{font-size:28px}.ud-lightbox-nav:hover{background:#ffffff38}.ud-lightbox-nav.ud-lightbox-prev{left:16px}.ud-lightbox-nav.ud-lightbox-prev:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-nav.ud-lightbox-next{right:16px}.ud-lightbox-nav.ud-lightbox-next:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-counter{position:fixed;bottom:20px;left:50%;transform:translate(-50%);color:#ffffffb3;font-size:14px;font-weight:500;letter-spacing:.05em;z-index:1001}.ud-pagination{position:absolute;bottom:14px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:6px;z-index:10}.ud-dot{display:block;height:8px;width:8px;border-radius:100px;border:none;padding:0;background:#ffffff73;cursor:pointer;transition:width .3s cubic-bezier(.34,1.56,.64,1),background .25s ease}.ud-dot.active{width:28px;background:#fff}.ud-dot:hover:not(.active){background:#ffffffbf}\n"] }]
137
- }], propDecorators: { pictures: [{
138
- type: Input
139
- }], height: [{
140
- type: Input
141
- }], direction: [{
142
- type: Input
143
- }], autoplay: [{
144
- type: Input
145
- }], objectFit: [{
146
- type: Input
147
- }], swiperRef: [{
148
- type: ViewChild,
149
- args: ['swiperRef']
150
- }], lightboxBackdrop: [{
151
- type: ViewChild,
152
- args: ['lightboxBackdrop']
153
- }] } });
154
-
155
- class CheckboxComponent {
156
- /** Key of the control inside the parent FormGroup (alternative to ngModel/formControl) */
157
- controlName;
158
- size = 'md';
159
- label;
160
- labelPosition = 'right';
161
- ariaLabel;
162
- /** Shows a dash instead of a tick, e.g. a "select all" when only some rows are selected. Cleared by a click. */
163
- indeterminate = false;
164
- /** For use without a form, e.g. bound to a SelectionModel. A form control's value wins when there is one. */
165
- set checked(value) {
166
- this.isChecked = !!value;
167
- }
168
- set disabled(value) {
169
- this.isDisabled = !!value;
170
- }
171
- get isSm() { return this.size === 'sm'; }
172
- get isMd() { return this.size === 'md'; }
173
- get isLg() { return this.size === 'lg'; }
174
- isChecked = false;
175
- isDisabled = false;
176
- controlContainer = inject(ControlContainer, { optional: true, skipSelf: true });
177
- destroy$ = new Subject();
178
- onChange = new EventEmitter();
179
- _onChange = () => { };
180
- onTouched = () => { };
181
- get formControl() {
182
- if (!this.controlName || !this.controlContainer?.control)
183
- return null;
184
- return this.controlContainer.control.get(this.controlName) ?? null;
185
- }
186
- ngOnInit() {
187
- const ctrl = this.formControl;
188
- if (!ctrl)
189
- return;
190
- ctrl.valueChanges
191
- .pipe(startWith(ctrl.value), takeUntil(this.destroy$))
192
- .subscribe((val) => {
193
- this.isChecked = !!val;
194
- this.isDisabled = ctrl.disabled;
195
- });
196
- }
197
- ngOnDestroy() {
198
- this.destroy$.next();
199
- this.destroy$.complete();
200
- }
201
- toggle() {
202
- if (this.isDisabled)
203
- return;
204
- // An indeterminate box always resolves to checked, as a native checkbox does.
205
- const newValue = this.indeterminate || !this.isChecked;
206
- this.indeterminate = false;
207
- const ctrl = this.formControl;
208
- if (ctrl) {
209
- ctrl.setValue(newValue);
210
- ctrl.markAsTouched();
211
- }
212
- else {
213
- this.isChecked = newValue;
214
- this._onChange(newValue);
215
- this.onTouched();
216
- }
217
- this.onChange.emit(newValue);
218
- }
219
- writeValue(value) {
220
- this.isChecked = !!value;
221
- }
222
- registerOnChange(fn) {
223
- this._onChange = fn;
224
- }
225
- registerOnTouched(fn) {
226
- this.onTouched = fn;
227
- }
228
- setDisabledState(isDisabled) {
229
- this.isDisabled = isDisabled;
230
- }
231
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
232
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CheckboxComponent, isStandalone: true, selector: "ud-checkbox", inputs: { controlName: "controlName", size: "size", label: "label", labelPosition: "labelPosition", ariaLabel: "ariaLabel", indeterminate: "indeterminate", checked: "checked", disabled: "disabled" }, outputs: { onChange: "onChange" }, host: { properties: { "class.size-sm": "this.isSm", "class.size-md": "this.isMd", "class.size-lg": "this.isLg" } }, providers: [
233
- {
234
- provide: NG_VALUE_ACCESSOR,
235
- useExisting: forwardRef(() => CheckboxComponent),
236
- multi: true,
237
- },
238
- ], ngImport: i0, template: "<button\n type=\"button\"\n class=\"ud-checkbox\"\n [class.checked]=\"isChecked && !indeterminate\"\n [class.indeterminate]=\"indeterminate\"\n [class.disabled]=\"isDisabled\"\n [class.label-left]=\"labelPosition === 'left'\"\n role=\"checkbox\"\n [attr.aria-checked]=\"indeterminate ? 'mixed' : isChecked\"\n [attr.aria-label]=\"ariaLabel || label\"\n [disabled]=\"isDisabled || null\"\n (click)=\"toggle()\">\n @if (label && labelPosition === 'left') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n <span class=\"checkbox-box\" aria-hidden=\"true\">\n @if (indeterminate) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M4 8h8\" /></svg>\n } @else if (isChecked) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M3.5 8.5l3 3 6-7\" /></svg>\n }\n </span>\n @if (label && labelPosition === 'right') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n</button>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&display=swap\";:host{display:inline-flex;align-items:center;--checkbox-border: #b8bfcb;--checkbox-on: #1b2535;--checkbox-mark: #ffffff;--checkbox-glow: rgba(27, 37, 53, .14);--checkbox-label-color: #4a5568;--checkbox-font: \"DM Sans\", system-ui, sans-serif;--checkbox-duration: .18s}:host(.size-sm){--box-d: 14px;--box-radius: 3px}:host(.size-md){--box-d: 18px;--box-radius: 4px}:host(.size-lg){--box-d: 22px;--box-radius: 5px}.ud-checkbox{display:inline-flex;align-items:center;gap:.6rem;background:none;border:none;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;outline:none}.ud-checkbox:focus-visible .checkbox-box{outline:2px solid var(--checkbox-on);outline-offset:2px}.ud-checkbox:hover:not(.disabled) .checkbox-box{box-shadow:0 0 0 4px var(--checkbox-glow)}.ud-checkbox.disabled{opacity:.38;cursor:not-allowed;pointer-events:none}.checkbox-box{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--box-d);height:var(--box-d);border-radius:var(--box-radius);border:1.5px solid var(--checkbox-border);background:#fff;box-sizing:border-box;transition:background var(--checkbox-duration) ease,border-color var(--checkbox-duration) ease,box-shadow var(--checkbox-duration) ease}.ud-checkbox.checked .checkbox-box,.ud-checkbox.indeterminate .checkbox-box{background:var(--checkbox-on);border-color:var(--checkbox-on)}.checkbox-mark{width:100%;height:100%}.checkbox-mark path{fill:none;stroke:var(--checkbox-mark);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.checkbox-label{font-family:var(--checkbox-font);font-size:.875rem;font-weight:500;color:var(--checkbox-label-color);line-height:1;white-space:nowrap}:host(.size-sm) .checkbox-label{font-size:.8rem}:host(.size-lg) .checkbox-label{font-size:.95rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], viewProviders: [
239
- {
240
- provide: ControlContainer,
241
- useFactory: () => inject(ControlContainer, { optional: true, skipSelf: true }),
242
- },
243
- ] });
244
- }
245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CheckboxComponent, decorators: [{
246
- type: Component,
247
- args: [{ selector: 'ud-checkbox', standalone: true, imports: [CommonModule], providers: [
248
- {
249
- provide: NG_VALUE_ACCESSOR,
250
- useExisting: forwardRef(() => CheckboxComponent),
251
- multi: true,
252
- },
253
- ], viewProviders: [
254
- {
255
- provide: ControlContainer,
256
- useFactory: () => inject(ControlContainer, { optional: true, skipSelf: true }),
257
- },
258
- ], template: "<button\n type=\"button\"\n class=\"ud-checkbox\"\n [class.checked]=\"isChecked && !indeterminate\"\n [class.indeterminate]=\"indeterminate\"\n [class.disabled]=\"isDisabled\"\n [class.label-left]=\"labelPosition === 'left'\"\n role=\"checkbox\"\n [attr.aria-checked]=\"indeterminate ? 'mixed' : isChecked\"\n [attr.aria-label]=\"ariaLabel || label\"\n [disabled]=\"isDisabled || null\"\n (click)=\"toggle()\">\n @if (label && labelPosition === 'left') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n <span class=\"checkbox-box\" aria-hidden=\"true\">\n @if (indeterminate) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M4 8h8\" /></svg>\n } @else if (isChecked) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M3.5 8.5l3 3 6-7\" /></svg>\n }\n </span>\n @if (label && labelPosition === 'right') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n</button>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&display=swap\";:host{display:inline-flex;align-items:center;--checkbox-border: #b8bfcb;--checkbox-on: #1b2535;--checkbox-mark: #ffffff;--checkbox-glow: rgba(27, 37, 53, .14);--checkbox-label-color: #4a5568;--checkbox-font: \"DM Sans\", system-ui, sans-serif;--checkbox-duration: .18s}:host(.size-sm){--box-d: 14px;--box-radius: 3px}:host(.size-md){--box-d: 18px;--box-radius: 4px}:host(.size-lg){--box-d: 22px;--box-radius: 5px}.ud-checkbox{display:inline-flex;align-items:center;gap:.6rem;background:none;border:none;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;outline:none}.ud-checkbox:focus-visible .checkbox-box{outline:2px solid var(--checkbox-on);outline-offset:2px}.ud-checkbox:hover:not(.disabled) .checkbox-box{box-shadow:0 0 0 4px var(--checkbox-glow)}.ud-checkbox.disabled{opacity:.38;cursor:not-allowed;pointer-events:none}.checkbox-box{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--box-d);height:var(--box-d);border-radius:var(--box-radius);border:1.5px solid var(--checkbox-border);background:#fff;box-sizing:border-box;transition:background var(--checkbox-duration) ease,border-color var(--checkbox-duration) ease,box-shadow var(--checkbox-duration) ease}.ud-checkbox.checked .checkbox-box,.ud-checkbox.indeterminate .checkbox-box{background:var(--checkbox-on);border-color:var(--checkbox-on)}.checkbox-mark{width:100%;height:100%}.checkbox-mark path{fill:none;stroke:var(--checkbox-mark);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.checkbox-label{font-family:var(--checkbox-font);font-size:.875rem;font-weight:500;color:var(--checkbox-label-color);line-height:1;white-space:nowrap}:host(.size-sm) .checkbox-label{font-size:.8rem}:host(.size-lg) .checkbox-label{font-size:.95rem}\n"] }]
259
- }], propDecorators: { controlName: [{
260
- type: Input
261
- }], size: [{
262
- type: Input
263
- }], label: [{
264
- type: Input
265
- }], labelPosition: [{
266
- type: Input
267
- }], ariaLabel: [{
268
- type: Input
269
- }], indeterminate: [{
270
- type: Input
271
- }], checked: [{
272
- type: Input
273
- }], disabled: [{
274
- type: Input
275
- }], isSm: [{
276
- type: HostBinding,
277
- args: ['class.size-sm']
278
- }], isMd: [{
279
- type: HostBinding,
280
- args: ['class.size-md']
281
- }], isLg: [{
282
- type: HostBinding,
283
- args: ['class.size-lg']
284
- }], onChange: [{
285
- type: Output
286
- }] } });
287
-
288
- class CustomInputComponent {
289
- type;
290
- placeholder;
291
- required;
292
- name;
293
- inputValue;
294
- constructor() { }
295
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
296
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: CustomInputComponent, isStandalone: true, selector: "ud-input", inputs: { type: "type", placeholder: "placeholder", required: "required", name: "name", inputValue: "inputValue" }, ngImport: i0, template: "<div class=\"inputBox\">\n <input\n [type]=\"type\"\n [required]=\"required\"\n [placeholder]=\"placeholder ?? ''\"\n [(ngModel)]=\"inputValue\" />\n <span>{{ name }}</span>\n</div>\n", styles: [".inputBox{position:relative;width:250px}.inputBox input{width:100%;padding:10px;border:1px solid #000;background:#fafafa;border-radius:5px;outline:none;color:#fafafa;font-size:1em}.inputBox input:valid~span,.inputBox input:focus~span{color:#000;transform:translate(10px) translateY(-10px);font-size:1em;padding:0 10px;background:#fafafa;border-left:1px solid #000}.inputBox span{position:absolute;left:0;padding:10px;pointer-events:none;font-size:1em;color:#000;text-transform:uppercase;transition:.5s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
297
- }
298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomInputComponent, decorators: [{
299
- type: Component,
300
- args: [{ selector: 'ud-input', imports: [FormsModule], template: "<div class=\"inputBox\">\n <input\n [type]=\"type\"\n [required]=\"required\"\n [placeholder]=\"placeholder ?? ''\"\n [(ngModel)]=\"inputValue\" />\n <span>{{ name }}</span>\n</div>\n", styles: [".inputBox{position:relative;width:250px}.inputBox input{width:100%;padding:10px;border:1px solid #000;background:#fafafa;border-radius:5px;outline:none;color:#fafafa;font-size:1em}.inputBox input:valid~span,.inputBox input:focus~span{color:#000;transform:translate(10px) translateY(-10px);font-size:1em;padding:0 10px;background:#fafafa;border-left:1px solid #000}.inputBox span{position:absolute;left:0;padding:10px;pointer-events:none;font-size:1em;color:#000;text-transform:uppercase;transition:.5s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif}\n"] }]
301
- }], ctorParameters: () => [], propDecorators: { type: [{
302
- type: Input
303
- }], placeholder: [{
304
- type: Input
305
- }], required: [{
306
- type: Input
307
- }], name: [{
308
- type: Input
309
- }], inputValue: [{
310
- type: Input
311
- }] } });
312
-
313
- var SnackbarType;
314
- (function (SnackbarType) {
315
- SnackbarType["SUCCESS"] = "success";
316
- SnackbarType["ERROR"] = "error";
317
- SnackbarType["WARNING"] = "warning";
318
- SnackbarType["INFO"] = "info";
319
- })(SnackbarType || (SnackbarType = {}));
320
-
321
- class CustomSnackbarComponent {
322
- data;
323
- snackBarRef;
324
- /** A signal so each tick schedules change detection in zoneless apps too. */
325
- progress = signal(100);
326
- subscription;
327
- isPaused = false;
328
- elapsedTime = 0;
329
- constructor(data, snackBarRef) {
330
- this.data = data;
331
- this.snackBarRef = snackBarRef;
332
- }
333
- ngOnInit() {
334
- this.startTimer();
335
- }
336
- ngOnDestroy() {
337
- this.subscription?.unsubscribe();
338
- }
339
- startTimer() {
340
- const tickInterval = 100;
341
- this.subscription?.unsubscribe();
342
- this.subscription = interval(tickInterval).subscribe(() => {
343
- // Only count time when NOT paused
344
- if (!this.isPaused) {
345
- this.elapsedTime += tickInterval;
346
- // Calculate progress
347
- this.progress.set(100 - (this.elapsedTime / this.data.duration) * 100);
348
- // Dismiss when time runs out
349
- if (this.elapsedTime >= this.data.duration) {
350
- this.subscription?.unsubscribe();
351
- this.snackBarRef.dismiss();
352
- }
353
- }
354
- });
355
- }
356
- pauseTimer() {
357
- this.isPaused = true;
358
- }
359
- resumeTimer() {
360
- this.isPaused = false;
361
- }
362
- dismiss() {
363
- this.subscription?.unsubscribe();
364
- this.snackBarRef.dismiss();
365
- }
366
- SnackbarType = SnackbarType;
367
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$1.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
368
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CustomSnackbarComponent, isStandalone: true, selector: "ud-custom-snackbar", ngImport: i0, template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
369
- }
370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, decorators: [{
371
- type: Component,
372
- args: [{ selector: 'ud-custom-snackbar', standalone: true, imports: [CommonModule], template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"] }]
373
- }], ctorParameters: () => [{ type: undefined, decorators: [{
374
- type: Inject,
375
- args: [MAT_SNACK_BAR_DATA]
376
- }] }, { type: i1$1.MatSnackBarRef }] });
377
-
378
- var ApplicationStatus;
379
- (function (ApplicationStatus) {
380
- ApplicationStatus["FINALIZED"] = "finalized";
381
- ApplicationStatus["PRE_APPROVED"] = "pre-approved";
382
- ApplicationStatus["SUBMITTED"] = "submitted";
383
- })(ApplicationStatus || (ApplicationStatus = {}));
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToObservablePipe, decorators: [{
238
+ type: Pipe,
239
+ args: [{
240
+ name: 'toObservable',
241
+ }]
242
+ }] });
384
243
 
385
- var FilterType;
386
- (function (FilterType) {
387
- FilterType["NONE"] = "none";
388
- FilterType["ALL"] = "all";
389
- FilterType["COLUMN"] = "column";
390
- })(FilterType || (FilterType = {}));
391
- var NumberOperator;
392
- (function (NumberOperator) {
393
- NumberOperator["EQUAL"] = "EQUAL";
394
- NumberOperator["NOT_EQUAL"] = "NOT_EQUAL";
395
- NumberOperator["GREATER_THAN"] = "GREATER_THAN";
396
- NumberOperator["GREATER_THAN_OR_EQUAL"] = "GREATER_THAN_OR_EQUAL";
397
- NumberOperator["LESS_THAN"] = "LESS_THAN";
398
- NumberOperator["LESS_THAN_OR_EQUAL"] = "LESS_THAN_OR_EQUAL";
399
- NumberOperator["BETWEEN"] = "BETWEEN";
400
- })(NumberOperator || (NumberOperator = {}));
401
- var StringOperator;
402
- (function (StringOperator) {
403
- StringOperator["CONTAINS"] = "CONTAINS";
404
- StringOperator["EXACT"] = "EXACT";
405
- StringOperator["STARTS_WITH"] = "STARTS_WITH";
406
- StringOperator["ENDS_WITH"] = "ENDS_WITH";
407
- StringOperator["NOT_CONTAINS"] = "NOT_CONTAINS";
408
- StringOperator["NOT_EXACT"] = "NOT_EXACT";
409
- /** Row matches if it shares at least one value with the selected set ("any of"). */
410
- StringOperator["IN"] = "IN";
411
- /** Row matches if it contains every selected value ("all of", may have extras). */
412
- StringOperator["CONTAINS_ALL"] = "CONTAINS_ALL";
413
- })(StringOperator || (StringOperator = {}));
414
244
  /**
415
- * Match modes offered for multi-select (filterOptions) columns. Maps directly to
416
- * the operator sent to the backend / used client-side:
417
- * - ANY -> StringOperator.IN (shares at least one value)
418
- * - ALL -> StringOperator.CONTAINS_ALL (contains every selected value)
419
- * - EXACT -> StringOperator.EXACT (set equality: exactly the selected values)
245
+ * The panel `udTooltip` attaches to the overlay. Not meant to be used on its
246
+ * own. Unencapsulated so the `.ud-tooltip-title` / `.ud-tooltip-meta` helper
247
+ * classes reach rich content that comes from the consumer's template.
420
248
  */
421
- var MultiSelectMatchMode;
422
- (function (MultiSelectMatchMode) {
423
- MultiSelectMatchMode["ANY"] = "IN";
424
- MultiSelectMatchMode["ALL"] = "CONTAINS_ALL";
425
- MultiSelectMatchMode["EXACT"] = "EXACT";
426
- })(MultiSelectMatchMode || (MultiSelectMatchMode = {}));
427
- var DateOperator;
428
- (function (DateOperator) {
429
- DateOperator["BEFORE"] = "BEFORE";
430
- DateOperator["AFTER"] = "AFTER";
431
- DateOperator["DATE_RANGE"] = "DATE_RANGE";
432
- })(DateOperator || (DateOperator = {}));
433
-
434
- var TableDisplayColumnType;
435
- (function (TableDisplayColumnType) {
436
- TableDisplayColumnType["ARRAY"] = "ARRAY";
437
- TableDisplayColumnType["BOOLEAN"] = "BOOLEAN";
438
- TableDisplayColumnType["CLICK"] = "CLICK";
439
- TableDisplayColumnType["DATE"] = "DATE";
440
- TableDisplayColumnType["DATETIME"] = "DATETIME";
441
- TableDisplayColumnType["HYPERLINK"] = "HYPERLINK";
442
- TableDisplayColumnType["ICON"] = "ICON";
443
- TableDisplayColumnType["MONEY"] = "MONEY";
444
- TableDisplayColumnType["PHONE"] = "PHONE";
445
- TableDisplayColumnType["TEXT"] = "TEXT";
446
- TableDisplayColumnType["TEXT_OBSERVABLES"] = "TEXT_OBSERVABLES";
447
- TableDisplayColumnType["NUMBER"] = "NUMBER";
448
- TableDisplayColumnType["PILL"] = "PILL";
449
- })(TableDisplayColumnType || (TableDisplayColumnType = {}));
249
+ class UdTooltipComponent {
250
+ content = input(null);
251
+ tooltipId = input.required();
252
+ placement = input('top');
253
+ template = computed(() => {
254
+ const content = this.content();
255
+ return content instanceof TemplateRef ? content : null;
256
+ });
257
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
258
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: UdTooltipComponent, isStandalone: true, selector: "ud-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, tooltipId: { classPropertyName: "tooltipId", publicName: "tooltipId", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"ud-tooltip\"\n role=\"tooltip\"\n [id]=\"tooltipId()\"\n [attr.data-placement]=\"placement()\">\n @if (template(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ content() }}\n }\n</div>\n", styles: [".ud-tooltip{--ud-tooltip-bg: #1b2535;--ud-tooltip-ink: #f5f6f7;--ud-tooltip-muted: rgba(245, 246, 247, .68);--ud-tooltip-accent: #4a7fe8;--ud-tooltip-shift: 3px;position:relative;box-sizing:border-box;max-width:260px;padding:7px 10px;border-radius:6px;background:var(--ud-tooltip-bg);color:var(--ud-tooltip-ink);box-shadow:0 0 0 1px #ffffff14,0 6px 18px #1b253538;font-family:DM Sans,system-ui,sans-serif;font-size:12.5px;font-weight:500;line-height:1.45;text-align:left;overflow-wrap:anywhere;pointer-events:none;animation:ud-tooltip-in .11s ease-out both}.ud-tooltip:before{content:\"\";position:absolute;background:var(--ud-tooltip-accent);border-radius:2px}.ud-tooltip[data-placement=top]:before,.ud-tooltip[data-placement=bottom]:before{left:50%;width:14px;height:2px;margin-left:-7px}.ud-tooltip[data-placement=top]:before{bottom:0}.ud-tooltip[data-placement=bottom]:before{top:0}.ud-tooltip[data-placement=left]:before,.ud-tooltip[data-placement=right]:before{top:50%;width:2px;height:14px;margin-top:-7px}.ud-tooltip[data-placement=left]:before{right:0}.ud-tooltip[data-placement=right]:before{left:0}.ud-tooltip[data-placement=top]{--ud-tooltip-from: 0 var(--ud-tooltip-shift)}.ud-tooltip[data-placement=bottom]{--ud-tooltip-from: 0 calc(var(--ud-tooltip-shift) * -1)}.ud-tooltip[data-placement=left]{--ud-tooltip-from: var(--ud-tooltip-shift) 0}.ud-tooltip[data-placement=right]{--ud-tooltip-from: calc(var(--ud-tooltip-shift) * -1) 0}@keyframes ud-tooltip-in{0%{opacity:0;translate:var(--ud-tooltip-from, 0 0)}to{opacity:1;translate:0 0}}.ud-tooltip-title{display:block;font-weight:600}.ud-tooltip-meta{display:block;margin-top:2px;color:var(--ud-tooltip-muted);font-weight:400}@media (prefers-reduced-motion: reduce){.ud-tooltip{--ud-tooltip-shift: 0px}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
259
+ }
260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipComponent, decorators: [{
261
+ type: Component,
262
+ args: [{ selector: 'ud-tooltip', standalone: true, imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"ud-tooltip\"\n role=\"tooltip\"\n [id]=\"tooltipId()\"\n [attr.data-placement]=\"placement()\">\n @if (template(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ content() }}\n }\n</div>\n", styles: [".ud-tooltip{--ud-tooltip-bg: #1b2535;--ud-tooltip-ink: #f5f6f7;--ud-tooltip-muted: rgba(245, 246, 247, .68);--ud-tooltip-accent: #4a7fe8;--ud-tooltip-shift: 3px;position:relative;box-sizing:border-box;max-width:260px;padding:7px 10px;border-radius:6px;background:var(--ud-tooltip-bg);color:var(--ud-tooltip-ink);box-shadow:0 0 0 1px #ffffff14,0 6px 18px #1b253538;font-family:DM Sans,system-ui,sans-serif;font-size:12.5px;font-weight:500;line-height:1.45;text-align:left;overflow-wrap:anywhere;pointer-events:none;animation:ud-tooltip-in .11s ease-out both}.ud-tooltip:before{content:\"\";position:absolute;background:var(--ud-tooltip-accent);border-radius:2px}.ud-tooltip[data-placement=top]:before,.ud-tooltip[data-placement=bottom]:before{left:50%;width:14px;height:2px;margin-left:-7px}.ud-tooltip[data-placement=top]:before{bottom:0}.ud-tooltip[data-placement=bottom]:before{top:0}.ud-tooltip[data-placement=left]:before,.ud-tooltip[data-placement=right]:before{top:50%;width:2px;height:14px;margin-top:-7px}.ud-tooltip[data-placement=left]:before{right:0}.ud-tooltip[data-placement=right]:before{left:0}.ud-tooltip[data-placement=top]{--ud-tooltip-from: 0 var(--ud-tooltip-shift)}.ud-tooltip[data-placement=bottom]{--ud-tooltip-from: 0 calc(var(--ud-tooltip-shift) * -1)}.ud-tooltip[data-placement=left]{--ud-tooltip-from: var(--ud-tooltip-shift) 0}.ud-tooltip[data-placement=right]{--ud-tooltip-from: calc(var(--ud-tooltip-shift) * -1) 0}@keyframes ud-tooltip-in{0%{opacity:0;translate:var(--ud-tooltip-from, 0 0)}to{opacity:1;translate:0 0}}.ud-tooltip-title{display:block;font-weight:600}.ud-tooltip-meta{display:block;margin-top:2px;color:var(--ud-tooltip-muted);font-weight:400}@media (prefers-reduced-motion: reduce){.ud-tooltip{--ud-tooltip-shift: 0px}}\n"] }]
263
+ }] });
450
264
 
451
- const capitalize = (word) => word ? word.charAt(0).toUpperCase() + word.slice(1) : word;
452
- const pluralize = (word) => /(?<!e)y\b/.test(word) ? word.replace(/(?<!e)y\b/, 'ies') : `${word}s`;
453
- const spaceCase = (word) => word.replace(/[-_]+/g, ' ');
454
- const inListValidator = (list) => {
455
- return (control) => {
456
- const value = String(control.value);
457
- return list.includes(value) ? { inList: true } : null;
458
- };
265
+ const GAP = 8;
266
+ const POSITIONS = {
267
+ top: {
268
+ originX: 'center',
269
+ originY: 'top',
270
+ overlayX: 'center',
271
+ overlayY: 'bottom',
272
+ offsetY: -GAP,
273
+ },
274
+ bottom: {
275
+ originX: 'center',
276
+ originY: 'bottom',
277
+ overlayX: 'center',
278
+ overlayY: 'top',
279
+ offsetY: GAP,
280
+ },
281
+ left: {
282
+ originX: 'start',
283
+ originY: 'center',
284
+ overlayX: 'end',
285
+ overlayY: 'center',
286
+ offsetX: -GAP,
287
+ },
288
+ right: {
289
+ originX: 'end',
290
+ originY: 'center',
291
+ overlayX: 'start',
292
+ overlayY: 'center',
293
+ offsetX: GAP,
294
+ },
459
295
  };
460
- const updateArray = (items, item, propertyId = 'id', addToEnd = true) => items.some(i => i[propertyId] === item[propertyId])
461
- ? items.map(i => (i[propertyId] === item[propertyId] ? item : i))
462
- : addToEnd
463
- ? [...items, item]
464
- : [item, ...items];
465
- const formatPhoneNumber = (value) => {
466
- // Remove all non-digits
467
- const digitsOnly = value.replace(/\D/g, '');
468
- // Format based on length
469
- let formattedValue = '';
470
- if (digitsOnly.length >= 10) {
471
- // Format as (XXX) XXX-XXXX for 10+ digits
472
- const match = digitsOnly.match(/^(\d{3})(\d{3})(\d{4})(\d*)$/);
473
- if (match) {
474
- formattedValue = `(${match[1]}) ${match[2]}-${match[3]}`;
475
- if (match[4]) {
476
- formattedValue += ` ext. ${match[4]}`;
477
- }
478
- }
479
- else {
480
- // Fallback for different lengths
481
- formattedValue = digitsOnly.replace(/^(\d{3})(\d{3})(\d{0,4}).*/, '($1) $2-$3');
482
- }
483
- }
484
- else if (digitsOnly.length >= 7) {
485
- // Format as XXX-XXXX for 7-9 digits
486
- formattedValue = digitsOnly.replace(/^(\d{3})(\d{0,4})/, '$1-$2');
487
- }
488
- else if (digitsOnly.length >= 4) {
489
- // Format as XXX-X for 4-6 digits
490
- formattedValue = digitsOnly.replace(/^(\d{3})(\d{0,3})/, '$1-$2');
491
- }
492
- else {
493
- // Keep as is for less than 4 digits
494
- formattedValue = digitsOnly;
495
- }
496
- return formattedValue;
296
+ const OPPOSITE = {
297
+ top: 'bottom',
298
+ bottom: 'top',
299
+ left: 'right',
300
+ right: 'left',
497
301
  };
498
- // Parse local date string to Date object without time zone offset
499
- function parseLocalDate(dateString) {
500
- const [year, month, day] = dateString.split('-');
501
- return new Date(Number(year), Number(month) - 1, Number(day));
502
- }
503
- // Format Date to Day Month Year HH:mm (LocalDateTime)
504
- // Example: Tue Feb 12 2022 12:00 without commas
505
- function formatLocalDateTimeLongForm(date) {
506
- return date
507
- .toLocaleString('en-US', {
508
- weekday: 'short',
509
- month: 'short',
510
- day: '2-digit',
511
- year: 'numeric',
512
- hour: '2-digit',
513
- minute: '2-digit',
514
- })
515
- .replace(',', '');
516
- }
517
- // Format Date to YYYY-MM-DDTHH:mm:ss (LocalDateTime)
518
- function formatLocalDateTime(date) {
519
- const year = date.getFullYear();
520
- const month = String(date.getMonth() + 1).padStart(2, '0');
521
- const day = String(date.getDate()).padStart(2, '0');
522
- const hours = String(date.getHours()).padStart(2, '0');
523
- const minutes = String(date.getMinutes()).padStart(2, '0');
524
- const seconds = String(date.getSeconds()).padStart(2, '0');
525
- return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
526
- }
527
- // Format Date to HH:mm:ss (LocalTime)
528
- function formatLocalTime(date) {
529
- const hours = String(date.getHours()).padStart(2, '0');
530
- const minutes = String(date.getMinutes()).padStart(2, '0');
531
- const seconds = String(date.getSeconds()).padStart(2, '0');
532
- return `${hours}:${minutes}:${seconds}`;
533
- }
534
- // Format Date to HH:mm (LocalTime)
535
- function formatLocalTimeWithMinutes(date) {
536
- const hours = String(date.getHours()).padStart(2, '0');
537
- const minutes = String(date.getMinutes()).padStart(2, '0');
538
- return `${hours}:${minutes}`;
539
- }
540
- // Format Date to HH:mm with AM/PM format (LocalTime)
541
- function formatLocalTimeWithMinutesAmPm(date) {
542
- const hours = Number.parseInt(String(date.getHours()));
543
- const minutes = String(date.getMinutes()).padStart(2, '0');
544
- const ampm = hours >= 12 ? 'PM' : 'AM';
545
- const normalizedHour = hours % 12 === 0 ? 12 : hours % 12;
546
- return `${normalizedHour.toString().padStart(2, '0')}:${minutes} ${ampm}`;
547
- }
548
- // Format Date to YYYY-MM-DD (LocalDate)
549
- function formatLocalDate(date) {
550
- const year = date.getFullYear();
551
- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based
552
- const day = String(date.getDate()).padStart(2, '0');
553
- return `${year}-${month}-${day}`;
554
- }
302
+ /** A long press shows the tooltip on touch; lifting the finger hides it this long after. */
303
+ const TOUCH_HOLD_MS = 500;
304
+ const TOUCH_LINGER_MS = 1500;
555
305
  /**
556
- * Formats an ISO date string to a readable format
557
- * @param isoString - Date string in ISO format (e.g., "2025-09-12T21:30:00")
558
- * @returns Formatted date string (e.g., "September 12, 2025, 9:30 PM")
306
+ * Moving from one tooltipped element to the next within this window shows the
307
+ * next tooltip at once, the way a toolbar should feel. Shared by every
308
+ * instance on purpose.
559
309
  */
560
- function formatStringDateTime(isoString) {
561
- const date = new Date(isoString);
562
- // Check if date is valid
563
- if (isNaN(date.getTime())) {
564
- throw new Error('Invalid date string provided');
565
- }
566
- const options = {
567
- year: 'numeric',
568
- month: 'long',
569
- day: 'numeric',
570
- hour: 'numeric',
571
- minute: '2-digit',
572
- hour12: true,
573
- };
574
- return date.toLocaleDateString('en-US', options);
310
+ const WARM_MS = 400;
311
+ let lastHiddenAt = 0;
312
+ let nextId = 0;
313
+ function placementOf(pair) {
314
+ if (pair.originY === 'top' && pair.overlayY === 'bottom')
315
+ return 'top';
316
+ if (pair.originY === 'bottom' && pair.overlayY === 'top')
317
+ return 'bottom';
318
+ if (pair.overlayX === 'end')
319
+ return 'left';
320
+ return 'right';
575
321
  }
576
322
  /**
577
- * Formats an ISO date string to a readable format
578
- * @param isoString - Date string in ISO format (e.g., "2025-09-12")
579
- * @returns Formatted date string (e.g., "September 12, 2025")
323
+ * The library's tooltip (UC-19), replacing both native `title` hints and
324
+ * `matTooltip`: `<ud-button udTooltip="Export as CSV">`.
325
+ *
326
+ * Shows on hover, on keyboard focus (focus-visible only, so a mouse click does
327
+ * not leave one hanging) and on a long press; hides on leave, blur, Escape,
328
+ * press, and scroll. Flips to the opposite side when there is no room. While
329
+ * shown, the host's `aria-describedby` names it.
580
330
  */
581
- function formatStringDate(isoString) {
582
- const date = new Date(isoString);
583
- // Check if date is valid
584
- if (isNaN(date.getTime())) {
585
- throw new Error('Invalid date string provided');
586
- }
587
- const options = {
588
- year: 'numeric',
589
- month: 'long',
590
- day: 'numeric',
331
+ class UdTooltipDirective {
332
+ /** Text, or a template for rich content. Empty shows nothing. */
333
+ udTooltip = input();
334
+ udTooltipPosition = input('top');
335
+ udTooltipDisabled = input(false);
336
+ udTooltipShowDelay = input(300);
337
+ overlay = inject(Overlay);
338
+ host = inject(ElementRef);
339
+ viewContainerRef = inject(ViewContainerRef);
340
+ document = inject(DOCUMENT);
341
+ id = `ud-tooltip-${nextId++}`;
342
+ overlayRef = null;
343
+ panel = null;
344
+ positionSub = null;
345
+ showTimer = null;
346
+ touchTimer = null;
347
+ onEscape = (event) => {
348
+ if (event.key === 'Escape') {
349
+ this.hide();
350
+ }
591
351
  };
592
- return date.toLocaleDateString('en-US', options);
593
- }
594
- /**
595
- * Format YYYY-MM to localized month year format
596
- * @param dateStr Format: "2025-11"
597
- * @param locale Language indicator
598
- * @returns Format: "Nov 2025" (or localized equivalent)
599
- */
600
- function formatMonthYear(dateStr, locale) {
601
- const [year, month] = dateStr.split('-');
602
- // Create date as first day of the month
603
- const date = new Date(parseInt(year), parseInt(month) - 1, 1);
604
- // Use Angular's formatDate with current locale
605
- // 'MMM yyyy' format gives "Nov 2025", "déc. 2025" for French, etc.
606
- return formatDate(date, 'MMM yyyy', locale);
607
- }
608
-
609
- class CapitalizePipe {
610
- transform(value) {
611
- return value ? capitalize(value) : '';
352
+ constructor() {
353
+ // Content or the disabled flag changing while shown.
354
+ effect(() => {
355
+ const content = this.udTooltip();
356
+ const disabled = this.udTooltipDisabled();
357
+ if (!this.panel) {
358
+ return;
359
+ }
360
+ if (disabled || !content) {
361
+ this.hide();
362
+ }
363
+ else {
364
+ this.panel.setInput('content', content);
365
+ }
366
+ });
612
367
  }
613
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
614
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: CapitalizePipe, isStandalone: true, name: "capitalize" });
615
- }
616
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CapitalizePipe, decorators: [{
617
- type: Pipe,
618
- args: [{
619
- name: 'capitalize',
620
- }]
621
- }] });
622
-
623
- class PluralizePipe {
624
- transform(value) {
625
- return value
626
- ? value.includes('|')
627
- ? value.split('|')[1].trim()
628
- : value
629
- : '';
368
+ scheduleShow() {
369
+ this.clearTimers();
370
+ const sinceLast = Date.now() - lastHiddenAt;
371
+ const delay = sinceLast >= 0 && sinceLast < WARM_MS ? 0 : this.udTooltipShowDelay();
372
+ if (delay === 0) {
373
+ this.show();
374
+ }
375
+ else {
376
+ this.showTimer = setTimeout(() => this.show(), delay);
377
+ }
630
378
  }
631
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PluralizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
632
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: PluralizePipe, isStandalone: true, name: "pluralize" });
379
+ onFocusIn() {
380
+ // The host may be a wrapper (ud-button) whose inner element takes focus.
381
+ const el = this.host.nativeElement;
382
+ if (el.matches(':focus-visible') || el.querySelector(':focus-visible')) {
383
+ this.scheduleShow();
384
+ }
385
+ }
386
+ onTouchStart() {
387
+ this.clearTimers();
388
+ this.touchTimer = setTimeout(() => this.show(), TOUCH_HOLD_MS);
389
+ }
390
+ onTouchEnd() {
391
+ if (this.touchTimer) {
392
+ clearTimeout(this.touchTimer);
393
+ this.touchTimer = null;
394
+ }
395
+ if (this.panel) {
396
+ this.touchTimer = setTimeout(() => this.hide(), TOUCH_LINGER_MS);
397
+ }
398
+ }
399
+ show() {
400
+ this.clearTimers();
401
+ const content = this.udTooltip();
402
+ if (this.udTooltipDisabled() || !content || this.panel) {
403
+ return;
404
+ }
405
+ const preferred = this.udTooltipPosition();
406
+ const strategy = this.overlay
407
+ .position()
408
+ .flexibleConnectedTo(this.host)
409
+ .withPositions([POSITIONS[preferred], POSITIONS[OPPOSITE[preferred]]])
410
+ .withFlexibleDimensions(false)
411
+ .withPush(false)
412
+ .withViewportMargin(8);
413
+ this.overlayRef = this.overlay.create({
414
+ positionStrategy: strategy,
415
+ scrollStrategy: this.overlay.scrollStrategies.close(),
416
+ panelClass: 'ud-tooltip-pane',
417
+ });
418
+ this.panel = this.overlayRef.attach(new ComponentPortal(UdTooltipComponent, this.viewContainerRef));
419
+ this.panel.setInput('content', content);
420
+ this.panel.setInput('tooltipId', this.id);
421
+ this.panel.setInput('placement', preferred);
422
+ this.positionSub = strategy.positionChanges.subscribe(change => {
423
+ this.panel?.setInput('placement', placementOf(change.connectionPair));
424
+ this.panel?.changeDetectorRef.detectChanges();
425
+ });
426
+ this.overlayRef.detachments().subscribe(() => this.dispose());
427
+ this.describe(true);
428
+ this.document.addEventListener('keydown', this.onEscape, true);
429
+ }
430
+ hide() {
431
+ this.clearTimers();
432
+ if (!this.overlayRef) {
433
+ return;
434
+ }
435
+ this.overlayRef.detach();
436
+ }
437
+ ngOnDestroy() {
438
+ this.hide();
439
+ }
440
+ /** Tear-down for every way a tooltip goes away, including the scroll strategy closing it. */
441
+ dispose() {
442
+ lastHiddenAt = Date.now();
443
+ this.document.removeEventListener('keydown', this.onEscape, true);
444
+ this.describe(false);
445
+ this.positionSub?.unsubscribe();
446
+ this.positionSub = null;
447
+ const ref = this.overlayRef;
448
+ this.overlayRef = null;
449
+ this.panel = null;
450
+ ref?.dispose();
451
+ }
452
+ /** Adds or removes this tooltip's id in the host's aria-describedby, keeping any other ids. */
453
+ describe(on) {
454
+ const el = this.host.nativeElement;
455
+ const ids = (el.getAttribute('aria-describedby') ?? '')
456
+ .split(/\s+/)
457
+ .filter(id => id && id !== this.id);
458
+ if (on) {
459
+ ids.push(this.id);
460
+ }
461
+ if (ids.length) {
462
+ el.setAttribute('aria-describedby', ids.join(' '));
463
+ }
464
+ else {
465
+ el.removeAttribute('aria-describedby');
466
+ }
467
+ }
468
+ clearTimers() {
469
+ if (this.showTimer) {
470
+ clearTimeout(this.showTimer);
471
+ this.showTimer = null;
472
+ }
473
+ if (this.touchTimer) {
474
+ clearTimeout(this.touchTimer);
475
+ this.touchTimer = null;
476
+ }
477
+ }
478
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
479
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: UdTooltipDirective, isStandalone: true, selector: "[udTooltip]", inputs: { udTooltip: { classPropertyName: "udTooltip", publicName: "udTooltip", isSignal: true, isRequired: false, transformFunction: null }, udTooltipPosition: { classPropertyName: "udTooltipPosition", publicName: "udTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, udTooltipDisabled: { classPropertyName: "udTooltipDisabled", publicName: "udTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, udTooltipShowDelay: { classPropertyName: "udTooltipShowDelay", publicName: "udTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "scheduleShow()", "mouseleave": "hide()", "focusin": "onFocusIn()", "focusout": "hide()", "mousedown": "hide()", "touchstart": "onTouchStart()", "touchend": "onTouchEnd()", "touchcancel": "hide()" } }, ngImport: i0 });
633
480
  }
634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PluralizePipe, decorators: [{
635
- type: Pipe,
481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipDirective, decorators: [{
482
+ type: Directive,
636
483
  args: [{
637
- name: 'pluralize',
484
+ selector: '[udTooltip]',
485
+ standalone: true,
486
+ host: {
487
+ '(mouseenter)': 'scheduleShow()',
488
+ '(mouseleave)': 'hide()',
489
+ '(focusin)': 'onFocusIn()',
490
+ '(focusout)': 'hide()',
491
+ '(mousedown)': 'hide()',
492
+ '(touchstart)': 'onTouchStart()',
493
+ '(touchend)': 'onTouchEnd()',
494
+ '(touchcancel)': 'hide()',
495
+ },
638
496
  }]
639
- }] });
497
+ }], ctorParameters: () => [] });
640
498
 
641
- class ToObservablePipe {
642
- transform(value) {
643
- return isObservable(value) ? value : of(value);
499
+ const SIDENAV_LOGO = 'assets/brand/wordmark/udorm-wordmark-reverse.png';
500
+ const SIDENAV_LOGO_COLLAPSED = 'assets/brand/appicon/udorm-glyph-ud-reverse.png';
501
+ /**
502
+ * The navy app drawer: brand, scrolling sections, pinned footer. It renders
503
+ * the groups it is given; filtering by role or feature flag is the app's job.
504
+ */
505
+ class SidenavComponent {
506
+ groups = input.required();
507
+ /** Icon-only rail: headers become dividers, labels move to tooltips. */
508
+ collapsed = input(false);
509
+ brandRoute = input('/');
510
+ logo = input(SIDENAV_LOGO);
511
+ logoCollapsed = input(SIDENAV_LOGO_COLLAPSED);
512
+ router = inject(Router);
513
+ zone = inject(NgZone);
514
+ destroyRef = inject(DestroyRef);
515
+ sections = viewChild.required('sections');
516
+ sectionsList = viewChild.required('sectionsList');
517
+ // Whether part of the list sits below the visible area; drives the fade.
518
+ $moreBelow = signal(false);
519
+ $navGroups = computed(() => this.groups().filter(group => !group.footer && group.children.length));
520
+ $footerGroups = computed(() => this.groups().filter(group => group.footer && group.children.length));
521
+ // Seeded from router.url: the first NavigationEnd after login can fire
522
+ // before this component exists, which left the landing page unhighlighted.
523
+ $currentUrl = toSignal(this.router.events.pipe(filter((event) => event instanceof NavigationEnd), map(event => event.urlAfterRedirects)), { initialValue: this.router.url });
524
+ $activeRoute = computed(() => activeNavRoute(this.$currentUrl(), this.groups().flatMap(group => group.children.map(child => child.route))));
525
+ ngAfterViewInit() {
526
+ // The frame resizes with the window and the drawer; the list with the
527
+ // groups and language. Either can push items past the fold or back.
528
+ const observer = new ResizeObserver(() => this.zone.run(() => this.updateMoreBelow()));
529
+ observer.observe(this.sections().nativeElement);
530
+ observer.observe(this.sectionsList().nativeElement);
531
+ this.destroyRef.onDestroy(() => observer.disconnect());
644
532
  }
645
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToObservablePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
646
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: ToObservablePipe, isStandalone: true, name: "toObservable" });
533
+ updateMoreBelow() {
534
+ const { scrollTop, clientHeight, scrollHeight } = this.sections().nativeElement;
535
+ this.$moreBelow.set(scrollTop + clientHeight < scrollHeight - 1);
536
+ }
537
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
538
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: SidenavComponent, isStandalone: true, selector: "ud-sidenav", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, brandRoute: { classPropertyName: "brandRoute", publicName: "brandRoute", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoCollapsed: { classPropertyName: "logoCollapsed", publicName: "logoCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sections", first: true, predicate: ["sections"], descendants: true, isSignal: true }, { propertyName: "sectionsList", first: true, predicate: ["sectionsList"], descendants: true, isSignal: true }], ngImport: i0, template: "<nav class=\"sidenav\" [class.collapsed]=\"collapsed()\">\n <a class=\"brand\" [routerLink]=\"brandRoute()\">\n @if (collapsed()) {\n <img [src]=\"logoCollapsed()\" alt=\"UDorm\" class=\"logo-glyph\" />\n } @else {\n <img [src]=\"logo()\" alt=\"UDorm\" class=\"logo-wordmark\" />\n }\n </a>\n <!-- The frame carries the fade, so it stays put while the list scrolls. -->\n <div class=\"sections-frame\" [class.more-below]=\"$moreBelow()\">\n <div class=\"sections\" #sections (scroll)=\"updateMoreBelow()\">\n <div class=\"sections-list\" #sectionsList>\n @for (group of $navGroups(); track group.key) {\n <div class=\"nav-group\">\n <!-- Same height expanded and collapsed, so icons keep their\n place when the drawer toggles. -->\n @if (group.category) {\n @if (collapsed()) {\n <div class=\"divider\" aria-hidden=\"true\"></div>\n } @else {\n <p class=\"category\">\n {{ group.category | toObservable | async }}\n </p>\n }\n }\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if ($footerGroups().length) {\n <div class=\"footer\">\n @for (group of $footerGroups(); track group.key) {\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n }\n </div>\n }\n</nav>\n\n<ng-template #navItem let-child>\n @let label = child.label | toObservable | async | capitalize;\n <a\n class=\"nav-item\"\n [routerLink]=\"child.route\"\n [class.active]=\"child.route === $activeRoute()\"\n [attr.aria-current]=\"child.route === $activeRoute() ? 'page' : null\"\n [attr.aria-label]=\"collapsed() ? label : null\"\n udTooltipPosition=\"right\"\n [udTooltip]=\"collapsed() ? (label ?? '') : ''\">\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\">\n {{ child.icon }}\n </mat-icon>\n @if (!collapsed()) {\n <span class=\"label\">{{ label }}</span>\n }\n @if (child.badge) {\n <span class=\"count\">{{ child.badge }}</span>\n }\n </a>\n</ng-template>\n", styles: [":host{display:block;height:100%}.sidenav{display:flex;flex-direction:column;height:100%;background:var(--primary-color);font-family:Sora,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sections-frame{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.sections-frame:after{content:\"\";position:absolute;inset:auto 0 0;height:40px;background:linear-gradient(transparent,var(--primary-color));pointer-events:none;opacity:0;transition:opacity .15s ease}.sections-frame.more-below:after{opacity:1}.sections{flex:1;min-height:0;padding:4px 8px 8px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.sections::-webkit-scrollbar{width:6px}.sections::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.sections-list{display:flex;flex-direction:column;gap:12px}.footer{flex:none;padding:6px 8px;border-top:1px solid rgba(255,255,255,.1)}.brand{flex:none;display:flex;align-items:center;height:56px;margin:0 8px;padding-left:10px;border-radius:6px}.brand:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.logo-wordmark{height:24px;width:auto}.logo-glyph{height:28px;width:28px;object-fit:contain}.nav-group{display:flex;flex-direction:column;gap:2px}.category{display:flex;align-items:flex-end;min-height:22px;margin:0;padding:0 10px 6px;font-size:11px;font-weight:600;line-height:1.25;letter-spacing:.08em;text-transform:uppercase;color:#8a93a8}.divider{display:flex;align-items:center;justify-content:center;height:22px}.divider:before{content:\"\";width:20px;height:1px;background:#ffffff1a}.nav-item{position:relative;display:flex;align-items:center;gap:10px;height:30px;padding:0 10px;border-radius:6px;color:#dcdfe8;font-size:13.5px;line-height:1;letter-spacing:0;text-decoration:none;white-space:nowrap;transition:background-color .15s ease}.nav-item mat-icon{flex:none;width:18px;height:18px;font-size:18px;color:#939cb2}.nav-item:hover{background:#ffffff0f;color:#f5f6f7}.nav-item:hover mat-icon{color:#dcdfe8}.nav-item.active{background:#2a3768;color:#fff;font-weight:500}.nav-item.active mat-icon{color:#aeb8ff}.nav-item:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.label{overflow:hidden;text-overflow:ellipsis;line-height:1.35}.count{margin-left:auto;min-width:22px;height:18px;padding:0 5px;border-radius:9px;background:#ef6547;color:#1b2535;font-size:11px;font-weight:600;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}.collapsed .brand{justify-content:center;padding-left:0}.collapsed .nav-item{justify-content:center;padding:0}.collapsed .count{position:absolute;top:-2px;right:3px;min-width:16px;height:15px;padding:0 4px;font-size:9.5px;line-height:15px;box-shadow:0 0 0 2px var(--primary-color)}@media (prefers-reduced-motion: reduce){.nav-item,.sections-frame:after{transition:none}}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: CapitalizePipe, name: "capitalize" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: ToObservablePipe, name: "toObservable" }, { kind: "directive", type: UdTooltipDirective, selector: "[udTooltip]", inputs: ["udTooltip", "udTooltipPosition", "udTooltipDisabled", "udTooltipShowDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
647
539
  }
648
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToObservablePipe, decorators: [{
649
- type: Pipe,
650
- args: [{
651
- name: 'toObservable',
652
- }]
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SidenavComponent, decorators: [{
541
+ type: Component,
542
+ args: [{ selector: 'ud-sidenav', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
543
+ AsyncPipe,
544
+ CapitalizePipe,
545
+ MatIcon,
546
+ NgTemplateOutlet,
547
+ RouterLink,
548
+ ToObservablePipe,
549
+ UdTooltipDirective,
550
+ ], template: "<nav class=\"sidenav\" [class.collapsed]=\"collapsed()\">\n <a class=\"brand\" [routerLink]=\"brandRoute()\">\n @if (collapsed()) {\n <img [src]=\"logoCollapsed()\" alt=\"UDorm\" class=\"logo-glyph\" />\n } @else {\n <img [src]=\"logo()\" alt=\"UDorm\" class=\"logo-wordmark\" />\n }\n </a>\n <!-- The frame carries the fade, so it stays put while the list scrolls. -->\n <div class=\"sections-frame\" [class.more-below]=\"$moreBelow()\">\n <div class=\"sections\" #sections (scroll)=\"updateMoreBelow()\">\n <div class=\"sections-list\" #sectionsList>\n @for (group of $navGroups(); track group.key) {\n <div class=\"nav-group\">\n <!-- Same height expanded and collapsed, so icons keep their\n place when the drawer toggles. -->\n @if (group.category) {\n @if (collapsed()) {\n <div class=\"divider\" aria-hidden=\"true\"></div>\n } @else {\n <p class=\"category\">\n {{ group.category | toObservable | async }}\n </p>\n }\n }\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if ($footerGroups().length) {\n <div class=\"footer\">\n @for (group of $footerGroups(); track group.key) {\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n }\n </div>\n }\n</nav>\n\n<ng-template #navItem let-child>\n @let label = child.label | toObservable | async | capitalize;\n <a\n class=\"nav-item\"\n [routerLink]=\"child.route\"\n [class.active]=\"child.route === $activeRoute()\"\n [attr.aria-current]=\"child.route === $activeRoute() ? 'page' : null\"\n [attr.aria-label]=\"collapsed() ? label : null\"\n udTooltipPosition=\"right\"\n [udTooltip]=\"collapsed() ? (label ?? '') : ''\">\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\">\n {{ child.icon }}\n </mat-icon>\n @if (!collapsed()) {\n <span class=\"label\">{{ label }}</span>\n }\n @if (child.badge) {\n <span class=\"count\">{{ child.badge }}</span>\n }\n </a>\n</ng-template>\n", styles: [":host{display:block;height:100%}.sidenav{display:flex;flex-direction:column;height:100%;background:var(--primary-color);font-family:Sora,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sections-frame{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.sections-frame:after{content:\"\";position:absolute;inset:auto 0 0;height:40px;background:linear-gradient(transparent,var(--primary-color));pointer-events:none;opacity:0;transition:opacity .15s ease}.sections-frame.more-below:after{opacity:1}.sections{flex:1;min-height:0;padding:4px 8px 8px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.sections::-webkit-scrollbar{width:6px}.sections::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.sections-list{display:flex;flex-direction:column;gap:12px}.footer{flex:none;padding:6px 8px;border-top:1px solid rgba(255,255,255,.1)}.brand{flex:none;display:flex;align-items:center;height:56px;margin:0 8px;padding-left:10px;border-radius:6px}.brand:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.logo-wordmark{height:24px;width:auto}.logo-glyph{height:28px;width:28px;object-fit:contain}.nav-group{display:flex;flex-direction:column;gap:2px}.category{display:flex;align-items:flex-end;min-height:22px;margin:0;padding:0 10px 6px;font-size:11px;font-weight:600;line-height:1.25;letter-spacing:.08em;text-transform:uppercase;color:#8a93a8}.divider{display:flex;align-items:center;justify-content:center;height:22px}.divider:before{content:\"\";width:20px;height:1px;background:#ffffff1a}.nav-item{position:relative;display:flex;align-items:center;gap:10px;height:30px;padding:0 10px;border-radius:6px;color:#dcdfe8;font-size:13.5px;line-height:1;letter-spacing:0;text-decoration:none;white-space:nowrap;transition:background-color .15s ease}.nav-item mat-icon{flex:none;width:18px;height:18px;font-size:18px;color:#939cb2}.nav-item:hover{background:#ffffff0f;color:#f5f6f7}.nav-item:hover mat-icon{color:#dcdfe8}.nav-item.active{background:#2a3768;color:#fff;font-weight:500}.nav-item.active mat-icon{color:#aeb8ff}.nav-item:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.label{overflow:hidden;text-overflow:ellipsis;line-height:1.35}.count{margin-left:auto;min-width:22px;height:18px;padding:0 5px;border-radius:9px;background:#ef6547;color:#1b2535;font-size:11px;font-weight:600;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}.collapsed .brand{justify-content:center;padding-left:0}.collapsed .nav-item{justify-content:center;padding:0}.collapsed .count{position:absolute;top:-2px;right:3px;min-width:16px;height:15px;padding:0 4px;font-size:9.5px;line-height:15px;box-shadow:0 0 0 2px var(--primary-color)}@media (prefers-reduced-motion: reduce){.nav-item,.sections-frame:after{transition:none}}\n"] }]
653
551
  }] });
654
-
655
552
  /**
656
- * Money as decimal strings, never JS numbers (UC-23). `0.1 + 0.2` is
657
- * `0.30000000000000004`; an amount that went through a float can reach the API
658
- * a cent off. Everything here works on the digits of the string, and the only
659
- * arithmetic is on whole cents.
553
+ * The nav route to highlight for `url`. An exact match wins; otherwise the
554
+ * item in the same top-level section, so detail and add pages (`/users/123`,
555
+ * `/users/add-user`) keep their section lit. When a section has several items
556
+ * (`/document-compliance/send` and `/list`), its list page wins.
660
557
  */
558
+ function activeNavRoute(url, routes) {
559
+ const path = url.split(/[?#;]/)[0];
560
+ if (routes.includes(path)) {
561
+ return path;
562
+ }
563
+ const section = (route) => route.split('/')[1];
564
+ const inSection = routes.filter(route => section(route) === section(path));
565
+ return inSection.find(route => route.endsWith('/list')) ?? inSection[0];
566
+ }
567
+
568
+ // Bootstrap's medium breakpoint: at or below it the drawer stays an icon rail.
569
+ const CAN_OPEN_MIN_WIDTH = 768;
661
570
  /**
662
- * Reads what a person typed or pasted: "1,234.5", "$1234.50", " 12 ", "CA$ 3".
663
- * Currency symbols, letters, spaces and thousands commas are dropped; at most
664
- * {@link decimals} decimals are allowed; the result is padded to exactly that
665
- * many ("12" → "12.00").
571
+ * The app frame: `ud-sidenav` in a drawer, a sticky toolbar with the drawer
572
+ * toggle, and the page. Project `[toolbar-start]` (e.g. a breadcrumb),
573
+ * `[toolbar-end]` (e.g. the user menu) and the page itself.
666
574
  */
667
- function parseMoney(raw, decimals = 2, allowNegative = false) {
668
- if (raw === null || raw === undefined) {
669
- return { value: null };
575
+ class AppShellComponent {
576
+ groups = input.required();
577
+ brandRoute = input('/');
578
+ logo = input(SIDENAV_LOGO);
579
+ logoCollapsed = input(SIDENAV_LOGO_COLLAPSED);
580
+ $canOpen = signal(this.wideEnough());
581
+ $isOpen = signal(true);
582
+ $collapsed = computed(() => !(this.$canOpen() && this.$isOpen()));
583
+ onResize() {
584
+ this.$canOpen.set(this.wideEnough());
670
585
  }
671
- const text = String(raw).trim();
672
- if (text === '') {
673
- return { value: null };
586
+ toggle() {
587
+ this.$isOpen.update(open => !open);
674
588
  }
675
- const negative = text.includes('-');
676
- const cleaned = text.replace(/[^0-9.]/g, '');
677
- if (!/^\d*\.?\d*$/.test(cleaned) || !/\d/.test(cleaned)) {
678
- return { error: 'format' };
589
+ wideEnough() {
590
+ return document.body.clientWidth > CAN_OPEN_MIN_WIDTH;
679
591
  }
680
- if (negative && !allowNegative) {
681
- return { error: 'negative' };
592
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: AppShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
593
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: AppShellComponent, isStandalone: true, selector: "ud-app-shell", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: true, transformFunction: null }, brandRoute: { classPropertyName: "brandRoute", publicName: "brandRoute", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoCollapsed: { classPropertyName: "logoCollapsed", publicName: "logoCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0, template: "<mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"side\" [opened]=\"!$collapsed()\">\n <ud-sidenav\n [groups]=\"groups()\"\n [collapsed]=\"$collapsed()\"\n [brandRoute]=\"brandRoute()\"\n [logo]=\"logo()\"\n [logoCollapsed]=\"logoCollapsed()\" />\n </mat-drawer>\n <mat-drawer-content class=\"drawer-content\" [class.half-closed]=\"$collapsed()\">\n <mat-toolbar class=\"toolbar\">\n <div class=\"toolbar-start\">\n @if ($canOpen()) {\n <button\n mat-icon-button\n class=\"toggle\"\n aria-label=\"Toggle navigation\"\n [attr.aria-expanded]=\"!$collapsed()\"\n (click)=\"toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n <ng-content select=\"[toolbar-start]\" />\n </div>\n <div class=\"toolbar-end\">\n <ng-content select=\"[toolbar-end]\" />\n </div>\n </mat-toolbar>\n <div class=\"page\">\n <ng-content />\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [":host{display:block}.drawer-container{height:100vh}.drawer{width:248px;background:var(--primary-color);border-right:none}.drawer.mat-drawer-side{z-index:1}.drawer:not(.mat-drawer-opened){visibility:visible!important;display:block!important;transform:none!important;width:64px}.drawer-content{border:1px solid var(--accent-lightest-color);border-top:none;border-bottom:none;background-color:var(--background-color)}.drawer-content.half-closed{margin-left:64px!important}.drawer-content:not(.half-closed){margin-left:248px!important}.toolbar{position:sticky;top:0;z-index:1000;display:flex;justify-content:space-between;gap:16px;box-sizing:border-box;height:auto;min-height:56px;padding:0 16px 0 8px;background:#fff;color:#373f4c;border-bottom:1px solid var(--accent-lightest-color);font-size:14px}.toolbar-start,.toolbar-end{display:flex;align-items:center;gap:8px;min-width:0}.page{margin:1.5rem 0}@media (min-width: 768px){.page{margin:1.5rem 3rem}}@media print{.drawer{display:none!important}.drawer-content,.drawer-content.half-closed,.drawer-content:not(.half-closed){margin-left:0!important;overflow:visible!important;height:auto!important}.drawer-container{height:auto;overflow:visible}.toolbar{display:none!important}}\n"], dependencies: [{ kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: SidenavComponent, selector: "ud-sidenav", inputs: ["groups", "collapsed", "brandRoute", "logo", "logoCollapsed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
594
+ }
595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: AppShellComponent, decorators: [{
596
+ type: Component,
597
+ args: [{ selector: 'ud-app-shell', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
598
+ MatDrawer,
599
+ MatDrawerContainer,
600
+ MatDrawerContent,
601
+ MatIcon,
602
+ MatIconButton,
603
+ MatToolbar,
604
+ SidenavComponent,
605
+ ], template: "<mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"side\" [opened]=\"!$collapsed()\">\n <ud-sidenav\n [groups]=\"groups()\"\n [collapsed]=\"$collapsed()\"\n [brandRoute]=\"brandRoute()\"\n [logo]=\"logo()\"\n [logoCollapsed]=\"logoCollapsed()\" />\n </mat-drawer>\n <mat-drawer-content class=\"drawer-content\" [class.half-closed]=\"$collapsed()\">\n <mat-toolbar class=\"toolbar\">\n <div class=\"toolbar-start\">\n @if ($canOpen()) {\n <button\n mat-icon-button\n class=\"toggle\"\n aria-label=\"Toggle navigation\"\n [attr.aria-expanded]=\"!$collapsed()\"\n (click)=\"toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n <ng-content select=\"[toolbar-start]\" />\n </div>\n <div class=\"toolbar-end\">\n <ng-content select=\"[toolbar-end]\" />\n </div>\n </mat-toolbar>\n <div class=\"page\">\n <ng-content />\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [":host{display:block}.drawer-container{height:100vh}.drawer{width:248px;background:var(--primary-color);border-right:none}.drawer.mat-drawer-side{z-index:1}.drawer:not(.mat-drawer-opened){visibility:visible!important;display:block!important;transform:none!important;width:64px}.drawer-content{border:1px solid var(--accent-lightest-color);border-top:none;border-bottom:none;background-color:var(--background-color)}.drawer-content.half-closed{margin-left:64px!important}.drawer-content:not(.half-closed){margin-left:248px!important}.toolbar{position:sticky;top:0;z-index:1000;display:flex;justify-content:space-between;gap:16px;box-sizing:border-box;height:auto;min-height:56px;padding:0 16px 0 8px;background:#fff;color:#373f4c;border-bottom:1px solid var(--accent-lightest-color);font-size:14px}.toolbar-start,.toolbar-end{display:flex;align-items:center;gap:8px;min-width:0}.page{margin:1.5rem 0}@media (min-width: 768px){.page{margin:1.5rem 3rem}}@media print{.drawer{display:none!important}.drawer-content,.drawer-content.half-closed,.drawer-content:not(.half-closed){margin-left:0!important;overflow:visible!important;height:auto!important}.drawer-container{height:auto;overflow:visible}.toolbar{display:none!important}}\n"] }]
606
+ }], propDecorators: { onResize: [{
607
+ type: HostListener,
608
+ args: ['window:resize']
609
+ }] } });
610
+
611
+ class CarouselComponent {
612
+ pictures = [];
613
+ height = 300;
614
+ direction = 'horizontal';
615
+ autoplay = true;
616
+ objectFit = 'cover';
617
+ swiperRef;
618
+ lightboxBackdrop;
619
+ activeIndex = 0;
620
+ lightboxIndex = null;
621
+ lightboxShouldFocus = false;
622
+ get lightboxOpen() {
623
+ return this.lightboxIndex !== null;
682
624
  }
683
- const [whole, fraction = ''] = cleaned.split('.');
684
- if (fraction.length > decimals) {
685
- return { error: 'decimals' };
625
+ openLightbox(index) {
626
+ this.lightboxIndex = index;
627
+ this.lightboxShouldFocus = true;
686
628
  }
687
- const integer = whole.replace(/^0+(?=\d)/, '') || '0';
688
- const padded = decimals > 0 ? '.' + fraction.padEnd(decimals, '0') : '';
689
- const value = integer + padded;
690
- return { value: negative && /[1-9]/.test(value) ? '-' + value : value };
691
- }
692
- /** Whole cents of a normalised 2-decimal string: "1234.50" → 123450. */
693
- function moneyToCents(value) {
694
- const negative = value.startsWith('-');
695
- const [whole, fraction = ''] = value.replace('-', '').split('.');
696
- const cents = Number(whole) * 100 + Number(fraction.padEnd(2, '0').slice(0, 2));
697
- return negative ? -cents : cents;
698
- }
699
- /** The inverse of {@link moneyToCents}: 123450 → "1234.50". Rounds nothing; give it whole cents. */
700
- function centsToMoney(cents) {
701
- const negative = cents < 0;
702
- const abs = Math.abs(Math.trunc(cents));
703
- const value = `${Math.floor(abs / 100)}.${String(abs % 100).padStart(2, '0')}`;
704
- return negative ? '-' + value : value;
705
- }
706
- /** For display only: "1234.50" → "1,234.50". Never parse this back as a number. */
707
- function groupThousands(value) {
708
- const negative = value.startsWith('-');
709
- const [whole, fraction] = value.replace('-', '').split('.');
710
- const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
711
- return (negative ? '-' : '') + grouped + (fraction !== undefined ? '.' + fraction : '');
712
- }
713
- /**
714
- * For display only: an API amount in its currency, always 2 decimals.
715
- * `formatMoney('1234.5', 'CAD', 'en-US')` gives "$1,234.50", a credit "-$12.50",
716
- * or "($12.50)" with {@link accounting}. The value goes to Intl as a string, so
717
- * it is never rounded through a float. Empty input gives "", anything that is
718
- * not a number is shown as it came.
719
- */
720
- function formatMoney(value, currency = 'USD', locale = 'en-US', accounting = false) {
721
- if (value === null || value === undefined || String(value).trim() === '') {
722
- return '';
629
+ ngAfterViewChecked() {
630
+ if (this.lightboxShouldFocus && this.lightboxBackdrop) {
631
+ this.lightboxShouldFocus = false;
632
+ setTimeout(() => this.lightboxBackdrop?.nativeElement.focus(), 0);
633
+ }
723
634
  }
724
- const text = String(value).trim();
725
- if (!/^-?\d+(\.\d+)?$/.test(text)) {
726
- return text;
635
+ closeLightbox() {
636
+ this.lightboxIndex = null;
727
637
  }
728
- // Intl reads a numeric string exactly (NumberFormat v3); cast only because
729
- // the ES2022 lib predates that overload.
730
- return new Intl.NumberFormat(locale, {
731
- style: 'currency',
732
- currency,
733
- currencyDisplay: 'narrowSymbol',
734
- currencySign: accounting ? 'accounting' : 'standard',
735
- minimumFractionDigits: 2,
736
- maximumFractionDigits: 2,
737
- }).format(text);
638
+ lightboxPrev() {
639
+ if (this.lightboxIndex === null)
640
+ return;
641
+ this.lightboxIndex = (this.lightboxIndex - 1 + this.pictures.length) % this.pictures.length;
642
+ }
643
+ lightboxNext() {
644
+ if (this.lightboxIndex === null)
645
+ return;
646
+ this.lightboxIndex = (this.lightboxIndex + 1) % this.pictures.length;
647
+ }
648
+ onLightboxKeydown(event) {
649
+ if (event.key === 'Escape')
650
+ this.closeLightbox();
651
+ if (event.key === 'ArrowLeft')
652
+ this.lightboxPrev();
653
+ if (event.key === 'ArrowRight')
654
+ this.lightboxNext();
655
+ }
656
+ ngAfterViewInit() {
657
+ const el = this.swiperRef.nativeElement;
658
+ Object.assign(el, { autoplay: this.autoplay });
659
+ el.initialize();
660
+ el.addEventListener('swiperslidechange', () => {
661
+ this.activeIndex = el.swiper.realIndex;
662
+ });
663
+ }
664
+ ngOnChanges(changes) {
665
+ if (changes['autoplay'] && !changes['autoplay'].firstChange) {
666
+ const swiper = this.swiperRef?.nativeElement?.swiper;
667
+ if (!swiper)
668
+ return;
669
+ if (this.autoplay) {
670
+ swiper.autoplay.start();
671
+ }
672
+ else {
673
+ swiper.autoplay.stop();
674
+ }
675
+ }
676
+ }
677
+ prev() {
678
+ this.swiperRef.nativeElement.swiper.slidePrev();
679
+ }
680
+ next() {
681
+ this.swiperRef.nativeElement.swiper.slideNext();
682
+ }
683
+ goTo(index) {
684
+ this.swiperRef.nativeElement.swiper.slideTo(index);
685
+ }
686
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
687
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CarouselComponent, isStandalone: true, selector: "ud-carousel", inputs: { pictures: "pictures", height: "height", direction: "direction", autoplay: "autoplay", objectFit: "objectFit" }, viewQueries: [{ propertyName: "swiperRef", first: true, predicate: ["swiperRef"], descendants: true }, { propertyName: "lightboxBackdrop", first: true, predicate: ["lightboxBackdrop"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"ud-carousel\">\n <swiper-container\n #swiperRef\n init=\"false\"\n [slidesPerView]=\"1\"\n [pagination]=\"false\"\n [direction]=\"direction\"\n [style.height.px]=\"height\">\n @for (picture of pictures; track $index) {\n <swiper-slide>\n <img\n [src]=\"picture\"\n alt=\"Slide {{ $index + 1 }}\"\n [style.object-fit]=\"objectFit\"\n (click)=\"openLightbox($index)\"\n class=\"ud-slide-img\" />\n </swiper-slide>\n }\n </swiper-container>\n\n <button class=\"ud-nav ud-nav-prev\" (click)=\"prev()\" aria-label=\"Previous slide\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n <button class=\"ud-nav ud-nav-next\" (click)=\"next()\" aria-label=\"Next slide\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-pagination\">\n @for (picture of pictures; track $index) {\n <button\n class=\"ud-dot\"\n [class.active]=\"activeIndex === $index\"\n (click)=\"goTo($index)\"\n [attr.aria-label]=\"'Go to slide ' + ($index + 1)\">\n </button>\n }\n </div>\n</div>\n\n@if (lightboxOpen) {\n <div\n #lightboxBackdrop\n class=\"ud-lightbox-backdrop\"\n (click)=\"closeLightbox()\"\n (keydown)=\"onLightboxKeydown($event)\"\n tabindex=\"0\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Image fullscreen view\">\n\n <button class=\"ud-lightbox-close\" (click)=\"closeLightbox()\" aria-label=\"Close\">\n <span class=\"material-icons-outlined\">close</span>\n </button>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-prev\"\n (click)=\"$event.stopPropagation(); lightboxPrev()\"\n aria-label=\"Previous image\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n\n <div class=\"ud-lightbox-img-wrap\" (click)=\"$event.stopPropagation()\">\n <img\n [src]=\"pictures[lightboxIndex!]\"\n alt=\"Fullscreen image {{ lightboxIndex! + 1 }}\"\n class=\"ud-lightbox-img\" />\n </div>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-next\"\n (click)=\"$event.stopPropagation(); lightboxNext()\"\n aria-label=\"Next image\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-lightbox-counter\">\n {{ lightboxIndex! + 1 }} / {{ pictures.length }}\n </div>\n </div>\n}\n", styles: [":host{display:block;width:100%}.ud-carousel{position:relative;width:100%;border-radius:12px;overflow:hidden}.ud-carousel:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:80px;background:linear-gradient(to top,rgba(15,20,30,.6) 0%,transparent 100%);border-radius:0 0 12px 12px;pointer-events:none;z-index:5}swiper-container{width:100%;border-radius:12px}swiper-slide{display:flex;justify-content:center;align-items:center;background:#1b2535;overflow:hidden}swiper-slide .ud-slide-img{display:block;width:100%;height:100%;cursor:zoom-in}.ud-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:10;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:none;background:#0f141e73;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;cursor:pointer;opacity:.8;transition:background .2s ease,opacity .2s ease,transform .2s ease}.ud-nav span{font-size:22px;line-height:1;display:flex}.ud-nav:hover{background:#0f141ed1;opacity:1;transform:translateY(-50%) scale(1.08)}.ud-nav.ud-nav-prev{left:12px}.ud-nav.ud-nav-next{right:12px}.ud-lightbox-backdrop{position:fixed;inset:0;z-index:1000;background:#000000e0;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;animation:ud-lightbox-in .2s ease;outline:none}@keyframes ud-lightbox-in{0%{opacity:0}to{opacity:1}}.ud-lightbox-img-wrap{max-width:calc(100vw - 120px);max-height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center}.ud-lightbox-img{max-width:100%;max-height:calc(100vh - 80px);border-radius:10px;box-shadow:0 24px 64px #0009;object-fit:contain;display:block;animation:ud-lightbox-scale-in .22s cubic-bezier(.34,1.56,.64,1)}@keyframes ud-lightbox-scale-in{0%{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}.ud-lightbox-close{position:fixed;top:20px;right:20px;z-index:1001;width:44px;height:44px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-close span{font-size:22px}.ud-lightbox-close:hover{background:#ffffff38;transform:scale(1.1)}.ud-lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);z-index:1001;width:52px;height:52px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-nav span{font-size:28px}.ud-lightbox-nav:hover{background:#ffffff38}.ud-lightbox-nav.ud-lightbox-prev{left:16px}.ud-lightbox-nav.ud-lightbox-prev:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-nav.ud-lightbox-next{right:16px}.ud-lightbox-nav.ud-lightbox-next:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-counter{position:fixed;bottom:20px;left:50%;transform:translate(-50%);color:#ffffffb3;font-size:14px;font-weight:500;letter-spacing:.05em;z-index:1001}.ud-pagination{position:absolute;bottom:14px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:6px;z-index:10}.ud-dot{display:block;height:8px;width:8px;border-radius:100px;border:none;padding:0;background:#ffffff73;cursor:pointer;transition:width .3s cubic-bezier(.34,1.56,.64,1),background .25s ease}.ud-dot.active{width:28px;background:#fff}.ud-dot:hover:not(.active){background:#ffffffbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
738
688
  }
689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CarouselComponent, decorators: [{
690
+ type: Component,
691
+ args: [{ selector: 'ud-carousel', imports: [CommonModule], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<div class=\"ud-carousel\">\n <swiper-container\n #swiperRef\n init=\"false\"\n [slidesPerView]=\"1\"\n [pagination]=\"false\"\n [direction]=\"direction\"\n [style.height.px]=\"height\">\n @for (picture of pictures; track $index) {\n <swiper-slide>\n <img\n [src]=\"picture\"\n alt=\"Slide {{ $index + 1 }}\"\n [style.object-fit]=\"objectFit\"\n (click)=\"openLightbox($index)\"\n class=\"ud-slide-img\" />\n </swiper-slide>\n }\n </swiper-container>\n\n <button class=\"ud-nav ud-nav-prev\" (click)=\"prev()\" aria-label=\"Previous slide\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n <button class=\"ud-nav ud-nav-next\" (click)=\"next()\" aria-label=\"Next slide\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-pagination\">\n @for (picture of pictures; track $index) {\n <button\n class=\"ud-dot\"\n [class.active]=\"activeIndex === $index\"\n (click)=\"goTo($index)\"\n [attr.aria-label]=\"'Go to slide ' + ($index + 1)\">\n </button>\n }\n </div>\n</div>\n\n@if (lightboxOpen) {\n <div\n #lightboxBackdrop\n class=\"ud-lightbox-backdrop\"\n (click)=\"closeLightbox()\"\n (keydown)=\"onLightboxKeydown($event)\"\n tabindex=\"0\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Image fullscreen view\">\n\n <button class=\"ud-lightbox-close\" (click)=\"closeLightbox()\" aria-label=\"Close\">\n <span class=\"material-icons-outlined\">close</span>\n </button>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-prev\"\n (click)=\"$event.stopPropagation(); lightboxPrev()\"\n aria-label=\"Previous image\">\n <span class=\"material-icons-outlined\">chevron_left</span>\n </button>\n\n <div class=\"ud-lightbox-img-wrap\" (click)=\"$event.stopPropagation()\">\n <img\n [src]=\"pictures[lightboxIndex!]\"\n alt=\"Fullscreen image {{ lightboxIndex! + 1 }}\"\n class=\"ud-lightbox-img\" />\n </div>\n\n <button\n class=\"ud-lightbox-nav ud-lightbox-next\"\n (click)=\"$event.stopPropagation(); lightboxNext()\"\n aria-label=\"Next image\">\n <span class=\"material-icons-outlined\">chevron_right</span>\n </button>\n\n <div class=\"ud-lightbox-counter\">\n {{ lightboxIndex! + 1 }} / {{ pictures.length }}\n </div>\n </div>\n}\n", styles: [":host{display:block;width:100%}.ud-carousel{position:relative;width:100%;border-radius:12px;overflow:hidden}.ud-carousel:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:80px;background:linear-gradient(to top,rgba(15,20,30,.6) 0%,transparent 100%);border-radius:0 0 12px 12px;pointer-events:none;z-index:5}swiper-container{width:100%;border-radius:12px}swiper-slide{display:flex;justify-content:center;align-items:center;background:#1b2535;overflow:hidden}swiper-slide .ud-slide-img{display:block;width:100%;height:100%;cursor:zoom-in}.ud-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:10;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:none;background:#0f141e73;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;cursor:pointer;opacity:.8;transition:background .2s ease,opacity .2s ease,transform .2s ease}.ud-nav span{font-size:22px;line-height:1;display:flex}.ud-nav:hover{background:#0f141ed1;opacity:1;transform:translateY(-50%) scale(1.08)}.ud-nav.ud-nav-prev{left:12px}.ud-nav.ud-nav-next{right:12px}.ud-lightbox-backdrop{position:fixed;inset:0;z-index:1000;background:#000000e0;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;animation:ud-lightbox-in .2s ease;outline:none}@keyframes ud-lightbox-in{0%{opacity:0}to{opacity:1}}.ud-lightbox-img-wrap{max-width:calc(100vw - 120px);max-height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center}.ud-lightbox-img{max-width:100%;max-height:calc(100vh - 80px);border-radius:10px;box-shadow:0 24px 64px #0009;object-fit:contain;display:block;animation:ud-lightbox-scale-in .22s cubic-bezier(.34,1.56,.64,1)}@keyframes ud-lightbox-scale-in{0%{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}.ud-lightbox-close{position:fixed;top:20px;right:20px;z-index:1001;width:44px;height:44px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-close span{font-size:22px}.ud-lightbox-close:hover{background:#ffffff38;transform:scale(1.1)}.ud-lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);z-index:1001;width:52px;height:52px;border-radius:50%;border:none;background:#ffffff1f;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,transform .2s ease}.ud-lightbox-nav span{font-size:28px}.ud-lightbox-nav:hover{background:#ffffff38}.ud-lightbox-nav.ud-lightbox-prev{left:16px}.ud-lightbox-nav.ud-lightbox-prev:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-nav.ud-lightbox-next{right:16px}.ud-lightbox-nav.ud-lightbox-next:hover{transform:translateY(-50%) scale(1.08)}.ud-lightbox-counter{position:fixed;bottom:20px;left:50%;transform:translate(-50%);color:#ffffffb3;font-size:14px;font-weight:500;letter-spacing:.05em;z-index:1001}.ud-pagination{position:absolute;bottom:14px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:6px;z-index:10}.ud-dot{display:block;height:8px;width:8px;border-radius:100px;border:none;padding:0;background:#ffffff73;cursor:pointer;transition:width .3s cubic-bezier(.34,1.56,.64,1),background .25s ease}.ud-dot.active{width:28px;background:#fff}.ud-dot:hover:not(.active){background:#ffffffbf}\n"] }]
692
+ }], propDecorators: { pictures: [{
693
+ type: Input
694
+ }], height: [{
695
+ type: Input
696
+ }], direction: [{
697
+ type: Input
698
+ }], autoplay: [{
699
+ type: Input
700
+ }], objectFit: [{
701
+ type: Input
702
+ }], swiperRef: [{
703
+ type: ViewChild,
704
+ args: ['swiperRef']
705
+ }], lightboxBackdrop: [{
706
+ type: ViewChild,
707
+ args: ['lightboxBackdrop']
708
+ }] } });
739
709
 
740
- /**
741
- * Styled date range picker that participates in the parent FormGroup.
742
- * Requires two sibling FormControls — one for the start date, one for the end.
743
- *
744
- * Usage:
745
- * <ud-date-range-input
746
- * startControlName="checkIn"
747
- * endControlName="checkOut"
748
- * label="Stay period"
749
- * icon="date_range" />
750
- */
751
- class DateRangeInputComponent {
752
- startControlName;
753
- endControlName;
754
- label = '';
755
- icon;
756
- iconFontSet = 'material-icons-outlined';
757
- startPlaceholder = 'Start';
758
- endPlaceholder = 'End';
759
- min;
760
- max;
761
- disabled = false;
762
- hint = '';
763
- /**
764
- * Where an empty field's calendar opens. Not a min: earlier dates stay
765
- * selectable, and a value in the field still wins.
766
- */
767
- startAt;
768
- startView = 'month';
769
- focused = false;
770
- controlContainer = inject(ControlContainer);
771
- get startControl() {
772
- return this.controlContainer.control.get(this.startControlName);
710
+ class CheckboxComponent {
711
+ /** Key of the control inside the parent FormGroup (alternative to ngModel/formControl) */
712
+ controlName;
713
+ size = 'md';
714
+ label;
715
+ labelPosition = 'right';
716
+ ariaLabel;
717
+ /** Shows a dash instead of a tick, e.g. a "select all" when only some rows are selected. Cleared by a click. */
718
+ indeterminate = false;
719
+ /** For use without a form, e.g. bound to a SelectionModel. A form control's value wins when there is one. */
720
+ set checked(value) {
721
+ this.isChecked = !!value;
773
722
  }
774
- get endControl() {
775
- return this.controlContainer.control.get(this.endControlName);
723
+ set disabled(value) {
724
+ this.isDisabled = !!value;
776
725
  }
777
- // Material lets an explicit startAt beat the field's value; only pass it
778
- // while the field is empty.
779
- get calendarStartAt() {
780
- return !this.startControl.value && !this.endControl.value ? this.startAt ?? null : null;
726
+ get isSm() { return this.size === 'sm'; }
727
+ get isMd() { return this.size === 'md'; }
728
+ get isLg() { return this.size === 'lg'; }
729
+ isChecked = false;
730
+ isDisabled = false;
731
+ controlContainer = inject(ControlContainer, { optional: true, skipSelf: true });
732
+ destroy$ = new Subject();
733
+ onChange = new EventEmitter();
734
+ _onChange = () => { };
735
+ onTouched = () => { };
736
+ get formControl() {
737
+ if (!this.controlName || !this.controlContainer?.control)
738
+ return null;
739
+ return this.controlContainer.control.get(this.controlName) ?? null;
781
740
  }
782
- ngOnChanges(changes) {
783
- if (changes['disabled']) {
784
- if (this.disabled) {
785
- this.startControl.disable();
786
- this.endControl.disable();
787
- }
788
- else {
789
- this.startControl.enable();
790
- this.endControl.enable();
791
- }
741
+ ngOnInit() {
742
+ const ctrl = this.formControl;
743
+ if (!ctrl)
744
+ return;
745
+ ctrl.valueChanges
746
+ .pipe(startWith(ctrl.value), takeUntil(this.destroy$))
747
+ .subscribe((val) => {
748
+ this.isChecked = !!val;
749
+ this.isDisabled = ctrl.disabled;
750
+ });
751
+ }
752
+ ngOnDestroy() {
753
+ this.destroy$.next();
754
+ this.destroy$.complete();
755
+ }
756
+ toggle() {
757
+ if (this.isDisabled)
758
+ return;
759
+ // An indeterminate box always resolves to checked, as a native checkbox does.
760
+ const newValue = this.indeterminate || !this.isChecked;
761
+ this.indeterminate = false;
762
+ const ctrl = this.formControl;
763
+ if (ctrl) {
764
+ ctrl.setValue(newValue);
765
+ ctrl.markAsTouched();
766
+ }
767
+ else {
768
+ this.isChecked = newValue;
769
+ this._onChange(newValue);
770
+ this.onTouched();
792
771
  }
772
+ this.onChange.emit(newValue);
793
773
  }
794
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DateRangeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
795
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: DateRangeInputComponent, isStandalone: true, selector: "ud-date-range-input", inputs: { startControlName: "startControlName", endControlName: "endControlName", label: "label", icon: "icon", iconFontSet: "iconFontSet", startPlaceholder: "startPlaceholder", endPlaceholder: "endPlaceholder", min: "min", max: "max", disabled: "disabled", hint: "hint", startAt: "startAt", startView: "startView" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"ud-input\"\n [class.ud-input--focused]=\"focused\"\n [class.ud-input--disabled]=\"startControl.disabled\">\n @if (label) {\n <label class=\"ud-input__label\">{{ label }}</label>\n }\n <div class=\"ud-input__wrapper\">\n @if (icon) {\n <mat-icon class=\"ud-input__icon\" [fontSet]=\"iconFontSet\">{{ icon }}</mat-icon>\n }\n <mat-date-range-input\n class=\"ud-range-input\"\n [rangePicker]=\"picker\"\n [min]=\"min ?? null\"\n [max]=\"max ?? null\"\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\">\n <input matStartDate [formControlName]=\"startControlName\" [placeholder]=\"startPlaceholder\" />\n <input matEndDate [formControlName]=\"endControlName\" [placeholder]=\"endPlaceholder\" />\n </mat-date-range-input>\n <mat-datepicker-toggle class=\"ud-datepicker-toggle\" [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon fontSet=\"material-icons-outlined\">calendar_month</mat-icon>\n </mat-datepicker-toggle>\n <mat-date-range-picker #picker [startAt]=\"calendarStartAt\" [startView]=\"startView\" />\n </div>\n @if (hint) {\n <span class=\"ud-input__hint\">{{ hint }}</span>\n }\n</div>\n", styles: [":host{display:block;width:100%}.ud-input{display:flex;flex-direction:column;gap:5px;width:100%}.ud-input__label{font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:#2a3548;line-height:1;padding-left:1px}.ud-input__wrapper{display:flex;align-items:center;background:#f8fafc;border:1px solid #d8dde6;border-radius:8px;padding:0 12px;gap:7px;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.ud-input--focused .ud-input__wrapper{border-color:#1b2535;box-shadow:0 0 0 3px #1b253514;background:#fff}.ud-input--error .ud-input__wrapper{border-color:#e53935;box-shadow:0 0 0 3px #e539351a}.ud-input--error.ud-input--focused .ud-input__wrapper{border-color:#e53935}.ud-input--disabled .ud-input__wrapper{background:#f4f5f7;border-color:#e8eaef;cursor:not-allowed;opacity:.6}.ud-input__icon{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585;transition:color .18s ease;line-height:1}.ud-input--focused .ud-input__icon{color:#1b2535}.ud-input__field{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548;width:100%}.ud-input__field::placeholder{color:#9099a8}.ud-input__field:disabled{cursor:not-allowed;color:#9099a8}.ud-input__hint{font-family:DM Sans,system-ui,sans-serif;font-size:12px;color:#6b7585;line-height:1.3}.ud-input__suffix{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585}.ud-input__loading{animation:ud-fw-spin .8s linear infinite}@keyframes ud-fw-spin{to{transform:rotate(360deg)}}.ud-range-input{flex:1;min-width:0;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep .mat-date-range-input-container{font-family:DM Sans,system-ui,sans-serif;font-size:14px}.ud-range-input ::ng-deep .mat-date-range-input-separator{color:#9099a8;margin:0 4px}.ud-range-input ::ng-deep input.mat-date-range-input-inner{font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep input.mat-date-range-input-inner::placeholder{color:#9099a8}.ud-datepicker-toggle{flex-shrink:0;margin-right:-4px}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base{width:32px;height:32px;padding:4px;color:#6b7585;transition:color .18s ease}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base:hover{color:#1b2535}::ng-deep .mat-datepicker-content{border-radius:14px!important;box-shadow:0 0 0 1px #1b25350f,0 4px 6px -2px #1b25350d,0 20px 48px -4px #1b253529!important;overflow:hidden!important;border:none!important}::ng-deep .mat-datepicker-content .mat-calendar{font-family:DM Sans,system-ui,sans-serif!important;width:308px!important}::ng-deep .mat-datepicker-content .mat-calendar-header{background:linear-gradient(160deg,#1b2535,#253347)!important;padding:16px 12px 14px!important}::ng-deep .mat-datepicker-content .mat-calendar-controls{margin:0!important;align-items:center!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button{color:#fff!important;font-family:DM Sans,system-ui,sans-serif!important;font-size:.9rem!important;font-weight:600!important;border-radius:6px!important;padding:6px 10px!important;opacity:1!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button:hover{background:#ffffff1f!important}::ng-deep .mat-datepicker-content .mat-calendar-arrow{fill:#ffffff8c!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button,::ng-deep .mat-datepicker-content .mat-calendar-next-button{color:#ffffffbf!important;border-radius:6px!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button:hover,::ng-deep .mat-datepicker-content .mat-calendar-next-button:hover{background:#ffffff1f!important;color:#fff!important}::ng-deep .mat-datepicker-content .mat-calendar-content{background:#fff!important;padding:12px 16px 18px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header th{font-family:DM Sans,system-ui,sans-serif!important;font-size:.67rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.09em!important;padding-bottom:10px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header-divider:after{background:#c9cdd6!important;margin:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell-content{font-family:DM Sans,system-ui,sans-serif!important;font-size:.82rem!important;font-weight:500!important;color:#1b2535!important;border-radius:6px!important;border:none!important;transition:background .12s ease,color .12s ease!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background:#1b253512!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today:not(.mat-calendar-body-selected)>.mat-calendar-body-cell-content{border:1.5px solid #1b2535!important;background:transparent!important;color:#1b2535!important;font-weight:700!important}::ng-deep .mat-datepicker-content .mat-calendar-body-selected{background:#1b2535!important;color:#fff!important;border-radius:6px!important;box-shadow:0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1.5px #fff6,0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-in-range:before{background:#1b253512!important;border-radius:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:after{background:#1b253512!important;border-radius:6px 0 0 6px!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:after{background:#1b253512!important;border-radius:0 6px 6px 0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-disabled>.mat-calendar-body-cell-content{color:#c9cdd6!important;font-weight:400!important}::ng-deep .mat-datepicker-content .mat-calendar-body-label{font-family:DM Sans,system-ui,sans-serif!important;font-size:.7rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.08em!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i2.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }], viewProviders: [{ provide: ControlContainer, useFactory: () => inject(ControlContainer, { skipSelf: true }) }] });
774
+ writeValue(value) {
775
+ this.isChecked = !!value;
776
+ }
777
+ registerOnChange(fn) {
778
+ this._onChange = fn;
779
+ }
780
+ registerOnTouched(fn) {
781
+ this.onTouched = fn;
782
+ }
783
+ setDisabledState(isDisabled) {
784
+ this.isDisabled = isDisabled;
785
+ }
786
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
787
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CheckboxComponent, isStandalone: true, selector: "ud-checkbox", inputs: { controlName: "controlName", size: "size", label: "label", labelPosition: "labelPosition", ariaLabel: "ariaLabel", indeterminate: "indeterminate", checked: "checked", disabled: "disabled" }, outputs: { onChange: "onChange" }, host: { properties: { "class.size-sm": "this.isSm", "class.size-md": "this.isMd", "class.size-lg": "this.isLg" } }, providers: [
788
+ {
789
+ provide: NG_VALUE_ACCESSOR,
790
+ useExisting: forwardRef(() => CheckboxComponent),
791
+ multi: true,
792
+ },
793
+ ], ngImport: i0, template: "<button\n type=\"button\"\n class=\"ud-checkbox\"\n [class.checked]=\"isChecked && !indeterminate\"\n [class.indeterminate]=\"indeterminate\"\n [class.disabled]=\"isDisabled\"\n [class.label-left]=\"labelPosition === 'left'\"\n role=\"checkbox\"\n [attr.aria-checked]=\"indeterminate ? 'mixed' : isChecked\"\n [attr.aria-label]=\"ariaLabel || label\"\n [disabled]=\"isDisabled || null\"\n (click)=\"toggle()\">\n @if (label && labelPosition === 'left') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n <span class=\"checkbox-box\" aria-hidden=\"true\">\n @if (indeterminate) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M4 8h8\" /></svg>\n } @else if (isChecked) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M3.5 8.5l3 3 6-7\" /></svg>\n }\n </span>\n @if (label && labelPosition === 'right') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n</button>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&display=swap\";:host{display:inline-flex;align-items:center;--checkbox-border: #b8bfcb;--checkbox-on: #1b2535;--checkbox-mark: #ffffff;--checkbox-glow: rgba(27, 37, 53, .14);--checkbox-label-color: #4a5568;--checkbox-font: \"DM Sans\", system-ui, sans-serif;--checkbox-duration: .18s}:host(.size-sm){--box-d: 14px;--box-radius: 3px}:host(.size-md){--box-d: 18px;--box-radius: 4px}:host(.size-lg){--box-d: 22px;--box-radius: 5px}.ud-checkbox{display:inline-flex;align-items:center;gap:.6rem;background:none;border:none;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;outline:none}.ud-checkbox:focus-visible .checkbox-box{outline:2px solid var(--checkbox-on);outline-offset:2px}.ud-checkbox:hover:not(.disabled) .checkbox-box{box-shadow:0 0 0 4px var(--checkbox-glow)}.ud-checkbox.disabled{opacity:.38;cursor:not-allowed;pointer-events:none}.checkbox-box{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--box-d);height:var(--box-d);border-radius:var(--box-radius);border:1.5px solid var(--checkbox-border);background:#fff;box-sizing:border-box;transition:background var(--checkbox-duration) ease,border-color var(--checkbox-duration) ease,box-shadow var(--checkbox-duration) ease}.ud-checkbox.checked .checkbox-box,.ud-checkbox.indeterminate .checkbox-box{background:var(--checkbox-on);border-color:var(--checkbox-on)}.checkbox-mark{width:100%;height:100%}.checkbox-mark path{fill:none;stroke:var(--checkbox-mark);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.checkbox-label{font-family:var(--checkbox-font);font-size:.875rem;font-weight:500;color:var(--checkbox-label-color);line-height:1;white-space:nowrap}:host(.size-sm) .checkbox-label{font-size:.8rem}:host(.size-lg) .checkbox-label{font-size:.95rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], viewProviders: [
794
+ {
795
+ provide: ControlContainer,
796
+ useFactory: () => inject(ControlContainer, { optional: true, skipSelf: true }),
797
+ },
798
+ ] });
796
799
  }
797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DateRangeInputComponent, decorators: [{
800
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CheckboxComponent, decorators: [{
798
801
  type: Component,
799
- args: [{ selector: 'ud-date-range-input', standalone: true, imports: [CommonModule, ReactiveFormsModule, MatIcon, MatDatepickerModule], viewProviders: [{ provide: ControlContainer, useFactory: () => inject(ControlContainer, { skipSelf: true }) }], template: "<div\n class=\"ud-input\"\n [class.ud-input--focused]=\"focused\"\n [class.ud-input--disabled]=\"startControl.disabled\">\n @if (label) {\n <label class=\"ud-input__label\">{{ label }}</label>\n }\n <div class=\"ud-input__wrapper\">\n @if (icon) {\n <mat-icon class=\"ud-input__icon\" [fontSet]=\"iconFontSet\">{{ icon }}</mat-icon>\n }\n <mat-date-range-input\n class=\"ud-range-input\"\n [rangePicker]=\"picker\"\n [min]=\"min ?? null\"\n [max]=\"max ?? null\"\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\">\n <input matStartDate [formControlName]=\"startControlName\" [placeholder]=\"startPlaceholder\" />\n <input matEndDate [formControlName]=\"endControlName\" [placeholder]=\"endPlaceholder\" />\n </mat-date-range-input>\n <mat-datepicker-toggle class=\"ud-datepicker-toggle\" [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon fontSet=\"material-icons-outlined\">calendar_month</mat-icon>\n </mat-datepicker-toggle>\n <mat-date-range-picker #picker [startAt]=\"calendarStartAt\" [startView]=\"startView\" />\n </div>\n @if (hint) {\n <span class=\"ud-input__hint\">{{ hint }}</span>\n }\n</div>\n", styles: [":host{display:block;width:100%}.ud-input{display:flex;flex-direction:column;gap:5px;width:100%}.ud-input__label{font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:#2a3548;line-height:1;padding-left:1px}.ud-input__wrapper{display:flex;align-items:center;background:#f8fafc;border:1px solid #d8dde6;border-radius:8px;padding:0 12px;gap:7px;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.ud-input--focused .ud-input__wrapper{border-color:#1b2535;box-shadow:0 0 0 3px #1b253514;background:#fff}.ud-input--error .ud-input__wrapper{border-color:#e53935;box-shadow:0 0 0 3px #e539351a}.ud-input--error.ud-input--focused .ud-input__wrapper{border-color:#e53935}.ud-input--disabled .ud-input__wrapper{background:#f4f5f7;border-color:#e8eaef;cursor:not-allowed;opacity:.6}.ud-input__icon{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585;transition:color .18s ease;line-height:1}.ud-input--focused .ud-input__icon{color:#1b2535}.ud-input__field{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548;width:100%}.ud-input__field::placeholder{color:#9099a8}.ud-input__field:disabled{cursor:not-allowed;color:#9099a8}.ud-input__hint{font-family:DM Sans,system-ui,sans-serif;font-size:12px;color:#6b7585;line-height:1.3}.ud-input__suffix{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585}.ud-input__loading{animation:ud-fw-spin .8s linear infinite}@keyframes ud-fw-spin{to{transform:rotate(360deg)}}.ud-range-input{flex:1;min-width:0;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep .mat-date-range-input-container{font-family:DM Sans,system-ui,sans-serif;font-size:14px}.ud-range-input ::ng-deep .mat-date-range-input-separator{color:#9099a8;margin:0 4px}.ud-range-input ::ng-deep input.mat-date-range-input-inner{font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep input.mat-date-range-input-inner::placeholder{color:#9099a8}.ud-datepicker-toggle{flex-shrink:0;margin-right:-4px}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base{width:32px;height:32px;padding:4px;color:#6b7585;transition:color .18s ease}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base:hover{color:#1b2535}::ng-deep .mat-datepicker-content{border-radius:14px!important;box-shadow:0 0 0 1px #1b25350f,0 4px 6px -2px #1b25350d,0 20px 48px -4px #1b253529!important;overflow:hidden!important;border:none!important}::ng-deep .mat-datepicker-content .mat-calendar{font-family:DM Sans,system-ui,sans-serif!important;width:308px!important}::ng-deep .mat-datepicker-content .mat-calendar-header{background:linear-gradient(160deg,#1b2535,#253347)!important;padding:16px 12px 14px!important}::ng-deep .mat-datepicker-content .mat-calendar-controls{margin:0!important;align-items:center!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button{color:#fff!important;font-family:DM Sans,system-ui,sans-serif!important;font-size:.9rem!important;font-weight:600!important;border-radius:6px!important;padding:6px 10px!important;opacity:1!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button:hover{background:#ffffff1f!important}::ng-deep .mat-datepicker-content .mat-calendar-arrow{fill:#ffffff8c!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button,::ng-deep .mat-datepicker-content .mat-calendar-next-button{color:#ffffffbf!important;border-radius:6px!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button:hover,::ng-deep .mat-datepicker-content .mat-calendar-next-button:hover{background:#ffffff1f!important;color:#fff!important}::ng-deep .mat-datepicker-content .mat-calendar-content{background:#fff!important;padding:12px 16px 18px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header th{font-family:DM Sans,system-ui,sans-serif!important;font-size:.67rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.09em!important;padding-bottom:10px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header-divider:after{background:#c9cdd6!important;margin:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell-content{font-family:DM Sans,system-ui,sans-serif!important;font-size:.82rem!important;font-weight:500!important;color:#1b2535!important;border-radius:6px!important;border:none!important;transition:background .12s ease,color .12s ease!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background:#1b253512!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today:not(.mat-calendar-body-selected)>.mat-calendar-body-cell-content{border:1.5px solid #1b2535!important;background:transparent!important;color:#1b2535!important;font-weight:700!important}::ng-deep .mat-datepicker-content .mat-calendar-body-selected{background:#1b2535!important;color:#fff!important;border-radius:6px!important;box-shadow:0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1.5px #fff6,0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-in-range:before{background:#1b253512!important;border-radius:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:after{background:#1b253512!important;border-radius:6px 0 0 6px!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:after{background:#1b253512!important;border-radius:0 6px 6px 0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-disabled>.mat-calendar-body-cell-content{color:#c9cdd6!important;font-weight:400!important}::ng-deep .mat-datepicker-content .mat-calendar-body-label{font-family:DM Sans,system-ui,sans-serif!important;font-size:.7rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.08em!important}\n"] }]
800
- }], propDecorators: { startControlName: [{
801
- type: Input,
802
- args: [{ required: true }]
803
- }], endControlName: [{
804
- type: Input,
805
- args: [{ required: true }]
806
- }], label: [{
802
+ args: [{ selector: 'ud-checkbox', standalone: true, imports: [CommonModule], providers: [
803
+ {
804
+ provide: NG_VALUE_ACCESSOR,
805
+ useExisting: forwardRef(() => CheckboxComponent),
806
+ multi: true,
807
+ },
808
+ ], viewProviders: [
809
+ {
810
+ provide: ControlContainer,
811
+ useFactory: () => inject(ControlContainer, { optional: true, skipSelf: true }),
812
+ },
813
+ ], template: "<button\n type=\"button\"\n class=\"ud-checkbox\"\n [class.checked]=\"isChecked && !indeterminate\"\n [class.indeterminate]=\"indeterminate\"\n [class.disabled]=\"isDisabled\"\n [class.label-left]=\"labelPosition === 'left'\"\n role=\"checkbox\"\n [attr.aria-checked]=\"indeterminate ? 'mixed' : isChecked\"\n [attr.aria-label]=\"ariaLabel || label\"\n [disabled]=\"isDisabled || null\"\n (click)=\"toggle()\">\n @if (label && labelPosition === 'left') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n <span class=\"checkbox-box\" aria-hidden=\"true\">\n @if (indeterminate) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M4 8h8\" /></svg>\n } @else if (isChecked) {\n <svg class=\"checkbox-mark\" viewBox=\"0 0 16 16\"><path d=\"M3.5 8.5l3 3 6-7\" /></svg>\n }\n </span>\n @if (label && labelPosition === 'right') {\n <span class=\"checkbox-label\">{{ label }}</span>\n }\n</button>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&display=swap\";:host{display:inline-flex;align-items:center;--checkbox-border: #b8bfcb;--checkbox-on: #1b2535;--checkbox-mark: #ffffff;--checkbox-glow: rgba(27, 37, 53, .14);--checkbox-label-color: #4a5568;--checkbox-font: \"DM Sans\", system-ui, sans-serif;--checkbox-duration: .18s}:host(.size-sm){--box-d: 14px;--box-radius: 3px}:host(.size-md){--box-d: 18px;--box-radius: 4px}:host(.size-lg){--box-d: 22px;--box-radius: 5px}.ud-checkbox{display:inline-flex;align-items:center;gap:.6rem;background:none;border:none;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;outline:none}.ud-checkbox:focus-visible .checkbox-box{outline:2px solid var(--checkbox-on);outline-offset:2px}.ud-checkbox:hover:not(.disabled) .checkbox-box{box-shadow:0 0 0 4px var(--checkbox-glow)}.ud-checkbox.disabled{opacity:.38;cursor:not-allowed;pointer-events:none}.checkbox-box{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--box-d);height:var(--box-d);border-radius:var(--box-radius);border:1.5px solid var(--checkbox-border);background:#fff;box-sizing:border-box;transition:background var(--checkbox-duration) ease,border-color var(--checkbox-duration) ease,box-shadow var(--checkbox-duration) ease}.ud-checkbox.checked .checkbox-box,.ud-checkbox.indeterminate .checkbox-box{background:var(--checkbox-on);border-color:var(--checkbox-on)}.checkbox-mark{width:100%;height:100%}.checkbox-mark path{fill:none;stroke:var(--checkbox-mark);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.checkbox-label{font-family:var(--checkbox-font);font-size:.875rem;font-weight:500;color:var(--checkbox-label-color);line-height:1;white-space:nowrap}:host(.size-sm) .checkbox-label{font-size:.8rem}:host(.size-lg) .checkbox-label{font-size:.95rem}\n"] }]
814
+ }], propDecorators: { controlName: [{
807
815
  type: Input
808
- }], icon: [{
816
+ }], size: [{
809
817
  type: Input
810
- }], iconFontSet: [{
818
+ }], label: [{
811
819
  type: Input
812
- }], startPlaceholder: [{
820
+ }], labelPosition: [{
813
821
  type: Input
814
- }], endPlaceholder: [{
822
+ }], ariaLabel: [{
815
823
  type: Input
816
- }], min: [{
824
+ }], indeterminate: [{
817
825
  type: Input
818
- }], max: [{
826
+ }], checked: [{
819
827
  type: Input
820
828
  }], disabled: [{
821
829
  type: Input
822
- }], hint: [{
830
+ }], isSm: [{
831
+ type: HostBinding,
832
+ args: ['class.size-sm']
833
+ }], isMd: [{
834
+ type: HostBinding,
835
+ args: ['class.size-md']
836
+ }], isLg: [{
837
+ type: HostBinding,
838
+ args: ['class.size-lg']
839
+ }], onChange: [{
840
+ type: Output
841
+ }] } });
842
+
843
+ class CustomInputComponent {
844
+ type;
845
+ placeholder;
846
+ required;
847
+ name;
848
+ inputValue;
849
+ constructor() { }
850
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
851
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: CustomInputComponent, isStandalone: true, selector: "ud-input", inputs: { type: "type", placeholder: "placeholder", required: "required", name: "name", inputValue: "inputValue" }, ngImport: i0, template: "<div class=\"inputBox\">\n <input\n [type]=\"type\"\n [required]=\"required\"\n [placeholder]=\"placeholder ?? ''\"\n [(ngModel)]=\"inputValue\" />\n <span>{{ name }}</span>\n</div>\n", styles: [".inputBox{position:relative;width:250px}.inputBox input{width:100%;padding:10px;border:1px solid #000;background:#fafafa;border-radius:5px;outline:none;color:#fafafa;font-size:1em}.inputBox input:valid~span,.inputBox input:focus~span{color:#000;transform:translate(10px) translateY(-10px);font-size:1em;padding:0 10px;background:#fafafa;border-left:1px solid #000}.inputBox span{position:absolute;left:0;padding:10px;pointer-events:none;font-size:1em;color:#000;text-transform:uppercase;transition:.5s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
852
+ }
853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomInputComponent, decorators: [{
854
+ type: Component,
855
+ args: [{ selector: 'ud-input', imports: [FormsModule], template: "<div class=\"inputBox\">\n <input\n [type]=\"type\"\n [required]=\"required\"\n [placeholder]=\"placeholder ?? ''\"\n [(ngModel)]=\"inputValue\" />\n <span>{{ name }}</span>\n</div>\n", styles: [".inputBox{position:relative;width:250px}.inputBox input{width:100%;padding:10px;border:1px solid #000;background:#fafafa;border-radius:5px;outline:none;color:#fafafa;font-size:1em}.inputBox input:valid~span,.inputBox input:focus~span{color:#000;transform:translate(10px) translateY(-10px);font-size:1em;padding:0 10px;background:#fafafa;border-left:1px solid #000}.inputBox span{position:absolute;left:0;padding:10px;pointer-events:none;font-size:1em;color:#000;text-transform:uppercase;transition:.5s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif}\n"] }]
856
+ }], ctorParameters: () => [], propDecorators: { type: [{
823
857
  type: Input
824
- }], startAt: [{
858
+ }], placeholder: [{
825
859
  type: Input
826
- }], startView: [{
860
+ }], required: [{
861
+ type: Input
862
+ }], name: [{
863
+ type: Input
864
+ }], inputValue: [{
827
865
  type: Input
828
866
  }] } });
829
867
 
868
+ var SnackbarType;
869
+ (function (SnackbarType) {
870
+ SnackbarType["SUCCESS"] = "success";
871
+ SnackbarType["ERROR"] = "error";
872
+ SnackbarType["WARNING"] = "warning";
873
+ SnackbarType["INFO"] = "info";
874
+ })(SnackbarType || (SnackbarType = {}));
875
+
876
+ class CustomSnackbarComponent {
877
+ data;
878
+ snackBarRef;
879
+ /** A signal so each tick schedules change detection in zoneless apps too. */
880
+ progress = signal(100);
881
+ subscription;
882
+ isPaused = false;
883
+ elapsedTime = 0;
884
+ constructor(data, snackBarRef) {
885
+ this.data = data;
886
+ this.snackBarRef = snackBarRef;
887
+ }
888
+ ngOnInit() {
889
+ this.startTimer();
890
+ }
891
+ ngOnDestroy() {
892
+ this.subscription?.unsubscribe();
893
+ }
894
+ startTimer() {
895
+ const tickInterval = 100;
896
+ this.subscription?.unsubscribe();
897
+ this.subscription = interval(tickInterval).subscribe(() => {
898
+ // Only count time when NOT paused
899
+ if (!this.isPaused) {
900
+ this.elapsedTime += tickInterval;
901
+ // Calculate progress
902
+ this.progress.set(100 - (this.elapsedTime / this.data.duration) * 100);
903
+ // Dismiss when time runs out
904
+ if (this.elapsedTime >= this.data.duration) {
905
+ this.subscription?.unsubscribe();
906
+ this.snackBarRef.dismiss();
907
+ }
908
+ }
909
+ });
910
+ }
911
+ pauseTimer() {
912
+ this.isPaused = true;
913
+ }
914
+ resumeTimer() {
915
+ this.isPaused = false;
916
+ }
917
+ dismiss() {
918
+ this.subscription?.unsubscribe();
919
+ this.snackBarRef.dismiss();
920
+ }
921
+ SnackbarType = SnackbarType;
922
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$1.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
923
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CustomSnackbarComponent, isStandalone: true, selector: "ud-custom-snackbar", ngImport: i0, template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
924
+ }
925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, decorators: [{
926
+ type: Component,
927
+ args: [{ selector: 'ud-custom-snackbar', standalone: true, imports: [CommonModule], template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"] }]
928
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
929
+ type: Inject,
930
+ args: [MAT_SNACK_BAR_DATA]
931
+ }] }, { type: i1$1.MatSnackBarRef }] });
932
+
933
+ var ApplicationStatus;
934
+ (function (ApplicationStatus) {
935
+ ApplicationStatus["FINALIZED"] = "finalized";
936
+ ApplicationStatus["PRE_APPROVED"] = "pre-approved";
937
+ ApplicationStatus["SUBMITTED"] = "submitted";
938
+ })(ApplicationStatus || (ApplicationStatus = {}));
939
+
940
+ var FilterType;
941
+ (function (FilterType) {
942
+ FilterType["NONE"] = "none";
943
+ FilterType["ALL"] = "all";
944
+ FilterType["COLUMN"] = "column";
945
+ })(FilterType || (FilterType = {}));
946
+ var NumberOperator;
947
+ (function (NumberOperator) {
948
+ NumberOperator["EQUAL"] = "EQUAL";
949
+ NumberOperator["NOT_EQUAL"] = "NOT_EQUAL";
950
+ NumberOperator["GREATER_THAN"] = "GREATER_THAN";
951
+ NumberOperator["GREATER_THAN_OR_EQUAL"] = "GREATER_THAN_OR_EQUAL";
952
+ NumberOperator["LESS_THAN"] = "LESS_THAN";
953
+ NumberOperator["LESS_THAN_OR_EQUAL"] = "LESS_THAN_OR_EQUAL";
954
+ NumberOperator["BETWEEN"] = "BETWEEN";
955
+ })(NumberOperator || (NumberOperator = {}));
956
+ var StringOperator;
957
+ (function (StringOperator) {
958
+ StringOperator["CONTAINS"] = "CONTAINS";
959
+ StringOperator["EXACT"] = "EXACT";
960
+ StringOperator["STARTS_WITH"] = "STARTS_WITH";
961
+ StringOperator["ENDS_WITH"] = "ENDS_WITH";
962
+ StringOperator["NOT_CONTAINS"] = "NOT_CONTAINS";
963
+ StringOperator["NOT_EXACT"] = "NOT_EXACT";
964
+ /** Row matches if it shares at least one value with the selected set ("any of"). */
965
+ StringOperator["IN"] = "IN";
966
+ /** Row matches if it contains every selected value ("all of", may have extras). */
967
+ StringOperator["CONTAINS_ALL"] = "CONTAINS_ALL";
968
+ })(StringOperator || (StringOperator = {}));
830
969
  /**
831
- * The panel `udTooltip` attaches to the overlay. Not meant to be used on its
832
- * own. Unencapsulated so the `.ud-tooltip-title` / `.ud-tooltip-meta` helper
833
- * classes reach rich content that comes from the consumer's template.
970
+ * Match modes offered for multi-select (filterOptions) columns. Maps directly to
971
+ * the operator sent to the backend / used client-side:
972
+ * - ANY -> StringOperator.IN (shares at least one value)
973
+ * - ALL -> StringOperator.CONTAINS_ALL (contains every selected value)
974
+ * - EXACT -> StringOperator.EXACT (set equality: exactly the selected values)
834
975
  */
835
- class UdTooltipComponent {
836
- content = input(null);
837
- tooltipId = input.required();
838
- placement = input('top');
839
- template = computed(() => {
840
- const content = this.content();
841
- return content instanceof TemplateRef ? content : null;
842
- });
843
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
844
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: UdTooltipComponent, isStandalone: true, selector: "ud-tooltip", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, tooltipId: { classPropertyName: "tooltipId", publicName: "tooltipId", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"ud-tooltip\"\n role=\"tooltip\"\n [id]=\"tooltipId()\"\n [attr.data-placement]=\"placement()\">\n @if (template(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ content() }}\n }\n</div>\n", styles: [".ud-tooltip{--ud-tooltip-bg: #1b2535;--ud-tooltip-ink: #f5f6f7;--ud-tooltip-muted: rgba(245, 246, 247, .68);--ud-tooltip-accent: #4a7fe8;--ud-tooltip-shift: 3px;position:relative;box-sizing:border-box;max-width:260px;padding:7px 10px;border-radius:6px;background:var(--ud-tooltip-bg);color:var(--ud-tooltip-ink);box-shadow:0 0 0 1px #ffffff14,0 6px 18px #1b253538;font-family:DM Sans,system-ui,sans-serif;font-size:12.5px;font-weight:500;line-height:1.45;text-align:left;overflow-wrap:anywhere;pointer-events:none;animation:ud-tooltip-in .11s ease-out both}.ud-tooltip:before{content:\"\";position:absolute;background:var(--ud-tooltip-accent);border-radius:2px}.ud-tooltip[data-placement=top]:before,.ud-tooltip[data-placement=bottom]:before{left:50%;width:14px;height:2px;margin-left:-7px}.ud-tooltip[data-placement=top]:before{bottom:0}.ud-tooltip[data-placement=bottom]:before{top:0}.ud-tooltip[data-placement=left]:before,.ud-tooltip[data-placement=right]:before{top:50%;width:2px;height:14px;margin-top:-7px}.ud-tooltip[data-placement=left]:before{right:0}.ud-tooltip[data-placement=right]:before{left:0}.ud-tooltip[data-placement=top]{--ud-tooltip-from: 0 var(--ud-tooltip-shift)}.ud-tooltip[data-placement=bottom]{--ud-tooltip-from: 0 calc(var(--ud-tooltip-shift) * -1)}.ud-tooltip[data-placement=left]{--ud-tooltip-from: var(--ud-tooltip-shift) 0}.ud-tooltip[data-placement=right]{--ud-tooltip-from: calc(var(--ud-tooltip-shift) * -1) 0}@keyframes ud-tooltip-in{0%{opacity:0;translate:var(--ud-tooltip-from, 0 0)}to{opacity:1;translate:0 0}}.ud-tooltip-title{display:block;font-weight:600}.ud-tooltip-meta{display:block;margin-top:2px;color:var(--ud-tooltip-muted);font-weight:400}@media (prefers-reduced-motion: reduce){.ud-tooltip{--ud-tooltip-shift: 0px}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
976
+ var MultiSelectMatchMode;
977
+ (function (MultiSelectMatchMode) {
978
+ MultiSelectMatchMode["ANY"] = "IN";
979
+ MultiSelectMatchMode["ALL"] = "CONTAINS_ALL";
980
+ MultiSelectMatchMode["EXACT"] = "EXACT";
981
+ })(MultiSelectMatchMode || (MultiSelectMatchMode = {}));
982
+ var DateOperator;
983
+ (function (DateOperator) {
984
+ DateOperator["BEFORE"] = "BEFORE";
985
+ DateOperator["AFTER"] = "AFTER";
986
+ DateOperator["DATE_RANGE"] = "DATE_RANGE";
987
+ })(DateOperator || (DateOperator = {}));
988
+
989
+ var TableDisplayColumnType;
990
+ (function (TableDisplayColumnType) {
991
+ TableDisplayColumnType["ARRAY"] = "ARRAY";
992
+ TableDisplayColumnType["BOOLEAN"] = "BOOLEAN";
993
+ TableDisplayColumnType["CLICK"] = "CLICK";
994
+ TableDisplayColumnType["DATE"] = "DATE";
995
+ TableDisplayColumnType["DATETIME"] = "DATETIME";
996
+ TableDisplayColumnType["HYPERLINK"] = "HYPERLINK";
997
+ TableDisplayColumnType["ICON"] = "ICON";
998
+ TableDisplayColumnType["MONEY"] = "MONEY";
999
+ TableDisplayColumnType["PHONE"] = "PHONE";
1000
+ TableDisplayColumnType["TEXT"] = "TEXT";
1001
+ TableDisplayColumnType["TEXT_OBSERVABLES"] = "TEXT_OBSERVABLES";
1002
+ TableDisplayColumnType["NUMBER"] = "NUMBER";
1003
+ TableDisplayColumnType["PILL"] = "PILL";
1004
+ })(TableDisplayColumnType || (TableDisplayColumnType = {}));
1005
+
1006
+ class PluralizePipe {
1007
+ transform(value) {
1008
+ return value
1009
+ ? value.includes('|')
1010
+ ? value.split('|')[1].trim()
1011
+ : value
1012
+ : '';
1013
+ }
1014
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PluralizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1015
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: PluralizePipe, isStandalone: true, name: "pluralize" });
845
1016
  }
846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipComponent, decorators: [{
847
- type: Component,
848
- args: [{ selector: 'ud-tooltip', standalone: true, imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"ud-tooltip\"\n role=\"tooltip\"\n [id]=\"tooltipId()\"\n [attr.data-placement]=\"placement()\">\n @if (template(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ content() }}\n }\n</div>\n", styles: [".ud-tooltip{--ud-tooltip-bg: #1b2535;--ud-tooltip-ink: #f5f6f7;--ud-tooltip-muted: rgba(245, 246, 247, .68);--ud-tooltip-accent: #4a7fe8;--ud-tooltip-shift: 3px;position:relative;box-sizing:border-box;max-width:260px;padding:7px 10px;border-radius:6px;background:var(--ud-tooltip-bg);color:var(--ud-tooltip-ink);box-shadow:0 0 0 1px #ffffff14,0 6px 18px #1b253538;font-family:DM Sans,system-ui,sans-serif;font-size:12.5px;font-weight:500;line-height:1.45;text-align:left;overflow-wrap:anywhere;pointer-events:none;animation:ud-tooltip-in .11s ease-out both}.ud-tooltip:before{content:\"\";position:absolute;background:var(--ud-tooltip-accent);border-radius:2px}.ud-tooltip[data-placement=top]:before,.ud-tooltip[data-placement=bottom]:before{left:50%;width:14px;height:2px;margin-left:-7px}.ud-tooltip[data-placement=top]:before{bottom:0}.ud-tooltip[data-placement=bottom]:before{top:0}.ud-tooltip[data-placement=left]:before,.ud-tooltip[data-placement=right]:before{top:50%;width:2px;height:14px;margin-top:-7px}.ud-tooltip[data-placement=left]:before{right:0}.ud-tooltip[data-placement=right]:before{left:0}.ud-tooltip[data-placement=top]{--ud-tooltip-from: 0 var(--ud-tooltip-shift)}.ud-tooltip[data-placement=bottom]{--ud-tooltip-from: 0 calc(var(--ud-tooltip-shift) * -1)}.ud-tooltip[data-placement=left]{--ud-tooltip-from: var(--ud-tooltip-shift) 0}.ud-tooltip[data-placement=right]{--ud-tooltip-from: calc(var(--ud-tooltip-shift) * -1) 0}@keyframes ud-tooltip-in{0%{opacity:0;translate:var(--ud-tooltip-from, 0 0)}to{opacity:1;translate:0 0}}.ud-tooltip-title{display:block;font-weight:600}.ud-tooltip-meta{display:block;margin-top:2px;color:var(--ud-tooltip-muted);font-weight:400}@media (prefers-reduced-motion: reduce){.ud-tooltip{--ud-tooltip-shift: 0px}}\n"] }]
1017
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: PluralizePipe, decorators: [{
1018
+ type: Pipe,
1019
+ args: [{
1020
+ name: 'pluralize',
1021
+ }]
849
1022
  }] });
850
1023
 
851
- const GAP = 8;
852
- const POSITIONS = {
853
- top: {
854
- originX: 'center',
855
- originY: 'top',
856
- overlayX: 'center',
857
- overlayY: 'bottom',
858
- offsetY: -GAP,
859
- },
860
- bottom: {
861
- originX: 'center',
862
- originY: 'bottom',
863
- overlayX: 'center',
864
- overlayY: 'top',
865
- offsetY: GAP,
866
- },
867
- left: {
868
- originX: 'start',
869
- originY: 'center',
870
- overlayX: 'end',
871
- overlayY: 'center',
872
- offsetX: -GAP,
873
- },
874
- right: {
875
- originX: 'end',
876
- originY: 'center',
877
- overlayX: 'start',
878
- overlayY: 'center',
879
- offsetX: GAP,
880
- },
881
- };
882
- const OPPOSITE = {
883
- top: 'bottom',
884
- bottom: 'top',
885
- left: 'right',
886
- right: 'left',
887
- };
888
- /** A long press shows the tooltip on touch; lifting the finger hides it this long after. */
889
- const TOUCH_HOLD_MS = 500;
890
- const TOUCH_LINGER_MS = 1500;
891
1024
  /**
892
- * Moving from one tooltipped element to the next within this window shows the
893
- * next tooltip at once, the way a toolbar should feel. Shared by every
894
- * instance on purpose.
1025
+ * Money as decimal strings, never JS numbers (UC-23). `0.1 + 0.2` is
1026
+ * `0.30000000000000004`; an amount that went through a float can reach the API
1027
+ * a cent off. Everything here works on the digits of the string, and the only
1028
+ * arithmetic is on whole cents.
895
1029
  */
896
- const WARM_MS = 400;
897
- let lastHiddenAt = 0;
898
- let nextId = 0;
899
- function placementOf(pair) {
900
- if (pair.originY === 'top' && pair.overlayY === 'bottom')
901
- return 'top';
902
- if (pair.originY === 'bottom' && pair.overlayY === 'top')
903
- return 'bottom';
904
- if (pair.overlayX === 'end')
905
- return 'left';
906
- return 'right';
907
- }
908
1030
  /**
909
- * The library's tooltip (UC-19), replacing both native `title` hints and
910
- * `matTooltip`: `<ud-button udTooltip="Export as CSV">`.
911
- *
912
- * Shows on hover, on keyboard focus (focus-visible only, so a mouse click does
913
- * not leave one hanging) and on a long press; hides on leave, blur, Escape,
914
- * press, and scroll. Flips to the opposite side when there is no room. While
915
- * shown, the host's `aria-describedby` names it.
1031
+ * Reads what a person typed or pasted: "1,234.5", "$1234.50", " 12 ", "CA$ 3".
1032
+ * Currency symbols, letters, spaces and thousands commas are dropped; at most
1033
+ * {@link decimals} decimals are allowed; the result is padded to exactly that
1034
+ * many ("12" → "12.00").
916
1035
  */
917
- class UdTooltipDirective {
918
- /** Text, or a template for rich content. Empty shows nothing. */
919
- udTooltip = input();
920
- udTooltipPosition = input('top');
921
- udTooltipDisabled = input(false);
922
- udTooltipShowDelay = input(300);
923
- overlay = inject(Overlay);
924
- host = inject(ElementRef);
925
- viewContainerRef = inject(ViewContainerRef);
926
- document = inject(DOCUMENT);
927
- id = `ud-tooltip-${nextId++}`;
928
- overlayRef = null;
929
- panel = null;
930
- positionSub = null;
931
- showTimer = null;
932
- touchTimer = null;
933
- onEscape = (event) => {
934
- if (event.key === 'Escape') {
935
- this.hide();
936
- }
937
- };
938
- constructor() {
939
- // Content or the disabled flag changing while shown.
940
- effect(() => {
941
- const content = this.udTooltip();
942
- const disabled = this.udTooltipDisabled();
943
- if (!this.panel) {
944
- return;
945
- }
946
- if (disabled || !content) {
947
- this.hide();
948
- }
949
- else {
950
- this.panel.setInput('content', content);
951
- }
952
- });
1036
+ function parseMoney(raw, decimals = 2, allowNegative = false) {
1037
+ if (raw === null || raw === undefined) {
1038
+ return { value: null };
953
1039
  }
954
- scheduleShow() {
955
- this.clearTimers();
956
- const sinceLast = Date.now() - lastHiddenAt;
957
- const delay = sinceLast >= 0 && sinceLast < WARM_MS ? 0 : this.udTooltipShowDelay();
958
- if (delay === 0) {
959
- this.show();
960
- }
961
- else {
962
- this.showTimer = setTimeout(() => this.show(), delay);
963
- }
1040
+ const text = String(raw).trim();
1041
+ if (text === '') {
1042
+ return { value: null };
964
1043
  }
965
- onFocusIn() {
966
- // The host may be a wrapper (ud-button) whose inner element takes focus.
967
- const el = this.host.nativeElement;
968
- if (el.matches(':focus-visible') || el.querySelector(':focus-visible')) {
969
- this.scheduleShow();
970
- }
1044
+ const negative = text.includes('-');
1045
+ const cleaned = text.replace(/[^0-9.]/g, '');
1046
+ if (!/^\d*\.?\d*$/.test(cleaned) || !/\d/.test(cleaned)) {
1047
+ return { error: 'format' };
971
1048
  }
972
- onTouchStart() {
973
- this.clearTimers();
974
- this.touchTimer = setTimeout(() => this.show(), TOUCH_HOLD_MS);
1049
+ if (negative && !allowNegative) {
1050
+ return { error: 'negative' };
975
1051
  }
976
- onTouchEnd() {
977
- if (this.touchTimer) {
978
- clearTimeout(this.touchTimer);
979
- this.touchTimer = null;
980
- }
981
- if (this.panel) {
982
- this.touchTimer = setTimeout(() => this.hide(), TOUCH_LINGER_MS);
983
- }
1052
+ const [whole, fraction = ''] = cleaned.split('.');
1053
+ if (fraction.length > decimals) {
1054
+ return { error: 'decimals' };
984
1055
  }
985
- show() {
986
- this.clearTimers();
987
- const content = this.udTooltip();
988
- if (this.udTooltipDisabled() || !content || this.panel) {
989
- return;
990
- }
991
- const preferred = this.udTooltipPosition();
992
- const strategy = this.overlay
993
- .position()
994
- .flexibleConnectedTo(this.host)
995
- .withPositions([POSITIONS[preferred], POSITIONS[OPPOSITE[preferred]]])
996
- .withFlexibleDimensions(false)
997
- .withPush(false)
998
- .withViewportMargin(8);
999
- this.overlayRef = this.overlay.create({
1000
- positionStrategy: strategy,
1001
- scrollStrategy: this.overlay.scrollStrategies.close(),
1002
- panelClass: 'ud-tooltip-pane',
1003
- });
1004
- this.panel = this.overlayRef.attach(new ComponentPortal(UdTooltipComponent, this.viewContainerRef));
1005
- this.panel.setInput('content', content);
1006
- this.panel.setInput('tooltipId', this.id);
1007
- this.panel.setInput('placement', preferred);
1008
- this.positionSub = strategy.positionChanges.subscribe(change => {
1009
- this.panel?.setInput('placement', placementOf(change.connectionPair));
1010
- this.panel?.changeDetectorRef.detectChanges();
1011
- });
1012
- this.overlayRef.detachments().subscribe(() => this.dispose());
1013
- this.describe(true);
1014
- this.document.addEventListener('keydown', this.onEscape, true);
1056
+ const integer = whole.replace(/^0+(?=\d)/, '') || '0';
1057
+ const padded = decimals > 0 ? '.' + fraction.padEnd(decimals, '0') : '';
1058
+ const value = integer + padded;
1059
+ return { value: negative && /[1-9]/.test(value) ? '-' + value : value };
1060
+ }
1061
+ /** Whole cents of a normalised 2-decimal string: "1234.50" → 123450. */
1062
+ function moneyToCents(value) {
1063
+ const negative = value.startsWith('-');
1064
+ const [whole, fraction = ''] = value.replace('-', '').split('.');
1065
+ const cents = Number(whole) * 100 + Number(fraction.padEnd(2, '0').slice(0, 2));
1066
+ return negative ? -cents : cents;
1067
+ }
1068
+ /** The inverse of {@link moneyToCents}: 123450 → "1234.50". Rounds nothing; give it whole cents. */
1069
+ function centsToMoney(cents) {
1070
+ const negative = cents < 0;
1071
+ const abs = Math.abs(Math.trunc(cents));
1072
+ const value = `${Math.floor(abs / 100)}.${String(abs % 100).padStart(2, '0')}`;
1073
+ return negative ? '-' + value : value;
1074
+ }
1075
+ /** For display only: "1234.50" → "1,234.50". Never parse this back as a number. */
1076
+ function groupThousands(value) {
1077
+ const negative = value.startsWith('-');
1078
+ const [whole, fraction] = value.replace('-', '').split('.');
1079
+ const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
1080
+ return (negative ? '-' : '') + grouped + (fraction !== undefined ? '.' + fraction : '');
1081
+ }
1082
+ /**
1083
+ * For display only: an API amount in its currency, always 2 decimals.
1084
+ * `formatMoney('1234.5', 'CAD', 'en-US')` gives "$1,234.50", a credit "-$12.50",
1085
+ * or "($12.50)" with {@link accounting}. The value goes to Intl as a string, so
1086
+ * it is never rounded through a float. Empty input gives "", anything that is
1087
+ * not a number is shown as it came.
1088
+ */
1089
+ function formatMoney(value, currency = 'USD', locale = 'en-US', accounting = false) {
1090
+ if (value === null || value === undefined || String(value).trim() === '') {
1091
+ return '';
1015
1092
  }
1016
- hide() {
1017
- this.clearTimers();
1018
- if (!this.overlayRef) {
1019
- return;
1020
- }
1021
- this.overlayRef.detach();
1093
+ const text = String(value).trim();
1094
+ if (!/^-?\d+(\.\d+)?$/.test(text)) {
1095
+ return text;
1022
1096
  }
1023
- ngOnDestroy() {
1024
- this.hide();
1097
+ // Intl reads a numeric string exactly (NumberFormat v3); cast only because
1098
+ // the ES2022 lib predates that overload.
1099
+ return new Intl.NumberFormat(locale, {
1100
+ style: 'currency',
1101
+ currency,
1102
+ currencyDisplay: 'narrowSymbol',
1103
+ currencySign: accounting ? 'accounting' : 'standard',
1104
+ minimumFractionDigits: 2,
1105
+ maximumFractionDigits: 2,
1106
+ }).format(text);
1107
+ }
1108
+
1109
+ /**
1110
+ * Styled date range picker that participates in the parent FormGroup.
1111
+ * Requires two sibling FormControls — one for the start date, one for the end.
1112
+ *
1113
+ * Usage:
1114
+ * <ud-date-range-input
1115
+ * startControlName="checkIn"
1116
+ * endControlName="checkOut"
1117
+ * label="Stay period"
1118
+ * icon="date_range" />
1119
+ */
1120
+ class DateRangeInputComponent {
1121
+ startControlName;
1122
+ endControlName;
1123
+ label = '';
1124
+ icon;
1125
+ iconFontSet = 'material-icons-outlined';
1126
+ startPlaceholder = 'Start';
1127
+ endPlaceholder = 'End';
1128
+ min;
1129
+ max;
1130
+ disabled = false;
1131
+ hint = '';
1132
+ /**
1133
+ * Where an empty field's calendar opens. Not a min: earlier dates stay
1134
+ * selectable, and a value in the field still wins.
1135
+ */
1136
+ startAt;
1137
+ startView = 'month';
1138
+ focused = false;
1139
+ controlContainer = inject(ControlContainer);
1140
+ get startControl() {
1141
+ return this.controlContainer.control.get(this.startControlName);
1025
1142
  }
1026
- /** Tear-down for every way a tooltip goes away, including the scroll strategy closing it. */
1027
- dispose() {
1028
- lastHiddenAt = Date.now();
1029
- this.document.removeEventListener('keydown', this.onEscape, true);
1030
- this.describe(false);
1031
- this.positionSub?.unsubscribe();
1032
- this.positionSub = null;
1033
- const ref = this.overlayRef;
1034
- this.overlayRef = null;
1035
- this.panel = null;
1036
- ref?.dispose();
1143
+ get endControl() {
1144
+ return this.controlContainer.control.get(this.endControlName);
1037
1145
  }
1038
- /** Adds or removes this tooltip's id in the host's aria-describedby, keeping any other ids. */
1039
- describe(on) {
1040
- const el = this.host.nativeElement;
1041
- const ids = (el.getAttribute('aria-describedby') ?? '')
1042
- .split(/\s+/)
1043
- .filter(id => id && id !== this.id);
1044
- if (on) {
1045
- ids.push(this.id);
1046
- }
1047
- if (ids.length) {
1048
- el.setAttribute('aria-describedby', ids.join(' '));
1049
- }
1050
- else {
1051
- el.removeAttribute('aria-describedby');
1052
- }
1146
+ // Material lets an explicit startAt beat the field's value; only pass it
1147
+ // while the field is empty.
1148
+ get calendarStartAt() {
1149
+ return !this.startControl.value && !this.endControl.value ? this.startAt ?? null : null;
1053
1150
  }
1054
- clearTimers() {
1055
- if (this.showTimer) {
1056
- clearTimeout(this.showTimer);
1057
- this.showTimer = null;
1058
- }
1059
- if (this.touchTimer) {
1060
- clearTimeout(this.touchTimer);
1061
- this.touchTimer = null;
1151
+ ngOnChanges(changes) {
1152
+ if (changes['disabled']) {
1153
+ if (this.disabled) {
1154
+ this.startControl.disable();
1155
+ this.endControl.disable();
1156
+ }
1157
+ else {
1158
+ this.startControl.enable();
1159
+ this.endControl.enable();
1160
+ }
1062
1161
  }
1063
1162
  }
1064
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1065
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: UdTooltipDirective, isStandalone: true, selector: "[udTooltip]", inputs: { udTooltip: { classPropertyName: "udTooltip", publicName: "udTooltip", isSignal: true, isRequired: false, transformFunction: null }, udTooltipPosition: { classPropertyName: "udTooltipPosition", publicName: "udTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, udTooltipDisabled: { classPropertyName: "udTooltipDisabled", publicName: "udTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, udTooltipShowDelay: { classPropertyName: "udTooltipShowDelay", publicName: "udTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "scheduleShow()", "mouseleave": "hide()", "focusin": "onFocusIn()", "focusout": "hide()", "mousedown": "hide()", "touchstart": "onTouchStart()", "touchend": "onTouchEnd()", "touchcancel": "hide()" } }, ngImport: i0 });
1163
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DateRangeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1164
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: DateRangeInputComponent, isStandalone: true, selector: "ud-date-range-input", inputs: { startControlName: "startControlName", endControlName: "endControlName", label: "label", icon: "icon", iconFontSet: "iconFontSet", startPlaceholder: "startPlaceholder", endPlaceholder: "endPlaceholder", min: "min", max: "max", disabled: "disabled", hint: "hint", startAt: "startAt", startView: "startView" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"ud-input\"\n [class.ud-input--focused]=\"focused\"\n [class.ud-input--disabled]=\"startControl.disabled\">\n @if (label) {\n <label class=\"ud-input__label\">{{ label }}</label>\n }\n <div class=\"ud-input__wrapper\">\n @if (icon) {\n <mat-icon class=\"ud-input__icon\" [fontSet]=\"iconFontSet\">{{ icon }}</mat-icon>\n }\n <mat-date-range-input\n class=\"ud-range-input\"\n [rangePicker]=\"picker\"\n [min]=\"min ?? null\"\n [max]=\"max ?? null\"\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\">\n <input matStartDate [formControlName]=\"startControlName\" [placeholder]=\"startPlaceholder\" />\n <input matEndDate [formControlName]=\"endControlName\" [placeholder]=\"endPlaceholder\" />\n </mat-date-range-input>\n <mat-datepicker-toggle class=\"ud-datepicker-toggle\" [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon fontSet=\"material-icons-outlined\">calendar_month</mat-icon>\n </mat-datepicker-toggle>\n <mat-date-range-picker #picker [startAt]=\"calendarStartAt\" [startView]=\"startView\" />\n </div>\n @if (hint) {\n <span class=\"ud-input__hint\">{{ hint }}</span>\n }\n</div>\n", styles: [":host{display:block;width:100%}.ud-input{display:flex;flex-direction:column;gap:5px;width:100%}.ud-input__label{font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:#2a3548;line-height:1;padding-left:1px}.ud-input__wrapper{display:flex;align-items:center;background:#f8fafc;border:1px solid #d8dde6;border-radius:8px;padding:0 12px;gap:7px;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.ud-input--focused .ud-input__wrapper{border-color:#1b2535;box-shadow:0 0 0 3px #1b253514;background:#fff}.ud-input--error .ud-input__wrapper{border-color:#e53935;box-shadow:0 0 0 3px #e539351a}.ud-input--error.ud-input--focused .ud-input__wrapper{border-color:#e53935}.ud-input--disabled .ud-input__wrapper{background:#f4f5f7;border-color:#e8eaef;cursor:not-allowed;opacity:.6}.ud-input__icon{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585;transition:color .18s ease;line-height:1}.ud-input--focused .ud-input__icon{color:#1b2535}.ud-input__field{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548;width:100%}.ud-input__field::placeholder{color:#9099a8}.ud-input__field:disabled{cursor:not-allowed;color:#9099a8}.ud-input__hint{font-family:DM Sans,system-ui,sans-serif;font-size:12px;color:#6b7585;line-height:1.3}.ud-input__suffix{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585}.ud-input__loading{animation:ud-fw-spin .8s linear infinite}@keyframes ud-fw-spin{to{transform:rotate(360deg)}}.ud-range-input{flex:1;min-width:0;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep .mat-date-range-input-container{font-family:DM Sans,system-ui,sans-serif;font-size:14px}.ud-range-input ::ng-deep .mat-date-range-input-separator{color:#9099a8;margin:0 4px}.ud-range-input ::ng-deep input.mat-date-range-input-inner{font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep input.mat-date-range-input-inner::placeholder{color:#9099a8}.ud-datepicker-toggle{flex-shrink:0;margin-right:-4px}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base{width:32px;height:32px;padding:4px;color:#6b7585;transition:color .18s ease}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base:hover{color:#1b2535}::ng-deep .mat-datepicker-content{border-radius:14px!important;box-shadow:0 0 0 1px #1b25350f,0 4px 6px -2px #1b25350d,0 20px 48px -4px #1b253529!important;overflow:hidden!important;border:none!important}::ng-deep .mat-datepicker-content .mat-calendar{font-family:DM Sans,system-ui,sans-serif!important;width:308px!important}::ng-deep .mat-datepicker-content .mat-calendar-header{background:linear-gradient(160deg,#1b2535,#253347)!important;padding:16px 12px 14px!important}::ng-deep .mat-datepicker-content .mat-calendar-controls{margin:0!important;align-items:center!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button{color:#fff!important;font-family:DM Sans,system-ui,sans-serif!important;font-size:.9rem!important;font-weight:600!important;border-radius:6px!important;padding:6px 10px!important;opacity:1!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button:hover{background:#ffffff1f!important}::ng-deep .mat-datepicker-content .mat-calendar-arrow{fill:#ffffff8c!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button,::ng-deep .mat-datepicker-content .mat-calendar-next-button{color:#ffffffbf!important;border-radius:6px!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button:hover,::ng-deep .mat-datepicker-content .mat-calendar-next-button:hover{background:#ffffff1f!important;color:#fff!important}::ng-deep .mat-datepicker-content .mat-calendar-content{background:#fff!important;padding:12px 16px 18px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header th{font-family:DM Sans,system-ui,sans-serif!important;font-size:.67rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.09em!important;padding-bottom:10px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header-divider:after{background:#c9cdd6!important;margin:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell-content{font-family:DM Sans,system-ui,sans-serif!important;font-size:.82rem!important;font-weight:500!important;color:#1b2535!important;border-radius:6px!important;border:none!important;transition:background .12s ease,color .12s ease!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background:#1b253512!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today:not(.mat-calendar-body-selected)>.mat-calendar-body-cell-content{border:1.5px solid #1b2535!important;background:transparent!important;color:#1b2535!important;font-weight:700!important}::ng-deep .mat-datepicker-content .mat-calendar-body-selected{background:#1b2535!important;color:#fff!important;border-radius:6px!important;box-shadow:0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1.5px #fff6,0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-in-range:before{background:#1b253512!important;border-radius:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:after{background:#1b253512!important;border-radius:6px 0 0 6px!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:after{background:#1b253512!important;border-radius:0 6px 6px 0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-disabled>.mat-calendar-body-cell-content{color:#c9cdd6!important;font-weight:400!important}::ng-deep .mat-datepicker-content .mat-calendar-body-label{font-family:DM Sans,system-ui,sans-serif!important;font-size:.7rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.08em!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i2.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }], viewProviders: [{ provide: ControlContainer, useFactory: () => inject(ControlContainer, { skipSelf: true }) }] });
1066
1165
  }
1067
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UdTooltipDirective, decorators: [{
1068
- type: Directive,
1069
- args: [{
1070
- selector: '[udTooltip]',
1071
- standalone: true,
1072
- host: {
1073
- '(mouseenter)': 'scheduleShow()',
1074
- '(mouseleave)': 'hide()',
1075
- '(focusin)': 'onFocusIn()',
1076
- '(focusout)': 'hide()',
1077
- '(mousedown)': 'hide()',
1078
- '(touchstart)': 'onTouchStart()',
1079
- '(touchend)': 'onTouchEnd()',
1080
- '(touchcancel)': 'hide()',
1081
- },
1082
- }]
1083
- }], ctorParameters: () => [] });
1166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DateRangeInputComponent, decorators: [{
1167
+ type: Component,
1168
+ args: [{ selector: 'ud-date-range-input', standalone: true, imports: [CommonModule, ReactiveFormsModule, MatIcon, MatDatepickerModule], viewProviders: [{ provide: ControlContainer, useFactory: () => inject(ControlContainer, { skipSelf: true }) }], template: "<div\n class=\"ud-input\"\n [class.ud-input--focused]=\"focused\"\n [class.ud-input--disabled]=\"startControl.disabled\">\n @if (label) {\n <label class=\"ud-input__label\">{{ label }}</label>\n }\n <div class=\"ud-input__wrapper\">\n @if (icon) {\n <mat-icon class=\"ud-input__icon\" [fontSet]=\"iconFontSet\">{{ icon }}</mat-icon>\n }\n <mat-date-range-input\n class=\"ud-range-input\"\n [rangePicker]=\"picker\"\n [min]=\"min ?? null\"\n [max]=\"max ?? null\"\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\">\n <input matStartDate [formControlName]=\"startControlName\" [placeholder]=\"startPlaceholder\" />\n <input matEndDate [formControlName]=\"endControlName\" [placeholder]=\"endPlaceholder\" />\n </mat-date-range-input>\n <mat-datepicker-toggle class=\"ud-datepicker-toggle\" [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon fontSet=\"material-icons-outlined\">calendar_month</mat-icon>\n </mat-datepicker-toggle>\n <mat-date-range-picker #picker [startAt]=\"calendarStartAt\" [startView]=\"startView\" />\n </div>\n @if (hint) {\n <span class=\"ud-input__hint\">{{ hint }}</span>\n }\n</div>\n", styles: [":host{display:block;width:100%}.ud-input{display:flex;flex-direction:column;gap:5px;width:100%}.ud-input__label{font-family:DM Sans,system-ui,sans-serif;font-size:13px;font-weight:500;color:#2a3548;line-height:1;padding-left:1px}.ud-input__wrapper{display:flex;align-items:center;background:#f8fafc;border:1px solid #d8dde6;border-radius:8px;padding:0 12px;gap:7px;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.ud-input--focused .ud-input__wrapper{border-color:#1b2535;box-shadow:0 0 0 3px #1b253514;background:#fff}.ud-input--error .ud-input__wrapper{border-color:#e53935;box-shadow:0 0 0 3px #e539351a}.ud-input--error.ud-input--focused .ud-input__wrapper{border-color:#e53935}.ud-input--disabled .ud-input__wrapper{background:#f4f5f7;border-color:#e8eaef;cursor:not-allowed;opacity:.6}.ud-input__icon{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585;transition:color .18s ease;line-height:1}.ud-input--focused .ud-input__icon{color:#1b2535}.ud-input__field{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548;width:100%}.ud-input__field::placeholder{color:#9099a8}.ud-input__field:disabled{cursor:not-allowed;color:#9099a8}.ud-input__hint{font-family:DM Sans,system-ui,sans-serif;font-size:12px;color:#6b7585;line-height:1.3}.ud-input__suffix{flex-shrink:0;font-size:18px;width:18px;height:18px;color:#6b7585}.ud-input__loading{animation:ud-fw-spin .8s linear infinite}@keyframes ud-fw-spin{to{transform:rotate(360deg)}}.ud-range-input{flex:1;min-width:0;font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep .mat-date-range-input-container{font-family:DM Sans,system-ui,sans-serif;font-size:14px}.ud-range-input ::ng-deep .mat-date-range-input-separator{color:#9099a8;margin:0 4px}.ud-range-input ::ng-deep input.mat-date-range-input-inner{font-family:DM Sans,system-ui,sans-serif;font-size:14px;color:#2a3548}.ud-range-input ::ng-deep input.mat-date-range-input-inner::placeholder{color:#9099a8}.ud-datepicker-toggle{flex-shrink:0;margin-right:-4px}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base{width:32px;height:32px;padding:4px;color:#6b7585;transition:color .18s ease}.ud-datepicker-toggle ::ng-deep .mat-mdc-icon-button.mat-mdc-button-base:hover{color:#1b2535}::ng-deep .mat-datepicker-content{border-radius:14px!important;box-shadow:0 0 0 1px #1b25350f,0 4px 6px -2px #1b25350d,0 20px 48px -4px #1b253529!important;overflow:hidden!important;border:none!important}::ng-deep .mat-datepicker-content .mat-calendar{font-family:DM Sans,system-ui,sans-serif!important;width:308px!important}::ng-deep .mat-datepicker-content .mat-calendar-header{background:linear-gradient(160deg,#1b2535,#253347)!important;padding:16px 12px 14px!important}::ng-deep .mat-datepicker-content .mat-calendar-controls{margin:0!important;align-items:center!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button{color:#fff!important;font-family:DM Sans,system-ui,sans-serif!important;font-size:.9rem!important;font-weight:600!important;border-radius:6px!important;padding:6px 10px!important;opacity:1!important}::ng-deep .mat-datepicker-content .mat-calendar-period-button:hover{background:#ffffff1f!important}::ng-deep .mat-datepicker-content .mat-calendar-arrow{fill:#ffffff8c!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button,::ng-deep .mat-datepicker-content .mat-calendar-next-button{color:#ffffffbf!important;border-radius:6px!important}::ng-deep .mat-datepicker-content .mat-calendar-previous-button:hover,::ng-deep .mat-datepicker-content .mat-calendar-next-button:hover{background:#ffffff1f!important;color:#fff!important}::ng-deep .mat-datepicker-content .mat-calendar-content{background:#fff!important;padding:12px 16px 18px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header th{font-family:DM Sans,system-ui,sans-serif!important;font-size:.67rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.09em!important;padding-bottom:10px!important}::ng-deep .mat-datepicker-content .mat-calendar-table-header-divider:after{background:#c9cdd6!important;margin:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell-content{font-family:DM Sans,system-ui,sans-serif!important;font-size:.82rem!important;font-weight:500!important;color:#1b2535!important;border-radius:6px!important;border:none!important;transition:background .12s ease,color .12s ease!important}::ng-deep .mat-datepicker-content .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background:#1b253512!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today:not(.mat-calendar-body-selected)>.mat-calendar-body-cell-content{border:1.5px solid #1b2535!important;background:transparent!important;color:#1b2535!important;font-weight:700!important}::ng-deep .mat-datepicker-content .mat-calendar-body-selected{background:#1b2535!important;color:#fff!important;border-radius:6px!important;box-shadow:0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 0 1.5px #fff6,0 2px 8px #1b253547!important}::ng-deep .mat-datepicker-content .mat-calendar-body-in-range:before{background:#1b253512!important;border-radius:0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-start:after{background:#1b253512!important;border-radius:6px 0 0 6px!important}::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before,::ng-deep .mat-datepicker-content .mat-calendar-body-range-end:after{background:#1b253512!important;border-radius:0 6px 6px 0!important}::ng-deep .mat-datepicker-content .mat-calendar-body-disabled>.mat-calendar-body-cell-content{color:#c9cdd6!important;font-weight:400!important}::ng-deep .mat-datepicker-content .mat-calendar-body-label{font-family:DM Sans,system-ui,sans-serif!important;font-size:.7rem!important;font-weight:700!important;color:#6b7585!important;text-transform:uppercase!important;letter-spacing:.08em!important}\n"] }]
1169
+ }], propDecorators: { startControlName: [{
1170
+ type: Input,
1171
+ args: [{ required: true }]
1172
+ }], endControlName: [{
1173
+ type: Input,
1174
+ args: [{ required: true }]
1175
+ }], label: [{
1176
+ type: Input
1177
+ }], icon: [{
1178
+ type: Input
1179
+ }], iconFontSet: [{
1180
+ type: Input
1181
+ }], startPlaceholder: [{
1182
+ type: Input
1183
+ }], endPlaceholder: [{
1184
+ type: Input
1185
+ }], min: [{
1186
+ type: Input
1187
+ }], max: [{
1188
+ type: Input
1189
+ }], disabled: [{
1190
+ type: Input
1191
+ }], hint: [{
1192
+ type: Input
1193
+ }], startAt: [{
1194
+ type: Input
1195
+ }], startView: [{
1196
+ type: Input
1197
+ }] } });
1084
1198
 
1085
1199
  /**
1086
1200
  * Styled multi-select with a chip trigger that participates in the parent FormGroup.
@@ -1848,7 +1962,7 @@ class AutocompleteComponent {
1848
1962
  }
1849
1963
  // Filter options as the user types
1850
1964
  this.searchControl.valueChanges
1851
- .pipe(startWith(this.searchControl.value ?? ''), map(term => this.filter(term ?? '')), takeUntil(this.destroy$))
1965
+ .pipe(startWith(this.searchControl.value ?? ''), map$1(term => this.filter(term ?? '')), takeUntil(this.destroy$))
1852
1966
  .subscribe(filtered => (this.filteredOptions = filtered));
1853
1967
  // Emit searchChange after debounce so parents can drive async option lists
1854
1968
  this.searchControl.valueChanges
@@ -2535,7 +2649,7 @@ class TranslateWrapperService {
2535
2649
  this.translateService = translateService;
2536
2650
  }
2537
2651
  get(translation, count, params) {
2538
- return this.translateService.stream(translation, params).pipe(map$1(v => {
2652
+ return this.translateService.stream(translation, params).pipe(map(v => {
2539
2653
  if (v.includes('|')) {
2540
2654
  return v.split('|')[count && count > 1 ? 1 : 0].trim();
2541
2655
  }
@@ -2760,7 +2874,7 @@ class CustomTableComponent {
2760
2874
  this.applyFilterByColumn();
2761
2875
  }
2762
2876
  this.filterByColumnFormGroup.valueChanges
2763
- .pipe(debounceTime(400), map(formValue => {
2877
+ .pipe(debounceTime(400), map$1(formValue => {
2764
2878
  return Object.entries(formValue)
2765
2879
  .filter(([_key, value]) => !this.isEmptyFilterValue(value))
2766
2880
  .reduce((acc, [key, value]) => {
@@ -5552,73 +5666,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
5552
5666
  args: [{ selector: 'ud-occupancy-grid', standalone: true, imports: [UdTooltipDirective, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"occ\"\n [class.is-loading]=\"loading()\"\n [class.is-dragging-active]=\"\n resize() !== null || move()?.dragging || create()?.dragging\n \"\n [style.--dw]=\"dayWidth() + 'px'\"\n (keydown)=\"onGridKeydown($event)\">\n <div #scroller class=\"occ__scroller\" (scroll)=\"onScroll()\">\n <div\n class=\"occ__canvas\"\n [style.width.px]=\"canvasWidth()\"\n [style.height.px]=\"bodyHeight() + headerHeight\"\n (mousemove)=\"onCanvasMouseMove($event)\"\n (mouseleave)=\"hoverDay.set(null)\">\n <!-- Sticky two-tier header -->\n <div class=\"occ__header\" [style.height.px]=\"headerHeight\">\n <div class=\"occ__corner\" [style.width.px]=\"leftColumnWidth()\">\n <span class=\"occ__eyebrow\">{{\n 'occupancyGrid.rooms' | translate\n }}</span>\n <div class=\"occ__nav\">\n <button\n type=\"button\"\n class=\"occ__nav-btn\"\n [attr.aria-label]=\"'occupancyGrid.nav.prev' | translate\"\n [udTooltip]=\"'occupancyGrid.nav.prev' | translate\"\n (click)=\"shiftWindow(-1)\">\n \u2039\n </button>\n <button\n type=\"button\"\n class=\"occ__nav-btn\"\n [attr.aria-label]=\"'occupancyGrid.nav.next' | translate\"\n [udTooltip]=\"'occupancyGrid.nav.next' | translate\"\n (click)=\"shiftWindow(1)\">\n \u203A\n </button>\n </div>\n </div>\n <div class=\"occ__months\" [style.left.px]=\"leftColumnWidth()\">\n @for (m of months(); track m.label) {\n <div\n class=\"occ__month\"\n [style.left.px]=\"m.left\"\n [style.width.px]=\"m.width\">\n {{ m.label }}\n </div>\n }\n </div>\n <div class=\"occ__days\" [style.left.px]=\"leftColumnWidth()\">\n @for (d of days(); track d.iso) {\n <div\n class=\"occ__day\"\n [class.is-weekend]=\"d.isWeekend\"\n [class.is-today]=\"d.iso === today()\"\n [class.is-hovered]=\"$index === hoverDay()\"\n [style.left.px]=\"d.left\"\n [style.width.px]=\"dayWidth()\">\n <span class=\"occ__day-num\">{{ d.dayOfMonth }}</span>\n <span class=\"occ__day-wd\">{{\n 'occupancyGrid.weekdays.' + d.weekday | translate\n }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- Today column, behind rows -->\n @if (todayLeft() !== null) {\n <div\n class=\"occ__today\"\n [style.left.px]=\"leftColumnWidth() + todayLeft()!\"\n [style.top.px]=\"headerHeight\"\n [style.width.px]=\"dayWidth()\"\n [style.height.px]=\"bodyHeight()\"></div>\n }\n\n <!-- Virtualized rows -->\n @for (p of visible(); track trackRow($index, p)) {\n @if (p.row.kind === 'group') {\n <div\n class=\"occ__row occ__row--group\"\n [attr.data-depth]=\"p.row.depth\"\n [style.top.px]=\"headerHeight + p.top\"\n [style.height.px]=\"p.height\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"toggleGroup(p.row.key)\"\n (keydown.enter)=\"toggleGroup(p.row.key)\">\n <div\n class=\"occ__cell occ__cell--sticky\"\n [style.width.px]=\"leftColumnWidth()\">\n <span\n class=\"occ__chevron\"\n [class.is-collapsed]=\"isCollapsed(p.row.key)\"\n >\u25BE</span\n >\n <span class=\"occ__eyebrow\">{{ p.row.label }}</span>\n <span class=\"occ__count\">{{ p.row.roomCount }}</span>\n </div>\n <div\n class=\"occ__lane-bg\"\n [style.left.px]=\"leftColumnWidth()\"\n [style.width.px]=\"dayCount() * dayWidth()\"\n [style.--weekend-offset]=\"weekendOffsetPx() + 'px'\"></div>\n @if (hoverDay() !== null) {\n <div\n class=\"occ__col-hover\"\n aria-hidden=\"true\"\n [style.left.px]=\"leftColumnWidth() + hoverDay()! * dayWidth()\"\n [style.width.px]=\"dayWidth()\"></div>\n }\n </div>\n } @else {\n <div\n class=\"occ__row occ__row--room\"\n [class.is-inactive]=\"!asRoomRow(p.row).room.active\"\n [class.is-move-target]=\"isMoveTarget(asRoomRow(p.row).room.roomId)\"\n [attr.data-room-id]=\"asRoomRow(p.row).room.roomId\"\n [style.top.px]=\"headerHeight + p.top\"\n [style.height.px]=\"p.height\">\n <div\n class=\"occ__cell occ__cell--sticky occ__room\"\n [style.width.px]=\"leftColumnWidth()\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"roomClick.emit(asRoomRow(p.row).room)\"\n (keydown.enter)=\"roomClick.emit(asRoomRow(p.row).room)\">\n <span class=\"occ__room-number\">{{\n asRoomRow(p.row).room.number\n }}</span>\n <span class=\"occ__room-type\">{{\n asRoomRow(p.row).room.type\n }}</span>\n @if (takenOn(asRoomRow(p.row).room) !== null) {\n <span\n class=\"occ__room-occ\"\n [udTooltip]=\"\n 'occupancyGrid.takenOn' | translate: { date: from() }\n \"\n [class.is-full]=\"\n takenOn(asRoomRow(p.row).room)! >=\n asRoomRow(p.row).room.capacity\n \">\n {{ takenOn(asRoomRow(p.row).room) }}/{{\n asRoomRow(p.row).room.capacity\n }}\n </span>\n }\n </div>\n <div\n class=\"occ__lane-bg\"\n tabindex=\"0\"\n [attr.aria-label]=\"\n 'occupancyGrid.createCell'\n | translate: { room: asRoomRow(p.row).room.number }\n \"\n [style.left.px]=\"leftColumnWidth()\"\n [style.width.px]=\"dayCount() * dayWidth()\"\n [style.--weekend-offset]=\"weekendOffsetPx() + 'px'\"\n (mousedown)=\"startCreate($event, asRoomRow(p.row).room)\"\n (click)=\"onLaneClick($event, asRoomRow(p.row).room)\"\n (mousemove)=\"onLaneMouseMove($event, asRoomRow(p.row).room)\"\n (mouseleave)=\"onLaneMouseLeave(asRoomRow(p.row).room)\"\n (focus)=\"onLaneFocus(asRoomRow(p.row).room)\"\n (blur)=\"onLaneBlur()\"\n (keydown)=\"onLaneKeydown($event, asRoomRow(p.row).room)\">\n @for (c of asRoomRow(p.row).room.closures; track c.closureId) {\n @if (closureGeometryOf(c); as g) {\n <div\n class=\"occ__closure\"\n [class.is-cut-left]=\"g.cutLeft\"\n [class.is-cut-right]=\"g.cutRight\"\n [style.left.px]=\"g.left\"\n [style.width.px]=\"g.width\"\n [udTooltip]=\"closureTitle(c)\"\n role=\"button\"\n tabindex=\"0\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"\n $event.stopPropagation();\n closureClick.emit({\n closure: c,\n room: asRoomRow(p.row).room,\n })\n \"\n (keydown.enter)=\"\n closureClick.emit({\n closure: c,\n room: asRoomRow(p.row).room,\n })\n \">\n <span class=\"occ__closure-label\">{{ c.reason }}</span>\n </div>\n }\n }\n @if (asRoomRow(p.row).freeLane !== null) {\n <div\n class=\"occ__lane-free\"\n [style.top.px]=\"\n 4 + asRoomRow(p.row).freeLane! * (laneHeight() + 4)\n \"\n [style.height.px]=\"laneHeight()\"\n (mousedown)=\"\n $event.stopPropagation();\n startCreate(\n $event,\n asRoomRow(p.row).room,\n asRoomRow(p.row).freeLane!\n )\n \"\n (mousemove)=\"\n onLaneMouseMove(\n $event,\n asRoomRow(p.row).room,\n asRoomRow(p.row).freeLane!\n )\n \"></div>\n }\n @for (lb of asRoomRow(p.row).bars; track lb.bar.bookingId) {\n @if (geometryOf(lb.bar); as g) {\n <div\n class=\"occ__bar\"\n [attr.data-state]=\"lb.bar.state\"\n [class.is-cut-left]=\"g.cutLeft\"\n [class.is-cut-right]=\"g.cutRight\"\n [class.is-resizing]=\"isResizing(lb.bar.bookingId)\"\n [class.is-moving]=\"isBeingMoved(lb.bar.bookingId)\"\n [style.left.px]=\"g.left + 1\"\n [style.width.px]=\"g.width - 2\"\n [style.top.px]=\"4 + lb.lane * (laneHeight() + 4)\"\n [style.height.px]=\"laneHeight()\"\n [udTooltip]=\"barTitle(lb.bar)\"\n [attr.aria-keyshortcuts]=\"'Shift+ArrowRight Shift+ArrowLeft'\"\n role=\"button\"\n tabindex=\"0\"\n (mousedown)=\"\n startBarMove($event, asRoomRow(p.row).room, lb.bar)\n \"\n (click)=\"\n $event.stopPropagation();\n onBarClick(lb.bar, asRoomRow(p.row).room)\n \"\n (keydown.enter)=\"\n barClick.emit({\n bar: lb.bar,\n room: asRoomRow(p.row).room,\n })\n \"\n (keydown)=\"\n onBarKeydownResize(\n $event,\n asRoomRow(p.row).room,\n lb.bar,\n asRoomRow(p.row).bars\n )\n \">\n @if (!g.cutLeft) {\n <span\n class=\"occ__bar-handle occ__bar-handle--start\"\n aria-hidden=\"true\"\n (mousedown)=\"\n startResize(\n $event,\n asRoomRow(p.row).room,\n lb.bar,\n 'start',\n asRoomRow(p.row).bars\n )\n \"\n (click)=\"$event.stopPropagation()\"></span>\n }\n <span class=\"occ__bar-label\">{{ lb.bar.studentName }}</span>\n @if (!g.cutRight) {\n <span\n class=\"occ__bar-handle occ__bar-handle--end\"\n aria-hidden=\"true\"\n (mousedown)=\"\n startResize(\n $event,\n asRoomRow(p.row).room,\n lb.bar,\n 'end',\n asRoomRow(p.row).bars\n )\n \"\n (click)=\"$event.stopPropagation()\"></span>\n }\n </div>\n }\n }\n </div>\n <div class=\"occ__row-hover\" aria-hidden=\"true\"></div>\n @if (hoverDay() !== null) {\n <div\n class=\"occ__col-hover\"\n aria-hidden=\"true\"\n [style.left.px]=\"leftColumnWidth() + hoverDay()! * dayWidth()\"\n [style.width.px]=\"dayWidth()\"></div>\n }\n </div>\n }\n }\n\n <!-- The floating copy of a bar being dragged by its body \u2014 see `moveGhost`. -->\n @if (moveGhost(); as g) {\n <div\n class=\"occ__bar occ__bar--ghost\"\n aria-hidden=\"true\"\n [attr.data-state]=\"g.state\"\n [style.left.px]=\"g.left\"\n [style.top.px]=\"g.top\"\n [style.width.px]=\"g.width\"\n [style.height.px]=\"g.height\">\n <span class=\"occ__bar-label\">{{ g.label }}</span>\n </div>\n }\n\n <!-- The in-progress drag-to-create's preview span \u2014 see `createGhost`. -->\n @if (createGhost(); as g) {\n <div\n class=\"occ__bar--create\"\n aria-hidden=\"true\"\n [style.left.px]=\"g.left\"\n [style.top.px]=\"g.top\"\n [style.width.px]=\"g.width\"\n [style.height.px]=\"g.height\"></div>\n }\n\n <!-- The hovered or keyboard-focused empty cell \u2014 see `laneCursorGeometry`. -->\n @if (laneCursorGeometry(); as g) {\n <div\n class=\"occ__lane-cursor\"\n aria-hidden=\"true\"\n [style.left.px]=\"g.left\"\n [style.top.px]=\"g.top\"\n [style.width.px]=\"g.width\"\n [style.height.px]=\"g.height\"></div>\n }\n\n @if (rows().length === 0 && !loading()) {\n <div class=\"occ__empty\" [style.top.px]=\"headerHeight\">\n {{ 'occupancyGrid.empty' | translate }}\n </div>\n }\n </div>\n </div>\n\n <div class=\"occ__legend\">\n @for (s of ['tentative', 'reserved', 'in_room', 'history']; track s) {\n <span class=\"occ__legend-item\"\n ><i class=\"occ__swatch\" [attr.data-state]=\"s\"></i\n >{{ 'occupancyGrid.states.' + s | translate }}</span\n >\n }\n <span class=\"occ__legend-item\"\n ><i class=\"occ__swatch occ__swatch--closed\"></i\n >{{ 'occupancyGrid.states.closed' | translate }}</span\n >\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;height:var(--ud-occ-height, 640px);--ud-occ-paper: #f5f4f0;--ud-occ-surface: #ffffff;--ud-occ-ink: #1b2535;--ud-occ-muted: #6b7585;--ud-occ-rule: #ebe9e3;--ud-occ-rule-strong: #d9d5cb;--ud-occ-weekend: rgba(27, 37, 53, .035);--ud-occ-today: rgba(74, 127, 232, .1);--ud-occ-accent: #4a7fe8;--ud-occ-crosshair: rgba(27, 37, 53, .06);--ud-occ-tentative-bg: #fff4d6;--ud-occ-tentative-rail: #d97706;--ud-occ-reserved-bg: #dbeafe;--ud-occ-reserved-rail: #1d4ed8;--ud-occ-inroom-bg: #1b2535;--ud-occ-inroom-rail: #4a7fe8;--ud-occ-inroom-ink: #f5f6f7;--ud-occ-history-bg: #ececec;--ud-occ-history-rail: #9aa1ad;--ud-occ-closed: rgba(220, 38, 38, .1);--ud-occ-closed-rail: #dc2626;--ud-occ-radius: 6px;--ud-occ-font: \"DM Sans\", system-ui, sans-serif;font-family:var(--ud-occ-font);color:var(--ud-occ-ink)}.occ{display:flex;flex-direction:column;height:100%;background:var(--ud-occ-paper);border:1px solid var(--ud-occ-rule-strong);border-radius:10px;overflow:hidden}.occ.is-loading .occ__canvas{opacity:.55}.occ.is-dragging-active{-webkit-user-select:none;user-select:none}.occ__scroller{position:relative;flex:1;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--ud-occ-rule-strong) transparent}.occ__scroller::-webkit-scrollbar{width:10px;height:10px}.occ__scroller::-webkit-scrollbar-track{background:transparent}.occ__scroller::-webkit-scrollbar-thumb{background-color:var(--ud-occ-rule-strong);border-radius:6px;border:2px solid var(--ud-occ-surface)}.occ__scroller::-webkit-scrollbar-thumb:hover{background-color:var(--ud-occ-muted)}.occ__canvas{position:relative}.occ__eyebrow{font-family:var(--ud-occ-font);font-weight:700;font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--ud-occ-muted)}.occ__header{position:sticky;top:0;z-index:4;background:var(--ud-occ-surface);border-bottom:1px solid var(--ud-occ-rule-strong);width:100%}.occ__corner{position:sticky;left:0;z-index:5;height:100%;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 12px;background:var(--ud-occ-surface);border-right:1px solid var(--ud-occ-rule-strong);box-shadow:2px 0 5px #1b25350d;box-sizing:border-box}.occ__nav{display:flex;gap:2px}.occ__nav-btn{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:1px solid var(--ud-occ-rule-strong);border-radius:var(--ud-occ-radius);background:var(--ud-occ-surface);color:var(--ud-occ-muted);font-size:14px;line-height:1;cursor:pointer;padding:0;transition:background .12s ease,color .12s ease,transform 80ms ease}.occ__nav-btn:hover{background:var(--ud-occ-weekend);color:var(--ud-occ-ink)}.occ__nav-btn:active{transform:scale(.92)}.occ__nav-btn:focus-visible{outline:2px solid var(--ud-occ-accent);outline-offset:1px}.occ__months,.occ__days{position:absolute;top:0;height:26px}.occ__days{top:26px}.occ__month{position:absolute;top:0;height:26px;line-height:26px;padding-left:8px;font-size:12px;font-weight:600;border-left:1px solid var(--ud-occ-rule-strong);box-sizing:border-box;white-space:nowrap;overflow:hidden}.occ__day{position:absolute;top:0;height:26px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-variant-numeric:tabular-nums;font-size:11px;line-height:1;border-left:1px solid var(--ud-occ-rule);box-sizing:border-box}.occ__day.is-weekend{background:var(--ud-occ-weekend)}.occ__day.is-today{font-weight:700}.occ__day.is-hovered{background:var(--ud-occ-crosshair);box-shadow:inset 0 -2px 0 var(--ud-occ-accent);color:var(--ud-occ-ink);font-weight:700}.occ__day-num{display:inline-flex}.occ__day.is-today .occ__day-num{align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:var(--ud-occ-accent);color:#fff}.occ__day-wd{font-size:9px;color:var(--ud-occ-muted);margin-top:2px}.occ__today{position:absolute;z-index:1;background:var(--ud-occ-today);border-left:1px solid var(--ud-occ-accent);border-right:1px solid var(--ud-occ-accent);box-sizing:border-box;pointer-events:none}.occ__row{position:absolute;left:0;width:100%;box-sizing:border-box;border-bottom:1px solid var(--ud-occ-rule)}.occ__row--group{cursor:pointer;background:var(--ud-occ-paper);z-index:3}.occ__row--group[data-depth=\"0\"] .occ__eyebrow{color:var(--ud-occ-ink)}.occ__row--group[data-depth=\"1\"] .occ__cell--sticky{padding-left:20px}.occ__row--group[data-depth=\"2\"] .occ__cell--sticky{padding-left:32px}.occ__row--room{background:var(--ud-occ-surface);z-index:2}.occ__row--room.is-inactive .occ__room{opacity:.55}.occ__row-hover{position:absolute;inset:0;background:transparent;pointer-events:none;transition:background .1s ease}.occ__row--room:hover .occ__row-hover{background:var(--ud-occ-crosshair)}.occ__row--room:hover .occ__room{background-image:linear-gradient(var(--ud-occ-crosshair),var(--ud-occ-crosshair));box-shadow:inset 3px 0 0 var(--ud-occ-accent)}.occ__col-hover{position:absolute;top:0;bottom:0;background:var(--ud-occ-crosshair);pointer-events:none}.occ__cell--sticky{position:sticky;left:0;z-index:3;height:100%;display:flex;align-items:center;gap:8px;padding:0 12px;background:inherit;border-right:1px solid var(--ud-occ-rule-strong);box-shadow:2px 0 5px #1b25350a;box-sizing:border-box}.occ__chevron{display:inline-block;transition:transform .15s;font-size:12px}.occ__chevron.is-collapsed{transform:rotate(-90deg)}.occ__count{margin-left:auto;font-family:var(--ud-occ-font);font-weight:600;font-variant-numeric:tabular-nums;font-size:11px;color:var(--ud-occ-muted)}.occ__room{cursor:pointer}.occ__room-number{font-weight:600;font-size:13px}.occ__room-type{font-size:11px;color:var(--ud-occ-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.occ__room-occ{margin-left:auto;font-family:var(--ud-occ-font);font-weight:600;font-size:11px;font-variant-numeric:tabular-nums}.occ__room-occ.is-full{color:var(--ud-occ-closed-rail)}.occ__lane-bg{position:absolute;top:0;height:100%;background-image:linear-gradient(to right,var(--ud-occ-rule) 1px,transparent 1px),repeating-linear-gradient(to right,var(--ud-occ-weekend) 0 calc(var(--dw) * 2),transparent calc(var(--dw) * 2) calc(var(--dw) * 7));background-size:var(--dw) 100%,calc(var(--dw) * 7) 100%;background-position:0 0,var(--weekend-offset, 0px) 0}.occ__row--room .occ__lane-bg{cursor:pointer}.occ__lane-free{position:absolute;left:0;right:0;z-index:0;box-sizing:border-box;border-radius:var(--ud-occ-radius);border:1px dashed var(--ud-occ-rule)}.occ__bar{position:absolute;z-index:2;display:flex;align-items:center;padding:0 6px 0 8px;box-sizing:border-box;border-radius:var(--ud-occ-radius);border-left:4px solid var(--ud-occ-accent);font-size:12px;cursor:grab;overflow:hidden;white-space:nowrap;box-shadow:0 1px 2px #1b253514;transition:box-shadow .12s ease,transform .12s ease}.occ__bar:hover{box-shadow:0 3px 8px #1b25352e;transform:translateY(-1px)}.occ__bar-label{overflow:hidden;text-overflow:ellipsis}.occ__bar.is-moving{opacity:.35;cursor:grabbing}.occ__bar--ghost{z-index:6;cursor:grabbing;pointer-events:none;outline:2px dashed var(--ud-occ-accent);outline-offset:2px;box-shadow:0 8px 20px #1b253552}.occ__row--room.is-move-target .occ__lane-bg{background-color:#4a7fe814}.occ__bar--create{position:absolute;z-index:6;box-sizing:border-box;border-radius:var(--ud-occ-radius);background:#4a7fe82e;border:2px dashed var(--ud-occ-accent);pointer-events:none}.occ__lane-cursor{position:absolute;z-index:3;box-sizing:border-box;border-radius:var(--ud-occ-radius);outline:2px solid var(--ud-occ-accent);outline-offset:-2px;pointer-events:none}.occ__bar-handle{position:absolute;top:0;bottom:0;width:8px;cursor:ew-resize;opacity:0;transition:opacity .12s ease}.occ__bar-handle--start{left:0}.occ__bar-handle--end{right:0}.occ__bar:hover .occ__bar-handle,.occ__bar:focus-visible .occ__bar-handle{opacity:1}.occ__bar[data-state=in_room] .occ__bar-handle{background:#ffffff4d}.occ__bar:not([data-state=in_room]) .occ__bar-handle{background:#1b253524}.occ__bar.is-resizing{z-index:5;box-shadow:0 4px 14px #1b253547;outline:2px dashed var(--ud-occ-accent);outline-offset:2px}.occ__bar.is-resizing .occ__bar-handle{opacity:1}.occ__bar[data-state=tentative]{background:var(--ud-occ-tentative-bg);border-left-color:var(--ud-occ-tentative-rail);border-top:1px dashed var(--ud-occ-tentative-rail);border-bottom:1px dashed var(--ud-occ-tentative-rail);border-right:1px dashed var(--ud-occ-tentative-rail)}.occ__bar[data-state=reserved]{background:var(--ud-occ-reserved-bg);border-left-color:var(--ud-occ-reserved-rail)}.occ__bar[data-state=in_room]{background:var(--ud-occ-inroom-bg);border-left-color:var(--ud-occ-inroom-rail);color:var(--ud-occ-inroom-ink)}.occ__bar[data-state=history]{background:var(--ud-occ-history-bg);border-left-color:var(--ud-occ-history-rail)}.occ__bar.is-cut-left{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;padding-left:10px}.occ__bar.is-cut-right{border-top-right-radius:0;border-bottom-right-radius:0}.occ__bar.is-cut-left:before,.occ__bar.is-cut-right:after{content:\"\\203a\";position:absolute;top:0;bottom:0;display:flex;align-items:center;font-size:12px;opacity:.7}.occ__bar.is-cut-left:before{left:2px;content:\"\\2039\"}.occ__bar.is-cut-right:after{right:2px}.occ__closure{position:absolute;top:0;height:100%;z-index:1;box-sizing:border-box;cursor:pointer;background:repeating-linear-gradient(135deg,var(--ud-occ-closed) 0 6px,transparent 6px 12px);border-left:3px solid var(--ud-occ-closed-rail);border-right:1px solid var(--ud-occ-closed-rail);display:flex;align-items:center;padding-left:8px;font-size:11px;color:var(--ud-occ-closed-rail);overflow:hidden;white-space:nowrap}.occ__closure.is-cut-left{border-left-width:0}.occ__closure.is-cut-right{border-right-width:0}.occ__empty{position:absolute;left:0;right:0;padding:32px;text-align:center;color:var(--ud-occ-muted)}.occ__legend{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:10px 12px;border-top:1px solid var(--ud-occ-rule-strong);background:var(--ud-occ-surface);font-size:12px;color:var(--ud-occ-muted)}.occ__legend-item{display:inline-flex;align-items:center;gap:6px}.occ__swatch{width:14px;height:10px;border-radius:2px;border-left:3px solid var(--ud-occ-accent);display:inline-block}.occ__swatch[data-state=tentative]{background:var(--ud-occ-tentative-bg);border-left-color:var(--ud-occ-tentative-rail)}.occ__swatch[data-state=reserved]{background:var(--ud-occ-reserved-bg);border-left-color:var(--ud-occ-reserved-rail)}.occ__swatch[data-state=in_room]{background:var(--ud-occ-inroom-bg);border-left-color:var(--ud-occ-inroom-rail)}.occ__swatch[data-state=history]{background:var(--ud-occ-history-bg);border-left-color:var(--ud-occ-history-rail)}.occ__swatch--closed{background:repeating-linear-gradient(135deg,var(--ud-occ-closed) 0 3px,transparent 3px 6px);border-left-color:var(--ud-occ-closed-rail)}.occ__cell--sticky:focus-visible,.occ__row--group:focus-visible,.occ__bar:focus-visible,.occ__closure:focus-visible{outline:2px solid var(--ud-occ-accent);outline-offset:-2px;z-index:6}.occ__lane-bg:focus-visible{outline:none}@media (prefers-reduced-motion: reduce){.occ__chevron,.occ__nav-btn,.occ__bar,.occ__bar-handle,.occ__row-hover{transition:none}.occ__bar:hover,.occ__nav-btn:active{transform:none}}\n"] }]
5553
5667
  }], ctorParameters: () => [{ type: i1$4.TranslateService }, { type: i1$1.MatSnackBar }, { type: i0.DestroyRef }] });
5554
5668
 
5555
- /**
5556
- * The navy app drawer: brand, scrolling sections, pinned footer. It renders
5557
- * the groups it is given; filtering by role or feature flag is the app's job.
5558
- */
5559
- class SidenavComponent {
5560
- groups = input.required();
5561
- /** Icon-only rail: headers become dividers, labels move to tooltips. */
5562
- collapsed = input(false);
5563
- brandRoute = input('/');
5564
- logo = input('assets/brand/wordmark/udorm-wordmark-reverse.png');
5565
- logoCollapsed = input('assets/brand/appicon/udorm-glyph-ud-reverse.png');
5566
- router = inject(Router);
5567
- zone = inject(NgZone);
5568
- destroyRef = inject(DestroyRef);
5569
- sections = viewChild.required('sections');
5570
- sectionsList = viewChild.required('sectionsList');
5571
- // Whether part of the list sits below the visible area; drives the fade.
5572
- $moreBelow = signal(false);
5573
- $navGroups = computed(() => this.groups().filter(group => !group.footer && group.children.length));
5574
- $footerGroups = computed(() => this.groups().filter(group => group.footer && group.children.length));
5575
- // Seeded from router.url: the first NavigationEnd after login can fire
5576
- // before this component exists, which left the landing page unhighlighted.
5577
- $currentUrl = toSignal(this.router.events.pipe(filter((event) => event instanceof NavigationEnd), map$1(event => event.urlAfterRedirects)), { initialValue: this.router.url });
5578
- $activeRoute = computed(() => activeNavRoute(this.$currentUrl(), this.groups().flatMap(group => group.children.map(child => child.route))));
5579
- ngAfterViewInit() {
5580
- // The frame resizes with the window and the drawer; the list with the
5581
- // groups and language. Either can push items past the fold or back.
5582
- const observer = new ResizeObserver(() => this.zone.run(() => this.updateMoreBelow()));
5583
- observer.observe(this.sections().nativeElement);
5584
- observer.observe(this.sectionsList().nativeElement);
5585
- this.destroyRef.onDestroy(() => observer.disconnect());
5586
- }
5587
- updateMoreBelow() {
5588
- const { scrollTop, clientHeight, scrollHeight } = this.sections().nativeElement;
5589
- this.$moreBelow.set(scrollTop + clientHeight < scrollHeight - 1);
5590
- }
5591
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5592
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: SidenavComponent, isStandalone: true, selector: "ud-sidenav", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, brandRoute: { classPropertyName: "brandRoute", publicName: "brandRoute", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoCollapsed: { classPropertyName: "logoCollapsed", publicName: "logoCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sections", first: true, predicate: ["sections"], descendants: true, isSignal: true }, { propertyName: "sectionsList", first: true, predicate: ["sectionsList"], descendants: true, isSignal: true }], ngImport: i0, template: "<nav class=\"sidenav\" [class.collapsed]=\"collapsed()\">\n <a class=\"brand\" [routerLink]=\"brandRoute()\">\n @if (collapsed()) {\n <img [src]=\"logoCollapsed()\" alt=\"UDorm\" class=\"logo-glyph\" />\n } @else {\n <img [src]=\"logo()\" alt=\"UDorm\" class=\"logo-wordmark\" />\n }\n </a>\n <!-- The frame carries the fade, so it stays put while the list scrolls. -->\n <div class=\"sections-frame\" [class.more-below]=\"$moreBelow()\">\n <div class=\"sections\" #sections (scroll)=\"updateMoreBelow()\">\n <div class=\"sections-list\" #sectionsList>\n @for (group of $navGroups(); track group.key) {\n <div class=\"nav-group\">\n <!-- Same height expanded and collapsed, so icons keep their\n place when the drawer toggles. -->\n @if (group.category) {\n @if (collapsed()) {\n <div class=\"divider\" aria-hidden=\"true\"></div>\n } @else {\n <p class=\"category\">\n {{ group.category | toObservable | async }}\n </p>\n }\n }\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if ($footerGroups().length) {\n <div class=\"footer\">\n @for (group of $footerGroups(); track group.key) {\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n }\n </div>\n }\n</nav>\n\n<ng-template #navItem let-child>\n @let label = child.label | toObservable | async | capitalize;\n <a\n class=\"nav-item\"\n [routerLink]=\"child.route\"\n [class.active]=\"child.route === $activeRoute()\"\n [attr.aria-current]=\"child.route === $activeRoute() ? 'page' : null\"\n [attr.aria-label]=\"collapsed() ? label : null\"\n udTooltipPosition=\"right\"\n [udTooltip]=\"collapsed() ? (label ?? '') : ''\">\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\">\n {{ child.icon }}\n </mat-icon>\n @if (!collapsed()) {\n <span class=\"label\">{{ label }}</span>\n }\n @if (child.badge) {\n <span class=\"count\">{{ child.badge }}</span>\n }\n </a>\n</ng-template>\n", styles: [":host{display:block;height:100%}.sidenav{display:flex;flex-direction:column;height:100%;background:var(--primary-color);font-family:Sora,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sections-frame{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.sections-frame:after{content:\"\";position:absolute;inset:auto 0 0;height:40px;background:linear-gradient(transparent,var(--primary-color));pointer-events:none;opacity:0;transition:opacity .15s ease}.sections-frame.more-below:after{opacity:1}.sections{flex:1;min-height:0;padding:4px 8px 8px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.sections::-webkit-scrollbar{width:6px}.sections::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.sections-list{display:flex;flex-direction:column;gap:12px}.footer{flex:none;padding:6px 8px;border-top:1px solid rgba(255,255,255,.1)}.brand{flex:none;display:flex;align-items:center;height:56px;margin:0 8px;padding-left:10px;border-radius:6px}.brand:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.logo-wordmark{height:24px;width:auto}.logo-glyph{height:28px;width:28px;object-fit:contain}.nav-group{display:flex;flex-direction:column;gap:2px}.category{display:flex;align-items:flex-end;min-height:22px;margin:0;padding:0 10px 6px;font-size:11px;font-weight:600;line-height:1.25;letter-spacing:.08em;text-transform:uppercase;color:#8a93a8}.divider{display:flex;align-items:center;justify-content:center;height:22px}.divider:before{content:\"\";width:20px;height:1px;background:#ffffff1a}.nav-item{position:relative;display:flex;align-items:center;gap:10px;height:30px;padding:0 10px;border-radius:6px;color:#dcdfe8;font-size:13.5px;line-height:1;letter-spacing:0;text-decoration:none;white-space:nowrap;transition:background-color .15s ease}.nav-item mat-icon{flex:none;width:18px;height:18px;font-size:18px;color:#939cb2}.nav-item:hover{background:#ffffff0f;color:#f5f6f7}.nav-item:hover mat-icon{color:#dcdfe8}.nav-item.active{background:#2a3768;color:#fff;font-weight:500}.nav-item.active mat-icon{color:#aeb8ff}.nav-item:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.label{overflow:hidden;text-overflow:ellipsis;line-height:1.35}.count{margin-left:auto;min-width:22px;height:18px;padding:0 5px;border-radius:9px;background:#ef6547;color:#1b2535;font-size:11px;font-weight:600;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}.collapsed .brand{justify-content:center;padding-left:0}.collapsed .nav-item{justify-content:center;padding:0}.collapsed .count{position:absolute;top:-2px;right:3px;min-width:16px;height:15px;padding:0 4px;font-size:9.5px;line-height:15px;box-shadow:0 0 0 2px var(--primary-color)}@media (prefers-reduced-motion: reduce){.nav-item,.sections-frame:after{transition:none}}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: CapitalizePipe, name: "capitalize" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: ToObservablePipe, name: "toObservable" }, { kind: "directive", type: UdTooltipDirective, selector: "[udTooltip]", inputs: ["udTooltip", "udTooltipPosition", "udTooltipDisabled", "udTooltipShowDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5593
- }
5594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SidenavComponent, decorators: [{
5595
- type: Component,
5596
- args: [{ selector: 'ud-sidenav', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
5597
- AsyncPipe,
5598
- CapitalizePipe,
5599
- MatIcon,
5600
- NgTemplateOutlet,
5601
- RouterLink,
5602
- ToObservablePipe,
5603
- UdTooltipDirective,
5604
- ], template: "<nav class=\"sidenav\" [class.collapsed]=\"collapsed()\">\n <a class=\"brand\" [routerLink]=\"brandRoute()\">\n @if (collapsed()) {\n <img [src]=\"logoCollapsed()\" alt=\"UDorm\" class=\"logo-glyph\" />\n } @else {\n <img [src]=\"logo()\" alt=\"UDorm\" class=\"logo-wordmark\" />\n }\n </a>\n <!-- The frame carries the fade, so it stays put while the list scrolls. -->\n <div class=\"sections-frame\" [class.more-below]=\"$moreBelow()\">\n <div class=\"sections\" #sections (scroll)=\"updateMoreBelow()\">\n <div class=\"sections-list\" #sectionsList>\n @for (group of $navGroups(); track group.key) {\n <div class=\"nav-group\">\n <!-- Same height expanded and collapsed, so icons keep their\n place when the drawer toggles. -->\n @if (group.category) {\n @if (collapsed()) {\n <div class=\"divider\" aria-hidden=\"true\"></div>\n } @else {\n <p class=\"category\">\n {{ group.category | toObservable | async }}\n </p>\n }\n }\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if ($footerGroups().length) {\n <div class=\"footer\">\n @for (group of $footerGroups(); track group.key) {\n @for (child of group.children; track child.route) {\n <ng-container\n *ngTemplateOutlet=\"navItem; context: { $implicit: child }\" />\n }\n }\n </div>\n }\n</nav>\n\n<ng-template #navItem let-child>\n @let label = child.label | toObservable | async | capitalize;\n <a\n class=\"nav-item\"\n [routerLink]=\"child.route\"\n [class.active]=\"child.route === $activeRoute()\"\n [attr.aria-current]=\"child.route === $activeRoute() ? 'page' : null\"\n [attr.aria-label]=\"collapsed() ? label : null\"\n udTooltipPosition=\"right\"\n [udTooltip]=\"collapsed() ? (label ?? '') : ''\">\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\">\n {{ child.icon }}\n </mat-icon>\n @if (!collapsed()) {\n <span class=\"label\">{{ label }}</span>\n }\n @if (child.badge) {\n <span class=\"count\">{{ child.badge }}</span>\n }\n </a>\n</ng-template>\n", styles: [":host{display:block;height:100%}.sidenav{display:flex;flex-direction:column;height:100%;background:var(--primary-color);font-family:Sora,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sections-frame{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.sections-frame:after{content:\"\";position:absolute;inset:auto 0 0;height:40px;background:linear-gradient(transparent,var(--primary-color));pointer-events:none;opacity:0;transition:opacity .15s ease}.sections-frame.more-below:after{opacity:1}.sections{flex:1;min-height:0;padding:4px 8px 8px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.sections::-webkit-scrollbar{width:6px}.sections::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.sections-list{display:flex;flex-direction:column;gap:12px}.footer{flex:none;padding:6px 8px;border-top:1px solid rgba(255,255,255,.1)}.brand{flex:none;display:flex;align-items:center;height:56px;margin:0 8px;padding-left:10px;border-radius:6px}.brand:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.logo-wordmark{height:24px;width:auto}.logo-glyph{height:28px;width:28px;object-fit:contain}.nav-group{display:flex;flex-direction:column;gap:2px}.category{display:flex;align-items:flex-end;min-height:22px;margin:0;padding:0 10px 6px;font-size:11px;font-weight:600;line-height:1.25;letter-spacing:.08em;text-transform:uppercase;color:#8a93a8}.divider{display:flex;align-items:center;justify-content:center;height:22px}.divider:before{content:\"\";width:20px;height:1px;background:#ffffff1a}.nav-item{position:relative;display:flex;align-items:center;gap:10px;height:30px;padding:0 10px;border-radius:6px;color:#dcdfe8;font-size:13.5px;line-height:1;letter-spacing:0;text-decoration:none;white-space:nowrap;transition:background-color .15s ease}.nav-item mat-icon{flex:none;width:18px;height:18px;font-size:18px;color:#939cb2}.nav-item:hover{background:#ffffff0f;color:#f5f6f7}.nav-item:hover mat-icon{color:#dcdfe8}.nav-item.active{background:#2a3768;color:#fff;font-weight:500}.nav-item.active mat-icon{color:#aeb8ff}.nav-item:focus-visible{outline:2px solid #aeb8ff;outline-offset:-2px}.label{overflow:hidden;text-overflow:ellipsis;line-height:1.35}.count{margin-left:auto;min-width:22px;height:18px;padding:0 5px;border-radius:9px;background:#ef6547;color:#1b2535;font-size:11px;font-weight:600;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}.collapsed .brand{justify-content:center;padding-left:0}.collapsed .nav-item{justify-content:center;padding:0}.collapsed .count{position:absolute;top:-2px;right:3px;min-width:16px;height:15px;padding:0 4px;font-size:9.5px;line-height:15px;box-shadow:0 0 0 2px var(--primary-color)}@media (prefers-reduced-motion: reduce){.nav-item,.sections-frame:after{transition:none}}\n"] }]
5605
- }] });
5606
- /**
5607
- * The nav route to highlight for `url`. An exact match wins; otherwise the
5608
- * item in the same top-level section, so detail and add pages (`/users/123`,
5609
- * `/users/add-user`) keep their section lit. When a section has several items
5610
- * (`/document-compliance/send` and `/list`), its list page wins.
5611
- */
5612
- function activeNavRoute(url, routes) {
5613
- const path = url.split(/[?#;]/)[0];
5614
- if (routes.includes(path)) {
5615
- return path;
5616
- }
5617
- const section = (route) => route.split('/')[1];
5618
- const inSection = routes.filter(route => section(route) === section(path));
5619
- return inSection.find(route => route.endsWith('/list')) ?? inSection[0];
5620
- }
5621
-
5622
5669
  class SummaryViewComponent {
5623
5670
  clipboard = inject(Clipboard);
5624
5671
  title = '';
@@ -7393,7 +7440,7 @@ function withUdComponentsTranslations(appLoader) {
7393
7440
  return {
7394
7441
  getTranslation(lang) {
7395
7442
  const base = udComponentsTranslationsFor(lang);
7396
- return appLoader.getTranslation(lang).pipe(map(appTranslations => mergeDeep(base, appTranslations ?? {})));
7443
+ return appLoader.getTranslation(lang).pipe(map$1(appTranslations => mergeDeep(base, appTranslations ?? {})));
7397
7444
  },
7398
7445
  };
7399
7446
  }
@@ -7501,5 +7548,5 @@ const generateTimeOptions = (start, end, intervalMinutes = 5) => {
7501
7548
  * Generated bundle index. Do not edit.
7502
7549
  */
7503
7550
 
7504
- export { ApplicationStatus, AutocompleteComponent, CalendarComponent, CalendarSlotColor, CapitalizePipe, CarouselComponent, CheckboxComponent, ChipInputComponent, ColumnVisibilityModalComponent, CustomInputComponent, CustomSnackbarComponent, CustomTableComponent, DateInputComponent, DateOperator, DateRangeInputComponent, DynamicComponentComponent, EditViewComponent, EditViewSectionDirective, FeatureFlagKey, FileInputComponent, FilterType, GROUP_ROW_HEIGHT, IconColor, KpiComponent, KpiDataType, KpiPillType, KpiProgressBarType, KpiVariant, LoadingStatus, ModalComponent, ModalInputType, MoneyInputComponent, MultiSelectComponent, MultiSelectMatchMode, NumberOperator, OCCUPANCY_GRID_HEADER_HEIGHT, OccupancyGridComponent, PhoneInputComponent, PillComponent, PillToggleComponent, PluralizePipe, ProgressBarComponent, SafePipe, SidenavComponent, SingularPipe, SnackbarType, StringOperator, SummaryViewComponent, TableDisplayColumnType, TabsComponent, TelInputComponent, TextInputComponent, TextareaComponent, TimePickerComponent, ToObservablePipe, ToggleComponent, ToggleOptionComponent, TranslateWrapperService, UD_COMPONENTS_TRANSLATIONS, UdButtonComponent, UdButtonToggleComponent, UdMenuComponent, UdPreviewContainerComponent, UdStepContentDirective, UdStepperComponent, UdTooltipComponent, UdTooltipDirective, activeNavRoute, addDays, assignLanes, barGeometry, buildRows, capitalize, centsToMoney, clampToClosures, closureGeometry, dateAtOffset, dayColumns, dayOfMonth, daysBetween, epochDay, formatLocalDate, formatLocalDateTime, formatLocalDateTimeLongForm, formatLocalTime, formatLocalTimeWithMinutes, formatLocalTimeWithMinutesAmPm, formatMoney, formatMonthYear, formatPhoneNumber, formatStringDate, formatStringDateTime, generateTimeOptions, groupThousands, inListValidator, isIsoDate, laneForSpan, laneNeighborBound, maxIso, minIso, moneyToCents, monthOf, monthSegments, overbooksRoom, overlapsClosure, overlapsRoom, parseLocalDate, parseMoney, pluralize, positionRows, rowHeight, spaceCase, takenOn, totalHeight, udComponentsOnlyTranslateLoader, udComponentsTranslationsFor, updateArray, visibleRange, weekday, weekendOffsetDays, withLoadingState, withUdComponentsTranslations, yearOf };
7551
+ export { AppShellComponent, ApplicationStatus, AutocompleteComponent, CalendarComponent, CalendarSlotColor, CapitalizePipe, CarouselComponent, CheckboxComponent, ChipInputComponent, ColumnVisibilityModalComponent, CustomInputComponent, CustomSnackbarComponent, CustomTableComponent, DateInputComponent, DateOperator, DateRangeInputComponent, DynamicComponentComponent, EditViewComponent, EditViewSectionDirective, FeatureFlagKey, FileInputComponent, FilterType, GROUP_ROW_HEIGHT, IconColor, KpiComponent, KpiDataType, KpiPillType, KpiProgressBarType, KpiVariant, LoadingStatus, ModalComponent, ModalInputType, MoneyInputComponent, MultiSelectComponent, MultiSelectMatchMode, NumberOperator, OCCUPANCY_GRID_HEADER_HEIGHT, OccupancyGridComponent, PhoneInputComponent, PillComponent, PillToggleComponent, PluralizePipe, ProgressBarComponent, SIDENAV_LOGO, SIDENAV_LOGO_COLLAPSED, SafePipe, SidenavComponent, SingularPipe, SnackbarType, StringOperator, SummaryViewComponent, TableDisplayColumnType, TabsComponent, TelInputComponent, TextInputComponent, TextareaComponent, TimePickerComponent, ToObservablePipe, ToggleComponent, ToggleOptionComponent, TranslateWrapperService, UD_COMPONENTS_TRANSLATIONS, UdButtonComponent, UdButtonToggleComponent, UdMenuComponent, UdPreviewContainerComponent, UdStepContentDirective, UdStepperComponent, UdTooltipComponent, UdTooltipDirective, activeNavRoute, addDays, assignLanes, barGeometry, buildRows, capitalize, centsToMoney, clampToClosures, closureGeometry, dateAtOffset, dayColumns, dayOfMonth, daysBetween, epochDay, formatLocalDate, formatLocalDateTime, formatLocalDateTimeLongForm, formatLocalTime, formatLocalTimeWithMinutes, formatLocalTimeWithMinutesAmPm, formatMoney, formatMonthYear, formatPhoneNumber, formatStringDate, formatStringDateTime, generateTimeOptions, groupThousands, inListValidator, isIsoDate, laneForSpan, laneNeighborBound, maxIso, minIso, moneyToCents, monthOf, monthSegments, overbooksRoom, overlapsClosure, overlapsRoom, parseLocalDate, parseMoney, pluralize, positionRows, rowHeight, spaceCase, takenOn, totalHeight, udComponentsOnlyTranslateLoader, udComponentsTranslationsFor, updateArray, visibleRange, weekday, weekendOffsetDays, withLoadingState, withUdComponentsTranslations, yearOf };
7505
7552
  //# sourceMappingURL=ud-components.mjs.map