@indice/ng-components 0.2.125 → 0.2.128-beta
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/README.md +4 -4
- package/_styles.css +56 -7
- package/bundles/indice-ng-components.umd.js +79 -67
- package/bundles/indice-ng-components.umd.js.map +1 -1
- package/esm2015/lib/controls/kpi-tile/kpi-tile.component.js +1 -1
- package/esm2015/lib/controls/list-view/list-column.component.js +1 -1
- package/esm2015/lib/controls/list-view/list-view-empty-state.component.js +2 -2
- package/esm2015/lib/controls/skeleton-loader/skeleton-loader.component.js +1 -1
- package/esm2015/lib/layouts/shell/shell-header/shell-header.component.js +46 -34
- package/esm2015/lib/layouts/shell/shell-layout/shell-layout.component.js +6 -11
- package/esm2015/lib/layouts/views/form-layout/form-layout.component.js +6 -5
- package/esm2015/lib/services/toaster.service.js +1 -1
- package/esm2015/lib/types.js +11 -5
- package/fesm2015/indice-ng-components.js +65 -50
- package/fesm2015/indice-ng-components.js.map +1 -1
- package/lib/layouts/shell/shell-header/shell-header.component.d.ts +21 -15
- package/lib/layouts/shell/shell-layout/shell-layout.component.d.ts +2 -3
- package/lib/layouts/views/form-layout/form-layout.component.d.ts +3 -2
- package/lib/types.d.ts +11 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# INDICE ANGULAR Components
|
|
2
|
-
|
|
3
|
-
Indice common components for Angular 2+
|
|
4
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
|
|
1
|
+
# INDICE ANGULAR Components
|
|
2
|
+
|
|
3
|
+
Indice common components for Angular 2+
|
|
4
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
|
package/_styles.css
CHANGED
|
@@ -105,6 +105,14 @@
|
|
|
105
105
|
@apply block px-4 py-2 text-xs text-blue-300 shadow-sm whitespace-nowrap overflow-ellipsis overflow-hidden;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
.nav-link-notifications {
|
|
109
|
+
@apply block py-3 pl-3 pr-2 text-xs text-gray-700 hover:bg-gray-50;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.nav-link-notifications-active {
|
|
113
|
+
@apply block py-3 pl-3 pr-2 text-xs text-blue-300 shadow-sm;
|
|
114
|
+
}
|
|
115
|
+
|
|
108
116
|
.nav-link-mobile-active {
|
|
109
117
|
@apply bg-gray-900 text-blue-300 block px-3 py-2 rounded-sm text-xs whitespace-nowrap overflow-ellipsis overflow-hidden;
|
|
110
118
|
}
|
|
@@ -130,8 +138,8 @@
|
|
|
130
138
|
@apply antialiased font-sans bg-gray-100;
|
|
131
139
|
}
|
|
132
140
|
|
|
133
|
-
|
|
134
|
-
@apply bg-gradient-to-r from-gray-900 to-gray-800 pb-24 sm:pb-
|
|
141
|
+
.shell-header-container {
|
|
142
|
+
@apply bg-gradient-to-r from-gray-900 to-gray-800 pb-24 sm:pb-32 z-50;
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
.shell-header-container-inner {
|
|
@@ -143,7 +151,7 @@
|
|
|
143
151
|
}
|
|
144
152
|
|
|
145
153
|
.shell-content-container {
|
|
146
|
-
@apply
|
|
154
|
+
@apply -mt-24 sm:-mt-32 ;
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
.shell-content-container-no-header {
|
|
@@ -213,6 +221,47 @@
|
|
|
213
221
|
@apply z-50 origin-top-right absolute right-0 mt-24 w-48 rounded-sm shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none;
|
|
214
222
|
}
|
|
215
223
|
|
|
224
|
+
.shell-header-profile-dropdown-with-username {
|
|
225
|
+
@apply z-50 origin-top-right absolute right-0 mt-36 w-48 rounded-sm shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.shell-header-notifications {
|
|
229
|
+
@apply flex gap-3 items-center;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.shell-header-notifications-dropdown-button {
|
|
233
|
+
@apply max-w-xs focus:outline-none rounded-full flex items-center text-sm ring-1 ring-blue-300 focus:ring-offset-1
|
|
234
|
+
focus:ring-offset-blue-800 focus:ring-blue-400 transition ease-in duration-100;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.shell-header-notifications-dropdown {
|
|
238
|
+
@apply z-50 origin-top-right absolute right-0 pt-3 pl-2 mt-2 w-80 rounded-sm shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.shell-header-notifications-dropdown-with-username {
|
|
242
|
+
@apply z-50 origin-top-right absolute right-0 pt-3 pl-1.5 mt-1 w-80 rounded-sm shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none;
|
|
243
|
+
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.shell-header-notifications-dropdown-view-all-button{
|
|
247
|
+
@apply items-center align-text-bottom font-medium w-full px-2.5 py-2.5 text-xs text-gray-600 focus:outline-none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.notification-messages::-webkit-scrollbar {
|
|
251
|
+
width: 7px;
|
|
252
|
+
height: 7px;
|
|
253
|
+
background: transparent;
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
/* or add it to the track */
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.notification-messages::-webkit-scrollbar-thumb {
|
|
259
|
+
@apply bg-gray-600;
|
|
260
|
+
|
|
261
|
+
&:hover {
|
|
262
|
+
@apply bg-gray-700;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
216
265
|
|
|
217
266
|
.mobile-menu-button-container {
|
|
218
267
|
@apply -mr-2 flex sm:hidden;
|
|
@@ -255,7 +304,7 @@
|
|
|
255
304
|
}
|
|
256
305
|
|
|
257
306
|
.mobile-menu-rounded-button {
|
|
258
|
-
@apply ml-auto bg-gray-800 flex-shrink-0 p-1 text-gray-400 rounded-full hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-
|
|
307
|
+
@apply ml-auto bg-gray-800 flex-shrink-0 p-1 text-gray-400 rounded-full hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-blue-800 focus:ring-blue-400 focus:ring-white;
|
|
259
308
|
}
|
|
260
309
|
|
|
261
310
|
.mobile-menu-rounded-button-icon-style {
|
|
@@ -355,15 +404,15 @@
|
|
|
355
404
|
}
|
|
356
405
|
|
|
357
406
|
.view-container-fluid {
|
|
358
|
-
@apply sm:px-0
|
|
407
|
+
@apply sm:px-0;
|
|
359
408
|
}
|
|
360
409
|
|
|
361
410
|
.view-layout-paddings {
|
|
362
|
-
@apply
|
|
411
|
+
@apply py-6 sm:py-10;
|
|
363
412
|
}
|
|
364
413
|
|
|
365
414
|
.view-layout-title-container {
|
|
366
|
-
@apply flex
|
|
415
|
+
@apply flex flex-row justify-start ;
|
|
367
416
|
}
|
|
368
417
|
|
|
369
418
|
.view-layout-title-container-inner {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@indice/ng-auth')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@indice/ng-components', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rxjs', 'rxjs/operators', '@indice/ng-auth'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.indice = global.indice || {}, global.indice[
|
|
5
|
-
}
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.indice = global.indice || {}, global.indice['ng-components'] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global.rxjs, global.rxjs.operators, global.i2));
|
|
5
|
+
}(this, (function (exports, i0, i1, i1$1, forms, rxjs, operators, i2) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
14
|
Object.defineProperty(n, k, d.get ? d : {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () {
|
|
16
|
+
get: function () {
|
|
17
|
+
return e[k];
|
|
18
|
+
}
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
|
-
n[
|
|
23
|
+
n['default'] = e;
|
|
22
24
|
return Object.freeze(n);
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -253,16 +255,10 @@
|
|
|
253
255
|
r[k] = a[j];
|
|
254
256
|
return r;
|
|
255
257
|
}
|
|
256
|
-
function __spreadArray(to, from
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (!ar)
|
|
261
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
262
|
-
ar[i] = from[i];
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
258
|
+
function __spreadArray(to, from) {
|
|
259
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
260
|
+
to[j] = from[i];
|
|
261
|
+
return to;
|
|
266
262
|
}
|
|
267
263
|
function __await(v) {
|
|
268
264
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -663,36 +659,41 @@
|
|
|
663
659
|
Icons.Details = ' ms-Icon ms-Icon--AccountActivity';
|
|
664
660
|
|
|
665
661
|
var NavLink = /** @class */ (function () {
|
|
666
|
-
function NavLink(text, path, exact, external, icon) {
|
|
662
|
+
function NavLink(text, path, exact, external, icon, isRead, creationDate) {
|
|
667
663
|
if (exact === void 0) { exact = false; }
|
|
668
664
|
if (external === void 0) { external = false; }
|
|
669
|
-
this.
|
|
665
|
+
this.isRead = false;
|
|
670
666
|
this.text = text;
|
|
671
667
|
this.path = path;
|
|
672
668
|
this.exact = exact;
|
|
673
669
|
this.external = external;
|
|
674
670
|
this.icon = icon;
|
|
671
|
+
this.isRead = isRead;
|
|
672
|
+
this.creationDate = creationDate;
|
|
675
673
|
}
|
|
676
674
|
return NavLink;
|
|
677
675
|
}());
|
|
678
676
|
var ExternalNavLink = /** @class */ (function (_super) {
|
|
679
677
|
__extends(ExternalNavLink, _super);
|
|
680
678
|
function ExternalNavLink(text, path, openInNewTab, icon) {
|
|
681
|
-
|
|
682
|
-
_this.type = 'external';
|
|
683
|
-
return _this;
|
|
679
|
+
return _super.call(this, text, path, true, openInNewTab, icon) || this;
|
|
684
680
|
}
|
|
685
681
|
return ExternalNavLink;
|
|
686
682
|
}(NavLink));
|
|
687
683
|
var FragmentNavLink = /** @class */ (function (_super) {
|
|
688
684
|
__extends(FragmentNavLink, _super);
|
|
689
685
|
function FragmentNavLink(text, path, icon) {
|
|
690
|
-
|
|
691
|
-
_this.type = 'fragment';
|
|
692
|
-
return _this;
|
|
686
|
+
return _super.call(this, text, path, true, true, icon) || this;
|
|
693
687
|
}
|
|
694
688
|
return FragmentNavLink;
|
|
695
689
|
}(NavLink));
|
|
690
|
+
var NotificationNavLink = /** @class */ (function (_super) {
|
|
691
|
+
__extends(NotificationNavLink, _super);
|
|
692
|
+
function NotificationNavLink(text, path, isRead, creationDate) {
|
|
693
|
+
return _super.call(this, text, path, true, false, undefined, isRead, creationDate) || this;
|
|
694
|
+
}
|
|
695
|
+
return NotificationNavLink;
|
|
696
|
+
}(NavLink));
|
|
696
697
|
var ViewAction = /** @class */ (function () {
|
|
697
698
|
function ViewAction(type, key, param, icon, tooltip) {
|
|
698
699
|
this.type = type;
|
|
@@ -755,6 +756,7 @@
|
|
|
755
756
|
this.appLogoAlt = 'your app name here';
|
|
756
757
|
this.showHeader = true;
|
|
757
758
|
this.showUserNameOnHeader = false;
|
|
759
|
+
this.showNotifications = false;
|
|
758
760
|
this.showFooter = true;
|
|
759
761
|
this.fluid = false;
|
|
760
762
|
}
|
|
@@ -987,7 +989,7 @@
|
|
|
987
989
|
return ListViewEmptyStateComponent;
|
|
988
990
|
}());
|
|
989
991
|
ListViewEmptyStateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListViewEmptyStateComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
990
|
-
ListViewEmptyStateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListViewEmptyStateComponent, selector: "lib-list-view-empty-state", inputs: { title: "title", subTitle: ["sub-title", "subTitle"], newItemLabel: ["new-item-label", "newItemLabel"] }, ngImport: i0__namespace, template: "<div class=\"p-20\">\n <div class=\"text-center p-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"mx-auto h-12 w-12 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4\" />\n </svg>\n <h3 class=\"mt-2 text-sm font-medium text-gray-900\">{{title}}</h3>\n <p class=\"mt-1 text-sm text-gray-500\">\n {{subTitle}}\n </p>\n <div class=\"mt-6\" *ngIf=\"false\">\n <button type=\"button\" class=\"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-gray-500\">\n <!-- Heroicon name: solid/plus -->\n <svg class=\"-ml-1 mr-2 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path vector-effect=\"non-scaling-stroke\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\" />\n </svg>\n {{newItemLabel}}\n </button>\n </div>\n </div>\n</div>\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
992
|
+
ListViewEmptyStateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListViewEmptyStateComponent, selector: "lib-list-view-empty-state", inputs: { title: "title", subTitle: ["sub-title", "subTitle"], newItemLabel: ["new-item-label", "newItemLabel"] }, ngImport: i0__namespace, template: "<div class=\"p-20\">\r\n <div class=\"text-center p-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"mx-auto h-12 w-12 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4\" />\r\n </svg>\r\n <h3 class=\"mt-2 text-sm font-medium text-gray-900\">{{title}}</h3>\r\n <p class=\"mt-1 text-sm text-gray-500\">\r\n {{subTitle}}\r\n </p>\r\n <div class=\"mt-6\" *ngIf=\"false\">\r\n <button type=\"button\" class=\"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-gray-500\">\r\n <!-- Heroicon name: solid/plus -->\r\n <svg class=\"-ml-1 mr-2 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\r\n <path vector-effect=\"non-scaling-stroke\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\" />\r\n </svg>\r\n {{newItemLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
991
993
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListViewEmptyStateComponent, decorators: [{
|
|
992
994
|
type: i0.Component,
|
|
993
995
|
args: [{
|
|
@@ -2066,27 +2068,29 @@
|
|
|
2066
2068
|
}], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.Injector }, { type: i0__namespace.ApplicationRef }]; } });
|
|
2067
2069
|
|
|
2068
2070
|
var ShellHeaderComponent = /** @class */ (function () {
|
|
2069
|
-
function ShellHeaderComponent(authService, router,
|
|
2071
|
+
function ShellHeaderComponent(authService, router, links) {
|
|
2070
2072
|
this.authService = authService;
|
|
2071
2073
|
this.router = router;
|
|
2072
|
-
this.config = config;
|
|
2073
2074
|
this.links = links;
|
|
2074
2075
|
// tslint:disable-next-line:no-input-rename
|
|
2075
2076
|
this.sectionLinksPath = 'main';
|
|
2076
|
-
|
|
2077
|
-
this.profileMenuVisible = true;
|
|
2078
|
-
// tslint:disable-next-line:no-input-rename
|
|
2079
|
-
this.showUserNameOnHeader = false;
|
|
2077
|
+
this.notificationLinksPath = 'notifications';
|
|
2080
2078
|
this.border = true;
|
|
2079
|
+
this.showNotifications = false;
|
|
2080
|
+
this.showUserNameOnHeader = false;
|
|
2081
|
+
this.notificationsMenuVisible = true;
|
|
2082
|
+
this.profileMenuVisible = true;
|
|
2081
2083
|
this.sectionLinks = rxjs.of([]);
|
|
2084
|
+
this.notificationLinks = rxjs.of([]);
|
|
2082
2085
|
this.mobileMenuExpanded = false;
|
|
2083
2086
|
this.userMenuExpanded = false;
|
|
2087
|
+
this.notificationsMenuExpanded = false;
|
|
2088
|
+
this.routeSubject = new rxjs.Observable();
|
|
2084
2089
|
this.routerSub$ = null;
|
|
2085
2090
|
this.userSub$ = null;
|
|
2086
2091
|
this.statusSub$ = null;
|
|
2087
2092
|
this.user = null;
|
|
2088
2093
|
this.avatarName = null;
|
|
2089
|
-
this.routeSubject = this.router.events.pipe(operators.filter(function (event) { return event instanceof i1$1.NavigationStart; }));
|
|
2090
2094
|
}
|
|
2091
2095
|
ShellHeaderComponent.prototype.ngOnDestroy = function () {
|
|
2092
2096
|
console.log(this.showUserNameOnHeader);
|
|
@@ -2101,21 +2105,23 @@
|
|
|
2101
2105
|
this.userSub$.unsubscribe();
|
|
2102
2106
|
}
|
|
2103
2107
|
};
|
|
2104
|
-
ShellHeaderComponent.prototype.scroll = function (el) {
|
|
2105
|
-
el.scrollIntoView({ behavior: 'smooth' });
|
|
2106
|
-
};
|
|
2107
2108
|
ShellHeaderComponent.prototype.ngOnInit = function () {
|
|
2108
2109
|
var _this = this;
|
|
2110
|
+
var _a, _b;
|
|
2111
|
+
this.showNotifications = (_a = this.config) === null || _a === void 0 ? void 0 : _a.showNotifications;
|
|
2112
|
+
this.showUserNameOnHeader = (_b = this.config) === null || _b === void 0 ? void 0 : _b.showUserNameOnHeader;
|
|
2109
2113
|
this.sectionLinks = this.links[this.sectionLinksPath];
|
|
2110
|
-
this.
|
|
2114
|
+
this.notificationLinks = this.links[this.notificationLinksPath];
|
|
2115
|
+
this.routerSub$ = this.router.events.pipe(operators.filter(function (event) { return event instanceof i1$1.NavigationStart; })).subscribe(function (event) {
|
|
2111
2116
|
_this.mobileMenuExpanded = false;
|
|
2112
2117
|
_this.userMenuExpanded = false;
|
|
2118
|
+
_this.notificationsMenuExpanded = false;
|
|
2113
2119
|
});
|
|
2114
2120
|
this.authService.loadUser().subscribe(function (user) {
|
|
2115
2121
|
console.log(user);
|
|
2116
2122
|
_this.setCurrentUser(user);
|
|
2117
2123
|
}, function (error) {
|
|
2118
|
-
console.
|
|
2124
|
+
console.log(error);
|
|
2119
2125
|
});
|
|
2120
2126
|
// Detect user changes and display / or not user info accordingly...
|
|
2121
2127
|
this.userSub$ = this.authService.user$.subscribe(function (user) {
|
|
@@ -2123,28 +2129,40 @@
|
|
|
2123
2129
|
_this.setCurrentUser(user);
|
|
2124
2130
|
});
|
|
2125
2131
|
};
|
|
2132
|
+
ShellHeaderComponent.prototype.setCurrentUser = function (user) {
|
|
2133
|
+
var _a, _b;
|
|
2134
|
+
this.user = user;
|
|
2135
|
+
if (this.user && this.user.profile) {
|
|
2136
|
+
this.avatarName = "" + ((_a = this.user.profile.given_name) === null || _a === void 0 ? void 0 : _a.charAt(0)) + ((_b = this.user.profile.family_name) === null || _b === void 0 ? void 0 : _b.charAt(0));
|
|
2137
|
+
console.log('load user', this.avatarName);
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2126
2140
|
// tslint:disable-next-line:typedef
|
|
2127
|
-
ShellHeaderComponent.prototype.
|
|
2141
|
+
ShellHeaderComponent.prototype.onClickOutsideProfile = function ($event) {
|
|
2128
2142
|
this.userMenuExpanded = false;
|
|
2129
2143
|
};
|
|
2144
|
+
// tslint:disable-next-line:typedef
|
|
2145
|
+
ShellHeaderComponent.prototype.onClickOutsideNotifications = function ($event) {
|
|
2146
|
+
this.notificationsMenuExpanded = false;
|
|
2147
|
+
};
|
|
2130
2148
|
ShellHeaderComponent.prototype.signin = function (event) {
|
|
2131
2149
|
if (event) {
|
|
2132
2150
|
event.preventDefault();
|
|
2133
2151
|
}
|
|
2134
2152
|
this.authService.signinRedirect();
|
|
2135
2153
|
};
|
|
2136
|
-
ShellHeaderComponent.prototype.
|
|
2137
|
-
|
|
2138
|
-
this.
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2154
|
+
ShellHeaderComponent.prototype.expandUserMenu = function () {
|
|
2155
|
+
this.userMenuExpanded = !this.userMenuExpanded;
|
|
2156
|
+
this.notificationsMenuExpanded = false;
|
|
2157
|
+
};
|
|
2158
|
+
ShellHeaderComponent.prototype.expandNotificationsMenu = function () {
|
|
2159
|
+
this.notificationsMenuExpanded = !this.notificationsMenuExpanded;
|
|
2160
|
+
this.userMenuExpanded = false;
|
|
2143
2161
|
};
|
|
2144
2162
|
return ShellHeaderComponent;
|
|
2145
2163
|
}());
|
|
2146
|
-
ShellHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellHeaderComponent, deps: [{ token: i2.AuthService }, { token: i1$1.Router }, { token:
|
|
2147
|
-
ShellHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellHeaderComponent, selector: "lib-shell-header", inputs: { sectionLinksPath: ["section-links", "sectionLinksPath"], profileMenuVisible: ["profile-menu", "profileMenuVisible"], showUserNameOnHeader: ["show-userName", "showUserNameOnHeader"], border: "border" }, ngImport: i0__namespace, template: "<nav>\r\n <div class=\"shell-header-paddings\">\r\n <div [class]=\"border ? 'shell-header-border' : ''\">\r\n <div class=\"shell-header-menu-container\">\r\n <div class=\"shell-header-links-no-grow-container\">\r\n <div>\r\n <a href=\"#\" [routerLink]=\"['/']\"><img class=\"app-logo\" [src]=\"config.appLogo\" [alt]=\"config.appLogoAlt\" /></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shell-header-link-container\">\r\n <ng-container *ngFor=\"let link of sectionLinks | async\">\r\n <ng-container [ngSwitch]=\"link.type\">\r\n <a *ngSwitchCase=\"'router'\"\r\n href=\"#\"\r\n [routerLink]=\"[link.path]\"\r\n [routerLinkActive]=\"['nav-link-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link\">\r\n {{ link.text }}\r\n </a>\r\n <a *ngSwitchCase=\"'external'\"\r\n [href]=\"link.path\"\r\n [attr.target]=\"link.external ? '_blank' : '_self'\"\r\n class=\"nav-link\">\r\n {{ link.text }}\r\n </a>\r\n <a *ngSwitchCase=\"'fragment'\"\r\n routerLink=\".\"\r\n [fragment]=\"link.path\"\r\n [routerLinkActive]=\"['nav-link-active']\"\r\n class=\"nav-link\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"shell-header-md-visible\">\r\n <div class=\"shell-header-links-no-grow-container\">\r\n\r\n <ng-container *ngFor=\"let link of links.profileActions | async\">\r\n <a class=\"shell-header-menu-rounded-button\"\r\n (clickOutside)=\"onClickOutside($event)\"\r\n [attr.href]=\"link.path\"\r\n [attr.target]=\"link.external ? '_blank' : '_self'\">\r\n <span class=\"sr-only\">{{ link.text }}</span>\r\n <i *ngIf=\"link.icon\"\r\n [class]=\"link.icon\"></i>\r\n </a>\r\n </ng-container>\r\n\r\n <!-- Profile dropdown -->\r\n <div class=\"ml-2 relative\"\r\n (clickOutside)=\"onClickOutside($event)\"\r\n *ngIf=\"profileMenuVisible\">\r\n <div [ngClass]=\"{'shell-header-profile': showUserNameOnHeader}\">\r\n <div *ngIf=\"user && showUserNameOnHeader\"\r\n class=\"shell-header-profile-userName\">\r\n {{ user.profile.name }}\r\n </div>\r\n <button type=\"button\"\r\n *ngIf=\"user\"\r\n (click)=\"userMenuExpanded = !userMenuExpanded\"\r\n class=\"shell-header-profile-dropdown-button\"\r\n id=\"user-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">Open user menu</span>\r\n <span class=\"avatar-container\">\r\n <span class=\"avatar-text\">{{this.avatarName}}</span>\r\n </span>\r\n </button>\r\n\r\n <button type=\"button\"\r\n *ngIf=\"!user\"\r\n (click)=\"signin(null)\"\r\n class=\"shell-header-profile-dropdown-button\"\r\n id=\"user-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">sign in</span>\r\n <span class=\"avatar-container\">\r\n <span class=\"avatar-text\"><i class=\"ms-Icon ms-Icon--Signin\"></i></span>\r\n </span>\r\n </button>\r\n\r\n <div *ngIf=\"userMenuExpanded\"\r\n [ngClass]=\"showUserNameOnHeader ? 'shell-header-profile-dropdown-with-username' : 'shell-header-profile-dropdown'\"\r\n role=\"menu\"\r\n aria-orientation=\"vertical\"\r\n aria-labelledby=\"user-menu\">\r\n <ng-container *ngFor=\"let link of links.profile | async\">\r\n <a [routerLink]=\"link.path\" [routerLinkActive]=\"['nav-link-profile-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\" class=\"nav-link-profile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mobile-menu-button-container\">\r\n <!-- Mobile menu button -->\r\n <button type=\"button\"\r\n (click)=\"mobileMenuExpanded = !mobileMenuExpanded\"\r\n class=\"mobile-menu-button\"\r\n aria-controls=\"mobile-menu\"\r\n [attr.aria-expanded]=\"mobileMenuExpanded\">\r\n <span class=\"sr-only\">Open main menu</span>\r\n <!--Heroicon name: outline/menu Menu open: \"hidden\", Menu closed: \"block\"-->\r\n <svg class=\"block h-6 w-6\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n <!--Heroicon name: outline/x Menu open: \"block\", Menu closed: \"hidden\"-->\r\n <svg class=\"hidden h-6 w-6\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Mobile menu, show/hide based on menu state. -->\r\n <div class=\"mobile-menu-container\" *ngIf=\"mobileMenuExpanded\" id=\"mobile-menu\">\r\n <div class=\"mobile-menu-link-container\">\r\n <ng-container *ngFor=\"let link of sectionLinks | async\">\r\n <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n <a *ngIf=\"!link.external\" [routerLink]=\"link.path\" [routerLinkActive]=\"['nav-link-mobile-active']\" [routerLinkActiveOptions]=\"{ exact: link.exact }\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"!user\">\r\n <a href=\"#\" (click)=\"signin($event)\" class=\"nav-link-mobile\">\r\n <i class=\"ms-Icon ms-Icon--Signin mr-2\"></i>\u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\r\n </a>\r\n </ng-container>\r\n </div>\r\n <div class=\"mobile-menu-user-info-container\" *ngIf=\"user\">\r\n <div class=\"mobile-menu-user-info-container-inner\">\r\n <div class=\"flex-shrink-0\">\r\n <span class=\"mobile-menu-avatar-container\">\r\n <span class=\"mobile-menu-avatar-name\">{{ this.avatarName }}</span>\r\n </span>\r\n </div>\r\n <div class=\"ml-3\">\r\n <div class=\"mobile-menu-user-name\">{{ user.profile.name }}</div>\r\n <div class=\"mobile-menu-user-email\">{{ user.profile.email }}</div>\r\n </div>\r\n <button class=\"mobile-menu-rounded-button\">\r\n <span class=\"sr-only\">View notifications</span>\r\n <!-- Heroicon name: outline/bell -->\r\n <svg class=\"mobile-menu-rounded-button-icon-style\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <div class=\"mobile-menu-link-container\">\r\n <ng-container *ngFor=\"let link of links.profile | async\">\r\n <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n <a [routerLink]=\"link.path\"\r\n [routerLinkActive]=\"['nav-link-mobile-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</nav>\r\n", directives: [{ type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1__namespace.AsyncPipe } });
|
|
2164
|
+
ShellHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellHeaderComponent, deps: [{ token: i2.AuthService }, { token: i1$1.Router }, { token: APP_LINKS }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2165
|
+
ShellHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellHeaderComponent, selector: "lib-shell-header", inputs: { sectionLinksPath: ["section-links", "sectionLinksPath"], notificationLinksPath: ["notification-links", "notificationLinksPath"], config: "config", border: "border" }, ngImport: i0__namespace, template: "<nav>\r\n <div class=\"shell-header-paddings\">\r\n <div [class]=\"border ? 'shell-header-border' : ''\">\r\n <div class=\"shell-header-menu-container\">\r\n <div class=\"shell-header-links-no-grow-container\">\r\n <div>\r\n <a href=\"#\"\r\n [routerLink]=\"['/']\"><img class=\"app-logo\" [src]=\"config.appLogo\" [alt]=\"config.appLogoAlt\" /></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shell-header-link-container\">\r\n <ng-container *ngFor=\"let link of sectionLinks | async\">\r\n <a href=\"#\"\r\n [routerLink]=\"[link.path]\"\r\n [attr.target]=\"link.external ? '_blank' : '_self'\"\r\n [routerLinkActive]=\"['nav-link-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"shell-header-md-visible\">\r\n <div class=\"shell-header-links-no-grow-container\">\r\n\r\n <ng-container *ngFor=\"let link of links.profileActions | async\">\r\n <a class=\"shell-header-menu-rounded-button\"\r\n (clickOutside)=\"onClickOutsideProfile($event)\"\r\n [attr.href]=\"link.path\"\r\n [attr.target]=\"link.external ? '_blank' : '_self'\">\r\n <span class=\"sr-only\">{{ link.text }}</span>\r\n <i *ngIf=\"link.icon\"\r\n [class]=\"link.icon\"></i>\r\n </a>\r\n </ng-container>\r\n\r\n <!-- Profile dropdown -->\r\n <div class=\"ml-2 relative\"\r\n (clickOutside)=\"onClickOutsideProfile($event)\"\r\n *ngIf=\"profileMenuVisible\">\r\n <div [ngClass]=\"{'shell-header-profile': showUserNameOnHeader}\">\r\n <div *ngIf=\"user && showUserNameOnHeader\"\r\n class=\"shell-header-profile-userName\">\r\n {{ user.profile.name }}\r\n </div>\r\n <button type=\"button\"\r\n *ngIf=\"user\"\r\n (click)=\"userMenuExpanded = !userMenuExpanded\"\r\n class=\"shell-header-profile-dropdown-button\"\r\n id=\"user-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">Open user menu</span>\r\n <span class=\"avatar-container\">\r\n <span class=\"avatar-text\">{{this.avatarName}}</span>\r\n </span>\r\n </button>\r\n\r\n <button type=\"button\"\r\n *ngIf=\"!user\"\r\n (click)=\"signin(null)\"\r\n class=\"shell-header-profile-dropdown-button\"\r\n id=\"user-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">sign in</span>\r\n <span class=\"avatar-container\">\r\n <span class=\"avatar-text\"><i class=\"ms-Icon ms-Icon--Signin\"></i></span>\r\n </span>\r\n </button>\r\n\r\n <div *ngIf=\"userMenuExpanded\"\r\n [ngClass]=\"showUserNameOnHeader ? 'shell-header-profile-dropdown-with-username' : 'shell-header-profile-dropdown'\"\r\n role=\"menu\"\r\n aria-orientation=\"vertical\"\r\n aria-labelledby=\"user-menu\">\r\n <!-- <a href=\"#\" class=\"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100\" role=\"menuitem\">\u0391\u03C0\u03BF\u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7</a> -->\r\n <ng-container *ngFor=\"let link of links.profile | async\">\r\n <!-- <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-profile\">\r\n {{ link.text }}\r\n </a> -->\r\n <a [routerLink]=\"link.path\" [routerLinkActive]=\"['nav-link-profile-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\" class=\"nav-link-profile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Notifications dropdown -->\r\n <div class=\"ml-2 relative\"\r\n (clickOutside)=\"onClickOutsideNotifications($event)\"\r\n *ngIf=\"notificationsMenuVisible\">\r\n <!-- Notifications Button -->\r\n <button class=\"mobile-menu-rounded-button bg-transparent\"\r\n *ngIf=\"showNotifications\"\r\n (click)=\"expandNotificationsMenu()\"\r\n id=\"notifications-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">View notifications</span>\r\n <!-- Heroicon name: outline/bell -->\r\n <svg class=\"mobile-menu-rounded-button-icon-style\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9\" />\r\n </svg>\r\n </button>\r\n\r\n <div *ngIf=\"notificationsMenuExpanded\"\r\n [ngClass]=\"showUserNameOnHeader ? 'shell-header-notifications-dropdown-with-username' : 'shell-header-notifications-dropdown'\"\r\n role=\"menu\"\r\n aria-orientation=\"vertical\"\r\n aria-labelledby=\"notifications-menu\">\r\n <div class=\"max-h-64 overflow-y-auto notification-messages\">\r\n <ng-container *ngIf=\"!notificationLinks; else notificationsDropDown\"\r\n class=\"py-5\">\r\n <div class=\"nav-link-notifications hover:bg-transparent\">\r\n \u0394\u03B5\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03BD\u03AD\u03B5\u03C2 \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9\u03C2\r\n </div>\r\n </ng-container>\r\n <ng-template #notificationsDropDown>\r\n <ul class=\"pr-1.5\">\r\n <ng-container #notificationsDropDown\r\n *ngFor=\"let link of notificationLinks | async\">\r\n <li class=\"mb-2\"\r\n [ngClass]=\"{'border-l-2 border-blue-500 bg-blue-50 hover:bg-blue-50': !link.isRead }\">\r\n <a [routerLink]=\"link.path\"\r\n [routerLinkActive]=\"['nav-link-notifications-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link-notifications grid grid-row\"\r\n [ngClass]=\"!link.isRead ? ' hover:bg-blue-50' : 'border-b border-gray-100'\">\r\n <span class=\"font-bold\">\r\n {{ link.text }}\r\n </span>\r\n <span class=\"font-thin tracking-tighter\">\r\n {{ link.creationDate | date: 'EEE, d MMMM' }}\r\n </span>\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </ng-template>\r\n </div>\r\n <div class=\"p-1 rounded-sm\">\r\n <button type=\"button\"\r\n class=\"shell-header-notifications-dropdown-view-all-button\">\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03CC\u03BB\u03C9\u03BD</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mobile-menu-button-container\">\r\n <!-- Mobile menu button -->\r\n <button type=\"button\"\r\n (click)=\"mobileMenuExpanded = !mobileMenuExpanded\"\r\n class=\"mobile-menu-button\"\r\n aria-controls=\"mobile-menu\"\r\n [attr.aria-expanded]=\"mobileMenuExpanded\">\r\n <span class=\"sr-only\">Open main menu</span>\r\n <!--Heroicon name: outline/menu Menu open: \"hidden\", Menu closed: \"block\"-->\r\n <svg class=\"block h-6 w-6\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n <!--Heroicon name: outline/x Menu open: \"block\", Menu closed: \"hidden\"-->\r\n <svg class=\"hidden h-6 w-6\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Mobile menu, show/hide based on menu state. -->\r\n <div class=\"mobile-menu-container\"\r\n *ngIf=\"mobileMenuExpanded\"\r\n id=\"mobile-menu\">\r\n <div class=\"mobile-menu-link-container\">\r\n <ng-container *ngFor=\"let link of sectionLinks | async\">\r\n <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n <a *ngIf=\"!link.external\" [routerLink]=\"link.path\" [routerLinkActive]=\"['nav-link-mobile-active']\" [routerLinkActiveOptions]=\"{ exact: link.exact }\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"!user\">\r\n <a href=\"#\" (click)=\"signin($event)\" class=\"nav-link-mobile\">\r\n <i class=\"ms-Icon ms-Icon--Signin mr-2\"></i>\u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\r\n </a>\r\n </ng-container>\r\n </div>\r\n <div class=\"mobile-menu-user-info-container\" *ngIf=\"user\">\r\n <div class=\"mobile-menu-user-info-container-inner\">\r\n <div class=\"flex-shrink-0\">\r\n <span class=\"mobile-menu-avatar-container\">\r\n <span class=\"mobile-menu-avatar-name\">{{ this.avatarName }}</span>\r\n </span>\r\n </div>\r\n <div class=\"ml-3\">\r\n <div class=\"mobile-menu-user-name\">{{ user.profile.name }}</div>\r\n <div class=\"mobile-menu-user-email\">{{ user.profile.email }}</div>\r\n </div>\r\n <button class=\"mobile-menu-rounded-button\">\r\n <span class=\"sr-only\">View notifications</span>\r\n <!-- Heroicon name: outline/bell -->\r\n <svg class=\"mobile-menu-rounded-button-icon-style\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <div class=\"mobile-menu-link-container\">\r\n <ng-container *ngFor=\"let link of links.profile | async\">\r\n <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n <a [routerLink]=\"link.path\"\r\n [routerLinkActive]=\"['nav-link-mobile-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n <!-- <a href=\"#\" class=\"block px-3 py-2 rounded-sm text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700\">\u0391\u03C0\u03BF\u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7</a> -->\r\n </div>\r\n </div>\r\n </div>\r\n</nav>\r\n", directives: [{ type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1__namespace.AsyncPipe, "date": i1__namespace.DatePipe } });
|
|
2148
2166
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellHeaderComponent, decorators: [{
|
|
2149
2167
|
type: i0.Component,
|
|
2150
2168
|
args: [{
|
|
@@ -2159,9 +2177,6 @@
|
|
|
2159
2177
|
}] }, { type: i1__namespace$1.Router, decorators: [{
|
|
2160
2178
|
type: i0.Inject,
|
|
2161
2179
|
args: [i1$1.Router]
|
|
2162
|
-
}] }, { type: undefined, decorators: [{
|
|
2163
|
-
type: i0.Inject,
|
|
2164
|
-
args: [SHELL_CONFIG]
|
|
2165
2180
|
}] }, { type: undefined, decorators: [{
|
|
2166
2181
|
type: i0.Inject,
|
|
2167
2182
|
args: [APP_LINKS]
|
|
@@ -2169,12 +2184,11 @@
|
|
|
2169
2184
|
}, propDecorators: { sectionLinksPath: [{
|
|
2170
2185
|
type: i0.Input,
|
|
2171
2186
|
args: ['section-links']
|
|
2172
|
-
}],
|
|
2187
|
+
}], notificationLinksPath: [{
|
|
2173
2188
|
type: i0.Input,
|
|
2174
|
-
args: ['
|
|
2175
|
-
}],
|
|
2176
|
-
type: i0.Input
|
|
2177
|
-
args: ['show-userName']
|
|
2189
|
+
args: ['notification-links']
|
|
2190
|
+
}], config: [{
|
|
2191
|
+
type: i0.Input
|
|
2178
2192
|
}], border: [{
|
|
2179
2193
|
type: i0.Input
|
|
2180
2194
|
}] } });
|
|
@@ -2201,15 +2215,14 @@
|
|
|
2201
2215
|
} });
|
|
2202
2216
|
|
|
2203
2217
|
var ShellLayoutComponent = /** @class */ (function () {
|
|
2204
|
-
function ShellLayoutComponent(
|
|
2205
|
-
this.document = document;
|
|
2218
|
+
function ShellLayoutComponent(router, location, config, componentLoaderFactory) {
|
|
2206
2219
|
this.router = router;
|
|
2207
2220
|
this.location = location;
|
|
2208
2221
|
this.config = config;
|
|
2209
2222
|
this.componentLoaderFactory = componentLoaderFactory;
|
|
2210
2223
|
this.dynamicComponentHosts = null;
|
|
2211
|
-
this.showRightPaneSM = false;
|
|
2212
2224
|
this.routerSub$ = null;
|
|
2225
|
+
this.showRightPaneSM = false;
|
|
2213
2226
|
this.activeConfig = new DefaultShellConfig();
|
|
2214
2227
|
this.loaded = false;
|
|
2215
2228
|
if (!config) {
|
|
@@ -2273,8 +2286,8 @@
|
|
|
2273
2286
|
};
|
|
2274
2287
|
return ShellLayoutComponent;
|
|
2275
2288
|
}());
|
|
2276
|
-
ShellLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellLayoutComponent, deps: [{ token:
|
|
2277
|
-
ShellLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellLayoutComponent, selector: "lib-shell-layout", viewQueries: [{ propertyName: "dynamicComponentHosts", predicate: DynamicComponentHostDirective, descendants: true }], ngImport: i0__namespace, template: "<div *ngIf=\"loaded\"
|
|
2289
|
+
ShellLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellLayoutComponent, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace.Location }, { token: SHELL_CONFIG }, { token: ComponentLoaderFactory }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2290
|
+
ShellLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellLayoutComponent, selector: "lib-shell-layout", viewQueries: [{ propertyName: "dynamicComponentHosts", predicate: DynamicComponentHostDirective, descendants: true }], ngImport: i0__namespace, template: "<div *ngIf=\"loaded\"\r\n [style.display]=\"!loaded ? 'none':'block'\"\r\n class=\"shell-container active-side-pane\">\r\n <div class=\"shell-header-container\"\r\n *ngIf=\"activeConfig.showHeader\">\r\n <div [class]=\"activeConfig.fluid ? 'shell-header-container-inner-fluid' : 'shell-header-container-inner'\">\r\n\r\n <ng-container *ngIf=\"activeConfig.customHeaderComponent\">\r\n <div appDynamicComponentHost=\"Header\"></div>\r\n </ng-container>\r\n\r\n <lib-shell-header *ngIf=\"!activeConfig.customHeaderComponent\"\r\n [config]=\"activeConfig\"></lib-shell-header>\r\n </div>\r\n </div>\r\n\r\n <main [class]=\"activeConfig.showHeader ? 'shell-content-container' : 'shell-content-container-no-header'\">\r\n <div [class]=\"activeConfig.fluid ? 'shell-content-container-inner-fluid' : 'shell-content-container-inner'\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n </main>\r\n\r\n <div class=\"shell-footer-container\"\r\n *ngIf=\"activeConfig.showFooter\">\r\n <div [class]=\"activeConfig.fluid ? 'shell-footer-container-inner-fluid' : 'shell-footer-container-inner'\">\r\n <ng-container *ngIf=\"activeConfig.customFooterComponent\">\r\n <div appDynamicComponentHost\r\n hostName=\"Footer\"></div>\r\n </ng-container>\r\n <lib-shell-footer *ngIf=\"!activeConfig.customFooterComponent\"></lib-shell-footer>\r\n </div>\r\n </div>\r\n\r\n <lib-side-pane #rightPane>\r\n <router-outlet name=\"rightpane\"\r\n (activate)=\"rightPane.onSidePaneActivated($event)\"\r\n (deactivate)=\"rightPane.onSidePaneDeactivated($event)\"></router-outlet>\r\n </lib-side-pane>\r\n\r\n <lib-toaster-container></lib-toaster-container>\r\n\r\n</div>\r\n", components: [{ type: ShellHeaderComponent, selector: "lib-shell-header", inputs: ["section-links", "notification-links", "config", "border"] }, { type: ShellFooterComponent, selector: "lib-shell-footer" }, { type: SidePaneComponent, selector: "lib-side-pane", inputs: ["visible"], outputs: ["onComplete"] }, { type: ToasterContainerComponent, selector: "lib-toaster-container" }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentHostDirective, selector: "[appDynamicComponentHost]", inputs: ["hostName"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
|
|
2278
2291
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellLayoutComponent, decorators: [{
|
|
2279
2292
|
type: i0.Component,
|
|
2280
2293
|
args: [{
|
|
@@ -2283,10 +2296,7 @@
|
|
|
2283
2296
|
templateUrl: './shell-layout.component.html',
|
|
2284
2297
|
}]
|
|
2285
2298
|
}], ctorParameters: function () {
|
|
2286
|
-
return [{ type: undefined, decorators: [{
|
|
2287
|
-
type: i0.Inject,
|
|
2288
|
-
args: [i1.DOCUMENT]
|
|
2289
|
-
}] }, { type: i1__namespace$1.Router }, { type: i1__namespace.Location }, { type: undefined, decorators: [{
|
|
2299
|
+
return [{ type: i1__namespace$1.Router }, { type: i1__namespace.Location }, { type: undefined, decorators: [{
|
|
2290
2300
|
type: i0.Inject,
|
|
2291
2301
|
args: [SHELL_CONFIG]
|
|
2292
2302
|
}] }, { type: ComponentLoaderFactory }];
|
|
@@ -2551,8 +2561,8 @@
|
|
|
2551
2561
|
}] } });
|
|
2552
2562
|
|
|
2553
2563
|
var FormLayoutComponent = /** @class */ (function () {
|
|
2554
|
-
function FormLayoutComponent(
|
|
2555
|
-
this.
|
|
2564
|
+
function FormLayoutComponent(_router) {
|
|
2565
|
+
this._router = _router;
|
|
2556
2566
|
this.title = null;
|
|
2557
2567
|
// tslint:disable-next-line:no-input-rename
|
|
2558
2568
|
this.searchPlaceholder = 'αναζήτηση';
|
|
@@ -2564,6 +2574,7 @@
|
|
|
2564
2574
|
// tslint:disable-next-line:no-output-on-prefix
|
|
2565
2575
|
this.onSearch = new i0.EventEmitter();
|
|
2566
2576
|
this.onComplete = new i0.EventEmitter();
|
|
2577
|
+
this.showRightPaneSM = false;
|
|
2567
2578
|
}
|
|
2568
2579
|
FormLayoutComponent.prototype.ngOnInit = function () {
|
|
2569
2580
|
var _a;
|
|
@@ -2593,10 +2604,10 @@
|
|
|
2593
2604
|
FormLayoutComponent.prototype.routerLinkActionClick = function (action, relative) {
|
|
2594
2605
|
if (relative === void 0) { relative = false; }
|
|
2595
2606
|
if (action.outlet) {
|
|
2596
|
-
this.
|
|
2607
|
+
this._router.navigate(['', { outlets: { formRightPane: action.link } }]);
|
|
2597
2608
|
}
|
|
2598
2609
|
else {
|
|
2599
|
-
this.
|
|
2610
|
+
this._router.navigate([action.link]);
|
|
2600
2611
|
}
|
|
2601
2612
|
};
|
|
2602
2613
|
return FormLayoutComponent;
|
|
@@ -3708,6 +3719,7 @@
|
|
|
3708
3719
|
exports.ModelViewLayoutComponent = ModelViewLayoutComponent;
|
|
3709
3720
|
exports.NULL_TOAST = NULL_TOAST;
|
|
3710
3721
|
exports.NavLink = NavLink;
|
|
3722
|
+
exports.NotificationNavLink = NotificationNavLink;
|
|
3711
3723
|
exports.PageNotFoundComponent = PageNotFoundComponent;
|
|
3712
3724
|
exports.PagerComponent = PagerComponent;
|
|
3713
3725
|
exports.RouterViewAction = RouterViewAction;
|
|
@@ -3729,5 +3741,5 @@
|
|
|
3729
3741
|
|
|
3730
3742
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3731
3743
|
|
|
3732
|
-
}));
|
|
3744
|
+
})));
|
|
3733
3745
|
//# sourceMappingURL=indice-ng-components.umd.js.map
|