@fctc/interface-logic 2.1.5 → 2.2.1
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 +44 -22
- package/dist/configs.mjs +44 -22
- package/dist/constants.d.mts +0 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -1
- package/dist/constants.mjs +0 -1
- package/dist/environment.js +44 -22
- package/dist/environment.mjs +44 -22
- package/dist/hooks.d.mts +16 -4
- package/dist/hooks.d.ts +16 -4
- package/dist/hooks.js +199 -96
- package/dist/hooks.mjs +199 -96
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +243 -118
- package/dist/provider.mjs +243 -118
- package/dist/services.d.mts +23 -15
- package/dist/services.d.ts +23 -15
- package/dist/services.js +150 -71
- package/dist/services.mjs +150 -71
- 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
|
|
|
@@ -51,7 +56,7 @@ declare function useAuthService(): {
|
|
|
51
56
|
}) => Promise<any>;
|
|
52
57
|
updatePassword: (data: UpdatePasswordRequest, token: string | null) => Promise<any>;
|
|
53
58
|
isValidToken: (token: string | null) => Promise<any>;
|
|
54
|
-
isValidActionToken: (actionToken: string | null) => Promise<any>;
|
|
59
|
+
isValidActionToken: (actionToken: string | null, path: string) => Promise<any>;
|
|
55
60
|
loginSocial: ({ db, state, access_token, }: {
|
|
56
61
|
db: string;
|
|
57
62
|
state: object;
|
|
@@ -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
|
|
|
@@ -51,7 +56,7 @@ declare function useAuthService(): {
|
|
|
51
56
|
}) => Promise<any>;
|
|
52
57
|
updatePassword: (data: UpdatePasswordRequest, token: string | null) => Promise<any>;
|
|
53
58
|
isValidToken: (token: string | null) => Promise<any>;
|
|
54
|
-
isValidActionToken: (actionToken: string | null) => Promise<any>;
|
|
59
|
+
isValidActionToken: (actionToken: string | null, path: string) => Promise<any>;
|
|
55
60
|
loginSocial: ({ db, state, access_token, }: {
|
|
56
61
|
db: string;
|
|
57
62
|
state: object;
|
|
@@ -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
|
@@ -66,7 +66,6 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
66
66
|
UriConstants2["IMAGE_PATH"] = `/web/image`;
|
|
67
67
|
UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
|
|
68
68
|
UriConstants2["TOKEN"] = `/check_token`;
|
|
69
|
-
UriConstants2["VALIDATE_ACTION_TOKEN"] = "/action-token/validate";
|
|
70
69
|
UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
|
|
71
70
|
UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
|
|
72
71
|
UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
|
|
@@ -3059,15 +3058,21 @@ function useActionService() {
|
|
|
3059
3058
|
const loadAction = (0, import_react6.useCallback)(
|
|
3060
3059
|
async ({
|
|
3061
3060
|
idAction,
|
|
3062
|
-
context
|
|
3061
|
+
context,
|
|
3062
|
+
service
|
|
3063
3063
|
}) => {
|
|
3064
3064
|
const jsonData = {
|
|
3065
3065
|
action_id: idAction,
|
|
3066
3066
|
with_context: { ...context }
|
|
3067
3067
|
};
|
|
3068
|
-
return env.requests.post(
|
|
3069
|
-
|
|
3070
|
-
|
|
3068
|
+
return env.requests.post(
|
|
3069
|
+
"/load_action" /* LOAD_ACTION */,
|
|
3070
|
+
jsonData,
|
|
3071
|
+
{
|
|
3072
|
+
headers: { "Content-Type": "application/json" }
|
|
3073
|
+
},
|
|
3074
|
+
service
|
|
3075
|
+
);
|
|
3071
3076
|
},
|
|
3072
3077
|
[env]
|
|
3073
3078
|
);
|
|
@@ -3076,7 +3081,8 @@ function useActionService() {
|
|
|
3076
3081
|
model,
|
|
3077
3082
|
ids = [],
|
|
3078
3083
|
context,
|
|
3079
|
-
method
|
|
3084
|
+
method,
|
|
3085
|
+
service
|
|
3080
3086
|
}) => {
|
|
3081
3087
|
try {
|
|
3082
3088
|
const jsonData = {
|
|
@@ -3085,9 +3091,14 @@ function useActionService() {
|
|
|
3085
3091
|
ids,
|
|
3086
3092
|
with_context: context
|
|
3087
3093
|
};
|
|
3088
|
-
return env.requests.post(
|
|
3089
|
-
|
|
3090
|
-
|
|
3094
|
+
return env.requests.post(
|
|
3095
|
+
"/call" /* CALL_PATH */,
|
|
3096
|
+
jsonData,
|
|
3097
|
+
{
|
|
3098
|
+
headers: { "Content-Type": "application/json" }
|
|
3099
|
+
},
|
|
3100
|
+
service
|
|
3101
|
+
);
|
|
3091
3102
|
} catch (error) {
|
|
3092
3103
|
console.error("Error when calling button action:", error);
|
|
3093
3104
|
throw error;
|
|
@@ -3099,7 +3110,8 @@ function useActionService() {
|
|
|
3099
3110
|
async ({
|
|
3100
3111
|
model,
|
|
3101
3112
|
ids,
|
|
3102
|
-
context
|
|
3113
|
+
context,
|
|
3114
|
+
service
|
|
3103
3115
|
}) => {
|
|
3104
3116
|
const jsonData = {
|
|
3105
3117
|
model,
|
|
@@ -3107,9 +3119,14 @@ function useActionService() {
|
|
|
3107
3119
|
ids,
|
|
3108
3120
|
with_context: context
|
|
3109
3121
|
};
|
|
3110
|
-
return env.requests.post(
|
|
3111
|
-
|
|
3112
|
-
|
|
3122
|
+
return env.requests.post(
|
|
3123
|
+
"/call" /* CALL_PATH */,
|
|
3124
|
+
jsonData,
|
|
3125
|
+
{
|
|
3126
|
+
headers: { "Content-Type": "application/json" }
|
|
3127
|
+
},
|
|
3128
|
+
service
|
|
3129
|
+
);
|
|
3113
3130
|
},
|
|
3114
3131
|
[env]
|
|
3115
3132
|
);
|
|
@@ -3117,7 +3134,8 @@ function useActionService() {
|
|
|
3117
3134
|
async ({
|
|
3118
3135
|
model,
|
|
3119
3136
|
id,
|
|
3120
|
-
context
|
|
3137
|
+
context,
|
|
3138
|
+
service
|
|
3121
3139
|
}) => {
|
|
3122
3140
|
const jsonData = {
|
|
3123
3141
|
model,
|
|
@@ -3125,9 +3143,14 @@ function useActionService() {
|
|
|
3125
3143
|
ids: id,
|
|
3126
3144
|
with_context: context
|
|
3127
3145
|
};
|
|
3128
|
-
return env.requests.post(
|
|
3129
|
-
|
|
3130
|
-
|
|
3146
|
+
return env.requests.post(
|
|
3147
|
+
"/call" /* CALL_PATH */,
|
|
3148
|
+
jsonData,
|
|
3149
|
+
{
|
|
3150
|
+
headers: { "Content-Type": "application/json" }
|
|
3151
|
+
},
|
|
3152
|
+
service
|
|
3153
|
+
);
|
|
3131
3154
|
},
|
|
3132
3155
|
[env]
|
|
3133
3156
|
);
|
|
@@ -3170,15 +3193,21 @@ function useActionService() {
|
|
|
3170
3193
|
const runAction = (0, import_react6.useCallback)(
|
|
3171
3194
|
async ({
|
|
3172
3195
|
idAction,
|
|
3173
|
-
context
|
|
3196
|
+
context,
|
|
3197
|
+
service
|
|
3174
3198
|
}) => {
|
|
3175
3199
|
const jsonData = {
|
|
3176
3200
|
action_id: idAction,
|
|
3177
3201
|
with_context: { ...context }
|
|
3178
3202
|
};
|
|
3179
|
-
return env.requests.post(
|
|
3180
|
-
|
|
3181
|
-
|
|
3203
|
+
return env.requests.post(
|
|
3204
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
3205
|
+
jsonData,
|
|
3206
|
+
{
|
|
3207
|
+
headers: { "Content-Type": "application/json" }
|
|
3208
|
+
},
|
|
3209
|
+
service
|
|
3210
|
+
);
|
|
3182
3211
|
},
|
|
3183
3212
|
[env]
|
|
3184
3213
|
);
|
|
@@ -3321,9 +3350,9 @@ function useAuthService() {
|
|
|
3321
3350
|
[env]
|
|
3322
3351
|
);
|
|
3323
3352
|
const isValidActionToken = (0, import_react7.useCallback)(
|
|
3324
|
-
async (actionToken) => {
|
|
3353
|
+
async (actionToken, path) => {
|
|
3325
3354
|
return env?.requests?.post(
|
|
3326
|
-
|
|
3355
|
+
path,
|
|
3327
3356
|
{},
|
|
3328
3357
|
{
|
|
3329
3358
|
headers: {
|
|
@@ -3893,7 +3922,7 @@ function useModelService() {
|
|
|
3893
3922
|
});
|
|
3894
3923
|
}, [env]);
|
|
3895
3924
|
const getAll = (0, import_react12.useCallback)(
|
|
3896
|
-
async ({ data }) => {
|
|
3925
|
+
async ({ data, service }) => {
|
|
3897
3926
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3898
3927
|
fields: data.fields,
|
|
3899
3928
|
groupby: data.groupby
|
|
@@ -3914,11 +3943,16 @@ function useModelService() {
|
|
|
3914
3943
|
...jsonReadGroup
|
|
3915
3944
|
}
|
|
3916
3945
|
};
|
|
3917
|
-
return env.requests.post(
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3946
|
+
return env.requests.post(
|
|
3947
|
+
"/call" /* CALL_PATH */,
|
|
3948
|
+
jsonData,
|
|
3949
|
+
{
|
|
3950
|
+
headers: {
|
|
3951
|
+
"Content-Type": "application/json"
|
|
3952
|
+
}
|
|
3953
|
+
},
|
|
3954
|
+
service
|
|
3955
|
+
);
|
|
3922
3956
|
},
|
|
3923
3957
|
[env]
|
|
3924
3958
|
);
|
|
@@ -3986,7 +4020,13 @@ function useModelService() {
|
|
|
3986
4020
|
[env]
|
|
3987
4021
|
);
|
|
3988
4022
|
const getDetail = (0, import_react12.useCallback)(
|
|
3989
|
-
async ({
|
|
4023
|
+
async ({
|
|
4024
|
+
ids = [],
|
|
4025
|
+
model,
|
|
4026
|
+
specification,
|
|
4027
|
+
context,
|
|
4028
|
+
service
|
|
4029
|
+
}) => {
|
|
3990
4030
|
const jsonData = {
|
|
3991
4031
|
model,
|
|
3992
4032
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3996,11 +4036,16 @@ function useModelService() {
|
|
|
3996
4036
|
specification
|
|
3997
4037
|
}
|
|
3998
4038
|
};
|
|
3999
|
-
return env.requests.post(
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4039
|
+
return env.requests.post(
|
|
4040
|
+
"/call" /* CALL_PATH */,
|
|
4041
|
+
jsonData,
|
|
4042
|
+
{
|
|
4043
|
+
headers: {
|
|
4044
|
+
"Content-Type": "application/json"
|
|
4045
|
+
}
|
|
4046
|
+
},
|
|
4047
|
+
service
|
|
4048
|
+
);
|
|
4004
4049
|
},
|
|
4005
4050
|
[env]
|
|
4006
4051
|
);
|
|
@@ -4011,7 +4056,8 @@ function useModelService() {
|
|
|
4011
4056
|
data = {},
|
|
4012
4057
|
specification = {},
|
|
4013
4058
|
context = {},
|
|
4014
|
-
path
|
|
4059
|
+
path,
|
|
4060
|
+
service
|
|
4015
4061
|
}) => {
|
|
4016
4062
|
const jsonData = {
|
|
4017
4063
|
model,
|
|
@@ -4023,26 +4069,36 @@ function useModelService() {
|
|
|
4023
4069
|
specification
|
|
4024
4070
|
}
|
|
4025
4071
|
};
|
|
4026
|
-
return env.requests.post(
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4072
|
+
return env.requests.post(
|
|
4073
|
+
path ?? "/call" /* CALL_PATH */,
|
|
4074
|
+
jsonData,
|
|
4075
|
+
{
|
|
4076
|
+
headers: {
|
|
4077
|
+
"Content-Type": "application/json"
|
|
4078
|
+
}
|
|
4079
|
+
},
|
|
4080
|
+
service
|
|
4081
|
+
);
|
|
4031
4082
|
},
|
|
4032
4083
|
[env]
|
|
4033
4084
|
);
|
|
4034
4085
|
const deleteApi = (0, import_react12.useCallback)(
|
|
4035
|
-
async ({ ids = [], model }) => {
|
|
4086
|
+
async ({ ids = [], model, service }) => {
|
|
4036
4087
|
const jsonData = {
|
|
4037
4088
|
model,
|
|
4038
4089
|
method: "unlink" /* UNLINK */,
|
|
4039
4090
|
ids
|
|
4040
4091
|
};
|
|
4041
|
-
return env.requests.post(
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4092
|
+
return env.requests.post(
|
|
4093
|
+
"/call" /* CALL_PATH */,
|
|
4094
|
+
jsonData,
|
|
4095
|
+
{
|
|
4096
|
+
headers: {
|
|
4097
|
+
"Content-Type": "application/json"
|
|
4098
|
+
}
|
|
4099
|
+
},
|
|
4100
|
+
service
|
|
4101
|
+
);
|
|
4046
4102
|
},
|
|
4047
4103
|
[env]
|
|
4048
4104
|
);
|
|
@@ -4053,7 +4109,8 @@ function useModelService() {
|
|
|
4053
4109
|
object,
|
|
4054
4110
|
specification,
|
|
4055
4111
|
context,
|
|
4056
|
-
fieldChange
|
|
4112
|
+
fieldChange,
|
|
4113
|
+
service
|
|
4057
4114
|
}) => {
|
|
4058
4115
|
const jsonData = {
|
|
4059
4116
|
model,
|
|
@@ -4066,25 +4123,36 @@ function useModelService() {
|
|
|
4066
4123
|
specification
|
|
4067
4124
|
]
|
|
4068
4125
|
};
|
|
4069
|
-
return env.requests.post(
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4126
|
+
return env.requests.post(
|
|
4127
|
+
"/call" /* CALL_PATH */,
|
|
4128
|
+
jsonData,
|
|
4129
|
+
{
|
|
4130
|
+
headers: {
|
|
4131
|
+
"Content-Type": "application/json"
|
|
4132
|
+
}
|
|
4133
|
+
},
|
|
4134
|
+
service
|
|
4135
|
+
);
|
|
4074
4136
|
},
|
|
4075
4137
|
[env]
|
|
4076
4138
|
);
|
|
4077
4139
|
const getListFieldsOnchange = (0, import_react12.useCallback)(
|
|
4078
|
-
async ({ model }) => {
|
|
4140
|
+
async ({ model, service }) => {
|
|
4141
|
+
console.log("service", service);
|
|
4079
4142
|
const jsonData = {
|
|
4080
4143
|
model,
|
|
4081
4144
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4082
4145
|
};
|
|
4083
|
-
return env.requests.post(
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4146
|
+
return env.requests.post(
|
|
4147
|
+
"/call" /* CALL_PATH */,
|
|
4148
|
+
jsonData,
|
|
4149
|
+
{
|
|
4150
|
+
headers: {
|
|
4151
|
+
"Content-Type": "application/json"
|
|
4152
|
+
}
|
|
4153
|
+
},
|
|
4154
|
+
service
|
|
4155
|
+
);
|
|
4088
4156
|
},
|
|
4089
4157
|
[env]
|
|
4090
4158
|
);
|
|
@@ -4244,7 +4312,8 @@ function useViewService() {
|
|
|
4244
4312
|
views,
|
|
4245
4313
|
context = {},
|
|
4246
4314
|
options = {},
|
|
4247
|
-
aid
|
|
4315
|
+
aid,
|
|
4316
|
+
service
|
|
4248
4317
|
}) => {
|
|
4249
4318
|
const defaultOptions = {
|
|
4250
4319
|
load_filters: true,
|
|
@@ -4260,11 +4329,16 @@ function useViewService() {
|
|
|
4260
4329
|
},
|
|
4261
4330
|
with_context: context
|
|
4262
4331
|
};
|
|
4263
|
-
return env?.requests?.post(
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4332
|
+
return env?.requests?.post(
|
|
4333
|
+
"/call" /* CALL_PATH */,
|
|
4334
|
+
jsonDataView,
|
|
4335
|
+
{
|
|
4336
|
+
headers: {
|
|
4337
|
+
"Content-Type": "application/json"
|
|
4338
|
+
}
|
|
4339
|
+
},
|
|
4340
|
+
service
|
|
4341
|
+
);
|
|
4268
4342
|
},
|
|
4269
4343
|
[env]
|
|
4270
4344
|
);
|
|
@@ -4347,7 +4421,7 @@ function useViewService() {
|
|
|
4347
4421
|
[env]
|
|
4348
4422
|
);
|
|
4349
4423
|
const getSelectionItem = (0, import_react14.useCallback)(
|
|
4350
|
-
async ({ data }) => {
|
|
4424
|
+
async ({ data, service }) => {
|
|
4351
4425
|
const jsonData = {
|
|
4352
4426
|
model: data.model,
|
|
4353
4427
|
ids: [],
|
|
@@ -4365,11 +4439,16 @@ function useViewService() {
|
|
|
4365
4439
|
}
|
|
4366
4440
|
}
|
|
4367
4441
|
};
|
|
4368
|
-
return env?.requests.post(
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4442
|
+
return env?.requests.post(
|
|
4443
|
+
"/call" /* CALL_PATH */,
|
|
4444
|
+
jsonData,
|
|
4445
|
+
{
|
|
4446
|
+
headers: {
|
|
4447
|
+
"Content-Type": "application/json"
|
|
4448
|
+
}
|
|
4449
|
+
},
|
|
4450
|
+
service
|
|
4451
|
+
);
|
|
4373
4452
|
},
|
|
4374
4453
|
[env]
|
|
4375
4454
|
);
|