@fctc/sme-widget-ui 4.1.10-beta.5 → 4.1.10-beta.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.
@@ -0,0 +1,496 @@
1
+ import * as React$1 from 'react';
2
+ import React__default, { Dispatch, SetStateAction } from 'react';
3
+ import { LoginProps, IInputFieldProps } from './types.js';
4
+ import 'zod';
5
+
6
+ interface IPaginationProps {
7
+ totalCount: number;
8
+ pageSize: number;
9
+ siblingCount?: number;
10
+ currentPage: number;
11
+ }
12
+
13
+ declare const usePagination: ({ totalCount, pageSize, siblingCount, currentPage, }: IPaginationProps) => (number | string)[];
14
+
15
+ declare const PaginationView: (props: any) => JSX.Element | null;
16
+
17
+ interface ColEmptyGroup {
18
+ fromStart: number;
19
+ fromEnd: number;
20
+ }
21
+ interface TableGroupControllerReturn {
22
+ onExpandChildGroup: () => void;
23
+ colEmptyGroup: ColEmptyGroup;
24
+ isShowGroup: boolean;
25
+ isDataGroupFetched: boolean;
26
+ isDataPlaceHolder: any;
27
+ nameGroupWithCount: string;
28
+ columnsGroup: any[];
29
+ rowsGroup: any[];
30
+ model: string;
31
+ level: number;
32
+ specification: string;
33
+ context: Record<string, any>;
34
+ checkedAll: boolean;
35
+ isDisplayCheckbox: boolean;
36
+ selectedRowKeysRef: React.MutableRefObject<number[]>;
37
+ dataGroup: any;
38
+ pageGroup: number;
39
+ setPageGroup: Dispatch<SetStateAction<number>>;
40
+ typeTableGroup?: string;
41
+ }
42
+ interface TableGroupControllerProps {
43
+ columns: any;
44
+ row: any;
45
+ model: string;
46
+ viewData: any;
47
+ level: number;
48
+ specification: any;
49
+ context: Record<string, any>;
50
+ checkedAll: boolean;
51
+ groupByList?: any;
52
+ setSelectedRowKeys?: (selectedRowKeys: any) => void;
53
+ }
54
+ interface TableBodyProps {
55
+ rows?: any;
56
+ columns?: any;
57
+ isDisplayCheckbox?: any;
58
+ viewData?: any;
59
+ model?: any;
60
+ specification?: any;
61
+ context?: any;
62
+ onClickRow?: any;
63
+ typeTable?: any;
64
+ renderField?: any;
65
+ rootField?: any;
66
+ handleCheckBoxSingle?: any;
67
+ level?: any;
68
+ checkedAll?: any;
69
+ selectedRowKeysRef?: any;
70
+ isAutoSelect?: any;
71
+ setIsAutoSelect?: any;
72
+ onAddRow?: any;
73
+ onRemoveRow?: any;
74
+ checked?: any;
75
+ isForm?: any;
76
+ typeCo?: any;
77
+ setSelectedRowKeys?: any;
78
+ selectedRowKeys?: any;
79
+ tableGroupController?: any;
80
+ groupByList?: any;
81
+ isEditTable?: boolean;
82
+ isDisplayOptionalColumns?: boolean;
83
+ }
84
+ declare const TableBody: (props: TableBodyProps) => JSX.Element;
85
+
86
+ declare const TableFilter: ({ columns, onToggleColumnOptional }: any) => JSX.Element;
87
+
88
+ interface TableFooterProps {
89
+ rows?: any;
90
+ onAddRow?: any;
91
+ }
92
+ declare const TableFooter: ({ onAddRow, rows }: TableFooterProps) => JSX.Element;
93
+
94
+ interface TableGroupProps {
95
+ indexRow: number;
96
+ rows: any[];
97
+ columns: any[];
98
+ row: Record<string, any>;
99
+ model: string;
100
+ viewData: any;
101
+ level: number;
102
+ specification: string;
103
+ context: Record<string, any>;
104
+ checkedAll: boolean;
105
+ isDisplayCheckbox: boolean;
106
+ selectedRowKeysRef: React.MutableRefObject<number[]>;
107
+ renderField?: ({ row, col, indexRow, onChangeData, rootField, }: {
108
+ row: any;
109
+ col: any;
110
+ indexRow: any;
111
+ onChangeData: any;
112
+ rootField?: any;
113
+ }) => React.ReactNode;
114
+ isAutoSelect?: boolean;
115
+ setIsAutoSelect?: any;
116
+ tableGroupController: (props: TableGroupControllerProps) => TableGroupControllerReturn;
117
+ groupByList?: any;
118
+ selectedRowKeys?: any;
119
+ setSelectedRowKeys?: (selectedRowKeys: any) => void;
120
+ onClickRow?: any;
121
+ isDisplayOptionalColumns?: boolean;
122
+ }
123
+ declare const TableGroup: (props: TableGroupProps) => JSX.Element;
124
+
125
+ interface TableHeadProps {
126
+ handleCheckBoxAll?: any;
127
+ columns?: any;
128
+ isDisplayCheckbox?: any;
129
+ checkedAll?: any;
130
+ onToggleColumnOptional?: any;
131
+ isDisplayOptionalColumns?: boolean;
132
+ onRemoveRow?: any;
133
+ table?: any;
134
+ }
135
+ declare const TableHead: (props: TableHeadProps) => JSX.Element;
136
+
137
+ declare const Row: (props: any) => JSX.Element;
138
+
139
+ declare const EmptyTable: () => JSX.Element;
140
+
141
+ declare const Login: React__default.FC<LoginProps>;
142
+
143
+ declare const Search: ({ removeSearchItems, selectedTags, filterBy, setFilterBy, searchString, onSearchString, handleAddTagSearch, searchBy, groupBy, showFiltersGroups, setGroupBy, setSelectedRowKeys, setDomainList, setPage, fieldsList, viewData, context, aid, selectedRowKeys, domainSearch, evalJSONContext, clearSearch, onKeyDown, handleMouseEnter, handleMouseLeave, hoveredIndexSearchList, }: any) => JSX.Element;
144
+
145
+ interface IActiveBadgeProps extends IInputFieldProps {
146
+ type: any;
147
+ }
148
+
149
+ declare const ActiveBadgeField: (props: IActiveBadgeProps) => JSX.Element;
150
+
151
+ interface IAvatarProps extends IInputFieldProps {
152
+ fullName?: string;
153
+ id?: string | number;
154
+ size?: number;
155
+ textColor?: string;
156
+ aid?: string;
157
+ allowShowDetail?: boolean;
158
+ avatarSrc?: string;
159
+ stringToColor?: any;
160
+ }
161
+
162
+ declare const AvatarField: (props: IAvatarProps) => JSX.Element;
163
+
164
+ interface IBinaryFieldProps extends IInputFieldProps {
165
+ placeHolderImage?: any;
166
+ onUploadFile: (formData: FormData) => string;
167
+ onDownload?: (url: string, filename?: string) => void;
168
+ onDeleteFile?: () => void;
169
+ url?: string;
170
+ fileInfor?: {
171
+ type?: string;
172
+ date?: string;
173
+ size?: string;
174
+ };
175
+ }
176
+
177
+ declare const BinaryField: (props: IBinaryFieldProps) => JSX.Element;
178
+
179
+ interface IButtonBadgeProps extends IInputFieldProps {
180
+ selection?: [string | number, string][] | any;
181
+ 'decoration-success'?: any;
182
+ 'decoration-info'?: any;
183
+ 'decoration-danger'?: any;
184
+ 'decoration-warning'?: any;
185
+ 'decoration-purpled'?: any;
186
+ 'decoration-oranged'?: any;
187
+ 'decoration-info-light'?: any;
188
+ 'decoration-browned'?: any;
189
+ domainHelper?: any;
190
+ class?: string;
191
+ }
192
+
193
+ declare const ButtonBadgeField: (props: IButtonBadgeProps) => JSX.Element | null;
194
+
195
+ interface ICharFieldProps extends IInputFieldProps {
196
+ trim?: boolean;
197
+ max?: string;
198
+ min?: string;
199
+ digit?: string;
200
+ special?: string;
201
+ upcase?: string;
202
+ regex?: any;
203
+ }
204
+
205
+ declare const CharField: React__default.FC<ICharFieldProps>;
206
+
207
+ declare const SecureField: React__default.FC<ICharFieldProps>;
208
+
209
+ declare const CheckboxField: React__default.FC<IInputFieldProps>;
210
+
211
+ interface IColorWrapperProps {
212
+ savePickColor: any;
213
+ defaultColor: any;
214
+ colors: any;
215
+ }
216
+ interface IColorFieldProps extends IInputFieldProps {
217
+ savePickColor: any;
218
+ }
219
+
220
+ declare const ColorField: (props: IColorFieldProps) => JSX.Element;
221
+
222
+ declare const ColorWrapper: (props: IColorWrapperProps) => JSX.Element;
223
+
224
+ interface ICopyLinkButtonProps extends IInputFieldProps {
225
+ isCopied: any;
226
+ handleCopyToClipboard: any;
227
+ propValue: any;
228
+ maskingValue: any;
229
+ }
230
+
231
+ declare const CopyLinkButtonField: (props: ICopyLinkButtonProps) => JSX.Element;
232
+
233
+ interface IDateFieldProps extends IInputFieldProps {
234
+ showTime: boolean;
235
+ context?: any;
236
+ min?: any;
237
+ formValues?: any;
238
+ max?: any;
239
+ viewData?: any;
240
+ }
241
+
242
+ declare const DateField: (props: IDateFieldProps) => JSX.Element;
243
+
244
+ interface IDownLoadBinary {
245
+ handleFileDownload: any;
246
+ }
247
+
248
+ declare const DownLoadBinaryField: (props: IDownLoadBinary) => JSX.Element;
249
+
250
+ interface IDownloadFileProps extends IInputFieldProps {
251
+ inputId: any;
252
+ file: any;
253
+ handleFileChange: any;
254
+ handleFileDownload: any;
255
+ }
256
+
257
+ declare const DownloadFileField: (props: IDownloadFileProps) => JSX.Element;
258
+
259
+ interface TDropdownSelectorProps<T> {
260
+ options: T[];
261
+ selectedValue: {
262
+ label: string;
263
+ icon?: any;
264
+ };
265
+ onSelect: (value: T) => void;
266
+ renderItem: (item: T) => JSX.Element | string;
267
+ className?: string;
268
+ buttonClassName?: string;
269
+ dropdownClassName?: string;
270
+ useClickOutside?: any;
271
+ }
272
+
273
+ declare const DropdownField: <T>(props: TDropdownSelectorProps<T>) => JSX.Element;
274
+
275
+ declare const FeeField: (props: IInputFieldProps) => JSX.Element;
276
+
277
+ declare const FloatField: (props: IInputFieldProps) => JSX.Element;
278
+
279
+ declare const FloatTimeField: React__default.FC<IInputFieldProps>;
280
+
281
+ declare const HtmlField: (props: IInputFieldProps) => JSX.Element;
282
+
283
+ interface ImageFieldProps extends IInputFieldProps {
284
+ baseURL?: string;
285
+ }
286
+
287
+ declare const ImageField: (props: ImageFieldProps) => JSX.Element | null;
288
+
289
+ interface IMany2ManyTagsProps extends IInputFieldProps {
290
+ options: any[];
291
+ customNoOptionsMessage: any;
292
+ transfer: any;
293
+ isUser: any;
294
+ stringToColor?: any;
295
+ fetchMoreOptions?: any;
296
+ handleSelectChange?: any;
297
+ isFetching?: any;
298
+ domainObject?: any;
299
+ setIsShowModalMany2Many?: any;
300
+ setInputValue?: any;
301
+ setDomainObject?: any;
302
+ }
303
+
304
+ declare const Many2ManyTagField: (props: IMany2ManyTagsProps) => JSX.Element;
305
+
306
+ interface IMonetaryProps extends IInputFieldProps {
307
+ placeholder?: string;
308
+ symbol?: string;
309
+ }
310
+
311
+ declare const MonetaryField: (props: IMonetaryProps) => JSX.Element;
312
+
313
+ declare const PaidBadgedField: () => JSX.Element;
314
+
315
+ interface IPriorityFieldProps extends IInputFieldProps {
316
+ savePriorities?: any;
317
+ id?: number | string;
318
+ viewData?: any;
319
+ selection?: any;
320
+ }
321
+ interface IRatingStarProps extends IInputFieldProps {
322
+ label: string;
323
+ priorities: [number | string, string][];
324
+ onSelectPriority: (priority: {
325
+ value: number;
326
+ resetPriority?: () => void;
327
+ }) => void;
328
+ id: string | number | undefined;
329
+ }
330
+
331
+ declare const PriorityField: (props: IPriorityFieldProps) => JSX.Element;
332
+
333
+ declare const RatingStarField: (props: IRatingStarProps) => JSX.Element;
334
+
335
+ interface IRadioGroupProps extends IInputFieldProps {
336
+ placeholder?: string;
337
+ selection?: [string | number, string][] | any;
338
+ setValue?: any;
339
+ }
340
+
341
+ declare const RadioGroupField: (props: IRadioGroupProps) => JSX.Element | null;
342
+
343
+ declare const RemainingDaysField: (props: IInputFieldProps) => JSX.Element | null;
344
+
345
+ interface ISelectDropdownProps extends IInputFieldProps {
346
+ selection?: [string | number, string][] | any;
347
+ }
348
+
349
+ declare const SelectDropdownField: (props: ISelectDropdownProps) => JSX.Element;
350
+
351
+ declare const TextAreaField: (props: IInputFieldProps) => JSX.Element;
352
+
353
+ declare const ToggleButtonField: (props: IInputFieldProps) => JSX.Element;
354
+
355
+ declare const IntegerField: (props: IInputFieldProps) => JSX.Element;
356
+
357
+ interface IStatusDropdownFieldProps extends IInputFieldProps {
358
+ selection?: [string | number, string][] | any;
359
+ state?: string | undefined;
360
+ buttonRef: any;
361
+ isOpen: any;
362
+ setIsOpen: any;
363
+ handleClick: any;
364
+ colors: any;
365
+ }
366
+
367
+ declare const StatusDropdownField: (props: IStatusDropdownFieldProps) => JSX.Element;
368
+
369
+ interface Many2ManyProps extends IInputFieldProps {
370
+ aid?: number | null;
371
+ title?: string;
372
+ onClose?: any;
373
+ onChoose?: any;
374
+ onAddNew?: any;
375
+ isDisplayCheckbox?: boolean;
376
+ onAddRow?: Function;
377
+ evalJSONContext?: any;
378
+ many2manyController?: any;
379
+ renderTable?: any;
380
+ model?: any;
381
+ }
382
+
383
+ declare const Many2ManyField: (props: Many2ManyProps) => React$1.ReactPortal;
384
+
385
+ interface Many2OneProps extends IInputFieldProps {
386
+ menuList?: any;
387
+ handleChooseRecord?: any;
388
+ handleClose?: any;
389
+ selectedRowKeys?: any;
390
+ allowShowDetail?: any;
391
+ index?: any;
392
+ contextObject?: any;
393
+ renderDetail?: any;
394
+ isShowModalMany2Many?: boolean;
395
+ initValue?: any;
396
+ tempSelectedOption?: any;
397
+ options?: any;
398
+ fetchMoreOptions?: any;
399
+ handleSelectChange?: any;
400
+ isFetching?: any;
401
+ domainObject?: any;
402
+ setIsShowModalMany2Many?: any;
403
+ setInputValue?: any;
404
+ setDomainObject?: any;
405
+ listOptions?: any;
406
+ }
407
+
408
+ declare const Many2OneField: (props: Many2OneProps) => JSX.Element;
409
+
410
+ interface IDurationProps extends IInputFieldProps {
411
+ dataResponse: any;
412
+ handleClick: any;
413
+ disabled: any;
414
+ modelStatus: any;
415
+ setModalStatus: any;
416
+ }
417
+
418
+ declare const StatusbarDurationField: (props: IDurationProps) => JSX.Element;
419
+
420
+ interface IOptionProps extends IInputFieldProps {
421
+ selection?: [string | number, string][] | any;
422
+ }
423
+
424
+ declare const StatusBarOptionField: (props: IOptionProps) => JSX.Element;
425
+
426
+ declare const DateOptionField: (props: IInputFieldProps) => JSX.Element;
427
+
428
+ declare const Many2manyBinaryField: React$1.MemoExoticComponent<(props: any) => JSX.Element>;
429
+
430
+ type Item = {
431
+ name: string;
432
+ type: string;
433
+ size: number;
434
+ url: string;
435
+ source: 'upload' | 'link' | 'value';
436
+ };
437
+
438
+ interface UrlDownloadType extends IInputFieldProps {
439
+ action?: any;
440
+ }
441
+
442
+ declare const UrlDownload: ({ value, action }: UrlDownloadType) => JSX.Element;
443
+
444
+ interface IStatusSingleFieldProps extends IInputFieldProps {
445
+ selection?: [string | number, string][] | any;
446
+ }
447
+
448
+ declare const StatusSingle: ({ selection, defaultValue, }: IStatusSingleFieldProps) => JSX.Element;
449
+
450
+ interface MiniQrType extends IInputFieldProps {
451
+ maskingValue?: any;
452
+ string?: any;
453
+ class?: any;
454
+ handleCopyToClipboard?: any;
455
+ isCopied?: any;
456
+ }
457
+
458
+ declare const MiniQRLink: (props: MiniQrType) => JSX.Element;
459
+
460
+ interface CountdownProps {
461
+ value: string;
462
+ string?: string;
463
+ mode?: "default" | "seconds";
464
+ overdue_string?: string;
465
+ }
466
+
467
+ declare const Countdown: React__default.FC<CountdownProps>;
468
+
469
+ interface IProviderEinvoicesProps extends IInputFieldProps {
470
+ listDataCard?: any;
471
+ }
472
+
473
+ declare const ProviderEinvoice: (props: IProviderEinvoicesProps) => JSX.Element;
474
+
475
+ declare const ModalConfirm: ({ name, isShowModal, onClick, onClose, title, content, isLoading, }: {
476
+ name: "delete" | "duplicate" | "archive" | "unarchive";
477
+ isShowModal: boolean;
478
+ isLoading?: boolean;
479
+ onClick: () => void;
480
+ onClose: () => void;
481
+ title?: string;
482
+ content?: React.ReactNode;
483
+ }) => JSX.Element;
484
+
485
+ declare const ModalDetail: ({ title, model, idForm, aid, renderDetail, context, }: any) => React$1.ReactPortal;
486
+
487
+ declare const ModalLayer: ({ isOpen, onClose, title, children, }: {
488
+ isOpen: boolean;
489
+ onClose: () => void;
490
+ title?: string;
491
+ children: React__default.ReactNode;
492
+ }) => JSX.Element;
493
+
494
+ declare const LayerLoading: () => JSX.Element;
495
+
496
+ export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, type CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FloatField, FloatTimeField, HtmlField, type IActiveBadgeProps, type IAvatarProps, type IBinaryFieldProps, type IButtonBadgeProps, type ICharFieldProps, type IColorFieldProps, type IColorWrapperProps, type ICopyLinkButtonProps, type IDateFieldProps, type IDownLoadBinary, type IDownloadFileProps, type IDurationProps, type IMany2ManyTagsProps, type IMonetaryProps, type IOptionProps, type IPaginationProps, type IPriorityFieldProps, type IProviderEinvoicesProps, type IRadioGroupProps, type IRatingStarProps, type ISelectDropdownProps, type IStatusDropdownFieldProps, type IStatusSingleFieldProps, ImageField, IntegerField, type Item, LayerLoading, Login, Many2ManyField, type Many2ManyProps, Many2ManyTagField, Many2OneField, type Many2OneProps, Many2manyBinaryField, MiniQRLink, type MiniQrType, ModalConfirm, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, ProviderEinvoice, RadioGroupField, RatingStarField, RemainingDaysField, Row, Search, SecureField, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusSingle, StatusbarDurationField, type TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, UrlDownload, type UrlDownloadType, usePagination };