@fctc/interface-logic 2.9.1 → 2.9.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/hooks.d.mts +15 -1
- package/dist/hooks.d.ts +15 -1
- package/dist/hooks.js +131 -40
- package/dist/hooks.mjs +131 -40
- package/dist/provider.js +131 -40
- package/dist/provider.mjs +131 -40
- package/dist/services.d.mts +21 -7
- package/dist/services.d.ts +21 -7
- package/dist/services.js +83 -26
- package/dist/services.mjs +83 -26
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -57,6 +57,8 @@ declare const useExportExcel: () => _tanstack_react_query.UseMutationResult<any,
|
|
|
57
57
|
importCompat: any;
|
|
58
58
|
context: any;
|
|
59
59
|
groupby: any;
|
|
60
|
+
service?: string;
|
|
61
|
+
xNode?: string;
|
|
60
62
|
}, unknown>;
|
|
61
63
|
|
|
62
64
|
declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -70,10 +72,14 @@ declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<a
|
|
|
70
72
|
name?: any;
|
|
71
73
|
context: any;
|
|
72
74
|
importCompat?: any;
|
|
75
|
+
service?: string;
|
|
76
|
+
xNode?: string;
|
|
73
77
|
}, unknown>;
|
|
74
78
|
|
|
75
|
-
declare const useGetFileExcel: ({ model }: {
|
|
79
|
+
declare const useGetFileExcel: ({ model, service, xNode, }: {
|
|
76
80
|
model: string;
|
|
81
|
+
service?: string;
|
|
82
|
+
xNode?: string;
|
|
77
83
|
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
78
84
|
|
|
79
85
|
declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -81,14 +87,20 @@ declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any
|
|
|
81
87
|
selectedSheet: any;
|
|
82
88
|
isHeader: boolean;
|
|
83
89
|
context: any;
|
|
90
|
+
service?: string;
|
|
91
|
+
xNode?: string;
|
|
84
92
|
}, unknown>;
|
|
85
93
|
|
|
86
94
|
declare const useUploadFileExcel: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
87
95
|
formData: any;
|
|
96
|
+
service?: string;
|
|
97
|
+
xNode?: string;
|
|
88
98
|
}, unknown>;
|
|
89
99
|
|
|
90
100
|
declare const useUploadIdFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
91
101
|
formData: any;
|
|
102
|
+
service?: string;
|
|
103
|
+
xNode?: string;
|
|
92
104
|
}, unknown>;
|
|
93
105
|
|
|
94
106
|
declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -98,6 +110,8 @@ declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<an
|
|
|
98
110
|
options: any;
|
|
99
111
|
dryrun: any;
|
|
100
112
|
context: any;
|
|
113
|
+
service?: string;
|
|
114
|
+
xNode?: string;
|
|
101
115
|
}, unknown>;
|
|
102
116
|
|
|
103
117
|
declare const useChangeStatus: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
package/dist/hooks.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ declare const useExportExcel: () => _tanstack_react_query.UseMutationResult<any,
|
|
|
57
57
|
importCompat: any;
|
|
58
58
|
context: any;
|
|
59
59
|
groupby: any;
|
|
60
|
+
service?: string;
|
|
61
|
+
xNode?: string;
|
|
60
62
|
}, unknown>;
|
|
61
63
|
|
|
62
64
|
declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -70,10 +72,14 @@ declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<a
|
|
|
70
72
|
name?: any;
|
|
71
73
|
context: any;
|
|
72
74
|
importCompat?: any;
|
|
75
|
+
service?: string;
|
|
76
|
+
xNode?: string;
|
|
73
77
|
}, unknown>;
|
|
74
78
|
|
|
75
|
-
declare const useGetFileExcel: ({ model }: {
|
|
79
|
+
declare const useGetFileExcel: ({ model, service, xNode, }: {
|
|
76
80
|
model: string;
|
|
81
|
+
service?: string;
|
|
82
|
+
xNode?: string;
|
|
77
83
|
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
78
84
|
|
|
79
85
|
declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -81,14 +87,20 @@ declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any
|
|
|
81
87
|
selectedSheet: any;
|
|
82
88
|
isHeader: boolean;
|
|
83
89
|
context: any;
|
|
90
|
+
service?: string;
|
|
91
|
+
xNode?: string;
|
|
84
92
|
}, unknown>;
|
|
85
93
|
|
|
86
94
|
declare const useUploadFileExcel: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
87
95
|
formData: any;
|
|
96
|
+
service?: string;
|
|
97
|
+
xNode?: string;
|
|
88
98
|
}, unknown>;
|
|
89
99
|
|
|
90
100
|
declare const useUploadIdFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
91
101
|
formData: any;
|
|
102
|
+
service?: string;
|
|
103
|
+
xNode?: string;
|
|
92
104
|
}, unknown>;
|
|
93
105
|
|
|
94
106
|
declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
@@ -98,6 +110,8 @@ declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<an
|
|
|
98
110
|
options: any;
|
|
99
111
|
dryrun: any;
|
|
100
112
|
context: any;
|
|
113
|
+
service?: string;
|
|
114
|
+
xNode?: string;
|
|
101
115
|
}, unknown>;
|
|
102
116
|
|
|
103
117
|
declare const useChangeStatus: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
package/dist/hooks.js
CHANGED
|
@@ -3429,18 +3429,36 @@ var import_react9 = require("react");
|
|
|
3429
3429
|
function useExcelService() {
|
|
3430
3430
|
const { env } = useEnv();
|
|
3431
3431
|
const uploadFileExcel = (0, import_react9.useCallback)(
|
|
3432
|
-
async ({
|
|
3433
|
-
|
|
3432
|
+
async ({
|
|
3433
|
+
formData,
|
|
3434
|
+
service,
|
|
3435
|
+
xNode
|
|
3436
|
+
}) => {
|
|
3437
|
+
return env.requests.post(
|
|
3438
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3439
|
+
formData,
|
|
3440
|
+
{
|
|
3441
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3442
|
+
},
|
|
3443
|
+
service
|
|
3444
|
+
);
|
|
3434
3445
|
},
|
|
3435
3446
|
[env]
|
|
3436
3447
|
);
|
|
3437
3448
|
const uploadIdFile = (0, import_react9.useCallback)(
|
|
3438
|
-
async ({
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3449
|
+
async ({
|
|
3450
|
+
formData,
|
|
3451
|
+
service,
|
|
3452
|
+
xNode
|
|
3453
|
+
}) => {
|
|
3454
|
+
return env.requests.post(
|
|
3455
|
+
"/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
|
|
3456
|
+
formData,
|
|
3457
|
+
{
|
|
3458
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3459
|
+
},
|
|
3460
|
+
service
|
|
3461
|
+
);
|
|
3444
3462
|
},
|
|
3445
3463
|
[env]
|
|
3446
3464
|
);
|
|
@@ -3449,7 +3467,9 @@ function useExcelService() {
|
|
|
3449
3467
|
id,
|
|
3450
3468
|
selectedSheet,
|
|
3451
3469
|
isHeader,
|
|
3452
|
-
context
|
|
3470
|
+
context,
|
|
3471
|
+
service,
|
|
3472
|
+
xNode
|
|
3453
3473
|
}) => {
|
|
3454
3474
|
const jsonData = {
|
|
3455
3475
|
model: "base_import.import" /* BASE_IMPORT */,
|
|
@@ -3480,11 +3500,14 @@ function useExcelService() {
|
|
|
3480
3500
|
},
|
|
3481
3501
|
with_context: context
|
|
3482
3502
|
};
|
|
3483
|
-
return env.requests.post(
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3503
|
+
return env.requests.post(
|
|
3504
|
+
"/call" /* CALL_PATH */,
|
|
3505
|
+
jsonData,
|
|
3506
|
+
{
|
|
3507
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3508
|
+
},
|
|
3509
|
+
service
|
|
3510
|
+
);
|
|
3488
3511
|
},
|
|
3489
3512
|
[env]
|
|
3490
3513
|
);
|
|
@@ -3495,7 +3518,9 @@ function useExcelService() {
|
|
|
3495
3518
|
idFile,
|
|
3496
3519
|
options,
|
|
3497
3520
|
dryrun,
|
|
3498
|
-
context
|
|
3521
|
+
context,
|
|
3522
|
+
service,
|
|
3523
|
+
xNode
|
|
3499
3524
|
}) => {
|
|
3500
3525
|
const jsonData = {
|
|
3501
3526
|
model: "base_import.import" /* BASE_IMPORT */,
|
|
@@ -3509,22 +3534,36 @@ function useExcelService() {
|
|
|
3509
3534
|
},
|
|
3510
3535
|
with_context: context
|
|
3511
3536
|
};
|
|
3512
|
-
return env.requests.post(
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3537
|
+
return env.requests.post(
|
|
3538
|
+
"/call" /* CALL_PATH */,
|
|
3539
|
+
jsonData,
|
|
3540
|
+
{
|
|
3541
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3542
|
+
},
|
|
3543
|
+
service
|
|
3544
|
+
);
|
|
3517
3545
|
},
|
|
3518
3546
|
[env]
|
|
3519
3547
|
);
|
|
3520
3548
|
const getFileExcel = (0, import_react9.useCallback)(
|
|
3521
|
-
async ({
|
|
3549
|
+
async ({
|
|
3550
|
+
model,
|
|
3551
|
+
service,
|
|
3552
|
+
xNode
|
|
3553
|
+
}) => {
|
|
3522
3554
|
const jsonData = {
|
|
3523
3555
|
model,
|
|
3524
3556
|
method: "get_import_templates" /* GET_IMPORT */,
|
|
3525
3557
|
args: []
|
|
3526
3558
|
};
|
|
3527
|
-
return env.requests.post(
|
|
3559
|
+
return env.requests.post(
|
|
3560
|
+
"/call" /* CALL_PATH */,
|
|
3561
|
+
jsonData,
|
|
3562
|
+
{
|
|
3563
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3564
|
+
},
|
|
3565
|
+
service
|
|
3566
|
+
);
|
|
3528
3567
|
},
|
|
3529
3568
|
[env]
|
|
3530
3569
|
);
|
|
@@ -3539,7 +3578,9 @@ function useExcelService() {
|
|
|
3539
3578
|
prefix,
|
|
3540
3579
|
name,
|
|
3541
3580
|
context,
|
|
3542
|
-
importCompat
|
|
3581
|
+
importCompat,
|
|
3582
|
+
service,
|
|
3583
|
+
xNode
|
|
3543
3584
|
}) => {
|
|
3544
3585
|
const jsonData = {
|
|
3545
3586
|
model,
|
|
@@ -3555,7 +3596,14 @@ function useExcelService() {
|
|
|
3555
3596
|
jsonData.prefix = prefix;
|
|
3556
3597
|
jsonData.exclude = [null];
|
|
3557
3598
|
}
|
|
3558
|
-
return env.requests.post(
|
|
3599
|
+
return env.requests.post(
|
|
3600
|
+
"/export/get_fields",
|
|
3601
|
+
jsonData,
|
|
3602
|
+
{
|
|
3603
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3604
|
+
},
|
|
3605
|
+
service
|
|
3606
|
+
);
|
|
3559
3607
|
},
|
|
3560
3608
|
[env]
|
|
3561
3609
|
);
|
|
@@ -3568,7 +3616,9 @@ function useExcelService() {
|
|
|
3568
3616
|
type,
|
|
3569
3617
|
importCompat,
|
|
3570
3618
|
context,
|
|
3571
|
-
groupby
|
|
3619
|
+
groupby,
|
|
3620
|
+
service,
|
|
3621
|
+
xNode
|
|
3572
3622
|
}) => {
|
|
3573
3623
|
const jsonData = {
|
|
3574
3624
|
model,
|
|
@@ -3579,7 +3629,14 @@ function useExcelService() {
|
|
|
3579
3629
|
with_context: context,
|
|
3580
3630
|
groupby: groupby ?? []
|
|
3581
3631
|
};
|
|
3582
|
-
return env.requests.post_excel(
|
|
3632
|
+
return env.requests.post_excel(
|
|
3633
|
+
`/export/${type}`,
|
|
3634
|
+
jsonData,
|
|
3635
|
+
{
|
|
3636
|
+
headers: { "Content-Type": "application/json", "X-Node": xNode }
|
|
3637
|
+
},
|
|
3638
|
+
service
|
|
3639
|
+
);
|
|
3583
3640
|
},
|
|
3584
3641
|
[env]
|
|
3585
3642
|
);
|
|
@@ -5400,7 +5457,9 @@ var useExportExcel = () => {
|
|
|
5400
5457
|
type,
|
|
5401
5458
|
importCompat,
|
|
5402
5459
|
context,
|
|
5403
|
-
groupby
|
|
5460
|
+
groupby,
|
|
5461
|
+
service,
|
|
5462
|
+
xNode
|
|
5404
5463
|
}) => exportExcel({
|
|
5405
5464
|
model,
|
|
5406
5465
|
domain,
|
|
@@ -5409,7 +5468,9 @@ var useExportExcel = () => {
|
|
|
5409
5468
|
type,
|
|
5410
5469
|
importCompat,
|
|
5411
5470
|
context,
|
|
5412
|
-
groupby
|
|
5471
|
+
groupby,
|
|
5472
|
+
service,
|
|
5473
|
+
xNode
|
|
5413
5474
|
})
|
|
5414
5475
|
});
|
|
5415
5476
|
};
|
|
@@ -5430,7 +5491,9 @@ var useGetFieldExport = () => {
|
|
|
5430
5491
|
prefix,
|
|
5431
5492
|
name,
|
|
5432
5493
|
context,
|
|
5433
|
-
importCompat
|
|
5494
|
+
importCompat,
|
|
5495
|
+
service,
|
|
5496
|
+
xNode
|
|
5434
5497
|
}) => getFieldExport({
|
|
5435
5498
|
ids,
|
|
5436
5499
|
model,
|
|
@@ -5441,7 +5504,9 @@ var useGetFieldExport = () => {
|
|
|
5441
5504
|
prefix,
|
|
5442
5505
|
name,
|
|
5443
5506
|
context,
|
|
5444
|
-
importCompat
|
|
5507
|
+
importCompat,
|
|
5508
|
+
service,
|
|
5509
|
+
xNode
|
|
5445
5510
|
})
|
|
5446
5511
|
});
|
|
5447
5512
|
};
|
|
@@ -5449,12 +5514,18 @@ var use_get_field_export_default = useGetFieldExport;
|
|
|
5449
5514
|
|
|
5450
5515
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5451
5516
|
var import_react_query20 = require("@tanstack/react-query");
|
|
5452
|
-
var useGetFileExcel = ({
|
|
5517
|
+
var useGetFileExcel = ({
|
|
5518
|
+
model,
|
|
5519
|
+
service,
|
|
5520
|
+
xNode
|
|
5521
|
+
}) => {
|
|
5453
5522
|
const { getFileExcel } = useExcelService();
|
|
5454
5523
|
return (0, import_react_query20.useQuery)({
|
|
5455
5524
|
queryKey: [],
|
|
5456
5525
|
queryFn: () => getFileExcel({
|
|
5457
|
-
model
|
|
5526
|
+
model,
|
|
5527
|
+
service,
|
|
5528
|
+
xNode
|
|
5458
5529
|
}).then((res) => {
|
|
5459
5530
|
if (res) {
|
|
5460
5531
|
return res;
|
|
@@ -5475,12 +5546,16 @@ var useParsePreview = () => {
|
|
|
5475
5546
|
id,
|
|
5476
5547
|
selectedSheet,
|
|
5477
5548
|
isHeader,
|
|
5478
|
-
context
|
|
5549
|
+
context,
|
|
5550
|
+
service,
|
|
5551
|
+
xNode
|
|
5479
5552
|
}) => parsePreview({
|
|
5480
5553
|
id,
|
|
5481
5554
|
selectedSheet,
|
|
5482
5555
|
isHeader,
|
|
5483
|
-
context
|
|
5556
|
+
context,
|
|
5557
|
+
service,
|
|
5558
|
+
xNode
|
|
5484
5559
|
})
|
|
5485
5560
|
});
|
|
5486
5561
|
};
|
|
@@ -5491,8 +5566,14 @@ var import_react_query22 = require("@tanstack/react-query");
|
|
|
5491
5566
|
var useUploadFileExcel = () => {
|
|
5492
5567
|
const { uploadFileExcel } = useExcelService();
|
|
5493
5568
|
return (0, import_react_query22.useMutation)({
|
|
5494
|
-
mutationFn: ({
|
|
5495
|
-
formData
|
|
5569
|
+
mutationFn: ({
|
|
5570
|
+
formData,
|
|
5571
|
+
service,
|
|
5572
|
+
xNode
|
|
5573
|
+
}) => uploadFileExcel({
|
|
5574
|
+
formData,
|
|
5575
|
+
service,
|
|
5576
|
+
xNode
|
|
5496
5577
|
})
|
|
5497
5578
|
});
|
|
5498
5579
|
};
|
|
@@ -5503,8 +5584,14 @@ var import_react_query23 = require("@tanstack/react-query");
|
|
|
5503
5584
|
var useUploadIdFile = () => {
|
|
5504
5585
|
const { uploadIdFile } = useExcelService();
|
|
5505
5586
|
return (0, import_react_query23.useMutation)({
|
|
5506
|
-
mutationFn: ({
|
|
5507
|
-
formData
|
|
5587
|
+
mutationFn: ({
|
|
5588
|
+
formData,
|
|
5589
|
+
service,
|
|
5590
|
+
xNode
|
|
5591
|
+
}) => uploadIdFile({
|
|
5592
|
+
formData,
|
|
5593
|
+
service,
|
|
5594
|
+
xNode
|
|
5508
5595
|
})
|
|
5509
5596
|
});
|
|
5510
5597
|
};
|
|
@@ -5521,14 +5608,18 @@ var useExecuteImport = () => {
|
|
|
5521
5608
|
idFile,
|
|
5522
5609
|
options,
|
|
5523
5610
|
dryrun,
|
|
5524
|
-
context
|
|
5611
|
+
context,
|
|
5612
|
+
service,
|
|
5613
|
+
xNode
|
|
5525
5614
|
}) => executeImport({
|
|
5526
5615
|
fields,
|
|
5527
5616
|
columns,
|
|
5528
5617
|
idFile,
|
|
5529
5618
|
options,
|
|
5530
5619
|
dryrun,
|
|
5531
|
-
context
|
|
5620
|
+
context,
|
|
5621
|
+
service,
|
|
5622
|
+
xNode
|
|
5532
5623
|
})
|
|
5533
5624
|
});
|
|
5534
5625
|
};
|