@coolon/angular-ui-powerups 2.0.0-alpha.6 → 2.0.0-alpha.8

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.
@@ -1584,20 +1584,30 @@ var ColumnModel = /** @class */ (function () {
1584
1584
  }());
1585
1585
  var PropertyColumnModel = /** @class */ (function (_super) {
1586
1586
  __extends(PropertyColumnModel, _super);
1587
- function PropertyColumnModel(property, defaults) {
1588
- var _this = _super.call(this, property.toString(), defaults) || this;
1587
+ function PropertyColumnModel(id, property, defaults) {
1588
+ var _this = _super.call(this, id, defaults) || this;
1589
1589
  _this.property = property;
1590
1590
  _this._format = function (value) { return value; };
1591
1591
  _this.cellRenderer(DefaultCellRendererComponent);
1592
1592
  return _this;
1593
1593
  }
1594
- PropertyColumnModel.prototype.cellRenderer = function (componentType, onComponentInit) {
1594
+ PropertyColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
1595
1595
  var _this = this;
1596
1596
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
1597
- if (firstTime && onComponentInit) {
1598
- onComponentInit(component);
1597
+ if (firstTime) {
1598
+ if (___default.isFunction(onComponentInitOrOptions)) {
1599
+ onComponentInitOrOptions(component);
1600
+ }
1601
+ else {
1602
+ if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
1603
+ onComponentInitOrOptions.onComponentInit(component);
1604
+ }
1605
+ }
1599
1606
  }
1600
1607
  component.value = _this._format(rowData.row[_this.property]);
1608
+ if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
1609
+ onComponentInitOrOptions.onRowUpdate(component, rowData.row);
1610
+ }
1601
1611
  }));
1602
1612
  return this;
1603
1613
  };
@@ -1629,8 +1639,8 @@ var PropertyColumnModel = /** @class */ (function (_super) {
1629
1639
  }(ColumnModel));
1630
1640
  var ListPropertyColumnModel = /** @class */ (function (_super) {
1631
1641
  __extends(ListPropertyColumnModel, _super);
1632
- function ListPropertyColumnModel(property, defaults) {
1633
- var _this = _super.call(this, property.toString(), defaults) || this;
1642
+ function ListPropertyColumnModel(id, property, defaults) {
1643
+ var _this = _super.call(this, id, defaults) || this;
1634
1644
  _this.property = property;
1635
1645
  _this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
1636
1646
  _this.cellRenderer(DefaultCellRendererComponent);
@@ -1864,7 +1874,7 @@ var TableModel = /** @class */ (function () {
1864
1874
  this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
1865
1875
  this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
1866
1876
  this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
1867
- this.addRowClass("enable-hover", function () { return _this.isRowSelectionEnabled(); });
1877
+ this.addRowClass('enable-hover', function () { return _this.isRowSelectionEnabled(); });
1868
1878
  }
1869
1879
  TableModel_1 = TableModel;
1870
1880
  TableModel.fromList = function (sourceOfTruth, builder) {
@@ -1892,11 +1902,11 @@ var TableModel = /** @class */ (function () {
1892
1902
  enumerable: true,
1893
1903
  configurable: true
1894
1904
  });
1895
- TableModel.prototype.pluck = function (property) {
1896
- return this.addColumn(new PropertyColumnModel(property, this));
1905
+ TableModel.prototype.pluck = function (property, options) {
1906
+ return this.addColumn(new PropertyColumnModel((options === null || options === void 0 ? void 0 : options.columnId) || property.toString(), property, this));
1897
1907
  };
1898
- TableModel.prototype.pluckList = function (property) {
1899
- return this.addColumn(new ListPropertyColumnModel(property, this));
1908
+ TableModel.prototype.pluckList = function (property, options) {
1909
+ return this.addColumn(new ListPropertyColumnModel((options === null || options === void 0 ? void 0 : options.columnId) || property.toString(), property, this));
1900
1910
  };
1901
1911
  TableModel.prototype.addSelectionColumn = function (selectionModel) {
1902
1912
  assert.isNil(this.selectionColumnModel);