@coolon/angular-ui-powerups 14.24.0 → 14.24.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.
@@ -1790,7 +1790,7 @@ class AbstractListInputComponent extends AbstractInputComponent {
1790
1790
  this.setValueIsInProgress$ = new Guard();
1791
1791
  this.valueChange = new EventEmitter();
1792
1792
  const { when, valueOf, chain } = Dsl.disposeWith(this);
1793
- const binding = new Binding.Identity(this.formValue$, this.componentList$).writeRight();
1793
+ const binding = this.registerDisposable(new Binding.Identity(this.formValue$, this.componentList$).writeRight());
1794
1794
  const inExternalChange = valueOf.any(this.setValueIsInProgress$, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
1795
1795
  when(this.componentList$).changes((is, was) => {
1796
1796
  this.valueChange.emit(is);
@@ -1861,7 +1861,7 @@ class AbstractValueInputComponent extends AbstractInputComponent {
1861
1861
  this.componentValue$ = new MutableValueModel();
1862
1862
  this.valueChange = new EventEmitter();
1863
1863
  const { when, chain, valueOf } = Dsl.disposeWith(this);
1864
- const binding = new Binding.Identity(this.formValue$, this.componentValue$).writeRight();
1864
+ const binding = this.registerDisposable(new Binding.Identity(this.formValue$, this.componentValue$).writeRight());
1865
1865
  const inExternalChange = valueOf.any(this.setValueInProgress$, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
1866
1866
  when(this.componentValue$).changes((is, was) => {
1867
1867
  this.valueChange.emit(is);
@@ -2891,6 +2891,9 @@ class AbstractTableComponent extends DisposableComponent {
2891
2891
  ngOnInit() {
2892
2892
  const { chain } = Dsl.disposeWith(this);
2893
2893
  const model = this.getModel();
2894
+ if (!model) {
2895
+ lang$1.illegalState("aup-table tableModel is nil");
2896
+ }
2894
2897
  this.columnsById = chain(model.columns).indexBy('columnId');
2895
2898
  this._dataSource$.setDelegate(model.dataSource$);
2896
2899
  model.initialise(this.injector, (row) => this.identityOf(row));
@@ -3536,6 +3539,10 @@ class AbstractTableModel extends GarbageCollector {
3536
3539
  const columnId = options?.columnId || property.toString();
3537
3540
  return this.addColumn(new ListPropertyColumnModel(columnId, property, () => this.getColumnTextProperties(columnId)));
3538
3541
  }
3542
+ // TODO: clean this up and assign the selection model on teh table directly.
3543
+ // tableModel.useSelectionModel(model) and have the seleciton column automatically
3544
+ // added. Need to look at how we're using the visibility controls as well.
3545
+ // Should also lazy create the selection column model if someone accesses it.
3539
3546
  _addSelectionColumn(selectionModel, visible) {
3540
3547
  assert.isNil(this.selectionColumnModel);
3541
3548
  const columnId = "selection-column";