@fctc/interface-logic 2.2.2 → 2.2.4
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/configs.d.mts +6 -6
- package/dist/configs.d.ts +6 -6
- package/dist/configs.js +41 -14
- package/dist/configs.mjs +41 -14
- package/dist/environment.js +41 -14
- package/dist/environment.mjs +41 -14
- package/dist/hooks.d.mts +15 -4
- package/dist/hooks.d.ts +15 -4
- package/dist/hooks.js +193 -93
- package/dist/hooks.mjs +193 -93
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +234 -107
- package/dist/provider.mjs +234 -107
- package/dist/services.d.mts +22 -14
- package/dist/services.d.ts +22 -14
- package/dist/services.js +150 -70
- package/dist/services.mjs +150 -70
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{view-type-BGJfDe73.d.mts → view-type-p4JdAOsz.d.mts} +5 -0
- package/dist/{view-type-BGJfDe73.d.ts → view-type-p4JdAOsz.d.ts} +5 -0
- package/package.json +1 -1
package/dist/services.d.mts
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-p4JdAOsz.mjs';
|
|
2
2
|
|
|
3
3
|
declare function useActionService(): {
|
|
4
|
-
loadAction: ({ idAction, context, }: {
|
|
4
|
+
loadAction: ({ idAction, context, service, }: {
|
|
5
5
|
idAction: number;
|
|
6
6
|
context: ContextApi;
|
|
7
|
+
service?: string;
|
|
7
8
|
}) => Promise<any>;
|
|
8
|
-
callButton: ({ model, ids, context, method, }: {
|
|
9
|
+
callButton: ({ model, ids, context, method, service, }: {
|
|
9
10
|
model: string;
|
|
10
11
|
ids: Record<string, any>[] | any;
|
|
11
12
|
context: ContextApi;
|
|
12
13
|
method: any;
|
|
14
|
+
service?: string;
|
|
13
15
|
}) => Promise<any>;
|
|
14
|
-
removeRows: ({ model, ids, context, }: {
|
|
16
|
+
removeRows: ({ model, ids, context, service, }: {
|
|
15
17
|
model: string;
|
|
16
18
|
ids: Record<string, any>[] | any;
|
|
17
19
|
context: ContextApi;
|
|
20
|
+
service?: string;
|
|
18
21
|
}) => Promise<any>;
|
|
19
|
-
duplicateRecord: ({ model, id, context, }: {
|
|
22
|
+
duplicateRecord: ({ model, id, context, service, }: {
|
|
20
23
|
model: string;
|
|
21
24
|
id: any;
|
|
22
25
|
context: ContextApi;
|
|
26
|
+
service?: string;
|
|
23
27
|
}) => Promise<any>;
|
|
24
28
|
getPrintReportName: ({ id }: {
|
|
25
29
|
id: number;
|
|
@@ -29,9 +33,10 @@ declare function useActionService(): {
|
|
|
29
33
|
report: any;
|
|
30
34
|
db: any;
|
|
31
35
|
}) => Promise<any>;
|
|
32
|
-
runAction: ({ idAction, context, }: {
|
|
36
|
+
runAction: ({ idAction, context, service, }: {
|
|
33
37
|
idAction: number;
|
|
34
38
|
context: ContextApi;
|
|
39
|
+
service?: string;
|
|
35
40
|
}) => Promise<any>;
|
|
36
41
|
};
|
|
37
42
|
|
|
@@ -163,19 +168,21 @@ declare function useModelService(): {
|
|
|
163
168
|
}) => Promise<any>;
|
|
164
169
|
getCurrency: () => Promise<any>;
|
|
165
170
|
getConversionRate: () => Promise<any>;
|
|
166
|
-
getAll: ({ data }: {
|
|
171
|
+
getAll: ({ data, service }: {
|
|
167
172
|
data: any;
|
|
173
|
+
service?: string;
|
|
168
174
|
}) => Promise<any>;
|
|
169
175
|
getListCalendar: ({ data }: {
|
|
170
176
|
data: any;
|
|
171
177
|
}) => Promise<any>;
|
|
172
178
|
getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
|
|
173
|
-
getDetail: ({ ids, model, specification, context }: GetDetailParams) => Promise<any>;
|
|
174
|
-
save: ({ model, ids, data, specification, context, path, }: SaveParams) => Promise<any>;
|
|
175
|
-
deleteApi: ({ ids, model }: DeleteParams) => Promise<any>;
|
|
176
|
-
onChange: ({ ids, model, object, specification, context, fieldChange, }: OnChangeParams) => Promise<any>;
|
|
177
|
-
getListFieldsOnchange: ({ model }: {
|
|
179
|
+
getDetail: ({ ids, model, specification, context, service, }: GetDetailParams) => Promise<any>;
|
|
180
|
+
save: ({ model, ids, data, specification, context, path, service, }: SaveParams) => Promise<any>;
|
|
181
|
+
deleteApi: ({ ids, model, service }: DeleteParams) => Promise<any>;
|
|
182
|
+
onChange: ({ ids, model, object, specification, context, fieldChange, service, }: OnChangeParams) => Promise<any>;
|
|
183
|
+
getListFieldsOnchange: ({ model, service }: {
|
|
178
184
|
model: string;
|
|
185
|
+
service?: string;
|
|
179
186
|
}) => Promise<any>;
|
|
180
187
|
parseORMOdoo: (data: Record<string, any>) => {
|
|
181
188
|
[x: string]: any;
|
|
@@ -195,7 +202,7 @@ declare function useUserService(): {
|
|
|
195
202
|
};
|
|
196
203
|
|
|
197
204
|
declare function useViewService(): {
|
|
198
|
-
getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
|
|
205
|
+
getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
|
|
199
206
|
getMenu: (context: any, specification: any) => Promise<any>;
|
|
200
207
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
201
208
|
getResequence: ({ model, ids, context, offset, }: {
|
|
@@ -204,8 +211,9 @@ declare function useViewService(): {
|
|
|
204
211
|
context: any;
|
|
205
212
|
offset: any;
|
|
206
213
|
}) => Promise<any>;
|
|
207
|
-
getSelectionItem: ({ data }: {
|
|
214
|
+
getSelectionItem: ({ data, service }: {
|
|
208
215
|
data: GetSelectionType;
|
|
216
|
+
service?: string;
|
|
209
217
|
}) => Promise<any>;
|
|
210
218
|
loadMessages: () => Promise<any>;
|
|
211
219
|
getVersion: () => Promise<any>;
|
package/dist/services.d.ts
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-p4JdAOsz.js';
|
|
2
2
|
|
|
3
3
|
declare function useActionService(): {
|
|
4
|
-
loadAction: ({ idAction, context, }: {
|
|
4
|
+
loadAction: ({ idAction, context, service, }: {
|
|
5
5
|
idAction: number;
|
|
6
6
|
context: ContextApi;
|
|
7
|
+
service?: string;
|
|
7
8
|
}) => Promise<any>;
|
|
8
|
-
callButton: ({ model, ids, context, method, }: {
|
|
9
|
+
callButton: ({ model, ids, context, method, service, }: {
|
|
9
10
|
model: string;
|
|
10
11
|
ids: Record<string, any>[] | any;
|
|
11
12
|
context: ContextApi;
|
|
12
13
|
method: any;
|
|
14
|
+
service?: string;
|
|
13
15
|
}) => Promise<any>;
|
|
14
|
-
removeRows: ({ model, ids, context, }: {
|
|
16
|
+
removeRows: ({ model, ids, context, service, }: {
|
|
15
17
|
model: string;
|
|
16
18
|
ids: Record<string, any>[] | any;
|
|
17
19
|
context: ContextApi;
|
|
20
|
+
service?: string;
|
|
18
21
|
}) => Promise<any>;
|
|
19
|
-
duplicateRecord: ({ model, id, context, }: {
|
|
22
|
+
duplicateRecord: ({ model, id, context, service, }: {
|
|
20
23
|
model: string;
|
|
21
24
|
id: any;
|
|
22
25
|
context: ContextApi;
|
|
26
|
+
service?: string;
|
|
23
27
|
}) => Promise<any>;
|
|
24
28
|
getPrintReportName: ({ id }: {
|
|
25
29
|
id: number;
|
|
@@ -29,9 +33,10 @@ declare function useActionService(): {
|
|
|
29
33
|
report: any;
|
|
30
34
|
db: any;
|
|
31
35
|
}) => Promise<any>;
|
|
32
|
-
runAction: ({ idAction, context, }: {
|
|
36
|
+
runAction: ({ idAction, context, service, }: {
|
|
33
37
|
idAction: number;
|
|
34
38
|
context: ContextApi;
|
|
39
|
+
service?: string;
|
|
35
40
|
}) => Promise<any>;
|
|
36
41
|
};
|
|
37
42
|
|
|
@@ -163,19 +168,21 @@ declare function useModelService(): {
|
|
|
163
168
|
}) => Promise<any>;
|
|
164
169
|
getCurrency: () => Promise<any>;
|
|
165
170
|
getConversionRate: () => Promise<any>;
|
|
166
|
-
getAll: ({ data }: {
|
|
171
|
+
getAll: ({ data, service }: {
|
|
167
172
|
data: any;
|
|
173
|
+
service?: string;
|
|
168
174
|
}) => Promise<any>;
|
|
169
175
|
getListCalendar: ({ data }: {
|
|
170
176
|
data: any;
|
|
171
177
|
}) => Promise<any>;
|
|
172
178
|
getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
|
|
173
|
-
getDetail: ({ ids, model, specification, context }: GetDetailParams) => Promise<any>;
|
|
174
|
-
save: ({ model, ids, data, specification, context, path, }: SaveParams) => Promise<any>;
|
|
175
|
-
deleteApi: ({ ids, model }: DeleteParams) => Promise<any>;
|
|
176
|
-
onChange: ({ ids, model, object, specification, context, fieldChange, }: OnChangeParams) => Promise<any>;
|
|
177
|
-
getListFieldsOnchange: ({ model }: {
|
|
179
|
+
getDetail: ({ ids, model, specification, context, service, }: GetDetailParams) => Promise<any>;
|
|
180
|
+
save: ({ model, ids, data, specification, context, path, service, }: SaveParams) => Promise<any>;
|
|
181
|
+
deleteApi: ({ ids, model, service }: DeleteParams) => Promise<any>;
|
|
182
|
+
onChange: ({ ids, model, object, specification, context, fieldChange, service, }: OnChangeParams) => Promise<any>;
|
|
183
|
+
getListFieldsOnchange: ({ model, service }: {
|
|
178
184
|
model: string;
|
|
185
|
+
service?: string;
|
|
179
186
|
}) => Promise<any>;
|
|
180
187
|
parseORMOdoo: (data: Record<string, any>) => {
|
|
181
188
|
[x: string]: any;
|
|
@@ -195,7 +202,7 @@ declare function useUserService(): {
|
|
|
195
202
|
};
|
|
196
203
|
|
|
197
204
|
declare function useViewService(): {
|
|
198
|
-
getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
|
|
205
|
+
getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
|
|
199
206
|
getMenu: (context: any, specification: any) => Promise<any>;
|
|
200
207
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
201
208
|
getResequence: ({ model, ids, context, offset, }: {
|
|
@@ -204,8 +211,9 @@ declare function useViewService(): {
|
|
|
204
211
|
context: any;
|
|
205
212
|
offset: any;
|
|
206
213
|
}) => Promise<any>;
|
|
207
|
-
getSelectionItem: ({ data }: {
|
|
214
|
+
getSelectionItem: ({ data, service }: {
|
|
208
215
|
data: GetSelectionType;
|
|
216
|
+
service?: string;
|
|
209
217
|
}) => Promise<any>;
|
|
210
218
|
loadMessages: () => Promise<any>;
|
|
211
219
|
getVersion: () => Promise<any>;
|
package/dist/services.js
CHANGED
|
@@ -3059,15 +3059,21 @@ function useActionService() {
|
|
|
3059
3059
|
const loadAction = (0, import_react6.useCallback)(
|
|
3060
3060
|
async ({
|
|
3061
3061
|
idAction,
|
|
3062
|
-
context
|
|
3062
|
+
context,
|
|
3063
|
+
service
|
|
3063
3064
|
}) => {
|
|
3064
3065
|
const jsonData = {
|
|
3065
3066
|
action_id: idAction,
|
|
3066
3067
|
with_context: { ...context }
|
|
3067
3068
|
};
|
|
3068
|
-
return env.requests.post(
|
|
3069
|
-
|
|
3070
|
-
|
|
3069
|
+
return env.requests.post(
|
|
3070
|
+
"/load_action" /* LOAD_ACTION */,
|
|
3071
|
+
jsonData,
|
|
3072
|
+
{
|
|
3073
|
+
headers: { "Content-Type": "application/json" }
|
|
3074
|
+
},
|
|
3075
|
+
service
|
|
3076
|
+
);
|
|
3071
3077
|
},
|
|
3072
3078
|
[env]
|
|
3073
3079
|
);
|
|
@@ -3076,7 +3082,8 @@ function useActionService() {
|
|
|
3076
3082
|
model,
|
|
3077
3083
|
ids = [],
|
|
3078
3084
|
context,
|
|
3079
|
-
method
|
|
3085
|
+
method,
|
|
3086
|
+
service
|
|
3080
3087
|
}) => {
|
|
3081
3088
|
try {
|
|
3082
3089
|
const jsonData = {
|
|
@@ -3085,9 +3092,14 @@ function useActionService() {
|
|
|
3085
3092
|
ids,
|
|
3086
3093
|
with_context: context
|
|
3087
3094
|
};
|
|
3088
|
-
return env.requests.post(
|
|
3089
|
-
|
|
3090
|
-
|
|
3095
|
+
return env.requests.post(
|
|
3096
|
+
"/call" /* CALL_PATH */,
|
|
3097
|
+
jsonData,
|
|
3098
|
+
{
|
|
3099
|
+
headers: { "Content-Type": "application/json" }
|
|
3100
|
+
},
|
|
3101
|
+
service
|
|
3102
|
+
);
|
|
3091
3103
|
} catch (error) {
|
|
3092
3104
|
console.error("Error when calling button action:", error);
|
|
3093
3105
|
throw error;
|
|
@@ -3099,7 +3111,8 @@ function useActionService() {
|
|
|
3099
3111
|
async ({
|
|
3100
3112
|
model,
|
|
3101
3113
|
ids,
|
|
3102
|
-
context
|
|
3114
|
+
context,
|
|
3115
|
+
service
|
|
3103
3116
|
}) => {
|
|
3104
3117
|
const jsonData = {
|
|
3105
3118
|
model,
|
|
@@ -3107,9 +3120,14 @@ function useActionService() {
|
|
|
3107
3120
|
ids,
|
|
3108
3121
|
with_context: context
|
|
3109
3122
|
};
|
|
3110
|
-
return env.requests.post(
|
|
3111
|
-
|
|
3112
|
-
|
|
3123
|
+
return env.requests.post(
|
|
3124
|
+
"/call" /* CALL_PATH */,
|
|
3125
|
+
jsonData,
|
|
3126
|
+
{
|
|
3127
|
+
headers: { "Content-Type": "application/json" }
|
|
3128
|
+
},
|
|
3129
|
+
service
|
|
3130
|
+
);
|
|
3113
3131
|
},
|
|
3114
3132
|
[env]
|
|
3115
3133
|
);
|
|
@@ -3117,7 +3135,8 @@ function useActionService() {
|
|
|
3117
3135
|
async ({
|
|
3118
3136
|
model,
|
|
3119
3137
|
id,
|
|
3120
|
-
context
|
|
3138
|
+
context,
|
|
3139
|
+
service
|
|
3121
3140
|
}) => {
|
|
3122
3141
|
const jsonData = {
|
|
3123
3142
|
model,
|
|
@@ -3125,9 +3144,14 @@ function useActionService() {
|
|
|
3125
3144
|
ids: id,
|
|
3126
3145
|
with_context: context
|
|
3127
3146
|
};
|
|
3128
|
-
return env.requests.post(
|
|
3129
|
-
|
|
3130
|
-
|
|
3147
|
+
return env.requests.post(
|
|
3148
|
+
"/call" /* CALL_PATH */,
|
|
3149
|
+
jsonData,
|
|
3150
|
+
{
|
|
3151
|
+
headers: { "Content-Type": "application/json" }
|
|
3152
|
+
},
|
|
3153
|
+
service
|
|
3154
|
+
);
|
|
3131
3155
|
},
|
|
3132
3156
|
[env]
|
|
3133
3157
|
);
|
|
@@ -3170,15 +3194,21 @@ function useActionService() {
|
|
|
3170
3194
|
const runAction = (0, import_react6.useCallback)(
|
|
3171
3195
|
async ({
|
|
3172
3196
|
idAction,
|
|
3173
|
-
context
|
|
3197
|
+
context,
|
|
3198
|
+
service
|
|
3174
3199
|
}) => {
|
|
3175
3200
|
const jsonData = {
|
|
3176
3201
|
action_id: idAction,
|
|
3177
3202
|
with_context: { ...context }
|
|
3178
3203
|
};
|
|
3179
|
-
return env.requests.post(
|
|
3180
|
-
|
|
3181
|
-
|
|
3204
|
+
return env.requests.post(
|
|
3205
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
3206
|
+
jsonData,
|
|
3207
|
+
{
|
|
3208
|
+
headers: { "Content-Type": "application/json" }
|
|
3209
|
+
},
|
|
3210
|
+
service
|
|
3211
|
+
);
|
|
3182
3212
|
},
|
|
3183
3213
|
[env]
|
|
3184
3214
|
);
|
|
@@ -3365,13 +3395,14 @@ function useAuthService() {
|
|
|
3365
3395
|
data.append("client_id", env?.config?.clientId || "");
|
|
3366
3396
|
data.append("redirect_uri", env?.config?.redirectUri || "");
|
|
3367
3397
|
return env?.requests?.post(
|
|
3368
|
-
|
|
3398
|
+
"/token" /* TOKEN_BY_CODE */,
|
|
3369
3399
|
data,
|
|
3370
3400
|
{
|
|
3371
3401
|
headers: {
|
|
3372
3402
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
3373
3403
|
}
|
|
3374
|
-
}
|
|
3404
|
+
},
|
|
3405
|
+
"id"
|
|
3375
3406
|
);
|
|
3376
3407
|
},
|
|
3377
3408
|
[env]
|
|
@@ -3890,7 +3921,7 @@ function useModelService() {
|
|
|
3890
3921
|
});
|
|
3891
3922
|
}, [env]);
|
|
3892
3923
|
const getAll = (0, import_react12.useCallback)(
|
|
3893
|
-
async ({ data }) => {
|
|
3924
|
+
async ({ data, service }) => {
|
|
3894
3925
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3895
3926
|
fields: data.fields,
|
|
3896
3927
|
groupby: data.groupby
|
|
@@ -3911,11 +3942,16 @@ function useModelService() {
|
|
|
3911
3942
|
...jsonReadGroup
|
|
3912
3943
|
}
|
|
3913
3944
|
};
|
|
3914
|
-
return env.requests.post(
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3945
|
+
return env.requests.post(
|
|
3946
|
+
"/call" /* CALL_PATH */,
|
|
3947
|
+
jsonData,
|
|
3948
|
+
{
|
|
3949
|
+
headers: {
|
|
3950
|
+
"Content-Type": "application/json"
|
|
3951
|
+
}
|
|
3952
|
+
},
|
|
3953
|
+
service
|
|
3954
|
+
);
|
|
3919
3955
|
},
|
|
3920
3956
|
[env]
|
|
3921
3957
|
);
|
|
@@ -3983,7 +4019,13 @@ function useModelService() {
|
|
|
3983
4019
|
[env]
|
|
3984
4020
|
);
|
|
3985
4021
|
const getDetail = (0, import_react12.useCallback)(
|
|
3986
|
-
async ({
|
|
4022
|
+
async ({
|
|
4023
|
+
ids = [],
|
|
4024
|
+
model,
|
|
4025
|
+
specification,
|
|
4026
|
+
context,
|
|
4027
|
+
service
|
|
4028
|
+
}) => {
|
|
3987
4029
|
const jsonData = {
|
|
3988
4030
|
model,
|
|
3989
4031
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3993,11 +4035,16 @@ function useModelService() {
|
|
|
3993
4035
|
specification
|
|
3994
4036
|
}
|
|
3995
4037
|
};
|
|
3996
|
-
return env.requests.post(
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4038
|
+
return env.requests.post(
|
|
4039
|
+
"/call" /* CALL_PATH */,
|
|
4040
|
+
jsonData,
|
|
4041
|
+
{
|
|
4042
|
+
headers: {
|
|
4043
|
+
"Content-Type": "application/json"
|
|
4044
|
+
}
|
|
4045
|
+
},
|
|
4046
|
+
service
|
|
4047
|
+
);
|
|
4001
4048
|
},
|
|
4002
4049
|
[env]
|
|
4003
4050
|
);
|
|
@@ -4008,7 +4055,8 @@ function useModelService() {
|
|
|
4008
4055
|
data = {},
|
|
4009
4056
|
specification = {},
|
|
4010
4057
|
context = {},
|
|
4011
|
-
path
|
|
4058
|
+
path,
|
|
4059
|
+
service
|
|
4012
4060
|
}) => {
|
|
4013
4061
|
const jsonData = {
|
|
4014
4062
|
model,
|
|
@@ -4020,26 +4068,36 @@ function useModelService() {
|
|
|
4020
4068
|
specification
|
|
4021
4069
|
}
|
|
4022
4070
|
};
|
|
4023
|
-
return env.requests.post(
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4071
|
+
return env.requests.post(
|
|
4072
|
+
path ?? "/call" /* CALL_PATH */,
|
|
4073
|
+
jsonData,
|
|
4074
|
+
{
|
|
4075
|
+
headers: {
|
|
4076
|
+
"Content-Type": "application/json"
|
|
4077
|
+
}
|
|
4078
|
+
},
|
|
4079
|
+
service
|
|
4080
|
+
);
|
|
4028
4081
|
},
|
|
4029
4082
|
[env]
|
|
4030
4083
|
);
|
|
4031
4084
|
const deleteApi = (0, import_react12.useCallback)(
|
|
4032
|
-
async ({ ids = [], model }) => {
|
|
4085
|
+
async ({ ids = [], model, service }) => {
|
|
4033
4086
|
const jsonData = {
|
|
4034
4087
|
model,
|
|
4035
4088
|
method: "unlink" /* UNLINK */,
|
|
4036
4089
|
ids
|
|
4037
4090
|
};
|
|
4038
|
-
return env.requests.post(
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4091
|
+
return env.requests.post(
|
|
4092
|
+
"/call" /* CALL_PATH */,
|
|
4093
|
+
jsonData,
|
|
4094
|
+
{
|
|
4095
|
+
headers: {
|
|
4096
|
+
"Content-Type": "application/json"
|
|
4097
|
+
}
|
|
4098
|
+
},
|
|
4099
|
+
service
|
|
4100
|
+
);
|
|
4043
4101
|
},
|
|
4044
4102
|
[env]
|
|
4045
4103
|
);
|
|
@@ -4050,7 +4108,8 @@ function useModelService() {
|
|
|
4050
4108
|
object,
|
|
4051
4109
|
specification,
|
|
4052
4110
|
context,
|
|
4053
|
-
fieldChange
|
|
4111
|
+
fieldChange,
|
|
4112
|
+
service
|
|
4054
4113
|
}) => {
|
|
4055
4114
|
const jsonData = {
|
|
4056
4115
|
model,
|
|
@@ -4063,25 +4122,35 @@ function useModelService() {
|
|
|
4063
4122
|
specification
|
|
4064
4123
|
]
|
|
4065
4124
|
};
|
|
4066
|
-
return env.requests.post(
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4125
|
+
return env.requests.post(
|
|
4126
|
+
"/call" /* CALL_PATH */,
|
|
4127
|
+
jsonData,
|
|
4128
|
+
{
|
|
4129
|
+
headers: {
|
|
4130
|
+
"Content-Type": "application/json"
|
|
4131
|
+
}
|
|
4132
|
+
},
|
|
4133
|
+
service
|
|
4134
|
+
);
|
|
4071
4135
|
},
|
|
4072
4136
|
[env]
|
|
4073
4137
|
);
|
|
4074
4138
|
const getListFieldsOnchange = (0, import_react12.useCallback)(
|
|
4075
|
-
async ({ model }) => {
|
|
4139
|
+
async ({ model, service }) => {
|
|
4076
4140
|
const jsonData = {
|
|
4077
4141
|
model,
|
|
4078
4142
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4079
4143
|
};
|
|
4080
|
-
return env.requests.post(
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4144
|
+
return env.requests.post(
|
|
4145
|
+
"/call" /* CALL_PATH */,
|
|
4146
|
+
jsonData,
|
|
4147
|
+
{
|
|
4148
|
+
headers: {
|
|
4149
|
+
"Content-Type": "application/json"
|
|
4150
|
+
}
|
|
4151
|
+
},
|
|
4152
|
+
service
|
|
4153
|
+
);
|
|
4085
4154
|
},
|
|
4086
4155
|
[env]
|
|
4087
4156
|
);
|
|
@@ -4241,7 +4310,8 @@ function useViewService() {
|
|
|
4241
4310
|
views,
|
|
4242
4311
|
context = {},
|
|
4243
4312
|
options = {},
|
|
4244
|
-
aid
|
|
4313
|
+
aid,
|
|
4314
|
+
service
|
|
4245
4315
|
}) => {
|
|
4246
4316
|
const defaultOptions = {
|
|
4247
4317
|
load_filters: true,
|
|
@@ -4257,11 +4327,16 @@ function useViewService() {
|
|
|
4257
4327
|
},
|
|
4258
4328
|
with_context: context
|
|
4259
4329
|
};
|
|
4260
|
-
return env?.requests?.post(
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4330
|
+
return env?.requests?.post(
|
|
4331
|
+
"/call" /* CALL_PATH */,
|
|
4332
|
+
jsonDataView,
|
|
4333
|
+
{
|
|
4334
|
+
headers: {
|
|
4335
|
+
"Content-Type": "application/json"
|
|
4336
|
+
}
|
|
4337
|
+
},
|
|
4338
|
+
service
|
|
4339
|
+
);
|
|
4265
4340
|
},
|
|
4266
4341
|
[env]
|
|
4267
4342
|
);
|
|
@@ -4344,7 +4419,7 @@ function useViewService() {
|
|
|
4344
4419
|
[env]
|
|
4345
4420
|
);
|
|
4346
4421
|
const getSelectionItem = (0, import_react14.useCallback)(
|
|
4347
|
-
async ({ data }) => {
|
|
4422
|
+
async ({ data, service }) => {
|
|
4348
4423
|
const jsonData = {
|
|
4349
4424
|
model: data.model,
|
|
4350
4425
|
ids: [],
|
|
@@ -4362,11 +4437,16 @@ function useViewService() {
|
|
|
4362
4437
|
}
|
|
4363
4438
|
}
|
|
4364
4439
|
};
|
|
4365
|
-
return env?.requests.post(
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4440
|
+
return env?.requests.post(
|
|
4441
|
+
"/call" /* CALL_PATH */,
|
|
4442
|
+
jsonData,
|
|
4443
|
+
{
|
|
4444
|
+
headers: {
|
|
4445
|
+
"Content-Type": "application/json"
|
|
4446
|
+
}
|
|
4447
|
+
},
|
|
4448
|
+
service
|
|
4449
|
+
);
|
|
4370
4450
|
},
|
|
4371
4451
|
[env]
|
|
4372
4452
|
);
|