@fctc/interface-logic 2.0.5 → 2.0.7
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 +40 -15
- package/dist/configs.mjs +40 -15
- package/dist/environment.js +40 -15
- package/dist/environment.mjs +40 -15
- package/dist/hooks.d.mts +13 -3
- package/dist/hooks.d.ts +13 -3
- package/dist/hooks.js +173 -83
- package/dist/hooks.mjs +173 -83
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +213 -98
- package/dist/provider.mjs +213 -98
- package/dist/services.d.mts +20 -13
- package/dist/services.d.ts +20 -13
- package/dist/services.js +136 -62
- package/dist/services.mjs +136 -62
- 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.mjs
CHANGED
|
@@ -3014,15 +3014,21 @@ function useActionService() {
|
|
|
3014
3014
|
const loadAction = useCallback2(
|
|
3015
3015
|
async ({
|
|
3016
3016
|
idAction,
|
|
3017
|
-
context
|
|
3017
|
+
context,
|
|
3018
|
+
service
|
|
3018
3019
|
}) => {
|
|
3019
3020
|
const jsonData = {
|
|
3020
3021
|
action_id: idAction,
|
|
3021
3022
|
with_context: { ...context }
|
|
3022
3023
|
};
|
|
3023
|
-
return env.requests.post(
|
|
3024
|
-
|
|
3025
|
-
|
|
3024
|
+
return env.requests.post(
|
|
3025
|
+
"/load_action" /* LOAD_ACTION */,
|
|
3026
|
+
jsonData,
|
|
3027
|
+
{
|
|
3028
|
+
headers: { "Content-Type": "application/json" }
|
|
3029
|
+
},
|
|
3030
|
+
service
|
|
3031
|
+
);
|
|
3026
3032
|
},
|
|
3027
3033
|
[env]
|
|
3028
3034
|
);
|
|
@@ -3031,7 +3037,8 @@ function useActionService() {
|
|
|
3031
3037
|
model,
|
|
3032
3038
|
ids = [],
|
|
3033
3039
|
context,
|
|
3034
|
-
method
|
|
3040
|
+
method,
|
|
3041
|
+
service
|
|
3035
3042
|
}) => {
|
|
3036
3043
|
try {
|
|
3037
3044
|
const jsonData = {
|
|
@@ -3040,9 +3047,14 @@ function useActionService() {
|
|
|
3040
3047
|
ids,
|
|
3041
3048
|
with_context: context
|
|
3042
3049
|
};
|
|
3043
|
-
return env.requests.post(
|
|
3044
|
-
|
|
3045
|
-
|
|
3050
|
+
return env.requests.post(
|
|
3051
|
+
"/call" /* CALL_PATH */,
|
|
3052
|
+
jsonData,
|
|
3053
|
+
{
|
|
3054
|
+
headers: { "Content-Type": "application/json" }
|
|
3055
|
+
},
|
|
3056
|
+
service
|
|
3057
|
+
);
|
|
3046
3058
|
} catch (error) {
|
|
3047
3059
|
console.error("Error when calling button action:", error);
|
|
3048
3060
|
throw error;
|
|
@@ -3054,7 +3066,8 @@ function useActionService() {
|
|
|
3054
3066
|
async ({
|
|
3055
3067
|
model,
|
|
3056
3068
|
ids,
|
|
3057
|
-
context
|
|
3069
|
+
context,
|
|
3070
|
+
service
|
|
3058
3071
|
}) => {
|
|
3059
3072
|
const jsonData = {
|
|
3060
3073
|
model,
|
|
@@ -3062,9 +3075,14 @@ function useActionService() {
|
|
|
3062
3075
|
ids,
|
|
3063
3076
|
with_context: context
|
|
3064
3077
|
};
|
|
3065
|
-
return env.requests.post(
|
|
3066
|
-
|
|
3067
|
-
|
|
3078
|
+
return env.requests.post(
|
|
3079
|
+
"/call" /* CALL_PATH */,
|
|
3080
|
+
jsonData,
|
|
3081
|
+
{
|
|
3082
|
+
headers: { "Content-Type": "application/json" }
|
|
3083
|
+
},
|
|
3084
|
+
service
|
|
3085
|
+
);
|
|
3068
3086
|
},
|
|
3069
3087
|
[env]
|
|
3070
3088
|
);
|
|
@@ -3072,7 +3090,8 @@ function useActionService() {
|
|
|
3072
3090
|
async ({
|
|
3073
3091
|
model,
|
|
3074
3092
|
id,
|
|
3075
|
-
context
|
|
3093
|
+
context,
|
|
3094
|
+
service
|
|
3076
3095
|
}) => {
|
|
3077
3096
|
const jsonData = {
|
|
3078
3097
|
model,
|
|
@@ -3080,9 +3099,14 @@ function useActionService() {
|
|
|
3080
3099
|
ids: id,
|
|
3081
3100
|
with_context: context
|
|
3082
3101
|
};
|
|
3083
|
-
return env.requests.post(
|
|
3084
|
-
|
|
3085
|
-
|
|
3102
|
+
return env.requests.post(
|
|
3103
|
+
"/call" /* CALL_PATH */,
|
|
3104
|
+
jsonData,
|
|
3105
|
+
{
|
|
3106
|
+
headers: { "Content-Type": "application/json" }
|
|
3107
|
+
},
|
|
3108
|
+
service
|
|
3109
|
+
);
|
|
3086
3110
|
},
|
|
3087
3111
|
[env]
|
|
3088
3112
|
);
|
|
@@ -3125,15 +3149,21 @@ function useActionService() {
|
|
|
3125
3149
|
const runAction = useCallback2(
|
|
3126
3150
|
async ({
|
|
3127
3151
|
idAction,
|
|
3128
|
-
context
|
|
3152
|
+
context,
|
|
3153
|
+
service
|
|
3129
3154
|
}) => {
|
|
3130
3155
|
const jsonData = {
|
|
3131
3156
|
action_id: idAction,
|
|
3132
3157
|
with_context: { ...context }
|
|
3133
3158
|
};
|
|
3134
|
-
return env.requests.post(
|
|
3135
|
-
|
|
3136
|
-
|
|
3159
|
+
return env.requests.post(
|
|
3160
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
3161
|
+
jsonData,
|
|
3162
|
+
{
|
|
3163
|
+
headers: { "Content-Type": "application/json" }
|
|
3164
|
+
},
|
|
3165
|
+
service
|
|
3166
|
+
);
|
|
3137
3167
|
},
|
|
3138
3168
|
[env]
|
|
3139
3169
|
);
|
|
@@ -3848,7 +3878,7 @@ function useModelService() {
|
|
|
3848
3878
|
});
|
|
3849
3879
|
}, [env]);
|
|
3850
3880
|
const getAll = useCallback8(
|
|
3851
|
-
async ({ data }) => {
|
|
3881
|
+
async ({ data, service }) => {
|
|
3852
3882
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3853
3883
|
fields: data.fields,
|
|
3854
3884
|
groupby: data.groupby
|
|
@@ -3869,11 +3899,16 @@ function useModelService() {
|
|
|
3869
3899
|
...jsonReadGroup
|
|
3870
3900
|
}
|
|
3871
3901
|
};
|
|
3872
|
-
return env.requests.post(
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3902
|
+
return env.requests.post(
|
|
3903
|
+
"/call" /* CALL_PATH */,
|
|
3904
|
+
jsonData,
|
|
3905
|
+
{
|
|
3906
|
+
headers: {
|
|
3907
|
+
"Content-Type": "application/json"
|
|
3908
|
+
}
|
|
3909
|
+
},
|
|
3910
|
+
service
|
|
3911
|
+
);
|
|
3877
3912
|
},
|
|
3878
3913
|
[env]
|
|
3879
3914
|
);
|
|
@@ -3941,7 +3976,13 @@ function useModelService() {
|
|
|
3941
3976
|
[env]
|
|
3942
3977
|
);
|
|
3943
3978
|
const getDetail = useCallback8(
|
|
3944
|
-
async ({
|
|
3979
|
+
async ({
|
|
3980
|
+
ids = [],
|
|
3981
|
+
model,
|
|
3982
|
+
specification,
|
|
3983
|
+
context,
|
|
3984
|
+
service
|
|
3985
|
+
}) => {
|
|
3945
3986
|
const jsonData = {
|
|
3946
3987
|
model,
|
|
3947
3988
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3951,11 +3992,16 @@ function useModelService() {
|
|
|
3951
3992
|
specification
|
|
3952
3993
|
}
|
|
3953
3994
|
};
|
|
3954
|
-
return env.requests.post(
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3995
|
+
return env.requests.post(
|
|
3996
|
+
"/call" /* CALL_PATH */,
|
|
3997
|
+
jsonData,
|
|
3998
|
+
{
|
|
3999
|
+
headers: {
|
|
4000
|
+
"Content-Type": "application/json"
|
|
4001
|
+
}
|
|
4002
|
+
},
|
|
4003
|
+
service
|
|
4004
|
+
);
|
|
3959
4005
|
},
|
|
3960
4006
|
[env]
|
|
3961
4007
|
);
|
|
@@ -3966,7 +4012,8 @@ function useModelService() {
|
|
|
3966
4012
|
data = {},
|
|
3967
4013
|
specification = {},
|
|
3968
4014
|
context = {},
|
|
3969
|
-
path
|
|
4015
|
+
path,
|
|
4016
|
+
service
|
|
3970
4017
|
}) => {
|
|
3971
4018
|
const jsonData = {
|
|
3972
4019
|
model,
|
|
@@ -3978,26 +4025,36 @@ function useModelService() {
|
|
|
3978
4025
|
specification
|
|
3979
4026
|
}
|
|
3980
4027
|
};
|
|
3981
|
-
return env.requests.post(
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
4028
|
+
return env.requests.post(
|
|
4029
|
+
path ?? "/call" /* CALL_PATH */,
|
|
4030
|
+
jsonData,
|
|
4031
|
+
{
|
|
4032
|
+
headers: {
|
|
4033
|
+
"Content-Type": "application/json"
|
|
4034
|
+
}
|
|
4035
|
+
},
|
|
4036
|
+
service
|
|
4037
|
+
);
|
|
3986
4038
|
},
|
|
3987
4039
|
[env]
|
|
3988
4040
|
);
|
|
3989
4041
|
const deleteApi = useCallback8(
|
|
3990
|
-
async ({ ids = [], model }) => {
|
|
4042
|
+
async ({ ids = [], model, service }) => {
|
|
3991
4043
|
const jsonData = {
|
|
3992
4044
|
model,
|
|
3993
4045
|
method: "unlink" /* UNLINK */,
|
|
3994
4046
|
ids
|
|
3995
4047
|
};
|
|
3996
|
-
return env.requests.post(
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4048
|
+
return env.requests.post(
|
|
4049
|
+
"/call" /* CALL_PATH */,
|
|
4050
|
+
jsonData,
|
|
4051
|
+
{
|
|
4052
|
+
headers: {
|
|
4053
|
+
"Content-Type": "application/json"
|
|
4054
|
+
}
|
|
4055
|
+
},
|
|
4056
|
+
service
|
|
4057
|
+
);
|
|
4001
4058
|
},
|
|
4002
4059
|
[env]
|
|
4003
4060
|
);
|
|
@@ -4008,7 +4065,8 @@ function useModelService() {
|
|
|
4008
4065
|
object,
|
|
4009
4066
|
specification,
|
|
4010
4067
|
context,
|
|
4011
|
-
fieldChange
|
|
4068
|
+
fieldChange,
|
|
4069
|
+
service
|
|
4012
4070
|
}) => {
|
|
4013
4071
|
const jsonData = {
|
|
4014
4072
|
model,
|
|
@@ -4021,11 +4079,16 @@ function useModelService() {
|
|
|
4021
4079
|
specification
|
|
4022
4080
|
]
|
|
4023
4081
|
};
|
|
4024
|
-
return env.requests.post(
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4082
|
+
return env.requests.post(
|
|
4083
|
+
"/call" /* CALL_PATH */,
|
|
4084
|
+
jsonData,
|
|
4085
|
+
{
|
|
4086
|
+
headers: {
|
|
4087
|
+
"Content-Type": "application/json"
|
|
4088
|
+
}
|
|
4089
|
+
},
|
|
4090
|
+
service
|
|
4091
|
+
);
|
|
4029
4092
|
},
|
|
4030
4093
|
[env]
|
|
4031
4094
|
);
|
|
@@ -4199,7 +4262,8 @@ function useViewService() {
|
|
|
4199
4262
|
views,
|
|
4200
4263
|
context = {},
|
|
4201
4264
|
options = {},
|
|
4202
|
-
aid
|
|
4265
|
+
aid,
|
|
4266
|
+
service
|
|
4203
4267
|
}) => {
|
|
4204
4268
|
const defaultOptions = {
|
|
4205
4269
|
load_filters: true,
|
|
@@ -4215,11 +4279,16 @@ function useViewService() {
|
|
|
4215
4279
|
},
|
|
4216
4280
|
with_context: context
|
|
4217
4281
|
};
|
|
4218
|
-
return env?.requests?.post(
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4282
|
+
return env?.requests?.post(
|
|
4283
|
+
"/call" /* CALL_PATH */,
|
|
4284
|
+
jsonDataView,
|
|
4285
|
+
{
|
|
4286
|
+
headers: {
|
|
4287
|
+
"Content-Type": "application/json"
|
|
4288
|
+
}
|
|
4289
|
+
},
|
|
4290
|
+
service
|
|
4291
|
+
);
|
|
4223
4292
|
},
|
|
4224
4293
|
[env]
|
|
4225
4294
|
);
|
|
@@ -4302,7 +4371,7 @@ function useViewService() {
|
|
|
4302
4371
|
[env]
|
|
4303
4372
|
);
|
|
4304
4373
|
const getSelectionItem = useCallback10(
|
|
4305
|
-
async ({ data }) => {
|
|
4374
|
+
async ({ data, service }) => {
|
|
4306
4375
|
const jsonData = {
|
|
4307
4376
|
model: data.model,
|
|
4308
4377
|
ids: [],
|
|
@@ -4320,11 +4389,16 @@ function useViewService() {
|
|
|
4320
4389
|
}
|
|
4321
4390
|
}
|
|
4322
4391
|
};
|
|
4323
|
-
return env?.requests.post(
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4392
|
+
return env?.requests.post(
|
|
4393
|
+
"/call" /* CALL_PATH */,
|
|
4394
|
+
jsonData,
|
|
4395
|
+
{
|
|
4396
|
+
headers: {
|
|
4397
|
+
"Content-Type": "application/json"
|
|
4398
|
+
}
|
|
4399
|
+
},
|
|
4400
|
+
service
|
|
4401
|
+
);
|
|
4328
4402
|
},
|
|
4329
4403
|
[env]
|
|
4330
4404
|
);
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-p4JdAOsz.mjs';
|
|
2
2
|
|
|
3
3
|
interface Config {
|
|
4
4
|
baseUrl: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-p4JdAOsz.js';
|
|
2
2
|
|
|
3
3
|
interface Config {
|
|
4
4
|
baseUrl: string;
|
|
@@ -58,6 +58,7 @@ interface GetDetailParams {
|
|
|
58
58
|
model?: string;
|
|
59
59
|
specification?: Specification;
|
|
60
60
|
context?: ContextApi;
|
|
61
|
+
service?: string;
|
|
61
62
|
}
|
|
62
63
|
interface SaveParams {
|
|
63
64
|
model: string;
|
|
@@ -66,10 +67,12 @@ interface SaveParams {
|
|
|
66
67
|
specification?: Specification;
|
|
67
68
|
context?: ContextApi;
|
|
68
69
|
path?: string;
|
|
70
|
+
service?: string;
|
|
69
71
|
}
|
|
70
72
|
interface DeleteParams {
|
|
71
73
|
ids?: number[];
|
|
72
74
|
model: string;
|
|
75
|
+
service?: string;
|
|
73
76
|
}
|
|
74
77
|
interface OnChangeParams {
|
|
75
78
|
ids?: number[];
|
|
@@ -78,6 +81,7 @@ interface OnChangeParams {
|
|
|
78
81
|
specification: Specification;
|
|
79
82
|
context?: ContextApi;
|
|
80
83
|
fieldChange?: string[];
|
|
84
|
+
service?: string;
|
|
81
85
|
}
|
|
82
86
|
interface ViewData {
|
|
83
87
|
models?: {
|
|
@@ -108,6 +112,7 @@ interface GetViewParams {
|
|
|
108
112
|
context?: Record<string, any>;
|
|
109
113
|
options?: Option;
|
|
110
114
|
aid?: number | string | null | boolean;
|
|
115
|
+
service?: string;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
|
|
@@ -58,6 +58,7 @@ interface GetDetailParams {
|
|
|
58
58
|
model?: string;
|
|
59
59
|
specification?: Specification;
|
|
60
60
|
context?: ContextApi;
|
|
61
|
+
service?: string;
|
|
61
62
|
}
|
|
62
63
|
interface SaveParams {
|
|
63
64
|
model: string;
|
|
@@ -66,10 +67,12 @@ interface SaveParams {
|
|
|
66
67
|
specification?: Specification;
|
|
67
68
|
context?: ContextApi;
|
|
68
69
|
path?: string;
|
|
70
|
+
service?: string;
|
|
69
71
|
}
|
|
70
72
|
interface DeleteParams {
|
|
71
73
|
ids?: number[];
|
|
72
74
|
model: string;
|
|
75
|
+
service?: string;
|
|
73
76
|
}
|
|
74
77
|
interface OnChangeParams {
|
|
75
78
|
ids?: number[];
|
|
@@ -78,6 +81,7 @@ interface OnChangeParams {
|
|
|
78
81
|
specification: Specification;
|
|
79
82
|
context?: ContextApi;
|
|
80
83
|
fieldChange?: string[];
|
|
84
|
+
service?: string;
|
|
81
85
|
}
|
|
82
86
|
interface ViewData {
|
|
83
87
|
models?: {
|
|
@@ -108,6 +112,7 @@ interface GetViewParams {
|
|
|
108
112
|
context?: Record<string, any>;
|
|
109
113
|
options?: Option;
|
|
110
114
|
aid?: number | string | null | boolean;
|
|
115
|
+
service?: string;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
|