ng-firebase-table-kxp 1.0.4 → 1.0.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.
@@ -1,139 +1,139 @@
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 interface TableData {
7
- displayedColumns: Column[];
8
- filterableOptions?: FilterableOption[];
9
- collectionRef: CollectionReference<unknown>;
10
- collection: string;
11
- name: string;
12
- totalRef?: {
13
- ref: DocumentReference<unknown>;
14
- field: string;
15
- }[];
16
- download: boolean;
17
- pagination: boolean;
18
- isNotClickable?: boolean;
19
- url?: string;
20
- sortBy?: {
21
- field: string;
22
- order: OrderByDirection;
23
- };
24
- conditions?: {
25
- operator: WhereFilterOp;
26
- firestoreProperty: string;
27
- dashProperty: string | string[];
28
- }[];
29
- filterFn?: (item: any) => boolean;
30
- color?: {
31
- bg: string;
32
- text: string;
33
- };
34
- actionButton?: {
35
- label: string;
36
- routerLink: string;
37
- icon?: string;
38
- colorClass?: string;
39
- method?: (row: any, event?: any) => any;
40
- condition?: (row?: any) => boolean;
41
- };
42
- tabs?: Tab;
43
- }
44
- export interface Tab {
45
- method: (tab: any, event?: any) => any;
46
- tabsData: TabData[];
47
- }
48
- export interface TabData {
49
- label: string;
50
- counter?: number;
51
- counterClass?: string;
52
- }
53
- export interface Column {
54
- property: string;
55
- title?: string;
56
- charLimit?: number;
57
- pipe?: PipeTransform;
58
- iconClass?: {
59
- text?: string;
60
- class?: string;
61
- condition?: (row: any) => any;
62
- buttonMethod?: (row: any, event?: any) => any;
63
- }[];
64
- isSortable?: boolean;
65
- isFilterable?: boolean;
66
- isFilterableByDate?: boolean;
67
- hasLink?: boolean | string;
68
- hasDownload?: boolean | string;
69
- relation?: {
70
- collection: string;
71
- property: string;
72
- newProperty: string;
73
- };
74
- queryLength?: {
75
- collection: string;
76
- property: string;
77
- operator: WhereFilterOp;
78
- value: string;
79
- };
80
- image?: Image;
81
- method?: (row: any, event?: any) => any;
82
- filterPredicates?: string[];
83
- calculateValue?: (row: any) => any;
84
- arrayField?: string;
85
- }
86
- export interface Image {
87
- class: string;
88
- path?: string;
89
- url?: boolean;
90
- default?: string;
91
- }
92
- export interface FilterableOption {
93
- title: string;
94
- items: {
95
- property: string;
96
- value: string | boolean;
97
- label: string;
98
- }[];
99
- }
100
- export interface Pagination {
101
- batchSize: number;
102
- collection: string;
103
- doc?: {
104
- firstDoc: QueryDocumentSnapshot<any> | null;
105
- lastDoc: QueryDocumentSnapshot<any> | null;
106
- };
107
- navigation: 'reload' | 'forward' | 'backward';
108
- arrange: Arrange;
109
- conditions?: Condition[];
110
- filterFn?: (item: any) => boolean;
111
- size?: number;
112
- clientPageIndex?: number;
113
- }
114
- export interface Condition {
115
- operator: WhereFilterOp;
116
- firestoreProperty: string;
117
- dashProperty: string | string[];
118
- }
119
- export interface Arrange {
120
- filters: {
121
- arrange: 'ascending' | 'descending' | 'filter' | 'filterByDate' | 'equals' | '';
122
- filter?: {
123
- property: string;
124
- filtering: string;
125
- } | null;
126
- dateFilter?: {
127
- initial: Date;
128
- final: Date;
129
- };
130
- }[];
131
- sortBy: {
132
- field: string;
133
- order: OrderByDirection;
134
- };
135
- elementId?: {
136
- property: string;
137
- value: string;
138
- };
139
- }
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 interface TableData {
7
+ displayedColumns: Column[];
8
+ filterableOptions?: FilterableOption[];
9
+ collectionRef: CollectionReference<unknown>;
10
+ collection: string;
11
+ name: string;
12
+ totalRef?: {
13
+ ref: DocumentReference<unknown>;
14
+ field: string;
15
+ }[];
16
+ download: boolean;
17
+ pagination: boolean;
18
+ isNotClickable?: boolean;
19
+ url?: string;
20
+ sortBy?: {
21
+ field: string;
22
+ order: OrderByDirection;
23
+ };
24
+ conditions?: {
25
+ operator: WhereFilterOp;
26
+ firestoreProperty: string;
27
+ dashProperty: string | string[];
28
+ }[];
29
+ filterFn?: (item: any) => boolean;
30
+ color?: {
31
+ bg: string;
32
+ text: string;
33
+ };
34
+ actionButton?: {
35
+ label: string;
36
+ routerLink: string;
37
+ icon?: string;
38
+ colorClass?: string;
39
+ method?: (row: any, event?: any) => any;
40
+ condition?: (row?: any) => boolean;
41
+ };
42
+ tabs?: Tab;
43
+ }
44
+ export interface Tab {
45
+ method: (tab: any, event?: any) => any;
46
+ tabsData: TabData[];
47
+ }
48
+ export interface TabData {
49
+ label: string;
50
+ counter?: number;
51
+ counterClass?: string;
52
+ }
53
+ export interface Column {
54
+ property: string;
55
+ title?: string;
56
+ charLimit?: number;
57
+ pipe?: PipeTransform;
58
+ iconClass?: {
59
+ text?: string;
60
+ class?: string;
61
+ condition?: (row: any) => any;
62
+ buttonMethod?: (row: any, event?: any) => any;
63
+ }[];
64
+ isSortable?: boolean;
65
+ isFilterable?: boolean;
66
+ isFilterableByDate?: boolean;
67
+ hasLink?: boolean | string;
68
+ hasDownload?: boolean | string;
69
+ relation?: {
70
+ collection: string;
71
+ property: string;
72
+ newProperty: string;
73
+ };
74
+ queryLength?: {
75
+ collection: string;
76
+ property: string;
77
+ operator: WhereFilterOp;
78
+ value: string;
79
+ };
80
+ image?: Image;
81
+ method?: (row: any, event?: any) => any;
82
+ filterPredicates?: string[];
83
+ calculateValue?: (row: any) => any;
84
+ arrayField?: string;
85
+ }
86
+ export interface Image {
87
+ class: string;
88
+ path?: string;
89
+ url?: boolean;
90
+ default?: string;
91
+ }
92
+ export interface FilterableOption {
93
+ title: string;
94
+ items: {
95
+ property: string;
96
+ value: string | boolean;
97
+ label: string;
98
+ }[];
99
+ }
100
+ export interface Pagination {
101
+ batchSize: number;
102
+ collection: string;
103
+ doc?: {
104
+ firstDoc: QueryDocumentSnapshot<any> | null;
105
+ lastDoc: QueryDocumentSnapshot<any> | null;
106
+ };
107
+ navigation: 'reload' | 'forward' | 'backward';
108
+ arrange: Arrange;
109
+ conditions?: Condition[];
110
+ filterFn?: (item: any) => boolean;
111
+ size?: number;
112
+ clientPageIndex?: number;
113
+ }
114
+ export interface Condition {
115
+ operator: WhereFilterOp;
116
+ firestoreProperty: string;
117
+ dashProperty: string | string[];
118
+ }
119
+ export interface Arrange {
120
+ filters: {
121
+ arrange: 'ascending' | 'descending' | 'filter' | 'filterByDate' | 'equals' | '';
122
+ filter?: {
123
+ property: string;
124
+ filtering: string;
125
+ } | null;
126
+ dateFilter?: {
127
+ initial: Date;
128
+ final: Date;
129
+ };
130
+ }[];
131
+ sortBy: {
132
+ field: string;
133
+ order: OrderByDirection;
134
+ };
135
+ elementId?: {
136
+ property: string;
137
+ value: string;
138
+ };
139
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-firebase-table-kxp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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,6 +1,6 @@
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/services/table.service';
6
- export * from './lib/types/Table';
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/services/table.service';
6
+ export * from './lib/types/Table';