@kuzntsv/uikit 1.0.114 → 1.0.116

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.114",
3
+ "version": "1.0.116",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.2",
6
6
  "@angular/core": "^22.2.2",
@@ -1,5 +1,5 @@
1
1
  import { LoaderService, NotificationService, RoleService, SignalSelectionModel } from "@kuzntsv/uikit";
2
- import z, { z as z$1 } from "zod";
2
+ import z, { ZodObject, z as z$1 } from "zod";
3
3
  import { Observable, Subject, Subscription } from "rxjs";
4
4
  import { MatMenuTrigger } from "@angular/material/menu";
5
5
  import { MatPaginator, PageEvent } from "@angular/material/paginator";
@@ -835,7 +835,7 @@ export declare abstract class BaseServiceClass<T extends BaseClass> {
835
835
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseServiceClass<any>, never>;
836
836
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
837
837
  }
838
- export declare abstract class BaseSignalEditClass<TDomain extends Record<string, any>, TForm extends Record<string, any> = TDomain> implements OnDestroy {
838
+ export declare abstract class BaseSignalEditClass<TDomain extends Record<string, any>, TForm extends TDomain = TDomain> implements OnDestroy {
839
839
  /** Заголовок. */
840
840
  abstract title: string;
841
841
  /** Данные диалога. */
@@ -843,6 +843,8 @@ export declare abstract class BaseSignalEditClass<TDomain extends Record<string,
843
843
  protected formAction: import("@angular/core").Signal<Action>;
844
844
  protected formActionIsAdd: import("@angular/core").Signal<boolean>;
845
845
  protected formActionIsEdit: import("@angular/core").Signal<boolean>;
846
+ /** Наследник может передать чистую DTO схему для очистки (опционально). */
847
+ protected domainSchema?: ZodObject<any>;
846
848
  protected domainModel: import("@angular/core").Signal<TDomain>;
847
849
  protected formModel: WritableSignal<TForm>;
848
850
  /** Форма. */
@@ -866,6 +868,7 @@ export declare abstract class BaseSignalEditClass<TDomain extends Record<string,
866
868
  protected domainModelToFormModel(domainModel: TDomain): TForm;
867
869
  /**
868
870
  * Маппинг: Форма -> Домен.
871
+ * Если передана схема домена (domainSchema), Zod сам удалит лишние поля и вернет чистый DTO
869
872
  * Реализация по умолчанию объединяет старый домен и новые поля формы.
870
873
  */
871
874
  protected formModelToDomainModel(formModel: TForm, originalDomain?: TDomain): TDomain;
@@ -1021,9 +1024,9 @@ export declare abstract class BaseSignalPageClass<TDomain extends BaseSchemaClas
1021
1024
  /** Выбранные строки в таблице. */
1022
1025
  selected: import("@angular/core").WritableSignal<TForm[]>;
1023
1026
  /** Доступность кнопки "Изменить". */
1024
- editBtnDisabled: import("@angular/core").Signal<boolean>;
1027
+ protected editBtnDisabled: import("@angular/core").Signal<boolean>;
1025
1028
  /** Доступность кнопки "Удалить". */
1026
- removeBtnDisabled: import("@angular/core").Signal<boolean>;
1029
+ protected removeBtnDisabled: import("@angular/core").Signal<boolean>;
1027
1030
  /** Маппинг TDomain в TForm */
1028
1031
  protected fnMapEntity: fnMapEntityType<TForm> | undefined;
1029
1032
  /** Ссылка на ресурс получения данных, определяет потомок. */