@wavemaker-ai/app-ng-runtime 1.0.0-rc.309 → 1.0.0-rc.314

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.
@@ -885,7 +885,7 @@ declare class AppComponent implements DoCheck, AfterViewInit, OnDestroy {
885
885
  private retryCount;
886
886
  private navigationEndSubscription;
887
887
  appLocale: any;
888
- routerOutlet: RouterOutlet;
888
+ set routerOutlet(outlet: RouterOutlet | undefined);
889
889
  dynamicComponentContainerRef: ViewContainerRef;
890
890
  spinner: SPINNER;
891
891
  constructor(_pipeProvider: PipeProvider, _appRef: ApplicationRef, elRef: ElementRef, oAuthService: OAuthService, dialogService: AbstractDialogService, spinnerService: AbstractSpinnerService, ngZone: NgZone, router: Router, app: App, appManager: AppManagerService, customIconsLoaderService: CustomIconsLoaderService);
@@ -2183,6 +2183,10 @@ $.widget('wm.datatable', {
2183
2183
  var rowId = parseInt($row.attr('data-row-id'), 10);
2184
2184
  return rowId >= this.preparedData.length || $row.hasClass('always-new-row');
2185
2185
  },
2186
+ _getWmVariableRowLocator: function (rowId) {
2187
+ var liveRow = this.options.data[parseInt(rowId, 10)];
2188
+ return (liveRow && liveRow.$$wmSourceListIndex != null) ? liveRow.$$wmSourceListIndex : (liveRow || parseInt(rowId, 10));
2189
+ },
2186
2190
  /* Toggles the edit state of a row. */
2187
2191
  toggleEditRow: function (e, options) {
2188
2192
  if(e?.target && $(e.target).closest('.app-menu').length) {
@@ -2388,8 +2392,9 @@ $.widget('wm.datatable', {
2388
2392
  return;
2389
2393
  }
2390
2394
  }
2391
- if(this.options?.getDataSource()?.category== "wm.Variable") {
2392
- editOptions.rowindex = rowindex;
2395
+ var ds = this.options.getDataSource && this.options.getDataSource();
2396
+ if (ds && ds.category === 'wm.Variable') {
2397
+ editOptions.rowindex = self._getWmVariableRowLocator(rowindex);
2393
2398
  }
2394
2399
  this.options.afterRowUpdate(rowData, e, onSaveSuccess, editOptions);
2395
2400
  }
@@ -2542,6 +2547,10 @@ $.widget('wm.datatable', {
2542
2547
  return;
2543
2548
  }
2544
2549
  }
2550
+ var deleteDs = this.options.getDataSource && this.options.getDataSource();
2551
+ if (deleteDs && deleteDs.category === 'wm.Variable') {
2552
+ options.rowindex = this._getWmVariableRowLocator(rowId);
2553
+ }
2545
2554
  if (_.isFunction(this.options.onRowDelete)) {
2546
2555
  className = this.options.cssClassNames.deleteRow;
2547
2556
  isActiveRow = $row.attr('class').indexOf('active') !== -1;