@meshmakers/shared-ui 3.3.1160 → 3.3.1180
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, AfterViewInit, EventEmitter, ElementRef, OnInit, InjectionToken, TemplateRef, PipeTransform, OnChanges, SimpleChanges, EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Type, OnDestroy, AfterViewInit, EventEmitter, ElementRef, OnInit, InjectionToken, TemplateRef, PipeTransform, OnChanges, SimpleChanges, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as _progress_kendo_svg_icons from '@progress/kendo-svg-icons';
|
|
4
4
|
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
5
5
|
import { FormGroup, ControlValueAccessor, Validator, FormControl, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
@@ -63,7 +63,7 @@ type BadgeMappingTable = Record<string, BadgeMapping>;
|
|
|
63
63
|
interface TableColumn {
|
|
64
64
|
displayName?: string | null;
|
|
65
65
|
field: string;
|
|
66
|
-
dataType?: 'text' | 'numeric' | 'numericRange' | 'boolean' | 'date' | 'iso8601' | 'bytes' | 'statusIcons' | 'cronExpression' | 'progressBar' | 'badge';
|
|
66
|
+
dataType?: 'text' | 'numeric' | 'numericRange' | 'boolean' | 'date' | 'iso8601' | 'bytes' | 'statusIcons' | 'cronExpression' | 'progressBar' | 'badge' | 'component';
|
|
67
67
|
format?: string;
|
|
68
68
|
/**
|
|
69
69
|
* Column width in pixels. If not set, the column will auto-size.
|
|
@@ -126,6 +126,27 @@ interface TableColumn {
|
|
|
126
126
|
* ```
|
|
127
127
|
*/
|
|
128
128
|
formatter?: (value: unknown, item: unknown) => string;
|
|
129
|
+
/**
|
|
130
|
+
* When true, cell content is rendered on a single line and clipped with an ellipsis.
|
|
131
|
+
* The full value is exposed via a native `title` tooltip on hover, so long strings
|
|
132
|
+
* (e.g. error messages, log lines) stay readable without bloating row heights.
|
|
133
|
+
* Intended for text-style cells; has no visual effect on columns whose content is
|
|
134
|
+
* already a fixed-size widget (statusIcons, progressBar, badge, …).
|
|
135
|
+
*/
|
|
136
|
+
truncate?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Standalone component to instantiate inside the cell for `dataType: 'component'` columns.
|
|
139
|
+
* The grid renders the component via `*ngComponentOutlet`, with `cellInputs` supplying
|
|
140
|
+
* its `@Input()` bindings per row. Use this when the cell needs internal state
|
|
141
|
+
* (polling, async data, animation) that a static formatter cannot provide.
|
|
142
|
+
*/
|
|
143
|
+
cellComponent?: Type<unknown>;
|
|
144
|
+
/**
|
|
145
|
+
* Builds the `@Input()` bindings for the component instance from the row's data item.
|
|
146
|
+
* Called once per row when the cell is rendered. Return values are forwarded verbatim
|
|
147
|
+
* to `*ngComponentOutlet`'s `inputs` map (keyed by the @Input() property name).
|
|
148
|
+
*/
|
|
149
|
+
cellInputs?: (item: unknown) => Record<string, unknown>;
|
|
129
150
|
}
|
|
130
151
|
type ColumnDefinition = string | TableColumn;
|
|
131
152
|
type ContextMenuType = 'contextMenu' | 'actionMenu';
|
|
@@ -250,6 +271,12 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
|
|
|
250
271
|
* the dataType-driven rendering.
|
|
251
272
|
*/
|
|
252
273
|
protected getFormattedValue(element: Record<string, unknown>, column: TableColumn): string | null;
|
|
274
|
+
/**
|
|
275
|
+
* Plain-text representation of the cell value used as the `title` attribute on truncated
|
|
276
|
+
* cells so the full string is reachable via the browser's native tooltip on hover.
|
|
277
|
+
* Honours `formatter` first, then falls back to a stringified raw value.
|
|
278
|
+
*/
|
|
279
|
+
protected getCellTitle(element: Record<string, unknown>, column: TableColumn): string | null;
|
|
253
280
|
protected getFilterType(column: TableColumn): 'text' | 'numeric' | 'boolean' | 'date';
|
|
254
281
|
/**
|
|
255
282
|
* Gets all status field configurations for a statusIcons column.
|
|
@@ -270,6 +297,12 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
|
|
|
270
297
|
* Helper to get a field value from a data item, supporting nested fields.
|
|
271
298
|
*/
|
|
272
299
|
private getFieldValue;
|
|
300
|
+
/**
|
|
301
|
+
* Resolves the @Input bindings for a `dataType: 'component'` cell.
|
|
302
|
+
* Returns an empty object when no `cellInputs` factory is configured so
|
|
303
|
+
* `*ngComponentOutlet` still renders the component (with its default state).
|
|
304
|
+
*/
|
|
305
|
+
protected getCellInputs(dataItem: Record<string, unknown>, column: TableColumn): Record<string, unknown>;
|
|
273
306
|
/**
|
|
274
307
|
* Gets the human-readable description of a cron expression.
|
|
275
308
|
*/
|