@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.
- package/CHANGELOG.md +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +12 -2
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js +12 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +1 -1
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +12 -1
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +1 -1
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +12 -2
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +12 -2
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/column-model.d.ts +6 -4
- package/package.json +1 -1
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
|
+
## [1.12.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.11.4...v1.12.0) (2020-06-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added formatter support to table column models ([afaa238](https://bitbucket.org/coolon/angular-ui-powerups/commit/afaa238222661f06b62e9b3562d84355be3bcafa))
|
|
11
|
+
|
|
5
12
|
### [1.11.4](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.11.3...v1.11.4) (2020-06-11)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -2743,6 +2743,7 @@
|
|
|
2743
2743
|
portal: new portal.ComponentPortal(cellRenderer),
|
|
2744
2744
|
initialiseComponent: initialiser
|
|
2745
2745
|
};
|
|
2746
|
+
return this;
|
|
2746
2747
|
};
|
|
2747
2748
|
ColumnModel.prototype.setCellEditor = function (cellEditor) {
|
|
2748
2749
|
this._cellEditorConfig = cellEditor;
|
|
@@ -2800,14 +2801,16 @@
|
|
|
2800
2801
|
function PropertyColumnModel(property, defaults) {
|
|
2801
2802
|
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2802
2803
|
_this.property = property;
|
|
2804
|
+
_this._format = function (value) { return value; };
|
|
2803
2805
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2804
2806
|
return _this;
|
|
2805
2807
|
}
|
|
2806
2808
|
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2807
2809
|
var _this = this;
|
|
2808
2810
|
this.setCellRenderer(componentType, function (component, row) {
|
|
2809
|
-
component.value = row[_this.property];
|
|
2811
|
+
component.value = _this._format(row[_this.property]);
|
|
2810
2812
|
});
|
|
2813
|
+
return this;
|
|
2811
2814
|
};
|
|
2812
2815
|
PropertyColumnModel.prototype.cellEditor = function (editor, options) {
|
|
2813
2816
|
var _this = this;
|
|
@@ -2826,6 +2829,11 @@
|
|
|
2826
2829
|
});
|
|
2827
2830
|
return this;
|
|
2828
2831
|
};
|
|
2832
|
+
PropertyColumnModel.prototype.format = function (formatter) {
|
|
2833
|
+
typescriptUtilities.assert.isFunction(formatter);
|
|
2834
|
+
this._format = formatter;
|
|
2835
|
+
return this;
|
|
2836
|
+
};
|
|
2829
2837
|
return PropertyColumnModel;
|
|
2830
2838
|
}(ColumnModel));
|
|
2831
2839
|
var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
@@ -2841,6 +2849,7 @@
|
|
|
2841
2849
|
this.setCellRenderer(componentType, function (component, row) {
|
|
2842
2850
|
component.value = _this.getValue(row);
|
|
2843
2851
|
});
|
|
2852
|
+
return this;
|
|
2844
2853
|
};
|
|
2845
2854
|
return CustomValueColumnModel;
|
|
2846
2855
|
}(ColumnModel));
|
|
@@ -2857,6 +2866,7 @@
|
|
|
2857
2866
|
component.editSession = editSession;
|
|
2858
2867
|
component.editRowCommand = editRowCommand;
|
|
2859
2868
|
});
|
|
2869
|
+
return this;
|
|
2860
2870
|
};
|
|
2861
2871
|
EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
|
|
2862
2872
|
return '';
|
|
@@ -3031,7 +3041,7 @@
|
|
|
3031
3041
|
this._columnTextPropertiesLookup = columnTextProperties;
|
|
3032
3042
|
};
|
|
3033
3043
|
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
3034
|
-
var factory = this._columnTextPropertiesLookup[column.columnId];
|
|
3044
|
+
var factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
|
|
3035
3045
|
return factory ? factory() : undefined;
|
|
3036
3046
|
};
|
|
3037
3047
|
TableModel.prototype.startEditSession = function (row) {
|