ichec-angular-core 0.2.4 → 0.2.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/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FormGroup, FormControl, FormArray, FormBuilder, AbstractControl } from '@angular/forms';
|
|
2
|
-
import * as rxjs from 'rxjs';
|
|
3
2
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
3
|
+
import { HttpClient, HttpParams, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
5
4
|
import * as _angular_core from '@angular/core';
|
|
6
|
-
import { InjectionToken,
|
|
5
|
+
import { InjectionToken, AfterViewInit, OnInit, TemplateRef } from '@angular/core';
|
|
7
6
|
import { CookieService } from 'ngx-cookie-service';
|
|
8
7
|
import * as ichec_angular_core from 'ichec-angular-core';
|
|
9
8
|
import { MatSidenavContent } from '@angular/material/sidenav';
|
|
@@ -281,11 +280,22 @@ interface LeftNavCategory {
|
|
|
281
280
|
|
|
282
281
|
interface RestServiceConfig {
|
|
283
282
|
endpoint_url: string;
|
|
283
|
+
self_url: string;
|
|
284
284
|
auth_type: string;
|
|
285
|
-
|
|
285
|
+
}
|
|
286
|
+
interface IRequestBase {
|
|
287
|
+
headers: HttpHeaders;
|
|
288
|
+
credentials: RequestCredentials;
|
|
289
|
+
params: HttpParams;
|
|
290
|
+
}
|
|
291
|
+
interface IServerManifest {
|
|
292
|
+
login_url: string;
|
|
293
|
+
logout_url: string;
|
|
294
|
+
supports_cors: boolean;
|
|
286
295
|
}
|
|
287
296
|
declare const REST_SERVICE_CONFIG: InjectionToken<RestServiceConfig>;
|
|
288
297
|
declare class RestService<D extends Identifiable, L extends Identifiable = D, C = D, U extends Identifiable = D> {
|
|
298
|
+
manifest: IServerManifest;
|
|
289
299
|
readonly _url: string;
|
|
290
300
|
protected config: RestServiceConfig;
|
|
291
301
|
protected _http: HttpClient;
|
|
@@ -304,10 +314,10 @@ declare class RestService<D extends Identifiable, L extends Identifiable = D, C
|
|
|
304
314
|
putFileStandalone(url: string, file: File): Observable<void>;
|
|
305
315
|
patchItem(item: U, include_keys: string[], exclude_keys: string[]): Observable<D>;
|
|
306
316
|
postItem(item: C): Observable<D>;
|
|
307
|
-
getCsrfCookie(): string;
|
|
308
317
|
private getHeaders;
|
|
309
|
-
protected
|
|
310
|
-
private
|
|
318
|
+
protected get baseUrl(): string;
|
|
319
|
+
private get mediaUrl();
|
|
320
|
+
protected getRequestBase(content_type?: string, params?: HttpParams, file?: string): IRequestBase;
|
|
311
321
|
handleError(error: HttpErrorResponse): Observable<never>;
|
|
312
322
|
}
|
|
313
323
|
|
|
@@ -336,16 +346,16 @@ declare class UserService extends ItemService<IPortalMemberDetail, IPortalMember
|
|
|
336
346
|
readonly _url: string;
|
|
337
347
|
typename: string;
|
|
338
348
|
private permissions;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
349
|
+
login(next?: string): Observable<IPortalMemberDetail | null>;
|
|
350
|
+
private _getServiceManifest;
|
|
351
|
+
private _getSelf;
|
|
352
|
+
private _login;
|
|
353
|
+
private _do_login_redirect;
|
|
354
|
+
logout(next?: string): void;
|
|
343
355
|
hasAddPermission(feature: string): boolean;
|
|
344
356
|
hasDeletePermission(feature: string): boolean;
|
|
345
357
|
hasEditPermission(feature: string): boolean;
|
|
346
358
|
hasViewPermission(feature: string): boolean;
|
|
347
|
-
logout(): void;
|
|
348
|
-
private onLoginToken;
|
|
349
359
|
private onLoggedIn;
|
|
350
360
|
private parsePermission;
|
|
351
361
|
private processPermissions;
|
|
@@ -356,6 +366,7 @@ declare class UserService extends ItemService<IPortalMemberDetail, IPortalMember
|
|
|
356
366
|
declare class ItemWithUserService<D extends Identifiable, L extends Identifiable = D, C = D, U extends Identifiable = D> extends ItemService<D, L, C, U> {
|
|
357
367
|
protected userService: UserService;
|
|
358
368
|
userItems: BehaviorSubject<L[]>;
|
|
369
|
+
constructor();
|
|
359
370
|
canCreate(): boolean;
|
|
360
371
|
canView(): boolean;
|
|
361
372
|
canEdit(): boolean;
|
|
@@ -422,13 +433,12 @@ interface NavGroup {
|
|
|
422
433
|
options: NavOption[];
|
|
423
434
|
}
|
|
424
435
|
declare class LeftNavService {
|
|
425
|
-
activeOptions: Set<NavOption
|
|
436
|
+
activeOptions: _angular_core.WritableSignal<Set<NavOption>>;
|
|
426
437
|
private _groups;
|
|
427
438
|
private _defaultOptions;
|
|
428
439
|
private _groupService;
|
|
429
440
|
constructor();
|
|
430
441
|
onGroupsUpdated(groups: IGroupList[]): void;
|
|
431
|
-
addNavGroup(group: NavGroup): void;
|
|
432
442
|
setDefaultOptions(options: NavOption[]): void;
|
|
433
443
|
setGroups(groups: NavGroup[]): void;
|
|
434
444
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LeftNavService, never>;
|
|
@@ -442,46 +452,24 @@ declare class MockItemService {
|
|
|
442
452
|
typePlural(): string;
|
|
443
453
|
}
|
|
444
454
|
|
|
445
|
-
declare class TopBarComponent
|
|
455
|
+
declare class TopBarComponent {
|
|
446
456
|
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
447
|
-
|
|
457
|
+
readonly user: _angular_core.InputSignal<ichec_angular_core.IPortalMemberList>;
|
|
448
458
|
private userService;
|
|
449
|
-
private leftNavService;
|
|
450
|
-
ngOnInit(): void;
|
|
451
459
|
onLogout(): void;
|
|
452
|
-
|
|
460
|
+
get initials(): string;
|
|
453
461
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TopBarComponent, never>;
|
|
454
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TopBarComponent, "lib-top-bar", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
462
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TopBarComponent, "lib-top-bar", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
455
463
|
}
|
|
456
464
|
|
|
457
465
|
declare class LeftNavComponent {
|
|
458
|
-
|
|
466
|
+
protected _leftNavService: LeftNavService;
|
|
459
467
|
sideNavContent: _angular_core.Signal<MatSidenavContent | undefined>;
|
|
460
|
-
getOptions(): Set<ichec_angular_core.NavOption
|
|
468
|
+
getOptions(): _angular_core.WritableSignal<Set<ichec_angular_core.NavOption>>;
|
|
461
469
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LeftNavComponent, never>;
|
|
462
470
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LeftNavComponent, "lib-left-nav", never, {}, {}, never, never, true, never>;
|
|
463
471
|
}
|
|
464
472
|
|
|
465
|
-
interface LoginUser {
|
|
466
|
-
password: string;
|
|
467
|
-
name: string;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
declare const LOGIN_USER: InjectionToken<LoginUser>;
|
|
471
|
-
declare class LandingComponent implements OnInit {
|
|
472
|
-
loginUser: LoginUser;
|
|
473
|
-
loginError: _angular_core.WritableSignal<string>;
|
|
474
|
-
message: _angular_core.InputSignal<string | undefined>;
|
|
475
|
-
private userService;
|
|
476
|
-
private router;
|
|
477
|
-
ngOnInit(): void;
|
|
478
|
-
login(): rxjs.Subscription;
|
|
479
|
-
onLoginError(error: HttpErrorResponse): void;
|
|
480
|
-
onLoggedIn(): void;
|
|
481
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LandingComponent, never>;
|
|
482
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LandingComponent, "lib-landing", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
473
|
declare class FeedbackComponent {
|
|
486
474
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeedbackComponent, never>;
|
|
487
475
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeedbackComponent, "lib-feedback", never, {}, {}, never, never, true, never>;
|
|
@@ -967,5 +955,5 @@ declare class OrganizationEditComponent extends EditView<IOrganizationDetail, IO
|
|
|
967
955
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OrganizationEditComponent, "lib-organization-edit", never, {}, {}, never, never, true, never>;
|
|
968
956
|
}
|
|
969
957
|
|
|
970
|
-
export { Address, AddressDetailComponent, AddressEditComponent, AddressForm, AddressService, ApiError, AvatarComponent, BackButtonComponent, DetailHeaderComponent, DetailView, DynamicFormBuilderComponent, DynamicFormComponent, DynamicFormForm, EditView, ErrorCode, FORM_FIELD_CHOICES, FeedbackComponent, FieldType, FileRecord, FileUploadComponent, FormFieldDetailComponent, FormFieldEditComponent, FormFieldValueForm, FormService, Group, GroupComponent, GroupDetailComponent, GroupService, ItemQuery, ItemService, ItemWithUserService,
|
|
971
|
-
export type { IAddressBase, IAddressCreate, IAddressDetail, IAddressForm, IAddressList, ICountry, IDynamicFormForm, IFieldFile, IFileRecord, IForm, IFormCreate, IFormDetail, IFormFieldBase, IFormFieldCreate, IFormFieldDetail, IFormFieldValueBase, IFormFieldValueCreate, IFormFieldValueDetail, IFormFieldValueForm, IFormFieldValueUpdate, IFormGroupBase, IFormGroupCreate, IFormGroupDetail, IFormGroupUpdate, IFormUpdate, IGroupBase, IGroupCreate, IGroupDetail, IGroupList, IItemQuery, IMemberIdentifierBase, IMemberIdentifierCreate, IMemberIdentifierDetail, IOrganizationBase, IOrganizationCreate, IOrganizationDetail, IOrganizationList, IPaginated, IPermission, IPopulatedFormCreate, IPopulatedFormDetail, IPopulatedFormForm, IPopulatedFormUpdate, IPortalMemberBase, IPortalMemberCreate, IPortalMemberDetail, IPortalMemberList, IRestOptions, Identifiable, LeftNavCategory, LeftNavOption, NavGroup, NavOption, OptionAction, OptionActionChoice, RestServiceConfig, Selectable, TableColumn, TypeChoice };
|
|
958
|
+
export { Address, AddressDetailComponent, AddressEditComponent, AddressForm, AddressService, ApiError, AvatarComponent, BackButtonComponent, DetailHeaderComponent, DetailView, DynamicFormBuilderComponent, DynamicFormComponent, DynamicFormForm, EditView, ErrorCode, FORM_FIELD_CHOICES, FeedbackComponent, FieldType, FileRecord, FileUploadComponent, FormFieldDetailComponent, FormFieldEditComponent, FormFieldValueForm, FormService, Group, GroupComponent, GroupDetailComponent, GroupService, ItemQuery, ItemService, ItemWithUserService, LeftNavComponent, LeftNavService, ListTableViewComponent, ListViewComponent, MemberSelectionManager, MockItemService, Organization, OrganizationComponent, OrganizationDetailComponent, OrganizationEditComponent, OrganizationService, Paginated, Permission, PopulatedFormComponent, PopulatedFormForm, PortalMember, REST_SERVICE_CONFIG, ResolvedPermission, RestService, SearchBarComponent, SelectTableComponent, SelectionManager, TopBarComponent, UserComponent, UserDetailComponent, UserEditComponent, UserService, getFieldTypeFromKey };
|
|
959
|
+
export type { IAddressBase, IAddressCreate, IAddressDetail, IAddressForm, IAddressList, ICountry, IDynamicFormForm, IFieldFile, IFileRecord, IForm, IFormCreate, IFormDetail, IFormFieldBase, IFormFieldCreate, IFormFieldDetail, IFormFieldValueBase, IFormFieldValueCreate, IFormFieldValueDetail, IFormFieldValueForm, IFormFieldValueUpdate, IFormGroupBase, IFormGroupCreate, IFormGroupDetail, IFormGroupUpdate, IFormUpdate, IGroupBase, IGroupCreate, IGroupDetail, IGroupList, IItemQuery, IMemberIdentifierBase, IMemberIdentifierCreate, IMemberIdentifierDetail, IOrganizationBase, IOrganizationCreate, IOrganizationDetail, IOrganizationList, IPaginated, IPermission, IPopulatedFormCreate, IPopulatedFormDetail, IPopulatedFormForm, IPopulatedFormUpdate, IPortalMemberBase, IPortalMemberCreate, IPortalMemberDetail, IPortalMemberList, IRestOptions, IServerManifest, Identifiable, LeftNavCategory, LeftNavOption, NavGroup, NavOption, OptionAction, OptionActionChoice, RestServiceConfig, Selectable, TableColumn, TypeChoice };
|