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.
- package/README.md +602 -602
- package/esm2020/lib/components/table/table.component.mjs +798 -790
- package/esm2020/lib/ng-firebase-table-kxp.component.mjs +11 -11
- package/esm2020/lib/ng-firebase-table-kxp.module.mjs +74 -74
- package/esm2020/lib/ng-firebase-table-kxp.service.mjs +14 -14
- package/esm2020/lib/services/table.service.mjs +905 -905
- package/esm2020/lib/types/Table.mjs +2 -2
- package/esm2020/ng-firebase-table-kxp.mjs +4 -4
- package/esm2020/public-api.mjs +15 -15
- package/fesm2015/ng-firebase-table-kxp.mjs +1771 -1763
- package/fesm2015/ng-firebase-table-kxp.mjs.map +1 -1
- package/fesm2020/ng-firebase-table-kxp.mjs +1744 -1736
- package/fesm2020/ng-firebase-table-kxp.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/components/table/table.component.d.ts +112 -112
- package/lib/ng-firebase-table-kxp.component.d.ts +5 -5
- package/lib/ng-firebase-table-kxp.module.d.ts +21 -21
- package/lib/ng-firebase-table-kxp.service.d.ts +6 -6
- package/lib/services/table.service.d.ts +74 -74
- package/lib/types/Table.d.ts +139 -139
- package/package.json +1 -1
- package/public-api.d.ts +6 -6
package/lib/types/Table.d.ts
CHANGED
|
@@ -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
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';
|