@fctc/interface-logic 2.3.5 → 2.3.9

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/services.js CHANGED
@@ -3064,7 +3064,8 @@ function useActionService() {
3064
3064
  async ({
3065
3065
  idAction,
3066
3066
  context,
3067
- service
3067
+ service,
3068
+ xNode
3068
3069
  }) => {
3069
3070
  const jsonData = {
3070
3071
  action_id: idAction,
@@ -3074,7 +3075,7 @@ function useActionService() {
3074
3075
  "/load_action" /* LOAD_ACTION */,
3075
3076
  jsonData,
3076
3077
  {
3077
- headers: { "Content-Type": "application/json" }
3078
+ headers: { "Content-Type": "application/json", x_node: xNode }
3078
3079
  },
3079
3080
  service
3080
3081
  );
@@ -3087,7 +3088,8 @@ function useActionService() {
3087
3088
  ids = [],
3088
3089
  context,
3089
3090
  method,
3090
- service
3091
+ service,
3092
+ xNode
3091
3093
  }) => {
3092
3094
  try {
3093
3095
  const jsonData = {
@@ -3100,7 +3102,8 @@ function useActionService() {
3100
3102
  "/call" /* CALL_PATH */,
3101
3103
  jsonData,
3102
3104
  {
3103
- headers: { "Content-Type": "application/json" }
3105
+ headers: { "Content-Type": "application/json" },
3106
+ ...xNode ? { x_node: xNode } : {}
3104
3107
  },
3105
3108
  service
3106
3109
  );
@@ -3116,7 +3119,8 @@ function useActionService() {
3116
3119
  model,
3117
3120
  ids,
3118
3121
  context,
3119
- service
3122
+ service,
3123
+ xNode
3120
3124
  }) => {
3121
3125
  const jsonData = {
3122
3126
  model,
@@ -3128,7 +3132,8 @@ function useActionService() {
3128
3132
  "/call" /* CALL_PATH */,
3129
3133
  jsonData,
3130
3134
  {
3131
- headers: { "Content-Type": "application/json" }
3135
+ headers: { "Content-Type": "application/json" },
3136
+ ...xNode ? { x_node: xNode } : {}
3132
3137
  },
3133
3138
  service
3134
3139
  );
@@ -3140,7 +3145,8 @@ function useActionService() {
3140
3145
  model,
3141
3146
  id,
3142
3147
  context,
3143
- service
3148
+ service,
3149
+ xNode
3144
3150
  }) => {
3145
3151
  const jsonData = {
3146
3152
  model,
@@ -3152,7 +3158,8 @@ function useActionService() {
3152
3158
  "/call" /* CALL_PATH */,
3153
3159
  jsonData,
3154
3160
  {
3155
- headers: { "Content-Type": "application/json" }
3161
+ headers: { "Content-Type": "application/json" },
3162
+ ...xNode ? { x_node: xNode } : {}
3156
3163
  },
3157
3164
  service
3158
3165
  );
@@ -3199,7 +3206,8 @@ function useActionService() {
3199
3206
  async ({
3200
3207
  idAction,
3201
3208
  context,
3202
- service
3209
+ service,
3210
+ xNode
3203
3211
  }) => {
3204
3212
  const jsonData = {
3205
3213
  action_id: idAction,
@@ -3209,7 +3217,8 @@ function useActionService() {
3209
3217
  "/run_action" /* RUN_ACTION_PATH */,
3210
3218
  jsonData,
3211
3219
  {
3212
- headers: { "Content-Type": "application/json" }
3220
+ headers: { "Content-Type": "application/json" },
3221
+ ...xNode ? { x_node: xNode } : {}
3213
3222
  },
3214
3223
  service
3215
3224
  );
@@ -3932,7 +3941,11 @@ function useModelService() {
3932
3941
  });
3933
3942
  }, [env]);
3934
3943
  const getAll = (0, import_react12.useCallback)(
3935
- async ({ data, service }) => {
3944
+ async ({
3945
+ data,
3946
+ service,
3947
+ xNode
3948
+ }) => {
3936
3949
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3937
3950
  fields: data.fields,
3938
3951
  groupby: data.groupby
@@ -3958,7 +3971,8 @@ function useModelService() {
3958
3971
  jsonData,
3959
3972
  {
3960
3973
  headers: {
3961
- "Content-Type": "application/json"
3974
+ "Content-Type": "application/json",
3975
+ ...xNode ? { x_node: xNode } : {}
3962
3976
  }
3963
3977
  },
3964
3978
  service
@@ -4035,7 +4049,8 @@ function useModelService() {
4035
4049
  model,
4036
4050
  specification,
4037
4051
  context,
4038
- service
4052
+ service,
4053
+ xNode
4039
4054
  }) => {
4040
4055
  const jsonData = {
4041
4056
  model,
@@ -4051,7 +4066,8 @@ function useModelService() {
4051
4066
  jsonData,
4052
4067
  {
4053
4068
  headers: {
4054
- "Content-Type": "application/json"
4069
+ "Content-Type": "application/json",
4070
+ ...xNode ? { x_node: xNode } : {}
4055
4071
  }
4056
4072
  },
4057
4073
  service
@@ -4067,7 +4083,8 @@ function useModelService() {
4067
4083
  specification = {},
4068
4084
  context = {},
4069
4085
  path,
4070
- service
4086
+ service,
4087
+ xNode
4071
4088
  }) => {
4072
4089
  const jsonData = {
4073
4090
  model,
@@ -4084,7 +4101,8 @@ function useModelService() {
4084
4101
  jsonData,
4085
4102
  {
4086
4103
  headers: {
4087
- "Content-Type": "application/json"
4104
+ "Content-Type": "application/json",
4105
+ ...xNode ? { x_node: xNode } : {}
4088
4106
  }
4089
4107
  },
4090
4108
  service
@@ -4120,7 +4138,8 @@ function useModelService() {
4120
4138
  specification,
4121
4139
  context,
4122
4140
  fieldChange,
4123
- service
4141
+ service,
4142
+ xNode
4124
4143
  }) => {
4125
4144
  const jsonData = {
4126
4145
  model,
@@ -4138,7 +4157,8 @@ function useModelService() {
4138
4157
  jsonData,
4139
4158
  {
4140
4159
  headers: {
4141
- "Content-Type": "application/json"
4160
+ "Content-Type": "application/json",
4161
+ ...xNode ? { x_node: xNode } : {}
4142
4162
  }
4143
4163
  },
4144
4164
  service
@@ -4147,7 +4167,11 @@ function useModelService() {
4147
4167
  [env]
4148
4168
  );
4149
4169
  const getListFieldsOnchange = (0, import_react12.useCallback)(
4150
- async ({ model, service }) => {
4170
+ async ({
4171
+ model,
4172
+ service,
4173
+ xNode
4174
+ }) => {
4151
4175
  const jsonData = {
4152
4176
  model,
4153
4177
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -4157,7 +4181,8 @@ function useModelService() {
4157
4181
  jsonData,
4158
4182
  {
4159
4183
  headers: {
4160
- "Content-Type": "application/json"
4184
+ "Content-Type": "application/json",
4185
+ ...xNode ? { x_node: xNode } : {}
4161
4186
  }
4162
4187
  },
4163
4188
  service
@@ -4431,7 +4456,11 @@ function useViewService() {
4431
4456
  [env]
4432
4457
  );
4433
4458
  const getSelectionItem = (0, import_react14.useCallback)(
4434
- async ({ data, service }) => {
4459
+ async ({
4460
+ data,
4461
+ service,
4462
+ xNode
4463
+ }) => {
4435
4464
  const jsonData = {
4436
4465
  model: data.model,
4437
4466
  ids: [],
@@ -4454,7 +4483,8 @@ function useViewService() {
4454
4483
  jsonData,
4455
4484
  {
4456
4485
  headers: {
4457
- "Content-Type": "application/json"
4486
+ "Content-Type": "application/json",
4487
+ ...xNode ? { x_node: xNode } : {}
4458
4488
  }
4459
4489
  },
4460
4490
  service
package/dist/services.mjs CHANGED
@@ -3020,7 +3020,8 @@ function useActionService() {
3020
3020
  async ({
3021
3021
  idAction,
3022
3022
  context,
3023
- service
3023
+ service,
3024
+ xNode
3024
3025
  }) => {
3025
3026
  const jsonData = {
3026
3027
  action_id: idAction,
@@ -3030,7 +3031,7 @@ function useActionService() {
3030
3031
  "/load_action" /* LOAD_ACTION */,
3031
3032
  jsonData,
3032
3033
  {
3033
- headers: { "Content-Type": "application/json" }
3034
+ headers: { "Content-Type": "application/json", x_node: xNode }
3034
3035
  },
3035
3036
  service
3036
3037
  );
@@ -3043,7 +3044,8 @@ function useActionService() {
3043
3044
  ids = [],
3044
3045
  context,
3045
3046
  method,
3046
- service
3047
+ service,
3048
+ xNode
3047
3049
  }) => {
3048
3050
  try {
3049
3051
  const jsonData = {
@@ -3056,7 +3058,8 @@ function useActionService() {
3056
3058
  "/call" /* CALL_PATH */,
3057
3059
  jsonData,
3058
3060
  {
3059
- headers: { "Content-Type": "application/json" }
3061
+ headers: { "Content-Type": "application/json" },
3062
+ ...xNode ? { x_node: xNode } : {}
3060
3063
  },
3061
3064
  service
3062
3065
  );
@@ -3072,7 +3075,8 @@ function useActionService() {
3072
3075
  model,
3073
3076
  ids,
3074
3077
  context,
3075
- service
3078
+ service,
3079
+ xNode
3076
3080
  }) => {
3077
3081
  const jsonData = {
3078
3082
  model,
@@ -3084,7 +3088,8 @@ function useActionService() {
3084
3088
  "/call" /* CALL_PATH */,
3085
3089
  jsonData,
3086
3090
  {
3087
- headers: { "Content-Type": "application/json" }
3091
+ headers: { "Content-Type": "application/json" },
3092
+ ...xNode ? { x_node: xNode } : {}
3088
3093
  },
3089
3094
  service
3090
3095
  );
@@ -3096,7 +3101,8 @@ function useActionService() {
3096
3101
  model,
3097
3102
  id,
3098
3103
  context,
3099
- service
3104
+ service,
3105
+ xNode
3100
3106
  }) => {
3101
3107
  const jsonData = {
3102
3108
  model,
@@ -3108,7 +3114,8 @@ function useActionService() {
3108
3114
  "/call" /* CALL_PATH */,
3109
3115
  jsonData,
3110
3116
  {
3111
- headers: { "Content-Type": "application/json" }
3117
+ headers: { "Content-Type": "application/json" },
3118
+ ...xNode ? { x_node: xNode } : {}
3112
3119
  },
3113
3120
  service
3114
3121
  );
@@ -3155,7 +3162,8 @@ function useActionService() {
3155
3162
  async ({
3156
3163
  idAction,
3157
3164
  context,
3158
- service
3165
+ service,
3166
+ xNode
3159
3167
  }) => {
3160
3168
  const jsonData = {
3161
3169
  action_id: idAction,
@@ -3165,7 +3173,8 @@ function useActionService() {
3165
3173
  "/run_action" /* RUN_ACTION_PATH */,
3166
3174
  jsonData,
3167
3175
  {
3168
- headers: { "Content-Type": "application/json" }
3176
+ headers: { "Content-Type": "application/json" },
3177
+ ...xNode ? { x_node: xNode } : {}
3169
3178
  },
3170
3179
  service
3171
3180
  );
@@ -3888,7 +3897,11 @@ function useModelService() {
3888
3897
  });
3889
3898
  }, [env]);
3890
3899
  const getAll = useCallback8(
3891
- async ({ data, service }) => {
3900
+ async ({
3901
+ data,
3902
+ service,
3903
+ xNode
3904
+ }) => {
3892
3905
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3893
3906
  fields: data.fields,
3894
3907
  groupby: data.groupby
@@ -3914,7 +3927,8 @@ function useModelService() {
3914
3927
  jsonData,
3915
3928
  {
3916
3929
  headers: {
3917
- "Content-Type": "application/json"
3930
+ "Content-Type": "application/json",
3931
+ ...xNode ? { x_node: xNode } : {}
3918
3932
  }
3919
3933
  },
3920
3934
  service
@@ -3991,7 +4005,8 @@ function useModelService() {
3991
4005
  model,
3992
4006
  specification,
3993
4007
  context,
3994
- service
4008
+ service,
4009
+ xNode
3995
4010
  }) => {
3996
4011
  const jsonData = {
3997
4012
  model,
@@ -4007,7 +4022,8 @@ function useModelService() {
4007
4022
  jsonData,
4008
4023
  {
4009
4024
  headers: {
4010
- "Content-Type": "application/json"
4025
+ "Content-Type": "application/json",
4026
+ ...xNode ? { x_node: xNode } : {}
4011
4027
  }
4012
4028
  },
4013
4029
  service
@@ -4023,7 +4039,8 @@ function useModelService() {
4023
4039
  specification = {},
4024
4040
  context = {},
4025
4041
  path,
4026
- service
4042
+ service,
4043
+ xNode
4027
4044
  }) => {
4028
4045
  const jsonData = {
4029
4046
  model,
@@ -4040,7 +4057,8 @@ function useModelService() {
4040
4057
  jsonData,
4041
4058
  {
4042
4059
  headers: {
4043
- "Content-Type": "application/json"
4060
+ "Content-Type": "application/json",
4061
+ ...xNode ? { x_node: xNode } : {}
4044
4062
  }
4045
4063
  },
4046
4064
  service
@@ -4076,7 +4094,8 @@ function useModelService() {
4076
4094
  specification,
4077
4095
  context,
4078
4096
  fieldChange,
4079
- service
4097
+ service,
4098
+ xNode
4080
4099
  }) => {
4081
4100
  const jsonData = {
4082
4101
  model,
@@ -4094,7 +4113,8 @@ function useModelService() {
4094
4113
  jsonData,
4095
4114
  {
4096
4115
  headers: {
4097
- "Content-Type": "application/json"
4116
+ "Content-Type": "application/json",
4117
+ ...xNode ? { x_node: xNode } : {}
4098
4118
  }
4099
4119
  },
4100
4120
  service
@@ -4103,7 +4123,11 @@ function useModelService() {
4103
4123
  [env]
4104
4124
  );
4105
4125
  const getListFieldsOnchange = useCallback8(
4106
- async ({ model, service }) => {
4126
+ async ({
4127
+ model,
4128
+ service,
4129
+ xNode
4130
+ }) => {
4107
4131
  const jsonData = {
4108
4132
  model,
4109
4133
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -4113,7 +4137,8 @@ function useModelService() {
4113
4137
  jsonData,
4114
4138
  {
4115
4139
  headers: {
4116
- "Content-Type": "application/json"
4140
+ "Content-Type": "application/json",
4141
+ ...xNode ? { x_node: xNode } : {}
4117
4142
  }
4118
4143
  },
4119
4144
  service
@@ -4387,7 +4412,11 @@ function useViewService() {
4387
4412
  [env]
4388
4413
  );
4389
4414
  const getSelectionItem = useCallback10(
4390
- async ({ data, service }) => {
4415
+ async ({
4416
+ data,
4417
+ service,
4418
+ xNode
4419
+ }) => {
4391
4420
  const jsonData = {
4392
4421
  model: data.model,
4393
4422
  ids: [],
@@ -4410,7 +4439,8 @@ function useViewService() {
4410
4439
  jsonData,
4411
4440
  {
4412
4441
  headers: {
4413
- "Content-Type": "application/json"
4442
+ "Content-Type": "application/json",
4443
+ ...xNode ? { x_node: xNode } : {}
4414
4444
  }
4415
4445
  },
4416
4446
  service
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-p4JdAOsz.mjs';
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-DioSS9fJ.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-p4JdAOsz.js';
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-DioSS9fJ.js';
2
2
 
3
3
  interface Config {
4
4
  baseUrl: string;
package/dist/utils.js CHANGED
@@ -2675,7 +2675,8 @@ var filterFieldDirty = ({
2675
2675
  formValues: itemData,
2676
2676
  dirtyFields: {},
2677
2677
  model: viewData?.models?.[model]?.[key]?.relation,
2678
- defaultData
2678
+ defaultData,
2679
+ keepZeroValue
2679
2680
  })
2680
2681
  ]);
2681
2682
  } else if (dirtyFields[key]?.length) {
@@ -2690,7 +2691,8 @@ var filterFieldDirty = ({
2690
2691
  formValues: itemData,
2691
2692
  dirtyFields: itemDirty,
2692
2693
  model: viewData?.models?.[model]?.[key]?.relation,
2693
- defaultData: {}
2694
+ defaultData: {},
2695
+ keepZeroValue
2694
2696
  })
2695
2697
  ]);
2696
2698
  }
package/dist/utils.mjs CHANGED
@@ -2610,7 +2610,8 @@ var filterFieldDirty = ({
2610
2610
  formValues: itemData,
2611
2611
  dirtyFields: {},
2612
2612
  model: viewData?.models?.[model]?.[key]?.relation,
2613
- defaultData
2613
+ defaultData,
2614
+ keepZeroValue
2614
2615
  })
2615
2616
  ]);
2616
2617
  } else if (dirtyFields[key]?.length) {
@@ -2625,7 +2626,8 @@ var filterFieldDirty = ({
2625
2626
  formValues: itemData,
2626
2627
  dirtyFields: itemDirty,
2627
2628
  model: viewData?.models?.[model]?.[key]?.relation,
2628
- defaultData: {}
2629
+ defaultData: {},
2630
+ keepZeroValue
2629
2631
  })
2630
2632
  ]);
2631
2633
  }
@@ -59,6 +59,7 @@ interface GetDetailParams {
59
59
  specification?: Specification;
60
60
  context?: ContextApi;
61
61
  service?: string;
62
+ xNode?: string;
62
63
  }
63
64
  interface SaveParams {
64
65
  model: string;
@@ -68,6 +69,7 @@ interface SaveParams {
68
69
  context?: ContextApi;
69
70
  path?: string;
70
71
  service?: string;
72
+ xNode?: string;
71
73
  }
72
74
  interface DeleteParams {
73
75
  ids?: number[];
@@ -82,6 +84,7 @@ interface OnChangeParams {
82
84
  context?: ContextApi;
83
85
  fieldChange?: string[];
84
86
  service?: string;
87
+ xNode?: string;
85
88
  }
86
89
  interface ViewData {
87
90
  models?: {
@@ -59,6 +59,7 @@ interface GetDetailParams {
59
59
  specification?: Specification;
60
60
  context?: ContextApi;
61
61
  service?: string;
62
+ xNode?: string;
62
63
  }
63
64
  interface SaveParams {
64
65
  model: string;
@@ -68,6 +69,7 @@ interface SaveParams {
68
69
  context?: ContextApi;
69
70
  path?: string;
70
71
  service?: string;
72
+ xNode?: string;
71
73
  }
72
74
  interface DeleteParams {
73
75
  ids?: number[];
@@ -82,6 +84,7 @@ interface OnChangeParams {
82
84
  context?: ContextApi;
83
85
  fieldChange?: string[];
84
86
  service?: string;
87
+ xNode?: string;
85
88
  }
86
89
  interface ViewData {
87
90
  models?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "2.3.5",
3
+ "version": "2.3.9",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",