ng-tailwind 6.4.5 → 6.4.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/components/ngt-datatable/ngt-datatable.component.d.ts +2 -1
- package/components/ngt-datatable/ngt-th/ngt-th.component.d.ts +4 -2
- package/components/ngt-datatable/ngt-thead/ngt-thead.component.d.ts +8 -4
- package/fesm2022/ng-tailwind.mjs +40 -5
- package/fesm2022/ng-tailwind.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -50,6 +50,7 @@ export declare class NgtDatatableComponent implements OnInit, OnDestroy {
|
|
|
50
50
|
defaultFilters: any;
|
|
51
51
|
filtersDescription: {};
|
|
52
52
|
canSelectAllRegisters: boolean;
|
|
53
|
+
headBgColor: string;
|
|
53
54
|
onDataChange: EventEmitter<any>;
|
|
54
55
|
onClearFilter: EventEmitter<any>;
|
|
55
56
|
onClearSelectedElements: EventEmitter<any>;
|
|
@@ -121,5 +122,5 @@ export declare class NgtDatatableComponent implements OnInit, OnDestroy {
|
|
|
121
122
|
private isValidFilter;
|
|
122
123
|
private destroySubscriptions;
|
|
123
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgtDatatableComponent, [null, null, null, { optional: true; }]>;
|
|
124
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtDatatableComponent, "ngt-datatable", never, { "remoteResource": { "alias": "remoteResource"; "required": false; }; "type": { "alias": "type"; "required": false; }; "filterTagBgColor": { "alias": "filterTagBgColor"; "required": false; }; "filterTagMargin": { "alias": "filterTagMargin"; "required": false; }; "paginationMargin": { "alias": "paginationMargin"; "required": false; }; "inputSearch": { "alias": "inputSearch"; "required": false; }; "searchDelay": { "alias": "searchDelay"; "required": false; }; "searchTermMinLength": { "alias": "searchTermMinLength"; "required": false; }; "searchTermOnEnter": { "alias": "searchTermOnEnter"; "required": false; }; "defaultFilters": { "alias": "defaultFilters"; "required": false; }; "filtersDescription": { "alias": "filtersDescription"; "required": false; }; "canSelectAllRegisters": { "alias": "canSelectAllRegisters"; "required": false; }; }, { "onDataChange": "onDataChange"; "onClearFilter": "onClearFilter"; "onClearSelectedElements": "onClearSelectedElements"; "onSelectedElementsChange": "onSelectedElementsChange"; "onToogleAllCheckboxes": "onToogleAllCheckboxes"; "onToogleCheckbox": "onToogleCheckbox"; "onSelectAllRegisters": "onSelectAllRegisters"; "onOpenSearchModal": "onOpenSearchModal"; "onSearch": "onSearch"; }, never, ["*"], false, never>;
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtDatatableComponent, "ngt-datatable", never, { "remoteResource": { "alias": "remoteResource"; "required": false; }; "type": { "alias": "type"; "required": false; }; "filterTagBgColor": { "alias": "filterTagBgColor"; "required": false; }; "filterTagMargin": { "alias": "filterTagMargin"; "required": false; }; "paginationMargin": { "alias": "paginationMargin"; "required": false; }; "inputSearch": { "alias": "inputSearch"; "required": false; }; "searchDelay": { "alias": "searchDelay"; "required": false; }; "searchTermMinLength": { "alias": "searchTermMinLength"; "required": false; }; "searchTermOnEnter": { "alias": "searchTermOnEnter"; "required": false; }; "defaultFilters": { "alias": "defaultFilters"; "required": false; }; "filtersDescription": { "alias": "filtersDescription"; "required": false; }; "canSelectAllRegisters": { "alias": "canSelectAllRegisters"; "required": false; }; "headBgColor": { "alias": "headBgColor"; "required": false; }; }, { "onDataChange": "onDataChange"; "onClearFilter": "onClearFilter"; "onClearSelectedElements": "onClearSelectedElements"; "onSelectedElementsChange": "onSelectedElementsChange"; "onToogleAllCheckboxes": "onToogleAllCheckboxes"; "onToogleCheckbox": "onToogleCheckbox"; "onSelectAllRegisters": "onSelectAllRegisters"; "onOpenSearchModal": "onOpenSearchModal"; "onSearch": "onSearch"; }, never, ["*"], false, never>;
|
|
125
126
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import { NgtStylizableDirective } from '../../../directives/ngt-stylizable/ngt-stylizable.directive';
|
|
3
3
|
import { NgtStylizableService } from '../../../services/ngt-stylizable/ngt-stylizable.service';
|
|
4
4
|
import { NgtInputComponent } from '../../ngt-input/ngt-input.component';
|
|
5
5
|
import { NgtDatatableComponent } from '../ngt-datatable.component';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class NgtThComponent implements OnChanges, OnDestroy {
|
|
7
|
+
export declare class NgtThComponent implements OnChanges, OnDestroy, AfterViewInit {
|
|
8
8
|
private injector;
|
|
9
9
|
private hostElement;
|
|
10
10
|
private ngtStylizableDirective;
|
|
@@ -33,6 +33,7 @@ export declare class NgtThComponent implements OnChanges, OnDestroy {
|
|
|
33
33
|
private subscriptions;
|
|
34
34
|
constructor(injector: Injector, hostElement: ElementRef, ngtStylizableDirective: NgtStylizableDirective, ngtDataTable: NgtDatatableComponent);
|
|
35
35
|
ngOnChanges(changes: SimpleChanges): void;
|
|
36
|
+
ngAfterViewInit(): void;
|
|
36
37
|
ngOnDestroy(): void;
|
|
37
38
|
sort(): Promise<void>;
|
|
38
39
|
enableSearch(event: any): void;
|
|
@@ -44,6 +45,7 @@ export declare class NgtThComponent implements OnChanges, OnDestroy {
|
|
|
44
45
|
private checkReference;
|
|
45
46
|
private getNextSortDirection;
|
|
46
47
|
private bindNgtStyle;
|
|
48
|
+
private applyHeadBgColor;
|
|
47
49
|
private destroySubscriptions;
|
|
48
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgtThComponent, [null, null, { optional: true; self: true; }, { optional: true; skipSelf: true; }]>;
|
|
49
51
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgtThComponent, "[ngt-th]", never, { "reference": { "alias": "reference"; "required": false; }; "sortReference": { "alias": "sortReference"; "required": false; }; "modalWidth": { "alias": "modalWidth"; "required": false; }; "searchModalOverflow": { "alias": "searchModalOverflow"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "hasCustomSearch": { "alias": "hasCustomSearch"; "required": false; }; "searchLabel": { "alias": "searchLabel"; "required": false; }; "searchIcon": { "alias": "searchIcon"; "required": false; }; "sortableTooltip": { "alias": "sortableTooltip"; "required": false; }; }, { "onEnableSearch": "onEnableSearch"; }, never, ["*", "[customSearchHeader]", "[customSearch]"], false, never>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { ElementRef, Injector } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, Injector } from '@angular/core';
|
|
2
2
|
import { NgtStylizableDirective } from '../../../directives/ngt-stylizable/ngt-stylizable.directive';
|
|
3
3
|
import { NgtStylizableService } from '../../../services/ngt-stylizable/ngt-stylizable.service';
|
|
4
|
+
import { NgtDatatableComponent } from '../ngt-datatable.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgtTheadComponent {
|
|
6
|
+
export declare class NgtTheadComponent implements AfterViewInit {
|
|
6
7
|
private injector;
|
|
7
8
|
private hostElement;
|
|
8
9
|
private ngtStylizableDirective;
|
|
10
|
+
private ngtDatatable;
|
|
9
11
|
ngtStyle: NgtStylizableService;
|
|
10
|
-
constructor(injector: Injector, hostElement: ElementRef, ngtStylizableDirective: NgtStylizableDirective);
|
|
11
|
-
|
|
12
|
+
constructor(injector: Injector, hostElement: ElementRef, ngtStylizableDirective: NgtStylizableDirective, ngtDatatable: NgtDatatableComponent);
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
private applyHeadBgColor;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtTheadComponent, [null, null, { optional: true; self: true; }, { optional: true; skipSelf: true; }]>;
|
|
12
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgtTheadComponent, "[ngt-thead]", never, {}, {}, never, ["*"], false, never>;
|
|
13
17
|
}
|
package/fesm2022/ng-tailwind.mjs
CHANGED
|
@@ -4433,7 +4433,7 @@ class NgtDatatableComponent {
|
|
|
4433
4433
|
this.subscriptions = [];
|
|
4434
4434
|
}
|
|
4435
4435
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgtDatatableComponent, deps: [{ token: i0.Injector }, { token: NgtHttpService }, { token: i0.ChangeDetectorRef }, { token: NgtTranslateService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4436
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: NgtDatatableComponent, isStandalone: false, selector: "ngt-datatable", inputs: { remoteResource: "remoteResource", type: "type", filterTagBgColor: "filterTagBgColor", filterTagMargin: "filterTagMargin", paginationMargin: "paginationMargin", inputSearch: "inputSearch", searchDelay: "searchDelay", searchTermMinLength: "searchTermMinLength", searchTermOnEnter: "searchTermOnEnter", defaultFilters: "defaultFilters", filtersDescription: "filtersDescription", canSelectAllRegisters: "canSelectAllRegisters" }, outputs: { onDataChange: "onDataChange", onClearFilter: "onClearFilter", onClearSelectedElements: "onClearSelectedElements", onSelectedElementsChange: "onSelectedElementsChange", onToogleAllCheckboxes: "onToogleAllCheckboxes", onToogleCheckbox: "onToogleCheckbox", onSelectAllRegisters: "onSelectAllRegisters", onOpenSearchModal: "onOpenSearchModal", onSearch: "onSearch" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, static: true }, { propertyName: "ngtPagination", first: true, predicate: ["ngtPagination"], descendants: true, static: true }, { propertyName: "searchModal", first: true, predicate: ["searchModal"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"w-full\">\n <div class=\"flex flex-wrap w-full\">\n <ngt-tag *ngIf=\"hasAppliedFilters()\" class=\"w-full sm:w-auto {{ filterTagMargin }}\"\n [class.sm:mr-4]=\"filterTagMargin == 'mb-4'\" color.bg=\"bg-red-500\" (click)=\"removeFilter()\" ngt-stylizable>\n Limpar Filtros\n </ngt-tag>\n\n <ng-container *ngIf=\"hasAppliedFilters()\">\n <ng-container *ngFor=\"let filter of filtersTranslated\">\n <ngt-tag class=\"w-full sm:w-auto {{ filterTagMargin }}\" [class.sm:mr-4]=\"filterTagMargin == 'mb-4'\"\n [color.bg]=\"filterTagBgColor\" (click)=\"removeFilter(filter.reference)\" ngt-stylizable\n [title]=\"getTitle(filter)\">\n {{ filter.translation + ': ' + getTagFilterValue(filter) }}\n </ngt-tag>\n </ng-container>\n </ng-container>\n </div>\n\n <table style=\"display: table;\" class=\"text-left w-full border-collapse table-responsive\" #table>\n <ng-content></ng-content>\n </table>\n\n <p *ngIf=\"emptyStateVisible\" class=\"mt-8 mx-auto self-center text-center text-xl\">\n {{ ngtTranslateService.ngtDatatableNoDataFound }}\n </p>\n\n <div *ngIf=\"loading\">\n <div *ngFor=\"let i of [1, 2, 3, 4]\" class=\"flex w-full mt-3\">\n <ng-container *ngIf=\"columnCount.length >= 2\">\n <ng-container *ngFor=\"let j of columnCount; let last = last\">\n <ng-container *ngIf=\"last\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </ng-container>\n\n <ng-container *ngIf=\"!last\">\n <ngt-shining class=\"h-10 w-full mr-10\"></ngt-shining>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"columnCount.length < 2\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full mr-10 ml-10\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </ng-container>\n </div>\n </div>\n</div>\n\n<div class=\"clearfix {{ paginationMargin }}\" [hidden]='!data || data.length == 0'>\n <ngt-pagination [pagesInterval]='4' (onPageChange)='apply($event, false)' (onPerPageChange)='apply(1, false)'\n #ngtPagination>\n </ngt-pagination>\n</div>\n\n<ngt-modal [customLayout]=\"true\" [isDisabled]=\"false\" [ngtStyle]=\"filterModalStyle\" #searchModal>\n <ng-container *ngTemplateOutlet=\"searchModalTemplate\"></ng-container>\n</ngt-modal>", styles: ["@media (max-width: 767px){.table-responsive{display:block;position:relative;width:100%}.table-responsive thead,.table-responsive tbody,.table-responsive th,.table-responsive td,.table-responsive tr{display:block}.table-responsive td,.table-responsive th{height:50px}.table-responsive thead{float:left;margin-bottom:15px}.table-responsive tbody{width:auto;position:relative;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}.table-responsive tbody tr{display:inline-block;min-width:100%}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgtShiningComponent, selector: "ngt-shining", inputs: ["shiningWidth"] }, { kind: "component", type: NgtPaginationComponent, selector: "ngt-pagination", inputs: ["pagesInterval"], outputs: ["onPageChange", "onPerPageChange"] }, { kind: "component", type: NgtModalComponent, selector: "ngt-modal", inputs: ["customLayout", "disableDefaultCloses", "isDisabled", "ngtStyle"], outputs: ["onCloseModal", "onOpenModal"] }, { kind: "component", type: NgtTagComponent, selector: "ngt-tag", inputs: ["icon"] }, { kind: "directive", type: NgtStylizableDirective, selector: "[ngt-stylizable]", inputs: ["color", "color.text", "color.bg", "color.border", "h", "w", "p", "px", "py", "pt", "pr", "pb", "pl", "m", "mx", "my", "mt", "mr", "mb", "ml", "gap", "border", "shadow", "rounded", "font", "text", "breakWords", "overflow", "position", "justifyContent", "cursor", "fontCase"] }] }); }
|
|
4436
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: NgtDatatableComponent, isStandalone: false, selector: "ngt-datatable", inputs: { remoteResource: "remoteResource", type: "type", filterTagBgColor: "filterTagBgColor", filterTagMargin: "filterTagMargin", paginationMargin: "paginationMargin", inputSearch: "inputSearch", searchDelay: "searchDelay", searchTermMinLength: "searchTermMinLength", searchTermOnEnter: "searchTermOnEnter", defaultFilters: "defaultFilters", filtersDescription: "filtersDescription", canSelectAllRegisters: "canSelectAllRegisters", headBgColor: "headBgColor" }, outputs: { onDataChange: "onDataChange", onClearFilter: "onClearFilter", onClearSelectedElements: "onClearSelectedElements", onSelectedElementsChange: "onSelectedElementsChange", onToogleAllCheckboxes: "onToogleAllCheckboxes", onToogleCheckbox: "onToogleCheckbox", onSelectAllRegisters: "onSelectAllRegisters", onOpenSearchModal: "onOpenSearchModal", onSearch: "onSearch" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, static: true }, { propertyName: "ngtPagination", first: true, predicate: ["ngtPagination"], descendants: true, static: true }, { propertyName: "searchModal", first: true, predicate: ["searchModal"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"w-full\">\n <div class=\"flex flex-wrap w-full\">\n <ngt-tag *ngIf=\"hasAppliedFilters()\" class=\"w-full sm:w-auto {{ filterTagMargin }}\"\n [class.sm:mr-4]=\"filterTagMargin == 'mb-4'\" color.bg=\"bg-red-500\" (click)=\"removeFilter()\" ngt-stylizable>\n Limpar Filtros\n </ngt-tag>\n\n <ng-container *ngIf=\"hasAppliedFilters()\">\n <ng-container *ngFor=\"let filter of filtersTranslated\">\n <ngt-tag class=\"w-full sm:w-auto {{ filterTagMargin }}\" [class.sm:mr-4]=\"filterTagMargin == 'mb-4'\"\n [color.bg]=\"filterTagBgColor\" (click)=\"removeFilter(filter.reference)\" ngt-stylizable\n [title]=\"getTitle(filter)\">\n {{ filter.translation + ': ' + getTagFilterValue(filter) }}\n </ngt-tag>\n </ng-container>\n </ng-container>\n </div>\n\n <table style=\"display: table;\" class=\"text-left w-full border-collapse table-responsive\" #table>\n <ng-content></ng-content>\n </table>\n\n <p *ngIf=\"emptyStateVisible\" class=\"mt-8 mx-auto self-center text-center text-xl\">\n {{ ngtTranslateService.ngtDatatableNoDataFound }}\n </p>\n\n <div *ngIf=\"loading\">\n <div *ngFor=\"let i of [1, 2, 3, 4]\" class=\"flex w-full mt-3\">\n <ng-container *ngIf=\"columnCount.length >= 2\">\n <ng-container *ngFor=\"let j of columnCount; let last = last\">\n <ng-container *ngIf=\"last\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </ng-container>\n\n <ng-container *ngIf=\"!last\">\n <ngt-shining class=\"h-10 w-full mr-10\"></ngt-shining>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"columnCount.length < 2\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full mr-10 ml-10\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </ng-container>\n </div>\n </div>\n</div>\n\n<div class=\"clearfix {{ paginationMargin }}\" [hidden]='!data || data.length == 0'>\n <ngt-pagination [pagesInterval]='4' (onPageChange)='apply($event, false)' (onPerPageChange)='apply(1, false)'\n #ngtPagination>\n </ngt-pagination>\n</div>\n\n<ngt-modal [customLayout]=\"true\" [isDisabled]=\"false\" [ngtStyle]=\"filterModalStyle\" #searchModal>\n <ng-container *ngTemplateOutlet=\"searchModalTemplate\"></ng-container>\n</ngt-modal>", styles: ["@media (max-width: 767px){.table-responsive{display:block;position:relative;width:100%}.table-responsive thead,.table-responsive tbody,.table-responsive th,.table-responsive td,.table-responsive tr{display:block}.table-responsive td,.table-responsive th{height:50px}.table-responsive thead{float:left;margin-bottom:15px}.table-responsive tbody{width:auto;position:relative;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}.table-responsive tbody tr{display:inline-block;min-width:100%}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgtShiningComponent, selector: "ngt-shining", inputs: ["shiningWidth"] }, { kind: "component", type: NgtPaginationComponent, selector: "ngt-pagination", inputs: ["pagesInterval"], outputs: ["onPageChange", "onPerPageChange"] }, { kind: "component", type: NgtModalComponent, selector: "ngt-modal", inputs: ["customLayout", "disableDefaultCloses", "isDisabled", "ngtStyle"], outputs: ["onCloseModal", "onOpenModal"] }, { kind: "component", type: NgtTagComponent, selector: "ngt-tag", inputs: ["icon"] }, { kind: "directive", type: NgtStylizableDirective, selector: "[ngt-stylizable]", inputs: ["color", "color.text", "color.bg", "color.border", "h", "w", "p", "px", "py", "pt", "pr", "pb", "pl", "m", "mx", "my", "mt", "mr", "mb", "ml", "gap", "border", "shadow", "rounded", "font", "text", "breakWords", "overflow", "position", "justifyContent", "cursor", "fontCase"] }] }); }
|
|
4437
4437
|
}
|
|
4438
4438
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgtDatatableComponent, decorators: [{
|
|
4439
4439
|
type: Component,
|
|
@@ -4473,6 +4473,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4473
4473
|
type: Input
|
|
4474
4474
|
}], canSelectAllRegisters: [{
|
|
4475
4475
|
type: Input
|
|
4476
|
+
}], headBgColor: [{
|
|
4477
|
+
type: Input
|
|
4476
4478
|
}], onDataChange: [{
|
|
4477
4479
|
type: Output
|
|
4478
4480
|
}], onClearFilter: [{
|
|
@@ -4867,6 +4869,9 @@ class NgtThComponent {
|
|
|
4867
4869
|
this.ngtDataTable.setFilterDescription(this.reference, this.searchLabel);
|
|
4868
4870
|
}
|
|
4869
4871
|
}
|
|
4872
|
+
ngAfterViewInit() {
|
|
4873
|
+
this.applyHeadBgColor();
|
|
4874
|
+
}
|
|
4870
4875
|
ngOnDestroy() {
|
|
4871
4876
|
this.destroySubscriptions();
|
|
4872
4877
|
}
|
|
@@ -4993,6 +4998,18 @@ class NgtThComponent {
|
|
|
4993
4998
|
py: 'py-0'
|
|
4994
4999
|
});
|
|
4995
5000
|
}
|
|
5001
|
+
applyHeadBgColor() {
|
|
5002
|
+
const headBgColor = (this.ngtDataTable && this.ngtDataTable.headBgColor);
|
|
5003
|
+
if (headBgColor) {
|
|
5004
|
+
const element = this.hostElement.nativeElement;
|
|
5005
|
+
Array.from(element.classList).forEach((cls) => {
|
|
5006
|
+
if (cls.startsWith('bg-')) {
|
|
5007
|
+
element.classList.remove(cls);
|
|
5008
|
+
}
|
|
5009
|
+
});
|
|
5010
|
+
element.classList.add(headBgColor);
|
|
5011
|
+
}
|
|
5012
|
+
}
|
|
4996
5013
|
destroySubscriptions() {
|
|
4997
5014
|
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
4998
5015
|
this.subscriptions = [];
|
|
@@ -5042,10 +5059,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5042
5059
|
}] } });
|
|
5043
5060
|
|
|
5044
5061
|
class NgtTheadComponent {
|
|
5045
|
-
constructor(injector, hostElement, ngtStylizableDirective) {
|
|
5062
|
+
constructor(injector, hostElement, ngtStylizableDirective, ngtDatatable) {
|
|
5046
5063
|
this.injector = injector;
|
|
5047
5064
|
this.hostElement = hostElement;
|
|
5048
5065
|
this.ngtStylizableDirective = ngtStylizableDirective;
|
|
5066
|
+
this.ngtDatatable = ngtDatatable;
|
|
5049
5067
|
if (this.ngtStylizableDirective) {
|
|
5050
5068
|
this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
|
|
5051
5069
|
}
|
|
@@ -5080,7 +5098,20 @@ class NgtTheadComponent {
|
|
|
5080
5098
|
'rounded'
|
|
5081
5099
|
]);
|
|
5082
5100
|
}
|
|
5083
|
-
|
|
5101
|
+
ngAfterViewInit() {
|
|
5102
|
+
this.applyHeadBgColor();
|
|
5103
|
+
}
|
|
5104
|
+
applyHeadBgColor() {
|
|
5105
|
+
const headBgColor = (this.ngtDatatable && this.ngtDatatable.headBgColor) || 'bg-gray-200';
|
|
5106
|
+
const element = this.hostElement.nativeElement;
|
|
5107
|
+
Array.from(element.classList).forEach((cls) => {
|
|
5108
|
+
if (cls.startsWith('bg-')) {
|
|
5109
|
+
element.classList.remove(cls);
|
|
5110
|
+
}
|
|
5111
|
+
});
|
|
5112
|
+
element.classList.add(headBgColor);
|
|
5113
|
+
}
|
|
5114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgtTheadComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: NgtStylizableDirective, optional: true, self: true }, { token: NgtDatatableComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5084
5115
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: NgtTheadComponent, isStandalone: false, selector: "[ngt-thead]", ngImport: i0, template: "<ng-content></ng-content>" }); }
|
|
5085
5116
|
}
|
|
5086
5117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgtTheadComponent, decorators: [{
|
|
@@ -5090,6 +5121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5090
5121
|
type: Self
|
|
5091
5122
|
}, {
|
|
5092
5123
|
type: Optional
|
|
5124
|
+
}] }, { type: NgtDatatableComponent, decorators: [{
|
|
5125
|
+
type: SkipSelf
|
|
5126
|
+
}, {
|
|
5127
|
+
type: Optional
|
|
5093
5128
|
}] }] });
|
|
5094
5129
|
|
|
5095
5130
|
class NgtTrComponent {
|
|
@@ -7448,7 +7483,7 @@ class NgtMultiSelectComponent extends NgtBaseNgModel {
|
|
|
7448
7483
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgtMultiSelectComponent, deps: [{ token: NgtHttpService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: NgtFormComponent, optional: true, skipSelf: true }, { token: NgtSectionComponent, optional: true, skipSelf: true }, { token: NgtModalComponent, optional: true, skipSelf: true }, { token: NgtStylizableDirective, optional: true, self: true }, { token: i2$1.ControlContainer, host: true, optional: true }, { token: NgtTranslateService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7449
7484
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: NgtMultiSelectComponent, isStandalone: false, selector: "ngt-multi-select", inputs: { customOptionTemplate: "customOptionTemplate", customHeaderTemplate: "customHeaderTemplate", label: "label", helpTitle: "helpTitle", helpText: "helpText", helpTextColor: "helpTextColor", helperReverseYPosition: "helperReverseYPosition", helperAutoXReverse: "helperAutoXReverse", shining: "shining", loading: "loading", bindLabel: "bindLabel", bindSearch: "bindSearch", itemsPerPage: "itemsPerPage", name: "name", remoteResource: "remoteResource", items: "items", searchable: "searchable", allowOriginalItemsUnselect: "allowOriginalItemsUnselect", allowSelectAll: "allowSelectAll", allowDisplayOnlySelected: "allowDisplayOnlySelected", autoSelectUniqueOption: "autoSelectUniqueOption", isRequired: "isRequired", isDisabled: "isDisabled" }, outputs: { onDataChange: "onDataChange" }, host: { listeners: { "scroll": "onScroll($event)" } }, providers: [
|
|
7450
7485
|
NgtMakeProvider(NgtMultiSelectComponent)
|
|
7451
|
-
], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["containerRef"], descendants: true }, { propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true }, { propertyName: "elementCheckboxTemplate", first: true, predicate: ["elementCheckboxTemplate"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<label *ngIf=\"label && !shining\" class=\"flex text-xs\" [class.mb-2]='!hasValidationErrors()'>\n <span class=\"truncate\" [title]=\"label\">\n {{ label }}:\n </span>\n\n <span *ngIf=\"isRequired\" class=\"text-red-500 font-bold text-xs ml-1\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\"\n [helperReverseYPosition]=\"helperReverseYPosition\" [autoXReverse]=\"helperAutoXReverse\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n</label>\n\n<ngt-validation [hidden]='shining' class=\"block mb-1\" [control]='formControl' [container]='formContainer'>\n</ngt-validation>\n\n<div class=\"{{ shining ? 'hidden' : 'flex flex-col' }} border w-full rounded {{ ngtStyle.compile(['h']) }}\"\n style=\"min-height: 13rem;\" [class.border-red-500]='hasValidationErrors()' [class.disabled-background]='disabled()'>\n <div class=\"flex items-center w-full p-2 border-b\">\n <ngt-checkbox *ngIf=\"allowSelectAll\" class=\"flex\" title=\"Selecionar todos\" [isDisabled]='loading || disabled()'\n [label]=\"!searchable ? 'Selecionar todos' : ''\" [(ngModel)]=\"selectAllCheckbox\"\n [name]=\"selectAllCheckboxName\" [isClickDisabled]='true' h='h-4' w='w-4' (click)='selectAll()'\n ngt-stylizable>\n </ngt-checkbox>\n\n <ngt-input *ngIf=\"searchable\" class=\"block w-full\" [class.pl-2]=\"allowSelectAll\" [name]='searchInputName'\n [(ngModel)]='searchTerm' placeholder='Buscar...' [allowClear]='true' [jit]='true' h='h-10'\n (ngModelChange)='search($event)' [loading]='loading' [isDisabled]='disabled()' ngt-stylizable #inputSearch>\n </ngt-input>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex flex-col gap-3 px-3 h-full w-full cursor-wait\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </div>\n\n <div class=\"w-full overflow-y-auto text-xs {{ loading ? 'hidden' : 'flex flex-col' }}\" (scroll)='onScroll($event)'\n #containerRef>\n <ng-container *ngIf=\"customHeaderTemplate\" [ngTemplateOutlet]=\"customHeaderTemplate\">\n </ng-container>\n\n <ng-container *ngFor=\"let element of getSelectableElements(); let i = index\">\n <div class=\"flex w-full items-center hover:bg-gray-200 {{ disabled() ? 'cursor-not-allowed' : 'cursor-pointer' }}\"\n [class.p-2]='!customOptionTemplate' (click)='toggleItem(element, $event)'>\n <ng-template let-element #elementCheckboxTemplate>\n <ngt-checkbox class=\"flex pr-2\" [name]='element.uuid' [(ngModel)]=\"element.isSelected\"\n (ngModelChange)='onNativeChange(element)' [isClickDisabled]='true'\n [isDisabled]='!canSelectItem(element)' h='h-5' w='w-5' (click)='toggleItem(element, $event)'\n ngt-stylizable>\n </ngt-checkbox>\n </ng-template>\n\n <ng-template let-element #defaultOptionTemplate>\n {{ getSelectableElementValue(element) }}\n </ng-template>\n\n <ng-container *ngIf=\"!customOptionTemplate\" [ngTemplateOutlet]=\"elementCheckboxTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element }\">\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"customOptionTemplate || defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element, index: i }\">\n </ng-container>\n </div>\n </ng-container>\n\n <p *ngIf=\"!getSelectableElements()?.length\" class=\"text-center mt-4\">\n {{ ngtTranslateService.ngtMultiSelectNoDataFound }}\n </p>\n </div>\n</div>\n\n<div *ngIf=\"allowDisplayOnlySelected\" class=\"{{ shining ? 'hidden' : 'flex' }} w-full items-center mt-2\">\n <span class=\"text-xs mr-4\">\n {{ selectedElements?.length || 0 }} / {{ itemsTotal || 0 }}\n </span>\n\n <ngt-checkbox class=\"flex\" label=\"Visualizar selecionados\" [name]='displayOnlySelectedName'\n [(ngModel)]=\"displayOnlySelected\" [isDisabled]='loading || disabled()' h='h-5' w='w-5' ngt-stylizable>\n </ngt-checkbox>\n</div>\n\n<ngt-shining *ngIf='shining' class=\"block w-full {{ ngtStyle.compile(['h']) }}\" style=\"min-height: 16rem;\"\n rounded='rounded' ngt-stylizable>\n</ngt-shining>\n\n<input *ngIf='componentReady' type='hidden' [ngModel]='value' [name]='name' [value]='value'>\n", styles: [".disabled-background{border:solid #cbd5e0 1px!important;background-color:#fafafa!important;border-radius:.25rem!important;padding:1px!important}.div-loader{width:4rem;height:4rem;border:3px solid #a0aec038;border-top-color:#a0aec0;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgtValidationComponent, selector: "ngt-validation", inputs: ["control", "container", "minValue", "minLength"] }, { kind: "component", type: NgtShiningComponent, selector: "ngt-shining", inputs: ["shiningWidth"] }, { kind: "component", type: NgtHelperComponent, selector: "ngt-helper", inputs: ["helpTextColor", "helpText", "helpTitle", "icon", "iconSize", "iconColor", "iconTitle", "tooltipSize", "autoXReverse", "helperReverseYPosition"] }, { kind: "component", type: NgtInputComponent, selector: "ngt-input", inputs: ["label", "placeholder", "shining", "loading", "helpTitle", "helpTextColor", "helpText", "innerLeftIcon", "innerLeftIconColor", "innerRightIcon", "innerRightIconColor", "decimalMaskPrecision", "showCharactersLength", "uppercase", "customInnerContentTemplate", "helperReverseYPosition", "helperAutoXReverse", "isDisabled", "isReadonly", "showRoundedIcon", "type", "name", "mask", "focus", "allowClear", "jit", "useInputEvent", "findExistingResource", "allowPhoneValidation", "validatePassword", "passwordableId", "passwordPolicyId", "isRequired", "uniqueResource", "minValue", "maxValue", "maxLength", "minLength", "match", "multipleOf", "validateMinValueOnMask", "externalServerDependency", "customValidator"], outputs: ["onClickLeftIcon", "onClickRightIcon", "validatePhoneResult"] }, { kind: "component", type: NgtCheckboxComponent, selector: "ngt-checkbox", inputs: ["label", "shining", "isDisabled", "isClickDisabled", "name", "mode", "helpTitle", "helpTextColor", "helpText", "helperAutoXReverse"] }, { kind: "directive", type: NgtStylizableDirective, selector: "[ngt-stylizable]", inputs: ["color", "color.text", "color.bg", "color.border", "h", "w", "p", "px", "py", "pt", "pr", "pb", "pl", "m", "mx", "my", "mt", "mr", "mb", "ml", "gap", "border", "shadow", "rounded", "font", "text", "breakWords", "overflow", "position", "justifyContent", "cursor", "fontCase"] }], viewProviders: [
|
|
7486
|
+
], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["containerRef"], descendants: true }, { propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true }, { propertyName: "elementCheckboxTemplate", first: true, predicate: ["elementCheckboxTemplate"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<label *ngIf=\"label && !shining\" class=\"flex text-xs\" [class.mb-2]='!hasValidationErrors()'>\n <span class=\"truncate\" [title]=\"label\">\n {{ label }}:\n </span>\n\n <span *ngIf=\"isRequired\" class=\"text-red-500 font-bold text-xs ml-1\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\"\n [helperReverseYPosition]=\"helperReverseYPosition\" [autoXReverse]=\"helperAutoXReverse\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n</label>\n\n<ngt-validation [hidden]='shining' class=\"block mb-1\" [control]='formControl' [container]='formContainer'>\n</ngt-validation>\n\n<div class=\"{{ shining ? 'hidden' : 'flex flex-col' }} border w-full rounded {{ ngtStyle.compile(['h']) }}\"\n style=\"min-height: 13rem;\" [class.border-red-500]='hasValidationErrors()' [class.disabled-background]='disabled()'>\n <div *ngIf=\"allowSelectAll || searchable\" class=\"flex items-center w-full p-2 border-b\">\n <ngt-checkbox *ngIf=\"allowSelectAll\" class=\"flex\" title=\"Selecionar todos\" [isDisabled]='loading || disabled()'\n [label]=\"!searchable ? 'Selecionar todos' : ''\" [(ngModel)]=\"selectAllCheckbox\"\n [name]=\"selectAllCheckboxName\" [isClickDisabled]='true' h='h-4' w='w-4' (click)='selectAll()'\n ngt-stylizable>\n </ngt-checkbox>\n\n <ngt-input *ngIf=\"searchable\" class=\"block w-full\" [class.pl-2]=\"allowSelectAll\" [name]='searchInputName'\n [(ngModel)]='searchTerm' placeholder='Buscar...' [allowClear]='true' [jit]='true' h='h-10'\n (ngModelChange)='search($event)' [loading]='loading' [isDisabled]='disabled()' ngt-stylizable #inputSearch>\n </ngt-input>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex flex-col gap-3 px-3 h-full w-full cursor-wait\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </div>\n\n <div class=\"w-full overflow-y-auto text-xs {{ loading ? 'hidden' : 'flex flex-col' }}\" (scroll)='onScroll($event)'\n #containerRef>\n <ng-container *ngIf=\"customHeaderTemplate\" [ngTemplateOutlet]=\"customHeaderTemplate\">\n </ng-container>\n\n <ng-container *ngFor=\"let element of getSelectableElements(); let i = index\">\n <div class=\"flex w-full items-center hover:bg-gray-200 {{ disabled() ? 'cursor-not-allowed' : 'cursor-pointer' }}\"\n [class.p-2]='!customOptionTemplate' (click)='toggleItem(element, $event)'>\n <ng-template let-element #elementCheckboxTemplate>\n <ngt-checkbox class=\"flex pr-2\" [name]='element.uuid' [(ngModel)]=\"element.isSelected\"\n (ngModelChange)='onNativeChange(element)' [isClickDisabled]='true'\n [isDisabled]='!canSelectItem(element)' h='h-5' w='w-5' (click)='toggleItem(element, $event)'\n ngt-stylizable>\n </ngt-checkbox>\n </ng-template>\n\n <ng-template let-element #defaultOptionTemplate>\n {{ getSelectableElementValue(element) }}\n </ng-template>\n\n <ng-container *ngIf=\"!customOptionTemplate\" [ngTemplateOutlet]=\"elementCheckboxTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element }\">\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"customOptionTemplate || defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element, index: i }\">\n </ng-container>\n </div>\n </ng-container>\n\n <p *ngIf=\"!getSelectableElements()?.length\" class=\"text-center mt-4\">\n {{ ngtTranslateService.ngtMultiSelectNoDataFound }}\n </p>\n </div>\n</div>\n\n<div *ngIf=\"allowDisplayOnlySelected\" class=\"{{ shining ? 'hidden' : 'flex' }} w-full items-center mt-2\">\n <span class=\"text-xs mr-4\">\n {{ selectedElements?.length || 0 }} / {{ itemsTotal || 0 }}\n </span>\n\n <ngt-checkbox class=\"flex\" label=\"Visualizar selecionados\" [name]='displayOnlySelectedName'\n [(ngModel)]=\"displayOnlySelected\" [isDisabled]='loading || disabled()' h='h-5' w='w-5' ngt-stylizable>\n </ngt-checkbox>\n</div>\n\n<ngt-shining *ngIf='shining' class=\"block w-full {{ ngtStyle.compile(['h']) }}\" style=\"min-height: 16rem;\"\n rounded='rounded' ngt-stylizable>\n</ngt-shining>\n\n<input *ngIf='componentReady' type='hidden' [ngModel]='value' [name]='name' [value]='value'>\n", styles: [".disabled-background{border:solid #cbd5e0 1px!important;background-color:#fafafa!important;border-radius:.25rem!important;padding:1px!important}.div-loader{width:4rem;height:4rem;border:3px solid #a0aec038;border-top-color:#a0aec0;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgtValidationComponent, selector: "ngt-validation", inputs: ["control", "container", "minValue", "minLength"] }, { kind: "component", type: NgtShiningComponent, selector: "ngt-shining", inputs: ["shiningWidth"] }, { kind: "component", type: NgtHelperComponent, selector: "ngt-helper", inputs: ["helpTextColor", "helpText", "helpTitle", "icon", "iconSize", "iconColor", "iconTitle", "tooltipSize", "autoXReverse", "helperReverseYPosition"] }, { kind: "component", type: NgtInputComponent, selector: "ngt-input", inputs: ["label", "placeholder", "shining", "loading", "helpTitle", "helpTextColor", "helpText", "innerLeftIcon", "innerLeftIconColor", "innerRightIcon", "innerRightIconColor", "decimalMaskPrecision", "showCharactersLength", "uppercase", "customInnerContentTemplate", "helperReverseYPosition", "helperAutoXReverse", "isDisabled", "isReadonly", "showRoundedIcon", "type", "name", "mask", "focus", "allowClear", "jit", "useInputEvent", "findExistingResource", "allowPhoneValidation", "validatePassword", "passwordableId", "passwordPolicyId", "isRequired", "uniqueResource", "minValue", "maxValue", "maxLength", "minLength", "match", "multipleOf", "validateMinValueOnMask", "externalServerDependency", "customValidator"], outputs: ["onClickLeftIcon", "onClickRightIcon", "validatePhoneResult"] }, { kind: "component", type: NgtCheckboxComponent, selector: "ngt-checkbox", inputs: ["label", "shining", "isDisabled", "isClickDisabled", "name", "mode", "helpTitle", "helpTextColor", "helpText", "helperAutoXReverse"] }, { kind: "directive", type: NgtStylizableDirective, selector: "[ngt-stylizable]", inputs: ["color", "color.text", "color.bg", "color.border", "h", "w", "p", "px", "py", "pt", "pr", "pb", "pl", "m", "mx", "my", "mt", "mr", "mb", "ml", "gap", "border", "shadow", "rounded", "font", "text", "breakWords", "overflow", "position", "justifyContent", "cursor", "fontCase"] }], viewProviders: [
|
|
7452
7487
|
{ provide: ControlContainer, useExisting: NgForm }
|
|
7453
7488
|
], encapsulation: i0.ViewEncapsulation.None }); }
|
|
7454
7489
|
}
|
|
@@ -7458,7 +7493,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7458
7493
|
NgtMakeProvider(NgtMultiSelectComponent)
|
|
7459
7494
|
], viewProviders: [
|
|
7460
7495
|
{ provide: ControlContainer, useExisting: NgForm }
|
|
7461
|
-
], standalone: false, template: "<label *ngIf=\"label && !shining\" class=\"flex text-xs\" [class.mb-2]='!hasValidationErrors()'>\n <span class=\"truncate\" [title]=\"label\">\n {{ label }}:\n </span>\n\n <span *ngIf=\"isRequired\" class=\"text-red-500 font-bold text-xs ml-1\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\"\n [helperReverseYPosition]=\"helperReverseYPosition\" [autoXReverse]=\"helperAutoXReverse\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n</label>\n\n<ngt-validation [hidden]='shining' class=\"block mb-1\" [control]='formControl' [container]='formContainer'>\n</ngt-validation>\n\n<div class=\"{{ shining ? 'hidden' : 'flex flex-col' }} border w-full rounded {{ ngtStyle.compile(['h']) }}\"\n style=\"min-height: 13rem;\" [class.border-red-500]='hasValidationErrors()' [class.disabled-background]='disabled()'>\n <div class=\"flex items-center w-full p-2 border-b\">\n <ngt-checkbox *ngIf=\"allowSelectAll\" class=\"flex\" title=\"Selecionar todos\" [isDisabled]='loading || disabled()'\n [label]=\"!searchable ? 'Selecionar todos' : ''\" [(ngModel)]=\"selectAllCheckbox\"\n [name]=\"selectAllCheckboxName\" [isClickDisabled]='true' h='h-4' w='w-4' (click)='selectAll()'\n ngt-stylizable>\n </ngt-checkbox>\n\n <ngt-input *ngIf=\"searchable\" class=\"block w-full\" [class.pl-2]=\"allowSelectAll\" [name]='searchInputName'\n [(ngModel)]='searchTerm' placeholder='Buscar...' [allowClear]='true' [jit]='true' h='h-10'\n (ngModelChange)='search($event)' [loading]='loading' [isDisabled]='disabled()' ngt-stylizable #inputSearch>\n </ngt-input>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex flex-col gap-3 px-3 h-full w-full cursor-wait\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </div>\n\n <div class=\"w-full overflow-y-auto text-xs {{ loading ? 'hidden' : 'flex flex-col' }}\" (scroll)='onScroll($event)'\n #containerRef>\n <ng-container *ngIf=\"customHeaderTemplate\" [ngTemplateOutlet]=\"customHeaderTemplate\">\n </ng-container>\n\n <ng-container *ngFor=\"let element of getSelectableElements(); let i = index\">\n <div class=\"flex w-full items-center hover:bg-gray-200 {{ disabled() ? 'cursor-not-allowed' : 'cursor-pointer' }}\"\n [class.p-2]='!customOptionTemplate' (click)='toggleItem(element, $event)'>\n <ng-template let-element #elementCheckboxTemplate>\n <ngt-checkbox class=\"flex pr-2\" [name]='element.uuid' [(ngModel)]=\"element.isSelected\"\n (ngModelChange)='onNativeChange(element)' [isClickDisabled]='true'\n [isDisabled]='!canSelectItem(element)' h='h-5' w='w-5' (click)='toggleItem(element, $event)'\n ngt-stylizable>\n </ngt-checkbox>\n </ng-template>\n\n <ng-template let-element #defaultOptionTemplate>\n {{ getSelectableElementValue(element) }}\n </ng-template>\n\n <ng-container *ngIf=\"!customOptionTemplate\" [ngTemplateOutlet]=\"elementCheckboxTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element }\">\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"customOptionTemplate || defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element, index: i }\">\n </ng-container>\n </div>\n </ng-container>\n\n <p *ngIf=\"!getSelectableElements()?.length\" class=\"text-center mt-4\">\n {{ ngtTranslateService.ngtMultiSelectNoDataFound }}\n </p>\n </div>\n</div>\n\n<div *ngIf=\"allowDisplayOnlySelected\" class=\"{{ shining ? 'hidden' : 'flex' }} w-full items-center mt-2\">\n <span class=\"text-xs mr-4\">\n {{ selectedElements?.length || 0 }} / {{ itemsTotal || 0 }}\n </span>\n\n <ngt-checkbox class=\"flex\" label=\"Visualizar selecionados\" [name]='displayOnlySelectedName'\n [(ngModel)]=\"displayOnlySelected\" [isDisabled]='loading || disabled()' h='h-5' w='w-5' ngt-stylizable>\n </ngt-checkbox>\n</div>\n\n<ngt-shining *ngIf='shining' class=\"block w-full {{ ngtStyle.compile(['h']) }}\" style=\"min-height: 16rem;\"\n rounded='rounded' ngt-stylizable>\n</ngt-shining>\n\n<input *ngIf='componentReady' type='hidden' [ngModel]='value' [name]='name' [value]='value'>\n", styles: [".disabled-background{border:solid #cbd5e0 1px!important;background-color:#fafafa!important;border-radius:.25rem!important;padding:1px!important}.div-loader{width:4rem;height:4rem;border:3px solid #a0aec038;border-top-color:#a0aec0;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}\n"] }]
|
|
7496
|
+
], standalone: false, template: "<label *ngIf=\"label && !shining\" class=\"flex text-xs\" [class.mb-2]='!hasValidationErrors()'>\n <span class=\"truncate\" [title]=\"label\">\n {{ label }}:\n </span>\n\n <span *ngIf=\"isRequired\" class=\"text-red-500 font-bold text-xs ml-1\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\"\n [helperReverseYPosition]=\"helperReverseYPosition\" [autoXReverse]=\"helperAutoXReverse\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n</label>\n\n<ngt-validation [hidden]='shining' class=\"block mb-1\" [control]='formControl' [container]='formContainer'>\n</ngt-validation>\n\n<div class=\"{{ shining ? 'hidden' : 'flex flex-col' }} border w-full rounded {{ ngtStyle.compile(['h']) }}\"\n style=\"min-height: 13rem;\" [class.border-red-500]='hasValidationErrors()' [class.disabled-background]='disabled()'>\n <div *ngIf=\"allowSelectAll || searchable\" class=\"flex items-center w-full p-2 border-b\">\n <ngt-checkbox *ngIf=\"allowSelectAll\" class=\"flex\" title=\"Selecionar todos\" [isDisabled]='loading || disabled()'\n [label]=\"!searchable ? 'Selecionar todos' : ''\" [(ngModel)]=\"selectAllCheckbox\"\n [name]=\"selectAllCheckboxName\" [isClickDisabled]='true' h='h-4' w='w-4' (click)='selectAll()'\n ngt-stylizable>\n </ngt-checkbox>\n\n <ngt-input *ngIf=\"searchable\" class=\"block w-full\" [class.pl-2]=\"allowSelectAll\" [name]='searchInputName'\n [(ngModel)]='searchTerm' placeholder='Buscar...' [allowClear]='true' [jit]='true' h='h-10'\n (ngModelChange)='search($event)' [loading]='loading' [isDisabled]='disabled()' ngt-stylizable #inputSearch>\n </ngt-input>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex flex-col gap-3 px-3 h-full w-full cursor-wait\">\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n <ngt-shining class=\"h-10 w-full\"></ngt-shining>\n </div>\n\n <div class=\"w-full overflow-y-auto text-xs {{ loading ? 'hidden' : 'flex flex-col' }}\" (scroll)='onScroll($event)'\n #containerRef>\n <ng-container *ngIf=\"customHeaderTemplate\" [ngTemplateOutlet]=\"customHeaderTemplate\">\n </ng-container>\n\n <ng-container *ngFor=\"let element of getSelectableElements(); let i = index\">\n <div class=\"flex w-full items-center hover:bg-gray-200 {{ disabled() ? 'cursor-not-allowed' : 'cursor-pointer' }}\"\n [class.p-2]='!customOptionTemplate' (click)='toggleItem(element, $event)'>\n <ng-template let-element #elementCheckboxTemplate>\n <ngt-checkbox class=\"flex pr-2\" [name]='element.uuid' [(ngModel)]=\"element.isSelected\"\n (ngModelChange)='onNativeChange(element)' [isClickDisabled]='true'\n [isDisabled]='!canSelectItem(element)' h='h-5' w='w-5' (click)='toggleItem(element, $event)'\n ngt-stylizable>\n </ngt-checkbox>\n </ng-template>\n\n <ng-template let-element #defaultOptionTemplate>\n {{ getSelectableElementValue(element) }}\n </ng-template>\n\n <ng-container *ngIf=\"!customOptionTemplate\" [ngTemplateOutlet]=\"elementCheckboxTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element }\">\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"customOptionTemplate || defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: element, index: i }\">\n </ng-container>\n </div>\n </ng-container>\n\n <p *ngIf=\"!getSelectableElements()?.length\" class=\"text-center mt-4\">\n {{ ngtTranslateService.ngtMultiSelectNoDataFound }}\n </p>\n </div>\n</div>\n\n<div *ngIf=\"allowDisplayOnlySelected\" class=\"{{ shining ? 'hidden' : 'flex' }} w-full items-center mt-2\">\n <span class=\"text-xs mr-4\">\n {{ selectedElements?.length || 0 }} / {{ itemsTotal || 0 }}\n </span>\n\n <ngt-checkbox class=\"flex\" label=\"Visualizar selecionados\" [name]='displayOnlySelectedName'\n [(ngModel)]=\"displayOnlySelected\" [isDisabled]='loading || disabled()' h='h-5' w='w-5' ngt-stylizable>\n </ngt-checkbox>\n</div>\n\n<ngt-shining *ngIf='shining' class=\"block w-full {{ ngtStyle.compile(['h']) }}\" style=\"min-height: 16rem;\"\n rounded='rounded' ngt-stylizable>\n</ngt-shining>\n\n<input *ngIf='componentReady' type='hidden' [ngModel]='value' [name]='name' [value]='value'>\n", styles: [".disabled-background{border:solid #cbd5e0 1px!important;background-color:#fafafa!important;border-radius:.25rem!important;padding:1px!important}.div-loader{width:4rem;height:4rem;border:3px solid #a0aec038;border-top-color:#a0aec0;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}\n"] }]
|
|
7462
7497
|
}], ctorParameters: () => [{ type: NgtHttpService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: NgtFormComponent, decorators: [{
|
|
7463
7498
|
type: Optional
|
|
7464
7499
|
}, {
|