@esvndev/es-react-import-export 1.0.7 → 1.0.8

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.
@@ -81,13 +81,6 @@ export interface IFPropsDetail_Lite {
81
81
  formatNumber?: IFNumberFormat;
82
82
  getExcelTemplate?: any;
83
83
  }
84
- export interface IFDataExcel {
85
- step: number;
86
- file?: any;
87
- sheetId?: string;
88
- headerRow?: number;
89
- dataMap: IFDataMapExcel[];
90
- }
91
84
  export interface IFDataMapExcel {
92
85
  field: string;
93
86
  headerDefault: string[];
package/dist/index.d.ts CHANGED
@@ -1,25 +1,77 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { Control, UseFormWatch, FieldErrors, UseFormSetValue, UseFormGetValues } from 'react-hook-form';
3
2
  import { Dispatch } from 'react';
3
+ import { InputType } from 'reactstrap/types/lib/Input';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
 
5
- declare const useOnClickOutside: (ref: any, handler: any) => void;
6
- declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
7
- declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
8
- declare const isNullOrUndefined: (d: any) => boolean;
9
- declare const generateUUID: () => string;
10
- /**
11
- * format chuỗi kí tự số
12
- * @param str chuỗi số cần format
13
- * @param decimalSeparator kí tự thập phân
14
- * @param thousandSeparator kí tự phân cách hàng nghìn
15
- * @param fraction số kí tự thập phân
16
- * @param isDone đã nhập xong
17
- * @returns
18
- */
19
- declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
20
- declare const roundNumber: (num: number, fraction: number) => number;
21
- declare const formatDateTime: (data: any, format?: string) => string;
22
-
6
+ interface IFDataProps$1 {
7
+ open: boolean;
8
+ children: any;
9
+ toggleSidebar: any;
10
+ width?: string | number;
11
+ keyboard?: boolean;
12
+ hiddenBackground?: boolean;
13
+ hiddenFullScreenButton?: boolean;
14
+ }
15
+ interface IFDataProps$1 {
16
+ open: boolean;
17
+ children: any;
18
+ toggleSidebar: any;
19
+ width?: string | number;
20
+ keyboard?: boolean;
21
+ hiddenBackground?: boolean;
22
+ hiddenFullScreenButton?: boolean;
23
+ }
24
+ type IFColumnSelectTable = {
25
+ field: string;
26
+ headerText: string;
27
+ visible?: boolean;
28
+ textAlign?: 'left' | 'right' | 'center';
29
+ type?: 'text' | 'numeric' | 'date' | 'datetime';
30
+ template?: any;
31
+ typeCondition?: any;
32
+ fraction?: number;
33
+ width?: number;
34
+ maxWidth?: number;
35
+ minWidth?: number;
36
+ };
37
+ interface ISelectTableBox {
38
+ id?: string;
39
+ name: string;
40
+ control: any;
41
+ defaultValue?: any;
42
+ isMulti?: boolean;
43
+ isLabel?: boolean;
44
+ inLine?: boolean;
45
+ labelComponent?: any;
46
+ options: any[];
47
+ loadOptions?: any;
48
+ placeholder?: string;
49
+ disabled?: boolean;
50
+ label?: any;
51
+ labelSize?: any;
52
+ required?: boolean;
53
+ errors?: any;
54
+ cssClass?: string;
55
+ callback?: any;
56
+ confirmHandle?: any;
57
+ columns?: IFColumnSelectTable[];
58
+ handleAddNew?: any;
59
+ fieldLabel?: string;
60
+ fieldValue?: string;
61
+ isClearable?: boolean;
62
+ noHeader?: boolean;
63
+ desciptionLabel?: string;
64
+ classLabel?: string;
65
+ }
66
+ interface IPropLabel {
67
+ id: string;
68
+ required?: boolean;
69
+ label: string;
70
+ name: string;
71
+ classLabel?: string;
72
+ isLabel?: boolean;
73
+ desciptionLabel?: string;
74
+ }
23
75
  interface IFPropsDetail_Lite {
24
76
  control?: Control<IFDataExcel>;
25
77
  watch?: UseFormWatch<IFDataExcel>;
@@ -49,13 +101,6 @@ interface IFDataExcel {
49
101
  headerRow?: number;
50
102
  dataMap: IFDataMapExcel[];
51
103
  }
52
- interface IFDataExcel {
53
- step: number;
54
- file?: any;
55
- sheetId?: string;
56
- headerRow?: number;
57
- dataMap: IFDataMapExcel[];
58
- }
59
104
  interface IFDataMapExcel {
60
105
  field: string;
61
106
  headerDefault: string[];
@@ -82,6 +127,115 @@ type IFNumberFormat = {
82
127
  prefixNegative?: string;
83
128
  suffixNegative?: string;
84
129
  };
130
+ interface IFDataProps_ModelHeader {
131
+ title: string;
132
+ handleModal?: any;
133
+ typeModal?: string;
134
+ component?: any;
135
+ }
136
+ interface IFDataStyleSetting {
137
+ color?: string;
138
+ backgroundColor?: string;
139
+ fontFamily?: string;
140
+ fontSize?: number;
141
+ row?: number;
142
+ bold?: boolean;
143
+ italic?: boolean;
144
+ underline?: boolean;
145
+ }
146
+ interface IFGetInfoSheetApiParams {
147
+ file: any;
148
+ }
149
+ interface IFGetInfoColumnApiParams {
150
+ file: any;
151
+ headerRow: number;
152
+ sheetId: string;
153
+ }
154
+ interface IFExportExcel {
155
+ columns: any[];
156
+ keyword?: string;
157
+ id?: string;
158
+ countRowHeader: number;
159
+ title: string;
160
+ subtitle: string;
161
+ organizationId: string;
162
+ filter: string;
163
+ order: string;
164
+ }
165
+ interface IFReportExportExcel extends IFExportExcel {
166
+ fieldSums: string[];
167
+ groupby: string[];
168
+ style: IFDataExportExcelSetting;
169
+ }
170
+ interface IFLastTMSReportApi {
171
+ resourceCode: string;
172
+ organizationId: string;
173
+ }
174
+ interface IFDataExportExcelSetting {
175
+ title: IFDataStyleSetting;
176
+ subtitle: IFDataStyleSetting;
177
+ header: IFDataStyleSetting;
178
+ group1: IFDataStyleSetting;
179
+ group2: IFDataStyleSetting;
180
+ group3: IFDataStyleSetting;
181
+ content: IFDataStyleSetting;
182
+ summary: IFDataStyleSetting;
183
+ textTitle?: string;
184
+ textSubtitle?: string;
185
+ }
186
+ interface IPropLabel_input {
187
+ required?: boolean;
188
+ label: string;
189
+ name: string;
190
+ isLabel?: boolean;
191
+ }
192
+ interface IFormInput {
193
+ control: any;
194
+ name: string;
195
+ label: string;
196
+ labelSize?: string;
197
+ disabled?: boolean;
198
+ callback?: any;
199
+ isLabel?: boolean;
200
+ inLine?: boolean;
201
+ confirmHandle?: any;
202
+ reverse?: boolean;
203
+ desciptionLabel?: string;
204
+ text?: string;
205
+ checked?: boolean;
206
+ }
207
+ interface IFFormInput {
208
+ id?: string;
209
+ onKeyDown: any;
210
+ dateFormat: string;
211
+ onChange: any;
212
+ className?: string;
213
+ value: Date;
214
+ }
215
+ interface IFFormInput_InputNumber {
216
+ control: any;
217
+ name: string;
218
+ id?: string;
219
+ type?: InputType;
220
+ label: string;
221
+ labelSize?: string;
222
+ required?: boolean;
223
+ errors?: any;
224
+ classes?: string;
225
+ min?: number;
226
+ max?: number;
227
+ fractionCurrency?: number;
228
+ disabled?: boolean;
229
+ width?: number;
230
+ isLabel?: boolean;
231
+ inLine?: boolean;
232
+ placeholder?: string;
233
+ thousandSeparator?: string;
234
+ decimalSeparator?: string;
235
+ callback?: any;
236
+ allowNegative?: boolean;
237
+ fixedDecimalScale?: boolean;
238
+ }
85
239
  interface IFDataStyleSetting_Style {
86
240
  color: string;
87
241
  backgroundColor: string;
@@ -103,6 +257,68 @@ interface IFDataInputStyle {
103
257
  disabledItalic?: boolean;
104
258
  disabledUnderline?: boolean;
105
259
  }
260
+ interface IFFormInput_Style {
261
+ control: any;
262
+ name: string;
263
+ label: string;
264
+ labelSize?: string;
265
+ required?: boolean;
266
+ errors?: any;
267
+ classes?: string;
268
+ height?: number | string;
269
+ disabled?: boolean;
270
+ isLabel?: boolean;
271
+ inLine?: boolean;
272
+ placeholder?: string;
273
+ callback?: any;
274
+ tooltipText?: string;
275
+ disabledBackgroundColor?: boolean;
276
+ disabledFontFamily?: boolean;
277
+ disabledFontSize?: boolean;
278
+ disabledBold?: boolean;
279
+ disabledItalic?: boolean;
280
+ disabledUnderline?: boolean;
281
+ }
282
+ interface IFFormInput_InputText {
283
+ control: any;
284
+ name: string;
285
+ id?: string;
286
+ type?: InputType;
287
+ label: string;
288
+ labelSize?: string;
289
+ required?: boolean;
290
+ errors?: any;
291
+ classes?: string;
292
+ height?: number | string;
293
+ min?: number;
294
+ max?: number;
295
+ disabled?: boolean;
296
+ row?: number;
297
+ isLabel?: boolean;
298
+ inLine?: boolean;
299
+ autoFocus?: boolean;
300
+ placeholder?: string;
301
+ callback?: any;
302
+ readOnly?: boolean;
303
+ }
304
+
305
+ declare const useOnClickOutside: (ref: any, handler: any) => void;
306
+ declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
307
+ declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
308
+ declare const isNullOrUndefined: (d: any) => boolean;
309
+ declare const generateUUID: () => string;
310
+ /**
311
+ * format chuỗi kí tự số
312
+ * @param str chuỗi số cần format
313
+ * @param decimalSeparator kí tự thập phân
314
+ * @param thousandSeparator kí tự phân cách hàng nghìn
315
+ * @param fraction số kí tự thập phân
316
+ * @param isDone đã nhập xong
317
+ * @returns
318
+ */
319
+ declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
320
+ declare const roundNumber: (num: number, fraction: number) => number;
321
+ declare const formatDateTime: (data: any, format?: string) => string;
106
322
 
107
323
  declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
108
324
 
@@ -120,4 +336,4 @@ declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, window
120
336
 
121
337
  declare const ImportExcelComponent: (props: IFPropsDetail) => react_jsx_runtime.JSX.Element;
122
338
 
123
- export { ExportExcelComponent, ImportExcelComponent, InputStyleComponent, checkDecimalSeparator, checkThousandSeparator, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, roundNumber, useOnClickOutside };
339
+ export { ExportExcelComponent, type IFColumnSelectTable, type IFDataExcel, type IFDataExportExcelSetting, type IFDataInputStyle, type IFDataMapExcel, type IFDataProps$1 as IFDataProps, type IFDataProps_ModelHeader, type IFDataStyleSetting, type IFDataStyleSetting_Style, type IFExportExcel, type IFFormInput, type IFFormInput_InputNumber, type IFFormInput_InputText, type IFFormInput_Style, type IFGetInfoColumnApiParams, type IFGetInfoSheetApiParams, type IFLastTMSReportApi, type IFNumberFormat, type IFPropsDetail, type IFPropsDetail_Lite, type IFReportExportExcel, type IFormInput, type IPropLabel, type IPropLabel_input, type ISelectTableBox, ImportExcelComponent, InputStyleComponent, checkDecimalSeparator, checkThousandSeparator, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, roundNumber, useOnClickOutside };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esvndev/es-react-import-export",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",