@fctc/widget-logic 1.1.5 → 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/index.d.mts +70 -19
- package/dist/index.d.ts +70 -19
- package/dist/index.js +158 -119
- package/dist/index.mjs +140 -87
- package/package.json +66 -66
package/dist/index.d.mts
CHANGED
|
@@ -3,13 +3,15 @@ export { CloseIcon, EyeIcon, LoadingIcon } from './icons.mjs';
|
|
|
3
3
|
import { IInputFieldProps, ValuePropsType } from './types.mjs';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ChangeEvent } from 'react';
|
|
6
|
+
import * as _fctc_interface_logic from '@fctc/interface-logic';
|
|
7
|
+
import { BaseModelInit } from '@fctc/interface-logic';
|
|
8
|
+
import * as _fctc_interface_logic_dist_index_C_nK1Mii from '@fctc/interface-logic/dist/index-C_nK1Mii';
|
|
6
9
|
import day from 'react-datepicker/dist/day';
|
|
7
10
|
import month from 'react-datepicker/dist/month';
|
|
8
11
|
import year from 'react-datepicker/dist/year';
|
|
9
12
|
import moment from 'moment';
|
|
10
13
|
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState } from './utils.mjs';
|
|
11
14
|
import '@tanstack/react-query';
|
|
12
|
-
import '@fctc/interface-logic';
|
|
13
15
|
|
|
14
16
|
type TStatus = 'normal' | 'done' | 'blocked';
|
|
15
17
|
interface TStatusDropdownFieldProps extends IInputFieldProps {
|
|
@@ -29,34 +31,39 @@ declare const statusDropdownController: (props: TStatusDropdownFieldProps) => {
|
|
|
29
31
|
colors: Record<TStatus, string>;
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
interface Many2OneProps {
|
|
35
|
+
name: string;
|
|
36
|
+
methods: any;
|
|
37
|
+
formValues: any;
|
|
38
|
+
domain: any;
|
|
39
|
+
relation: any;
|
|
40
|
+
onChange: any;
|
|
41
|
+
value: any;
|
|
42
|
+
context: any;
|
|
43
|
+
options: any;
|
|
44
|
+
showDetail: any;
|
|
45
|
+
actionData: any;
|
|
37
46
|
}
|
|
38
47
|
|
|
39
|
-
declare const many2oneFieldController: (props:
|
|
40
|
-
allowShowDetail:
|
|
48
|
+
declare const many2oneFieldController: (props: Many2OneProps) => {
|
|
49
|
+
allowShowDetail: any;
|
|
41
50
|
handleClose: () => void;
|
|
42
51
|
handleChooseRecord: (idRecord: number) => void;
|
|
43
52
|
handleSelectChange: (selectedOption: any) => void;
|
|
44
53
|
initValue: any;
|
|
45
54
|
isFetching: boolean;
|
|
46
55
|
isShowModalMany2Many: boolean;
|
|
47
|
-
options:
|
|
48
|
-
|
|
49
|
-
domainModal: any;
|
|
56
|
+
options: never[];
|
|
57
|
+
domainModal: null;
|
|
50
58
|
tempSelectedOption: any;
|
|
51
|
-
setTempSelectedOption:
|
|
52
|
-
setDomainModal:
|
|
59
|
+
setTempSelectedOption: react.Dispatch<any>;
|
|
60
|
+
setDomainModal: react.Dispatch<react.SetStateAction<null>>;
|
|
53
61
|
dataOfSelection: any;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
optionsObject: any;
|
|
62
|
+
selectOptions: any;
|
|
63
|
+
optionsObject: {};
|
|
57
64
|
contextObject: any;
|
|
58
65
|
actionId: any;
|
|
59
|
-
setIsShowModalMany2Many:
|
|
66
|
+
setIsShowModalMany2Many: react.Dispatch<react.SetStateAction<boolean>>;
|
|
60
67
|
};
|
|
61
68
|
|
|
62
69
|
type Option = {
|
|
@@ -67,9 +74,12 @@ declare const many2oneButtonController: (props: IInputFieldProps) => {
|
|
|
67
74
|
options: Option[];
|
|
68
75
|
};
|
|
69
76
|
|
|
70
|
-
interface
|
|
77
|
+
interface Many2ManyControllerProps {
|
|
78
|
+
relation: string;
|
|
79
|
+
domain: any;
|
|
71
80
|
context: any;
|
|
72
81
|
tab: any;
|
|
82
|
+
model: string;
|
|
73
83
|
aid: number;
|
|
74
84
|
setSelectedRowKeys: any;
|
|
75
85
|
fields: any;
|
|
@@ -80,7 +90,48 @@ interface IMany2ManyControllerProps extends IInputFieldProps {
|
|
|
80
90
|
sessionStorageUtils: any;
|
|
81
91
|
}
|
|
82
92
|
|
|
83
|
-
declare const many2manyFieldController: (props:
|
|
93
|
+
declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
|
|
94
|
+
rows: any[];
|
|
95
|
+
columns: any;
|
|
96
|
+
typeTable: "list" | "calendar" | "group" | undefined;
|
|
97
|
+
handleCreateNewOnPage: () => Promise<void>;
|
|
98
|
+
isLoadedData: boolean;
|
|
99
|
+
domainMany2Many: any;
|
|
100
|
+
isDataLoading: boolean;
|
|
101
|
+
isDataResponseFetched: boolean;
|
|
102
|
+
isPlaceholderData: boolean;
|
|
103
|
+
queryKey: any[];
|
|
104
|
+
data: {
|
|
105
|
+
model: string;
|
|
106
|
+
specification: Record<string, any> | null;
|
|
107
|
+
domain: any;
|
|
108
|
+
offset: number;
|
|
109
|
+
limit: number;
|
|
110
|
+
context: any;
|
|
111
|
+
fields: any;
|
|
112
|
+
groupby: any[];
|
|
113
|
+
sort: string | null;
|
|
114
|
+
};
|
|
115
|
+
specification: Record<string, any> | null;
|
|
116
|
+
enabled: boolean;
|
|
117
|
+
isViewReponseFetched: boolean;
|
|
118
|
+
actionData: any;
|
|
119
|
+
viewResponse: any;
|
|
120
|
+
debouncedPage: number;
|
|
121
|
+
order: undefined;
|
|
122
|
+
default_order: any;
|
|
123
|
+
optionsObject: {} | null;
|
|
124
|
+
setDomainMany2Many: react.Dispatch<any>;
|
|
125
|
+
selectedTags: [];
|
|
126
|
+
initModel: {
|
|
127
|
+
initModel: (modelData: _fctc_interface_logic_dist_index_C_nK1Mii.a) => _fctc_interface_logic.BaseModel;
|
|
128
|
+
};
|
|
129
|
+
modelInstance: _fctc_interface_logic.BaseModel | null;
|
|
130
|
+
baseModel: BaseModelInit;
|
|
131
|
+
dataResponse: any;
|
|
132
|
+
isLoading: boolean;
|
|
133
|
+
setOrder: react.Dispatch<react.SetStateAction<undefined>>;
|
|
134
|
+
};
|
|
84
135
|
|
|
85
136
|
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
86
137
|
options: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ export { CloseIcon, EyeIcon, LoadingIcon } from './icons.js';
|
|
|
3
3
|
import { IInputFieldProps, ValuePropsType } from './types.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ChangeEvent } from 'react';
|
|
6
|
+
import * as _fctc_interface_logic from '@fctc/interface-logic';
|
|
7
|
+
import { BaseModelInit } from '@fctc/interface-logic';
|
|
8
|
+
import * as _fctc_interface_logic_dist_index_C_nK1Mii from '@fctc/interface-logic/dist/index-C_nK1Mii';
|
|
6
9
|
import day from 'react-datepicker/dist/day';
|
|
7
10
|
import month from 'react-datepicker/dist/month';
|
|
8
11
|
import year from 'react-datepicker/dist/year';
|
|
9
12
|
import moment from 'moment';
|
|
10
13
|
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState } from './utils.js';
|
|
11
14
|
import '@tanstack/react-query';
|
|
12
|
-
import '@fctc/interface-logic';
|
|
13
15
|
|
|
14
16
|
type TStatus = 'normal' | 'done' | 'blocked';
|
|
15
17
|
interface TStatusDropdownFieldProps extends IInputFieldProps {
|
|
@@ -29,34 +31,39 @@ declare const statusDropdownController: (props: TStatusDropdownFieldProps) => {
|
|
|
29
31
|
colors: Record<TStatus, string>;
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
interface Many2OneProps {
|
|
35
|
+
name: string;
|
|
36
|
+
methods: any;
|
|
37
|
+
formValues: any;
|
|
38
|
+
domain: any;
|
|
39
|
+
relation: any;
|
|
40
|
+
onChange: any;
|
|
41
|
+
value: any;
|
|
42
|
+
context: any;
|
|
43
|
+
options: any;
|
|
44
|
+
showDetail: any;
|
|
45
|
+
actionData: any;
|
|
37
46
|
}
|
|
38
47
|
|
|
39
|
-
declare const many2oneFieldController: (props:
|
|
40
|
-
allowShowDetail:
|
|
48
|
+
declare const many2oneFieldController: (props: Many2OneProps) => {
|
|
49
|
+
allowShowDetail: any;
|
|
41
50
|
handleClose: () => void;
|
|
42
51
|
handleChooseRecord: (idRecord: number) => void;
|
|
43
52
|
handleSelectChange: (selectedOption: any) => void;
|
|
44
53
|
initValue: any;
|
|
45
54
|
isFetching: boolean;
|
|
46
55
|
isShowModalMany2Many: boolean;
|
|
47
|
-
options:
|
|
48
|
-
|
|
49
|
-
domainModal: any;
|
|
56
|
+
options: never[];
|
|
57
|
+
domainModal: null;
|
|
50
58
|
tempSelectedOption: any;
|
|
51
|
-
setTempSelectedOption:
|
|
52
|
-
setDomainModal:
|
|
59
|
+
setTempSelectedOption: react.Dispatch<any>;
|
|
60
|
+
setDomainModal: react.Dispatch<react.SetStateAction<null>>;
|
|
53
61
|
dataOfSelection: any;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
optionsObject: any;
|
|
62
|
+
selectOptions: any;
|
|
63
|
+
optionsObject: {};
|
|
57
64
|
contextObject: any;
|
|
58
65
|
actionId: any;
|
|
59
|
-
setIsShowModalMany2Many:
|
|
66
|
+
setIsShowModalMany2Many: react.Dispatch<react.SetStateAction<boolean>>;
|
|
60
67
|
};
|
|
61
68
|
|
|
62
69
|
type Option = {
|
|
@@ -67,9 +74,12 @@ declare const many2oneButtonController: (props: IInputFieldProps) => {
|
|
|
67
74
|
options: Option[];
|
|
68
75
|
};
|
|
69
76
|
|
|
70
|
-
interface
|
|
77
|
+
interface Many2ManyControllerProps {
|
|
78
|
+
relation: string;
|
|
79
|
+
domain: any;
|
|
71
80
|
context: any;
|
|
72
81
|
tab: any;
|
|
82
|
+
model: string;
|
|
73
83
|
aid: number;
|
|
74
84
|
setSelectedRowKeys: any;
|
|
75
85
|
fields: any;
|
|
@@ -80,7 +90,48 @@ interface IMany2ManyControllerProps extends IInputFieldProps {
|
|
|
80
90
|
sessionStorageUtils: any;
|
|
81
91
|
}
|
|
82
92
|
|
|
83
|
-
declare const many2manyFieldController: (props:
|
|
93
|
+
declare const many2manyFieldController: (props: Many2ManyControllerProps) => {
|
|
94
|
+
rows: any[];
|
|
95
|
+
columns: any;
|
|
96
|
+
typeTable: "list" | "calendar" | "group" | undefined;
|
|
97
|
+
handleCreateNewOnPage: () => Promise<void>;
|
|
98
|
+
isLoadedData: boolean;
|
|
99
|
+
domainMany2Many: any;
|
|
100
|
+
isDataLoading: boolean;
|
|
101
|
+
isDataResponseFetched: boolean;
|
|
102
|
+
isPlaceholderData: boolean;
|
|
103
|
+
queryKey: any[];
|
|
104
|
+
data: {
|
|
105
|
+
model: string;
|
|
106
|
+
specification: Record<string, any> | null;
|
|
107
|
+
domain: any;
|
|
108
|
+
offset: number;
|
|
109
|
+
limit: number;
|
|
110
|
+
context: any;
|
|
111
|
+
fields: any;
|
|
112
|
+
groupby: any[];
|
|
113
|
+
sort: string | null;
|
|
114
|
+
};
|
|
115
|
+
specification: Record<string, any> | null;
|
|
116
|
+
enabled: boolean;
|
|
117
|
+
isViewReponseFetched: boolean;
|
|
118
|
+
actionData: any;
|
|
119
|
+
viewResponse: any;
|
|
120
|
+
debouncedPage: number;
|
|
121
|
+
order: undefined;
|
|
122
|
+
default_order: any;
|
|
123
|
+
optionsObject: {} | null;
|
|
124
|
+
setDomainMany2Many: react.Dispatch<any>;
|
|
125
|
+
selectedTags: [];
|
|
126
|
+
initModel: {
|
|
127
|
+
initModel: (modelData: _fctc_interface_logic_dist_index_C_nK1Mii.a) => _fctc_interface_logic.BaseModel;
|
|
128
|
+
};
|
|
129
|
+
modelInstance: _fctc_interface_logic.BaseModel | null;
|
|
130
|
+
baseModel: BaseModelInit;
|
|
131
|
+
dataResponse: any;
|
|
132
|
+
isLoading: boolean;
|
|
133
|
+
setOrder: react.Dispatch<react.SetStateAction<undefined>>;
|
|
134
|
+
};
|
|
84
135
|
|
|
85
136
|
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
86
137
|
options: any;
|