@coolon/angular-ui-powerups 2.0.0-alpha.11 → 2.0.0-alpha.12

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.0.0-alpha.12](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2020-07-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * added row update callbacks for custom component columns ([c128053](https://bitbucket.org/coolon/angular-ui-powerups/commit/c128053f37679ba480289df4c56c5b19c9d949c4))
11
+
5
12
  ## [2.0.0-alpha.11](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2020-07-29)
6
13
 
7
14
 
@@ -2016,13 +2016,23 @@
2016
2016
  _this.cellRenderer(DefaultCellRendererComponent);
2017
2017
  return _this;
2018
2018
  }
2019
- CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInit) {
2019
+ CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
2020
2020
  var _this = this;
2021
2021
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
2022
- if (firstTime && ___default__default.isFunction(onComponentInit)) {
2023
- onComponentInit(component);
2022
+ if (firstTime) {
2023
+ if (___default__default.isFunction(onComponentInitOrOptions)) {
2024
+ onComponentInitOrOptions(component);
2025
+ }
2026
+ else {
2027
+ if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
2028
+ onComponentInitOrOptions.onComponentInit(component);
2029
+ }
2030
+ }
2024
2031
  }
2025
2032
  component.value = _this.getValue(rowData.row);
2033
+ if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
2034
+ onComponentInitOrOptions.onRowUpdate(component, rowData.row);
2035
+ }
2026
2036
  }));
2027
2037
  return this;
2028
2038
  };
@@ -2252,8 +2262,8 @@
2252
2262
  TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2253
2263
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2254
2264
  };
2255
- TableModel.prototype.addComponentColumn = function (columnId, component, onInit) {
2256
- return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onInit);
2265
+ TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
2266
+ return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
2257
2267
  };
2258
2268
  TableModel.prototype.addTemplateColumn = function (columnId) {
2259
2269
  return this.addColumn(new CustomTemplateColumnModel(columnId, this));