@kuzntsv/uikit 1.0.117 → 1.0.119

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.
@@ -1853,12 +1853,9 @@ var BaseSignalPageClass = class BaseSignalPageClass {
1853
1853
  dataResource;
1854
1854
  countResource;
1855
1855
  data = computed(() => {
1856
- console.log("data start");
1857
1856
  if (!this.dataResource) return [];
1858
1857
  if (this.dataResource.error()) return [];
1859
- console.log("data after error, this.dataResource?.value()=", this.dataResource?.value());
1860
1858
  const rawData = this.dataResource?.value() || [];
1861
- console.log("this.fnMapEntity=", this.fnMapEntity, "Array.isArray(rawData)=", Array.isArray(rawData));
1862
1859
  return this.fnMapEntity && Array.isArray(rawData) ? rawData.map(this.fnMapEntity()) : rawData;
1863
1860
  }, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
1864
1861
  length = computed(() => {
@@ -1905,6 +1902,22 @@ var BaseSignalPageClass = class BaseSignalPageClass {
1905
1902
  if (filterChanged) {}
1906
1903
  previousFilters = { ...currentFilters };
1907
1904
  });
1905
+ effect(() => {
1906
+ const dataError = this.dataResource?.error();
1907
+ if (dataError) {
1908
+ const errorMessage = dataError instanceof Error ? dataError.message : String(dataError);
1909
+ console.log(`[Валидация данных] Ошибка структуры JSON от сервера:\n${errorMessage}`);
1910
+ this.notificationService.error("Произошла ошибка при чтении/парсинге данных с сервера.", 0);
1911
+ }
1912
+ });
1913
+ effect(() => {
1914
+ const countError = this.countResource?.error();
1915
+ if (countError) {
1916
+ const errorMessage = countError instanceof Error ? countError.message : String(countError);
1917
+ console.log(`[Валидация пагинации] ${errorMessage}`);
1918
+ this.notificationService.error("Произошла ошибка при чтении/парсинге данных с сервера.", 0);
1919
+ }
1920
+ });
1908
1921
  }
1909
1922
  ngOnDestroy() {
1910
1923
  this.subscription.unsubscribe();