@coolon/angular-ui-powerups 1.11.4 → 1.12.0

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.
@@ -2568,6 +2568,7 @@ var ColumnModel = /** @class */ (function () {
2568
2568
  portal: new ComponentPortal(cellRenderer),
2569
2569
  initialiseComponent: initialiser
2570
2570
  };
2571
+ return this;
2571
2572
  };
2572
2573
  ColumnModel.prototype.setCellEditor = function (cellEditor) {
2573
2574
  this._cellEditorConfig = cellEditor;
@@ -2625,14 +2626,16 @@ var PropertyColumnModel = /** @class */ (function (_super) {
2625
2626
  function PropertyColumnModel(property, defaults) {
2626
2627
  var _this = _super.call(this, property.toString(), defaults) || this;
2627
2628
  _this.property = property;
2629
+ _this._format = function (value) { return value; };
2628
2630
  _this.cellRenderer(DefaultCellRendererComponent);
2629
2631
  return _this;
2630
2632
  }
2631
2633
  PropertyColumnModel.prototype.cellRenderer = function (componentType) {
2632
2634
  var _this = this;
2633
2635
  this.setCellRenderer(componentType, function (component, row) {
2634
- component.value = row[_this.property];
2636
+ component.value = _this._format(row[_this.property]);
2635
2637
  });
2638
+ return this;
2636
2639
  };
2637
2640
  PropertyColumnModel.prototype.cellEditor = function (editor, options) {
2638
2641
  var _this = this;
@@ -2651,6 +2654,11 @@ var PropertyColumnModel = /** @class */ (function (_super) {
2651
2654
  });
2652
2655
  return this;
2653
2656
  };
2657
+ PropertyColumnModel.prototype.format = function (formatter) {
2658
+ assert$1.isFunction(formatter);
2659
+ this._format = formatter;
2660
+ return this;
2661
+ };
2654
2662
  return PropertyColumnModel;
2655
2663
  }(ColumnModel));
2656
2664
  var CustomValueColumnModel = /** @class */ (function (_super) {
@@ -2666,6 +2674,7 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
2666
2674
  this.setCellRenderer(componentType, function (component, row) {
2667
2675
  component.value = _this.getValue(row);
2668
2676
  });
2677
+ return this;
2669
2678
  };
2670
2679
  return CustomValueColumnModel;
2671
2680
  }(ColumnModel));
@@ -2682,6 +2691,7 @@ var EditorControlColumnModel = /** @class */ (function (_super) {
2682
2691
  component.editSession = editSession;
2683
2692
  component.editRowCommand = editRowCommand;
2684
2693
  });
2694
+ return this;
2685
2695
  };
2686
2696
  EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
2687
2697
  return '';
@@ -2856,7 +2866,7 @@ var TableModel = /** @class */ (function () {
2856
2866
  this._columnTextPropertiesLookup = columnTextProperties;
2857
2867
  };
2858
2868
  TableModel.prototype.getColumnTextProperties = function (column) {
2859
- var factory = this._columnTextPropertiesLookup[column.columnId];
2869
+ var factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
2860
2870
  return factory ? factory() : undefined;
2861
2871
  };
2862
2872
  TableModel.prototype.startEditSession = function (row) {