@fctc/widget-logic 1.1.4 → 1.1.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.
- package/dist/hooks.d.mts +919 -1
- package/dist/hooks.d.ts +919 -1
- package/dist/hooks.js +530 -9
- package/dist/hooks.mjs +544 -9
- package/dist/index.d.mts +48 -98
- package/dist/index.d.ts +48 -98
- package/dist/index.js +828 -204
- package/dist/index.mjs +827 -180
- package/dist/types.d.mts +4 -98
- package/dist/types.d.ts +4 -98
- package/dist/utils.d.mts +36 -0
- package/dist/utils.d.ts +36 -0
- package/dist/utils.js +277 -0
- package/dist/utils.mjs +239 -0
- package/package.json +10 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { useClickOutside, useDebounce } from './hooks.mjs';
|
|
1
|
+
export { ActionResultType, Context, Record, ViewResponse, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useListData, useListDataType, useMenu, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
|
|
2
2
|
export { CloseIcon, EyeIcon, LoadingIcon } from './icons.mjs';
|
|
3
|
-
import {
|
|
4
|
-
export { ColorType, GoogleLoginType } from './types.mjs';
|
|
3
|
+
import { IInputFieldProps, ValuePropsType } from './types.mjs';
|
|
5
4
|
import * as react from 'react';
|
|
6
5
|
import { ChangeEvent } from 'react';
|
|
7
|
-
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
8
6
|
import * as _fctc_interface_logic from '@fctc/interface-logic';
|
|
9
7
|
import { BaseModelInit } from '@fctc/interface-logic';
|
|
10
8
|
import * as _fctc_interface_logic_dist_index_C_nK1Mii from '@fctc/interface-logic/dist/index-C_nK1Mii';
|
|
@@ -12,26 +10,24 @@ import day from 'react-datepicker/dist/day';
|
|
|
12
10
|
import month from 'react-datepicker/dist/month';
|
|
13
11
|
import year from 'react-datepicker/dist/year';
|
|
14
12
|
import moment from 'moment';
|
|
13
|
+
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState } from './utils.mjs';
|
|
14
|
+
import '@tanstack/react-query';
|
|
15
15
|
|
|
16
16
|
type TStatus = 'normal' | 'done' | 'blocked';
|
|
17
|
-
interface
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
id
|
|
21
|
-
model?: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
state?: string | undefined;
|
|
24
|
-
onRefetch?: Function;
|
|
17
|
+
interface TStatusDropdownFieldProps extends IInputFieldProps {
|
|
18
|
+
state: any;
|
|
19
|
+
selection: any;
|
|
20
|
+
id: any;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
declare const statusDropdownController: (props:
|
|
23
|
+
declare const statusDropdownController: (props: TStatusDropdownFieldProps) => {
|
|
28
24
|
handleClick: (status: any) => Promise<void>;
|
|
29
25
|
buttonRef: react.RefObject<HTMLDivElement>;
|
|
30
26
|
isForm: boolean | undefined;
|
|
31
27
|
setIsOpen: react.Dispatch<react.SetStateAction<boolean>>;
|
|
32
28
|
isOpen: boolean;
|
|
33
29
|
selection: any;
|
|
34
|
-
state:
|
|
30
|
+
state: any;
|
|
35
31
|
colors: Record<TStatus, string>;
|
|
36
32
|
};
|
|
37
33
|
|
|
@@ -58,13 +54,11 @@ declare const many2oneFieldController: (props: Many2OneProps) => {
|
|
|
58
54
|
isFetching: boolean;
|
|
59
55
|
isShowModalMany2Many: boolean;
|
|
60
56
|
options: never[];
|
|
61
|
-
fetchMoreOptions: () => void;
|
|
62
57
|
domainModal: null;
|
|
63
58
|
tempSelectedOption: any;
|
|
64
59
|
setTempSelectedOption: react.Dispatch<any>;
|
|
65
60
|
setDomainModal: react.Dispatch<react.SetStateAction<null>>;
|
|
66
61
|
dataOfSelection: any;
|
|
67
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
|
|
68
62
|
selectOptions: any;
|
|
69
63
|
optionsObject: {};
|
|
70
64
|
contextObject: any;
|
|
@@ -76,11 +70,7 @@ type Option = {
|
|
|
76
70
|
value: number;
|
|
77
71
|
label: string;
|
|
78
72
|
};
|
|
79
|
-
declare const many2oneButtonController: (
|
|
80
|
-
relation: string;
|
|
81
|
-
methods: any;
|
|
82
|
-
domain: any;
|
|
83
|
-
}) => {
|
|
73
|
+
declare const many2oneButtonController: (props: IInputFieldProps) => {
|
|
84
74
|
options: Option[];
|
|
85
75
|
};
|
|
86
76
|
|
|
@@ -103,7 +93,7 @@ interface Many2ManyControllerProps {
|
|
|
103
93
|
declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
|
|
104
94
|
rows: any[];
|
|
105
95
|
columns: any;
|
|
106
|
-
typeTable: "list" | "
|
|
96
|
+
typeTable: "list" | "calendar" | "group" | undefined;
|
|
107
97
|
handleCreateNewOnPage: () => Promise<void>;
|
|
108
98
|
isLoadedData: boolean;
|
|
109
99
|
domainMany2Many: any;
|
|
@@ -143,26 +133,25 @@ declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
|
|
|
143
133
|
setOrder: react.Dispatch<react.SetStateAction<undefined>>;
|
|
144
134
|
};
|
|
145
135
|
|
|
146
|
-
|
|
136
|
+
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
147
137
|
options: any;
|
|
148
|
-
|
|
138
|
+
widget: string;
|
|
139
|
+
placeholderNoOption: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare const many2manyTagsController: (props: IMany2ManyTagFieldProps) => {
|
|
143
|
+
options: any;
|
|
144
|
+
customNoOptionsMessage: () => string;
|
|
149
145
|
tranfer: (data: any) => any;
|
|
150
146
|
dataOfSelection: any;
|
|
151
147
|
isUser: boolean;
|
|
152
148
|
};
|
|
153
149
|
|
|
154
|
-
interface
|
|
155
|
-
|
|
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;
|
|
150
|
+
interface IDurationFieldProps extends IInputFieldProps {
|
|
151
|
+
id: any;
|
|
163
152
|
}
|
|
164
153
|
|
|
165
|
-
declare const durationController: (props:
|
|
154
|
+
declare const durationController: (props: IDurationFieldProps) => {
|
|
166
155
|
defaultValue: string | number | ValuePropsType | undefined;
|
|
167
156
|
dataResponse: any;
|
|
168
157
|
handleClick: (stage_id: any) => Promise<void>;
|
|
@@ -171,23 +160,17 @@ declare const durationController: (props: IDurationProps) => {
|
|
|
171
160
|
setModalStatus: react.Dispatch<react.SetStateAction<boolean>>;
|
|
172
161
|
};
|
|
173
162
|
|
|
174
|
-
interface
|
|
175
|
-
value: any;
|
|
163
|
+
interface IPriorityFieldProps extends IInputFieldProps {
|
|
176
164
|
selection: any;
|
|
177
|
-
|
|
178
|
-
name: string;
|
|
179
|
-
methods: any;
|
|
180
|
-
id: string;
|
|
181
|
-
onChange: any;
|
|
182
|
-
model: any;
|
|
165
|
+
id: any;
|
|
183
166
|
actionData: any;
|
|
184
167
|
viewData: any;
|
|
185
168
|
context: any;
|
|
186
169
|
}
|
|
187
170
|
|
|
188
|
-
declare const priorityFieldController: (props:
|
|
171
|
+
declare const priorityFieldController: (props: IPriorityFieldProps) => {
|
|
189
172
|
selection: any;
|
|
190
|
-
isForm: boolean;
|
|
173
|
+
isForm: boolean | undefined;
|
|
191
174
|
methods: any;
|
|
192
175
|
defaultPriority: number;
|
|
193
176
|
savePriorities: ({ value, resetPriority, }: {
|
|
@@ -195,8 +178,8 @@ declare const priorityFieldController: (props: PriorityFieldProps) => {
|
|
|
195
178
|
resetPriority?: () => void;
|
|
196
179
|
}) => Promise<void>;
|
|
197
180
|
label: any;
|
|
198
|
-
id:
|
|
199
|
-
onChange: any;
|
|
181
|
+
id: any;
|
|
182
|
+
onChange: ((name: string, value: any) => void) | undefined;
|
|
200
183
|
};
|
|
201
184
|
|
|
202
185
|
declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, value, isDirty, props, }: {
|
|
@@ -205,7 +188,7 @@ declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, valu
|
|
|
205
188
|
value: any;
|
|
206
189
|
error: any;
|
|
207
190
|
isDirty: any;
|
|
208
|
-
props:
|
|
191
|
+
props: IInputFieldProps;
|
|
209
192
|
}) => {
|
|
210
193
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
211
194
|
handleBlur: () => void;
|
|
@@ -217,7 +200,7 @@ declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, valu
|
|
|
217
200
|
declare const floatController: ({ onChange, value, props, }: {
|
|
218
201
|
onChange: any;
|
|
219
202
|
value: any;
|
|
220
|
-
props:
|
|
203
|
+
props: IInputFieldProps;
|
|
221
204
|
}) => {
|
|
222
205
|
handleInputMouseLeave: () => void;
|
|
223
206
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -233,24 +216,26 @@ declare const downloadFileController: () => {
|
|
|
233
216
|
handleFileDownload: () => void;
|
|
234
217
|
};
|
|
235
218
|
|
|
236
|
-
|
|
237
|
-
value: any;
|
|
238
|
-
defaultValue: any;
|
|
239
|
-
formValues: any;
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
declare const downLoadBinaryController: (props: TDownLoadBinaryProps) => {
|
|
219
|
+
declare const downLoadBinaryController: (props: IInputFieldProps) => {
|
|
243
220
|
handleFileDownload: (e: any) => Promise<void>;
|
|
244
221
|
};
|
|
245
222
|
|
|
246
|
-
|
|
223
|
+
interface IDateFieldProps extends IInputFieldProps {
|
|
224
|
+
showTime: boolean;
|
|
225
|
+
widget: string;
|
|
226
|
+
min: number | string;
|
|
227
|
+
max: number | string;
|
|
228
|
+
viewData: any;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare const dateFieldController: (props: IDateFieldProps) => {
|
|
247
232
|
formatDate: string;
|
|
248
233
|
formatDateParse: string;
|
|
249
234
|
range: (start: number, end: number, step?: number) => number[];
|
|
250
235
|
years: number[];
|
|
251
236
|
months_vi: string[];
|
|
252
237
|
months_en: string[];
|
|
253
|
-
customValidateMinMax: (date: any) =>
|
|
238
|
+
customValidateMinMax: (date: any) => string | false;
|
|
254
239
|
minNowValue: boolean | moment.Moment | null;
|
|
255
240
|
maxNowValue: boolean | moment.Moment | null;
|
|
256
241
|
year: typeof year;
|
|
@@ -258,31 +243,18 @@ declare const dateFieldController: (props: any) => {
|
|
|
258
243
|
day: typeof day;
|
|
259
244
|
};
|
|
260
245
|
|
|
261
|
-
declare const copyLinkButtonController: (props:
|
|
246
|
+
declare const copyLinkButtonController: (props: IInputFieldProps) => {
|
|
262
247
|
isCopied: boolean;
|
|
263
248
|
handleCopyToClipboard: (value: string) => Promise<void>;
|
|
264
249
|
propValue: any;
|
|
265
250
|
};
|
|
266
251
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
setSelectedColor: react.Dispatch<any>;
|
|
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;
|
|
252
|
+
interface IColorFieldProps extends IInputFieldProps {
|
|
253
|
+
actionData: any;
|
|
254
|
+
idForm: number | string;
|
|
283
255
|
}
|
|
284
256
|
|
|
285
|
-
declare const colorFieldController: (props:
|
|
257
|
+
declare const colorFieldController: (props: IColorFieldProps) => {
|
|
286
258
|
savePickColor: (colorObject: any) => Promise<void>;
|
|
287
259
|
};
|
|
288
260
|
|
|
@@ -298,26 +270,4 @@ declare const binaryFieldController: (props: IInputFieldProps) => {
|
|
|
298
270
|
getImageBase64WithMimeType: (base64: any) => string | null;
|
|
299
271
|
};
|
|
300
272
|
|
|
301
|
-
|
|
302
|
-
data: {
|
|
303
|
-
fields: any[];
|
|
304
|
-
records: any[];
|
|
305
|
-
dataModel: {
|
|
306
|
-
[fieldName: string]: {
|
|
307
|
-
string?: string;
|
|
308
|
-
[key: string]: any;
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
context: any;
|
|
312
|
-
typeTable?: 'list' | 'group' | 'calendar';
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
declare const useTableHandler: ({ data }: UseTableProps) => {
|
|
317
|
-
rows: any[];
|
|
318
|
-
columns: any;
|
|
319
|
-
onToggleColumnOptional: (item: any) => void;
|
|
320
|
-
typeTable: "list" | "group" | "calendar" | undefined;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
export { ColorWrapperControllerProps, IInputFieldProps, ValuePropsType, WidgetPropsType, binaryFieldController, colorFieldController, colorWrapperController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, floatController, floatTimeFiledController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, statusDropdownController, useTableHandler };
|
|
273
|
+
export { IInputFieldProps, ValuePropsType, binaryFieldController, colorFieldController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, floatController, floatTimeFiledController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, statusDropdownController };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { useClickOutside, useDebounce } from './hooks.js';
|
|
1
|
+
export { ActionResultType, Context, Record, ViewResponse, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useListData, useListDataType, useMenu, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
|
|
2
2
|
export { CloseIcon, EyeIcon, LoadingIcon } from './icons.js';
|
|
3
|
-
import {
|
|
4
|
-
export { ColorType, GoogleLoginType } from './types.js';
|
|
3
|
+
import { IInputFieldProps, ValuePropsType } from './types.js';
|
|
5
4
|
import * as react from 'react';
|
|
6
5
|
import { ChangeEvent } from 'react';
|
|
7
|
-
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
8
6
|
import * as _fctc_interface_logic from '@fctc/interface-logic';
|
|
9
7
|
import { BaseModelInit } from '@fctc/interface-logic';
|
|
10
8
|
import * as _fctc_interface_logic_dist_index_C_nK1Mii from '@fctc/interface-logic/dist/index-C_nK1Mii';
|
|
@@ -12,26 +10,24 @@ import day from 'react-datepicker/dist/day';
|
|
|
12
10
|
import month from 'react-datepicker/dist/month';
|
|
13
11
|
import year from 'react-datepicker/dist/year';
|
|
14
12
|
import moment from 'moment';
|
|
13
|
+
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState } from './utils.js';
|
|
14
|
+
import '@tanstack/react-query';
|
|
15
15
|
|
|
16
16
|
type TStatus = 'normal' | 'done' | 'blocked';
|
|
17
|
-
interface
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
id
|
|
21
|
-
model?: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
state?: string | undefined;
|
|
24
|
-
onRefetch?: Function;
|
|
17
|
+
interface TStatusDropdownFieldProps extends IInputFieldProps {
|
|
18
|
+
state: any;
|
|
19
|
+
selection: any;
|
|
20
|
+
id: any;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
declare const statusDropdownController: (props:
|
|
23
|
+
declare const statusDropdownController: (props: TStatusDropdownFieldProps) => {
|
|
28
24
|
handleClick: (status: any) => Promise<void>;
|
|
29
25
|
buttonRef: react.RefObject<HTMLDivElement>;
|
|
30
26
|
isForm: boolean | undefined;
|
|
31
27
|
setIsOpen: react.Dispatch<react.SetStateAction<boolean>>;
|
|
32
28
|
isOpen: boolean;
|
|
33
29
|
selection: any;
|
|
34
|
-
state:
|
|
30
|
+
state: any;
|
|
35
31
|
colors: Record<TStatus, string>;
|
|
36
32
|
};
|
|
37
33
|
|
|
@@ -58,13 +54,11 @@ declare const many2oneFieldController: (props: Many2OneProps) => {
|
|
|
58
54
|
isFetching: boolean;
|
|
59
55
|
isShowModalMany2Many: boolean;
|
|
60
56
|
options: never[];
|
|
61
|
-
fetchMoreOptions: () => void;
|
|
62
57
|
domainModal: null;
|
|
63
58
|
tempSelectedOption: any;
|
|
64
59
|
setTempSelectedOption: react.Dispatch<any>;
|
|
65
60
|
setDomainModal: react.Dispatch<react.SetStateAction<null>>;
|
|
66
61
|
dataOfSelection: any;
|
|
67
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
|
|
68
62
|
selectOptions: any;
|
|
69
63
|
optionsObject: {};
|
|
70
64
|
contextObject: any;
|
|
@@ -76,11 +70,7 @@ type Option = {
|
|
|
76
70
|
value: number;
|
|
77
71
|
label: string;
|
|
78
72
|
};
|
|
79
|
-
declare const many2oneButtonController: (
|
|
80
|
-
relation: string;
|
|
81
|
-
methods: any;
|
|
82
|
-
domain: any;
|
|
83
|
-
}) => {
|
|
73
|
+
declare const many2oneButtonController: (props: IInputFieldProps) => {
|
|
84
74
|
options: Option[];
|
|
85
75
|
};
|
|
86
76
|
|
|
@@ -103,7 +93,7 @@ interface Many2ManyControllerProps {
|
|
|
103
93
|
declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
|
|
104
94
|
rows: any[];
|
|
105
95
|
columns: any;
|
|
106
|
-
typeTable: "list" | "
|
|
96
|
+
typeTable: "list" | "calendar" | "group" | undefined;
|
|
107
97
|
handleCreateNewOnPage: () => Promise<void>;
|
|
108
98
|
isLoadedData: boolean;
|
|
109
99
|
domainMany2Many: any;
|
|
@@ -143,26 +133,25 @@ declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
|
|
|
143
133
|
setOrder: react.Dispatch<react.SetStateAction<undefined>>;
|
|
144
134
|
};
|
|
145
135
|
|
|
146
|
-
|
|
136
|
+
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
147
137
|
options: any;
|
|
148
|
-
|
|
138
|
+
widget: string;
|
|
139
|
+
placeholderNoOption: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare const many2manyTagsController: (props: IMany2ManyTagFieldProps) => {
|
|
143
|
+
options: any;
|
|
144
|
+
customNoOptionsMessage: () => string;
|
|
149
145
|
tranfer: (data: any) => any;
|
|
150
146
|
dataOfSelection: any;
|
|
151
147
|
isUser: boolean;
|
|
152
148
|
};
|
|
153
149
|
|
|
154
|
-
interface
|
|
155
|
-
|
|
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;
|
|
150
|
+
interface IDurationFieldProps extends IInputFieldProps {
|
|
151
|
+
id: any;
|
|
163
152
|
}
|
|
164
153
|
|
|
165
|
-
declare const durationController: (props:
|
|
154
|
+
declare const durationController: (props: IDurationFieldProps) => {
|
|
166
155
|
defaultValue: string | number | ValuePropsType | undefined;
|
|
167
156
|
dataResponse: any;
|
|
168
157
|
handleClick: (stage_id: any) => Promise<void>;
|
|
@@ -171,23 +160,17 @@ declare const durationController: (props: IDurationProps) => {
|
|
|
171
160
|
setModalStatus: react.Dispatch<react.SetStateAction<boolean>>;
|
|
172
161
|
};
|
|
173
162
|
|
|
174
|
-
interface
|
|
175
|
-
value: any;
|
|
163
|
+
interface IPriorityFieldProps extends IInputFieldProps {
|
|
176
164
|
selection: any;
|
|
177
|
-
|
|
178
|
-
name: string;
|
|
179
|
-
methods: any;
|
|
180
|
-
id: string;
|
|
181
|
-
onChange: any;
|
|
182
|
-
model: any;
|
|
165
|
+
id: any;
|
|
183
166
|
actionData: any;
|
|
184
167
|
viewData: any;
|
|
185
168
|
context: any;
|
|
186
169
|
}
|
|
187
170
|
|
|
188
|
-
declare const priorityFieldController: (props:
|
|
171
|
+
declare const priorityFieldController: (props: IPriorityFieldProps) => {
|
|
189
172
|
selection: any;
|
|
190
|
-
isForm: boolean;
|
|
173
|
+
isForm: boolean | undefined;
|
|
191
174
|
methods: any;
|
|
192
175
|
defaultPriority: number;
|
|
193
176
|
savePriorities: ({ value, resetPriority, }: {
|
|
@@ -195,8 +178,8 @@ declare const priorityFieldController: (props: PriorityFieldProps) => {
|
|
|
195
178
|
resetPriority?: () => void;
|
|
196
179
|
}) => Promise<void>;
|
|
197
180
|
label: any;
|
|
198
|
-
id:
|
|
199
|
-
onChange: any;
|
|
181
|
+
id: any;
|
|
182
|
+
onChange: ((name: string, value: any) => void) | undefined;
|
|
200
183
|
};
|
|
201
184
|
|
|
202
185
|
declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, value, isDirty, props, }: {
|
|
@@ -205,7 +188,7 @@ declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, valu
|
|
|
205
188
|
value: any;
|
|
206
189
|
error: any;
|
|
207
190
|
isDirty: any;
|
|
208
|
-
props:
|
|
191
|
+
props: IInputFieldProps;
|
|
209
192
|
}) => {
|
|
210
193
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
211
194
|
handleBlur: () => void;
|
|
@@ -217,7 +200,7 @@ declare const floatTimeFiledController: ({ onChange: fieldOnChange, onBlur, valu
|
|
|
217
200
|
declare const floatController: ({ onChange, value, props, }: {
|
|
218
201
|
onChange: any;
|
|
219
202
|
value: any;
|
|
220
|
-
props:
|
|
203
|
+
props: IInputFieldProps;
|
|
221
204
|
}) => {
|
|
222
205
|
handleInputMouseLeave: () => void;
|
|
223
206
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -233,24 +216,26 @@ declare const downloadFileController: () => {
|
|
|
233
216
|
handleFileDownload: () => void;
|
|
234
217
|
};
|
|
235
218
|
|
|
236
|
-
|
|
237
|
-
value: any;
|
|
238
|
-
defaultValue: any;
|
|
239
|
-
formValues: any;
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
declare const downLoadBinaryController: (props: TDownLoadBinaryProps) => {
|
|
219
|
+
declare const downLoadBinaryController: (props: IInputFieldProps) => {
|
|
243
220
|
handleFileDownload: (e: any) => Promise<void>;
|
|
244
221
|
};
|
|
245
222
|
|
|
246
|
-
|
|
223
|
+
interface IDateFieldProps extends IInputFieldProps {
|
|
224
|
+
showTime: boolean;
|
|
225
|
+
widget: string;
|
|
226
|
+
min: number | string;
|
|
227
|
+
max: number | string;
|
|
228
|
+
viewData: any;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare const dateFieldController: (props: IDateFieldProps) => {
|
|
247
232
|
formatDate: string;
|
|
248
233
|
formatDateParse: string;
|
|
249
234
|
range: (start: number, end: number, step?: number) => number[];
|
|
250
235
|
years: number[];
|
|
251
236
|
months_vi: string[];
|
|
252
237
|
months_en: string[];
|
|
253
|
-
customValidateMinMax: (date: any) =>
|
|
238
|
+
customValidateMinMax: (date: any) => string | false;
|
|
254
239
|
minNowValue: boolean | moment.Moment | null;
|
|
255
240
|
maxNowValue: boolean | moment.Moment | null;
|
|
256
241
|
year: typeof year;
|
|
@@ -258,31 +243,18 @@ declare const dateFieldController: (props: any) => {
|
|
|
258
243
|
day: typeof day;
|
|
259
244
|
};
|
|
260
245
|
|
|
261
|
-
declare const copyLinkButtonController: (props:
|
|
246
|
+
declare const copyLinkButtonController: (props: IInputFieldProps) => {
|
|
262
247
|
isCopied: boolean;
|
|
263
248
|
handleCopyToClipboard: (value: string) => Promise<void>;
|
|
264
249
|
propValue: any;
|
|
265
250
|
};
|
|
266
251
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
setSelectedColor: react.Dispatch<any>;
|
|
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;
|
|
252
|
+
interface IColorFieldProps extends IInputFieldProps {
|
|
253
|
+
actionData: any;
|
|
254
|
+
idForm: number | string;
|
|
283
255
|
}
|
|
284
256
|
|
|
285
|
-
declare const colorFieldController: (props:
|
|
257
|
+
declare const colorFieldController: (props: IColorFieldProps) => {
|
|
286
258
|
savePickColor: (colorObject: any) => Promise<void>;
|
|
287
259
|
};
|
|
288
260
|
|
|
@@ -298,26 +270,4 @@ declare const binaryFieldController: (props: IInputFieldProps) => {
|
|
|
298
270
|
getImageBase64WithMimeType: (base64: any) => string | null;
|
|
299
271
|
};
|
|
300
272
|
|
|
301
|
-
|
|
302
|
-
data: {
|
|
303
|
-
fields: any[];
|
|
304
|
-
records: any[];
|
|
305
|
-
dataModel: {
|
|
306
|
-
[fieldName: string]: {
|
|
307
|
-
string?: string;
|
|
308
|
-
[key: string]: any;
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
context: any;
|
|
312
|
-
typeTable?: 'list' | 'group' | 'calendar';
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
declare const useTableHandler: ({ data }: UseTableProps) => {
|
|
317
|
-
rows: any[];
|
|
318
|
-
columns: any;
|
|
319
|
-
onToggleColumnOptional: (item: any) => void;
|
|
320
|
-
typeTable: "list" | "group" | "calendar" | undefined;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
export { ColorWrapperControllerProps, IInputFieldProps, ValuePropsType, WidgetPropsType, binaryFieldController, colorFieldController, colorWrapperController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, floatController, floatTimeFiledController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, statusDropdownController, useTableHandler };
|
|
273
|
+
export { IInputFieldProps, ValuePropsType, binaryFieldController, colorFieldController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, floatController, floatTimeFiledController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, statusDropdownController };
|