@kuzntsv/uikit 1.0.61 → 1.0.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuzntsv/uikit",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.2",
6
6
  "@angular/core": "^22.2.2",
@@ -380,8 +380,8 @@ export type SortDirection = 'asc' | 'desc' | '';
380
380
  export type fnGetDataType<T> = () => Observable<T[]>;
381
381
  /** @deprecated */
382
382
  export type fnGetCountType<T> = () => Observable<number>;
383
- export type fnGetDataByStateAndFilterType<T, F extends SafeFilterState = any> = (state: TableState, filters: F) => HttpResourceRef<T[]>;
384
- export type fnGetCountByFilterType<F extends SafeFilterState = any> = (filters: F) => HttpResourceRef<number>;
383
+ export type fnGetDataByStateAndFilterType<T, F extends SafeFilterState = any> = (state: TableState, filters?: F) => HttpResourceRef<T[]>;
384
+ export type fnGetCountByFilterType<F extends SafeFilterState = any> = (filters?: F) => HttpResourceRef<number>;
385
385
  export type fnMapEntityType<T> = () => (item: T) => T;
386
386
  export declare const SortDirectionSchema: z.ZodCustom<SortDirection, SortDirection>;
387
387
  export declare const SortStateSchema: z.ZodObject<{
@@ -1353,11 +1353,15 @@ export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F e
1353
1353
  allowMultiSelect: boolean;
1354
1354
  /** Выбранные строки в таблице. */
1355
1355
  selected: T[];
1356
- protected abstract fnGetData: fnGetDataByStateAndFilterType<T, F>;
1357
- protected abstract fnGetCount: fnGetCountByFilterType<F>;
1358
1356
  protected abstract fnMapEntity: fnMapEntityType<T> | undefined;
1359
- protected dataResource: import("@angular/core").Signal<import("@angular/common/http").HttpResourceRef<T[]>>;
1360
- protected countResource: import("@angular/core").Signal<import("@angular/common/http").HttpResourceRef<number>>;
1357
+ protected dataResource: HttpResourceRef<T[]>;
1358
+ protected countResource: HttpResourceRef<number>;
1359
+ /**
1360
+ * 1. АБСТРАКТНЫЕ ФАБРИКИ: Компонент сам определит,
1361
+ * какие методы какого сервиса вызвать для инициализации.
1362
+ */
1363
+ protected abstract initDataResource(): HttpResourceRef<T[]>;
1364
+ protected abstract initCountResource(): HttpResourceRef<number>;
1361
1365
  /** Данные для табличного компонента. */
1362
1366
  data: import("@angular/core").Signal<T[]>;
1363
1367
  /** Количество записей по фильтру. */
@@ -1451,17 +1455,17 @@ export declare abstract class BaseSignalServiceClass<T extends BaseSchemaClass>
1451
1455
  getObjects(): HttpResourceRef<T[]>;
1452
1456
  getObject(id: number | (() => number | null | undefined)): HttpResourceRef<T | null>;
1453
1457
  getCount(): HttpResourceRef<number>;
1454
- getObjectsByPaging(tableState: TableState): HttpResourceRef<T[]>;
1458
+ getObjectsByPaging(tableStateGetter: () => TableState): HttpResourceRef<T[]>;
1455
1459
  /**
1456
1460
  * Универсальный метод получения пагинированных данных с фильтрацией.
1457
1461
  * Автоматически очищает фильтры от null/undefined/пустых значений с помощью cleanFilterParams.
1458
1462
  */
1459
- getObjectsByFilterPaging<F extends SafeFilterState>(tableState: TableState, filters: F): HttpResourceRef<T[]>;
1463
+ getObjectsByFilterPaging<F extends SafeFilterState>(tableStateGetter: () => TableState, filtersGetter: () => F): HttpResourceRef<T[]>;
1460
1464
  /**
1461
1465
  * Универсальный метод получения КОЛИЧЕСТВА записей с фильтрацией.
1462
1466
  * Автоматически очищает фильтры перед отправкой.
1463
1467
  */
1464
- getObjectsCountByFilter<F extends SafeFilterState>(filters: F): HttpResourceRef<number>;
1468
+ getObjectsCountByFilter<F extends SafeFilterState>(filtersGetter: () => F): HttpResourceRef<number>;
1465
1469
  protected buildTableParams(tableState: TableState): Record<string, string | number>;
1466
1470
  /**
1467
1471
  * МЕТОД СОЗДАНИЯ (POST)