@fctc/interface-logic 2.2.2 → 2.2.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/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 +194 -99
- package/dist/hooks.mjs +194 -99
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +235 -113
- package/dist/provider.mjs +235 -113
- package/dist/services.d.mts +22 -14
- package/dist/services.d.ts +22 -14
- package/dist/services.js +151 -76
- package/dist/services.mjs +151 -76
- 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 +85 -85
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
|
);
|
|
@@ -3364,15 +3394,11 @@ function useAuthService() {
|
|
|
3364
3394
|
data.append("grant_type", "authorization_code");
|
|
3365
3395
|
data.append("client_id", env?.config?.clientId || "");
|
|
3366
3396
|
data.append("redirect_uri", env?.config?.redirectUri || "");
|
|
3367
|
-
return env?.requests?.post(
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
{
|
|
3371
|
-
headers: {
|
|
3372
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
3373
|
-
}
|
|
3397
|
+
return env?.requests?.post("/token" /* TOKEN_BY_CODE */, data, {
|
|
3398
|
+
headers: {
|
|
3399
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3374
3400
|
}
|
|
3375
|
-
);
|
|
3401
|
+
});
|
|
3376
3402
|
},
|
|
3377
3403
|
[env]
|
|
3378
3404
|
);
|
|
@@ -3890,7 +3916,7 @@ function useModelService() {
|
|
|
3890
3916
|
});
|
|
3891
3917
|
}, [env]);
|
|
3892
3918
|
const getAll = (0, import_react12.useCallback)(
|
|
3893
|
-
async ({ data }) => {
|
|
3919
|
+
async ({ data, service }) => {
|
|
3894
3920
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3895
3921
|
fields: data.fields,
|
|
3896
3922
|
groupby: data.groupby
|
|
@@ -3911,11 +3937,16 @@ function useModelService() {
|
|
|
3911
3937
|
...jsonReadGroup
|
|
3912
3938
|
}
|
|
3913
3939
|
};
|
|
3914
|
-
return env.requests.post(
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3940
|
+
return env.requests.post(
|
|
3941
|
+
"/call" /* CALL_PATH */,
|
|
3942
|
+
jsonData,
|
|
3943
|
+
{
|
|
3944
|
+
headers: {
|
|
3945
|
+
"Content-Type": "application/json"
|
|
3946
|
+
}
|
|
3947
|
+
},
|
|
3948
|
+
service
|
|
3949
|
+
);
|
|
3919
3950
|
},
|
|
3920
3951
|
[env]
|
|
3921
3952
|
);
|
|
@@ -3983,7 +4014,13 @@ function useModelService() {
|
|
|
3983
4014
|
[env]
|
|
3984
4015
|
);
|
|
3985
4016
|
const getDetail = (0, import_react12.useCallback)(
|
|
3986
|
-
async ({
|
|
4017
|
+
async ({
|
|
4018
|
+
ids = [],
|
|
4019
|
+
model,
|
|
4020
|
+
specification,
|
|
4021
|
+
context,
|
|
4022
|
+
service
|
|
4023
|
+
}) => {
|
|
3987
4024
|
const jsonData = {
|
|
3988
4025
|
model,
|
|
3989
4026
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3993,11 +4030,16 @@ function useModelService() {
|
|
|
3993
4030
|
specification
|
|
3994
4031
|
}
|
|
3995
4032
|
};
|
|
3996
|
-
return env.requests.post(
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4033
|
+
return env.requests.post(
|
|
4034
|
+
"/call" /* CALL_PATH */,
|
|
4035
|
+
jsonData,
|
|
4036
|
+
{
|
|
4037
|
+
headers: {
|
|
4038
|
+
"Content-Type": "application/json"
|
|
4039
|
+
}
|
|
4040
|
+
},
|
|
4041
|
+
service
|
|
4042
|
+
);
|
|
4001
4043
|
},
|
|
4002
4044
|
[env]
|
|
4003
4045
|
);
|
|
@@ -4008,7 +4050,8 @@ function useModelService() {
|
|
|
4008
4050
|
data = {},
|
|
4009
4051
|
specification = {},
|
|
4010
4052
|
context = {},
|
|
4011
|
-
path
|
|
4053
|
+
path,
|
|
4054
|
+
service
|
|
4012
4055
|
}) => {
|
|
4013
4056
|
const jsonData = {
|
|
4014
4057
|
model,
|
|
@@ -4020,26 +4063,36 @@ function useModelService() {
|
|
|
4020
4063
|
specification
|
|
4021
4064
|
}
|
|
4022
4065
|
};
|
|
4023
|
-
return env.requests.post(
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4066
|
+
return env.requests.post(
|
|
4067
|
+
path ?? "/call" /* CALL_PATH */,
|
|
4068
|
+
jsonData,
|
|
4069
|
+
{
|
|
4070
|
+
headers: {
|
|
4071
|
+
"Content-Type": "application/json"
|
|
4072
|
+
}
|
|
4073
|
+
},
|
|
4074
|
+
service
|
|
4075
|
+
);
|
|
4028
4076
|
},
|
|
4029
4077
|
[env]
|
|
4030
4078
|
);
|
|
4031
4079
|
const deleteApi = (0, import_react12.useCallback)(
|
|
4032
|
-
async ({ ids = [], model }) => {
|
|
4080
|
+
async ({ ids = [], model, service }) => {
|
|
4033
4081
|
const jsonData = {
|
|
4034
4082
|
model,
|
|
4035
4083
|
method: "unlink" /* UNLINK */,
|
|
4036
4084
|
ids
|
|
4037
4085
|
};
|
|
4038
|
-
return env.requests.post(
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4086
|
+
return env.requests.post(
|
|
4087
|
+
"/call" /* CALL_PATH */,
|
|
4088
|
+
jsonData,
|
|
4089
|
+
{
|
|
4090
|
+
headers: {
|
|
4091
|
+
"Content-Type": "application/json"
|
|
4092
|
+
}
|
|
4093
|
+
},
|
|
4094
|
+
service
|
|
4095
|
+
);
|
|
4043
4096
|
},
|
|
4044
4097
|
[env]
|
|
4045
4098
|
);
|
|
@@ -4050,7 +4103,8 @@ function useModelService() {
|
|
|
4050
4103
|
object,
|
|
4051
4104
|
specification,
|
|
4052
4105
|
context,
|
|
4053
|
-
fieldChange
|
|
4106
|
+
fieldChange,
|
|
4107
|
+
service
|
|
4054
4108
|
}) => {
|
|
4055
4109
|
const jsonData = {
|
|
4056
4110
|
model,
|
|
@@ -4063,25 +4117,35 @@ function useModelService() {
|
|
|
4063
4117
|
specification
|
|
4064
4118
|
]
|
|
4065
4119
|
};
|
|
4066
|
-
return env.requests.post(
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4120
|
+
return env.requests.post(
|
|
4121
|
+
"/call" /* CALL_PATH */,
|
|
4122
|
+
jsonData,
|
|
4123
|
+
{
|
|
4124
|
+
headers: {
|
|
4125
|
+
"Content-Type": "application/json"
|
|
4126
|
+
}
|
|
4127
|
+
},
|
|
4128
|
+
service
|
|
4129
|
+
);
|
|
4071
4130
|
},
|
|
4072
4131
|
[env]
|
|
4073
4132
|
);
|
|
4074
4133
|
const getListFieldsOnchange = (0, import_react12.useCallback)(
|
|
4075
|
-
async ({ model }) => {
|
|
4134
|
+
async ({ model, service }) => {
|
|
4076
4135
|
const jsonData = {
|
|
4077
4136
|
model,
|
|
4078
4137
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4079
4138
|
};
|
|
4080
|
-
return env.requests.post(
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4139
|
+
return env.requests.post(
|
|
4140
|
+
"/call" /* CALL_PATH */,
|
|
4141
|
+
jsonData,
|
|
4142
|
+
{
|
|
4143
|
+
headers: {
|
|
4144
|
+
"Content-Type": "application/json"
|
|
4145
|
+
}
|
|
4146
|
+
},
|
|
4147
|
+
service
|
|
4148
|
+
);
|
|
4085
4149
|
},
|
|
4086
4150
|
[env]
|
|
4087
4151
|
);
|
|
@@ -4241,7 +4305,8 @@ function useViewService() {
|
|
|
4241
4305
|
views,
|
|
4242
4306
|
context = {},
|
|
4243
4307
|
options = {},
|
|
4244
|
-
aid
|
|
4308
|
+
aid,
|
|
4309
|
+
service
|
|
4245
4310
|
}) => {
|
|
4246
4311
|
const defaultOptions = {
|
|
4247
4312
|
load_filters: true,
|
|
@@ -4257,11 +4322,16 @@ function useViewService() {
|
|
|
4257
4322
|
},
|
|
4258
4323
|
with_context: context
|
|
4259
4324
|
};
|
|
4260
|
-
return env?.requests?.post(
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4325
|
+
return env?.requests?.post(
|
|
4326
|
+
"/call" /* CALL_PATH */,
|
|
4327
|
+
jsonDataView,
|
|
4328
|
+
{
|
|
4329
|
+
headers: {
|
|
4330
|
+
"Content-Type": "application/json"
|
|
4331
|
+
}
|
|
4332
|
+
},
|
|
4333
|
+
service
|
|
4334
|
+
);
|
|
4265
4335
|
},
|
|
4266
4336
|
[env]
|
|
4267
4337
|
);
|
|
@@ -4344,7 +4414,7 @@ function useViewService() {
|
|
|
4344
4414
|
[env]
|
|
4345
4415
|
);
|
|
4346
4416
|
const getSelectionItem = (0, import_react14.useCallback)(
|
|
4347
|
-
async ({ data }) => {
|
|
4417
|
+
async ({ data, service }) => {
|
|
4348
4418
|
const jsonData = {
|
|
4349
4419
|
model: data.model,
|
|
4350
4420
|
ids: [],
|
|
@@ -4362,11 +4432,16 @@ function useViewService() {
|
|
|
4362
4432
|
}
|
|
4363
4433
|
}
|
|
4364
4434
|
};
|
|
4365
|
-
return env?.requests.post(
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4435
|
+
return env?.requests.post(
|
|
4436
|
+
"/call" /* CALL_PATH */,
|
|
4437
|
+
jsonData,
|
|
4438
|
+
{
|
|
4439
|
+
headers: {
|
|
4440
|
+
"Content-Type": "application/json"
|
|
4441
|
+
}
|
|
4442
|
+
},
|
|
4443
|
+
service
|
|
4444
|
+
);
|
|
4370
4445
|
},
|
|
4371
4446
|
[env]
|
|
4372
4447
|
);
|