@porscheinformatik/clr-addons 19.11.2 → 19.11.4
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 +365 -76
- package/fesm2022/clr-addons.mjs.map +1 -1
- package/package.json +1 -1
- package/summary-area/summary-area/summary-area-state.service.d.ts +3 -2
- package/summary-area/summary-area/summary-area.d.ts +38 -8
- package/summary-area/summary-area/summary-area.model.d.ts +3 -2
- package/summary-area/summary-item/summary-item.d.ts +3 -1
- package/summary-area/summary-item-value/summary-item-value.d.ts +8 -1
- package/summary-area/summary-item-value-copy-button/summary-item-value-copy-button.d.ts +14 -4
package/package.json
CHANGED
|
@@ -3,11 +3,12 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare const defaultSummaryAreaCollapsedKey = "clrSummaryAreaCollapsed";
|
|
4
4
|
export declare class ClrSummaryAreaStateService {
|
|
5
5
|
private readonly collapsedMap;
|
|
6
|
+
private readonly effectsInitialized;
|
|
7
|
+
private readonly injector;
|
|
6
8
|
collapsed(key?: string): Signal<boolean>;
|
|
9
|
+
private scheduleEffectCreation;
|
|
7
10
|
toggle(key?: string): void;
|
|
8
11
|
setCollapsed(key: string, value: boolean): void;
|
|
9
|
-
private getOrCreateEntry;
|
|
10
|
-
private persistToStorage;
|
|
11
12
|
private readInitialState;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryAreaStateService, never>;
|
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<ClrSummaryAreaStateService>;
|
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import { AfterViewInit, QueryList, Signal } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, OnInit, QueryList, Signal } from '@angular/core';
|
|
2
2
|
import { ClrSummaryItem } from '../summary-item/summary-item';
|
|
3
3
|
import { ClrSummaryAreaColumns, ClrSummaryAreaRows, ClrSummaryAreaError, ClrSummaryAreaWarning, ClrSummaryAreaLoading } from './summary-area.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ClrSummaryArea implements AfterViewInit {
|
|
5
|
+
export declare class ClrSummaryArea implements OnInit, AfterViewInit, OnDestroy {
|
|
6
6
|
items: QueryList<ClrSummaryItem>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
panelsRef: ElementRef<HTMLElement>;
|
|
8
|
+
isCollapsed: Signal<boolean>;
|
|
9
|
+
rows: import("@angular/core").InputSignal<ClrSummaryAreaRows>;
|
|
10
|
+
localStorageKey: import("@angular/core").InputSignal<string>;
|
|
11
|
+
error: import("@angular/core").InputSignal<ClrSummaryAreaError>;
|
|
12
|
+
warning: import("@angular/core").InputSignal<ClrSummaryAreaWarning>;
|
|
13
|
+
loading: import("@angular/core").InputSignal<ClrSummaryAreaLoading>;
|
|
12
14
|
currentColumns: ClrSummaryAreaColumns;
|
|
13
15
|
currentRows: ClrSummaryAreaRows;
|
|
16
|
+
panelHeight: string;
|
|
17
|
+
loadingPanelHeight: string;
|
|
18
|
+
loadingVisible: boolean;
|
|
19
|
+
private prevErrorActive;
|
|
20
|
+
private prevWarningActive;
|
|
21
|
+
private prevCollapsed;
|
|
22
|
+
private prevHasLoading;
|
|
23
|
+
private loadingVisibleTimeout;
|
|
14
24
|
private readonly state;
|
|
15
25
|
private readonly cdr;
|
|
16
26
|
private readonly defaultLoadingText;
|
|
17
27
|
private readonly defaultErrorText;
|
|
18
28
|
private readonly defaultWarningText;
|
|
19
29
|
private readonly maxColumns;
|
|
20
|
-
|
|
30
|
+
private itemsSubscription?;
|
|
31
|
+
errorActive: Signal<boolean>;
|
|
32
|
+
warningActive: Signal<boolean>;
|
|
21
33
|
constructor();
|
|
34
|
+
ngOnInit(): void;
|
|
22
35
|
/**
|
|
23
36
|
* Depending on the current rows input only a specific amount of items can be visible to the user.
|
|
24
37
|
* The summary area only supports up to 5 columns.
|
|
@@ -39,7 +52,24 @@ export declare class ClrSummaryArea implements AfterViewInit {
|
|
|
39
52
|
get warningClick(): (() => void) | undefined;
|
|
40
53
|
onResize(): void;
|
|
41
54
|
ngAfterViewInit(): void;
|
|
55
|
+
ngOnDestroy(): void;
|
|
42
56
|
private updateGrid;
|
|
57
|
+
private updatePanelHeight;
|
|
58
|
+
private recalculatePanelHeight;
|
|
59
|
+
/**
|
|
60
|
+
* Calculate the expected grid height based on currentRows.
|
|
61
|
+
* This is used when the grid isn't rendered (e.g., during loading state).
|
|
62
|
+
* The loading container should match the grid height exactly.
|
|
63
|
+
*
|
|
64
|
+
* Grid structure:
|
|
65
|
+
* - .summary-area-container: margin 0 24px 9px 24px
|
|
66
|
+
* - .summary-grid: padding 3px 0, row-gap 6px
|
|
67
|
+
* - .summary-item: height 20px
|
|
68
|
+
*
|
|
69
|
+
* Formula: (rows * itemHeight) + ((rows - 1) * rowGap) + gridPadding + containerMargin
|
|
70
|
+
*/
|
|
71
|
+
private calculateGridHeight;
|
|
72
|
+
private animateCollapse;
|
|
43
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryArea, never>;
|
|
44
74
|
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryArea, "clr-summary-area", never, { "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "localStorageKey": { "alias": "localStorageKey"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, ["items"], never, true, never>;
|
|
45
75
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { WritableSignal } from '@angular/core';
|
|
1
2
|
export interface ClrSummaryAreaError {
|
|
2
|
-
active: boolean
|
|
3
|
+
active: WritableSignal<boolean>;
|
|
3
4
|
text?: string;
|
|
4
5
|
click?: () => void;
|
|
5
6
|
linkText?: string;
|
|
6
7
|
}
|
|
7
8
|
export interface ClrSummaryAreaWarning {
|
|
8
|
-
active: boolean
|
|
9
|
+
active: WritableSignal<boolean>;
|
|
9
10
|
text?: string;
|
|
10
11
|
click?: () => void;
|
|
11
12
|
linkText?: string;
|
|
@@ -13,6 +13,7 @@ export declare class ClrSummaryItem implements AfterContentInit, AfterViewChecke
|
|
|
13
13
|
editConfig: import("@angular/core").InputSignal<ClrSummaryItemEditConfig>;
|
|
14
14
|
showOnEmptyValue: import("@angular/core").InputSignal<boolean>;
|
|
15
15
|
valueCopyable: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
copyButtonTooltip: import("@angular/core").InputSignal<string>;
|
|
16
17
|
hasProjectedContent: boolean;
|
|
17
18
|
private readonly cdr;
|
|
18
19
|
private mutationObserver?;
|
|
@@ -52,6 +53,7 @@ export declare class ClrSummaryItem implements AfterContentInit, AfterViewChecke
|
|
|
52
53
|
private setupMutationObserver;
|
|
53
54
|
private scheduleContentCheck;
|
|
54
55
|
private updateProjectedContentFlag;
|
|
56
|
+
private hasNonIconTextValue;
|
|
55
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryItem, never>;
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryItem, "clr-summary-item", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "editConfig": { "alias": "editConfig"; "required": false; "isSignal": true; }; "showOnEmptyValue": { "alias": "showOnEmptyValue"; "required": false; "isSignal": true; }; "valueCopyable": { "alias": "valueCopyable"; "required": false; "isSignal": true; }; }, {}, ["valueChildren"], ["clr-summary-item-value", "*"], true, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryItem, "clr-summary-item", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "editConfig": { "alias": "editConfig"; "required": false; "isSignal": true; }; "showOnEmptyValue": { "alias": "showOnEmptyValue"; "required": false; "isSignal": true; }; "valueCopyable": { "alias": "valueCopyable"; "required": false; "isSignal": true; }; "copyButtonTooltip": { "alias": "copyButtonTooltip"; "required": false; "isSignal": true; }; }, {}, ["valueChildren"], ["clr-summary-item-value", "*"], true, never>;
|
|
57
59
|
}
|
|
@@ -16,6 +16,7 @@ export declare class ClrSummaryItemValue implements OnInit, AfterContentInit, Af
|
|
|
16
16
|
private contentCheckScheduled;
|
|
17
17
|
private readonly ngZone;
|
|
18
18
|
private readonly cdr;
|
|
19
|
+
constructor();
|
|
19
20
|
get hasIcon(): boolean;
|
|
20
21
|
get hasText(): boolean;
|
|
21
22
|
get isHidden(): boolean;
|
|
@@ -30,7 +31,8 @@ export declare class ClrSummaryItemValue implements OnInit, AfterContentInit, Af
|
|
|
30
31
|
get effectiveTooltip(): string | undefined;
|
|
31
32
|
/**
|
|
32
33
|
* Returns true if this component has any meaningful content to display.
|
|
33
|
-
* This includes: a value
|
|
34
|
+
* This includes: a value or projected content.
|
|
35
|
+
* An icon is considered special content and does not count as meaningful content alone.
|
|
34
36
|
*/
|
|
35
37
|
get hasMeaningfulContent(): boolean;
|
|
36
38
|
/**
|
|
@@ -46,6 +48,11 @@ export declare class ClrSummaryItemValue implements OnInit, AfterContentInit, Af
|
|
|
46
48
|
private scheduleContentCheck;
|
|
47
49
|
private setupOverflowDetection;
|
|
48
50
|
private checkTextOverflowSync;
|
|
51
|
+
/**
|
|
52
|
+
* Schedule an overflow check after the DOM has been updated.
|
|
53
|
+
* Uses setTimeout to ensure the check runs outside of change detection.
|
|
54
|
+
*/
|
|
55
|
+
private scheduleOverflowCheck;
|
|
49
56
|
/** @internal - Manually trigger projected content check. Useful for testing. */
|
|
50
57
|
checkProjectedContent(): void;
|
|
51
58
|
private hasMeaningfulContentRecursive;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ClrSummaryItemValueCopyButton {
|
|
3
|
+
export declare class ClrSummaryItemValueCopyButton implements OnInit, OnDestroy {
|
|
3
4
|
value: import("@angular/core").InputSignal<string>;
|
|
4
|
-
|
|
5
|
+
tooltipText: import("@angular/core").InputSignal<string>;
|
|
6
|
+
showCopiedIcon: boolean;
|
|
7
|
+
protected tooltipSize: string;
|
|
5
8
|
private readonly cdr;
|
|
6
|
-
|
|
9
|
+
private resetTimeout;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Called when the clipboard copy operation completes.
|
|
14
|
+
* @param success Whether the copy was successful
|
|
15
|
+
*/
|
|
16
|
+
onCopied(success: boolean): void;
|
|
7
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryItemValueCopyButton, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryItemValueCopyButton, "clr-summary-area-value-copy-button", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryItemValueCopyButton, "clr-summary-area-value-copy-button", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "tooltipText": { "alias": "tooltipText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
19
|
}
|