@masterteam/components 0.0.228 → 0.0.230

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": "@masterteam/components",
3
- "version": "0.0.228",
3
+ "version": "0.0.230",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -330,7 +330,21 @@ declare class EntityListField implements ControlValueAccessor {
330
330
  protected openAddDialog(): void;
331
331
  protected openEditDialog(row: EntityListRow): void;
332
332
  protected deleteLocalRow(row: EntityListRow): void;
333
+ /**
334
+ * Normalize the add/edit dialog close payload. The rich dialog returns
335
+ * `{ values, display }`; a custom add-dialog may still return the raw values
336
+ * object directly (no display map), which we treat as `display = {}`.
337
+ */
338
+ private parseDialogResult;
333
339
  private buildRowFromValues;
340
+ /**
341
+ * Shape a raw form value into the value an entity renderer expects for the
342
+ * given view type. Locally-added rows carry raw form values, but renderers
343
+ * like `mt-entity-user` need a display object (`{ displayName }`) — a
344
+ * team-member `User` field is a select whose control value is a bare user id.
345
+ * `label` is the resolved option display (present for select-based fields).
346
+ */
347
+ private toLocalEntityValue;
334
348
  private emitLocalValue;
335
349
  private fetchRows;
336
350
  private applyResponse;
@@ -10,6 +10,7 @@ declare class Drawer implements OnDestroy {
10
10
  private readonly drawerInstanceClass;
11
11
  private customMask;
12
12
  private removeMaskClickListener;
13
+ private bodyScrollBlocked;
13
14
  private resizeAnimTimer;
14
15
  private readonly RESIZE_ANIM_CLASS;
15
16
  private readonly RESIZE_ANIM_DURATION_MS;
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type, InjectionToken, Injector } from '@angular/core';
2
+ import { Type, InjectionToken, OnDestroy, Injector } from '@angular/core';
3
3
  import { DynamicDialogRef } from 'primeng/dynamicdialog';
4
4
 
5
5
  interface DynamicDrawerConfigInterface {
@@ -20,15 +20,20 @@ interface DynamicDrawerConfigInterface {
20
20
  restoreTooltip?: string;
21
21
  }
22
22
  declare class DrawerService {
23
- private appRef;
24
- private env;
25
- private rootInjector;
26
- private destroyRef;
27
- private doc;
28
- private hostRef?;
23
+ private readonly appRef;
24
+ private readonly env;
25
+ private readonly rootInjector;
26
+ private readonly destroyRef;
27
+ private readonly doc;
28
+ private readonly activeHosts;
29
+ private readonly animationCleanupBufferMs;
30
+ private readonly drawerLeaveAnimationMs;
29
31
  defauiltConfig: DynamicDrawerConfigInterface;
30
32
  constructor();
31
33
  open<T>(component: Type<any>, config?: DynamicDrawerConfigInterface): DynamicDialogRef<T>;
34
+ private closeHost;
35
+ private cleanupHost;
36
+ private readTransitionDurationMs;
32
37
  private preloadDrawerHost;
33
38
  private resolveAppendTarget;
34
39
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerService, never>;
@@ -72,13 +77,17 @@ declare class DrawerController {
72
77
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerController, never>;
73
78
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<DrawerController>;
74
79
  }
75
- declare class DynamicDrawerHost {
80
+ declare class DynamicDrawerHost implements OnDestroy {
76
81
  visible: _angular_core.ModelSignal<boolean>;
82
+ private readonly pDrawer;
83
+ private primeDrawer;
77
84
  cmp: _angular_core.WritableSignal<any>;
78
85
  cfg: _angular_core.WritableSignal<any>;
79
86
  cmpInputs: _angular_core.WritableSignal<Record<string, unknown>>;
80
87
  childInjector: Injector;
81
88
  private ref?;
89
+ private refCloseSubscription?;
90
+ private readonly fixedPosition;
82
91
  private closed;
83
92
  private drawerController;
84
93
  private readonly host;
@@ -108,15 +117,40 @@ declare class DynamicDrawerHost {
108
117
  config?: any;
109
118
  parent: Injector;
110
119
  ref: DynamicDialogRef;
120
+ fixedPosition?: boolean;
111
121
  }): void;
112
122
  show(): void;
123
+ hide(): void;
113
124
  handleHide(data?: null): void;
114
125
  /** Close the drawer ref at most once, regardless of the close path. */
115
126
  private closeOnce;
116
127
  onDrawerShow(): void;
117
128
  onDrawerHide(): void;
129
+ /**
130
+ * PrimeNG appends the drawer's modal mask to `<body>` — not to `appendTo` —
131
+ * and only removes it from its own dismiss paths (mask click / Escape ->
132
+ * close() -> disableModality() -> animationend -> destroyModal()). Every
133
+ * programmatic close (the header X, `ref.close()` from the content
134
+ * component, DrawerService.closeHost) skips those paths, and p-drawer's own
135
+ * ngOnDestroy is guarded by `if (this.visible && this.modal)` — `visible` is
136
+ * already false by then, so it cleans up nothing.
137
+ *
138
+ * The leftover `.p-overlay-mask` is `position: fixed` and covers the whole
139
+ * viewport, so the app silently stops responding to clicks until a reload.
140
+ * Drive PrimeNG's teardown explicitly instead: fade the mask out when the
141
+ * drawer starts closing, and hard-remove it when the host is destroyed.
142
+ */
143
+ private beginMaskTeardown;
144
+ /**
145
+ * Only consults the cached instance — this also runs from ngOnDestroy, where
146
+ * reading a view query is not safe. A drawer that never opened never created
147
+ * a mask, so there is nothing to miss.
148
+ */
149
+ private forceMaskTeardown;
150
+ private resolvePrimeDrawer;
118
151
  private getDrawerElement;
119
152
  private applyMaximizedInlineStyles;
153
+ ngOnDestroy(): void;
120
154
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicDrawerHost, never>;
121
155
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicDrawerHost, "mt-dynamic-drawer-host", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "connect": { "alias": "connect"; "required": true; }; }, { "visible": "visibleChange"; }, never, never, true, never>;
122
156
  }