@trudb/tru-common-lib 0.0.418 → 0.0.420

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.
@@ -478,6 +478,7 @@ class TruSearchViewBase {
478
478
  truWindowAddViewEventArgs.entityIndex = gridConfig.rowIndex;
479
479
  truWindowAddViewEventArgs.componentName = this.tableName + 'DetailView';
480
480
  this.truWindowEventHandler.addView(truWindowAddViewEventArgs);
481
+ this.view.active(false);
481
482
  }
482
483
  else {
483
484
  alert(this.tablePluralLabel + ' does not have a detail view.');
@@ -3101,8 +3102,8 @@ class TruDesktopWindow {
3101
3102
  if (this.window.views === undefined)
3102
3103
  return;
3103
3104
  var length = this.window.views.length;
3104
- this.disablePrevious = !!(this.window.views[0].active || length === 1);
3105
- this.disableNext = !!(this.window.views[length - 1].active || length === 1);
3105
+ this.disablePrevious = !!(this.window.views[0].active$.getValue() || length === 1);
3106
+ this.disableNext = !!(this.window.views[length - 1].onActive.getValue() || length === 1);
3106
3107
  };
3107
3108
  /**
3108
3109
  * @tru.doc function
@@ -3242,7 +3243,7 @@ class TruDesktopWindow {
3242
3243
  this.addView = (viewConfigOverlay) => {
3243
3244
  this.removeForwardViews();
3244
3245
  var activeView = this.desktopCtrl.getActiveView(this.window);
3245
- activeView.active = false;
3246
+ activeView.active(false);
3246
3247
  var viewConfig = this.desktopCtrl.getDesktop().viewConfig;
3247
3248
  var viewConfigInstance = Object.assign({}, viewConfig);
3248
3249
  var extended = Object.assign(viewConfigInstance, viewConfigOverlay);
@@ -3276,8 +3277,8 @@ class TruDesktopWindow {
3276
3277
  if (this.cancelEditingOnNavigation)
3277
3278
  this.desktopCtrl.getActiveView(this.window).isEditing = false;
3278
3279
  let activeView = this.desktopCtrl.getActiveView(this.window);
3279
- activeView.active = false;
3280
- this.window.views[0].active = true;
3280
+ activeView.active(false);
3281
+ this.window.views[0].active(true);
3281
3282
  this.updateNavigationState();
3282
3283
  };
3283
3284
  /**
@@ -3294,8 +3295,8 @@ class TruDesktopWindow {
3294
3295
  if (this.cancelEditingOnNavigation)
3295
3296
  this.desktopCtrl.getActiveView(this.window).isEditing = false;
3296
3297
  let activeView = this.desktopCtrl.getActiveView(this.window);
3297
- activeView.active = false;
3298
- this.window.views[this.window.views.length - 1].active = true;
3298
+ activeView.active(false);
3299
+ this.window.views[this.window.views.length - 1].active(true);
3299
3300
  this.updateNavigationState();
3300
3301
  };
3301
3302
  this.resizeEventHandler = () => {
@@ -3362,8 +3363,8 @@ class TruDesktopWindow {
3362
3363
  var activeViewIndex = this.window.views.indexOf(activeView);
3363
3364
  if (this.cancelEditingOnNavigation)
3364
3365
  activeView.isEditing = false;
3365
- activeView.active = false;
3366
- this.window.views[activeViewIndex - 1].active = true;
3366
+ activeView.active(false);
3367
+ this.window.views[activeViewIndex - 1].active(true);
3367
3368
  this.updateNavigationState();
3368
3369
  };
3369
3370
  this.nextView = () => {
@@ -3373,8 +3374,8 @@ class TruDesktopWindow {
3373
3374
  var activeViewIndex = this.window.views.indexOf(activeView);
3374
3375
  if (this.cancelEditingOnNavigation)
3375
3376
  activeView.isEditing = false;
3376
- activeView.active = false;
3377
- this.window.views[activeViewIndex + 1].active = true;
3377
+ activeView.active(false);
3378
+ this.window.views[activeViewIndex + 1].active(true);
3378
3379
  this.updateNavigationState();
3379
3380
  };
3380
3381
  this.save = () => {
@@ -3693,7 +3694,7 @@ class TruDesktop {
3693
3694
  this.getActiveView = (wdw) => {
3694
3695
  var activeView = null;
3695
3696
  wdw.views.forEach((view) => {
3696
- if (view.active === true) {
3697
+ if (view.active$.getValue() === true) {
3697
3698
  activeView = view;
3698
3699
  }
3699
3700
  });