@theseam/ui-common 0.3.11 → 0.3.13-beta.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.
- package/breadcrumbs/_breadcrumbs-theme.scss +3 -3
- package/breadcrumbs/breadcrumbs/breadcrumbs.component.scss +10 -10
- package/bundles/theseam-ui-common-framework.umd.js +935 -47
- package/bundles/theseam-ui-common-framework.umd.js.map +1 -1
- package/bundles/theseam-ui-common-layout.umd.js +14 -5
- package/bundles/theseam-ui-common-layout.umd.js.map +1 -1
- package/bundles/theseam-ui-common-menu.umd.js +4 -0
- package/bundles/theseam-ui-common-menu.umd.js.map +1 -1
- package/esm2015/framework/base-layout/base-layout.component.js +12 -4
- package/esm2015/framework/base-layout/base-layout.module.js +4 -1
- package/esm2015/framework/base-layout/directives/base-layout-nav-toggle.directive.js +17 -3
- package/esm2015/framework/base-layout/directives/base-layout-side-bar-header.directive.js +15 -0
- package/esm2015/framework/nav/horizontal-nav/horizontal-nav.component.js +53 -0
- package/esm2015/framework/nav/index.js +6 -0
- package/esm2015/framework/nav/nav-item/nav-item.component.js +180 -0
- package/esm2015/framework/nav/nav-utils.js +110 -0
- package/esm2015/framework/nav/nav.models.js +2 -0
- package/esm2015/framework/nav/nav.module.js +42 -0
- package/esm2015/framework/nav/nav.service.js +197 -0
- package/esm2015/framework/public-api.js +2 -1
- package/esm2015/framework/side-nav/side-nav-item/side-nav-item.component.js +11 -5
- package/esm2015/framework/side-nav/side-nav-toggle/side-nav-toggle.component.js +5 -5
- package/esm2015/framework/side-nav/side-nav.component.js +67 -18
- package/esm2015/framework/side-nav/side-nav.service.js +1 -1
- package/esm2015/framework/theseam-ui-common-framework.js +13 -9
- package/esm2015/framework/top-bar/top-bar-compact-menu-btn-detail.directive.js +15 -0
- package/esm2015/framework/top-bar/top-bar-item.directive.js +9 -2
- package/esm2015/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.js +4 -3
- package/esm2015/framework/top-bar/top-bar-nav-toggle-btn-detail.directive.js +15 -0
- package/esm2015/framework/top-bar/top-bar.component.js +44 -7
- package/esm2015/framework/top-bar/top-bar.module.js +9 -3
- package/esm2015/layout/layout.service.js +12 -2
- package/esm2015/menu/menu-toggle.directive.js +6 -2
- package/fesm2015/theseam-ui-common-framework.js +753 -41
- package/fesm2015/theseam-ui-common-framework.js.map +1 -1
- package/fesm2015/theseam-ui-common-layout.js +11 -2
- package/fesm2015/theseam-ui-common-layout.js.map +1 -1
- package/fesm2015/theseam-ui-common-menu.js +5 -1
- package/fesm2015/theseam-ui-common-menu.js.map +1 -1
- package/framework/base-layout/base-layout.component.d.ts +3 -1
- package/framework/base-layout/base-layout.component.scss +18 -10
- package/framework/base-layout/directives/base-layout-nav-toggle.directive.d.ts +7 -2
- package/framework/base-layout/directives/base-layout-side-bar-header.directive.d.ts +6 -0
- package/framework/base-layout/styles/_variables.scss +21 -0
- package/framework/nav/_nav-theme.scss +4 -0
- package/framework/nav/horizontal-nav/horizontal-nav.component.d.ts +23 -0
- package/framework/nav/horizontal-nav/horizontal-nav.component.scss +50 -0
- package/framework/nav/index.d.ts +5 -0
- package/framework/nav/nav-item/nav-item.component.d.ts +71 -0
- package/framework/nav/nav-item/nav-item.component.scss +203 -0
- package/framework/nav/nav-utils.d.ts +20 -0
- package/framework/nav/nav.models.d.ts +77 -0
- package/framework/nav/nav.module.d.ts +2 -0
- package/framework/nav/nav.service.d.ts +24 -0
- package/framework/nav/styles/_themes/light/_variables.scss +56 -0
- package/framework/nav/styles/_themes/primary/_variables.scss +56 -0
- package/framework/nav/styles/_utilities.scss +3 -0
- package/framework/nav/styles/_variables.scss +2 -0
- package/framework/public-api.d.ts +1 -0
- package/framework/side-nav/side-nav-item/side-nav-item.component.d.ts +2 -0
- package/framework/side-nav/side-nav-item/side-nav-item.component.scss +7 -5
- package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.d.ts +4 -2
- package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.scss +3 -6
- package/framework/side-nav/side-nav.component.d.ts +13 -1
- package/framework/side-nav/side-nav.component.scss +0 -1
- package/framework/side-nav/styles/_themes/light/_variables.scss +24 -14
- package/framework/side-nav/styles/_themes/primary/_variables.scss +8 -0
- package/framework/theseam-ui-common-framework.d.ts +12 -8
- package/framework/theseam-ui-common-framework.metadata.json +1 -1
- package/framework/top-bar/_top-bar-theme.scss +5 -5
- package/framework/top-bar/top-bar-compact-menu-btn-detail.directive.d.ts +5 -0
- package/framework/top-bar/top-bar-item.directive.d.ts +3 -0
- package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.d.ts +4 -1
- package/framework/top-bar/top-bar-nav-toggle-btn-detail.directive.d.ts +5 -0
- package/framework/top-bar/top-bar.component.d.ts +25 -3
- package/framework/top-bar/top-bar.component.scss +7 -2
- package/layout/layout.service.d.ts +9 -1
- package/layout/theseam-ui-common-layout.metadata.json +1 -1
- package/menu/menu-toggle.directive.d.ts +2 -1
- package/menu/theseam-ui-common-menu.metadata.json +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/portal'), require('rxjs'), require('@fortawesome/free-solid-svg-icons'), require('@theseam/ui-common/layout'), require('@angular/common'), require('@theseam/ui-common/buttons'), require('@theseam/ui-common/icon'), require('@theseam/ui-common/scrollbar'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@theseam/ui-common/framework', ['exports', '@angular/core', '@angular/cdk/portal', 'rxjs', '@fortawesome/free-solid-svg-icons', '@theseam/ui-common/layout', '@angular/common', '@theseam/ui-common/buttons', '@theseam/ui-common/icon', '@theseam/ui-common/scrollbar', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.theseam = global.theseam || {}, global.theseam["ui-common"] = global.theseam["ui-common"] || {}, global.theseam["ui-common"].framework = {}), global.ng.core, global.ng.cdk.portal, global.rxjs, global.freeSolidSvgIcons, global.theseam["ui-common"].layout, global.ng.common, global.theseam["ui-common"].buttons, global.theseam["ui-common"].icon, global.theseam["ui-common"].scrollbar, global.
|
|
5
|
-
})(this, (function (exports, i0, portal, rxjs, freeSolidSvgIcons, layout, common, buttons, icon, scrollbar,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('@angular/cdk/portal'), require('rxjs'), require('@fortawesome/free-solid-svg-icons'), require('@theseam/ui-common/layout'), require('@angular/common'), require('@theseam/ui-common/buttons'), require('@theseam/ui-common/icon'), require('@theseam/ui-common/scrollbar'), require('@angular/cdk/coercion'), require('@angular/cdk/drag-drop'), require('@theseam/ui-common/core'), require('@theseam/ui-common/widget'), require('@theseam/ui-common/dynamic-component-loader'), require('@theseam/ui-common/utils'), require('@theseam/ui-common/shared'), require('@angular/animations'), require('@angular/router'), require('@angular/cdk/a11y'), require('@ng-bootstrap/ng-bootstrap'), require('@theseam/ui-common/menu'), require('@fortawesome/free-regular-svg-icons'), require('@ajsf/core'), require('@angular/forms'), require('@ng-select/ng-select'), require('@theseam/ui-common/checkbox'), require('@theseam/ui-common/form-field')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@theseam/ui-common/framework', ['exports', '@angular/core', 'rxjs/operators', '@angular/cdk/portal', 'rxjs', '@fortawesome/free-solid-svg-icons', '@theseam/ui-common/layout', '@angular/common', '@theseam/ui-common/buttons', '@theseam/ui-common/icon', '@theseam/ui-common/scrollbar', '@angular/cdk/coercion', '@angular/cdk/drag-drop', '@theseam/ui-common/core', '@theseam/ui-common/widget', '@theseam/ui-common/dynamic-component-loader', '@theseam/ui-common/utils', '@theseam/ui-common/shared', '@angular/animations', '@angular/router', '@angular/cdk/a11y', '@ng-bootstrap/ng-bootstrap', '@theseam/ui-common/menu', '@fortawesome/free-regular-svg-icons', '@ajsf/core', '@angular/forms', '@ng-select/ng-select', '@theseam/ui-common/checkbox', '@theseam/ui-common/form-field'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.theseam = global.theseam || {}, global.theseam["ui-common"] = global.theseam["ui-common"] || {}, global.theseam["ui-common"].framework = {}), global.ng.core, global.rxjs.operators, global.ng.cdk.portal, global.rxjs, global.freeSolidSvgIcons, global.theseam["ui-common"].layout, global.ng.common, global.theseam["ui-common"].buttons, global.theseam["ui-common"].icon, global.theseam["ui-common"].scrollbar, global.ng.cdk.coercion, global.ng.cdk.dragDrop, global.theseam["ui-common"].core, global.theseam["ui-common"].widget, global.theseam["ui-common"]["dynamic-component-loader"], global.theseam["ui-common"].utils, global.theseam["ui-common"].shared, global.ng.animations, global.ng.router, global.ng.cdk.a11y, global.ngBootstrap, global.theseam["ui-common"].menu, global.freeRegularSvgIcons, global.core$1, global.ng.forms, global.ngSelect, global.theseam["ui-common"].checkbox, global.theseam["ui-common"]["form-field"]));
|
|
5
|
+
})(this, (function (exports, i0, operators, portal, rxjs, freeSolidSvgIcons, layout, common, buttons, icon, scrollbar, coercion, dragDrop, core, widget, i1, utils, shared, animations, router, a11y, ngBootstrap, menu, freeRegularSvgIcons, core$1, forms, ngSelect, checkbox, formField) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -76,10 +76,13 @@
|
|
|
76
76
|
* Can be used to toggle the expand state of the registered nav.
|
|
77
77
|
*/
|
|
78
78
|
var BaseLayoutNavToggleDirective = /** @class */ (function () {
|
|
79
|
-
function BaseLayoutNavToggleDirective(_baseLayout) {
|
|
79
|
+
function BaseLayoutNavToggleDirective(_cdr, _baseLayout) {
|
|
80
|
+
this._cdr = _cdr;
|
|
80
81
|
this.type = 'button';
|
|
81
82
|
/** Screenreader label for the button. */
|
|
82
83
|
this.ariaLabel = 'Navigation toggle';
|
|
84
|
+
this._toggleClass = true;
|
|
85
|
+
this._expandedClass = false;
|
|
83
86
|
this.baseLayout = _baseLayout;
|
|
84
87
|
}
|
|
85
88
|
Object.defineProperty(BaseLayoutNavToggleDirective.prototype, "_attrType", {
|
|
@@ -97,6 +100,14 @@
|
|
|
97
100
|
this.baseLayout.registeredNav.toggle();
|
|
98
101
|
}
|
|
99
102
|
};
|
|
103
|
+
BaseLayoutNavToggleDirective.prototype.ngOnInit = function () {
|
|
104
|
+
var _this = this;
|
|
105
|
+
var _a, _b;
|
|
106
|
+
(_b = (_a = this.baseLayout) === null || _a === void 0 ? void 0 : _a.registeredNav) === null || _b === void 0 ? void 0 : _b.expanded$.pipe(operators.tap(function (exp) {
|
|
107
|
+
_this._expandedClass = exp;
|
|
108
|
+
_this._cdr.markForCheck();
|
|
109
|
+
})).subscribe();
|
|
110
|
+
};
|
|
100
111
|
return BaseLayoutNavToggleDirective;
|
|
101
112
|
}());
|
|
102
113
|
BaseLayoutNavToggleDirective.decorators = [
|
|
@@ -106,6 +117,7 @@
|
|
|
106
117
|
},] }
|
|
107
118
|
];
|
|
108
119
|
BaseLayoutNavToggleDirective.ctorParameters = function () { return [
|
|
120
|
+
{ type: i0.ChangeDetectorRef },
|
|
109
121
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [THESEAM_BASE_LAYOUT_REF,] }] }
|
|
110
122
|
]; };
|
|
111
123
|
BaseLayoutNavToggleDirective.propDecorators = {
|
|
@@ -113,6 +125,8 @@
|
|
|
113
125
|
type: [{ type: i0.Input }],
|
|
114
126
|
_attrAriaLabel: [{ type: i0.HostBinding, args: ['attr.aria-label',] }],
|
|
115
127
|
ariaLabel: [{ type: i0.Input, args: ['aria-label',] }],
|
|
128
|
+
_toggleClass: [{ type: i0.HostBinding, args: ['class.base-layout-nav-toggle',] }],
|
|
129
|
+
_expandedClass: [{ type: i0.HostBinding, args: ['class.base-layout-nav-toggle--expanded',] }],
|
|
116
130
|
_onClick: [{ type: i0.HostListener, args: ['click',] }]
|
|
117
131
|
};
|
|
118
132
|
|
|
@@ -159,6 +173,7 @@
|
|
|
159
173
|
this.faAngleDoubleRight = freeSolidSvgIcons.faAngleDoubleRight;
|
|
160
174
|
this.faAngleDoubleLeft = freeSolidSvgIcons.faAngleDoubleLeft;
|
|
161
175
|
this.overlayNav = false;
|
|
176
|
+
this.showSidebar = true;
|
|
162
177
|
this._hasSideBar = new rxjs.BehaviorSubject(false);
|
|
163
178
|
this._registeredNav = new rxjs.BehaviorSubject(undefined);
|
|
164
179
|
this.registeredNav$ = this._registeredNav.asObservable();
|
|
@@ -178,12 +193,17 @@
|
|
|
178
193
|
configurable: true
|
|
179
194
|
});
|
|
180
195
|
TheSeamBaseLayoutComponent.prototype.ngOnInit = function () {
|
|
196
|
+
if (this.mobileBreakpoint) {
|
|
197
|
+
this._layout.setMobileBreakpoint(this.mobileBreakpoint);
|
|
198
|
+
}
|
|
181
199
|
if (this._topBarTpl) {
|
|
182
200
|
this._topBarPortal = new portal.TemplatePortal(this._topBarTpl, this._viewContainerRef);
|
|
183
201
|
}
|
|
184
202
|
if (this._sideBarTpl) {
|
|
185
203
|
this._sideBarPortal = new portal.TemplatePortal(this._sideBarTpl, this._viewContainerRef);
|
|
186
|
-
this.
|
|
204
|
+
if (this.showSidebar) {
|
|
205
|
+
this._hasSideBar.next(true);
|
|
206
|
+
}
|
|
187
207
|
}
|
|
188
208
|
if (this._contentTpl) {
|
|
189
209
|
this._contentPortal = new portal.TemplatePortal(this._contentTpl, this._viewContainerRef);
|
|
@@ -241,11 +261,11 @@
|
|
|
241
261
|
TheSeamBaseLayoutComponent.decorators = [
|
|
242
262
|
{ type: i0.Component, args: [{
|
|
243
263
|
selector: 'seam-base-layout',
|
|
244
|
-
template: "<div class=\"base-layout-side-bar-nav-content-mobile\" *ngIf=\"isMobile$ | async\">\n <ng-template [cdkPortalOutlet]=\"_sideBarPortal\"></ng-template>\n</div>\n\n<div class=\"base-layout-top-bar-container\">\n <ng-template [cdkPortalOutlet]=\"_topBarPortal\"></ng-template>\n</div>\n<div class=\"base-layout-main-container\">\n <div *ngIf=\"hasSideBar$ | async\"\n class=\"base-layout-side-bar-container\">\n <div class=\"base-layout-side-bar-nav-content\" *ngIf=\"!(isMobile$ | async)\">\n <ng-template [cdkPortalOutlet]=\"_sideBarPortal\"></ng-template>\n </div>\n </div>\n <div class=\"base-layout-content-container\">\n <div class=\"base-layout-content-container-header
|
|
264
|
+
template: "<div class=\"base-layout-side-bar-nav-content-mobile\" *ngIf=\"isMobile$ | async\">\n <ng-template [cdkPortalOutlet]=\"_sideBarPortal\"></ng-template>\n</div>\n\n<div class=\"base-layout-top-bar-container\">\n <ng-template [cdkPortalOutlet]=\"_topBarPortal\"></ng-template>\n</div>\n<div class=\"base-layout-main-container\">\n <div *ngIf=\"hasSideBar$ | async\"\n class=\"base-layout-side-bar-container\">\n <div class=\"base-layout-side-bar-nav-content\" *ngIf=\"!(isMobile$ | async)\">\n <ng-template [cdkPortalOutlet]=\"_sideBarPortal\"></ng-template>\n </div>\n </div>\n <div class=\"base-layout-content-container\">\n <div class=\"base-layout-content-container-header d-flex flex-row\">\n <div class=\"base-layout-content-container-header-left flex-grow-1\">\n <ng-template [cdkPortalOutlet]=\"_contentHeaderPortal\"></ng-template>\n </div>\n <div class=\"base-layout-content-container-header-right d-flex\">\n <ng-container *ngFor=\"let action of registeredActions$ | async; first as isFirst\">\n <div class=\"base-layout-registered-action\">\n <ng-container [ngTemplateOutlet]=\"$any(action)?.template\"></ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"base-layout-content-container-inner\" seamOverlayScrollbar>\n <ng-template [cdkPortalOutlet]=\"_contentPortal\"></ng-template>\n </div>\n <div class=\"base-layout-content-container-footer\">\n <ng-template [cdkPortalOutlet]=\"_contentFooterPortal\"></ng-template>\n </div>\n </div>\n</div>\n",
|
|
245
265
|
providers: [THE_SEAM_BASE_LAYOUT],
|
|
246
266
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
247
267
|
encapsulation: i0.ViewEncapsulation.None,
|
|
248
|
-
styles: ["seam-base-layout{display:flex;flex-direction:column;height:100%;width:100%}seam-base-layout .base-layout-side-bar-nav-content-mobile{position:absolute;top:0;bottom:0;left:0;
|
|
268
|
+
styles: ["seam-base-layout{display:flex;flex-direction:column;height:100%;width:100%}seam-base-layout .base-layout-side-bar-nav-content-mobile{position:absolute;top:0;bottom:0;left:0;z-index:999}seam-base-layout .base-layout-side-bar-container{flex:0 0 auto;display:flex;flex-direction:column;border-top:none;border-right:1px solid #dee2e6;border-bottom:none;border-left:none}seam-base-layout .base-layout-side-bar-container .base-layout-side-bar-nav-content{flex:1 1 0}seam-base-layout .base-layout-main-container{flex:1 1 100%;display:flex;flex-direction:row;transform:translateZ(0)}seam-base-layout .base-layout-top-bar-container{flex:0 0 auto;border-top:none;border-right:none;border-bottom:1px solid #dee2e6;border-left:none}seam-base-layout .base-layout-content-container{flex:1 1 auto;display:flex;flex-direction:column}seam-base-layout .base-layout-content-container .base-layout-content-container-header{flex:0 0 auto;background:none;margin:.25rem;padding:0;border-radius:0;overflow:hidden}seam-base-layout .base-layout-content-container .base-layout-content-container-header-left{background:none;padding:0;margin:0;border-radius:0}seam-base-layout .base-layout-content-container .base-layout-content-container-header-right{background:none;padding:0;margin:0;border-radius:0}seam-base-layout .base-layout-content-container .base-layout-content-container-inner{flex:1 1 auto}seam-base-layout .base-layout-content-container .base-layout-content-container-footer{flex:0 0 auto}seam-base-layout .btn-baselayout-action{margin:0 0 0 .25rem;color:#212529;background-color:#e9ecef;border-color:#e9ecef;padding:.5rem 1rem;font-size:1rem;line-height:1.5;border-radius:.25rem;border:none;color:#6c757d}seam-base-layout .btn-baselayout-action:hover{color:#212529;background-color:#d3d9df;border-color:#cbd3da}seam-base-layout .btn-baselayout-action:focus,seam-base-layout .btn-baselayout-action.focus{color:#212529;background-color:#d3d9df;border-color:#cbd3da;box-shadow:0 0 0 .2rem #cbced180}seam-base-layout .btn-baselayout-action.disabled,seam-base-layout .btn-baselayout-action:disabled{color:#212529;background-color:#e9ecef;border-color:#e9ecef}seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled):active,seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled).active,.show>seam-base-layout .btn-baselayout-action.dropdown-toggle{color:#212529;background-color:#d3d9df;border-color:#c4ccd4}seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled):active:focus,seam-base-layout .btn-baselayout-action:not(:disabled):not(.disabled).active:focus,.show>seam-base-layout .btn-baselayout-action.dropdown-toggle:focus{box-shadow:0 0 0 .2rem #cbced180}seam-base-layout .btn-baselayout-action:hover{color:#6c757d}seam-base-layout .btn-baselayout-action:focus,seam-base-layout .btn-baselayout-action.focus{color:#6c757d}\n"]
|
|
249
269
|
},] }
|
|
250
270
|
];
|
|
251
271
|
TheSeamBaseLayoutComponent.ctorParameters = function () { return [
|
|
@@ -254,6 +274,8 @@
|
|
|
254
274
|
]; };
|
|
255
275
|
TheSeamBaseLayoutComponent.propDecorators = {
|
|
256
276
|
overlayNav: [{ type: i0.Input }],
|
|
277
|
+
mobileBreakpoint: [{ type: i0.Input }],
|
|
278
|
+
showSidebar: [{ type: i0.Input }],
|
|
257
279
|
_topBarTpl: [{ type: i0.ContentChild, args: [BaseLayoutTopBarDirective, { static: true, read: i0.TemplateRef },] }],
|
|
258
280
|
_sideBarTpl: [{ type: i0.ContentChild, args: [BaseLayoutSideBarDirective, { static: true, read: i0.TemplateRef },] }],
|
|
259
281
|
_contentTpl: [{ type: i0.ContentChild, args: [BaseLayoutContentDirective, { static: true, read: i0.TemplateRef },] }],
|
|
@@ -276,6 +298,21 @@
|
|
|
276
298
|
{ type: i0.ElementRef }
|
|
277
299
|
]; };
|
|
278
300
|
|
|
301
|
+
var BaseLayoutSideBarHeaderDirective = /** @class */ (function () {
|
|
302
|
+
function BaseLayoutSideBarHeaderDirective(_elementRef) {
|
|
303
|
+
this._elementRef = _elementRef;
|
|
304
|
+
}
|
|
305
|
+
return BaseLayoutSideBarHeaderDirective;
|
|
306
|
+
}());
|
|
307
|
+
BaseLayoutSideBarHeaderDirective.decorators = [
|
|
308
|
+
{ type: i0.Directive, args: [{
|
|
309
|
+
selector: '[seamBaseLayoutSideBarHeader]'
|
|
310
|
+
},] }
|
|
311
|
+
];
|
|
312
|
+
BaseLayoutSideBarHeaderDirective.ctorParameters = function () { return [
|
|
313
|
+
{ type: i0.ElementRef }
|
|
314
|
+
]; };
|
|
315
|
+
|
|
279
316
|
var TheSeamBaseLayoutModule = /** @class */ (function () {
|
|
280
317
|
function TheSeamBaseLayoutModule() {
|
|
281
318
|
}
|
|
@@ -288,6 +325,7 @@
|
|
|
288
325
|
BaseLayoutContentDirective,
|
|
289
326
|
BaseLayoutSideBarDirective,
|
|
290
327
|
BaseLayoutSideBarFooterDirective,
|
|
328
|
+
BaseLayoutSideBarHeaderDirective,
|
|
291
329
|
BaseLayoutTopBarDirective,
|
|
292
330
|
BaseLayoutNavToggleDirective,
|
|
293
331
|
BaseLayoutContentHeaderDirective,
|
|
@@ -305,6 +343,7 @@
|
|
|
305
343
|
BaseLayoutContentDirective,
|
|
306
344
|
BaseLayoutSideBarDirective,
|
|
307
345
|
BaseLayoutSideBarFooterDirective,
|
|
346
|
+
BaseLayoutSideBarHeaderDirective,
|
|
308
347
|
BaseLayoutTopBarDirective,
|
|
309
348
|
BaseLayoutNavToggleDirective,
|
|
310
349
|
BaseLayoutContentHeaderDirective,
|
|
@@ -1774,14 +1813,20 @@
|
|
|
1774
1813
|
this._sideNav = _sideNav;
|
|
1775
1814
|
this._baseLayoutRef = _baseLayoutRef;
|
|
1776
1815
|
this._ngUnsubscribe = new rxjs.Subject();
|
|
1816
|
+
this.faBars = freeSolidSvgIcons.faBars;
|
|
1777
1817
|
// @HostBinding('@sideNavExpand') _sideNavExpand = EXPANDED_STATE
|
|
1778
1818
|
// _sideNavExpand = EXPANDED_STATE
|
|
1779
1819
|
// @HostBinding('@sideNavAnim') _sideNavExpand = EXPANDED_STATE
|
|
1780
1820
|
this._sideNavExpand = 'initial';
|
|
1781
1821
|
this.hasHeaderToggle = true;
|
|
1822
|
+
this.toggleIcon = freeSolidSvgIcons.faBars;
|
|
1782
1823
|
this._items = new rxjs.BehaviorSubject([]);
|
|
1824
|
+
this.indentSize = 10;
|
|
1783
1825
|
this._expanded = new rxjs.BehaviorSubject(true);
|
|
1784
1826
|
this.expanded$ = this._expanded.asObservable();
|
|
1827
|
+
this.expandOrigin = 'left';
|
|
1828
|
+
this.expandHeight = '100%';
|
|
1829
|
+
this.expandWidth = 'calc(100vw - 50px)';
|
|
1785
1830
|
this._overlay = new rxjs.BehaviorSubject(false);
|
|
1786
1831
|
this.overlay$ = this._overlay.asObservable();
|
|
1787
1832
|
this.toggleExpand = new i0.EventEmitter();
|
|
@@ -1831,6 +1876,9 @@
|
|
|
1831
1876
|
this.sideNavExpandedState$
|
|
1832
1877
|
.pipe(operators.takeUntil(this._ngUnsubscribe))
|
|
1833
1878
|
.subscribe(function (v) { return _this._sideNavExpand = v; });
|
|
1879
|
+
if (this._sideBarHeaderTpl) {
|
|
1880
|
+
this._sideBarHeaderPortal = new portal.TemplatePortal(this._sideBarHeaderTpl, this._viewContainerRef);
|
|
1881
|
+
}
|
|
1834
1882
|
if (this._sideBarFooterTpl) {
|
|
1835
1883
|
this._sideBarFooterPortal = new portal.TemplatePortal(this._sideBarFooterTpl, this._viewContainerRef);
|
|
1836
1884
|
}
|
|
@@ -1861,12 +1909,33 @@
|
|
|
1861
1909
|
this._backdropHidden.next(true);
|
|
1862
1910
|
}
|
|
1863
1911
|
};
|
|
1912
|
+
Object.defineProperty(SideNavComponent.prototype, "expandOriginTransform", {
|
|
1913
|
+
get: function () {
|
|
1914
|
+
switch (this.expandOrigin) {
|
|
1915
|
+
case 'right':
|
|
1916
|
+
return this._sideNavExpand === EXPANDED_OVERLAY_STATE ? 'translateX(100vw) translateX(-100%)' :
|
|
1917
|
+
this._sideNavExpand === COLLAPSED_OVERLAY_STATE ? 'translateX(100vw)' : null;
|
|
1918
|
+
case 'top':
|
|
1919
|
+
return this._sideNavExpand === EXPANDED_OVERLAY_STATE ? 'translateY(0)' :
|
|
1920
|
+
this._sideNavExpand === COLLAPSED_OVERLAY_STATE ? 'translateY(-100%)' : null;
|
|
1921
|
+
case 'bottom':
|
|
1922
|
+
return this._sideNavExpand === EXPANDED_OVERLAY_STATE ? 'translateY(100vh) translateY(-100%)' :
|
|
1923
|
+
this._sideNavExpand === COLLAPSED_OVERLAY_STATE ? 'translateY(100vh)' : null;
|
|
1924
|
+
case 'left':
|
|
1925
|
+
default:
|
|
1926
|
+
return this._sideNavExpand === EXPANDED_OVERLAY_STATE ? 'translateX(0)' :
|
|
1927
|
+
this._sideNavExpand === COLLAPSED_OVERLAY_STATE ? 'translateX(-100%)' : null;
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
enumerable: false,
|
|
1931
|
+
configurable: true
|
|
1932
|
+
});
|
|
1864
1933
|
return SideNavComponent;
|
|
1865
1934
|
}());
|
|
1866
1935
|
SideNavComponent.decorators = [
|
|
1867
1936
|
{ type: i0.Component, args: [{
|
|
1868
1937
|
selector: 'seam-side-nav',
|
|
1869
|
-
template: "<div class=\"side-nav-backdrop\" *ngIf=\"isMobile$ | async\"\n [@sideNavBackdrop]=\"_sideNavExpand\"\n [class.side-nav-backdrop-hidden]=\"_backdropHidden | async\"></div>\n\n<div
|
|
1938
|
+
template: "<div class=\"side-nav-backdrop\" *ngIf=\"isMobile$ | async\"\n [@sideNavBackdrop]=\"_sideNavExpand\"\n [class.side-nav-backdrop-hidden]=\"_backdropHidden | async\"\n (click)=\"collapse()\"></div>\n\n<div\n class=\"side-nav-inner-wrapper\"\n [@sideNavExpand]=\"{\n value: _sideNavExpand,\n params: {\n origin: expandOriginTransform,\n height: expandHeight,\n width: expandWidth\n }\n }\"\n (@sideNavExpand.start)=\"animateStart()\"\n (@sideNavExpand.done)=\"animateEnd()\">\n <nav class=\"nav side-nav-content\">\n <seam-side-nav-toggle *ngIf=\"hasHeaderToggle\"\n [toggleIcon]=\"toggleIcon\"\n [toggleTpl]=\"toggleTpl\"\n [expanded]=\"expanded$ | async\"\n (toggleExpand)=\"toggle()\">\n <ng-template [cdkPortalOutlet]=\"_sideBarHeaderPortal\"></ng-template>\n </seam-side-nav-toggle>\n <div class=\"side-nav-items-container\" seamOverlayScrollbar>\n <div class=\"side-nav--group side-nav--group--level-0\">\n <seam-side-nav-item *ngFor=\"let item of items$ | async\"\n [compact]=\"!(expanded$ | async)\"\n [itemType]=\"$any(item)?.itemType\"\n [icon]=\"$any(item)?.icon\"\n [label]=\"$any(item)?.label\"\n [link]=\"$any(item)?.link\"\n [badgeText]=\"$any(item)?.badge?.text\"\n [badgeTheme]=\"$any(item)?.badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(item)?.badge?.srContent\"\n [badgeTooltip]=\"$any(item)?.badge?.tooltip\"\n [queryParams]=\"$any(item)?.queryParams\"\n [children]=\"$any(item)?.children\"\n [active]=\"$any(item).__state?.active\"\n [expanded]=\"$any(item).__state?.expanded\"\n [hideEmptyIcon]=\"hideEmptyIcon\"\n [indentSize]=\"indentSize\">\n </seam-side-nav-item>\n </div>\n </div>\n <ng-template [cdkPortalOutlet]=\"_sideBarFooterPortal\"></ng-template>\n </nav>\n</div>\n",
|
|
1870
1939
|
providers: [
|
|
1871
1940
|
TheSeamSideNavService
|
|
1872
1941
|
],
|
|
@@ -1893,32 +1962,42 @@
|
|
|
1893
1962
|
animations.transition(sideNavExpandStateChangeFn, animations.animate('0.2s ease-in-out')),
|
|
1894
1963
|
]),
|
|
1895
1964
|
animations.trigger('sideNavExpand', [
|
|
1896
|
-
// TODO: Make width configurable.
|
|
1965
|
+
// TODO: Make width configurable for non-overlay state.
|
|
1897
1966
|
animations.state(EXPANDED_STATE$1, animations.style({ width: '260px' })),
|
|
1898
1967
|
animations.state(COLLAPSED_STATE$1, animations.style({ width: '50px', 'overflow-x': 'hidden' })),
|
|
1899
1968
|
animations.state(EXPANDED_OVERLAY_STATE, animations.style({
|
|
1900
1969
|
position: 'absolute',
|
|
1901
1970
|
top: 0,
|
|
1902
|
-
height: '100%',
|
|
1903
1971
|
bottom: 0,
|
|
1904
1972
|
left: 0,
|
|
1905
|
-
|
|
1973
|
+
height: '{{ height }}',
|
|
1974
|
+
width: '{{ width }}',
|
|
1975
|
+
transform: '{{ origin }}',
|
|
1906
1976
|
zIndex: '9999',
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1977
|
+
}), {
|
|
1978
|
+
params: {
|
|
1979
|
+
origin: 'translateX(100%)',
|
|
1980
|
+
height: '100%',
|
|
1981
|
+
width: 'calc(100vw - 50px)',
|
|
1982
|
+
}
|
|
1983
|
+
}),
|
|
1910
1984
|
animations.state(COLLAPSED_OVERLAY_STATE, animations.style({
|
|
1911
1985
|
position: 'absolute',
|
|
1912
1986
|
top: 0,
|
|
1913
|
-
height: '100%',
|
|
1914
1987
|
bottom: 0,
|
|
1915
1988
|
left: 0,
|
|
1916
|
-
|
|
1989
|
+
height: '{{ height }}',
|
|
1990
|
+
width: '{{ width }}',
|
|
1991
|
+
transform: '{{ origin }}',
|
|
1992
|
+
'overflow-x': 'hidden',
|
|
1917
1993
|
zIndex: '9999',
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1994
|
+
}), {
|
|
1995
|
+
params: {
|
|
1996
|
+
origin: 'translateX(0)',
|
|
1997
|
+
height: '100%',
|
|
1998
|
+
width: 'calc(100vw - 50px)',
|
|
1999
|
+
}
|
|
2000
|
+
}),
|
|
1922
2001
|
// transition(`${EXPANDED_STATE} <=> ${COLLAPSED_STATE}`, animate('0.2s ease-in-out')),
|
|
1923
2002
|
animations.transition(sideNavExpandStateChangeFn, animations.animate('0.2s ease-in-out')),
|
|
1924
2003
|
// transition(`${EXPANDED_STATE} <=> ${COLLAPSED_STATE}`, [
|
|
@@ -1947,15 +2026,26 @@
|
|
|
1947
2026
|
SideNavComponent.propDecorators = {
|
|
1948
2027
|
_sideNavExpand: [{ type: i0.HostBinding, args: ['@sideNavAnim',] }],
|
|
1949
2028
|
hasHeaderToggle: [{ type: i0.Input }],
|
|
2029
|
+
toggleIcon: [{ type: i0.Input }],
|
|
2030
|
+
toggleTpl: [{ type: i0.Input }],
|
|
1950
2031
|
items: [{ type: i0.Input }],
|
|
2032
|
+
hideEmptyIcon: [{ type: i0.Input }],
|
|
2033
|
+
indentSize: [{ type: i0.Input }],
|
|
1951
2034
|
expanded: [{ type: i0.Input }],
|
|
2035
|
+
expandOrigin: [{ type: i0.Input }],
|
|
2036
|
+
expandHeight: [{ type: i0.Input }],
|
|
2037
|
+
expandWidth: [{ type: i0.Input }],
|
|
1952
2038
|
overlay: [{ type: i0.Input }],
|
|
1953
2039
|
toggleExpand: [{ type: i0.Output }],
|
|
2040
|
+
_sideBarHeaderTpl: [{ type: i0.ContentChild, args: [BaseLayoutSideBarHeaderDirective, { static: true, read: i0.TemplateRef },] }],
|
|
1954
2041
|
_sideBarFooterTpl: [{ type: i0.ContentChild, args: [BaseLayoutSideBarFooterDirective, { static: true, read: i0.TemplateRef },] }]
|
|
1955
2042
|
};
|
|
1956
2043
|
__decorate([
|
|
1957
2044
|
core.InputBoolean()
|
|
1958
|
-
], SideNavComponent.prototype, "hasHeaderToggle", void 0);
|
|
2045
|
+
], SideNavComponent.prototype, "hasHeaderToggle", void 0);
|
|
2046
|
+
__decorate([
|
|
2047
|
+
core.InputNumber(10)
|
|
2048
|
+
], SideNavComponent.prototype, "indentSize", void 0);
|
|
1959
2049
|
|
|
1960
2050
|
var EXPANDED_STATE = 'expanded';
|
|
1961
2051
|
var COLLAPSED_STATE = 'collapsed';
|
|
@@ -2008,13 +2098,14 @@
|
|
|
2008
2098
|
this._badgeTooltip = {
|
|
2009
2099
|
tooltip: value,
|
|
2010
2100
|
placement: 'auto',
|
|
2011
|
-
disabled: false
|
|
2101
|
+
disabled: false,
|
|
2102
|
+
container: 'body'
|
|
2012
2103
|
};
|
|
2013
2104
|
}
|
|
2014
2105
|
else {
|
|
2015
2106
|
this._badgeTooltip = Object.assign(Object.assign({}, value), { placement: value.placement || 'auto', disabled: typeof (value === null || value === void 0 ? void 0 : value.disabled) === 'boolean'
|
|
2016
2107
|
? value.disabled
|
|
2017
|
-
: typeof value.tooltip === 'string' ? false : true });
|
|
2108
|
+
: typeof value.tooltip === 'string' ? false : true, container: value.container || 'body' });
|
|
2018
2109
|
}
|
|
2019
2110
|
}
|
|
2020
2111
|
else {
|
|
@@ -2054,12 +2145,19 @@
|
|
|
2054
2145
|
this._sideNav.collapse();
|
|
2055
2146
|
}
|
|
2056
2147
|
};
|
|
2148
|
+
Object.defineProperty(SideNavItemComponent.prototype, "showIconBlock", {
|
|
2149
|
+
get: function () {
|
|
2150
|
+
return utils.notNullOrUndefined(this.icon) || this.hideEmptyIcon !== true;
|
|
2151
|
+
},
|
|
2152
|
+
enumerable: false,
|
|
2153
|
+
configurable: true
|
|
2154
|
+
});
|
|
2057
2155
|
return SideNavItemComponent;
|
|
2058
2156
|
}());
|
|
2059
2157
|
SideNavItemComponent.decorators = [
|
|
2060
2158
|
{ type: i0.Component, args: [{
|
|
2061
2159
|
selector: 'seam-side-nav-item',
|
|
2062
|
-
template: "<div class=\"d-flex flex-row\">\n <ng-container *ngIf=\"itemType === 'basic'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeBasic\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'link'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeLink\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'divider'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeDivider\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'title'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeTitle\"></ng-template>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"hasChildren\">\n <div class=\"side-nav--group side-nav--group--level-{{ hierLevel + 1 }}\"\n [@childGroupAnim]=\"childGroupAnimState$ | async\">\n <seam-side-nav-item *ngFor=\"let child of children\"\n [hierLevel]=\"compact ? 0 : (hierLevel + 1)\"\n [compact]=\"compact\"\n [itemType]=\"$any(child).itemType\"\n [icon]=\"$any(child).icon\"\n [label]=\"$any(child).label\"\n [link]=\"$any(child).link\"\n [badgeText]=\"$any(child).badge?.text\"\n [badgeTheme]=\"$any(child).badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(child).badge?.srContent\"\n [badgeTooltip]=\"$any(child)?.badge?.tooltip\"\n [queryParams]=\"$any(child).queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n [children]=\"$any(child)?.children\"\n [active]=\"$any(child).__state
|
|
2160
|
+
template: "<div class=\"d-flex flex-row side-nav-item-wrapper\">\n <ng-container *ngIf=\"itemType === 'basic'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeBasic\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'link'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeLink\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'divider'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeDivider\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'title'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeTitle\"></ng-template>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"hasChildren\">\n <div class=\"side-nav--group side-nav--group--level-{{ hierLevel + 1 }}\"\n [@childGroupAnim]=\"childGroupAnimState$ | async\">\n <seam-side-nav-item *ngFor=\"let child of children\"\n [hierLevel]=\"compact ? 0 : (hierLevel + 1)\"\n [compact]=\"compact\"\n [itemType]=\"$any(child).itemType\"\n [icon]=\"$any(child).icon\"\n [label]=\"$any(child).label\"\n [link]=\"$any(child).link\"\n [badgeText]=\"$any(child).badge?.text\"\n [badgeTheme]=\"$any(child).badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(child).badge?.srContent\"\n [badgeTooltip]=\"$any(child)?.badge?.tooltip\"\n [queryParams]=\"$any(child).queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n [children]=\"$any(child)?.children\"\n [active]=\"$any(child).__state?.active\"\n [expanded]=\"$any(child).__state?.expanded\"\n [hideEmptyIcon]=\"hideEmptyIcon\"\n [indentSize]=\"indentSize\">\n </seam-side-nav-item>\n </div>\n</ng-container>\n\n<ng-template #itemTypeBasic>\n <button class=\"side-nav-item btn side-nav-btn p-0 d-flex flex-row align-items-stretch rounded-0 text-decoration-none text-nowrap w-100\"\n cdkMonitorElementFocus\n (click)=\"toggleChildren()\"\n [attr.aria-expanded]=\"expanded\">\n <div class=\"nav-link d-flex flex-row align-items-center w-100\" [class.nav-link__compact]=\"compact\">\n <div [style.padding-left.px]=\"hierLevel * indentSize\"></div>\n <div class=\"side-nav-item--icon\" *ngIf=\"showIconBlock\">\n <seam-icon *ngIf=\"icon\" [icon]=\"icon\"></seam-icon>\n <ng-container *ngIf=\"compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n <span *ngIf=\"!compact\" side-nav-item-label style=\"margin-left: 11px;\">\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" side-nav-item-label>{{ label }}</span>\n <ng-container *ngIf=\"!compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n\n <div *ngIf=\"hasChildren && !compact\"\n class=\"btn side-nav-btn side-nav-item--toggle-btn-container rounded-0\">\n <seam-icon\n class=\"side-nav-item--toggle-btn\"\n [class.side-nav-item--toggle-btn-expanded]=\"expanded\"\n [icon]=\"faAngleLeft\"\n type>\n </seam-icon>\n </div>\n </button>\n</ng-template>\n\n<ng-template #itemTypeLink>\n <a *ngIf=\"link; else noLink\" class=\"side-nav-item nav-link d-flex flex-row text-nowrap w-100 align-items-center\"\n [class.nav-link__compact]=\"compact\"\n [routerLink]=\"link\"\n [queryParams]=\"queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n (click)=\"_linkClicked()\">\n <div [style.padding-left.px]=\"hierLevel * indentSize\"></div>\n <div class=\"side-nav-item--icon\" *ngIf=\"showIconBlock\">\n <seam-icon *ngIf=\"icon\" [icon]=\"icon\"></seam-icon>\n <ng-container *ngIf=\"compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n <span *ngIf=\"!compact\" style=\"margin-left: 11px;\" side-nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" side-nav-item-label>{{ label }}</span>\n <ng-container *ngIf=\"!compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </a>\n\n <ng-template #noLink>\n <a class=\"side-nav-item nav-link d-flex flex-row text-nowrap w-100 align-items-center\" [class.nav-link__compact]=\"compact\">\n <div [style.padding-left.px]=\"hierLevel * indentSize\"></div>\n <div class=\"side-nav-item--icon\" *ngIf=\"showIconBlock\">\n <seam-icon *ngIf=\"icon\" [icon]=\"icon\"></seam-icon>\n </div>\n <span *ngIf=\"!compact\" style=\"margin-left: 11px;\" side-nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" side-nav-item-label>{{ label }}</span>\n </a>\n </ng-template>\n\n <button *ngIf=\"hasChildren && !compact\"\n type=\"button\"\n class=\"btn side-nav-btn side-nav-item--toggle-btn-container rounded-0\"\n (click)=\"toggleChildren()\"\n [attr.aria-expanded]=\"expanded\"\n cdkMonitorElementFocus>\n <seam-icon\n class=\"side-nav-item--toggle-btn\"\n [class.side-nav-item--toggle-btn-expanded]=\"expanded\"\n [icon]=\"faAngleLeft\"\n type>\n </seam-icon>\n <span class=\"sr-only\">Group Toggle</span>\n </button>\n</ng-template>\n\n<ng-template #itemTypeDivider>\n <div class=\"px-2 w-100\">\n <hr class=\"side-nav-item--divider\" />\n </div>\n</ng-template>\n\n<ng-template #itemTypeTitle>\n <ng-container *ngIf=\"!compact\">\n <span class=\"side-nav-item--title pt-1\" side-nav-item-label>{{ label }}</span>\n </ng-container>\n</ng-template>\n\n<ng-template #itemBadge>\n <ng-container *ngIf=\"badgeText\">\n <div class=\"badge-spacer flex-grow-1\" *ngIf=\"!compact\"></div>\n <div class=\"side-nav-item--badge\"\n [class.side-nav-item--badge-no-icon]=\"!icon\"\n [ngbTooltip]=\"$any(badgeTooltip)?.tooltip\"\n [tooltipClass]=\"$any(badgeTooltip)?.class\"\n [placement]=\"$any(badgeTooltip)?.placement\"\n [container]=\"$any(badgeTooltip)?.container\"\n [disableTooltip]=\"!badgeTooltip || !!$any(badgeTooltip)?.disabled\">\n <span class=\"badge badge-pill badge-{{ badgeTheme }}\">\n <ng-container *ngIf=\"!compact || !icon\">\n {{ badgeText }}\n </ng-container>\n <span *ngIf=\"badgeSrContent\">{{ badgeSrContent }}</span>\n </span>\n </div>\n </ng-container>\n</ng-template>\n",
|
|
2063
2161
|
exportAs: 'seamSideNavItem',
|
|
2064
2162
|
animations: [
|
|
2065
2163
|
animations.trigger('childGroupAnim', [
|
|
@@ -2092,7 +2190,7 @@
|
|
|
2092
2190
|
],
|
|
2093
2191
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2094
2192
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2095
|
-
styles: ["seam-side-nav-item{display:block;transition:.25s ease-in-out background-color}seam-side-nav-item.seam-side-nav-item--active{background-color:#2a6395}seam-side-nav-item.seam-side-nav-item--active .active,seam-side-nav-item.seam-side-nav-item--active:active,seam-side-nav-item.seam-side-nav-item--active .side-nav-item.active:hover{background-color:#2a6395}seam-side-nav-item.seam-side-nav-item--active .side-nav-item:hover{background-color:#2f71a9}seam-side-nav-item.seam-side-nav-item--active .nav-link{color:#fff}seam-side-nav-item .badge{vertical-align:middle}seam-side-nav-item:not(.side-nav-item--icon) .side-nav-item--badge{pointer-events:all;margin-left:5px;margin-right:3px}seam-side-nav-item .side-nav-item--icon{position:relative;width:24px;max-width:24px;min-width:24px;height:24px;max-height:24px;min-height:24px;text-align:center}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge{top:-4px;right:-4px;position:absolute}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge .badge:empty{display:block;width:8px;height:8px;padding:0}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge.side-nav-item--badge-no-icon{top:0px;right:0px}seam-side-nav-item .side-nav-item{min-height:45px;transition:.25s ease-in-out background-color}seam-side-nav-item .side-nav-item:hover{background-color:#2f71a9}seam-side-nav-item .side-nav-item.active{pointer-events:none;cursor:default}seam-side-nav-item a.side-nav-item:not([href]):not([tabindex]){color:#ccc}seam-side-nav-item a.side-nav-item:not([href]):not([tabindex]):hover{background-color:transparent}seam-side-nav-item .nav-link{color:#fff;padding-right:2px}seam-side-nav-item .nav-link__compact{padding-right:0;padding-left:12px}seam-side-nav-item .nav-link:last-child{padding-right:8px}seam-side-nav-item .side-nav-btn{font-weight:400;color:#fff;text-decoration:none}seam-side-nav-item .side-nav-btn:hover{color:#
|
|
2193
|
+
styles: ["seam-side-nav-item{display:block;transition:.25s ease-in-out background-color}seam-side-nav-item.seam-side-nav-item--active{background-color:#2a6395}seam-side-nav-item.seam-side-nav-item--active .active,seam-side-nav-item.seam-side-nav-item--active:active,seam-side-nav-item.seam-side-nav-item--active .side-nav-item.active:hover{background-color:#2a6395}seam-side-nav-item.seam-side-nav-item--active .side-nav-item:hover{background-color:#2f71a9}seam-side-nav-item.seam-side-nav-item--active .nav-link{color:#fff}seam-side-nav-item.seam-side-nav-item--active .side-nav-btn{color:#fff}seam-side-nav-item .badge{vertical-align:middle}seam-side-nav-item:not(.side-nav-item--icon) .side-nav-item--badge{pointer-events:all;margin-left:5px;margin-right:3px}seam-side-nav-item .side-nav-item--icon{position:relative;width:24px;max-width:24px;min-width:24px;height:24px;max-height:24px;min-height:24px;text-align:center}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge{top:-4px;right:-4px;position:absolute}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge .badge:empty{display:block;width:8px;height:8px;padding:0}seam-side-nav-item .side-nav-item--icon .side-nav-item--badge.side-nav-item--badge-no-icon{top:0px;right:0px}seam-side-nav-item .side-nav-item{min-height:45px;transition:.25s ease-in-out background-color}seam-side-nav-item .side-nav-item:hover{background-color:#2f71a9}seam-side-nav-item .side-nav-item.active{pointer-events:none;cursor:default}seam-side-nav-item a.side-nav-item:not([href]):not([tabindex]){color:#ccc}seam-side-nav-item a.side-nav-item:not([href]):not([tabindex]):hover{background-color:transparent}seam-side-nav-item .nav-link{color:#fff;padding-right:2px}seam-side-nav-item .nav-link__compact{padding-right:0;padding-left:12px}seam-side-nav-item .nav-link:last-child{padding-right:8px}seam-side-nav-item .side-nav-btn{font-weight:400;color:#fff;text-decoration:none}seam-side-nav-item .side-nav-btn:hover{color:#fff;text-decoration:underline}seam-side-nav-item .side-nav-btn:focus,seam-side-nav-item .side-nav-btn.focus{text-decoration:underline;box-shadow:none}seam-side-nav-item .side-nav-btn:disabled,seam-side-nav-item .side-nav-btn.disabled{color:#ccc;pointer-events:none}seam-side-nav-item .cdk-keyboard-focused{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}seam-side-nav-item .side-nav-item--toggle-btn-container{transition:.25s ease-in-out background-color;padding:.5rem 1rem}seam-side-nav-item button.side-nav-item--toggle-btn-container:hover{background-color:#2f71a9}seam-side-nav-item .side-nav-item--toggle-btn .svg-inline--fa{transition:.1s ease-in-out transform}seam-side-nav-item .side-nav-item--toggle-btn.side-nav-item--toggle-btn-expanded .svg-inline--fa{transform:rotate(-90deg)}seam-side-nav-item .side-nav--group{will-change:height;overflow:hidden}seam-side-nav-item .side-nav--group--level-1{background-color:#3276b1}seam-side-nav-item .side-nav--group--level-2{background-color:#2e6ea5}seam-side-nav-item .side-nav--group--level-3{background-color:#2b6699}seam-side-nav-item .side-nav--group--level-4{background-color:#285e8d}seam-side-nav-item .side-nav--group--level-5{background-color:#245681}seam-side-nav-item .side-nav--group--level-6{background-color:#214e75}seam-side-nav-item .side-nav--group--level-7{background-color:#1e4669}seam-side-nav-item .side-nav--group--level-8{background-color:#1a3e5d}seam-side-nav-item .side-nav--group--level-9{background-color:#173651}seam-side-nav-item .side-nav-item--divider{display:block;border-top:1px solid #2a6395;width:100%}seam-side-nav-item .side-nav-item--title{color:#fff;font-size:24px;padding-left:10px}seam-side-nav-item .sr-only{top:0;left:0}\n"]
|
|
2096
2194
|
},] }
|
|
2097
2195
|
];
|
|
2098
2196
|
SideNavItemComponent.ctorParameters = function () { return [
|
|
@@ -2102,6 +2200,7 @@
|
|
|
2102
2200
|
SideNavItemComponent.propDecorators = {
|
|
2103
2201
|
itemType: [{ type: i0.Input }],
|
|
2104
2202
|
icon: [{ type: i0.Input }],
|
|
2203
|
+
hideEmptyIcon: [{ type: i0.Input }],
|
|
2105
2204
|
label: [{ type: i0.Input }],
|
|
2106
2205
|
active: [{ type: i0.Input }],
|
|
2107
2206
|
link: [{ type: i0.Input }],
|
|
@@ -2130,7 +2229,6 @@
|
|
|
2130
2229
|
|
|
2131
2230
|
var SideNavToggleComponent = /** @class */ (function () {
|
|
2132
2231
|
function SideNavToggleComponent() {
|
|
2133
|
-
this.faBars = freeSolidSvgIcons.faBars;
|
|
2134
2232
|
this.expanded = false;
|
|
2135
2233
|
this.toggleExpand = new i0.EventEmitter();
|
|
2136
2234
|
}
|
|
@@ -2143,18 +2241,20 @@
|
|
|
2143
2241
|
SideNavToggleComponent.decorators = [
|
|
2144
2242
|
{ type: i0.Component, args: [{
|
|
2145
2243
|
selector: 'seam-side-nav-toggle',
|
|
2146
|
-
template: "<div class=\"side-nav-toggle--content\" *ngIf=\"expanded\">\n
|
|
2244
|
+
template: "<div class=\"side-nav-toggle--content\">\n <ng-container *ngIf=\"expanded\">\n <ng-content></ng-content>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"toggleTpl; else iconBtn\">\n <button\n class=\"side-nav-toggle--btn mx-1\"\n (click)=\"toggle()\">\n <span class=\"sr-only\">Toggle sidebar</span>\n <ng-container *ngTemplateOutlet=\"toggleTpl\"></ng-container>\n </button>\n</ng-container>\n\n<ng-template #iconBtn>\n <button seamIconBtn [icon]=\"toggleIcon\"\n iconType=\"borderless-styled-square\"\n btnSize=\"sm\"\n class=\"side-nav-toggle--btn mx-1\"\n (click)=\"toggle()\">\n <span class=\"sr-only\">Toggle sidebar</span>\n </button>\n</ng-template>\n",
|
|
2147
2245
|
host: {
|
|
2148
2246
|
'[class.side-nav-toggle--compact]': '!expanded'
|
|
2149
2247
|
},
|
|
2150
2248
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2151
2249
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2152
|
-
styles: ["seam-side-nav-toggle{display:flex;flex-direction:row;flex-shrink:0;position:relative;height:45px;width:100%}seam-side-nav-toggle .side-nav-toggle--content{flex:1 1 0}seam-side-nav-toggle .side-nav-toggle--btn{
|
|
2250
|
+
styles: ["seam-side-nav-toggle{display:flex;flex-direction:row;flex-shrink:0;align-items:center;background:#357ebd;position:relative;height:45px;width:100%}seam-side-nav-toggle .side-nav-toggle--content{flex:1 1 0}seam-side-nav-toggle .side-nav-toggle--btn{color:#fff}seam-side-nav-toggle .side-nav-toggle--btn seam-icon{padding:5px}\n"]
|
|
2153
2251
|
},] }
|
|
2154
2252
|
];
|
|
2155
2253
|
SideNavToggleComponent.ctorParameters = function () { return []; };
|
|
2156
2254
|
SideNavToggleComponent.propDecorators = {
|
|
2157
2255
|
expanded: [{ type: i0.Input }],
|
|
2256
|
+
toggleIcon: [{ type: i0.Input }],
|
|
2257
|
+
toggleTpl: [{ type: i0.Input }],
|
|
2158
2258
|
toggleExpand: [{ type: i0.Output }]
|
|
2159
2259
|
};
|
|
2160
2260
|
__decorate([
|
|
@@ -2233,7 +2333,7 @@
|
|
|
2233
2333
|
{ type: i0.Component, args: [{
|
|
2234
2334
|
// tslint:disable-next-line:component-selector
|
|
2235
2335
|
selector: 'button[seamTopBarMenuButton]',
|
|
2236
|
-
template: "<div class=\"d-flex flex-row\" *ngIf=\"!compact; else compactTpl\">\n <div class=\"text-left flex-grow-1 text-truncate\">\n <ng-template [ngTemplateOutlet]=\"$any(detailTpl)\"></ng-template>\n </div>\n <!-- Arrow Button -->\n <div class=\"pl-2 d-flex flex-column\">\n <div class=\"flex-grow-1\"></div>\n <seam-icon class=\"d-block\" [icon]=\"faAngleDown\"></seam-icon>\n <div class=\"flex-grow-1\"></div>\n </div>\n</div>\n<ng-template #compactTpl>\n <seam-icon [icon]=\"profileIcon\" iconType=\"borderless-styled-square\"></seam-icon>\n</ng-template>\n",
|
|
2336
|
+
template: "<div class=\"d-flex flex-row\" *ngIf=\"!compact; else compactTpl\">\n <div class=\"text-left flex-grow-1 text-truncate\">\n <ng-template [ngTemplateOutlet]=\"$any(detailTpl)\"></ng-template>\n </div>\n <!-- Arrow Button -->\n <div class=\"pl-2 d-flex flex-column\">\n <div class=\"flex-grow-1\"></div>\n <seam-icon class=\"d-block\" [icon]=\"faAngleDown\"></seam-icon>\n <div class=\"flex-grow-1\"></div>\n </div>\n</div>\n<ng-template #compactTpl>\n <ng-container *ngIf=\"compactDetailTpl; else iconTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(compactDetailTpl)\"></ng-template>\n </ng-container>\n <ng-template #iconTpl>\n <seam-icon [icon]=\"profileIcon\" iconType=\"borderless-styled-square\"></seam-icon>\n </ng-template>\n</ng-template>\n",
|
|
2237
2337
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2238
2338
|
exportAs: 'seamButton',
|
|
2239
2339
|
// tslint:disable-next-line:use-input-property-decorator
|
|
@@ -2241,7 +2341,7 @@
|
|
|
2241
2341
|
// tslint:disable-next-line:use-host-property-decorator
|
|
2242
2342
|
host: {
|
|
2243
2343
|
'attr.type': 'button',
|
|
2244
|
-
'class': 'btn border text-decoration-none py-0',
|
|
2344
|
+
'class': 'btn border text-decoration-none py-0 top-bar-menu-button',
|
|
2245
2345
|
'[attr.aria-disabled]': 'disabled.toString()',
|
|
2246
2346
|
'[attr.disabled]': 'disabled || null',
|
|
2247
2347
|
},
|
|
@@ -2251,6 +2351,7 @@
|
|
|
2251
2351
|
];
|
|
2252
2352
|
TopBarMenuButtonComponent.propDecorators = {
|
|
2253
2353
|
detailTpl: [{ type: i0.Input }],
|
|
2354
|
+
compactDetailTpl: [{ type: i0.Input }],
|
|
2254
2355
|
compact: [{ type: i0.Input }],
|
|
2255
2356
|
profileIcon: [{ type: i0.Input }],
|
|
2256
2357
|
_hasCompactClass: [{ type: i0.HostBinding, args: ['class.top-bar-menu-button--compact',] }],
|
|
@@ -2286,7 +2387,15 @@
|
|
|
2286
2387
|
var TopBarItemDirective = /** @class */ (function () {
|
|
2287
2388
|
function TopBarItemDirective(template) {
|
|
2288
2389
|
this.template = template;
|
|
2390
|
+
this.position = 'right';
|
|
2289
2391
|
}
|
|
2392
|
+
Object.defineProperty(TopBarItemDirective.prototype, "seamTopBarItem", {
|
|
2393
|
+
set: function (value) {
|
|
2394
|
+
this.position = value;
|
|
2395
|
+
},
|
|
2396
|
+
enumerable: false,
|
|
2397
|
+
configurable: true
|
|
2398
|
+
});
|
|
2290
2399
|
return TopBarItemDirective;
|
|
2291
2400
|
}());
|
|
2292
2401
|
TopBarItemDirective.decorators = [
|
|
@@ -2296,7 +2405,10 @@
|
|
|
2296
2405
|
];
|
|
2297
2406
|
TopBarItemDirective.ctorParameters = function () { return [
|
|
2298
2407
|
{ type: i0.TemplateRef }
|
|
2299
|
-
]; };
|
|
2408
|
+
]; };
|
|
2409
|
+
TopBarItemDirective.propDecorators = {
|
|
2410
|
+
seamTopBarItem: [{ type: i0.Input }]
|
|
2411
|
+
};
|
|
2300
2412
|
|
|
2301
2413
|
var TopBarMenuBtnDetailDirective = /** @class */ (function () {
|
|
2302
2414
|
function TopBarMenuBtnDetailDirective(template) {
|
|
@@ -2328,6 +2440,36 @@
|
|
|
2328
2440
|
{ type: menu.MenuComponent, decorators: [{ type: i0.Self }] }
|
|
2329
2441
|
]; };
|
|
2330
2442
|
|
|
2443
|
+
var TopBarCompactMenuBtnDetailDirective = /** @class */ (function () {
|
|
2444
|
+
function TopBarCompactMenuBtnDetailDirective(template) {
|
|
2445
|
+
this.template = template;
|
|
2446
|
+
}
|
|
2447
|
+
return TopBarCompactMenuBtnDetailDirective;
|
|
2448
|
+
}());
|
|
2449
|
+
TopBarCompactMenuBtnDetailDirective.decorators = [
|
|
2450
|
+
{ type: i0.Directive, args: [{
|
|
2451
|
+
selector: '[seamTopBarCompactMenuBtnDetail]'
|
|
2452
|
+
},] }
|
|
2453
|
+
];
|
|
2454
|
+
TopBarCompactMenuBtnDetailDirective.ctorParameters = function () { return [
|
|
2455
|
+
{ type: i0.TemplateRef }
|
|
2456
|
+
]; };
|
|
2457
|
+
|
|
2458
|
+
var TopBarNavToggleBtnDetailDirective = /** @class */ (function () {
|
|
2459
|
+
function TopBarNavToggleBtnDetailDirective(template) {
|
|
2460
|
+
this.template = template;
|
|
2461
|
+
}
|
|
2462
|
+
return TopBarNavToggleBtnDetailDirective;
|
|
2463
|
+
}());
|
|
2464
|
+
TopBarNavToggleBtnDetailDirective.decorators = [
|
|
2465
|
+
{ type: i0.Directive, args: [{
|
|
2466
|
+
selector: '[seamTopBarNavToggleBtnDetail]'
|
|
2467
|
+
},] }
|
|
2468
|
+
];
|
|
2469
|
+
TopBarNavToggleBtnDetailDirective.ctorParameters = function () { return [
|
|
2470
|
+
{ type: i0.TemplateRef }
|
|
2471
|
+
]; };
|
|
2472
|
+
|
|
2331
2473
|
/**
|
|
2332
2474
|
* Top bar of an app.
|
|
2333
2475
|
*
|
|
@@ -2352,8 +2494,26 @@
|
|
|
2352
2494
|
this.logoRoute = '/';
|
|
2353
2495
|
/** Determines if the title should be displayed. */
|
|
2354
2496
|
this.hasTitle = false;
|
|
2497
|
+
/** Determines if the top bar button should be displayed. */
|
|
2498
|
+
this.hasTopBarMenuButton = true;
|
|
2355
2499
|
/** Icon to display on mobile to activate profile dropdown. Defaults to faUserCircle. */
|
|
2356
2500
|
this.profileIcon = freeRegularSvgIcons.faUserCircle;
|
|
2501
|
+
/** Icon to display for mobile nav toggle. Defaults to faBars. */
|
|
2502
|
+
this.toggleIcon = freeSolidSvgIcons.faBars;
|
|
2503
|
+
/** Display nav toggle on either left or right side of top bar. Defaults to left. */
|
|
2504
|
+
this.navToggleAlign = 'left';
|
|
2505
|
+
/** @ignore */
|
|
2506
|
+
this._leftItems = new rxjs.BehaviorSubject([]);
|
|
2507
|
+
/** Additional templates to display on left side of top bar */
|
|
2508
|
+
this.leftItems$ = this._leftItems.asObservable();
|
|
2509
|
+
/** @ignore */
|
|
2510
|
+
this._centerItems = new rxjs.BehaviorSubject([]);
|
|
2511
|
+
/** Additional templates to display in center of top bar */
|
|
2512
|
+
this.centerItems$ = this._centerItems.asObservable();
|
|
2513
|
+
/** @ignore */
|
|
2514
|
+
this._rightItems = new rxjs.BehaviorSubject([]);
|
|
2515
|
+
/** Additional templates to display on right side of top bar */
|
|
2516
|
+
this.rightItems$ = this._rightItems.asObservable();
|
|
2357
2517
|
this.isMobile$ = this._layout.isMobile$;
|
|
2358
2518
|
}
|
|
2359
2519
|
/** @ignore */
|
|
@@ -2367,7 +2527,16 @@
|
|
|
2367
2527
|
TheSeamTopBarComponent.prototype.ngAfterContentInit = function () {
|
|
2368
2528
|
var _this = this;
|
|
2369
2529
|
if (this._topBarItems) {
|
|
2370
|
-
this.
|
|
2530
|
+
this._topBarItems.changes.pipe(operators.startWith(undefined), operators.takeUntil(this._ngUnsubscribe), operators.map(function () {
|
|
2531
|
+
var _a;
|
|
2532
|
+
var items = ((_a = _this._topBarItems) === null || _a === void 0 ? void 0 : _a.toArray()) || [];
|
|
2533
|
+
var left = items.filter(function (i) { return i.position === 'left'; });
|
|
2534
|
+
var right = items.filter(function (i) { return i.position === 'right'; });
|
|
2535
|
+
var center = items.filter(function (i) { return i.position === 'center'; });
|
|
2536
|
+
_this._leftItems.next(left);
|
|
2537
|
+
_this._rightItems.next(right);
|
|
2538
|
+
_this._centerItems.next(center);
|
|
2539
|
+
}), operators.shareReplay({ bufferSize: 1, refCount: true })).subscribe();
|
|
2371
2540
|
}
|
|
2372
2541
|
};
|
|
2373
2542
|
return TheSeamTopBarComponent;
|
|
@@ -2375,11 +2544,11 @@
|
|
|
2375
2544
|
TheSeamTopBarComponent.decorators = [
|
|
2376
2545
|
{ type: i0.Component, args: [{
|
|
2377
2546
|
selector: 'seam-top-bar',
|
|
2378
|
-
template: "
|
|
2547
|
+
template: "<div class=\"top-bar--left d-flex\">\n <!-- Nav Toggle -->\n <ng-container *ngIf=\"navToggleAlign === 'left'\">\n <ng-container *ngTemplateOutlet=\"navToggle\"></ng-container>\n </ng-container>\n\n <!-- Logo -->\n <div class=\"top-bar--logo d-flex flex-column justify-content-center\" *ngIf=\"logoHref; else useLogoRoute\"\n [class.top-bar--logo-mobile]=\"isMobile$ | async\">\n <a [href]=\"logoHref\" [target]=\"logoHrefTarget\">\n <ng-container *ngTemplateOutlet=\"logoTpl\"></ng-container>\n </a>\n </div>\n\n <ng-template #useLogoRoute>\n <div class=\"top-bar--logo d-flex flex-column justify-content-center\" [routerLink]=\"logoRoute\"\n [class.top-bar--logo-mobile]=\"isMobile$ | async\">\n <ng-container *ngTemplateOutlet=\"logoTpl\"></ng-container>\n </div>\n </ng-template>\n\n <ng-template #logoTpl>\n <div>\n <img *ngIf=\"logo\" [src]=\"logo\" [src.lt-md]=\"logoSm ? logoSm : logo\" alt=\"Logo\">\n </div>\n </ng-template>\n\n <!-- Title -->\n <div class=\"d-flex flex-column\" *ngIf=\"hasTitle\">\n <seam-top-bar-title\n [titleText]=\"titleText\"\n [subTitleText]=\"subTitleText\"\n [class.ml-2]=\"isMobile$ | async\">\n </seam-top-bar-title>\n </div>\n\n <!-- Items -->\n <div class=\"top-bar-items top-bar-items--left mr-2\">\n <ng-container *ngFor=\"let item of leftItems$ | async\">\n <ng-template [ngTemplateOutlet]=\"item.template\"></ng-template>\n </ng-container>\n </div>\n</div>\n\n<div class=\"top-bar--center\">\n <!-- Items -->\n <div class=\"top-bar-items top-bar-items--center mr-2\">\n <ng-container *ngFor=\"let item of centerItems$ | async\">\n <ng-template [ngTemplateOutlet]=\"item.template\"></ng-template>\n </ng-container>\n </div>\n</div>\n\n<div class=\"top-bar--right d-flex\">\n <!-- Items -->\n <div class=\"top-bar-items top-bar-items--right mr-2\">\n <ng-container *ngFor=\"let item of rightItems$ | async\">\n <ng-template [ngTemplateOutlet]=\"item.template\"></ng-template>\n </ng-container>\n </div>\n\n <!-- Menu -->\n <button\n *ngIf=\"hasTopBarMenuButton\"\n seamTopBarMenuButton\n [seamMenuToggle]=\"_topBarMenu?.menu\"\n [detailTpl]=\"_topBarMenuBtnDetailTpl?.template\"\n [compactDetailTpl]=\"_topBarCompactMenuBtnDetailTpl?.template\"\n [compact]=\"isMobile$ | async\"\n [profileIcon]=\"profileIcon\">\n </button>\n\n <ng-container *ngIf=\"navToggleAlign === 'right'\">\n <ng-container *ngTemplateOutlet=\"navToggle\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #navToggle>\n <div class=\"d-flex flex-column justify-content-center pr-2\" *ngIf=\"isMobile$ | async\">\n <ng-container *ngIf=\"_topBarNavToggleBtnDetailTpl; else iconBtn\">\n <button seamButton seamBaseLayoutNavToggle>\n <ng-template [ngTemplateOutlet]=\"_topBarNavToggleBtnDetailTpl?.template\"></ng-template>\n </button>\n </ng-container>\n <ng-template #iconBtn>\n <button seamBaseLayoutNavToggle seamIconBtn [icon]=\"toggleIcon\" iconType=\"borderless-styled-square\"></button>\n </ng-template>\n </div>\n</ng-template>\n\n",
|
|
2379
2548
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2380
2549
|
exportAs: 'seamTopBar',
|
|
2381
2550
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2382
|
-
styles: ["seam-top-bar{display:flex;flex:1 1 100%;flex-direction:row;background:white;margin:0;padding:8px;border-radius:0;box-shadow:none}.top-bar--logo{flex:0 0 auto;overflow:hidden;cursor:pointer}.top-bar--logo img{height:auto;max-height:60px;width:auto;max-width:200px}.top-bar--logo.top-bar--logo-mobile img{height:auto;max-height:40px;width:auto;max-width:150px}.top-bar-
|
|
2551
|
+
styles: ["seam-top-bar{display:flex;flex:1 1 100%;flex-direction:row;background:white;margin:0;padding:8px;border-radius:0;box-shadow:none}.top-bar--logo{flex:0 0 auto;overflow:hidden;cursor:pointer}.top-bar--logo img{height:auto;max-height:60px;width:auto;max-width:200px}.top-bar--logo.top-bar--logo-mobile img{height:auto;max-height:40px;width:auto;max-width:150px}.top-bar--left{flex-grow:1}.top-bar-items{display:flex;align-items:center}\n"]
|
|
2383
2552
|
},] }
|
|
2384
2553
|
];
|
|
2385
2554
|
TheSeamTopBarComponent.ctorParameters = function () { return [
|
|
@@ -2389,6 +2558,8 @@
|
|
|
2389
2558
|
_topBarMenu: [{ type: i0.ContentChild, args: [TopBarMenuDirective, { static: true },] }],
|
|
2390
2559
|
_topBarItems: [{ type: i0.ContentChildren, args: [TopBarItemDirective,] }],
|
|
2391
2560
|
_topBarMenuBtnDetailTpl: [{ type: i0.ContentChild, args: [TopBarMenuBtnDetailDirective,] }],
|
|
2561
|
+
_topBarCompactMenuBtnDetailTpl: [{ type: i0.ContentChild, args: [TopBarCompactMenuBtnDetailDirective,] }],
|
|
2562
|
+
_topBarNavToggleBtnDetailTpl: [{ type: i0.ContentChild, args: [TopBarNavToggleBtnDetailDirective,] }],
|
|
2392
2563
|
logo: [{ type: i0.Input }],
|
|
2393
2564
|
logoSm: [{ type: i0.Input }],
|
|
2394
2565
|
logoHref: [{ type: i0.Input }],
|
|
@@ -2397,11 +2568,17 @@
|
|
|
2397
2568
|
hasTitle: [{ type: i0.Input }],
|
|
2398
2569
|
titleText: [{ type: i0.Input }],
|
|
2399
2570
|
subTitleText: [{ type: i0.Input }],
|
|
2400
|
-
|
|
2571
|
+
hasTopBarMenuButton: [{ type: i0.Input }],
|
|
2572
|
+
profileIcon: [{ type: i0.Input }],
|
|
2573
|
+
toggleIcon: [{ type: i0.Input }],
|
|
2574
|
+
navToggleAlign: [{ type: i0.Input }]
|
|
2401
2575
|
};
|
|
2402
2576
|
__decorate([
|
|
2403
2577
|
core.InputBoolean()
|
|
2404
|
-
], TheSeamTopBarComponent.prototype, "hasTitle", void 0);
|
|
2578
|
+
], TheSeamTopBarComponent.prototype, "hasTitle", void 0);
|
|
2579
|
+
__decorate([
|
|
2580
|
+
core.InputBoolean()
|
|
2581
|
+
], TheSeamTopBarComponent.prototype, "hasTopBarMenuButton", void 0);
|
|
2405
2582
|
|
|
2406
2583
|
var TheSeamTopBarModule = /** @class */ (function () {
|
|
2407
2584
|
function TheSeamTopBarModule() {
|
|
@@ -2416,7 +2593,9 @@
|
|
|
2416
2593
|
TopBarMenuButtonComponent,
|
|
2417
2594
|
TopBarMenuDirective,
|
|
2418
2595
|
TopBarItemDirective,
|
|
2419
|
-
TopBarMenuBtnDetailDirective
|
|
2596
|
+
TopBarMenuBtnDetailDirective,
|
|
2597
|
+
TopBarCompactMenuBtnDetailDirective,
|
|
2598
|
+
TopBarNavToggleBtnDetailDirective
|
|
2420
2599
|
],
|
|
2421
2600
|
imports: [
|
|
2422
2601
|
common.CommonModule,
|
|
@@ -2433,7 +2612,9 @@
|
|
|
2433
2612
|
TopBarMenuDirective,
|
|
2434
2613
|
menu.TheSeamMenuModule,
|
|
2435
2614
|
TopBarItemDirective,
|
|
2436
|
-
TopBarMenuBtnDetailDirective
|
|
2615
|
+
TopBarMenuBtnDetailDirective,
|
|
2616
|
+
TopBarCompactMenuBtnDetailDirective,
|
|
2617
|
+
TopBarNavToggleBtnDetailDirective
|
|
2437
2618
|
]
|
|
2438
2619
|
},] }
|
|
2439
2620
|
];
|
|
@@ -3303,6 +3484,691 @@
|
|
|
3303
3484
|
},] }
|
|
3304
3485
|
];
|
|
3305
3486
|
|
|
3487
|
+
function isHorizontalNavItemType(item, type) {
|
|
3488
|
+
return item.itemType === type;
|
|
3489
|
+
}
|
|
3490
|
+
function isHorizontalNavItemActive(item) {
|
|
3491
|
+
var _a, _b;
|
|
3492
|
+
return (_b = (_a = item.__state) === null || _a === void 0 ? void 0 : _a.active) !== null && _b !== void 0 ? _b : false;
|
|
3493
|
+
}
|
|
3494
|
+
function isHorizontalNavItemExpanded(item) {
|
|
3495
|
+
var _a, _b;
|
|
3496
|
+
return (_b = (_a = item.__state) === null || _a === void 0 ? void 0 : _a.expanded) !== null && _b !== void 0 ? _b : false;
|
|
3497
|
+
}
|
|
3498
|
+
function isHorizontalNavItemFocused(item) {
|
|
3499
|
+
var _a, _b;
|
|
3500
|
+
return (_b = (_a = item.__state) === null || _a === void 0 ? void 0 : _a.focused) !== null && _b !== void 0 ? _b : false;
|
|
3501
|
+
}
|
|
3502
|
+
function horizontalNavItemHasChildren(item) {
|
|
3503
|
+
return horizontalNavItemCanHaveChildren(item) && utils.hasProperty(item, 'children') && item.children.length > 0;
|
|
3504
|
+
}
|
|
3505
|
+
function horizontalNavItemCanHaveChildren(item) {
|
|
3506
|
+
return isHorizontalNavItemType(item, 'basic') || isHorizontalNavItemType(item, 'link');
|
|
3507
|
+
}
|
|
3508
|
+
function horizontalNavItemHasActiveChild(item) {
|
|
3509
|
+
var e_1, _c;
|
|
3510
|
+
if (!horizontalNavItemHasChildren(item)) {
|
|
3511
|
+
return false;
|
|
3512
|
+
}
|
|
3513
|
+
try {
|
|
3514
|
+
for (var _d = __values(item.children), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
3515
|
+
var child = _e.value;
|
|
3516
|
+
if (getHorizontalNavItemStateProp(child, 'active') || horizontalNavItemHasActiveChild(child)) {
|
|
3517
|
+
return true;
|
|
3518
|
+
}
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
3521
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3522
|
+
finally {
|
|
3523
|
+
try {
|
|
3524
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
3525
|
+
}
|
|
3526
|
+
finally { if (e_1) throw e_1.error; }
|
|
3527
|
+
}
|
|
3528
|
+
return false;
|
|
3529
|
+
}
|
|
3530
|
+
function horizontalNavItemHasExpandedChild(item) {
|
|
3531
|
+
var e_2, _c;
|
|
3532
|
+
if (!horizontalNavItemHasChildren(item)) {
|
|
3533
|
+
return false;
|
|
3534
|
+
}
|
|
3535
|
+
try {
|
|
3536
|
+
for (var _d = __values(item.children), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
3537
|
+
var child = _e.value;
|
|
3538
|
+
if (getHorizontalNavItemStateProp(child, 'expanded')) {
|
|
3539
|
+
return true;
|
|
3540
|
+
}
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
3544
|
+
finally {
|
|
3545
|
+
try {
|
|
3546
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
3547
|
+
}
|
|
3548
|
+
finally { if (e_2) throw e_2.error; }
|
|
3549
|
+
}
|
|
3550
|
+
return false;
|
|
3551
|
+
}
|
|
3552
|
+
function horizontalNavItemCanBeActive(item) {
|
|
3553
|
+
return isHorizontalNavItemType(item, 'basic') || isHorizontalNavItemType(item, 'link');
|
|
3554
|
+
}
|
|
3555
|
+
function horizontalNavItemCanExpand(item) {
|
|
3556
|
+
return horizontalNavItemCanHaveChildren(item);
|
|
3557
|
+
}
|
|
3558
|
+
function findHorizontalNavLinkItems(items) {
|
|
3559
|
+
var linkItems = [];
|
|
3560
|
+
var _fn = function (_items) {
|
|
3561
|
+
var e_3, _c;
|
|
3562
|
+
try {
|
|
3563
|
+
for (var _items_1 = __values(_items), _items_1_1 = _items_1.next(); !_items_1_1.done; _items_1_1 = _items_1.next()) {
|
|
3564
|
+
var item = _items_1_1.value;
|
|
3565
|
+
if (isHorizontalNavItemType(item, 'link')) {
|
|
3566
|
+
linkItems.push(item);
|
|
3567
|
+
}
|
|
3568
|
+
if (horizontalNavItemCanHaveChildren(item) && utils.hasProperty(item, 'children')) {
|
|
3569
|
+
_fn(item.children);
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
3574
|
+
finally {
|
|
3575
|
+
try {
|
|
3576
|
+
if (_items_1_1 && !_items_1_1.done && (_c = _items_1.return)) _c.call(_items_1);
|
|
3577
|
+
}
|
|
3578
|
+
finally { if (e_3) throw e_3.error; }
|
|
3579
|
+
}
|
|
3580
|
+
};
|
|
3581
|
+
_fn(items);
|
|
3582
|
+
return linkItems;
|
|
3583
|
+
}
|
|
3584
|
+
function setHorizontalNavItemStateProp(item, prop, value) {
|
|
3585
|
+
if (utils.hasProperty(item, '__state')) {
|
|
3586
|
+
item.__state[prop] = value;
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
function getHorizontalNavItemStateProp(item, prop) {
|
|
3590
|
+
return setDefaultHorizontalNavItemState(item).__state[prop];
|
|
3591
|
+
}
|
|
3592
|
+
function setDefaultHorizontalNavItemState(item) {
|
|
3593
|
+
if (utils.hasProperty(item, '__state')) {
|
|
3594
|
+
return item;
|
|
3595
|
+
}
|
|
3596
|
+
item.__state = {
|
|
3597
|
+
active: false,
|
|
3598
|
+
expanded: false,
|
|
3599
|
+
focused: false
|
|
3600
|
+
};
|
|
3601
|
+
// TODO: See if there is a nice way to fix the typing for this.
|
|
3602
|
+
return item;
|
|
3603
|
+
}
|
|
3604
|
+
function areSameHorizontalNavItem(item1, item2) {
|
|
3605
|
+
if (utils.isNullOrUndefined(item1) || utils.isNullOrUndefined(item2)) {
|
|
3606
|
+
return false;
|
|
3607
|
+
}
|
|
3608
|
+
if (item1.itemType !== item2.itemType) {
|
|
3609
|
+
return false;
|
|
3610
|
+
}
|
|
3611
|
+
if (isHorizontalNavItemType(item1, 'title') && isHorizontalNavItemType(item2, 'title')) {
|
|
3612
|
+
return item1.label === item2.label;
|
|
3613
|
+
}
|
|
3614
|
+
else if (isHorizontalNavItemType(item1, 'divider') && isHorizontalNavItemType(item2, 'divider')) {
|
|
3615
|
+
return item1.label === item2.label;
|
|
3616
|
+
}
|
|
3617
|
+
else if (isHorizontalNavItemType(item1, 'basic') && isHorizontalNavItemType(item2, 'basic')) {
|
|
3618
|
+
return item1.label === item2.label;
|
|
3619
|
+
}
|
|
3620
|
+
else if (isHorizontalNavItemType(item1, 'link') && isHorizontalNavItemType(item2, 'link')) {
|
|
3621
|
+
return item1.label === item2.label && item1.link === item2.link;
|
|
3622
|
+
}
|
|
3623
|
+
else if (isHorizontalNavItemType(item1, 'button') && isHorizontalNavItemType(item2, 'button')) {
|
|
3624
|
+
return item1.onClick === item2.onClick;
|
|
3625
|
+
}
|
|
3626
|
+
return false;
|
|
3627
|
+
}
|
|
3628
|
+
|
|
3629
|
+
var TheSeamNavService = /** @class */ (function () {
|
|
3630
|
+
function TheSeamNavService(_router) {
|
|
3631
|
+
this._router = _router;
|
|
3632
|
+
this._updatingCount = new rxjs.BehaviorSubject(0);
|
|
3633
|
+
this.itemChanged = new rxjs.Subject();
|
|
3634
|
+
this.loading$ = this._updatingCount.pipe(operators.map(function (count) { return count > 0; }), operators.distinctUntilChanged(), operators.shareReplay({ bufferSize: 1, refCount: true }));
|
|
3635
|
+
}
|
|
3636
|
+
TheSeamNavService.prototype.createItemsObservable = function (items) {
|
|
3637
|
+
var _this = this;
|
|
3638
|
+
return rxjs.defer(function () {
|
|
3639
|
+
_this.updateItemsStates(items);
|
|
3640
|
+
return new rxjs.Observable(function (subscriber) {
|
|
3641
|
+
var stateChangeSub = _this.itemChanged.pipe(operators.switchMap(function (change) {
|
|
3642
|
+
if (change.prop === 'focused' && change.newValue) {
|
|
3643
|
+
_this.updateFocusedItem(items, change.item);
|
|
3644
|
+
}
|
|
3645
|
+
return _this.loading$.pipe(operators.filter(function (loading) { return !loading; }));
|
|
3646
|
+
})).subscribe(function () {
|
|
3647
|
+
subscriber.next(items);
|
|
3648
|
+
});
|
|
3649
|
+
try {
|
|
3650
|
+
_this.updateItemsStates(items);
|
|
3651
|
+
}
|
|
3652
|
+
catch (err) {
|
|
3653
|
+
subscriber.error(err);
|
|
3654
|
+
}
|
|
3655
|
+
var routeChangeSub = _this._router.events.pipe(operators.filter(function (event) { return event instanceof router.NavigationEnd; })).subscribe(function (event) {
|
|
3656
|
+
try {
|
|
3657
|
+
_this.updateItemsStates(items);
|
|
3658
|
+
}
|
|
3659
|
+
catch (err) {
|
|
3660
|
+
subscriber.error(err);
|
|
3661
|
+
}
|
|
3662
|
+
});
|
|
3663
|
+
return function () {
|
|
3664
|
+
stateChangeSub.unsubscribe();
|
|
3665
|
+
routeChangeSub.unsubscribe();
|
|
3666
|
+
};
|
|
3667
|
+
}).pipe(operators.startWith(items));
|
|
3668
|
+
});
|
|
3669
|
+
};
|
|
3670
|
+
TheSeamNavService.prototype._incUpdatingCount = function () {
|
|
3671
|
+
this._updatingCount.next(this._updatingCount.value + 1);
|
|
3672
|
+
};
|
|
3673
|
+
TheSeamNavService.prototype._decrUpdatingCount = function () {
|
|
3674
|
+
this._updatingCount.next(this._updatingCount.value - 1);
|
|
3675
|
+
};
|
|
3676
|
+
TheSeamNavService.prototype.updateItemsStates = function (items) {
|
|
3677
|
+
var e_1, _a;
|
|
3678
|
+
this._incUpdatingCount();
|
|
3679
|
+
this.updateRouterFocusedItem(items);
|
|
3680
|
+
try {
|
|
3681
|
+
try {
|
|
3682
|
+
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
3683
|
+
var item = items_1_1.value;
|
|
3684
|
+
if (horizontalNavItemHasChildren(item)) {
|
|
3685
|
+
this.updateItemsStates(item.children);
|
|
3686
|
+
}
|
|
3687
|
+
this.updateItemState(item);
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3691
|
+
finally {
|
|
3692
|
+
try {
|
|
3693
|
+
if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
|
|
3694
|
+
}
|
|
3695
|
+
finally { if (e_1) throw e_1.error; }
|
|
3696
|
+
}
|
|
3697
|
+
this._decrUpdatingCount();
|
|
3698
|
+
}
|
|
3699
|
+
catch (err) {
|
|
3700
|
+
this._decrUpdatingCount();
|
|
3701
|
+
throw err;
|
|
3702
|
+
}
|
|
3703
|
+
};
|
|
3704
|
+
TheSeamNavService.prototype.updateItemState = function (item) {
|
|
3705
|
+
this._incUpdatingCount();
|
|
3706
|
+
try {
|
|
3707
|
+
setDefaultHorizontalNavItemState(item);
|
|
3708
|
+
this.setItemStateProp(item, 'active', this.horizontalNavLinkActive(item));
|
|
3709
|
+
// TODO: Implement this in a more optimized way. Unless our apps start
|
|
3710
|
+
// having large navs constantly updating their state, this shouldn't
|
|
3711
|
+
// have much impact on performance.
|
|
3712
|
+
this._updateItemExpandedState(item);
|
|
3713
|
+
this._decrUpdatingCount();
|
|
3714
|
+
}
|
|
3715
|
+
catch (err) {
|
|
3716
|
+
this._decrUpdatingCount();
|
|
3717
|
+
throw err;
|
|
3718
|
+
}
|
|
3719
|
+
};
|
|
3720
|
+
TheSeamNavService.prototype.horizontalNavLinkActive = function (item) {
|
|
3721
|
+
if (isHorizontalNavItemType(item, 'link')) {
|
|
3722
|
+
var url = this._getUrl(item);
|
|
3723
|
+
if (utils.notNullOrUndefined(url)) {
|
|
3724
|
+
var opts = this._getMatchOptions(item);
|
|
3725
|
+
return this._router.isActive(url, opts);
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
return false;
|
|
3729
|
+
};
|
|
3730
|
+
TheSeamNavService.prototype._updateItemsExpandedState = function (items) {
|
|
3731
|
+
var e_2, _a;
|
|
3732
|
+
try {
|
|
3733
|
+
for (var items_2 = __values(items), items_2_1 = items_2.next(); !items_2_1.done; items_2_1 = items_2.next()) {
|
|
3734
|
+
var item = items_2_1.value;
|
|
3735
|
+
if (horizontalNavItemHasChildren(item)) {
|
|
3736
|
+
this._updateItemsExpandedState(item.children);
|
|
3737
|
+
}
|
|
3738
|
+
this._updateItemExpandedState(item);
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
3742
|
+
finally {
|
|
3743
|
+
try {
|
|
3744
|
+
if (items_2_1 && !items_2_1.done && (_a = items_2.return)) _a.call(items_2);
|
|
3745
|
+
}
|
|
3746
|
+
finally { if (e_2) throw e_2.error; }
|
|
3747
|
+
}
|
|
3748
|
+
};
|
|
3749
|
+
TheSeamNavService.prototype._updateItemExpandedState = function (item) {
|
|
3750
|
+
if (!horizontalNavItemCanExpand(item)) {
|
|
3751
|
+
if (getHorizontalNavItemStateProp(item, 'expanded')) {
|
|
3752
|
+
this.setItemStateProp(item, 'expanded', false);
|
|
3753
|
+
}
|
|
3754
|
+
return;
|
|
3755
|
+
}
|
|
3756
|
+
if (horizontalNavItemHasChildren(item)) {
|
|
3757
|
+
this._updateItemsExpandedState(item.children);
|
|
3758
|
+
}
|
|
3759
|
+
if (horizontalNavItemHasActiveChild(item) || horizontalNavItemHasExpandedChild(item)) {
|
|
3760
|
+
if (!getHorizontalNavItemStateProp(item, 'expanded')) {
|
|
3761
|
+
this.setItemStateProp(item, 'expanded', true);
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
else {
|
|
3765
|
+
if (getHorizontalNavItemStateProp(item, 'expanded')) {
|
|
3766
|
+
this.setItemStateProp(item, 'expanded', false);
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
};
|
|
3770
|
+
TheSeamNavService.prototype.updateRouterFocusedItem = function (items) {
|
|
3771
|
+
var focusedItem = items.find(function (i) { return isHorizontalNavItemActive(i); }) || items.find(function (i) { return horizontalNavItemHasActiveChild(i); });
|
|
3772
|
+
this.updateFocusedItem(items, focusedItem);
|
|
3773
|
+
};
|
|
3774
|
+
TheSeamNavService.prototype.updateFocusedItem = function (items, focusedItem) {
|
|
3775
|
+
var e_3, _a;
|
|
3776
|
+
try {
|
|
3777
|
+
for (var items_3 = __values(items), items_3_1 = items_3.next(); !items_3_1.done; items_3_1 = items_3.next()) {
|
|
3778
|
+
var item = items_3_1.value;
|
|
3779
|
+
if (item === focusedItem) {
|
|
3780
|
+
setHorizontalNavItemStateProp(item, 'focused', true);
|
|
3781
|
+
}
|
|
3782
|
+
else {
|
|
3783
|
+
setHorizontalNavItemStateProp(item, 'focused', false);
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
3788
|
+
finally {
|
|
3789
|
+
try {
|
|
3790
|
+
if (items_3_1 && !items_3_1.done && (_a = items_3.return)) _a.call(items_3);
|
|
3791
|
+
}
|
|
3792
|
+
finally { if (e_3) throw e_3.error; }
|
|
3793
|
+
}
|
|
3794
|
+
};
|
|
3795
|
+
TheSeamNavService.prototype._getNavExtras = function (item) {
|
|
3796
|
+
var navigationExtras = {};
|
|
3797
|
+
if (utils.hasProperty(item, 'queryParams')) {
|
|
3798
|
+
navigationExtras.queryParams = item.queryParams;
|
|
3799
|
+
}
|
|
3800
|
+
if (utils.hasProperty(item, 'fragment')) {
|
|
3801
|
+
navigationExtras.fragment = item.fragment;
|
|
3802
|
+
}
|
|
3803
|
+
if (utils.hasProperty(item, 'queryParamsHandling')) {
|
|
3804
|
+
navigationExtras.queryParamsHandling = item.queryParamsHandling;
|
|
3805
|
+
}
|
|
3806
|
+
if (utils.hasProperty(item, 'preserveFragment')) {
|
|
3807
|
+
navigationExtras.preserveFragment = item.preserveFragment;
|
|
3808
|
+
}
|
|
3809
|
+
return navigationExtras;
|
|
3810
|
+
};
|
|
3811
|
+
TheSeamNavService.prototype._getUrl = function (item) {
|
|
3812
|
+
var link = item.link;
|
|
3813
|
+
if (typeof link === 'string') {
|
|
3814
|
+
return this._router.createUrlTree([link], this._getNavExtras(item)).toString();
|
|
3815
|
+
}
|
|
3816
|
+
else if (Array.isArray(link)) {
|
|
3817
|
+
return this._router.createUrlTree(link, this._getNavExtras(item)).toString();
|
|
3818
|
+
}
|
|
3819
|
+
return null;
|
|
3820
|
+
};
|
|
3821
|
+
TheSeamNavService.prototype._getMatchOptions = function (item) {
|
|
3822
|
+
var defaultMatchOpts = {
|
|
3823
|
+
paths: 'subset',
|
|
3824
|
+
queryParams: 'subset',
|
|
3825
|
+
fragment: 'ignored',
|
|
3826
|
+
matrixParams: 'ignored'
|
|
3827
|
+
};
|
|
3828
|
+
if (utils.hasProperty(item, 'matchOptions')) {
|
|
3829
|
+
return Object.assign(Object.assign({}, defaultMatchOpts), item.matchOptions);
|
|
3830
|
+
}
|
|
3831
|
+
return defaultMatchOpts;
|
|
3832
|
+
};
|
|
3833
|
+
TheSeamNavService.prototype.setItemStateProp = function (item, prop, value) {
|
|
3834
|
+
var currentValue = getHorizontalNavItemStateProp(item, prop);
|
|
3835
|
+
if (currentValue !== value) {
|
|
3836
|
+
setHorizontalNavItemStateProp(item, prop, value);
|
|
3837
|
+
var changed = {
|
|
3838
|
+
item: item,
|
|
3839
|
+
prop: prop,
|
|
3840
|
+
prevValue: currentValue,
|
|
3841
|
+
newValue: value
|
|
3842
|
+
};
|
|
3843
|
+
this.itemChanged.next(changed);
|
|
3844
|
+
}
|
|
3845
|
+
};
|
|
3846
|
+
return TheSeamNavService;
|
|
3847
|
+
}());
|
|
3848
|
+
TheSeamNavService.decorators = [
|
|
3849
|
+
{ type: i0.Injectable }
|
|
3850
|
+
];
|
|
3851
|
+
TheSeamNavService.ctorParameters = function () { return [
|
|
3852
|
+
{ type: router.Router }
|
|
3853
|
+
]; };
|
|
3854
|
+
|
|
3855
|
+
var NavItemComponent = /** @class */ (function () {
|
|
3856
|
+
function NavItemComponent(_nav) {
|
|
3857
|
+
this._nav = _nav;
|
|
3858
|
+
this._ngUnsubscribe = new rxjs.Subject();
|
|
3859
|
+
this.faAngleLeft = freeSolidSvgIcons.faAngleLeft;
|
|
3860
|
+
this.active = false;
|
|
3861
|
+
this._link = new rxjs.BehaviorSubject(undefined);
|
|
3862
|
+
this.link$ = this._link.asObservable();
|
|
3863
|
+
this.hierLevel = 0;
|
|
3864
|
+
this.indentSize = 10;
|
|
3865
|
+
this._expanded = new rxjs.BehaviorSubject(false);
|
|
3866
|
+
this.expanded$ = this._expanded.asObservable();
|
|
3867
|
+
this._compact = new rxjs.BehaviorSubject(false);
|
|
3868
|
+
this.compact$ = this._compact.asObservable();
|
|
3869
|
+
this.focused = false;
|
|
3870
|
+
this.badgeTheme = 'danger';
|
|
3871
|
+
this.childAction = 'menu';
|
|
3872
|
+
this.expandAction = 'toggle';
|
|
3873
|
+
this.navItemExpanded = new i0.EventEmitter();
|
|
3874
|
+
}
|
|
3875
|
+
Object.defineProperty(NavItemComponent.prototype, "link", {
|
|
3876
|
+
get: function () { return this._link.value; },
|
|
3877
|
+
set: function (value) { this._link.next(value); },
|
|
3878
|
+
enumerable: false,
|
|
3879
|
+
configurable: true
|
|
3880
|
+
});
|
|
3881
|
+
Object.defineProperty(NavItemComponent.prototype, "expanded", {
|
|
3882
|
+
get: function () { return this._expanded.value; },
|
|
3883
|
+
set: function (value) {
|
|
3884
|
+
this._expanded.next(coercion.coerceBooleanProperty(value));
|
|
3885
|
+
},
|
|
3886
|
+
enumerable: false,
|
|
3887
|
+
configurable: true
|
|
3888
|
+
});
|
|
3889
|
+
Object.defineProperty(NavItemComponent.prototype, "compact", {
|
|
3890
|
+
get: function () { return this._compact.value; },
|
|
3891
|
+
set: function (value) { this._compact.next(coercion.coerceBooleanProperty(value)); },
|
|
3892
|
+
enumerable: false,
|
|
3893
|
+
configurable: true
|
|
3894
|
+
});
|
|
3895
|
+
Object.defineProperty(NavItemComponent.prototype, "badgeTooltip", {
|
|
3896
|
+
get: function () { return this._badgeTooltip; },
|
|
3897
|
+
set: function (value) {
|
|
3898
|
+
if (value !== null && value !== undefined) {
|
|
3899
|
+
if (typeof value === 'string') {
|
|
3900
|
+
this._badgeTooltip = {
|
|
3901
|
+
tooltip: value,
|
|
3902
|
+
placement: 'auto',
|
|
3903
|
+
disabled: false
|
|
3904
|
+
};
|
|
3905
|
+
}
|
|
3906
|
+
else {
|
|
3907
|
+
this._badgeTooltip = Object.assign(Object.assign({}, value), { placement: value.placement || 'auto', disabled: typeof (value === null || value === void 0 ? void 0 : value.disabled) === 'boolean'
|
|
3908
|
+
? value.disabled
|
|
3909
|
+
: typeof value.tooltip === 'string' ? false : true });
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
else {
|
|
3913
|
+
this._badgeTooltip = undefined;
|
|
3914
|
+
}
|
|
3915
|
+
},
|
|
3916
|
+
enumerable: false,
|
|
3917
|
+
configurable: true
|
|
3918
|
+
});
|
|
3919
|
+
Object.defineProperty(NavItemComponent.prototype, "_isActiveCssClass", {
|
|
3920
|
+
get: function () { return this.active; },
|
|
3921
|
+
enumerable: false,
|
|
3922
|
+
configurable: true
|
|
3923
|
+
});
|
|
3924
|
+
Object.defineProperty(NavItemComponent.prototype, "_isChildActiveCssClass", {
|
|
3925
|
+
get: function () { return this.hasActiveChild; },
|
|
3926
|
+
enumerable: false,
|
|
3927
|
+
configurable: true
|
|
3928
|
+
});
|
|
3929
|
+
Object.defineProperty(NavItemComponent.prototype, "_isExpandedCssClass", {
|
|
3930
|
+
get: function () { return this.expanded; },
|
|
3931
|
+
enumerable: false,
|
|
3932
|
+
configurable: true
|
|
3933
|
+
});
|
|
3934
|
+
Object.defineProperty(NavItemComponent.prototype, "_isFocusedCssClass", {
|
|
3935
|
+
get: function () { return this.focused; },
|
|
3936
|
+
enumerable: false,
|
|
3937
|
+
configurable: true
|
|
3938
|
+
});
|
|
3939
|
+
Object.defineProperty(NavItemComponent.prototype, "_attrDataHierLevel", {
|
|
3940
|
+
get: function () { return this.hierLevel; },
|
|
3941
|
+
enumerable: false,
|
|
3942
|
+
configurable: true
|
|
3943
|
+
});
|
|
3944
|
+
NavItemComponent.prototype.ngOnDestroy = function () {
|
|
3945
|
+
this._ngUnsubscribe.next();
|
|
3946
|
+
this._ngUnsubscribe.complete();
|
|
3947
|
+
};
|
|
3948
|
+
Object.defineProperty(NavItemComponent.prototype, "hasChildren", {
|
|
3949
|
+
get: function () {
|
|
3950
|
+
return Array.isArray(this.children) && this.children.length > 0;
|
|
3951
|
+
},
|
|
3952
|
+
enumerable: false,
|
|
3953
|
+
configurable: true
|
|
3954
|
+
});
|
|
3955
|
+
Object.defineProperty(NavItemComponent.prototype, "hasActiveChild", {
|
|
3956
|
+
get: function () {
|
|
3957
|
+
if (utils.notNullOrUndefined(this.item)) {
|
|
3958
|
+
return horizontalNavItemHasActiveChild(this.item);
|
|
3959
|
+
}
|
|
3960
|
+
return false;
|
|
3961
|
+
},
|
|
3962
|
+
enumerable: false,
|
|
3963
|
+
configurable: true
|
|
3964
|
+
});
|
|
3965
|
+
Object.defineProperty(NavItemComponent.prototype, "hasMenuToggle", {
|
|
3966
|
+
get: function () {
|
|
3967
|
+
return this.hasChildren && this.childAction === 'menu';
|
|
3968
|
+
},
|
|
3969
|
+
enumerable: false,
|
|
3970
|
+
configurable: true
|
|
3971
|
+
});
|
|
3972
|
+
Object.defineProperty(NavItemComponent.prototype, "menuTpl", {
|
|
3973
|
+
get: function () {
|
|
3974
|
+
return this.hasMenuToggle ? this._menu : undefined;
|
|
3975
|
+
},
|
|
3976
|
+
enumerable: false,
|
|
3977
|
+
configurable: true
|
|
3978
|
+
});
|
|
3979
|
+
Object.defineProperty(NavItemComponent.prototype, "hasExpandingChildren", {
|
|
3980
|
+
get: function () {
|
|
3981
|
+
return this.hasChildren && this.childAction === 'expand';
|
|
3982
|
+
},
|
|
3983
|
+
enumerable: false,
|
|
3984
|
+
configurable: true
|
|
3985
|
+
});
|
|
3986
|
+
NavItemComponent.prototype._toggleChildren = function (event) {
|
|
3987
|
+
var ex = !this.expanded;
|
|
3988
|
+
if (this.expandAction === 'expandOnly') {
|
|
3989
|
+
ex = true;
|
|
3990
|
+
}
|
|
3991
|
+
this.expanded = ex;
|
|
3992
|
+
this.navItemExpanded.emit(this.expanded);
|
|
3993
|
+
if (this.item && this.expanded) {
|
|
3994
|
+
this._nav.setItemStateProp(this.item, 'focused', this.expanded);
|
|
3995
|
+
}
|
|
3996
|
+
// Prevents seam-menu from closing out when toggling child expand
|
|
3997
|
+
event.stopPropagation();
|
|
3998
|
+
};
|
|
3999
|
+
// Updates expanded state when user exits seam-menu
|
|
4000
|
+
NavItemComponent.prototype._menuEvent = function (menuExpanded) {
|
|
4001
|
+
if (menuExpanded === false) {
|
|
4002
|
+
this.expanded = false;
|
|
4003
|
+
// TODO: figure out why closing seam-menu with expanded submenu messes up animation
|
|
4004
|
+
if (this._navItems && this._navItems.length) {
|
|
4005
|
+
this._navItems.forEach(function (navItem) {
|
|
4006
|
+
navItem.expanded = false;
|
|
4007
|
+
});
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
};
|
|
4011
|
+
Object.defineProperty(NavItemComponent.prototype, "showIconBlock", {
|
|
4012
|
+
get: function () {
|
|
4013
|
+
return utils.notNullOrUndefined(this.icon) || this.hideEmptyIcon !== true;
|
|
4014
|
+
},
|
|
4015
|
+
enumerable: false,
|
|
4016
|
+
configurable: true
|
|
4017
|
+
});
|
|
4018
|
+
return NavItemComponent;
|
|
4019
|
+
}());
|
|
4020
|
+
NavItemComponent.decorators = [
|
|
4021
|
+
{ type: i0.Component, args: [{
|
|
4022
|
+
selector: 'seam-nav-item',
|
|
4023
|
+
template: "<div class=\"d-flex flex-row h-100\">\n <ng-container *ngIf=\"itemType === 'basic'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeBasic\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'link'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeLink\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'divider'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeDivider\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"itemType === 'title'\">\n <ng-template [ngTemplateOutlet]=\"itemTypeTitle\"></ng-template>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"hasExpandingChildren\">\n <div class=\"nav--group nav--group--level-{{ hierLevel + 1 }}\"\n *ngIf=\"expanded$ | async\" @childGroupAnim>\n <ng-container *ngTemplateOutlet=\"navChildren\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #itemTypeBasic>\n <button class=\"nav-item btn nav-btn p-0 d-flex align-items-stretch flex-row text-decoration-none w-100\"\n cdkMonitorElementFocus\n (click)=\"_toggleChildren($event)\"\n [seamMenuToggle]=\"menuTpl\"\n (menuToggle)=\"_menuEvent($event)\"\n [attr.aria-expanded]=\"expanded$ | async\">\n <div class=\"nav-link d-flex flex-row align-items-center w-100\" [class.nav-link__compact]=\"compact\">\n <div class=\"nav-item--icon\" *ngIf=\"showIconBlock\">\n <seam-icon [icon]=\"icon\" *ngIf=\"icon\"></seam-icon>\n <ng-container *ngIf=\"compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n <span *ngIf=\"!compact\" nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" nav-item-label>{{ label }}</span>\n <ng-container *ngIf=\"!compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n\n <div *ngIf=\"hasChildren && !compact\"\n class=\"btn nav-btn nav-item--toggle-btn-container d-flex align-items-center\">\n <seam-icon\n class=\"nav-item--toggle-btn\"\n [class.nav-item--toggle-btn-expanded]=\"expanded$ | async\"\n [icon]=\"faAngleLeft\"\n type>\n </seam-icon>\n </div>\n </button>\n</ng-template>\n\n<ng-template #itemTypeLink>\n <a *ngIf=\"link; else noLink\" class=\"nav-item nav-link d-flex flex-row w-100 align-items-center\"\n [class.nav-link__compact]=\"compact\"\n [routerLink]=\"link\"\n [queryParams]=\"queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\">\n <div class=\"nav-item--icon\" *ngIf=\"showIconBlock\">\n <seam-icon [icon]=\"icon\" *ngIf=\"icon\"></seam-icon>\n <ng-container *ngIf=\"compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </div>\n <span *ngIf=\"!compact\" nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" nav-item-label>{{ label }}</span>\n <ng-container *ngIf=\"!compact\">\n <ng-template [ngTemplateOutlet]=\"itemBadge\"></ng-template>\n </ng-container>\n </a>\n\n <ng-template #noLink>\n <a class=\"nav-item nav-link d-flex flex-row w-100 align-items-center\" [class.nav-link__compact]=\"compact\">\n <div class=\"nav-item--icon\" *ngIf=\"showIconBlock\">\n <seam-icon [icon]=\"icon\" *ngIf=\"icon\"></seam-icon>\n </div>\n <span *ngIf=\"!compact\" nav-item-label>\n {{ label }}\n </span>\n <span *ngIf=\"compact\" class=\"sr-only\" nav-item-label>{{ label }}</span>\n </a>\n </ng-template>\n\n <button *ngIf=\"hasChildren && !compact\"\n type=\"button\"\n class=\"btn nav-btn nav-item--toggle-btn-container\"\n (click)=\"_toggleChildren($event)\"\n [seamMenuToggle]=\"menuTpl\"\n (menuToggle)=\"_menuEvent($event)\"\n [attr.aria-expanded]=\"expanded$ | async\"\n cdkMonitorElementFocus>\n <seam-icon\n class=\"nav-item--toggle-btn\"\n [class.nav-item--toggle-btn-expanded]=\"expanded$ | async\"\n [icon]=\"faAngleLeft\"\n type>\n </seam-icon>\n <span class=\"sr-only\">Group Toggle</span>\n </button>\n</ng-template>\n\n<ng-template #itemTypeDivider>\n <div class=\"px-2 w-100\">\n <hr class=\"nav-item--divider\" />\n </div>\n</ng-template>\n\n<ng-template #itemTypeTitle>\n <ng-container *ngIf=\"!compact\">\n <span class=\"nav-item--title pt-1\" nav-item-label>{{ label }}</span>\n </ng-container>\n</ng-template>\n\n<ng-template #itemBadge>\n <ng-container *ngIf=\"badgeText\">\n <div class=\"badge-spacer flex-grow-1\" *ngIf=\"!compact\"></div>\n <div class=\"nav-item--badge\"\n [class.nav-item--badge-no-icon]=\"!icon\"\n [ngbTooltip]=\"$any(badgeTooltip)?.tooltip\"\n [tooltipClass]=\"$any(badgeTooltip)?.class\"\n [placement]=\"$any(badgeTooltip)?.placement\"\n [container]=\"$any(badgeTooltip)?.container\"\n [disableTooltip]=\"!badgeTooltip || !!$any(badgeTooltip)?.disabled\">\n <span class=\"badge badge-pill badge-{{ badgeTheme }}\">\n <ng-container *ngIf=\"!compact || !icon\">\n {{ badgeText }}\n </ng-container>\n <span *ngIf=\"badgeSrContent\">{{ badgeSrContent }}</span>\n </span>\n </div>\n </ng-container>\n</ng-template>\n\n<seam-menu #menu *ngIf=\"hasMenuToggle\">\n <ng-container *ngTemplateOutlet=\"navChildren\"></ng-container>\n</seam-menu>\n\n<ng-template #navChildren>\n <seam-nav-item *ngFor=\"let child of children\"\n [item]=\"child\"\n [hierLevel]=\"compact ? 0 : (hierLevel + 1)\"\n [compact]=\"compact\"\n [itemType]=\"$any(child).itemType\"\n [icon]=\"$any(child).icon\"\n [label]=\"$any(child).label\"\n [link]=\"$any(child).link\"\n [badgeText]=\"$any(child).badge?.text\"\n [badgeTheme]=\"$any(child).badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(child).badge?.srContent\"\n [badgeTooltip]=\"$any(child)?.badge?.tooltip\"\n [queryParams]=\"$any(child).queryParams\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n [children]=\"$any(child)?.children\"\n [active]=\"$any(child).__state?.active\"\n [expanded]=\"$any(child).__state?.expanded\"\n [focused]=\"$any(child).__state?.focused\"\n childAction=\"expand\"\n [hideEmptyIcon]=\"hideEmptyIcon\">\n </seam-nav-item>\n</ng-template>\n\n",
|
|
4024
|
+
exportAs: 'seamNavItem',
|
|
4025
|
+
animations: [
|
|
4026
|
+
animations.trigger('childGroupAnim', [
|
|
4027
|
+
animations.transition(':enter', [
|
|
4028
|
+
animations.style({ height: 0 }),
|
|
4029
|
+
animations.animate('0.2s ease-in-out', animations.style({ height: '*' }))
|
|
4030
|
+
]),
|
|
4031
|
+
animations.transition(':leave', [
|
|
4032
|
+
animations.style({ height: '*' }),
|
|
4033
|
+
animations.animate('0.2s ease-in-out', animations.style({ height: 0 }))
|
|
4034
|
+
])
|
|
4035
|
+
])
|
|
4036
|
+
],
|
|
4037
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4038
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
4039
|
+
styles: ["seam-nav-item{display:block;transition:.25s ease-in-out background-color;text-align:inherit;border-radius:0;overflow:hidden;background:transparent;margin:0}seam-nav-item.seam-nav-item--expanded{background-color:transparent}seam-nav-item.seam-nav-item--expanded .nav-link{color:#000}seam-nav-item.seam-nav-item--child-active{background-color:#dae0e5}seam-nav-item.seam-nav-item--child-active .nav-link{color:#000}seam-nav-item.seam-nav-item--active{background-color:#dae0e5}seam-nav-item.seam-nav-item--active .active,seam-nav-item.seam-nav-item--active:active,seam-nav-item.seam-nav-item--active .nav-item.active:hover{background-color:#dae0e5}seam-nav-item.seam-nav-item--active .nav-item:hover{background-color:#e9ecef}seam-nav-item.seam-nav-item--active .nav-link{color:#000}seam-nav-item .badge{vertical-align:middle}seam-nav-item:not(.nav-item--icon) .nav-item--badge{pointer-events:all;margin-left:5px;margin-right:3px}seam-nav-item .nav-item--icon{position:relative;width:24px;max-width:24px;min-width:24px;height:24px;max-height:24px;min-height:24px;text-align:center;margin-right:.5rem}seam-nav-item .nav-item--icon .nav-item--badge{top:-4px;right:-4px;position:absolute}seam-nav-item .nav-item--icon .nav-item--badge .badge:empty{display:block;width:8px;height:8px;padding:0}seam-nav-item .nav-item--icon .nav-item--badge.nav-item--badge-no-icon{top:0px;right:0px}seam-nav-item .nav-item{transition:.25s ease-in-out background-color}seam-nav-item .nav-item:hover{background-color:#e9ecef}seam-nav-item .nav-item.active{pointer-events:none;cursor:default}seam-nav-item a.nav-item:not([href]):not([tabindex]){color:#000}seam-nav-item a.nav-item:not([href]):not([tabindex]):hover{background-color:transparent}seam-nav-item .nav-link{color:#000}seam-nav-item .nav-btn{font-weight:400;color:#000;text-decoration:none;border-radius:0;border:0 solid #dee2e6}seam-nav-item .nav-btn:hover{color:#000;text-decoration:underline}seam-nav-item .nav-btn:focus,seam-nav-item .nav-btn.focus{text-decoration:underline;box-shadow:none}seam-nav-item .nav-btn:disabled,seam-nav-item .nav-btn.disabled{color:#000;pointer-events:none}seam-nav-item .cdk-keyboard-focused{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}seam-nav-item .nav-item--toggle-btn-container{transition:.25s ease-in-out background-color;padding:0 .5rem}seam-nav-item button.nav-item--toggle-btn-container:hover{background-color:#e9ecef}seam-nav-item .nav-item--toggle-btn .svg-inline--fa{transition:.1s ease-in-out transform;transform:none}seam-nav-item .nav-item--toggle-btn.nav-item--toggle-btn-expanded .svg-inline--fa{transform:rotate(-90deg)}seam-nav-item .nav--group{will-change:height;overflow:hidden}seam-nav-item .nav--group--level-1{background-color:#eff1f4}seam-nav-item .nav--group--level-2{background-color:#e6eaed}seam-nav-item .nav--group--level-3{background-color:#dde2e7}seam-nav-item .nav--group--level-4{background-color:#d4dae1}seam-nav-item .nav--group--level-5{background-color:#cbd3da}seam-nav-item .nav--group--level-6{background-color:#c2cbd4}seam-nav-item .nav--group--level-7{background-color:#bac3cd}seam-nav-item .nav--group--level-8{background-color:#b1bcc7}seam-nav-item .nav--group--level-9{background-color:#a8b4c1}seam-nav-item .nav-item--divider{display:block;border-top:1px solid #dae0e5;width:100%}seam-nav-item .nav-item--title{color:#000;font-size:24px;padding-left:10px}seam-nav-item .sr-only{top:0;left:0}\n"]
|
|
4040
|
+
},] }
|
|
4041
|
+
];
|
|
4042
|
+
NavItemComponent.ctorParameters = function () { return [
|
|
4043
|
+
{ type: TheSeamNavService }
|
|
4044
|
+
]; };
|
|
4045
|
+
NavItemComponent.propDecorators = {
|
|
4046
|
+
item: [{ type: i0.Input }],
|
|
4047
|
+
itemType: [{ type: i0.Input }],
|
|
4048
|
+
icon: [{ type: i0.Input }],
|
|
4049
|
+
hideEmptyIcon: [{ type: i0.Input }],
|
|
4050
|
+
label: [{ type: i0.Input }],
|
|
4051
|
+
active: [{ type: i0.Input }],
|
|
4052
|
+
link: [{ type: i0.Input }],
|
|
4053
|
+
queryParams: [{ type: i0.Input }],
|
|
4054
|
+
children: [{ type: i0.Input }],
|
|
4055
|
+
hierLevel: [{ type: i0.Input }],
|
|
4056
|
+
indentSize: [{ type: i0.Input }],
|
|
4057
|
+
expanded: [{ type: i0.Input }],
|
|
4058
|
+
compact: [{ type: i0.Input }],
|
|
4059
|
+
focused: [{ type: i0.Input }],
|
|
4060
|
+
badgeText: [{ type: i0.Input }],
|
|
4061
|
+
badgeTheme: [{ type: i0.Input }],
|
|
4062
|
+
badgeSrContent: [{ type: i0.Input }],
|
|
4063
|
+
badgeTooltip: [{ type: i0.Input }],
|
|
4064
|
+
childAction: [{ type: i0.Input }],
|
|
4065
|
+
expandAction: [{ type: i0.Input }],
|
|
4066
|
+
navItemExpanded: [{ type: i0.Output }],
|
|
4067
|
+
_isActiveCssClass: [{ type: i0.HostBinding, args: ['class.seam-nav-item--active',] }],
|
|
4068
|
+
_isChildActiveCssClass: [{ type: i0.HostBinding, args: ['class.seam-nav-item--child-active',] }],
|
|
4069
|
+
_isExpandedCssClass: [{ type: i0.HostBinding, args: ['class.seam-nav-item--expanded',] }],
|
|
4070
|
+
_isFocusedCssClass: [{ type: i0.HostBinding, args: ['class.seam-nav-item--focused',] }],
|
|
4071
|
+
_attrDataHierLevel: [{ type: i0.HostBinding, args: ['attr.data-hier-level',] }],
|
|
4072
|
+
_menu: [{ type: i0.ViewChild, args: [menu.MenuComponent,] }],
|
|
4073
|
+
_navItems: [{ type: i0.ViewChildren, args: [NavItemComponent,] }]
|
|
4074
|
+
};
|
|
4075
|
+
__decorate([
|
|
4076
|
+
core.InputBoolean()
|
|
4077
|
+
], NavItemComponent.prototype, "active", void 0);
|
|
4078
|
+
__decorate([
|
|
4079
|
+
core.InputNumber(0)
|
|
4080
|
+
], NavItemComponent.prototype, "hierLevel", void 0);
|
|
4081
|
+
__decorate([
|
|
4082
|
+
core.InputNumber(10)
|
|
4083
|
+
], NavItemComponent.prototype, "indentSize", void 0);
|
|
4084
|
+
|
|
4085
|
+
var HorizontalNavComponent = /** @class */ (function () {
|
|
4086
|
+
function HorizontalNavComponent(_nav) {
|
|
4087
|
+
var _this = this;
|
|
4088
|
+
this._nav = _nav;
|
|
4089
|
+
this._ngUnsubscribe = new rxjs.Subject();
|
|
4090
|
+
this._items = new rxjs.BehaviorSubject([]);
|
|
4091
|
+
this.hideEmptyIcon = true;
|
|
4092
|
+
this.hierLevel = 0;
|
|
4093
|
+
this.childAction = 'menu';
|
|
4094
|
+
this.expandAction = 'toggle';
|
|
4095
|
+
this.navItemExpanded = new i0.EventEmitter();
|
|
4096
|
+
this.items$ = this._items.asObservable().pipe(operators.switchMap(function (items) { return items ? _this._nav.createItemsObservable(items) : []; }), operators.shareReplay({ bufferSize: 1, refCount: true }));
|
|
4097
|
+
}
|
|
4098
|
+
Object.defineProperty(HorizontalNavComponent.prototype, "items", {
|
|
4099
|
+
get: function () { return this._items.value; },
|
|
4100
|
+
set: function (value) {
|
|
4101
|
+
this._items.next(value);
|
|
4102
|
+
},
|
|
4103
|
+
enumerable: false,
|
|
4104
|
+
configurable: true
|
|
4105
|
+
});
|
|
4106
|
+
HorizontalNavComponent.prototype.ngOnInit = function () { };
|
|
4107
|
+
HorizontalNavComponent.prototype.ngOnDestroy = function () {
|
|
4108
|
+
this._ngUnsubscribe.next();
|
|
4109
|
+
this._ngUnsubscribe.complete();
|
|
4110
|
+
};
|
|
4111
|
+
HorizontalNavComponent.prototype._navItemExpanded = function (item, expanded) {
|
|
4112
|
+
this.navItemExpanded.emit({ navItem: item, expanded: expanded });
|
|
4113
|
+
};
|
|
4114
|
+
return HorizontalNavComponent;
|
|
4115
|
+
}());
|
|
4116
|
+
HorizontalNavComponent.decorators = [
|
|
4117
|
+
{ type: i0.Component, args: [{
|
|
4118
|
+
selector: 'seam-horizontal-nav',
|
|
4119
|
+
template: "<div class=\"nav-inner-wrapper\" class=\"nav-inner-wrapper-{{hierLevel}}\">\n <div class=\"nav-items-row\">\n <seam-nav-item *ngFor=\"let item of items$ | async\"\n class=\"flex-shrink-0\"\n [item]=\"item\"\n [itemType]=\"$any(item)?.itemType\"\n [icon]=\"$any(item)?.icon\"\n [label]=\"$any(item)?.label\"\n [link]=\"$any(item)?.link\"\n [badgeText]=\"$any(item)?.badge?.text\"\n [badgeTheme]=\"$any(item)?.badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(item)?.badge?.srContent\"\n [badgeTooltip]=\"$any(item)?.badge?.tooltip\"\n [queryParams]=\"$any(item)?.queryParams\"\n [children]=\"$any(item)?.children\"\n [active]=\"$any(item).__state?.active\"\n [expanded]=\"$any(item).__state?.expanded\"\n [focused]=\"$any(item).__state?.focused\"\n [hierLevel]=\"hierLevel\"\n [childAction]=\"childAction\"\n [expandAction]=\"expandAction\"\n (navItemExpanded)=\"_navItemExpanded(item, $event)\"\n [hideEmptyIcon]=\"hideEmptyIcon\">\n </seam-nav-item>\n </div>\n</div>\n",
|
|
4120
|
+
providers: [
|
|
4121
|
+
TheSeamNavService
|
|
4122
|
+
],
|
|
4123
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4124
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
4125
|
+
styles: ["seam-horizontal-nav,.seam-horizontal-nav{display:block;height:100%;position:relative;z-index:2}seam-horizontal-nav .nav-inner-wrapper,.seam-horizontal-nav .nav-inner-wrapper{background:none;height:100%}seam-horizontal-nav .nav-backdrop,.seam-horizontal-nav .nav-backdrop{background:rgba(52,58,64,.6);width:100vw;height:100vh}seam-horizontal-nav .nav-backdrop.nav-backdrop-hidden,.seam-horizontal-nav .nav-backdrop.nav-backdrop-hidden{display:none;width:0;height:0;padding:0;margin:0}seam-horizontal-nav .nav-content,.seam-horizontal-nav .nav-content{display:flex;flex-direction:column;height:100%;flex-wrap:nowrap}seam-horizontal-nav .nav-items-container,.seam-horizontal-nav .nav-items-container{display:flex;flex-direction:column;width:100%;flex:1 1 100%}seam-horizontal-nav .nav-items-row,.seam-horizontal-nav .nav-items-row{height:100%;display:flex;padding:.25rem .5rem}\n"]
|
|
4126
|
+
},] }
|
|
4127
|
+
];
|
|
4128
|
+
HorizontalNavComponent.ctorParameters = function () { return [
|
|
4129
|
+
{ type: TheSeamNavService }
|
|
4130
|
+
]; };
|
|
4131
|
+
HorizontalNavComponent.propDecorators = {
|
|
4132
|
+
items: [{ type: i0.Input }],
|
|
4133
|
+
hideEmptyIcon: [{ type: i0.Input }],
|
|
4134
|
+
hierLevel: [{ type: i0.Input }],
|
|
4135
|
+
childAction: [{ type: i0.Input }],
|
|
4136
|
+
expandAction: [{ type: i0.Input }],
|
|
4137
|
+
navItemExpanded: [{ type: i0.Output }]
|
|
4138
|
+
};
|
|
4139
|
+
|
|
4140
|
+
var TheSeamNavModule = /** @class */ (function () {
|
|
4141
|
+
function TheSeamNavModule() {
|
|
4142
|
+
}
|
|
4143
|
+
return TheSeamNavModule;
|
|
4144
|
+
}());
|
|
4145
|
+
TheSeamNavModule.decorators = [
|
|
4146
|
+
{ type: i0.NgModule, args: [{
|
|
4147
|
+
declarations: [
|
|
4148
|
+
NavItemComponent,
|
|
4149
|
+
HorizontalNavComponent,
|
|
4150
|
+
],
|
|
4151
|
+
imports: [
|
|
4152
|
+
common.CommonModule,
|
|
4153
|
+
router.RouterModule,
|
|
4154
|
+
icon.TheSeamIconModule,
|
|
4155
|
+
a11y.A11yModule,
|
|
4156
|
+
scrollbar.TheSeamScrollbarModule,
|
|
4157
|
+
layout.TheSeamLayoutModule,
|
|
4158
|
+
ngBootstrap.NgbTooltipModule,
|
|
4159
|
+
portal.PortalModule,
|
|
4160
|
+
menu.TheSeamMenuModule
|
|
4161
|
+
],
|
|
4162
|
+
exports: [
|
|
4163
|
+
NavItemComponent,
|
|
4164
|
+
HorizontalNavComponent,
|
|
4165
|
+
],
|
|
4166
|
+
providers: [
|
|
4167
|
+
TheSeamNavService,
|
|
4168
|
+
]
|
|
4169
|
+
},] }
|
|
4170
|
+
];
|
|
4171
|
+
|
|
3306
4172
|
/**
|
|
3307
4173
|
* Generated bundle index. Do not edit.
|
|
3308
4174
|
*/
|
|
@@ -3322,6 +4188,8 @@
|
|
|
3322
4188
|
exports.DashboardWidgetsService = DashboardWidgetsService;
|
|
3323
4189
|
exports.HierarchyLevelResolver = HierarchyLevelResolver;
|
|
3324
4190
|
exports.HierarchyRouterOutletComponent = HierarchyRouterOutletComponent;
|
|
4191
|
+
exports.HorizontalNavComponent = HorizontalNavComponent;
|
|
4192
|
+
exports.NavItemComponent = NavItemComponent;
|
|
3325
4193
|
exports.SideNavComponent = SideNavComponent;
|
|
3326
4194
|
exports.SideNavItemComponent = SideNavItemComponent;
|
|
3327
4195
|
exports.SideNavToggleComponent = SideNavToggleComponent;
|
|
@@ -3333,6 +4201,7 @@
|
|
|
3333
4201
|
exports.TheSeamDashboardModule = TheSeamDashboardModule;
|
|
3334
4202
|
exports.TheSeamDynamicRouterModule = TheSeamDynamicRouterModule;
|
|
3335
4203
|
exports.TheSeamFramework = TheSeamFramework;
|
|
4204
|
+
exports.TheSeamNavModule = TheSeamNavModule;
|
|
3336
4205
|
exports.TheSeamSchemaFormFrameworkComponent = TheSeamSchemaFormFrameworkComponent;
|
|
3337
4206
|
exports.TheSeamSchemaFormModule = TheSeamSchemaFormModule;
|
|
3338
4207
|
exports.TheSeamSideNavModule = TheSeamSideNavModule;
|
|
@@ -3343,20 +4212,35 @@
|
|
|
3343
4212
|
exports.TopBarMenuButtonComponent = TopBarMenuButtonComponent;
|
|
3344
4213
|
exports.TopBarMenuDirective = TopBarMenuDirective;
|
|
3345
4214
|
exports.TopBarTitleComponent = TopBarTitleComponent;
|
|
4215
|
+
exports.areSameHorizontalNavItem = areSameHorizontalNavItem;
|
|
3346
4216
|
exports.canBeActive = canBeActive;
|
|
3347
4217
|
exports.canExpand = canExpand;
|
|
3348
4218
|
exports.canHaveChildren = canHaveChildren;
|
|
3349
4219
|
exports.fader = fader;
|
|
4220
|
+
exports.findHorizontalNavLinkItems = findHorizontalNavLinkItems;
|
|
3350
4221
|
exports.findLinkItems = findLinkItems;
|
|
4222
|
+
exports.getHorizontalNavItemStateProp = getHorizontalNavItemStateProp;
|
|
3351
4223
|
exports.getItemStateProp = getItemStateProp;
|
|
3352
4224
|
exports.hasActiveChild = hasActiveChild;
|
|
3353
4225
|
exports.hasChildren = hasChildren;
|
|
3354
4226
|
exports.hasExpandedChild = hasExpandedChild;
|
|
4227
|
+
exports.horizontalNavItemCanBeActive = horizontalNavItemCanBeActive;
|
|
4228
|
+
exports.horizontalNavItemCanExpand = horizontalNavItemCanExpand;
|
|
4229
|
+
exports.horizontalNavItemCanHaveChildren = horizontalNavItemCanHaveChildren;
|
|
4230
|
+
exports.horizontalNavItemHasActiveChild = horizontalNavItemHasActiveChild;
|
|
4231
|
+
exports.horizontalNavItemHasChildren = horizontalNavItemHasChildren;
|
|
4232
|
+
exports.horizontalNavItemHasExpandedChild = horizontalNavItemHasExpandedChild;
|
|
3355
4233
|
exports.isExpanded = isExpanded;
|
|
4234
|
+
exports.isHorizontalNavItemActive = isHorizontalNavItemActive;
|
|
4235
|
+
exports.isHorizontalNavItemExpanded = isHorizontalNavItemExpanded;
|
|
4236
|
+
exports.isHorizontalNavItemFocused = isHorizontalNavItemFocused;
|
|
4237
|
+
exports.isHorizontalNavItemType = isHorizontalNavItemType;
|
|
3356
4238
|
exports.isNavItemActive = isNavItemActive;
|
|
3357
4239
|
exports.isNavItemType = isNavItemType;
|
|
3358
4240
|
exports.routeChanges = routeChanges;
|
|
4241
|
+
exports.setDefaultHorizontalNavItemState = setDefaultHorizontalNavItemState;
|
|
3359
4242
|
exports.setDefaultState = setDefaultState;
|
|
4243
|
+
exports.setHorizontalNavItemStateProp = setHorizontalNavItemStateProp;
|
|
3360
4244
|
exports.setItemStateProp = setItemStateProp;
|
|
3361
4245
|
exports.sideNavExpandStateChangeFn = sideNavExpandStateChangeFn;
|
|
3362
4246
|
exports.sideToSide = sideToSide;
|
|
@@ -3364,14 +4248,18 @@
|
|
|
3364
4248
|
exports.stepper = stepper;
|
|
3365
4249
|
exports.transformer = transformer;
|
|
3366
4250
|
exports["ɵa"] = BaseLayoutSideBarFooterDirective;
|
|
3367
|
-
exports["ɵb"] =
|
|
3368
|
-
exports["ɵc"] =
|
|
3369
|
-
exports["ɵd"] =
|
|
3370
|
-
exports["ɵe"] =
|
|
3371
|
-
exports["ɵf"] =
|
|
3372
|
-
exports["ɵg"] =
|
|
3373
|
-
exports["ɵh"] =
|
|
3374
|
-
exports["ɵi"] =
|
|
4251
|
+
exports["ɵb"] = BaseLayoutSideBarHeaderDirective;
|
|
4252
|
+
exports["ɵc"] = TheSeamSideNavService;
|
|
4253
|
+
exports["ɵd"] = TopBarCompactMenuBtnDetailDirective;
|
|
4254
|
+
exports["ɵe"] = TopBarNavToggleBtnDetailDirective;
|
|
4255
|
+
exports["ɵf"] = TheSeamSchemaFormControlsModule;
|
|
4256
|
+
exports["ɵg"] = TheSeamSchemaFormCheckboxComponent;
|
|
4257
|
+
exports["ɵh"] = TheSeamSchemaFormSubmitComponent;
|
|
4258
|
+
exports["ɵi"] = TheSeamSchemaFormSelectComponent;
|
|
4259
|
+
exports["ɵj"] = TheSeamSchemaFormInputComponent;
|
|
4260
|
+
exports["ɵk"] = TheSeamSchemaFormNumberComponent;
|
|
4261
|
+
exports["ɵl"] = TheSeamSchemaFormSubmitSplitComponent;
|
|
4262
|
+
exports["ɵm"] = TheSeamNavService;
|
|
3375
4263
|
|
|
3376
4264
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3377
4265
|
|