itrm-components 1.0.14 → 1.0.15
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/dist/index.d.ts +231 -0
- package/dist/index.es.js +92339 -289
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +29478 -11
- package/dist/index.umd.js.map +1 -1
- package/dist/itrm-components.css +1 -1
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,231 @@
|
|
|
1
|
+
import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
3
|
+
import { AxiosRequestConfig } from 'axios';
|
|
1
4
|
import { default as default_2 } from 'react';
|
|
5
|
+
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
2
6
|
import { ReactNode } from 'react';
|
|
7
|
+
import { StoreEnhancer } from '@reduxjs/toolkit';
|
|
8
|
+
import { ThunkDispatch } from '@reduxjs/toolkit';
|
|
9
|
+
import { Tuple } from '@reduxjs/toolkit';
|
|
10
|
+
import { UnknownAction } from '@reduxjs/toolkit';
|
|
11
|
+
|
|
12
|
+
export declare function dateFormat(timestamp: string | number): string;
|
|
13
|
+
|
|
14
|
+
export declare function dateTimeFormat(timestamp: string | number): string;
|
|
15
|
+
|
|
16
|
+
export declare function dollarFormat(value: number): string;
|
|
17
|
+
|
|
18
|
+
export declare interface IconComponentProps {
|
|
19
|
+
icon: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare function listFormat(value: string): string;
|
|
23
|
+
|
|
24
|
+
export declare function numberFormat(value: number): string;
|
|
25
|
+
|
|
26
|
+
export declare function percentageFormat(value: number): string;
|
|
27
|
+
|
|
28
|
+
export declare function requestAll(url: string, instance: AxiosInstance): Promise<any[]>;
|
|
29
|
+
|
|
30
|
+
export declare function round(value: number, decimals: number): number;
|
|
31
|
+
|
|
32
|
+
export declare const setRefreshTrigger: ActionCreatorWithPayload< {
|
|
33
|
+
key: string;
|
|
34
|
+
value: boolean;
|
|
35
|
+
}, "tables/setRefreshTrigger">;
|
|
36
|
+
|
|
37
|
+
export declare const StandardTable: React.FC<StandardTableProps>;
|
|
38
|
+
|
|
39
|
+
export declare interface StandardTableCaption {
|
|
40
|
+
title: boolean;
|
|
41
|
+
size: boolean;
|
|
42
|
+
buttons?: StandarTableCaptionButton[];
|
|
43
|
+
selector?: StandarTableSelector;
|
|
44
|
+
filterNavs?: {
|
|
45
|
+
filterOptions: any;
|
|
46
|
+
setFilter: any;
|
|
47
|
+
selectedFilter: any;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export declare interface StandardTableColumn {
|
|
52
|
+
tittle: string;
|
|
53
|
+
key: string;
|
|
54
|
+
filter?: {
|
|
55
|
+
icon?: string;
|
|
56
|
+
options: StandarTableFilterOption[];
|
|
57
|
+
};
|
|
58
|
+
class?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export declare interface StandardTableConfig {
|
|
62
|
+
columns: StandardTableColumn[];
|
|
63
|
+
optionsColumn?: StandardTableOptionsColumn;
|
|
64
|
+
data: {
|
|
65
|
+
[key: string]: StandardTableRowValue;
|
|
66
|
+
}[];
|
|
67
|
+
filters: [{
|
|
68
|
+
keyQuery: string;
|
|
69
|
+
value: string;
|
|
70
|
+
}] | [{}];
|
|
71
|
+
refreshTrigger: boolean;
|
|
72
|
+
selectedItems?: StandardTableSelectedItems;
|
|
73
|
+
download?: StandardTableDownload;
|
|
74
|
+
pagination: StandardTablePaginationProps;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare interface StandardTableDataProps {
|
|
78
|
+
automaticManagement: boolean;
|
|
79
|
+
urlConfig?: {
|
|
80
|
+
url: string;
|
|
81
|
+
formatItems: (items: any) => any;
|
|
82
|
+
headers?: AxiosRequestConfig;
|
|
83
|
+
};
|
|
84
|
+
items?: {
|
|
85
|
+
[key: string]: StandardTableRowValue;
|
|
86
|
+
}[];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export declare interface StandardTableDownload {
|
|
90
|
+
onclick: (items: {
|
|
91
|
+
[key: string]: StandardTableRowValue;
|
|
92
|
+
}[]) => void;
|
|
93
|
+
enableSelectedItemsDownloading: boolean;
|
|
94
|
+
label: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare interface StandardTableEvent {
|
|
98
|
+
item?: StandardTableRowValue;
|
|
99
|
+
table: StandardTableConfig;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare interface StandardTableOptionsColumn {
|
|
103
|
+
tittle: string;
|
|
104
|
+
filter?: (item: any, option: StandardTableOptionsColumnOption) => boolean;
|
|
105
|
+
options: StandardTableOptionsColumnOption[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export declare interface StandardTableOptionsColumnOption {
|
|
109
|
+
icon: string;
|
|
110
|
+
label?: string;
|
|
111
|
+
class?: string;
|
|
112
|
+
onclick: (item?: any) => void;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare interface StandardTablePaginationProps {
|
|
116
|
+
total: number;
|
|
117
|
+
pages: number;
|
|
118
|
+
pageSize: number;
|
|
119
|
+
currentPage: number;
|
|
120
|
+
setCurrentPage: default_2.Dispatch<default_2.SetStateAction<number>>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export declare interface StandardTableProps {
|
|
124
|
+
columns: StandardTableColumn[];
|
|
125
|
+
optionsColumn?: StandardTableOptionsColumn;
|
|
126
|
+
data: StandardTableDataProps;
|
|
127
|
+
pageSize: number;
|
|
128
|
+
tableName: string;
|
|
129
|
+
theme: StandardTableTheme;
|
|
130
|
+
selectionEnabled?: StandardTableSelectionEnabled;
|
|
131
|
+
caption?: StandardTableCaption;
|
|
132
|
+
download?: StandardTableDownload;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare interface StandardTableRowValue {
|
|
136
|
+
value: string | number;
|
|
137
|
+
class?: string;
|
|
138
|
+
format?: StandardTableRowValueFormat;
|
|
139
|
+
color?: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export declare enum StandardTableRowValueFormat {
|
|
143
|
+
DATE = "date",
|
|
144
|
+
TIME = "time",
|
|
145
|
+
DATETIME = "datetime",
|
|
146
|
+
NUMBER = "number",
|
|
147
|
+
DOLLAR = "dollar",
|
|
148
|
+
PERCENTAGE = "percentage",
|
|
149
|
+
LIST = "list"
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export declare interface StandardTableSelectedItems {
|
|
153
|
+
enabled: boolean;
|
|
154
|
+
tittleButton: string;
|
|
155
|
+
items: {
|
|
156
|
+
[key: string]: StandardTableRowValue;
|
|
157
|
+
}[];
|
|
158
|
+
sortBy?: {
|
|
159
|
+
key: string;
|
|
160
|
+
order: 'asc' | 'desc';
|
|
161
|
+
};
|
|
162
|
+
manageSelectedItems?: (items?: any) => void;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export declare interface StandardTableSelectionEnabled {
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
manageSelectedItems: (items?: any) => void;
|
|
168
|
+
titleButton: string;
|
|
169
|
+
sortBy?: {
|
|
170
|
+
key: string;
|
|
171
|
+
order: 'asc' | 'desc';
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export declare interface StandardTableStore {
|
|
176
|
+
tables: {
|
|
177
|
+
[key: string]: StandardTableConfig;
|
|
178
|
+
};
|
|
179
|
+
update: (key: string, value: StandardTableConfig) => void;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export declare interface StandardTableTheme {
|
|
183
|
+
default?: 'dark' | 'light';
|
|
184
|
+
class?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export declare interface StandarTableCaptionButton {
|
|
188
|
+
icon?: default_2.ReactNode;
|
|
189
|
+
label?: string;
|
|
190
|
+
onclick: () => void;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare interface StandarTableFilterOption {
|
|
194
|
+
keyQuery: string;
|
|
195
|
+
value: string | number;
|
|
196
|
+
label: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare interface StandarTableSelector {
|
|
200
|
+
options: StandarTableSelectorOption[];
|
|
201
|
+
onChange: (value: StandarTableSelectorOption) => void;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export declare interface StandarTableSelectorOption {
|
|
205
|
+
label: string;
|
|
206
|
+
value: string | number;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export declare const store: EnhancedStore<{
|
|
210
|
+
tables: TableState;
|
|
211
|
+
}, UnknownAction, Tuple<[
|
|
212
|
+
StoreEnhancer<{
|
|
213
|
+
dispatch: ThunkDispatch<{
|
|
214
|
+
tables: TableState;
|
|
215
|
+
}, undefined, UnknownAction>;
|
|
216
|
+
}>,
|
|
217
|
+
StoreEnhancer
|
|
218
|
+
]>>;
|
|
219
|
+
|
|
220
|
+
export declare interface TableState {
|
|
221
|
+
tables: {
|
|
222
|
+
[key: string]: StandardTableConfig & {
|
|
223
|
+
refreshTrigger?: boolean;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export declare function timeFormat(timestamp: string | number): string;
|
|
3
229
|
|
|
4
230
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
5
231
|
|
|
@@ -9,3 +235,8 @@ declare interface TooltipProps {
|
|
|
9
235
|
}
|
|
10
236
|
|
|
11
237
|
export { }
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
declare module '@tabler/icons-react' {
|
|
241
|
+
const IconName: any;
|
|
242
|
+
}
|