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