@webskills/ng-utils 3.3.12
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/README.md +5 -0
- package/esm2022/lib/angular/instanceOf.utils.mjs +4 -0
- package/esm2022/lib/breakpoints/breakpoints.mjs +20 -0
- package/esm2022/lib/color/constrast-color.mjs +24 -0
- package/esm2022/lib/content/anchor.utils.mjs +28 -0
- package/esm2022/lib/data-source/abstract-wsk-data-source.mjs +56 -0
- package/esm2022/lib/data-source/data-source.model.mjs +51 -0
- package/esm2022/lib/data-source/wsk-data-source.mjs +31 -0
- package/esm2022/lib/data-source/wsk-lazy-data-source.mjs +55 -0
- package/esm2022/lib/date-time/date-time.utils.mjs +20 -0
- package/esm2022/lib/date-time/date.utils.mjs +41 -0
- package/esm2022/lib/date-time/time.mjs +16 -0
- package/esm2022/lib/date-time/time.utils.mjs +99 -0
- package/esm2022/lib/form/abstract-control-value-accessor.directive.mjs +32 -0
- package/esm2022/lib/formValidation/formControlError.utils.mjs +33 -0
- package/esm2022/lib/formValidation/validation.utils.mjs +99 -0
- package/esm2022/lib/graphic.utils.mjs +11 -0
- package/esm2022/lib/immutability/freeze.utils.mjs +10 -0
- package/esm2022/lib/let/let.directive.mjs +23 -0
- package/esm2022/lib/locale/decimal-separator.mjs +3 -0
- package/esm2022/lib/object.utils.mjs +19 -0
- package/esm2022/lib/pipes/array/array.module.mjs +18 -0
- package/esm2022/lib/pipes/array/select-from-array.pipe.mjs +19 -0
- package/esm2022/lib/pipes/contains/contains.module.mjs +18 -0
- package/esm2022/lib/pipes/contains/contains.pipe.mjs +25 -0
- package/esm2022/lib/pipes/fallback/fallback.pipe.mjs +24 -0
- package/esm2022/lib/pipes/filter/filter.module.mjs +18 -0
- package/esm2022/lib/pipes/filter/filter.pipe.mjs +24 -0
- package/esm2022/lib/pipes/find/find.module.mjs +18 -0
- package/esm2022/lib/pipes/find/find.pipe.mjs +25 -0
- package/esm2022/lib/pipes/index.mjs +16 -0
- package/esm2022/lib/pipes/map/map.module.mjs +18 -0
- package/esm2022/lib/pipes/map/map.pipe.mjs +19 -0
- package/esm2022/lib/pipes/minutes/duration-minutes.pipe.mjs +21 -0
- package/esm2022/lib/pipes/minutes/minutes.module.mjs +19 -0
- package/esm2022/lib/pipes/minutes/minutes.pipe.mjs +21 -0
- package/esm2022/lib/pipes/transform/transform.pipe.mjs +21 -0
- package/esm2022/lib/rxjs/active-request.mjs +20 -0
- package/esm2022/lib/services/authn/auth.store.mjs +18 -0
- package/esm2022/lib/services/authn/authentication.adapter.mjs +3 -0
- package/esm2022/lib/services/authn/authentication.service.mjs +165 -0
- package/esm2022/lib/services/authn/authn.guard.mjs +42 -0
- package/esm2022/lib/services/authn/credentials.mjs +2 -0
- package/esm2022/lib/services/authn/jwt-auth-interceptor.service.mjs +37 -0
- package/esm2022/lib/services/authn/local-auth-status.mjs +2 -0
- package/esm2022/lib/services/authn/not-auth.guard.mjs +45 -0
- package/esm2022/lib/services/browser/browser-meta.service.mjs +69 -0
- package/esm2022/lib/services/browser/page-meta.mjs +2 -0
- package/esm2022/lib/services/configuration/config.mjs +27 -0
- package/esm2022/lib/services/edit/can-deactivate.guard.mjs +14 -0
- package/esm2022/lib/services/edit/id-compare.mjs +4 -0
- package/esm2022/lib/services/index.mjs +30 -0
- package/esm2022/lib/services/logging/ng-error-handler.mjs +16 -0
- package/esm2022/lib/services/routing/previous-route.service.mjs +28 -0
- package/esm2022/lib/services/store/abstract-entity-store.mjs +57 -0
- package/esm2022/lib/services/store/abstract-store.mjs +31 -0
- package/esm2022/lib/services/time/time.adapter.mjs +3 -0
- package/esm2022/lib/services/time/time.service.mjs +90 -0
- package/esm2022/lib/services/tracking/browser-tracking.service.mjs +77 -0
- package/esm2022/lib/services/tracking/click-tracking.directive.mjs +25 -0
- package/esm2022/lib/services/tracking/logging-backend-appender.mjs +19 -0
- package/esm2022/lib/services/tracking/tracking.adapter.mjs +3 -0
- package/esm2022/lib/services/tracking/tracking.mjs +2 -0
- package/esm2022/lib/services/tracking/tracking.module.mjs +18 -0
- package/esm2022/lib/services/tracking/tracking.service.mjs +84 -0
- package/esm2022/lib/services/user/local-user-account.mjs +2 -0
- package/esm2022/lib/services/user/user.adapter.mjs +3 -0
- package/esm2022/lib/services/user/user.service.mjs +50 -0
- package/esm2022/lib/viewport.utils.mjs +22 -0
- package/esm2022/lib/webcomponents/web-components.mjs +10 -0
- package/esm2022/public-api.mjs +26 -0
- package/esm2022/webskills-ng-utils.mjs +5 -0
- package/fesm2022/webskills-ng-utils.mjs +1808 -0
- package/fesm2022/webskills-ng-utils.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/angular/instanceOf.utils.d.ts +2 -0
- package/lib/breakpoints/breakpoints.d.ts +16 -0
- package/lib/color/constrast-color.d.ts +1 -0
- package/lib/content/anchor.utils.d.ts +3 -0
- package/lib/data-source/abstract-wsk-data-source.d.ts +35 -0
- package/lib/data-source/data-source.model.d.ts +51 -0
- package/lib/data-source/wsk-data-source.d.ts +11 -0
- package/lib/data-source/wsk-lazy-data-source.d.ts +25 -0
- package/lib/date-time/date-time.utils.d.ts +8 -0
- package/lib/date-time/date.utils.d.ts +17 -0
- package/lib/date-time/time.d.ts +15 -0
- package/lib/date-time/time.utils.d.ts +39 -0
- package/lib/form/abstract-control-value-accessor.directive.d.ts +17 -0
- package/lib/formValidation/formControlError.utils.d.ts +16 -0
- package/lib/formValidation/validation.utils.d.ts +23 -0
- package/lib/graphic.utils.d.ts +16 -0
- package/lib/immutability/freeze.utils.d.ts +1 -0
- package/lib/let/let.directive.d.ts +13 -0
- package/lib/locale/decimal-separator.d.ts +3 -0
- package/lib/object.utils.d.ts +7 -0
- package/lib/pipes/array/array.module.d.ts +8 -0
- package/lib/pipes/array/select-from-array.pipe.d.ts +7 -0
- package/lib/pipes/contains/contains.module.d.ts +8 -0
- package/lib/pipes/contains/contains.pipe.d.ts +13 -0
- package/lib/pipes/fallback/fallback.pipe.d.ts +7 -0
- package/lib/pipes/filter/filter.module.d.ts +8 -0
- package/lib/pipes/filter/filter.pipe.d.ts +12 -0
- package/lib/pipes/find/find.module.d.ts +8 -0
- package/lib/pipes/find/find.pipe.d.ts +13 -0
- package/lib/pipes/index.d.ts +15 -0
- package/lib/pipes/map/map.module.d.ts +8 -0
- package/lib/pipes/map/map.pipe.d.ts +7 -0
- package/lib/pipes/minutes/duration-minutes.pipe.d.ts +7 -0
- package/lib/pipes/minutes/minutes.module.d.ts +9 -0
- package/lib/pipes/minutes/minutes.pipe.d.ts +7 -0
- package/lib/pipes/transform/transform.pipe.d.ts +7 -0
- package/lib/rxjs/active-request.d.ts +9 -0
- package/lib/services/authn/auth.store.d.ts +8 -0
- package/lib/services/authn/authentication.adapter.d.ts +11 -0
- package/lib/services/authn/authentication.service.d.ts +63 -0
- package/lib/services/authn/authn.guard.d.ts +15 -0
- package/lib/services/authn/credentials.d.ts +4 -0
- package/lib/services/authn/jwt-auth-interceptor.service.d.ts +12 -0
- package/lib/services/authn/local-auth-status.d.ts +7 -0
- package/lib/services/authn/not-auth.guard.d.ts +17 -0
- package/lib/services/browser/browser-meta.service.d.ts +16 -0
- package/lib/services/browser/page-meta.d.ts +10 -0
- package/lib/services/configuration/config.d.ts +19 -0
- package/lib/services/edit/can-deactivate.guard.d.ts +11 -0
- package/lib/services/edit/id-compare.d.ts +5 -0
- package/lib/services/index.d.ts +29 -0
- package/lib/services/logging/ng-error-handler.d.ts +11 -0
- package/lib/services/routing/previous-route.service.d.ts +11 -0
- package/lib/services/store/abstract-entity-store.d.ts +16 -0
- package/lib/services/store/abstract-store.d.ts +13 -0
- package/lib/services/time/time.adapter.d.ts +7 -0
- package/lib/services/time/time.service.d.ts +27 -0
- package/lib/services/tracking/browser-tracking.service.d.ts +16 -0
- package/lib/services/tracking/click-tracking.directive.d.ts +10 -0
- package/lib/services/tracking/logging-backend-appender.d.ts +8 -0
- package/lib/services/tracking/tracking.adapter.d.ts +9 -0
- package/lib/services/tracking/tracking.d.ts +84 -0
- package/lib/services/tracking/tracking.module.d.ts +8 -0
- package/lib/services/tracking/tracking.service.d.ts +28 -0
- package/lib/services/user/local-user-account.d.ts +15 -0
- package/lib/services/user/user.adapter.d.ts +17 -0
- package/lib/services/user/user.service.d.ts +27 -0
- package/lib/viewport.utils.d.ts +2 -0
- package/lib/webcomponents/web-components.d.ts +2 -0
- package/package.json +30 -0
- package/public-api.d.ts +25 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Rect {
|
|
6
|
+
tl: Point;
|
|
7
|
+
br: Point;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Test whether the specified is within the rectangle.
|
|
11
|
+
*
|
|
12
|
+
* @param {Point} p
|
|
13
|
+
* @param {Rect} b
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
export declare function isInRect(p: Point, b: Rect): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deepFreeze<T>(obj: T): T;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface LetContext<T> {
|
|
4
|
+
wskLet: T;
|
|
5
|
+
}
|
|
6
|
+
export declare class LetDirective<T> {
|
|
7
|
+
private context;
|
|
8
|
+
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<LetContext<T>>);
|
|
9
|
+
set wskLet(value: T);
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LetDirective<any>, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LetDirective<any>, "[wskLet]", never, { "wskLet": { "alias": "wskLet"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./select-from-array.pipe";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class ArrayModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ArrayModule, [typeof i1.SelectFromArrayPipe], [typeof i2.CommonModule], [typeof i1.SelectFromArrayPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ArrayModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SelectFromArrayPipe implements PipeTransform {
|
|
4
|
+
transform<T>(value: T[], index: number): T | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectFromArrayPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SelectFromArrayPipe, "selectFromArray", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./contains.pipe";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class ContainsModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContainsModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ContainsModule, [typeof i1.ContainsPipe], [typeof i2.CommonModule], [typeof i1.ContainsPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ContainsModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ContainsPipe<T> implements PipeTransform {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param value data that is searched
|
|
7
|
+
* @param func callback function in order to find the required entry
|
|
8
|
+
* @param data data that is passed as second argument to the callback function
|
|
9
|
+
*/
|
|
10
|
+
transform(value: T[], func: (v: T, data: any) => boolean, data: any): boolean;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContainsPipe<any>, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ContainsPipe<any>, "contains", false>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FallbackPipe implements PipeTransform {
|
|
4
|
+
transform<T>(value: T, fallback: T): T;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FallbackPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FallbackPipe, "fallback", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./filter.pipe";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class FilterModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FilterModule, [typeof i1.FilterPipe], [typeof i2.CommonModule], [typeof i1.FilterPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FilterModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FilterPipe<T, P = unknown> implements PipeTransform {
|
|
4
|
+
/**
|
|
5
|
+
* @param value list that will be filtered
|
|
6
|
+
* @param predicate function to test each value element
|
|
7
|
+
* @param param optional additional parameter that is passed into the predicate function
|
|
8
|
+
*/
|
|
9
|
+
transform(value: T[], predicate: (v: T, param?: P) => boolean, param?: P): T[] | undefined;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterPipe<any, any>, never>;
|
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FilterPipe<any, any>, "filter", false>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./find.pipe";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class FindModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FindModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FindModule, [typeof i1.FindPipe], [typeof i2.CommonModule], [typeof i1.FindPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FindModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FindPipe<T> implements PipeTransform {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param value data that is searched
|
|
7
|
+
* @param func callback function in order to find the required entry
|
|
8
|
+
* @param data data that is passed as second argument to the callback function
|
|
9
|
+
*/
|
|
10
|
+
transform(value: T[], func: (v: T, data: any) => boolean, data: any): T | undefined;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FindPipe<any>, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FindPipe<any>, "find", false>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './contains/contains.pipe';
|
|
2
|
+
export * from './contains/contains.module';
|
|
3
|
+
export * from './filter/filter.pipe';
|
|
4
|
+
export * from './filter/filter.module';
|
|
5
|
+
export * from './find/find.pipe';
|
|
6
|
+
export * from './find/find.module';
|
|
7
|
+
export * from './map/map.pipe';
|
|
8
|
+
export * from './map/map.module';
|
|
9
|
+
export * from './minutes/minutes.pipe';
|
|
10
|
+
export * from './minutes/duration-minutes.pipe';
|
|
11
|
+
export * from './minutes/minutes.module';
|
|
12
|
+
export * from './array/select-from-array.pipe';
|
|
13
|
+
export * from './array/array.module';
|
|
14
|
+
export * from './transform/transform.pipe';
|
|
15
|
+
export * from './fallback/fallback.pipe';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./map.pipe";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class MapModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MapModule, [typeof i1.MapPipe], [typeof i2.CommonModule], [typeof i1.MapPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MapModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MapPipe<T, R> implements PipeTransform {
|
|
4
|
+
transform(value: T[], func: (v: T) => R): R[] | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapPipe<any, any>, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MapPipe<any, any>, "map", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DurationMinutesPipe implements PipeTransform {
|
|
4
|
+
transform(minutes: number): string | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DurationMinutesPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DurationMinutesPipe, "durationMinutes", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./minutes.pipe";
|
|
3
|
+
import * as i2 from "./duration-minutes.pipe";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class MinutesModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MinutesModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MinutesModule, [typeof i1.MinutesPipe, typeof i2.DurationMinutesPipe], [typeof i3.CommonModule], [typeof i1.MinutesPipe, typeof i2.DurationMinutesPipe]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MinutesModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MinutesPipe implements PipeTransform {
|
|
4
|
+
transform(minutes: number): string | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MinutesPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MinutesPipe, "minutes", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TransformPipe<T, R> implements PipeTransform {
|
|
4
|
+
transform(value: T | undefined, func: (v: T) => R): R | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TransformPipe<any, any>, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TransformPipe<any, any>, "transform", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
export declare function indicate<T>(indicator: Subject<boolean>): (source: Observable<T>) => Observable<T>;
|
|
3
|
+
/**
|
|
4
|
+
* Invokes a callback upon subscription.
|
|
5
|
+
*
|
|
6
|
+
* @param callback function to invoke upon subscription
|
|
7
|
+
* @returns stream which will invoke callback
|
|
8
|
+
*/
|
|
9
|
+
export declare function prepare<T>(callback: () => void): (source: Observable<T>) => Observable<T>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractStore } from '../store/abstract-store';
|
|
2
|
+
import { LocalAuthStatus } from './local-auth-status';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AuthStore extends AbstractStore<LocalAuthStatus> {
|
|
5
|
+
constructor();
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthStore, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthStore>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Credentials } from './credentials';
|
|
3
|
+
import { LocalUserAccount } from '../user/local-user-account';
|
|
4
|
+
export declare abstract class AuthenticationAdapter {
|
|
5
|
+
abstract testSessionValid(): Observable<boolean>;
|
|
6
|
+
abstract logout(sessionId: string): Observable<void>;
|
|
7
|
+
abstract login(credentials: Credentials): Observable<{
|
|
8
|
+
sessionId: string;
|
|
9
|
+
user: LocalUserAccount;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Credentials } from './credentials';
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
import { UserService } from '../user/user.service';
|
|
6
|
+
import { AuthenticationAdapter } from './authentication.adapter';
|
|
7
|
+
import { UserAdapter } from '../user/user.adapter';
|
|
8
|
+
import { AuthStore } from './auth.store';
|
|
9
|
+
import { TrackingService } from '../tracking/tracking.service';
|
|
10
|
+
import { Config } from '../configuration/config';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class AuthenticationService implements OnDestroy {
|
|
13
|
+
private userService;
|
|
14
|
+
private readonly config;
|
|
15
|
+
private router;
|
|
16
|
+
private authAdapter;
|
|
17
|
+
private userAdapter;
|
|
18
|
+
private authStore;
|
|
19
|
+
private trackingService;
|
|
20
|
+
private logger;
|
|
21
|
+
private destroyed$;
|
|
22
|
+
constructor(userService: UserService, config: Config<never>, router: Router, authAdapter: AuthenticationAdapter, userAdapter: UserAdapter, authStore: AuthStore, trackingService: TrackingService);
|
|
23
|
+
ngOnDestroy(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Test the current session against the backend.
|
|
26
|
+
*/
|
|
27
|
+
private testSessionValid;
|
|
28
|
+
/**
|
|
29
|
+
* Use the existing session id to check against the backend whether the session is still active.
|
|
30
|
+
*
|
|
31
|
+
* E.g. during app (after a reload etc.) the previous login state must be restored.
|
|
32
|
+
*/
|
|
33
|
+
recoverSession(): Observable<boolean>;
|
|
34
|
+
private insertSessionInformationIntoStore;
|
|
35
|
+
/**
|
|
36
|
+
* Perform a login against the backend and store the session and user information in the frontend.
|
|
37
|
+
*
|
|
38
|
+
* @param credentials
|
|
39
|
+
*/
|
|
40
|
+
login(credentials: Credentials): Observable<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Perform a logout against the backend and remove locally stored session and user information.
|
|
43
|
+
*/
|
|
44
|
+
logout(): Observable<void>;
|
|
45
|
+
isLoggedIn(): Observable<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* Reset the auth state in the app.
|
|
48
|
+
*/
|
|
49
|
+
private resetAuthStatus;
|
|
50
|
+
getSessionId(): string;
|
|
51
|
+
isLoggedInInstant(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Start a timer that continuously checks the session.
|
|
54
|
+
*/
|
|
55
|
+
private startSessionCheck;
|
|
56
|
+
validateSession(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Perform a logout that is triggered by the app
|
|
59
|
+
*/
|
|
60
|
+
appLogout(): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, never>;
|
|
62
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
|
2
|
+
import { AuthenticationService } from './authentication.service';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AuthGuard {
|
|
6
|
+
private authService;
|
|
7
|
+
private router;
|
|
8
|
+
constructor(authService: AuthenticationService, router: Router);
|
|
9
|
+
private checkLogin;
|
|
10
|
+
canLoad(): Observable<boolean>;
|
|
11
|
+
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree>;
|
|
12
|
+
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AuthenticationService } from './authentication.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class JwtAuthInterceptor implements HttpInterceptor {
|
|
6
|
+
private authService;
|
|
7
|
+
constructor(authService: AuthenticationService);
|
|
8
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
9
|
+
private interceptHttp401Error;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JwtAuthInterceptor, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JwtAuthInterceptor>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Router, UrlTree } from '@angular/router';
|
|
2
|
+
import { AuthenticationService } from './authentication.service';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { PreviousRouteService } from '../routing/previous-route.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NotAuthGuard {
|
|
7
|
+
private authService;
|
|
8
|
+
private router;
|
|
9
|
+
private previousRouteService;
|
|
10
|
+
constructor(authService: AuthenticationService, router: Router, previousRouteService: PreviousRouteService);
|
|
11
|
+
private checkLoggedOut;
|
|
12
|
+
canLoad(): Observable<boolean>;
|
|
13
|
+
canActivate(): Observable<boolean | UrlTree>;
|
|
14
|
+
canActivateChild(): Observable<boolean | UrlTree>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotAuthGuard, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NotAuthGuard>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { PageMeta } from './page-meta';
|
|
3
|
+
import { Meta } from '@angular/platform-browser';
|
|
4
|
+
import { Config } from '../configuration/config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class BrowserMetaService {
|
|
7
|
+
private router;
|
|
8
|
+
private meta;
|
|
9
|
+
private readonly config;
|
|
10
|
+
constructor(router: Router, meta: Meta, config: Config<never>);
|
|
11
|
+
init(): void;
|
|
12
|
+
setPageMetaData(meta?: PageMeta, pageTitle?: string): void;
|
|
13
|
+
private setOrRemoveTag;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserMetaService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserMetaService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export interface EnvironmentConfig extends Record<string, unknown> {
|
|
3
|
+
production: boolean;
|
|
4
|
+
apiBasePath: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class Config<T extends EnvironmentConfig> {
|
|
7
|
+
values: T;
|
|
8
|
+
constructor(values: T);
|
|
9
|
+
get production(): boolean;
|
|
10
|
+
get apiBasePath(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Get the value for a specified config option or fallback to the specified default value.
|
|
13
|
+
*
|
|
14
|
+
* @param name of the config option
|
|
15
|
+
* @param defaultValue value that is used when config option is not specified elsewhere
|
|
16
|
+
*/
|
|
17
|
+
getProperty<V>(name: string, defaultValue: V): V;
|
|
18
|
+
}
|
|
19
|
+
export declare const CONFIG: InjectionToken<Config<never>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { UrlTree } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface CanDeactivateComponent {
|
|
5
|
+
canDeactivate(): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
|
6
|
+
}
|
|
7
|
+
export declare class CanDeactivateGuard {
|
|
8
|
+
canDeactivate(component: CanDeactivateComponent): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CanDeactivateGuard, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CanDeactivateGuard>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './browser/browser-meta.service';
|
|
2
|
+
export * from './browser/page-meta';
|
|
3
|
+
export * from './authn/authn.guard';
|
|
4
|
+
export * from './authn/not-auth.guard';
|
|
5
|
+
export * from './authn/authentication.service';
|
|
6
|
+
export * from './authn/authentication.adapter';
|
|
7
|
+
export * from './authn/auth.store';
|
|
8
|
+
export * from './authn/credentials';
|
|
9
|
+
export * from './authn/jwt-auth-interceptor.service';
|
|
10
|
+
export * from './user/user.service';
|
|
11
|
+
export * from './user/user.adapter';
|
|
12
|
+
export * from './configuration/config';
|
|
13
|
+
export * from './authn/local-auth-status';
|
|
14
|
+
export * from './user/local-user-account';
|
|
15
|
+
export * from './routing/previous-route.service';
|
|
16
|
+
export * from './store/abstract-store';
|
|
17
|
+
export * from './store/abstract-entity-store';
|
|
18
|
+
export * from './time/time.service';
|
|
19
|
+
export * from './time/time.adapter';
|
|
20
|
+
export * from './edit/can-deactivate.guard';
|
|
21
|
+
export * from './edit/id-compare';
|
|
22
|
+
export * from './tracking/browser-tracking.service';
|
|
23
|
+
export * from './tracking/click-tracking.directive';
|
|
24
|
+
export * from './tracking/logging-backend-appender';
|
|
25
|
+
export * from './tracking/tracking.adapter';
|
|
26
|
+
export * from './tracking/tracking.module';
|
|
27
|
+
export * from './tracking/tracking.service';
|
|
28
|
+
export * from './tracking/tracking';
|
|
29
|
+
export * from './logging/ng-error-handler';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ErrorHandler } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Use as follows in main module
|
|
4
|
+
* ```
|
|
5
|
+
* { provide: ErrorHandler, useClass: NgErrorHandler },
|
|
6
|
+
* ```
|
|
7
|
+
*/
|
|
8
|
+
export declare class NgErrorHandler implements ErrorHandler {
|
|
9
|
+
private logger;
|
|
10
|
+
handleError(error: any): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class PreviousRouteService {
|
|
4
|
+
private router;
|
|
5
|
+
private previousUrl?;
|
|
6
|
+
private currentUrl;
|
|
7
|
+
constructor(router: Router);
|
|
8
|
+
getPreviousUrl(): string | undefined;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PreviousRouteService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PreviousRouteService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractStore } from './abstract-store';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
type ID = string | null | undefined;
|
|
4
|
+
export declare abstract class AbstractEntityStore<T extends {
|
|
5
|
+
id?: ID;
|
|
6
|
+
}> extends AbstractStore<T[]> {
|
|
7
|
+
insertEntity(value: T): void;
|
|
8
|
+
upsertEntity(value: T): void;
|
|
9
|
+
updateEntity(value: T): void;
|
|
10
|
+
private replaceValueAtIndex;
|
|
11
|
+
deleteEntity(id: string): void;
|
|
12
|
+
private getIdx;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractEntityStore<any>, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractEntityStore<any>, never, never, {}, {}, never, never, false, never>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare abstract class AbstractStore<T> implements OnDestroy {
|
|
5
|
+
private _value$;
|
|
6
|
+
get value$(): Observable<T>;
|
|
7
|
+
protected constructor(initialValue: T);
|
|
8
|
+
update(value: T): void;
|
|
9
|
+
getInstant(): T;
|
|
10
|
+
ngOnDestroy(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractStore<any>, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractStore<any>, never, never, {}, {}, never, never, false, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { TimeAdapter } from './time.adapter';
|
|
3
|
+
import { TrackingService } from '../tracking/tracking.service';
|
|
4
|
+
import { Config } from '../configuration/config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TimeService implements OnDestroy {
|
|
7
|
+
private readonly config;
|
|
8
|
+
private timeAdapter;
|
|
9
|
+
private trackingService;
|
|
10
|
+
private logger;
|
|
11
|
+
private componentDestroyed$;
|
|
12
|
+
private offset;
|
|
13
|
+
constructor(config: Config<never>, timeAdapter: TimeAdapter, trackingService: TrackingService);
|
|
14
|
+
init(): void;
|
|
15
|
+
_calcOffset(requestStart: Date, serverTime: Date, now: Date): number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Get the current server time as Date object
|
|
18
|
+
*/
|
|
19
|
+
getCurrentDate(): Date;
|
|
20
|
+
/**
|
|
21
|
+
* Get the current server time in ms
|
|
22
|
+
*/
|
|
23
|
+
getCurrentMs(): number;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TimeService>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { TrackingService } from './tracking.service';
|
|
3
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BrowserTrackingService {
|
|
6
|
+
private trackingService;
|
|
7
|
+
private router;
|
|
8
|
+
private breakpointObserver;
|
|
9
|
+
private readonly isBrowser;
|
|
10
|
+
constructor(trackingService: TrackingService, router: Router, breakpointObserver: BreakpointObserver, platformId: NonNullable<unknown>);
|
|
11
|
+
init(): void;
|
|
12
|
+
private trackBreakpoints;
|
|
13
|
+
private trackUa;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserTrackingService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserTrackingService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppTrackingInteractionEvent, TrackingService } from './tracking.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ClickTrackingDirective {
|
|
4
|
+
private trackingService;
|
|
5
|
+
wskClickTracking: AppTrackingInteractionEvent;
|
|
6
|
+
onClick(): void;
|
|
7
|
+
constructor(trackingService: TrackingService);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClickTrackingDirective, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ClickTrackingDirective, "[wskClickTracking]", never, { "wskClickTracking": { "alias": "wskClickTracking"; "required": false; }; }, {}, never, never, false, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Appender, LogLevel } from '@webskills/logging';
|
|
2
|
+
import { TrackingAdapter } from './tracking.adapter';
|
|
3
|
+
export declare class LoggingBackendAppender implements Appender {
|
|
4
|
+
level: LogLevel;
|
|
5
|
+
private logAdapter;
|
|
6
|
+
constructor(level: LogLevel, logAdapter: TrackingAdapter);
|
|
7
|
+
appendMessage(name: string, level: LogLevel, message: any, additional: any[]): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Info, Interaction, LogMessage, Session, UserAgent, Visit } from './tracking';
|
|
2
|
+
export declare abstract class TrackingAdapter {
|
|
3
|
+
abstract trackUserAgent(ua: UserAgent): void;
|
|
4
|
+
abstract trackInteraction(interaction: Interaction): void;
|
|
5
|
+
abstract trackInfo(info: Info): void;
|
|
6
|
+
abstract trackVisit(visit: Visit): void;
|
|
7
|
+
abstract trackLog(log: LogMessage): void;
|
|
8
|
+
abstract trackSession(session: Session): void;
|
|
9
|
+
}
|