ichec-angular-core 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,5 +1,282 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ichec-angular-core" />
5
- export * from './public-api';
1
+ import * as rxjs from 'rxjs';
2
+ import { Observable, BehaviorSubject } from 'rxjs';
3
+ import { HttpClient, HttpErrorResponse } from '@angular/common/http';
4
+ import * as i0 from '@angular/core';
5
+ import { InjectionToken, OnInit } from '@angular/core';
6
+ import * as ichec_angular_core from 'ichec-angular-core';
7
+ import { ActivatedRoute } from '@angular/router';
8
+ import { Location } from '@angular/common';
9
+
10
+ interface Identifiable {
11
+ id: number;
12
+ url: string;
13
+ }
14
+ interface IPortalMember extends Identifiable {
15
+ username: string;
16
+ email: string;
17
+ first_name: string;
18
+ last_name: string;
19
+ phone: string;
20
+ organization: string;
21
+ }
22
+ declare class PortalMember implements IPortalMember {
23
+ id: number;
24
+ url: string;
25
+ username: string;
26
+ email: string;
27
+ first_name: string;
28
+ last_name: string;
29
+ phone: string;
30
+ organization: string;
31
+ }
32
+ interface IGroup extends Identifiable {
33
+ name: string;
34
+ }
35
+ declare class Group implements IGroup {
36
+ name: string;
37
+ url: string;
38
+ id: number;
39
+ }
40
+ interface IOrganization extends Identifiable {
41
+ name: string;
42
+ acronym: string;
43
+ description: string;
44
+ address: string;
45
+ website: string;
46
+ country: string;
47
+ members: string[];
48
+ }
49
+ declare class Organization implements IOrganization {
50
+ id: number;
51
+ url: string;
52
+ name: string;
53
+ acronym: string;
54
+ description: string;
55
+ address: string;
56
+ website: string;
57
+ country: string;
58
+ members: string[];
59
+ }
60
+
61
+ interface LeftNavOption {
62
+ name: string;
63
+ route: string;
64
+ }
65
+ interface LeftNavCategory {
66
+ name: string;
67
+ options: LeftNavOption[];
68
+ }
69
+
70
+ declare enum ErrorCode {
71
+ UnknownError = 1
72
+ }
73
+ declare class ApiError {
74
+ code: ErrorCode;
75
+ text: string;
76
+ }
77
+ declare const ENDPOINT_URL: InjectionToken<string>;
78
+ declare class RestService<T extends Identifiable> {
79
+ private _url;
80
+ protected _endpoint_url: string;
81
+ protected _http: HttpClient;
82
+ constructor(_url: string, _endpoint_url: string, _http: HttpClient);
83
+ deleteItem(id: number): Observable<void>;
84
+ getForUser(user: IPortalMember): Observable<T[]>;
85
+ get(query?: string): Observable<T[]>;
86
+ getItem(id: number): Observable<T>;
87
+ getUrl(url: string): Observable<T>;
88
+ putItem(item: T, content_type?: string): Observable<T>;
89
+ patchItemMedia(id: number, form: FormData): Observable<T>;
90
+ patchItem(item: T, include_keys: string[], exclude_keys: string[]): Observable<T>;
91
+ postItem(item: T): Observable<T>;
92
+ private getHeaders;
93
+ private getBaseUrl;
94
+ private getMediaUrl;
95
+ handleError(error: HttpErrorResponse): Observable<never>;
96
+ }
97
+
98
+ declare class UserService extends RestService<IPortalMember> {
99
+ /** Service to handle IPortalMember via REST and also handle logins.
100
+ */
101
+ loggedInUser: BehaviorSubject<IPortalMember | null>;
102
+ constructor();
103
+ login(username: string, password: string): Observable<void>;
104
+ logout(): void;
105
+ private onLoginToken;
106
+ private onLoggedIn;
107
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
108
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
109
+ }
110
+
111
+ declare class GroupService extends RestService<IGroup> {
112
+ userService: UserService;
113
+ userItems: BehaviorSubject<IGroup[]>;
114
+ constructor();
115
+ private refreshUserItems;
116
+ static ɵfac: i0.ɵɵFactoryDeclaration<GroupService, never>;
117
+ static ɵprov: i0.ɵɵInjectableDeclaration<GroupService>;
118
+ }
119
+
120
+ declare class OrganizationService extends RestService<IOrganization> {
121
+ constructor();
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationService, never>;
123
+ static ɵprov: i0.ɵɵInjectableDeclaration<OrganizationService>;
124
+ }
125
+
126
+ interface NavOption {
127
+ name: string;
128
+ route: string;
129
+ }
130
+ declare class LeftNavService {
131
+ userService: UserService;
132
+ groupService: GroupService;
133
+ groups: IGroup[];
134
+ options: NavOption[];
135
+ constructor();
136
+ onGroupsUpdated(groups: IGroup[]): void;
137
+ isConsortiumAdmin(): boolean;
138
+ updateOptions(): void;
139
+ static ɵfac: i0.ɵɵFactoryDeclaration<LeftNavService, never>;
140
+ static ɵprov: i0.ɵɵInjectableDeclaration<LeftNavService>;
141
+ }
142
+
143
+ declare class TopBarComponent implements OnInit {
144
+ user?: IPortalMember | null;
145
+ title: string;
146
+ private userService;
147
+ private leftNavService;
148
+ constructor();
149
+ ngOnInit(): void;
150
+ onLogout(): void;
151
+ static ɵfac: i0.ɵɵFactoryDeclaration<TopBarComponent, never>;
152
+ static ɵcmp: i0.ɵɵComponentDeclaration<TopBarComponent, "lib-top-bar", never, { "title": { "alias": "title"; "required": false; }; }, {}, never, never, true, never>;
153
+ }
154
+
155
+ declare class LeftNavComponent {
156
+ private leftNavService;
157
+ constructor();
158
+ getOptions(): ichec_angular_core.NavOption[];
159
+ static ɵfac: i0.ɵɵFactoryDeclaration<LeftNavComponent, never>;
160
+ static ɵcmp: i0.ɵɵComponentDeclaration<LeftNavComponent, "lib-left-nav", never, {}, {}, never, never, true, never>;
161
+ }
162
+
163
+ interface LoginUser {
164
+ password: string;
165
+ name: string;
166
+ }
167
+
168
+ declare const LOGIN_USER: InjectionToken<LoginUser>;
169
+ declare class LandingComponent implements OnInit {
170
+ loginUser: LoginUser;
171
+ loginError: string;
172
+ private userService;
173
+ private router;
174
+ constructor();
175
+ ngOnInit(): void;
176
+ login(): rxjs.Subscription;
177
+ onLoginError(error: HttpErrorResponse): void;
178
+ onLoggedIn(): void;
179
+ static ɵfac: i0.ɵɵFactoryDeclaration<LandingComponent, never>;
180
+ static ɵcmp: i0.ɵɵComponentDeclaration<LandingComponent, "lib-landing", never, {}, {}, never, never, true, never>;
181
+ }
182
+
183
+ declare abstract class DetailViewComponent<T extends Identifiable> implements OnInit {
184
+ item?: T;
185
+ protected _route: ActivatedRoute;
186
+ protected _location: Location;
187
+ protected _userService: UserService;
188
+ protected _restService: RestService<T>;
189
+ constructor();
190
+ ngOnInit(): void;
191
+ onItemAvailable(): void;
192
+ onItemAndUserAvailable(_: IPortalMember): void;
193
+ goBack(): void;
194
+ private getItem;
195
+ update(): void;
196
+ static ɵfac: i0.ɵɵFactoryDeclaration<DetailViewComponent<any>, never>;
197
+ static ɵcmp: i0.ɵɵComponentDeclaration<DetailViewComponent<any>, "lib-detail-view", never, {}, {}, never, never, true, never>;
198
+ }
199
+
200
+ declare abstract class EditViewComponent<T extends Identifiable> implements OnInit {
201
+ item?: T;
202
+ createMode: boolean;
203
+ protected _route: ActivatedRoute;
204
+ protected _location: Location;
205
+ protected _userService: UserService;
206
+ protected _restService: RestService<T>;
207
+ constructor();
208
+ ngOnInit(): void;
209
+ onItemAvailable(): void;
210
+ onItemAndUserAvailable(_: IPortalMember): void;
211
+ goBack(): void;
212
+ save(): void;
213
+ protected updateItem(): void;
214
+ protected createItem(): void;
215
+ cancel(): void;
216
+ protected abstract getTemplateItem(): T;
217
+ private isCreateRoute;
218
+ private getItem;
219
+ protected onItemUpdated(item: T): void;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditViewComponent<any>, never>;
221
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditViewComponent<any>, "lib-edit-view", never, {}, {}, never, never, true, never>;
222
+ }
223
+
224
+ declare class ListViewComponent<T extends Identifiable> implements OnInit {
225
+ user?: IPortalMember;
226
+ items: T[];
227
+ displayedColumns: string[];
228
+ protected _route: ActivatedRoute;
229
+ protected _location: Location;
230
+ protected _userService: UserService;
231
+ protected _restService: RestService<T>;
232
+ constructor();
233
+ ngOnInit(): void;
234
+ getItems(): void;
235
+ private onUserChange;
236
+ protected isSelfList(): boolean;
237
+ goBack(): void;
238
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListViewComponent<any>, never>;
239
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent<any>, "lib-table-view", never, {}, {}, never, never, true, never>;
240
+ }
241
+
242
+ declare class UserDetailComponent extends DetailViewComponent<IPortalMember> {
243
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserDetailComponent, never>;
244
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserDetailComponent, "lib-user-detail", never, {}, {}, never, never, true, never>;
245
+ }
246
+
247
+ declare class UserEditComponent extends EditViewComponent<IPortalMember> {
248
+ protected getTemplateItem(): IPortalMember;
249
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserEditComponent, never>;
250
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserEditComponent, "lib-user-edit", never, {}, {}, never, never, true, never>;
251
+ }
252
+
253
+ declare class UserComponent extends ListViewComponent<IPortalMember> implements OnInit {
254
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserComponent, never>;
255
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserComponent, "lib-user", never, {}, {}, never, never, true, never>;
256
+ }
257
+
258
+ declare class GroupDetailComponent extends DetailViewComponent<IGroup> {
259
+ static ɵfac: i0.ɵɵFactoryDeclaration<GroupDetailComponent, never>;
260
+ static ɵcmp: i0.ɵɵComponentDeclaration<GroupDetailComponent, "lib-group-detail", never, {}, {}, never, never, true, never>;
261
+ }
262
+
263
+ declare class GroupComponent extends ListViewComponent<IGroup> implements OnInit {
264
+ displayedColumns: string[];
265
+ constructor();
266
+ static ɵfac: i0.ɵɵFactoryDeclaration<GroupComponent, never>;
267
+ static ɵcmp: i0.ɵɵComponentDeclaration<GroupComponent, "lib-group", never, {}, {}, never, never, true, never>;
268
+ }
269
+
270
+ declare class OrganizationComponent extends ListViewComponent<Organization> {
271
+ displayedColumns: string[];
272
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationComponent, never>;
273
+ static ɵcmp: i0.ɵɵComponentDeclaration<OrganizationComponent, "lib-organization", never, {}, {}, never, never, true, never>;
274
+ }
275
+
276
+ declare class OrganizationDetailComponent extends DetailViewComponent<IOrganization> {
277
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationDetailComponent, never>;
278
+ static ɵcmp: i0.ɵɵComponentDeclaration<OrganizationDetailComponent, "lib-organization-detail", never, {}, {}, never, never, true, never>;
279
+ }
280
+
281
+ 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 };
282
+ export type { IGroup, IOrganization, IPortalMember, Identifiable, LeftNavCategory, LeftNavOption, NavOption };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ichec-angular-core",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0"
@@ -1,50 +0,0 @@
1
- export interface Identifiable {
2
- id: number;
3
- url: string;
4
- }
5
- export interface IPortalMember extends Identifiable {
6
- username: string;
7
- email: string;
8
- first_name: string;
9
- last_name: string;
10
- phone: string;
11
- organization: string;
12
- }
13
- export declare class PortalMember implements IPortalMember {
14
- id: number;
15
- url: string;
16
- username: string;
17
- email: string;
18
- first_name: string;
19
- last_name: string;
20
- phone: string;
21
- organization: string;
22
- }
23
- export interface IGroup extends Identifiable {
24
- name: string;
25
- }
26
- export declare class Group implements IGroup {
27
- name: string;
28
- url: string;
29
- id: number;
30
- }
31
- export interface IOrganization extends Identifiable {
32
- name: string;
33
- acronym: string;
34
- description: string;
35
- address: string;
36
- website: string;
37
- country: string;
38
- members: string[];
39
- }
40
- export declare class Organization implements IOrganization {
41
- id: number;
42
- url: string;
43
- name: string;
44
- acronym: string;
45
- description: string;
46
- address: string;
47
- website: string;
48
- country: string;
49
- members: string[];
50
- }
@@ -1,8 +0,0 @@
1
- export interface LeftNavOption {
2
- name: string;
3
- route: string;
4
- }
5
- export interface LeftNavCategory {
6
- name: string;
7
- options: LeftNavOption[];
8
- }
@@ -1,14 +0,0 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- import { HttpClient } from '@angular/common/http';
3
- import { RestService } from './rest.service';
4
- import { UserService } from './user.service';
5
- import { IGroup } from '../models/core';
6
- import * as i0 from "@angular/core";
7
- export declare class GroupService extends RestService<IGroup> {
8
- private userService;
9
- userItems: BehaviorSubject<IGroup[]>;
10
- constructor(userService: UserService, http: HttpClient, endpoint_url: string);
11
- private refreshUserItems;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<GroupService, never>;
13
- static ɵprov: i0.ɵɵInjectableDeclaration<GroupService>;
14
- }
@@ -1,20 +0,0 @@
1
- import { UserService } from './user.service';
2
- import { GroupService } from './group.service';
3
- import { IGroup } from '../models/core';
4
- import * as i0 from "@angular/core";
5
- export interface NavOption {
6
- name: string;
7
- route: string;
8
- }
9
- export declare class LeftNavService {
10
- private userService;
11
- private groupService;
12
- groups: IGroup[];
13
- options: NavOption[];
14
- constructor(userService: UserService, groupService: GroupService);
15
- onGroupsUpdated(groups: IGroup[]): void;
16
- isConsortiumAdmin(): boolean;
17
- updateOptions(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<LeftNavService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<LeftNavService>;
20
- }
@@ -1,9 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { RestService } from './rest.service';
3
- import { IOrganization } from '../models/core';
4
- import * as i0 from "@angular/core";
5
- export declare class OrganizationService extends RestService<IOrganization> {
6
- constructor(http: HttpClient, endpoint_url: string);
7
- static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationService, never>;
8
- static ɵprov: i0.ɵɵInjectableDeclaration<OrganizationService>;
9
- }
@@ -1,29 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { HttpClient, HttpErrorResponse } from '@angular/common/http';
3
- import { Identifiable, IPortalMember } from '../models/core';
4
- export declare enum ErrorCode {
5
- UnknownError = 1
6
- }
7
- export declare class ApiError {
8
- code: ErrorCode;
9
- text: string;
10
- }
11
- export declare class RestService<T extends Identifiable> {
12
- private _url;
13
- protected _endpoint_url: string;
14
- protected _http: HttpClient;
15
- constructor(_url: string, _endpoint_url: string, _http: HttpClient);
16
- deleteItem(id: number): Observable<void>;
17
- getForUser(user: IPortalMember): Observable<T[]>;
18
- get(query?: string): Observable<T[]>;
19
- getItem(id: number): Observable<T>;
20
- getUrl(url: string): Observable<T>;
21
- putItem(item: T, content_type?: string): Observable<T>;
22
- patchItemMedia(id: number, form: FormData): Observable<T>;
23
- patchItem(item: T, include_keys: string[], exclude_keys: string[]): Observable<T>;
24
- postItem(item: T): Observable<T>;
25
- private getHeaders;
26
- private getBaseUrl;
27
- private getMediaUrl;
28
- handleError(error: HttpErrorResponse): Observable<never>;
29
- }
@@ -1,17 +0,0 @@
1
- import { Observable, BehaviorSubject } from 'rxjs';
2
- import { HttpClient } from '@angular/common/http';
3
- import { RestService } from './rest.service';
4
- import { IPortalMember } from '../models/core';
5
- import * as i0 from "@angular/core";
6
- export declare class UserService extends RestService<IPortalMember> {
7
- /** Service to handle IPortalMember via REST and also handle logins.
8
- */
9
- loggedInUser: BehaviorSubject<IPortalMember | null>;
10
- constructor(_http: HttpClient, _endpoint_url: string);
11
- login(username: string, password: string): Observable<void>;
12
- logout(): void;
13
- private onLoginToken;
14
- private onLoggedIn;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
17
- }
@@ -1,12 +0,0 @@
1
- import { ActivatedRoute } from '@angular/router';
2
- import { Location } from '@angular/common';
3
- import { DetailViewComponent } from '../../../base/detail-view/detail-view.component';
4
- import { IGroup } from '../../../../models/core';
5
- import { GroupService } from '../../../../services/group.service';
6
- import { UserService } from '../../../../services/user.service';
7
- import * as i0 from "@angular/core";
8
- export declare class GroupDetailComponent extends DetailViewComponent<IGroup> {
9
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: GroupService);
10
- static ɵfac: i0.ɵɵFactoryDeclaration<GroupDetailComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<GroupDetailComponent, "app-group-detail", never, {}, {}, never, never, true, never>;
12
- }
@@ -1,14 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { Location } from '@angular/common';
3
- import { ActivatedRoute } from '@angular/router';
4
- import { ListViewComponent } from '../../../base/list-view/list-view.component';
5
- import { UserService } from '../../../../services/user.service';
6
- import { GroupService } from '../../../../services/group.service';
7
- import { IGroup } from '../../../../models/core';
8
- import * as i0 from "@angular/core";
9
- export declare class GroupComponent extends ListViewComponent<IGroup> implements OnInit {
10
- displayedColumns: string[];
11
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: GroupService);
12
- static ɵfac: i0.ɵɵFactoryDeclaration<GroupComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<GroupComponent, "app-group", never, {}, {}, never, never, true, never>;
14
- }
@@ -1,12 +0,0 @@
1
- import { ActivatedRoute } from '@angular/router';
2
- import { Location } from '@angular/common';
3
- import { DetailViewComponent } from '../../../base/detail-view/detail-view.component';
4
- import { IOrganization } from '../../../../models/core';
5
- import { OrganizationService } from '../../../../services/organization.service';
6
- import { UserService } from '../../../../services/user.service';
7
- import * as i0 from "@angular/core";
8
- export declare class OrganizationDetailComponent extends DetailViewComponent<IOrganization> {
9
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: OrganizationService);
10
- static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationDetailComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<OrganizationDetailComponent, "app-organization-detail", never, {}, {}, never, never, true, never>;
12
- }
@@ -1,13 +0,0 @@
1
- import { Location } from '@angular/common';
2
- import { ActivatedRoute } from '@angular/router';
3
- import { ListViewComponent } from '../../../base/list-view/list-view.component';
4
- import { UserService } from '../../../../services/user.service';
5
- import { OrganizationService } from '../../../../services/organization.service';
6
- import { Organization } from '../../../../models/core';
7
- import * as i0 from "@angular/core";
8
- export declare class OrganizationComponent extends ListViewComponent<Organization> {
9
- displayedColumns: string[];
10
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: OrganizationService);
11
- static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<OrganizationComponent, "app-organization", never, {}, {}, never, never, true, never>;
13
- }
@@ -1,11 +0,0 @@
1
- import { ActivatedRoute } from '@angular/router';
2
- import { Location } from '@angular/common';
3
- import { DetailViewComponent } from '../../../base/detail-view/detail-view.component';
4
- import { IPortalMember } from '../../../../models/core';
5
- import { UserService } from '../../../../services/user.service';
6
- import * as i0 from "@angular/core";
7
- export declare class UserDetailComponent extends DetailViewComponent<IPortalMember> {
8
- constructor(_route: ActivatedRoute, _location: Location, _restService: UserService);
9
- static ɵfac: i0.ɵɵFactoryDeclaration<UserDetailComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<UserDetailComponent, "app-user-detail", never, {}, {}, never, never, true, never>;
11
- }
@@ -1,12 +0,0 @@
1
- import { ActivatedRoute } from '@angular/router';
2
- import { Location } from '@angular/common';
3
- import { EditViewComponent } from '../../../base/edit-view/edit-view.component';
4
- import { IPortalMember } from '../../../../models/core';
5
- import { UserService } from '../../../../services/user.service';
6
- import * as i0 from "@angular/core";
7
- export declare class UserEditComponent extends EditViewComponent<IPortalMember> {
8
- constructor(_route: ActivatedRoute, _location: Location, _restService: UserService);
9
- protected getTemplateItem(): IPortalMember;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<UserEditComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<UserEditComponent, "app-user-edit", never, {}, {}, never, never, true, never>;
12
- }
@@ -1,12 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { Location } from '@angular/common';
3
- import { ActivatedRoute } from '@angular/router';
4
- import { ListViewComponent } from '../../../base/list-view/list-view.component';
5
- import { UserService } from '../../../../services/user.service';
6
- import { IPortalMember } from '../../../../models/core';
7
- import * as i0 from "@angular/core";
8
- export declare class UserComponent extends ListViewComponent<IPortalMember> implements OnInit {
9
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: UserService);
10
- static ɵfac: i0.ɵɵFactoryDeclaration<UserComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<UserComponent, "app-user", never, {}, {}, never, never, true, never>;
12
- }
@@ -1,23 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { ActivatedRoute } from '@angular/router';
3
- import { Location } from '@angular/common';
4
- import { Identifiable, IPortalMember } from '../../../models/core';
5
- import { RestService } from '../../../services/rest.service';
6
- import { UserService } from '../../../services/user.service';
7
- import * as i0 from "@angular/core";
8
- export declare abstract class DetailViewComponent<T extends Identifiable> implements OnInit {
9
- protected _route: ActivatedRoute;
10
- private _location;
11
- protected _userService: UserService;
12
- protected _restService: RestService<T>;
13
- item?: T;
14
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: RestService<T>);
15
- ngOnInit(): void;
16
- onItemAvailable(): void;
17
- onItemAndUserAvailable(_: IPortalMember): void;
18
- goBack(): void;
19
- private getItem;
20
- update(): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<DetailViewComponent<any>, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<DetailViewComponent<any>, "app-detail-view", never, {}, {}, never, never, true, never>;
23
- }
@@ -1,30 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { ActivatedRoute } from '@angular/router';
3
- import { Location } from '@angular/common';
4
- import { Identifiable, IPortalMember } from '../../../models/core';
5
- import { RestService } from '../../../services/rest.service';
6
- import { UserService } from '../../../services/user.service';
7
- import * as i0 from "@angular/core";
8
- export declare abstract class EditViewComponent<T extends Identifiable> implements OnInit {
9
- protected _route: ActivatedRoute;
10
- private _location;
11
- protected _userService: UserService;
12
- protected _restService: RestService<T>;
13
- item?: T;
14
- createMode: boolean;
15
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: RestService<T>);
16
- ngOnInit(): void;
17
- onItemAvailable(): void;
18
- onItemAndUserAvailable(_: IPortalMember): void;
19
- goBack(): void;
20
- save(): void;
21
- protected updateItem(): void;
22
- protected createItem(): void;
23
- cancel(): void;
24
- protected abstract getTemplateItem(): T;
25
- private isCreateRoute;
26
- private getItem;
27
- protected onItemUpdated(item: T): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<EditViewComponent<any>, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<EditViewComponent<any>, "app-edit-view", never, {}, {}, never, never, true, never>;
30
- }
@@ -1,24 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { Location } from '@angular/common';
3
- import { ActivatedRoute } from '@angular/router';
4
- import { Identifiable, IPortalMember } from '../../../models/core';
5
- import { UserService } from '../../../services/user.service';
6
- import { RestService } from '../../../services/rest.service';
7
- import * as i0 from "@angular/core";
8
- export declare class ListViewComponent<T extends Identifiable> implements OnInit {
9
- private _route;
10
- private _location;
11
- private _userService;
12
- protected _restService: RestService<T>;
13
- user?: IPortalMember;
14
- items: T[];
15
- displayedColumns: string[];
16
- constructor(_route: ActivatedRoute, _location: Location, _userService: UserService, _restService: RestService<T>);
17
- ngOnInit(): void;
18
- getItems(): void;
19
- private onUserChange;
20
- protected isSelfList(): boolean;
21
- goBack(): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<ListViewComponent<any>, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent<any>, "app-table-view", never, {}, {}, never, never, true, never>;
24
- }
@@ -1,19 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { HttpErrorResponse } from '@angular/common/http';
4
- import { UserService } from '../../services/user.service';
5
- import { LoginUser } from './login-user';
6
- import * as i0 from "@angular/core";
7
- export declare class LandingComponent implements OnInit {
8
- private userService;
9
- private router;
10
- loginUser: LoginUser;
11
- loginError: string;
12
- constructor(userService: UserService, router: Router);
13
- ngOnInit(): void;
14
- login(): import("rxjs").Subscription;
15
- onLoginError(error: HttpErrorResponse): void;
16
- onLoggedIn(): void;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<LandingComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<LandingComponent, "app-landing", never, {}, {}, never, never, true, never>;
19
- }
@@ -1,4 +0,0 @@
1
- export interface LoginUser {
2
- password: string;
3
- name: string;
4
- }