ng-firebase-table-kxp 1.0.11 → 1.0.13

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ng-firebase-table-kxp" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ng-firebase-table-kxp" />
5
+ export * from './public-api';
@@ -1,118 +1,120 @@
1
- import { Arrange, Condition, TableData } from '../../types/Table';
2
- import { OnInit } from '@angular/core';
3
- import { AngularFirestore } from '@angular/fire/compat/firestore';
4
- import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
- import { MatSort } from '@angular/material/sort';
6
- import { MatTableDataSource } from '@angular/material/table';
7
- import { Router } from '@angular/router';
8
- import { TableService } from '../../services/table.service';
9
- import firebase from 'firebase/compat';
10
- import WhereFilterOp = firebase.firestore.WhereFilterOp;
11
- import { FormControl, FormArray, FormGroup } from '@angular/forms';
12
- import * as i0 from "@angular/core";
13
- export declare class TableComponent implements OnInit {
14
- private router;
15
- private tableService;
16
- private firestore;
17
- data: TableData;
18
- downloadTable?: (arrange: Arrange, conditions: Condition[]) => void;
19
- arrange: Arrange | null;
20
- dataSource: MatTableDataSource<any>;
21
- currentPageNumber: number;
22
- currentClientPageIndex: number;
23
- items: any[];
24
- filteredItems: any[];
25
- isLoading: boolean;
26
- private lastDoc;
27
- private firstDoc;
28
- private sortBy;
29
- columnProperties: string[];
30
- filtersForm: FormArray;
31
- selectSort: FormControl;
32
- currentArrange: string;
33
- hasNextPage: boolean;
34
- dropdownItems: any[];
35
- sortableDropdownItems: any[];
36
- pageSize: number;
37
- totalItems: number;
38
- pageEvent?: PageEvent;
39
- filterValue: string | null;
40
- hasFilterableColumn: boolean;
41
- hasSortableColumn: boolean;
42
- filterPredicate: ((data: any, filter: string) => boolean) | undefined;
43
- private filterSubject;
44
- private readonly debounceTimeMs;
45
- selectedTab: number;
46
- paginator: MatPaginator;
47
- sort: MatSort;
48
- hoveredCell: {
49
- row: any;
50
- col: any;
51
- } | null;
52
- showTooltip: boolean;
53
- tooltipTimeout: any;
54
- tooltipContent: string;
55
- tooltipPosition: {
56
- x: number;
57
- y: number;
58
- };
59
- constructor(router: Router, tableService: TableService, firestore: AngularFirestore);
60
- createFilterGroup(): FormGroup;
61
- addFilter(filterData?: {
62
- selectFilter: any;
63
- typeFilter?: string;
64
- selectItem?: any[];
65
- initialDate?: string;
66
- finalDate?: string;
67
- }): void;
68
- onSelectFilterChange(): void;
69
- removeFilter(index: number): void;
70
- removeAllFilters(): void;
71
- ngOnInit(): Promise<void>;
72
- getDisplayValue(col: any, row: any, withinLimit?: boolean): string;
73
- getNestedValue(obj: any, path: string): any;
74
- private formatArrayValue;
75
- private loadItems;
76
- private applyClientSideFilters;
77
- onDateFilterChange(): void;
78
- private applyFiltersToDataSource;
79
- private loadItemsPaginated;
80
- onPageChange(event?: PageEvent): Promise<void>;
81
- applyFilter(value: string): void;
82
- goToDetails(row: any): void;
83
- getRelation(params: {
84
- id: any;
85
- collection: string;
86
- newProperty: string;
87
- }): Promise<string>;
88
- private loadRelations;
89
- getQueryLength(params: {
90
- item: any;
91
- relation: {
92
- collection: string;
93
- property: string;
94
- operator: WhereFilterOp;
95
- value: string;
96
- };
97
- }): Promise<number>;
98
- private loadQueryLengths;
99
- private filterItems;
100
- private buildArrangeFromFilters;
101
- search(): Promise<void>;
102
- resetFilter(): Promise<void>;
103
- reloadTable(): Promise<void>;
104
- updateDisplayedColumns(): void;
105
- isString(value: any): boolean;
106
- onCellMouseEnter(event: MouseEvent, row: any, col: any): void;
107
- onCellMouseLeave(): void;
108
- onCellMouseMove(event: MouseEvent): void;
109
- getTabGroups(tabs: any[]): number[];
110
- getTabGroup(tabs: any[], groupIndex: number): any[];
111
- getRealTabIndex(groupIndex: number, tabIndexInGroup: number): number;
112
- onTableSelected(i: number, j: number): void;
113
- isTabSelected(originalIndex: number): boolean;
114
- shouldShowActionButton(): boolean;
115
- handleDownload(): void;
116
- static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
117
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "lib-table", never, { "data": "data"; "downloadTable": "downloadTable"; }, {}, never, never, false, never>;
118
- }
1
+ import { Arrange, Condition, TableData } from '../../types/Table';
2
+ import { OnInit } from '@angular/core';
3
+ import { AngularFirestore } from '@angular/fire/compat/firestore';
4
+ import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
+ import { MatSort } from '@angular/material/sort';
6
+ import { MatTableDataSource } from '@angular/material/table';
7
+ import { Router } from '@angular/router';
8
+ import { TableService } from '../../services/table.service';
9
+ import firebase from 'firebase/compat';
10
+ import WhereFilterOp = firebase.firestore.WhereFilterOp;
11
+ import { FormControl, FormArray, FormGroup } from '@angular/forms';
12
+ import * as i0 from "@angular/core";
13
+ export declare class TableComponent implements OnInit {
14
+ private router;
15
+ private tableService;
16
+ private firestore;
17
+ data: TableData;
18
+ downloadTable?: (arrange: Arrange, conditions: Condition[]) => void;
19
+ arrange: Arrange | null;
20
+ dataSource: MatTableDataSource<any>;
21
+ currentPageNumber: number;
22
+ currentClientPageIndex: number;
23
+ items: any[];
24
+ filteredItems: any[];
25
+ isLoading: boolean;
26
+ private lastDoc;
27
+ private firstDoc;
28
+ private sortBy;
29
+ columnProperties: string[];
30
+ filtersForm: FormArray;
31
+ selectSort: FormControl;
32
+ currentArrange: string;
33
+ hasNextPage: boolean;
34
+ dropdownItems: any[];
35
+ sortableDropdownItems: any[];
36
+ pageSize: number;
37
+ totalItems: number;
38
+ pageEvent?: PageEvent;
39
+ filterValue: string | null;
40
+ hasFilterableColumn: boolean;
41
+ hasSortableColumn: boolean;
42
+ filterPredicate: ((data: any, filter: string) => boolean) | undefined;
43
+ private filterSubject;
44
+ private readonly debounceTimeMs;
45
+ selectedTab: number;
46
+ paginator: MatPaginator;
47
+ sort: MatSort;
48
+ hoveredCell: {
49
+ row: any;
50
+ col: any;
51
+ } | null;
52
+ showTooltip: boolean;
53
+ tooltipTimeout: any;
54
+ tooltipContent: string;
55
+ tooltipPosition: {
56
+ x: number;
57
+ y: number;
58
+ };
59
+ constructor(router: Router, tableService: TableService, firestore: AngularFirestore);
60
+ createFilterGroup(): FormGroup;
61
+ addFilter(filterData?: {
62
+ selectFilter: any;
63
+ typeFilter?: string;
64
+ selectItem?: any[];
65
+ initialDate?: string;
66
+ finalDate?: string;
67
+ }): void;
68
+ hasActiveDateFilter(): boolean;
69
+ getAvailableFilterOptions(): any[];
70
+ onSelectFilterChange(): void;
71
+ removeFilter(index: number): void;
72
+ removeAllFilters(): void;
73
+ ngOnInit(): Promise<void>;
74
+ getDisplayValue(col: any, row: any, withinLimit?: boolean): string;
75
+ getNestedValue(obj: any, path: string): any;
76
+ private formatArrayValue;
77
+ private loadItems;
78
+ private applyClientSideFilters;
79
+ onDateFilterChange(): void;
80
+ private applyFiltersToDataSource;
81
+ private loadItemsPaginated;
82
+ onPageChange(event?: PageEvent): Promise<void>;
83
+ applyFilter(value: string): void;
84
+ goToDetails(row: any): void;
85
+ getRelation(params: {
86
+ id: any;
87
+ collection: string;
88
+ newProperty: string;
89
+ }): Promise<string>;
90
+ private loadRelations;
91
+ getQueryLength(params: {
92
+ item: any;
93
+ relation: {
94
+ collection: string;
95
+ property: string;
96
+ operator: WhereFilterOp;
97
+ value: string;
98
+ };
99
+ }): Promise<number>;
100
+ private loadQueryLengths;
101
+ private filterItems;
102
+ private buildArrangeFromFilters;
103
+ search(event?: Event): Promise<void>;
104
+ resetFilter(): Promise<void>;
105
+ reloadTable(): Promise<void>;
106
+ updateDisplayedColumns(): void;
107
+ isString(value: any): boolean;
108
+ onCellMouseEnter(event: MouseEvent, row: any, col: any): void;
109
+ onCellMouseLeave(): void;
110
+ onCellMouseMove(event: MouseEvent): void;
111
+ getTabGroups(tabs: any[]): number[];
112
+ getTabGroup(tabs: any[], groupIndex: number): any[];
113
+ getRealTabIndex(groupIndex: number, tabIndexInGroup: number): number;
114
+ onTableSelected(i: number, j: number): void;
115
+ isTabSelected(originalIndex: number): boolean;
116
+ shouldShowActionButton(): boolean;
117
+ handleDownload(): void;
118
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
119
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "lib-table", never, { "data": "data"; "downloadTable": "downloadTable"; }, {}, never, never, false, never>;
120
+ }
@@ -1,5 +1,5 @@
1
- import * as i0 from "@angular/core";
2
- export declare class NgFirebaseTableKxpComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<NgFirebaseTableKxpComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<NgFirebaseTableKxpComponent, "lib-ng-firebase-table-kxp", never, {}, {}, never, never, false, never>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class NgFirebaseTableKxpComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgFirebaseTableKxpComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgFirebaseTableKxpComponent, "lib-ng-firebase-table-kxp", never, {}, {}, never, never, false, never>;
5
+ }
@@ -1,22 +1,22 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./ng-firebase-table-kxp.component";
3
- import * as i2 from "./components/table/table.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "@angular/router";
7
- import * as i6 from "@angular/material/table";
8
- import * as i7 from "@angular/material/paginator";
9
- import * as i8 from "@angular/material/sort";
10
- import * as i9 from "@angular/material/form-field";
11
- import * as i10 from "@angular/material/input";
12
- import * as i11 from "@angular/material/select";
13
- import * as i12 from "@angular/material/tooltip";
14
- import * as i13 from "@angular/material/progress-spinner";
15
- import * as i14 from "@angular/material/icon";
16
- import * as i15 from "@angular/material/dialog";
17
- import * as i16 from "ngx-mask";
18
- export declare class NgFirebaseTableKxpModule {
19
- static ɵfac: i0.ɵɵFactoryDeclaration<NgFirebaseTableKxpModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgFirebaseTableKxpModule, [typeof i1.NgFirebaseTableKxpComponent, typeof i2.TableComponent], [typeof i3.CommonModule, typeof i4.ReactiveFormsModule, typeof i4.FormsModule, typeof i5.RouterModule, typeof i6.MatTableModule, typeof i7.MatPaginatorModule, typeof i8.MatSortModule, typeof i9.MatFormFieldModule, typeof i10.MatInputModule, typeof i11.MatSelectModule, typeof i12.MatTooltipModule, typeof i13.MatProgressSpinnerModule, typeof i14.MatIconModule, typeof i15.MatDialogModule, typeof i16.NgxMaskDirective, typeof i16.NgxMaskPipe], [typeof i1.NgFirebaseTableKxpComponent, typeof i2.TableComponent]>;
21
- static ɵinj: i0.ɵɵInjectorDeclaration<NgFirebaseTableKxpModule>;
22
- }
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ng-firebase-table-kxp.component";
3
+ import * as i2 from "./components/table/table.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "@angular/router";
7
+ import * as i6 from "@angular/material/table";
8
+ import * as i7 from "@angular/material/paginator";
9
+ import * as i8 from "@angular/material/sort";
10
+ import * as i9 from "@angular/material/form-field";
11
+ import * as i10 from "@angular/material/input";
12
+ import * as i11 from "@angular/material/select";
13
+ import * as i12 from "@angular/material/tooltip";
14
+ import * as i13 from "@angular/material/progress-spinner";
15
+ import * as i14 from "@angular/material/icon";
16
+ import * as i15 from "@angular/material/dialog";
17
+ import * as i16 from "ngx-mask";
18
+ export declare class NgFirebaseTableKxpModule {
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgFirebaseTableKxpModule, never>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgFirebaseTableKxpModule, [typeof i1.NgFirebaseTableKxpComponent, typeof i2.TableComponent], [typeof i3.CommonModule, typeof i4.ReactiveFormsModule, typeof i4.FormsModule, typeof i5.RouterModule, typeof i6.MatTableModule, typeof i7.MatPaginatorModule, typeof i8.MatSortModule, typeof i9.MatFormFieldModule, typeof i10.MatInputModule, typeof i11.MatSelectModule, typeof i12.MatTooltipModule, typeof i13.MatProgressSpinnerModule, typeof i14.MatIconModule, typeof i15.MatDialogModule, typeof i16.NgxMaskDirective, typeof i16.NgxMaskPipe], [typeof i1.NgFirebaseTableKxpComponent, typeof i2.TableComponent]>;
21
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgFirebaseTableKxpModule>;
22
+ }
@@ -1,6 +1,6 @@
1
- import * as i0 from "@angular/core";
2
- export declare class NgFirebaseTableKxpService {
3
- constructor();
4
- static ɵfac: i0.ɵɵFactoryDeclaration<NgFirebaseTableKxpService, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<NgFirebaseTableKxpService>;
6
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class NgFirebaseTableKxpService {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgFirebaseTableKxpService, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgFirebaseTableKxpService>;
6
+ }
@@ -1,74 +1,74 @@
1
- import { AngularFirestore, CollectionReference } from '@angular/fire/compat/firestore';
2
- import firebase from 'firebase/compat/app';
3
- import { Arrange, Condition, Pagination } from '../types/Table';
4
- import { MatDialog } from '@angular/material/dialog';
5
- import { ToastrService } from 'ngx-toastr';
6
- import { ValidatorFn } from '@angular/forms';
7
- import * as i0 from "@angular/core";
8
- interface PaginationResult {
9
- items: any[];
10
- filterLength: number | null;
11
- firstDoc: firebase.firestore.QueryDocumentSnapshot<unknown> | null;
12
- lastDoc: firebase.firestore.QueryDocumentSnapshot<unknown> | null;
13
- hasNextPage: boolean;
14
- hasPreviousPage?: boolean;
15
- currentClientPageIndex?: number;
16
- totalPages?: number;
17
- }
18
- export declare class TableService {
19
- private ngFire;
20
- private dialog;
21
- private toastr;
22
- constructor(ngFire: AngularFirestore, dialog: MatDialog, toastr: ToastrService);
23
- getItems(collection: CollectionReference<unknown>): Promise<any[]>;
24
- private executeQuery;
25
- applyFilters(query: firebase.firestore.Query<unknown>, arrange: Arrange, conditions: Condition[] | undefined): firebase.firestore.Query<unknown>;
26
- private getIdFilter;
27
- private getDocumentById;
28
- private searchByIdPartial;
29
- private shouldUseClientSideFallback;
30
- getPaginated(params: Pagination): Promise<PaginationResult>;
31
- executeClientSideQuery(params: Pagination): Promise<PaginationResult>;
32
- getItemsData(collection: string, arrange: Arrange, conditions?: Condition[] | undefined): Promise<any[]>;
33
- operators: {
34
- '==': (a: any, b: any) => boolean;
35
- '!=': (a: any, b: any) => boolean;
36
- '>': (a: any, b: any) => boolean;
37
- '<': (a: any, b: any) => boolean;
38
- '>=': (a: any, b: any) => boolean;
39
- '<=': (a: any, b: any) => boolean;
40
- in: (a: any, b: any) => boolean;
41
- 'not-in': (a: any, b: any) => boolean;
42
- 'array-contains': (a: any, b: any) => boolean;
43
- 'array-contains-any': (a: any, b: any) => boolean;
44
- includes: (a: any, b: any) => any;
45
- };
46
- deleteIndex(id: string, col: string): Promise<boolean>;
47
- reindex(index: number, col: string, batch: firebase.firestore.WriteBatch): Promise<void>;
48
- dateFormatValidator(): ValidatorFn;
49
- updateIndex(index: number, id: string, col: string): Promise<void>;
50
- /**
51
- * Extrai o link de criação de índice da mensagem de erro do Firestore
52
- */
53
- private extractIndexLink;
54
- /**
55
- * Rastreia índices ausentes ao usar fallback preventivo
56
- */
57
- private trackMissingIndexPreventive;
58
- /**
59
- * Gera uma assinatura única para uma query
60
- */
61
- private generateQuerySignature;
62
- /**
63
- * Gera instruções claras para criar o índice manualmente
64
- */
65
- private generateIndexInstructions;
66
- /**
67
- * Gera um link de índice baseado na estrutura da query
68
- */
69
- private generateIndexLink;
70
- private trackMissingIndex;
71
- static ɵfac: i0.ɵɵFactoryDeclaration<TableService, [{ optional: true; }, { optional: true; }, { optional: true; }]>;
72
- static ɵprov: i0.ɵɵInjectableDeclaration<TableService>;
73
- }
74
- export {};
1
+ import { AngularFirestore, CollectionReference } from '@angular/fire/compat/firestore';
2
+ import firebase from 'firebase/compat/app';
3
+ import { Arrange, Condition, Pagination } from '../types/Table';
4
+ import { MatDialog } from '@angular/material/dialog';
5
+ import { ToastrService } from 'ngx-toastr';
6
+ import { ValidatorFn } from '@angular/forms';
7
+ import * as i0 from "@angular/core";
8
+ interface PaginationResult {
9
+ items: any[];
10
+ filterLength: number | null;
11
+ firstDoc: firebase.firestore.QueryDocumentSnapshot<unknown> | null;
12
+ lastDoc: firebase.firestore.QueryDocumentSnapshot<unknown> | null;
13
+ hasNextPage: boolean;
14
+ hasPreviousPage?: boolean;
15
+ currentClientPageIndex?: number;
16
+ totalPages?: number;
17
+ }
18
+ export declare class TableService {
19
+ private ngFire;
20
+ private dialog;
21
+ private toastr;
22
+ constructor(ngFire: AngularFirestore, dialog: MatDialog, toastr: ToastrService);
23
+ getItems(collection: CollectionReference<unknown>): Promise<any[]>;
24
+ private executeQuery;
25
+ applyFilters(query: firebase.firestore.Query<unknown>, arrange: Arrange, conditions: Condition[] | undefined): firebase.firestore.Query<unknown>;
26
+ private getIdFilter;
27
+ private getDocumentById;
28
+ private searchByIdPartial;
29
+ private shouldUseClientSideFallback;
30
+ getPaginated(params: Pagination): Promise<PaginationResult>;
31
+ executeClientSideQuery(params: Pagination): Promise<PaginationResult>;
32
+ getItemsData(collection: string, arrange: Arrange, conditions?: Condition[] | undefined): Promise<any[]>;
33
+ operators: {
34
+ '==': (a: any, b: any) => boolean;
35
+ '!=': (a: any, b: any) => boolean;
36
+ '>': (a: any, b: any) => boolean;
37
+ '<': (a: any, b: any) => boolean;
38
+ '>=': (a: any, b: any) => boolean;
39
+ '<=': (a: any, b: any) => boolean;
40
+ in: (a: any, b: any) => boolean;
41
+ 'not-in': (a: any, b: any) => boolean;
42
+ 'array-contains': (a: any, b: any) => boolean;
43
+ 'array-contains-any': (a: any, b: any) => boolean;
44
+ includes: (a: any, b: any) => any;
45
+ };
46
+ deleteIndex(id: string, col: string): Promise<boolean>;
47
+ reindex(index: number, col: string, batch: firebase.firestore.WriteBatch): Promise<void>;
48
+ dateFormatValidator(): ValidatorFn;
49
+ updateIndex(index: number, id: string, col: string): Promise<void>;
50
+ /**
51
+ * Extrai o link de criação de índice da mensagem de erro do Firestore
52
+ */
53
+ private extractIndexLink;
54
+ /**
55
+ * Rastreia índices ausentes ao usar fallback preventivo
56
+ */
57
+ private trackMissingIndexPreventive;
58
+ /**
59
+ * Gera uma assinatura única para uma query
60
+ */
61
+ private generateQuerySignature;
62
+ /**
63
+ * Gera instruções claras para criar o índice manualmente
64
+ */
65
+ private generateIndexInstructions;
66
+ /**
67
+ * Gera um link de índice baseado na estrutura da query
68
+ */
69
+ private generateIndexLink;
70
+ private trackMissingIndex;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableService, [{ optional: true; }, { optional: true; }, { optional: true; }]>;
72
+ static ɵprov: i0.ɵɵInjectableDeclaration<TableService>;
73
+ }
74
+ export {};