ichec-angular-core 0.0.1

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,704 @@
1
+ import * as i1 from '@angular/common/http';
2
+ import { HttpHeaders, HttpClient } from '@angular/common/http';
3
+ import { map, catchError, mergeMap, throwError, BehaviorSubject, mergeAll, tap } from 'rxjs';
4
+ import * as i0 from '@angular/core';
5
+ import { Inject, Injectable, Input, Component } from '@angular/core';
6
+ import * as i2$1 from '@angular/common';
7
+ import { NgIf } from '@angular/common';
8
+ import * as i1$1 from '@angular/router';
9
+ import { RouterModule, RouterOutlet } from '@angular/router';
10
+ import * as i4 from '@angular/material/toolbar';
11
+ import { MatToolbarModule } from '@angular/material/toolbar';
12
+ import * as i5 from '@angular/material/icon';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import * as i5$1 from '@angular/material/button';
15
+ import { MatButtonModule } from '@angular/material/button';
16
+ import * as i7 from '@angular/material/menu';
17
+ import { MatMenuModule } from '@angular/material/menu';
18
+ import * as i2 from '@angular/material/sidenav';
19
+ import { MatSidenavModule } from '@angular/material/sidenav';
20
+ import * as i3 from '@angular/material/list';
21
+ import { MatListModule } from '@angular/material/list';
22
+ import * as i3$1 from '@angular/forms';
23
+ import { FormsModule } from '@angular/forms';
24
+ import * as i6 from '@angular/material/input';
25
+ import { MatInputModule } from '@angular/material/input';
26
+ import * as i5$3 from '@angular/material/form-field';
27
+ import { MatFormFieldModule } from '@angular/material/form-field';
28
+ import * as i5$2 from '@angular/material/card';
29
+ import { MatCardModule } from '@angular/material/card';
30
+ import * as i5$4 from '@angular/material/table';
31
+ import { MatTableModule } from '@angular/material/table';
32
+
33
+ var ErrorCode;
34
+ (function (ErrorCode) {
35
+ ErrorCode[ErrorCode["UnknownError"] = 1] = "UnknownError";
36
+ })(ErrorCode || (ErrorCode = {}));
37
+ class ApiError {
38
+ code = 1;
39
+ text = "";
40
+ }
41
+ class RestService {
42
+ _url;
43
+ _endpoint_url;
44
+ _http;
45
+ constructor(_url, _endpoint_url, _http) {
46
+ this._url = _url;
47
+ this._endpoint_url = _endpoint_url;
48
+ this._http = _http;
49
+ }
50
+ deleteItem(id) {
51
+ return this._http.delete(this.getBaseUrl() + id + "/", { headers: this.getHeaders() }).pipe(map(_response => { return void (0); }), catchError(this.handleError));
52
+ }
53
+ getForUser(user) {
54
+ return this.get("?user=" + user.id);
55
+ }
56
+ get(query = "") {
57
+ return this._http.get(this.getBaseUrl() + query, { headers: this.getHeaders() }).pipe(catchError(this.handleError));
58
+ }
59
+ getItem(id) {
60
+ return this._http.get(this.getBaseUrl() + id, { headers: this.getHeaders() }).pipe(catchError(this.handleError));
61
+ }
62
+ getUrl(url) {
63
+ return this._http.get(url, { headers: this.getHeaders() }).pipe(catchError(this.handleError));
64
+ }
65
+ putItem(item, content_type = "application/json") {
66
+ return this._http.put(this.getBaseUrl() + item.id + "/", item, { headers: this.getHeaders(content_type) }).pipe(catchError(this.handleError));
67
+ }
68
+ patchItemMedia(id, form) {
69
+ const token = "Token " + localStorage.getItem("api_token");
70
+ const headers = new HttpHeaders({
71
+ 'Authorization': token,
72
+ 'Accept': 'application/json'
73
+ });
74
+ return this._http.patch(this.getMediaUrl() + id + "/", form, { headers: headers }).pipe(mergeMap(_ => this.getItem(id)), catchError(this.handleError));
75
+ }
76
+ patchItem(item, include_keys, exclude_keys) {
77
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
78
+ function replacer(key, value) {
79
+ if (exclude_keys.includes(key)) {
80
+ return undefined;
81
+ }
82
+ else {
83
+ return value;
84
+ }
85
+ }
86
+ return this._http.patch(this.getBaseUrl() + item.id + "/", JSON.stringify(item, replacer), { headers: this.getHeaders() }).pipe(map(response => response), catchError(this.handleError));
87
+ }
88
+ postItem(item) {
89
+ return this._http.post(this.getBaseUrl(), item, { headers: this.getHeaders() }).pipe(catchError(this.handleError));
90
+ }
91
+ getHeaders(content_type = "application/json") {
92
+ const token = "Token " + localStorage.getItem("api_token");
93
+ return new HttpHeaders({
94
+ 'Authorization': token,
95
+ 'Content-Type': content_type,
96
+ 'Accept': 'application/json'
97
+ });
98
+ }
99
+ getBaseUrl() {
100
+ return this._endpoint_url + "/api/" + this._url + "/";
101
+ }
102
+ getMediaUrl() {
103
+ return this._endpoint_url + "/api/" + this._url.slice(0, -1) + "_media/";
104
+ }
105
+ handleError(error) {
106
+ if (error.status === 0) {
107
+ // A client-side or network error occurred. Handle it accordingly.
108
+ console.error('Client side or network error:', error.error);
109
+ }
110
+ else {
111
+ console.error(`Backend returned code ${error.status}, body was: `, error.error);
112
+ }
113
+ // Return an observable with a user-facing error message.
114
+ return throwError(() => error);
115
+ }
116
+ }
117
+
118
+ class UserService extends RestService {
119
+ /** Service to handle IPortalMember via REST and also handle logins.
120
+ */
121
+ loggedInUser = new BehaviorSubject(null);
122
+ constructor(_http, _endpoint_url) {
123
+ super('members', _endpoint_url, _http);
124
+ }
125
+ login(username, password) {
126
+ console.log("Attempting login");
127
+ const body = new URLSearchParams();
128
+ body.set('username', username);
129
+ body.set('password', password);
130
+ const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' });
131
+ const api_auth_endpoint = this._endpoint_url + "/api-token-auth/";
132
+ return this._http.post(api_auth_endpoint, body.toString(), { headers: headers }).pipe(map(token => this.onLoginToken(token)), mergeAll(), catchError(this.handleError));
133
+ }
134
+ logout() {
135
+ if (this.loggedInUser === null) {
136
+ return;
137
+ }
138
+ console.log("Logging out");
139
+ localStorage.removeItem("api_token");
140
+ this.loggedInUser.next(null);
141
+ }
142
+ onLoginToken(token_response) {
143
+ console.log("Got login token - fetching corresponding user.");
144
+ localStorage.setItem("api_token", token_response.token);
145
+ return this.getItem(Number(token_response.user_id)).pipe(tap(user => this.onLoggedIn(user)), map(_response => { return void (0); }), catchError(this.handleError));
146
+ }
147
+ onLoggedIn(user) {
148
+ console.log("Log in succesful for user: " + user.username);
149
+ this.loggedInUser.next(user);
150
+ }
151
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserService, deps: [{ token: i1.HttpClient }, { token: String }], target: i0.ɵɵFactoryTarget.Injectable });
152
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserService, providedIn: 'root' });
153
+ }
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserService, decorators: [{
155
+ type: Injectable,
156
+ args: [{
157
+ providedIn: 'root',
158
+ }]
159
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
160
+ type: Inject,
161
+ args: [String]
162
+ }] }] });
163
+
164
+ class GroupService extends RestService {
165
+ userService;
166
+ userItems = new BehaviorSubject([]);
167
+ constructor(userService, http, endpoint_url) {
168
+ super("groups", endpoint_url, http);
169
+ this.userService = userService;
170
+ this.userService.loggedInUser.subscribe(user => this.refreshUserItems(user));
171
+ }
172
+ refreshUserItems(user) {
173
+ if (user) {
174
+ this.getForUser(user).subscribe(items => this.userItems.next(items));
175
+ }
176
+ else {
177
+ this.userItems.next([]);
178
+ }
179
+ }
180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupService, deps: [{ token: UserService }, { token: i1.HttpClient }, { token: String }], target: i0.ɵɵFactoryTarget.Injectable });
181
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupService, providedIn: 'root' });
182
+ }
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupService, decorators: [{
184
+ type: Injectable,
185
+ args: [{
186
+ providedIn: 'root'
187
+ }]
188
+ }], ctorParameters: () => [{ type: UserService }, { type: i1.HttpClient }, { type: undefined, decorators: [{
189
+ type: Inject,
190
+ args: [String]
191
+ }] }] });
192
+
193
+ class PortalMember {
194
+ id = 0;
195
+ url = "";
196
+ username = "";
197
+ email = "";
198
+ first_name = "";
199
+ last_name = "";
200
+ phone = "";
201
+ organization = "";
202
+ }
203
+ class Group {
204
+ name = "";
205
+ url = "";
206
+ id = 0;
207
+ }
208
+ class Organization {
209
+ id = 0;
210
+ url = "";
211
+ name = "";
212
+ acronym = "";
213
+ description = "";
214
+ address = "";
215
+ website = "";
216
+ country = "";
217
+ members = [];
218
+ }
219
+
220
+ class OrganizationService extends RestService {
221
+ constructor(http, endpoint_url) {
222
+ super("organizations", endpoint_url, http);
223
+ }
224
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationService, deps: [{ token: i1.HttpClient }, { token: String }], target: i0.ɵɵFactoryTarget.Injectable });
225
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationService, providedIn: 'root' });
226
+ }
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationService, decorators: [{
228
+ type: Injectable,
229
+ args: [{
230
+ providedIn: 'root'
231
+ }]
232
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
233
+ type: Inject,
234
+ args: [String]
235
+ }] }] });
236
+
237
+ class LeftNavService {
238
+ userService;
239
+ groupService;
240
+ groups = [];
241
+ options = [];
242
+ constructor(userService, groupService) {
243
+ this.userService = userService;
244
+ this.groupService = groupService;
245
+ this.groupService.userItems.subscribe(groups => this.onGroupsUpdated(groups));
246
+ }
247
+ onGroupsUpdated(groups) {
248
+ this.groups = groups;
249
+ this.updateOptions();
250
+ }
251
+ isConsortiumAdmin() {
252
+ return this.groups.some(g => g.name == "ConsortiumAdmins");
253
+ }
254
+ updateOptions() {
255
+ if (this.isConsortiumAdmin()) {
256
+ this.options = [
257
+ { name: "Home", route: "home" },
258
+ { name: "Facilities", route: "facilities" },
259
+ { name: "Access Calls", route: "access_calls" },
260
+ { name: "Users", route: "users" },
261
+ ];
262
+ }
263
+ else {
264
+ this.options = [];
265
+ }
266
+ }
267
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LeftNavService, deps: [{ token: UserService }, { token: GroupService }], target: i0.ɵɵFactoryTarget.Injectable });
268
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LeftNavService, providedIn: 'root' });
269
+ }
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LeftNavService, decorators: [{
271
+ type: Injectable,
272
+ args: [{
273
+ providedIn: 'root'
274
+ }]
275
+ }], ctorParameters: () => [{ type: UserService }, { type: GroupService }] });
276
+
277
+ class TopBarComponent {
278
+ userService;
279
+ leftNavService;
280
+ user = null;
281
+ title = "";
282
+ constructor(userService, leftNavService) {
283
+ this.userService = userService;
284
+ this.leftNavService = leftNavService;
285
+ }
286
+ ngOnInit() {
287
+ this.userService.loggedInUser.subscribe(user => {
288
+ this.user = user;
289
+ });
290
+ }
291
+ onLogout() {
292
+ this.userService.logout();
293
+ }
294
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TopBarComponent, deps: [{ token: UserService }, { token: LeftNavService }], target: i0.ɵɵFactoryTarget.Component });
295
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TopBarComponent, isStandalone: true, selector: "app-top-bar", inputs: { title: "title" }, ngImport: i0, template: "\n <mat-toolbar *ngIf=\"user\" style=\"height:60px\">\n <a mat-icon-button class=\"example-icon\" [routerLink]=\"['home']\">\n <mat-icon>home</mat-icon>\n </a>\n <span>{{title}}</span>\n <span class=\"topbar-spacer\"></span>\n <span>{{user.username}}</span>\n <button mat-icon-button class=\"example-icon\" aria-label=\"User profile\" [matMenuTriggerFor]=\"profile_menu\">\n <mat-icon>person</mat-icon>\n </button>\n <mat-menu #profile_menu=\"matMenu\">\n <button mat-menu-item (click)=\"onLogout()\"> Log Out</button>\n </mat-menu>\n </mat-toolbar>\n", styles: [".topbar-spacer{flex:1 1 auto}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i7.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i7.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i7.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
296
+ }
297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TopBarComponent, decorators: [{
298
+ type: Component,
299
+ args: [{ selector: 'app-top-bar', imports: [NgIf, RouterModule, MatToolbarModule, MatIconModule, MatButtonModule, MatMenuModule], template: "\n <mat-toolbar *ngIf=\"user\" style=\"height:60px\">\n <a mat-icon-button class=\"example-icon\" [routerLink]=\"['home']\">\n <mat-icon>home</mat-icon>\n </a>\n <span>{{title}}</span>\n <span class=\"topbar-spacer\"></span>\n <span>{{user.username}}</span>\n <button mat-icon-button class=\"example-icon\" aria-label=\"User profile\" [matMenuTriggerFor]=\"profile_menu\">\n <mat-icon>person</mat-icon>\n </button>\n <mat-menu #profile_menu=\"matMenu\">\n <button mat-menu-item (click)=\"onLogout()\"> Log Out</button>\n </mat-menu>\n </mat-toolbar>\n", styles: [".topbar-spacer{flex:1 1 auto}\n"] }]
300
+ }], ctorParameters: () => [{ type: UserService }, { type: LeftNavService }], propDecorators: { title: [{
301
+ type: Input
302
+ }] } });
303
+
304
+ class LeftNavComponent {
305
+ leftNavService;
306
+ constructor(leftNavService) {
307
+ this.leftNavService = leftNavService;
308
+ }
309
+ getOptions() {
310
+ return this.leftNavService.options;
311
+ }
312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LeftNavComponent, deps: [{ token: LeftNavService }], target: i0.ɵɵFactoryTarget.Component });
313
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: LeftNavComponent, isStandalone: true, selector: "app-left-nav", ngImport: i0, template: "<mat-sidenav-container class=\"leftnav-container\">\n <mat-sidenav\n mode=\"side\"\n opened\n style=\"padding: 5px; width: 160px\">\n <mat-nav-list>\n @for (option of getOptions(); track option) {\n <a mat-list-item [routerLink]=\"option.route\" [routerLinkActive]=\"['is-active']\">{{ option.name }}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n <mat-sidenav-content style=\"display:flex; flex-grow: 1; height:90vh\"> \n <router-outlet/>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}.leftnav-container{flex-grow:1;display:flex}.is-active{background-color:#d3d3d3}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i2.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i2.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i2.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
314
+ }
315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LeftNavComponent, decorators: [{
316
+ type: Component,
317
+ args: [{ selector: 'app-left-nav', imports: [MatSidenavModule, MatListModule, RouterOutlet, RouterModule,], template: "<mat-sidenav-container class=\"leftnav-container\">\n <mat-sidenav\n mode=\"side\"\n opened\n style=\"padding: 5px; width: 160px\">\n <mat-nav-list>\n @for (option of getOptions(); track option) {\n <a mat-list-item [routerLink]=\"option.route\" [routerLinkActive]=\"['is-active']\">{{ option.name }}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n <mat-sidenav-content style=\"display:flex; flex-grow: 1; height:90vh\"> \n <router-outlet/>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}.leftnav-container{flex-grow:1;display:flex}.is-active{background-color:#d3d3d3}\n"] }]
318
+ }], ctorParameters: () => [{ type: LeftNavService }] });
319
+
320
+ class LandingComponent {
321
+ userService;
322
+ router;
323
+ loginUser = {
324
+ //password: environment.default_password,
325
+ //name: environment.default_username
326
+ password: "marinerg99",
327
+ name: "regular_user"
328
+ };
329
+ loginError = "";
330
+ constructor(userService, router) {
331
+ this.userService = userService;
332
+ this.router = router;
333
+ }
334
+ ngOnInit() {
335
+ // This is a development version hack to 'autologin' to make it
336
+ // easier to play around. The name will be empty at init time
337
+ // for the production version.
338
+ if (this.loginUser.name) {
339
+ this.login();
340
+ }
341
+ }
342
+ login() {
343
+ this.loginError = "";
344
+ return this.userService.login(this.loginUser.name, this.loginUser.password).subscribe({
345
+ next: () => this.onLoggedIn(),
346
+ error: (error) => this.onLoginError(error)
347
+ });
348
+ }
349
+ onLoginError(error) {
350
+ console.log("Got login error");
351
+ console.log(error);
352
+ this.loginError = "There was an error logging in";
353
+ }
354
+ onLoggedIn() {
355
+ this.router.navigateByUrl("/home");
356
+ }
357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LandingComponent, deps: [{ token: UserService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
358
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: LandingComponent, isStandalone: true, selector: "app-landing", ngImport: i0, template: "\n <p>Welcome to the Marinerg test facility access portal</p>\n \n <mat-card style=\"text-align:center;\">\n <form class=\"base-form\" #loginForm=\"ngForm\" (ngSubmit)=\"login()\">\n <mat-card-content>\n <mat-form-field class=\"form-field\">\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n [(ngModel)]=\"loginUser.name\"\n name=\"username\"\n required>\n </mat-form-field>\n <mat-form-field class=\"form-field\">\n <input matInput\n placeholder=\"Password\"\n type=\"password\"\n [(ngModel)]=\"loginUser.password\"\n name=\"password\"\n required>\n </mat-form-field>\n </mat-card-content>\n <div *ngIf=\"loginError\" class=\"error\">\n <mat-icon>error</mat-icon><p>{{loginError}}</p>\n </div>\n <button mat-flat-button\n type=\"submit\"\n [disabled]=\"!loginForm.form.valid\">Log In</button>\n </form>\n </mat-card>\n\n\n \n", styles: [":host{display:flex;align-items:center;flex-grow:1;background-color:#a5b3c9;flex-direction:column}.base-form{padding:10px}.form-field{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i5$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
359
+ }
360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LandingComponent, decorators: [{
361
+ type: Component,
362
+ args: [{ selector: 'app-landing', imports: [FormsModule, MatCardModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule, NgIf], template: "\n <p>Welcome to the Marinerg test facility access portal</p>\n \n <mat-card style=\"text-align:center;\">\n <form class=\"base-form\" #loginForm=\"ngForm\" (ngSubmit)=\"login()\">\n <mat-card-content>\n <mat-form-field class=\"form-field\">\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n [(ngModel)]=\"loginUser.name\"\n name=\"username\"\n required>\n </mat-form-field>\n <mat-form-field class=\"form-field\">\n <input matInput\n placeholder=\"Password\"\n type=\"password\"\n [(ngModel)]=\"loginUser.password\"\n name=\"password\"\n required>\n </mat-form-field>\n </mat-card-content>\n <div *ngIf=\"loginError\" class=\"error\">\n <mat-icon>error</mat-icon><p>{{loginError}}</p>\n </div>\n <button mat-flat-button\n type=\"submit\"\n [disabled]=\"!loginForm.form.valid\">Log In</button>\n </form>\n </mat-card>\n\n\n \n", styles: [":host{display:flex;align-items:center;flex-grow:1;background-color:#a5b3c9;flex-direction:column}.base-form{padding:10px}.form-field{display:flex}\n"] }]
363
+ }], ctorParameters: () => [{ type: UserService }, { type: i1$1.Router }] });
364
+
365
+ class DetailViewComponent {
366
+ _route;
367
+ _location;
368
+ _userService;
369
+ _restService;
370
+ item;
371
+ constructor(_route, _location, _userService, _restService) {
372
+ this._route = _route;
373
+ this._location = _location;
374
+ this._userService = _userService;
375
+ this._restService = _restService;
376
+ }
377
+ ngOnInit() {
378
+ this.getItem();
379
+ }
380
+ onItemAvailable() {
381
+ this._userService.loggedInUser.subscribe(user => { if (user) {
382
+ this.onItemAndUserAvailable(user);
383
+ } });
384
+ }
385
+ onItemAndUserAvailable(_) {
386
+ }
387
+ goBack() {
388
+ this._location.back();
389
+ }
390
+ getItem() {
391
+ const id = Number(this._route.snapshot.paramMap.get('id'));
392
+ this._restService.getItem(id)
393
+ .subscribe(item => {
394
+ this.item = item;
395
+ this.onItemAvailable();
396
+ });
397
+ }
398
+ update() {
399
+ if (!this.item) {
400
+ return;
401
+ }
402
+ this._restService.putItem(this.item).subscribe(item => this.item = item);
403
+ }
404
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DetailViewComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: RestService }], target: i0.ɵɵFactoryTarget.Component });
405
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DetailViewComponent, isStandalone: true, selector: "app-detail-view", ngImport: i0, template: "", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"] });
406
+ }
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DetailViewComponent, decorators: [{
408
+ type: Component,
409
+ args: [{ selector: 'app-detail-view', imports: [], template: "", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"] }]
410
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: RestService }] });
411
+
412
+ class EditViewComponent {
413
+ _route;
414
+ _location;
415
+ _userService;
416
+ _restService;
417
+ item;
418
+ createMode = false;
419
+ constructor(_route, _location, _userService, _restService) {
420
+ this._route = _route;
421
+ this._location = _location;
422
+ this._userService = _userService;
423
+ this._restService = _restService;
424
+ }
425
+ ngOnInit() {
426
+ this.getItem();
427
+ }
428
+ onItemAvailable() {
429
+ this._userService.loggedInUser.subscribe(user => { if (user) {
430
+ this.onItemAndUserAvailable(user);
431
+ } });
432
+ }
433
+ onItemAndUserAvailable(_) {
434
+ }
435
+ goBack() {
436
+ this._location.back();
437
+ }
438
+ save() {
439
+ if (this.createMode) {
440
+ this.createItem();
441
+ }
442
+ else {
443
+ this.updateItem();
444
+ }
445
+ }
446
+ updateItem() {
447
+ if (!this.item) {
448
+ return;
449
+ }
450
+ this._restService.putItem(this.item).subscribe(item => this.onItemUpdated(item));
451
+ }
452
+ createItem() {
453
+ if (!this.item) {
454
+ return;
455
+ }
456
+ this._restService.postItem(this.item).subscribe(item => this.onItemUpdated(item));
457
+ }
458
+ cancel() {
459
+ this.goBack();
460
+ }
461
+ isCreateRoute() {
462
+ const urls = this._route.snapshot.url;
463
+ if (urls.length >= 2) {
464
+ if (urls[1].path == "create") {
465
+ return true;
466
+ }
467
+ }
468
+ return false;
469
+ }
470
+ getItem() {
471
+ if (this.isCreateRoute()) {
472
+ this.item = this.getTemplateItem();
473
+ this.createMode = true;
474
+ this.onItemAvailable();
475
+ }
476
+ else {
477
+ const id_str = this._route.snapshot.paramMap.get('id');
478
+ this._restService.getItem(Number(id_str))
479
+ .subscribe(item => {
480
+ this.item = item;
481
+ this.onItemAvailable();
482
+ });
483
+ }
484
+ }
485
+ onItemUpdated(item) {
486
+ this.item = item;
487
+ this.goBack();
488
+ }
489
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditViewComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: RestService }], target: i0.ɵɵFactoryTarget.Component });
490
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: EditViewComponent, isStandalone: true, selector: "app-edit-view", ngImport: i0, template: "", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"] });
491
+ }
492
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditViewComponent, decorators: [{
493
+ type: Component,
494
+ args: [{ selector: 'app-edit-view', imports: [], template: "", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"] }]
495
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: RestService }] });
496
+
497
+ class ListViewComponent {
498
+ _route;
499
+ _location;
500
+ _userService;
501
+ _restService;
502
+ user;
503
+ items = [];
504
+ displayedColumns = [];
505
+ constructor(_route, _location, _userService, _restService) {
506
+ this._route = _route;
507
+ this._location = _location;
508
+ this._userService = _userService;
509
+ this._restService = _restService;
510
+ }
511
+ ngOnInit() {
512
+ this.getItems();
513
+ }
514
+ getItems() {
515
+ if (this.isSelfList()) {
516
+ this._userService.loggedInUser.subscribe(user => {
517
+ if (user) {
518
+ this.onUserChange(user);
519
+ }
520
+ });
521
+ }
522
+ else {
523
+ this._restService.get().subscribe(items => this.items = items);
524
+ }
525
+ }
526
+ onUserChange(user) {
527
+ this.user = user;
528
+ this._restService.getForUser(this.user).subscribe(items => this.items = items);
529
+ }
530
+ isSelfList() {
531
+ const url_segments = this._route.snapshot.url;
532
+ if (url_segments.length == 2) {
533
+ if (url_segments[1].path == "self") {
534
+ return true;
535
+ }
536
+ }
537
+ return false;
538
+ }
539
+ goBack() {
540
+ this._location.back();
541
+ }
542
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListViewComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: RestService }], target: i0.ɵɵFactoryTarget.Component });
543
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ListViewComponent, isStandalone: true, selector: "app-table-view", ngImport: i0, template: "<div class=\"container\">\n <div>\n <table mat-table [dataSource]=\"items\" class=\"mat-elevation-z8\">\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"website\">\n <th mat-header-cell *matHeaderCellDef> Website </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.website}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_partner\">\n <th mat-header-cell *matHeaderCellDef> Is Partner </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.is_partner}} </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [routerLink]=\"row.id\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n\n </table>\n </div>\n <div class=\"button_container\">\n <a mat-fab class=\"btn-block\" [routerLink]=\"['create']\">\n <mat-icon>add</mat-icon></a>\n </div>\n</div>\n", styles: [".container{height:100%;width:100%;display:flex;padding:10px;margin:10px}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i5$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatFabAnchor, selector: "a[mat-fab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
544
+ }
545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListViewComponent, decorators: [{
546
+ type: Component,
547
+ args: [{ selector: 'app-table-view', imports: [MatTableModule,
548
+ MatButtonModule,
549
+ MatIconModule,
550
+ RouterModule], template: "<div class=\"container\">\n <div>\n <table mat-table [dataSource]=\"items\" class=\"mat-elevation-z8\">\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"website\">\n <th mat-header-cell *matHeaderCellDef> Website </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.website}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_partner\">\n <th mat-header-cell *matHeaderCellDef> Is Partner </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.is_partner}} </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [routerLink]=\"row.id\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n\n </table>\n </div>\n <div class=\"button_container\">\n <a mat-fab class=\"btn-block\" [routerLink]=\"['create']\">\n <mat-icon>add</mat-icon></a>\n </div>\n</div>\n", styles: [".container{height:100%;width:100%;display:flex;padding:10px;margin:10px}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"] }]
551
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: RestService }] });
552
+
553
+ class UserDetailComponent extends DetailViewComponent {
554
+ constructor(_route, _location, _restService) {
555
+ super(_route, _location, _restService, _restService);
556
+ }
557
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserDetailComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
558
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserDetailComponent, isStandalone: true, selector: "app-user-detail", usesInheritance: true, ngImport: i0, template: "<div>\n <a mat-icon-button class=\"btn-block\" (click)=\"goBack()\">\n <mat-icon>arrow_back</mat-icon>\n </a>\n</div>\n \n<div class=\"container\">\n <div *ngIf=\"item\" class=\"item_view\">\n <div>\n <h3 class=\"item_heading\">{{item.username}} </h3>\n <a mat-mini-fab\n class=\"btn-block\"\n [routerLink]=\"['/users/edit/', item.id]\">\n <mat-icon>edit</mat-icon>\n </a>\n </div>\n \n <div class=\"item_field\">\n <span><b>Email: </b></span>\n {{item.email}}\n </div>\n \n <div class=\"item_field\">\n <span><b>First Name: </b></span>\n {{item.first_name}}\n </div>\n \n <div class=\"item_field\">\n <span><b>Last Name: </b></span>\n {{item.last_name}}\n </div>\n \n </div> \n</div>\n", styles: [":host{flex-grow:1}.container{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:5px}.item_view{display:flex;justify-content:left;align-items:left;flex-direction:column;padding:5px}.item_heading{display:inline}.item_field,.padded_button{padding:5px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatMiniFabAnchor, selector: "a[mat-mini-fab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
559
+ }
560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserDetailComponent, decorators: [{
561
+ type: Component,
562
+ args: [{ selector: 'app-user-detail', imports: [NgIf,
563
+ RouterModule,
564
+ MatButtonModule,
565
+ MatIconModule], template: "<div>\n <a mat-icon-button class=\"btn-block\" (click)=\"goBack()\">\n <mat-icon>arrow_back</mat-icon>\n </a>\n</div>\n \n<div class=\"container\">\n <div *ngIf=\"item\" class=\"item_view\">\n <div>\n <h3 class=\"item_heading\">{{item.username}} </h3>\n <a mat-mini-fab\n class=\"btn-block\"\n [routerLink]=\"['/users/edit/', item.id]\">\n <mat-icon>edit</mat-icon>\n </a>\n </div>\n \n <div class=\"item_field\">\n <span><b>Email: </b></span>\n {{item.email}}\n </div>\n \n <div class=\"item_field\">\n <span><b>First Name: </b></span>\n {{item.first_name}}\n </div>\n \n <div class=\"item_field\">\n <span><b>Last Name: </b></span>\n {{item.last_name}}\n </div>\n \n </div> \n</div>\n", styles: [":host{flex-grow:1}.container{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:5px}.item_view{display:flex;justify-content:left;align-items:left;flex-direction:column;padding:5px}.item_heading{display:inline}.item_field,.padded_button{padding:5px}\n"] }]
566
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }] });
567
+
568
+ class UserEditComponent extends EditViewComponent {
569
+ constructor(_route, _location, _restService) {
570
+ super(_route, _location, _restService, _restService);
571
+ }
572
+ getTemplateItem() {
573
+ return new PortalMember();
574
+ }
575
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserEditComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
576
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserEditComponent, isStandalone: true, selector: "app-user-edit", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"><mat-icon>arrow_back</mat-icon></a>\n </div>\n \n <div *ngIf=\"item\" class=\"item_view\">\n <form class=\"example-form\">\n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n [(ngModel)]=\"item.username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n [(ngModel)]=\"item.email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n [(ngModel)]=\"item.first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n [(ngModel)]=\"item.last_name\"\n name=\"last_name\">\n </mat-form-field>\n \n </form>\n \n <div style=\"margin:10px; padding:10px;display: flex; flex-direction: row\">\n <button mat-fab class=\"btn-block\" (click)=\"save()\" style=\"padding:10px\"><mat-icon>save</mat-icon></button>\n <button mat-fab class=\"btn-block\" (click)=\"cancel()\" style=\"padding:10px\"><mat-icon>cancel</mat-icon></button>\n </div>\n </div>\n \n</div>\n", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:left;align-items:left;flex-direction:column;padding:10px}.form_field{padding:5px}.btn_block{padding:10px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
577
+ }
578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserEditComponent, decorators: [{
579
+ type: Component,
580
+ args: [{ selector: 'app-user-edit', imports: [NgIf,
581
+ FormsModule,
582
+ RouterModule,
583
+ MatButtonModule,
584
+ MatCardModule,
585
+ MatInputModule,
586
+ MatFormFieldModule,
587
+ MatIconModule,
588
+ ], template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"><mat-icon>arrow_back</mat-icon></a>\n </div>\n \n <div *ngIf=\"item\" class=\"item_view\">\n <form class=\"example-form\">\n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"Username\"\n type=\"text\"\n [(ngModel)]=\"item.username\"\n name=\"username\">\n </mat-form-field>\n \n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"Email\"\n type=\"text\"\n [(ngModel)]=\"item.email\"\n name=\"email\">\n </mat-form-field>\n\n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"First Name\"\n type=\"text\"\n [(ngModel)]=\"item.first_name\"\n name=\"first_name\">\n </mat-form-field>\n \n <mat-form-field class=\"form_field\">\n <input matInput\n placeholder=\"Last Name\"\n type=\"text\"\n [(ngModel)]=\"item.last_name\"\n name=\"last_name\">\n </mat-form-field>\n \n </form>\n \n <div style=\"margin:10px; padding:10px;display: flex; flex-direction: row\">\n <button mat-fab class=\"btn-block\" (click)=\"save()\" style=\"padding:10px\"><mat-icon>save</mat-icon></button>\n <button mat-fab class=\"btn-block\" (click)=\"cancel()\" style=\"padding:10px\"><mat-icon>cancel</mat-icon></button>\n </div>\n </div>\n \n</div>\n", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:left;align-items:left;flex-direction:column;padding:10px}.form_field{padding:5px}.btn_block{padding:10px}\n"] }]
589
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }] });
590
+
591
+ class UserComponent extends ListViewComponent {
592
+ constructor(_route, _location, _userService, _restService) {
593
+ super(_route, _location, _userService, _restService);
594
+ }
595
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
596
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UserComponent, isStandalone: true, selector: "app-user", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <mat-nav-list>\n @for (item of items; track item){\n <mat-card mat-list-item class=\"item-card\" [routerLink]=\"['/users/detail/', item.id]\" [routerLinkActive]=\"['is-active']\">\n <mat-card-header>\n <mat-card-title-group style=\"padding:5px\">\n <mat-card-title>{{item.first_name}} {{item.last_name}}</mat-card-title>\n <mat-card-subtitle>{{item.username}}</mat-card-subtitle>\n \n </mat-card-title-group>\n </mat-card-header>\n <mat-card-content>\n <p>Email: {{item.email}} </p>\n </mat-card-content>\n </mat-card>\n }\n </mat-nav-list>\n\n</div>\n", styles: [":host{flex-grow:1}.container{display:flex;padding:10px;flex-direction:column;justify-content:center;align-items:center}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}.item-card{margin-bottom:8px;height:100%;width:100%;max-width:600px}.item-card:hover{background-color:#d3d3d3}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i5$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$2.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i5$2.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i5$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i5$2.MatCardTitleGroup, selector: "mat-card-title-group" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
597
+ }
598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserComponent, decorators: [{
599
+ type: Component,
600
+ args: [{ selector: 'app-user', imports: [MatListModule, MatCardModule,
601
+ MatButtonModule,
602
+ MatIconModule,
603
+ RouterModule], template: "<div class=\"container\">\n <mat-nav-list>\n @for (item of items; track item){\n <mat-card mat-list-item class=\"item-card\" [routerLink]=\"['/users/detail/', item.id]\" [routerLinkActive]=\"['is-active']\">\n <mat-card-header>\n <mat-card-title-group style=\"padding:5px\">\n <mat-card-title>{{item.first_name}} {{item.last_name}}</mat-card-title>\n <mat-card-subtitle>{{item.username}}</mat-card-subtitle>\n \n </mat-card-title-group>\n </mat-card-header>\n <mat-card-content>\n <p>Email: {{item.email}} </p>\n </mat-card-content>\n </mat-card>\n }\n </mat-nav-list>\n\n</div>\n", styles: [":host{flex-grow:1}.container{display:flex;padding:10px;flex-direction:column;justify-content:center;align-items:center}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}.item-card{margin-bottom:8px;height:100%;width:100%;max-width:600px}.item-card:hover{background-color:#d3d3d3}\n"] }]
604
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: UserService }] });
605
+
606
+ class GroupDetailComponent extends DetailViewComponent {
607
+ constructor(_route, _location, _userService, _restService) {
608
+ super(_route, _location, _userService, _restService);
609
+ }
610
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupDetailComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: GroupService }], target: i0.ɵɵFactoryTarget.Component });
611
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: GroupDetailComponent, isStandalone: true, selector: "app-group-detail", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"><mat-icon>arrow_back</mat-icon></a>\n </div>\n \n <div *ngIf=\"item\" class=\"item_view\">\n <div>\n <h1 class=\"mat-display-1\" style=\"display:inline\"> {{item.name}} </h1>\n <a mat-mini-fab class=\"btn-block\" [routerLink]=\"['/groups/edit/', item.id]\">\n <mat-icon>edit</mat-icon>\n </a> \n </div>\n <div class=\"form_field\">{{item.name}}</div>\n </div>\n \n</div>\n", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatMiniFabAnchor, selector: "a[mat-mini-fab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
612
+ }
613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupDetailComponent, decorators: [{
614
+ type: Component,
615
+ args: [{ selector: 'app-group-detail', imports: [NgIf,
616
+ FormsModule,
617
+ RouterModule,
618
+ MatButtonModule,
619
+ MatCardModule,
620
+ MatInputModule,
621
+ MatFormFieldModule,
622
+ MatIconModule], template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"><mat-icon>arrow_back</mat-icon></a>\n </div>\n \n <div *ngIf=\"item\" class=\"item_view\">\n <div>\n <h1 class=\"mat-display-1\" style=\"display:inline\"> {{item.name}} </h1>\n <a mat-mini-fab class=\"btn-block\" [routerLink]=\"['/groups/edit/', item.id]\">\n <mat-icon>edit</mat-icon>\n </a> \n </div>\n <div class=\"form_field\">{{item.name}}</div>\n </div>\n \n</div>\n", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"] }]
623
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: GroupService }] });
624
+
625
+ class GroupComponent extends ListViewComponent {
626
+ displayedColumns = ['name'];
627
+ constructor(_route, _location, _userService, _restService) {
628
+ super(_route, _location, _userService, _restService);
629
+ }
630
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: GroupService }], target: i0.ɵɵFactoryTarget.Component });
631
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: GroupComponent, isStandalone: true, selector: "app-group", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <table mat-table [dataSource]=\"items\" class=\"mat-elevation-z8\">\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [routerLink]=\"row.id\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n\n </table>\n </div>\n</div>\n", styles: [".container{height:100%;width:100%;display:flex;padding:10px;margin:10px}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i5$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
632
+ }
633
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GroupComponent, decorators: [{
634
+ type: Component,
635
+ args: [{ selector: 'app-group', imports: [
636
+ MatTableModule,
637
+ MatButtonModule,
638
+ MatIconModule,
639
+ RouterModule
640
+ ], template: "<div class=\"container\">\n <div>\n <table mat-table [dataSource]=\"items\" class=\"mat-elevation-z8\">\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [routerLink]=\"row.id\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n\n </table>\n </div>\n</div>\n", styles: [".container{height:100%;width:100%;display:flex;padding:10px;margin:10px}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"] }]
641
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: GroupService }] });
642
+
643
+ class OrganizationComponent extends ListViewComponent {
644
+ displayedColumns = ['name', 'website', 'is_partner'];
645
+ constructor(_route, _location, _userService, _restService) {
646
+ super(_route, _location, _userService, _restService);
647
+ }
648
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: OrganizationService }], target: i0.ɵɵFactoryTarget.Component });
649
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: OrganizationComponent, isStandalone: true, selector: "app-organization", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <table mat-table [dataSource]=\"items\" class=\"mat-elevation-z8\">\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"website\">\n <th mat-header-cell *matHeaderCellDef> Website </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.website}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_partner\">\n <th mat-header-cell *matHeaderCellDef> Is Partner </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.is_partner}} </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [routerLink]=\"row.id\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n\n </table>\n </div>\n <div class=\"button_container\">\n <a mat-fab class=\"btn-block\" [routerLink]=\"['create']\">\n <mat-icon>add</mat-icon></a>\n </div>\n</div>\n", styles: [".container{height:100%;width:100%;display:flex;padding:10px;margin:10px}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i5$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatFabAnchor, selector: "a[mat-fab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
650
+ }
651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationComponent, decorators: [{
652
+ type: Component,
653
+ args: [{ selector: 'app-organization', imports: [
654
+ MatTableModule,
655
+ MatButtonModule,
656
+ MatIconModule,
657
+ RouterModule
658
+ ], template: "<div class=\"container\">\n <div>\n <table mat-table [dataSource]=\"items\" class=\"mat-elevation-z8\">\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"website\">\n <th mat-header-cell *matHeaderCellDef> Website </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.website}} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_partner\">\n <th mat-header-cell *matHeaderCellDef> Is Partner </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.is_partner}} </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [routerLink]=\"row.id\"\n [routerLinkActive]=\"['is-active']\"\n ></tr>\n\n </table>\n </div>\n <div class=\"button_container\">\n <a mat-fab class=\"btn-block\" [routerLink]=\"['create']\">\n <mat-icon>add</mat-icon></a>\n </div>\n</div>\n", styles: [".container{height:100%;width:100%;display:flex;padding:10px;margin:10px}.button_container{padding:10px}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.is-active{font-weight:700}\n"] }]
659
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: OrganizationService }] });
660
+
661
+ class OrganizationDetailComponent extends DetailViewComponent {
662
+ constructor(_route, _location, _userService, _restService) {
663
+ super(_route, _location, _userService, _restService);
664
+ }
665
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationDetailComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.Location }, { token: UserService }, { token: OrganizationService }], target: i0.ɵɵFactoryTarget.Component });
666
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: OrganizationDetailComponent, isStandalone: true, selector: "app-organization-detail", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"><mat-icon>arrow_back</mat-icon></a>\n </div>\n \n <div *ngIf=\"item\" class=\"item_view\">\n <div>\n <h3 class=\"mat-display-1\" style=\"display:inline\"> {{item.name}} </h3> \n <a mat-mini-fab class=\"btn-block\" [routerLink]=\"['/organizations/edit/', item.id]\">\n <mat-icon>edit</mat-icon>\n </a>\n </div>\n <div class=\"form_field\">{{item.description}}</div>\n <div class=\"form_field\"><h3>Address</h3>{{item.address}}</div>\n <div class=\"form_field\"><h3>Website</h3>{{item.website}}</div>\n </div>\n \n</div>\n", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatMiniFabAnchor, selector: "a[mat-mini-fab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
667
+ }
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrganizationDetailComponent, decorators: [{
669
+ type: Component,
670
+ args: [{ selector: 'app-organization-detail', imports: [NgIf,
671
+ FormsModule,
672
+ RouterModule,
673
+ MatButtonModule,
674
+ MatCardModule,
675
+ MatInputModule,
676
+ MatFormFieldModule,
677
+ MatIconModule], template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"><mat-icon>arrow_back</mat-icon></a>\n </div>\n \n <div *ngIf=\"item\" class=\"item_view\">\n <div>\n <h3 class=\"mat-display-1\" style=\"display:inline\"> {{item.name}} </h3> \n <a mat-mini-fab class=\"btn-block\" [routerLink]=\"['/organizations/edit/', item.id]\">\n <mat-icon>edit</mat-icon>\n </a>\n </div>\n <div class=\"form_field\">{{item.description}}</div>\n <div class=\"form_field\"><h3>Address</h3>{{item.address}}</div>\n <div class=\"form_field\"><h3>Website</h3>{{item.website}}</div>\n </div>\n \n</div>\n", styles: [".container{display:flex;flex-direction:column;padding:10px}.item_view{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:10px}.form_field,.btn-block{padding:10px}\n"] }]
678
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$1.Location }, { type: UserService }, { type: OrganizationService }] });
679
+
680
+ /*
681
+ * Public API Surface of ichec-angular-core
682
+ */
683
+ function provideUserService(endpoint_url) {
684
+ return {
685
+ provide: UserService,
686
+ useFactory: (http) => new UserService(http, endpoint_url),
687
+ deps: [HttpClient]
688
+ };
689
+ }
690
+ function provideGroupService(endpoint_url) {
691
+ return {
692
+ provide: GroupService,
693
+ useFactory: (user, http) => new GroupService(user, http, endpoint_url),
694
+ deps: [UserService, HttpClient]
695
+ };
696
+ }
697
+ ;
698
+
699
+ /**
700
+ * Generated bundle index. Do not edit.
701
+ */
702
+
703
+ export { ApiError, DetailViewComponent, EditViewComponent, ErrorCode, Group, GroupComponent, GroupDetailComponent, GroupService, LandingComponent, LeftNavComponent, LeftNavService, ListViewComponent, Organization, OrganizationComponent, OrganizationDetailComponent, OrganizationService, PortalMember, RestService, TopBarComponent, UserComponent, UserDetailComponent, UserEditComponent, UserService, provideGroupService, provideUserService };
704
+ //# sourceMappingURL=ichec-angular-core.mjs.map