@porscheinformatik/clr-addons 17.5.4 → 17.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.
@@ -1,9 +1,11 @@
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 { HistoryProvider } from './history.provider';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ClrHistoryPinned implements OnInit, OnDestroy {
6
7
  private historyService;
8
+ private historyProvider;
7
9
  username: string;
8
10
  context: {
9
11
  [key: string]: string;
@@ -15,9 +17,9 @@ export declare class ClrHistoryPinned implements OnInit, OnDestroy {
15
17
  historyElements: ClrHistoryModel[];
16
18
  active: boolean;
17
19
  private settingsSubscription;
18
- constructor(historyService: ClrHistoryService);
20
+ constructor(historyService: ClrHistoryService, historyProvider: HistoryProvider);
19
21
  ngOnInit(): void;
20
22
  ngOnDestroy(): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryPinned, never>;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryPinned, [null, { optional: true; }]>;
22
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>;
23
25
  }
@@ -1,9 +1,11 @@
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 { HistoryProvider } from './history.provider';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ClrHistory implements OnInit, OnDestroy {
6
7
  private historyService;
8
+ private historyProvider;
7
9
  username: string;
8
10
  context: {
9
11
  [key: string]: string;
@@ -20,11 +22,11 @@ export declare class ClrHistory implements OnInit, OnDestroy {
20
22
  historyElements: ClrHistoryModel[];
21
23
  pinActivated: boolean;
22
24
  private onDestroy$;
23
- constructor(historyService: ClrHistoryService);
25
+ constructor(historyService: ClrHistoryService, historyProvider: HistoryProvider);
24
26
  ngOnInit(): void;
25
27
  ngOnDestroy(): void;
26
28
  select(history: ClrHistoryModel): void;
27
29
  togglePinHistory(): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistory, never>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistory, [null, { optional: true; }]>;
29
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>;
30
32
  }
@@ -0,0 +1,15 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { ClrHistoryModel } from './history-model.interface';
3
+ export declare const HISTORY_PROVIDER: InjectionToken<any>;
4
+ /**
5
+ * Interface to be implemented by a history provider to adjust the behavior of the history components.
6
+ * */
7
+ export declare abstract class HistoryProvider {
8
+ /**
9
+ * Modifies the history entries before they are displayed. The list of modified entries will be shown to the user.
10
+ *
11
+ * @param entries The history entries before modification
12
+ * @returns The modified history entries
13
+ */
14
+ abstract getModifiedHistoryEntries(entries: ClrHistoryModel[]): ClrHistoryModel[];
15
+ }
@@ -3,3 +3,4 @@ export * from './history-pinned';
3
3
  export * from './history.module';
4
4
  export * from './history-model.interface';
5
5
  export * from './history.service';
6
+ export * from './history.provider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porscheinformatik/clr-addons",
3
- "version": "17.5.4",
3
+ "version": "17.6.0",
4
4
  "description": "Addon components for Clarity Angular",
5
5
  "es2015": "esm2015/clr-addons.js",
6
6
  "homepage": "https://porscheinformatik.github.io/clarity-addons/",