@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.
- package/CHANGELOG.md +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +22 -12
- 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 +17 -7
- 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 +5 -5
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm5/lib/components/table/column-model.js +17 -7
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +5 -5
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +22 -12
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +22 -12
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/column-model.d.ts +11 -3
- package/lib/components/table/table-model.d.ts +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.8](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2020-07-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added cell renderer row update hooks ([306291e](https://bitbucket.org/coolon/angular-ui-powerups/commit/306291e76755fb8581782b932c499812ac6446dd))
|
|
11
|
+
|
|
12
|
+
## [2.0.0-alpha.7](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2020-07-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* added multi-column support for the same property ([c8b7498](https://bitbucket.org/coolon/angular-ui-powerups/commit/c8b74987cad8dad012c874e7fa6a4e0c9e11aa36))
|
|
18
|
+
|
|
5
19
|
## [2.0.0-alpha.6](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2020-07-24)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -1756,20 +1756,30 @@
|
|
|
1756
1756
|
}());
|
|
1757
1757
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
1758
1758
|
__extends(PropertyColumnModel, _super);
|
|
1759
|
-
function PropertyColumnModel(property, defaults) {
|
|
1760
|
-
var _this = _super.call(this,
|
|
1759
|
+
function PropertyColumnModel(id, property, defaults) {
|
|
1760
|
+
var _this = _super.call(this, id, defaults) || this;
|
|
1761
1761
|
_this.property = property;
|
|
1762
1762
|
_this._format = function (value) { return value; };
|
|
1763
1763
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
1764
1764
|
return _this;
|
|
1765
1765
|
}
|
|
1766
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType,
|
|
1766
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
1767
1767
|
var _this = this;
|
|
1768
1768
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
1769
|
-
if (firstTime
|
|
1770
|
-
|
|
1769
|
+
if (firstTime) {
|
|
1770
|
+
if (___default__default.isFunction(onComponentInitOrOptions)) {
|
|
1771
|
+
onComponentInitOrOptions(component);
|
|
1772
|
+
}
|
|
1773
|
+
else {
|
|
1774
|
+
if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
1775
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1771
1778
|
}
|
|
1772
1779
|
component.value = _this._format(rowData.row[_this.property]);
|
|
1780
|
+
if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
1781
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
1782
|
+
}
|
|
1773
1783
|
}));
|
|
1774
1784
|
return this;
|
|
1775
1785
|
};
|
|
@@ -1801,8 +1811,8 @@
|
|
|
1801
1811
|
}(ColumnModel));
|
|
1802
1812
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
1803
1813
|
__extends(ListPropertyColumnModel, _super);
|
|
1804
|
-
function ListPropertyColumnModel(property, defaults) {
|
|
1805
|
-
var _this = _super.call(this,
|
|
1814
|
+
function ListPropertyColumnModel(id, property, defaults) {
|
|
1815
|
+
var _this = _super.call(this, id, defaults) || this;
|
|
1806
1816
|
_this.property = property;
|
|
1807
1817
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
1808
1818
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -2036,7 +2046,7 @@
|
|
|
2036
2046
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2037
2047
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
2038
2048
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
2039
|
-
this.addRowClass(
|
|
2049
|
+
this.addRowClass('enable-hover', function () { return _this.isRowSelectionEnabled(); });
|
|
2040
2050
|
}
|
|
2041
2051
|
TableModel_1 = TableModel;
|
|
2042
2052
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -2064,11 +2074,11 @@
|
|
|
2064
2074
|
enumerable: true,
|
|
2065
2075
|
configurable: true
|
|
2066
2076
|
});
|
|
2067
|
-
TableModel.prototype.pluck = function (property) {
|
|
2068
|
-
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2077
|
+
TableModel.prototype.pluck = function (property, options) {
|
|
2078
|
+
return this.addColumn(new PropertyColumnModel((options === null || options === void 0 ? void 0 : options.columnId) || property.toString(), property, this));
|
|
2069
2079
|
};
|
|
2070
|
-
TableModel.prototype.pluckList = function (property) {
|
|
2071
|
-
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2080
|
+
TableModel.prototype.pluckList = function (property, options) {
|
|
2081
|
+
return this.addColumn(new ListPropertyColumnModel((options === null || options === void 0 ? void 0 : options.columnId) || property.toString(), property, this));
|
|
2072
2082
|
};
|
|
2073
2083
|
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2074
2084
|
pectin.assert.isNil(this.selectionColumnModel);
|