@fctc/widget-logic 1.1.6 → 1.1.7
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 +9 -62
- package/dist/index.d.ts +9 -62
- package/dist/index.js +2 -35
- package/dist/index.mjs +2 -35
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,15 +3,13 @@ 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';
|
|
9
6
|
import day from 'react-datepicker/dist/day';
|
|
10
7
|
import month from 'react-datepicker/dist/month';
|
|
11
8
|
import year from 'react-datepicker/dist/year';
|
|
12
9
|
import moment from 'moment';
|
|
13
10
|
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState } from './utils.mjs';
|
|
14
11
|
import '@tanstack/react-query';
|
|
12
|
+
import '@fctc/interface-logic';
|
|
15
13
|
|
|
16
14
|
type TStatus = 'normal' | 'done' | 'blocked';
|
|
17
15
|
interface TStatusDropdownFieldProps extends IInputFieldProps {
|
|
@@ -31,21 +29,14 @@ declare const statusDropdownController: (props: TStatusDropdownFieldProps) => {
|
|
|
31
29
|
colors: Record<TStatus, string>;
|
|
32
30
|
};
|
|
33
31
|
|
|
34
|
-
interface
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
relation: any;
|
|
40
|
-
onChange: any;
|
|
41
|
-
value: any;
|
|
42
|
-
context: any;
|
|
43
|
-
options: any;
|
|
44
|
-
showDetail: any;
|
|
45
|
-
actionData: any;
|
|
32
|
+
interface IMany2OneProps extends IInputFieldProps {
|
|
33
|
+
context?: any;
|
|
34
|
+
options?: any;
|
|
35
|
+
showDetail?: boolean;
|
|
36
|
+
actionData?: any;
|
|
46
37
|
}
|
|
47
38
|
|
|
48
|
-
declare const many2oneFieldController: (props:
|
|
39
|
+
declare const many2oneFieldController: (props: IMany2OneProps) => {
|
|
49
40
|
allowShowDetail: any;
|
|
50
41
|
handleClose: () => void;
|
|
51
42
|
handleChooseRecord: (idRecord: number) => void;
|
|
@@ -74,12 +65,9 @@ declare const many2oneButtonController: (props: IInputFieldProps) => {
|
|
|
74
65
|
options: Option[];
|
|
75
66
|
};
|
|
76
67
|
|
|
77
|
-
interface
|
|
78
|
-
relation: string;
|
|
79
|
-
domain: any;
|
|
68
|
+
interface IMany2ManyControllerProps extends IInputFieldProps {
|
|
80
69
|
context: any;
|
|
81
70
|
tab: any;
|
|
82
|
-
model: string;
|
|
83
71
|
aid: number;
|
|
84
72
|
setSelectedRowKeys: any;
|
|
85
73
|
fields: any;
|
|
@@ -90,48 +78,7 @@ interface Many2ManyControllerProps {
|
|
|
90
78
|
sessionStorageUtils: any;
|
|
91
79
|
}
|
|
92
80
|
|
|
93
|
-
declare const many2manyFieldController: (props:
|
|
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
|
-
};
|
|
81
|
+
declare const many2manyFieldController: (props: IMany2ManyControllerProps) => {};
|
|
135
82
|
|
|
136
83
|
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
137
84
|
options: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,15 +3,13 @@ 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';
|
|
9
6
|
import day from 'react-datepicker/dist/day';
|
|
10
7
|
import month from 'react-datepicker/dist/month';
|
|
11
8
|
import year from 'react-datepicker/dist/year';
|
|
12
9
|
import moment from 'moment';
|
|
13
10
|
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState } from './utils.js';
|
|
14
11
|
import '@tanstack/react-query';
|
|
12
|
+
import '@fctc/interface-logic';
|
|
15
13
|
|
|
16
14
|
type TStatus = 'normal' | 'done' | 'blocked';
|
|
17
15
|
interface TStatusDropdownFieldProps extends IInputFieldProps {
|
|
@@ -31,21 +29,14 @@ declare const statusDropdownController: (props: TStatusDropdownFieldProps) => {
|
|
|
31
29
|
colors: Record<TStatus, string>;
|
|
32
30
|
};
|
|
33
31
|
|
|
34
|
-
interface
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
relation: any;
|
|
40
|
-
onChange: any;
|
|
41
|
-
value: any;
|
|
42
|
-
context: any;
|
|
43
|
-
options: any;
|
|
44
|
-
showDetail: any;
|
|
45
|
-
actionData: any;
|
|
32
|
+
interface IMany2OneProps extends IInputFieldProps {
|
|
33
|
+
context?: any;
|
|
34
|
+
options?: any;
|
|
35
|
+
showDetail?: boolean;
|
|
36
|
+
actionData?: any;
|
|
46
37
|
}
|
|
47
38
|
|
|
48
|
-
declare const many2oneFieldController: (props:
|
|
39
|
+
declare const many2oneFieldController: (props: IMany2OneProps) => {
|
|
49
40
|
allowShowDetail: any;
|
|
50
41
|
handleClose: () => void;
|
|
51
42
|
handleChooseRecord: (idRecord: number) => void;
|
|
@@ -74,12 +65,9 @@ declare const many2oneButtonController: (props: IInputFieldProps) => {
|
|
|
74
65
|
options: Option[];
|
|
75
66
|
};
|
|
76
67
|
|
|
77
|
-
interface
|
|
78
|
-
relation: string;
|
|
79
|
-
domain: any;
|
|
68
|
+
interface IMany2ManyControllerProps extends IInputFieldProps {
|
|
80
69
|
context: any;
|
|
81
70
|
tab: any;
|
|
82
|
-
model: string;
|
|
83
71
|
aid: number;
|
|
84
72
|
setSelectedRowKeys: any;
|
|
85
73
|
fields: any;
|
|
@@ -90,48 +78,7 @@ interface Many2ManyControllerProps {
|
|
|
90
78
|
sessionStorageUtils: any;
|
|
91
79
|
}
|
|
92
80
|
|
|
93
|
-
declare const many2manyFieldController: (props:
|
|
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
|
-
};
|
|
81
|
+
declare const many2manyFieldController: (props: IMany2ManyControllerProps) => {};
|
|
135
82
|
|
|
136
83
|
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
137
84
|
options: any;
|
package/dist/index.js
CHANGED
|
@@ -5203,10 +5203,7 @@ var many2manyFieldController = (props) => {
|
|
|
5203
5203
|
const [isLoadedData, setIsLoadedData] = (0, import_react16.useState)(false);
|
|
5204
5204
|
const [domainMany2Many, setDomainMany2Many] = (0, import_react16.useState)(domain);
|
|
5205
5205
|
const env = (0, import_interface_logic16.getEnv)();
|
|
5206
|
-
const {
|
|
5207
|
-
// tableHead,
|
|
5208
|
-
selectedTags
|
|
5209
|
-
} = (0, import_interface_logic16.useAppSelector)(import_interface_logic16.selectSearch);
|
|
5206
|
+
const { selectedTags } = (0, import_interface_logic16.useAppSelector)(import_interface_logic16.selectSearch);
|
|
5210
5207
|
const viewParams = {
|
|
5211
5208
|
model: relation,
|
|
5212
5209
|
views: [
|
|
@@ -5349,37 +5346,7 @@ var many2manyFieldController = (props) => {
|
|
|
5349
5346
|
console.log(error);
|
|
5350
5347
|
}
|
|
5351
5348
|
};
|
|
5352
|
-
return {
|
|
5353
|
-
rows,
|
|
5354
|
-
columns,
|
|
5355
|
-
typeTable,
|
|
5356
|
-
handleCreateNewOnPage,
|
|
5357
|
-
isLoadedData,
|
|
5358
|
-
domainMany2Many,
|
|
5359
|
-
isDataLoading,
|
|
5360
|
-
isDataResponseFetched,
|
|
5361
|
-
isPlaceholderData,
|
|
5362
|
-
queryKey,
|
|
5363
|
-
data,
|
|
5364
|
-
specification,
|
|
5365
|
-
enabled,
|
|
5366
|
-
isViewReponseFetched,
|
|
5367
|
-
actionData,
|
|
5368
|
-
viewResponse,
|
|
5369
|
-
debouncedPage,
|
|
5370
|
-
order,
|
|
5371
|
-
default_order,
|
|
5372
|
-
optionsObject,
|
|
5373
|
-
setDomainMany2Many,
|
|
5374
|
-
// tableHead,
|
|
5375
|
-
selectedTags,
|
|
5376
|
-
initModel,
|
|
5377
|
-
modelInstance,
|
|
5378
|
-
baseModel,
|
|
5379
|
-
dataResponse,
|
|
5380
|
-
isLoading: isDataLoading,
|
|
5381
|
-
setOrder
|
|
5382
|
-
};
|
|
5349
|
+
return {};
|
|
5383
5350
|
};
|
|
5384
5351
|
|
|
5385
5352
|
// src/widget/basic/many2many-tags-field/controller.ts
|
package/dist/index.mjs
CHANGED
|
@@ -5226,10 +5226,7 @@ var many2manyFieldController = (props) => {
|
|
|
5226
5226
|
const [isLoadedData, setIsLoadedData] = useState10(false);
|
|
5227
5227
|
const [domainMany2Many, setDomainMany2Many] = useState10(domain);
|
|
5228
5228
|
const env = getEnv7();
|
|
5229
|
-
const {
|
|
5230
|
-
// tableHead,
|
|
5231
|
-
selectedTags
|
|
5232
|
-
} = useAppSelector6(selectSearch5);
|
|
5229
|
+
const { selectedTags } = useAppSelector6(selectSearch5);
|
|
5233
5230
|
const viewParams = {
|
|
5234
5231
|
model: relation,
|
|
5235
5232
|
views: [
|
|
@@ -5372,37 +5369,7 @@ var many2manyFieldController = (props) => {
|
|
|
5372
5369
|
console.log(error);
|
|
5373
5370
|
}
|
|
5374
5371
|
};
|
|
5375
|
-
return {
|
|
5376
|
-
rows,
|
|
5377
|
-
columns,
|
|
5378
|
-
typeTable,
|
|
5379
|
-
handleCreateNewOnPage,
|
|
5380
|
-
isLoadedData,
|
|
5381
|
-
domainMany2Many,
|
|
5382
|
-
isDataLoading,
|
|
5383
|
-
isDataResponseFetched,
|
|
5384
|
-
isPlaceholderData,
|
|
5385
|
-
queryKey,
|
|
5386
|
-
data,
|
|
5387
|
-
specification,
|
|
5388
|
-
enabled,
|
|
5389
|
-
isViewReponseFetched,
|
|
5390
|
-
actionData,
|
|
5391
|
-
viewResponse,
|
|
5392
|
-
debouncedPage,
|
|
5393
|
-
order,
|
|
5394
|
-
default_order,
|
|
5395
|
-
optionsObject,
|
|
5396
|
-
setDomainMany2Many,
|
|
5397
|
-
// tableHead,
|
|
5398
|
-
selectedTags,
|
|
5399
|
-
initModel,
|
|
5400
|
-
modelInstance,
|
|
5401
|
-
baseModel,
|
|
5402
|
-
dataResponse,
|
|
5403
|
-
isLoading: isDataLoading,
|
|
5404
|
-
setOrder
|
|
5405
|
-
};
|
|
5372
|
+
return {};
|
|
5406
5373
|
};
|
|
5407
5374
|
|
|
5408
5375
|
// src/widget/basic/many2many-tags-field/controller.ts
|