@coolon/angular-ui-powerups 2.0.0-alpha.19 → 2.0.0-alpha.20
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 +30 -0
- 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/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js +29 -0
- 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/mutable-cell-renderer.js +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +1 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +30 -0
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js +1 -0
- package/esm5/lib/components/table/mutable-cell-renderer.js.map +1 -0
- package/fesm2015/coolon-angular-ui-powerups.js +29 -0
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +30 -0
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/table/column-model.d.ts +13 -15
- package/lib/components/table/mutable-cell-renderer.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1689,6 +1689,7 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
|
|
|
1689
1689
|
var noop = function () {
|
|
1690
1690
|
};
|
|
1691
1691
|
var ɵ0 = noop;
|
|
1692
|
+
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1692
1693
|
var ColumnModel = /** @class */ (function () {
|
|
1693
1694
|
function ColumnModel(columnId, defaults) {
|
|
1694
1695
|
this.columnId = columnId;
|
|
@@ -1806,6 +1807,35 @@ var PropertyColumnModel = /** @class */ (function (_super) {
|
|
|
1806
1807
|
}));
|
|
1807
1808
|
return this;
|
|
1808
1809
|
};
|
|
1810
|
+
PropertyColumnModel.prototype.mutableCellRenderer = function (componentType, options) {
|
|
1811
|
+
var _this = this;
|
|
1812
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
1813
|
+
// keep a local copy most recent row value so it's available to teh
|
|
1814
|
+
// edit callback without having to add/remove subscribers all the time.
|
|
1815
|
+
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
1816
|
+
var disableEditCallback = false;
|
|
1817
|
+
if (firstTime) {
|
|
1818
|
+
if (___default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
1819
|
+
options.onComponentInit(component);
|
|
1820
|
+
}
|
|
1821
|
+
// install our edit callback
|
|
1822
|
+
component.onValueEdited(function (is, was) {
|
|
1823
|
+
if (!disableEditCallback) {
|
|
1824
|
+
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
1825
|
+
}
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
// now push the value the component and disable the callback just incase the component misbehaves
|
|
1829
|
+
// and fires a value change during the operation.
|
|
1830
|
+
disableEditCallback = true;
|
|
1831
|
+
component.value = rowData.row[_this.property];
|
|
1832
|
+
disableEditCallback = false;
|
|
1833
|
+
if (!___default.isFunction(options) && ___default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
1834
|
+
options.onRowUpdate(component, rowData.row);
|
|
1835
|
+
}
|
|
1836
|
+
}));
|
|
1837
|
+
return this;
|
|
1838
|
+
};
|
|
1809
1839
|
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, onComponentInit) {
|
|
1810
1840
|
var _this = this;
|
|
1811
1841
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|