fix(ui): simplify control transition guard (#2171)
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { afterNextRender, inject, Injectable, Injector } from '@angular/core';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class NavigationTransitionGuard {
|
||||
private readonly root = inject(DOCUMENT).documentElement;
|
||||
private readonly injector = inject(Injector);
|
||||
|
||||
constructor() {
|
||||
inject(Router).events.subscribe((event) => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
this.root.classList.add('route-settling');
|
||||
afterNextRender(() => this.release(), { injector: this.injector });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private release(): void {
|
||||
getComputedStyle(this.root).getPropertyValue('opacity');
|
||||
setTimeout(() => this.root.classList.remove('route-settling'), 1);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import { type FormValueControl } from '@angular/forms/signals';
|
||||
import { Combobox, ComboboxInput } from '@angular/aria/combobox';
|
||||
import { LucideLoaderCircle } from '@lucide/angular';
|
||||
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { AppAutocompleteBaseDirective } from './app-autocomplete-base.directive';
|
||||
import { type AppAutocompleteOption } from './app-autocomplete-option';
|
||||
import { AppAutocompletePopupComponent } from './app-autocomplete-popup.component';
|
||||
@@ -13,7 +14,7 @@ type AppAutocompleteSelectedDisplay = 'text' | 'tag';
|
||||
@Component({
|
||||
selector: 'app-autocomplete',
|
||||
standalone: true,
|
||||
imports: [Combobox, ComboboxInput, LucideLoaderCircle, AppAutocompletePopupComponent, AppAutocompleteSelectedTagsComponent],
|
||||
imports: [Combobox, ComboboxInput, LucideLoaderCircle, AppAutocompletePopupComponent, AppAutocompleteSelectedTagsComponent, AppControlTransitionDirective],
|
||||
host: { class: 'block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@@ -25,6 +26,7 @@ type AppAutocompleteSelectedDisplay = 'text' | 'tag';
|
||||
[disabled]="disabled()"
|
||||
class="relative block w-full">
|
||||
<div
|
||||
appControlTransition
|
||||
#origin
|
||||
[class]="boxClass()"
|
||||
(pointerdown)="focusInputOnPointerdown($event, input)">
|
||||
|
||||
@@ -11,6 +11,7 @@ import { type FormValueControl } from '@angular/forms/signals';
|
||||
import { Combobox, ComboboxInput } from '@angular/aria/combobox';
|
||||
import { LucideLoaderCircle } from '@lucide/angular';
|
||||
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { AppAutocompleteBaseDirective } from './app-autocomplete-base.directive';
|
||||
import { type AppAutocompleteOption } from './app-autocomplete-option';
|
||||
import { AppAutocompletePopupComponent } from './app-autocomplete-popup.component';
|
||||
@@ -19,7 +20,7 @@ import { AppAutocompleteSelectedTagsComponent } from './app-autocomplete-selecte
|
||||
@Component({
|
||||
selector: 'app-multi-autocomplete',
|
||||
standalone: true,
|
||||
imports: [Combobox, ComboboxInput, LucideLoaderCircle, AppAutocompletePopupComponent, AppAutocompleteSelectedTagsComponent],
|
||||
imports: [Combobox, ComboboxInput, LucideLoaderCircle, AppAutocompletePopupComponent, AppAutocompleteSelectedTagsComponent, AppControlTransitionDirective],
|
||||
host: { class: 'block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@@ -31,6 +32,7 @@ import { AppAutocompleteSelectedTagsComponent } from './app-autocomplete-selecte
|
||||
[disabled]="disabled()"
|
||||
class="relative block w-full">
|
||||
<div
|
||||
appControlTransition
|
||||
#origin
|
||||
[class]="boxClass()"
|
||||
(pointerdown)="focusInputOnPointerdown($event, input)">
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { SPINNER_RING } from '../spinner/app-spinner.variants';
|
||||
import { buttonVariants, type ButtonSize, type ButtonTone, type ButtonVariant } from './app-button.variants';
|
||||
|
||||
@Component({
|
||||
selector: 'app-button',
|
||||
standalone: true,
|
||||
imports: [AppControlTransitionDirective],
|
||||
host: {
|
||||
class: 'inline-block align-middle',
|
||||
'[class.w-full]': 'fluid()',
|
||||
@@ -13,6 +15,7 @@ import { buttonVariants, type ButtonSize, type ButtonTone, type ButtonVariant }
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<button
|
||||
appControlTransition
|
||||
[attr.id]="buttonId() || null"
|
||||
[class]="buttonClass()"
|
||||
[disabled]="disabled() || loading()"
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { type FormCheckboxControl } from '@angular/forms/signals';
|
||||
import { cn } from '../cn';
|
||||
import { expandedTouchTargetInputClass } from '../control.styles';
|
||||
import { AppControlTransitionDirective, expandedTouchTargetInputClass } from '../control.styles';
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import {
|
||||
appCheckboxBoxVariants,
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
@Component({
|
||||
selector: 'app-checkbox',
|
||||
standalone: true,
|
||||
imports: [AppControlTransitionDirective],
|
||||
host: { class: 'inline-block align-middle' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@@ -45,8 +46,8 @@ import {
|
||||
[required]="required()"
|
||||
(change)="onInputChange(checkbox.checked)"
|
||||
(blur)="touched.set(true)" />
|
||||
<span [class]="boxClass()" aria-hidden="true"></span>
|
||||
<svg [class]="checkIndicatorClass()" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<span appControlTransition [class]="boxClass()" aria-hidden="true"></span>
|
||||
<svg appControlTransition [class]="checkIndicatorClass()" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path
|
||||
d="M12.5 4.75L6.75 10.5L3.5 7.25"
|
||||
stroke="currentColor"
|
||||
@@ -54,7 +55,7 @@ import {
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg [class]="indeterminateIndicatorClass()" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<svg appControlTransition [class]="indeterminateIndicatorClass()" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M4 8H12" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
import { afterNextRender, DestroyRef, Directive, inject, signal } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[appControlTransition]',
|
||||
host: {
|
||||
'[class.control-transition-pending]': '!ready()',
|
||||
},
|
||||
})
|
||||
export class AppControlTransitionDirective {
|
||||
protected readonly ready = signal(false);
|
||||
|
||||
constructor() {
|
||||
const destroyRef = inject(DestroyRef);
|
||||
let animationFrameId = 0;
|
||||
destroyRef.onDestroy(() => cancelAnimationFrame(animationFrameId));
|
||||
|
||||
afterNextRender(() => {
|
||||
animationFrameId = requestAnimationFrame(() => {
|
||||
if (destroyRef.destroyed) return;
|
||||
animationFrameId = requestAnimationFrame(() => {
|
||||
if (!destroyRef.destroyed) this.ready.set(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const neutralControlBorderClass =
|
||||
'border-[color-mix(in_srgb,var(--color-text)_4%,var(--color-border))] dark:border-border';
|
||||
export const neutralSurfaceHoverClass =
|
||||
|
||||
@@ -96,6 +96,7 @@ function currentYearMonth(): YearMonth {
|
||||
export const DATE_PICKER_TEMPLATE = `
|
||||
<div #origin class="relative block w-full">
|
||||
<input
|
||||
appControlTransition
|
||||
#trigger
|
||||
readonly
|
||||
type="text"
|
||||
|
||||
@@ -5,6 +5,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { TranslocoPipe } from '@jsverse/transloco';
|
||||
import { LucideCalendar, LucideChevronLeft, LucideChevronRight, LucideLoaderCircle } from '@lucide/angular';
|
||||
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import {
|
||||
AppDatePickerBaseDirective,
|
||||
DATE_PICKER_TEMPLATE,
|
||||
@@ -17,7 +18,7 @@ const NO_SELECTION: DaySelectionFlags = { point: false, spanStart: false, spanEn
|
||||
@Component({
|
||||
selector: 'app-date-picker',
|
||||
standalone: true,
|
||||
imports: [OverlayModule, Grid, GridRow, GridCell, GridCellWidget, TranslocoPipe, LucideCalendar, LucideChevronLeft, LucideChevronRight, LucideLoaderCircle],
|
||||
imports: [OverlayModule, Grid, GridRow, GridCell, GridCellWidget, TranslocoPipe, LucideCalendar, LucideChevronLeft, LucideChevronRight, LucideLoaderCircle, AppControlTransitionDirective],
|
||||
host: { class: 'block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: DATE_PICKER_TEMPLATE,
|
||||
|
||||
@@ -5,6 +5,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { TranslocoPipe } from '@jsverse/transloco';
|
||||
import { LucideCalendar, LucideChevronLeft, LucideChevronRight, LucideLoaderCircle } from '@lucide/angular';
|
||||
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import {
|
||||
AppDatePickerBaseDirective,
|
||||
DATE_PICKER_TEMPLATE,
|
||||
@@ -23,7 +24,7 @@ const NO_SELECTION: DaySelectionFlags = { point: false, spanStart: false, spanEn
|
||||
@Component({
|
||||
selector: 'app-date-range-picker',
|
||||
standalone: true,
|
||||
imports: [OverlayModule, Grid, GridRow, GridCell, GridCellWidget, TranslocoPipe, LucideCalendar, LucideChevronLeft, LucideChevronRight, LucideLoaderCircle],
|
||||
imports: [OverlayModule, Grid, GridRow, GridCell, GridCellWidget, TranslocoPipe, LucideCalendar, LucideChevronLeft, LucideChevronRight, LucideLoaderCircle, AppControlTransitionDirective],
|
||||
host: { class: 'block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: DATE_PICKER_TEMPLATE,
|
||||
|
||||
@@ -15,6 +15,7 @@ import { type FormValueControl } from '@angular/forms/signals';
|
||||
import { translateSignal } from '@jsverse/transloco';
|
||||
import { LucideEye, LucideEyeOff, LucideLoaderCircle } from '@lucide/angular';
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import { appInputVariants, type AppInputSize, type AppInputVariant } from './app-input.variants';
|
||||
|
||||
@@ -30,11 +31,11 @@ const REVEAL_TOGGLE_CLASS =
|
||||
@Component({
|
||||
selector: 'app-input',
|
||||
standalone: true,
|
||||
imports: [LucideEye, LucideEyeOff, LucideLoaderCircle],
|
||||
imports: [AppControlTransitionDirective, LucideEye, LucideEyeOff, LucideLoaderCircle],
|
||||
host: { class: 'block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<div [class]="boxClass()" [attr.aria-invalid]="showInvalid() ? 'true' : null">
|
||||
<div appControlTransition [class]="boxClass()" [attr.aria-invalid]="showInvalid() ? 'true' : null">
|
||||
<span [class]="adornmentClass"><ng-content select="[appInputLeading]" /></span>
|
||||
<input
|
||||
#input
|
||||
|
||||
@@ -14,17 +14,19 @@ import { transformedValue, type FormValueControl, type ParseResult } from '@angu
|
||||
import { LucideChevronDown, LucideChevronUp, LucideMinus, LucidePlus } from '@lucide/angular';
|
||||
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import { appInputVariants, type AppInputSize } from '../input/app-input.variants';
|
||||
|
||||
@Component({
|
||||
selector: 'app-number-input',
|
||||
standalone: true,
|
||||
imports: [LucideChevronDown, LucideChevronUp, LucideMinus, LucidePlus],
|
||||
imports: [AppControlTransitionDirective, LucideChevronDown, LucideChevronUp, LucideMinus, LucidePlus],
|
||||
host: { class: 'relative block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<input
|
||||
appControlTransition
|
||||
#input
|
||||
[class]="inputClass()"
|
||||
type="number"
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { type FormValueControl } from '@angular/forms/signals';
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import {
|
||||
appRadioGroupDotVariants,
|
||||
@@ -34,6 +35,7 @@ let nextGroupId = 0;
|
||||
@Component({
|
||||
selector: 'app-radio-group',
|
||||
standalone: true,
|
||||
imports: [AppControlTransitionDirective],
|
||||
host: { class: 'block' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@@ -48,7 +50,7 @@ let nextGroupId = 0;
|
||||
[attr.aria-readonly]="readonly() ? 'true' : null"
|
||||
[attr.aria-busy]="pending() ? 'true' : null">
|
||||
@for (option of options(); track option.value; let i = $index) {
|
||||
<label [class]="variant() === 'segmented' ? segmentClass(i) : optionClass()">
|
||||
<label appControlTransition [class]="variant() === 'segmented' ? segmentClass(i) : optionClass()">
|
||||
<input
|
||||
#radio
|
||||
type="radio"
|
||||
@@ -62,7 +64,7 @@ let nextGroupId = 0;
|
||||
@if (variant() === 'segmented') {
|
||||
<span class="truncate leading-none">{{ option.label }}</span>
|
||||
} @else {
|
||||
<span [class]="dotClass()" aria-hidden="true"></span>
|
||||
<span appControlTransition [class]="dotClass()" aria-hidden="true"></span>
|
||||
<span [class]="textBlockClass()">
|
||||
<span class="font-medium leading-5">{{ option.label }}</span>
|
||||
@if (option.description) {
|
||||
|
||||
@@ -13,6 +13,7 @@ import { TranslocoPipe, translateSignal } from '@jsverse/transloco';
|
||||
import { LucideCheck, LucideChevronDown, LucideLoaderCircle, LucideSearch, LucideX } from '@lucide/angular';
|
||||
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { AppSelectBaseDirective } from './app-select-base.directive';
|
||||
import { type SelectOption } from './app-select.options';
|
||||
|
||||
@@ -28,6 +29,7 @@ import { type SelectOption } from './app-select.options';
|
||||
Listbox,
|
||||
Option,
|
||||
TranslocoPipe,
|
||||
AppControlTransitionDirective,
|
||||
LucideCheck,
|
||||
LucideChevronDown,
|
||||
LucideLoaderCircle,
|
||||
@@ -39,6 +41,7 @@ import { type SelectOption } from './app-select.options';
|
||||
template: `
|
||||
<div ngCombobox #cb="ngCombobox" [readonly]="true" [disabled]="disabled()" class="relative block h-full w-full">
|
||||
<div
|
||||
appControlTransition
|
||||
#origin
|
||||
[class]="triggerClass()"
|
||||
[attr.data-expanded]="cb.expanded() ? 'true' : null">
|
||||
|
||||
@@ -13,6 +13,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { TranslocoPipe } from '@jsverse/transloco';
|
||||
import { LucideCheck, LucideChevronDown, LucideLoaderCircle, LucideSearch, LucideX } from '@lucide/angular';
|
||||
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { AppSelectBaseDirective } from './app-select-base.directive';
|
||||
import { AppSelectSelectedTemplateDirective } from './app-select.templates';
|
||||
import { type SelectOption } from './app-select.options';
|
||||
@@ -29,6 +30,7 @@ import { type SelectOption } from './app-select.options';
|
||||
Listbox,
|
||||
Option,
|
||||
TranslocoPipe,
|
||||
AppControlTransitionDirective,
|
||||
LucideCheck,
|
||||
LucideChevronDown,
|
||||
LucideLoaderCircle,
|
||||
@@ -40,6 +42,7 @@ import { type SelectOption } from './app-select.options';
|
||||
template: `
|
||||
<div ngCombobox #cb="ngCombobox" [readonly]="true" [disabled]="disabled()" class="relative block h-full w-full">
|
||||
<div
|
||||
appControlTransition
|
||||
#origin
|
||||
[class]="triggerClass()"
|
||||
[attr.data-expanded]="cb.expanded() ? 'true' : null">
|
||||
|
||||
@@ -13,11 +13,12 @@ import {
|
||||
import { type FormValueControl } from '@angular/forms/signals';
|
||||
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import { invisibleControlInputClass, neutralControlBorderClass } from '../control.styles';
|
||||
import { AppControlTransitionDirective, invisibleControlInputClass, neutralControlBorderClass } from '../control.styles';
|
||||
|
||||
@Component({
|
||||
selector: 'app-slider',
|
||||
standalone: true,
|
||||
imports: [AppControlTransitionDirective],
|
||||
host: { class: 'block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@@ -48,6 +49,7 @@ import { invisibleControlInputClass, neutralControlBorderClass } from '../contro
|
||||
<div class="pointer-events-none absolute inset-x-0 h-1.5 rounded-full bg-border"></div>
|
||||
<div class="pointer-events-none absolute left-0 h-1.5 rounded-full bg-primary" [style.width]="thumbPosition"></div>
|
||||
<div
|
||||
appControlTransition
|
||||
[class]="thumbClass"
|
||||
[style.left]="thumbPosition"></div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { type FormCheckboxControl } from '@angular/forms/signals';
|
||||
import { cn } from '../cn';
|
||||
import { expandedTouchTargetInputClass } from '../control.styles';
|
||||
import { AppControlTransitionDirective, expandedTouchTargetInputClass } from '../control.styles';
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import {
|
||||
appSwitchRootVariants,
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
@Component({
|
||||
selector: 'app-switch',
|
||||
standalone: true,
|
||||
imports: [AppControlTransitionDirective],
|
||||
host: { class: 'inline-flex align-middle' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@@ -45,8 +46,8 @@ import {
|
||||
[required]="required()"
|
||||
(change)="onInputChange(control.checked)"
|
||||
(blur)="touched.set(true)" />
|
||||
<span [class]="trackClass()" aria-hidden="true"></span>
|
||||
<span [class]="thumbClass()" aria-hidden="true"></span>
|
||||
<span appControlTransition [class]="trackClass()" aria-hidden="true"></span>
|
||||
<span appControlTransition [class]="thumbClass()" aria-hidden="true"></span>
|
||||
</span>
|
||||
`,
|
||||
})
|
||||
|
||||
@@ -18,6 +18,7 @@ import { LucideDynamicIcon, type LucideIconData } from '@lucide/angular';
|
||||
import { AppSelectComponent } from '../select/app-select.component';
|
||||
import { type SelectOption } from '../select/app-select.options';
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import {
|
||||
appTabsListVariants,
|
||||
appTabsRootVariants,
|
||||
@@ -45,7 +46,7 @@ const COLLAPSE_HYSTERESIS = 8;
|
||||
@Component({
|
||||
selector: 'app-tabs',
|
||||
standalone: true,
|
||||
imports: [Tabs, TabList, NgTab, AppSelectComponent, LucideDynamicIcon],
|
||||
imports: [Tabs, TabList, NgTab, AppSelectComponent, LucideDynamicIcon, AppControlTransitionDirective],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'relative block min-w-0' },
|
||||
template: `
|
||||
@@ -77,7 +78,7 @@ const COLLAPSE_HYSTERESIS = 8;
|
||||
[style.transform]="'translateX(' + indicatorLeft() + 'px)'"
|
||||
[style.width.px]="indicatorWidth()"></span>
|
||||
@for (tab of tabs(); track tab.id) {
|
||||
<button ngTab type="button" [value]="tab.id" [class]="tabClass()">
|
||||
<button appControlTransition ngTab type="button" [value]="tab.id" [class]="tabClass()">
|
||||
@if (tab.icon; as tabIcon) {
|
||||
<svg [lucideIcon]="tabIcon" [class]="tabIconClass()" aria-hidden="true"></svg>
|
||||
}
|
||||
|
||||
@@ -13,17 +13,19 @@ import {
|
||||
import { type FormValueControl } from '@angular/forms/signals';
|
||||
import { LucideLoaderCircle } from '@lucide/angular';
|
||||
import { cn } from '../cn';
|
||||
import { AppControlTransitionDirective } from '../control.styles';
|
||||
import { APP_FIELD } from '../field/app-field.context';
|
||||
import { appTextareaVariants } from './app-textarea.variants';
|
||||
|
||||
@Component({
|
||||
selector: 'app-textarea',
|
||||
standalone: true,
|
||||
imports: [LucideLoaderCircle],
|
||||
imports: [AppControlTransitionDirective, LucideLoaderCircle],
|
||||
host: { class: 'relative block w-full' },
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<textarea
|
||||
appControlTransition
|
||||
#textarea
|
||||
[class]="textareaClass()"
|
||||
[attr.id]="resolvedInputId()"
|
||||
|
||||
@@ -174,9 +174,3 @@ hr {
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
html.route-settling *,
|
||||
html.route-settling *::before,
|
||||
html.route-settling *::after {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
@utility animate-in-sheet {
|
||||
animation: enter 250ms cubic-bezier(0.32, 0.72, 0, 1);
|
||||
}
|
||||
@utility control-transition-pending {
|
||||
&,
|
||||
&::before,
|
||||
&::after {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Inter";
|
||||
|
||||
@@ -6,7 +6,6 @@ import { RxStompService } from './app/shared/websocket/rx-stomp.service';
|
||||
import { rxStompServiceFactory } from './app/shared/websocket/rx-stomp-service-factory';
|
||||
import { provideRouter, RouteReuseStrategy } from '@angular/router';
|
||||
import { CustomReuseStrategy } from './app/core/custom-reuse-strategy';
|
||||
import { NavigationTransitionGuard } from './app/core/navigation-transition-guard';
|
||||
import { provideOptimus } from '@openng/optimus-ui/config';
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { AppComponent } from './app/app.component';
|
||||
@@ -44,9 +43,6 @@ bootstrapApplication(AppComponent, {
|
||||
const startup = inject(StartupService);
|
||||
return Promise.resolve(initializeAuth()).then(() => startup.load());
|
||||
}),
|
||||
provideAppInitializer(() => {
|
||||
inject(NavigationTransitionGuard);
|
||||
}),
|
||||
provideHttpClient(withInterceptors([AuthInterceptorService])),
|
||||
provideRouter(routes),
|
||||
DialogService,
|
||||
|
||||
Reference in New Issue
Block a user