@porscheinformatik/clr-addons 19.5.6 → 19.6.0
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/fesm2022/clr-addons.mjs +103 -167
- package/fesm2022/clr-addons.mjs.map +1 -1
- package/history/history-model.interface.d.ts +5 -15
- package/history/history-pinned.d.ts +8 -8
- package/history/history.d.ts +8 -8
- package/history/history.http.impl.service.d.ts +16 -0
- package/history/history.http.service.d.ts +9 -0
- package/history/history.service.d.ts +10 -32
- package/history/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9,15 +9,14 @@ export interface ClrHistoryModel {
|
|
|
9
9
|
* The name of the page
|
|
10
10
|
*/
|
|
11
11
|
pageName: string;
|
|
12
|
+
/**
|
|
13
|
+
* The tenant ID
|
|
14
|
+
*/
|
|
15
|
+
tenantId: string;
|
|
12
16
|
/**
|
|
13
17
|
* The context of the page
|
|
14
18
|
*/
|
|
15
|
-
context
|
|
16
|
-
applicationName?: string;
|
|
17
|
-
tenantid: string;
|
|
18
|
-
context?: string;
|
|
19
|
-
[key: string]: string | undefined;
|
|
20
|
-
};
|
|
19
|
+
context?: string;
|
|
21
20
|
/**
|
|
22
21
|
* The title to be displayed.
|
|
23
22
|
*/
|
|
@@ -37,12 +36,3 @@ export interface ClrHistorySettingsModel {
|
|
|
37
36
|
*/
|
|
38
37
|
username: string;
|
|
39
38
|
}
|
|
40
|
-
export interface ClrHistoryNotificationModel {
|
|
41
|
-
username: string;
|
|
42
|
-
pageName: string;
|
|
43
|
-
applicationName?: string;
|
|
44
|
-
tenantId: string;
|
|
45
|
-
title: string;
|
|
46
|
-
url: string;
|
|
47
|
-
context?: string;
|
|
48
|
-
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ClrHistoryModel } from './history-model.interface';
|
|
3
3
|
import { ClrHistoryService } from './history.service';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
4
5
|
import { HistoryProvider } from './history.provider';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class ClrHistoryPinned implements OnInit, OnDestroy {
|
|
7
|
-
private historyService;
|
|
8
|
-
private historyProvider;
|
|
8
|
+
private readonly historyService;
|
|
9
|
+
private readonly historyProvider;
|
|
9
10
|
username: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
11
|
+
tenantId: string;
|
|
12
|
+
context: string;
|
|
13
13
|
domain: string;
|
|
14
14
|
/**
|
|
15
15
|
* The array of history elements to be displayed.
|
|
16
16
|
*/
|
|
17
|
-
historyElements
|
|
18
|
-
active
|
|
17
|
+
historyElements$: Subject<ClrHistoryModel[]>;
|
|
18
|
+
active$: Subject<boolean>;
|
|
19
19
|
private settingsSubscription;
|
|
20
20
|
constructor(historyService: ClrHistoryService, historyProvider: HistoryProvider);
|
|
21
21
|
ngOnInit(): void;
|
|
22
22
|
ngOnDestroy(): void;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryPinned, [null, { optional: true; }]>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrHistoryPinned, "clr-history-pinned", never, { "username": { "alias": "clrUsername"; "required": false; }; "context": { "alias": "clrContext"; "required": false; }; "domain": { "alias": "clrDomain"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrHistoryPinned, "clr-history-pinned", never, { "username": { "alias": "clrUsername"; "required": false; }; "tenantId": { "alias": "clrTenantId"; "required": false; }; "context": { "alias": "clrContext"; "required": false; }; "domain": { "alias": "clrDomain"; "required": false; }; }, {}, never, never, false, never>;
|
|
25
25
|
}
|
package/history/history.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ClrHistoryModel } from './history-model.interface';
|
|
3
3
|
import { ClrHistoryService } from './history.service';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
4
5
|
import { HistoryProvider } from './history.provider';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class ClrHistory implements OnInit, OnDestroy {
|
|
7
|
-
private historyService;
|
|
8
|
-
private historyProvider;
|
|
8
|
+
private readonly historyService;
|
|
9
|
+
private readonly historyProvider;
|
|
9
10
|
username: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
11
|
+
tenantId: string;
|
|
12
|
+
context: string;
|
|
13
13
|
pinActive: boolean;
|
|
14
14
|
dropdownHeader: string;
|
|
15
15
|
dropdownPin: string;
|
|
@@ -19,14 +19,14 @@ export declare class ClrHistory implements OnInit, OnDestroy {
|
|
|
19
19
|
/**
|
|
20
20
|
* The array of history elements to be displayed.
|
|
21
21
|
*/
|
|
22
|
-
historyElements
|
|
22
|
+
historyElements$: Subject<ClrHistoryModel[]>;
|
|
23
23
|
pinActivated: boolean;
|
|
24
|
-
private onDestroy$;
|
|
24
|
+
private readonly onDestroy$;
|
|
25
25
|
constructor(historyService: ClrHistoryService, historyProvider: HistoryProvider);
|
|
26
26
|
ngOnInit(): void;
|
|
27
27
|
ngOnDestroy(): void;
|
|
28
28
|
select(history: ClrHistoryModel): void;
|
|
29
29
|
togglePinHistory(): void;
|
|
30
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistory, [null, { optional: true; }]>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrHistory, "clr-history", never, { "username": { "alias": "clrUsername"; "required": false; }; "context": { "alias": "clrContext"; "required": false; }; "pinActive": { "alias": "clrPinActive"; "required": false; }; "dropdownHeader": { "alias": "clrDropdownHeader"; "required": false; }; "dropdownPin": { "alias": "clrDropdownPin"; "required": false; }; "dropdownUnpin": { "alias": "clrDropdownUnpin"; "required": false; }; "domain": { "alias": "clrDomain"; "required": false; }; "position": { "alias": "clrPosition"; "required": false; }; }, {}, never, never, false, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrHistory, "clr-history", never, { "username": { "alias": "clrUsername"; "required": false; }; "tenantId": { "alias": "clrTenantId"; "required": false; }; "context": { "alias": "clrContext"; "required": false; }; "pinActive": { "alias": "clrPinActive"; "required": false; }; "dropdownHeader": { "alias": "clrDropdownHeader"; "required": false; }; "dropdownPin": { "alias": "clrDropdownPin"; "required": false; }; "dropdownUnpin": { "alias": "clrDropdownUnpin"; "required": false; }; "domain": { "alias": "clrDomain"; "required": false; }; "position": { "alias": "clrPosition"; "required": false; }; }, {}, never, never, false, never>;
|
|
32
32
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClrHistoryModel } from './history-model.interface';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import { ClrHistoryHttpService } from './history.http.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ClrHistoryHttpImplService implements ClrHistoryHttpService {
|
|
7
|
+
private readonly historyNotificationUrl;
|
|
8
|
+
private readonly httpClient;
|
|
9
|
+
constructor(historyNotificationUrl: string, httpClient: HttpClient);
|
|
10
|
+
addHistoryEntry(historyEntry: ClrHistoryModel): Observable<void>;
|
|
11
|
+
getHistory(username: string, tenantId: string): Observable<ClrHistoryModel[]>;
|
|
12
|
+
removeFromHistory(historyEntry: ClrHistoryModel): Observable<void>;
|
|
13
|
+
private buildGetHistoryUrl;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryHttpImplService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ClrHistoryHttpImplService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClrHistoryModel } from './history-model.interface';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { InjectionToken } from '@angular/core';
|
|
4
|
+
export declare const HISTORY_TOKEN: InjectionToken<any>;
|
|
5
|
+
export interface ClrHistoryHttpService {
|
|
6
|
+
addHistoryEntry(historyEntry: ClrHistoryModel): Observable<void>;
|
|
7
|
+
getHistory(username: string, tenantId: string): Observable<ClrHistoryModel[]>;
|
|
8
|
+
removeFromHistory(historyEntry: ClrHistoryModel): Observable<void>;
|
|
9
|
+
}
|
|
@@ -1,48 +1,26 @@
|
|
|
1
1
|
import { ClrHistoryModel, ClrHistorySettingsModel } from './history-model.interface';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import {
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
+
import { ClrHistoryHttpService } from './history.http.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ClrHistoryService {
|
|
6
|
-
private
|
|
7
|
-
private httpClient;
|
|
6
|
+
private readonly historyHttpService;
|
|
8
7
|
cookieSettings$: BehaviorSubject<ClrHistorySettingsModel[]>;
|
|
9
|
-
cookieName: string;
|
|
10
8
|
cookieNameSettings: string;
|
|
11
|
-
private expiryDate;
|
|
12
|
-
|
|
13
|
-
private maxUrlSize;
|
|
14
|
-
constructor(historyNotificationUrl: string, httpClient: HttpClient);
|
|
9
|
+
private readonly expiryDate;
|
|
10
|
+
constructor(historyHttpService: ClrHistoryHttpService);
|
|
15
11
|
/**
|
|
16
12
|
* Add a new history entry
|
|
17
13
|
* @param historyEntry The entry to be added
|
|
18
|
-
* @param domain The optional domain param where the cookie is stored
|
|
19
|
-
* @returns true when entry added, otherwise false is returned
|
|
20
14
|
*/
|
|
21
|
-
addHistoryEntry(historyEntry: ClrHistoryModel
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}): ClrHistoryModel[];
|
|
25
|
-
getHistory(username: string, context: {
|
|
26
|
-
[key: string]: string;
|
|
27
|
-
}): ClrHistoryModel[];
|
|
28
|
-
/**
|
|
29
|
-
* Set history
|
|
30
|
-
* @param entries
|
|
31
|
-
* @param domain
|
|
32
|
-
*/
|
|
33
|
-
private setHistory;
|
|
34
|
-
reduceSize(entries: ClrHistoryModel[]): ClrHistoryModel[];
|
|
35
|
-
resetHistory(): void;
|
|
36
|
-
removeFromHistory(entry: ClrHistoryModel): void;
|
|
37
|
-
private checkEqualContext;
|
|
15
|
+
addHistoryEntry(historyEntry: ClrHistoryModel): Observable<void>;
|
|
16
|
+
getHistory(username: string, tenantId: string): Observable<ClrHistoryModel[]>;
|
|
17
|
+
removeFromHistory(historyEntry: ClrHistoryModel): Observable<void>;
|
|
38
18
|
initializeCookieSettings(username: string, domain?: string): void;
|
|
39
19
|
setHistoryPinned(username: string, pin: boolean, domain?: string): void;
|
|
40
20
|
private getCookieByName;
|
|
41
|
-
private encode;
|
|
42
|
-
private decode;
|
|
43
21
|
private setCookie;
|
|
22
|
+
deleteOldCookie(domain?: string): void;
|
|
44
23
|
private getDomain;
|
|
45
|
-
|
|
46
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryService, [{ optional: true; }, { optional: true; }]>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryService, never>;
|
|
47
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<ClrHistoryService>;
|
|
48
26
|
}
|
package/history/index.d.ts
CHANGED
package/package.json
CHANGED