@fctc/sme-widget-ui 1.0.0 → 1.0.2

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/widgets.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default from 'react';
2
+ import React__default, { Dispatch, SetStateAction } from 'react';
3
3
  import { LoginProps, IInputFieldProps } from './types.js';
4
4
  import 'zod';
5
5
 
@@ -37,21 +37,27 @@ interface TableBodyProps {
37
37
  checked?: any;
38
38
  isForm?: any;
39
39
  typeCo?: any;
40
+ setSelectedRowKeys?: any;
41
+ selectedRowKeys?: any;
40
42
  }
41
43
  declare const TableBody: (props: TableBodyProps) => JSX.Element;
42
44
 
43
45
  declare const TableFilter: ({ columns, onToggleColumnOptional }: any) => JSX.Element;
44
46
 
45
- declare const TableFooter: ({ onAddRow, rows }: any) => JSX.Element;
47
+ interface TableFooterProps {
48
+ rows?: any;
49
+ onAddRow?: any;
50
+ }
51
+ declare const TableFooter: ({ onAddRow, rows }: TableFooterProps) => JSX.Element;
46
52
 
47
53
  declare const TableGroup: (props: any) => JSX.Element;
48
54
 
49
55
  interface TableHeadProps {
50
- handleCheckBoxAll: any;
51
- columns: any;
52
- isDisplayCheckbox: any;
53
- checkedAll: any;
54
- onToggleColumnOptional: any;
56
+ handleCheckBoxAll?: any;
57
+ columns?: any;
58
+ isDisplayCheckbox?: any;
59
+ checkedAll?: any;
60
+ onToggleColumnOptional?: any;
55
61
  onRemoveRow?: any;
56
62
  }
57
63
  declare const TableHead: (props: TableHeadProps) => JSX.Element;
@@ -60,28 +66,26 @@ declare const Row: (props: any) => JSX.Element;
60
66
 
61
67
  declare const Login: React__default.FC<LoginProps>;
62
68
 
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;
69
+ 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, }: any) => JSX.Element;
64
70
 
65
71
  interface IActiveBadgeProps extends IInputFieldProps {
66
72
  type: any;
67
73
  }
68
74
 
69
- declare const ActiveBadge: (props: IActiveBadgeProps) => JSX.Element;
75
+ declare const ActiveBadgeField: (props: IActiveBadgeProps) => JSX.Element;
70
76
 
71
- interface IAvatarProps {
77
+ interface IAvatarProps extends IInputFieldProps {
72
78
  fullName?: string;
73
79
  id?: string | number;
74
80
  size?: number;
75
81
  textColor?: string;
76
- isForm?: boolean;
77
- relation?: string;
78
82
  aid?: string;
79
83
  allowShowDetail?: boolean;
80
84
  avatarSrc?: string;
81
85
  stringToColor?: any;
82
86
  }
83
87
 
84
- declare const Avatar: (props: IAvatarProps) => JSX.Element;
88
+ declare const AvatarField: (props: IAvatarProps) => JSX.Element;
85
89
 
86
90
  interface IBinaryFieldProps extends IInputFieldProps {
87
91
  inputId: any;
@@ -106,7 +110,7 @@ interface IButtonBadgeProps extends IInputFieldProps {
106
110
  domainHelper?: any;
107
111
  }
108
112
 
109
- declare const ButtonBadge: (props: IButtonBadgeProps) => JSX.Element | null;
113
+ declare const ButtonBadgeField: (props: IButtonBadgeProps) => JSX.Element | null;
110
114
 
111
115
  interface IButtonProps {
112
116
  func?: () => void;
@@ -131,7 +135,7 @@ interface ICharFieldProps extends IInputFieldProps {
131
135
 
132
136
  declare const CharField: React__default.FC<ICharFieldProps>;
133
137
 
134
- declare const CheckboxGroup: React__default.FC<IInputFieldProps>;
138
+ declare const CheckboxField: React__default.FC<IInputFieldProps>;
135
139
 
136
140
  interface IColorWrapperProps {
137
141
  savePickColor: any;
@@ -142,7 +146,7 @@ interface IColorFieldProps extends IInputFieldProps {
142
146
  savePickColor: any;
143
147
  }
144
148
 
145
- declare const ColorWidget: (props: IColorFieldProps) => JSX.Element;
149
+ declare const ColorField: (props: IColorFieldProps) => JSX.Element;
146
150
 
147
151
  declare const ColorWrapper: (props: IColorWrapperProps) => JSX.Element;
148
152
 
@@ -174,7 +178,7 @@ interface IDownLoadBinary {
174
178
  handleFileDownload: any;
175
179
  }
176
180
 
177
- declare const DownLoadBinary: (props: IDownLoadBinary) => JSX.Element;
181
+ declare const DownLoadBinaryField: (props: IDownLoadBinary) => JSX.Element;
178
182
 
179
183
  interface IDownloadFileProps extends IInputFieldProps {
180
184
  inputId: any;
@@ -183,7 +187,7 @@ interface IDownloadFileProps extends IInputFieldProps {
183
187
  handleFileDownload: any;
184
188
  }
185
189
 
186
- declare const DownloadFile: (props: IDownloadFileProps) => JSX.Element;
190
+ declare const DownloadFileField: (props: IDownloadFileProps) => JSX.Element;
187
191
 
188
192
  interface TDropdownSelectorProps<T> {
189
193
  options: T[];
@@ -199,9 +203,9 @@ interface TDropdownSelectorProps<T> {
199
203
  useClickOutside?: any;
200
204
  }
201
205
 
202
- declare const DropdownSelector: <T>(props: TDropdownSelectorProps<T>) => JSX.Element;
206
+ declare const DropdownField: <T>(props: TDropdownSelectorProps<T>) => JSX.Element;
203
207
 
204
- declare const Fee: (props: IInputFieldProps) => JSX.Element;
208
+ declare const FeeField: (props: IInputFieldProps) => JSX.Element;
205
209
 
206
210
  interface IFileUploadProps extends IInputFieldProps {
207
211
  useUploadImage?: any;
@@ -210,57 +214,39 @@ interface IFileUploadProps extends IInputFieldProps {
210
214
  isBase64File?: any;
211
215
  }
212
216
 
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
- }
217
+ declare const FileUploadField: (props: IFileUploadProps) => JSX.Element;
221
218
 
222
- declare const FloatField: (props: IFloatFieldProps) => JSX.Element;
219
+ declare const FloatField: (props: IInputFieldProps) => JSX.Element;
223
220
 
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>;
221
+ declare const FloatTimeField: React__default.FC<IInputFieldProps>;
233
222
 
234
223
  declare const HtmlField: (props: IInputFieldProps) => JSX.Element;
235
224
 
236
225
  declare const ImageField: (props: IInputFieldProps) => JSX.Element | null;
237
226
 
238
227
  interface IMany2ManyTagsProps extends IInputFieldProps {
239
- selectProps: any;
240
- data: any;
241
228
  options: any[];
242
229
  customNoOptionsMessage: any;
243
230
  tranfer: any;
244
231
  isUser: any;
245
- menuList?: any;
232
+ stringToColor?: any;
246
233
  }
247
234
 
248
- declare const Many2ManyTag: (props: IMany2ManyTagsProps) => JSX.Element;
235
+ declare const Many2ManyTagField: (props: IMany2ManyTagsProps) => JSX.Element;
249
236
 
250
237
  interface IMonetaryProps extends IInputFieldProps {
251
238
  placeholder?: string;
252
239
  }
253
240
 
254
- declare const Monetary: (props: IMonetaryProps) => JSX.Element;
241
+ declare const MonetaryField: (props: IMonetaryProps) => JSX.Element;
255
242
 
256
- declare const PaidBadged: () => JSX.Element;
243
+ declare const PaidBadgedField: () => JSX.Element;
257
244
 
258
245
  interface IPriorityFieldProps extends IInputFieldProps {
259
- label: any;
260
- selection: any;
261
- defaultPriority: any;
262
- savePriorities: any;
263
- id: number | string;
246
+ savePriorities?: any;
247
+ id?: number | string;
248
+ viewData?: any;
249
+ selection?: any;
264
250
  }
265
251
  interface IRatingStarProps extends IInputFieldProps {
266
252
  label: string;
@@ -272,9 +258,9 @@ interface IRatingStarProps extends IInputFieldProps {
272
258
  id: string | number | undefined;
273
259
  }
274
260
 
275
- declare const Priority: (props: IPriorityFieldProps) => JSX.Element;
261
+ declare const PriorityField: (props: IPriorityFieldProps) => JSX.Element;
276
262
 
277
- declare const RatingStar: (props: IRatingStarProps) => JSX.Element;
263
+ declare const RatingStarField: (props: IRatingStarProps) => JSX.Element;
278
264
 
279
265
  interface IRadioGroupProps extends IInputFieldProps {
280
266
  placeholder?: string;
@@ -282,37 +268,26 @@ interface IRadioGroupProps extends IInputFieldProps {
282
268
  setValue?: any;
283
269
  }
284
270
 
285
- declare const RadioGroup: (props: IRadioGroupProps) => JSX.Element | null;
271
+ declare const RadioGroupField: (props: IRadioGroupProps) => JSX.Element | null;
286
272
 
287
- declare const RemainingDays: (props: IInputFieldProps) => JSX.Element | null;
273
+ declare const RemainingDaysField: (props: IInputFieldProps) => JSX.Element | null;
288
274
 
289
275
  interface ISelectDropdownProps extends IInputFieldProps {
290
276
  selection?: [string | number, string][] | any;
291
277
  }
292
278
 
293
- declare const SelectDropdown: (props: ISelectDropdownProps) => JSX.Element;
279
+ declare const SelectDropdownField: (props: ISelectDropdownProps) => JSX.Element;
294
280
 
295
281
  declare const TextAreaField: (props: IInputFieldProps) => JSX.Element;
296
282
 
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;
283
+ declare const ToggleButtonField: (props: IInputFieldProps) => JSX.Element;
309
284
 
310
285
  interface InformationProps extends IInputFieldProps {
311
- value?: string | number | any | null | Record<any, any> | any;
312
- isForm?: boolean;
313
286
  showName?: boolean;
287
+ stringToColor?: any;
314
288
  }
315
- declare const InfoWidget: React__default.FC<InformationProps>;
289
+
290
+ declare const InfomationField: React__default.FC<InformationProps>;
316
291
 
317
292
  declare const IntegerField: (props: IInputFieldProps) => JSX.Element;
318
293
 
@@ -326,25 +301,62 @@ interface IStatusDropdownFieldProps extends IInputFieldProps {
326
301
  colors: any;
327
302
  }
328
303
 
329
- declare const StatusDropdown: (props: IStatusDropdownFieldProps) => JSX.Element;
330
-
331
- interface Many2ManyProps {
304
+ declare const StatusDropdownField: (props: IStatusDropdownFieldProps) => JSX.Element;
305
+
306
+ interface SearchController {
307
+ groupBy?: string[] | null;
308
+ searchBy?: string[] | null;
309
+ filterBy?: Record<string, any>[] | null;
310
+ selectedTags?: string[] | null;
311
+ searchString?: string;
312
+ setFilterBy?: Dispatch<SetStateAction<Record<string, any>[] | null>>;
313
+ setGroupBy?: Dispatch<SetStateAction<string[] | null>>;
314
+ setSearchBy?: Dispatch<SetStateAction<string[] | null>>;
315
+ clearSearch?: () => void;
316
+ setSelectedTags?: Dispatch<SetStateAction<string[] | null>>;
317
+ removeSearchItems?: (key: string, item: any) => void;
318
+ onSearchString?: (searchString: string) => void;
319
+ handleAddTagSearch?: (tag: string) => void;
320
+ domain?: any[];
321
+ context?: Record<string, any>;
322
+ }
323
+ interface Many2ManyProps extends IInputFieldProps {
324
+ aid?: number | null;
332
325
  title?: string;
333
- onClose?: any;
334
- page?: any;
335
- dataResponse?: any;
336
326
  isDataLoading?: any;
337
- isDataResponseFetched?: any;
327
+ isDataFetched?: any;
338
328
  isPlaceholderData?: any;
339
329
  isCheckBox?: boolean;
340
330
  optionsObject?: any;
341
- onChoose?: any;
342
- onAddNew?: any;
343
331
  selectedRowKeys?: any;
344
332
  handleCreateNewOnPage?: any;
333
+ rows: any;
334
+ columns: any;
335
+ typeTable?: string;
336
+ page?: any;
337
+ totalRows?: number;
338
+ rootField?: any;
339
+ viewData?: any;
340
+ onAddNew?: any;
341
+ onChoose?: any;
342
+ onClose?: any;
343
+ onAddRow?: Function;
344
+ onClickRow?: Function;
345
+ onToggleColumnOptional?: any;
346
+ renderField?: ({ row, col, indexRow, onChangeData, rootField, }: {
347
+ row: any;
348
+ col: any;
349
+ indexRow: any;
350
+ onChangeData: any;
351
+ rootField: any;
352
+ }) => {};
353
+ setPage?: (page: number) => void;
354
+ setDomain?: Dispatch<SetStateAction<any>>;
355
+ searchController: SearchController;
356
+ evalJSONContext?: any;
345
357
  }
346
358
 
347
- declare const Many2ManyView: (props: Many2ManyProps) => React$1.ReactPortal;
359
+ declare const Many2ManyField: (props: Many2ManyProps) => React$1.ReactPortal;
348
360
 
349
361
  interface Many2OneProps extends IInputFieldProps {
350
362
  menuList?: any;
@@ -370,6 +382,24 @@ interface Many2OneProps extends IInputFieldProps {
370
382
 
371
383
  declare const Many2OneField: (props: Many2OneProps) => JSX.Element;
372
384
 
385
+ interface IDurationProps extends IInputFieldProps {
386
+ dataResponse: any;
387
+ handleClick: any;
388
+ disabled: any;
389
+ modelStatus: any;
390
+ setModalStatus: any;
391
+ }
392
+
393
+ declare const StatusbarDurationField: (props: IDurationProps) => JSX.Element;
394
+
395
+ interface IOptionProps extends IInputFieldProps {
396
+ selection?: [string | number, string][] | any;
397
+ }
398
+
399
+ declare const StatusBarOptionField: (props: IOptionProps) => JSX.Element;
400
+
401
+ declare const DateOptionField: (props: IInputFieldProps) => JSX.Element;
402
+
373
403
  declare const ModalConfirm: ({ name, isShowModal, onClick, onClose, title, content, isLoading, }: {
374
404
  name: "delete" | "duplicate" | "archive" | "unarchive";
375
405
  isShowModal: boolean;
@@ -395,11 +425,11 @@ declare const LoadingSmall: () => JSX.Element;
395
425
 
396
426
  declare const RenderFiles: ({ selectedFiles, setSelectedFiles, useGetImage }: any) => JSX.Element;
397
427
 
398
- declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFile }: any) => JSX.Element;
428
+ declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFile, }: any) => JSX.Element;
399
429
 
400
430
  interface VideoPlayerProps {
401
431
  src: string;
402
432
  }
403
433
  declare const VideoPlayer: ({ src }: VideoPlayerProps) => JSX.Element;
404
434
 
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 };
435
+ export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, ButtonField, ButtonSelectFiles, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, FeeField, FileUploadField, FloatField, FloatTimeField, HtmlField, type IActiveBadgeProps, type IAvatarProps, type IBinaryFieldProps, type IButtonBadgeProps, type IButtonProps, type ICharFieldProps, type IColorFieldProps, type IColorWrapperProps, type ICopyLinkButtonProps, type IDateFieldProps, type IDownLoadBinary, type IDownloadFileProps, type IDurationProps, type IFileUploadProps, type IMany2ManyTagsProps, type IMonetaryProps, type IOptionProps, type IPaginationProps, type IPriorityFieldProps, type IRadioGroupProps, type IRatingStarProps, type ISelectDropdownProps, type IStatusDropdownFieldProps, ImageField, InfomationField, IntegerField, LayerLoading, LoadingSmall, Login, Many2ManyField, type Many2ManyProps, Many2ManyTagField, Many2OneField, type Many2OneProps, ModalConfirm, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, RadioGroupField, RatingStarField, RemainingDaysField, RenderFiles, Row, Search, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusbarDurationField, type TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, VideoPlayer, usePagination };