@life-cockpit/angular-ui-kit 2.3.0 → 2.5.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/package.json
CHANGED
|
@@ -3870,8 +3870,53 @@ interface SelectionChangeEvent {
|
|
|
3870
3870
|
selected: Record<string, unknown>[];
|
|
3871
3871
|
allSelected: boolean;
|
|
3872
3872
|
}
|
|
3873
|
+
/** Emitted when a parent (group) row is expanded or collapsed in tree mode. */
|
|
3874
|
+
interface RowToggleEvent {
|
|
3875
|
+
id: string;
|
|
3876
|
+
expanded: boolean;
|
|
3877
|
+
row: Record<string, unknown>;
|
|
3878
|
+
}
|
|
3879
|
+
/**
|
|
3880
|
+
* Configuration that enables hierarchical (tree / grouped) rows. Mirrors the
|
|
3881
|
+
* discrete `idKey` / `parentKey` / `treeColumn` inputs and is exported for
|
|
3882
|
+
* consumers that prefer to pass a single config object around.
|
|
3883
|
+
*/
|
|
3884
|
+
interface TableTreeConfig {
|
|
3885
|
+
idKey: string;
|
|
3886
|
+
parentKey: string;
|
|
3887
|
+
treeColumn?: string;
|
|
3888
|
+
}
|
|
3873
3889
|
type TableVariant = 'default' | 'striped' | 'bordered';
|
|
3874
3890
|
type TableSize = 'sm' | 'md' | 'lg';
|
|
3891
|
+
/**
|
|
3892
|
+
* Internal, render-ready view-model for a single visible table row. In flat
|
|
3893
|
+
* mode every row is depth 0 with no tree adornments; in tree mode it carries
|
|
3894
|
+
* the disclosure / indentation / aria metadata for the row.
|
|
3895
|
+
*/
|
|
3896
|
+
interface DisplayRow {
|
|
3897
|
+
/** The underlying data object. */
|
|
3898
|
+
row: Record<string, unknown>;
|
|
3899
|
+
/**
|
|
3900
|
+
* Absolute index used for selection, inline editing and action callbacks.
|
|
3901
|
+
* Flat mode: the positional absolute index (page offset + relative index),
|
|
3902
|
+
* preserving today's behavior. Tree mode: the row's index into `data()`.
|
|
3903
|
+
*/
|
|
3904
|
+
absIndex: number;
|
|
3905
|
+
/** Row id (tree mode only; `null` in flat mode). */
|
|
3906
|
+
id: string | null;
|
|
3907
|
+
/** Tree depth — 0 for roots and for every row in flat mode. */
|
|
3908
|
+
depth: number;
|
|
3909
|
+
/** 1-based depth, surfaced as `aria-level` in tree mode. */
|
|
3910
|
+
level: number;
|
|
3911
|
+
/** Whether this row has visible children (renders a chevron). */
|
|
3912
|
+
hasChildren: boolean;
|
|
3913
|
+
/** Whether this parent row is currently expanded. */
|
|
3914
|
+
expanded: boolean;
|
|
3915
|
+
/** 1-based position within its sibling group (`aria-posinset`). */
|
|
3916
|
+
posInSet: number;
|
|
3917
|
+
/** Size of its sibling group (`aria-setsize`). */
|
|
3918
|
+
setSize: number;
|
|
3919
|
+
}
|
|
3875
3920
|
/**
|
|
3876
3921
|
* Table component for displaying structured data in rows and columns.
|
|
3877
3922
|
*
|
|
@@ -3884,6 +3929,7 @@ type TableSize = 'sm' | 'md' | 'lg';
|
|
|
3884
3929
|
* - Per-cell class/style callbacks for conditional styling
|
|
3885
3930
|
* - Custom cell templates via content projection
|
|
3886
3931
|
* - Composed cells (e.g. avatar + badge + actions)
|
|
3932
|
+
* - Hierarchical "tree" rows (grouped / expandable) via `idKey` + `parentKey`
|
|
3887
3933
|
* - Responsive horizontal scrolling
|
|
3888
3934
|
* - Empty state text for no data
|
|
3889
3935
|
* - Accessible with proper table semantics
|
|
@@ -3948,6 +3994,30 @@ declare class TableComponent {
|
|
|
3948
3994
|
actionsWidth: _angular_core.InputSignal<string | undefined>;
|
|
3949
3995
|
/** Horizontal alignment of the action buttons (and header label) within the cell */
|
|
3950
3996
|
actionsAlign: _angular_core.InputSignal<TableActionsAlign>;
|
|
3997
|
+
/**
|
|
3998
|
+
* Row field holding the unique id. Required (together with {@link parentKey})
|
|
3999
|
+
* to enable hierarchical "tree mode". Absent ⇒ today's flat table.
|
|
4000
|
+
*/
|
|
4001
|
+
idKey: _angular_core.InputSignal<string | undefined>;
|
|
4002
|
+
/**
|
|
4003
|
+
* Row field referencing the parent row's id. Presence of both `idKey` and
|
|
4004
|
+
* `parentKey` enables tree mode. Rows with an absent/empty or unknown parent
|
|
4005
|
+
* id are treated as roots.
|
|
4006
|
+
*/
|
|
4007
|
+
parentKey: _angular_core.InputSignal<string | undefined>;
|
|
4008
|
+
/** Column key the chevron + indentation attach to. Default: first column. */
|
|
4009
|
+
treeColumn: _angular_core.InputSignal<string | undefined>;
|
|
4010
|
+
/** Initial expand state for all parent rows when uncontrolled. Default: true. */
|
|
4011
|
+
defaultExpanded: _angular_core.InputSignal<boolean>;
|
|
4012
|
+
/**
|
|
4013
|
+
* Controlled set of expanded parent ids. When provided, the table renders
|
|
4014
|
+
* exactly these as expanded; combine with {@link expandedIdsChange} for
|
|
4015
|
+
* `[(expandedIds)]`. When omitted, expansion is uncontrolled and seeded by
|
|
4016
|
+
* {@link defaultExpanded}.
|
|
4017
|
+
*/
|
|
4018
|
+
expandedIds: _angular_core.InputSignal<string[] | undefined>;
|
|
4019
|
+
/** Indentation per depth level, in px. Default: 20. */
|
|
4020
|
+
indentSize: _angular_core.InputSignal<number>;
|
|
3951
4021
|
/** Emitted when a sortable column header is clicked */
|
|
3952
4022
|
readonly sort: _angular_core.OutputEmitterRef<SortEvent>;
|
|
3953
4023
|
/** Emitted when a row is clicked */
|
|
@@ -3958,11 +4028,19 @@ declare class TableComponent {
|
|
|
3958
4028
|
readonly selectionChange: _angular_core.OutputEmitterRef<SelectionChangeEvent>;
|
|
3959
4029
|
/** Emitted when a row action button is clicked */
|
|
3960
4030
|
readonly actionClick: _angular_core.OutputEmitterRef<ActionClickEvent>;
|
|
4031
|
+
/** Emitted when a parent row is expanded/collapsed (tree mode). */
|
|
4032
|
+
readonly rowToggle: _angular_core.OutputEmitterRef<RowToggleEvent>;
|
|
4033
|
+
/** Emitted with the full list of expanded parent ids; enables `[(expandedIds)]`. */
|
|
4034
|
+
readonly expandedIdsChange: _angular_core.OutputEmitterRef<string[]>;
|
|
3961
4035
|
protected currentSort: _angular_core.WritableSignal<{
|
|
3962
4036
|
column: string;
|
|
3963
4037
|
direction: "asc" | "desc";
|
|
3964
4038
|
} | null>;
|
|
3965
4039
|
protected currentPage: _angular_core.WritableSignal<number>;
|
|
4040
|
+
/**
|
|
4041
|
+
* Effective page size. Seeded from the `pageSize` input (resetting if it
|
|
4042
|
+
* changes) and overridable by the user via the page-size dropdown.
|
|
4043
|
+
*/
|
|
3966
4044
|
protected internalPageSize: _angular_core.WritableSignal<number>;
|
|
3967
4045
|
protected selectedRows: _angular_core.WritableSignal<Set<number>>;
|
|
3968
4046
|
protected columnFilters: _angular_core.WritableSignal<Record<string, string>>;
|
|
@@ -3971,21 +4049,50 @@ declare class TableComponent {
|
|
|
3971
4049
|
column: string;
|
|
3972
4050
|
} | null>;
|
|
3973
4051
|
protected editValue: _angular_core.WritableSignal<string>;
|
|
4052
|
+
/** User expand/collapse overrides keyed by row id (uncontrolled mode). */
|
|
4053
|
+
private readonly expandOverrides;
|
|
3974
4054
|
/**
|
|
3975
4055
|
* Filtered data (applies column filters)
|
|
3976
4056
|
*/
|
|
3977
4057
|
protected readonly filteredData: _angular_core.Signal<Record<string, unknown>[]>;
|
|
4058
|
+
/** Comparator for the active sort, shared by flat sorting and tree sibling sorting. */
|
|
4059
|
+
private rowComparator;
|
|
3978
4060
|
/**
|
|
3979
4061
|
* Sorted data
|
|
3980
4062
|
*/
|
|
3981
4063
|
protected readonly sortedData: _angular_core.Signal<Record<string, unknown>[]>;
|
|
3982
4064
|
/**
|
|
3983
|
-
* Paginated data (or all if pagination disabled)
|
|
4065
|
+
* Paginated data (or all if pagination disabled). Flat mode only.
|
|
3984
4066
|
*/
|
|
3985
4067
|
protected readonly displayData: _angular_core.Signal<Record<string, unknown>[]>;
|
|
4068
|
+
/** Whether hierarchical tree mode is active. */
|
|
4069
|
+
protected readonly treeMode: _angular_core.Signal<boolean>;
|
|
4070
|
+
/** Column the chevron + indentation attach to (defaults to the first column). */
|
|
4071
|
+
protected readonly effectiveTreeColumn: _angular_core.Signal<string>;
|
|
4072
|
+
/** Stable map of row object → its index in `data()` (row identity for tree mode). */
|
|
4073
|
+
private readonly dataIndexMap;
|
|
4074
|
+
/** Parent → ordered children index built from `idKey`/`parentKey`. */
|
|
4075
|
+
private readonly treeBuild;
|
|
4076
|
+
/**
|
|
4077
|
+
* Tree restricted to rows that match the active filters together with their
|
|
4078
|
+
* ancestor chain (so the path to a match stays visible).
|
|
4079
|
+
*/
|
|
4080
|
+
private readonly treeFiltered;
|
|
4081
|
+
/** Tree with each sibling group sorted by the active sort (structure kept intact). */
|
|
4082
|
+
private readonly treeSorted;
|
|
4083
|
+
/** Root rows after filter/sort — the unit of pagination in tree mode. */
|
|
4084
|
+
private readonly treeRoots;
|
|
4085
|
+
/**
|
|
4086
|
+
* Render-ready rows. In flat mode this wraps the existing paginated data; in
|
|
4087
|
+
* tree mode it paginates roots and flattens each visible (expanded) subtree.
|
|
4088
|
+
*/
|
|
4089
|
+
protected readonly displayRows: _angular_core.Signal<DisplayRow[]>;
|
|
3986
4090
|
/** Total pages */
|
|
3987
4091
|
protected readonly totalPages: _angular_core.Signal<number>;
|
|
3988
|
-
/**
|
|
4092
|
+
/**
|
|
4093
|
+
* Pagination row count. Tree mode counts root rows (the paginated unit); flat
|
|
4094
|
+
* mode counts filtered rows.
|
|
4095
|
+
*/
|
|
3989
4096
|
protected readonly totalRows: _angular_core.Signal<number>;
|
|
3990
4097
|
/** Whether all visible rows are selected */
|
|
3991
4098
|
protected readonly allSelected: _angular_core.Signal<boolean>;
|
|
@@ -4006,41 +4113,54 @@ declare class TableComponent {
|
|
|
4006
4113
|
getAriaSort(columnKey: string): string | null;
|
|
4007
4114
|
getHeaderClasses(column: TableColumn): string;
|
|
4008
4115
|
getCellValue(row: Record<string, unknown>, columnKey: string): unknown;
|
|
4009
|
-
getFormattedCellValue(row: Record<string, unknown>, column: TableColumn,
|
|
4010
|
-
getCellClasses(row: Record<string, unknown>, column: TableColumn,
|
|
4011
|
-
getCellStyles(row: Record<string, unknown>, column: TableColumn,
|
|
4116
|
+
getFormattedCellValue(row: Record<string, unknown>, column: TableColumn, rowIndex: number): unknown;
|
|
4117
|
+
getCellClasses(row: Record<string, unknown>, column: TableColumn, rowIndex: number): string;
|
|
4118
|
+
getCellStyles(row: Record<string, unknown>, column: TableColumn, rowIndex: number): Record<string, string> | null;
|
|
4119
|
+
/** Whether the given column is the disclosure/indent column in tree mode. */
|
|
4120
|
+
protected isTreeColumn(columnKey: string): boolean;
|
|
4121
|
+
/** Indent levels to render before a row's chevron (one guide per ancestor depth). */
|
|
4122
|
+
protected indentLevels(depth: number): number[];
|
|
4123
|
+
/** Accessible name for a row's disclosure button (the tree column's value). */
|
|
4124
|
+
protected treeCellLabel(row: Record<string, unknown>): string;
|
|
4012
4125
|
getCellTemplate(columnKey: string): TableCellDirective | undefined;
|
|
4013
4126
|
hasCustomTemplate(columnKey: string): boolean;
|
|
4014
4127
|
onRowClick(row: Record<string, unknown>): void;
|
|
4015
4128
|
/** Whether the trailing actions column should be rendered */
|
|
4016
4129
|
protected readonly hasActions: _angular_core.Signal<boolean>;
|
|
4017
|
-
protected isActionHidden(action: TableAction, row: Record<string, unknown>,
|
|
4018
|
-
protected isActionDisabled(action: TableAction, row: Record<string, unknown>,
|
|
4130
|
+
protected isActionHidden(action: TableAction, row: Record<string, unknown>, rowIndex: number): boolean;
|
|
4131
|
+
protected isActionDisabled(action: TableAction, row: Record<string, unknown>, rowIndex: number): boolean;
|
|
4019
4132
|
/**
|
|
4020
4133
|
* Handles an action button click. The DOM click is stopped from propagating
|
|
4021
4134
|
* (see template `$event.stopPropagation()`), so the row's `rowClick` never fires.
|
|
4022
4135
|
*/
|
|
4023
|
-
protected onActionClick(action: TableAction, row: Record<string, unknown>,
|
|
4136
|
+
protected onActionClick(action: TableAction, row: Record<string, unknown>, rowIndex: number): void;
|
|
4137
|
+
/** Whether the parent row with the given id is currently expanded. */
|
|
4138
|
+
protected isExpanded(id: string): boolean;
|
|
4139
|
+
/** Chevron click: toggle expand state without triggering the row click. */
|
|
4140
|
+
protected onChevronClick(displayRow: DisplayRow, event: Event): void;
|
|
4141
|
+
private toggleRow;
|
|
4142
|
+
/** The full list of expanded parent ids after applying a single toggle. */
|
|
4143
|
+
private nextExpandedIds;
|
|
4024
4144
|
protected goToPage(page: number): void;
|
|
4025
4145
|
protected onPageSizeChange(event: Event): void;
|
|
4026
4146
|
protected onPageSizeModelChange(value: string | number | null): void;
|
|
4027
4147
|
protected get paginationStart(): number;
|
|
4028
4148
|
protected get paginationEnd(): number;
|
|
4029
4149
|
protected toggleSelectAll(): void;
|
|
4030
|
-
protected toggleRowSelect(
|
|
4031
|
-
protected isRowSelected(
|
|
4150
|
+
protected toggleRowSelect(absIndex: number): void;
|
|
4151
|
+
protected isRowSelected(absIndex: number): boolean;
|
|
4032
4152
|
private getAbsoluteIndex;
|
|
4033
4153
|
private emitSelectionChange;
|
|
4034
4154
|
protected onFilterChange(columnKey: string, value: string): void;
|
|
4035
4155
|
protected getFilterValue(columnKey: string): string;
|
|
4036
|
-
protected startEdit(
|
|
4037
|
-
protected isEditing(
|
|
4038
|
-
protected commitEdit(
|
|
4156
|
+
protected startEdit(absIndex: number, column: string, currentValue: unknown): void;
|
|
4157
|
+
protected isEditing(absIndex: number, column: string): boolean;
|
|
4158
|
+
protected commitEdit(absIndex: number, column: string): void;
|
|
4039
4159
|
protected cancelEdit(): void;
|
|
4040
|
-
protected onEditKeydown(event: KeyboardEvent,
|
|
4160
|
+
protected onEditKeydown(event: KeyboardEvent, absIndex: number, column: string): void;
|
|
4041
4161
|
protected getInputValue(event: Event): string;
|
|
4042
4162
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
4043
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "lc-table", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hoverable": { "alias": "hoverable"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "paginate": { "alias": "paginate"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "actionsLabel": { "alias": "actionsLabel"; "required": false; "isSignal": true; }; "actionsWidth": { "alias": "actionsWidth"; "required": false; "isSignal": true; }; "actionsAlign": { "alias": "actionsAlign"; "required": false; "isSignal": true; }; }, { "sort": "sort"; "rowClick": "rowClick"; "cellEdit": "cellEdit"; "selectionChange": "selectionChange"; "actionClick": "actionClick"; }, ["cellTemplates"], never, true, never>;
|
|
4163
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "lc-table", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hoverable": { "alias": "hoverable"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "paginate": { "alias": "paginate"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "actionsLabel": { "alias": "actionsLabel"; "required": false; "isSignal": true; }; "actionsWidth": { "alias": "actionsWidth"; "required": false; "isSignal": true; }; "actionsAlign": { "alias": "actionsAlign"; "required": false; "isSignal": true; }; "idKey": { "alias": "idKey"; "required": false; "isSignal": true; }; "parentKey": { "alias": "parentKey"; "required": false; "isSignal": true; }; "treeColumn": { "alias": "treeColumn"; "required": false; "isSignal": true; }; "defaultExpanded": { "alias": "defaultExpanded"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; }, { "sort": "sort"; "rowClick": "rowClick"; "cellEdit": "cellEdit"; "selectionChange": "selectionChange"; "actionClick": "actionClick"; "rowToggle": "rowToggle"; "expandedIdsChange": "expandedIdsChange"; }, ["cellTemplates"], never, true, never>;
|
|
4044
4164
|
}
|
|
4045
4165
|
|
|
4046
4166
|
/**
|
|
@@ -6612,6 +6732,10 @@ interface MarkdownLinkClick {
|
|
|
6612
6732
|
interface MarkdownRendered {
|
|
6613
6733
|
headings: MarkdownHeading[];
|
|
6614
6734
|
}
|
|
6735
|
+
interface MarkdownChangesHighlighted {
|
|
6736
|
+
/** Number of changed/added blocks highlighted in the current render. */
|
|
6737
|
+
changedBlocks: number;
|
|
6738
|
+
}
|
|
6615
6739
|
interface RenderPart {
|
|
6616
6740
|
type: 'html' | 'code' | 'mermaid';
|
|
6617
6741
|
index: number;
|
|
@@ -6625,16 +6749,27 @@ interface RenderPart {
|
|
|
6625
6749
|
* Renders GitHub-Flavored Markdown (GFM) to sanitized HTML with
|
|
6626
6750
|
* optional syntax highlighting via `<lc-code-block>`.
|
|
6627
6751
|
*
|
|
6752
|
+
* Optionally highlights *changed* blocks in place: pass the pre-edit markdown as
|
|
6753
|
+
* `previousContent` and set `highlightChanges` — added/edited blocks (diffed at
|
|
6754
|
+
* block / list-item level) gain a left accent bar + subtle tint, can auto-fade
|
|
6755
|
+
* (`changeHighlightFadeMs`) and scroll into view (`scrollToFirstChange`).
|
|
6756
|
+
*
|
|
6628
6757
|
* @example
|
|
6629
6758
|
* ```html
|
|
6630
6759
|
* <lc-markdown [content]="'# Hello World'" />
|
|
6631
6760
|
* <lc-markdown [src]="'/docs/readme.md'" />
|
|
6761
|
+
* <lc-markdown
|
|
6762
|
+
* [content]="current" [previousContent]="prev"
|
|
6763
|
+
* [highlightChanges]="true" [changeHighlightFadeMs]="3000" />
|
|
6632
6764
|
* ```
|
|
6633
6765
|
*/
|
|
6634
6766
|
declare class MarkdownComponent implements OnDestroy {
|
|
6635
6767
|
private readonly sanitizer;
|
|
6636
6768
|
private readonly http;
|
|
6769
|
+
private readonly host;
|
|
6637
6770
|
private httpSub?;
|
|
6771
|
+
private fadeTimer?;
|
|
6772
|
+
private scrollTimer?;
|
|
6638
6773
|
private mermaidApiPromise?;
|
|
6639
6774
|
private mermaidInitialized;
|
|
6640
6775
|
private mermaidRenderRun;
|
|
@@ -6654,14 +6789,39 @@ declare class MarkdownComponent implements OnDestroy {
|
|
|
6654
6789
|
readonly showHeadingAnchors: _angular_core.InputSignal<boolean>;
|
|
6655
6790
|
/** Base URL for resolving relative links/images */
|
|
6656
6791
|
readonly baseUrl: _angular_core.InputSignal<string | undefined>;
|
|
6792
|
+
/** Enable change highlighting (requires `previousContent` to compute a diff). */
|
|
6793
|
+
readonly highlightChanges: _angular_core.InputSignal<boolean>;
|
|
6794
|
+
/**
|
|
6795
|
+
* The prior Markdown. When it differs from `content`, the changed/added blocks
|
|
6796
|
+
* in `content` are highlighted. The caller passes the pre-edit markdown.
|
|
6797
|
+
*/
|
|
6798
|
+
readonly previousContent: _angular_core.InputSignal<string | undefined>;
|
|
6799
|
+
/** Auto-fade the highlight after N ms. 0 / undefined ⇒ persist until content changes. */
|
|
6800
|
+
readonly changeHighlightFadeMs: _angular_core.InputSignal<number | undefined>;
|
|
6801
|
+
/** Scroll the first changed block into view when highlights appear. */
|
|
6802
|
+
readonly scrollToFirstChange: _angular_core.InputSignal<boolean>;
|
|
6657
6803
|
/** Emitted when a link is clicked */
|
|
6658
6804
|
readonly linkClick: _angular_core.OutputEmitterRef<MarkdownLinkClick>;
|
|
6659
6805
|
/** Emitted after rendering with heading TOC */
|
|
6660
6806
|
readonly rendered: _angular_core.OutputEmitterRef<MarkdownRendered>;
|
|
6807
|
+
/** Emitted after a render that produced change highlights. */
|
|
6808
|
+
readonly changesHighlighted: _angular_core.OutputEmitterRef<MarkdownChangesHighlighted>;
|
|
6661
6809
|
/** Internal resolved markdown source */
|
|
6662
6810
|
protected resolvedMarkdown: _angular_core.WritableSignal<string>;
|
|
6663
6811
|
/** Parsed result (computed once from resolvedMarkdown) */
|
|
6664
6812
|
private parsed;
|
|
6813
|
+
/**
|
|
6814
|
+
* Rendered HTML after applying change highlights. When highlighting is off (or
|
|
6815
|
+
* there is no differing `previousContent`) this returns the parsed HTML
|
|
6816
|
+
* unchanged, so the non-highlight path is byte-for-byte identical to before.
|
|
6817
|
+
*/
|
|
6818
|
+
private readonly highlightResult;
|
|
6819
|
+
/** Number of changed/added blocks highlighted in the current render. */
|
|
6820
|
+
protected readonly changedCount: _angular_core.Signal<number>;
|
|
6821
|
+
/** Visually-hidden polite summary announced when highlights appear. */
|
|
6822
|
+
protected readonly changeSummary: _angular_core.Signal<string>;
|
|
6823
|
+
/** Whether the current highlights have faded out (after `changeHighlightFadeMs`). */
|
|
6824
|
+
protected readonly highlightsFaded: _angular_core.WritableSignal<boolean>;
|
|
6665
6825
|
/** Computed render parts (HTML chunks + code blocks interleaved) */
|
|
6666
6826
|
protected renderParts: _angular_core.Signal<RenderPart[]>;
|
|
6667
6827
|
protected containerClasses: _angular_core.Signal<string>;
|
|
@@ -6671,6 +6831,25 @@ declare class MarkdownComponent implements OnDestroy {
|
|
|
6671
6831
|
constructor();
|
|
6672
6832
|
ngOnDestroy(): void;
|
|
6673
6833
|
protected onLinkClick(event: MouseEvent): void;
|
|
6834
|
+
/** Side-effects for a render: emit, (re)arm the fade timer, optional scroll. */
|
|
6835
|
+
private onHighlightResult;
|
|
6836
|
+
private scrollToFirstChanged;
|
|
6837
|
+
/**
|
|
6838
|
+
* Wraps the changed/added top-level blocks of `html` with
|
|
6839
|
+
* `.lc-markdown__block--changed`. A block is "changed" when its normalized
|
|
6840
|
+
* text is not present among the blocks of `prevMarkdown`. Lists are diffed
|
|
6841
|
+
* per `<li>` and tables per `<tr>` so a single edited item highlights alone.
|
|
6842
|
+
*/
|
|
6843
|
+
private applyChangeHighlights;
|
|
6844
|
+
/** Normalized text set of the logical blocks within an HTML fragment. */
|
|
6845
|
+
private collectBlockKeys;
|
|
6846
|
+
/**
|
|
6847
|
+
* Visits each diffable block under `root`: top-level elements, but descending
|
|
6848
|
+
* into `<ul>`/`<ol>` (per `<li>`) and `<table>` (per `<tr>`).
|
|
6849
|
+
*/
|
|
6850
|
+
private eachLogicalBlock;
|
|
6851
|
+
private blockTextKey;
|
|
6852
|
+
private htmlToElement;
|
|
6674
6853
|
private loadFromUrl;
|
|
6675
6854
|
private splitIntoParts;
|
|
6676
6855
|
private parseMarkdown;
|
|
@@ -6681,7 +6860,7 @@ declare class MarkdownComponent implements OnDestroy {
|
|
|
6681
6860
|
private renderMermaidParts;
|
|
6682
6861
|
private getMermaidApi;
|
|
6683
6862
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownComponent, never>;
|
|
6684
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownComponent, "lc-markdown", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "linkTarget": { "alias": "linkTarget"; "required": false; "isSignal": true; }; "sanitize": { "alias": "sanitize"; "required": false; "isSignal": true; }; "syntaxHighlight": { "alias": "syntaxHighlight"; "required": false; "isSignal": true; }; "showHeadingAnchors": { "alias": "showHeadingAnchors"; "required": false; "isSignal": true; }; "baseUrl": { "alias": "baseUrl"; "required": false; "isSignal": true; }; }, { "linkClick": "linkClick"; "rendered": "rendered"; }, never, never, true, never>;
|
|
6863
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownComponent, "lc-markdown", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "linkTarget": { "alias": "linkTarget"; "required": false; "isSignal": true; }; "sanitize": { "alias": "sanitize"; "required": false; "isSignal": true; }; "syntaxHighlight": { "alias": "syntaxHighlight"; "required": false; "isSignal": true; }; "showHeadingAnchors": { "alias": "showHeadingAnchors"; "required": false; "isSignal": true; }; "baseUrl": { "alias": "baseUrl"; "required": false; "isSignal": true; }; "highlightChanges": { "alias": "highlightChanges"; "required": false; "isSignal": true; }; "previousContent": { "alias": "previousContent"; "required": false; "isSignal": true; }; "changeHighlightFadeMs": { "alias": "changeHighlightFadeMs"; "required": false; "isSignal": true; }; "scrollToFirstChange": { "alias": "scrollToFirstChange"; "required": false; "isSignal": true; }; }, { "linkClick": "linkClick"; "rendered": "rendered"; "changesHighlighted": "changesHighlighted"; }, never, never, true, never>;
|
|
6685
6864
|
}
|
|
6686
6865
|
|
|
6687
6866
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
@@ -7051,4 +7230,4 @@ declare class StageListComponent {
|
|
|
7051
7230
|
}
|
|
7052
7231
|
|
|
7053
7232
|
export { AccordionComponent, AccordionGroupComponent, AlertComponent, AnimationDurationFast, AnimationEasingEaseIn, AnimationEasingEaseInOut, AnimationEasingEaseOut, AreaChartComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BarChartComponent, BorderRadius2xl, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CalloutComponent, CardComponent, ChatComponent, CheckboxComponent, ChipComponent, CodeBlockComponent, ColorAccentOrange, ColorAccentPurple, ColorAccentRed, ColorAccentRust, ColorAccentViolet, ColorBackgroundDark, ColorErrorDark, ColorErrorDefault, ColorErrorLight, ColorInfoDark, ColorInfoDefault, ColorInfoLight, ColorNeutral100, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorPickerComponent, ColorPrimary100, ColorPrimary200, ColorPrimary300, ColorPrimary400, ColorPrimary50, ColorPrimary500, ColorPrimary600, ColorPrimary700, ColorPrimary800, ColorPrimary900, ColorSecondary100, ColorSecondary200, ColorSecondary300, ColorSecondary400, ColorSecondary50, ColorSecondary500, ColorSecondary600, ColorSecondary700, ColorSecondary800, ColorSecondary900, ColorSuccessDark, ColorSuccessDefault, ColorSuccessLight, ColorSurfaceDarkBase, ColorSurfaceDarkRaised, ColorSurfaceDarkSunken, ColorTextDarkPrimary, ColorTextDarkSecondary, ColorTextDarkTertiary, ColorWarningDark, ColorWarningDefault, ColorWarningLight, ComboboxComponent, ConfirmDialogComponent, ConfirmService, ContainerComponent, DateRangePickerComponent, DatepickerComponent, DependencyViewerComponent, DiffViewerComponent, DividerComponent, DocumentViewerComponent, DonutChartComponent, DrawerComponent, Elevation1, Elevation2, Elevation3, Elevation4, EmailInputComponent, EmptyStateComponent, ErrorDisplayComponent, FILE_FALLBACK_ICON, FOLDER_ICON, FOLDER_OPEN_ICON, FieldGroupComponent, FileUploadComponent, FilterBarComponent, FooterComponent, FunnelChartComponent, GalleryComponent, GanttChartComponent, GaugeComponent, HeaderComponent, HeatmapComponent, HeroComponent, IconComponent, InputComponent, KanbanBoardComponent, LC_LOGO_BASE_PATH, LineChartComponent, ListComponent, ListItemTemplateDirective, LogViewerComponent, LogoComponent, MarkdownComponent, MenuComponent, ModalComponent, NotificationCenterComponent, NumberInputComponent, PageHeaderComponent, PageLayoutComponent, PaginationComponent, PasswordInputComponent, PieChartComponent, PopoverComponent, ProgressBarComponent, ProgressRingComponent, RadarChartComponent, RadioComponent, RatingComponent, RichTextEditorComponent, ScatterPlotComponent, SearchInputComponent, SectionComponent, SelectComponent, SidenavComponent, SizeInteractiveLgFontSize, SizeInteractiveLgHeight, SizeInteractiveLgPadding, SizeInteractiveMdFontSize, SizeInteractiveMdHeight, SizeInteractiveMdPadding, SizeInteractiveSmFontSize, SizeInteractiveSmHeight, SizeInteractiveSmPadding, SizeInteractiveXsFontSize, SizeInteractiveXsHeight, SizeInteractiveXsPadding, SizeMinTouchHeight, SizeMinTouchWidth, SkeletonComponent, SliderComponent, SpacerComponent, Spacing0, Spacing05, Spacing1, Spacing10, Spacing11, Spacing12, Spacing14, Spacing15, Spacing16, Spacing2, Spacing25, Spacing3, Spacing35, Spacing4, Spacing5, Spacing6, Spacing7, Spacing8, Spacing9, SparklineComponent, SpinnerComponent, StackComponent, StackedBarChartComponent, StageListComponent, StatTrendComponent, StepperComponent, SwitchComponent, TabComponent, TableCellDirective, TableComponent, TabsComponent, TagInputComponent, TextareaComponent, ThemeService, TimelineComponent, ToastComponent, ToastService, ToggleGroupComponent, ToolbarComponent, TooltipContentComponent, TooltipDirective, TreeViewComponent, TypographyComponent, TypographyFontFamilyBase, TypographyFontFamilyMono, TypographyFontSize2xl, TypographyFontSize3xl, TypographyFontSize4xl, TypographyFontSize5xl, TypographyFontSize6xl, TypographyFontSizeBase, TypographyFontSizeLg, TypographyFontSizeSm, TypographyFontSizeXl, TypographyFontSizeXs, TypographyFontWeightBold, TypographyFontWeightMedium, TypographyFontWeightNormal, TypographyFontWeightSemibold, TypographyLineHeightNormal, TypographyLineHeightRelaxed, TypographyLineHeightTight, VerificationCodeInputComponent, WaterfallChartComponent, resolveFileIcon };
|
|
7054
|
-
export type { ActionClickEvent, AlertVariant, AreaChartSeries, AvatarGroupItem, AvatarSize, AvatarStatus, BadgeSize, BadgeVariant, BarChartItem, BarChartOrientation, BreadcrumbItem, BreadcrumbSize, ButtonSize, ButtonType, ButtonVariant, CalendarEvent, CalendarView, CalloutVariant, CellEditEvent, ChatAttachment, ChatFileAttachEvent, ChatMessage, ChatMessageRole, ChatMessageStatus, ChatRenderMarkdown, ChatSendEvent, CheckboxSize, ChipSize, ChipVariant, CodeBlockLanguage, ComboboxOption, ComboboxSize, ComboboxValue, ConfirmDialogVariant, ConfirmOptions, ContainerSize, DateRange, DateValue, DependencyDirection, DependencyEdgeDef, DependencyNode, DependencyNodeStatus, DependencyRelation, DiffViewMode, DividerOrientation, DividerSpacing, DividerVariant, DocumentType, DonutChartSize, DonutSegment, DrawerPosition, DrawerSize, EmptyStateSize, ErrorSeverity, FileUploadFile, FilterConfig, FilterOption, FilterValues, FooterLink, FooterSection, FooterVariant, FunnelStep, GalleryItem, GalleryLayout, GallerySize, GanttDependency, GanttTask, GaugeColor, GaugeSize, HeatmapCell, HeroColor, HeroSize, HeroVariant, IconSize, IconVariant, KanbanCard, KanbanColumn, KanbanLabel, KanbanMoveEvent, LineChartSeries, ListItem, ListOrientation, ListSize, ListVariant, LogLevel, LogLine, LogViewerVariant, MarkdownHeading, MarkdownLinkClick, MarkdownRendered, MenuItem, ModalSize, NavigationItem, Notification, NotificationPriority, NotificationType, PageLayoutFill, PaginationSize, PasswordRequirement, PasswordStrength, PieChartSize, PieSegment, PopoverPosition, PopoverTrigger, ProgressBarColor, ProgressBarSize, ProgressBarVariant, ProgressRingColor, ProgressRingSize, RadarChartSeries, RadioSize, RatingSize, RenderPart, RequireTextConfig, RichTextEditorMode, ScatterPoint, ScatterSeries, SearchInputSize, SectionBackground, SectionSpacing, SelectOption, SelectOptionGroup, SelectValue, SelectionChangeEvent, SidenavMode, SidenavPosition, SkeletonVariant, SortEvent, SpacerSize, SparklineColor, SparklineCurve, SpinnerSize, StackAlign, StackDirection, StackGap, StackJustify, StackedBarCategory, StackedBarLegend, StackedBarOrientation, StageItem, StageListSize, StatTrendDirection, StepState, StepperStep, TabOrientation, TableAction, TableActionsAlign, TableColumn, TableSize, TableVariant, ThemeConfig, ThemeMode, ThemeState, TimelineItem, TimelineOrientation, Toast, ToastAction, ToastConfig, ToastPosition, ToastVariant, ToggleOption, ToolbarAction, ToolbarConfig, TooltipPosition, TreeNode, TreeNodeType, WaterfallItem };
|
|
7233
|
+
export type { ActionClickEvent, AlertVariant, AreaChartSeries, AvatarGroupItem, AvatarSize, AvatarStatus, BadgeSize, BadgeVariant, BarChartItem, BarChartOrientation, BreadcrumbItem, BreadcrumbSize, ButtonSize, ButtonType, ButtonVariant, CalendarEvent, CalendarView, CalloutVariant, CellEditEvent, ChatAttachment, ChatFileAttachEvent, ChatMessage, ChatMessageRole, ChatMessageStatus, ChatRenderMarkdown, ChatSendEvent, CheckboxSize, ChipSize, ChipVariant, CodeBlockLanguage, ComboboxOption, ComboboxSize, ComboboxValue, ConfirmDialogVariant, ConfirmOptions, ContainerSize, DateRange, DateValue, DependencyDirection, DependencyEdgeDef, DependencyNode, DependencyNodeStatus, DependencyRelation, DiffViewMode, DividerOrientation, DividerSpacing, DividerVariant, DocumentType, DonutChartSize, DonutSegment, DrawerPosition, DrawerSize, EmptyStateSize, ErrorSeverity, FileUploadFile, FilterConfig, FilterOption, FilterValues, FooterLink, FooterSection, FooterVariant, FunnelStep, GalleryItem, GalleryLayout, GallerySize, GanttDependency, GanttTask, GaugeColor, GaugeSize, HeatmapCell, HeroColor, HeroSize, HeroVariant, IconSize, IconVariant, KanbanCard, KanbanColumn, KanbanLabel, KanbanMoveEvent, LineChartSeries, ListItem, ListOrientation, ListSize, ListVariant, LogLevel, LogLine, LogViewerVariant, MarkdownChangesHighlighted, MarkdownHeading, MarkdownLinkClick, MarkdownRendered, MenuItem, ModalSize, NavigationItem, Notification, NotificationPriority, NotificationType, PageLayoutFill, PaginationSize, PasswordRequirement, PasswordStrength, PieChartSize, PieSegment, PopoverPosition, PopoverTrigger, ProgressBarColor, ProgressBarSize, ProgressBarVariant, ProgressRingColor, ProgressRingSize, RadarChartSeries, RadioSize, RatingSize, RenderPart, RequireTextConfig, RichTextEditorMode, RowToggleEvent, ScatterPoint, ScatterSeries, SearchInputSize, SectionBackground, SectionSpacing, SelectOption, SelectOptionGroup, SelectValue, SelectionChangeEvent, SidenavMode, SidenavPosition, SkeletonVariant, SortEvent, SpacerSize, SparklineColor, SparklineCurve, SpinnerSize, StackAlign, StackDirection, StackGap, StackJustify, StackedBarCategory, StackedBarLegend, StackedBarOrientation, StageItem, StageListSize, StatTrendDirection, StepState, StepperStep, TabOrientation, TableAction, TableActionsAlign, TableColumn, TableSize, TableTreeConfig, TableVariant, ThemeConfig, ThemeMode, ThemeState, TimelineItem, TimelineOrientation, Toast, ToastAction, ToastConfig, ToastPosition, ToastVariant, ToggleOption, ToolbarAction, ToolbarConfig, TooltipPosition, TreeNode, TreeNodeType, WaterfallItem };
|