@fctc/interface-logic 2.2.0 → 2.2.2
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 +22 -44
- package/dist/configs.mjs +22 -44
- package/dist/constants.d.mts +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/environment.js +22 -44
- package/dist/environment.mjs +22 -44
- package/dist/hooks.d.mts +4 -16
- package/dist/hooks.d.ts +4 -16
- package/dist/hooks.js +103 -208
- package/dist/hooks.mjs +103 -208
- package/dist/provider.d.mts +1 -2
- package/dist/provider.d.ts +1 -2
- package/dist/provider.js +125 -252
- package/dist/provider.mjs +125 -252
- package/dist/services.d.mts +15 -23
- package/dist/services.d.ts +15 -23
- package/dist/services.js +78 -160
- package/dist/services.mjs +78 -160
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{view-type-p4JdAOsz.d.mts → view-type-BGJfDe73.d.mts} +0 -5
- package/dist/{view-type-p4JdAOsz.d.ts → view-type-BGJfDe73.d.ts} +0 -5
- package/package.json +85 -85
package/dist/services.d.mts
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
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-BGJfDe73.mjs';
|
|
2
2
|
|
|
3
3
|
declare function useActionService(): {
|
|
4
|
-
loadAction: ({ idAction, context,
|
|
4
|
+
loadAction: ({ idAction, context, }: {
|
|
5
5
|
idAction: number;
|
|
6
6
|
context: ContextApi;
|
|
7
|
-
service?: string;
|
|
8
7
|
}) => Promise<any>;
|
|
9
|
-
callButton: ({ model, ids, context, method,
|
|
8
|
+
callButton: ({ model, ids, context, method, }: {
|
|
10
9
|
model: string;
|
|
11
10
|
ids: Record<string, any>[] | any;
|
|
12
11
|
context: ContextApi;
|
|
13
12
|
method: any;
|
|
14
|
-
service?: string;
|
|
15
13
|
}) => Promise<any>;
|
|
16
|
-
removeRows: ({ model, ids, context,
|
|
14
|
+
removeRows: ({ model, ids, context, }: {
|
|
17
15
|
model: string;
|
|
18
16
|
ids: Record<string, any>[] | any;
|
|
19
17
|
context: ContextApi;
|
|
20
|
-
service?: string;
|
|
21
18
|
}) => Promise<any>;
|
|
22
|
-
duplicateRecord: ({ model, id, context,
|
|
19
|
+
duplicateRecord: ({ model, id, context, }: {
|
|
23
20
|
model: string;
|
|
24
21
|
id: any;
|
|
25
22
|
context: ContextApi;
|
|
26
|
-
service?: string;
|
|
27
23
|
}) => Promise<any>;
|
|
28
24
|
getPrintReportName: ({ id }: {
|
|
29
25
|
id: number;
|
|
@@ -33,10 +29,9 @@ declare function useActionService(): {
|
|
|
33
29
|
report: any;
|
|
34
30
|
db: any;
|
|
35
31
|
}) => Promise<any>;
|
|
36
|
-
runAction: ({ idAction, context,
|
|
32
|
+
runAction: ({ idAction, context, }: {
|
|
37
33
|
idAction: number;
|
|
38
34
|
context: ContextApi;
|
|
39
|
-
service?: string;
|
|
40
35
|
}) => Promise<any>;
|
|
41
36
|
};
|
|
42
37
|
|
|
@@ -56,7 +51,7 @@ declare function useAuthService(): {
|
|
|
56
51
|
}) => Promise<any>;
|
|
57
52
|
updatePassword: (data: UpdatePasswordRequest, token: string | null) => Promise<any>;
|
|
58
53
|
isValidToken: (token: string | null) => Promise<any>;
|
|
59
|
-
isValidActionToken: (actionToken: string | null
|
|
54
|
+
isValidActionToken: (actionToken: string | null) => Promise<any>;
|
|
60
55
|
loginSocial: ({ db, state, access_token, }: {
|
|
61
56
|
db: string;
|
|
62
57
|
state: object;
|
|
@@ -168,21 +163,19 @@ declare function useModelService(): {
|
|
|
168
163
|
}) => Promise<any>;
|
|
169
164
|
getCurrency: () => Promise<any>;
|
|
170
165
|
getConversionRate: () => Promise<any>;
|
|
171
|
-
getAll: ({ data
|
|
166
|
+
getAll: ({ data }: {
|
|
172
167
|
data: any;
|
|
173
|
-
service?: string;
|
|
174
168
|
}) => Promise<any>;
|
|
175
169
|
getListCalendar: ({ data }: {
|
|
176
170
|
data: any;
|
|
177
171
|
}) => Promise<any>;
|
|
178
172
|
getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
|
|
179
|
-
getDetail: ({ ids, model, specification, context
|
|
180
|
-
save: ({ model, ids, data, specification, context, path,
|
|
181
|
-
deleteApi: ({ ids, model
|
|
182
|
-
onChange: ({ ids, model, object, specification, context, fieldChange,
|
|
183
|
-
getListFieldsOnchange: ({ model
|
|
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 }: {
|
|
184
178
|
model: string;
|
|
185
|
-
service?: string;
|
|
186
179
|
}) => Promise<any>;
|
|
187
180
|
parseORMOdoo: (data: Record<string, any>) => {
|
|
188
181
|
[x: string]: any;
|
|
@@ -202,7 +195,7 @@ declare function useUserService(): {
|
|
|
202
195
|
};
|
|
203
196
|
|
|
204
197
|
declare function useViewService(): {
|
|
205
|
-
getView: ({ model, views, context, options, aid,
|
|
198
|
+
getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
|
|
206
199
|
getMenu: (context: any, specification: any) => Promise<any>;
|
|
207
200
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
208
201
|
getResequence: ({ model, ids, context, offset, }: {
|
|
@@ -211,9 +204,8 @@ declare function useViewService(): {
|
|
|
211
204
|
context: any;
|
|
212
205
|
offset: any;
|
|
213
206
|
}) => Promise<any>;
|
|
214
|
-
getSelectionItem: ({ data
|
|
207
|
+
getSelectionItem: ({ data }: {
|
|
215
208
|
data: GetSelectionType;
|
|
216
|
-
service?: string;
|
|
217
209
|
}) => Promise<any>;
|
|
218
210
|
loadMessages: () => Promise<any>;
|
|
219
211
|
getVersion: () => Promise<any>;
|
package/dist/services.d.ts
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
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-BGJfDe73.js';
|
|
2
2
|
|
|
3
3
|
declare function useActionService(): {
|
|
4
|
-
loadAction: ({ idAction, context,
|
|
4
|
+
loadAction: ({ idAction, context, }: {
|
|
5
5
|
idAction: number;
|
|
6
6
|
context: ContextApi;
|
|
7
|
-
service?: string;
|
|
8
7
|
}) => Promise<any>;
|
|
9
|
-
callButton: ({ model, ids, context, method,
|
|
8
|
+
callButton: ({ model, ids, context, method, }: {
|
|
10
9
|
model: string;
|
|
11
10
|
ids: Record<string, any>[] | any;
|
|
12
11
|
context: ContextApi;
|
|
13
12
|
method: any;
|
|
14
|
-
service?: string;
|
|
15
13
|
}) => Promise<any>;
|
|
16
|
-
removeRows: ({ model, ids, context,
|
|
14
|
+
removeRows: ({ model, ids, context, }: {
|
|
17
15
|
model: string;
|
|
18
16
|
ids: Record<string, any>[] | any;
|
|
19
17
|
context: ContextApi;
|
|
20
|
-
service?: string;
|
|
21
18
|
}) => Promise<any>;
|
|
22
|
-
duplicateRecord: ({ model, id, context,
|
|
19
|
+
duplicateRecord: ({ model, id, context, }: {
|
|
23
20
|
model: string;
|
|
24
21
|
id: any;
|
|
25
22
|
context: ContextApi;
|
|
26
|
-
service?: string;
|
|
27
23
|
}) => Promise<any>;
|
|
28
24
|
getPrintReportName: ({ id }: {
|
|
29
25
|
id: number;
|
|
@@ -33,10 +29,9 @@ declare function useActionService(): {
|
|
|
33
29
|
report: any;
|
|
34
30
|
db: any;
|
|
35
31
|
}) => Promise<any>;
|
|
36
|
-
runAction: ({ idAction, context,
|
|
32
|
+
runAction: ({ idAction, context, }: {
|
|
37
33
|
idAction: number;
|
|
38
34
|
context: ContextApi;
|
|
39
|
-
service?: string;
|
|
40
35
|
}) => Promise<any>;
|
|
41
36
|
};
|
|
42
37
|
|
|
@@ -56,7 +51,7 @@ declare function useAuthService(): {
|
|
|
56
51
|
}) => Promise<any>;
|
|
57
52
|
updatePassword: (data: UpdatePasswordRequest, token: string | null) => Promise<any>;
|
|
58
53
|
isValidToken: (token: string | null) => Promise<any>;
|
|
59
|
-
isValidActionToken: (actionToken: string | null
|
|
54
|
+
isValidActionToken: (actionToken: string | null) => Promise<any>;
|
|
60
55
|
loginSocial: ({ db, state, access_token, }: {
|
|
61
56
|
db: string;
|
|
62
57
|
state: object;
|
|
@@ -168,21 +163,19 @@ declare function useModelService(): {
|
|
|
168
163
|
}) => Promise<any>;
|
|
169
164
|
getCurrency: () => Promise<any>;
|
|
170
165
|
getConversionRate: () => Promise<any>;
|
|
171
|
-
getAll: ({ data
|
|
166
|
+
getAll: ({ data }: {
|
|
172
167
|
data: any;
|
|
173
|
-
service?: string;
|
|
174
168
|
}) => Promise<any>;
|
|
175
169
|
getListCalendar: ({ data }: {
|
|
176
170
|
data: any;
|
|
177
171
|
}) => Promise<any>;
|
|
178
172
|
getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
|
|
179
|
-
getDetail: ({ ids, model, specification, context
|
|
180
|
-
save: ({ model, ids, data, specification, context, path,
|
|
181
|
-
deleteApi: ({ ids, model
|
|
182
|
-
onChange: ({ ids, model, object, specification, context, fieldChange,
|
|
183
|
-
getListFieldsOnchange: ({ model
|
|
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 }: {
|
|
184
178
|
model: string;
|
|
185
|
-
service?: string;
|
|
186
179
|
}) => Promise<any>;
|
|
187
180
|
parseORMOdoo: (data: Record<string, any>) => {
|
|
188
181
|
[x: string]: any;
|
|
@@ -202,7 +195,7 @@ declare function useUserService(): {
|
|
|
202
195
|
};
|
|
203
196
|
|
|
204
197
|
declare function useViewService(): {
|
|
205
|
-
getView: ({ model, views, context, options, aid,
|
|
198
|
+
getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
|
|
206
199
|
getMenu: (context: any, specification: any) => Promise<any>;
|
|
207
200
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
208
201
|
getResequence: ({ model, ids, context, offset, }: {
|
|
@@ -211,9 +204,8 @@ declare function useViewService(): {
|
|
|
211
204
|
context: any;
|
|
212
205
|
offset: any;
|
|
213
206
|
}) => Promise<any>;
|
|
214
|
-
getSelectionItem: ({ data
|
|
207
|
+
getSelectionItem: ({ data }: {
|
|
215
208
|
data: GetSelectionType;
|
|
216
|
-
service?: string;
|
|
217
209
|
}) => Promise<any>;
|
|
218
210
|
loadMessages: () => Promise<any>;
|
|
219
211
|
getVersion: () => Promise<any>;
|
package/dist/services.js
CHANGED
|
@@ -66,6 +66,7 @@ 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`;
|
|
69
70
|
UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
|
|
70
71
|
UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
|
|
71
72
|
UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
|
|
@@ -3058,21 +3059,15 @@ function useActionService() {
|
|
|
3058
3059
|
const loadAction = (0, import_react6.useCallback)(
|
|
3059
3060
|
async ({
|
|
3060
3061
|
idAction,
|
|
3061
|
-
context
|
|
3062
|
-
service
|
|
3062
|
+
context
|
|
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
|
-
|
|
3071
|
-
{
|
|
3072
|
-
headers: { "Content-Type": "application/json" }
|
|
3073
|
-
},
|
|
3074
|
-
service
|
|
3075
|
-
);
|
|
3068
|
+
return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
|
|
3069
|
+
headers: { "Content-Type": "application/json" }
|
|
3070
|
+
});
|
|
3076
3071
|
},
|
|
3077
3072
|
[env]
|
|
3078
3073
|
);
|
|
@@ -3081,8 +3076,7 @@ function useActionService() {
|
|
|
3081
3076
|
model,
|
|
3082
3077
|
ids = [],
|
|
3083
3078
|
context,
|
|
3084
|
-
method
|
|
3085
|
-
service
|
|
3079
|
+
method
|
|
3086
3080
|
}) => {
|
|
3087
3081
|
try {
|
|
3088
3082
|
const jsonData = {
|
|
@@ -3091,14 +3085,9 @@ function useActionService() {
|
|
|
3091
3085
|
ids,
|
|
3092
3086
|
with_context: context
|
|
3093
3087
|
};
|
|
3094
|
-
return env.requests.post(
|
|
3095
|
-
"/
|
|
3096
|
-
|
|
3097
|
-
{
|
|
3098
|
-
headers: { "Content-Type": "application/json" }
|
|
3099
|
-
},
|
|
3100
|
-
service
|
|
3101
|
-
);
|
|
3088
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3089
|
+
headers: { "Content-Type": "application/json" }
|
|
3090
|
+
});
|
|
3102
3091
|
} catch (error) {
|
|
3103
3092
|
console.error("Error when calling button action:", error);
|
|
3104
3093
|
throw error;
|
|
@@ -3110,8 +3099,7 @@ function useActionService() {
|
|
|
3110
3099
|
async ({
|
|
3111
3100
|
model,
|
|
3112
3101
|
ids,
|
|
3113
|
-
context
|
|
3114
|
-
service
|
|
3102
|
+
context
|
|
3115
3103
|
}) => {
|
|
3116
3104
|
const jsonData = {
|
|
3117
3105
|
model,
|
|
@@ -3119,14 +3107,9 @@ function useActionService() {
|
|
|
3119
3107
|
ids,
|
|
3120
3108
|
with_context: context
|
|
3121
3109
|
};
|
|
3122
|
-
return env.requests.post(
|
|
3123
|
-
"/
|
|
3124
|
-
|
|
3125
|
-
{
|
|
3126
|
-
headers: { "Content-Type": "application/json" }
|
|
3127
|
-
},
|
|
3128
|
-
service
|
|
3129
|
-
);
|
|
3110
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3111
|
+
headers: { "Content-Type": "application/json" }
|
|
3112
|
+
});
|
|
3130
3113
|
},
|
|
3131
3114
|
[env]
|
|
3132
3115
|
);
|
|
@@ -3134,8 +3117,7 @@ function useActionService() {
|
|
|
3134
3117
|
async ({
|
|
3135
3118
|
model,
|
|
3136
3119
|
id,
|
|
3137
|
-
context
|
|
3138
|
-
service
|
|
3120
|
+
context
|
|
3139
3121
|
}) => {
|
|
3140
3122
|
const jsonData = {
|
|
3141
3123
|
model,
|
|
@@ -3143,14 +3125,9 @@ function useActionService() {
|
|
|
3143
3125
|
ids: id,
|
|
3144
3126
|
with_context: context
|
|
3145
3127
|
};
|
|
3146
|
-
return env.requests.post(
|
|
3147
|
-
"/
|
|
3148
|
-
|
|
3149
|
-
{
|
|
3150
|
-
headers: { "Content-Type": "application/json" }
|
|
3151
|
-
},
|
|
3152
|
-
service
|
|
3153
|
-
);
|
|
3128
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3129
|
+
headers: { "Content-Type": "application/json" }
|
|
3130
|
+
});
|
|
3154
3131
|
},
|
|
3155
3132
|
[env]
|
|
3156
3133
|
);
|
|
@@ -3193,21 +3170,15 @@ function useActionService() {
|
|
|
3193
3170
|
const runAction = (0, import_react6.useCallback)(
|
|
3194
3171
|
async ({
|
|
3195
3172
|
idAction,
|
|
3196
|
-
context
|
|
3197
|
-
service
|
|
3173
|
+
context
|
|
3198
3174
|
}) => {
|
|
3199
3175
|
const jsonData = {
|
|
3200
3176
|
action_id: idAction,
|
|
3201
3177
|
with_context: { ...context }
|
|
3202
3178
|
};
|
|
3203
|
-
return env.requests.post(
|
|
3204
|
-
"/
|
|
3205
|
-
|
|
3206
|
-
{
|
|
3207
|
-
headers: { "Content-Type": "application/json" }
|
|
3208
|
-
},
|
|
3209
|
-
service
|
|
3210
|
-
);
|
|
3179
|
+
return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
|
|
3180
|
+
headers: { "Content-Type": "application/json" }
|
|
3181
|
+
});
|
|
3211
3182
|
},
|
|
3212
3183
|
[env]
|
|
3213
3184
|
);
|
|
@@ -3350,18 +3321,15 @@ function useAuthService() {
|
|
|
3350
3321
|
[env]
|
|
3351
3322
|
);
|
|
3352
3323
|
const isValidActionToken = (0, import_react7.useCallback)(
|
|
3353
|
-
async (actionToken
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
{
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
actionToken
|
|
3363
|
-
}
|
|
3364
|
-
);
|
|
3324
|
+
async (actionToken) => {
|
|
3325
|
+
const bodyData = {};
|
|
3326
|
+
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3327
|
+
headers: {
|
|
3328
|
+
"Content-Type": "application/json"
|
|
3329
|
+
},
|
|
3330
|
+
useActionToken: true,
|
|
3331
|
+
actionToken
|
|
3332
|
+
});
|
|
3365
3333
|
},
|
|
3366
3334
|
[env]
|
|
3367
3335
|
);
|
|
@@ -3922,7 +3890,7 @@ function useModelService() {
|
|
|
3922
3890
|
});
|
|
3923
3891
|
}, [env]);
|
|
3924
3892
|
const getAll = (0, import_react12.useCallback)(
|
|
3925
|
-
async ({ data
|
|
3893
|
+
async ({ data }) => {
|
|
3926
3894
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3927
3895
|
fields: data.fields,
|
|
3928
3896
|
groupby: data.groupby
|
|
@@ -3943,16 +3911,11 @@ function useModelService() {
|
|
|
3943
3911
|
...jsonReadGroup
|
|
3944
3912
|
}
|
|
3945
3913
|
};
|
|
3946
|
-
return env.requests.post(
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
"Content-Type": "application/json"
|
|
3952
|
-
}
|
|
3953
|
-
},
|
|
3954
|
-
service
|
|
3955
|
-
);
|
|
3914
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3915
|
+
headers: {
|
|
3916
|
+
"Content-Type": "application/json"
|
|
3917
|
+
}
|
|
3918
|
+
});
|
|
3956
3919
|
},
|
|
3957
3920
|
[env]
|
|
3958
3921
|
);
|
|
@@ -4020,13 +3983,7 @@ function useModelService() {
|
|
|
4020
3983
|
[env]
|
|
4021
3984
|
);
|
|
4022
3985
|
const getDetail = (0, import_react12.useCallback)(
|
|
4023
|
-
async ({
|
|
4024
|
-
ids = [],
|
|
4025
|
-
model,
|
|
4026
|
-
specification,
|
|
4027
|
-
context,
|
|
4028
|
-
service
|
|
4029
|
-
}) => {
|
|
3986
|
+
async ({ ids = [], model, specification, context }) => {
|
|
4030
3987
|
const jsonData = {
|
|
4031
3988
|
model,
|
|
4032
3989
|
method: "web_read" /* WEB_READ */,
|
|
@@ -4036,16 +3993,11 @@ function useModelService() {
|
|
|
4036
3993
|
specification
|
|
4037
3994
|
}
|
|
4038
3995
|
};
|
|
4039
|
-
return env.requests.post(
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
"Content-Type": "application/json"
|
|
4045
|
-
}
|
|
4046
|
-
},
|
|
4047
|
-
service
|
|
4048
|
-
);
|
|
3996
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3997
|
+
headers: {
|
|
3998
|
+
"Content-Type": "application/json"
|
|
3999
|
+
}
|
|
4000
|
+
});
|
|
4049
4001
|
},
|
|
4050
4002
|
[env]
|
|
4051
4003
|
);
|
|
@@ -4056,8 +4008,7 @@ function useModelService() {
|
|
|
4056
4008
|
data = {},
|
|
4057
4009
|
specification = {},
|
|
4058
4010
|
context = {},
|
|
4059
|
-
path
|
|
4060
|
-
service
|
|
4011
|
+
path
|
|
4061
4012
|
}) => {
|
|
4062
4013
|
const jsonData = {
|
|
4063
4014
|
model,
|
|
@@ -4069,36 +4020,26 @@ function useModelService() {
|
|
|
4069
4020
|
specification
|
|
4070
4021
|
}
|
|
4071
4022
|
};
|
|
4072
|
-
return env.requests.post(
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
"Content-Type": "application/json"
|
|
4078
|
-
}
|
|
4079
|
-
},
|
|
4080
|
-
service
|
|
4081
|
-
);
|
|
4023
|
+
return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
4024
|
+
headers: {
|
|
4025
|
+
"Content-Type": "application/json"
|
|
4026
|
+
}
|
|
4027
|
+
});
|
|
4082
4028
|
},
|
|
4083
4029
|
[env]
|
|
4084
4030
|
);
|
|
4085
4031
|
const deleteApi = (0, import_react12.useCallback)(
|
|
4086
|
-
async ({ ids = [], model
|
|
4032
|
+
async ({ ids = [], model }) => {
|
|
4087
4033
|
const jsonData = {
|
|
4088
4034
|
model,
|
|
4089
4035
|
method: "unlink" /* UNLINK */,
|
|
4090
4036
|
ids
|
|
4091
4037
|
};
|
|
4092
|
-
return env.requests.post(
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
"Content-Type": "application/json"
|
|
4098
|
-
}
|
|
4099
|
-
},
|
|
4100
|
-
service
|
|
4101
|
-
);
|
|
4038
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4039
|
+
headers: {
|
|
4040
|
+
"Content-Type": "application/json"
|
|
4041
|
+
}
|
|
4042
|
+
});
|
|
4102
4043
|
},
|
|
4103
4044
|
[env]
|
|
4104
4045
|
);
|
|
@@ -4109,8 +4050,7 @@ function useModelService() {
|
|
|
4109
4050
|
object,
|
|
4110
4051
|
specification,
|
|
4111
4052
|
context,
|
|
4112
|
-
fieldChange
|
|
4113
|
-
service
|
|
4053
|
+
fieldChange
|
|
4114
4054
|
}) => {
|
|
4115
4055
|
const jsonData = {
|
|
4116
4056
|
model,
|
|
@@ -4123,36 +4063,25 @@ function useModelService() {
|
|
|
4123
4063
|
specification
|
|
4124
4064
|
]
|
|
4125
4065
|
};
|
|
4126
|
-
return env.requests.post(
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
"Content-Type": "application/json"
|
|
4132
|
-
}
|
|
4133
|
-
},
|
|
4134
|
-
service
|
|
4135
|
-
);
|
|
4066
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4067
|
+
headers: {
|
|
4068
|
+
"Content-Type": "application/json"
|
|
4069
|
+
}
|
|
4070
|
+
});
|
|
4136
4071
|
},
|
|
4137
4072
|
[env]
|
|
4138
4073
|
);
|
|
4139
4074
|
const getListFieldsOnchange = (0, import_react12.useCallback)(
|
|
4140
|
-
async ({ model
|
|
4141
|
-
console.log("service", service);
|
|
4075
|
+
async ({ model }) => {
|
|
4142
4076
|
const jsonData = {
|
|
4143
4077
|
model,
|
|
4144
4078
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4145
4079
|
};
|
|
4146
|
-
return env.requests.post(
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
"Content-Type": "application/json"
|
|
4152
|
-
}
|
|
4153
|
-
},
|
|
4154
|
-
service
|
|
4155
|
-
);
|
|
4080
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4081
|
+
headers: {
|
|
4082
|
+
"Content-Type": "application/json"
|
|
4083
|
+
}
|
|
4084
|
+
});
|
|
4156
4085
|
},
|
|
4157
4086
|
[env]
|
|
4158
4087
|
);
|
|
@@ -4312,8 +4241,7 @@ function useViewService() {
|
|
|
4312
4241
|
views,
|
|
4313
4242
|
context = {},
|
|
4314
4243
|
options = {},
|
|
4315
|
-
aid
|
|
4316
|
-
service
|
|
4244
|
+
aid
|
|
4317
4245
|
}) => {
|
|
4318
4246
|
const defaultOptions = {
|
|
4319
4247
|
load_filters: true,
|
|
@@ -4329,16 +4257,11 @@ function useViewService() {
|
|
|
4329
4257
|
},
|
|
4330
4258
|
with_context: context
|
|
4331
4259
|
};
|
|
4332
|
-
return env?.requests?.post(
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
"Content-Type": "application/json"
|
|
4338
|
-
}
|
|
4339
|
-
},
|
|
4340
|
-
service
|
|
4341
|
-
);
|
|
4260
|
+
return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4261
|
+
headers: {
|
|
4262
|
+
"Content-Type": "application/json"
|
|
4263
|
+
}
|
|
4264
|
+
});
|
|
4342
4265
|
},
|
|
4343
4266
|
[env]
|
|
4344
4267
|
);
|
|
@@ -4421,7 +4344,7 @@ function useViewService() {
|
|
|
4421
4344
|
[env]
|
|
4422
4345
|
);
|
|
4423
4346
|
const getSelectionItem = (0, import_react14.useCallback)(
|
|
4424
|
-
async ({ data
|
|
4347
|
+
async ({ data }) => {
|
|
4425
4348
|
const jsonData = {
|
|
4426
4349
|
model: data.model,
|
|
4427
4350
|
ids: [],
|
|
@@ -4439,16 +4362,11 @@ function useViewService() {
|
|
|
4439
4362
|
}
|
|
4440
4363
|
}
|
|
4441
4364
|
};
|
|
4442
|
-
return env?.requests.post(
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
"Content-Type": "application/json"
|
|
4448
|
-
}
|
|
4449
|
-
},
|
|
4450
|
-
service
|
|
4451
|
-
);
|
|
4365
|
+
return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4366
|
+
headers: {
|
|
4367
|
+
"Content-Type": "application/json"
|
|
4368
|
+
}
|
|
4369
|
+
});
|
|
4452
4370
|
},
|
|
4453
4371
|
[env]
|
|
4454
4372
|
);
|