ngx-sp-infra 5.19.7 → 5.19.8
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.
|
@@ -10876,25 +10876,17 @@ class TreeComponent {
|
|
|
10876
10876
|
this.onSelect.emit(false);
|
|
10877
10877
|
}
|
|
10878
10878
|
}
|
|
10879
|
-
onCheckEvent(items) {
|
|
10880
|
-
if (this.indeterminateCheck(items)) {
|
|
10881
|
-
this.onEvent.emit(true);
|
|
10882
|
-
}
|
|
10883
|
-
else {
|
|
10884
|
-
this.onEvent.emit(false);
|
|
10885
|
-
}
|
|
10886
|
-
}
|
|
10887
10879
|
// #endregion ==========> PUBLIC METHODS <==========
|
|
10888
10880
|
// #region ==========> PRIVATE METHODS <==========
|
|
10889
10881
|
indeterminateCheck(list) {
|
|
10890
10882
|
return list.some(this.checked);
|
|
10891
10883
|
}
|
|
10892
10884
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10893
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TreeComponent, isStandalone: true, selector: "app-tree, lib-tree", inputs: { items: "items", openAll: "openAll", checkbox: "checkbox", filter: "filter" }, outputs: { onSelect: "onSelect", onEvent: "onEvent" }, ngImport: i0, template: "<!-- FILTER -->\n<ng-template [ngIf]=\"filter\">\n <!-- <app-search-filters></app-search-filters> -->\n\n <div class=\"input-group glb-search-input my-3\">\n <span class=\"input-group-text search px-2 glb-bg-color-white\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\" iconSize=\"medium-small\"\n class=\"d-flex align-items-center\"></lib-icon>\n </span>\n <input type=\"text\" class=\"form-control border-left-none ps-0\" [(ngModel)]=\"search\">\n </div>\n \n</ng-template>\n<!-- TREE -->\n<ul class=\"tree-view\">\n <ng-container *ngFor=\"let item of items | TreeFilter : search; index as i\">\n <div class=\"container py-1\" [class]=\"!item.has_children ? 'children' : null \">\n <lib-icon\n class=\"chevron\"\n *ngIf=\"item.has_children\"\n [class]=\"item.aplicClass ? 'rotate' : null\"\n (click)=\"\n onExpand(item);\n item.aplicClass ? (item.aplicClass = false) : (item.aplicClass = true)\n \"\n iconSize=\"medium-small\"\n iconName=\"seta-direita\"\n ></lib-icon>\n <!-- CHECKBOX -->\n <ng-template [ngIf]=\"checkbox\">\n <input\n type=\"checkbox\"\n class=\"form-check-input m-0 position-relative\"\n
|
|
10885
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TreeComponent, isStandalone: true, selector: "app-tree, lib-tree", inputs: { items: "items", openAll: "openAll", checkbox: "checkbox", filter: "filter" }, outputs: { onSelect: "onSelect", onEvent: "onEvent" }, ngImport: i0, template: "<!-- FILTER -->\n<ng-template [ngIf]=\"filter\">\n <!-- <app-search-filters></app-search-filters> -->\n\n <div class=\"input-group glb-search-input my-3\">\n <span class=\"input-group-text search px-2 glb-bg-color-white\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\" iconSize=\"medium-small\"\n class=\"d-flex align-items-center\"></lib-icon>\n </span>\n <input type=\"text\" class=\"form-control border-left-none ps-0\" [(ngModel)]=\"search\">\n </div>\n \n</ng-template>\n<!-- TREE -->\n<ul class=\"tree-view\">\n <ng-container *ngFor=\"let item of items | TreeFilter : search; index as i\">\n <div class=\"container py-1\" [class]=\"!item.has_children ? 'children' : null \">\n <lib-icon\n class=\"chevron\"\n *ngIf=\"item.has_children\"\n [class]=\"item.aplicClass ? 'rotate' : null\"\n (click)=\"\n onExpand(item);\n item.aplicClass ? (item.aplicClass = false) : (item.aplicClass = true)\n \"\n iconSize=\"medium-small\"\n iconName=\"seta-direita\"\n ></lib-icon>\n <!-- CHECKBOX -->\n <ng-template [ngIf]=\"checkbox\">\n <input\n type=\"checkbox\"\n class=\"form-check-input m-0 position-relative\"\n (change)=\"onCheck(items, item)\"\n [(ngModel)]=\"item.is_selected\"\n />\n </ng-template>\n\n <lib-icon *ngIf=\"item.icon\" [iconName]=\"item.icon\" iconSize=\"medium-small\" class=\"ms-2\" />\n\n <label class=\"label mb-0 ms-2\">{{ item.label }}</label>\n </div>\n <!-- NODES -->\n <ul *ngIf=\"item.expanded\">\n <app-tree\n (onSelect)=\"item.is_selected = $event\"\n (onEvent)=\"item.is_selected = $event\"\n [items]=\"item.children ?? []\"\n [checkbox]=\"checkbox\"\n ></app-tree>\n </ul>\n </ng-container>\n</ul>", styles: ["*{font-family:Open Sans,Arial,Helvetica,sans-serif;color:#000;box-sizing:border-box;list-style:none;font-size:1rem}.tree-view{margin:0;padding:0;list-style-type:none;transition:all .3s ease-in-out}.container{margin:0;padding:0;display:flex;align-items:center}.chevron{position:relative;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.3s ease-in-out;-moz-transition:.3s ease-in-out;-o-transition:.3s ease-in-out;transition:.3s ease-in-out;color:#000;cursor:pointer}.chevron:hover{color:#0d6efd;transform:rotate(30deg)}.chevron.rotate{transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);transition:.3s}.form-check-input{cursor:pointer}.children{padding-left:20px}\n"], dependencies: [{ kind: "component", type: TreeComponent, selector: "app-tree, lib-tree", inputs: ["items", "openAll", "checkbox", "filter"], outputs: ["onSelect", "onEvent"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: SearchTreePipe, name: "TreeFilter" }] }); }
|
|
10894
10886
|
}
|
|
10895
10887
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TreeComponent, decorators: [{
|
|
10896
10888
|
type: Component,
|
|
10897
|
-
args: [{ selector: "app-tree, lib-tree", imports: [NgIf, LibIconsComponent, FormsModule, NgFor, SearchTreePipe], template: "<!-- FILTER -->\n<ng-template [ngIf]=\"filter\">\n <!-- <app-search-filters></app-search-filters> -->\n\n <div class=\"input-group glb-search-input my-3\">\n <span class=\"input-group-text search px-2 glb-bg-color-white\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\" iconSize=\"medium-small\"\n class=\"d-flex align-items-center\"></lib-icon>\n </span>\n <input type=\"text\" class=\"form-control border-left-none ps-0\" [(ngModel)]=\"search\">\n </div>\n \n</ng-template>\n<!-- TREE -->\n<ul class=\"tree-view\">\n <ng-container *ngFor=\"let item of items | TreeFilter : search; index as i\">\n <div class=\"container py-1\" [class]=\"!item.has_children ? 'children' : null \">\n <lib-icon\n class=\"chevron\"\n *ngIf=\"item.has_children\"\n [class]=\"item.aplicClass ? 'rotate' : null\"\n (click)=\"\n onExpand(item);\n item.aplicClass ? (item.aplicClass = false) : (item.aplicClass = true)\n \"\n iconSize=\"medium-small\"\n iconName=\"seta-direita\"\n ></lib-icon>\n <!-- CHECKBOX -->\n <ng-template [ngIf]=\"checkbox\">\n <input\n type=\"checkbox\"\n class=\"form-check-input m-0 position-relative\"\n
|
|
10889
|
+
args: [{ selector: "app-tree, lib-tree", imports: [NgIf, LibIconsComponent, FormsModule, NgFor, SearchTreePipe], template: "<!-- FILTER -->\n<ng-template [ngIf]=\"filter\">\n <!-- <app-search-filters></app-search-filters> -->\n\n <div class=\"input-group glb-search-input my-3\">\n <span class=\"input-group-text search px-2 glb-bg-color-white\">\n <lib-icon iconName=\"lupa\" iconColor=\"gray\" iconSize=\"medium-small\"\n class=\"d-flex align-items-center\"></lib-icon>\n </span>\n <input type=\"text\" class=\"form-control border-left-none ps-0\" [(ngModel)]=\"search\">\n </div>\n \n</ng-template>\n<!-- TREE -->\n<ul class=\"tree-view\">\n <ng-container *ngFor=\"let item of items | TreeFilter : search; index as i\">\n <div class=\"container py-1\" [class]=\"!item.has_children ? 'children' : null \">\n <lib-icon\n class=\"chevron\"\n *ngIf=\"item.has_children\"\n [class]=\"item.aplicClass ? 'rotate' : null\"\n (click)=\"\n onExpand(item);\n item.aplicClass ? (item.aplicClass = false) : (item.aplicClass = true)\n \"\n iconSize=\"medium-small\"\n iconName=\"seta-direita\"\n ></lib-icon>\n <!-- CHECKBOX -->\n <ng-template [ngIf]=\"checkbox\">\n <input\n type=\"checkbox\"\n class=\"form-check-input m-0 position-relative\"\n (change)=\"onCheck(items, item)\"\n [(ngModel)]=\"item.is_selected\"\n />\n </ng-template>\n\n <lib-icon *ngIf=\"item.icon\" [iconName]=\"item.icon\" iconSize=\"medium-small\" class=\"ms-2\" />\n\n <label class=\"label mb-0 ms-2\">{{ item.label }}</label>\n </div>\n <!-- NODES -->\n <ul *ngIf=\"item.expanded\">\n <app-tree\n (onSelect)=\"item.is_selected = $event\"\n (onEvent)=\"item.is_selected = $event\"\n [items]=\"item.children ?? []\"\n [checkbox]=\"checkbox\"\n ></app-tree>\n </ul>\n </ng-container>\n</ul>", styles: ["*{font-family:Open Sans,Arial,Helvetica,sans-serif;color:#000;box-sizing:border-box;list-style:none;font-size:1rem}.tree-view{margin:0;padding:0;list-style-type:none;transition:all .3s ease-in-out}.container{margin:0;padding:0;display:flex;align-items:center}.chevron{position:relative;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.3s ease-in-out;-moz-transition:.3s ease-in-out;-o-transition:.3s ease-in-out;transition:.3s ease-in-out;color:#000;cursor:pointer}.chevron:hover{color:#0d6efd;transform:rotate(30deg)}.chevron.rotate{transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);transition:.3s}.form-check-input{cursor:pointer}.children{padding-left:20px}\n"] }]
|
|
10898
10890
|
}], ctorParameters: () => [], propDecorators: { items: [{
|
|
10899
10891
|
type: Input
|
|
10900
10892
|
}], openAll: [{
|