@propmix/profet-common-header 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,333 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable, Inject, Component, EventEmitter, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
+ import { HttpClient, HttpClientModule } from '@angular/common/http';
4
+ import { Observable } from 'rxjs';
5
+ import { Router } from '@angular/router';
6
+ import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
7
+ import { Auth } from 'aws-amplify';
8
+ import * as i2 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import * as i3 from '@angular/material/toolbar';
11
+ import { MatToolbarModule } from '@angular/material/toolbar';
12
+ import * as i4 from '@angular/material/button';
13
+ import { MatButtonModule } from '@angular/material/button';
14
+ import * as i5 from '@angular/material/menu';
15
+ import { MatMenuModule } from '@angular/material/menu';
16
+ import { MatIconModule } from '@angular/material/icon';
17
+ import { MatSidenavModule } from '@angular/material/sidenav';
18
+
19
+ class EndPoints {
20
+ }
21
+ EndPoints.API_URLS = {
22
+ getAppsApi: '/api/company/getALlApplications',
23
+ getCompanyApplications: '/api/company/getCompanyApplications',
24
+ getUserCompanies: '/api/profile/getUserCompanies',
25
+ updateUserCompany: '/api/company/updateUserCompany'
26
+ };
27
+
28
+ class ApiGatewayService {
29
+ constructor() {
30
+ this._http = inject(HttpClient);
31
+ }
32
+ doGet(url, config) {
33
+ return new Observable(observer => {
34
+ if (!config) {
35
+ config = {
36
+ isLoaderHidden: false
37
+ };
38
+ }
39
+ ;
40
+ let headers;
41
+ if (config.isUnauthorized) {
42
+ headers = {
43
+ skip: "true"
44
+ };
45
+ }
46
+ // this._loaderService.requestStarted(config);
47
+ this._http
48
+ .get(url, { headers: headers })
49
+ .subscribe({
50
+ next: (data) => {
51
+ // this._loaderService.requestEnded();
52
+ observer.next(data);
53
+ observer.complete();
54
+ },
55
+ error: (error) => {
56
+ // this.handleError(error, config, observer);
57
+ }
58
+ });
59
+ });
60
+ }
61
+ doPost(url, req_body) {
62
+ return new Observable(observer => {
63
+ let headers;
64
+ this._http
65
+ .post(url, req_body, { headers: headers })
66
+ .subscribe({
67
+ next: (data) => {
68
+ if (data && data.hasOwnProperty('status')) {
69
+ observer.next(data);
70
+ observer.complete();
71
+ }
72
+ else {
73
+ observer.next(data);
74
+ observer.complete();
75
+ }
76
+ },
77
+ error: (error) => {
78
+ // this.handleError(error, config, observer);
79
+ }
80
+ });
81
+ });
82
+ }
83
+ }
84
+ ApiGatewayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiGatewayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
85
+ ApiGatewayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiGatewayService, providedIn: 'root' });
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiGatewayService, decorators: [{
87
+ type: Injectable,
88
+ args: [{
89
+ providedIn: 'root'
90
+ }]
91
+ }] });
92
+
93
+ class HeaderConfig {
94
+ constructor() {
95
+ this.apiUrl = '';
96
+ }
97
+ }
98
+
99
+ class CommonHeaderService {
100
+ constructor(config) {
101
+ this.config = config;
102
+ this.baseUrl = '';
103
+ this._apiGatewayService = inject(ApiGatewayService);
104
+ console.log('version =>1.0.14');
105
+ this.baseUrl = this.config.apiUrl;
106
+ }
107
+ // getUserInfo() {
108
+ // let url = `${this.baseUrl}/api/users/fetchLoggedInUsers`;
109
+ // return this._http.get(url);
110
+ // }
111
+ getApps() {
112
+ let url = `${this.baseUrl + EndPoints.API_URLS.getAppsApi}`;
113
+ return this._apiGatewayService.doGet(url);
114
+ }
115
+ getCompanyApplications() {
116
+ let url = `${this.baseUrl + EndPoints.API_URLS.getCompanyApplications}`;
117
+ return this._apiGatewayService.doGet(url);
118
+ }
119
+ getUserCompanies() {
120
+ let url = `${this.baseUrl + EndPoints.API_URLS.getUserCompanies}`;
121
+ return this._apiGatewayService.doGet(url);
122
+ }
123
+ updateUserCompany(reqBody) {
124
+ let url = `${this.baseUrl + EndPoints.API_URLS.updateUserCompany}`;
125
+ return this._apiGatewayService.doPost(url, reqBody);
126
+ }
127
+ }
128
+ CommonHeaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderService, deps: [{ token: 'headerConfig' }], target: i0.ɵɵFactoryTarget.Injectable });
129
+ CommonHeaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderService, providedIn: 'root' });
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderService, decorators: [{
131
+ type: Injectable,
132
+ args: [{
133
+ providedIn: 'root'
134
+ }]
135
+ }], ctorParameters: function () {
136
+ return [{ type: HeaderConfig, decorators: [{
137
+ type: Inject,
138
+ args: ['headerConfig']
139
+ }] }];
140
+ } });
141
+
142
+ class CommonHeaderComponent {
143
+ }
144
+ CommonHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
145
+ CommonHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CommonHeaderComponent, selector: "lib-common-header", ngImport: i0, template: `
146
+ <p>
147
+ common-header works!
148
+ </p>
149
+ `, isInline: true });
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderComponent, decorators: [{
151
+ type: Component,
152
+ args: [{ selector: 'lib-common-header', template: `
153
+ <p>
154
+ common-header works!
155
+ </p>
156
+ ` }]
157
+ }] });
158
+
159
+ class HeaderComponent {
160
+ constructor(_ser) {
161
+ this._ser = _ser;
162
+ this.menuEvent = new EventEmitter();
163
+ this.appList = [];
164
+ this.showSwitchCompanies = false;
165
+ this._router = inject(Router);
166
+ this._snackbar = inject(MatSnackBar);
167
+ }
168
+ ngOnInit() {
169
+ this._ser.getApps().subscribe({
170
+ next: (v) => {
171
+ var _a;
172
+ console.log('from lib', v);
173
+ if (((_a = v === null || v === void 0 ? void 0 : v.data) === null || _a === void 0 ? void 0 : _a.applications) && v.data.applications.length > 0) {
174
+ this.fetchCompanyData(v.data.applications);
175
+ }
176
+ },
177
+ error: (e) => {
178
+ console.log('from lib errrr', e);
179
+ }
180
+ });
181
+ this.getUserCompany();
182
+ }
183
+ fetchCompanyData(allApps) {
184
+ this._ser.getCompanyApplications().subscribe({
185
+ next: (v) => {
186
+ console.log("getCompanyApplications res :", v);
187
+ if (v === null || v === void 0 ? void 0 : v.data.enabledApplications) {
188
+ this.appList = [];
189
+ let appInfo = [];
190
+ let fetchedApplications = v.data.enabledApplications.split(',');
191
+ console.log("fetchedapps", fetchedApplications);
192
+ if (fetchedApplications.length > 0) {
193
+ fetchedApplications.forEach((element) => {
194
+ appInfo = allApps.filter(ele => ele.name == element);
195
+ if (appInfo && appInfo.length > 0) {
196
+ if (appInfo[0].name != 'mca') {
197
+ this.appList.push({
198
+ name: appInfo[0].displayName,
199
+ value: element,
200
+ appUrl: appInfo[0].appUrl
201
+ });
202
+ }
203
+ }
204
+ });
205
+ console.log('apps>>', this.appList);
206
+ }
207
+ }
208
+ }
209
+ });
210
+ }
211
+ getUserCompany() {
212
+ this._ser.getUserCompanies().subscribe({
213
+ next: (userCompaniesData) => {
214
+ if (userCompaniesData && userCompaniesData.data && userCompaniesData.data.companies) {
215
+ this.userCompanies = userCompaniesData.data.companies;
216
+ if (this.userCompanies.length > 1) {
217
+ this.showSwitchCompanies = true;
218
+ }
219
+ }
220
+ },
221
+ error: (e) => {
222
+ console.log("Error in fetching companies for the user");
223
+ }
224
+ });
225
+ }
226
+ appRedirect(app) {
227
+ // if (app.name != 'Order Management') {
228
+ window.open(app.appUrl, "_self");
229
+ // }
230
+ }
231
+ profile() {
232
+ // this.fetchUserData();
233
+ this._router.navigateByUrl('/app/profile');
234
+ }
235
+ onLogoutClick() {
236
+ // this.logoutEvent.emit();
237
+ Auth.signOut({ global: true })
238
+ .then(data => console.log(data))
239
+ .catch(err => {
240
+ console.log(err);
241
+ Auth.signOut();
242
+ });
243
+ }
244
+ switchCompany(company) {
245
+ // switch the user to the selectec company
246
+ let req = { companyKey: company.companyKey };
247
+ this._ser.updateUserCompany(req).subscribe({
248
+ next: (response) => {
249
+ if (response && response.type && response.type == "OK") {
250
+ // refresh the current page to reload the contents based on the current company
251
+ window.location.reload();
252
+ }
253
+ else {
254
+ // display a message to the user that the company could not be switched.
255
+ this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 });
256
+ }
257
+ },
258
+ error: (e) => {
259
+ // display a message to the user that the company could not be switched.
260
+ this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 });
261
+ }
262
+ });
263
+ }
264
+ menuAction() {
265
+ this.menuEvent.emit();
266
+ }
267
+ }
268
+ HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeaderComponent, deps: [{ token: CommonHeaderService }], target: i0.ɵɵFactoryTarget.Component });
269
+ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HeaderComponent, selector: "lib-header", inputs: { userInfo: "userInfo" }, outputs: { menuEvent: "menuEvent" }, ngImport: i0, template: "<!-- <mat-drawer-container autosize>\n <mat-drawer #menudrawer class=\"example-sidenav\" mode=\"over\" (click)=\"sidenav.close()\">\n <div class=\"sidenavPanel\">\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <ul class=\"navbarList\">\n <li><img src=\"../../../assets/images/ordersIcon.png\">Orders</li>\n <li><img src=\"../../../assets/images/panelIcon.png\">Panels</li>\n <li><img src=\"../../../assets/images/scheduleIcon.png\">Fee Schedule</li>\n <li><img src=\"../../../assets/images/settingIcon.png\">Settings</li>\n </ul>\n <span class=\"version\">Version: &nbsp;365b520 | 0.16.0</span>\n </div>\n </mat-drawer> -->\n\n\n\n <mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <button color=\"primary\" mat-stroked-button class=\"btnCreateOrder me-2\"><img class=\"me-2\" src=\"../assets/images/file_upload_icon.svg\" width=\"20px\">Create Order</button>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"userInfo && userInfo.name\" class=\"xsHiddenUsername mb-0\">{{userInfo.name}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"userInfo && userInfo.name\" class=\"xsShowUsername\">{{userInfo.name}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n\n\n <!-- <button mat-icon-button class=\"example-icon favorite-icon\" aria-label=\"Example icon-button with heart icon\">\n <mat-icon>favorite</mat-icon>\n </button>\n <button mat-icon-button class=\"example-icon\" aria-label=\"Example icon-button with share icon\">\n <mat-icon>share</mat-icon>\n </button> -->\n </mat-toolbar>\n<!-- </mat-drawer-container> -->", styles: ["@import\"~@angular/material/prebuilt-themes/indigo-pink.css\";.profile-name{text-align:end;color:#000}.profile-name span{font-size:12px;color:#9e9e9ede}.avatarLogo{width:40px}mat-toolbar.mat-toolbar.common_header.mat-primary.mat-toolbar-single-row{position:fixed;left:0;top:0;background-color:#fff;height:48px}button.switchButton,button.menuHamberger{padding:8px!important}.sidenavPanel{padding:20px 25px;height:100vh;position:relative}ul.navbarList{padding-left:0;list-style:none;margin-top:40px}ul.navbarList li{color:#666;font-weight:400;margin-bottom:25px;width:170px;cursor:pointer}.active{color:#4177d6!important}ul.navbarList li img{width:23px;margin-right:15px}.accounts_drpmenu{margin-top:.7em}.xsShowUsername{display:none;padding:0 16px;height:48px;line-height:48px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None });
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeaderComponent, decorators: [{
271
+ type: Component,
272
+ args: [{ selector: 'lib-header', encapsulation: ViewEncapsulation.None, template: "<!-- <mat-drawer-container autosize>\n <mat-drawer #menudrawer class=\"example-sidenav\" mode=\"over\" (click)=\"sidenav.close()\">\n <div class=\"sidenavPanel\">\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <ul class=\"navbarList\">\n <li><img src=\"../../../assets/images/ordersIcon.png\">Orders</li>\n <li><img src=\"../../../assets/images/panelIcon.png\">Panels</li>\n <li><img src=\"../../../assets/images/scheduleIcon.png\">Fee Schedule</li>\n <li><img src=\"../../../assets/images/settingIcon.png\">Settings</li>\n </ul>\n <span class=\"version\">Version: &nbsp;365b520 | 0.16.0</span>\n </div>\n </mat-drawer> -->\n\n\n\n <mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <button color=\"primary\" mat-stroked-button class=\"btnCreateOrder me-2\"><img class=\"me-2\" src=\"../assets/images/file_upload_icon.svg\" width=\"20px\">Create Order</button>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"userInfo && userInfo.name\" class=\"xsHiddenUsername mb-0\">{{userInfo.name}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"userInfo && userInfo.name\" class=\"xsShowUsername\">{{userInfo.name}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n\n\n <!-- <button mat-icon-button class=\"example-icon favorite-icon\" aria-label=\"Example icon-button with heart icon\">\n <mat-icon>favorite</mat-icon>\n </button>\n <button mat-icon-button class=\"example-icon\" aria-label=\"Example icon-button with share icon\">\n <mat-icon>share</mat-icon>\n </button> -->\n </mat-toolbar>\n<!-- </mat-drawer-container> -->", styles: ["@import\"~@angular/material/prebuilt-themes/indigo-pink.css\";.profile-name{text-align:end;color:#000}.profile-name span{font-size:12px;color:#9e9e9ede}.avatarLogo{width:40px}mat-toolbar.mat-toolbar.common_header.mat-primary.mat-toolbar-single-row{position:fixed;left:0;top:0;background-color:#fff;height:48px}button.switchButton,button.menuHamberger{padding:8px!important}.sidenavPanel{padding:20px 25px;height:100vh;position:relative}ul.navbarList{padding-left:0;list-style:none;margin-top:40px}ul.navbarList li{color:#666;font-weight:400;margin-bottom:25px;width:170px;cursor:pointer}.active{color:#4177d6!important}ul.navbarList li img{width:23px;margin-right:15px}.accounts_drpmenu{margin-top:.7em}.xsShowUsername{display:none;padding:0 16px;height:48px;line-height:48px}\n"] }]
273
+ }], ctorParameters: function () { return [{ type: CommonHeaderService }]; }, propDecorators: { userInfo: [{
274
+ type: Input
275
+ }], menuEvent: [{
276
+ type: Output
277
+ }] } });
278
+
279
+ class CommonHeaderModule {
280
+ }
281
+ CommonHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
282
+ CommonHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderModule, declarations: [CommonHeaderComponent,
283
+ HeaderComponent], imports: [CommonModule,
284
+ MatToolbarModule,
285
+ MatIconModule,
286
+ HttpClientModule,
287
+ MatButtonModule,
288
+ MatSidenavModule,
289
+ MatMenuModule,
290
+ MatSnackBarModule], exports: [CommonHeaderComponent,
291
+ HeaderComponent] });
292
+ CommonHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderModule, imports: [CommonModule,
293
+ MatToolbarModule,
294
+ MatIconModule,
295
+ HttpClientModule,
296
+ MatButtonModule,
297
+ MatSidenavModule,
298
+ MatMenuModule,
299
+ MatSnackBarModule] });
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderModule, decorators: [{
301
+ type: NgModule,
302
+ args: [{
303
+ declarations: [
304
+ CommonHeaderComponent,
305
+ HeaderComponent
306
+ ],
307
+ imports: [
308
+ CommonModule,
309
+ MatToolbarModule,
310
+ MatIconModule,
311
+ HttpClientModule,
312
+ MatButtonModule,
313
+ MatSidenavModule,
314
+ MatMenuModule,
315
+ MatSnackBarModule
316
+ ],
317
+ exports: [
318
+ CommonHeaderComponent,
319
+ HeaderComponent
320
+ ]
321
+ }]
322
+ }] });
323
+
324
+ /*
325
+ * Public API Surface of common-header
326
+ */
327
+
328
+ /**
329
+ * Generated bundle index. Do not edit.
330
+ */
331
+
332
+ export { CommonHeaderComponent, CommonHeaderModule, CommonHeaderService, HeaderComponent, HeaderConfig };
333
+ //# sourceMappingURL=propmix-profet-common-header.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propmix-profet-common-header.mjs","sources":["../../../projects/common-header/src/lib/api-endpoints.def.ts","../../../projects/common-header/src/lib/api-gateway.service.ts","../../../projects/common-header/src/lib/utils/HeaderConfig.ts","../../../projects/common-header/src/lib/common-header.service.ts","../../../projects/common-header/src/lib/common-header.component.ts","../../../projects/common-header/src/lib/header/header.component.ts","../../../projects/common-header/src/lib/header/header.component.html","../../../projects/common-header/src/lib/common-header.module.ts","../../../projects/common-header/src/public-api.ts","../../../projects/common-header/src/propmix-profet-common-header.ts"],"sourcesContent":["export class EndPoints {\n public static API_URLS = {\n getAppsApi: '/api/company/getALlApplications',\n getCompanyApplications: '/api/company/getCompanyApplications',\n getUserCompanies: '/api/profile/getUserCompanies',\n updateUserCompany: '/api/company/updateUserCompany'\n }\n}","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiGatewayService {\n private _http = inject(HttpClient);\n \n doGet(url: string, config?: any): Observable<any> {\n return new Observable(observer => {\n if (!config) {\n config = {\n isLoaderHidden: false\n };\n };\n let headers:any;\n if(config.isUnauthorized){\n headers = {\n skip: \"true\"\n }\n }\n \n // this._loaderService.requestStarted(config);\n this._http\n .get(url,{headers: headers})\n .subscribe({\n next: (data) => {\n // this._loaderService.requestEnded();\n observer.next(data);\n observer.complete();\n },\n error: (error) => {\n // this.handleError(error, config, observer);\n }\n });\n })\n }\n doPost(url: string, req_body?: any): Observable<any> {\n return new Observable(observer => {\n let headers:any;\n this._http\n .post(url, req_body,{headers: headers})\n .subscribe({\n next: (data) => {\n if (data && data.hasOwnProperty('status')) {\n observer.next(data);\n observer.complete();\n } else {\n observer.next(data);\n observer.complete();\n }\n },\n error: (error:any) => {\n // this.handleError(error, config, observer);\n }\n })\n });\n }\n}\n","export class HeaderConfig {\n apiUrl: string = '';\n}","import { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable, inject } from '@angular/core';\nimport { HeaderConfig } from './utils/HeaderConfig';\nimport { EndPoints } from './api-endpoints.def';\nimport { ApiGatewayService } from './api-gateway.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CommonHeaderService {\n private baseUrl: string = '';\n private _apiGatewayService = inject(ApiGatewayService);\n constructor(@Inject('headerConfig') private config: HeaderConfig) { \n console.log('version =>1.0.14')\n this.baseUrl = this.config.apiUrl;\n }\n\n // getUserInfo() {\n // let url = `${this.baseUrl}/api/users/fetchLoggedInUsers`;\n // return this._http.get(url);\n // }\n\n getApps() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getAppsApi}`;\n return this._apiGatewayService.doGet(url);\n }\n getCompanyApplications() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getCompanyApplications}`;\n return this._apiGatewayService.doGet(url);\n }\n getUserCompanies() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getUserCompanies}`;\n return this._apiGatewayService.doGet(url);\n }\n updateUserCompany(reqBody: any) {\n let url = `${this.baseUrl + EndPoints.API_URLS.updateUserCompany}`;\n return this._apiGatewayService.doPost(url, reqBody);\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-common-header',\n template: `\n <p>\n common-header works!\n </p>\n `,\n styles: [\n ]\n})\nexport class CommonHeaderComponent {\n\n}\n","import { Component, OnInit, inject, ViewChild, ViewEncapsulation, Input, Output, EventEmitter } from '@angular/core';\nimport { CommonHeaderService } from '../common-header.service';\nimport { MatSidenav } from '@angular/material/sidenav';\nimport { Router } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { UserDetails } from '../utils/UserDetails';\nimport { Auth } from 'aws-amplify';\n\n@Component({\n selector: 'lib-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class HeaderComponent implements OnInit{\n \n // @ViewChild('menudrawer')\n @Input() userInfo!: UserDetails;\n\n @Output() menuEvent = new EventEmitter<any>();\n sidenav!: MatSidenav;\n appList: Array<any> = [];\n userCompanies: any;\n showSwitchCompanies: boolean = false;\n private _router = inject(Router);\n private _snackbar = inject(MatSnackBar);\n\n constructor(private _ser: CommonHeaderService){}\n\n ngOnInit(): void {\n this._ser.getApps().subscribe({\n next: (v) => {\n console.log('from lib',v);\n if(v?.data?.applications && v.data.applications.length > 0){\n this.fetchCompanyData(v.data.applications);\n }\n },\n error: (e) => {\n console.log('from lib errrr',e)\n }\n });\n this.getUserCompany();\n }\n\n fetchCompanyData(allApps:Array<any>) {\n this._ser.getCompanyApplications().subscribe({\n next: (v) => {\n console.log(\"getCompanyApplications res :\", v);\n if (v?.data.enabledApplications) {\n this.appList = [];\n let appInfo = [];\n let fetchedApplications = v.data.enabledApplications.split(',');\n console.log(\"fetchedapps\", fetchedApplications);\n\n if (fetchedApplications.length > 0) {\n fetchedApplications.forEach((element:any) => {\n appInfo = allApps.filter(ele => ele.name == element);\n if (appInfo && appInfo.length > 0) {\n if(appInfo[0].name != 'mca'){\n this.appList.push({\n name: appInfo[0].displayName,\n value: element,\n appUrl: appInfo[0].appUrl\n });\n }\n }\n });\n console.log('apps>>',this.appList)\n }\n }\n\n }\n })\n }\n\n getUserCompany(){\n this._ser.getUserCompanies().subscribe({\n next: (userCompaniesData: any) => {\n if (userCompaniesData && userCompaniesData.data && userCompaniesData.data.companies) {\n this.userCompanies = userCompaniesData.data.companies;\n if (this.userCompanies.length > 1) {\n this.showSwitchCompanies = true;\n }\n }\n },\n error: (e) => {\n console.log(\"Error in fetching companies for the user\");\n }\n })\n }\n\n appRedirect(app:any) {\n // if (app.name != 'Order Management') {\n window.open(app.appUrl, \"_self\");\n // }\n }\n profile() {\n // this.fetchUserData();\n this._router.navigateByUrl('/app/profile');\n }\n onLogoutClick() {\n // this.logoutEvent.emit();\n Auth.signOut({ global: true })\n .then(data => console.log(data))\n .catch(err => {\n console.log(err)\n Auth.signOut();\n });\n }\n switchCompany(company: any) {\n // switch the user to the selectec company\n let req = { companyKey: company.companyKey };\n this._ser.updateUserCompany(req).subscribe({\n next: (response: any) => {\n if (response && response.type && response.type == \"OK\") {\n // refresh the current page to reload the contents based on the current company\n window.location.reload();\n }\n else {\n // display a message to the user that the company could not be switched.\n this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 })\n }\n },\n error: (e) => {\n // display a message to the user that the company could not be switched.\n this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 })\n }\n })\n }\n menuAction(){\n this.menuEvent.emit();\n }\n}\n","<!-- <mat-drawer-container autosize>\n <mat-drawer #menudrawer class=\"example-sidenav\" mode=\"over\" (click)=\"sidenav.close()\">\n <div class=\"sidenavPanel\">\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <ul class=\"navbarList\">\n <li><img src=\"../../../assets/images/ordersIcon.png\">Orders</li>\n <li><img src=\"../../../assets/images/panelIcon.png\">Panels</li>\n <li><img src=\"../../../assets/images/scheduleIcon.png\">Fee Schedule</li>\n <li><img src=\"../../../assets/images/settingIcon.png\">Settings</li>\n </ul>\n <span class=\"version\">Version: &nbsp;365b520 | 0.16.0</span>\n </div>\n </mat-drawer> -->\n\n\n\n <mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <button color=\"primary\" mat-stroked-button class=\"btnCreateOrder me-2\"><img class=\"me-2\" src=\"../assets/images/file_upload_icon.svg\" width=\"20px\">Create Order</button>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"userInfo && userInfo.name\" class=\"xsHiddenUsername mb-0\">{{userInfo.name}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"userInfo && userInfo.name\" class=\"xsShowUsername\">{{userInfo.name}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n\n\n <!-- <button mat-icon-button class=\"example-icon favorite-icon\" aria-label=\"Example icon-button with heart icon\">\n <mat-icon>favorite</mat-icon>\n </button>\n <button mat-icon-button class=\"example-icon\" aria-label=\"Example icon-button with share icon\">\n <mat-icon>share</mat-icon>\n </button> -->\n </mat-toolbar>\n<!-- </mat-drawer-container> -->","import { NgModule } from '@angular/core';\nimport { CommonHeaderComponent } from './common-header.component';\nimport { HeaderComponent } from './header/header.component';\nimport {MatToolbarModule} from '@angular/material/toolbar';\nimport {MatIconModule} from '@angular/material/icon'\nimport { HttpClientModule } from '@angular/common/http';\nimport {MatButtonModule} from '@angular/material/button'\nimport {MatSidenavModule} from '@angular/material/sidenav';\nimport {MatMenuModule} from '@angular/material/menu';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\n\n@NgModule({\n declarations: [\n CommonHeaderComponent,\n HeaderComponent\n ],\n imports: [\n CommonModule,\n MatToolbarModule,\n MatIconModule,\n HttpClientModule,\n MatButtonModule,\n MatSidenavModule,\n MatMenuModule,\n MatSnackBarModule\n ],\n exports: [\n CommonHeaderComponent,\n HeaderComponent\n ]\n})\nexport class CommonHeaderModule { }\n","/*\n * Public API Surface of common-header\n */\n\nexport * from './lib/common-header.service';\nexport * from './lib/common-header.component';\nexport * from './lib/common-header.module';\nexport * from './lib/header/header.component';\nexport * from './lib/utils/HeaderConfig';\nexport * from './lib/utils/User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