@wizishop/angular-components 14.4.70 → 14.4.72
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/angular-components.scss +19 -19
- package/esm2020/lib/components/tree/tree.component.mjs +10 -8
- package/fesm2015/wizishop-angular-components.mjs +9 -7
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +9 -7
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/tree/tree.component.d.ts +5 -3
- package/package.json +1 -1
- package/wizishop-angular-components-14.4.72.tgz +0 -0
- package/wizishop-angular-components-14.4.70.tgz +0 -0
|
@@ -4510,23 +4510,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4510
4510
|
}] } });
|
|
4511
4511
|
|
|
4512
4512
|
class TreeComponent {
|
|
4513
|
-
|
|
4513
|
+
// https://indepth.dev/posts/1405/ngtemplateoutlet
|
|
4514
|
+
constructor(changeDetectionRef) {
|
|
4515
|
+
this.changeDetectionRef = changeDetectionRef;
|
|
4514
4516
|
this.treeDepth = 0;
|
|
4515
|
-
this.
|
|
4517
|
+
this.trackByFn = (index, item) => item;
|
|
4516
4518
|
}
|
|
4517
4519
|
}
|
|
4518
|
-
TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4519
|
-
TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TreeComponent, selector: "wac-tree", inputs: { items: "items", treeDepth: "treeDepth", optionTemplate: "optionTemplate",
|
|
4520
|
+
TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4521
|
+
TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: TreeComponent, selector: "wac-tree", inputs: { items: "items", treeDepth: "treeDepth", optionTemplate: "optionTemplate", trackByFn: "trackByFn" }, ngImport: i0, template: "<ul [ngClass]=\"['treeDepth-' + treeDepth]\">\n <li *ngFor=\"let item of items; let index = index; trackBy: trackByFn\">\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index }\"\n >\n </ng-container>\n\n <wac-tree [optionTemplate]=\"optionTemplate\" [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\" [treeDepth]=\"treeDepth + 1\"></wac-tree>\n </li>\n</ul>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TreeComponent, selector: "wac-tree", inputs: ["items", "treeDepth", "optionTemplate", "trackByFn"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4520
4522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: TreeComponent, decorators: [{
|
|
4521
4523
|
type: Component,
|
|
4522
|
-
args: [{ selector: 'wac-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ul [ngClass]=\"['treeDepth-' + treeDepth]\">\n <li *ngFor=\"let item of items; let index = index; trackBy:
|
|
4523
|
-
}], propDecorators: { items: [{
|
|
4524
|
+
args: [{ selector: 'wac-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ul [ngClass]=\"['treeDepth-' + treeDepth]\">\n <li *ngFor=\"let item of items; let index = index; trackBy: trackByFn\">\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index }\"\n >\n </ng-container>\n\n <wac-tree [optionTemplate]=\"optionTemplate\" [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\" [treeDepth]=\"treeDepth + 1\"></wac-tree>\n </li>\n</ul>" }]
|
|
4525
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
|
|
4524
4526
|
type: Input
|
|
4525
4527
|
}], treeDepth: [{
|
|
4526
4528
|
type: Input
|
|
4527
4529
|
}], optionTemplate: [{
|
|
4528
4530
|
type: Input
|
|
4529
|
-
}],
|
|
4531
|
+
}], trackByFn: [{
|
|
4530
4532
|
type: Input
|
|
4531
4533
|
}] } });
|
|
4532
4534
|
|