@fctc/widget-logic 1.0.7 → 1.0.9
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/action.d.mts +1 -1
- package/dist/action.d.ts +1 -1
- package/dist/action.js +0 -4
- package/dist/action.mjs +4 -8
- package/dist/form.d.mts +7 -4
- package/dist/form.d.ts +7 -4
- package/dist/form.js +13 -8
- package/dist/form.mjs +14 -9
- package/dist/index.js +13 -12
- package/dist/index.mjs +18 -17
- package/package.json +1 -1
package/dist/action.d.mts
CHANGED
package/dist/action.d.ts
CHANGED
package/dist/action.js
CHANGED
|
@@ -36,7 +36,6 @@ var useArchieveHandler = ({
|
|
|
36
36
|
onSettled
|
|
37
37
|
}) => {
|
|
38
38
|
const archieve = (0, import_interface_logic.useButton)();
|
|
39
|
-
const env = (0, import_interface_logic.getEnv)();
|
|
40
39
|
const handleDuplicateRecord = () => {
|
|
41
40
|
archieve.mutate(
|
|
42
41
|
{
|
|
@@ -64,7 +63,6 @@ var useDuplicateRowHandler = ({
|
|
|
64
63
|
onSettled
|
|
65
64
|
}) => {
|
|
66
65
|
const duplicateRecord = (0, import_interface_logic2.useDuplicateRecord)();
|
|
67
|
-
const env = (0, import_interface_logic2.getEnv)();
|
|
68
66
|
const handleDuplicateRecord = () => {
|
|
69
67
|
duplicateRecord.mutate(
|
|
70
68
|
{
|
|
@@ -91,7 +89,6 @@ var useGetFieldExportHandler = ({
|
|
|
91
89
|
onSettled
|
|
92
90
|
}) => {
|
|
93
91
|
const fieldExport = (0, import_interface_logic3.useGetFieldExport)();
|
|
94
|
-
const env = (0, import_interface_logic3.getEnv)();
|
|
95
92
|
const handleGetFieldExport = () => {
|
|
96
93
|
fieldExport.mutate(
|
|
97
94
|
{
|
|
@@ -125,7 +122,6 @@ var useExportExcelHandler = ({
|
|
|
125
122
|
onSettled
|
|
126
123
|
}) => {
|
|
127
124
|
const exportExcel = (0, import_interface_logic4.useExportExcel)();
|
|
128
|
-
const env = (0, import_interface_logic4.getEnv)();
|
|
129
125
|
const handleExport = () => {
|
|
130
126
|
exportExcel.mutate(
|
|
131
127
|
{
|
package/dist/action.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/action/use-archieve-row.tsx
|
|
2
|
-
import {
|
|
2
|
+
import { useButton } from "@fctc/interface-logic";
|
|
3
3
|
var useArchieveHandler = ({
|
|
4
4
|
data,
|
|
5
5
|
onSuccess,
|
|
@@ -7,7 +7,6 @@ var useArchieveHandler = ({
|
|
|
7
7
|
onSettled
|
|
8
8
|
}) => {
|
|
9
9
|
const archieve = useButton();
|
|
10
|
-
const env = getEnv();
|
|
11
10
|
const handleDuplicateRecord = () => {
|
|
12
11
|
archieve.mutate(
|
|
13
12
|
{
|
|
@@ -27,7 +26,7 @@ var useArchieveHandler = ({
|
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
// src/action/use-duplicate-row.tsx
|
|
30
|
-
import {
|
|
29
|
+
import { useDuplicateRecord } from "@fctc/interface-logic";
|
|
31
30
|
var useDuplicateRowHandler = ({
|
|
32
31
|
data,
|
|
33
32
|
onSuccess,
|
|
@@ -35,7 +34,6 @@ var useDuplicateRowHandler = ({
|
|
|
35
34
|
onSettled
|
|
36
35
|
}) => {
|
|
37
36
|
const duplicateRecord = useDuplicateRecord();
|
|
38
|
-
const env = getEnv2();
|
|
39
37
|
const handleDuplicateRecord = () => {
|
|
40
38
|
duplicateRecord.mutate(
|
|
41
39
|
{
|
|
@@ -54,7 +52,7 @@ var useDuplicateRowHandler = ({
|
|
|
54
52
|
};
|
|
55
53
|
|
|
56
54
|
// src/action/use-get-field-export.tsx
|
|
57
|
-
import {
|
|
55
|
+
import { useGetFieldExport } from "@fctc/interface-logic";
|
|
58
56
|
var useGetFieldExportHandler = ({
|
|
59
57
|
data,
|
|
60
58
|
onSuccess,
|
|
@@ -62,7 +60,6 @@ var useGetFieldExportHandler = ({
|
|
|
62
60
|
onSettled
|
|
63
61
|
}) => {
|
|
64
62
|
const fieldExport = useGetFieldExport();
|
|
65
|
-
const env = getEnv3();
|
|
66
63
|
const handleGetFieldExport = () => {
|
|
67
64
|
fieldExport.mutate(
|
|
68
65
|
{
|
|
@@ -88,7 +85,7 @@ var useGetFieldExportHandler = ({
|
|
|
88
85
|
};
|
|
89
86
|
|
|
90
87
|
// src/action/use-export-excel.tsx
|
|
91
|
-
import { evalJSONDomain,
|
|
88
|
+
import { evalJSONDomain, useExportExcel } from "@fctc/interface-logic";
|
|
92
89
|
var useExportExcelHandler = ({
|
|
93
90
|
data,
|
|
94
91
|
onSuccess,
|
|
@@ -96,7 +93,6 @@ var useExportExcelHandler = ({
|
|
|
96
93
|
onSettled
|
|
97
94
|
}) => {
|
|
98
95
|
const exportExcel = useExportExcel();
|
|
99
|
-
const env = getEnv4();
|
|
100
96
|
const handleExport = () => {
|
|
101
97
|
exportExcel.mutate(
|
|
102
98
|
{
|
package/dist/form.d.mts
CHANGED
|
@@ -9,8 +9,9 @@ interface UseSaveFormProps$1 {
|
|
|
9
9
|
};
|
|
10
10
|
onSuccess?: (res: any) => void;
|
|
11
11
|
onError?: (err: any) => void;
|
|
12
|
+
onSettled?: (err: any) => void;
|
|
12
13
|
}
|
|
13
|
-
declare const UseOnChangeFormHandler: ({ data, onSuccess, onError, }: UseSaveFormProps$1) => () => void;
|
|
14
|
+
declare const UseOnChangeFormHandler: ({ data, onSuccess, onError, onSettled, }: UseSaveFormProps$1) => () => void;
|
|
14
15
|
|
|
15
16
|
interface UseSaveFormProps {
|
|
16
17
|
data: {
|
|
@@ -21,18 +22,20 @@ interface UseSaveFormProps {
|
|
|
21
22
|
};
|
|
22
23
|
onSuccess?: (res: any) => void;
|
|
23
24
|
onError?: (err: any) => void;
|
|
25
|
+
onSettled?: (err: any) => void;
|
|
24
26
|
}
|
|
25
|
-
declare const useSaveFormHandler: ({ data, onSuccess, onError, }: UseSaveFormProps) => () => void;
|
|
27
|
+
declare const useSaveFormHandler: ({ data, onSuccess, onError, onSettled, }: UseSaveFormProps) => () => void;
|
|
26
28
|
|
|
27
29
|
interface UseDeleteProps {
|
|
28
30
|
data: {
|
|
29
|
-
method: string;
|
|
30
31
|
model: string;
|
|
31
32
|
ids: number[];
|
|
33
|
+
context: any;
|
|
32
34
|
};
|
|
33
35
|
onSuccess?: (res: any) => void;
|
|
34
36
|
onError?: (err: any) => void;
|
|
37
|
+
onSettled?: (err: any) => void;
|
|
35
38
|
}
|
|
36
|
-
declare const useRemoveRowHandler: ({ data, onSuccess, onError, }: UseDeleteProps) => () => void;
|
|
39
|
+
declare const useRemoveRowHandler: ({ data, onSuccess, onError, onSettled, }: UseDeleteProps) => () => void;
|
|
37
40
|
|
|
38
41
|
export { UseOnChangeFormHandler, useRemoveRowHandler, useSaveFormHandler };
|
package/dist/form.d.ts
CHANGED
|
@@ -9,8 +9,9 @@ interface UseSaveFormProps$1 {
|
|
|
9
9
|
};
|
|
10
10
|
onSuccess?: (res: any) => void;
|
|
11
11
|
onError?: (err: any) => void;
|
|
12
|
+
onSettled?: (err: any) => void;
|
|
12
13
|
}
|
|
13
|
-
declare const UseOnChangeFormHandler: ({ data, onSuccess, onError, }: UseSaveFormProps$1) => () => void;
|
|
14
|
+
declare const UseOnChangeFormHandler: ({ data, onSuccess, onError, onSettled, }: UseSaveFormProps$1) => () => void;
|
|
14
15
|
|
|
15
16
|
interface UseSaveFormProps {
|
|
16
17
|
data: {
|
|
@@ -21,18 +22,20 @@ interface UseSaveFormProps {
|
|
|
21
22
|
};
|
|
22
23
|
onSuccess?: (res: any) => void;
|
|
23
24
|
onError?: (err: any) => void;
|
|
25
|
+
onSettled?: (err: any) => void;
|
|
24
26
|
}
|
|
25
|
-
declare const useSaveFormHandler: ({ data, onSuccess, onError, }: UseSaveFormProps) => () => void;
|
|
27
|
+
declare const useSaveFormHandler: ({ data, onSuccess, onError, onSettled, }: UseSaveFormProps) => () => void;
|
|
26
28
|
|
|
27
29
|
interface UseDeleteProps {
|
|
28
30
|
data: {
|
|
29
|
-
method: string;
|
|
30
31
|
model: string;
|
|
31
32
|
ids: number[];
|
|
33
|
+
context: any;
|
|
32
34
|
};
|
|
33
35
|
onSuccess?: (res: any) => void;
|
|
34
36
|
onError?: (err: any) => void;
|
|
37
|
+
onSettled?: (err: any) => void;
|
|
35
38
|
}
|
|
36
|
-
declare const useRemoveRowHandler: ({ data, onSuccess, onError, }: UseDeleteProps) => () => void;
|
|
39
|
+
declare const useRemoveRowHandler: ({ data, onSuccess, onError, onSettled, }: UseDeleteProps) => () => void;
|
|
37
40
|
|
|
38
41
|
export { UseOnChangeFormHandler, useRemoveRowHandler, useSaveFormHandler };
|
package/dist/form.js
CHANGED
|
@@ -31,7 +31,8 @@ var import_interface_logic = require("@fctc/interface-logic");
|
|
|
31
31
|
var UseOnChangeFormHandler = ({
|
|
32
32
|
data,
|
|
33
33
|
onSuccess,
|
|
34
|
-
onError
|
|
34
|
+
onError,
|
|
35
|
+
onSettled
|
|
35
36
|
}) => {
|
|
36
37
|
const fetchOnchange = (0, import_interface_logic.useOnChangeForm)();
|
|
37
38
|
const handleOnChangeForm = () => {
|
|
@@ -46,7 +47,8 @@ var UseOnChangeFormHandler = ({
|
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
onSuccess,
|
|
49
|
-
onError
|
|
50
|
+
onError,
|
|
51
|
+
onSettled
|
|
50
52
|
}
|
|
51
53
|
);
|
|
52
54
|
};
|
|
@@ -58,7 +60,8 @@ var import_interface_logic2 = require("@fctc/interface-logic");
|
|
|
58
60
|
var useSaveFormHandler = ({
|
|
59
61
|
data,
|
|
60
62
|
onSuccess,
|
|
61
|
-
onError
|
|
63
|
+
onError,
|
|
64
|
+
onSettled
|
|
62
65
|
}) => {
|
|
63
66
|
const fetchSave = (0, import_interface_logic2.useSave)();
|
|
64
67
|
const handleSaveForm = () => {
|
|
@@ -72,7 +75,8 @@ var useSaveFormHandler = ({
|
|
|
72
75
|
},
|
|
73
76
|
{
|
|
74
77
|
onSuccess,
|
|
75
|
-
onError
|
|
78
|
+
onError,
|
|
79
|
+
onSettled
|
|
76
80
|
}
|
|
77
81
|
);
|
|
78
82
|
};
|
|
@@ -84,20 +88,21 @@ var import_interface_logic3 = require("@fctc/interface-logic");
|
|
|
84
88
|
var useRemoveRowHandler = ({
|
|
85
89
|
data,
|
|
86
90
|
onSuccess,
|
|
87
|
-
onError
|
|
91
|
+
onError,
|
|
92
|
+
onSettled
|
|
88
93
|
}) => {
|
|
89
94
|
const remove = (0, import_interface_logic3.useRemoveRow)();
|
|
90
|
-
const env = (0, import_interface_logic3.getEnv)();
|
|
91
95
|
const handleRemoveRow = () => {
|
|
92
96
|
remove.mutate(
|
|
93
97
|
{
|
|
94
98
|
model: data.model,
|
|
95
99
|
ids: Array.isArray(data.ids) ? [...data.ids] : data.ids,
|
|
96
|
-
context:
|
|
100
|
+
context: data.context
|
|
97
101
|
},
|
|
98
102
|
{
|
|
99
103
|
onSuccess,
|
|
100
|
-
onError
|
|
104
|
+
onError,
|
|
105
|
+
onSettled
|
|
101
106
|
}
|
|
102
107
|
);
|
|
103
108
|
};
|
package/dist/form.mjs
CHANGED
|
@@ -3,7 +3,8 @@ import { useOnChangeForm } from "@fctc/interface-logic";
|
|
|
3
3
|
var UseOnChangeFormHandler = ({
|
|
4
4
|
data,
|
|
5
5
|
onSuccess,
|
|
6
|
-
onError
|
|
6
|
+
onError,
|
|
7
|
+
onSettled
|
|
7
8
|
}) => {
|
|
8
9
|
const fetchOnchange = useOnChangeForm();
|
|
9
10
|
const handleOnChangeForm = () => {
|
|
@@ -18,7 +19,8 @@ var UseOnChangeFormHandler = ({
|
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
onSuccess,
|
|
21
|
-
onError
|
|
22
|
+
onError,
|
|
23
|
+
onSettled
|
|
22
24
|
}
|
|
23
25
|
);
|
|
24
26
|
};
|
|
@@ -30,7 +32,8 @@ import { useSave } from "@fctc/interface-logic";
|
|
|
30
32
|
var useSaveFormHandler = ({
|
|
31
33
|
data,
|
|
32
34
|
onSuccess,
|
|
33
|
-
onError
|
|
35
|
+
onError,
|
|
36
|
+
onSettled
|
|
34
37
|
}) => {
|
|
35
38
|
const fetchSave = useSave();
|
|
36
39
|
const handleSaveForm = () => {
|
|
@@ -44,7 +47,8 @@ var useSaveFormHandler = ({
|
|
|
44
47
|
},
|
|
45
48
|
{
|
|
46
49
|
onSuccess,
|
|
47
|
-
onError
|
|
50
|
+
onError,
|
|
51
|
+
onSettled
|
|
48
52
|
}
|
|
49
53
|
);
|
|
50
54
|
};
|
|
@@ -52,24 +56,25 @@ var useSaveFormHandler = ({
|
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
// src/widget/form/use-remove-row.tsx
|
|
55
|
-
import {
|
|
59
|
+
import { useRemoveRow } from "@fctc/interface-logic";
|
|
56
60
|
var useRemoveRowHandler = ({
|
|
57
61
|
data,
|
|
58
62
|
onSuccess,
|
|
59
|
-
onError
|
|
63
|
+
onError,
|
|
64
|
+
onSettled
|
|
60
65
|
}) => {
|
|
61
66
|
const remove = useRemoveRow();
|
|
62
|
-
const env = getEnv();
|
|
63
67
|
const handleRemoveRow = () => {
|
|
64
68
|
remove.mutate(
|
|
65
69
|
{
|
|
66
70
|
model: data.model,
|
|
67
71
|
ids: Array.isArray(data.ids) ? [...data.ids] : data.ids,
|
|
68
|
-
context:
|
|
72
|
+
context: data.context
|
|
69
73
|
},
|
|
70
74
|
{
|
|
71
75
|
onSuccess,
|
|
72
|
-
onError
|
|
76
|
+
onError,
|
|
77
|
+
onSettled
|
|
73
78
|
}
|
|
74
79
|
);
|
|
75
80
|
};
|
package/dist/index.js
CHANGED
|
@@ -2206,7 +2206,6 @@ var useArchieveHandler = ({
|
|
|
2206
2206
|
onSettled
|
|
2207
2207
|
}) => {
|
|
2208
2208
|
const archieve = (0, import_interface_logic.useButton)();
|
|
2209
|
-
const env = (0, import_interface_logic.getEnv)();
|
|
2210
2209
|
const handleDuplicateRecord = () => {
|
|
2211
2210
|
archieve.mutate(
|
|
2212
2211
|
{
|
|
@@ -2234,7 +2233,6 @@ var useDuplicateRowHandler = ({
|
|
|
2234
2233
|
onSettled
|
|
2235
2234
|
}) => {
|
|
2236
2235
|
const duplicateRecord = (0, import_interface_logic2.useDuplicateRecord)();
|
|
2237
|
-
const env = (0, import_interface_logic2.getEnv)();
|
|
2238
2236
|
const handleDuplicateRecord = () => {
|
|
2239
2237
|
duplicateRecord.mutate(
|
|
2240
2238
|
{
|
|
@@ -2261,7 +2259,6 @@ var useGetFieldExportHandler = ({
|
|
|
2261
2259
|
onSettled
|
|
2262
2260
|
}) => {
|
|
2263
2261
|
const fieldExport = (0, import_interface_logic3.useGetFieldExport)();
|
|
2264
|
-
const env = (0, import_interface_logic3.getEnv)();
|
|
2265
2262
|
const handleGetFieldExport = () => {
|
|
2266
2263
|
fieldExport.mutate(
|
|
2267
2264
|
{
|
|
@@ -2295,7 +2292,6 @@ var useExportExcelHandler = ({
|
|
|
2295
2292
|
onSettled
|
|
2296
2293
|
}) => {
|
|
2297
2294
|
const exportExcel = (0, import_interface_logic4.useExportExcel)();
|
|
2298
|
-
const env = (0, import_interface_logic4.getEnv)();
|
|
2299
2295
|
const handleExport = () => {
|
|
2300
2296
|
exportExcel.mutate(
|
|
2301
2297
|
{
|
|
@@ -2323,7 +2319,8 @@ var import_interface_logic5 = require("@fctc/interface-logic");
|
|
|
2323
2319
|
var UseOnChangeFormHandler = ({
|
|
2324
2320
|
data,
|
|
2325
2321
|
onSuccess,
|
|
2326
|
-
onError
|
|
2322
|
+
onError,
|
|
2323
|
+
onSettled
|
|
2327
2324
|
}) => {
|
|
2328
2325
|
const fetchOnchange = (0, import_interface_logic5.useOnChangeForm)();
|
|
2329
2326
|
const handleOnChangeForm = () => {
|
|
@@ -2338,7 +2335,8 @@ var UseOnChangeFormHandler = ({
|
|
|
2338
2335
|
},
|
|
2339
2336
|
{
|
|
2340
2337
|
onSuccess,
|
|
2341
|
-
onError
|
|
2338
|
+
onError,
|
|
2339
|
+
onSettled
|
|
2342
2340
|
}
|
|
2343
2341
|
);
|
|
2344
2342
|
};
|
|
@@ -2350,7 +2348,8 @@ var import_interface_logic6 = require("@fctc/interface-logic");
|
|
|
2350
2348
|
var useSaveFormHandler = ({
|
|
2351
2349
|
data,
|
|
2352
2350
|
onSuccess,
|
|
2353
|
-
onError
|
|
2351
|
+
onError,
|
|
2352
|
+
onSettled
|
|
2354
2353
|
}) => {
|
|
2355
2354
|
const fetchSave = (0, import_interface_logic6.useSave)();
|
|
2356
2355
|
const handleSaveForm = () => {
|
|
@@ -2364,7 +2363,8 @@ var useSaveFormHandler = ({
|
|
|
2364
2363
|
},
|
|
2365
2364
|
{
|
|
2366
2365
|
onSuccess,
|
|
2367
|
-
onError
|
|
2366
|
+
onError,
|
|
2367
|
+
onSettled
|
|
2368
2368
|
}
|
|
2369
2369
|
);
|
|
2370
2370
|
};
|
|
@@ -2376,20 +2376,21 @@ var import_interface_logic7 = require("@fctc/interface-logic");
|
|
|
2376
2376
|
var useRemoveRowHandler = ({
|
|
2377
2377
|
data,
|
|
2378
2378
|
onSuccess,
|
|
2379
|
-
onError
|
|
2379
|
+
onError,
|
|
2380
|
+
onSettled
|
|
2380
2381
|
}) => {
|
|
2381
2382
|
const remove = (0, import_interface_logic7.useRemoveRow)();
|
|
2382
|
-
const env = (0, import_interface_logic7.getEnv)();
|
|
2383
2383
|
const handleRemoveRow = () => {
|
|
2384
2384
|
remove.mutate(
|
|
2385
2385
|
{
|
|
2386
2386
|
model: data.model,
|
|
2387
2387
|
ids: Array.isArray(data.ids) ? [...data.ids] : data.ids,
|
|
2388
|
-
context:
|
|
2388
|
+
context: data.context
|
|
2389
2389
|
},
|
|
2390
2390
|
{
|
|
2391
2391
|
onSuccess,
|
|
2392
|
-
onError
|
|
2392
|
+
onError,
|
|
2393
|
+
onSettled
|
|
2393
2394
|
}
|
|
2394
2395
|
);
|
|
2395
2396
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -2178,7 +2178,7 @@ var require_react = __commonJS({
|
|
|
2178
2178
|
});
|
|
2179
2179
|
|
|
2180
2180
|
// src/action/use-archieve-row.tsx
|
|
2181
|
-
import {
|
|
2181
|
+
import { useButton } from "@fctc/interface-logic";
|
|
2182
2182
|
var useArchieveHandler = ({
|
|
2183
2183
|
data,
|
|
2184
2184
|
onSuccess,
|
|
@@ -2186,7 +2186,6 @@ var useArchieveHandler = ({
|
|
|
2186
2186
|
onSettled
|
|
2187
2187
|
}) => {
|
|
2188
2188
|
const archieve = useButton();
|
|
2189
|
-
const env = getEnv();
|
|
2190
2189
|
const handleDuplicateRecord = () => {
|
|
2191
2190
|
archieve.mutate(
|
|
2192
2191
|
{
|
|
@@ -2206,7 +2205,7 @@ var useArchieveHandler = ({
|
|
|
2206
2205
|
};
|
|
2207
2206
|
|
|
2208
2207
|
// src/action/use-duplicate-row.tsx
|
|
2209
|
-
import {
|
|
2208
|
+
import { useDuplicateRecord } from "@fctc/interface-logic";
|
|
2210
2209
|
var useDuplicateRowHandler = ({
|
|
2211
2210
|
data,
|
|
2212
2211
|
onSuccess,
|
|
@@ -2214,7 +2213,6 @@ var useDuplicateRowHandler = ({
|
|
|
2214
2213
|
onSettled
|
|
2215
2214
|
}) => {
|
|
2216
2215
|
const duplicateRecord = useDuplicateRecord();
|
|
2217
|
-
const env = getEnv2();
|
|
2218
2216
|
const handleDuplicateRecord = () => {
|
|
2219
2217
|
duplicateRecord.mutate(
|
|
2220
2218
|
{
|
|
@@ -2233,7 +2231,7 @@ var useDuplicateRowHandler = ({
|
|
|
2233
2231
|
};
|
|
2234
2232
|
|
|
2235
2233
|
// src/action/use-get-field-export.tsx
|
|
2236
|
-
import {
|
|
2234
|
+
import { useGetFieldExport } from "@fctc/interface-logic";
|
|
2237
2235
|
var useGetFieldExportHandler = ({
|
|
2238
2236
|
data,
|
|
2239
2237
|
onSuccess,
|
|
@@ -2241,7 +2239,6 @@ var useGetFieldExportHandler = ({
|
|
|
2241
2239
|
onSettled
|
|
2242
2240
|
}) => {
|
|
2243
2241
|
const fieldExport = useGetFieldExport();
|
|
2244
|
-
const env = getEnv3();
|
|
2245
2242
|
const handleGetFieldExport = () => {
|
|
2246
2243
|
fieldExport.mutate(
|
|
2247
2244
|
{
|
|
@@ -2267,7 +2264,7 @@ var useGetFieldExportHandler = ({
|
|
|
2267
2264
|
};
|
|
2268
2265
|
|
|
2269
2266
|
// src/action/use-export-excel.tsx
|
|
2270
|
-
import { evalJSONDomain,
|
|
2267
|
+
import { evalJSONDomain, useExportExcel } from "@fctc/interface-logic";
|
|
2271
2268
|
var useExportExcelHandler = ({
|
|
2272
2269
|
data,
|
|
2273
2270
|
onSuccess,
|
|
@@ -2275,7 +2272,6 @@ var useExportExcelHandler = ({
|
|
|
2275
2272
|
onSettled
|
|
2276
2273
|
}) => {
|
|
2277
2274
|
const exportExcel = useExportExcel();
|
|
2278
|
-
const env = getEnv4();
|
|
2279
2275
|
const handleExport = () => {
|
|
2280
2276
|
exportExcel.mutate(
|
|
2281
2277
|
{
|
|
@@ -2303,7 +2299,8 @@ import { useOnChangeForm } from "@fctc/interface-logic";
|
|
|
2303
2299
|
var UseOnChangeFormHandler = ({
|
|
2304
2300
|
data,
|
|
2305
2301
|
onSuccess,
|
|
2306
|
-
onError
|
|
2302
|
+
onError,
|
|
2303
|
+
onSettled
|
|
2307
2304
|
}) => {
|
|
2308
2305
|
const fetchOnchange = useOnChangeForm();
|
|
2309
2306
|
const handleOnChangeForm = () => {
|
|
@@ -2318,7 +2315,8 @@ var UseOnChangeFormHandler = ({
|
|
|
2318
2315
|
},
|
|
2319
2316
|
{
|
|
2320
2317
|
onSuccess,
|
|
2321
|
-
onError
|
|
2318
|
+
onError,
|
|
2319
|
+
onSettled
|
|
2322
2320
|
}
|
|
2323
2321
|
);
|
|
2324
2322
|
};
|
|
@@ -2330,7 +2328,8 @@ import { useSave } from "@fctc/interface-logic";
|
|
|
2330
2328
|
var useSaveFormHandler = ({
|
|
2331
2329
|
data,
|
|
2332
2330
|
onSuccess,
|
|
2333
|
-
onError
|
|
2331
|
+
onError,
|
|
2332
|
+
onSettled
|
|
2334
2333
|
}) => {
|
|
2335
2334
|
const fetchSave = useSave();
|
|
2336
2335
|
const handleSaveForm = () => {
|
|
@@ -2344,7 +2343,8 @@ var useSaveFormHandler = ({
|
|
|
2344
2343
|
},
|
|
2345
2344
|
{
|
|
2346
2345
|
onSuccess,
|
|
2347
|
-
onError
|
|
2346
|
+
onError,
|
|
2347
|
+
onSettled
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
2350
|
};
|
|
@@ -2352,24 +2352,25 @@ var useSaveFormHandler = ({
|
|
|
2352
2352
|
};
|
|
2353
2353
|
|
|
2354
2354
|
// src/widget/form/use-remove-row.tsx
|
|
2355
|
-
import {
|
|
2355
|
+
import { useRemoveRow } from "@fctc/interface-logic";
|
|
2356
2356
|
var useRemoveRowHandler = ({
|
|
2357
2357
|
data,
|
|
2358
2358
|
onSuccess,
|
|
2359
|
-
onError
|
|
2359
|
+
onError,
|
|
2360
|
+
onSettled
|
|
2360
2361
|
}) => {
|
|
2361
2362
|
const remove = useRemoveRow();
|
|
2362
|
-
const env = getEnv5();
|
|
2363
2363
|
const handleRemoveRow = () => {
|
|
2364
2364
|
remove.mutate(
|
|
2365
2365
|
{
|
|
2366
2366
|
model: data.model,
|
|
2367
2367
|
ids: Array.isArray(data.ids) ? [...data.ids] : data.ids,
|
|
2368
|
-
context:
|
|
2368
|
+
context: data.context
|
|
2369
2369
|
},
|
|
2370
2370
|
{
|
|
2371
2371
|
onSuccess,
|
|
2372
|
-
onError
|
|
2372
|
+
onError,
|
|
2373
|
+
onSettled
|
|
2373
2374
|
}
|
|
2374
2375
|
);
|
|
2375
2376
|
};
|