|
@@ -7,7 +7,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
import { withLatestFrom, debounceTime, skip, BehaviorSubject, filter, Subject, fromEvent } from 'rxjs';
|
|
|
import * as i1$1 from '@angular/forms';
|
|
|
import { NG_VALUE_ACCESSOR, ControlContainer, FormGroupDirective } from '@angular/forms';
|
|
|
-import { debounceTime as debounceTime$1, map, startWith } from 'rxjs/operators';
|
|
|
+import { debounceTime as debounceTime$1, map, startWith, tap } from 'rxjs/operators';
|
|
|
|
|
|
/**
|
|
|
* Used for some components to determine colouring of various elements. Relates to CSS classes to facilitate dev's life
|
|
@@ -271,11 +271,11 @@ class MenuItemComponent {
|
|
|
this.iconDirection = 'horizontal';
|
|
|
}
|
|
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
|
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: MenuItemComponent, isStandalone: true, selector: "ct-menu-item", inputs: { text: "text", link: "link", type: "type", icon: "icon", iconSize: "iconSize", iconAlone: "iconAlone", iconDirection: "iconDirection" }, ngImport: i0, template: "<a\n [routerLink]=\"(type === 'internal' && link)! || null\"\n [attr.href]=\"type === 'external' && link\"\n class=\"block rounded-md px-4 py-2 text-on-surface hover:bg-primary/25 dark:text-on-surface-dark dark:hover:bg-primary-dark/25\">\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" size=\"xl\" />\n }\n @if (text && !iconAlone) {\n <span>{{ text }}</span>\n }\n </span>\n</a>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: MenuItemComponent, isStandalone: true, selector: "ct-menu-item", inputs: { text: "text", link: "link", type: "type", icon: "icon", iconSize: "iconSize", iconAlone: "iconAlone", iconDirection: "iconDirection" }, ngImport: i0, template: "<a\n [routerLink]=\"(type === 'internal' && link)! || null\"\n [attr.href]=\"type === 'external' && link\"\n class=\"block rounded-md px-4 py-2 text-on-surface hover:bg-primary/25 dark:text-on-surface-dark dark:hover:bg-primary-dark/25\">\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" size=\"xl\" />\n }\n @if (text && !iconAlone) {\n <span>bbb {{ text }}</span>\n }\n </span>\n</a>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
}
|
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
|
type: Component,
|
|
|
- args: [{ selector: 'ct-menu-item', standalone: true, imports: [RouterLink, IconComponent, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n [routerLink]=\"(type === 'internal' && link)! || null\"\n [attr.href]=\"type === 'external' && link\"\n class=\"block rounded-md px-4 py-2 text-on-surface hover:bg-primary/25 dark:text-on-surface-dark dark:hover:bg-primary-dark/25\">\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" size=\"xl\" />\n }\n @if (text && !iconAlone) {\n <span>{{ text }}</span>\n }\n </span>\n</a>\n" }]
|
|
|
+ args: [{ selector: 'ct-menu-item', standalone: true, imports: [RouterLink, IconComponent, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n [routerLink]=\"(type === 'internal' && link)! || null\"\n [attr.href]=\"type === 'external' && link\"\n class=\"block rounded-md px-4 py-2 text-on-surface hover:bg-primary/25 dark:text-on-surface-dark dark:hover:bg-primary-dark/25\">\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" size=\"xl\" />\n }\n @if (text && !iconAlone) {\n <span>bbb {{ text }}</span>\n }\n </span>\n</a>\n" }]
|
|
|
}], propDecorators: { text: [{
|
|
|
type: Input
|
|
|
}], link: [{
|
|
@@ -811,7 +811,7 @@ class ScreenSizeService {
|
|
|
this.screenSizeSubject = new BehaviorSubject(this.getScreenSize());
|
|
|
this.screenSize$ = this.screenSizeSubject.asObservable();
|
|
|
fromEvent(window, 'resize')
|
|
|
- .pipe(debounceTime$1(100), map(() => this.getScreenSize()), startWith(this.getScreenSize()), takeUntilDestroyed(this.destroyRef))
|
|
|
+ .pipe(debounceTime$1(50), map(() => this.getScreenSize()), startWith(this.getScreenSize()), tap(() => console.log('test')), takeUntilDestroyed(this.destroyRef))
|
|
|
.subscribe(this.screenSizeSubject);
|
|
|
}
|
|
|
getScreenSize() {
|