@dragonworks/ngx-dashboard 21.1.1 → 21.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dragonworks/ngx-dashboard",
3
- "version": "21.1.1",
3
+ "version": "21.2.1",
4
4
  "description": "Angular library for building drag-and-drop grid dashboards with resizable cells and customizable widgets",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -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 = "21.1.1";
7
+ declare const NGX_DASHBOARD_VERSION = "21.2.1";
8
8
 
9
9
  /**
10
10
  * Branded type for cell identifiers to ensure type safety when working with grid coordinates.
@@ -82,7 +82,14 @@ interface CellDisplayData {
82
82
  interface DashboardDataDto {
83
83
  /** Version for future compatibility and migration support */
84
84
  version: string;
85
- /** Unique dashboard identifier managed by the client */
85
+ /**
86
+ * Unique dashboard identifier managed by the client.
87
+ * Set once when a dashboard is first mounted via `[dashboardData]`.
88
+ * On subsequent imperative `loadDashboard()` calls this field is treated
89
+ * as informational metadata (i.e. where the file came from) — the store's
90
+ * existing id is preserved so that bridge registration stays stable and
91
+ * Export→Import across dashboards works without rewriting the id.
92
+ */
86
93
  dashboardId: string;
87
94
  /** Grid dimensions */
88
95
  rows: number;
@@ -241,6 +248,15 @@ interface SelectionFilterOptions {
241
248
  padding?: number;
242
249
  }
243
250
 
251
+ /**
252
+ * Keyboard modifier that gates drag-to-select.
253
+ *
254
+ * When set on `DashboardComponent.selectionModifier`, the selection overlay
255
+ * is mounted but transparent to pointer events until the modifier is held
256
+ * (or a drag started while the modifier was held is in progress).
257
+ */
258
+ type SelectionModifier = 'shift' | 'ctrl' | 'alt' | 'meta';
259
+
244
260
  /**
245
261
  * Interface for providing shared state across all instances of a widget type.
246
262
  *
@@ -437,6 +453,8 @@ declare class DashboardComponent implements OnChanges {
437
453
  editMode: _angular_core.InputSignal<boolean>;
438
454
  reservedSpace: _angular_core.InputSignal<ReservedSpace | undefined>;
439
455
  enableSelection: _angular_core.InputSignal<boolean>;
456
+ selectionModifier: _angular_core.InputSignal<SelectionModifier | null>;
457
+ dragThreshold: _angular_core.InputSignal<number>;
440
458
  selectionComplete: _angular_core.OutputEmitterRef<GridSelection>;
441
459
  cells: _angular_core.Signal<CellData[]>;
442
460
  private dashboardEditor;
@@ -454,7 +472,7 @@ declare class DashboardComponent implements OnChanges {
454
472
  getCurrentDashboardData(): DashboardDataDto;
455
473
  clearDashboard(): void;
456
474
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DashboardComponent, never>;
457
- 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; }; }, { "selectionComplete": "selectionComplete"; }, never, never, true, never>;
475
+ 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>;
458
476
  }
459
477
 
460
478
  interface WidgetDisplayItem extends WidgetMetadata {
@@ -665,4 +683,4 @@ declare class WidgetListContextMenuProvider extends EmptyCellContextProvider {
665
683
  }
666
684
 
667
685
  export { CELL_SETTINGS_DIALOG_PROVIDER, CellSettingsDialogProvider, DashboardComponent, DashboardService, DefaultCellSettingsDialogProvider, DefaultEmptyCellContextProvider, EMPTY_CELL_CONTEXT_PROVIDER, EmptyCellContextProvider, NGX_DASHBOARD_VERSION, WidgetListComponent, WidgetListContextMenuProvider, createDefaultDashboard, createEmptyDashboard };
668
- export type { CellDataDto, DashboardDataDto, EmptyCellContext, GridSelection, ReservedSpace, SelectionFilterOptions, Widget, WidgetMetadata, WidgetSharedStateProvider };
686
+ export type { CellDataDto, DashboardDataDto, EmptyCellContext, GridSelection, ReservedSpace, SelectionFilterOptions, SelectionModifier, Widget, WidgetMetadata, WidgetSharedStateProvider };