@kuzntsv/uikit 1.0.53 → 1.0.56

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.53",
3
+ "version": "1.0.56",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.2",
6
6
  "@angular/core": "^22.2.2",
@@ -897,7 +897,7 @@ type SafeFilterState = Readonly<Record<string, FilterValue>>;
897
897
  type CleanFilterValue = Exclude<FilterValue, null | undefined>;
898
898
  type CleanFilterState = Readonly<Record<string, CleanFilterValue>>;
899
899
  declare function cleanFilterParams(filters: SafeFilterState): CleanFilterState;
900
- export declare class BaseSignalFilterClass<F extends SafeFilterState> {
900
+ export declare abstract class BaseSignalFilterClass<F extends SafeFilterState> {
901
901
  /** Сервис индикатор загрузки. */
902
902
  protected loaderService: LoaderService;
903
903
  /** Сервис уведомлений. */
@@ -914,9 +914,38 @@ export declare class BaseSignalFilterClass<F extends SafeFilterState> {
914
914
  * this.filters.update(prev => ({ ...prev, category: newCategory }));
915
915
  * }
916
916
  */
917
+ /** Двусторонняя модель теперь строго типизирована вашим SafeFilterState. */
917
918
  filters: import("@angular/core").ModelSignal<F>;
918
919
  /** Входной сигнал для сброса состояния формы. */
919
920
  clearFilter: import("@angular/core").InputSignal<any>;
921
+ protected isUseInternalFilterSignal: number;
922
+ /**
923
+ * Локальный сигнал формы, чтобы изолировать ввод пользователя
924
+ * от родительской двусторонней модели filters.
925
+ *
926
+ * ### ВАЖНО:
927
+ * * При использовании для создания формы и в шаблоне, необходимо задать
928
+ * isUseInternalFilterSignal = 1, чтобы при clearFilter чистилась правильная модель.
929
+ *
930
+ * @example
931
+ * protected isUseInternalFilterSignal = 1;
932
+ * protected form = form(this.internalFilterSignal, (schemaPath) => {
933
+ * // Дебаунсим только текстовые инпут dept. Остальные обновятся мгновенно.
934
+ * debounce(schemaPath.dept, this.defaultDebounceTime);
935
+ * });
936
+ *
937
+ * */
938
+ protected internalFilterSignal: import("@angular/core").WritableSignal<F>;
939
+ protected abstract DEFAULT_FILTER: F;
940
+ /**
941
+ * Объект для отписки от внутренних подписок (например, valueChanges у FormControl).
942
+ * Метод unsubscribe вызывается при уничтожении компонента.
943
+ */
944
+ constructor();
945
+ /** Мгновенная очистка конкретного поля по крестику у двусторонней модели filters. */
946
+ clearField(fieldName: keyof F, defaultValue: any): void;
947
+ /** Мгновенная очистка конкретного поля по крестику. */
948
+ clearFieldInternal(fieldName: keyof F, defaultValue: any): void;
920
949
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseSignalFilterClass<any>, never>;
921
950
  static ɵdir: i0.ɵɵDirectiveDeclaration<BaseSignalFilterClass<any>, never, never, {
922
951
  "filters": {
@@ -935,7 +964,6 @@ export declare class BaseSignalFilterClass<F extends SafeFilterState> {
935
964
  }
936
965
  export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F extends SafeFilterState = Record<string, never>> implements OnDestroy {
937
966
  protected dialog: MatDialog;
938
- protected entityType: any;
939
967
  protected entityService: any;
940
968
  protected entityEditComponent?: any;
941
969
  protected extraData?: any;
@@ -1026,6 +1054,10 @@ export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F e
1026
1054
  constructor();
1027
1055
  ngOnDestroy(): void;
1028
1056
  subscribeToLoadData(fnGetData: fnGetDataResType<T>, fnGetCount: fnGetCountResType<T>, fnMapEntity?: fnMapEntityType<T>): void;
1057
+ /** Установка значение фильтра.
1058
+ * @param key - имя фильтра.
1059
+ * @param value - значение.
1060
+ */
1029
1061
  setFilter<K extends keyof F>(key: K, value: F[K]): void;
1030
1062
  onPageChange(pageState: IPageState): void;
1031
1063
  onSortChange(sortState: ISortState): void;