@aquera/ngx-smart-table 0.0.6-alpha → 0.0.8-alpha

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.
@@ -85,6 +85,8 @@ export declare class StTableComponent implements OnInit, OnChanges, OnDestroy, A
85
85
  * Create internal TableState from config
86
86
  */
87
87
  private createInternalTableState;
88
+ private subscribeToValidationState;
89
+ private subscribeToInternalState;
88
90
  /**
89
91
  * Subscribe to external TableState changes
90
92
  */
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnInit, OnChanges, OnDestroy, SimpleChanges, ChangeDetectorRef } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { WorkbookConfig, WorkbookSheetConfig } from '../../../models/workbook-config.interface';
4
4
  import { WorkbookAction, WorkbookActionEvent, SheetTabActionEvent } from '../../../models/workbook-action.interface';
@@ -11,6 +11,7 @@ import { AutosaveService } from '../../../services/autosave.service';
11
11
  import * as i0 from "@angular/core";
12
12
  export declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
13
13
  private autosaveService;
14
+ private cdr;
14
15
  /**
15
16
  * Workbook configuration
16
17
  */
@@ -68,9 +69,9 @@ export declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy
68
69
  */
69
70
  currentTableConfig: TableConfig | null;
70
71
  /**
71
- * Current table data (for active sheet)
72
+ * Current table data (for active sheet) - using BehaviorSubject for reactive updates
72
73
  */
73
- currentTableData: any[];
74
+ currentTableData$: BehaviorSubject<any[]>;
74
75
  /**
75
76
  * Current table state (for active sheet)
76
77
  */
@@ -127,11 +128,12 @@ export declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy
127
128
  * Beforeunload handler reference
128
129
  */
129
130
  private beforeUnloadHandler;
130
- constructor(autosaveService: AutosaveService);
131
+ constructor(autosaveService: AutosaveService, cdr: ChangeDetectorRef);
131
132
  ngOnInit(): void;
132
133
  ngOnChanges(changes: SimpleChanges): void;
133
134
  /**
134
135
  * Initialize component state
136
+ * @param isFirstInit Whether this is the first initialization (true) or a config update (false)
135
137
  */
136
138
  private initializeComponent;
137
139
  /**
@@ -150,6 +152,10 @@ export declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy
150
152
  * Add new sheet
151
153
  */
152
154
  onAddSheet(): void;
155
+ /**
156
+ * TrackBy function to force component recreation when key changes
157
+ */
158
+ trackByKey(index: number, key: string): string;
153
159
  /**
154
160
  * Check if can add more sheets
155
161
  */
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@aquera/ngx-smart-table",
3
- "version": "0.0.6-alpha",
3
+ "version": "0.0.8-alpha",
4
+ "license": "MIT",
4
5
  "peerDependencies": {
5
6
  "@angular/common": ">=13.0.0 <16.0.0",
6
7
  "@angular/core": ">=13.0.0 <16.0.0",