ng-firebase-table-kxp 1.2.5 → 1.2.7

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.
Files changed (34) hide show
  1. package/README.md +602 -602
  2. package/esm2020/lib/components/table/table.component.mjs +1557 -1571
  3. package/esm2020/lib/components/table-tabs/table-tabs.component.mjs +129 -129
  4. package/esm2020/lib/components/table-tooltip/table-tooltip.component.mjs +49 -49
  5. package/esm2020/lib/ng-firebase-table-kxp.component.mjs +14 -14
  6. package/esm2020/lib/ng-firebase-table-kxp.module.mjs +102 -102
  7. package/esm2020/lib/ng-firebase-table-kxp.service.mjs +14 -14
  8. package/esm2020/lib/services/filter.service.mjs +416 -416
  9. package/esm2020/lib/services/pagination.service.mjs +115 -115
  10. package/esm2020/lib/services/table.service.mjs +1140 -1140
  11. package/esm2020/lib/services/tooltip.service.mjs +141 -141
  12. package/esm2020/lib/types/Table.mjs +9 -9
  13. package/esm2020/lib/utils/table.utils.mjs +75 -75
  14. package/esm2020/ng-firebase-table-kxp.mjs +4 -4
  15. package/esm2020/public-api.mjs +22 -22
  16. package/fesm2015/ng-firebase-table-kxp.mjs +3960 -3977
  17. package/fesm2015/ng-firebase-table-kxp.mjs.map +1 -1
  18. package/fesm2020/ng-firebase-table-kxp.mjs +3663 -3677
  19. package/fesm2020/ng-firebase-table-kxp.mjs.map +1 -1
  20. package/index.d.ts +5 -5
  21. package/lib/components/table/table.component.d.ts +135 -135
  22. package/lib/components/table-tabs/table-tabs.component.d.ts +34 -34
  23. package/lib/components/table-tooltip/table-tooltip.component.d.ts +18 -18
  24. package/lib/ng-firebase-table-kxp.component.d.ts +5 -5
  25. package/lib/ng-firebase-table-kxp.module.d.ts +24 -24
  26. package/lib/ng-firebase-table-kxp.service.d.ts +6 -6
  27. package/lib/services/filter.service.d.ts +88 -88
  28. package/lib/services/pagination.service.d.ts +34 -34
  29. package/lib/services/table.service.d.ts +80 -80
  30. package/lib/services/tooltip.service.d.ts +73 -73
  31. package/lib/types/Table.d.ts +162 -162
  32. package/lib/utils/table.utils.d.ts +25 -25
  33. package/package.json +1 -1
  34. package/public-api.d.ts +12 -12
@@ -1,162 +1,162 @@
1
- import { CollectionReference, DocumentReference, QueryDocumentSnapshot } from '@angular/fire/compat/firestore';
2
- import { PipeTransform } from '@angular/core';
3
- import firebase from 'firebase/compat';
4
- import WhereFilterOp = firebase.firestore.WhereFilterOp;
5
- import { OrderByDirection } from 'firebase/firestore';
6
- export declare const TABLE_DEFAULTS: {
7
- SORT_FIELD: string;
8
- SORT_ORDER: "desc";
9
- PAGE_SIZE: number;
10
- DEBOUNCE_TIME_MS: number;
11
- DEFAULT_BG_COLOR: string;
12
- DEFAULT_TEXT_COLOR: string;
13
- };
14
- export interface TableData {
15
- displayedColumns: Column[];
16
- filterableOptions?: FilterableOption[];
17
- collectionRef: CollectionReference<unknown>;
18
- collection: string;
19
- name: string;
20
- totalRef?: {
21
- ref: DocumentReference<unknown>;
22
- field: string;
23
- }[];
24
- download: boolean;
25
- pagination: boolean;
26
- isNotClickable?: boolean;
27
- url?: string;
28
- sortBy?: {
29
- field: string;
30
- order: OrderByDirection;
31
- };
32
- conditions?: {
33
- operator: WhereFilterOp;
34
- firestoreProperty: string;
35
- dashProperty: string | string[];
36
- }[];
37
- filterFn?: (item: any) => boolean;
38
- color?: {
39
- bg: string;
40
- text: string;
41
- };
42
- showSimpleSearch?: boolean;
43
- actionButton?: {
44
- label: string;
45
- routerLink: string;
46
- icon?: string;
47
- colorClass?: string;
48
- method?: (row: any, event?: any) => any;
49
- condition?: (row?: any) => boolean;
50
- };
51
- tabs?: Tab;
52
- }
53
- export interface Tab {
54
- method: (tab: any, event?: any) => any;
55
- tabsData: TabData[];
56
- }
57
- export interface TabData {
58
- label: string;
59
- counter?: number;
60
- counterClass?: string;
61
- }
62
- export interface Column {
63
- property: string;
64
- title?: string;
65
- charLimit?: number;
66
- pipe?: PipeTransform;
67
- iconClass?: {
68
- text?: string;
69
- class?: string;
70
- condition?: (row: any) => any;
71
- buttonMethod?: (row: any, event?: any) => any;
72
- }[];
73
- isSortable?: boolean;
74
- isFilterable?: boolean;
75
- isFilterableByDate?: boolean;
76
- hasLink?: boolean | string;
77
- hasDownload?: boolean | string;
78
- relation?: {
79
- targetedCollection: string;
80
- sourceProperty: string;
81
- targetedProperty: string;
82
- };
83
- queryLength?: {
84
- collection: string;
85
- property: string;
86
- operator: WhereFilterOp;
87
- value: string;
88
- };
89
- image?: Image;
90
- method?: (row: any, event?: any) => any;
91
- filterPredicates?: string[];
92
- calculateValue?: (row: any) => any;
93
- arrayField?: string;
94
- tooltip?: {
95
- color: string;
96
- text: string;
97
- };
98
- }
99
- export interface Image {
100
- class: string;
101
- path?: string;
102
- url?: boolean;
103
- default?: string;
104
- }
105
- export interface FilterableOption {
106
- title: string;
107
- items: {
108
- property: string;
109
- value: string | boolean;
110
- label: string;
111
- }[];
112
- }
113
- export interface Pagination {
114
- batchSize: number;
115
- collection: string;
116
- doc?: {
117
- firstDoc: QueryDocumentSnapshot<any> | null;
118
- lastDoc: QueryDocumentSnapshot<any> | null;
119
- };
120
- navigation: 'reload' | 'forward' | 'backward';
121
- arrange: Arrange;
122
- conditions?: Condition[];
123
- filterFn?: (item: any) => boolean;
124
- size?: number;
125
- clientPageIndex?: number;
126
- }
127
- export interface Condition {
128
- operator: WhereFilterOp;
129
- firestoreProperty: string;
130
- dashProperty: string | string[];
131
- }
132
- export interface Arrange {
133
- filters: {
134
- arrange: 'ascending' | 'descending' | 'filter' | 'filterByDate' | 'equals' | '';
135
- filter?: {
136
- property: string;
137
- filtering: string;
138
- } | null;
139
- dateFilter?: {
140
- initial: Date;
141
- final: Date;
142
- };
143
- }[];
144
- sortBy: {
145
- field: string;
146
- order: OrderByDirection;
147
- };
148
- elementId?: {
149
- property: string;
150
- value: string;
151
- };
152
- }
153
- export declare type DropdownItem = Column & {
154
- arrange: 'filter' | 'filterByDate' | 'equals' | 'ascending' | 'descending';
155
- title: string;
156
- icon?: string;
157
- };
158
- export interface FilterSelectItem {
159
- property: string;
160
- value: string | boolean;
161
- label: string;
162
- }
1
+ import { CollectionReference, DocumentReference, QueryDocumentSnapshot } from '@angular/fire/compat/firestore';
2
+ import { PipeTransform } from '@angular/core';
3
+ import firebase from 'firebase/compat';
4
+ import WhereFilterOp = firebase.firestore.WhereFilterOp;
5
+ import { OrderByDirection } from 'firebase/firestore';
6
+ export declare const TABLE_DEFAULTS: {
7
+ SORT_FIELD: string;
8
+ SORT_ORDER: "desc";
9
+ PAGE_SIZE: number;
10
+ DEBOUNCE_TIME_MS: number;
11
+ DEFAULT_BG_COLOR: string;
12
+ DEFAULT_TEXT_COLOR: string;
13
+ };
14
+ export interface TableData {
15
+ displayedColumns: Column[];
16
+ filterableOptions?: FilterableOption[];
17
+ collectionRef: CollectionReference<unknown>;
18
+ collection: string;
19
+ name: string;
20
+ totalRef?: {
21
+ ref: DocumentReference<unknown>;
22
+ field: string;
23
+ }[];
24
+ download: boolean;
25
+ pagination: boolean;
26
+ isNotClickable?: boolean;
27
+ url?: string;
28
+ sortBy?: {
29
+ field: string;
30
+ order: OrderByDirection;
31
+ };
32
+ conditions?: {
33
+ operator: WhereFilterOp;
34
+ firestoreProperty: string;
35
+ dashProperty: string | string[];
36
+ }[];
37
+ filterFn?: (item: any) => boolean;
38
+ color?: {
39
+ bg: string;
40
+ text: string;
41
+ };
42
+ showSimpleSearch?: boolean;
43
+ actionButton?: {
44
+ label: string;
45
+ routerLink: string;
46
+ icon?: string;
47
+ colorClass?: string;
48
+ method?: (row: any, event?: any) => any;
49
+ condition?: (row?: any) => boolean;
50
+ };
51
+ tabs?: Tab;
52
+ }
53
+ export interface Tab {
54
+ method: (tab: any, event?: any) => any;
55
+ tabsData: TabData[];
56
+ }
57
+ export interface TabData {
58
+ label: string;
59
+ counter?: number;
60
+ counterClass?: string;
61
+ }
62
+ export interface Column {
63
+ property: string;
64
+ title?: string;
65
+ charLimit?: number;
66
+ pipe?: PipeTransform;
67
+ iconClass?: {
68
+ text?: string;
69
+ class?: string;
70
+ condition?: (row: any) => any;
71
+ buttonMethod?: (row: any, event?: any) => any;
72
+ }[];
73
+ isSortable?: boolean;
74
+ isFilterable?: boolean;
75
+ isFilterableByDate?: boolean;
76
+ hasLink?: boolean | string;
77
+ hasDownload?: boolean | string;
78
+ relation?: {
79
+ targetedCollection: string;
80
+ sourceProperty: string;
81
+ targetedProperty: string;
82
+ };
83
+ queryLength?: {
84
+ collection: string;
85
+ property: string;
86
+ operator: WhereFilterOp;
87
+ value: string;
88
+ };
89
+ image?: Image;
90
+ method?: (row: any, event?: any) => any;
91
+ filterPredicates?: string[];
92
+ calculateValue?: (row: any) => any;
93
+ arrayField?: string;
94
+ tooltip?: {
95
+ color: string;
96
+ text: string;
97
+ };
98
+ }
99
+ export interface Image {
100
+ class: string;
101
+ path?: string;
102
+ url?: boolean;
103
+ default?: string;
104
+ }
105
+ export interface FilterableOption {
106
+ title: string;
107
+ items: {
108
+ property: string;
109
+ value: string | boolean;
110
+ label: string;
111
+ }[];
112
+ }
113
+ export interface Pagination {
114
+ batchSize: number;
115
+ collection: string;
116
+ doc?: {
117
+ firstDoc: QueryDocumentSnapshot<any> | null;
118
+ lastDoc: QueryDocumentSnapshot<any> | null;
119
+ };
120
+ navigation: 'reload' | 'forward' | 'backward';
121
+ arrange: Arrange;
122
+ conditions?: Condition[];
123
+ filterFn?: (item: any) => boolean;
124
+ size?: number;
125
+ clientPageIndex?: number;
126
+ }
127
+ export interface Condition {
128
+ operator: WhereFilterOp;
129
+ firestoreProperty: string;
130
+ dashProperty: string | string[];
131
+ }
132
+ export interface Arrange {
133
+ filters: {
134
+ arrange: 'ascending' | 'descending' | 'filter' | 'filterByDate' | 'equals' | '';
135
+ filter?: {
136
+ property: string;
137
+ filtering: string;
138
+ } | null;
139
+ dateFilter?: {
140
+ initial: Date;
141
+ final: Date;
142
+ };
143
+ }[];
144
+ sortBy: {
145
+ field: string;
146
+ order: OrderByDirection;
147
+ };
148
+ elementId?: {
149
+ property: string;
150
+ value: string;
151
+ };
152
+ }
153
+ export declare type DropdownItem = Column & {
154
+ arrange: 'filter' | 'filterByDate' | 'equals' | 'ascending' | 'descending';
155
+ title: string;
156
+ icon?: string;
157
+ };
158
+ export interface FilterSelectItem {
159
+ property: string;
160
+ value: string | boolean;
161
+ label: string;
162
+ }
@@ -1,25 +1,25 @@
1
- import { Column } from '../types/Table';
2
- /**
3
- * Obtém o valor aninhado de um objeto dado um caminho (ex: 'user.address.city')
4
- */
5
- export declare function getNestedValue(obj: any, path: string): any;
6
- /**
7
- * Formata um array de objetos em uma string com valores separados por vírgula
8
- */
9
- export declare function formatArrayValue(array: any[], field: string): string;
10
- /**
11
- * Obtém o valor de exibição para uma célula da tabela
12
- */
13
- export declare function getDisplayValue(col: Column, row: any, withinLimit?: boolean): string;
14
- /**
15
- * Verifica se um valor é string
16
- */
17
- export declare function isString(value: any): boolean;
18
- /**
19
- * TrackBy function para colunas
20
- */
21
- export declare function trackByProperty(_index: number, col: Column): string;
22
- /**
23
- * Gera uma chave única para identificar uma imagem em carregamento
24
- */
25
- export declare function getImageKey(row: any, col: Column): string;
1
+ import { Column } from '../types/Table';
2
+ /**
3
+ * Obtém o valor aninhado de um objeto dado um caminho (ex: 'user.address.city')
4
+ */
5
+ export declare function getNestedValue(obj: any, path: string): any;
6
+ /**
7
+ * Formata um array de objetos em uma string com valores separados por vírgula
8
+ */
9
+ export declare function formatArrayValue(array: any[], field: string): string;
10
+ /**
11
+ * Obtém o valor de exibição para uma célula da tabela
12
+ */
13
+ export declare function getDisplayValue(col: Column, row: any, withinLimit?: boolean): string;
14
+ /**
15
+ * Verifica se um valor é string
16
+ */
17
+ export declare function isString(value: any): boolean;
18
+ /**
19
+ * TrackBy function para colunas
20
+ */
21
+ export declare function trackByProperty(_index: number, col: Column): string;
22
+ /**
23
+ * Gera uma chave única para identificar uma imagem em carregamento
24
+ */
25
+ export declare function getImageKey(row: any, col: Column): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-firebase-table-kxp",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Uma biblioteca Angular poderosa para criar tabelas dinâmicas com integração completa ao Firebase Firestore",
5
5
  "keywords": [
6
6
  "angular",
package/public-api.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- export * from './lib/ng-firebase-table-kxp.module';
2
- export * from './lib/ng-firebase-table-kxp.service';
3
- export * from './lib/ng-firebase-table-kxp.component';
4
- export * from './lib/components/table/table.component';
5
- export * from './lib/components/table-tabs/table-tabs.component';
6
- export * from './lib/components/table-tooltip/table-tooltip.component';
7
- export * from './lib/services/table.service';
8
- export * from './lib/services/filter.service';
9
- export * from './lib/services/tooltip.service';
10
- export * from './lib/services/pagination.service';
11
- export * from './lib/types/Table';
12
- export * from './lib/utils/table.utils';
1
+ export * from './lib/ng-firebase-table-kxp.module';
2
+ export * from './lib/ng-firebase-table-kxp.service';
3
+ export * from './lib/ng-firebase-table-kxp.component';
4
+ export * from './lib/components/table/table.component';
5
+ export * from './lib/components/table-tabs/table-tabs.component';
6
+ export * from './lib/components/table-tooltip/table-tooltip.component';
7
+ export * from './lib/services/table.service';
8
+ export * from './lib/services/filter.service';
9
+ export * from './lib/services/tooltip.service';
10
+ export * from './lib/services/pagination.service';
11
+ export * from './lib/types/Table';
12
+ export * from './lib/utils/table.utils';