@cloudfrogger/goodui 0.0.64 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/README.md +15 -0
- package/ai/case-studies/dockerhub.md +7 -0
- package/ai/case-studies/index.md +1 -0
- package/ai/catalog/component.schema.json +6 -0
- package/ai/catalog/components/good-action-menu.json +2 -2
- package/ai/catalog/components/good-alert.json +2 -2
- package/ai/catalog/components/{good-topbar.json → good-app-header.json} +77 -83
- package/ai/catalog/components/{good-app-layout.json → good-app-shell.json} +32 -68
- package/ai/catalog/components/good-avatar-menu-item.json +2 -2
- package/ai/catalog/components/good-brand-icon.json +6 -6
- package/ai/catalog/components/good-button.json +2 -2
- package/ai/catalog/components/good-dropdown.json +2 -2
- package/ai/catalog/components/{good-main-menu.json → good-header-actions.json} +19 -10
- package/ai/catalog/components/{good-avatar-menu.json → good-header-avatar.json} +5 -5
- package/ai/catalog/components/{good-topbar-dropdown-item.json → good-header-dropdown-item.json} +17 -17
- package/ai/catalog/components/{good-topbar-dropdown-menu.json → good-header-dropdown-menu.json} +14 -14
- package/ai/catalog/components/{good-topbar-menu-item.json → good-header-menu-item.json} +17 -15
- package/ai/catalog/components/{good-topbar-menu-container.json → good-header-menu.json} +16 -14
- package/ai/catalog/components/{good-notifications.json → good-header-notification.json} +5 -5
- package/ai/catalog/components/{good-search.json → good-header-search.json} +16 -7
- package/ai/catalog/components/{good-topbar-submenu.json → good-header-submenu.json} +12 -12
- package/ai/catalog/components/{good-theme-toggle.json → good-header-themetoggle.json} +8 -6
- package/ai/catalog/components/{good-heading.json → good-heading-1.json} +15 -33
- package/ai/catalog/components/good-heading-2.json +46 -0
- package/ai/catalog/components/{good-subheading.json → good-heading-3.json} +9 -30
- package/ai/catalog/components/good-heading-4.json +46 -0
- package/ai/catalog/components/good-heading-5.json +46 -0
- package/ai/catalog/components/good-heading-6.json +46 -0
- package/ai/catalog/components/good-heading-7.json +46 -0
- package/ai/catalog/components/good-heading-group.json +1 -1
- package/ai/catalog/components/good-main-view.json +6 -49
- package/ai/catalog/components/good-notification-host.json +1 -1
- package/ai/catalog/components/good-section.json +20 -2
- package/ai/catalog/components/good-settings.json +1 -1
- package/ai/catalog/components/good-sidebar-item.json +4 -2
- package/ai/catalog/components/good-sidebar-menu-container.json +4 -2
- package/ai/catalog/components/good-sidebar-submenu-group.json +1 -1
- package/ai/catalog/components/good-sidebar-submenu-item.json +1 -1
- package/ai/catalog/components/{good-sidebar-container.json → good-sidebar.json} +23 -26
- package/ai/catalog/components/good-summary.json +6 -1
- package/ai/catalog/index.json +231 -171
- package/ai/examples/edit-form.html +3 -1
- package/ai/examples/edit-form.ts +2 -2
- package/ai/examples/login.html +3 -1
- package/ai/examples/login.ts +2 -2
- package/ai/examples/settings.html +3 -1
- package/ai/examples/settings.ts +2 -2
- package/ai/examples/shell.html +18 -0
- package/ai/examples/shell.ts +11 -0
- package/ai/examples/table-view.html +3 -1
- package/ai/examples/table-view.ts +2 -2
- package/ai/examples/tsconfig.json +2 -1
- package/ai/guides/component-discovery.md +2 -2
- package/ai/guides/layout.md +5 -3
- package/ai/guides/page-patterns.md +7 -3
- package/ai/manifest.json +2 -2
- package/ai/skill/goodui/SKILL.md +11 -3
- package/angular/projects/goodui/package.json +1 -1
- package/angular/projects/goodui/src/lib/actions.ts +47 -23
- package/angular/projects/goodui/src/lib/app-shell.ts +109 -0
- package/angular/projects/goodui/src/lib/{topbar.ts → header.ts} +98 -72
- package/angular/projects/goodui/src/lib/main-view.ts +22 -13
- package/angular/projects/goodui/src/lib/shell-context.ts +46 -0
- package/angular/projects/goodui/src/lib/sidebar.ts +58 -40
- package/angular/projects/goodui/src/lib/typography.ts +51 -41
- package/angular/projects/goodui/src/public-api.ts +2 -2
- package/angular/projects/goodui/src/styles.css +99 -65
- package/angular/projects/goodui/src/tokens.generated.css +43 -6
- package/design/app-shell-contract.json +118 -0
- package/design/component-map.json +171 -82
- package/design/header-search-variants.json +55 -0
- package/design/typography-components.json +327 -0
- package/design-tokens/penpot.tokens.json +160 -6
- package/design.md +51 -39
- package/fesm2022/cloudfrogger-goodui.mjs +541 -383
- package/fesm2022/cloudfrogger-goodui.mjs.map +1 -1
- package/guides/README.md +2 -1
- package/guides/components/action-bar.md +1 -1
- package/guides/components/app-header.md +27 -0
- package/guides/components/columns.md +3 -3
- package/guides/components/header-actions.md +34 -0
- package/guides/components/{avatar-menu.md → header-avatar.md} +5 -5
- package/guides/components/header-menu.md +64 -0
- package/guides/components/header-notification.md +13 -0
- package/guides/components/header-search.md +72 -0
- package/guides/components/{theme-toggle.md → header-themetoggle.md} +6 -6
- package/guides/components/icon.md +1 -1
- package/guides/components/main-view.md +30 -8
- package/guides/components/notifications.md +2 -2
- package/guides/components/settings.md +2 -2
- package/guides/components/sidebar.md +16 -34
- package/guides/components/submenus.md +4 -4
- package/guides/components/subnav.md +4 -3
- package/guides/components/typography.md +76 -19
- package/guides/contributing/design-to-code.md +62 -32
- package/guides/foundations/naming.md +1 -1
- package/guides/foundations/tokens.md +9 -9
- package/guides/intro.md +17 -19
- package/guides/layout/app-shell.md +37 -0
- package/guides/layout/layout-rules.md +3 -3
- package/guides/migrations/app-shell.md +28 -0
- package/guides/migrations/explicit-headings.md +20 -0
- package/guides/migrations/header-actions.md +17 -0
- package/guides/migrations/header-menu.md +16 -0
- package/homepage/src/app/examples/calendar-workspace/calendar-workspace-page.ts +2 -10
- package/homepage/src/app/examples/calendar-workspace/source-code.generated.ts +1 -1
- package/homepage/src/app/examples/case-studies/cloudhoster/billing-page.html +6 -4
- package/homepage/src/app/examples/case-studies/cloudhoster/billing-page.ts +2 -20
- package/homepage/src/app/examples/case-studies/cloudhoster/create-database-page.html +5 -5
- package/homepage/src/app/examples/case-studies/cloudhoster/create-database-page.ts +2 -20
- package/homepage/src/app/examples/case-studies/cloudhoster/database-detail-page.html +3 -1
- package/homepage/src/app/examples/case-studies/cloudhoster/database-detail-page.ts +2 -20
- package/homepage/src/app/examples/case-studies/cloudhoster/databases-page.html +7 -5
- package/homepage/src/app/examples/case-studies/cloudhoster/databases-page.ts +2 -14
- package/homepage/src/app/examples/case-studies/cloudhoster/home-page.html +4 -4
- package/homepage/src/app/examples/case-studies/cloudhoster/home-page.ts +2 -12
- package/homepage/src/app/examples/case-studies/cloudhoster/source-code.generated.ts +10 -10
- package/homepage/src/app/examples/case-studies/vpshoster/create-server-page.html +6 -6
- package/homepage/src/app/examples/case-studies/vpshoster/create-server-page.ts +2 -18
- package/homepage/src/app/examples/case-studies/vpshoster/overview-page.html +4 -4
- package/homepage/src/app/examples/case-studies/vpshoster/overview-page.ts +2 -8
- package/homepage/src/app/examples/case-studies/vpshoster/servers-page.html +4 -1
- package/homepage/src/app/examples/case-studies/vpshoster/servers-page.ts +2 -12
- package/homepage/src/app/examples/case-studies/vpshoster/source-code.generated.ts +4 -4
- package/homepage/src/app/examples/case-studies/webmailer/webmailer-page.html +4 -4
- package/homepage/src/app/examples/case-studies/webmailer/webmailer-page.ts +2 -8
- package/homepage/src/app/examples/error-pages/error-pages-example-page.html +3 -1
- package/homepage/src/app/examples/error-pages/error-pages-example-page.ts +2 -7
- package/homepage/src/app/examples/error-pages/source-code.generated.ts +2 -2
- package/homepage/src/app/examples/mail-compose/mail-compose-page.ts +2 -4
- package/homepage/src/app/examples/mail-workspace/mail-workspace-page.ts +2 -10
- package/homepage/src/app/examples/mail-workspace/source-code.generated.ts +1 -1
- package/homepage/src/app/examples/notifications/notifications-page.html +3 -1
- package/homepage/src/app/examples/notifications/notifications-page.ts +2 -8
- package/homepage/src/app/examples/notifications/source-code.generated.ts +2 -2
- package/homepage/src/app/examples/pdf-reader/pdf-reader-page.html +3 -1
- package/homepage/src/app/examples/pdf-reader/pdf-reader-page.ts +2 -7
- package/homepage/src/app/examples/pdf-reader/source-code.generated.ts +2 -2
- package/homepage/src/app/examples/user-registration/source-code.generated.ts +3 -3
- package/homepage/src/app/examples/user-registration/user-registration-example-page.html +1 -1
- package/homepage/src/app/examples/user-registration/user-registration-example-page.ts +2 -2
- package/homepage/src/app/examples/user-registration/user-registration-form.ts +2 -13
- package/homepage/src/app/examples/user-registration/user-registration-page.html +1 -1
- package/homepage/src/app/examples/user-registration/user-registration-page.ts +2 -7
- package/package.json +2 -2
- package/styles.css +1 -1
- package/types/cloudfrogger-goodui.d.ts +301 -207
- package/angular/projects/goodui/src/lib/app-layout.ts +0 -84
- package/guides/components/main-menu.md +0 -23
- package/guides/components/search.md +0 -51
- package/guides/components/topbar.md +0 -89
- package/guides/layout/app-layout.md +0 -81
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, signal, computed, Injectable, makeEnvironmentProviders, input, ChangeDetectionStrategy, Component,
|
|
2
|
+
import { InjectionToken, inject, signal, computed, Injectable, makeEnvironmentProviders, input, ChangeDetectionStrategy, Component, contentChildren, forwardRef, effect, output, viewChild, HostListener, ElementRef, model, DestroyRef, Directive, booleanAttribute, contentChild, PLATFORM_ID, TemplateRef, untracked, LOCALE_ID, afterNextRender } from '@angular/core';
|
|
3
3
|
import { DOCUMENT, Location, NgTemplateOutlet, isPlatformBrowser, DecimalPipe } from '@angular/common';
|
|
4
|
-
import {
|
|
4
|
+
import { Router, NavigationEnd, RouterLink } from '@angular/router';
|
|
5
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { filter, map } from 'rxjs';
|
|
5
7
|
import { LucideInfo, LucideX, LucideDynamicIcon, LucideEllipsis, LucideImage, LucideChevronDown, LucideChevronRight, LucideThumbsUp, LucideHeart, LucideStar, LucideSearch, LucideChevronLeft, LucideArrowDown, LucideArrowDownUp, LucideArrowUp, LucideGripVertical, LucideSearchX, LucideTable2, LucideChartLine, LucideChartColumn, LucideChartScatter, LucidePlus, LucideMinus, LucideScan, LucideType, LucidePaintBucket, LucidePalette, LucidePipette, LucideCheck, LucideUndo2, LucideRedo2, LucideBold, LucideItalic, LucideUnderline, LucideLink, LucideTable, LucideTableProperties, LucideListChecks, LucideHeading1, LucideArrowUpToLine, LucideArrowDownToLine, LucideArrowLeftToLine, LucideArrowRightToLine, LucideRows3, LucideColumns3, LucideTrash2, LucideGripHorizontal, LucideRemoveFormatting, LucidePanelRight, LucideList, LucideListOrdered, LucideTextAlignStart, LucideTextAlignCenter, LucideTextAlignEnd, LucideTextAlignJustify, LucideCalendarDays, LucideTruck, LucideShieldCheck, LucidePackageCheck, LucideMapPin, LucideHouse, LucideFileText, LucideClipboardList, LucideChevronUp, LucideZoomIn, LucideZoomOut, LucideRotateCw, LucideDownload, LucideServerCrash, LucideFileQuestionMark } from '@lucide/angular';
|
|
6
8
|
export * from '@lucide/angular';
|
|
7
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
|
-
import { filter } from 'rxjs';
|
|
9
9
|
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
10
10
|
import * as i1 from '@tanstack/angular-table';
|
|
11
11
|
import { tableFeatures, columnVisibilityFeature, columnOrderingFeature, createPaginatedRowModel, rowPaginationFeature, filterFn_includesString, createFilteredRowModel, globalFilteringFeature, columnFilteringFeature, sortFn_datetime, sortFn_text, sortFn_alphanumeric, createSortedRowModel, rowSortingFeature, injectTable, FlexRender } from '@tanstack/angular-table';
|
|
@@ -373,6 +373,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
373
373
|
}]
|
|
374
374
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }] } });
|
|
375
375
|
|
|
376
|
+
const GOOD_SHELL_DEFAULTS = {
|
|
377
|
+
brand: 'GOODUI', brandLogoSrc: '', brandLogoDarkSrc: '', brandMarkSrc: '', brandMarkDarkSrc: '',
|
|
378
|
+
showBrandIcon: false, showMobileBrand: true, user: null, notifications: [], searchItems: [],
|
|
379
|
+
settingsActions: [], showThemeToggle: true, showSettings: false, avatarActions: [],
|
|
380
|
+
};
|
|
381
|
+
class GoodShellContext {
|
|
382
|
+
options = signal(GOOD_SHELL_DEFAULTS, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
383
|
+
hasSidebar = signal(false, ...(ngDevMode ? [{ debugName: "hasSidebar" }] : /* istanbul ignore next */ []));
|
|
384
|
+
sidebarOpen = signal(false, ...(ngDevMode ? [{ debugName: "sidebarOpen" }] : /* istanbul ignore next */ []));
|
|
385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodShellContext, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
386
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodShellContext });
|
|
387
|
+
}
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodShellContext, decorators: [{
|
|
389
|
+
type: Injectable
|
|
390
|
+
}] });
|
|
391
|
+
class GoodNavigationState {
|
|
392
|
+
router = inject(Router, { optional: true });
|
|
393
|
+
activeRoute = this.router
|
|
394
|
+
? toSignal(this.router.events.pipe(filter((event) => event instanceof NavigationEnd), map(event => event.urlAfterRedirects.split(/[?#]/)[0] || '/')), { initialValue: this.router.url.split(/[?#]/)[0] || '/' })
|
|
395
|
+
: signal('/');
|
|
396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodNavigationState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
397
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodNavigationState, providedIn: 'root' });
|
|
398
|
+
}
|
|
399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodNavigationState, decorators: [{
|
|
400
|
+
type: Injectable,
|
|
401
|
+
args: [{ providedIn: 'root' }]
|
|
402
|
+
}] });
|
|
403
|
+
|
|
376
404
|
let nextPanelId = 0;
|
|
377
405
|
class GoodSidebarAccordion {
|
|
378
406
|
selected = signal({}, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
@@ -392,10 +420,12 @@ class GoodSidebarSubmenuItemComponent {
|
|
|
392
420
|
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
393
421
|
activeMatch = input('prefix', ...(ngDevMode ? [{ debugName: "activeMatch" }] : /* istanbul ignore next */ []));
|
|
394
422
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
423
|
+
navigation = inject(GoodNavigationState);
|
|
424
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
395
425
|
disabled = computed(() => this.item()?.disabled ?? false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
396
426
|
text = computed(() => this.item()?.label ?? this.label(), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
397
427
|
link = computed(() => this.item()?.route ?? this.route(), ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
|
|
398
|
-
isActive = computed(() => this.active() || goodRouteActive(this.link(), this.
|
|
428
|
+
isActive = computed(() => this.active() || goodRouteActive(this.link(), this.routeState(), this.item()?.activeMatch ?? this.activeMatch()), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
399
429
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSidebarSubmenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
400
430
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSidebarSubmenuItemComponent, isStandalone: true, selector: "good-sidebar-submenu-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, activeMatch: { classPropertyName: "activeMatch", publicName: "activeMatch", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-sidebar-submenu-item" }, ngImport: i0, template: `
|
|
401
431
|
@if (link() && !disabled()) {
|
|
@@ -437,11 +467,15 @@ class GoodSidebarSubmenuGroupComponent {
|
|
|
437
467
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
438
468
|
expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
439
469
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
470
|
+
navigation = inject(GoodNavigationState);
|
|
471
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
440
472
|
depth = input(1, ...(ngDevMode ? [{ debugName: "depth" }] : /* istanbul ignore next */ []));
|
|
441
473
|
localOpen = signal(null, ...(ngDevMode ? [{ debugName: "localOpen" }] : /* istanbul ignore next */ []));
|
|
474
|
+
projectedLinks = contentChildren(GoodSidebarSubmenuItemComponent, { ...(ngDevMode ? { debugName: "projectedLinks" } : /* istanbul ignore next */ {}), descendants: true });
|
|
475
|
+
projectedGroups = contentChildren(GoodSidebarSubmenuGroupComponent, { ...(ngDevMode ? { debugName: "projectedGroups" } : /* istanbul ignore next */ {}), descendants: true });
|
|
442
476
|
children = computed(() => this.item()?.children ?? [], ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
|
|
443
477
|
text = computed(() => this.item()?.label ?? this.label(), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
444
|
-
initiallyOpen = computed(() => this.expanded() || (!!this.item() && goodItemContainsRoute(this.item(), this.
|
|
478
|
+
initiallyOpen = computed(() => this.expanded() || this.projectedLinks().some(link => link.isActive()) || this.projectedGroups().some(group => group.initiallyOpen()) || (!!this.item() && goodItemContainsRoute(this.item(), this.routeState())), ...(ngDevMode ? [{ debugName: "initiallyOpen" }] : /* istanbul ignore next */ []));
|
|
445
479
|
isOpen = computed(() => this.accordion
|
|
446
480
|
? this.accordion.isOpen(this.depth(), this.panelId, this.initiallyOpen())
|
|
447
481
|
: (this.localOpen() ?? this.initiallyOpen()), ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
@@ -452,7 +486,7 @@ class GoodSidebarSubmenuGroupComponent {
|
|
|
452
486
|
this.localOpen.set(!this.isOpen());
|
|
453
487
|
}
|
|
454
488
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSidebarSubmenuGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
455
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSidebarSubmenuGroupComponent, isStandalone: true, selector: "good-sidebar-submenu-group", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-sidebar-submenu-group" }, ngImport: i0, template: `
|
|
489
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSidebarSubmenuGroupComponent, isStandalone: true, selector: "good-sidebar-submenu-group", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-sidebar-submenu-group" }, queries: [{ propertyName: "projectedLinks", predicate: GoodSidebarSubmenuItemComponent, descendants: true, isSignal: true }, { propertyName: "projectedGroups", predicate: GoodSidebarSubmenuGroupComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
456
490
|
<div class="good-submenu-group">
|
|
457
491
|
<button type="button" class="good-submenu-heading" [attr.aria-expanded]="isOpen()"
|
|
458
492
|
[attr.aria-controls]="panelId" (click)="toggle()">
|
|
@@ -461,9 +495,9 @@ class GoodSidebarSubmenuGroupComponent {
|
|
|
461
495
|
<div class="good-submenu-children" [id]="panelId" [hidden]="!isOpen()">
|
|
462
496
|
@for (child of children(); track child.id) {
|
|
463
497
|
@if (child.children?.length) {
|
|
464
|
-
<good-sidebar-submenu-group [item]="child" [activeRoute]="
|
|
498
|
+
<good-sidebar-submenu-group [item]="child" [activeRoute]="routeState()" [depth]="depth() + 1" />
|
|
465
499
|
} @else {
|
|
466
|
-
<good-sidebar-submenu-item [item]="child" [activeRoute]="
|
|
500
|
+
<good-sidebar-submenu-item [item]="child" [activeRoute]="routeState()" />
|
|
467
501
|
}
|
|
468
502
|
}
|
|
469
503
|
<ng-content />
|
|
@@ -487,9 +521,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
487
521
|
<div class="good-submenu-children" [id]="panelId" [hidden]="!isOpen()">
|
|
488
522
|
@for (child of children(); track child.id) {
|
|
489
523
|
@if (child.children?.length) {
|
|
490
|
-
<good-sidebar-submenu-group [item]="child" [activeRoute]="
|
|
524
|
+
<good-sidebar-submenu-group [item]="child" [activeRoute]="routeState()" [depth]="depth() + 1" />
|
|
491
525
|
} @else {
|
|
492
|
-
<good-sidebar-submenu-item [item]="child" [activeRoute]="
|
|
526
|
+
<good-sidebar-submenu-item [item]="child" [activeRoute]="routeState()" />
|
|
493
527
|
}
|
|
494
528
|
}
|
|
495
529
|
<ng-content />
|
|
@@ -498,7 +532,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
498
532
|
`,
|
|
499
533
|
host: { class: 'good-sidebar-submenu-group' },
|
|
500
534
|
}]
|
|
501
|
-
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: false }] }] } });
|
|
535
|
+
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: false }] }], projectedLinks: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GoodSidebarSubmenuItemComponent), { ...{ descendants: true }, isSignal: true }] }], projectedGroups: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GoodSidebarSubmenuGroupComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
502
536
|
class GoodSidebarItemComponent {
|
|
503
537
|
accordion = inject(GoodSidebarAccordion, { optional: true });
|
|
504
538
|
panelId = `good-sidebar-panel-${++nextPanelId}`;
|
|
@@ -511,29 +545,35 @@ class GoodSidebarItemComponent {
|
|
|
511
545
|
activeMatch = input('prefix', ...(ngDevMode ? [{ debugName: "activeMatch" }] : /* istanbul ignore next */ []));
|
|
512
546
|
expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
513
547
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
514
|
-
|
|
548
|
+
navigation = inject(GoodNavigationState);
|
|
549
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
550
|
+
parentItem = inject(GoodSidebarItemComponent, { optional: true, skipSelf: true });
|
|
551
|
+
depth = (this.parentItem?.depth ?? -1) + 1;
|
|
552
|
+
projectedItems = contentChildren(GoodSidebarItemComponent, { ...(ngDevMode ? { debugName: "projectedItems" } : /* istanbul ignore next */ {}), descendants: true });
|
|
553
|
+
projectedGroups = contentChildren(GoodSidebarSubmenuGroupComponent, { ...(ngDevMode ? { debugName: "projectedGroups" } : /* istanbul ignore next */ {}), descendants: true });
|
|
554
|
+
projectedLinks = contentChildren(GoodSidebarSubmenuItemComponent, { ...(ngDevMode ? { debugName: "projectedLinks" } : /* istanbul ignore next */ {}), descendants: true });
|
|
515
555
|
children = computed(() => this.item()?.children ?? [], ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
|
|
516
|
-
hasChildren = computed(() => this.children().length > 0 || this.projectedGroups().length > 0, ...(ngDevMode ? [{ debugName: "hasChildren" }] : /* istanbul ignore next */ []));
|
|
556
|
+
hasChildren = computed(() => this.children().length > 0 || this.projectedGroups().length > 0 || this.projectedItems().length > 0 || this.projectedLinks().length > 0, ...(ngDevMode ? [{ debugName: "hasChildren" }] : /* istanbul ignore next */ []));
|
|
517
557
|
text = computed(() => this.item()?.label ?? this.label(), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
518
558
|
iconName = computed(() => this.item()?.icon ?? this.icon(), ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
|
|
519
559
|
link = computed(() => this.item()?.route ?? this.route(), ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
|
|
520
560
|
badgeText = computed(() => this.item()?.badge ?? this.badge(), ...(ngDevMode ? [{ debugName: "badgeText" }] : /* istanbul ignore next */ []));
|
|
521
|
-
isActive = computed(() => this.active() || goodRouteActive(this.link(), this.
|
|
522
|
-
initiallyOpen = computed(() => this.expanded() || (!!this.item() && goodItemContainsRoute(this.item(), this.
|
|
561
|
+
isActive = computed(() => this.active() || goodRouteActive(this.link(), this.routeState(), this.item()?.activeMatch ?? this.activeMatch()) || this.projectedItems().some(item => item.isActive()) || this.projectedGroups().some(group => group.initiallyOpen()) || this.projectedLinks().some(link => link.isActive()), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
562
|
+
initiallyOpen = computed(() => this.expanded() || this.isActive() || (!!this.item() && goodItemContainsRoute(this.item(), this.routeState())), ...(ngDevMode ? [{ debugName: "initiallyOpen" }] : /* istanbul ignore next */ []));
|
|
523
563
|
localOpen = signal(null, ...(ngDevMode ? [{ debugName: "localOpen" }] : /* istanbul ignore next */ []));
|
|
524
564
|
isOpen = computed(() => this.accordion
|
|
525
|
-
? this.accordion.isOpen(
|
|
565
|
+
? this.accordion.isOpen(this.depth, this.panelId, this.initiallyOpen())
|
|
526
566
|
: (this.localOpen() ?? this.initiallyOpen()), ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
527
567
|
toggle() {
|
|
528
568
|
if (this.accordion)
|
|
529
|
-
this.accordion.toggle(
|
|
569
|
+
this.accordion.toggle(this.depth, this.panelId, this.isOpen());
|
|
530
570
|
else
|
|
531
571
|
this.localOpen.set(!this.isOpen());
|
|
532
572
|
}
|
|
533
573
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSidebarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
534
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSidebarItemComponent, isStandalone: true, selector: "good-sidebar-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, activeMatch: { classPropertyName: "activeMatch", publicName: "activeMatch", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-sidebar-item" }, queries: [{ propertyName: "projectedGroups", predicate: GoodSidebarSubmenuGroupComponent, isSignal: true }], ngImport: i0, template: `
|
|
574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSidebarItemComponent, isStandalone: true, selector: "good-sidebar-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, activeMatch: { classPropertyName: "activeMatch", publicName: "activeMatch", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-depth": "depth" }, classAttribute: "good-sidebar-item" }, queries: [{ propertyName: "projectedItems", predicate: GoodSidebarItemComponent, descendants: true, isSignal: true }, { propertyName: "projectedGroups", predicate: GoodSidebarSubmenuGroupComponent, descendants: true, isSignal: true }, { propertyName: "projectedLinks", predicate: GoodSidebarSubmenuItemComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
535
575
|
@if (hasChildren()) {
|
|
536
|
-
<button type="button" class="good-sidebar-row" [class.good-is-active]="isActive()" [class.good-is-disabled]="item()?.disabled ?? false" [disabled]="item()?.disabled ?? false"
|
|
576
|
+
<button type="button" [class]="depth > 0 ? 'good-submenu-link' : 'good-sidebar-row'" [class.good-is-active]="isActive()" [class.good-is-disabled]="item()?.disabled ?? false" [disabled]="item()?.disabled ?? false"
|
|
537
577
|
[attr.aria-expanded]="isOpen()" [attr.aria-controls]="panelId" (click)="toggle()">
|
|
538
578
|
@if (iconName()) { <good-icon [name]="iconName()!" /> }
|
|
539
579
|
<span class="good-menu-label">{{ text() }}</span>
|
|
@@ -543,16 +583,17 @@ class GoodSidebarItemComponent {
|
|
|
543
583
|
<div class="good-sidebar-children" [id]="panelId" [hidden]="!isOpen()">
|
|
544
584
|
@for (child of children(); track child.id) {
|
|
545
585
|
@if (child.children?.length) {
|
|
546
|
-
<good-sidebar-submenu-group [item]="child" [activeRoute]="
|
|
586
|
+
<good-sidebar-submenu-group [item]="child" [activeRoute]="routeState()" [depth]="1" />
|
|
547
587
|
} @else {
|
|
548
|
-
<good-sidebar-submenu-item [item]="child" [activeRoute]="
|
|
588
|
+
<good-sidebar-submenu-item [item]="child" [activeRoute]="routeState()" />
|
|
549
589
|
}
|
|
550
590
|
}
|
|
551
591
|
<ng-content />
|
|
552
592
|
</div>
|
|
553
593
|
} @else if (link() && !item()?.disabled) {
|
|
554
|
-
<a class="good-sidebar-row" [class.good-is-active]="isActive()" [routerLink]="link()"
|
|
594
|
+
<a [class]="depth > 0 ? 'good-submenu-link' : 'good-sidebar-row'" [class.good-is-active]="isActive()" [routerLink]="link()"
|
|
555
595
|
[attr.aria-current]="isActive() ? 'page' : null">
|
|
596
|
+
@if (depth > 0) { <span class="good-submenu-dot" aria-hidden="true"></span> }
|
|
556
597
|
@if (iconName()) { <good-icon [name]="iconName()!" /> }
|
|
557
598
|
<span class="good-menu-label">{{ text() }}</span>
|
|
558
599
|
@if (badgeText()) { <span class="good-menu-badge">{{ badgeText() }}</span> }
|
|
@@ -574,7 +615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
574
615
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
575
616
|
template: `
|
|
576
617
|
@if (hasChildren()) {
|
|
577
|
-
<button type="button" class="good-sidebar-row" [class.good-is-active]="isActive()" [class.good-is-disabled]="item()?.disabled ?? false" [disabled]="item()?.disabled ?? false"
|
|
618
|
+
<button type="button" [class]="depth > 0 ? 'good-submenu-link' : 'good-sidebar-row'" [class.good-is-active]="isActive()" [class.good-is-disabled]="item()?.disabled ?? false" [disabled]="item()?.disabled ?? false"
|
|
578
619
|
[attr.aria-expanded]="isOpen()" [attr.aria-controls]="panelId" (click)="toggle()">
|
|
579
620
|
@if (iconName()) { <good-icon [name]="iconName()!" /> }
|
|
580
621
|
<span class="good-menu-label">{{ text() }}</span>
|
|
@@ -584,16 +625,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
584
625
|
<div class="good-sidebar-children" [id]="panelId" [hidden]="!isOpen()">
|
|
585
626
|
@for (child of children(); track child.id) {
|
|
586
627
|
@if (child.children?.length) {
|
|
587
|
-
<good-sidebar-submenu-group [item]="child" [activeRoute]="
|
|
628
|
+
<good-sidebar-submenu-group [item]="child" [activeRoute]="routeState()" [depth]="1" />
|
|
588
629
|
} @else {
|
|
589
|
-
<good-sidebar-submenu-item [item]="child" [activeRoute]="
|
|
630
|
+
<good-sidebar-submenu-item [item]="child" [activeRoute]="routeState()" />
|
|
590
631
|
}
|
|
591
632
|
}
|
|
592
633
|
<ng-content />
|
|
593
634
|
</div>
|
|
594
635
|
} @else if (link() && !item()?.disabled) {
|
|
595
|
-
<a class="good-sidebar-row" [class.good-is-active]="isActive()" [routerLink]="link()"
|
|
636
|
+
<a [class]="depth > 0 ? 'good-submenu-link' : 'good-sidebar-row'" [class.good-is-active]="isActive()" [routerLink]="link()"
|
|
596
637
|
[attr.aria-current]="isActive() ? 'page' : null">
|
|
638
|
+
@if (depth > 0) { <span class="good-submenu-dot" aria-hidden="true"></span> }
|
|
597
639
|
@if (iconName()) { <good-icon [name]="iconName()!" /> }
|
|
598
640
|
<span class="good-menu-label">{{ text() }}</span>
|
|
599
641
|
@if (badgeText()) { <span class="good-menu-badge">{{ badgeText() }}</span> }
|
|
@@ -605,17 +647,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
605
647
|
</span>
|
|
606
648
|
}
|
|
607
649
|
`,
|
|
608
|
-
host: { class: 'good-sidebar-item' },
|
|
650
|
+
host: { class: 'good-sidebar-item', '[attr.data-depth]': 'depth' },
|
|
609
651
|
}]
|
|
610
|
-
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], activeMatch: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeMatch", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], projectedGroups: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GoodSidebarSubmenuGroupComponent), { isSignal: true }] }] } });
|
|
652
|
+
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], activeMatch: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeMatch", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], projectedItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GoodSidebarItemComponent), { ...{ descendants: true }, isSignal: true }] }], projectedGroups: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GoodSidebarSubmenuGroupComponent), { ...{ descendants: true }, isSignal: true }] }], projectedLinks: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GoodSidebarSubmenuItemComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
611
653
|
class GoodSidebarMenuContainerComponent {
|
|
612
654
|
accordion = inject(GoodSidebarAccordion);
|
|
613
655
|
heading = input('', ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
614
656
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
615
657
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
658
|
+
navigation = inject(GoodNavigationState);
|
|
659
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
616
660
|
constructor() {
|
|
617
661
|
effect(() => {
|
|
618
|
-
this.
|
|
662
|
+
this.routeState();
|
|
619
663
|
this.accordion.reset();
|
|
620
664
|
});
|
|
621
665
|
}
|
|
@@ -624,7 +668,7 @@ class GoodSidebarMenuContainerComponent {
|
|
|
624
668
|
@if (heading()) { <h2 class="good-sidebar-heading">{{ heading() }}</h2> }
|
|
625
669
|
<div class="good-sidebar-items">
|
|
626
670
|
@for (item of items(); track item.id) {
|
|
627
|
-
<good-sidebar-item [item]="item" [activeRoute]="
|
|
671
|
+
<good-sidebar-item [item]="item" [activeRoute]="routeState()" />
|
|
628
672
|
}
|
|
629
673
|
<ng-content />
|
|
630
674
|
</div>
|
|
@@ -642,7 +686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
642
686
|
@if (heading()) { <h2 class="good-sidebar-heading">{{ heading() }}</h2> }
|
|
643
687
|
<div class="good-sidebar-items">
|
|
644
688
|
@for (item of items(); track item.id) {
|
|
645
|
-
<good-sidebar-item [item]="item" [activeRoute]="
|
|
689
|
+
<good-sidebar-item [item]="item" [activeRoute]="routeState()" />
|
|
646
690
|
}
|
|
647
691
|
<ng-content />
|
|
648
692
|
</div>
|
|
@@ -650,56 +694,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
650
694
|
host: { class: 'good-sidebar-menu-container' },
|
|
651
695
|
}]
|
|
652
696
|
}], ctorParameters: () => [], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }] } });
|
|
653
|
-
class
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
697
|
+
class GoodSidebarComponent {
|
|
698
|
+
shell = inject(GoodShellContext, { optional: true });
|
|
699
|
+
navigation = inject(GoodNavigationState);
|
|
700
|
+
accordion = inject(GoodSidebarAccordion);
|
|
701
|
+
brand = input(...(ngDevMode ? [undefined, { debugName: "brand" }] : /* istanbul ignore next */ []));
|
|
702
|
+
brandLogoSrc = input(...(ngDevMode ? [undefined, { debugName: "brandLogoSrc" }] : /* istanbul ignore next */ []));
|
|
703
|
+
brandLogoDarkSrc = input(...(ngDevMode ? [undefined, { debugName: "brandLogoDarkSrc" }] : /* istanbul ignore next */ []));
|
|
704
|
+
label = input('Primary navigation', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
705
|
+
branding = computed(() => ({
|
|
706
|
+
brand: this.brand() ?? this.shell?.options().brand ?? GOOD_SHELL_DEFAULTS.brand,
|
|
707
|
+
brandLogoSrc: this.brandLogoSrc() ?? this.shell?.options().brandLogoSrc ?? '',
|
|
708
|
+
brandLogoDarkSrc: this.brandLogoDarkSrc() ?? this.shell?.options().brandLogoDarkSrc ?? '',
|
|
709
|
+
}), ...(ngDevMode ? [{ debugName: "branding" }] : /* istanbul ignore next */ []));
|
|
710
|
+
constructor() { effect(() => { this.navigation.activeRoute(); this.accordion.reset(); }); }
|
|
711
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
712
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSidebarComponent, isStandalone: true, selector: "good-sidebar", inputs: { brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, brandLogoSrc: { classPropertyName: "brandLogoSrc", publicName: "brandLogoSrc", isSignal: true, isRequired: false, transformFunction: null }, brandLogoDarkSrc: { classPropertyName: "brandLogoDarkSrc", publicName: "brandLogoDarkSrc", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-sidebar" }, providers: [GoodSidebarAccordion], ngImport: i0, template: `
|
|
713
|
+
<div class="good-sidebar-brand" [class.good-has-dark-logo]="!!branding().brandLogoDarkSrc">
|
|
714
|
+
@if (branding().brandLogoSrc) {
|
|
715
|
+
<img class="good-brand-logo good-brand-logo-light" [src]="branding().brandLogoSrc" [alt]="branding().brand" />
|
|
716
|
+
@if (branding().brandLogoDarkSrc) { <img class="good-brand-logo good-brand-logo-dark" [src]="branding().brandLogoDarkSrc" [alt]="branding().brand" /> }
|
|
665
717
|
} @else {
|
|
666
|
-
<span class="good-brand-mark" aria-hidden="true"></span><span class="good-brand-name">{{
|
|
718
|
+
<span class="good-brand-mark" aria-hidden="true"></span><span class="good-brand-name">{{ branding().brand }}</span>
|
|
667
719
|
}
|
|
668
720
|
</div>
|
|
669
|
-
<nav class="good-sidebar-scroll" aria-label="
|
|
670
|
-
|
|
671
|
-
<good-sidebar-menu-container [heading]="section.heading ?? ''" [items]="section.items" [activeRoute]="activeRoute()" />
|
|
672
|
-
}
|
|
673
|
-
<ng-content />
|
|
674
|
-
</nav>
|
|
675
|
-
`, isInline: true, dependencies: [{ kind: "component", type: GoodSidebarMenuContainerComponent, selector: "good-sidebar-menu-container", inputs: ["heading", "items", "activeRoute"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
721
|
+
<nav class="good-sidebar-scroll" [attr.aria-label]="label()"><ng-content /></nav>
|
|
722
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
676
723
|
}
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSidebarComponent, decorators: [{
|
|
678
725
|
type: Component,
|
|
679
726
|
args: [{
|
|
680
|
-
selector: 'good-sidebar
|
|
681
|
-
|
|
682
|
-
imports: [GoodSidebarMenuContainerComponent],
|
|
727
|
+
selector: 'good-sidebar', standalone: true,
|
|
728
|
+
providers: [GoodSidebarAccordion],
|
|
683
729
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
684
730
|
template: `
|
|
685
|
-
<div class="good-sidebar-brand" [class.good-has-dark-logo]="!!
|
|
686
|
-
@if (
|
|
687
|
-
<img class="good-brand-logo good-brand-logo-light" [src]="
|
|
688
|
-
@if (
|
|
731
|
+
<div class="good-sidebar-brand" [class.good-has-dark-logo]="!!branding().brandLogoDarkSrc">
|
|
732
|
+
@if (branding().brandLogoSrc) {
|
|
733
|
+
<img class="good-brand-logo good-brand-logo-light" [src]="branding().brandLogoSrc" [alt]="branding().brand" />
|
|
734
|
+
@if (branding().brandLogoDarkSrc) { <img class="good-brand-logo good-brand-logo-dark" [src]="branding().brandLogoDarkSrc" [alt]="branding().brand" /> }
|
|
689
735
|
} @else {
|
|
690
|
-
<span class="good-brand-mark" aria-hidden="true"></span><span class="good-brand-name">{{
|
|
736
|
+
<span class="good-brand-mark" aria-hidden="true"></span><span class="good-brand-name">{{ branding().brand }}</span>
|
|
691
737
|
}
|
|
692
738
|
</div>
|
|
693
|
-
<nav class="good-sidebar-scroll" aria-label="
|
|
694
|
-
@for (section of sections(); track section.id) {
|
|
695
|
-
<good-sidebar-menu-container [heading]="section.heading ?? ''" [items]="section.items" [activeRoute]="activeRoute()" />
|
|
696
|
-
}
|
|
697
|
-
<ng-content />
|
|
698
|
-
</nav>
|
|
739
|
+
<nav class="good-sidebar-scroll" [attr.aria-label]="label()"><ng-content /></nav>
|
|
699
740
|
`,
|
|
700
|
-
host: { class: 'good-sidebar
|
|
741
|
+
host: { class: 'good-sidebar' },
|
|
701
742
|
}]
|
|
702
|
-
}],
|
|
743
|
+
}], ctorParameters: () => [], propDecorators: { brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], brandLogoSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoSrc", required: false }] }], brandLogoDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoDarkSrc", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
703
744
|
|
|
704
745
|
class GoodAlertComponent {
|
|
705
746
|
tone = input('neutral', ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
|
|
@@ -1043,20 +1084,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1043
1084
|
}]
|
|
1044
1085
|
}], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], durationMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "durationMs", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showPercent: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPercent", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
1045
1086
|
|
|
1046
|
-
class
|
|
1087
|
+
class GoodHeaderSearchComponent {
|
|
1047
1088
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1089
|
+
hotkey = input(false, ...(ngDevMode ? [{ debugName: "hotkey" }] : /* istanbul ignore next */ []));
|
|
1090
|
+
document = inject(DOCUMENT);
|
|
1091
|
+
shortcutHint = /Mac|iPhone|iPad|iPod/i.test(this.document.defaultView?.navigator.platform ?? '') ? '⌘ K' : 'Ctrl K';
|
|
1092
|
+
trigger = viewChild.required('trigger');
|
|
1048
1093
|
query = signal('', ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
1049
1094
|
results = computed(() => this.items().filter(item => `${item.label} ${item.description ?? ''}`.toLocaleLowerCase().includes(this.query().toLocaleLowerCase())), ...(ngDevMode ? [{ debugName: "results" }] : /* istanbul ignore next */ []));
|
|
1050
1095
|
dialog = viewChild.required('dialog');
|
|
1051
1096
|
searchInput = viewChild.required('searchInput');
|
|
1097
|
+
onShortcut(event) {
|
|
1098
|
+
if (!this.hotkey() || event.defaultPrevented || event.repeat || event.isComposing ||
|
|
1099
|
+
event.altKey || event.shiftKey || event.ctrlKey === event.metaKey || event.key.toLowerCase() !== 'k')
|
|
1100
|
+
return;
|
|
1101
|
+
const trigger = this.trigger().nativeElement;
|
|
1102
|
+
const style = this.document.defaultView?.getComputedStyle(trigger);
|
|
1103
|
+
if (!trigger.getClientRects().length || style?.visibility === 'hidden' || style?.visibility === 'collapse' ||
|
|
1104
|
+
trigger.closest('[inert]') || this.document.querySelector('dialog[open], [aria-modal="true"]'))
|
|
1105
|
+
return;
|
|
1106
|
+
event.preventDefault();
|
|
1107
|
+
this.open();
|
|
1108
|
+
}
|
|
1052
1109
|
open() {
|
|
1053
|
-
this.dialog().nativeElement
|
|
1054
|
-
|
|
1110
|
+
const dialog = this.dialog().nativeElement;
|
|
1111
|
+
if (dialog.open)
|
|
1112
|
+
return;
|
|
1113
|
+
dialog.showModal();
|
|
1114
|
+
const searchInput = this.searchInput().nativeElement;
|
|
1115
|
+
queueMicrotask(() => { if (dialog.open)
|
|
1116
|
+
searchInput.focus(); });
|
|
1055
1117
|
}
|
|
1056
1118
|
close() { this.dialog().nativeElement.close(); }
|
|
1057
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1058
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1059
|
-
<button #trigger type="button" class="good-action-button"
|
|
1119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1120
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderSearchComponent, isStandalone: true, selector: "good-header-search", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, hotkey: { classPropertyName: "hotkey", publicName: "hotkey", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:keydown": "onShortcut($event)" }, classAttribute: "good-header-search" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1121
|
+
<button #trigger type="button" class="good-action-button" [class.good-header-search-hotkey]="hotkey()"
|
|
1122
|
+
aria-label="Search" [attr.aria-keyshortcuts]="hotkey() ? 'Control+k Meta+k' : null" (click)="open()">
|
|
1123
|
+
<good-icon name="search" />
|
|
1124
|
+
@if (hotkey()) { <span class="good-header-search-label">Search…</span><kbd class="good-header-search-shortcut" aria-hidden="true">{{ shortcutHint }}</kbd> }
|
|
1125
|
+
</button>
|
|
1060
1126
|
<dialog #dialog class="good-search-dialog" aria-label="Search" (keydown.escape)="close()" (close)="trigger.focus()">
|
|
1061
1127
|
<div class="good-dialog-heading"><strong>Search</strong><button type="button" class="good-action-button" aria-label="Close" (click)="close()"><good-icon name="close" /></button></div>
|
|
1062
1128
|
<label class="good-search-field"><good-icon name="search" /><input #searchInput type="search" placeholder="Search…" [value]="query()" (input)="query.set(searchInput.value)" /></label>
|
|
@@ -1068,15 +1134,19 @@ class GoodSearchComponent {
|
|
|
1068
1134
|
</dialog>
|
|
1069
1135
|
`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1070
1136
|
}
|
|
1071
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderSearchComponent, decorators: [{
|
|
1072
1138
|
type: Component,
|
|
1073
1139
|
args: [{
|
|
1074
|
-
selector: 'good-search',
|
|
1140
|
+
selector: 'good-header-search',
|
|
1075
1141
|
standalone: true,
|
|
1076
1142
|
imports: [GoodIconComponent, RouterLink],
|
|
1077
1143
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1078
1144
|
template: `
|
|
1079
|
-
<button #trigger type="button" class="good-action-button"
|
|
1145
|
+
<button #trigger type="button" class="good-action-button" [class.good-header-search-hotkey]="hotkey()"
|
|
1146
|
+
aria-label="Search" [attr.aria-keyshortcuts]="hotkey() ? 'Control+k Meta+k' : null" (click)="open()">
|
|
1147
|
+
<good-icon name="search" />
|
|
1148
|
+
@if (hotkey()) { <span class="good-header-search-label">Search…</span><kbd class="good-header-search-shortcut" aria-hidden="true">{{ shortcutHint }}</kbd> }
|
|
1149
|
+
</button>
|
|
1080
1150
|
<dialog #dialog class="good-search-dialog" aria-label="Search" (keydown.escape)="close()" (close)="trigger.focus()">
|
|
1081
1151
|
<div class="good-dialog-heading"><strong>Search</strong><button type="button" class="good-action-button" aria-label="Close" (click)="close()"><good-icon name="close" /></button></div>
|
|
1082
1152
|
<label class="good-search-field"><good-icon name="search" /><input #searchInput type="search" placeholder="Search…" [value]="query()" (input)="query.set(searchInput.value)" /></label>
|
|
@@ -1087,10 +1157,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1087
1157
|
</div>
|
|
1088
1158
|
</dialog>
|
|
1089
1159
|
`,
|
|
1090
|
-
host: { class: 'good-search' },
|
|
1160
|
+
host: { class: 'good-header-search' },
|
|
1091
1161
|
}]
|
|
1092
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }]
|
|
1093
|
-
|
|
1162
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], hotkey: [{ type: i0.Input, args: [{ isSignal: true, alias: "hotkey", required: false }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }], onShortcut: [{
|
|
1163
|
+
type: HostListener,
|
|
1164
|
+
args: ['document:keydown', ['$event']]
|
|
1165
|
+
}] } });
|
|
1166
|
+
class GoodHeaderNotificationComponent {
|
|
1094
1167
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1095
1168
|
center = inject(GoodNotificationCenter);
|
|
1096
1169
|
infoIcon = LucideInfo;
|
|
@@ -1121,8 +1194,8 @@ class GoodNotificationsComponent {
|
|
|
1121
1194
|
if (action.route)
|
|
1122
1195
|
this.close();
|
|
1123
1196
|
}
|
|
1124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1198
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderNotificationComponent, isStandalone: true, selector: "good-header-notification", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-header-notification" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1126
1199
|
<button #trigger type="button" class="good-action-button" [attr.aria-label]="unreadCount() ? 'Notifications, ' + unreadCount() + ' unread' : 'Notifications'" (click)="open()">
|
|
1127
1200
|
<good-icon name="bell" />@if (unreadCount()) {
|
|
1128
1201
|
<good-badge class="good-notification-count" color="destructive" size="small" [label]="displayCount()" aria-hidden="true" />
|
|
@@ -1172,10 +1245,10 @@ class GoodNotificationsComponent {
|
|
|
1172
1245
|
</dialog>
|
|
1173
1246
|
`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: GoodAlertComponent, selector: "good-alert", inputs: ["tone", "appearance", "size", "title", "message", "icon", "showIcon", "dismissible", "closeLabel"], outputs: ["closed"] }, { kind: "component", type: GoodBadgeComponent, selector: "good-badge", inputs: ["label", "color", "variant", "shape", "size", "icon", "iconSrc", "removable", "removeLabel"], outputs: ["removed"] }, { kind: "component", type: GoodButtonComponent, selector: "good-button", inputs: ["icon", "endIcon", "iconOnly", "variant", "size", "ariaLabel", "ariaPressed", "disabled", "type", "ariaExpanded", "ariaControls", "hasPopup"] }, { kind: "component", type: GoodLinkComponent, selector: "good-link", inputs: ["href", "route", "target", "rel", "appearance", "underline", "decoration", "disabled"] }, { kind: "component", type: GoodProgressComponent, selector: "good-progress", inputs: ["mode", "appearance", "size", "value", "durationMs", "loop", "title", "showPercent", "color", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1174
1247
|
}
|
|
1175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderNotificationComponent, decorators: [{
|
|
1176
1249
|
type: Component,
|
|
1177
1250
|
args: [{
|
|
1178
|
-
selector: 'good-
|
|
1251
|
+
selector: 'good-header-notification',
|
|
1179
1252
|
standalone: true,
|
|
1180
1253
|
imports: [GoodIconComponent, RouterLink, GoodAlertComponent, GoodBadgeComponent, GoodButtonComponent, GoodLinkComponent, GoodProgressComponent],
|
|
1181
1254
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1228,29 +1301,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1228
1301
|
</div>
|
|
1229
1302
|
</dialog>
|
|
1230
1303
|
`,
|
|
1231
|
-
host: { class: 'good-
|
|
1304
|
+
host: { class: 'good-header-notification' },
|
|
1232
1305
|
}]
|
|
1233
1306
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }] } });
|
|
1234
|
-
class
|
|
1307
|
+
class GoodHeaderThemeToggleComponent {
|
|
1235
1308
|
theme = inject(GoodThemeService);
|
|
1236
1309
|
icon = computed(() => ({ light: 'sun', system: 'monitor', dark: 'moon' }[this.theme.preference()]), ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1237
1310
|
label = computed(() => `Appearance: ${this.theme.preference()}. Switch to ${{ light: 'system', system: 'dark', dark: 'light' }[this.theme.preference()]} mode`, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1238
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1239
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type:
|
|
1311
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderThemeToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1312
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeaderThemeToggleComponent, isStandalone: true, selector: "good-header-themetoggle", host: { classAttribute: "good-header-themetoggle" }, ngImport: i0, template: `<button type="button" class="good-action-button" [attr.aria-label]="label()" [attr.title]="label()" (click)="theme.cycle()">
|
|
1240
1313
|
<good-icon [name]="icon()" />
|
|
1241
1314
|
</button>`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1242
1315
|
}
|
|
1243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderThemeToggleComponent, decorators: [{
|
|
1244
1317
|
type: Component,
|
|
1245
1318
|
args: [{
|
|
1246
|
-
selector: 'good-
|
|
1319
|
+
selector: 'good-header-themetoggle',
|
|
1247
1320
|
standalone: true,
|
|
1248
1321
|
imports: [GoodIconComponent],
|
|
1249
1322
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1250
1323
|
template: `<button type="button" class="good-action-button" [attr.aria-label]="label()" [attr.title]="label()" (click)="theme.cycle()">
|
|
1251
1324
|
<good-icon [name]="icon()" />
|
|
1252
1325
|
</button>`,
|
|
1253
|
-
host: { class: 'good-
|
|
1326
|
+
host: { class: 'good-header-themetoggle' },
|
|
1254
1327
|
}]
|
|
1255
1328
|
}] });
|
|
1256
1329
|
class GoodSettingsComponent {
|
|
@@ -1407,7 +1480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1407
1480
|
host: { class: 'good-avatar-menu-item' },
|
|
1408
1481
|
}]
|
|
1409
1482
|
}], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "path", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
1410
|
-
class
|
|
1483
|
+
class GoodHeaderAvatarComponent {
|
|
1411
1484
|
user = input(null, ...(ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []));
|
|
1412
1485
|
actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
1413
1486
|
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
@@ -1424,8 +1497,8 @@ class GoodAvatarMenuComponent {
|
|
|
1424
1497
|
if (!this.element.nativeElement.contains(event.target))
|
|
1425
1498
|
this.open.set(false);
|
|
1426
1499
|
}
|
|
1427
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1428
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1500
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1501
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderAvatarComponent, isStandalone: true, selector: "good-header-avatar", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, classAttribute: "good-header-avatar" }, ngImport: i0, template: `
|
|
1429
1502
|
<button type="button" class="good-avatar-button" aria-label="User menu" aria-haspopup="menu" [attr.aria-expanded]="open()" (click)="toggleMenu()">
|
|
1430
1503
|
@if (user()?.avatarUrl) { <img [src]="user()!.avatarUrl" alt="" /> } @else { <span>{{ initials() }}</span> }
|
|
1431
1504
|
</button>
|
|
@@ -1446,10 +1519,10 @@ class GoodAvatarMenuComponent {
|
|
|
1446
1519
|
</div> }
|
|
1447
1520
|
`, isInline: true, dependencies: [{ kind: "component", type: GoodAvatarMenuItemComponent, selector: "good-avatar-menu-item", inputs: ["action", "path"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1448
1521
|
}
|
|
1449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderAvatarComponent, decorators: [{
|
|
1450
1523
|
type: Component,
|
|
1451
1524
|
args: [{
|
|
1452
|
-
selector: 'good-avatar
|
|
1525
|
+
selector: 'good-header-avatar',
|
|
1453
1526
|
standalone: true,
|
|
1454
1527
|
imports: [GoodAvatarMenuItemComponent],
|
|
1455
1528
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1473,13 +1546,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1473
1546
|
}
|
|
1474
1547
|
</div> }
|
|
1475
1548
|
`,
|
|
1476
|
-
host: { class: 'good-avatar
|
|
1549
|
+
host: { class: 'good-header-avatar' },
|
|
1477
1550
|
}]
|
|
1478
1551
|
}], propDecorators: { user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], onDocumentClick: [{
|
|
1479
1552
|
type: HostListener,
|
|
1480
1553
|
args: ['document:click', ['$event']]
|
|
1481
1554
|
}] } });
|
|
1482
|
-
class
|
|
1555
|
+
class GoodHeaderActionsComponent {
|
|
1483
1556
|
user = input(null, ...(ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []));
|
|
1484
1557
|
notifications = input([], ...(ngDevMode ? [{ debugName: "notifications" }] : /* istanbul ignore next */ []));
|
|
1485
1558
|
searchItems = input([], ...(ngDevMode ? [{ debugName: "searchItems" }] : /* istanbul ignore next */ []));
|
|
@@ -1490,34 +1563,34 @@ class GoodMainMenuComponent {
|
|
|
1490
1563
|
showThemeToggle = input(true, ...(ngDevMode ? [{ debugName: "showThemeToggle" }] : /* istanbul ignore next */ []));
|
|
1491
1564
|
showSettings = input(false, ...(ngDevMode ? [{ debugName: "showSettings" }] : /* istanbul ignore next */ []));
|
|
1492
1565
|
showAvatar = input(true, ...(ngDevMode ? [{ debugName: "showAvatar" }] : /* istanbul ignore next */ []));
|
|
1493
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1494
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderActionsComponent, isStandalone: true, selector: "good-header-actions", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, notifications: { classPropertyName: "notifications", publicName: "notifications", isSignal: true, isRequired: false, transformFunction: null }, searchItems: { classPropertyName: "searchItems", publicName: "searchItems", isSignal: true, isRequired: false, transformFunction: null }, settingsActions: { classPropertyName: "settingsActions", publicName: "settingsActions", isSignal: true, isRequired: false, transformFunction: null }, avatarActions: { classPropertyName: "avatarActions", publicName: "avatarActions", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, showNotifications: { classPropertyName: "showNotifications", publicName: "showNotifications", isSignal: true, isRequired: false, transformFunction: null }, showThemeToggle: { classPropertyName: "showThemeToggle", publicName: "showThemeToggle", isSignal: true, isRequired: false, transformFunction: null }, showSettings: { classPropertyName: "showSettings", publicName: "showSettings", isSignal: true, isRequired: false, transformFunction: null }, showAvatar: { classPropertyName: "showAvatar", publicName: "showAvatar", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-header-actions" }, ngImport: i0, template: `
|
|
1495
1568
|
<ng-content>
|
|
1496
|
-
@if (showSearch()) { <good-search [items]="searchItems()" /> }
|
|
1497
|
-
@if (showNotifications()) { <good-
|
|
1498
|
-
@if (showThemeToggle()) { <good-
|
|
1569
|
+
@if (showSearch()) { <good-header-search [items]="searchItems()" /> }
|
|
1570
|
+
@if (showNotifications()) { <good-header-notification [items]="notifications()" /> }
|
|
1571
|
+
@if (showThemeToggle()) { <good-header-themetoggle /> }
|
|
1499
1572
|
@if (showSettings()) { <good-settings [actions]="settingsActions()" /> }
|
|
1500
|
-
@if (showAvatar()) { <good-avatar
|
|
1573
|
+
@if (showAvatar()) { <good-header-avatar [user]="user()" [actions]="avatarActions()" /> }
|
|
1501
1574
|
</ng-content>
|
|
1502
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
1575
|
+
`, isInline: true, dependencies: [{ kind: "component", type: GoodHeaderSearchComponent, selector: "good-header-search", inputs: ["items", "hotkey"] }, { kind: "component", type: GoodHeaderNotificationComponent, selector: "good-header-notification", inputs: ["items"] }, { kind: "component", type: GoodHeaderThemeToggleComponent, selector: "good-header-themetoggle" }, { kind: "component", type: GoodSettingsComponent, selector: "good-settings", inputs: ["actions"] }, { kind: "component", type: GoodHeaderAvatarComponent, selector: "good-header-avatar", inputs: ["user", "actions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1503
1576
|
}
|
|
1504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderActionsComponent, decorators: [{
|
|
1505
1578
|
type: Component,
|
|
1506
1579
|
args: [{
|
|
1507
|
-
selector: 'good-
|
|
1580
|
+
selector: 'good-header-actions',
|
|
1508
1581
|
standalone: true,
|
|
1509
|
-
imports: [
|
|
1582
|
+
imports: [GoodHeaderSearchComponent, GoodHeaderNotificationComponent, GoodHeaderThemeToggleComponent, GoodSettingsComponent, GoodHeaderAvatarComponent],
|
|
1510
1583
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1511
1584
|
template: `
|
|
1512
1585
|
<ng-content>
|
|
1513
|
-
@if (showSearch()) { <good-search [items]="searchItems()" /> }
|
|
1514
|
-
@if (showNotifications()) { <good-
|
|
1515
|
-
@if (showThemeToggle()) { <good-
|
|
1586
|
+
@if (showSearch()) { <good-header-search [items]="searchItems()" /> }
|
|
1587
|
+
@if (showNotifications()) { <good-header-notification [items]="notifications()" /> }
|
|
1588
|
+
@if (showThemeToggle()) { <good-header-themetoggle /> }
|
|
1516
1589
|
@if (showSettings()) { <good-settings [actions]="settingsActions()" /> }
|
|
1517
|
-
@if (showAvatar()) { <good-avatar
|
|
1590
|
+
@if (showAvatar()) { <good-header-avatar [user]="user()" [actions]="avatarActions()" /> }
|
|
1518
1591
|
</ng-content>
|
|
1519
1592
|
`,
|
|
1520
|
-
host: { class: 'good-
|
|
1593
|
+
host: { class: 'good-header-actions' },
|
|
1521
1594
|
}]
|
|
1522
1595
|
}], propDecorators: { user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], notifications: [{ type: i0.Input, args: [{ isSignal: true, alias: "notifications", required: false }] }], searchItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchItems", required: false }] }], settingsActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "settingsActions", required: false }] }], avatarActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarActions", required: false }] }], showSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSearch", required: false }] }], showNotifications: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNotifications", required: false }] }], showThemeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showThemeToggle", required: false }] }], showSettings: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSettings", required: false }] }], showAvatar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAvatar", required: false }] }] } });
|
|
1523
1596
|
|
|
@@ -1555,18 +1628,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1555
1628
|
host: { class: 'good-brand-icon' },
|
|
1556
1629
|
}]
|
|
1557
1630
|
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], darkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "darkSrc", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
1558
|
-
class
|
|
1631
|
+
class GoodHeaderDropdownItemComponent {
|
|
1559
1632
|
item = input.required(...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
1560
1633
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
1634
|
+
navigation = inject(GoodNavigationState);
|
|
1635
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
1561
1636
|
expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
1562
1637
|
panelId = input(null, ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
1563
1638
|
hover = output();
|
|
1564
1639
|
focused = output();
|
|
1565
1640
|
toggle = output();
|
|
1566
1641
|
navigate = output();
|
|
1567
|
-
isActive = computed(() => goodTopbarItemContainsRoute(this.item(), this.
|
|
1568
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1569
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1642
|
+
isActive = computed(() => goodTopbarItemContainsRoute(this.item(), this.routeState()), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
1643
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderDropdownItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1644
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderDropdownItemComponent, isStandalone: true, selector: "good-header-dropdown-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hover: "hover", focused: "focused", toggle: "toggle", navigate: "navigate" }, host: { classAttribute: "good-header-dropdown-item" }, ngImport: i0, template: `
|
|
1570
1645
|
@if (item().children?.length) {
|
|
1571
1646
|
<button type="button" class="good-dropdown-link" [class.good-is-open]="expanded()" [class.good-is-active]="isActive()"
|
|
1572
1647
|
aria-haspopup="true" [attr.aria-expanded]="expanded()" [attr.aria-controls]="panelId()"
|
|
@@ -1588,10 +1663,10 @@ class GoodTopbarDropdownItemComponent {
|
|
|
1588
1663
|
}
|
|
1589
1664
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1590
1665
|
}
|
|
1591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderDropdownItemComponent, decorators: [{
|
|
1592
1667
|
type: Component,
|
|
1593
1668
|
args: [{
|
|
1594
|
-
selector: 'good-
|
|
1669
|
+
selector: 'good-header-dropdown-item',
|
|
1595
1670
|
standalone: true,
|
|
1596
1671
|
imports: [RouterLink, GoodIconComponent],
|
|
1597
1672
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1616,16 +1691,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1616
1691
|
</span>
|
|
1617
1692
|
}
|
|
1618
1693
|
`,
|
|
1619
|
-
host: { class: 'good-
|
|
1694
|
+
host: { class: 'good-header-dropdown-item' },
|
|
1620
1695
|
}]
|
|
1621
1696
|
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], hover: [{ type: i0.Output, args: ["hover"] }], focused: [{ type: i0.Output, args: ["focused"] }], toggle: [{ type: i0.Output, args: ["toggle"] }], navigate: [{ type: i0.Output, args: ["navigate"] }] } });
|
|
1622
|
-
class
|
|
1697
|
+
class GoodHeaderDropdownMenuComponent {
|
|
1623
1698
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1624
1699
|
label = input('Menu', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1625
1700
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
1701
|
+
navigation = inject(GoodNavigationState);
|
|
1702
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
1626
1703
|
navigate = output();
|
|
1627
1704
|
openChildId = signal(null, ...(ngDevMode ? [{ debugName: "openChildId" }] : /* istanbul ignore next */ []));
|
|
1628
|
-
submenu = viewChild(
|
|
1705
|
+
submenu = viewChild(GoodHeaderSubmenuComponent, ...(ngDevMode ? [{ debugName: "submenu" }] : /* istanbul ignore next */ []));
|
|
1629
1706
|
uid = `good-dropdown-${++nextDropdownId$1}`;
|
|
1630
1707
|
element = inject(ElementRef);
|
|
1631
1708
|
openedByClick = false;
|
|
@@ -1665,7 +1742,7 @@ class GoodTopbarDropdownMenuComponent {
|
|
|
1665
1742
|
return true;
|
|
1666
1743
|
if (!this.openChildId())
|
|
1667
1744
|
return false;
|
|
1668
|
-
const trigger = this.element.nativeElement.querySelector(':scope > .good-dropdown-panel > .good-dropdown-entry > good-
|
|
1745
|
+
const trigger = this.element.nativeElement.querySelector(':scope > .good-dropdown-panel > .good-dropdown-entry > good-header-dropdown-item > button[aria-expanded="true"]');
|
|
1669
1746
|
this.openChildId.set(null);
|
|
1670
1747
|
this.openedByClick = false;
|
|
1671
1748
|
this.suppressFocusOpen = true;
|
|
@@ -1679,58 +1756,60 @@ class GoodTopbarDropdownMenuComponent {
|
|
|
1679
1756
|
event.preventDefault();
|
|
1680
1757
|
event.stopPropagation();
|
|
1681
1758
|
}
|
|
1682
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1683
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1759
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderDropdownMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1760
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderDropdownMenuComponent, isStandalone: true, selector: "good-header-dropdown-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navigate: "navigate" }, host: { listeners: { "keydown.escape": "onEscape($event)" }, classAttribute: "good-header-dropdown-menu" }, viewQueries: [{ propertyName: "submenu", first: true, predicate: GoodHeaderSubmenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1684
1761
|
<div class="good-dropdown-panel" role="group" [attr.aria-label]="label()">
|
|
1685
1762
|
@for (item of items(); track item.id) {
|
|
1686
1763
|
<div class="good-dropdown-entry" [class.good-dropdown-separated]="item.separatorBefore">
|
|
1687
|
-
<good-
|
|
1764
|
+
<good-header-dropdown-item [item]="item" [activeRoute]="routeState()"
|
|
1688
1765
|
[expanded]="openChildId() === item.id" [panelId]="item.children?.length ? panelId(item) : null"
|
|
1689
1766
|
(hover)="onHover(item)" (focused)="onFocus(item)" (toggle)="onToggle(item)" (navigate)="onNavigate()" />
|
|
1690
1767
|
@if (item.children?.length && openChildId() === item.id) {
|
|
1691
|
-
<good-
|
|
1768
|
+
<good-header-submenu [id]="panelId(item)" [items]="item.children!" [activeRoute]="routeState()"
|
|
1692
1769
|
[label]="item.label" (navigate)="onNavigate()" />
|
|
1693
1770
|
}
|
|
1694
1771
|
</div>
|
|
1695
1772
|
}
|
|
1696
1773
|
</div>
|
|
1697
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() =>
|
|
1774
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => GoodHeaderDropdownItemComponent), selector: "good-header-dropdown-item", inputs: ["item", "activeRoute", "expanded", "panelId"], outputs: ["hover", "focused", "toggle", "navigate"] }, { kind: "component", type: i0.forwardRef(() => GoodHeaderSubmenuComponent), selector: "good-header-submenu", inputs: ["items", "label", "activeRoute"], outputs: ["navigate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1698
1775
|
}
|
|
1699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderDropdownMenuComponent, decorators: [{
|
|
1700
1777
|
type: Component,
|
|
1701
1778
|
args: [{
|
|
1702
|
-
selector: 'good-
|
|
1779
|
+
selector: 'good-header-dropdown-menu',
|
|
1703
1780
|
standalone: true,
|
|
1704
|
-
imports: [
|
|
1781
|
+
imports: [GoodHeaderDropdownItemComponent, forwardRef(() => GoodHeaderSubmenuComponent)],
|
|
1705
1782
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1706
1783
|
template: `
|
|
1707
1784
|
<div class="good-dropdown-panel" role="group" [attr.aria-label]="label()">
|
|
1708
1785
|
@for (item of items(); track item.id) {
|
|
1709
1786
|
<div class="good-dropdown-entry" [class.good-dropdown-separated]="item.separatorBefore">
|
|
1710
|
-
<good-
|
|
1787
|
+
<good-header-dropdown-item [item]="item" [activeRoute]="routeState()"
|
|
1711
1788
|
[expanded]="openChildId() === item.id" [panelId]="item.children?.length ? panelId(item) : null"
|
|
1712
1789
|
(hover)="onHover(item)" (focused)="onFocus(item)" (toggle)="onToggle(item)" (navigate)="onNavigate()" />
|
|
1713
1790
|
@if (item.children?.length && openChildId() === item.id) {
|
|
1714
|
-
<good-
|
|
1791
|
+
<good-header-submenu [id]="panelId(item)" [items]="item.children!" [activeRoute]="routeState()"
|
|
1715
1792
|
[label]="item.label" (navigate)="onNavigate()" />
|
|
1716
1793
|
}
|
|
1717
1794
|
</div>
|
|
1718
1795
|
}
|
|
1719
1796
|
</div>
|
|
1720
1797
|
`,
|
|
1721
|
-
host: { class: 'good-
|
|
1798
|
+
host: { class: 'good-header-dropdown-menu' },
|
|
1722
1799
|
}]
|
|
1723
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }], submenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() =>
|
|
1800
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }], submenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => GoodHeaderSubmenuComponent), { isSignal: true }] }], onEscape: [{
|
|
1724
1801
|
type: HostListener,
|
|
1725
1802
|
args: ['keydown.escape', ['$event']]
|
|
1726
1803
|
}] } });
|
|
1727
|
-
class
|
|
1804
|
+
class GoodHeaderSubmenuComponent {
|
|
1728
1805
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1729
1806
|
label = input('Submenu', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1730
1807
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
1808
|
+
navigation = inject(GoodNavigationState);
|
|
1809
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
1731
1810
|
navigate = output();
|
|
1732
1811
|
flipped = signal(false, ...(ngDevMode ? [{ debugName: "flipped" }] : /* istanbul ignore next */ []));
|
|
1733
|
-
menu = viewChild(
|
|
1812
|
+
menu = viewChild(GoodHeaderDropdownMenuComponent, ...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
|
|
1734
1813
|
element = inject(ElementRef);
|
|
1735
1814
|
constructor() { setTimeout(() => this.updatePlacement()); }
|
|
1736
1815
|
updatePlacement() {
|
|
@@ -1745,35 +1824,37 @@ class GoodTopbarSubmenuComponent {
|
|
|
1745
1824
|
this.flipped.set(true);
|
|
1746
1825
|
});
|
|
1747
1826
|
}
|
|
1748
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1749
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type:
|
|
1827
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderSubmenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1828
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: GoodHeaderSubmenuComponent, isStandalone: true, selector: "good-header-submenu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navigate: "navigate" }, host: { listeners: { "window:resize": "updatePlacement()" }, properties: { "class.good-submenu-flipped": "flipped()" }, classAttribute: "good-header-submenu" }, viewQueries: [{ propertyName: "menu", first: true, predicate: GoodHeaderDropdownMenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: `<good-header-dropdown-menu [items]="items()" [label]="label()" [activeRoute]="routeState()" (navigate)="navigate.emit()" />`, isInline: true, dependencies: [{ kind: "component", type: GoodHeaderDropdownMenuComponent, selector: "good-header-dropdown-menu", inputs: ["items", "label", "activeRoute"], outputs: ["navigate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1750
1829
|
}
|
|
1751
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderSubmenuComponent, decorators: [{
|
|
1752
1831
|
type: Component,
|
|
1753
1832
|
args: [{
|
|
1754
|
-
selector: 'good-
|
|
1833
|
+
selector: 'good-header-submenu',
|
|
1755
1834
|
standalone: true,
|
|
1756
|
-
imports: [
|
|
1835
|
+
imports: [GoodHeaderDropdownMenuComponent],
|
|
1757
1836
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1758
|
-
template: `<good-
|
|
1759
|
-
host: { class: 'good-
|
|
1837
|
+
template: `<good-header-dropdown-menu [items]="items()" [label]="label()" [activeRoute]="routeState()" (navigate)="navigate.emit()" />`,
|
|
1838
|
+
host: { class: 'good-header-submenu', '[class.good-submenu-flipped]': 'flipped()' },
|
|
1760
1839
|
}]
|
|
1761
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }], menu: [{ type: i0.ViewChild, args: [i0.forwardRef(() =>
|
|
1840
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }], menu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => GoodHeaderDropdownMenuComponent), { isSignal: true }] }], updatePlacement: [{
|
|
1762
1841
|
type: HostListener,
|
|
1763
1842
|
args: ['window:resize']
|
|
1764
1843
|
}] } });
|
|
1765
|
-
class
|
|
1844
|
+
class GoodHeaderMenuItemComponent {
|
|
1766
1845
|
item = input(null, ...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
1767
1846
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1768
1847
|
route = input(...(ngDevMode ? [undefined, { debugName: "route" }] : /* istanbul ignore next */ []));
|
|
1769
1848
|
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
1770
1849
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
1850
|
+
navigation = inject(GoodNavigationState);
|
|
1851
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
1771
1852
|
text = computed(() => this.item()?.label ?? this.label(), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
1772
1853
|
link = computed(() => this.item()?.route ?? this.route(), ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
|
|
1773
1854
|
children = computed(() => this.item()?.children ?? [], ...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
|
|
1774
|
-
isActive = computed(() => this.active() || goodRouteActive(this.link(), this.
|
|
1855
|
+
isActive = computed(() => this.active() || goodRouteActive(this.link(), this.routeState()) || (this.item() ? goodTopbarItemContainsRoute(this.item(), this.routeState()) : false), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
1775
1856
|
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
1776
|
-
dropdown = viewChild(
|
|
1857
|
+
dropdown = viewChild(GoodHeaderDropdownMenuComponent, ...(ngDevMode ? [{ debugName: "dropdown" }] : /* istanbul ignore next */ []));
|
|
1777
1858
|
panelId = `good-topbar-panel-${++nextDropdownId$1}`;
|
|
1778
1859
|
element = inject(ElementRef);
|
|
1779
1860
|
openedByClick = false;
|
|
@@ -1851,8 +1932,8 @@ class GoodTopbarMenuItemComponent {
|
|
|
1851
1932
|
}
|
|
1852
1933
|
ngOnDestroy() { if (this.closeTimer)
|
|
1853
1934
|
clearTimeout(this.closeTimer); }
|
|
1854
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1855
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
1935
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1936
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderMenuItemComponent, isStandalone: true, selector: "good-header-menu-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerenter": "onPointerEnter()", "pointerleave": "onPointerLeave()", "keydown.escape": "onEscape($event)", "focusout": "onFocusOut($event)", "document:pointerdown": "onDocumentPointerDown($event)", "document:keydown.escape": "onDocumentEscape()" }, classAttribute: "good-header-menu-item" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: GoodHeaderDropdownMenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1856
1937
|
@if (children().length) {
|
|
1857
1938
|
<button #trigger type="button" class="good-topbar-link" [class.good-is-active]="isActive() || open()"
|
|
1858
1939
|
aria-haspopup="true" [attr.aria-expanded]="open()" [attr.aria-controls]="panelId"
|
|
@@ -1860,20 +1941,20 @@ class GoodTopbarMenuItemComponent {
|
|
|
1860
1941
|
{{ text() }}<good-icon name="chevron-down" />
|
|
1861
1942
|
</button>
|
|
1862
1943
|
@if (open()) {
|
|
1863
|
-
<good-
|
|
1944
|
+
<good-header-dropdown-menu [id]="panelId" [items]="children()" [label]="text()" [activeRoute]="routeState()" (navigate)="closeMenu()" />
|
|
1864
1945
|
}
|
|
1865
1946
|
} @else if (link()) {
|
|
1866
1947
|
<a class="good-topbar-link" [class.good-is-active]="isActive()" [routerLink]="link()"
|
|
1867
1948
|
[attr.aria-current]="isActive() ? 'page' : null">{{ text() }}</a>
|
|
1868
1949
|
} @else { <span class="good-topbar-link">{{ text() }}</span> }
|
|
1869
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "component", type:
|
|
1950
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "component", type: GoodHeaderDropdownMenuComponent, selector: "good-header-dropdown-menu", inputs: ["items", "label", "activeRoute"], outputs: ["navigate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1870
1951
|
}
|
|
1871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderMenuItemComponent, decorators: [{
|
|
1872
1953
|
type: Component,
|
|
1873
1954
|
args: [{
|
|
1874
|
-
selector: 'good-
|
|
1955
|
+
selector: 'good-header-menu-item',
|
|
1875
1956
|
standalone: true,
|
|
1876
|
-
imports: [RouterLink, GoodIconComponent,
|
|
1957
|
+
imports: [RouterLink, GoodIconComponent, GoodHeaderDropdownMenuComponent],
|
|
1877
1958
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1878
1959
|
template: `
|
|
1879
1960
|
@if (children().length) {
|
|
@@ -1883,16 +1964,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1883
1964
|
{{ text() }}<good-icon name="chevron-down" />
|
|
1884
1965
|
</button>
|
|
1885
1966
|
@if (open()) {
|
|
1886
|
-
<good-
|
|
1967
|
+
<good-header-dropdown-menu [id]="panelId" [items]="children()" [label]="text()" [activeRoute]="routeState()" (navigate)="closeMenu()" />
|
|
1887
1968
|
}
|
|
1888
1969
|
} @else if (link()) {
|
|
1889
1970
|
<a class="good-topbar-link" [class.good-is-active]="isActive()" [routerLink]="link()"
|
|
1890
1971
|
[attr.aria-current]="isActive() ? 'page' : null">{{ text() }}</a>
|
|
1891
1972
|
} @else { <span class="good-topbar-link">{{ text() }}</span> }
|
|
1892
1973
|
`,
|
|
1893
|
-
host: { class: 'good-
|
|
1974
|
+
host: { class: 'good-header-menu-item' },
|
|
1894
1975
|
}]
|
|
1895
|
-
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], dropdown: [{ type: i0.ViewChild, args: [i0.forwardRef(() =>
|
|
1976
|
+
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], dropdown: [{ type: i0.ViewChild, args: [i0.forwardRef(() => GoodHeaderDropdownMenuComponent), { isSignal: true }] }], onPointerEnter: [{
|
|
1896
1977
|
type: HostListener,
|
|
1897
1978
|
args: ['pointerenter']
|
|
1898
1979
|
}], onPointerLeave: [{
|
|
@@ -1911,9 +1992,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1911
1992
|
type: HostListener,
|
|
1912
1993
|
args: ['document:keydown.escape']
|
|
1913
1994
|
}] } });
|
|
1914
|
-
class
|
|
1995
|
+
class GoodHeaderMenuComponent {
|
|
1915
1996
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1916
1997
|
activeRoute = input('', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
1998
|
+
navigation = inject(GoodNavigationState);
|
|
1999
|
+
routeState = computed(() => this.activeRoute() || this.navigation.activeRoute(), ...(ngDevMode ? [{ debugName: "routeState" }] : /* istanbul ignore next */ []));
|
|
1917
2000
|
mobileMode = input('hidden', ...(ngDevMode ? [{ debugName: "mobileMode" }] : /* istanbul ignore next */ []));
|
|
1918
2001
|
mobileOpen = signal(false, ...(ngDevMode ? [{ debugName: "mobileOpen" }] : /* istanbul ignore next */ []));
|
|
1919
2002
|
mobilePanelId = `good-topbar-mobile-panel-${++nextDropdownId$1}`;
|
|
@@ -1946,38 +2029,38 @@ class GoodTopbarMenuContainerComponent {
|
|
|
1946
2029
|
if (width && width > 900)
|
|
1947
2030
|
this.closeMobileMenu();
|
|
1948
2031
|
}
|
|
1949
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
1950
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type:
|
|
2032
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2033
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodHeaderMenuComponent, isStandalone: true, selector: "good-header-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, activeRoute: { classPropertyName: "activeRoute", publicName: "activeRoute", isSignal: true, isRequired: false, transformFunction: null }, mobileMode: { classPropertyName: "mobileMode", publicName: "mobileMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "document:pointerdown": "onOutsidePointer($event)", "keydown.escape": "onEscape($event)", "window:resize": "onResize()" }, properties: { "attr.data-mobile-mode": "mobileMode()" }, classAttribute: "good-header-menu" }, ngImport: i0, template: `
|
|
1951
2034
|
<button #mobileTrigger type="button" class="good-topbar-mobile-trigger good-action-button"
|
|
1952
|
-
[attr.aria-label]="mobileOpen() ? 'Close
|
|
2035
|
+
[attr.aria-label]="mobileOpen() ? 'Close header menu' : 'Open header menu'"
|
|
1953
2036
|
aria-haspopup="true" [attr.aria-expanded]="mobileOpen()" [attr.aria-controls]="mobilePanelId"
|
|
1954
2037
|
(click)="toggleMobileMenu()"><good-icon name="grid" /></button>
|
|
1955
|
-
<div class="good-
|
|
1956
|
-
[attr.role]="mobileMode() === 'popup' ? 'navigation' : null" [attr.aria-label]="mobileMode() === 'popup' ? '
|
|
1957
|
-
@for (item of items(); track item.id) { <good-
|
|
2038
|
+
<div class="good-header-menu-items" [id]="mobilePanelId" [class.good-header-menu-popup-open]="mobileOpen()"
|
|
2039
|
+
[attr.role]="mobileMode() === 'popup' ? 'navigation' : null" [attr.aria-label]="mobileMode() === 'popup' ? 'Header menu' : null">
|
|
2040
|
+
@for (item of items(); track item.id) { <good-header-menu-item [item]="item" [activeRoute]="routeState()" /> }
|
|
1958
2041
|
<ng-content />
|
|
1959
2042
|
</div>
|
|
1960
|
-
`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "component", type:
|
|
2043
|
+
`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "component", type: GoodHeaderMenuItemComponent, selector: "good-header-menu-item", inputs: ["item", "label", "route", "active", "activeRoute"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1961
2044
|
}
|
|
1962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
2045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeaderMenuComponent, decorators: [{
|
|
1963
2046
|
type: Component,
|
|
1964
2047
|
args: [{
|
|
1965
|
-
selector: 'good-
|
|
2048
|
+
selector: 'good-header-menu',
|
|
1966
2049
|
standalone: true,
|
|
1967
|
-
imports: [GoodIconComponent,
|
|
2050
|
+
imports: [GoodIconComponent, GoodHeaderMenuItemComponent],
|
|
1968
2051
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1969
2052
|
template: `
|
|
1970
2053
|
<button #mobileTrigger type="button" class="good-topbar-mobile-trigger good-action-button"
|
|
1971
|
-
[attr.aria-label]="mobileOpen() ? 'Close
|
|
2054
|
+
[attr.aria-label]="mobileOpen() ? 'Close header menu' : 'Open header menu'"
|
|
1972
2055
|
aria-haspopup="true" [attr.aria-expanded]="mobileOpen()" [attr.aria-controls]="mobilePanelId"
|
|
1973
2056
|
(click)="toggleMobileMenu()"><good-icon name="grid" /></button>
|
|
1974
|
-
<div class="good-
|
|
1975
|
-
[attr.role]="mobileMode() === 'popup' ? 'navigation' : null" [attr.aria-label]="mobileMode() === 'popup' ? '
|
|
1976
|
-
@for (item of items(); track item.id) { <good-
|
|
2057
|
+
<div class="good-header-menu-items" [id]="mobilePanelId" [class.good-header-menu-popup-open]="mobileOpen()"
|
|
2058
|
+
[attr.role]="mobileMode() === 'popup' ? 'navigation' : null" [attr.aria-label]="mobileMode() === 'popup' ? 'Header menu' : null">
|
|
2059
|
+
@for (item of items(); track item.id) { <good-header-menu-item [item]="item" [activeRoute]="routeState()" /> }
|
|
1977
2060
|
<ng-content />
|
|
1978
2061
|
</div>
|
|
1979
2062
|
`,
|
|
1980
|
-
host: { class: 'good-
|
|
2063
|
+
host: { class: 'good-header-menu', '[attr.data-mobile-mode]': 'mobileMode()' },
|
|
1981
2064
|
}]
|
|
1982
2065
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], activeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoute", required: false }] }], mobileMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileMode", required: false }] }], onClick: [{
|
|
1983
2066
|
type: HostListener,
|
|
@@ -1992,85 +2075,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
1992
2075
|
type: HostListener,
|
|
1993
2076
|
args: ['window:resize']
|
|
1994
2077
|
}] } });
|
|
1995
|
-
class
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
showSettings = input(false, ...(ngDevMode ? [{ debugName: "showSettings" }] : /* istanbul ignore next */ []));
|
|
2012
|
-
avatarActions = input([], ...(ngDevMode ? [{ debugName: "avatarActions" }] : /* istanbul ignore next */ []));
|
|
2078
|
+
class GoodAppHeaderComponent {
|
|
2079
|
+
shell = inject(GoodShellContext, { optional: true });
|
|
2080
|
+
brand = input(...(ngDevMode ? [undefined, { debugName: "brand" }] : /* istanbul ignore next */ []));
|
|
2081
|
+
brandLogoSrc = input(...(ngDevMode ? [undefined, { debugName: "brandLogoSrc" }] : /* istanbul ignore next */ []));
|
|
2082
|
+
brandLogoDarkSrc = input(...(ngDevMode ? [undefined, { debugName: "brandLogoDarkSrc" }] : /* istanbul ignore next */ []));
|
|
2083
|
+
brandMarkSrc = input(...(ngDevMode ? [undefined, { debugName: "brandMarkSrc" }] : /* istanbul ignore next */ []));
|
|
2084
|
+
brandMarkDarkSrc = input(...(ngDevMode ? [undefined, { debugName: "brandMarkDarkSrc" }] : /* istanbul ignore next */ []));
|
|
2085
|
+
showBrandIcon = input(...(ngDevMode ? [undefined, { debugName: "showBrandIcon" }] : /* istanbul ignore next */ []));
|
|
2086
|
+
showMobileBrand = input(...(ngDevMode ? [undefined, { debugName: "showMobileBrand" }] : /* istanbul ignore next */ []));
|
|
2087
|
+
user = input(...(ngDevMode ? [undefined, { debugName: "user" }] : /* istanbul ignore next */ []));
|
|
2088
|
+
notifications = input(...(ngDevMode ? [undefined, { debugName: "notifications" }] : /* istanbul ignore next */ []));
|
|
2089
|
+
searchItems = input(...(ngDevMode ? [undefined, { debugName: "searchItems" }] : /* istanbul ignore next */ []));
|
|
2090
|
+
settingsActions = input(...(ngDevMode ? [undefined, { debugName: "settingsActions" }] : /* istanbul ignore next */ []));
|
|
2091
|
+
showThemeToggle = input(...(ngDevMode ? [undefined, { debugName: "showThemeToggle" }] : /* istanbul ignore next */ []));
|
|
2092
|
+
showSettings = input(...(ngDevMode ? [undefined, { debugName: "showSettings" }] : /* istanbul ignore next */ []));
|
|
2093
|
+
avatarActions = input(...(ngDevMode ? [undefined, { debugName: "avatarActions" }] : /* istanbul ignore next */ []));
|
|
2013
2094
|
menuToggle = output();
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2095
|
+
config = computed(() => {
|
|
2096
|
+
const inherited = this.shell?.options() ?? GOOD_SHELL_DEFAULTS;
|
|
2097
|
+
return {
|
|
2098
|
+
brand: this.brand() ?? inherited.brand,
|
|
2099
|
+
brandLogoSrc: this.brandLogoSrc() ?? inherited.brandLogoSrc,
|
|
2100
|
+
brandLogoDarkSrc: this.brandLogoDarkSrc() ?? inherited.brandLogoDarkSrc,
|
|
2101
|
+
brandMarkSrc: this.brandMarkSrc() ?? inherited.brandMarkSrc,
|
|
2102
|
+
brandMarkDarkSrc: this.brandMarkDarkSrc() ?? inherited.brandMarkDarkSrc,
|
|
2103
|
+
showBrandIcon: this.showBrandIcon() ?? inherited.showBrandIcon,
|
|
2104
|
+
showMobileBrand: this.showMobileBrand() ?? inherited.showMobileBrand,
|
|
2105
|
+
user: this.user() === undefined ? inherited.user : this.user(),
|
|
2106
|
+
notifications: this.notifications() ?? inherited.notifications,
|
|
2107
|
+
searchItems: this.searchItems() ?? inherited.searchItems,
|
|
2108
|
+
settingsActions: this.settingsActions() ?? inherited.settingsActions,
|
|
2109
|
+
showThemeToggle: this.showThemeToggle() ?? inherited.showThemeToggle,
|
|
2110
|
+
showSettings: this.showSettings() ?? inherited.showSettings,
|
|
2111
|
+
avatarActions: this.avatarActions() ?? inherited.avatarActions,
|
|
2112
|
+
};
|
|
2113
|
+
}, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
2114
|
+
openSidebar() { this.shell?.sidebarOpen.set(true); this.menuToggle.emit(); }
|
|
2115
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodAppHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2116
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodAppHeaderComponent, isStandalone: true, selector: "good-app-header", inputs: { brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, brandLogoSrc: { classPropertyName: "brandLogoSrc", publicName: "brandLogoSrc", isSignal: true, isRequired: false, transformFunction: null }, brandLogoDarkSrc: { classPropertyName: "brandLogoDarkSrc", publicName: "brandLogoDarkSrc", isSignal: true, isRequired: false, transformFunction: null }, brandMarkSrc: { classPropertyName: "brandMarkSrc", publicName: "brandMarkSrc", isSignal: true, isRequired: false, transformFunction: null }, brandMarkDarkSrc: { classPropertyName: "brandMarkDarkSrc", publicName: "brandMarkDarkSrc", isSignal: true, isRequired: false, transformFunction: null }, showBrandIcon: { classPropertyName: "showBrandIcon", publicName: "showBrandIcon", isSignal: true, isRequired: false, transformFunction: null }, showMobileBrand: { classPropertyName: "showMobileBrand", publicName: "showMobileBrand", isSignal: true, isRequired: false, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, notifications: { classPropertyName: "notifications", publicName: "notifications", isSignal: true, isRequired: false, transformFunction: null }, searchItems: { classPropertyName: "searchItems", publicName: "searchItems", isSignal: true, isRequired: false, transformFunction: null }, settingsActions: { classPropertyName: "settingsActions", publicName: "settingsActions", isSignal: true, isRequired: false, transformFunction: null }, showThemeToggle: { classPropertyName: "showThemeToggle", publicName: "showThemeToggle", isSignal: true, isRequired: false, transformFunction: null }, showSettings: { classPropertyName: "showSettings", publicName: "showSettings", isSignal: true, isRequired: false, transformFunction: null }, avatarActions: { classPropertyName: "avatarActions", publicName: "avatarActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuToggle: "menuToggle" }, host: { classAttribute: "good-app-header" }, ngImport: i0, template: `
|
|
2018
2117
|
<div class="good-topbar-left">
|
|
2019
|
-
<button type="button" class="good-mobile-menu-button good-action-button" aria-label="Open sidebar" (click)="
|
|
2020
|
-
@if (
|
|
2021
|
-
@if (
|
|
2022
|
-
<good-brand-icon class="good-mobile-brand-icon" [src]="
|
|
2118
|
+
@if (!shell || shell.hasSidebar()) { <button type="button" class="good-mobile-menu-button good-action-button" aria-label="Open sidebar" (click)="openSidebar()"><good-icon name="menu" /></button> }
|
|
2119
|
+
@if (config().showMobileBrand) {
|
|
2120
|
+
@if (config().brandMarkSrc) {
|
|
2121
|
+
<good-brand-icon class="good-mobile-brand-icon" [src]="config().brandMarkSrc" [darkSrc]="config().brandMarkDarkSrc" [label]="config().brand" />
|
|
2023
2122
|
} @else {
|
|
2024
|
-
<span class="good-mobile-brand" [class.good-has-dark-logo]="!!
|
|
2025
|
-
@if (
|
|
2026
|
-
<img class="good-brand-logo good-brand-logo-light" [src]="
|
|
2027
|
-
@if (
|
|
2028
|
-
} @else { {{
|
|
2123
|
+
<span class="good-mobile-brand" [class.good-has-dark-logo]="!!config().brandLogoDarkSrc">
|
|
2124
|
+
@if (config().brandLogoSrc) {
|
|
2125
|
+
<img class="good-brand-logo good-brand-logo-light" [src]="config().brandLogoSrc" [alt]="config().brand" />
|
|
2126
|
+
@if (config().brandLogoDarkSrc) { <img class="good-brand-logo good-brand-logo-dark" [src]="config().brandLogoDarkSrc" [alt]="config().brand" /> }
|
|
2127
|
+
} @else { {{ config().brand }} }
|
|
2029
2128
|
</span>
|
|
2030
2129
|
}
|
|
2031
2130
|
}
|
|
2032
|
-
@if (
|
|
2033
|
-
|
|
2034
|
-
<ng-content select="good-topbar-menu-container" />
|
|
2131
|
+
@if (config().showBrandIcon) { <good-brand-icon class="good-desktop-brand-icon" [src]="config().brandMarkSrc" [darkSrc]="config().brandMarkDarkSrc" [label]="config().brand" /> }
|
|
2132
|
+
<ng-content select="good-header-menu" />
|
|
2035
2133
|
</div>
|
|
2036
|
-
<ng-content select="good-
|
|
2037
|
-
<good-
|
|
2134
|
+
<ng-content select="good-header-actions">
|
|
2135
|
+
<good-header-actions [user]="config().user" [notifications]="config().notifications" [searchItems]="config().searchItems" [settingsActions]="config().settingsActions" [avatarActions]="config().avatarActions" [showThemeToggle]="config().showThemeToggle" [showSettings]="config().showSettings" />
|
|
2038
2136
|
</ng-content>
|
|
2039
|
-
`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "component", type: GoodBrandIconComponent, selector: "good-brand-icon", inputs: ["src", "darkSrc", "label"] }, { kind: "component", type:
|
|
2137
|
+
`, isInline: true, dependencies: [{ kind: "component", type: GoodIconComponent, selector: "good-icon", inputs: ["name"] }, { kind: "component", type: GoodBrandIconComponent, selector: "good-brand-icon", inputs: ["src", "darkSrc", "label"] }, { kind: "component", type: GoodHeaderActionsComponent, selector: "good-header-actions", inputs: ["user", "notifications", "searchItems", "settingsActions", "avatarActions", "showSearch", "showNotifications", "showThemeToggle", "showSettings", "showAvatar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2040
2138
|
}
|
|
2041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
2139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodAppHeaderComponent, decorators: [{
|
|
2042
2140
|
type: Component,
|
|
2043
2141
|
args: [{
|
|
2044
|
-
selector: 'good-
|
|
2142
|
+
selector: 'good-app-header',
|
|
2045
2143
|
standalone: true,
|
|
2046
|
-
imports: [GoodIconComponent, GoodBrandIconComponent,
|
|
2144
|
+
imports: [GoodIconComponent, GoodBrandIconComponent, GoodHeaderActionsComponent],
|
|
2047
2145
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2048
2146
|
template: `
|
|
2049
2147
|
<div class="good-topbar-left">
|
|
2050
|
-
<button type="button" class="good-mobile-menu-button good-action-button" aria-label="Open sidebar" (click)="
|
|
2051
|
-
@if (
|
|
2052
|
-
@if (
|
|
2053
|
-
<good-brand-icon class="good-mobile-brand-icon" [src]="
|
|
2148
|
+
@if (!shell || shell.hasSidebar()) { <button type="button" class="good-mobile-menu-button good-action-button" aria-label="Open sidebar" (click)="openSidebar()"><good-icon name="menu" /></button> }
|
|
2149
|
+
@if (config().showMobileBrand) {
|
|
2150
|
+
@if (config().brandMarkSrc) {
|
|
2151
|
+
<good-brand-icon class="good-mobile-brand-icon" [src]="config().brandMarkSrc" [darkSrc]="config().brandMarkDarkSrc" [label]="config().brand" />
|
|
2054
2152
|
} @else {
|
|
2055
|
-
<span class="good-mobile-brand" [class.good-has-dark-logo]="!!
|
|
2056
|
-
@if (
|
|
2057
|
-
<img class="good-brand-logo good-brand-logo-light" [src]="
|
|
2058
|
-
@if (
|
|
2059
|
-
} @else { {{
|
|
2153
|
+
<span class="good-mobile-brand" [class.good-has-dark-logo]="!!config().brandLogoDarkSrc">
|
|
2154
|
+
@if (config().brandLogoSrc) {
|
|
2155
|
+
<img class="good-brand-logo good-brand-logo-light" [src]="config().brandLogoSrc" [alt]="config().brand" />
|
|
2156
|
+
@if (config().brandLogoDarkSrc) { <img class="good-brand-logo good-brand-logo-dark" [src]="config().brandLogoDarkSrc" [alt]="config().brand" /> }
|
|
2157
|
+
} @else { {{ config().brand }} }
|
|
2060
2158
|
</span>
|
|
2061
2159
|
}
|
|
2062
2160
|
}
|
|
2063
|
-
@if (
|
|
2064
|
-
|
|
2065
|
-
<ng-content select="good-topbar-menu-container" />
|
|
2161
|
+
@if (config().showBrandIcon) { <good-brand-icon class="good-desktop-brand-icon" [src]="config().brandMarkSrc" [darkSrc]="config().brandMarkDarkSrc" [label]="config().brand" /> }
|
|
2162
|
+
<ng-content select="good-header-menu" />
|
|
2066
2163
|
</div>
|
|
2067
|
-
<ng-content select="good-
|
|
2068
|
-
<good-
|
|
2164
|
+
<ng-content select="good-header-actions">
|
|
2165
|
+
<good-header-actions [user]="config().user" [notifications]="config().notifications" [searchItems]="config().searchItems" [settingsActions]="config().settingsActions" [avatarActions]="config().avatarActions" [showThemeToggle]="config().showThemeToggle" [showSettings]="config().showSettings" />
|
|
2069
2166
|
</ng-content>
|
|
2070
2167
|
`,
|
|
2071
|
-
host: { class: 'good-
|
|
2168
|
+
host: { class: 'good-app-header' },
|
|
2072
2169
|
}]
|
|
2073
|
-
}], propDecorators: { brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], brandLogoSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoSrc", required: false }] }], brandLogoDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoDarkSrc", required: false }] }], brandMarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMarkSrc", required: false }] }], brandMarkDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMarkDarkSrc", required: false }] }], showBrandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBrandIcon", required: false }] }], showMobileBrand: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMobileBrand", required: false }] }],
|
|
2170
|
+
}], propDecorators: { brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], brandLogoSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoSrc", required: false }] }], brandLogoDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoDarkSrc", required: false }] }], brandMarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMarkSrc", required: false }] }], brandMarkDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMarkDarkSrc", required: false }] }], showBrandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBrandIcon", required: false }] }], showMobileBrand: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMobileBrand", required: false }] }], user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], notifications: [{ type: i0.Input, args: [{ isSignal: true, alias: "notifications", required: false }] }], searchItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchItems", required: false }] }], settingsActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "settingsActions", required: false }] }], showThemeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showThemeToggle", required: false }] }], showSettings: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSettings", required: false }] }], avatarActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarActions", required: false }] }], menuToggle: [{ type: i0.Output, args: ["menuToggle"] }] } });
|
|
2074
2171
|
|
|
2075
2172
|
let nextActionMenuId = 0;
|
|
2076
2173
|
class GoodActionMenuComponent {
|
|
@@ -3235,14 +3332,14 @@ const GOOD_COMPOSITE_REQUIRED_CONTROL = new InjectionToken('GoodUI composite req
|
|
|
3235
3332
|
|
|
3236
3333
|
class GoodHeadingGroupComponent {
|
|
3237
3334
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeadingGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeadingGroupComponent, isStandalone: true, selector: "good-heading-group", host: { classAttribute: "good-heading-group" }, ngImport: i0, template: `<ng-content select="good-eyebrow" /><div class="good-heading-group-text"><ng-content select="good-heading" /><ng-content select="good-summary" /></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3335
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeadingGroupComponent, isStandalone: true, selector: "good-heading-group", host: { classAttribute: "good-heading-group" }, ngImport: i0, template: `<ng-content select="good-eyebrow" /><div class="good-heading-group-text"><ng-content select="good-heading-1, good-heading-2, good-heading-3, good-heading-4, good-heading-5, good-heading-6, good-heading-7" /><ng-content select="good-summary" /></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3239
3336
|
}
|
|
3240
3337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeadingGroupComponent, decorators: [{
|
|
3241
3338
|
type: Component,
|
|
3242
3339
|
args: [{
|
|
3243
3340
|
selector: 'good-heading-group', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3244
3341
|
host: { class: 'good-heading-group' },
|
|
3245
|
-
template: `<ng-content select="good-eyebrow" /><div class="good-heading-group-text"><ng-content select="good-heading" /><ng-content select="good-summary" /></div>`,
|
|
3342
|
+
template: `<ng-content select="good-eyebrow" /><div class="good-heading-group-text"><ng-content select="good-heading-1, good-heading-2, good-heading-3, good-heading-4, good-heading-5, good-heading-6, good-heading-7" /><ng-content select="good-summary" /></div>`,
|
|
3246
3343
|
}]
|
|
3247
3344
|
}] });
|
|
3248
3345
|
class GoodEyebrowComponent {
|
|
@@ -3258,40 +3355,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3258
3355
|
template: `<span><ng-content /></span>`,
|
|
3259
3356
|
}]
|
|
3260
3357
|
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }] } });
|
|
3261
|
-
class
|
|
3262
|
-
|
|
3263
|
-
static
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
@switch (level()) {
|
|
3267
|
-
@case (2) { <h2><ng-container [ngTemplateOutlet]="content" /></h2> }
|
|
3268
|
-
@case (3) { <h3><ng-container [ngTemplateOutlet]="content" /></h3> }
|
|
3269
|
-
@case (4) { <h4><ng-container [ngTemplateOutlet]="content" /></h4> }
|
|
3270
|
-
@case (5) { <h5><ng-container [ngTemplateOutlet]="content" /></h5> }
|
|
3271
|
-
@case (6) { <h6><ng-container [ngTemplateOutlet]="content" /></h6> }
|
|
3272
|
-
@default { <h1><ng-container [ngTemplateOutlet]="content" /></h1> }
|
|
3273
|
-
}
|
|
3274
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3275
|
-
}
|
|
3276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeadingComponent, decorators: [{
|
|
3358
|
+
class GoodHeading1Component {
|
|
3359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading1Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3360
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading1Component, isStandalone: true, selector: "good-heading-1", host: { attributes: { "data-level": "1", "data-heading-style": "1" }, classAttribute: "good-heading" }, ngImport: i0, template: `<h1><ng-content /></h1>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3361
|
+
}
|
|
3362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading1Component, decorators: [{
|
|
3277
3363
|
type: Component,
|
|
3278
3364
|
args: [{
|
|
3279
|
-
selector: 'good-heading', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3365
|
+
selector: 'good-heading-1', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3366
|
+
host: { class: 'good-heading', 'data-level': '1', 'data-heading-style': '1' },
|
|
3367
|
+
template: `<h1><ng-content /></h1>`,
|
|
3368
|
+
}]
|
|
3369
|
+
}] });
|
|
3370
|
+
class GoodHeading2Component {
|
|
3371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3372
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading2Component, isStandalone: true, selector: "good-heading-2", host: { attributes: { "data-level": "2", "data-heading-style": "2" }, classAttribute: "good-heading" }, ngImport: i0, template: `<h2><ng-content /></h2>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3373
|
+
}
|
|
3374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading2Component, decorators: [{
|
|
3375
|
+
type: Component,
|
|
3376
|
+
args: [{
|
|
3377
|
+
selector: 'good-heading-2', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3378
|
+
host: { class: 'good-heading', 'data-level': '2', 'data-heading-style': '2' },
|
|
3379
|
+
template: `<h2><ng-content /></h2>`,
|
|
3380
|
+
}]
|
|
3381
|
+
}] });
|
|
3382
|
+
class GoodHeading3Component {
|
|
3383
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading3Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3384
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading3Component, isStandalone: true, selector: "good-heading-3", host: { attributes: { "data-level": "3", "data-heading-style": "3" }, classAttribute: "good-subheading" }, ngImport: i0, template: `<h3><ng-content /></h3>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3385
|
+
}
|
|
3386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading3Component, decorators: [{
|
|
3387
|
+
type: Component,
|
|
3388
|
+
args: [{
|
|
3389
|
+
selector: 'good-heading-3', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3390
|
+
host: { class: 'good-subheading', 'data-level': '3', 'data-heading-style': '3' },
|
|
3391
|
+
template: `<h3><ng-content /></h3>`,
|
|
3392
|
+
}]
|
|
3393
|
+
}] });
|
|
3394
|
+
class GoodHeading4Component {
|
|
3395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading4Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading4Component, isStandalone: true, selector: "good-heading-4", host: { attributes: { "data-level": "4", "data-heading-style": "4" }, classAttribute: "good-subheading" }, ngImport: i0, template: `<h4><ng-content /></h4>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3397
|
+
}
|
|
3398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading4Component, decorators: [{
|
|
3399
|
+
type: Component,
|
|
3400
|
+
args: [{
|
|
3401
|
+
selector: 'good-heading-4', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3402
|
+
host: { class: 'good-subheading', 'data-level': '4', 'data-heading-style': '4' },
|
|
3403
|
+
template: `<h4><ng-content /></h4>`,
|
|
3404
|
+
}]
|
|
3405
|
+
}] });
|
|
3406
|
+
class GoodHeading5Component {
|
|
3407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading5Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3408
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading5Component, isStandalone: true, selector: "good-heading-5", host: { attributes: { "data-level": "5", "data-heading-style": "5" }, classAttribute: "good-subheading" }, ngImport: i0, template: `<h5><ng-content /></h5>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3409
|
+
}
|
|
3410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading5Component, decorators: [{
|
|
3411
|
+
type: Component,
|
|
3412
|
+
args: [{
|
|
3413
|
+
selector: 'good-heading-5', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3414
|
+
host: { class: 'good-subheading', 'data-level': '5', 'data-heading-style': '5' },
|
|
3415
|
+
template: `<h5><ng-content /></h5>`,
|
|
3416
|
+
}]
|
|
3417
|
+
}] });
|
|
3418
|
+
class GoodHeading6Component {
|
|
3419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading6Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3420
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading6Component, isStandalone: true, selector: "good-heading-6", host: { attributes: { "data-level": "6", "data-heading-style": "6" }, classAttribute: "good-subheading" }, ngImport: i0, template: `<h6><ng-content /></h6>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3421
|
+
}
|
|
3422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading6Component, decorators: [{
|
|
3423
|
+
type: Component,
|
|
3424
|
+
args: [{
|
|
3425
|
+
selector: 'good-heading-6', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3426
|
+
host: { class: 'good-subheading', 'data-level': '6', 'data-heading-style': '6' },
|
|
3427
|
+
template: `<h6><ng-content /></h6>`,
|
|
3293
3428
|
}]
|
|
3294
|
-
}]
|
|
3429
|
+
}] });
|
|
3430
|
+
class GoodHeading7Component {
|
|
3431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading7Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3432
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodHeading7Component, isStandalone: true, selector: "good-heading-7", host: { attributes: { "data-level": "7", "data-heading-style": "7", "role": "heading", "aria-level": "7" }, classAttribute: "good-subheading" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3433
|
+
}
|
|
3434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodHeading7Component, decorators: [{
|
|
3435
|
+
type: Component,
|
|
3436
|
+
args: [{
|
|
3437
|
+
selector: 'good-heading-7', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3438
|
+
host: { class: 'good-subheading', 'data-level': '7', 'data-heading-style': '7', role: 'heading', 'aria-level': '7' },
|
|
3439
|
+
template: `<ng-content />`,
|
|
3440
|
+
}]
|
|
3441
|
+
}] });
|
|
3295
3442
|
class GoodSummaryComponent {
|
|
3296
3443
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3297
3444
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodSummaryComponent, isStandalone: true, selector: "good-summary", host: { classAttribute: "good-summary" }, ngImport: i0, template: `<p><ng-content /></p>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -3304,16 +3451,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3304
3451
|
}]
|
|
3305
3452
|
}] });
|
|
3306
3453
|
class GoodSectionComponent {
|
|
3454
|
+
spacing = input('default', ...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
3307
3455
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3308
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3456
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: GoodSectionComponent, isStandalone: true, selector: "good-section", inputs: { spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-spacing": "spacing()" }, classAttribute: "good-section" }, ngImport: i0, template: `<section><ng-content /></section>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3309
3457
|
}
|
|
3310
3458
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSectionComponent, decorators: [{
|
|
3311
3459
|
type: Component,
|
|
3312
3460
|
args: [{
|
|
3313
3461
|
selector: 'good-section', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3314
|
-
host: { class: 'good-section' }, template: `<section><ng-content /></section>`,
|
|
3462
|
+
host: { class: 'good-section', '[attr.data-spacing]': 'spacing()' }, template: `<section><ng-content /></section>`,
|
|
3315
3463
|
}]
|
|
3316
|
-
}] });
|
|
3464
|
+
}], propDecorators: { spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }] } });
|
|
3317
3465
|
class GoodProseComponent {
|
|
3318
3466
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodProseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3319
3467
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: GoodProseComponent, isStandalone: true, selector: "good-prose", host: { classAttribute: "good-prose" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -3398,38 +3546,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3398
3546
|
host: { class: 'good-paragraph' }, template: `<p><ng-content /></p>`,
|
|
3399
3547
|
}]
|
|
3400
3548
|
}] });
|
|
3401
|
-
class GoodSubheadingComponent {
|
|
3402
|
-
level = input(2, ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
|
|
3403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSubheadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3404
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodSubheadingComponent, isStandalone: true, selector: "good-subheading", inputs: { level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "good-subheading" }, ngImport: i0, template: `
|
|
3405
|
-
<ng-template #content><ng-content /></ng-template>
|
|
3406
|
-
@switch (level()) {
|
|
3407
|
-
@case (3) { <h3><ng-container [ngTemplateOutlet]="content" /></h3> }
|
|
3408
|
-
@case (4) { <h4><ng-container [ngTemplateOutlet]="content" /></h4> }
|
|
3409
|
-
@case (5) { <h5><ng-container [ngTemplateOutlet]="content" /></h5> }
|
|
3410
|
-
@case (6) { <h6><ng-container [ngTemplateOutlet]="content" /></h6> }
|
|
3411
|
-
@default { <h2><ng-container [ngTemplateOutlet]="content" /></h2> }
|
|
3412
|
-
}
|
|
3413
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3414
|
-
}
|
|
3415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodSubheadingComponent, decorators: [{
|
|
3416
|
-
type: Component,
|
|
3417
|
-
args: [{
|
|
3418
|
-
selector: 'good-subheading', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3419
|
-
imports: [NgTemplateOutlet],
|
|
3420
|
-
host: { class: 'good-subheading' },
|
|
3421
|
-
template: `
|
|
3422
|
-
<ng-template #content><ng-content /></ng-template>
|
|
3423
|
-
@switch (level()) {
|
|
3424
|
-
@case (3) { <h3><ng-container [ngTemplateOutlet]="content" /></h3> }
|
|
3425
|
-
@case (4) { <h4><ng-container [ngTemplateOutlet]="content" /></h4> }
|
|
3426
|
-
@case (5) { <h5><ng-container [ngTemplateOutlet]="content" /></h5> }
|
|
3427
|
-
@case (6) { <h6><ng-container [ngTemplateOutlet]="content" /></h6> }
|
|
3428
|
-
@default { <h2><ng-container [ngTemplateOutlet]="content" /></h2> }
|
|
3429
|
-
}
|
|
3430
|
-
`,
|
|
3431
|
-
}]
|
|
3432
|
-
}], propDecorators: { level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }] } });
|
|
3433
3549
|
class GoodCitationComponent {
|
|
3434
3550
|
cite = input('', ...(ngDevMode ? [{ debugName: "cite" }] : /* istanbul ignore next */ []));
|
|
3435
3551
|
source = input('', ...(ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []));
|
|
@@ -3593,43 +3709,59 @@ class GoodMainViewComponent {
|
|
|
3593
3709
|
subnavItems = input([], ...(ngDevMode ? [{ debugName: "subnavItems" }] : /* istanbul ignore next */ []));
|
|
3594
3710
|
subnavActions = input([], ...(ngDevMode ? [{ debugName: "subnavActions" }] : /* istanbul ignore next */ []));
|
|
3595
3711
|
subnavLabel = input('Subnav', ...(ngDevMode ? [{ debugName: "subnavLabel" }] : /* istanbul ignore next */ []));
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
eyebrow =
|
|
3599
|
-
|
|
3712
|
+
heading = contentChild(GoodHeading1Component, { ...(ngDevMode ? { debugName: "heading" } : /* istanbul ignore next */ {}), descendants: false });
|
|
3713
|
+
summary = contentChild(GoodSummaryComponent, { ...(ngDevMode ? { debugName: "summary" } : /* istanbul ignore next */ {}), descendants: false });
|
|
3714
|
+
eyebrow = contentChild(GoodEyebrowComponent, { ...(ngDevMode ? { debugName: "eyebrow" } : /* istanbul ignore next */ {}), descendants: false });
|
|
3715
|
+
headingGroup = contentChild(GoodHeadingGroupComponent, { ...(ngDevMode ? { debugName: "headingGroup" } : /* istanbul ignore next */ {}), descendants: false });
|
|
3716
|
+
hasDirectHeading = computed(() => !!(this.heading() || this.summary() || this.eyebrow()), ...(ngDevMode ? [{ debugName: "hasDirectHeading" }] : /* istanbul ignore next */ []));
|
|
3717
|
+
hasHeading = computed(() => this.hasDirectHeading() || !!this.headingGroup(), ...(ngDevMode ? [{ debugName: "hasHeading" }] : /* istanbul ignore next */ []));
|
|
3600
3718
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodMainViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3601
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodMainViewComponent, isStandalone: true, selector: "good-main-view", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, subnavItems: { classPropertyName: "subnavItems", publicName: "subnavItems", isSignal: true, isRequired: false, transformFunction: null }, subnavActions: { classPropertyName: "subnavActions", publicName: "subnavActions", isSignal: true, isRequired: false, transformFunction: null }, subnavLabel: { classPropertyName: "subnavLabel", publicName: "subnavLabel", isSignal: true, isRequired: false, transformFunction: null },
|
|
3719
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: GoodMainViewComponent, isStandalone: true, selector: "good-main-view", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, subnavItems: { classPropertyName: "subnavItems", publicName: "subnavItems", isSignal: true, isRequired: false, transformFunction: null }, subnavActions: { classPropertyName: "subnavActions", publicName: "subnavActions", isSignal: true, isRequired: false, transformFunction: null }, subnavLabel: { classPropertyName: "subnavLabel", publicName: "subnavLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-layout": "layout()" }, classAttribute: "good-main-view" }, queries: [{ propertyName: "heading", first: true, predicate: GoodHeading1Component, isSignal: true }, { propertyName: "summary", first: true, predicate: GoodSummaryComponent, isSignal: true }, { propertyName: "eyebrow", first: true, predicate: GoodEyebrowComponent, isSignal: true }, { propertyName: "headingGroup", first: true, predicate: GoodHeadingGroupComponent, isSignal: true }], ngImport: i0, template: `
|
|
3602
3720
|
@if (subnavItems().length) { <good-subnav [items]="subnavItems()" [actions]="subnavActions()" [ariaLabel]="subnavLabel()" /> }
|
|
3603
|
-
@if (
|
|
3721
|
+
@if (hasHeading()) {
|
|
3604
3722
|
<header class="good-main-view-heading">
|
|
3605
|
-
<good-heading-
|
|
3606
|
-
|
|
3607
|
-
@if (
|
|
3608
|
-
|
|
3609
|
-
|
|
3723
|
+
<div class="good-main-view-heading-content">
|
|
3724
|
+
<ng-content select="good-heading-group" />
|
|
3725
|
+
@if (hasDirectHeading()) {
|
|
3726
|
+
<div class="good-heading-group">
|
|
3727
|
+
<ng-content select="good-eyebrow" />
|
|
3728
|
+
<div class="good-heading-group-text">
|
|
3729
|
+
<ng-content select="good-heading-1" />
|
|
3730
|
+
<ng-content select="good-summary" />
|
|
3731
|
+
</div>
|
|
3732
|
+
</div>
|
|
3733
|
+
}
|
|
3734
|
+
</div>
|
|
3610
3735
|
<div class="good-main-view-actions"><ng-content select="[good-main-view-actions]" /></div>
|
|
3611
3736
|
</header>
|
|
3612
3737
|
}
|
|
3613
3738
|
<ng-content select="[goodMainViewToolbar]" />
|
|
3614
3739
|
<div class="good-main-view-content"><ng-content /></div>
|
|
3615
|
-
`, isInline: true, dependencies: [{ kind: "component", type: GoodSubnavComponent, selector: "good-subnav", inputs: ["items", "actions", "ariaLabel", "activeRoute"] }
|
|
3740
|
+
`, isInline: true, dependencies: [{ kind: "component", type: GoodSubnavComponent, selector: "good-subnav", inputs: ["items", "actions", "ariaLabel", "activeRoute"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3616
3741
|
}
|
|
3617
3742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodMainViewComponent, decorators: [{
|
|
3618
3743
|
type: Component,
|
|
3619
3744
|
args: [{
|
|
3620
3745
|
selector: 'good-main-view',
|
|
3621
3746
|
standalone: true,
|
|
3622
|
-
imports: [GoodSubnavComponent
|
|
3747
|
+
imports: [GoodSubnavComponent],
|
|
3623
3748
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3624
3749
|
template: `
|
|
3625
3750
|
@if (subnavItems().length) { <good-subnav [items]="subnavItems()" [actions]="subnavActions()" [ariaLabel]="subnavLabel()" /> }
|
|
3626
|
-
@if (
|
|
3751
|
+
@if (hasHeading()) {
|
|
3627
3752
|
<header class="good-main-view-heading">
|
|
3628
|
-
<good-heading-
|
|
3629
|
-
|
|
3630
|
-
@if (
|
|
3631
|
-
|
|
3632
|
-
|
|
3753
|
+
<div class="good-main-view-heading-content">
|
|
3754
|
+
<ng-content select="good-heading-group" />
|
|
3755
|
+
@if (hasDirectHeading()) {
|
|
3756
|
+
<div class="good-heading-group">
|
|
3757
|
+
<ng-content select="good-eyebrow" />
|
|
3758
|
+
<div class="good-heading-group-text">
|
|
3759
|
+
<ng-content select="good-heading-1" />
|
|
3760
|
+
<ng-content select="good-summary" />
|
|
3761
|
+
</div>
|
|
3762
|
+
</div>
|
|
3763
|
+
}
|
|
3764
|
+
</div>
|
|
3633
3765
|
<div class="good-main-view-actions"><ng-content select="[good-main-view-actions]" /></div>
|
|
3634
3766
|
</header>
|
|
3635
3767
|
}
|
|
@@ -3638,7 +3770,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
3638
3770
|
`,
|
|
3639
3771
|
host: { class: 'good-main-view', '[attr.data-layout]': 'layout()' },
|
|
3640
3772
|
}]
|
|
3641
|
-
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], subnavItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "subnavItems", required: false }] }], subnavActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "subnavActions", required: false }] }], subnavLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "subnavLabel", required: false }] }],
|
|
3773
|
+
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], subnavItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "subnavItems", required: false }] }], subnavActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "subnavActions", required: false }] }], subnavLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "subnavLabel", required: false }] }], heading: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GoodHeading1Component), { ...{ descendants: false }, isSignal: true }] }], summary: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GoodSummaryComponent), { ...{ descendants: false }, isSignal: true }] }], eyebrow: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GoodEyebrowComponent), { ...{ descendants: false }, isSignal: true }] }], headingGroup: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GoodHeadingGroupComponent), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
3642
3774
|
|
|
3643
3775
|
/** Aligns every field in a native form to the same label and control columns. */
|
|
3644
3776
|
class GoodFormDirective {
|
|
@@ -14601,9 +14733,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
14601
14733
|
}]
|
|
14602
14734
|
}], propDecorators: { projectedHeader: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GoodExpandableHeaderDirective), { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
14603
14735
|
|
|
14604
|
-
class
|
|
14605
|
-
|
|
14606
|
-
|
|
14736
|
+
class GoodAppShellComponent {
|
|
14737
|
+
document = inject(DOCUMENT);
|
|
14738
|
+
destroyRef = inject(DestroyRef);
|
|
14739
|
+
context = inject(GoodShellContext);
|
|
14740
|
+
navigation = inject(GoodNavigationState);
|
|
14741
|
+
sidebar = contentChild(GoodSidebarComponent, ...(ngDevMode ? [{ debugName: "sidebar" }] : /* istanbul ignore next */ []));
|
|
14742
|
+
drawer = viewChild('drawer', ...(ngDevMode ? [{ debugName: "drawer" }] : /* istanbul ignore next */ []));
|
|
14743
|
+
mobile = signal(false, ...(ngDevMode ? [{ debugName: "mobile" }] : /* istanbul ignore next */ []));
|
|
14607
14744
|
returnFocus = null;
|
|
14608
14745
|
brand = input('GOODUI', ...(ngDevMode ? [{ debugName: "brand" }] : /* istanbul ignore next */ []));
|
|
14609
14746
|
brandLogoSrc = input('', ...(ngDevMode ? [{ debugName: "brandLogoSrc" }] : /* istanbul ignore next */ []));
|
|
@@ -14612,9 +14749,6 @@ class GoodAppLayoutComponent {
|
|
|
14612
14749
|
brandMarkDarkSrc = input('', ...(ngDevMode ? [{ debugName: "brandMarkDarkSrc" }] : /* istanbul ignore next */ []));
|
|
14613
14750
|
showBrandIcon = input(false, ...(ngDevMode ? [{ debugName: "showBrandIcon" }] : /* istanbul ignore next */ []));
|
|
14614
14751
|
showMobileBrand = input(true, ...(ngDevMode ? [{ debugName: "showMobileBrand" }] : /* istanbul ignore next */ []));
|
|
14615
|
-
sidebarSections = input([], ...(ngDevMode ? [{ debugName: "sidebarSections" }] : /* istanbul ignore next */ []));
|
|
14616
|
-
topbarItems = input([], ...(ngDevMode ? [{ debugName: "topbarItems" }] : /* istanbul ignore next */ []));
|
|
14617
|
-
mobileTopbarMenuMode = input('hidden', ...(ngDevMode ? [{ debugName: "mobileTopbarMenuMode" }] : /* istanbul ignore next */ []));
|
|
14618
14752
|
user = input(null, ...(ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []));
|
|
14619
14753
|
notifications = input([], ...(ngDevMode ? [{ debugName: "notifications" }] : /* istanbul ignore next */ []));
|
|
14620
14754
|
searchItems = input([], ...(ngDevMode ? [{ debugName: "searchItems" }] : /* istanbul ignore next */ []));
|
|
@@ -14622,88 +14756,112 @@ class GoodAppLayoutComponent {
|
|
|
14622
14756
|
showThemeToggle = input(true, ...(ngDevMode ? [{ debugName: "showThemeToggle" }] : /* istanbul ignore next */ []));
|
|
14623
14757
|
showSettings = input(false, ...(ngDevMode ? [{ debugName: "showSettings" }] : /* istanbul ignore next */ []));
|
|
14624
14758
|
avatarActions = input([], ...(ngDevMode ? [{ debugName: "avatarActions" }] : /* istanbul ignore next */ []));
|
|
14625
|
-
activeRoute = signal('/', ...(ngDevMode ? [{ debugName: "activeRoute" }] : /* istanbul ignore next */ []));
|
|
14626
14759
|
constructor() {
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
.
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
this.
|
|
14760
|
+
effect(() => {
|
|
14761
|
+
this.context.hasSidebar.set(!!this.sidebar());
|
|
14762
|
+
this.context.options.set({
|
|
14763
|
+
brand: this.brand(),
|
|
14764
|
+
brandLogoSrc: this.brandLogoSrc(),
|
|
14765
|
+
brandLogoDarkSrc: this.brandLogoDarkSrc(),
|
|
14766
|
+
brandMarkSrc: this.brandMarkSrc(),
|
|
14767
|
+
brandMarkDarkSrc: this.brandMarkDarkSrc(),
|
|
14768
|
+
showBrandIcon: this.showBrandIcon(),
|
|
14769
|
+
showMobileBrand: this.showMobileBrand(),
|
|
14770
|
+
user: this.user(),
|
|
14771
|
+
notifications: this.notifications(),
|
|
14772
|
+
searchItems: this.searchItems(),
|
|
14773
|
+
settingsActions: this.settingsActions(),
|
|
14774
|
+
showThemeToggle: this.showThemeToggle(),
|
|
14775
|
+
showSettings: this.showSettings(),
|
|
14776
|
+
avatarActions: this.avatarActions(),
|
|
14777
|
+
});
|
|
14778
|
+
});
|
|
14779
|
+
effect(() => {
|
|
14780
|
+
this.navigation.activeRoute();
|
|
14781
|
+
this.context.sidebarOpen.set(false);
|
|
14782
|
+
});
|
|
14783
|
+
effect(() => {
|
|
14784
|
+
const element = this.drawer()?.nativeElement;
|
|
14785
|
+
if (!element)
|
|
14786
|
+
return;
|
|
14787
|
+
if (!this.mobile()) {
|
|
14788
|
+
this.context.sidebarOpen.set(false);
|
|
14789
|
+
if (element.matches(':modal'))
|
|
14790
|
+
element.close();
|
|
14791
|
+
if (!element.open)
|
|
14792
|
+
element.open = true;
|
|
14793
|
+
}
|
|
14794
|
+
else if (this.context.sidebarOpen() && this.sidebar()) {
|
|
14795
|
+
if (!element.open) {
|
|
14796
|
+
this.returnFocus = this.document.activeElement;
|
|
14797
|
+
element.showModal();
|
|
14798
|
+
}
|
|
14799
|
+
}
|
|
14800
|
+
else if (element.open)
|
|
14801
|
+
element.close();
|
|
14802
|
+
});
|
|
14803
|
+
afterNextRender(() => {
|
|
14804
|
+
const query = this.document.defaultView?.matchMedia('(max-width: 900px)');
|
|
14805
|
+
if (!query)
|
|
14806
|
+
return;
|
|
14807
|
+
this.mobile.set(query.matches);
|
|
14808
|
+
const update = () => this.mobile.set(query.matches);
|
|
14809
|
+
query.addEventListener('change', update);
|
|
14810
|
+
this.destroyRef.onDestroy(() => query.removeEventListener('change', update));
|
|
14633
14811
|
});
|
|
14634
14812
|
}
|
|
14635
|
-
openDrawer() {
|
|
14636
|
-
|
|
14637
|
-
this.drawer().nativeElement.showModal();
|
|
14638
|
-
}
|
|
14639
|
-
closeDrawer() { this.drawer().nativeElement.close(); }
|
|
14813
|
+
openDrawer() { this.context.sidebarOpen.set(true); }
|
|
14814
|
+
closeDrawer() { this.context.sidebarOpen.set(false); }
|
|
14640
14815
|
onBackdropClick(event) {
|
|
14641
|
-
if (event.target === this.drawer().nativeElement)
|
|
14816
|
+
if (this.mobile() && event.target === this.drawer().nativeElement)
|
|
14642
14817
|
this.closeDrawer();
|
|
14643
14818
|
}
|
|
14644
|
-
onDrawerClose() {
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14819
|
+
onDrawerClose() {
|
|
14820
|
+
if (!this.mobile() || this.drawer()?.nativeElement.open)
|
|
14821
|
+
return;
|
|
14822
|
+
this.context.sidebarOpen.set(false);
|
|
14823
|
+
this.returnFocus?.focus();
|
|
14824
|
+
}
|
|
14825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodAppShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14826
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: GoodAppShellComponent, isStandalone: true, selector: "good-app-shell", inputs: { brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, brandLogoSrc: { classPropertyName: "brandLogoSrc", publicName: "brandLogoSrc", isSignal: true, isRequired: false, transformFunction: null }, brandLogoDarkSrc: { classPropertyName: "brandLogoDarkSrc", publicName: "brandLogoDarkSrc", isSignal: true, isRequired: false, transformFunction: null }, brandMarkSrc: { classPropertyName: "brandMarkSrc", publicName: "brandMarkSrc", isSignal: true, isRequired: false, transformFunction: null }, brandMarkDarkSrc: { classPropertyName: "brandMarkDarkSrc", publicName: "brandMarkDarkSrc", isSignal: true, isRequired: false, transformFunction: null }, showBrandIcon: { classPropertyName: "showBrandIcon", publicName: "showBrandIcon", isSignal: true, isRequired: false, transformFunction: null }, showMobileBrand: { classPropertyName: "showMobileBrand", publicName: "showMobileBrand", isSignal: true, isRequired: false, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, notifications: { classPropertyName: "notifications", publicName: "notifications", isSignal: true, isRequired: false, transformFunction: null }, searchItems: { classPropertyName: "searchItems", publicName: "searchItems", isSignal: true, isRequired: false, transformFunction: null }, settingsActions: { classPropertyName: "settingsActions", publicName: "settingsActions", isSignal: true, isRequired: false, transformFunction: null }, showThemeToggle: { classPropertyName: "showThemeToggle", publicName: "showThemeToggle", isSignal: true, isRequired: false, transformFunction: null }, showSettings: { classPropertyName: "showSettings", publicName: "showSettings", isSignal: true, isRequired: false, transformFunction: null }, avatarActions: { classPropertyName: "avatarActions", publicName: "avatarActions", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.good-shell-without-sidebar": "!sidebar()" }, classAttribute: "good-app-shell" }, providers: [GoodShellContext], queries: [{ propertyName: "sidebar", first: true, predicate: GoodSidebarComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "drawer", first: true, predicate: ["drawer"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
14827
|
+
<dialog #drawer open class="good-shell-sidebar" [attr.role]="mobile() ? 'dialog' : 'presentation'"
|
|
14828
|
+
[attr.aria-label]="mobile() ? 'Navigation' : null" (click)="onBackdropClick($event)" (close)="onDrawerClose()">
|
|
14829
|
+
<ng-content select="good-sidebar" />
|
|
14830
|
+
<button type="button" class="good-drawer-close" aria-label="Close sidebar" (click)="closeDrawer()">Close</button>
|
|
14831
|
+
</dialog>
|
|
14648
14832
|
<div class="good-app-main">
|
|
14649
|
-
<
|
|
14650
|
-
[user]="user()" [notifications]="notifications()" [searchItems]="searchItems()" [settingsActions]="settingsActions()" [avatarActions]="avatarActions()" [showThemeToggle]="showThemeToggle()" [showSettings]="showSettings()"
|
|
14651
|
-
(menuToggle)="openDrawer()">
|
|
14652
|
-
<ng-content select="good-main-menu" ngProjectAs="good-main-menu">
|
|
14653
|
-
<good-main-menu [user]="user()" [notifications]="notifications()" [searchItems]="searchItems()" [settingsActions]="settingsActions()" [avatarActions]="avatarActions()" [showThemeToggle]="showThemeToggle()" [showSettings]="showSettings()" />
|
|
14654
|
-
</ng-content>
|
|
14655
|
-
</good-topbar>
|
|
14833
|
+
<ng-content select="good-app-header" />
|
|
14656
14834
|
<div class="good-app-page"><ng-content /></div>
|
|
14657
14835
|
</div>
|
|
14658
|
-
<dialog #drawer class="good-sidebar-drawer" aria-label="Navigation" (click)="onBackdropClick($event)" (close)="onDrawerClose()">
|
|
14659
|
-
<good-sidebar-container [brand]="brand()" [brandLogoSrc]="brandLogoSrc()" [brandLogoDarkSrc]="brandLogoDarkSrc()" [sections]="sidebarSections()" [activeRoute]="activeRoute()" />
|
|
14660
|
-
@if (topbarItems().length && mobileTopbarMenuMode() === 'hidden') {
|
|
14661
|
-
<nav class="good-drawer-topbar-nav" aria-label="More navigation">
|
|
14662
|
-
<strong>Menu</strong><good-topbar-menu-container [items]="topbarItems()" [activeRoute]="activeRoute()" />
|
|
14663
|
-
</nav>
|
|
14664
|
-
}
|
|
14665
|
-
<button type="button" class="good-drawer-close" aria-label="Close sidebar" (click)="closeDrawer()">Close</button>
|
|
14666
|
-
</dialog>
|
|
14667
14836
|
<good-notification-host />
|
|
14668
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
14837
|
+
`, isInline: true, dependencies: [{ kind: "component", type: GoodNotificationHostComponent, selector: "good-notification-host" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14669
14838
|
}
|
|
14670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type:
|
|
14839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: GoodAppShellComponent, decorators: [{
|
|
14671
14840
|
type: Component,
|
|
14672
14841
|
args: [{
|
|
14673
|
-
selector: 'good-app-
|
|
14674
|
-
|
|
14675
|
-
|
|
14842
|
+
selector: 'good-app-shell', standalone: true,
|
|
14843
|
+
imports: [GoodNotificationHostComponent],
|
|
14844
|
+
providers: [GoodShellContext],
|
|
14676
14845
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14677
14846
|
template: `
|
|
14678
|
-
<
|
|
14847
|
+
<dialog #drawer open class="good-shell-sidebar" [attr.role]="mobile() ? 'dialog' : 'presentation'"
|
|
14848
|
+
[attr.aria-label]="mobile() ? 'Navigation' : null" (click)="onBackdropClick($event)" (close)="onDrawerClose()">
|
|
14849
|
+
<ng-content select="good-sidebar" />
|
|
14850
|
+
<button type="button" class="good-drawer-close" aria-label="Close sidebar" (click)="closeDrawer()">Close</button>
|
|
14851
|
+
</dialog>
|
|
14679
14852
|
<div class="good-app-main">
|
|
14680
|
-
<
|
|
14681
|
-
[user]="user()" [notifications]="notifications()" [searchItems]="searchItems()" [settingsActions]="settingsActions()" [avatarActions]="avatarActions()" [showThemeToggle]="showThemeToggle()" [showSettings]="showSettings()"
|
|
14682
|
-
(menuToggle)="openDrawer()">
|
|
14683
|
-
<ng-content select="good-main-menu" ngProjectAs="good-main-menu">
|
|
14684
|
-
<good-main-menu [user]="user()" [notifications]="notifications()" [searchItems]="searchItems()" [settingsActions]="settingsActions()" [avatarActions]="avatarActions()" [showThemeToggle]="showThemeToggle()" [showSettings]="showSettings()" />
|
|
14685
|
-
</ng-content>
|
|
14686
|
-
</good-topbar>
|
|
14853
|
+
<ng-content select="good-app-header" />
|
|
14687
14854
|
<div class="good-app-page"><ng-content /></div>
|
|
14688
14855
|
</div>
|
|
14689
|
-
<dialog #drawer class="good-sidebar-drawer" aria-label="Navigation" (click)="onBackdropClick($event)" (close)="onDrawerClose()">
|
|
14690
|
-
<good-sidebar-container [brand]="brand()" [brandLogoSrc]="brandLogoSrc()" [brandLogoDarkSrc]="brandLogoDarkSrc()" [sections]="sidebarSections()" [activeRoute]="activeRoute()" />
|
|
14691
|
-
@if (topbarItems().length && mobileTopbarMenuMode() === 'hidden') {
|
|
14692
|
-
<nav class="good-drawer-topbar-nav" aria-label="More navigation">
|
|
14693
|
-
<strong>Menu</strong><good-topbar-menu-container [items]="topbarItems()" [activeRoute]="activeRoute()" />
|
|
14694
|
-
</nav>
|
|
14695
|
-
}
|
|
14696
|
-
<button type="button" class="good-drawer-close" aria-label="Close sidebar" (click)="closeDrawer()">Close</button>
|
|
14697
|
-
</dialog>
|
|
14698
14856
|
<good-notification-host />
|
|
14699
14857
|
`,
|
|
14700
|
-
host: { class: 'good-app-
|
|
14858
|
+
host: { class: 'good-app-shell', '[class.good-shell-without-sidebar]': '!sidebar()' },
|
|
14701
14859
|
}]
|
|
14702
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
14860
|
+
}], ctorParameters: () => [], propDecorators: { sidebar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GoodSidebarComponent), { isSignal: true }] }], drawer: [{ type: i0.ViewChild, args: ['drawer', { isSignal: true }] }], brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], brandLogoSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoSrc", required: false }] }], brandLogoDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogoDarkSrc", required: false }] }], brandMarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMarkSrc", required: false }] }], brandMarkDarkSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMarkDarkSrc", required: false }] }], showBrandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBrandIcon", required: false }] }], showMobileBrand: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMobileBrand", required: false }] }], user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], notifications: [{ type: i0.Input, args: [{ isSignal: true, alias: "notifications", required: false }] }], searchItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchItems", required: false }] }], settingsActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "settingsActions", required: false }] }], showThemeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showThemeToggle", required: false }] }], showSettings: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSettings", required: false }] }], avatarActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarActions", required: false }] }] } });
|
|
14703
14861
|
|
|
14704
14862
|
/**
|
|
14705
14863
|
* Generated bundle index. Do not edit.
|
|
14706
14864
|
*/
|
|
14707
14865
|
|
|
14708
|
-
export { GOODUI_OPTIONS, GOOD_CALENDAR_DEFAULT_NON_WORKING_LABELS, GOOD_CALENDAR_DEFAULT_WORKING_HOURS, GOOD_CHART_DEFAULT_COLORS, GOOD_CLASSIC_COLORS, GOOD_COUNTRY_CODES, GOOD_FONT_OPTIONS, GOOD_MARKER_COLORS, GOOD_PROGRESS_COLORS, GoodActionBarComponent, GoodActionGroupComponent, GoodActionMenuComponent, GoodAlertComponent,
|
|
14866
|
+
export { GOODUI_OPTIONS, GOOD_CALENDAR_DEFAULT_NON_WORKING_LABELS, GOOD_CALENDAR_DEFAULT_WORKING_HOURS, GOOD_CHART_DEFAULT_COLORS, GOOD_CLASSIC_COLORS, GOOD_COUNTRY_CODES, GOOD_FONT_OPTIONS, GOOD_MARKER_COLORS, GOOD_PROGRESS_COLORS, GoodActionBarComponent, GoodActionGroupComponent, GoodActionMenuComponent, GoodAlertComponent, GoodAppHeaderComponent, GoodAppShellComponent, GoodAssistantBodyComponent, GoodAssistantFooterComponent, GoodAssistantHeaderComponent, GoodAssistantMainComponent, GoodAssistantMobileComponent, GoodAssistantPanelComponent, GoodAvatarMenuItemComponent, GoodBadgeComponent, GoodBarChartComponent, GoodBrandIconComponent, GoodBreadcrumbsComponent, GoodButtonComponent, GoodCalendarComponent, GoodCalendarService, GoodCardActionsDirective, GoodCardComponent, GoodCardFooterComponent, GoodCardHeaderComponent, GoodChartAxisComponent, GoodChartBarComponent, GoodChartHistogramComponent, GoodChartLineComponent, GoodChartScatterComponent, GoodCheckboxComponent, GoodCitationComponent, GoodCodeBlockComponent, GoodColorControlsComponent, GoodColorPickerComponent, GoodColumnComponent, GoodColumnsComponent, GoodDateInputComponent, GoodDetailListComponent, GoodDetailRowDirective, GoodDropdownComponent, GoodDropdownFooterDirective, GoodDropdownHeaderDirective, GoodErrorPageComponent, GoodErrorTextComponent, GoodExpandableComponent, GoodExpandableHeaderDirective, GoodEyebrowComponent, GoodFieldLabelComponent, GoodFormDirective, GoodFormFieldComponent, GoodFormRowComponent, GoodGroupComponent, GoodHeaderActionsComponent, GoodHeaderAvatarComponent, GoodHeaderDropdownItemComponent, GoodHeaderDropdownMenuComponent, GoodHeaderMenuComponent, GoodHeaderMenuItemComponent, GoodHeaderNotificationComponent, GoodHeaderSearchComponent, GoodHeaderSubmenuComponent, GoodHeaderThemeToggleComponent, GoodHeading1Component, GoodHeading2Component, GoodHeading3Component, GoodHeading4Component, GoodHeading5Component, GoodHeading6Component, GoodHeading7Component, GoodHeadingGroupComponent, GoodHintComponent, GoodHistogramComponent, GoodIconComponent, GoodImageInputComponent, GoodImagePreviewComponent, GoodInlineImageComponent, GoodInputComponent, GoodInputPhoneComponent, GoodLineChartComponent, GoodLinkComponent, GoodListboxComponent, GoodListboxItemDirective, GoodMainViewComponent, GoodMapColorScaleComponent, GoodMapOverlayComponent, GoodModalComponent, GoodModalFooterComponent, GoodModalHeaderComponent, GoodMonthCalendarComponent, GoodNotificationCenter, GoodNotificationHostComponent, GoodNumberInputComponent, GoodParagraphComponent, GoodPdfPreviewComponent, GoodPinInputComponent, GoodProgressComponent, GoodProseComponent, GoodRadioGroupComponent, GoodRangeSliderComponent, GoodRatingComponent, GoodResizableComponent, GoodResizablePaneComponent, GoodRichTextEditorComponent, GoodScatterChartComponent, GoodSectionComponent, GoodSelectComponent, GoodSelectCountryComponent, GoodSelectFontComponent, GoodSeparatorComponent, GoodSettingsComponent, GoodSidebarComponent, GoodSidebarItemComponent, GoodSidebarMenuContainerComponent, GoodSidebarSubmenuGroupComponent, GoodSidebarSubmenuItemComponent, GoodSignaturePadComponent, GoodSparklineComponent, GoodStatusIconComponent, GoodSubnavComponent, GoodSummaryComponent, GoodSwitchComponent, GoodTabComponent, GoodTableCellDirective, GoodTableComponent, GoodTabsComponent, GoodTextareaComponent, GoodThemeService, GoodTimelineComponent, GoodTimelineSectionComponent, GoodTimelineStepComponent, GoodWorldMapComponent, detectAvailableFonts, goodCalendarAddDays, goodCalendarDayKey, goodCalendarMoveEvent, goodCalendarNonWorkingPeriods, goodCalendarNormalizeEvent, goodCalendarResizeEvent, goodCalendarStartOfDay, goodCalendarStartOfWeek, goodFontFamilyCss, goodItemContainsRoute, goodPinAllowedCharacters, goodRouteActive, goodSignatureInkml, goodSignaturePath, goodSignatureSvg, goodSubnavItemContainsRoute, goodTopbarItemContainsRoute, provideGoodUI, resolveChartColor, resolveChartLines, resolveChartSeries, resolveHistogram, resolveScatterSeries };
|
|
14709
14867
|
//# sourceMappingURL=cloudfrogger-goodui.mjs.map
|