@fctc/widget-logic 1.1.0 → 1.1.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/index.d.mts CHANGED
@@ -1,3 +1,340 @@
1
- export { useArchieveHandler, useDuplicateRowHandler, useExportExcelHandler, useGetFieldExportHandler } from './action.mjs';
2
- export { UseOnChangeFormHandler, useRemoveRowHandler, useSaveFormHandler } from './form.mjs';
3
- export { useTableHandler } from './table.mjs';
1
+ export { useClickOutside, useDebounce } from './hooks.mjs';
2
+ export { CloseIcon, EyeIcon, LoadingIcon } from './icons.mjs';
3
+ import { ValuePropsType, WidgetPropsType, ColorWrapperControllerProps, ColorType, IInputFieldProps } from './types.mjs';
4
+ export { GoogleLoginType } from './types.mjs';
5
+ import * as react from 'react';
6
+ import react__default, { ChangeEvent } from 'react';
7
+ import * as _tanstack_query_core from '@tanstack/query-core';
8
+ import * as _fctc_interface_logic from '@fctc/interface-logic';
9
+ import { BaseModelInit } from '@fctc/interface-logic';
10
+ import * as _fctc_interface_logic_dist_index_C_nK1Mii from '@fctc/interface-logic/dist/index-C_nK1Mii';
11
+ import day from 'react-datepicker/dist/day';
12
+ import month from 'react-datepicker/dist/month';
13
+ import year from 'react-datepicker/dist/year';
14
+ import moment from 'moment';
15
+
16
+ type TStatus = 'normal' | 'done' | 'blocked';
17
+ interface IStatusDropdownFieldProps {
18
+ selection?: [string | number, string][] | any;
19
+ isForm?: boolean;
20
+ id?: string | number;
21
+ model?: string;
22
+ name?: string;
23
+ state?: string | undefined;
24
+ onRefetch?: Function;
25
+ }
26
+
27
+ declare const statusDropdownController: (props: IStatusDropdownFieldProps) => {
28
+ handleClick: (status: any) => Promise<void>;
29
+ buttonRef: react.RefObject<HTMLDivElement>;
30
+ isForm: boolean | undefined;
31
+ setIsOpen: react.Dispatch<react.SetStateAction<boolean>>;
32
+ isOpen: boolean;
33
+ selection: any;
34
+ state: string | undefined;
35
+ colors: Record<TStatus, string>;
36
+ };
37
+
38
+ interface Many2OneProps {
39
+ name: string;
40
+ methods: any;
41
+ formValues: any;
42
+ domain: any;
43
+ relation: any;
44
+ onChange: any;
45
+ value: any;
46
+ context: any;
47
+ options: any;
48
+ showDetail: any;
49
+ actionData: any;
50
+ }
51
+ declare const many2oneFieldController: (props: Many2OneProps) => {
52
+ allowShowDetail: any;
53
+ handleClose: () => void;
54
+ handleChooseRecord: (idRecord: number) => void;
55
+ handleSelectChange: (selectedOption: any) => void;
56
+ initValue: any;
57
+ isFetching: boolean;
58
+ isShowModalMany2Many: boolean;
59
+ options: never[];
60
+ fetchMoreOptions: () => void;
61
+ domainModal: null;
62
+ tempSelectedOption: any;
63
+ setTempSelectedOption: react.Dispatch<any>;
64
+ setDomainModal: react.Dispatch<react.SetStateAction<null>>;
65
+ dataOfSelection: any;
66
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
67
+ selectOptions: any;
68
+ optionsObject: {};
69
+ contextObject: any;
70
+ actionId: any;
71
+ setIsShowModalMany2Many: react.Dispatch<react.SetStateAction<boolean>>;
72
+ };
73
+
74
+ type Option = {
75
+ value: number;
76
+ label: string;
77
+ };
78
+ declare const many2oneButtonController: ({ relation, methods, domain, }: {
79
+ relation: string;
80
+ methods: any;
81
+ domain: any;
82
+ }) => {
83
+ options: Option[];
84
+ };
85
+
86
+ interface Many2ManyControllerProps {
87
+ relation: string;
88
+ domain: any;
89
+ context: any;
90
+ tab: any;
91
+ model: string;
92
+ aid: number;
93
+ setSelectedRowKeys: any;
94
+ fields: any;
95
+ setFields: any;
96
+ groupByDomain: any;
97
+ page: number;
98
+ options: any;
99
+ sessionStorageUtils: any;
100
+ }
101
+ declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
102
+ rows: any[];
103
+ columns: any;
104
+ typeTable: "list" | "group" | "calendar" | undefined;
105
+ handleCreateNewOnPage: () => Promise<void>;
106
+ isLoadedData: boolean;
107
+ domainMany2Many: any;
108
+ isDataLoading: boolean;
109
+ isDataResponseFetched: boolean;
110
+ isPlaceholderData: boolean;
111
+ queryKey: any[];
112
+ data: {
113
+ model: string;
114
+ specification: Record<string, any> | null;
115
+ domain: any;
116
+ offset: number;
117
+ limit: number;
118
+ context: any;
119
+ fields: any;
120
+ groupby: any[];
121
+ sort: string | null;
122
+ };
123
+ specification: Record<string, any> | null;
124
+ enabled: boolean;
125
+ isViewReponseFetched: boolean;
126
+ actionData: any;
127
+ viewResponse: any;
128
+ debouncedPage: number;
129
+ order: undefined;
130
+ default_order: any;
131
+ optionsObject: {} | null;
132
+ setDomainMany2Many: react.Dispatch<any>;
133
+ selectedTags: [];
134
+ initModel: {
135
+ initModel: (modelData: _fctc_interface_logic_dist_index_C_nK1Mii.a) => _fctc_interface_logic.BaseModel;
136
+ };
137
+ modelInstance: _fctc_interface_logic.BaseModel | null;
138
+ baseModel: BaseModelInit;
139
+ dataResponse: any;
140
+ isLoading: boolean;
141
+ setOrder: react.Dispatch<react.SetStateAction<undefined>>;
142
+ };
143
+
144
+ declare const many2manyTagsController: (props: any) => {
145
+ options: any;
146
+ customNoOptionsMessage: () => any;
147
+ tranfer: (data: any) => any;
148
+ dataOfSelection: any;
149
+ isUser: boolean;
150
+ };
151
+
152
+ interface IDurationProps {
153
+ relation?: string;
154
+ defaultValue?: string | number | ValuePropsType;
155
+ domain?: string | [] | any;
156
+ formValues?: Record<string, any>;
157
+ name?: string;
158
+ id?: string | number;
159
+ model?: string;
160
+ onRefetch?: Function;
161
+ }
162
+
163
+ declare const durationController: (props: IDurationProps) => {
164
+ defaultValue: string | number | ValuePropsType | undefined;
165
+ dataResponse: any;
166
+ handleClick: (stage_id: any) => Promise<void>;
167
+ disabled: boolean;
168
+ modelStatus: boolean;
169
+ setModalStatus: react.Dispatch<react.SetStateAction<boolean>>;
170
+ };
171
+
172
+ interface PriorityFieldProps {
173
+ value: any;
174
+ selection: any;
175
+ isForm: boolean;
176
+ name: string;
177
+ methods: any;
178
+ id: string;
179
+ onChange: any;
180
+ model: any;
181
+ actionData: any;
182
+ viewData: any;
183
+ context: any;
184
+ }
185
+ declare const priorityFieldController: (props: PriorityFieldProps) => {
186
+ selection: any;
187
+ isForm: boolean;
188
+ methods: any;
189
+ defaultPriority: number;
190
+ savePriorities: ({ value, resetPriority, }: {
191
+ value: number;
192
+ resetPriority?: () => void;
193
+ }) => Promise<void>;
194
+ label: any;
195
+ id: string;
196
+ onChange: any;
197
+ };
198
+
199
+ declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, value, isDirty, props, }: {
200
+ onChange: any;
201
+ onBlur: any;
202
+ value: any;
203
+ error: any;
204
+ isDirty: any;
205
+ props: WidgetPropsType;
206
+ }) => {
207
+ handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
208
+ handleBlur: () => void;
209
+ handleKeyDown: (e: any) => void;
210
+ input: string;
211
+ errors: string;
212
+ };
213
+
214
+ declare const floatController: ({ onChange, value, props, }: {
215
+ onChange: any;
216
+ value: any;
217
+ props: WidgetPropsType;
218
+ }) => {
219
+ handleInputMouseLeave: () => void;
220
+ handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
221
+ useFormatFloatNumber: (value: number | string) => string;
222
+ inputRef: react.MutableRefObject<HTMLInputElement | null>;
223
+ inputValue: string;
224
+ };
225
+
226
+ declare const downloadFileController: () => {
227
+ inputId: string;
228
+ file: any;
229
+ handleFileChange: (e: any) => void;
230
+ handleFileDownload: () => void;
231
+ };
232
+
233
+ type TDownLoadBinaryProps = {
234
+ value: any;
235
+ defaultValue: any;
236
+ formValues: any;
237
+ };
238
+ declare const downLoadBinaryController: (props: TDownLoadBinaryProps) => {
239
+ handleFileDownload: (e: any) => Promise<void>;
240
+ };
241
+
242
+ declare const dateFieldController: (props: any) => {
243
+ formatDate: string;
244
+ formatDateParse: string;
245
+ range: (start: number, end: number, step?: number) => number[];
246
+ years: number[];
247
+ months_vi: string[];
248
+ months_en: string[];
249
+ customValidateMinMax: (date: any) => boolean;
250
+ minNowValue: boolean | moment.Moment | null;
251
+ maxNowValue: boolean | moment.Moment | null;
252
+ year: typeof year;
253
+ month: typeof month;
254
+ day: typeof day;
255
+ };
256
+
257
+ declare const copyLinkButtonController: (props: any) => {
258
+ isCopied: boolean;
259
+ handleCopyToClipboard: (value: string) => Promise<void>;
260
+ propValue: any;
261
+ };
262
+
263
+ declare const colorWrapperController: (props: ColorWrapperControllerProps) => {
264
+ selectedColor: ColorType;
265
+ showFullColors: boolean;
266
+ setSelectedColor: react.Dispatch<react.SetStateAction<ColorType>>;
267
+ handleShowFullColors: () => void;
268
+ pickColorsRef: react.RefObject<HTMLDivElement>;
269
+ savePickColor: any;
270
+ };
271
+
272
+ interface ColorFieldProps extends IInputFieldProps {
273
+ value?: string | number | ValuePropsType | null | Record<any, any> | any;
274
+ isForm?: boolean;
275
+ name?: string;
276
+ methods?: any;
277
+ onChange?: (name: string, value: any) => void;
278
+ [key: string]: any;
279
+ }
280
+ declare const colorFieldController: (props: ColorFieldProps) => {
281
+ savePickColor: (colorObject: any) => Promise<void>;
282
+ };
283
+
284
+ declare const binaryFieldController: (props: IInputFieldProps) => {
285
+ inputId: string;
286
+ selectedImage: string | null;
287
+ initialImage: any;
288
+ isInsideTable: boolean;
289
+ binaryRef: react.RefObject<HTMLDivElement>;
290
+ handleImageChange: (e: ChangeEvent<HTMLInputElement>, onChange: (file: File | null) => void) => Promise<void>;
291
+ handleRemoveImage: (onChange: (file: File | null) => void) => void;
292
+ checkIsImageLink: (url: string) => boolean;
293
+ getImageBase64WithMimeType: (base64: any) => string | null;
294
+ };
295
+
296
+ declare const ModalConfirm: ({ name, isShowModal, onClick, onClose, title, content, isLoading, }: {
297
+ name: "delete" | "duplicate" | "archive" | "unarchive";
298
+ isShowModal: boolean;
299
+ isLoading?: boolean;
300
+ onClick: () => void;
301
+ onClose: () => void;
302
+ title?: string;
303
+ content?: React.ReactNode;
304
+ }) => JSX.Element;
305
+
306
+ declare const ModalDetail: ({ idToolTip, title, model, idForm, aid, place, renderDetail, context, }: any) => react.ReactPortal;
307
+
308
+ declare const ModalLayer: ({ isOpen, onClose, title, children, }: {
309
+ isOpen: boolean;
310
+ onClose: () => void;
311
+ title?: string;
312
+ children: react__default.ReactNode;
313
+ }) => JSX.Element;
314
+
315
+ declare const LayerLoading: () => JSX.Element;
316
+
317
+ declare const LoadingSmall: () => JSX.Element;
318
+
319
+ interface UseTableProps {
320
+ data: {
321
+ fields: any[];
322
+ records: any[];
323
+ dataModel: {
324
+ [fieldName: string]: {
325
+ string?: string;
326
+ [key: string]: any;
327
+ };
328
+ };
329
+ context: any;
330
+ typeTable?: 'list' | 'group' | 'calendar';
331
+ };
332
+ }
333
+ declare const useTableHandler: ({ data }: UseTableProps) => {
334
+ rows: any[];
335
+ columns: any;
336
+ onToggleColumnOptional: (item: any) => void;
337
+ typeTable: "list" | "group" | "calendar" | undefined;
338
+ };
339
+
340
+ export { ColorType, ColorWrapperControllerProps, IInputFieldProps, LayerLoading, LoadingSmall, ModalConfirm, ModalDetail, ModalLayer, ValuePropsType, WidgetPropsType, binaryFieldController, colorFieldController, colorWrapperController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, floatController, floatTimeFiledController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, statusDropdownController, useTableHandler };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,340 @@
1
- export { useArchieveHandler, useDuplicateRowHandler, useExportExcelHandler, useGetFieldExportHandler } from './action.js';
2
- export { UseOnChangeFormHandler, useRemoveRowHandler, useSaveFormHandler } from './form.js';
3
- export { useTableHandler } from './table.js';
1
+ export { useClickOutside, useDebounce } from './hooks.js';
2
+ export { CloseIcon, EyeIcon, LoadingIcon } from './icons.js';
3
+ import { ValuePropsType, WidgetPropsType, ColorWrapperControllerProps, ColorType, IInputFieldProps } from './types.js';
4
+ export { GoogleLoginType } from './types.js';
5
+ import * as react from 'react';
6
+ import react__default, { ChangeEvent } from 'react';
7
+ import * as _tanstack_query_core from '@tanstack/query-core';
8
+ import * as _fctc_interface_logic from '@fctc/interface-logic';
9
+ import { BaseModelInit } from '@fctc/interface-logic';
10
+ import * as _fctc_interface_logic_dist_index_C_nK1Mii from '@fctc/interface-logic/dist/index-C_nK1Mii';
11
+ import day from 'react-datepicker/dist/day';
12
+ import month from 'react-datepicker/dist/month';
13
+ import year from 'react-datepicker/dist/year';
14
+ import moment from 'moment';
15
+
16
+ type TStatus = 'normal' | 'done' | 'blocked';
17
+ interface IStatusDropdownFieldProps {
18
+ selection?: [string | number, string][] | any;
19
+ isForm?: boolean;
20
+ id?: string | number;
21
+ model?: string;
22
+ name?: string;
23
+ state?: string | undefined;
24
+ onRefetch?: Function;
25
+ }
26
+
27
+ declare const statusDropdownController: (props: IStatusDropdownFieldProps) => {
28
+ handleClick: (status: any) => Promise<void>;
29
+ buttonRef: react.RefObject<HTMLDivElement>;
30
+ isForm: boolean | undefined;
31
+ setIsOpen: react.Dispatch<react.SetStateAction<boolean>>;
32
+ isOpen: boolean;
33
+ selection: any;
34
+ state: string | undefined;
35
+ colors: Record<TStatus, string>;
36
+ };
37
+
38
+ interface Many2OneProps {
39
+ name: string;
40
+ methods: any;
41
+ formValues: any;
42
+ domain: any;
43
+ relation: any;
44
+ onChange: any;
45
+ value: any;
46
+ context: any;
47
+ options: any;
48
+ showDetail: any;
49
+ actionData: any;
50
+ }
51
+ declare const many2oneFieldController: (props: Many2OneProps) => {
52
+ allowShowDetail: any;
53
+ handleClose: () => void;
54
+ handleChooseRecord: (idRecord: number) => void;
55
+ handleSelectChange: (selectedOption: any) => void;
56
+ initValue: any;
57
+ isFetching: boolean;
58
+ isShowModalMany2Many: boolean;
59
+ options: never[];
60
+ fetchMoreOptions: () => void;
61
+ domainModal: null;
62
+ tempSelectedOption: any;
63
+ setTempSelectedOption: react.Dispatch<any>;
64
+ setDomainModal: react.Dispatch<react.SetStateAction<null>>;
65
+ dataOfSelection: any;
66
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
67
+ selectOptions: any;
68
+ optionsObject: {};
69
+ contextObject: any;
70
+ actionId: any;
71
+ setIsShowModalMany2Many: react.Dispatch<react.SetStateAction<boolean>>;
72
+ };
73
+
74
+ type Option = {
75
+ value: number;
76
+ label: string;
77
+ };
78
+ declare const many2oneButtonController: ({ relation, methods, domain, }: {
79
+ relation: string;
80
+ methods: any;
81
+ domain: any;
82
+ }) => {
83
+ options: Option[];
84
+ };
85
+
86
+ interface Many2ManyControllerProps {
87
+ relation: string;
88
+ domain: any;
89
+ context: any;
90
+ tab: any;
91
+ model: string;
92
+ aid: number;
93
+ setSelectedRowKeys: any;
94
+ fields: any;
95
+ setFields: any;
96
+ groupByDomain: any;
97
+ page: number;
98
+ options: any;
99
+ sessionStorageUtils: any;
100
+ }
101
+ declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
102
+ rows: any[];
103
+ columns: any;
104
+ typeTable: "list" | "group" | "calendar" | undefined;
105
+ handleCreateNewOnPage: () => Promise<void>;
106
+ isLoadedData: boolean;
107
+ domainMany2Many: any;
108
+ isDataLoading: boolean;
109
+ isDataResponseFetched: boolean;
110
+ isPlaceholderData: boolean;
111
+ queryKey: any[];
112
+ data: {
113
+ model: string;
114
+ specification: Record<string, any> | null;
115
+ domain: any;
116
+ offset: number;
117
+ limit: number;
118
+ context: any;
119
+ fields: any;
120
+ groupby: any[];
121
+ sort: string | null;
122
+ };
123
+ specification: Record<string, any> | null;
124
+ enabled: boolean;
125
+ isViewReponseFetched: boolean;
126
+ actionData: any;
127
+ viewResponse: any;
128
+ debouncedPage: number;
129
+ order: undefined;
130
+ default_order: any;
131
+ optionsObject: {} | null;
132
+ setDomainMany2Many: react.Dispatch<any>;
133
+ selectedTags: [];
134
+ initModel: {
135
+ initModel: (modelData: _fctc_interface_logic_dist_index_C_nK1Mii.a) => _fctc_interface_logic.BaseModel;
136
+ };
137
+ modelInstance: _fctc_interface_logic.BaseModel | null;
138
+ baseModel: BaseModelInit;
139
+ dataResponse: any;
140
+ isLoading: boolean;
141
+ setOrder: react.Dispatch<react.SetStateAction<undefined>>;
142
+ };
143
+
144
+ declare const many2manyTagsController: (props: any) => {
145
+ options: any;
146
+ customNoOptionsMessage: () => any;
147
+ tranfer: (data: any) => any;
148
+ dataOfSelection: any;
149
+ isUser: boolean;
150
+ };
151
+
152
+ interface IDurationProps {
153
+ relation?: string;
154
+ defaultValue?: string | number | ValuePropsType;
155
+ domain?: string | [] | any;
156
+ formValues?: Record<string, any>;
157
+ name?: string;
158
+ id?: string | number;
159
+ model?: string;
160
+ onRefetch?: Function;
161
+ }
162
+
163
+ declare const durationController: (props: IDurationProps) => {
164
+ defaultValue: string | number | ValuePropsType | undefined;
165
+ dataResponse: any;
166
+ handleClick: (stage_id: any) => Promise<void>;
167
+ disabled: boolean;
168
+ modelStatus: boolean;
169
+ setModalStatus: react.Dispatch<react.SetStateAction<boolean>>;
170
+ };
171
+
172
+ interface PriorityFieldProps {
173
+ value: any;
174
+ selection: any;
175
+ isForm: boolean;
176
+ name: string;
177
+ methods: any;
178
+ id: string;
179
+ onChange: any;
180
+ model: any;
181
+ actionData: any;
182
+ viewData: any;
183
+ context: any;
184
+ }
185
+ declare const priorityFieldController: (props: PriorityFieldProps) => {
186
+ selection: any;
187
+ isForm: boolean;
188
+ methods: any;
189
+ defaultPriority: number;
190
+ savePriorities: ({ value, resetPriority, }: {
191
+ value: number;
192
+ resetPriority?: () => void;
193
+ }) => Promise<void>;
194
+ label: any;
195
+ id: string;
196
+ onChange: any;
197
+ };
198
+
199
+ declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, value, isDirty, props, }: {
200
+ onChange: any;
201
+ onBlur: any;
202
+ value: any;
203
+ error: any;
204
+ isDirty: any;
205
+ props: WidgetPropsType;
206
+ }) => {
207
+ handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
208
+ handleBlur: () => void;
209
+ handleKeyDown: (e: any) => void;
210
+ input: string;
211
+ errors: string;
212
+ };
213
+
214
+ declare const floatController: ({ onChange, value, props, }: {
215
+ onChange: any;
216
+ value: any;
217
+ props: WidgetPropsType;
218
+ }) => {
219
+ handleInputMouseLeave: () => void;
220
+ handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
221
+ useFormatFloatNumber: (value: number | string) => string;
222
+ inputRef: react.MutableRefObject<HTMLInputElement | null>;
223
+ inputValue: string;
224
+ };
225
+
226
+ declare const downloadFileController: () => {
227
+ inputId: string;
228
+ file: any;
229
+ handleFileChange: (e: any) => void;
230
+ handleFileDownload: () => void;
231
+ };
232
+
233
+ type TDownLoadBinaryProps = {
234
+ value: any;
235
+ defaultValue: any;
236
+ formValues: any;
237
+ };
238
+ declare const downLoadBinaryController: (props: TDownLoadBinaryProps) => {
239
+ handleFileDownload: (e: any) => Promise<void>;
240
+ };
241
+
242
+ declare const dateFieldController: (props: any) => {
243
+ formatDate: string;
244
+ formatDateParse: string;
245
+ range: (start: number, end: number, step?: number) => number[];
246
+ years: number[];
247
+ months_vi: string[];
248
+ months_en: string[];
249
+ customValidateMinMax: (date: any) => boolean;
250
+ minNowValue: boolean | moment.Moment | null;
251
+ maxNowValue: boolean | moment.Moment | null;
252
+ year: typeof year;
253
+ month: typeof month;
254
+ day: typeof day;
255
+ };
256
+
257
+ declare const copyLinkButtonController: (props: any) => {
258
+ isCopied: boolean;
259
+ handleCopyToClipboard: (value: string) => Promise<void>;
260
+ propValue: any;
261
+ };
262
+
263
+ declare const colorWrapperController: (props: ColorWrapperControllerProps) => {
264
+ selectedColor: ColorType;
265
+ showFullColors: boolean;
266
+ setSelectedColor: react.Dispatch<react.SetStateAction<ColorType>>;
267
+ handleShowFullColors: () => void;
268
+ pickColorsRef: react.RefObject<HTMLDivElement>;
269
+ savePickColor: any;
270
+ };
271
+
272
+ interface ColorFieldProps extends IInputFieldProps {
273
+ value?: string | number | ValuePropsType | null | Record<any, any> | any;
274
+ isForm?: boolean;
275
+ name?: string;
276
+ methods?: any;
277
+ onChange?: (name: string, value: any) => void;
278
+ [key: string]: any;
279
+ }
280
+ declare const colorFieldController: (props: ColorFieldProps) => {
281
+ savePickColor: (colorObject: any) => Promise<void>;
282
+ };
283
+
284
+ declare const binaryFieldController: (props: IInputFieldProps) => {
285
+ inputId: string;
286
+ selectedImage: string | null;
287
+ initialImage: any;
288
+ isInsideTable: boolean;
289
+ binaryRef: react.RefObject<HTMLDivElement>;
290
+ handleImageChange: (e: ChangeEvent<HTMLInputElement>, onChange: (file: File | null) => void) => Promise<void>;
291
+ handleRemoveImage: (onChange: (file: File | null) => void) => void;
292
+ checkIsImageLink: (url: string) => boolean;
293
+ getImageBase64WithMimeType: (base64: any) => string | null;
294
+ };
295
+
296
+ declare const ModalConfirm: ({ name, isShowModal, onClick, onClose, title, content, isLoading, }: {
297
+ name: "delete" | "duplicate" | "archive" | "unarchive";
298
+ isShowModal: boolean;
299
+ isLoading?: boolean;
300
+ onClick: () => void;
301
+ onClose: () => void;
302
+ title?: string;
303
+ content?: React.ReactNode;
304
+ }) => JSX.Element;
305
+
306
+ declare const ModalDetail: ({ idToolTip, title, model, idForm, aid, place, renderDetail, context, }: any) => react.ReactPortal;
307
+
308
+ declare const ModalLayer: ({ isOpen, onClose, title, children, }: {
309
+ isOpen: boolean;
310
+ onClose: () => void;
311
+ title?: string;
312
+ children: react__default.ReactNode;
313
+ }) => JSX.Element;
314
+
315
+ declare const LayerLoading: () => JSX.Element;
316
+
317
+ declare const LoadingSmall: () => JSX.Element;
318
+
319
+ interface UseTableProps {
320
+ data: {
321
+ fields: any[];
322
+ records: any[];
323
+ dataModel: {
324
+ [fieldName: string]: {
325
+ string?: string;
326
+ [key: string]: any;
327
+ };
328
+ };
329
+ context: any;
330
+ typeTable?: 'list' | 'group' | 'calendar';
331
+ };
332
+ }
333
+ declare const useTableHandler: ({ data }: UseTableProps) => {
334
+ rows: any[];
335
+ columns: any;
336
+ onToggleColumnOptional: (item: any) => void;
337
+ typeTable: "list" | "group" | "calendar" | undefined;
338
+ };
339
+
340
+ export { ColorType, ColorWrapperControllerProps, IInputFieldProps, LayerLoading, LoadingSmall, ModalConfirm, ModalDetail, ModalLayer, ValuePropsType, WidgetPropsType, binaryFieldController, colorFieldController, colorWrapperController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, floatController, floatTimeFiledController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, statusDropdownController, useTableHandler };