@spicainternational/ngx-sds-components 9.1.1 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, inject, computed, Component, QueryList, signal, ContentChildren, Input, EventEmitter, Output,
|
|
3
|
-
import * as i1 from '@angular/router';
|
|
4
|
-
import { Router, NavigationEnd, RouterLink } from '@angular/router';
|
|
5
|
-
import { NgIf, NgFor } from '@angular/common';
|
|
2
|
+
import { input, model, inject, computed, Component, QueryList, signal, ContentChildren, Input, EventEmitter, Output, output, effect, ChangeDetectionStrategy, contentChildren, untracked, Pipe } from '@angular/core';
|
|
6
3
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
4
|
+
import { Router, NavigationEnd, RouterLink } from '@angular/router';
|
|
5
|
+
import { NgIf, NgTemplateOutlet, NgFor } from '@angular/common';
|
|
6
|
+
import { filter, map, tap } from 'rxjs';
|
|
7
|
+
import { faAngleUp, faAngleDown, faExternalLink, faUser, faSignOut, faCircleExclamation, faTriangleExclamation, faCircleInfo, faEyeSlash, faArrowLeftFromLine, faArrowRightFromLine } from '@fortawesome/pro-regular-svg-icons';
|
|
8
|
+
import * as i2 from 'devextreme-angular/ui/nested';
|
|
10
9
|
import { DxoPositionModule } from 'devextreme-angular/ui/nested';
|
|
11
|
-
import * as
|
|
10
|
+
import * as i1 from 'devextreme-angular/ui/popover';
|
|
12
11
|
import { DxPopoverModule } from 'devextreme-angular/ui/popover';
|
|
13
12
|
import * as i1$1 from '@fortawesome/angular-fontawesome';
|
|
14
13
|
import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
15
14
|
import { SdsAvatarComponent } from '@spicainternational/ngx-sds-components/src/lib/avatar';
|
|
15
|
+
import { CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
16
16
|
import { SdsAppSwitcherComponent } from '@spicainternational/ngx-sds-components/src/lib/app-switcher';
|
|
17
17
|
|
|
18
18
|
function removeQueryParams(url) {
|
|
19
19
|
return url.split('?')[0];
|
|
20
20
|
}
|
|
21
|
+
function toActiveRouteRegExp(pattern) {
|
|
22
|
+
if (!pattern) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return typeof pattern === 'string' ? new RegExp(pattern) : pattern;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Determines if the provided URL (e.g. router.url) is active for a navigation entity.
|
|
29
|
+
* If `activeRoutePattern` is provided, it is tested against the full URL.
|
|
30
|
+
* Otherwise the legacy matching (default link + nested routes) is used.
|
|
31
|
+
*/
|
|
32
|
+
function isRouteActive(url, options) {
|
|
33
|
+
const activeRouteRegExp = toActiveRouteRegExp(options.activeRoutePattern);
|
|
34
|
+
if (activeRouteRegExp) {
|
|
35
|
+
return activeRouteRegExp.test(url);
|
|
36
|
+
}
|
|
37
|
+
const activeRoute = options.ignoreQueryParams ? removeQueryParams(url) : url;
|
|
38
|
+
const currentUrl = activeRoute.split('/').filter((part) => part.length > 0);
|
|
39
|
+
return isUrlPartOfNavigationGroup(currentUrl, options.nestedRoutes ?? [], options.defaultLink ?? '');
|
|
40
|
+
}
|
|
21
41
|
function isUrlPartOfNavigationGroup(currentUrl, nestedRoutes, defaultGroupUrl) {
|
|
22
42
|
if (!currentUrl || currentUrl?.length === 0) {
|
|
23
43
|
return false;
|
|
@@ -90,37 +110,14 @@ class SdsNavigationRouteLinkComponent {
|
|
|
90
110
|
/** @deprecated Use `activeRoutePattern` instead. */
|
|
91
111
|
this.ignoreQueryParamsInActiveRoute = input(false, ...(ngDevMode ? [{ debugName: "ignoreQueryParamsInActiveRoute" }] : /* istanbul ignore next */ []));
|
|
92
112
|
this.#router = inject(Router);
|
|
93
|
-
this
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
99
|
-
this.#activeRoutePatternRegExp = computed(() => {
|
|
100
|
-
if (!this.activeRoutePattern()) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
if (typeof this.activeRoutePattern() === 'string') {
|
|
104
|
-
return new RegExp(this.activeRoutePattern());
|
|
105
|
-
}
|
|
106
|
-
return this.activeRoutePattern();
|
|
107
|
-
}, ...(ngDevMode ? [{ debugName: "#activeRoutePatternRegExp" }] : /* istanbul ignore next */ []));
|
|
108
|
-
this.isActive = computed(() => {
|
|
109
|
-
// If activeRoutePattern is provided, we should use it to determine if route is active
|
|
110
|
-
if (this.#activeRoutePatternRegExp()) {
|
|
111
|
-
return this.#activeRoutePatternRegExp().test(this.#routerUrl());
|
|
112
|
-
}
|
|
113
|
-
// Otherwise we should check if current route is part of navigation group (either default link or nested links)
|
|
114
|
-
const currentUrl = this.#currentUrl();
|
|
115
|
-
const nestedLinks = this.nestedLinks();
|
|
116
|
-
const defaultLink = this.link();
|
|
117
|
-
const isActive = isUrlPartOfNavigationGroup(currentUrl, nestedLinks, defaultLink);
|
|
118
|
-
return isActive;
|
|
119
|
-
}, ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
113
|
+
this.isActive = computed(() => isRouteActive(this.#routerUrl(), {
|
|
114
|
+
activeRoutePattern: this.activeRoutePattern(),
|
|
115
|
+
nestedRoutes: this.nestedLinks(),
|
|
116
|
+
defaultLink: this.link(),
|
|
117
|
+
ignoreQueryParams: this.ignoreQueryParamsInActiveRoute(),
|
|
118
|
+
}), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
120
119
|
this.#routerUrl = toSignal(this.#router.events.pipe(filter((event) => event instanceof NavigationEnd), map((event) => event.urlAfterRedirects)), { initialValue: this.#router.url });
|
|
121
120
|
}
|
|
122
|
-
#currentUrl;
|
|
123
|
-
#activeRoutePatternRegExp;
|
|
124
121
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationRouteLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
122
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.23", type: SdsNavigationRouteLinkComponent, isStandalone: true, selector: "sds-navigation-route-link", inputs: { link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, nestedLinks: { classPropertyName: "nestedLinks", publicName: "nestedLinks", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, activeRoutePattern: { classPropertyName: "activeRoutePattern", publicName: "activeRoutePattern", isSignal: true, isRequired: false, transformFunction: null }, additionalInfo: { classPropertyName: "additionalInfo", publicName: "additionalInfo", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryParamsInActiveRoute: { classPropertyName: "ignoreQueryParamsInActiveRoute", publicName: "ignoreQueryParamsInActiveRoute", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, ngImport: i0, template: "<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\n<div \n class=\"sds-navigation-router-link sds-navigation-item-container\"\n [class.disabled]=\"disabled()\"\n [class.active]=\"isActive()\"\n [title]=\"isCollapsed() ? text() : ''\"\n >\n \n <a class=\"sds-navigation-item-content w-100 pe-2 text-gray-800 sds-fs-93\" \n [routerLink]=\"disabled() ? null : link()\"\n >\n <div class=\"d-flex align-items-center w-100 justify-content-center\">\n <div class=\"sds-navigation-icon\" >\n <ng-content select=\"[navigationIcon]\"></ng-content>\n </div>\n\n <ng-container *ngIf=\"!isCollapsed()\">\n <div class=\"sds-navigation-text user-select-none\">\n {{ text() }}\n </div>\n <span *ngIf=\"additionalInfo()\"\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning text-body\"\n >{{ additionalInfo() }}</span\n > \n </ng-container>\n </div>\n </a>\n</div>", styles: [".sds-navigation-router-link.sds-navigation-item-container.disabled{pointer-events:none;opacity:.6}.sds-navigation-router-link.active>a{font-weight:600!important}.sds-navigation-router-link.sds-navigation-item-container.active{background-color:var(--sds-navigation-active-item)!important}.sds-navigation-router-link.sds-navigation-item-container:hover:not(.active){background-color:var(--bs-gray-200)!important}.sds-navigation-router-link.sds-navigation-item-container{border-radius:.266rem;border-left:none!important}.sds-navigation-router-link{padding:0!important}.sds-navigation-router-link a{padding-top:.5rem!important;padding-bottom:.5rem!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
126
123
|
}
|
|
@@ -130,19 +127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
130
127
|
}], ctorParameters: () => [], propDecorators: { link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], nestedLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "nestedLinks", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], activeRoutePattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRoutePattern", required: false }] }], additionalInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalInfo", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], ignoreQueryParamsInActiveRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryParamsInActiveRoute", required: false }] }] } });
|
|
131
128
|
|
|
132
129
|
class SdsNavigationGroupComponent {
|
|
133
|
-
|
|
134
|
-
set navigationGroupNestedRoutes(value) {
|
|
135
|
-
this._navigationGroupNestedRoutes = value;
|
|
136
|
-
}
|
|
137
|
-
get navigationGroupNestedRoutes() {
|
|
138
|
-
return this._navigationGroupNestedRoutes;
|
|
139
|
-
}
|
|
140
|
-
#MOUSE_MOVE_TO_POPOVER_DELAY;
|
|
141
|
-
#pendingOpenTimeoutId;
|
|
142
|
-
#pendingCloseTimeoutId;
|
|
143
|
-
#closeRequested;
|
|
144
|
-
constructor(_router) {
|
|
145
|
-
this._router = _router;
|
|
130
|
+
constructor() {
|
|
146
131
|
/**
|
|
147
132
|
@deprecated Use `activeRoutePattern` instead.
|
|
148
133
|
* List of paths allowed/expected within this module.
|
|
@@ -150,13 +135,13 @@ class SdsNavigationGroupComponent {
|
|
|
150
135
|
* elements, but through links in other parts of the application (e.g. link
|
|
151
136
|
* on form)
|
|
152
137
|
*/
|
|
153
|
-
this.
|
|
138
|
+
this.navigationGroupNestedRoutes = input([], ...(ngDevMode ? [{ debugName: "navigationGroupNestedRoutes" }] : /* istanbul ignore next */ []));
|
|
154
139
|
this.text = '';
|
|
155
140
|
this.icon = '';
|
|
156
|
-
this.defaultRouterLink = '';
|
|
141
|
+
this.defaultRouterLink = input('', ...(ngDevMode ? [{ debugName: "defaultRouterLink" }] : /* istanbul ignore next */ []));
|
|
157
142
|
this.reverse = false;
|
|
158
143
|
/** @deprecated Use `activeRoutePattern` instead. */
|
|
159
|
-
this.ignoreQueryParamsInActiveRoute = false;
|
|
144
|
+
this.ignoreQueryParamsInActiveRoute = input(false, ...(ngDevMode ? [{ debugName: "ignoreQueryParamsInActiveRoute" }] : /* istanbul ignore next */ []));
|
|
160
145
|
this.disabled = false;
|
|
161
146
|
this.showPopover = false;
|
|
162
147
|
this.showPopoverHeader = false;
|
|
@@ -175,12 +160,14 @@ class SdsNavigationGroupComponent {
|
|
|
175
160
|
this.isPopoverVisible = signal(false, ...(ngDevMode ? [{ debugName: "isPopoverVisible" }] : /* istanbul ignore next */ []));
|
|
176
161
|
this.faAngleUpRegular = faAngleUp;
|
|
177
162
|
this.faAngleDownRegular = faAngleDown;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
this.#router = inject(Router);
|
|
164
|
+
this.#routerUrl = toSignal(this.#router.events.pipe(filter((event) => event instanceof NavigationEnd), tap(() => this.isPopoverVisible.set(false)), map((event) => event.urlAfterRedirects)), { initialValue: this.#router.url });
|
|
165
|
+
this.isGroupActive = computed(() => isRouteActive(this.#routerUrl(), {
|
|
166
|
+
activeRoutePattern: this.activeRoutePattern(),
|
|
167
|
+
nestedRoutes: this.navigationGroupNestedRoutes(),
|
|
168
|
+
defaultLink: this.defaultRouterLink(),
|
|
169
|
+
ignoreQueryParams: this.ignoreQueryParamsInActiveRoute()
|
|
170
|
+
}), ...(ngDevMode ? [{ debugName: "isGroupActive" }] : /* istanbul ignore next */ []));
|
|
184
171
|
this.isActiveGroupClosed = false;
|
|
185
172
|
this.#MOUSE_MOVE_TO_POPOVER_DELAY = 200;
|
|
186
173
|
this.#pendingOpenTimeoutId = null;
|
|
@@ -189,51 +176,13 @@ class SdsNavigationGroupComponent {
|
|
|
189
176
|
this.isCollapsed = model(false, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
190
177
|
this.lastPointerType = signal('mouse', ...(ngDevMode ? [{ debugName: "lastPointerType" }] : /* istanbul ignore next */ []));
|
|
191
178
|
this.isTouchPointerType = computed(() => this.lastPointerType() === 'touch', ...(ngDevMode ? [{ debugName: "isTouchPointerType" }] : /* istanbul ignore next */ []));
|
|
192
|
-
this.#activeRoutePatternRegExp = computed(() => {
|
|
193
|
-
if (!this.activeRoutePattern()) {
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
if (typeof this.activeRoutePattern() === 'string') {
|
|
197
|
-
return new RegExp(this.activeRoutePattern());
|
|
198
|
-
}
|
|
199
|
-
return this.activeRoutePattern();
|
|
200
|
-
}, ...(ngDevMode ? [{ debugName: "#activeRoutePatternRegExp" }] : /* istanbul ignore next */ []));
|
|
201
|
-
}
|
|
202
|
-
#activeRoutePatternRegExp;
|
|
203
|
-
ngOnInit() {
|
|
204
|
-
this._router.events.pipe(filter((event) => event instanceof NavigationEnd), takeUntil(this._unsubscribe)).subscribe((event) => {
|
|
205
|
-
if (event instanceof NavigationEnd) {
|
|
206
|
-
this.isPopoverVisible.set(false);
|
|
207
|
-
if (this.#activeRoutePatternRegExp()) {
|
|
208
|
-
this.isGroupActive = this.#activeRoutePatternRegExp().test(event.urlAfterRedirects);
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
const activeRoute = this.ignoreQueryParamsInActiveRoute ? removeQueryParams(event.urlAfterRedirects) : event.urlAfterRedirects;
|
|
212
|
-
const route = activeRoute.split('/').filter(item => item.length > 0);
|
|
213
|
-
this.currentUrl = route;
|
|
214
|
-
this.isGroupActive = isUrlPartOfNavigationGroup(this.currentUrl, this.navigationGroupNestedRoutes, this.defaultRouterLink);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
ngOnChanges(changes) {
|
|
220
|
-
if (changes['navigationGroupNestedRoutes'] || changes['defaultRouterLink']) {
|
|
221
|
-
this.isPopoverVisible.set(false);
|
|
222
|
-
if (this.#activeRoutePatternRegExp()) {
|
|
223
|
-
this.isGroupActive = this.#activeRoutePatternRegExp().test(this._router.url);
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
const activeRoute = this.ignoreQueryParamsInActiveRoute ? removeQueryParams(this._router.url) : this._router.url;
|
|
227
|
-
const route = activeRoute.split('/').filter(item => item.length > 0);
|
|
228
|
-
this.currentUrl = route;
|
|
229
|
-
this.isGroupActive = isUrlPartOfNavigationGroup(this.currentUrl, this.navigationGroupNestedRoutes, this.defaultRouterLink);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
ngOnDestroy() {
|
|
234
|
-
this._unsubscribe.next();
|
|
235
|
-
this._unsubscribe.complete();
|
|
236
179
|
}
|
|
180
|
+
#router;
|
|
181
|
+
#routerUrl;
|
|
182
|
+
#MOUSE_MOVE_TO_POPOVER_DELAY;
|
|
183
|
+
#pendingOpenTimeoutId;
|
|
184
|
+
#pendingCloseTimeoutId;
|
|
185
|
+
#closeRequested;
|
|
237
186
|
onMouseEnter() {
|
|
238
187
|
const isTouchPointerType = this.isTouchPointerType();
|
|
239
188
|
if (!isTouchPointerType) {
|
|
@@ -277,8 +226,8 @@ class SdsNavigationGroupComponent {
|
|
|
277
226
|
this.isPopoverVisible.set(true);
|
|
278
227
|
}
|
|
279
228
|
else {
|
|
280
|
-
if (this.defaultRouterLink) {
|
|
281
|
-
this.
|
|
229
|
+
if (this.defaultRouterLink()) {
|
|
230
|
+
this.#router.navigateByUrl(this.defaultRouterLink());
|
|
282
231
|
}
|
|
283
232
|
}
|
|
284
233
|
}
|
|
@@ -300,8 +249,8 @@ class SdsNavigationGroupComponent {
|
|
|
300
249
|
rememberPointer(e) {
|
|
301
250
|
this.lastPointerType.set(e.pointerType ?? 'mouse');
|
|
302
251
|
}
|
|
303
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationGroupComponent, deps: [
|
|
304
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.23", type: SdsNavigationGroupComponent, isStandalone: true, selector: "sds-navigation-group", inputs: { navigationGroupNestedRoutes: { classPropertyName: "navigationGroupNestedRoutes", publicName: "navigationGroupNestedRoutes", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, defaultRouterLink: { classPropertyName: "defaultRouterLink", publicName: "defaultRouterLink", isSignal: false, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: false, isRequired: false, transformFunction: null }, ignoreQueryParamsInActiveRoute: { classPropertyName: "ignoreQueryParamsInActiveRoute", publicName: "ignoreQueryParamsInActiveRoute", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, showPopover: { classPropertyName: "showPopover", publicName: "showPopover", isSignal: false, isRequired: false, transformFunction: null }, showPopoverHeader: { classPropertyName: "showPopoverHeader", publicName: "showPopoverHeader", isSignal: false, isRequired: false, transformFunction: null }, lightStyle: { classPropertyName: "lightStyle", publicName: "lightStyle", isSignal: true, isRequired: false, transformFunction: null }, activeRoutePattern: { classPropertyName: "activeRoutePattern", publicName: "activeRoutePattern", isSignal: true, isRequired: false, transformFunction: null }, additionalInfo: { classPropertyName: "additionalInfo", publicName: "additionalInfo", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, queries: [{ propertyName: "routerLinkComponents", predicate: SdsNavigationRouteLinkComponent }], usesOnChanges: true, ngImport: i0, template: "<div \n #navigationGroup\n class=\"sds-navigation-group sds-navigation-item-container d-flex\"\n [class.sds-navigation-group-light-style]=\"lightStyle()\"\n [class.flex-column-reverse]=\"reverse\"\n [class.flex-column]=\"!reverse\"\n [class.disabled]=\"disabled\"\n [class.active]=\"isGroupActive\"\n [class.collapsed]=\"isCollapsed()\"\n [class.popoverVisible]=\"isPopoverVisible()\"\n >\n <a \n class=\"w-100 sds-navigation-item-content p-2 text-gray-800 sds-fs-93\"\n [class.collapsed]=\"isCollapsed()\"\n style=\"cursor: pointer\"\n [routerLink]=\"(isCollapsed() && isTouchPointerType()) ? undefined : [defaultRouterLink]\"\n (pointerdown)=\"rememberPointer($event)\"\n\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onClick()\"\n >\n <div class=\"d-flex align-items-center w-100 justify-content-center\">\n <div class=\"sds-navigation-icon\" >\n <ng-content select=\"[navigationIcon]\"></ng-content>\n </div>\n \n <ng-container *ngIf=\"!isCollapsed()\">\n <div class=\"sds-navigation-text user-select-none\">\n {{ text }}\n </div>\n <span *ngIf=\"additionalInfo() && !isGroupActive\"\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning text-body me-2\"\n >{{ additionalInfo() }}\n </span>\n <div class=\"text-right group-dropdown\">\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\n </div>\n </ng-container>\n </div>\n </a>\n\n <div \n class=\"sub-menu\" \n *ngIf=\"!isCollapsed()\">\n\n <div class=\"sds-navigation-group-items sds-flex-column gap-05\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"isCollapsed() || (showPopover && !isGroupActive)\">\n <dx-popover\n [target]=\"navigationGroup\"\n \n \n (onHiding)=\"onHiding($event)\"\n width=\"15rem\"\n [wrapperAttr]=\"{ class: 'sds-navigation-group-popover-wrapper sds-dx-popup-content-padding-2', style: 'border-left: none'}\"\n [hideOnOutsideClick]=\"true\"\n [hideOnParentScroll]=\"true\"\n [animation]=\"{}\"\n [(visible)]=\"isPopoverVisible\"\n >\n\n <dxo-position\n my=\"top left\"\n at=\"top right\"\n [of]=\"navigationGroup\"\n offset=\"-10 -5\"\n >\n </dxo-position>\n\n <div *ngIf=\"showPopoverHeader && isCollapsed()\" class=\"group-header user-select-none\">\n {{ text }}\n </div>\n <div \n class=\"sds-navigation-container sds-navigation-popover-container sds-scrollbar sds-scrollbar-thin sds-scrollbar-no-hide\"\n >\n <div class=\"sds-navigation-group-items\">\n <ng-content select=\"[popoverContent]\"></ng-content>\n </div>\n </div>\n </dx-popover>\n</ng-container>\n", styles: [".gap-05{gap:.125rem!important}.sds-navigation-group.sds-navigation-item-container{border-radius:.266rem;border-left:none!important;padding-top:0!important;padding-bottom:0!important}.sds-navigation-group.sds-navigation-item-container a{padding-top:.6rem!important;padding-bottom:.6rem!important}.sds-navigation-group.sds-navigation-item-container.disabled{pointer-events:none;opacity:.6}.sds-navigation-group.active>a{font-weight:600}.sds-navigation-group.active{background-color:var(--sds-navigation-active-item)!important}.sds-navigation-group.active:not(.collapsed){background-color:transparent!important}.sds-navigation-group .group-dropdown{transition:transform .2s ease-out}.sds-navigation-group.popoverVisible:not(.active){background-color:var(--bs-gray-200)}.sds-navigation-group.popoverVisible:not(.active) .group-dropdown{transform:rotate(-90deg)}.sds-navigation-group .sub-menu{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out}.sds-navigation-group .sub-menu>div{overflow:hidden;min-height:0}.sds-navigation-group.active .sub-menu{grid-template-rows:1fr}::ng-deep .sds-navigation-group-popover-wrapper{--sds-navigation-active-item: oklch(.6 .2 var(--sds-brand-hue) / .12)}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-0 .dx-popup-content{padding:0rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-1 .dx-popup-content{padding:.25rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-2 .dx-popup-content{padding:.5rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-3 .dx-popup-content{padding:1rem}::ng-deep .sds-navigation-group-popover-wrapper .dx-popover-arrow{display:none}::ng-deep .sds-navigation-group-popover-wrapper .group-header{font-weight:600;padding:.25rem .75rem .5rem .5rem}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container{color:var(--bs-body-color)!important;padding-bottom:.07rem;overflow-y:auto;max-height:45vh}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .active{font-weight:500}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-icon{display:none}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container{border-left:none;padding-top:.25rem;padding-bottom:.25rem;border-radius:var(--bs-border-radius);color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-item-content{padding-top:.25rem;padding-bottom:.25rem;padding-left:1rem;color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-header{color:var(--bs-body-color)!important}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "ngmodule", type: DxPopoverModule }, { kind: "component", type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "deferRendering", "disabled", "enableBodyScroll", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "deferRenderingChange", "disabledChange", "enableBodyScrollChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i3.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "ngmodule", type: DxoPositionModule }] }); }
|
|
252
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
253
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.23", type: SdsNavigationGroupComponent, isStandalone: true, selector: "sds-navigation-group", inputs: { navigationGroupNestedRoutes: { classPropertyName: "navigationGroupNestedRoutes", publicName: "navigationGroupNestedRoutes", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, defaultRouterLink: { classPropertyName: "defaultRouterLink", publicName: "defaultRouterLink", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: false, isRequired: false, transformFunction: null }, ignoreQueryParamsInActiveRoute: { classPropertyName: "ignoreQueryParamsInActiveRoute", publicName: "ignoreQueryParamsInActiveRoute", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, showPopover: { classPropertyName: "showPopover", publicName: "showPopover", isSignal: false, isRequired: false, transformFunction: null }, showPopoverHeader: { classPropertyName: "showPopoverHeader", publicName: "showPopoverHeader", isSignal: false, isRequired: false, transformFunction: null }, lightStyle: { classPropertyName: "lightStyle", publicName: "lightStyle", isSignal: true, isRequired: false, transformFunction: null }, activeRoutePattern: { classPropertyName: "activeRoutePattern", publicName: "activeRoutePattern", isSignal: true, isRequired: false, transformFunction: null }, additionalInfo: { classPropertyName: "additionalInfo", publicName: "additionalInfo", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, queries: [{ propertyName: "routerLinkComponents", predicate: SdsNavigationRouteLinkComponent }], ngImport: i0, template: "<div \n #navigationGroup\n class=\"sds-navigation-group sds-navigation-item-container d-flex\"\n [class.sds-navigation-group-light-style]=\"lightStyle()\"\n [class.flex-column-reverse]=\"reverse\"\n [class.flex-column]=\"!reverse\"\n [class.disabled]=\"disabled\"\n [class.active]=\"isGroupActive()\"\n [class.collapsed]=\"isCollapsed()\"\n [class.popoverVisible]=\"isPopoverVisible()\"\n >\n <a \n class=\"w-100 sds-navigation-item-content p-2 text-gray-800 sds-fs-93\"\n [class.collapsed]=\"isCollapsed()\"\n style=\"cursor: pointer\"\n [routerLink]=\"(isCollapsed() && isTouchPointerType()) ? undefined : [defaultRouterLink()]\"\n (pointerdown)=\"rememberPointer($event)\"\n\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onClick()\"\n >\n <div class=\"d-flex align-items-center w-100 justify-content-center\">\n <div class=\"sds-navigation-icon\" >\n <ng-content select=\"[navigationIcon]\"></ng-content>\n </div>\n \n <ng-container *ngIf=\"!isCollapsed()\">\n <div class=\"sds-navigation-text user-select-none\">\n {{ text }}\n </div>\n <span *ngIf=\"additionalInfo() && !isGroupActive()\"\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning text-body me-2\"\n >{{ additionalInfo() }}\n </span>\n <div class=\"text-right group-dropdown\">\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\n </div>\n </ng-container>\n </div>\n </a>\n\n <div \n class=\"sub-menu\" \n *ngIf=\"!isCollapsed()\">\n\n <div class=\"sds-navigation-group-items sds-flex-column gap-05\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"isCollapsed() || (showPopover && !isGroupActive())\">\n <dx-popover\n [target]=\"navigationGroup\"\n \n \n (onHiding)=\"onHiding($event)\"\n width=\"15rem\"\n [wrapperAttr]=\"{ class: 'sds-navigation-group-popover-wrapper sds-dx-popup-content-padding-2', style: 'border-left: none'}\"\n [hideOnOutsideClick]=\"true\"\n [hideOnParentScroll]=\"true\"\n [animation]=\"{}\"\n [(visible)]=\"isPopoverVisible\"\n >\n\n <dxo-position\n my=\"top left\"\n at=\"top right\"\n [of]=\"navigationGroup\"\n offset=\"-10 -5\"\n >\n </dxo-position>\n\n <div *ngIf=\"showPopoverHeader && isCollapsed()\" class=\"group-header user-select-none\">\n {{ text }}\n </div>\n <div \n class=\"sds-navigation-container sds-navigation-popover-container sds-scrollbar sds-scrollbar-thin sds-scrollbar-no-hide\"\n >\n <div class=\"sds-navigation-group-items\">\n <ng-content select=\"[popoverContent]\"></ng-content>\n </div>\n </div>\n </dx-popover>\n</ng-container>\n", styles: [".gap-05{gap:.125rem!important}.sds-navigation-group.sds-navigation-item-container{border-radius:.266rem;border-left:none!important;padding-top:0!important;padding-bottom:0!important}.sds-navigation-group.sds-navigation-item-container a{padding-top:.6rem!important;padding-bottom:.6rem!important}.sds-navigation-group.sds-navigation-item-container.disabled{pointer-events:none;opacity:.6}.sds-navigation-group.active>a{font-weight:600}.sds-navigation-group.active{background-color:var(--sds-navigation-active-item)!important}.sds-navigation-group.active:not(.collapsed){background-color:transparent!important}.sds-navigation-group .group-dropdown{transition:transform .2s ease-out}.sds-navigation-group.popoverVisible:not(.active){background-color:var(--bs-gray-200)}.sds-navigation-group.popoverVisible:not(.active) .group-dropdown{transform:rotate(-90deg)}.sds-navigation-group .sub-menu{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out}.sds-navigation-group .sub-menu>div{overflow:hidden;min-height:0}.sds-navigation-group.active .sub-menu{grid-template-rows:1fr}::ng-deep .sds-navigation-group-popover-wrapper{--sds-navigation-active-item: oklch(.6 .2 var(--sds-brand-hue) / .12)}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-0 .dx-popup-content{padding:0rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-1 .dx-popup-content{padding:.25rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-2 .dx-popup-content{padding:.5rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-3 .dx-popup-content{padding:1rem}::ng-deep .sds-navigation-group-popover-wrapper .dx-popover-arrow{display:none}::ng-deep .sds-navigation-group-popover-wrapper .group-header{font-weight:600;padding:.25rem .75rem .5rem .5rem}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container{color:var(--bs-body-color)!important;padding-bottom:.07rem;overflow-y:auto;max-height:45vh}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .active{font-weight:500}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-icon{display:none}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container{border-left:none;padding-top:.25rem;padding-bottom:.25rem;border-radius:var(--bs-border-radius);color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-item-content{padding-top:.25rem;padding-bottom:.25rem;padding-left:1rem;color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-header{color:var(--bs-body-color)!important}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "ngmodule", type: DxPopoverModule }, { kind: "component", type: i1.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "deferRendering", "disabled", "enableBodyScroll", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "deferRenderingChange", "disabledChange", "enableBodyScrollChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i2.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "ngmodule", type: DxoPositionModule }] }); }
|
|
305
254
|
}
|
|
306
255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationGroupComponent, decorators: [{
|
|
307
256
|
type: Component,
|
|
@@ -311,20 +260,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
311
260
|
FaIconComponent,
|
|
312
261
|
DxPopoverModule,
|
|
313
262
|
DxoPositionModule
|
|
314
|
-
], template: "<div \n #navigationGroup\n class=\"sds-navigation-group sds-navigation-item-container d-flex\"\n [class.sds-navigation-group-light-style]=\"lightStyle()\"\n [class.flex-column-reverse]=\"reverse\"\n [class.flex-column]=\"!reverse\"\n [class.disabled]=\"disabled\"\n [class.active]=\"isGroupActive\"\n [class.collapsed]=\"isCollapsed()\"\n [class.popoverVisible]=\"isPopoverVisible()\"\n >\n <a \n class=\"w-100 sds-navigation-item-content p-2 text-gray-800 sds-fs-93\"\n [class.collapsed]=\"isCollapsed()\"\n style=\"cursor: pointer\"\n [routerLink]=\"(isCollapsed() && isTouchPointerType()) ? undefined : [defaultRouterLink]\"\n (pointerdown)=\"rememberPointer($event)\"\n\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onClick()\"\n >\n <div class=\"d-flex align-items-center w-100 justify-content-center\">\n <div class=\"sds-navigation-icon\" >\n <ng-content select=\"[navigationIcon]\"></ng-content>\n </div>\n \n <ng-container *ngIf=\"!isCollapsed()\">\n <div class=\"sds-navigation-text user-select-none\">\n {{ text }}\n </div>\n <span *ngIf=\"additionalInfo() && !isGroupActive\"\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning text-body me-2\"\n >{{ additionalInfo() }}\n </span>\n <div class=\"text-right group-dropdown\">\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\n </div>\n </ng-container>\n </div>\n </a>\n\n <div \n class=\"sub-menu\" \n *ngIf=\"!isCollapsed()\">\n\n <div class=\"sds-navigation-group-items sds-flex-column gap-05\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"isCollapsed() || (showPopover && !isGroupActive)\">\n <dx-popover\n [target]=\"navigationGroup\"\n \n \n (onHiding)=\"onHiding($event)\"\n width=\"15rem\"\n [wrapperAttr]=\"{ class: 'sds-navigation-group-popover-wrapper sds-dx-popup-content-padding-2', style: 'border-left: none'}\"\n [hideOnOutsideClick]=\"true\"\n [hideOnParentScroll]=\"true\"\n [animation]=\"{}\"\n [(visible)]=\"isPopoverVisible\"\n >\n\n <dxo-position\n my=\"top left\"\n at=\"top right\"\n [of]=\"navigationGroup\"\n offset=\"-10 -5\"\n >\n </dxo-position>\n\n <div *ngIf=\"showPopoverHeader && isCollapsed()\" class=\"group-header user-select-none\">\n {{ text }}\n </div>\n <div \n class=\"sds-navigation-container sds-navigation-popover-container sds-scrollbar sds-scrollbar-thin sds-scrollbar-no-hide\"\n >\n <div class=\"sds-navigation-group-items\">\n <ng-content select=\"[popoverContent]\"></ng-content>\n </div>\n </div>\n </dx-popover>\n</ng-container>\n", styles: [".gap-05{gap:.125rem!important}.sds-navigation-group.sds-navigation-item-container{border-radius:.266rem;border-left:none!important;padding-top:0!important;padding-bottom:0!important}.sds-navigation-group.sds-navigation-item-container a{padding-top:.6rem!important;padding-bottom:.6rem!important}.sds-navigation-group.sds-navigation-item-container.disabled{pointer-events:none;opacity:.6}.sds-navigation-group.active>a{font-weight:600}.sds-navigation-group.active{background-color:var(--sds-navigation-active-item)!important}.sds-navigation-group.active:not(.collapsed){background-color:transparent!important}.sds-navigation-group .group-dropdown{transition:transform .2s ease-out}.sds-navigation-group.popoverVisible:not(.active){background-color:var(--bs-gray-200)}.sds-navigation-group.popoverVisible:not(.active) .group-dropdown{transform:rotate(-90deg)}.sds-navigation-group .sub-menu{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out}.sds-navigation-group .sub-menu>div{overflow:hidden;min-height:0}.sds-navigation-group.active .sub-menu{grid-template-rows:1fr}::ng-deep .sds-navigation-group-popover-wrapper{--sds-navigation-active-item: oklch(.6 .2 var(--sds-brand-hue) / .12)}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-0 .dx-popup-content{padding:0rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-1 .dx-popup-content{padding:.25rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-2 .dx-popup-content{padding:.5rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-3 .dx-popup-content{padding:1rem}::ng-deep .sds-navigation-group-popover-wrapper .dx-popover-arrow{display:none}::ng-deep .sds-navigation-group-popover-wrapper .group-header{font-weight:600;padding:.25rem .75rem .5rem .5rem}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container{color:var(--bs-body-color)!important;padding-bottom:.07rem;overflow-y:auto;max-height:45vh}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .active{font-weight:500}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-icon{display:none}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container{border-left:none;padding-top:.25rem;padding-bottom:.25rem;border-radius:var(--bs-border-radius);color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-item-content{padding-top:.25rem;padding-bottom:.25rem;padding-left:1rem;color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-header{color:var(--bs-body-color)!important}\n"] }]
|
|
315
|
-
}],
|
|
316
|
-
type: Input
|
|
317
|
-
}], text: [{
|
|
263
|
+
], template: "<div \n #navigationGroup\n class=\"sds-navigation-group sds-navigation-item-container d-flex\"\n [class.sds-navigation-group-light-style]=\"lightStyle()\"\n [class.flex-column-reverse]=\"reverse\"\n [class.flex-column]=\"!reverse\"\n [class.disabled]=\"disabled\"\n [class.active]=\"isGroupActive()\"\n [class.collapsed]=\"isCollapsed()\"\n [class.popoverVisible]=\"isPopoverVisible()\"\n >\n <a \n class=\"w-100 sds-navigation-item-content p-2 text-gray-800 sds-fs-93\"\n [class.collapsed]=\"isCollapsed()\"\n style=\"cursor: pointer\"\n [routerLink]=\"(isCollapsed() && isTouchPointerType()) ? undefined : [defaultRouterLink()]\"\n (pointerdown)=\"rememberPointer($event)\"\n\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"onClick()\"\n >\n <div class=\"d-flex align-items-center w-100 justify-content-center\">\n <div class=\"sds-navigation-icon\" >\n <ng-content select=\"[navigationIcon]\"></ng-content>\n </div>\n \n <ng-container *ngIf=\"!isCollapsed()\">\n <div class=\"sds-navigation-text user-select-none\">\n {{ text }}\n </div>\n <span *ngIf=\"additionalInfo() && !isGroupActive()\"\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning text-body me-2\"\n >{{ additionalInfo() }}\n </span>\n <div class=\"text-right group-dropdown\">\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\n </div>\n </ng-container>\n </div>\n </a>\n\n <div \n class=\"sub-menu\" \n *ngIf=\"!isCollapsed()\">\n\n <div class=\"sds-navigation-group-items sds-flex-column gap-05\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"isCollapsed() || (showPopover && !isGroupActive())\">\n <dx-popover\n [target]=\"navigationGroup\"\n \n \n (onHiding)=\"onHiding($event)\"\n width=\"15rem\"\n [wrapperAttr]=\"{ class: 'sds-navigation-group-popover-wrapper sds-dx-popup-content-padding-2', style: 'border-left: none'}\"\n [hideOnOutsideClick]=\"true\"\n [hideOnParentScroll]=\"true\"\n [animation]=\"{}\"\n [(visible)]=\"isPopoverVisible\"\n >\n\n <dxo-position\n my=\"top left\"\n at=\"top right\"\n [of]=\"navigationGroup\"\n offset=\"-10 -5\"\n >\n </dxo-position>\n\n <div *ngIf=\"showPopoverHeader && isCollapsed()\" class=\"group-header user-select-none\">\n {{ text }}\n </div>\n <div \n class=\"sds-navigation-container sds-navigation-popover-container sds-scrollbar sds-scrollbar-thin sds-scrollbar-no-hide\"\n >\n <div class=\"sds-navigation-group-items\">\n <ng-content select=\"[popoverContent]\"></ng-content>\n </div>\n </div>\n </dx-popover>\n</ng-container>\n", styles: [".gap-05{gap:.125rem!important}.sds-navigation-group.sds-navigation-item-container{border-radius:.266rem;border-left:none!important;padding-top:0!important;padding-bottom:0!important}.sds-navigation-group.sds-navigation-item-container a{padding-top:.6rem!important;padding-bottom:.6rem!important}.sds-navigation-group.sds-navigation-item-container.disabled{pointer-events:none;opacity:.6}.sds-navigation-group.active>a{font-weight:600}.sds-navigation-group.active{background-color:var(--sds-navigation-active-item)!important}.sds-navigation-group.active:not(.collapsed){background-color:transparent!important}.sds-navigation-group .group-dropdown{transition:transform .2s ease-out}.sds-navigation-group.popoverVisible:not(.active){background-color:var(--bs-gray-200)}.sds-navigation-group.popoverVisible:not(.active) .group-dropdown{transform:rotate(-90deg)}.sds-navigation-group .sub-menu{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out}.sds-navigation-group .sub-menu>div{overflow:hidden;min-height:0}.sds-navigation-group.active .sub-menu{grid-template-rows:1fr}::ng-deep .sds-navigation-group-popover-wrapper{--sds-navigation-active-item: oklch(.6 .2 var(--sds-brand-hue) / .12)}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-0 .dx-popup-content{padding:0rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-1 .dx-popup-content{padding:.25rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-2 .dx-popup-content{padding:.5rem}::ng-deep .sds-navigation-group-popover-wrapper.sds-dx-popup-content-padding-3 .dx-popup-content{padding:1rem}::ng-deep .sds-navigation-group-popover-wrapper .dx-popover-arrow{display:none}::ng-deep .sds-navigation-group-popover-wrapper .group-header{font-weight:600;padding:.25rem .75rem .5rem .5rem}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container{color:var(--bs-body-color)!important;padding-bottom:.07rem;overflow-y:auto;max-height:45vh}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .active{font-weight:500}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-icon{display:none}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container{border-left:none;padding-top:.25rem;padding-bottom:.25rem;border-radius:var(--bs-border-radius);color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-item-content{padding-top:.25rem;padding-bottom:.25rem;padding-left:1rem;color:var(--bs-body-color)!important}::ng-deep .sds-navigation-group-popover-wrapper .sds-navigation-container.sds-navigation-popover-container .sds-navigation-group-items .sds-navigation-item-container .sds-navigation-header{color:var(--bs-body-color)!important}\n"] }]
|
|
264
|
+
}], propDecorators: { navigationGroupNestedRoutes: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationGroupNestedRoutes", required: false }] }], text: [{
|
|
318
265
|
type: Input
|
|
319
266
|
}], icon: [{
|
|
320
267
|
type: Input
|
|
321
|
-
}], defaultRouterLink: [{
|
|
322
|
-
type: Input
|
|
323
|
-
}], reverse: [{
|
|
268
|
+
}], defaultRouterLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultRouterLink", required: false }] }], reverse: [{
|
|
324
269
|
type: Input
|
|
325
|
-
}], ignoreQueryParamsInActiveRoute: [{
|
|
326
|
-
type: Input
|
|
327
|
-
}], disabled: [{
|
|
270
|
+
}], ignoreQueryParamsInActiveRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryParamsInActiveRoute", required: false }] }], disabled: [{
|
|
328
271
|
type: Input
|
|
329
272
|
}], showPopover: [{
|
|
330
273
|
type: Input
|
|
@@ -494,7 +437,7 @@ class SdsNavigationUserProfileComponent {
|
|
|
494
437
|
this.notificationBadgeClick.emit();
|
|
495
438
|
}
|
|
496
439
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationUserProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
497
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: SdsNavigationUserProfileComponent, isStandalone: true, selector: "sds-navigation-user-profile", inputs: { profile: { classPropertyName: "profile", publicName: "profile", isSignal: false, isRequired: false, transformFunction: null }, profileInfo: { classPropertyName: "profileInfo", publicName: "profileInfo", isSignal: false, isRequired: false, transformFunction: null }, showSignOut: { classPropertyName: "showSignOut", publicName: "showSignOut", isSignal: false, isRequired: false, transformFunction: null }, showProfile: { classPropertyName: "showProfile", publicName: "showProfile", isSignal: false, isRequired: false, transformFunction: null }, signOutText: { classPropertyName: "signOutText", publicName: "signOutText", isSignal: false, isRequired: false, transformFunction: null }, profileText: { classPropertyName: "profileText", publicName: "profileText", isSignal: false, isRequired: false, transformFunction: null }, showNotificationBadge: { classPropertyName: "showNotificationBadge", publicName: "showNotificationBadge", isSignal: false, isRequired: false, transformFunction: null }, newNotificationsText: { classPropertyName: "newNotificationsText", publicName: "newNotificationsText", isSignal: false, isRequired: false, transformFunction: null }, showOptions: { classPropertyName: "showOptions", publicName: "showOptions", isSignal: false, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, sideBarInstanceName: { classPropertyName: "sideBarInstanceName", publicName: "sideBarInstanceName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { profileClick: "profileClick", signOutClick: "signOutClick", notificationBadgeClick: "notificationBadgeClick", showOptionsChange: "showOptionsChange", isCollapsed: "isCollapsedChange" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"\n d-flex\n flex-row\n align-items-center\n gap-2\n sds-navigation-user-profile-container\n user-select-none\n mb-1 ms-1 me-1 mt-2\n pt-1 pb-1 ps-2\n sds-hoverable\n sds-rounded-2\n \"\n (click)=\"toggleOptions($event)\"\n>\n <div \n #popoverTarget\n class=\"\n position-relative\n\n \">\n <sds-avatar\n [text]=\"profile?.name\"\n [colorKey]=\"profile?.id\"\n [pictureUri]=\"profile?.pictureUri\"\n >\n </sds-avatar>\n\n <span\n *ngIf=\"showNotificationBadge\"\n class=\"\n position-absolute\n notification-badge\n translate-middle\n bg-danger\n border border-light\n rounded-circle\n \"\n (click)=\"onNotificationBadgeClick($event)\"\n >\n <span class=\"visually-hidden\">{{ newNotificationsText }}</span>\n </span>\n </div>\n\n @if(!isCollapsed()) {\n <div class=\"sds-flex-column\">\n <span class=\"truncate-two-lines text-gray-800 sds-fs-93\">\n {{ profile?.name }}\n </span>\n\n <span class=\"sds-fw-400 sds-fs-75 text-truncate text-muted\">\n {{ profileInfo }}\n </span>\n </div>\n }\n</div>\n\n<dx-popover\n [target]=\"popoverTarget\"\n [position]=\"{ my: 'left bottom', at: 'left top' }\"\n collision=\"fit none\"\n minWidth=\"20rem\"\n maxWidth=\"20rem\"\n [(visible)]=\"showOptions\"\n [wrapperAttr]=\"{\n class: 'sds-navigation-user-profile-popover sds-dx-popup-no-arrow sds-dx-popup-content-padding-0'\n }\"\n>\n <div class=\"py-2 pb-3 main-profile-container border-bottom\">\n\n <div class=\"sds-flex-column align-items-center\">\n <sds-avatar\n [text]=\"profile?.name\"\n [colorKey]=\"profile?.id\"\n [pictureUri]=\"profile?.pictureUri\"\n [size]=\"7\"\n >\n </sds-avatar>\n\n <h5 class=\"text-center mt-2 px-3\">\n {{profile?.name}}\n </h5>\n\n <div class=\"sds-fw-400 text-center text-gray-800 sds-fs-87 px-3 text-truncate w-100\">\n {{profile?.info}}\n </div>\n \n </div>\n\n </div>\n\n <ng-content></ng-content>\n\n <ul\n class=\"\n list-unstyled\n sds-navigation-user-profile-actions\n mb-0\n sds-ul-gap-1\n mx-2\n mb-2\n \"\n >\n <li *ngIf=\"showProfile\">\n <sds-user-profile-action-button\n [text]=\"profileText\"\n [icon]=\"userProfileIcon\"\n (actionClick)=\"onProfileClick()\"\n >\n </sds-user-profile-action-button>\n </li>\n\n <li *ngIf=\"showSignOut\">\n <sds-user-profile-action-button\n [text]=\"signOutText\"\n [icon]=\"signOutIcon\"\n (actionClick)=\"onSignOutClick()\"\n >\n </sds-user-profile-action-button>\n </li>\n </ul>\n</dx-popover>\n", styles: [".sds-navigation-user-profile-container{padding:.8rem;cursor:pointer}.sds-navigation-user-profile-container .notification-badge{top:15%;left:100%;padding:.4rem}.truncate-two-lines{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.main-profile-container{margin:.5rem}::ng-deep .sds-navigation-user-profile-popover .dx-popup-content{padding:0!important;font-size:1rem}\n"], dependencies: [{ kind: "component", type: SdsAvatarComponent, selector: "sds-avatar", inputs: ["text", "colorKey", "pictureUri", "showHint", "borderStyle", "borderColor", "borderWidth", "initialsText", "cursor", "size", "pictureImageAlt", "pictureLoading", "picturePriority", "badgeVisible", "badgePosition", "badgeBackgroundColor", "badgeTextColor", "badgeHint"] }, { kind: "component", type: SdsUserProfileActionButtonComponent, selector: "sds-user-profile-action-button", inputs: ["text", "icon"], outputs: ["actionClick"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DxPopoverModule }, { kind: "component", type:
|
|
440
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: SdsNavigationUserProfileComponent, isStandalone: true, selector: "sds-navigation-user-profile", inputs: { profile: { classPropertyName: "profile", publicName: "profile", isSignal: false, isRequired: false, transformFunction: null }, profileInfo: { classPropertyName: "profileInfo", publicName: "profileInfo", isSignal: false, isRequired: false, transformFunction: null }, showSignOut: { classPropertyName: "showSignOut", publicName: "showSignOut", isSignal: false, isRequired: false, transformFunction: null }, showProfile: { classPropertyName: "showProfile", publicName: "showProfile", isSignal: false, isRequired: false, transformFunction: null }, signOutText: { classPropertyName: "signOutText", publicName: "signOutText", isSignal: false, isRequired: false, transformFunction: null }, profileText: { classPropertyName: "profileText", publicName: "profileText", isSignal: false, isRequired: false, transformFunction: null }, showNotificationBadge: { classPropertyName: "showNotificationBadge", publicName: "showNotificationBadge", isSignal: false, isRequired: false, transformFunction: null }, newNotificationsText: { classPropertyName: "newNotificationsText", publicName: "newNotificationsText", isSignal: false, isRequired: false, transformFunction: null }, showOptions: { classPropertyName: "showOptions", publicName: "showOptions", isSignal: false, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null }, sideBarInstanceName: { classPropertyName: "sideBarInstanceName", publicName: "sideBarInstanceName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { profileClick: "profileClick", signOutClick: "signOutClick", notificationBadgeClick: "notificationBadgeClick", showOptionsChange: "showOptionsChange", isCollapsed: "isCollapsedChange" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"\n d-flex\n flex-row\n align-items-center\n gap-2\n sds-navigation-user-profile-container\n user-select-none\n mb-1 ms-1 me-1 mt-2\n pt-1 pb-1 ps-2\n sds-hoverable\n sds-rounded-2\n \"\n (click)=\"toggleOptions($event)\"\n>\n <div \n #popoverTarget\n class=\"\n position-relative\n\n \">\n <sds-avatar\n [text]=\"profile?.name\"\n [colorKey]=\"profile?.id\"\n [pictureUri]=\"profile?.pictureUri\"\n >\n </sds-avatar>\n\n <span\n *ngIf=\"showNotificationBadge\"\n class=\"\n position-absolute\n notification-badge\n translate-middle\n bg-danger\n border border-light\n rounded-circle\n \"\n (click)=\"onNotificationBadgeClick($event)\"\n >\n <span class=\"visually-hidden\">{{ newNotificationsText }}</span>\n </span>\n </div>\n\n @if(!isCollapsed()) {\n <div class=\"sds-flex-column\">\n <span class=\"truncate-two-lines text-gray-800 sds-fs-93\">\n {{ profile?.name }}\n </span>\n\n <span class=\"sds-fw-400 sds-fs-75 text-truncate text-muted\">\n {{ profileInfo }}\n </span>\n </div>\n }\n</div>\n\n<dx-popover\n [target]=\"popoverTarget\"\n [position]=\"{ my: 'left bottom', at: 'left top' }\"\n collision=\"fit none\"\n minWidth=\"20rem\"\n maxWidth=\"20rem\"\n [(visible)]=\"showOptions\"\n [wrapperAttr]=\"{\n class: 'sds-navigation-user-profile-popover sds-dx-popup-no-arrow sds-dx-popup-content-padding-0'\n }\"\n>\n <div class=\"py-2 pb-3 main-profile-container border-bottom\">\n\n <div class=\"sds-flex-column align-items-center\">\n <sds-avatar\n [text]=\"profile?.name\"\n [colorKey]=\"profile?.id\"\n [pictureUri]=\"profile?.pictureUri\"\n [size]=\"7\"\n >\n </sds-avatar>\n\n <h5 class=\"text-center mt-2 px-3\">\n {{profile?.name}}\n </h5>\n\n <div class=\"sds-fw-400 text-center text-gray-800 sds-fs-87 px-3 text-truncate w-100\">\n {{profile?.info}}\n </div>\n \n </div>\n\n </div>\n\n <ng-content></ng-content>\n\n <ul\n class=\"\n list-unstyled\n sds-navigation-user-profile-actions\n mb-0\n sds-ul-gap-1\n mx-2\n mb-2\n \"\n >\n <li *ngIf=\"showProfile\">\n <sds-user-profile-action-button\n [text]=\"profileText\"\n [icon]=\"userProfileIcon\"\n (actionClick)=\"onProfileClick()\"\n >\n </sds-user-profile-action-button>\n </li>\n\n <li *ngIf=\"showSignOut\">\n <sds-user-profile-action-button\n [text]=\"signOutText\"\n [icon]=\"signOutIcon\"\n (actionClick)=\"onSignOutClick()\"\n >\n </sds-user-profile-action-button>\n </li>\n </ul>\n</dx-popover>\n", styles: [".sds-navigation-user-profile-container{padding:.8rem;cursor:pointer}.sds-navigation-user-profile-container .notification-badge{top:15%;left:100%;padding:.4rem}.truncate-two-lines{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.main-profile-container{margin:.5rem}::ng-deep .sds-navigation-user-profile-popover .dx-popup-content{padding:0!important;font-size:1rem}\n"], dependencies: [{ kind: "component", type: SdsAvatarComponent, selector: "sds-avatar", inputs: ["text", "colorKey", "pictureUri", "showHint", "borderStyle", "borderColor", "borderWidth", "initialsText", "cursor", "size", "pictureImageAlt", "pictureLoading", "picturePriority", "badgeVisible", "badgePosition", "badgeBackgroundColor", "badgeTextColor", "badgeHint"] }, { kind: "component", type: SdsUserProfileActionButtonComponent, selector: "sds-user-profile-action-button", inputs: ["text", "icon"], outputs: ["actionClick"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DxPopoverModule }, { kind: "component", type: i1.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "deferRendering", "disabled", "enableBodyScroll", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "deferRenderingChange", "disabledChange", "enableBodyScrollChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] }); }
|
|
498
441
|
}
|
|
499
442
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationUserProfileComponent, decorators: [{
|
|
500
443
|
type: Component,
|
|
@@ -532,6 +475,135 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
532
475
|
type: Output
|
|
533
476
|
}], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], sideBarInstanceName: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarInstanceName", required: false }] }] } });
|
|
534
477
|
|
|
478
|
+
const DEFAULT_ICONS = {
|
|
479
|
+
info: faCircleInfo,
|
|
480
|
+
warning: faTriangleExclamation,
|
|
481
|
+
danger: faCircleExclamation,
|
|
482
|
+
};
|
|
483
|
+
/**
|
|
484
|
+
* Generic sidebar message: icon + title + description + an optional action. Carries no
|
|
485
|
+
* knowledge of what it's displaying (trial status, payment issues, announcements, ...) - callers
|
|
486
|
+
* pass in already-resolved text.
|
|
487
|
+
*
|
|
488
|
+
* The action is either a button (handle `actionClicked`) or, when `actionLink` is set, a router
|
|
489
|
+
* link that navigates on its own. When the navigation is collapsed the callout is either hidden
|
|
490
|
+
* or shown as an icon that opens the full callout in a popup (see `collapsedMode`).
|
|
491
|
+
*
|
|
492
|
+
* Colors are CSS custom properties derived from the base color `--sds-navigation-callout-color`
|
|
493
|
+
* (set by `variant`); override the base or any of the derived ones:
|
|
494
|
+
* `--sds-navigation-callout-bg`, `-border`, `-title` (also the icon), `-description`, `-action`.
|
|
495
|
+
*
|
|
496
|
+
* @example
|
|
497
|
+
* <!-- Action button -->
|
|
498
|
+
* <sds-navigation-callout
|
|
499
|
+
* variant="warning"
|
|
500
|
+
* title="Trial ends today"
|
|
501
|
+
* description="Choose a plan to keep using the app."
|
|
502
|
+
* actionText="Upgrade to paid"
|
|
503
|
+
* (actionClicked)="openUpgradeDialog()">
|
|
504
|
+
* </sds-navigation-callout>
|
|
505
|
+
*
|
|
506
|
+
* <!-- Redirect -->
|
|
507
|
+
* <sds-navigation-callout
|
|
508
|
+
* variant="danger"
|
|
509
|
+
* title="Payment failed"
|
|
510
|
+
* description="Pay the invoice to keep your subscription."
|
|
511
|
+
* actionText="Go to billing page"
|
|
512
|
+
* actionLink="/billing">
|
|
513
|
+
* </sds-navigation-callout>
|
|
514
|
+
*/
|
|
515
|
+
class SdsNavigationCalloutComponent {
|
|
516
|
+
constructor() {
|
|
517
|
+
/**
|
|
518
|
+
* Required. Color scheme and default icon:
|
|
519
|
+
* `info` (`--bs-primary`), `warning` (`--bs-orange`) or `danger` (`--bs-pink`).
|
|
520
|
+
*/
|
|
521
|
+
this.variant = input.required(...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
522
|
+
/**
|
|
523
|
+
* Font Awesome icon shown next to the title (and as the collapsed icon).
|
|
524
|
+
* Falls back to the default icon of the `variant` when not provided.
|
|
525
|
+
* @default null
|
|
526
|
+
*/
|
|
527
|
+
this.icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
528
|
+
/** Required. Title shown next to the icon. Displayed as given - pass already translated text. */
|
|
529
|
+
this.title = input.required(...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
530
|
+
/** Required. Text shown below the title. Displayed as given - pass already translated text. */
|
|
531
|
+
this.description = input.required(...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
532
|
+
/**
|
|
533
|
+
* Text of the action. The action is shown only when this is not empty.
|
|
534
|
+
* @default ''
|
|
535
|
+
*/
|
|
536
|
+
this.actionText = input('', ...(ngDevMode ? [{ debugName: "actionText" }] : /* istanbul ignore next */ []));
|
|
537
|
+
/**
|
|
538
|
+
* Route of the action - accepts the same values as `routerLink` (string, commands array or `UrlTree`).
|
|
539
|
+
* When set the action is rendered as a link that navigates to the route, otherwise as a button.
|
|
540
|
+
* Ignored when `actionText` is empty.
|
|
541
|
+
* @default null
|
|
542
|
+
*/
|
|
543
|
+
this.actionLink = input(null, ...(ngDevMode ? [{ debugName: "actionLink" }] : /* istanbul ignore next */ []));
|
|
544
|
+
/**
|
|
545
|
+
* Behaviour when the navigation is collapsed:
|
|
546
|
+
* `icon` shows only the icon, which opens the full callout in a popup; `hide` hides the callout.
|
|
547
|
+
* @default 'icon'
|
|
548
|
+
*/
|
|
549
|
+
this.collapsedMode = input('icon', ...(ngDevMode ? [{ debugName: "collapsedMode" }] : /* istanbul ignore next */ []));
|
|
550
|
+
/**
|
|
551
|
+
* Collapsed state of the navigation. Set automatically by `sds-navigation-container` -
|
|
552
|
+
* bind it only when the callout is used outside of a container.
|
|
553
|
+
* @default false
|
|
554
|
+
*/
|
|
555
|
+
this.isCollapsed = model(false, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
556
|
+
/**
|
|
557
|
+
* Emitted when the action is clicked, for both buttons and links. For a link it is only a
|
|
558
|
+
* notification - the router navigates on its own. The popup (collapsed mode) is closed first.
|
|
559
|
+
*/
|
|
560
|
+
this.actionClicked = output();
|
|
561
|
+
this.resolvedIcon = computed(() => this.icon() ?? DEFAULT_ICONS[this.variant()], ...(ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []));
|
|
562
|
+
this.isHidden = computed(() => this.isCollapsed() && this.collapsedMode() === 'hide', ...(ngDevMode ? [{ debugName: "isHidden" }] : /* istanbul ignore next */ []));
|
|
563
|
+
this.isIconOnly = computed(() => this.isCollapsed() && this.collapsedMode() === 'icon', ...(ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []));
|
|
564
|
+
this.isPopupOpen = signal(false, ...(ngDevMode ? [{ debugName: "isPopupOpen" }] : /* istanbul ignore next */ []));
|
|
565
|
+
// Right of the icon with bottom edges aligned; falls back to top alignment when there's no room.
|
|
566
|
+
this.popupPositions = [
|
|
567
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },
|
|
568
|
+
{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },
|
|
569
|
+
];
|
|
570
|
+
effect(() => {
|
|
571
|
+
if (!this.isIconOnly()) {
|
|
572
|
+
this.isPopupOpen.set(false);
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
togglePopup() {
|
|
577
|
+
this.isPopupOpen.update((isOpen) => !isOpen);
|
|
578
|
+
}
|
|
579
|
+
onPopupOutsideClick(event, origin) {
|
|
580
|
+
// The origin click toggles the popup itself; closing here as well would re-open it.
|
|
581
|
+
if (origin.contains(event.target)) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
this.isPopupOpen.set(false);
|
|
585
|
+
}
|
|
586
|
+
onPopupKeydown(event) {
|
|
587
|
+
if (event.key === 'Escape') {
|
|
588
|
+
this.isPopupOpen.set(false);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
onActionClick() {
|
|
592
|
+
this.isPopupOpen.set(false);
|
|
593
|
+
this.actionClicked.emit();
|
|
594
|
+
}
|
|
595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationCalloutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
596
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: SdsNavigationCalloutComponent, isStandalone: true, selector: "sds-navigation-callout", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: true, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, actionLink: { classPropertyName: "actionLink", publicName: "actionLink", isSignal: true, isRequired: false, transformFunction: null }, collapsedMode: { classPropertyName: "collapsedMode", publicName: "collapsedMode", isSignal: true, isRequired: false, transformFunction: null }, isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange", actionClicked: "actionClicked" }, host: { properties: { "class": "'sds-navigation-callout-' + variant()", "class.sds-navigation-callout-collapsed": "isCollapsed()", "style.display": "isHidden() ? 'none' : null" } }, ngImport: i0, template: "@if (isIconOnly()) {\n <button\n #origin\n type=\"button\"\n class=\"sds-navigation-callout-icon-button\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [attr.aria-label]=\"title()\"\n [attr.aria-expanded]=\"isPopupOpen()\"\n (click)=\"togglePopup()\"\n >\n <fa-icon\n class=\"sds-navigation-callout-icon\"\n [icon]=\"resolvedIcon()\"\n ></fa-icon>\n </button>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isPopupOpen()\"\n [cdkConnectedOverlayPositions]=\"popupPositions\"\n (overlayOutsideClick)=\"onPopupOutsideClick($event, origin)\"\n (detach)=\"isPopupOpen.set(false)\"\n (overlayKeydown)=\"onPopupKeydown($event)\"\n >\n <div [class]=\"'sds-navigation-callout-popup sds-navigation-callout-' + variant()\">\n <ng-container *ngTemplateOutlet=\"card\"></ng-container>\n </div>\n </ng-template>\n} @else {\n <ng-container *ngTemplateOutlet=\"card\"></ng-container>\n}\n\n<ng-template #card>\n <div class=\"sds-navigation-callout-card\">\n <div class=\"sds-navigation-callout-title d-flex align-items-center gap-1 sds-fs-87 sds-fw-600\">\n <fa-icon\n class=\"sds-navigation-callout-icon\"\n [icon]=\"resolvedIcon()\"\n ></fa-icon>\n <span>{{ title() }}</span>\n </div>\n <span class=\"sds-navigation-callout-description\">{{ description() }}</span>\n @if (actionText()) {\n @if (actionLink()) {\n <a\n class=\"btn btn-sm btn-link sds-navigation-callout-action sds-fw-600\"\n [routerLink]=\"actionLink()\"\n (click)=\"onActionClick()\"\n >\n {{ actionText() }}\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-sm btn-link sds-navigation-callout-action sds-fw-600\"\n (click)=\"onActionClick()\"\n >\n {{ actionText() }}\n </button>\n }\n }\n </div>\n</ng-template>\n", styles: [":host,.sds-navigation-callout-popup{--sds-navigation-callout-color: var(--bs-primary);--sds-navigation-callout-bg: color-mix(in oklch, var(--sds-navigation-callout-color) 8%, var(--bs-body-bg));--sds-navigation-callout-border: color-mix(in oklch, var(--sds-navigation-callout-color) 25%, var(--bs-body-bg));--sds-navigation-callout-title: color-mix(in oklch, var(--sds-navigation-callout-color) 70%, var(--bs-emphasis-color));--sds-navigation-callout-description: color-mix(in oklab, var(--sds-navigation-callout-color) 20%, var(--bs-body-color));--sds-navigation-callout-action: var(--sds-navigation-callout-title)}:host(.sds-navigation-callout-warning),.sds-navigation-callout-popup.sds-navigation-callout-warning{--sds-navigation-callout-color: var(--bs-orange)}:host(.sds-navigation-callout-danger),.sds-navigation-callout-popup.sds-navigation-callout-danger{--sds-navigation-callout-color: var(--bs-pink)}:host{display:block}:host(:not(.sds-navigation-callout-collapsed)){margin-inline:.55rem}.sds-navigation-callout-card{display:flex;flex-direction:column;gap:.25rem;padding:.8rem;border-radius:.5rem;border:1px solid var(--sds-navigation-callout-border);background-color:var(--sds-navigation-callout-bg)}.sds-navigation-callout-title,.sds-navigation-callout-icon{color:var(--sds-navigation-callout-title)}.sds-navigation-callout-description{font-size:.8rem;color:var(--sds-navigation-callout-description)}.sds-navigation-callout-action{align-self:flex-start;padding:0;border:none;background:transparent;font-family:inherit;font-size:.8rem;color:var(--sds-navigation-callout-action);cursor:pointer}.sds-navigation-callout-action:hover{text-decoration:underline}.sds-navigation-callout-icon-button{display:flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;margin-inline:auto;padding:0;border-radius:.5rem;border:1px solid var(--sds-navigation-callout-border);background-color:var(--sds-navigation-callout-bg);cursor:pointer}.sds-navigation-callout-icon-button:hover{background-color:color-mix(in oklch,var(--sds-navigation-callout-border) 50%,var(--sds-navigation-callout-bg))}.sds-navigation-callout-popup .sds-navigation-callout-card{box-shadow:var(--bs-box-shadow)}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
597
|
+
}
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationCalloutComponent, decorators: [{
|
|
599
|
+
type: Component,
|
|
600
|
+
args: [{ selector: 'sds-navigation-callout', imports: [FaIconComponent, NgTemplateOutlet, CdkOverlayOrigin, CdkConnectedOverlay, RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
601
|
+
'[class]': "'sds-navigation-callout-' + variant()",
|
|
602
|
+
'[class.sds-navigation-callout-collapsed]': 'isCollapsed()',
|
|
603
|
+
'[style.display]': "isHidden() ? 'none' : null",
|
|
604
|
+
}, template: "@if (isIconOnly()) {\n <button\n #origin\n type=\"button\"\n class=\"sds-navigation-callout-icon-button\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [attr.aria-label]=\"title()\"\n [attr.aria-expanded]=\"isPopupOpen()\"\n (click)=\"togglePopup()\"\n >\n <fa-icon\n class=\"sds-navigation-callout-icon\"\n [icon]=\"resolvedIcon()\"\n ></fa-icon>\n </button>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isPopupOpen()\"\n [cdkConnectedOverlayPositions]=\"popupPositions\"\n (overlayOutsideClick)=\"onPopupOutsideClick($event, origin)\"\n (detach)=\"isPopupOpen.set(false)\"\n (overlayKeydown)=\"onPopupKeydown($event)\"\n >\n <div [class]=\"'sds-navigation-callout-popup sds-navigation-callout-' + variant()\">\n <ng-container *ngTemplateOutlet=\"card\"></ng-container>\n </div>\n </ng-template>\n} @else {\n <ng-container *ngTemplateOutlet=\"card\"></ng-container>\n}\n\n<ng-template #card>\n <div class=\"sds-navigation-callout-card\">\n <div class=\"sds-navigation-callout-title d-flex align-items-center gap-1 sds-fs-87 sds-fw-600\">\n <fa-icon\n class=\"sds-navigation-callout-icon\"\n [icon]=\"resolvedIcon()\"\n ></fa-icon>\n <span>{{ title() }}</span>\n </div>\n <span class=\"sds-navigation-callout-description\">{{ description() }}</span>\n @if (actionText()) {\n @if (actionLink()) {\n <a\n class=\"btn btn-sm btn-link sds-navigation-callout-action sds-fw-600\"\n [routerLink]=\"actionLink()\"\n (click)=\"onActionClick()\"\n >\n {{ actionText() }}\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-sm btn-link sds-navigation-callout-action sds-fw-600\"\n (click)=\"onActionClick()\"\n >\n {{ actionText() }}\n </button>\n }\n }\n </div>\n</ng-template>\n", styles: [":host,.sds-navigation-callout-popup{--sds-navigation-callout-color: var(--bs-primary);--sds-navigation-callout-bg: color-mix(in oklch, var(--sds-navigation-callout-color) 8%, var(--bs-body-bg));--sds-navigation-callout-border: color-mix(in oklch, var(--sds-navigation-callout-color) 25%, var(--bs-body-bg));--sds-navigation-callout-title: color-mix(in oklch, var(--sds-navigation-callout-color) 70%, var(--bs-emphasis-color));--sds-navigation-callout-description: color-mix(in oklab, var(--sds-navigation-callout-color) 20%, var(--bs-body-color));--sds-navigation-callout-action: var(--sds-navigation-callout-title)}:host(.sds-navigation-callout-warning),.sds-navigation-callout-popup.sds-navigation-callout-warning{--sds-navigation-callout-color: var(--bs-orange)}:host(.sds-navigation-callout-danger),.sds-navigation-callout-popup.sds-navigation-callout-danger{--sds-navigation-callout-color: var(--bs-pink)}:host{display:block}:host(:not(.sds-navigation-callout-collapsed)){margin-inline:.55rem}.sds-navigation-callout-card{display:flex;flex-direction:column;gap:.25rem;padding:.8rem;border-radius:.5rem;border:1px solid var(--sds-navigation-callout-border);background-color:var(--sds-navigation-callout-bg)}.sds-navigation-callout-title,.sds-navigation-callout-icon{color:var(--sds-navigation-callout-title)}.sds-navigation-callout-description{font-size:.8rem;color:var(--sds-navigation-callout-description)}.sds-navigation-callout-action{align-self:flex-start;padding:0;border:none;background:transparent;font-family:inherit;font-size:.8rem;color:var(--sds-navigation-callout-action);cursor:pointer}.sds-navigation-callout-action:hover{text-decoration:underline}.sds-navigation-callout-icon-button{display:flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;margin-inline:auto;padding:0;border-radius:.5rem;border:1px solid var(--sds-navigation-callout-border);background-color:var(--sds-navigation-callout-bg);cursor:pointer}.sds-navigation-callout-icon-button:hover{background-color:color-mix(in oklch,var(--sds-navigation-callout-border) 50%,var(--sds-navigation-callout-bg))}.sds-navigation-callout-popup .sds-navigation-callout-card{box-shadow:var(--bs-box-shadow)}\n"] }]
|
|
605
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: true }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], actionLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLink", required: false }] }], collapsedMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedMode", required: false }] }], isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], actionClicked: [{ type: i0.Output, args: ["actionClicked"] }] } });
|
|
606
|
+
|
|
535
607
|
class SdsNavigationContainerComponent {
|
|
536
608
|
constructor() {
|
|
537
609
|
this.isCollapsed = model(false, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
@@ -542,6 +614,7 @@ class SdsNavigationContainerComponent {
|
|
|
542
614
|
this.externalLinkComponentChildren = contentChildren(SdsNavigationExternalLinkComponent, ...(ngDevMode ? [{ debugName: "externalLinkComponentChildren" }] : /* istanbul ignore next */ []));
|
|
543
615
|
this.userProfileComponentChildren = contentChildren(SdsNavigationUserProfileComponent, ...(ngDevMode ? [{ debugName: "userProfileComponentChildren" }] : /* istanbul ignore next */ []));
|
|
544
616
|
this.collapsibleFrameComponentChildren = contentChildren(SdsNavigationCollapsibleFrameComponent, ...(ngDevMode ? [{ debugName: "collapsibleFrameComponentChildren" }] : /* istanbul ignore next */ []));
|
|
617
|
+
this.calloutComponentChildren = contentChildren(SdsNavigationCalloutComponent, ...(ngDevMode ? [{ debugName: "calloutComponentChildren" }] : /* istanbul ignore next */ []));
|
|
545
618
|
// Reading the content queries inside the effect makes it re-run once they resolve
|
|
546
619
|
// (so an initial collapsed state is applied) and whenever children are added later.
|
|
547
620
|
effect(() => {
|
|
@@ -554,6 +627,7 @@ class SdsNavigationContainerComponent {
|
|
|
554
627
|
...this.externalLinkComponentChildren(),
|
|
555
628
|
...this.userProfileComponentChildren(),
|
|
556
629
|
...this.collapsibleFrameComponentChildren(),
|
|
630
|
+
...this.calloutComponentChildren(),
|
|
557
631
|
];
|
|
558
632
|
untracked(() => {
|
|
559
633
|
children.forEach((child) => child.isCollapsed.set(isCollapsed));
|
|
@@ -562,12 +636,12 @@ class SdsNavigationContainerComponent {
|
|
|
562
636
|
}
|
|
563
637
|
ngOnInit() { }
|
|
564
638
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
565
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.23", type: SdsNavigationContainerComponent, isStandalone: true, selector: "sds-navigation-container", inputs: { isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, queries: [{ propertyName: "groupComponentChildren", predicate: SdsNavigationGroupComponent, isSignal: true }, { propertyName: "routeLinkComponentChildren", predicate: SdsNavigationRouteLinkComponent, isSignal: true }, { propertyName: "separatorComponentChildren", predicate: SdsNavigationSeparatorComponent, isSignal: true }, { propertyName: "headerComponentChildren", predicate: SdsNavigationHeaderComponent, isSignal: true }, { propertyName: "externalLinkComponentChildren", predicate: SdsNavigationExternalLinkComponent, isSignal: true }, { propertyName: "userProfileComponentChildren", predicate: SdsNavigationUserProfileComponent, isSignal: true }, { propertyName: "collapsibleFrameComponentChildren", predicate: SdsNavigationCollapsibleFrameComponent, isSignal: true }], ngImport: i0, template: "<div class=\"sds-navigation-container\">\n <ng-content></ng-content>\n</div>", styles: [".sds-navigation-container{height:100%;display:flex;flex-direction:column;padding-right:.25rem;padding-left:.25rem;gap:.25rem}:host{overflow-y:auto;overflow-x:hidden}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
639
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.23", type: SdsNavigationContainerComponent, isStandalone: true, selector: "sds-navigation-container", inputs: { isCollapsed: { classPropertyName: "isCollapsed", publicName: "isCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isCollapsed: "isCollapsedChange" }, queries: [{ propertyName: "groupComponentChildren", predicate: SdsNavigationGroupComponent, isSignal: true }, { propertyName: "routeLinkComponentChildren", predicate: SdsNavigationRouteLinkComponent, isSignal: true }, { propertyName: "separatorComponentChildren", predicate: SdsNavigationSeparatorComponent, isSignal: true }, { propertyName: "headerComponentChildren", predicate: SdsNavigationHeaderComponent, isSignal: true }, { propertyName: "externalLinkComponentChildren", predicate: SdsNavigationExternalLinkComponent, isSignal: true }, { propertyName: "userProfileComponentChildren", predicate: SdsNavigationUserProfileComponent, isSignal: true }, { propertyName: "collapsibleFrameComponentChildren", predicate: SdsNavigationCollapsibleFrameComponent, isSignal: true }, { propertyName: "calloutComponentChildren", predicate: SdsNavigationCalloutComponent, isSignal: true }], ngImport: i0, template: "<div class=\"sds-navigation-container\">\n <ng-content></ng-content>\n</div>", styles: [".sds-navigation-container{height:100%;display:flex;flex-direction:column;padding-right:.25rem;padding-left:.25rem;gap:.25rem}:host{overflow-y:auto;overflow-x:hidden}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
566
640
|
}
|
|
567
641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SdsNavigationContainerComponent, decorators: [{
|
|
568
642
|
type: Component,
|
|
569
643
|
args: [{ selector: 'sds-navigation-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sds-navigation-container\">\n <ng-content></ng-content>\n</div>", styles: [".sds-navigation-container{height:100%;display:flex;flex-direction:column;padding-right:.25rem;padding-left:.25rem;gap:.25rem}:host{overflow-y:auto;overflow-x:hidden}\n"] }]
|
|
570
|
-
}], ctorParameters: () => [], propDecorators: { isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], groupComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationGroupComponent), { isSignal: true }] }], routeLinkComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationRouteLinkComponent), { isSignal: true }] }], separatorComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationSeparatorComponent), { isSignal: true }] }], headerComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationHeaderComponent), { isSignal: true }] }], externalLinkComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationExternalLinkComponent), { isSignal: true }] }], userProfileComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationUserProfileComponent), { isSignal: true }] }], collapsibleFrameComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationCollapsibleFrameComponent), { isSignal: true }] }] } });
|
|
644
|
+
}], ctorParameters: () => [], propDecorators: { isCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCollapsed", required: false }] }, { type: i0.Output, args: ["isCollapsedChange"] }], groupComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationGroupComponent), { isSignal: true }] }], routeLinkComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationRouteLinkComponent), { isSignal: true }] }], separatorComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationSeparatorComponent), { isSignal: true }] }], headerComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationHeaderComponent), { isSignal: true }] }], externalLinkComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationExternalLinkComponent), { isSignal: true }] }], userProfileComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationUserProfileComponent), { isSignal: true }] }], collapsibleFrameComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationCollapsibleFrameComponent), { isSignal: true }] }], calloutComponentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdsNavigationCalloutComponent), { isSignal: true }] }] } });
|
|
571
645
|
|
|
572
646
|
class SdsUserProfileTileComponent {
|
|
573
647
|
constructor() {
|
|
@@ -736,5 +810,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
736
810
|
* Generated bundle index. Do not edit.
|
|
737
811
|
*/
|
|
738
812
|
|
|
739
|
-
export { SdsActiveRoutePatternPipe, SdsNavigationCollapsibleFrameComponent, SdsNavigationContainerComponent, SdsNavigationExternalLinkComponent, SdsNavigationGroupComponent, SdsNavigationHeaderComponent, SdsNavigationRouteLinkComponent, SdsNavigationSeparatorComponent, SdsNavigationUserProfileComponent, SdsProductHomeComponent, SdsUserProfileSelectorComponent };
|
|
813
|
+
export { SdsActiveRoutePatternPipe, SdsNavigationCalloutComponent, SdsNavigationCollapsibleFrameComponent, SdsNavigationContainerComponent, SdsNavigationExternalLinkComponent, SdsNavigationGroupComponent, SdsNavigationHeaderComponent, SdsNavigationRouteLinkComponent, SdsNavigationSeparatorComponent, SdsNavigationUserProfileComponent, SdsProductHomeComponent, SdsUserProfileSelectorComponent, isRouteActive };
|
|
740
814
|
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-navigation.mjs.map
|