@porscheinformatik/clr-addons 19.10.4 → 19.11.1
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 +717 -56
- package/fesm2022/clr-addons.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/styles/clr-addons-phs.css +4 -0
- package/styles/clr-addons-phs.css.map +1 -1
- package/styles/clr-addons-phs.min.css +1 -1
- package/styles/clr-addons-phs.min.css.map +1 -1
- package/summary-area/index.d.ts +8 -0
- package/summary-area/summary-area/summary-area-state.service.d.ts +14 -0
- package/summary-area/summary-area/summary-area.d.ts +45 -0
- package/summary-area/summary-area/summary-area.model.d.ts +18 -0
- package/summary-area/summary-area-toggle/summary-area-toggle.d.ts +12 -0
- package/summary-area/summary-item/summary-item.d.ts +57 -0
- package/summary-area/summary-item/summary-item.model.d.ts +19 -0
- package/summary-area/summary-item-value/summary-item-value.d.ts +54 -0
- package/summary-area/summary-item-value-copy-button/summary-item-value-copy-button.d.ts +9 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './summary-area/summary-area';
|
|
2
|
+
export * from './summary-area/summary-area.model';
|
|
3
|
+
export * from './summary-area/summary-area-state.service';
|
|
4
|
+
export * from './summary-area-toggle/summary-area-toggle';
|
|
5
|
+
export * from './summary-item/summary-item';
|
|
6
|
+
export * from './summary-item/summary-item.model';
|
|
7
|
+
export * from './summary-item-value/summary-item-value';
|
|
8
|
+
export * from './summary-item-value-copy-button/summary-item-value-copy-button';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const defaultSummaryAreaCollapsedKey = "clrSummaryAreaCollapsed";
|
|
4
|
+
export declare class ClrSummaryAreaStateService {
|
|
5
|
+
private readonly collapsedMap;
|
|
6
|
+
collapsed(key?: string): Signal<boolean>;
|
|
7
|
+
toggle(key?: string): void;
|
|
8
|
+
setCollapsed(key: string, value: boolean): void;
|
|
9
|
+
private getOrCreateEntry;
|
|
10
|
+
private persistToStorage;
|
|
11
|
+
private readInitialState;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryAreaStateService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ClrSummaryAreaStateService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AfterViewInit, QueryList, Signal } from '@angular/core';
|
|
2
|
+
import { ClrSummaryItem } from '../summary-item/summary-item';
|
|
3
|
+
import { ClrSummaryAreaColumns, ClrSummaryAreaRows, ClrSummaryAreaError, ClrSummaryAreaWarning, ClrSummaryAreaLoading } from './summary-area.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ClrSummaryArea implements AfterViewInit {
|
|
6
|
+
items: QueryList<ClrSummaryItem>;
|
|
7
|
+
readonly rows: import("@angular/core").InputSignal<ClrSummaryAreaRows>;
|
|
8
|
+
readonly localStorageKey: import("@angular/core").InputSignal<string>;
|
|
9
|
+
readonly error: import("@angular/core").InputSignal<ClrSummaryAreaError>;
|
|
10
|
+
readonly warning: import("@angular/core").InputSignal<ClrSummaryAreaWarning>;
|
|
11
|
+
readonly loading: import("@angular/core").InputSignal<ClrSummaryAreaLoading>;
|
|
12
|
+
currentColumns: ClrSummaryAreaColumns;
|
|
13
|
+
currentRows: ClrSummaryAreaRows;
|
|
14
|
+
private readonly state;
|
|
15
|
+
private readonly cdr;
|
|
16
|
+
private readonly defaultLoadingText;
|
|
17
|
+
private readonly defaultErrorText;
|
|
18
|
+
private readonly defaultWarningText;
|
|
19
|
+
private readonly maxColumns;
|
|
20
|
+
readonly isCollapsed: Signal<boolean>;
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Depending on the current rows input only a specific amount of items can be visible to the user.
|
|
24
|
+
* The summary area only supports up to 5 columns.
|
|
25
|
+
* For 1 row, 5 items are visible, for 2 rows 10 items, and for 3 rows 15 items.
|
|
26
|
+
* Any items beyond that will not be shown.
|
|
27
|
+
* This logic is for meeting the requirement that it remains a summary area and does not grow indefinitely.
|
|
28
|
+
*/
|
|
29
|
+
get visibleItems(): ClrSummaryItem[];
|
|
30
|
+
get hasLoading(): boolean;
|
|
31
|
+
get loadingText(): string;
|
|
32
|
+
get hasError(): boolean;
|
|
33
|
+
get errorText(): string;
|
|
34
|
+
get errorLinkText(): string | undefined;
|
|
35
|
+
get errorClick(): (() => void) | undefined;
|
|
36
|
+
get hasWarning(): boolean;
|
|
37
|
+
get warningText(): string;
|
|
38
|
+
get warningLinkText(): string | undefined;
|
|
39
|
+
get warningClick(): (() => void) | undefined;
|
|
40
|
+
onResize(): void;
|
|
41
|
+
ngAfterViewInit(): void;
|
|
42
|
+
private updateGrid;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryArea, never>;
|
|
44
|
+
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ClrSummaryAreaError {
|
|
2
|
+
active: boolean;
|
|
3
|
+
text?: string;
|
|
4
|
+
click?: () => void;
|
|
5
|
+
linkText?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ClrSummaryAreaWarning {
|
|
8
|
+
active: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
click?: () => void;
|
|
11
|
+
linkText?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ClrSummaryAreaLoading {
|
|
14
|
+
active: boolean;
|
|
15
|
+
text?: string;
|
|
16
|
+
}
|
|
17
|
+
export type ClrSummaryAreaColumns = 1 | 2 | 3 | 4 | 5;
|
|
18
|
+
export type ClrSummaryAreaRows = 1 | 2 | 3;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ClrSummaryAreaToggle {
|
|
3
|
+
readonly summaryToggle: import("@angular/core").OutputEmitterRef<void>;
|
|
4
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly localStorageKey: import("@angular/core").InputSignal<string>;
|
|
6
|
+
private readonly state;
|
|
7
|
+
readonly collapsed: import("@angular/core").Signal<boolean>;
|
|
8
|
+
handleKeydown(event: KeyboardEvent): void;
|
|
9
|
+
handleToggle(event?: Event): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryAreaToggle, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryAreaToggle, "clr-summary-area-toggle", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "localStorageKey": { "alias": "localStorageKey"; "required": false; "isSignal": true; }; }, { "summaryToggle": "summaryToggle"; }, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AfterContentInit, AfterViewChecked, ElementRef, OnDestroy, QueryList, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ClrSummaryItemValue } from '../summary-item-value/summary-item-value';
|
|
3
|
+
import { ClrSummaryItemError, ClrSummaryItemWarning, ClrSummaryItemLoading, ClrSummaryItemEditConfig } from './summary-item.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ClrSummaryItem implements AfterContentInit, AfterViewChecked, OnDestroy {
|
|
6
|
+
template: TemplateRef<never>;
|
|
7
|
+
valuesContainer: ElementRef<HTMLDivElement>;
|
|
8
|
+
valueChildren: QueryList<ClrSummaryItemValue>;
|
|
9
|
+
label: import("@angular/core").InputSignal<string>;
|
|
10
|
+
error: import("@angular/core").InputSignal<ClrSummaryItemError>;
|
|
11
|
+
warning: import("@angular/core").InputSignal<ClrSummaryItemWarning>;
|
|
12
|
+
loading: import("@angular/core").InputSignal<ClrSummaryItemLoading>;
|
|
13
|
+
editConfig: import("@angular/core").InputSignal<ClrSummaryItemEditConfig>;
|
|
14
|
+
showOnEmptyValue: import("@angular/core").InputSignal<boolean>;
|
|
15
|
+
valueCopyable: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
hasProjectedContent: boolean;
|
|
17
|
+
private readonly cdr;
|
|
18
|
+
private mutationObserver?;
|
|
19
|
+
private contentCheckScheduled;
|
|
20
|
+
private viewInitialized;
|
|
21
|
+
private readonly defaultLoadingText;
|
|
22
|
+
private readonly defaultErrorText;
|
|
23
|
+
private readonly defaultWarningText;
|
|
24
|
+
private readonly defaultEditText;
|
|
25
|
+
get hasLoading(): boolean;
|
|
26
|
+
get loadingText(): string;
|
|
27
|
+
get hasError(): boolean;
|
|
28
|
+
get errorText(): string;
|
|
29
|
+
get errorClick(): (() => void) | undefined;
|
|
30
|
+
get hasWarning(): boolean;
|
|
31
|
+
get warningText(): string;
|
|
32
|
+
get warningClick(): (() => void) | undefined;
|
|
33
|
+
get showEditButton(): boolean;
|
|
34
|
+
get editText(): string;
|
|
35
|
+
get editClick(): (() => void) | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Only collect text values from child summary-item-value components
|
|
38
|
+
* Exclude projected content and empty values
|
|
39
|
+
*/
|
|
40
|
+
get copyableValue(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Only show copy button if:
|
|
43
|
+
* 1. valueCopyable is true
|
|
44
|
+
* 2. Not in loading, error, warning state
|
|
45
|
+
* 3. Not showing edit button
|
|
46
|
+
* 4. Has actual text values from summary-item-value components (not just projected content or placeholder)
|
|
47
|
+
*/
|
|
48
|
+
get showCopyButton(): boolean;
|
|
49
|
+
ngAfterContentInit(): void;
|
|
50
|
+
ngAfterViewChecked(): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
private setupMutationObserver;
|
|
53
|
+
private scheduleContentCheck;
|
|
54
|
+
private updateProjectedContentFlag;
|
|
55
|
+
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>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ClrSummaryItemError {
|
|
2
|
+
active: boolean;
|
|
3
|
+
text?: string;
|
|
4
|
+
click?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface ClrSummaryItemWarning {
|
|
7
|
+
active: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
click?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface ClrSummaryItemLoading {
|
|
12
|
+
active: boolean;
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ClrSummaryItemEditConfig {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
text?: string;
|
|
18
|
+
click: () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ClrSummaryItemValue implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {
|
|
4
|
+
projectedContent?: ElementRef<HTMLSpanElement>;
|
|
5
|
+
valueElement?: ElementRef<HTMLSpanElement>;
|
|
6
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly icon: import("@angular/core").InputSignal<string>;
|
|
8
|
+
readonly tooltip: import("@angular/core").InputSignal<string>;
|
|
9
|
+
readonly clickable: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
readonly clicked: import("@angular/core").OutputEmitterRef<void>;
|
|
11
|
+
hasProjectedContent: boolean;
|
|
12
|
+
isTextOverflowing: boolean;
|
|
13
|
+
tooltipSize: string;
|
|
14
|
+
private resizeObserver?;
|
|
15
|
+
private mutationObserver?;
|
|
16
|
+
private contentCheckScheduled;
|
|
17
|
+
private readonly ngZone;
|
|
18
|
+
private readonly cdr;
|
|
19
|
+
get hasIcon(): boolean;
|
|
20
|
+
get hasText(): boolean;
|
|
21
|
+
get isHidden(): boolean;
|
|
22
|
+
get hasClickHandler(): boolean;
|
|
23
|
+
handleClick(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the tooltip text to display.
|
|
26
|
+
* If a text overflow is detected, the full value is used as tooltip.
|
|
27
|
+
* If no overflow, but a custom tooltip is provided, that is used.
|
|
28
|
+
* Tooltip is undefined otherwise.
|
|
29
|
+
*/
|
|
30
|
+
get effectiveTooltip(): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Returns true if this component has any meaningful content to display.
|
|
33
|
+
* This includes: a value, an icon, or projected content.
|
|
34
|
+
*/
|
|
35
|
+
get hasMeaningfulContent(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Returns true if this component should be hidden.
|
|
38
|
+
* This happens when there's no meaningful content.
|
|
39
|
+
*/
|
|
40
|
+
get shouldHide(): boolean;
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
ngAfterContentInit(): void;
|
|
43
|
+
ngAfterViewInit(): void;
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
private setupMutationObserver;
|
|
46
|
+
private scheduleContentCheck;
|
|
47
|
+
private setupOverflowDetection;
|
|
48
|
+
private checkTextOverflowSync;
|
|
49
|
+
/** @internal - Manually trigger projected content check. Useful for testing. */
|
|
50
|
+
checkProjectedContent(): void;
|
|
51
|
+
private hasMeaningfulContentRecursive;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClrSummaryItemValue, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClrSummaryItemValue, "clr-summary-item-value", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ClrSummaryItemValueCopyButton {
|
|
3
|
+
value: import("@angular/core").InputSignal<string>;
|
|
4
|
+
showValueCopiedIcon: Set<string>;
|
|
5
|
+
private readonly cdr;
|
|
6
|
+
copyValueClicked(value: string): void;
|
|
7
|
+
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>;
|
|
9
|
+
}
|