@coolon/angular-ui-powerups 2.0.0-alpha.11 → 2.0.0-alpha.13
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 +26 -14
- 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/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +11 -10
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +2 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js +13 -3
- 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 +2 -2
- 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/forms/abstract-list-input.component.js +11 -10
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +2 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +13 -3
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +2 -2
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +27 -15
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +27 -15
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-list-input.component.d.ts +1 -1
- package/lib/components/table/column-model.d.ts +1 -1
- package/lib/components/table/table-model.d.ts +5 -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.13](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2020-07-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* added debug context to input component models ([ade30dc](https://bitbucket.org/coolon/angular-ui-powerups/commit/ade30dc8be0a7a9392c9220f86aca018ce165afd))
|
|
11
|
+
|
|
12
|
+
## [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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* added row update callbacks for custom component columns ([c128053](https://bitbucket.org/coolon/angular-ui-powerups/commit/c128053f37679ba480289df4c56c5b19c9d949c4))
|
|
18
|
+
|
|
5
19
|
## [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
20
|
|
|
7
21
|
|
|
@@ -888,27 +888,28 @@
|
|
|
888
888
|
*/
|
|
889
889
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
890
890
|
_this.inputModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
|
|
891
|
-
_this.
|
|
891
|
+
_this.setValueIsInProgress = new pectin.Guard();
|
|
892
892
|
_this.valueChange = new core.EventEmitter();
|
|
893
893
|
var when = pectin.Dsl.disposeWith(_this).when;
|
|
894
894
|
when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
|
|
895
895
|
initialValue: 'ignore',
|
|
896
|
-
unless: _this.
|
|
896
|
+
unless: _this.setValueIsInProgress
|
|
897
897
|
});
|
|
898
|
+
pectin.DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
|
|
898
899
|
return _this;
|
|
899
900
|
}
|
|
900
901
|
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
901
902
|
set: function (value) {
|
|
902
903
|
var _this = this;
|
|
903
|
-
|
|
904
|
-
|
|
904
|
+
this.setValueIsInProgress.whileTrue(function () {
|
|
905
|
+
if (!_this.listHolder) {
|
|
905
906
|
_this.listHolder = new pectin.MutableListModel(value);
|
|
906
907
|
_this.listModel = _this.listHolder;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
908
|
+
}
|
|
909
|
+
else {
|
|
910
|
+
_this.listHolder.value = value;
|
|
911
|
+
}
|
|
912
|
+
});
|
|
912
913
|
},
|
|
913
914
|
enumerable: true,
|
|
914
915
|
configurable: true
|
|
@@ -956,6 +957,7 @@
|
|
|
956
957
|
initialValue: 'ignore',
|
|
957
958
|
unless: _this.setValueInProgress
|
|
958
959
|
});
|
|
960
|
+
pectin.DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
|
|
959
961
|
return _this;
|
|
960
962
|
}
|
|
961
963
|
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
@@ -2016,13 +2018,23 @@
|
|
|
2016
2018
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2017
2019
|
return _this;
|
|
2018
2020
|
}
|
|
2019
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType,
|
|
2021
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType, onComponentInitOrOptions) {
|
|
2020
2022
|
var _this = this;
|
|
2021
2023
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2022
|
-
if (firstTime
|
|
2023
|
-
|
|
2024
|
+
if (firstTime) {
|
|
2025
|
+
if (___default__default.isFunction(onComponentInitOrOptions)) {
|
|
2026
|
+
onComponentInitOrOptions(component);
|
|
2027
|
+
}
|
|
2028
|
+
else {
|
|
2029
|
+
if (___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2030
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2024
2033
|
}
|
|
2025
2034
|
component.value = _this.getValue(rowData.row);
|
|
2035
|
+
if (!___default__default.isFunction(onComponentInitOrOptions) && ___default__default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2036
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2037
|
+
}
|
|
2026
2038
|
}));
|
|
2027
2039
|
return this;
|
|
2028
2040
|
};
|
|
@@ -2252,8 +2264,8 @@
|
|
|
2252
2264
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2253
2265
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2254
2266
|
};
|
|
2255
|
-
TableModel.prototype.addComponentColumn = function (columnId, component,
|
|
2256
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component,
|
|
2267
|
+
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
2268
|
+
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
2257
2269
|
};
|
|
2258
2270
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
2259
2271
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|