windows-plus-utilities 0.0.17 → 0.0.18
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/esm2020/main-menu/components/menu/menu.component.mjs +14 -3
- package/esm2020/main-menu/components/menu-link/menu-link.component.mjs +43 -0
- package/esm2020/main-menu/main-menu.module.mjs +6 -3
- package/esm2020/main-menu/public-api.mjs +2 -1
- package/esm2020/main-menu/util/interface/menu-link/menu-link.interface.mjs +2 -0
- package/fesm2015/windows-plus-utilities-main-menu.mjs +57 -4
- package/fesm2015/windows-plus-utilities-main-menu.mjs.map +1 -1
- package/fesm2020/windows-plus-utilities-main-menu.mjs +57 -4
- package/fesm2020/windows-plus-utilities-main-menu.mjs.map +1 -1
- package/main-menu/components/menu/menu.component.d.ts +11 -2
- package/main-menu/components/menu-link/menu-link.component.d.ts +29 -0
- package/main-menu/main-menu.module.d.ts +4 -3
- package/main-menu/public-api.d.ts +1 -0
- package/main-menu/util/interface/menu-link/menu-link.interface.d.ts +7 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { faHome, faSignOutAlt } from '@fortawesome/free-solid-svg-icons';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
5
5
|
import * as i2 from "../action-link/action-link.component";
|
|
6
|
+
import * as i3 from "../menu-link/menu-link.component";
|
|
6
7
|
/**
|
|
7
8
|
* @author Alex Hodson
|
|
8
9
|
* @description the menu component provides the functionality for interacting with the sidebar menu
|
|
@@ -29,6 +30,10 @@ export class MenuComponent {
|
|
|
29
30
|
* @description handles the navigation to the log in screen
|
|
30
31
|
*/
|
|
31
32
|
this.navigateToLogIn = new EventEmitter();
|
|
33
|
+
/**
|
|
34
|
+
* @description handles the navigation from the main menu links
|
|
35
|
+
*/
|
|
36
|
+
this.navigateFromMenu = new EventEmitter();
|
|
32
37
|
/**
|
|
33
38
|
* @description the font awesome icon for the sign out button
|
|
34
39
|
*/
|
|
@@ -57,6 +62,10 @@ export class MenuComponent {
|
|
|
57
62
|
async ngOnInit() {
|
|
58
63
|
this.handleBaseActionLinks();
|
|
59
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* @author Alex Hodson
|
|
67
|
+
* @description handles the assignment of the base action links
|
|
68
|
+
*/
|
|
60
69
|
handleBaseActionLinks() {
|
|
61
70
|
if (this.showHome) {
|
|
62
71
|
this.actionLinks.push({
|
|
@@ -87,10 +96,10 @@ export class MenuComponent {
|
|
|
87
96
|
}
|
|
88
97
|
}
|
|
89
98
|
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
-
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuComponent, selector: "wp-menu", inputs: { showHome: "showHome", showLogOut: "showLogOut", privileges: "privileges" }, outputs: { navigateToHome: "navigateToHome", navigateToLogIn: "navigateToLogIn" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], ngImport: i0, template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t
|
|
99
|
+
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuComponent, selector: "wp-menu", inputs: { showHome: "showHome", showLogOut: "showLogOut", privileges: "privileges" }, outputs: { navigateToHome: "navigateToHome", navigateToLogIn: "navigateToLogIn", navigateFromMenu: "navigateFromMenu" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], ngImport: i0, template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>", styles: ["menu{padding-inline-start:0px;padding:0}.menubar{position:relative;background-color:var(--wp-primaryBlue);box-shadow:2px 5px 5px #0000001f;width:74px;height:100vh;transition:width .3s}.menubar span{display:inline-block;position:absolute;left:50%;transform:translate(-50%);font-weight:300;font-size:1em;line-height:60px}.menuWrap{display:block;position:fixed;background-color:var(--wp-primaryBlue);text-align:center;width:74px;transition:width .3s}.menubar.isOpen,.menuWrap.isOpen{width:210px}#hambmenu{position:relative;width:40px;height:45px;float:left;transition:.5s ease-in-out;cursor:pointer}#hambmenu span{position:absolute;height:5px;width:100%;vertical-align:middle;margin:20px 0 0 15px;background:white;border-radius:var(--wp-borderRadius);opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out;padding:0}#hambmenu span:nth-child(1){top:0}#hambmenu span:nth-child(4){top:20px}#hambmenu.isOpen span:nth-child(1){top:18px;width:0;left:50%;opacity:0}#hambmenu.isOpen span:nth-child(2){transform:rotate(45deg)}#hambmenu.isOpen span:nth-child(3){transform:rotate(-45deg)}#hambmenu.isOpen span:nth-child(4){top:18px;width:0%;left:50%;opacity:0}.hambclicker{content:\"\";height:35px;width:42px;position:absolute;top:8px;left:8px;cursor:pointer;z-index:9}#hambmenu span:nth-child(2),#hambmenu span:nth-child(3){top:10px}#privilege-wrap{position:absolute;width:210px;margin-top:60px;transform:translate(-100%);transition:transform .3s;overflow-y:auto;height:calc(87vh - 60px)}#privilege-wrap.isOpen{transform:none}#privilege-wrap ul,.actionMenuArea ul{width:100%;margin-top:0;padding:0;list-style-type:none;text-align:left}.actionMenuArea li p{color:#fff;margin-bottom:0}.fa{color:#000;padding-right:8px}.mainMenuArea{height:90vh}.actionMenuArea{height:10vh;color:#fff;display:flex;justify-content:center;align-items:flex-end}@media screen and (max-width: 420px){.menubar span{font-size:1.2em}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ActionLinkComponent, selector: "action-link", inputs: ["actionLink", "open"] }, { kind: "component", type: i3.MenuLinkComponent, selector: "menu-link", inputs: ["label", "link"], outputs: ["navigateFromMenu"] }] });
|
|
91
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuComponent, decorators: [{
|
|
92
101
|
type: Component,
|
|
93
|
-
args: [{ selector: 'wp-menu', template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t
|
|
102
|
+
args: [{ selector: 'wp-menu', template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>", styles: ["menu{padding-inline-start:0px;padding:0}.menubar{position:relative;background-color:var(--wp-primaryBlue);box-shadow:2px 5px 5px #0000001f;width:74px;height:100vh;transition:width .3s}.menubar span{display:inline-block;position:absolute;left:50%;transform:translate(-50%);font-weight:300;font-size:1em;line-height:60px}.menuWrap{display:block;position:fixed;background-color:var(--wp-primaryBlue);text-align:center;width:74px;transition:width .3s}.menubar.isOpen,.menuWrap.isOpen{width:210px}#hambmenu{position:relative;width:40px;height:45px;float:left;transition:.5s ease-in-out;cursor:pointer}#hambmenu span{position:absolute;height:5px;width:100%;vertical-align:middle;margin:20px 0 0 15px;background:white;border-radius:var(--wp-borderRadius);opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out;padding:0}#hambmenu span:nth-child(1){top:0}#hambmenu span:nth-child(4){top:20px}#hambmenu.isOpen span:nth-child(1){top:18px;width:0;left:50%;opacity:0}#hambmenu.isOpen span:nth-child(2){transform:rotate(45deg)}#hambmenu.isOpen span:nth-child(3){transform:rotate(-45deg)}#hambmenu.isOpen span:nth-child(4){top:18px;width:0%;left:50%;opacity:0}.hambclicker{content:\"\";height:35px;width:42px;position:absolute;top:8px;left:8px;cursor:pointer;z-index:9}#hambmenu span:nth-child(2),#hambmenu span:nth-child(3){top:10px}#privilege-wrap{position:absolute;width:210px;margin-top:60px;transform:translate(-100%);transition:transform .3s;overflow-y:auto;height:calc(87vh - 60px)}#privilege-wrap.isOpen{transform:none}#privilege-wrap ul,.actionMenuArea ul{width:100%;margin-top:0;padding:0;list-style-type:none;text-align:left}.actionMenuArea li p{color:#fff;margin-bottom:0}.fa{color:#000;padding-right:8px}.mainMenuArea{height:90vh}.actionMenuArea{height:10vh;color:#fff;display:flex;justify-content:center;align-items:flex-end}@media screen and (max-width: 420px){.menubar span{font-size:1.2em}}\n"] }]
|
|
94
103
|
}], ctorParameters: function () { return []; }, propDecorators: { showHome: [{
|
|
95
104
|
type: Input
|
|
96
105
|
}], navigateToHome: [{
|
|
@@ -101,8 +110,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
101
110
|
type: Output
|
|
102
111
|
}], privileges: [{
|
|
103
112
|
type: Input
|
|
113
|
+
}], navigateFromMenu: [{
|
|
114
|
+
type: Output
|
|
104
115
|
}], menu: [{
|
|
105
116
|
type: ViewChild,
|
|
106
117
|
args: ['menu']
|
|
107
118
|
}] } });
|
|
108
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
119
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93aW5kb3dzLXBsdXMtdXRpbGl0aWVzL21haW4tbWVudS9jb21wb25lbnRzL21lbnUvbWVudS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93aW5kb3dzLXBsdXMtdXRpbGl0aWVzL21haW4tbWVudS9jb21wb25lbnRzL21lbnUvbWVudS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUN6RixPQUFPLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLG1DQUFtQyxDQUFBOzs7OztBQVN4RTs7O0dBR0c7QUFDSCxNQUFNLE9BQU8sYUFBYTtJQWtEekI7OztPQUdHO0lBQ0g7UUFyREE7O1dBRUc7UUFDTSxhQUFRLEdBQVksSUFBSSxDQUFBO1FBQ2pDOztXQUVHO1FBQ08sbUJBQWMsR0FBdUIsSUFBSSxZQUFZLEVBQUUsQ0FBQTtRQUNqRTs7V0FFRztRQUNNLGVBQVUsR0FBWSxJQUFJLENBQUE7UUFDbkM7O1dBRUc7UUFDTyxvQkFBZSxHQUF1QixJQUFJLFlBQVksRUFBRSxDQUFBO1FBS2xFOztXQUVHO1FBQ08scUJBQWdCLEdBQXlCLElBQUksWUFBWSxFQUFVLENBQUE7UUFLN0U7O1dBRUc7UUFDSCxpQkFBWSxHQUF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as i1 from "@angular/router";
|
|
4
|
+
/**
|
|
5
|
+
* @author Alex Hodson
|
|
6
|
+
* @description the menu link class provides the functionality for the side navigation links
|
|
7
|
+
*/
|
|
8
|
+
export class MenuLinkComponent {
|
|
9
|
+
/**
|
|
10
|
+
* @author Alex Hodson
|
|
11
|
+
* @description class constructor specifying the required services and properties for the component
|
|
12
|
+
*/
|
|
13
|
+
constructor(router) {
|
|
14
|
+
this.router = router;
|
|
15
|
+
this.navigateFromMenu = new EventEmitter();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @author Alex Hodson
|
|
19
|
+
* @description the method which runs when the component is rendered
|
|
20
|
+
*/
|
|
21
|
+
ngOnInit() {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @author Alex Hodson
|
|
25
|
+
* @description handles the user clicking a link in the side navigation bar.
|
|
26
|
+
*/
|
|
27
|
+
handleLinkClick() {
|
|
28
|
+
this.navigateFromMenu.emit(this.link);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
MenuLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuLinkComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
MenuLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuLinkComponent, selector: "menu-link", inputs: { label: "label", link: "link" }, outputs: { navigateFromMenu: "navigateFromMenu" }, ngImport: i0, template: "<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n", styles: ["li{padding:.75rem 0 .75rem 1rem;border-bottom:1px solid rgba(0,0,0,.14)}li:last-child{border-bottom:none}li p{margin-bottom:0}\n"] });
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuLinkComponent, decorators: [{
|
|
34
|
+
type: Component,
|
|
35
|
+
args: [{ selector: 'menu-link', template: "<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n", styles: ["li{padding:.75rem 0 .75rem 1rem;border-bottom:1px solid rgba(0,0,0,.14)}li:last-child{border-bottom:none}li p{margin-bottom:0}\n"] }]
|
|
36
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { label: [{
|
|
37
|
+
type: Input
|
|
38
|
+
}], link: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}], navigateFromMenu: [{
|
|
41
|
+
type: Output
|
|
42
|
+
}] } });
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1saW5rLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvbWFpbi1tZW51L2NvbXBvbmVudHMvbWVudS1saW5rL21lbnUtbGluay5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93aW5kb3dzLXBsdXMtdXRpbGl0aWVzL21haW4tbWVudS9jb21wb25lbnRzL21lbnUtbGluay9tZW51LWxpbmsuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7O0FBUS9FOzs7R0FHRztBQUNILE1BQU0sT0FBTyxpQkFBaUI7SUFTN0I7OztPQUdHO0lBQ0YsWUFBb0IsTUFBYztRQUFkLFdBQU0sR0FBTixNQUFNLENBQVE7UUFMekIscUJBQWdCLEdBQXlCLEl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CJjdXJzb3ItcG9pbnRlclwiXHJcblx0KGNsaWNrKT1cImhhbmRsZUxpbmtDbGljaygpXCJcclxuPlxyXG5cdDxwIGNsYXNzPVwidGV4dC13aGl0ZVwiPnt7bGFiZWx9fTwvcD5cclxuPC9saT5cclxuIl19
|
|
@@ -3,12 +3,14 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { MenuComponent } from './components/menu/menu.component';
|
|
4
4
|
import { ActionLinkComponent } from './components/action-link/action-link.component';
|
|
5
5
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
6
|
+
import { MenuLinkComponent } from './components/menu-link/menu-link.component';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export class MainMenuModule {
|
|
8
9
|
}
|
|
9
10
|
MainMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
11
|
MainMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, declarations: [MenuComponent,
|
|
11
|
-
ActionLinkComponent
|
|
12
|
+
ActionLinkComponent,
|
|
13
|
+
MenuLinkComponent], imports: [CommonModule,
|
|
12
14
|
FontAwesomeModule], exports: [MenuComponent] });
|
|
13
15
|
MainMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, imports: [CommonModule,
|
|
14
16
|
FontAwesomeModule] });
|
|
@@ -17,7 +19,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
17
19
|
args: [{
|
|
18
20
|
declarations: [
|
|
19
21
|
MenuComponent,
|
|
20
|
-
ActionLinkComponent
|
|
22
|
+
ActionLinkComponent,
|
|
23
|
+
MenuLinkComponent
|
|
21
24
|
],
|
|
22
25
|
imports: [
|
|
23
26
|
CommonModule,
|
|
@@ -28,4 +31,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
28
31
|
]
|
|
29
32
|
}]
|
|
30
33
|
}] });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi1tZW51Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvbWFpbi1tZW51L21haW4tbWVudS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2pFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdEQUFnRCxDQUFBO0FBQ3BGLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGtDQUFrQyxDQUFBO0FBQ3BFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDRDQUE0QyxDQUFBOztBQWlCOUUsTUFBTSxPQUFPLGNBQWM7OzRHQUFkLGNBQWM7NkdBQWQsY0FBYyxpQkFadkIsYUFBYTtRQUNmLG1CQUFtQjtRQUNuQixpQkFBaUIsYUFHakIsWUFBWTtRQUNaLGlCQUFpQixhQUdmLGFBQWE7NkdBR0osY0FBYyxZQVB6QixZQUFZO1FBQ1osaUJBQWlCOzRGQU1OLGNBQWM7a0JBZDFCLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFO3dCQUNaLGFBQWE7d0JBQ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3
3
|
*/
|
|
4
4
|
export * from './components/menu/menu.component';
|
|
5
5
|
export * from './main-menu.module';
|
|
6
|
-
|
|
6
|
+
export * from './util/interface/menu-link/menu-link.interface';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvbWFpbi1tZW51L3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGtDQUFrQyxDQUFDO0FBQ2pELGNBQWMsb0JBQW9CLENBQUM7QUFFbkMsY0FBYyxnREFBZ0QsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygd2luZG93cy1wbHVzLXV0aWxpdGllc1xuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vY29tcG9uZW50cy9tZW51L21lbnUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbWFpbi1tZW51Lm1vZHVsZSc7XG5cbmV4cG9ydCAqIGZyb20gJy4vdXRpbC9pbnRlcmZhY2UvbWVudS1saW5rL21lbnUtbGluay5pbnRlcmZhY2UnIl19
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1saW5rLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvbWFpbi1tZW51L3V0aWwvaW50ZXJmYWNlL21lbnUtbGluay9tZW51LWxpbmsuaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogQGRlc2NyaXB0aW9uIGFuIGludGVyZmFjZSBkZWZpbmluZyB0aGUgcHJvcGVydGllcyByZXF1aXJlZCBmb3IgdGhlIG1lbnUgbGlua3NcclxuICovXHJcbmV4cG9ydCBpbnRlcmZhY2UgTWVudUxpbmsge1xyXG5cdGxhYmVsOiBzdHJpbmcsXHJcblx0bGluazogc3RyaW5nXHJcbn0iXX0=
|
|
@@ -6,6 +6,7 @@ import * as i1 from '@angular/common';
|
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
8
8
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
9
|
+
import * as i1$1 from '@angular/router';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* @author Alex Hodson
|
|
@@ -35,6 +36,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
35
36
|
type: Input
|
|
36
37
|
}] } });
|
|
37
38
|
|
|
39
|
+
/**
|
|
40
|
+
* @author Alex Hodson
|
|
41
|
+
* @description the menu link class provides the functionality for the side navigation links
|
|
42
|
+
*/
|
|
43
|
+
class MenuLinkComponent {
|
|
44
|
+
/**
|
|
45
|
+
* @author Alex Hodson
|
|
46
|
+
* @description class constructor specifying the required services and properties for the component
|
|
47
|
+
*/
|
|
48
|
+
constructor(router) {
|
|
49
|
+
this.router = router;
|
|
50
|
+
this.navigateFromMenu = new EventEmitter();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @author Alex Hodson
|
|
54
|
+
* @description the method which runs when the component is rendered
|
|
55
|
+
*/
|
|
56
|
+
ngOnInit() {
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @author Alex Hodson
|
|
60
|
+
* @description handles the user clicking a link in the side navigation bar.
|
|
61
|
+
*/
|
|
62
|
+
handleLinkClick() {
|
|
63
|
+
this.navigateFromMenu.emit(this.link);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
MenuLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuLinkComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
MenuLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuLinkComponent, selector: "menu-link", inputs: { label: "label", link: "link" }, outputs: { navigateFromMenu: "navigateFromMenu" }, ngImport: i0, template: "<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n", styles: ["li{padding:.75rem 0 .75rem 1rem;border-bottom:1px solid rgba(0,0,0,.14)}li:last-child{border-bottom:none}li p{margin-bottom:0}\n"] });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuLinkComponent, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ selector: 'menu-link', template: "<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n", styles: ["li{padding:.75rem 0 .75rem 1rem;border-bottom:1px solid rgba(0,0,0,.14)}li:last-child{border-bottom:none}li p{margin-bottom:0}\n"] }]
|
|
71
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { label: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], link: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], navigateFromMenu: [{
|
|
76
|
+
type: Output
|
|
77
|
+
}] } });
|
|
78
|
+
|
|
38
79
|
/**
|
|
39
80
|
* @author Alex Hodson
|
|
40
81
|
* @description the menu component provides the functionality for interacting with the sidebar menu
|
|
@@ -61,6 +102,10 @@ class MenuComponent {
|
|
|
61
102
|
* @description handles the navigation to the log in screen
|
|
62
103
|
*/
|
|
63
104
|
this.navigateToLogIn = new EventEmitter();
|
|
105
|
+
/**
|
|
106
|
+
* @description handles the navigation from the main menu links
|
|
107
|
+
*/
|
|
108
|
+
this.navigateFromMenu = new EventEmitter();
|
|
64
109
|
/**
|
|
65
110
|
* @description the font awesome icon for the sign out button
|
|
66
111
|
*/
|
|
@@ -91,6 +136,10 @@ class MenuComponent {
|
|
|
91
136
|
this.handleBaseActionLinks();
|
|
92
137
|
});
|
|
93
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* @author Alex Hodson
|
|
141
|
+
* @description handles the assignment of the base action links
|
|
142
|
+
*/
|
|
94
143
|
handleBaseActionLinks() {
|
|
95
144
|
if (this.showHome) {
|
|
96
145
|
this.actionLinks.push({
|
|
@@ -121,10 +170,10 @@ class MenuComponent {
|
|
|
121
170
|
}
|
|
122
171
|
}
|
|
123
172
|
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
124
|
-
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuComponent, selector: "wp-menu", inputs: { showHome: "showHome", showLogOut: "showLogOut", privileges: "privileges" }, outputs: { navigateToHome: "navigateToHome", navigateToLogIn: "navigateToLogIn" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], ngImport: i0, template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t
|
|
173
|
+
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuComponent, selector: "wp-menu", inputs: { showHome: "showHome", showLogOut: "showLogOut", privileges: "privileges" }, outputs: { navigateToHome: "navigateToHome", navigateToLogIn: "navigateToLogIn", navigateFromMenu: "navigateFromMenu" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], ngImport: i0, template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>", styles: ["menu{padding-inline-start:0px;padding:0}.menubar{position:relative;background-color:var(--wp-primaryBlue);box-shadow:2px 5px 5px #0000001f;width:74px;height:100vh;transition:width .3s}.menubar span{display:inline-block;position:absolute;left:50%;transform:translate(-50%);font-weight:300;font-size:1em;line-height:60px}.menuWrap{display:block;position:fixed;background-color:var(--wp-primaryBlue);text-align:center;width:74px;transition:width .3s}.menubar.isOpen,.menuWrap.isOpen{width:210px}#hambmenu{position:relative;width:40px;height:45px;float:left;transition:.5s ease-in-out;cursor:pointer}#hambmenu span{position:absolute;height:5px;width:100%;vertical-align:middle;margin:20px 0 0 15px;background:white;border-radius:var(--wp-borderRadius);opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out;padding:0}#hambmenu span:nth-child(1){top:0}#hambmenu span:nth-child(4){top:20px}#hambmenu.isOpen span:nth-child(1){top:18px;width:0;left:50%;opacity:0}#hambmenu.isOpen span:nth-child(2){transform:rotate(45deg)}#hambmenu.isOpen span:nth-child(3){transform:rotate(-45deg)}#hambmenu.isOpen span:nth-child(4){top:18px;width:0%;left:50%;opacity:0}.hambclicker{content:\"\";height:35px;width:42px;position:absolute;top:8px;left:8px;cursor:pointer;z-index:9}#hambmenu span:nth-child(2),#hambmenu span:nth-child(3){top:10px}#privilege-wrap{position:absolute;width:210px;margin-top:60px;transform:translate(-100%);transition:transform .3s;overflow-y:auto;height:calc(87vh - 60px)}#privilege-wrap.isOpen{transform:none}#privilege-wrap ul,.actionMenuArea ul{width:100%;margin-top:0;padding:0;list-style-type:none;text-align:left}.actionMenuArea li p{color:#fff;margin-bottom:0}.fa{color:#000;padding-right:8px}.mainMenuArea{height:90vh}.actionMenuArea{height:10vh;color:#fff;display:flex;justify-content:center;align-items:flex-end}@media screen and (max-width: 420px){.menubar span{font-size:1.2em}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionLinkComponent, selector: "action-link", inputs: ["actionLink", "open"] }, { kind: "component", type: MenuLinkComponent, selector: "menu-link", inputs: ["label", "link"], outputs: ["navigateFromMenu"] }] });
|
|
125
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuComponent, decorators: [{
|
|
126
175
|
type: Component,
|
|
127
|
-
args: [{ selector: 'wp-menu', template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t
|
|
176
|
+
args: [{ selector: 'wp-menu', template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>", styles: ["menu{padding-inline-start:0px;padding:0}.menubar{position:relative;background-color:var(--wp-primaryBlue);box-shadow:2px 5px 5px #0000001f;width:74px;height:100vh;transition:width .3s}.menubar span{display:inline-block;position:absolute;left:50%;transform:translate(-50%);font-weight:300;font-size:1em;line-height:60px}.menuWrap{display:block;position:fixed;background-color:var(--wp-primaryBlue);text-align:center;width:74px;transition:width .3s}.menubar.isOpen,.menuWrap.isOpen{width:210px}#hambmenu{position:relative;width:40px;height:45px;float:left;transition:.5s ease-in-out;cursor:pointer}#hambmenu span{position:absolute;height:5px;width:100%;vertical-align:middle;margin:20px 0 0 15px;background:white;border-radius:var(--wp-borderRadius);opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out;padding:0}#hambmenu span:nth-child(1){top:0}#hambmenu span:nth-child(4){top:20px}#hambmenu.isOpen span:nth-child(1){top:18px;width:0;left:50%;opacity:0}#hambmenu.isOpen span:nth-child(2){transform:rotate(45deg)}#hambmenu.isOpen span:nth-child(3){transform:rotate(-45deg)}#hambmenu.isOpen span:nth-child(4){top:18px;width:0%;left:50%;opacity:0}.hambclicker{content:\"\";height:35px;width:42px;position:absolute;top:8px;left:8px;cursor:pointer;z-index:9}#hambmenu span:nth-child(2),#hambmenu span:nth-child(3){top:10px}#privilege-wrap{position:absolute;width:210px;margin-top:60px;transform:translate(-100%);transition:transform .3s;overflow-y:auto;height:calc(87vh - 60px)}#privilege-wrap.isOpen{transform:none}#privilege-wrap ul,.actionMenuArea ul{width:100%;margin-top:0;padding:0;list-style-type:none;text-align:left}.actionMenuArea li p{color:#fff;margin-bottom:0}.fa{color:#000;padding-right:8px}.mainMenuArea{height:90vh}.actionMenuArea{height:10vh;color:#fff;display:flex;justify-content:center;align-items:flex-end}@media screen and (max-width: 420px){.menubar span{font-size:1.2em}}\n"] }]
|
|
128
177
|
}], ctorParameters: function () { return []; }, propDecorators: { showHome: [{
|
|
129
178
|
type: Input
|
|
130
179
|
}], navigateToHome: [{
|
|
@@ -135,6 +184,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
135
184
|
type: Output
|
|
136
185
|
}], privileges: [{
|
|
137
186
|
type: Input
|
|
187
|
+
}], navigateFromMenu: [{
|
|
188
|
+
type: Output
|
|
138
189
|
}], menu: [{
|
|
139
190
|
type: ViewChild,
|
|
140
191
|
args: ['menu']
|
|
@@ -144,7 +195,8 @@ class MainMenuModule {
|
|
|
144
195
|
}
|
|
145
196
|
MainMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
146
197
|
MainMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, declarations: [MenuComponent,
|
|
147
|
-
ActionLinkComponent
|
|
198
|
+
ActionLinkComponent,
|
|
199
|
+
MenuLinkComponent], imports: [CommonModule,
|
|
148
200
|
FontAwesomeModule], exports: [MenuComponent] });
|
|
149
201
|
MainMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, imports: [CommonModule,
|
|
150
202
|
FontAwesomeModule] });
|
|
@@ -153,7 +205,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
153
205
|
args: [{
|
|
154
206
|
declarations: [
|
|
155
207
|
MenuComponent,
|
|
156
|
-
ActionLinkComponent
|
|
208
|
+
ActionLinkComponent,
|
|
209
|
+
MenuLinkComponent
|
|
157
210
|
],
|
|
158
211
|
imports: [
|
|
159
212
|
CommonModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windows-plus-utilities-main-menu.mjs","sources":["../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.ts","../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.html","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.ts","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.html","../../../projects/windows-plus-utilities/main-menu/main-menu.module.ts","../../../projects/windows-plus-utilities/main-menu/public-api.ts","../../../projects/windows-plus-utilities/main-menu/windows-plus-utilities-main-menu.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\r\n\r\n@Component({\r\n selector: 'action-link',\r\n templateUrl: './action-link.component.html',\r\n styleUrls: ['./action-link.component.sass']\r\n})\r\n/**\r\n * @author Alex Hodson\r\n * @description the action link component provides the functionality for the action links inside the side navigation\r\n */\r\nexport class ActionLinkComponent implements OnInit {\r\n\t/**\r\n\t * @description the action link element provided by the parent which contains the action link properties\r\n\t */\r\n\t@Input()\r\n\tactionLink: ActionLink\r\n\r\n\t/**\r\n\t * @description whether the menu is open\r\n\t */\r\n\t@Input()\r\n\topen: boolean\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description class constructor which specifies the required services and properties for the component\r\n\t */\r\n constructor() { }\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description the method to be run when the component is rendered\r\n\t */\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<li \r\n\tclass=\"cursor text-left\"\r\n>\r\n\t<div \r\n\t\tid=\"{{'content-wrap-' + actionLink.id}}\"\r\n\t\tclass=\"d-flex align-items-center cursor-pointer\"\r\n\t\t[ngClass]=\"{ 'justify-content-start': open, 'justify-content-center': !open}\"\r\n\t\t(click)=\"actionLink.handleClick()\"\r\n\t>\r\n\t\t<div>\r\n\t\t\t<fa-icon [icon]=\"actionLink.icon\"></fa-icon>\r\n\t\t</div>\r\n\t\t<div id=\"{{'text-wrap-' + actionLink.id}}\" class=\"ps-2\" *ngIf=\"open\">\r\n\t\t\t{{actionLink.value}}\r\n\t\t</div>\r\n\t</div>\r\n</li>","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'\nimport { faHome, faSignOutAlt } from '@fortawesome/free-solid-svg-icons'\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\n\n@Component({\n\tselector: 'wp-menu',\n\ttemplateUrl: './menu.component.html',\n\tstyleUrls: ['./menu.component.sass']\n})\n/**\n * @author Alex Hodson\n * @description the menu component provides the functionality for interacting with the sidebar menu \n */\nexport class MenuComponent implements OnInit {\n\t/**\n\t * @description whether the home link should be displayed in the menu\n\t */\n\t@Input() showHome: boolean = true\n\t/**\n\t * @description handles the navigation to the home screen\n\t */\n\t@Output() navigateToHome: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description whether the log out link button should be displayed in the menu\n\t */\n\t@Input() showLogOut: boolean = true\n\t/**\n\t * @description handles the navigation to the log in screen\n\t */\n\t@Output() navigateToLogIn: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description the privileges associated with the logged in account\n\t */\n\t@Input() privileges: string[]\n\t/**\n\t * @description the HTML menu element\n\t */\n\t@ViewChild('menu') menu: any\n\t/**\n\t * @description the font awesome icon for the sign out button\n\t */\n\tfaSignOutAlt = faSignOutAlt\n\t/**\n\t * @description the font awesome icon for the home button\n\t */\n\tfaHome = faHome\n\t/**\n\t * @description whether the side menu is open\n\t */\n\topen = false\n\t/**\n\t * @description the status class to be applies to the menu\n\t */\n\tmenuStatus = 'isClosed'\n\t/**\n\t * @description the action links to be displayed in the side navigation menu\n\t */\n\tactionLinks: ActionLink[] = []\n\n\t/**\n\t * @author Alex Hodson\n\t * @description class constructor specifying the required services and properties for the component\n\t */\n\tconstructor() { }\n\n\t/**\n\t * @author Alex Hodson\n\t * @description the method which runs when the component is rendered. Retrieves the account privileges for the logged in user\n\t */\n\tasync ngOnInit(): Promise<void> {\n\t\tthis.handleBaseActionLinks()\n\t}\n\n\thandleBaseActionLinks(): void {\n\t\tif (this.showHome) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'home',\n\t\t\t\t'value': 'Home',\n\t\t\t\t'icon': faHome,\n\t\t\t\t'handleClick': () => this.navigateToHome.emit()\n\t\t\t})\n\t\t}\n\n\t\tif (this.showLogOut) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'log-out',\n\t\t\t\t'value': 'Log Out',\n\t\t\t\t'icon': faSignOutAlt,\n\t\t\t\t'handleClick': () => {\n\t\t\t\t\tthis.navigateToLogIn.emit()\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @author Alex Hodson\n\t * @description opens and closes the side menu according to the current menu state\n\t */\n\ttriggerMenu(): void {\n\t\tthis.open = !this.open\n\t\tthis.menuStatus = this.open ? 'isOpen' : 'isClosed'\n\t}\n}\n","<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<!-- <menu-link [area]=\"element.area\"></menu-link> -->\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuComponent } from './components/menu/menu.component';\nimport { ActionLinkComponent } from './components/action-link/action-link.component'\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\n\n\n@NgModule({\n declarations: [\n MenuComponent,\n\t\tActionLinkComponent\n ],\n imports: [\n CommonModule,\n\t\tFontAwesomeModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class MainMenuModule { }\n","/*\n * Public API Surface of windows-plus-utilities\n */\n\nexport * from './components/menu/menu.component';\nexport * from './main-menu.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.ActionLinkComponent"],"mappings":";;;;;;;;;AAQA;;;AAGG;MACU,mBAAmB,CAAA;AAY/B;;;AAGG;AACF,IAAA,WAAA,GAAA,GAAiB;AAClB;;;AAGG;IACF,QAAQ,GAAA;KACP;;iHAtBU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,uGCZhC,mhBAgBK,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EA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nB,YAAY;QACZ,iBAAiB,aAGf,aAAa,CAAA,EAAA,CAAA,CAAA;AAGJ,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAPzB,YAAY;QACZ,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAMN,cAAc,EAAA,UAAA,EAAA,CAAA;kBAb1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;wBACf,mBAAmB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACT,YAAY;wBACZ,iBAAiB;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;iBACF,CAAA;;;ACnBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"windows-plus-utilities-main-menu.mjs","sources":["../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.ts","../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.html","../../../projects/windows-plus-utilities/main-menu/components/menu-link/menu-link.component.ts","../../../projects/windows-plus-utilities/main-menu/components/menu-link/menu-link.component.html","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.ts","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.html","../../../projects/windows-plus-utilities/main-menu/main-menu.module.ts","../../../projects/windows-plus-utilities/main-menu/public-api.ts","../../../projects/windows-plus-utilities/main-menu/windows-plus-utilities-main-menu.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\r\n\r\n@Component({\r\n selector: 'action-link',\r\n templateUrl: './action-link.component.html',\r\n styleUrls: ['./action-link.component.sass']\r\n})\r\n/**\r\n * @author Alex Hodson\r\n * @description the action link component provides the functionality for the action links inside the side navigation\r\n */\r\nexport class ActionLinkComponent implements OnInit {\r\n\t/**\r\n\t * @description the action link element provided by the parent which contains the action link properties\r\n\t */\r\n\t@Input()\r\n\tactionLink: ActionLink\r\n\r\n\t/**\r\n\t * @description whether the menu is open\r\n\t */\r\n\t@Input()\r\n\topen: boolean\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description class constructor which specifies the required services and properties for the component\r\n\t */\r\n constructor() { }\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description the method to be run when the component is rendered\r\n\t */\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<li \r\n\tclass=\"cursor text-left\"\r\n>\r\n\t<div \r\n\t\tid=\"{{'content-wrap-' + actionLink.id}}\"\r\n\t\tclass=\"d-flex align-items-center cursor-pointer\"\r\n\t\t[ngClass]=\"{ 'justify-content-start': open, 'justify-content-center': !open}\"\r\n\t\t(click)=\"actionLink.handleClick()\"\r\n\t>\r\n\t\t<div>\r\n\t\t\t<fa-icon [icon]=\"actionLink.icon\"></fa-icon>\r\n\t\t</div>\r\n\t\t<div id=\"{{'text-wrap-' + actionLink.id}}\" class=\"ps-2\" *ngIf=\"open\">\r\n\t\t\t{{actionLink.value}}\r\n\t\t</div>\r\n\t</div>\r\n</li>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { Router } from '@angular/router'\r\n\r\n@Component({\r\n selector: 'menu-link',\r\n templateUrl: './menu-link.component.html',\r\n styleUrls: ['./menu-link.component.sass']\r\n})\r\n/**\r\n * @author Alex Hodson\r\n * @description the menu link class provides the functionality for the side navigation links\r\n */\r\nexport class MenuLinkComponent implements OnInit {\r\n\t/**\r\n\t * @description the string value which represents the area being display\r\n\t */\r\n\t@Input() label: string\r\n\r\n\t@Input() link: string\r\n\r\n\t@Output() navigateFromMenu: EventEmitter<string> = new EventEmitter()\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description class constructor specifying the required services and properties for the component\r\n\t */\r\n constructor(private router: Router) { }\r\n\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description the method which runs when the component is rendered\r\n\t */\r\n ngOnInit(): void {\r\n }\r\n\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description handles the user clicking a link in the side navigation bar.\r\n\t */\r\n\thandleLinkClick(): void {\r\n\t\tthis.navigateFromMenu.emit(this.link)\r\n\t}\r\n}\r\n","<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'\nimport { faHome, faSignOutAlt } from '@fortawesome/free-solid-svg-icons'\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\nimport { MenuLink } from './../../util/interface/menu-link/menu-link.interface'\n\n@Component({\n\tselector: 'wp-menu',\n\ttemplateUrl: './menu.component.html',\n\tstyleUrls: ['./menu.component.sass']\n})\n/**\n * @author Alex Hodson\n * @description the menu component provides the functionality for interacting with the sidebar menu \n */\nexport class MenuComponent implements OnInit {\n\t/**\n\t * @description whether the home link should be displayed in the menu\n\t */\n\t@Input() showHome: boolean = true\n\t/**\n\t * @description handles the navigation to the home screen\n\t */\n\t@Output() navigateToHome: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description whether the log out link button should be displayed in the menu\n\t */\n\t@Input() showLogOut: boolean = true\n\t/**\n\t * @description handles the navigation to the log in screen\n\t */\n\t@Output() navigateToLogIn: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description the privileges associated with the logged in account\n\t */\n\t@Input() privileges: MenuLink[]\n\t/**\n\t * @description handles the navigation from the main menu links\n\t */\n\t@Output() navigateFromMenu: EventEmitter<string> = new EventEmitter<string>()\n\t/**\n\t * @description the HTML menu element\n\t */\n\t@ViewChild('menu') menu: any\n\t/**\n\t * @description the font awesome icon for the sign out button\n\t */\n\tfaSignOutAlt = faSignOutAlt\n\t/**\n\t * @description the font awesome icon for the home button\n\t */\n\tfaHome = faHome\n\t/**\n\t * @description whether the side menu is open\n\t */\n\topen = false\n\t/**\n\t * @description the status class to be applies to the menu\n\t */\n\tmenuStatus = 'isClosed'\n\t/**\n\t * @description the action links to be displayed in the side navigation menu\n\t */\n\tactionLinks: ActionLink[] = []\n\n\t/**\n\t * @author Alex Hodson\n\t * @description class constructor specifying the required services and properties for the component\n\t */\n\tconstructor() { }\n\n\t/**\n\t * @author Alex Hodson\n\t * @description the method which runs when the component is rendered. Retrieves the account privileges for the logged in user\n\t */\n\tasync ngOnInit(): Promise<void> {\n\t\tthis.handleBaseActionLinks()\n\t}\n\t/**\n\t * @author Alex Hodson\n\t * @description handles the assignment of the base action links\n\t */\n\thandleBaseActionLinks(): void {\n\t\tif (this.showHome) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'home',\n\t\t\t\t'value': 'Home',\n\t\t\t\t'icon': faHome,\n\t\t\t\t'handleClick': () => this.navigateToHome.emit()\n\t\t\t})\n\t\t}\n\n\t\tif (this.showLogOut) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'log-out',\n\t\t\t\t'value': 'Log Out',\n\t\t\t\t'icon': faSignOutAlt,\n\t\t\t\t'handleClick': () => {\n\t\t\t\t\tthis.navigateToLogIn.emit()\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @author Alex Hodson\n\t * @description opens and closes the side menu according to the current menu state\n\t */\n\ttriggerMenu(): void {\n\t\tthis.open = !this.open\n\t\tthis.menuStatus = this.open ? 'isOpen' : 'isClosed'\n\t}\n}\n","<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuComponent } from './components/menu/menu.component';\nimport { ActionLinkComponent } from './components/action-link/action-link.component'\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\nimport { MenuLinkComponent } from './components/menu-link/menu-link.component'\n\n\n@NgModule({\n declarations: [\n MenuComponent,\n\t\tActionLinkComponent,\n\t\tMenuLinkComponent\n ],\n imports: [\n CommonModule,\n\t\tFontAwesomeModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class MainMenuModule { }\n","/*\n * Public API Surface of windows-plus-utilities\n */\n\nexport * from './components/menu/menu.component';\nexport * from './main-menu.module';\n\nexport * from './util/interface/menu-link/menu-link.interface'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2.ActionLinkComponent","i3.MenuLinkComponent"],"mappings":";;;;;;;;;;AAQA;;;AAGG;MACU,mBAAmB,CAAA;AAY/B;;;AAGG;AACF,IAAA,WAAA,GAAA,GAAiB;AAClB;;;AAGG;IACF,QAAQ,GAAA;KACP;;iHAtBU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EA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;ACFH;;AAEG;;;;"}
|
|
@@ -5,6 +5,7 @@ import * as i1 from '@angular/common';
|
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
7
7
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
8
|
+
import * as i1$1 from '@angular/router';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @author Alex Hodson
|
|
@@ -34,6 +35,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
34
35
|
type: Input
|
|
35
36
|
}] } });
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @author Alex Hodson
|
|
40
|
+
* @description the menu link class provides the functionality for the side navigation links
|
|
41
|
+
*/
|
|
42
|
+
class MenuLinkComponent {
|
|
43
|
+
/**
|
|
44
|
+
* @author Alex Hodson
|
|
45
|
+
* @description class constructor specifying the required services and properties for the component
|
|
46
|
+
*/
|
|
47
|
+
constructor(router) {
|
|
48
|
+
this.router = router;
|
|
49
|
+
this.navigateFromMenu = new EventEmitter();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @author Alex Hodson
|
|
53
|
+
* @description the method which runs when the component is rendered
|
|
54
|
+
*/
|
|
55
|
+
ngOnInit() {
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @author Alex Hodson
|
|
59
|
+
* @description handles the user clicking a link in the side navigation bar.
|
|
60
|
+
*/
|
|
61
|
+
handleLinkClick() {
|
|
62
|
+
this.navigateFromMenu.emit(this.link);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
MenuLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuLinkComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
MenuLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuLinkComponent, selector: "menu-link", inputs: { label: "label", link: "link" }, outputs: { navigateFromMenu: "navigateFromMenu" }, ngImport: i0, template: "<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n", styles: ["li{padding:.75rem 0 .75rem 1rem;border-bottom:1px solid rgba(0,0,0,.14)}li:last-child{border-bottom:none}li p{margin-bottom:0}\n"] });
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuLinkComponent, decorators: [{
|
|
68
|
+
type: Component,
|
|
69
|
+
args: [{ selector: 'menu-link', template: "<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n", styles: ["li{padding:.75rem 0 .75rem 1rem;border-bottom:1px solid rgba(0,0,0,.14)}li:last-child{border-bottom:none}li p{margin-bottom:0}\n"] }]
|
|
70
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { label: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], link: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], navigateFromMenu: [{
|
|
75
|
+
type: Output
|
|
76
|
+
}] } });
|
|
77
|
+
|
|
37
78
|
/**
|
|
38
79
|
* @author Alex Hodson
|
|
39
80
|
* @description the menu component provides the functionality for interacting with the sidebar menu
|
|
@@ -60,6 +101,10 @@ class MenuComponent {
|
|
|
60
101
|
* @description handles the navigation to the log in screen
|
|
61
102
|
*/
|
|
62
103
|
this.navigateToLogIn = new EventEmitter();
|
|
104
|
+
/**
|
|
105
|
+
* @description handles the navigation from the main menu links
|
|
106
|
+
*/
|
|
107
|
+
this.navigateFromMenu = new EventEmitter();
|
|
63
108
|
/**
|
|
64
109
|
* @description the font awesome icon for the sign out button
|
|
65
110
|
*/
|
|
@@ -88,6 +133,10 @@ class MenuComponent {
|
|
|
88
133
|
async ngOnInit() {
|
|
89
134
|
this.handleBaseActionLinks();
|
|
90
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* @author Alex Hodson
|
|
138
|
+
* @description handles the assignment of the base action links
|
|
139
|
+
*/
|
|
91
140
|
handleBaseActionLinks() {
|
|
92
141
|
if (this.showHome) {
|
|
93
142
|
this.actionLinks.push({
|
|
@@ -118,10 +167,10 @@ class MenuComponent {
|
|
|
118
167
|
}
|
|
119
168
|
}
|
|
120
169
|
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
-
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuComponent, selector: "wp-menu", inputs: { showHome: "showHome", showLogOut: "showLogOut", privileges: "privileges" }, outputs: { navigateToHome: "navigateToHome", navigateToLogIn: "navigateToLogIn" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], ngImport: i0, template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t
|
|
170
|
+
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MenuComponent, selector: "wp-menu", inputs: { showHome: "showHome", showLogOut: "showLogOut", privileges: "privileges" }, outputs: { navigateToHome: "navigateToHome", navigateToLogIn: "navigateToLogIn", navigateFromMenu: "navigateFromMenu" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], ngImport: i0, template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>", styles: ["menu{padding-inline-start:0px;padding:0}.menubar{position:relative;background-color:var(--wp-primaryBlue);box-shadow:2px 5px 5px #0000001f;width:74px;height:100vh;transition:width .3s}.menubar span{display:inline-block;position:absolute;left:50%;transform:translate(-50%);font-weight:300;font-size:1em;line-height:60px}.menuWrap{display:block;position:fixed;background-color:var(--wp-primaryBlue);text-align:center;width:74px;transition:width .3s}.menubar.isOpen,.menuWrap.isOpen{width:210px}#hambmenu{position:relative;width:40px;height:45px;float:left;transition:.5s ease-in-out;cursor:pointer}#hambmenu span{position:absolute;height:5px;width:100%;vertical-align:middle;margin:20px 0 0 15px;background:white;border-radius:var(--wp-borderRadius);opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out;padding:0}#hambmenu span:nth-child(1){top:0}#hambmenu span:nth-child(4){top:20px}#hambmenu.isOpen span:nth-child(1){top:18px;width:0;left:50%;opacity:0}#hambmenu.isOpen span:nth-child(2){transform:rotate(45deg)}#hambmenu.isOpen span:nth-child(3){transform:rotate(-45deg)}#hambmenu.isOpen span:nth-child(4){top:18px;width:0%;left:50%;opacity:0}.hambclicker{content:\"\";height:35px;width:42px;position:absolute;top:8px;left:8px;cursor:pointer;z-index:9}#hambmenu span:nth-child(2),#hambmenu span:nth-child(3){top:10px}#privilege-wrap{position:absolute;width:210px;margin-top:60px;transform:translate(-100%);transition:transform .3s;overflow-y:auto;height:calc(87vh - 60px)}#privilege-wrap.isOpen{transform:none}#privilege-wrap ul,.actionMenuArea ul{width:100%;margin-top:0;padding:0;list-style-type:none;text-align:left}.actionMenuArea li p{color:#fff;margin-bottom:0}.fa{color:#000;padding-right:8px}.mainMenuArea{height:90vh}.actionMenuArea{height:10vh;color:#fff;display:flex;justify-content:center;align-items:flex-end}@media screen and (max-width: 420px){.menubar span{font-size:1.2em}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionLinkComponent, selector: "action-link", inputs: ["actionLink", "open"] }, { kind: "component", type: MenuLinkComponent, selector: "menu-link", inputs: ["label", "link"], outputs: ["navigateFromMenu"] }] });
|
|
122
171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuComponent, decorators: [{
|
|
123
172
|
type: Component,
|
|
124
|
-
args: [{ selector: 'wp-menu', template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t
|
|
173
|
+
args: [{ selector: 'wp-menu', template: "<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>", styles: ["menu{padding-inline-start:0px;padding:0}.menubar{position:relative;background-color:var(--wp-primaryBlue);box-shadow:2px 5px 5px #0000001f;width:74px;height:100vh;transition:width .3s}.menubar span{display:inline-block;position:absolute;left:50%;transform:translate(-50%);font-weight:300;font-size:1em;line-height:60px}.menuWrap{display:block;position:fixed;background-color:var(--wp-primaryBlue);text-align:center;width:74px;transition:width .3s}.menubar.isOpen,.menuWrap.isOpen{width:210px}#hambmenu{position:relative;width:40px;height:45px;float:left;transition:.5s ease-in-out;cursor:pointer}#hambmenu span{position:absolute;height:5px;width:100%;vertical-align:middle;margin:20px 0 0 15px;background:white;border-radius:var(--wp-borderRadius);opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out;padding:0}#hambmenu span:nth-child(1){top:0}#hambmenu span:nth-child(4){top:20px}#hambmenu.isOpen span:nth-child(1){top:18px;width:0;left:50%;opacity:0}#hambmenu.isOpen span:nth-child(2){transform:rotate(45deg)}#hambmenu.isOpen span:nth-child(3){transform:rotate(-45deg)}#hambmenu.isOpen span:nth-child(4){top:18px;width:0%;left:50%;opacity:0}.hambclicker{content:\"\";height:35px;width:42px;position:absolute;top:8px;left:8px;cursor:pointer;z-index:9}#hambmenu span:nth-child(2),#hambmenu span:nth-child(3){top:10px}#privilege-wrap{position:absolute;width:210px;margin-top:60px;transform:translate(-100%);transition:transform .3s;overflow-y:auto;height:calc(87vh - 60px)}#privilege-wrap.isOpen{transform:none}#privilege-wrap ul,.actionMenuArea ul{width:100%;margin-top:0;padding:0;list-style-type:none;text-align:left}.actionMenuArea li p{color:#fff;margin-bottom:0}.fa{color:#000;padding-right:8px}.mainMenuArea{height:90vh}.actionMenuArea{height:10vh;color:#fff;display:flex;justify-content:center;align-items:flex-end}@media screen and (max-width: 420px){.menubar span{font-size:1.2em}}\n"] }]
|
|
125
174
|
}], ctorParameters: function () { return []; }, propDecorators: { showHome: [{
|
|
126
175
|
type: Input
|
|
127
176
|
}], navigateToHome: [{
|
|
@@ -132,6 +181,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
132
181
|
type: Output
|
|
133
182
|
}], privileges: [{
|
|
134
183
|
type: Input
|
|
184
|
+
}], navigateFromMenu: [{
|
|
185
|
+
type: Output
|
|
135
186
|
}], menu: [{
|
|
136
187
|
type: ViewChild,
|
|
137
188
|
args: ['menu']
|
|
@@ -141,7 +192,8 @@ class MainMenuModule {
|
|
|
141
192
|
}
|
|
142
193
|
MainMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
143
194
|
MainMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, declarations: [MenuComponent,
|
|
144
|
-
ActionLinkComponent
|
|
195
|
+
ActionLinkComponent,
|
|
196
|
+
MenuLinkComponent], imports: [CommonModule,
|
|
145
197
|
FontAwesomeModule], exports: [MenuComponent] });
|
|
146
198
|
MainMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MainMenuModule, imports: [CommonModule,
|
|
147
199
|
FontAwesomeModule] });
|
|
@@ -150,7 +202,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
150
202
|
args: [{
|
|
151
203
|
declarations: [
|
|
152
204
|
MenuComponent,
|
|
153
|
-
ActionLinkComponent
|
|
205
|
+
ActionLinkComponent,
|
|
206
|
+
MenuLinkComponent
|
|
154
207
|
],
|
|
155
208
|
imports: [
|
|
156
209
|
CommonModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windows-plus-utilities-main-menu.mjs","sources":["../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.ts","../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.html","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.ts","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.html","../../../projects/windows-plus-utilities/main-menu/main-menu.module.ts","../../../projects/windows-plus-utilities/main-menu/public-api.ts","../../../projects/windows-plus-utilities/main-menu/windows-plus-utilities-main-menu.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\r\n\r\n@Component({\r\n selector: 'action-link',\r\n templateUrl: './action-link.component.html',\r\n styleUrls: ['./action-link.component.sass']\r\n})\r\n/**\r\n * @author Alex Hodson\r\n * @description the action link component provides the functionality for the action links inside the side navigation\r\n */\r\nexport class ActionLinkComponent implements OnInit {\r\n\t/**\r\n\t * @description the action link element provided by the parent which contains the action link properties\r\n\t */\r\n\t@Input()\r\n\tactionLink: ActionLink\r\n\r\n\t/**\r\n\t * @description whether the menu is open\r\n\t */\r\n\t@Input()\r\n\topen: boolean\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description class constructor which specifies the required services and properties for the component\r\n\t */\r\n constructor() { }\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description the method to be run when the component is rendered\r\n\t */\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<li \r\n\tclass=\"cursor text-left\"\r\n>\r\n\t<div \r\n\t\tid=\"{{'content-wrap-' + actionLink.id}}\"\r\n\t\tclass=\"d-flex align-items-center cursor-pointer\"\r\n\t\t[ngClass]=\"{ 'justify-content-start': open, 'justify-content-center': !open}\"\r\n\t\t(click)=\"actionLink.handleClick()\"\r\n\t>\r\n\t\t<div>\r\n\t\t\t<fa-icon [icon]=\"actionLink.icon\"></fa-icon>\r\n\t\t</div>\r\n\t\t<div id=\"{{'text-wrap-' + actionLink.id}}\" class=\"ps-2\" *ngIf=\"open\">\r\n\t\t\t{{actionLink.value}}\r\n\t\t</div>\r\n\t</div>\r\n</li>","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'\nimport { faHome, faSignOutAlt } from '@fortawesome/free-solid-svg-icons'\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\n\n@Component({\n\tselector: 'wp-menu',\n\ttemplateUrl: './menu.component.html',\n\tstyleUrls: ['./menu.component.sass']\n})\n/**\n * @author Alex Hodson\n * @description the menu component provides the functionality for interacting with the sidebar menu \n */\nexport class MenuComponent implements OnInit {\n\t/**\n\t * @description whether the home link should be displayed in the menu\n\t */\n\t@Input() showHome: boolean = true\n\t/**\n\t * @description handles the navigation to the home screen\n\t */\n\t@Output() navigateToHome: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description whether the log out link button should be displayed in the menu\n\t */\n\t@Input() showLogOut: boolean = true\n\t/**\n\t * @description handles the navigation to the log in screen\n\t */\n\t@Output() navigateToLogIn: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description the privileges associated with the logged in account\n\t */\n\t@Input() privileges: string[]\n\t/**\n\t * @description the HTML menu element\n\t */\n\t@ViewChild('menu') menu: any\n\t/**\n\t * @description the font awesome icon for the sign out button\n\t */\n\tfaSignOutAlt = faSignOutAlt\n\t/**\n\t * @description the font awesome icon for the home button\n\t */\n\tfaHome = faHome\n\t/**\n\t * @description whether the side menu is open\n\t */\n\topen = false\n\t/**\n\t * @description the status class to be applies to the menu\n\t */\n\tmenuStatus = 'isClosed'\n\t/**\n\t * @description the action links to be displayed in the side navigation menu\n\t */\n\tactionLinks: ActionLink[] = []\n\n\t/**\n\t * @author Alex Hodson\n\t * @description class constructor specifying the required services and properties for the component\n\t */\n\tconstructor() { }\n\n\t/**\n\t * @author Alex Hodson\n\t * @description the method which runs when the component is rendered. Retrieves the account privileges for the logged in user\n\t */\n\tasync ngOnInit(): Promise<void> {\n\t\tthis.handleBaseActionLinks()\n\t}\n\n\thandleBaseActionLinks(): void {\n\t\tif (this.showHome) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'home',\n\t\t\t\t'value': 'Home',\n\t\t\t\t'icon': faHome,\n\t\t\t\t'handleClick': () => this.navigateToHome.emit()\n\t\t\t})\n\t\t}\n\n\t\tif (this.showLogOut) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'log-out',\n\t\t\t\t'value': 'Log Out',\n\t\t\t\t'icon': faSignOutAlt,\n\t\t\t\t'handleClick': () => {\n\t\t\t\t\tthis.navigateToLogIn.emit()\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @author Alex Hodson\n\t * @description opens and closes the side menu according to the current menu state\n\t */\n\ttriggerMenu(): void {\n\t\tthis.open = !this.open\n\t\tthis.menuStatus = this.open ? 'isOpen' : 'isClosed'\n\t}\n}\n","<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<!-- <menu-link [area]=\"element.area\"></menu-link> -->\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuComponent } from './components/menu/menu.component';\nimport { ActionLinkComponent } from './components/action-link/action-link.component'\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\n\n\n@NgModule({\n declarations: [\n MenuComponent,\n\t\tActionLinkComponent\n ],\n imports: [\n CommonModule,\n\t\tFontAwesomeModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class MainMenuModule { }\n","/*\n * Public API Surface of windows-plus-utilities\n */\n\nexport * from './components/menu/menu.component';\nexport * from './main-menu.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.ActionLinkComponent"],"mappings":";;;;;;;;AAQA;;;AAGG;MACU,mBAAmB,CAAA;AAY/B;;;AAGG;AACF,IAAA,WAAA,GAAA,GAAiB;AAClB;;;AAGG;IACF,QAAQ,GAAA;KACP;;iHAtBU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,uGCZhC,mhBAgBK,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAA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A;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;wBACf,mBAAmB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACT,YAAY;wBACZ,iBAAiB;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"windows-plus-utilities-main-menu.mjs","sources":["../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.ts","../../../projects/windows-plus-utilities/main-menu/components/action-link/action-link.component.html","../../../projects/windows-plus-utilities/main-menu/components/menu-link/menu-link.component.ts","../../../projects/windows-plus-utilities/main-menu/components/menu-link/menu-link.component.html","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.ts","../../../projects/windows-plus-utilities/main-menu/components/menu/menu.component.html","../../../projects/windows-plus-utilities/main-menu/main-menu.module.ts","../../../projects/windows-plus-utilities/main-menu/public-api.ts","../../../projects/windows-plus-utilities/main-menu/windows-plus-utilities-main-menu.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\r\n\r\n@Component({\r\n selector: 'action-link',\r\n templateUrl: './action-link.component.html',\r\n styleUrls: ['./action-link.component.sass']\r\n})\r\n/**\r\n * @author Alex Hodson\r\n * @description the action link component provides the functionality for the action links inside the side navigation\r\n */\r\nexport class ActionLinkComponent implements OnInit {\r\n\t/**\r\n\t * @description the action link element provided by the parent which contains the action link properties\r\n\t */\r\n\t@Input()\r\n\tactionLink: ActionLink\r\n\r\n\t/**\r\n\t * @description whether the menu is open\r\n\t */\r\n\t@Input()\r\n\topen: boolean\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description class constructor which specifies the required services and properties for the component\r\n\t */\r\n constructor() { }\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description the method to be run when the component is rendered\r\n\t */\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<li \r\n\tclass=\"cursor text-left\"\r\n>\r\n\t<div \r\n\t\tid=\"{{'content-wrap-' + actionLink.id}}\"\r\n\t\tclass=\"d-flex align-items-center cursor-pointer\"\r\n\t\t[ngClass]=\"{ 'justify-content-start': open, 'justify-content-center': !open}\"\r\n\t\t(click)=\"actionLink.handleClick()\"\r\n\t>\r\n\t\t<div>\r\n\t\t\t<fa-icon [icon]=\"actionLink.icon\"></fa-icon>\r\n\t\t</div>\r\n\t\t<div id=\"{{'text-wrap-' + actionLink.id}}\" class=\"ps-2\" *ngIf=\"open\">\r\n\t\t\t{{actionLink.value}}\r\n\t\t</div>\r\n\t</div>\r\n</li>","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { Router } from '@angular/router'\r\n\r\n@Component({\r\n selector: 'menu-link',\r\n templateUrl: './menu-link.component.html',\r\n styleUrls: ['./menu-link.component.sass']\r\n})\r\n/**\r\n * @author Alex Hodson\r\n * @description the menu link class provides the functionality for the side navigation links\r\n */\r\nexport class MenuLinkComponent implements OnInit {\r\n\t/**\r\n\t * @description the string value which represents the area being display\r\n\t */\r\n\t@Input() label: string\r\n\r\n\t@Input() link: string\r\n\r\n\t@Output() navigateFromMenu: EventEmitter<string> = new EventEmitter()\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description class constructor specifying the required services and properties for the component\r\n\t */\r\n constructor(private router: Router) { }\r\n\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description the method which runs when the component is rendered\r\n\t */\r\n ngOnInit(): void {\r\n }\r\n\r\n\t/**\r\n\t * @author Alex Hodson\r\n\t * @description handles the user clicking a link in the side navigation bar.\r\n\t */\r\n\thandleLinkClick(): void {\r\n\t\tthis.navigateFromMenu.emit(this.link)\r\n\t}\r\n}\r\n","<li \r\n\tclass=\"cursor-pointer\"\r\n\t(click)=\"handleLinkClick()\"\r\n>\r\n\t<p class=\"text-white\">{{label}}</p>\r\n</li>\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'\nimport { faHome, faSignOutAlt } from '@fortawesome/free-solid-svg-icons'\nimport { ActionLink } from '../../util/interface/action-link/action-link.interface'\nimport { MenuLink } from './../../util/interface/menu-link/menu-link.interface'\n\n@Component({\n\tselector: 'wp-menu',\n\ttemplateUrl: './menu.component.html',\n\tstyleUrls: ['./menu.component.sass']\n})\n/**\n * @author Alex Hodson\n * @description the menu component provides the functionality for interacting with the sidebar menu \n */\nexport class MenuComponent implements OnInit {\n\t/**\n\t * @description whether the home link should be displayed in the menu\n\t */\n\t@Input() showHome: boolean = true\n\t/**\n\t * @description handles the navigation to the home screen\n\t */\n\t@Output() navigateToHome: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description whether the log out link button should be displayed in the menu\n\t */\n\t@Input() showLogOut: boolean = true\n\t/**\n\t * @description handles the navigation to the log in screen\n\t */\n\t@Output() navigateToLogIn: EventEmitter<void> = new EventEmitter()\n\t/**\n\t * @description the privileges associated with the logged in account\n\t */\n\t@Input() privileges: MenuLink[]\n\t/**\n\t * @description handles the navigation from the main menu links\n\t */\n\t@Output() navigateFromMenu: EventEmitter<string> = new EventEmitter<string>()\n\t/**\n\t * @description the HTML menu element\n\t */\n\t@ViewChild('menu') menu: any\n\t/**\n\t * @description the font awesome icon for the sign out button\n\t */\n\tfaSignOutAlt = faSignOutAlt\n\t/**\n\t * @description the font awesome icon for the home button\n\t */\n\tfaHome = faHome\n\t/**\n\t * @description whether the side menu is open\n\t */\n\topen = false\n\t/**\n\t * @description the status class to be applies to the menu\n\t */\n\tmenuStatus = 'isClosed'\n\t/**\n\t * @description the action links to be displayed in the side navigation menu\n\t */\n\tactionLinks: ActionLink[] = []\n\n\t/**\n\t * @author Alex Hodson\n\t * @description class constructor specifying the required services and properties for the component\n\t */\n\tconstructor() { }\n\n\t/**\n\t * @author Alex Hodson\n\t * @description the method which runs when the component is rendered. Retrieves the account privileges for the logged in user\n\t */\n\tasync ngOnInit(): Promise<void> {\n\t\tthis.handleBaseActionLinks()\n\t}\n\t/**\n\t * @author Alex Hodson\n\t * @description handles the assignment of the base action links\n\t */\n\thandleBaseActionLinks(): void {\n\t\tif (this.showHome) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'home',\n\t\t\t\t'value': 'Home',\n\t\t\t\t'icon': faHome,\n\t\t\t\t'handleClick': () => this.navigateToHome.emit()\n\t\t\t})\n\t\t}\n\n\t\tif (this.showLogOut) {\n\t\t\tthis.actionLinks.push({\n\t\t\t\t'id': 'log-out',\n\t\t\t\t'value': 'Log Out',\n\t\t\t\t'icon': faSignOutAlt,\n\t\t\t\t'handleClick': () => {\n\t\t\t\t\tthis.navigateToLogIn.emit()\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * @author Alex Hodson\n\t * @description opens and closes the side menu according to the current menu state\n\t */\n\ttriggerMenu(): void {\n\t\tthis.open = !this.open\n\t\tthis.menuStatus = this.open ? 'isOpen' : 'isClosed'\n\t}\n}\n","<div #menu id=\"menu-wrap\" class=\"menubar\" [ngClass]=\"menuStatus\">\n\t<div class=\"menuWrap\" [ngClass]=\"menuStatus\">\n\t\t<div class=\"mainMenuArea\">\n\t\t\t<!-- Menu Links Here -->\n\t\t\t<div id=\"privilege-wrap\" [ngClass]=\"menuStatus\" *ngIf=\"privileges\">\n\t\t\t\t<ul>\n\t\t\t\t\t<div *ngFor=\"let element of privileges\">\n\t\t\t\t\t\t<menu-link [label]=\"element.label\" (navigateFromMenu)=\"navigateFromMenu.emit(element.link)\"></menu-link>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div id=\"hamburger-wrap\" class=\"hambclicker\" (click)=\"triggerMenu()\"></div>\n\t\t\t<div id=\"hambmenu\" [ngClass]=\"menuStatus\">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"actionMenuArea\">\n\t\t\t<ul>\n\t\t\t\t<div *ngFor=\"let element of actionLinks\">\n\t\t\t\t\t<action-link [actionLink]=\"element\" [open]=\"open\"></action-link>\n\t\t\t\t</div>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuComponent } from './components/menu/menu.component';\nimport { ActionLinkComponent } from './components/action-link/action-link.component'\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\nimport { MenuLinkComponent } from './components/menu-link/menu-link.component'\n\n\n@NgModule({\n declarations: [\n MenuComponent,\n\t\tActionLinkComponent,\n\t\tMenuLinkComponent\n ],\n imports: [\n CommonModule,\n\t\tFontAwesomeModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class MainMenuModule { }\n","/*\n * Public API Surface of windows-plus-utilities\n */\n\nexport * from './components/menu/menu.component';\nexport * from './main-menu.module';\n\nexport * from './util/interface/menu-link/menu-link.interface'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2.ActionLinkComponent","i3.MenuLinkComponent"],"mappings":";;;;;;;;;AAQA;;;AAGG;MACU,mBAAmB,CAAA;AAY/B;;;AAGG;AACF,IAAA,WAAA,GAAA,GAAiB;AAClB;;;AAGG;IACF,QAAQ,GAAA;KACP;;iHAtBU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,uGCZhC,mhBAgBK,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA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A,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAZvB,aAAa;QACf,mBAAmB;AACnB,QAAA,iBAAiB,aAGjB,YAAY;AACZ,QAAA,iBAAiB,aAGf,aAAa,CAAA,EAAA,CAAA,CAAA;AAGJ,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAPzB,YAAY;QACZ,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAMN,cAAc,EAAA,UAAA,EAAA,CAAA;kBAd1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;wBACf,mBAAmB;wBACnB,iBAAiB;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACT,YAAY;wBACZ,iBAAiB;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { ActionLink } from '../../util/interface/action-link/action-link.interface';
|
|
3
|
+
import { MenuLink } from './../../util/interface/menu-link/menu-link.interface';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class MenuComponent implements OnInit {
|
|
5
6
|
/**
|
|
@@ -21,7 +22,11 @@ export declare class MenuComponent implements OnInit {
|
|
|
21
22
|
/**
|
|
22
23
|
* @description the privileges associated with the logged in account
|
|
23
24
|
*/
|
|
24
|
-
privileges:
|
|
25
|
+
privileges: MenuLink[];
|
|
26
|
+
/**
|
|
27
|
+
* @description handles the navigation from the main menu links
|
|
28
|
+
*/
|
|
29
|
+
navigateFromMenu: EventEmitter<string>;
|
|
25
30
|
/**
|
|
26
31
|
* @description the HTML menu element
|
|
27
32
|
*/
|
|
@@ -56,6 +61,10 @@ export declare class MenuComponent implements OnInit {
|
|
|
56
61
|
* @description the method which runs when the component is rendered. Retrieves the account privileges for the logged in user
|
|
57
62
|
*/
|
|
58
63
|
ngOnInit(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* @author Alex Hodson
|
|
66
|
+
* @description handles the assignment of the base action links
|
|
67
|
+
*/
|
|
59
68
|
handleBaseActionLinks(): void;
|
|
60
69
|
/**
|
|
61
70
|
* @author Alex Hodson
|
|
@@ -63,5 +72,5 @@ export declare class MenuComponent implements OnInit {
|
|
|
63
72
|
*/
|
|
64
73
|
triggerMenu(): void;
|
|
65
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, never>;
|
|
66
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "wp-menu", never, { "showHome": "showHome"; "showLogOut": "showLogOut"; "privileges": "privileges"; }, { "navigateToHome": "navigateToHome"; "navigateToLogIn": "navigateToLogIn"; }, never, never, false>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "wp-menu", never, { "showHome": "showHome"; "showLogOut": "showLogOut"; "privileges": "privileges"; }, { "navigateToHome": "navigateToHome"; "navigateToLogIn": "navigateToLogIn"; "navigateFromMenu": "navigateFromMenu"; }, never, never, false>;
|
|
67
76
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MenuLinkComponent implements OnInit {
|
|
5
|
+
private router;
|
|
6
|
+
/**
|
|
7
|
+
* @description the string value which represents the area being display
|
|
8
|
+
*/
|
|
9
|
+
label: string;
|
|
10
|
+
link: string;
|
|
11
|
+
navigateFromMenu: EventEmitter<string>;
|
|
12
|
+
/**
|
|
13
|
+
* @author Alex Hodson
|
|
14
|
+
* @description class constructor specifying the required services and properties for the component
|
|
15
|
+
*/
|
|
16
|
+
constructor(router: Router);
|
|
17
|
+
/**
|
|
18
|
+
* @author Alex Hodson
|
|
19
|
+
* @description the method which runs when the component is rendered
|
|
20
|
+
*/
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
/**
|
|
23
|
+
* @author Alex Hodson
|
|
24
|
+
* @description handles the user clicking a link in the side navigation bar.
|
|
25
|
+
*/
|
|
26
|
+
handleLinkClick(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuLinkComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuLinkComponent, "menu-link", never, { "label": "label"; "link": "link"; }, { "navigateFromMenu": "navigateFromMenu"; }, never, never, false>;
|
|
29
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./components/menu/menu.component";
|
|
3
3
|
import * as i2 from "./components/action-link/action-link.component";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@
|
|
4
|
+
import * as i3 from "./components/menu-link/menu-link.component";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@fortawesome/angular-fontawesome";
|
|
6
7
|
export declare class MainMenuModule {
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<MainMenuModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MainMenuModule, [typeof i1.MenuComponent, typeof i2.ActionLinkComponent], [typeof
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MainMenuModule, [typeof i1.MenuComponent, typeof i2.ActionLinkComponent, typeof i3.MenuLinkComponent], [typeof i4.CommonModule, typeof i5.FontAwesomeModule], [typeof i1.MenuComponent]>;
|
|
9
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<MainMenuModule>;
|
|
10
11
|
}
|