@dragonworks/ngx-dashboard 22.0.0 → 22.1.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
|
@@ -4,7 +4,7 @@ import { Type, ViewContainerRef, ComponentRef, OnChanges, SimpleChanges, Injecti
|
|
|
4
4
|
import * as _ngrx_signals from '@ngrx/signals';
|
|
5
5
|
import { SafeHtml } from '@angular/platform-browser';
|
|
6
6
|
|
|
7
|
-
declare const NGX_DASHBOARD_VERSION = "22.
|
|
7
|
+
declare const NGX_DASHBOARD_VERSION = "22.1.0";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Branded type for cell identifiers to ensure type safety when working with grid coordinates.
|
|
@@ -177,6 +177,24 @@ interface GridSelection {
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Outcome of a grid resize request (e.g. `DashboardComponent.setGridSize()`
|
|
182
|
+
* or an editor drag-handle commit).
|
|
183
|
+
*
|
|
184
|
+
* The dashboard uses a clamp-to-content policy: a requested size that would
|
|
185
|
+
* push an existing widget outside the grid is snapped up to the smallest size
|
|
186
|
+
* that still contains every widget's full footprint. The fields below report
|
|
187
|
+
* the size that was actually applied, not the size that was requested.
|
|
188
|
+
*/
|
|
189
|
+
interface GridResizeResult {
|
|
190
|
+
/** Rows actually applied after clamp-to-content. */
|
|
191
|
+
rows: number;
|
|
192
|
+
/** Columns actually applied after clamp-to-content. */
|
|
193
|
+
columns: number;
|
|
194
|
+
/** True when the requested size was clamped up to keep widgets in bounds. */
|
|
195
|
+
clamped: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
180
198
|
/**
|
|
181
199
|
* Defines space that should be reserved around the dashboard component
|
|
182
200
|
* when calculating viewport constraints.
|
|
@@ -379,6 +397,7 @@ declare class DashboardComponent implements OnChanges {
|
|
|
379
397
|
}>;
|
|
380
398
|
widgetsById: _angular_core.Signal<Record<string, CellData>>;
|
|
381
399
|
resizeData: _angular_core.Signal<ResizeData | null>;
|
|
400
|
+
gridResizePreview: _angular_core.Signal<GridResizeResult | null>;
|
|
382
401
|
dragData: _angular_core.Signal<DragData | null>;
|
|
383
402
|
hoveredDropZone: _angular_core.Signal<{
|
|
384
403
|
row: number;
|
|
@@ -386,11 +405,14 @@ declare class DashboardComponent implements OnChanges {
|
|
|
386
405
|
} | null>;
|
|
387
406
|
dashboardService: _dragonworks_ngx_dashboard.DashboardService;
|
|
388
407
|
cells: _angular_core.Signal<CellData[]>;
|
|
408
|
+
isDragActive: _angular_core.Signal<boolean>;
|
|
389
409
|
highlightedZones: _angular_core.Signal<{
|
|
390
410
|
row: number;
|
|
391
411
|
col: number;
|
|
392
412
|
}[]>;
|
|
393
413
|
highlightMap: _angular_core.Signal<Set<CellId>>;
|
|
414
|
+
effectiveRows: _angular_core.Signal<number>;
|
|
415
|
+
effectiveColumns: _angular_core.Signal<number>;
|
|
394
416
|
invalidHighlightMap: _angular_core.Signal<Set<CellId>>;
|
|
395
417
|
isValidPlacement: _angular_core.Signal<boolean>;
|
|
396
418
|
resizePreviewCells: _angular_core.Signal<{
|
|
@@ -415,6 +437,7 @@ declare class DashboardComponent implements OnChanges {
|
|
|
415
437
|
updateWidgetState: (widgetId: WidgetId, widgetState: unknown) => void;
|
|
416
438
|
updateAllWidgetStates: (cellStates: Map<string, unknown>) => void;
|
|
417
439
|
clearDashboard: () => void;
|
|
440
|
+
clearGridResizePreview: () => void;
|
|
418
441
|
startDrag: (dragData: DragData) => void;
|
|
419
442
|
endDrag: () => void;
|
|
420
443
|
setHoveredDropZone: (zone: {
|
|
@@ -428,8 +451,11 @@ declare class DashboardComponent implements OnChanges {
|
|
|
428
451
|
startResize: (cellId: CellId) => void;
|
|
429
452
|
updateResizePreview: (direction: "horizontal" | "vertical", delta: number) => void;
|
|
430
453
|
endResize: (apply: boolean) => void;
|
|
454
|
+
setGridSize: (rows: number, columns: number) => GridResizeResult;
|
|
455
|
+
previewGridResize: (deltaRows: number, deltaColumns: number) => void;
|
|
431
456
|
exportDashboard: (getCurrentWidgetStates?: () => Map<string, unknown>, selection?: GridSelection, selectionOptions?: SelectionFilterOptions) => DashboardDataDto;
|
|
432
457
|
loadDashboard: (data: DashboardDataDto) => void;
|
|
458
|
+
endGridResize: (deltaRows: number, deltaColumns: number) => GridResizeResult | null;
|
|
433
459
|
} & _ngrx_signals.StateSource<{
|
|
434
460
|
dashboardId: string;
|
|
435
461
|
rows: number;
|
|
@@ -442,6 +468,7 @@ declare class DashboardComponent implements OnChanges {
|
|
|
442
468
|
};
|
|
443
469
|
widgetsById: Record<string, CellData>;
|
|
444
470
|
resizeData: ResizeData | null;
|
|
471
|
+
gridResizePreview: GridResizeResult | null;
|
|
445
472
|
dragData: DragData | null;
|
|
446
473
|
hoveredDropZone: {
|
|
447
474
|
row: number;
|
|
@@ -456,6 +483,7 @@ declare class DashboardComponent implements OnChanges {
|
|
|
456
483
|
selectionModifier: _angular_core.InputSignal<SelectionModifier | null>;
|
|
457
484
|
dragThreshold: _angular_core.InputSignal<number>;
|
|
458
485
|
selectionComplete: _angular_core.OutputEmitterRef<GridSelection>;
|
|
486
|
+
gridResized: _angular_core.OutputEmitterRef<GridResizeResult>;
|
|
459
487
|
cells: _angular_core.Signal<CellData[]>;
|
|
460
488
|
private dashboardEditor;
|
|
461
489
|
private dashboardViewer;
|
|
@@ -471,13 +499,24 @@ declare class DashboardComponent implements OnChanges {
|
|
|
471
499
|
loadDashboard(data: DashboardDataDto): void;
|
|
472
500
|
getCurrentDashboardData(): DashboardDataDto;
|
|
473
501
|
clearDashboard(): void;
|
|
502
|
+
/**
|
|
503
|
+
* Resize the dashboard grid to the given row/column counts.
|
|
504
|
+
*
|
|
505
|
+
* Uses a clamp-to-content policy: a size that would push an existing widget
|
|
506
|
+
* out of bounds is snapped up to the smallest size that still contains every
|
|
507
|
+
* widget, so shrinking never orphans a widget. The applied size (which may
|
|
508
|
+
* differ from the request when clamped) is returned and emitted via
|
|
509
|
+
* `gridResized`. Values below 1 are treated as 1; fractional values are
|
|
510
|
+
* floored.
|
|
511
|
+
*/
|
|
512
|
+
setGridSize(rows: number, columns: number): GridResizeResult;
|
|
474
513
|
/**
|
|
475
514
|
* Forwards to the active viewer. No-op in edit mode.
|
|
476
515
|
* See `DashboardViewerComponent.clearSelection()`.
|
|
477
516
|
*/
|
|
478
517
|
clearSelection(): void;
|
|
479
518
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DashboardComponent, never>;
|
|
480
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DashboardComponent, "ngx-dashboard", never, { "dashboardData": { "alias": "dashboardData"; "required": true; "isSignal": true; }; "editMode": { "alias": "editMode"; "required": false; "isSignal": true; }; "reservedSpace": { "alias": "reservedSpace"; "required": false; "isSignal": true; }; "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "selectionModifier": { "alias": "selectionModifier"; "required": false; "isSignal": true; }; "dragThreshold": { "alias": "dragThreshold"; "required": false; "isSignal": true; }; }, { "selectionComplete": "selectionComplete"; }, never, never, true, never>;
|
|
519
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DashboardComponent, "ngx-dashboard", never, { "dashboardData": { "alias": "dashboardData"; "required": true; "isSignal": true; }; "editMode": { "alias": "editMode"; "required": false; "isSignal": true; }; "reservedSpace": { "alias": "reservedSpace"; "required": false; "isSignal": true; }; "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "selectionModifier": { "alias": "selectionModifier"; "required": false; "isSignal": true; }; "dragThreshold": { "alias": "dragThreshold"; "required": false; "isSignal": true; }; }, { "selectionComplete": "selectionComplete"; "gridResized": "gridResized"; }, never, never, true, never>;
|
|
481
520
|
}
|
|
482
521
|
|
|
483
522
|
interface WidgetDisplayItem extends WidgetMetadata {
|
|
@@ -688,4 +727,4 @@ declare class WidgetListContextMenuProvider extends EmptyCellContextProvider {
|
|
|
688
727
|
}
|
|
689
728
|
|
|
690
729
|
export { CELL_SETTINGS_DIALOG_PROVIDER, CellSettingsDialogProvider, DashboardComponent, DashboardService, DefaultCellSettingsDialogProvider, DefaultEmptyCellContextProvider, EMPTY_CELL_CONTEXT_PROVIDER, EmptyCellContextProvider, NGX_DASHBOARD_VERSION, WidgetListComponent, WidgetListContextMenuProvider, createDefaultDashboard, createEmptyDashboard };
|
|
691
|
-
export type { CellDataDto, DashboardDataDto, EmptyCellContext, GridSelection, ReservedSpace, SelectionFilterOptions, SelectionModifier, Widget, WidgetMetadata, WidgetSharedStateProvider };
|
|
730
|
+
export type { CellDataDto, DashboardDataDto, EmptyCellContext, GridResizeResult, GridSelection, ReservedSpace, SelectionFilterOptions, SelectionModifier, Widget, WidgetMetadata, WidgetSharedStateProvider };
|