@kuzntsv/uikit 1.0.72 → 1.0.74

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.
@@ -3117,7 +3117,7 @@ function cleanFilterParams(filters) {
3117
3117
  const cleanParams = {};
3118
3118
  Object.keys(filters).forEach((key) => {
3119
3119
  const value = filters[key];
3120
- if (value === null || value === void 0 || value === "") return;
3120
+ if (value === null || value === void 0 || value === "" || value === 0) return;
3121
3121
  if (Array.isArray(value) && value.length === 0) return;
3122
3122
  cleanParams[key] = value;
3123
3123
  });
@@ -3145,7 +3145,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
3145
3145
  defaultValue: [],
3146
3146
  parse: (data) => {
3147
3147
  if (!data) return [];
3148
- return this.safeParseData(z.array(this.schema), data);
3148
+ return this.safeParseData(z.array(this.schema), data, true);
3149
3149
  }
3150
3150
  });
3151
3151
  }
@@ -3188,7 +3188,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
3188
3188
  defaultValue: [],
3189
3189
  parse: (data) => {
3190
3190
  if (!data) return [];
3191
- return this.safeParseData(z.array(this.schema), data);
3191
+ return this.safeParseData(z.array(this.schema), data, true);
3192
3192
  }
3193
3193
  });
3194
3194
  }
@@ -3210,7 +3210,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
3210
3210
  defaultValue: [],
3211
3211
  parse: (data) => {
3212
3212
  if (!data) return [];
3213
- return this.safeParseData(z.array(this.schema), data);
3213
+ return this.safeParseData(z.array(this.schema), data, true);
3214
3214
  }
3215
3215
  });
3216
3216
  }
@@ -3260,10 +3260,12 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
3260
3260
  if (!this.apiContextName) return {};
3261
3261
  return { context: new HttpContext().set(API_NAME, this.apiContextName) };
3262
3262
  }
3263
- safeParseData(schema, data) {
3263
+ safeParseData(schema, data, isArray = false) {
3264
3264
  const result = schema.safeParse(data);
3265
3265
  if (!result.success) {
3266
- const formattedErrorMessage = formatZodError(result.error);
3266
+ const serviceName = this.constructor.name;
3267
+ const contextName = `${serviceName} [Ожидаемый тип: ${isArray ? `Array<${serviceName.replace("Service", "")}>` : serviceName.replace("Service", "")}] (Route: "${this.baseRoute}")`;
3268
+ const formattedErrorMessage = formatZodError(result.error, contextName);
3267
3269
  throw new Error(formattedErrorMessage);
3268
3270
  }
3269
3271
  return result.data;