@wizishop/angular-components 0.0.74 → 0.0.75
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/wizishop-angular-components.umd.js +6 -4
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/tree/tree.component.js +4 -4
- package/esm2015/lib/pipes/tree/format-object-to-recursif-tree.pipe.js +4 -2
- package/esm2015/lib/pipes/tree/format-object-to-simple-tree.pipe.js +2 -2
- package/fesm2015/wizishop-angular-components.js +7 -5
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/tree/tree.component.d.ts +1 -1
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.75.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.74.tgz +0 -0
|
@@ -3777,14 +3777,14 @@
|
|
|
3777
3777
|
TreeComponent.decorators = [
|
|
3778
3778
|
{ type: i0.Component, args: [{
|
|
3779
3779
|
selector: 'wac-tree',
|
|
3780
|
-
template: "<div *ngFor=\"let item of items; index as i\" [ngClass]=\"['treeDepth-' + treeDepth]\">\n <ul>\n <li>\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"
|
|
3780
|
+
template: "<div *ngFor=\"let item of items; index as i\" [ngClass]=\"['treeDepth-' + treeDepth]\">\n <ul>\n <li>\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n >\n </ng-container>\n\n <wac-tree [optionTemplate]=\"optionTemplate\" [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\" [treeDepth]=\"treeDepth + 1\">\n <!-- Todo maybe pass child template -->\n\n </wac-tree>\n </li>\n </ul>\n</div>"
|
|
3781
3781
|
},] }
|
|
3782
3782
|
];
|
|
3783
3783
|
TreeComponent.ctorParameters = function () { return []; };
|
|
3784
3784
|
TreeComponent.propDecorators = {
|
|
3785
3785
|
items: [{ type: i0.Input }],
|
|
3786
3786
|
treeDepth: [{ type: i0.Input }],
|
|
3787
|
-
|
|
3787
|
+
optionTemplate: [{ type: i0.Input, args: ["optionTemplate",] }]
|
|
3788
3788
|
};
|
|
3789
3789
|
|
|
3790
3790
|
var FormatObjectToRecursifTreePipe = /** @class */ (function () {
|
|
@@ -3796,6 +3796,8 @@
|
|
|
3796
3796
|
this.childrenProperties = childrenProperties;
|
|
3797
3797
|
var treeDepth = 0;
|
|
3798
3798
|
objectList.forEach(function (object) { return _this.recursiveFormatObjectToRecursifTree(object, treeDepth); });
|
|
3799
|
+
console.log('objectList');
|
|
3800
|
+
console.log(objectList);
|
|
3799
3801
|
return objectList;
|
|
3800
3802
|
};
|
|
3801
3803
|
FormatObjectToRecursifTreePipe.prototype.recursiveFormatObjectToRecursifTree = function (object, treeDepth) {
|
|
@@ -3809,7 +3811,7 @@
|
|
|
3809
3811
|
object.hasTreeChrildren = false;
|
|
3810
3812
|
continue;
|
|
3811
3813
|
}
|
|
3812
|
-
if (Array.isArray(object[childrenProperty])) {
|
|
3814
|
+
if (!Array.isArray(object[childrenProperty])) {
|
|
3813
3815
|
throw "Property : \"" + childrenProperty + "\", is not an array. it could not be transform to a recursive list.";
|
|
3814
3816
|
}
|
|
3815
3817
|
// Add treeChildren property filled with name children property
|
|
@@ -3864,7 +3866,7 @@
|
|
|
3864
3866
|
object.hasTreeChrildren = false;
|
|
3865
3867
|
continue;
|
|
3866
3868
|
}
|
|
3867
|
-
if (Array.isArray(object[property])) {
|
|
3869
|
+
if (!Array.isArray(object[property])) {
|
|
3868
3870
|
throw "Property : \"" + property + "\", is not an array. it could not be transform to a recursive list.";
|
|
3869
3871
|
}
|
|
3870
3872
|
// Add treeChildren property filled with name children property
|