@meshmakers/shared-ui 3.3.1170 → 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.
|
|
@@ -134,6 +134,19 @@ interface TableColumn {
|
|
|
134
134
|
* already a fixed-size widget (statusIcons, progressBar, badge, …).
|
|
135
135
|
*/
|
|
136
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>;
|
|
137
150
|
}
|
|
138
151
|
type ColumnDefinition = string | TableColumn;
|
|
139
152
|
type ContextMenuType = 'contextMenu' | 'actionMenu';
|
|
@@ -284,6 +297,12 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
|
|
|
284
297
|
* Helper to get a field value from a data item, supporting nested fields.
|
|
285
298
|
*/
|
|
286
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>;
|
|
287
306
|
/**
|
|
288
307
|
* Gets the human-readable description of a cron expression.
|
|
289
308
|
*/
|