@kuzntsv/uikit 1.0.34 → 1.0.36

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.34",
3
+ "version": "1.0.36",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.2",
6
6
  "@angular/core": "^22.2.2"
@@ -640,7 +640,7 @@ export declare abstract class BaseEditClass<T> implements OnDestroy {
640
640
  }
641
641
  export interface IEntityAction<T> {
642
642
  action: EntityAction;
643
- entity: T;
643
+ entity: T | undefined;
644
644
  }
645
645
  export declare enum EntityAction {
646
646
  Init = "Инициализация",
@@ -649,19 +649,33 @@ export declare enum EntityAction {
649
649
  Delete = "Удаление"
650
650
  }
651
651
  export declare class BaseFilterClass implements OnDestroy {
652
- /** Сервис для работы с LocalStorage. */
653
- protected localStorageService: LocalStorageService;
654
652
  /** Сервис индикатор загрузки. */
655
653
  protected loaderService: LoaderService;
656
654
  /** Сервис уведомлений. */
657
655
  protected notificationService: NotificationService;
658
656
  defaultDebounceTime: number;
659
- /** Объект для отписки (вызывается метод unsubscribe при уничтожении компонента). */
657
+ filters: import("@angular/core").InputSignal<Record<string, any>>;
658
+ clearFilters: import("@angular/core").InputSignal<any>;
659
+ /**
660
+ * Объект для отписки от внутренних стримов (например, valueChanges у FormControl).
661
+ * (вызывается метод unsubscribe при уничтожении компонента).
662
+ * */
660
663
  subscription: Subscription;
661
664
  constructor();
662
665
  ngOnDestroy(): void;
663
666
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseFilterClass, never>;
664
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFilterClass, never, never, {}, {}, never, never, true, never>;
667
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFilterClass, never, never, {
668
+ "filters": {
669
+ "alias": "filters";
670
+ "required": false;
671
+ "isSignal": true;
672
+ };
673
+ "clearFilters": {
674
+ "alias": "clearFilters";
675
+ "required": false;
676
+ "isSignal": true;
677
+ };
678
+ }, {}, never, never, true, never>;
665
679
  }
666
680
  export declare class BaseNavBarMenuClass {
667
681
  protected roleService: RoleService;
@@ -706,10 +720,6 @@ export declare class DialogComponent {
706
720
  }
707
721
  export declare class BasePageClass<T> implements OnDestroy {
708
722
  protected dialog: MatDialog;
709
- /** Данные для табличного компонента. */
710
- data: import("@angular/core").WritableSignal<T[]>;
711
- /** Количество записей по фильтру. */
712
- length: import("@angular/core").WritableSignal<number>;
713
723
  entityService: any;
714
724
  entityType: any;
715
725
  entityEditComponent: any;
@@ -756,15 +766,20 @@ export declare class BasePageClass<T> implements OnDestroy {
756
766
  /** Загрузка количества записей. */
757
767
  loadLength$: Subject<null>;
758
768
  /** Очистка фильтра. */
759
- clearFilter$: Subject<null>;
760
769
  /** Очистка фильтра (для очистки присвоить пустой объект '{}'). */
761
- clearFilter: any;
762
770
  /** Разрешен выбор нескольких строк. */
763
771
  allowMultiSelect: boolean;
764
772
  /** Выбранные строки в таблице. */
765
773
  selected: T[];
766
- /** Состояние сортировки, пагинации. */
767
- tableState: ITableState;
774
+ protected fnGetData: import("@angular/core").WritableSignal<fnGetDataType<T> | null>;
775
+ protected fnGetCount: import("@angular/core").WritableSignal<fnGetCountType<T> | null>;
776
+ protected fnMapEntity: import("@angular/core").WritableSignal<fnMapEntityType<T> | undefined>;
777
+ protected dataResource: import("@angular/core").ResourceRef<T[] | undefined>;
778
+ protected countResource: import("@angular/core").ResourceRef<number | undefined>;
779
+ /** Данные для табличного компонента. */
780
+ data: import("@angular/core").Signal<T[]>;
781
+ /** Количество записей по фильтру. */
782
+ length: import("@angular/core").Signal<number>;
768
783
  /** Доступность кнопки "Изменить". */
769
784
  editBtnDisabled: boolean;
770
785
  /** Доступность кнопки "Удалить". */
@@ -781,9 +796,13 @@ export declare class BasePageClass<T> implements OnDestroy {
781
796
  protected notificationService: import("@kuzntsv/uikit").INotificationService;
782
797
  /** Объект для отписки (вызывается метод unsubscribe при уничтожении компонента). */
783
798
  subscription: Subscription;
799
+ filters: import("@angular/core").WritableSignal<Record<string, any>>;
800
+ /** Состояние сортировки, пагинации. */
801
+ tableState: import("@angular/core").WritableSignal<ITableState>;
784
802
  constructor();
785
803
  ngOnDestroy(): void;
786
804
  subscribeToLoadData(fnGetData: fnGetDataType<T>, fnGetCount: fnGetCountType<T>, fnMapEntity?: fnMapEntityType<T>): void;
805
+ setFilter(key: string, value: any): void;
787
806
  onPageChange(pageState: IPageState): void;
788
807
  onSortChange(sortState: ISortState): void;
789
808
  entityFactory(type: new () => T): T;