ichec-angular-core 0.0.7 → 0.0.9

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.
@@ -19,9 +19,9 @@ import * as i2$2 from '@angular/material/list';
19
19
  import { MatListModule } from '@angular/material/list';
20
20
  import * as i1$1 from '@angular/forms';
21
21
  import { FormsModule } from '@angular/forms';
22
- import * as i4 from '@angular/material/input';
22
+ import * as i4$1 from '@angular/material/input';
23
23
  import { MatInputModule } from '@angular/material/input';
24
- import * as i3$2 from '@angular/material/form-field';
24
+ import * as i4 from '@angular/material/form-field';
25
25
  import { MatFormFieldModule } from '@angular/material/form-field';
26
26
  import * as i2$3 from '@angular/material/card';
27
27
  import { MatCardModule } from '@angular/material/card';
@@ -37,6 +37,7 @@ class PortalMember {
37
37
  last_name = "";
38
38
  phone = "";
39
39
  organization = "";
40
+ profile_url = "";
40
41
  }
41
42
  class Group {
42
43
  name = "";
@@ -99,6 +100,16 @@ class RestService {
99
100
  });
100
101
  return this._http.patch(this.getMediaUrl() + id + "/", form, { headers: headers }).pipe(mergeMap(_ => this.getItem(id)), catchError(this.handleError));
101
102
  }
103
+ postFile(id, field, file) {
104
+ const token = "Token " + localStorage.getItem("api_token");
105
+ const headers = new HttpHeaders({
106
+ 'Authorization': token,
107
+ 'Accept': 'application/json'
108
+ });
109
+ const form = new FormData();
110
+ form.append("file", file);
111
+ return this._http.post(this.getBaseUrl() + id + "/" + field, form, { headers: headers }).pipe(mergeMap(_ => this.getItem(id)), catchError(this.handleError));
112
+ }
102
113
  patchItem(item, include_keys, exclude_keys) {
103
114
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
115
  function replacer(key, value) {
@@ -185,11 +196,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
185
196
  }], ctorParameters: () => [] });
186
197
 
187
198
  class GroupService extends RestService {
188
- userService;
199
+ userService = inject(UserService);
189
200
  userItems = new BehaviorSubject([]);
190
201
  constructor() {
191
202
  super("groups", inject(ENDPOINT_URL), inject(HttpClient));
192
- this.userService = inject(UserService);
193
203
  this.userService.loggedInUser.subscribe(user => this.refreshUserItems(user));
194
204
  }
195
205
  refreshUserItems(user) {
@@ -225,34 +235,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
225
235
  }], ctorParameters: () => [] });
226
236
 
227
237
  class LeftNavService {
228
- userService;
229
- groupService;
230
- groups = [];
231
- options = [];
238
+ activeOptions = new Set();
239
+ _groups = [];
240
+ _defaultOptions = [];
241
+ _groupService = inject(GroupService);
232
242
  constructor() {
233
- this.userService = inject(UserService);
234
- this.groupService = inject(GroupService);
235
- this.groupService.userItems.subscribe(groups => this.onGroupsUpdated(groups));
243
+ this._groupService.userItems.subscribe(groups => this.onGroupsUpdated(groups));
236
244
  }
237
245
  onGroupsUpdated(groups) {
238
- this.groups = groups;
239
- this.updateOptions();
240
- }
241
- isConsortiumAdmin() {
242
- return this.groups.some(g => g.name == "ConsortiumAdmins");
243
- }
244
- updateOptions() {
245
- if (this.isConsortiumAdmin()) {
246
- this.options = [
247
- { name: "Home", route: "home" },
248
- { name: "Facilities", route: "facilities" },
249
- { name: "Access Calls", route: "access_calls" },
250
- { name: "Users", route: "users" },
251
- ];
252
- }
253
- else {
254
- this.options = [];
255
- }
246
+ this.activeOptions = new Set();
247
+ this._defaultOptions.forEach(e => this.activeOptions.add(e));
248
+ groups.forEach(g => this._groups.forEach(n => {
249
+ if (n.name == g.name) {
250
+ this.addNavGroup(n);
251
+ }
252
+ ;
253
+ }));
254
+ }
255
+ addNavGroup(group) {
256
+ group.options.forEach(o => this.activeOptions.add(o));
257
+ }
258
+ setDefaultOptions(options) {
259
+ this._defaultOptions = options;
260
+ }
261
+ setGroups(groups) {
262
+ this._groups = groups;
256
263
  }
257
264
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: LeftNavService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
258
265
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: LeftNavService, providedIn: 'root' });
@@ -292,37 +299,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
292
299
  }] } });
293
300
 
294
301
  class LeftNavComponent {
295
- leftNavService;
296
- constructor() {
297
- this.leftNavService = inject(LeftNavService);
298
- }
302
+ _leftNavService = inject(LeftNavService);
299
303
  getOptions() {
300
- return this.leftNavService.options;
304
+ return this._leftNavService.activeOptions;
301
305
  }
302
306
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: LeftNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
303
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.1", type: LeftNavComponent, isStandalone: true, selector: "lib-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: i1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i2$2.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: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
307
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.1", type: LeftNavComponent, isStandalone: true, selector: "lib-left-nav", ngImport: i0, template: "<mat-sidenav-container class=\"leftnav-container\">\n <mat-sidenav mode=\"side\" class=\"leftnav-side\" opened>\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 class=\"leftnav-content\"> \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}.leftnav-content{display:flex;flex-grow:1;height:90vh}.leftnav-side{padding:5px;width:160px}.is-active{background-color:#d3d3d3}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i2$2.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: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
304
308
  }
305
309
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: LeftNavComponent, decorators: [{
306
310
  type: Component,
307
- args: [{ selector: 'lib-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"] }]
308
- }], ctorParameters: () => [] });
311
+ args: [{ selector: 'lib-left-nav', imports: [MatSidenavModule, MatListModule, RouterOutlet, RouterModule], template: "<mat-sidenav-container class=\"leftnav-container\">\n <mat-sidenav mode=\"side\" class=\"leftnav-side\" opened>\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 class=\"leftnav-content\"> \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}.leftnav-content{display:flex;flex-grow:1;height:90vh}.leftnav-side{padding:5px;width:160px}.is-active{background-color:#d3d3d3}\n"] }]
312
+ }] });
309
313
 
310
314
  const LOGIN_USER = new InjectionToken("Default login user - used for testing");
311
315
  class LandingComponent {
312
- loginUser;
316
+ loginUser = inject(LOGIN_USER);
313
317
  loginError = "";
314
- userService;
315
- router;
316
- constructor() {
317
- this.userService = inject(UserService);
318
- this.loginUser = inject(LOGIN_USER);
319
- this.router = inject(Router);
320
- }
318
+ message = "";
319
+ userService = inject(UserService);
320
+ router = inject(Router);
321
321
  ngOnInit() {
322
322
  // This is a development version hack to 'autologin' to make it
323
323
  // easier to play around. The name will be empty at init time
324
324
  // for the production version.
325
325
  if (this.loginUser.name) {
326
+ console.log("Have development login user");
326
327
  this.login();
327
328
  }
328
329
  }
@@ -342,26 +343,28 @@ class LandingComponent {
342
343
  this.router.navigateByUrl("/home");
343
344
  }
344
345
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: LandingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
345
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: LandingComponent, isStandalone: true, selector: "lib-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: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i2$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.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: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
346
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: LandingComponent, isStandalone: true, selector: "lib-landing", inputs: { message: "message" }, ngImport: i0, template: "\n <p *ngIf=\"message\">{{message}}</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: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i2$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4$1.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: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
346
347
  }
347
348
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: LandingComponent, decorators: [{
348
349
  type: Component,
349
- args: [{ selector: 'lib-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"] }]
350
- }], ctorParameters: () => [] });
350
+ args: [{ selector: 'lib-landing', imports: [FormsModule, MatCardModule, MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule, NgIf], template: "\n <p *ngIf=\"message\">{{message}}</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"] }]
351
+ }], propDecorators: { message: [{
352
+ type: Input
353
+ }] } });
351
354
 
352
- class DetailViewComponent {
355
+ class DetailView {
353
356
  item;
354
357
  _route;
355
358
  _location;
356
359
  _userService;
357
360
  _restService;
358
- constructor() {
359
- this._route = inject(ActivatedRoute);
360
- this._location = inject(Location);
361
- this._userService = inject(UserService);
362
- this._restService = inject((RestService));
361
+ constructor(_route, _location, _userService, _restService) {
362
+ this._route = _route;
363
+ this._location = _location;
364
+ this._userService = _userService;
365
+ this._restService = _restService;
363
366
  }
364
- ngOnInit() {
367
+ onInit() {
365
368
  this.getItem();
366
369
  }
367
370
  onItemAvailable() {
@@ -387,28 +390,22 @@ class DetailViewComponent {
387
390
  }
388
391
  this._restService.putItem(this.item).subscribe(item => this.item = item);
389
392
  }
390
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: DetailViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
391
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: DetailViewComponent, isStandalone: true, selector: "lib-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"] });
392
393
  }
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: DetailViewComponent, decorators: [{
394
- type: Component,
395
- args: [{ selector: 'lib-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"] }]
396
- }], ctorParameters: () => [] });
397
394
 
398
- class EditViewComponent {
395
+ class EditView {
399
396
  item;
400
397
  createMode = false;
401
398
  _route;
402
399
  _location;
403
400
  _userService;
404
401
  _restService;
405
- constructor() {
406
- this._route = inject(ActivatedRoute);
407
- this._location = inject(Location);
408
- this._userService = inject(UserService);
409
- this._restService = inject((RestService));
402
+ constructor(_route, _location, _userService, _restServce) {
403
+ this._route = _route;
404
+ this._location = _location;
405
+ this._userService = _userService;
406
+ this._restService = _restServce;
410
407
  }
411
- ngOnInit() {
408
+ onInit() {
412
409
  this.getItem();
413
410
  }
414
411
  onItemAvailable() {
@@ -472,15 +469,9 @@ class EditViewComponent {
472
469
  this.item = item;
473
470
  this.goBack();
474
471
  }
475
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: EditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
476
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: EditViewComponent, isStandalone: true, selector: "lib-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"] });
477
472
  }
478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: EditViewComponent, decorators: [{
479
- type: Component,
480
- args: [{ selector: 'lib-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"] }]
481
- }], ctorParameters: () => [] });
482
473
 
483
- class ListViewComponent {
474
+ class ListView {
484
475
  user;
485
476
  items = [];
486
477
  displayedColumns = [];
@@ -488,13 +479,13 @@ class ListViewComponent {
488
479
  _location;
489
480
  _userService;
490
481
  _restService;
491
- constructor() {
492
- this._route = inject(ActivatedRoute);
493
- this._location = inject(Location);
494
- this._userService = inject(UserService);
495
- this._restService = inject((RestService));
482
+ constructor(_route, _location, _userService, _restService) {
483
+ this._route = _route;
484
+ this._location = _location;
485
+ this._userService = _userService;
486
+ this._restService = _restService;
496
487
  }
497
- ngOnInit() {
488
+ onInit() {
498
489
  this.getItems();
499
490
  }
500
491
  getItems() {
@@ -525,35 +516,73 @@ class ListViewComponent {
525
516
  goBack() {
526
517
  this._location.back();
527
518
  }
528
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: ListViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
529
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: ListViewComponent, isStandalone: true, selector: "lib-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: i1$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
530
519
  }
531
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: ListViewComponent, decorators: [{
532
- type: Component,
533
- args: [{ selector: 'lib-table-view', imports: [MatTableModule,
534
- MatButtonModule,
535
- MatIconModule,
536
- 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"] }]
537
- }], ctorParameters: () => [] });
538
520
 
539
- class UserDetailComponent extends DetailViewComponent {
540
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
541
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: UserDetailComponent, isStandalone: true, selector: "lib-user-detail", usesInheritance: true, ngImport: i0, template: "<div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\">\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: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
521
+ class UserDetailComponent extends DetailView {
522
+ constructor() {
523
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(UserService));
524
+ }
525
+ ngOnInit() {
526
+ this.onInit();
527
+ }
528
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
529
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: UserDetailComponent, isStandalone: true, selector: "lib-user-detail", usesInheritance: true, ngImport: i0, template: "<div>\n <a mat-icon-button class=\"padded_button\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\">\n <mat-icon>arrow_back</mat-icon>\n </a>\n</div>\n \n<div class=\"container\">\n <div *ngIf=\"item\" class=\"item_view\">\n \n <div style=\"width:100%; max-width:500px\">\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 *ngIf=\"item.profile_url\" class=\"image_holder\">\n <img alt=\"User Profile Image\" src=\"{{item.url}}{{item.profile_url}}\" style=\"height:120px;\">\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:center;align-items:center;flex-direction:column;padding:5px}.image_holder{display:flex;justify-content:center;align-items:center;overflow:hidden;padding:5px}.item_heading{display:inline;width:100%;max-width:100px}.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: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
542
530
  }
543
531
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserDetailComponent, decorators: [{
544
532
  type: Component,
545
533
  args: [{ selector: 'lib-user-detail', imports: [NgIf,
546
534
  RouterModule,
547
535
  MatButtonModule,
548
- MatIconModule], template: "<div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\">\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"] }]
549
- }] });
536
+ MatIconModule], template: "<div>\n <a mat-icon-button class=\"padded_button\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\">\n <mat-icon>arrow_back</mat-icon>\n </a>\n</div>\n \n<div class=\"container\">\n <div *ngIf=\"item\" class=\"item_view\">\n \n <div style=\"width:100%; max-width:500px\">\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 *ngIf=\"item.profile_url\" class=\"image_holder\">\n <img alt=\"User Profile Image\" src=\"{{item.url}}{{item.profile_url}}\" style=\"height:120px;\">\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:center;align-items:center;flex-direction:column;padding:5px}.image_holder{display:flex;justify-content:center;align-items:center;overflow:hidden;padding:5px}.item_heading{display:inline;width:100%;max-width:100px}.item_field,.padded_button{padding:5px}\n"] }]
537
+ }], ctorParameters: () => [] });
550
538
 
551
- class UserEditComponent extends EditViewComponent {
539
+ class UserEditComponent extends EditView {
540
+ image = null;
541
+ temporaryImageUrl = "";
542
+ constructor() {
543
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(UserService));
544
+ }
545
+ ngOnInit() {
546
+ this.onInit();
547
+ }
552
548
  getTemplateItem() {
553
549
  return new PortalMember();
554
550
  }
555
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
556
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: UserEditComponent, isStandalone: true, selector: "lib-user-edit", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><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: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$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: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.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: i3$2.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: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
551
+ save() {
552
+ if (!this.item) {
553
+ return;
554
+ }
555
+ this._restService.putItem(this.item).subscribe(item => { this.saveFiles(item); });
556
+ }
557
+ saveFiles(item) {
558
+ if (this.image) {
559
+ this._restService.postFile(item.id, "image", this.image).subscribe(item => this.onItemUpdated(item));
560
+ }
561
+ else {
562
+ this.onItemUpdated(item);
563
+ }
564
+ }
565
+ submit() {
566
+ if (this.item) {
567
+ this.save();
568
+ }
569
+ }
570
+ onFileUpload(event) {
571
+ console.log(event);
572
+ if (event.target) {
573
+ const input_element = event.target;
574
+ if (input_element.files && input_element.files.length > 0) {
575
+ this.image = input_element.files[0];
576
+ const reader = new FileReader();
577
+ reader.readAsDataURL(this.image);
578
+ reader.onload = () => { if (reader.result) {
579
+ this.temporaryImageUrl = reader.result;
580
+ } ; };
581
+ }
582
+ }
583
+ }
584
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
585
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: UserEditComponent, isStandalone: true, selector: "lib-user-edit", usesInheritance: true, ngImport: i0, template: "<div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><mat-icon>arrow_back</mat-icon></a>\n</div>\n\n<div class=\"container\">\n <div *ngIf=\"item\" class=\"item_view\" style=\"width:100%;max-width:500px\">\n <h1 *ngIf=\"createMode\" style=\"display:inline\">New User</h1>\n <h1 *ngIf=\"!createMode\" style=\"display:inline\">Edit User</h1>\n \n <form class=\"form_card\" #createForm=\"ngForm\" (ngSubmit)=\"save()\">\n <mat-form-field class=\"form_field\" style=\"width:100%\">\n <mat-label>Username</mat-label>\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\" style=\"width:100%\">\n <mat-label>Email</mat-label>\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 <mat-label>First Name</mat-label>\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 <mat-label>Last Name</mat-label>\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 <div class=\"document_upload\">\n <div *ngIf=\"temporaryImageUrl\" class=\"image_holder\">\n <p>Update profile image</p>\n <img alt=\"User Profile Image\" src=\"{{temporaryImageUrl}}\" style=\"height:120px;\">\n </div>\n <div *ngIf=\"!temporaryImageUrl && item.profile_url\" class=\"image_holder\">\n <p>Update profile image</p>\n <img alt=\"User Profile Image\" src=\"{{item.url}}{{item.profile_url}}\" style=\"height:120px;\">\n </div>\n <div *ngIf=\"!temporaryImageUrl && !item.profile_url\">\n <span>Upload a profile image</span>\n </div>\n \n <div class=\"button-row\">\n <button mat-mini-fab\n (click)=\"imgFileInput.click()\">\n <mat-icon>attachment</mat-icon>\n </button>\n <input hidden type=\"file\"\n #imgFileInput\n (change)=\"onFileUpload($event)\"/>\n </div> \n </div>\n \n <div class=\"button_group\">\n <button mat-fab\n class=\"form_action_button\"\n type=\"submit\"\n [disabled]=\"!createForm.form.valid\">\n <mat-icon>save</mat-icon></button>\n \n <button mat-fab\n class=\"form_action_button\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon></button>\n </div>\n \n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}.container{display:flex;justify-content:center;align-items:center;flex-direction:column}.item_view{display:flex;justify-content:left;align-items:left;flex-direction:column}.form_card{justify-content:center;align-items:center;flex-direction:column;display:flex}.form_field{padding:5px}.checkbox_group{justify-content:left;display:flex;flex-direction:column}.button_group{margin:10px;display:flex;flex-direction:row;justify-content:center}.btn-block{padding:5px}.form_action_button{padding:5px;margin:5px}.document_upload{padding:10px;display:flex;justify-content:center;text-align:center;flex-direction:column;max-width:300px}.image_holder{display:flex;justify-content:center;align-items:center;overflow:hidden;padding:5px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$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: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4$1.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
557
586
  }
558
587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserEditComponent, decorators: [{
559
588
  type: Component,
@@ -565,11 +594,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
565
594
  MatInputModule,
566
595
  MatFormFieldModule,
567
596
  MatIconModule,
568
- ], template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><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"] }]
569
- }] });
597
+ ], template: "<div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><mat-icon>arrow_back</mat-icon></a>\n</div>\n\n<div class=\"container\">\n <div *ngIf=\"item\" class=\"item_view\" style=\"width:100%;max-width:500px\">\n <h1 *ngIf=\"createMode\" style=\"display:inline\">New User</h1>\n <h1 *ngIf=\"!createMode\" style=\"display:inline\">Edit User</h1>\n \n <form class=\"form_card\" #createForm=\"ngForm\" (ngSubmit)=\"save()\">\n <mat-form-field class=\"form_field\" style=\"width:100%\">\n <mat-label>Username</mat-label>\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\" style=\"width:100%\">\n <mat-label>Email</mat-label>\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 <mat-label>First Name</mat-label>\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 <mat-label>Last Name</mat-label>\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 <div class=\"document_upload\">\n <div *ngIf=\"temporaryImageUrl\" class=\"image_holder\">\n <p>Update profile image</p>\n <img alt=\"User Profile Image\" src=\"{{temporaryImageUrl}}\" style=\"height:120px;\">\n </div>\n <div *ngIf=\"!temporaryImageUrl && item.profile_url\" class=\"image_holder\">\n <p>Update profile image</p>\n <img alt=\"User Profile Image\" src=\"{{item.url}}{{item.profile_url}}\" style=\"height:120px;\">\n </div>\n <div *ngIf=\"!temporaryImageUrl && !item.profile_url\">\n <span>Upload a profile image</span>\n </div>\n \n <div class=\"button-row\">\n <button mat-mini-fab\n (click)=\"imgFileInput.click()\">\n <mat-icon>attachment</mat-icon>\n </button>\n <input hidden type=\"file\"\n #imgFileInput\n (change)=\"onFileUpload($event)\"/>\n </div> \n </div>\n \n <div class=\"button_group\">\n <button mat-fab\n class=\"form_action_button\"\n type=\"submit\"\n [disabled]=\"!createForm.form.valid\">\n <mat-icon>save</mat-icon></button>\n \n <button mat-fab\n class=\"form_action_button\"\n (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon></button>\n </div>\n \n </form>\n </div>\n</div>\n", styles: [":host{flex-grow:1}.container{display:flex;justify-content:center;align-items:center;flex-direction:column}.item_view{display:flex;justify-content:left;align-items:left;flex-direction:column}.form_card{justify-content:center;align-items:center;flex-direction:column;display:flex}.form_field{padding:5px}.checkbox_group{justify-content:left;display:flex;flex-direction:column}.button_group{margin:10px;display:flex;flex-direction:row;justify-content:center}.btn-block{padding:5px}.form_action_button{padding:5px;margin:5px}.document_upload{padding:10px;display:flex;justify-content:center;text-align:center;flex-direction:column;max-width:300px}.image_holder{display:flex;justify-content:center;align-items:center;overflow:hidden;padding:5px}\n"] }]
598
+ }], ctorParameters: () => [] });
570
599
 
571
- class UserComponent extends ListViewComponent {
572
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
600
+ class UserComponent extends ListView {
601
+ constructor() {
602
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(UserService));
603
+ }
604
+ ngOnInit() {
605
+ this.onInit();
606
+ }
607
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
573
608
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.1", type: UserComponent, isStandalone: true, selector: "lib-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: i2$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i2$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i2$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i2$3.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i2$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i2$3.MatCardTitleGroup, selector: "mat-card-title-group" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
574
609
  }
575
610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: UserComponent, decorators: [{
@@ -578,10 +613,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
578
613
  MatButtonModule,
579
614
  MatIconModule,
580
615
  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"] }]
581
- }] });
616
+ }], ctorParameters: () => [] });
582
617
 
583
- class GroupDetailComponent extends DetailViewComponent {
584
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: GroupDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
618
+ class GroupDetailComponent extends DetailView {
619
+ constructor() {
620
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(GroupService));
621
+ }
622
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: GroupDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
585
623
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: GroupDetailComponent, isStandalone: true, selector: "lib-group-detail", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><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: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
586
624
  }
587
625
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: GroupDetailComponent, decorators: [{
@@ -594,12 +632,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
594
632
  MatInputModule,
595
633
  MatFormFieldModule,
596
634
  MatIconModule], template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><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"] }]
597
- }] });
635
+ }], ctorParameters: () => [] });
598
636
 
599
- class GroupComponent extends ListViewComponent {
637
+ class GroupComponent extends ListView {
600
638
  displayedColumns = ['name'];
601
639
  constructor() {
602
- super();
640
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(GroupService));
641
+ }
642
+ ngOnInit() {
643
+ this.onInit();
603
644
  }
604
645
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: GroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
605
646
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: GroupComponent, isStandalone: true, selector: "lib-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: i1$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
@@ -614,9 +655,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
614
655
  ], 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"] }]
615
656
  }], ctorParameters: () => [] });
616
657
 
617
- class OrganizationComponent extends ListViewComponent {
658
+ class OrganizationComponent extends ListView {
618
659
  displayedColumns = ['name', 'website', 'is_partner'];
619
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: OrganizationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
660
+ constructor() {
661
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(OrganizationService));
662
+ }
663
+ ngOnInit() {
664
+ this.onInit();
665
+ }
666
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: OrganizationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
620
667
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: OrganizationComponent, isStandalone: true, selector: "lib-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: i1$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
621
668
  }
622
669
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: OrganizationComponent, decorators: [{
@@ -627,10 +674,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
627
674
  MatIconModule,
628
675
  RouterModule
629
676
  ], 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"] }]
630
- }] });
677
+ }], ctorParameters: () => [] });
631
678
 
632
- class OrganizationDetailComponent extends DetailViewComponent {
633
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: OrganizationDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
679
+ class OrganizationDetailComponent extends DetailView {
680
+ constructor() {
681
+ super(inject(ActivatedRoute), inject(Location), inject(UserService), inject(OrganizationService));
682
+ }
683
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: OrganizationDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
634
684
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.1", type: OrganizationDetailComponent, isStandalone: true, selector: "lib-organization-detail", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><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: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
635
685
  }
636
686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImport: i0, type: OrganizationDetailComponent, decorators: [{
@@ -643,7 +693,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
643
693
  MatInputModule,
644
694
  MatFormFieldModule,
645
695
  MatIconModule], template: "<div class=\"container\">\n <div>\n <a mat-icon-button class=\"btn-block\"\n (click)=\"goBack()\"\n (keydown)=\"goBack()\"\n tabindex=\"0\"\n role=\"button\"><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"] }]
646
- }] });
696
+ }], ctorParameters: () => [] });
647
697
 
648
698
  /*
649
699
  * Public API Surface of ichec-angular-core
@@ -653,5 +703,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.1", ngImpor
653
703
  * Generated bundle index. Do not edit.
654
704
  */
655
705
 
656
- export { ApiError, DetailViewComponent, ENDPOINT_URL, EditViewComponent, ErrorCode, Group, GroupComponent, GroupDetailComponent, GroupService, LOGIN_USER, LandingComponent, LeftNavComponent, LeftNavService, ListViewComponent, Organization, OrganizationComponent, OrganizationDetailComponent, OrganizationService, PortalMember, RestService, TopBarComponent, UserComponent, UserDetailComponent, UserEditComponent, UserService };
706
+ export { ApiError, DetailView, ENDPOINT_URL, EditView, ErrorCode, Group, GroupComponent, GroupDetailComponent, GroupService, LOGIN_USER, LandingComponent, LeftNavComponent, LeftNavService, ListView, Organization, OrganizationComponent, OrganizationDetailComponent, OrganizationService, PortalMember, RestService, TopBarComponent, UserComponent, UserDetailComponent, UserEditComponent, UserService };
657
707
  //# sourceMappingURL=ichec-angular-core.mjs.map