@coolon/angular-ui-powerups 11.0.0-alpha.4 → 11.0.0-alpha.6
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/bundles/coolon-angular-ui-powerups.umd.js +40 -27
- 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/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/tree-table/decorated-tree-node.js +19 -22
- package/esm2015/lib/components/tree-table/decorated-tree-node.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-table-component.js +21 -4
- package/esm2015/lib/components/tree-table/tree-table-component.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-table-component.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +38 -24
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/table.component.d.ts +4 -4
- package/lib/components/tree-table/tree-table-component.d.ts +9 -0
- package/package.json +1 -1
|
@@ -3914,7 +3914,7 @@
|
|
|
3914
3914
|
Object.defineProperty(DecoratedTreeNodeMixin.prototype, "decoratedSelf", {
|
|
3915
3915
|
get: function () {
|
|
3916
3916
|
var _this = this;
|
|
3917
|
-
return this.memoize(
|
|
3917
|
+
return this.memoize('decoratedSelf', function () {
|
|
3918
3918
|
return _this.parent ? _this.parent.children.find(function (child) { return child.node === _this.node; }) : exports.DecoratedTreeNode.createRoot(_this.node);
|
|
3919
3919
|
});
|
|
3920
3920
|
},
|
|
@@ -3924,7 +3924,7 @@
|
|
|
3924
3924
|
Object.defineProperty(DecoratedTreeNodeMixin.prototype, "children", {
|
|
3925
3925
|
get: function () {
|
|
3926
3926
|
var _this = this;
|
|
3927
|
-
return this.memoize(
|
|
3927
|
+
return this.memoize('children', function () {
|
|
3928
3928
|
return _this.node.children ? _this.node.children.map(function (child) {
|
|
3929
3929
|
return typescriptUtilities.Mixin.createProxy(child, new DecoratedTreeNodeMixin(_this.decoratedSelf, child));
|
|
3930
3930
|
}) : [];
|
|
@@ -3935,7 +3935,7 @@
|
|
|
3935
3935
|
});
|
|
3936
3936
|
DecoratedTreeNodeMixin.prototype.descendants = function () {
|
|
3937
3937
|
var _this = this;
|
|
3938
|
-
return this.memoize(
|
|
3938
|
+
return this.memoize('descendants', function () {
|
|
3939
3939
|
var result = [];
|
|
3940
3940
|
_this.visitDescendants(function (child) { return result.push(child); });
|
|
3941
3941
|
return result;
|
|
@@ -3943,7 +3943,7 @@
|
|
|
3943
3943
|
};
|
|
3944
3944
|
DecoratedTreeNodeMixin.prototype.selfAndDescendants = function () {
|
|
3945
3945
|
var _this = this;
|
|
3946
|
-
return this.memoize(
|
|
3946
|
+
return this.memoize('selfAndDescendants', function () {
|
|
3947
3947
|
var result = [];
|
|
3948
3948
|
_this.visitSelfAndDescendants(function (child) { return result.push(child); });
|
|
3949
3949
|
return result;
|
|
@@ -4014,29 +4014,24 @@
|
|
|
4014
4014
|
};
|
|
4015
4015
|
DecoratedTreeNodeMixin.prototype.ancestorsAndSelf = function () {
|
|
4016
4016
|
var _this = this;
|
|
4017
|
-
return this.memoize(
|
|
4017
|
+
return this.memoize('ancestorsAndSelf', function () {
|
|
4018
4018
|
return _this.ancestors().concat([(_this.decoratedSelf)]);
|
|
4019
4019
|
});
|
|
4020
4020
|
};
|
|
4021
4021
|
DecoratedTreeNodeMixin.prototype.pathToParent = function (parent) {
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
}
|
|
4033
|
-
});
|
|
4022
|
+
if (this.node === parent.node) {
|
|
4023
|
+
return [];
|
|
4024
|
+
}
|
|
4025
|
+
else if (this.parent) {
|
|
4026
|
+
var pathToParent = this.parent.pathToParent(parent);
|
|
4027
|
+
return pathToParent.concat([this.parent]);
|
|
4028
|
+
}
|
|
4029
|
+
else {
|
|
4030
|
+
throw new Error('parent is not an ancestor');
|
|
4031
|
+
}
|
|
4034
4032
|
};
|
|
4035
4033
|
DecoratedTreeNodeMixin.prototype.pathToParentAndSelf = function (parent) {
|
|
4036
|
-
|
|
4037
|
-
return this.memoize("pathToParentAndSelf", function () {
|
|
4038
|
-
return _this.pathToParent(parent).concat([_this.decoratedSelf]);
|
|
4039
|
-
});
|
|
4034
|
+
return this.pathToParent(parent).concat([this.decoratedSelf]);
|
|
4040
4035
|
};
|
|
4041
4036
|
DecoratedTreeNodeMixin.prototype.isRoot = function () {
|
|
4042
4037
|
return !this.parent;
|
|
@@ -4052,20 +4047,20 @@
|
|
|
4052
4047
|
return !this.isRoot() && this.node.children.length < 1;
|
|
4053
4048
|
};
|
|
4054
4049
|
DecoratedTreeNodeMixin.prototype.hasChildren = function () {
|
|
4055
|
-
return this.node.children.length > 0;
|
|
4050
|
+
return this.node.children && this.node.children.length > 0;
|
|
4056
4051
|
};
|
|
4057
4052
|
DecoratedTreeNodeMixin.prototype.depthFromParent = function (parent) {
|
|
4058
4053
|
return this.pathToParent(parent).length;
|
|
4059
4054
|
};
|
|
4060
4055
|
DecoratedTreeNodeMixin.prototype.treeDepth = function () {
|
|
4061
4056
|
var _this = this;
|
|
4062
|
-
return this.memoize(
|
|
4057
|
+
return this.memoize('treeDepth', function () {
|
|
4063
4058
|
return 1 + _this.descendants().map(function (child) { return child.depthFromParent(_this); }).reduce(function (prev, current) { return Math.max(prev, current); });
|
|
4064
4059
|
});
|
|
4065
4060
|
};
|
|
4066
4061
|
DecoratedTreeNodeMixin.prototype.flatten = function () {
|
|
4067
4062
|
var _this = this;
|
|
4068
|
-
return this.memoize(
|
|
4063
|
+
return this.memoize('flatten', function () {
|
|
4069
4064
|
return _this.flattenInto([]);
|
|
4070
4065
|
});
|
|
4071
4066
|
};
|
|
@@ -4275,14 +4270,21 @@
|
|
|
4275
4270
|
var TreeTableComponent = /** @class */ (function (_super) {
|
|
4276
4271
|
__extends(TreeTableComponent, _super);
|
|
4277
4272
|
function TreeTableComponent() {
|
|
4278
|
-
|
|
4273
|
+
var _this = _super.call(this) || this;
|
|
4274
|
+
/**
|
|
4275
|
+
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
4276
|
+
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
4277
|
+
* containment area.
|
|
4278
|
+
*/
|
|
4279
|
+
_this.enableScrolling = false;
|
|
4280
|
+
return _this;
|
|
4279
4281
|
}
|
|
4280
4282
|
return TreeTableComponent;
|
|
4281
4283
|
}(DisposableComponent));
|
|
4282
4284
|
TreeTableComponent.decorators = [
|
|
4283
4285
|
{ type: i0.Component, args: [{
|
|
4284
4286
|
selector: "aup-tree-table",
|
|
4285
|
-
template: "<aup-table [tableModel]=\"treeTableModel\"></aup-table>\n",
|
|
4287
|
+
template: "<aup-table [tableModel]=\"treeTableModel\" [showHeaderModel]=\"showHeaderModel\" [enableScrolling]=\"enableScrolling\"></aup-table>\n",
|
|
4286
4288
|
encapsulation: i0.ViewEncapsulation.None // allow us to target nested table styles
|
|
4287
4289
|
,
|
|
4288
4290
|
styles: ["td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}"]
|
|
@@ -4290,12 +4292,23 @@
|
|
|
4290
4292
|
];
|
|
4291
4293
|
TreeTableComponent.ctorParameters = function () { return []; };
|
|
4292
4294
|
TreeTableComponent.propDecorators = {
|
|
4293
|
-
treeTableModel: [{ type: i0.Input }]
|
|
4295
|
+
treeTableModel: [{ type: i0.Input }],
|
|
4296
|
+
showHeaderModel: [{ type: i0.Input }],
|
|
4297
|
+
showHeader: [{ type: i0.Input }],
|
|
4298
|
+
enableScrolling: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.enable-scrolling',] }]
|
|
4294
4299
|
};
|
|
4295
4300
|
__decorate([
|
|
4296
4301
|
pectin.TrackExternal(),
|
|
4297
4302
|
__metadata("design:type", TreeTableModel)
|
|
4298
4303
|
], TreeTableComponent.prototype, "treeTableModel", void 0);
|
|
4304
|
+
__decorate([
|
|
4305
|
+
pectin.TrackExternal({ defaultValue: true }),
|
|
4306
|
+
__metadata("design:type", pectin.ValueModel)
|
|
4307
|
+
], TreeTableComponent.prototype, "showHeaderModel", void 0);
|
|
4308
|
+
__decorate([
|
|
4309
|
+
pectin.StoreInValueModel('showHeaderModel'),
|
|
4310
|
+
__metadata("design:type", Boolean)
|
|
4311
|
+
], TreeTableComponent.prototype, "showHeader", void 0);
|
|
4299
4312
|
|
|
4300
4313
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
4301
4314
|
__extends(VerticalFocusContainerComponent, _super);
|