@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,84 @@
|
|
|
1
|
+
export interface UserAgent {
|
|
2
|
+
/**
|
|
3
|
+
* session id
|
|
4
|
+
*/
|
|
5
|
+
sId?: string;
|
|
6
|
+
ua?: string;
|
|
7
|
+
/**
|
|
8
|
+
* This value is used to detect the visitor's country if GeoIP is not enabled.
|
|
9
|
+
*/
|
|
10
|
+
lng?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The resolution of the device the visitor is using
|
|
13
|
+
*/
|
|
14
|
+
res?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Timezone
|
|
17
|
+
*/
|
|
18
|
+
tz?: string;
|
|
19
|
+
/**
|
|
20
|
+
* cookies supported
|
|
21
|
+
*/
|
|
22
|
+
c?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface Interaction {
|
|
25
|
+
url?: string;
|
|
26
|
+
/**
|
|
27
|
+
* session id
|
|
28
|
+
*/
|
|
29
|
+
sId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* event
|
|
32
|
+
*/
|
|
33
|
+
e: string;
|
|
34
|
+
/**
|
|
35
|
+
* data
|
|
36
|
+
*/
|
|
37
|
+
d?: any;
|
|
38
|
+
/**
|
|
39
|
+
* component
|
|
40
|
+
*/
|
|
41
|
+
c: string;
|
|
42
|
+
}
|
|
43
|
+
export interface Visit {
|
|
44
|
+
url?: string;
|
|
45
|
+
/**
|
|
46
|
+
* session id
|
|
47
|
+
*/
|
|
48
|
+
sId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* component view
|
|
51
|
+
*/
|
|
52
|
+
c?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface Info {
|
|
55
|
+
url?: string;
|
|
56
|
+
/**
|
|
57
|
+
* session id
|
|
58
|
+
*/
|
|
59
|
+
sId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* name
|
|
62
|
+
*/
|
|
63
|
+
n: string;
|
|
64
|
+
/**
|
|
65
|
+
* data
|
|
66
|
+
*/
|
|
67
|
+
d?: any;
|
|
68
|
+
}
|
|
69
|
+
export interface LogMessage {
|
|
70
|
+
name: string;
|
|
71
|
+
level: string;
|
|
72
|
+
messages: string[];
|
|
73
|
+
sId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface Session {
|
|
76
|
+
browserId?: string;
|
|
77
|
+
referrer?: string;
|
|
78
|
+
utmSource?: string;
|
|
79
|
+
utmMedium?: string;
|
|
80
|
+
utmCampaign?: string;
|
|
81
|
+
utmTerm?: string;
|
|
82
|
+
utmContent?: string;
|
|
83
|
+
sId?: string;
|
|
84
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./click-tracking.directive";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class TrackingModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TrackingModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TrackingModule, [typeof i1.ClickTrackingDirective], [typeof i2.CommonModule], [typeof i1.ClickTrackingDirective]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TrackingModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TrackingAdapter } from './tracking.adapter';
|
|
2
|
+
import { UserAgent } from './tracking';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface AppTrackingInteractionEvent {
|
|
5
|
+
component: string;
|
|
6
|
+
event: string;
|
|
7
|
+
data?: any;
|
|
8
|
+
}
|
|
9
|
+
export declare class TrackingService {
|
|
10
|
+
private adapter;
|
|
11
|
+
private readonly isBrowser;
|
|
12
|
+
constructor(adapter: TrackingAdapter, platformId: NonNullable<unknown>);
|
|
13
|
+
trackSession(): void;
|
|
14
|
+
trackInfo(info: {
|
|
15
|
+
data?: any;
|
|
16
|
+
name: string;
|
|
17
|
+
}): void;
|
|
18
|
+
trackInteraction(event: AppTrackingInteractionEvent): void;
|
|
19
|
+
trackVisit(event: {
|
|
20
|
+
component?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
}): void;
|
|
23
|
+
trackUserAgent(userAgent: UserAgent): void;
|
|
24
|
+
private enrichWithUrl;
|
|
25
|
+
private getBrowserUrl;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TrackingService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TrackingService>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User account that is managed by Apollo locally.
|
|
3
|
+
*/
|
|
4
|
+
export interface LocalUserAccount {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
avatarUrl: string;
|
|
9
|
+
avatarFileId: string;
|
|
10
|
+
gravatarEmail: string;
|
|
11
|
+
roles: {
|
|
12
|
+
tenantId: string;
|
|
13
|
+
permissions: string[];
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UserRegistrationData } from './user.service';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { LocalUserAccount } from './local-user-account';
|
|
4
|
+
export declare abstract class UserAdapter {
|
|
5
|
+
abstract registerUser(registerData: UserRegistrationData): Observable<LocalUserAccount>;
|
|
6
|
+
abstract changeEmailAddress(newEmailAddress: string, password: string): Observable<void>;
|
|
7
|
+
abstract confirmEmail(token: string): Observable<boolean>;
|
|
8
|
+
abstract confirmDeleteAccount(token: string): Observable<boolean>;
|
|
9
|
+
abstract changePassword(currentPassword: string, newPassword: string): Observable<void>;
|
|
10
|
+
abstract requestPasswordReset(email: string): Observable<void>;
|
|
11
|
+
abstract confirmPasswordReset(token: string, newPassword: string): Observable<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Get the user account. Return error if account could not be retrieved
|
|
14
|
+
*/
|
|
15
|
+
abstract getUser(sessionId?: string): Observable<LocalUserAccount>;
|
|
16
|
+
abstract deleteAccount(password: string): Observable<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { LocalUserAccount } from './local-user-account';
|
|
3
|
+
import { UserAdapter } from './user.adapter';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface UserRegistrationData {
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
password: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class UserService {
|
|
11
|
+
private userAdapter;
|
|
12
|
+
private _userAccount$;
|
|
13
|
+
userAccount$: Observable<LocalUserAccount | null>;
|
|
14
|
+
constructor(userAdapter: UserAdapter);
|
|
15
|
+
registerUser(registerData: UserRegistrationData): Observable<LocalUserAccount>;
|
|
16
|
+
setUserAccount(user: LocalUserAccount): void;
|
|
17
|
+
getUserAccount(): LocalUserAccount | null;
|
|
18
|
+
changePassword(currentPassword: string, newPassword: string): Observable<void>;
|
|
19
|
+
requestPasswordReset(email: string): Observable<void>;
|
|
20
|
+
confirmPasswordReset(token: string, newPassword: string): Observable<void>;
|
|
21
|
+
changeEmailAddress(newEmailAddress: string, password: string): Observable<void>;
|
|
22
|
+
confirmEmail(token: string): Observable<boolean>;
|
|
23
|
+
confirmDeleteAccount(token: string): Observable<boolean>;
|
|
24
|
+
deleteAccount(password: string): Observable<void>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webskills/ng-utils",
|
|
3
|
+
"author": "Kommerz.App",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"version": "3.3.12",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@angular/common": "^17.0.0",
|
|
8
|
+
"@angular/core": "^17.0.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"tslib": "^2.3.0"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"module": "fesm2022/webskills-ng-utils.mjs",
|
|
17
|
+
"typings": "index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"esm2022": "./esm2022/webskills-ng-utils.mjs",
|
|
25
|
+
"esm": "./esm2022/webskills-ng-utils.mjs",
|
|
26
|
+
"default": "./fesm2022/webskills-ng-utils.mjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false
|
|
30
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './lib/services';
|
|
2
|
+
export * from './lib/pipes';
|
|
3
|
+
export * from './lib/data-source/data-source.model';
|
|
4
|
+
export * from './lib/data-source/abstract-wsk-data-source';
|
|
5
|
+
export * from './lib/data-source/wsk-data-source';
|
|
6
|
+
export * from './lib/data-source/wsk-lazy-data-source';
|
|
7
|
+
export * from './lib/date-time/time.utils';
|
|
8
|
+
export * from './lib/date-time/date.utils';
|
|
9
|
+
export * from './lib/date-time/date-time.utils';
|
|
10
|
+
export * from './lib/date-time/time';
|
|
11
|
+
export * from './lib/breakpoints/breakpoints';
|
|
12
|
+
export * from './lib/color/constrast-color';
|
|
13
|
+
export * from './lib/content/anchor.utils';
|
|
14
|
+
export * from './lib/let/let.directive';
|
|
15
|
+
export * from './lib/webcomponents/web-components';
|
|
16
|
+
export * from './lib/object.utils';
|
|
17
|
+
export * from './lib/graphic.utils';
|
|
18
|
+
export * from './lib/viewport.utils';
|
|
19
|
+
export * from './lib/locale/decimal-separator';
|
|
20
|
+
export * from './lib/form/abstract-control-value-accessor.directive';
|
|
21
|
+
export * from './lib/formValidation/validation.utils';
|
|
22
|
+
export * from './lib/formValidation/formControlError.utils';
|
|
23
|
+
export * from './lib/rxjs/active-request';
|
|
24
|
+
export * from './lib/angular/instanceOf.utils';
|
|
25
|
+
export * from './lib/immutability/freeze.utils';
|