@fctc/interface-logic 2.4.1 → 2.4.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/services.js CHANGED
@@ -3064,8 +3064,7 @@ function useActionService() {
3064
3064
  async ({
3065
3065
  idAction,
3066
3066
  context,
3067
- service,
3068
- xNode
3067
+ service
3069
3068
  }) => {
3070
3069
  const jsonData = {
3071
3070
  action_id: idAction,
@@ -3075,7 +3074,7 @@ function useActionService() {
3075
3074
  "/load_action" /* LOAD_ACTION */,
3076
3075
  jsonData,
3077
3076
  {
3078
- headers: { "Content-Type": "application/json", x_node: xNode }
3077
+ headers: { "Content-Type": "application/json" }
3079
3078
  },
3080
3079
  service
3081
3080
  );
@@ -3088,8 +3087,7 @@ function useActionService() {
3088
3087
  ids = [],
3089
3088
  context,
3090
3089
  method,
3091
- service,
3092
- xNode
3090
+ service
3093
3091
  }) => {
3094
3092
  try {
3095
3093
  const jsonData = {
@@ -3102,8 +3100,7 @@ function useActionService() {
3102
3100
  "/call" /* CALL_PATH */,
3103
3101
  jsonData,
3104
3102
  {
3105
- headers: { "Content-Type": "application/json" },
3106
- ...xNode ? { x_node: xNode } : {}
3103
+ headers: { "Content-Type": "application/json" }
3107
3104
  },
3108
3105
  service
3109
3106
  );
@@ -3119,8 +3116,7 @@ function useActionService() {
3119
3116
  model,
3120
3117
  ids,
3121
3118
  context,
3122
- service,
3123
- xNode
3119
+ service
3124
3120
  }) => {
3125
3121
  const jsonData = {
3126
3122
  model,
@@ -3132,8 +3128,7 @@ function useActionService() {
3132
3128
  "/call" /* CALL_PATH */,
3133
3129
  jsonData,
3134
3130
  {
3135
- headers: { "Content-Type": "application/json" },
3136
- ...xNode ? { x_node: xNode } : {}
3131
+ headers: { "Content-Type": "application/json" }
3137
3132
  },
3138
3133
  service
3139
3134
  );
@@ -3145,8 +3140,7 @@ function useActionService() {
3145
3140
  model,
3146
3141
  id,
3147
3142
  context,
3148
- service,
3149
- xNode
3143
+ service
3150
3144
  }) => {
3151
3145
  const jsonData = {
3152
3146
  model,
@@ -3158,8 +3152,7 @@ function useActionService() {
3158
3152
  "/call" /* CALL_PATH */,
3159
3153
  jsonData,
3160
3154
  {
3161
- headers: { "Content-Type": "application/json" },
3162
- ...xNode ? { x_node: xNode } : {}
3155
+ headers: { "Content-Type": "application/json" }
3163
3156
  },
3164
3157
  service
3165
3158
  );
@@ -3206,8 +3199,7 @@ function useActionService() {
3206
3199
  async ({
3207
3200
  idAction,
3208
3201
  context,
3209
- service,
3210
- xNode
3202
+ service
3211
3203
  }) => {
3212
3204
  const jsonData = {
3213
3205
  action_id: idAction,
@@ -3217,8 +3209,7 @@ function useActionService() {
3217
3209
  "/run_action" /* RUN_ACTION_PATH */,
3218
3210
  jsonData,
3219
3211
  {
3220
- headers: { "Content-Type": "application/json" },
3221
- ...xNode ? { x_node: xNode } : {}
3212
+ headers: { "Content-Type": "application/json" }
3222
3213
  },
3223
3214
  service
3224
3215
  );
@@ -3552,7 +3543,7 @@ function useExcelService() {
3552
3543
  };
3553
3544
  return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3554
3545
  headers: {
3555
- "Content-Type": "multipart/form-data"
3546
+ "Content-Type": "application/json"
3556
3547
  }
3557
3548
  });
3558
3549
  },
@@ -3941,11 +3932,7 @@ function useModelService() {
3941
3932
  });
3942
3933
  }, [env]);
3943
3934
  const getAll = (0, import_react12.useCallback)(
3944
- async ({
3945
- data,
3946
- service,
3947
- xNode
3948
- }) => {
3935
+ async ({ data, service }) => {
3949
3936
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3950
3937
  fields: data.fields,
3951
3938
  groupby: data.groupby
@@ -3971,8 +3958,7 @@ function useModelService() {
3971
3958
  jsonData,
3972
3959
  {
3973
3960
  headers: {
3974
- "Content-Type": "application/json",
3975
- ...xNode ? { x_node: xNode } : {}
3961
+ "Content-Type": "application/json"
3976
3962
  }
3977
3963
  },
3978
3964
  service
@@ -4049,8 +4035,7 @@ function useModelService() {
4049
4035
  model,
4050
4036
  specification,
4051
4037
  context,
4052
- service,
4053
- xNode
4038
+ service
4054
4039
  }) => {
4055
4040
  const jsonData = {
4056
4041
  model,
@@ -4066,8 +4051,7 @@ function useModelService() {
4066
4051
  jsonData,
4067
4052
  {
4068
4053
  headers: {
4069
- "Content-Type": "application/json",
4070
- ...xNode ? { x_node: xNode } : {}
4054
+ "Content-Type": "application/json"
4071
4055
  }
4072
4056
  },
4073
4057
  service
@@ -4083,8 +4067,7 @@ function useModelService() {
4083
4067
  specification = {},
4084
4068
  context = {},
4085
4069
  path,
4086
- service,
4087
- xNode
4070
+ service
4088
4071
  }) => {
4089
4072
  const jsonData = {
4090
4073
  model,
@@ -4101,8 +4084,7 @@ function useModelService() {
4101
4084
  jsonData,
4102
4085
  {
4103
4086
  headers: {
4104
- "Content-Type": "application/json",
4105
- ...xNode ? { x_node: xNode } : {}
4087
+ "Content-Type": "application/json"
4106
4088
  }
4107
4089
  },
4108
4090
  service
@@ -4138,8 +4120,7 @@ function useModelService() {
4138
4120
  specification,
4139
4121
  context,
4140
4122
  fieldChange,
4141
- service,
4142
- xNode
4123
+ service
4143
4124
  }) => {
4144
4125
  const jsonData = {
4145
4126
  model,
@@ -4157,8 +4138,7 @@ function useModelService() {
4157
4138
  jsonData,
4158
4139
  {
4159
4140
  headers: {
4160
- "Content-Type": "application/json",
4161
- ...xNode ? { x_node: xNode } : {}
4141
+ "Content-Type": "application/json"
4162
4142
  }
4163
4143
  },
4164
4144
  service
@@ -4167,11 +4147,7 @@ function useModelService() {
4167
4147
  [env]
4168
4148
  );
4169
4149
  const getListFieldsOnchange = (0, import_react12.useCallback)(
4170
- async ({
4171
- model,
4172
- service,
4173
- xNode
4174
- }) => {
4150
+ async ({ model, service }) => {
4175
4151
  const jsonData = {
4176
4152
  model,
4177
4153
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -4181,8 +4157,7 @@ function useModelService() {
4181
4157
  jsonData,
4182
4158
  {
4183
4159
  headers: {
4184
- "Content-Type": "application/json",
4185
- ...xNode ? { x_node: xNode } : {}
4160
+ "Content-Type": "application/json"
4186
4161
  }
4187
4162
  },
4188
4163
  service
@@ -4347,8 +4322,7 @@ function useViewService() {
4347
4322
  context = {},
4348
4323
  options = {},
4349
4324
  aid,
4350
- service,
4351
- xNode
4325
+ service
4352
4326
  }) => {
4353
4327
  const defaultOptions = {
4354
4328
  load_filters: true,
@@ -4369,8 +4343,7 @@ function useViewService() {
4369
4343
  jsonDataView,
4370
4344
  {
4371
4345
  headers: {
4372
- "Content-Type": "application/json",
4373
- ...xNode ? { x_node: xNode } : {}
4346
+ "Content-Type": "application/json"
4374
4347
  }
4375
4348
  },
4376
4349
  service
@@ -4458,11 +4431,7 @@ function useViewService() {
4458
4431
  [env]
4459
4432
  );
4460
4433
  const getSelectionItem = (0, import_react14.useCallback)(
4461
- async ({
4462
- data,
4463
- service,
4464
- xNode
4465
- }) => {
4434
+ async ({ data, service }) => {
4466
4435
  const jsonData = {
4467
4436
  model: data.model,
4468
4437
  ids: [],
@@ -4485,8 +4454,7 @@ function useViewService() {
4485
4454
  jsonData,
4486
4455
  {
4487
4456
  headers: {
4488
- "Content-Type": "application/json",
4489
- ...xNode ? { x_node: xNode } : {}
4457
+ "Content-Type": "application/json"
4490
4458
  }
4491
4459
  },
4492
4460
  service
package/dist/services.mjs CHANGED
@@ -2946,7 +2946,7 @@ import { useQuery as useQuery12 } from "@tanstack/react-query";
2946
2946
  import { useQuery as useQuery13 } from "@tanstack/react-query";
2947
2947
 
2948
2948
  // src/hooks/view/use-get-list-data.ts
2949
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
2949
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
2950
2950
 
2951
2951
  // src/hooks/view/use-get-menu.ts
2952
2952
  import { useQuery as useQuery15 } from "@tanstack/react-query";
@@ -3020,8 +3020,7 @@ function useActionService() {
3020
3020
  async ({
3021
3021
  idAction,
3022
3022
  context,
3023
- service,
3024
- xNode
3023
+ service
3025
3024
  }) => {
3026
3025
  const jsonData = {
3027
3026
  action_id: idAction,
@@ -3031,7 +3030,7 @@ function useActionService() {
3031
3030
  "/load_action" /* LOAD_ACTION */,
3032
3031
  jsonData,
3033
3032
  {
3034
- headers: { "Content-Type": "application/json", x_node: xNode }
3033
+ headers: { "Content-Type": "application/json" }
3035
3034
  },
3036
3035
  service
3037
3036
  );
@@ -3044,8 +3043,7 @@ function useActionService() {
3044
3043
  ids = [],
3045
3044
  context,
3046
3045
  method,
3047
- service,
3048
- xNode
3046
+ service
3049
3047
  }) => {
3050
3048
  try {
3051
3049
  const jsonData = {
@@ -3058,8 +3056,7 @@ function useActionService() {
3058
3056
  "/call" /* CALL_PATH */,
3059
3057
  jsonData,
3060
3058
  {
3061
- headers: { "Content-Type": "application/json" },
3062
- ...xNode ? { x_node: xNode } : {}
3059
+ headers: { "Content-Type": "application/json" }
3063
3060
  },
3064
3061
  service
3065
3062
  );
@@ -3075,8 +3072,7 @@ function useActionService() {
3075
3072
  model,
3076
3073
  ids,
3077
3074
  context,
3078
- service,
3079
- xNode
3075
+ service
3080
3076
  }) => {
3081
3077
  const jsonData = {
3082
3078
  model,
@@ -3088,8 +3084,7 @@ function useActionService() {
3088
3084
  "/call" /* CALL_PATH */,
3089
3085
  jsonData,
3090
3086
  {
3091
- headers: { "Content-Type": "application/json" },
3092
- ...xNode ? { x_node: xNode } : {}
3087
+ headers: { "Content-Type": "application/json" }
3093
3088
  },
3094
3089
  service
3095
3090
  );
@@ -3101,8 +3096,7 @@ function useActionService() {
3101
3096
  model,
3102
3097
  id,
3103
3098
  context,
3104
- service,
3105
- xNode
3099
+ service
3106
3100
  }) => {
3107
3101
  const jsonData = {
3108
3102
  model,
@@ -3114,8 +3108,7 @@ function useActionService() {
3114
3108
  "/call" /* CALL_PATH */,
3115
3109
  jsonData,
3116
3110
  {
3117
- headers: { "Content-Type": "application/json" },
3118
- ...xNode ? { x_node: xNode } : {}
3111
+ headers: { "Content-Type": "application/json" }
3119
3112
  },
3120
3113
  service
3121
3114
  );
@@ -3162,8 +3155,7 @@ function useActionService() {
3162
3155
  async ({
3163
3156
  idAction,
3164
3157
  context,
3165
- service,
3166
- xNode
3158
+ service
3167
3159
  }) => {
3168
3160
  const jsonData = {
3169
3161
  action_id: idAction,
@@ -3173,8 +3165,7 @@ function useActionService() {
3173
3165
  "/run_action" /* RUN_ACTION_PATH */,
3174
3166
  jsonData,
3175
3167
  {
3176
- headers: { "Content-Type": "application/json" },
3177
- ...xNode ? { x_node: xNode } : {}
3168
+ headers: { "Content-Type": "application/json" }
3178
3169
  },
3179
3170
  service
3180
3171
  );
@@ -3508,7 +3499,7 @@ function useExcelService() {
3508
3499
  };
3509
3500
  return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3510
3501
  headers: {
3511
- "Content-Type": "multipart/form-data"
3502
+ "Content-Type": "application/json"
3512
3503
  }
3513
3504
  });
3514
3505
  },
@@ -3897,11 +3888,7 @@ function useModelService() {
3897
3888
  });
3898
3889
  }, [env]);
3899
3890
  const getAll = useCallback8(
3900
- async ({
3901
- data,
3902
- service,
3903
- xNode
3904
- }) => {
3891
+ async ({ data, service }) => {
3905
3892
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3906
3893
  fields: data.fields,
3907
3894
  groupby: data.groupby
@@ -3927,8 +3914,7 @@ function useModelService() {
3927
3914
  jsonData,
3928
3915
  {
3929
3916
  headers: {
3930
- "Content-Type": "application/json",
3931
- ...xNode ? { x_node: xNode } : {}
3917
+ "Content-Type": "application/json"
3932
3918
  }
3933
3919
  },
3934
3920
  service
@@ -4005,8 +3991,7 @@ function useModelService() {
4005
3991
  model,
4006
3992
  specification,
4007
3993
  context,
4008
- service,
4009
- xNode
3994
+ service
4010
3995
  }) => {
4011
3996
  const jsonData = {
4012
3997
  model,
@@ -4022,8 +4007,7 @@ function useModelService() {
4022
4007
  jsonData,
4023
4008
  {
4024
4009
  headers: {
4025
- "Content-Type": "application/json",
4026
- ...xNode ? { x_node: xNode } : {}
4010
+ "Content-Type": "application/json"
4027
4011
  }
4028
4012
  },
4029
4013
  service
@@ -4039,8 +4023,7 @@ function useModelService() {
4039
4023
  specification = {},
4040
4024
  context = {},
4041
4025
  path,
4042
- service,
4043
- xNode
4026
+ service
4044
4027
  }) => {
4045
4028
  const jsonData = {
4046
4029
  model,
@@ -4057,8 +4040,7 @@ function useModelService() {
4057
4040
  jsonData,
4058
4041
  {
4059
4042
  headers: {
4060
- "Content-Type": "application/json",
4061
- ...xNode ? { x_node: xNode } : {}
4043
+ "Content-Type": "application/json"
4062
4044
  }
4063
4045
  },
4064
4046
  service
@@ -4094,8 +4076,7 @@ function useModelService() {
4094
4076
  specification,
4095
4077
  context,
4096
4078
  fieldChange,
4097
- service,
4098
- xNode
4079
+ service
4099
4080
  }) => {
4100
4081
  const jsonData = {
4101
4082
  model,
@@ -4113,8 +4094,7 @@ function useModelService() {
4113
4094
  jsonData,
4114
4095
  {
4115
4096
  headers: {
4116
- "Content-Type": "application/json",
4117
- ...xNode ? { x_node: xNode } : {}
4097
+ "Content-Type": "application/json"
4118
4098
  }
4119
4099
  },
4120
4100
  service
@@ -4123,11 +4103,7 @@ function useModelService() {
4123
4103
  [env]
4124
4104
  );
4125
4105
  const getListFieldsOnchange = useCallback8(
4126
- async ({
4127
- model,
4128
- service,
4129
- xNode
4130
- }) => {
4106
+ async ({ model, service }) => {
4131
4107
  const jsonData = {
4132
4108
  model,
4133
4109
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -4137,8 +4113,7 @@ function useModelService() {
4137
4113
  jsonData,
4138
4114
  {
4139
4115
  headers: {
4140
- "Content-Type": "application/json",
4141
- ...xNode ? { x_node: xNode } : {}
4116
+ "Content-Type": "application/json"
4142
4117
  }
4143
4118
  },
4144
4119
  service
@@ -4303,8 +4278,7 @@ function useViewService() {
4303
4278
  context = {},
4304
4279
  options = {},
4305
4280
  aid,
4306
- service,
4307
- xNode
4281
+ service
4308
4282
  }) => {
4309
4283
  const defaultOptions = {
4310
4284
  load_filters: true,
@@ -4325,8 +4299,7 @@ function useViewService() {
4325
4299
  jsonDataView,
4326
4300
  {
4327
4301
  headers: {
4328
- "Content-Type": "application/json",
4329
- ...xNode ? { x_node: xNode } : {}
4302
+ "Content-Type": "application/json"
4330
4303
  }
4331
4304
  },
4332
4305
  service
@@ -4414,11 +4387,7 @@ function useViewService() {
4414
4387
  [env]
4415
4388
  );
4416
4389
  const getSelectionItem = useCallback10(
4417
- async ({
4418
- data,
4419
- service,
4420
- xNode
4421
- }) => {
4390
+ async ({ data, service }) => {
4422
4391
  const jsonData = {
4423
4392
  model: data.model,
4424
4393
  ids: [],
@@ -4441,8 +4410,7 @@ function useViewService() {
4441
4410
  jsonData,
4442
4411
  {
4443
4412
  headers: {
4444
- "Content-Type": "application/json",
4445
- ...xNode ? { x_node: xNode } : {}
4413
+ "Content-Type": "application/json"
4446
4414
  }
4447
4415
  },
4448
4416
  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-xxw9OeSR.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-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-xxw9OeSR.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-p4JdAOsz.js';
2
2
 
3
3
  interface Config {
4
4
  baseUrl: string;
package/dist/utils.d.mts CHANGED
@@ -50,14 +50,13 @@ declare const convertFloatToTime: (floatValue: number) => string;
50
50
  declare const convertTimeToFloat: (timeString: string) => number;
51
51
  declare const stringToColor: (name: string, id: number) => string;
52
52
  declare const getFieldsOnChange: (fields: any) => any;
53
- declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, keepZeroValue, }: {
53
+ declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, }: {
54
54
  id?: any;
55
55
  viewData?: any;
56
56
  formValues?: any;
57
57
  dirtyFields?: any;
58
58
  model?: any;
59
59
  defaultData?: any;
60
- keepZeroValue?: boolean;
61
60
  }) => any;
62
61
  type MergeableObject = {
63
62
  [key: string]: any;
package/dist/utils.d.ts CHANGED
@@ -50,14 +50,13 @@ declare const convertFloatToTime: (floatValue: number) => string;
50
50
  declare const convertTimeToFloat: (timeString: string) => number;
51
51
  declare const stringToColor: (name: string, id: number) => string;
52
52
  declare const getFieldsOnChange: (fields: any) => any;
53
- declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, keepZeroValue, }: {
53
+ declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, }: {
54
54
  id?: any;
55
55
  viewData?: any;
56
56
  formValues?: any;
57
57
  dirtyFields?: any;
58
58
  model?: any;
59
59
  defaultData?: any;
60
- keepZeroValue?: boolean;
61
60
  }) => any;
62
61
  type MergeableObject = {
63
62
  [key: string]: any;
package/dist/utils.js CHANGED
@@ -2654,8 +2654,7 @@ var filterFieldDirty = ({
2654
2654
  formValues,
2655
2655
  dirtyFields,
2656
2656
  model,
2657
- defaultData,
2658
- keepZeroValue = false
2657
+ defaultData
2659
2658
  }) => {
2660
2659
  const data = id ? { ...dirtyFields } : { ...formValues };
2661
2660
  for (const key in data) {
@@ -2675,8 +2674,7 @@ var filterFieldDirty = ({
2675
2674
  formValues: itemData,
2676
2675
  dirtyFields: {},
2677
2676
  model: viewData?.models?.[model]?.[key]?.relation,
2678
- defaultData,
2679
- keepZeroValue
2677
+ defaultData
2680
2678
  })
2681
2679
  ]);
2682
2680
  } else if (dirtyFields[key]?.length) {
@@ -2691,8 +2689,7 @@ var filterFieldDirty = ({
2691
2689
  formValues: itemData,
2692
2690
  dirtyFields: itemDirty,
2693
2691
  model: viewData?.models?.[model]?.[key]?.relation,
2694
- defaultData: {},
2695
- keepZeroValue
2692
+ defaultData: {}
2696
2693
  })
2697
2694
  ]);
2698
2695
  }
@@ -2724,11 +2721,9 @@ var filterFieldDirty = ({
2724
2721
  data[key] = lineData;
2725
2722
  } else {
2726
2723
  if (id && (typeof dirtyFields?.[key] === "object" && !dirtyFields?.[key]?.id || typeof dirtyFields[key] !== "object" && !dirtyFields[key])) {
2727
- if (!(keepZeroValue && (formValues[key] === 0 || formValues[key] === "0"))) {
2728
- delete data[key];
2729
- }
2724
+ delete data[key];
2730
2725
  } else {
2731
- if (!data[key] && !(keepZeroValue && (data[key] === 0 || data[key] === "0"))) {
2726
+ if (!data[key]) {
2732
2727
  delete data[key];
2733
2728
  } else {
2734
2729
  data[key] = formValues?.[key]?.display_name ? formValues?.[key]?.id : formValues?.[key];
package/dist/utils.mjs CHANGED
@@ -2589,8 +2589,7 @@ var filterFieldDirty = ({
2589
2589
  formValues,
2590
2590
  dirtyFields,
2591
2591
  model,
2592
- defaultData,
2593
- keepZeroValue = false
2592
+ defaultData
2594
2593
  }) => {
2595
2594
  const data = id ? { ...dirtyFields } : { ...formValues };
2596
2595
  for (const key in data) {
@@ -2610,8 +2609,7 @@ var filterFieldDirty = ({
2610
2609
  formValues: itemData,
2611
2610
  dirtyFields: {},
2612
2611
  model: viewData?.models?.[model]?.[key]?.relation,
2613
- defaultData,
2614
- keepZeroValue
2612
+ defaultData
2615
2613
  })
2616
2614
  ]);
2617
2615
  } else if (dirtyFields[key]?.length) {
@@ -2626,8 +2624,7 @@ var filterFieldDirty = ({
2626
2624
  formValues: itemData,
2627
2625
  dirtyFields: itemDirty,
2628
2626
  model: viewData?.models?.[model]?.[key]?.relation,
2629
- defaultData: {},
2630
- keepZeroValue
2627
+ defaultData: {}
2631
2628
  })
2632
2629
  ]);
2633
2630
  }
@@ -2659,11 +2656,9 @@ var filterFieldDirty = ({
2659
2656
  data[key] = lineData;
2660
2657
  } else {
2661
2658
  if (id && (typeof dirtyFields?.[key] === "object" && !dirtyFields?.[key]?.id || typeof dirtyFields[key] !== "object" && !dirtyFields[key])) {
2662
- if (!(keepZeroValue && (formValues[key] === 0 || formValues[key] === "0"))) {
2663
- delete data[key];
2664
- }
2659
+ delete data[key];
2665
2660
  } else {
2666
- if (!data[key] && !(keepZeroValue && (data[key] === 0 || data[key] === "0"))) {
2661
+ if (!data[key]) {
2667
2662
  delete data[key];
2668
2663
  } else {
2669
2664
  data[key] = formValues?.[key]?.display_name ? formValues?.[key]?.id : formValues?.[key];
@@ -59,7 +59,6 @@ interface GetDetailParams {
59
59
  specification?: Specification;
60
60
  context?: ContextApi;
61
61
  service?: string;
62
- xNode?: string;
63
62
  }
64
63
  interface SaveParams {
65
64
  model: string;
@@ -69,7 +68,6 @@ interface SaveParams {
69
68
  context?: ContextApi;
70
69
  path?: string;
71
70
  service?: string;
72
- xNode?: string;
73
71
  }
74
72
  interface DeleteParams {
75
73
  ids?: number[];
@@ -84,7 +82,6 @@ interface OnChangeParams {
84
82
  context?: ContextApi;
85
83
  fieldChange?: string[];
86
84
  service?: string;
87
- xNode?: string;
88
85
  }
89
86
  interface ViewData {
90
87
  models?: {
@@ -116,7 +113,6 @@ interface GetViewParams {
116
113
  options?: Option;
117
114
  aid?: number | string | null | boolean;
118
115
  service?: string;
119
- xNode?: string;
120
116
  }
121
117
 
122
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 };