@fctc/sme-widget-ui 1.0.0
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 +93 -0
- package/dist/hooks.d.mts +13 -0
- package/dist/hooks.d.ts +13 -0
- package/dist/hooks.js +61 -0
- package/dist/hooks.mjs +34 -0
- package/dist/icons.d.mts +92 -0
- package/dist/icons.d.ts +92 -0
- package/dist/icons.js +2062 -0
- package/dist/icons.mjs +1999 -0
- package/dist/index.css +701 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +34678 -0
- package/dist/index.mjs +34561 -0
- package/dist/types.d.mts +59 -0
- package/dist/types.d.ts +59 -0
- package/dist/types.js +50 -0
- package/dist/types.mjs +13 -0
- package/dist/utils.d.mts +39 -0
- package/dist/utils.d.ts +39 -0
- package/dist/utils.js +4879 -0
- package/dist/utils.mjs +4855 -0
- package/dist/widgets.css +701 -0
- package/dist/widgets.d.mts +405 -0
- package/dist/widgets.d.ts +405 -0
- package/dist/widgets.js +34268 -0
- package/dist/widgets.mjs +34207 -0
- package/package.json +72 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { LoginProps, IInputFieldProps } from './types.mjs';
|
|
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 TableBodyProps {
|
|
18
|
+
rows?: any;
|
|
19
|
+
columns?: any;
|
|
20
|
+
isDisplayCheckbox?: any;
|
|
21
|
+
viewData?: any;
|
|
22
|
+
model?: any;
|
|
23
|
+
specification?: any;
|
|
24
|
+
context?: any;
|
|
25
|
+
onClickRow?: any;
|
|
26
|
+
typeTable?: any;
|
|
27
|
+
renderField?: any;
|
|
28
|
+
rootField?: any;
|
|
29
|
+
handleCheckBoxSingle?: any;
|
|
30
|
+
level?: any;
|
|
31
|
+
checkedAll?: any;
|
|
32
|
+
selectedRowKeysRef?: any;
|
|
33
|
+
isAutoSelect?: any;
|
|
34
|
+
setIsAutoSelect?: any;
|
|
35
|
+
onAddRow?: any;
|
|
36
|
+
onRemoveRow?: any;
|
|
37
|
+
checked?: any;
|
|
38
|
+
isForm?: any;
|
|
39
|
+
typeCo?: any;
|
|
40
|
+
}
|
|
41
|
+
declare const TableBody: (props: TableBodyProps) => JSX.Element;
|
|
42
|
+
|
|
43
|
+
declare const TableFilter: ({ columns, onToggleColumnOptional }: any) => JSX.Element;
|
|
44
|
+
|
|
45
|
+
declare const TableFooter: ({ onAddRow, rows }: any) => JSX.Element;
|
|
46
|
+
|
|
47
|
+
declare const TableGroup: (props: any) => JSX.Element;
|
|
48
|
+
|
|
49
|
+
interface TableHeadProps {
|
|
50
|
+
handleCheckBoxAll: any;
|
|
51
|
+
columns: any;
|
|
52
|
+
isDisplayCheckbox: any;
|
|
53
|
+
checkedAll: any;
|
|
54
|
+
onToggleColumnOptional: any;
|
|
55
|
+
onRemoveRow?: any;
|
|
56
|
+
}
|
|
57
|
+
declare const TableHead: (props: TableHeadProps) => JSX.Element;
|
|
58
|
+
|
|
59
|
+
declare const Row: (props: any) => JSX.Element;
|
|
60
|
+
|
|
61
|
+
declare const Login: React__default.FC<LoginProps>;
|
|
62
|
+
|
|
63
|
+
declare const Search: ({ removeSearchItems, selectedTags, filterBy, setFilterBy, searchString, onSearchString, handleAddTagSearch, searchBy, groupBy, showFiltersGroups, setGroupBy, fields, setSelectedRowKeys, setDomain, setPage, fieldsList, viewData, actionContext, aid, selectedRowKeys, domain, evalJSONContext }: any) => JSX.Element;
|
|
64
|
+
|
|
65
|
+
interface IActiveBadgeProps extends IInputFieldProps {
|
|
66
|
+
type: any;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare const ActiveBadge: (props: IActiveBadgeProps) => JSX.Element;
|
|
70
|
+
|
|
71
|
+
interface IAvatarProps {
|
|
72
|
+
fullName?: string;
|
|
73
|
+
id?: string | number;
|
|
74
|
+
size?: number;
|
|
75
|
+
textColor?: string;
|
|
76
|
+
isForm?: boolean;
|
|
77
|
+
relation?: string;
|
|
78
|
+
aid?: string;
|
|
79
|
+
allowShowDetail?: boolean;
|
|
80
|
+
avatarSrc?: string;
|
|
81
|
+
stringToColor?: any;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare const Avatar: (props: IAvatarProps) => JSX.Element;
|
|
85
|
+
|
|
86
|
+
interface IBinaryFieldProps extends IInputFieldProps {
|
|
87
|
+
inputId: any;
|
|
88
|
+
selectedImage: any;
|
|
89
|
+
initialImage: any;
|
|
90
|
+
isInsideTable: any;
|
|
91
|
+
binaryRef: any;
|
|
92
|
+
handleImageChange: any;
|
|
93
|
+
handleRemoveImage: any;
|
|
94
|
+
checkIsImageLink: any;
|
|
95
|
+
getImageBase64WithMimeType: any;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare const BinaryField: (props: IBinaryFieldProps) => JSX.Element;
|
|
99
|
+
|
|
100
|
+
interface IButtonBadgeProps extends IInputFieldProps {
|
|
101
|
+
selection?: [string | number, string][] | any;
|
|
102
|
+
'decoration-success'?: any;
|
|
103
|
+
'decoration-info'?: any;
|
|
104
|
+
'decoration-danger'?: any;
|
|
105
|
+
'decoration-warning'?: any;
|
|
106
|
+
domainHelper?: any;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare const ButtonBadge: (props: IButtonBadgeProps) => JSX.Element | null;
|
|
110
|
+
|
|
111
|
+
interface IButtonProps {
|
|
112
|
+
func?: () => void;
|
|
113
|
+
className?: string;
|
|
114
|
+
loading?: boolean;
|
|
115
|
+
content: string;
|
|
116
|
+
disable?: boolean;
|
|
117
|
+
type?: 'button' | 'submit' | 'reset';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare const ButtonField: (props: IButtonProps) => JSX.Element;
|
|
121
|
+
|
|
122
|
+
interface ICharFieldProps extends IInputFieldProps {
|
|
123
|
+
trim?: boolean;
|
|
124
|
+
max?: string;
|
|
125
|
+
min?: string;
|
|
126
|
+
digit?: string;
|
|
127
|
+
special?: string;
|
|
128
|
+
upcase?: string;
|
|
129
|
+
regex?: any;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare const CharField: React__default.FC<ICharFieldProps>;
|
|
133
|
+
|
|
134
|
+
declare const CheckboxGroup: React__default.FC<IInputFieldProps>;
|
|
135
|
+
|
|
136
|
+
interface IColorWrapperProps {
|
|
137
|
+
savePickColor: any;
|
|
138
|
+
defaultColor: any;
|
|
139
|
+
colors: any;
|
|
140
|
+
}
|
|
141
|
+
interface IColorFieldProps extends IInputFieldProps {
|
|
142
|
+
savePickColor: any;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare const ColorWidget: (props: IColorFieldProps) => JSX.Element;
|
|
146
|
+
|
|
147
|
+
declare const ColorWrapper: (props: IColorWrapperProps) => JSX.Element;
|
|
148
|
+
|
|
149
|
+
interface ICopyLinkButtonProps extends IInputFieldProps {
|
|
150
|
+
isCopied: any;
|
|
151
|
+
handleCopyToClipboard: any;
|
|
152
|
+
propValue: any;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
declare const CopyLinkButtonField: (props: ICopyLinkButtonProps) => JSX.Element;
|
|
156
|
+
|
|
157
|
+
interface IDateFieldProps extends IInputFieldProps {
|
|
158
|
+
formatDate: any;
|
|
159
|
+
formatDateParse: any;
|
|
160
|
+
years: any[];
|
|
161
|
+
months_vi: any[];
|
|
162
|
+
months_en: any[];
|
|
163
|
+
customValidateMinMax: any;
|
|
164
|
+
minNowValue: boolean;
|
|
165
|
+
maxNowValue: boolean;
|
|
166
|
+
showTime: boolean;
|
|
167
|
+
textPlaceHolder: string;
|
|
168
|
+
context?: any;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare const DateField: (props: IDateFieldProps) => JSX.Element;
|
|
172
|
+
|
|
173
|
+
interface IDownLoadBinary {
|
|
174
|
+
handleFileDownload: any;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
declare const DownLoadBinary: (props: IDownLoadBinary) => JSX.Element;
|
|
178
|
+
|
|
179
|
+
interface IDownloadFileProps extends IInputFieldProps {
|
|
180
|
+
inputId: any;
|
|
181
|
+
file: any;
|
|
182
|
+
handleFileChange: any;
|
|
183
|
+
handleFileDownload: any;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
declare const DownloadFile: (props: IDownloadFileProps) => JSX.Element;
|
|
187
|
+
|
|
188
|
+
interface TDropdownSelectorProps<T> {
|
|
189
|
+
options: T[];
|
|
190
|
+
selectedValue: {
|
|
191
|
+
label: string;
|
|
192
|
+
icon?: any;
|
|
193
|
+
};
|
|
194
|
+
onSelect: (value: T) => void;
|
|
195
|
+
renderItem: (item: T) => JSX.Element | string;
|
|
196
|
+
className?: string;
|
|
197
|
+
buttonClassName?: string;
|
|
198
|
+
dropdownClassName?: string;
|
|
199
|
+
useClickOutside?: any;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare const DropdownSelector: <T>(props: TDropdownSelectorProps<T>) => JSX.Element;
|
|
203
|
+
|
|
204
|
+
declare const Fee: (props: IInputFieldProps) => JSX.Element;
|
|
205
|
+
|
|
206
|
+
interface IFileUploadProps extends IInputFieldProps {
|
|
207
|
+
useUploadImage?: any;
|
|
208
|
+
useUploadFile?: any;
|
|
209
|
+
useGetImage?: any;
|
|
210
|
+
isBase64File?: any;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare const FileUpload: (props: IFileUploadProps) => JSX.Element;
|
|
214
|
+
|
|
215
|
+
interface IFloatFieldProps extends IInputFieldProps {
|
|
216
|
+
handleInputMouseLeave: any;
|
|
217
|
+
handleInputChange: any;
|
|
218
|
+
inputRef: any;
|
|
219
|
+
inputValue: any;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
declare const FloatField: (props: IFloatFieldProps) => JSX.Element;
|
|
223
|
+
|
|
224
|
+
interface IFloatTimeFieldProps extends IInputFieldProps {
|
|
225
|
+
handleInputChange: any;
|
|
226
|
+
handleBlur: any;
|
|
227
|
+
handleKeyDown: any;
|
|
228
|
+
input: any;
|
|
229
|
+
errors: any;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
declare const FloatTime: React__default.FC<IFloatTimeFieldProps>;
|
|
233
|
+
|
|
234
|
+
declare const HtmlField: (props: IInputFieldProps) => JSX.Element;
|
|
235
|
+
|
|
236
|
+
declare const ImageField: (props: IInputFieldProps) => JSX.Element | null;
|
|
237
|
+
|
|
238
|
+
interface IMany2ManyTagsProps extends IInputFieldProps {
|
|
239
|
+
selectProps: any;
|
|
240
|
+
data: any;
|
|
241
|
+
options: any[];
|
|
242
|
+
customNoOptionsMessage: any;
|
|
243
|
+
tranfer: any;
|
|
244
|
+
isUser: any;
|
|
245
|
+
menuList?: any;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare const Many2ManyTag: (props: IMany2ManyTagsProps) => JSX.Element;
|
|
249
|
+
|
|
250
|
+
interface IMonetaryProps extends IInputFieldProps {
|
|
251
|
+
placeholder?: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
declare const Monetary: (props: IMonetaryProps) => JSX.Element;
|
|
255
|
+
|
|
256
|
+
declare const PaidBadged: () => JSX.Element;
|
|
257
|
+
|
|
258
|
+
interface IPriorityFieldProps extends IInputFieldProps {
|
|
259
|
+
label: any;
|
|
260
|
+
selection: any;
|
|
261
|
+
defaultPriority: any;
|
|
262
|
+
savePriorities: any;
|
|
263
|
+
id: number | string;
|
|
264
|
+
}
|
|
265
|
+
interface IRatingStarProps extends IInputFieldProps {
|
|
266
|
+
label: string;
|
|
267
|
+
priorities: [number | string, string][];
|
|
268
|
+
onSelectPriority: (priority: {
|
|
269
|
+
value: number;
|
|
270
|
+
resetPriority?: () => void;
|
|
271
|
+
}) => void;
|
|
272
|
+
id: string | number | undefined;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
declare const Priority: (props: IPriorityFieldProps) => JSX.Element;
|
|
276
|
+
|
|
277
|
+
declare const RatingStar: (props: IRatingStarProps) => JSX.Element;
|
|
278
|
+
|
|
279
|
+
interface IRadioGroupProps extends IInputFieldProps {
|
|
280
|
+
placeholder?: string;
|
|
281
|
+
selection?: [string | number, string][] | any;
|
|
282
|
+
setValue?: any;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare const RadioGroup: (props: IRadioGroupProps) => JSX.Element | null;
|
|
286
|
+
|
|
287
|
+
declare const RemainingDays: (props: IInputFieldProps) => JSX.Element | null;
|
|
288
|
+
|
|
289
|
+
interface ISelectDropdownProps extends IInputFieldProps {
|
|
290
|
+
selection?: [string | number, string][] | any;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
declare const SelectDropdown: (props: ISelectDropdownProps) => JSX.Element;
|
|
294
|
+
|
|
295
|
+
declare const TextAreaField: (props: IInputFieldProps) => JSX.Element;
|
|
296
|
+
|
|
297
|
+
declare const ToggleButton: (props: IInputFieldProps) => JSX.Element;
|
|
298
|
+
|
|
299
|
+
interface IDurationProps extends IInputFieldProps {
|
|
300
|
+
disable: any;
|
|
301
|
+
dataResponse: any;
|
|
302
|
+
handleClick: any;
|
|
303
|
+
disabled: any;
|
|
304
|
+
modelStatus: any;
|
|
305
|
+
setModalStatus: any;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare const StatusbarDuration: (props: IDurationProps) => JSX.Element;
|
|
309
|
+
|
|
310
|
+
interface InformationProps extends IInputFieldProps {
|
|
311
|
+
value?: string | number | any | null | Record<any, any> | any;
|
|
312
|
+
isForm?: boolean;
|
|
313
|
+
showName?: boolean;
|
|
314
|
+
}
|
|
315
|
+
declare const InfoWidget: React__default.FC<InformationProps>;
|
|
316
|
+
|
|
317
|
+
declare const IntegerField: (props: IInputFieldProps) => JSX.Element;
|
|
318
|
+
|
|
319
|
+
interface IStatusDropdownFieldProps extends IInputFieldProps {
|
|
320
|
+
selection?: [string | number, string][] | any;
|
|
321
|
+
state?: string | undefined;
|
|
322
|
+
buttonRef: any;
|
|
323
|
+
isOpen: any;
|
|
324
|
+
setIsOpen: any;
|
|
325
|
+
handleClick: any;
|
|
326
|
+
colors: any;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
declare const StatusDropdown: (props: IStatusDropdownFieldProps) => JSX.Element;
|
|
330
|
+
|
|
331
|
+
interface Many2ManyProps {
|
|
332
|
+
title?: string;
|
|
333
|
+
onClose?: any;
|
|
334
|
+
page?: any;
|
|
335
|
+
dataResponse?: any;
|
|
336
|
+
isDataLoading?: any;
|
|
337
|
+
isDataResponseFetched?: any;
|
|
338
|
+
isPlaceholderData?: any;
|
|
339
|
+
isCheckBox?: boolean;
|
|
340
|
+
optionsObject?: any;
|
|
341
|
+
onChoose?: any;
|
|
342
|
+
onAddNew?: any;
|
|
343
|
+
selectedRowKeys?: any;
|
|
344
|
+
handleCreateNewOnPage?: any;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
declare const Many2ManyView: (props: Many2ManyProps) => React$1.ReactPortal;
|
|
348
|
+
|
|
349
|
+
interface Many2OneProps extends IInputFieldProps {
|
|
350
|
+
menuList?: any;
|
|
351
|
+
handleChooseRecord?: any;
|
|
352
|
+
handleClose?: any;
|
|
353
|
+
selectedRowKeys?: any;
|
|
354
|
+
allowShowDetail?: any;
|
|
355
|
+
index?: any;
|
|
356
|
+
contextObject?: any;
|
|
357
|
+
renderDetail?: any;
|
|
358
|
+
isShowModalMany2Many?: boolean;
|
|
359
|
+
initValue?: any;
|
|
360
|
+
tempSelectedOption?: any;
|
|
361
|
+
options?: any;
|
|
362
|
+
fetchMoreOptions?: any;
|
|
363
|
+
handleSelectChange?: any;
|
|
364
|
+
isFetching?: any;
|
|
365
|
+
domainObject?: any;
|
|
366
|
+
setIsShowModalMany2Many?: any;
|
|
367
|
+
setInputValue?: any;
|
|
368
|
+
setDomainObject?: any;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
declare const Many2OneField: (props: Many2OneProps) => JSX.Element;
|
|
372
|
+
|
|
373
|
+
declare const ModalConfirm: ({ name, isShowModal, onClick, onClose, title, content, isLoading, }: {
|
|
374
|
+
name: "delete" | "duplicate" | "archive" | "unarchive";
|
|
375
|
+
isShowModal: boolean;
|
|
376
|
+
isLoading?: boolean;
|
|
377
|
+
onClick: () => void;
|
|
378
|
+
onClose: () => void;
|
|
379
|
+
title?: string;
|
|
380
|
+
content?: React.ReactNode;
|
|
381
|
+
}) => JSX.Element;
|
|
382
|
+
|
|
383
|
+
declare const ModalDetail: ({ idToolTip, title, model, idForm, aid, place, renderDetail, context, }: any) => React$1.ReactPortal;
|
|
384
|
+
|
|
385
|
+
declare const ModalLayer: ({ isOpen, onClose, title, children, }: {
|
|
386
|
+
isOpen: boolean;
|
|
387
|
+
onClose: () => void;
|
|
388
|
+
title?: string;
|
|
389
|
+
children: React__default.ReactNode;
|
|
390
|
+
}) => JSX.Element;
|
|
391
|
+
|
|
392
|
+
declare const LayerLoading: () => JSX.Element;
|
|
393
|
+
|
|
394
|
+
declare const LoadingSmall: () => JSX.Element;
|
|
395
|
+
|
|
396
|
+
declare const RenderFiles: ({ selectedFiles, setSelectedFiles, useGetImage }: any) => JSX.Element;
|
|
397
|
+
|
|
398
|
+
declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFile }: any) => JSX.Element;
|
|
399
|
+
|
|
400
|
+
interface VideoPlayerProps {
|
|
401
|
+
src: string;
|
|
402
|
+
}
|
|
403
|
+
declare const VideoPlayer: ({ src }: VideoPlayerProps) => JSX.Element;
|
|
404
|
+
|
|
405
|
+
export { ActiveBadge, Avatar, BinaryField, ButtonBadge, ButtonField, ButtonSelectFiles, CharField, CheckboxGroup, ColorWidget, ColorWrapper, CopyLinkButtonField, DateField, DownLoadBinary, DownloadFile, DropdownSelector, Fee, FileUpload, FloatField, FloatTime, HtmlField, type IActiveBadgeProps, type IAvatarProps, type IBinaryFieldProps, type IButtonBadgeProps, type IButtonProps, type ICharFieldProps, type IColorFieldProps, type IColorWrapperProps, type ICopyLinkButtonProps, type IDateFieldProps, type IDurationProps, type IFloatFieldProps, type IFloatTimeFieldProps, type IMany2ManyTagsProps, type IMonetaryProps, type IPaginationProps, type IPriorityFieldProps, type IRadioGroupProps, type IRatingStarProps, type ISelectDropdownProps, ImageField, InfoWidget, IntegerField, LayerLoading, LoadingSmall, Login, type Many2ManyProps, Many2ManyTag, Many2ManyView, Many2OneField, type Many2OneProps, ModalConfirm, ModalDetail, ModalLayer, Monetary, PaginationView, PaidBadged, Priority, RadioGroup, RatingStar, RemainingDays, RenderFiles, Row, Search, SelectDropdown, StatusDropdown, StatusbarDuration, type TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButton, VideoPlayer, usePagination };
|