@tekus/design-system 5.24.0 → 5.25.1

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.
@@ -1,6 +1,8 @@
1
1
  import { ValidatorFn } from '@angular/forms';
2
2
  import * as _angular_core from '@angular/core';
3
+ import { ComponentRef } from '@angular/core';
3
4
  import { Preset } from '@primeuix/themes/types';
5
+ import { PartialObserver, Subscription, Subject } from 'rxjs';
4
6
 
5
7
  interface Option {
6
8
  ViewValue: string;
@@ -178,5 +180,55 @@ interface TkCanClose {
178
180
  */
179
181
  type TkCloseInterceptor = () => boolean;
180
182
 
181
- export { Breakpoints, GapGutter, Gutter, PaddingGridContainer, TkPreset, provideTkTheme };
183
+ /**
184
+ * Reference to a dialog/drawer opened via a service.
185
+ * Supports both Observable-style subscription and Signal-based state.
186
+ */
187
+ declare class TkDialogRef<T, R = unknown> {
188
+ readonly componentRef: ComponentRef<T>;
189
+ private readonly closedSubject;
190
+ private readonly resultSignal;
191
+ private readonly isClosedSignal;
192
+ /**
193
+ * Signal that holds the result of the dialog after it closes.
194
+ */
195
+ readonly result: _angular_core.Signal<R | undefined>;
196
+ /**
197
+ * Signal that indicates if the dialog has been closed.
198
+ */
199
+ readonly isClosed: _angular_core.Signal<boolean>;
200
+ constructor(componentRef: ComponentRef<T>);
201
+ /**
202
+ * The instance of the component opened in the dialog.
203
+ */
204
+ get componentInstance(): T;
205
+ /**
206
+ * Closes the dialog, optionally passing a result back.
207
+ * Internal implementation calls the component's tryClose to respect guards.
208
+ */
209
+ close(result?: R): void;
210
+ /**
211
+ * Subscribes to the closure event.
212
+ * This maintains compatibility with existing service.open(...).subscribe() patterns
213
+ * using the modern RxJS signature.
214
+ */
215
+ subscribe(nextOrObserver?: ((value: R | undefined) => void) | PartialObserver<R | undefined>): Subscription;
216
+ /**
217
+ * Supports RxJS operators on the closure event.
218
+ */
219
+ pipe(...args: any[]): any;
220
+ /**
221
+ * Returns an Observable that emits when the dialog is closed.
222
+ */
223
+ afterClosed(): Subject<R | undefined>;
224
+ /**
225
+ * Internal method to emit the result and update reactive state.
226
+ * Not intended for public use outside the opening service.
227
+ */
228
+ emitClose(result?: R): void;
229
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TkDialogRef<any, any>, never>;
230
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TkDialogRef<any, any>>;
231
+ }
232
+
233
+ export { Breakpoints, GapGutter, Gutter, PaddingGridContainer, TkDialogRef, TkPreset, provideTkTheme };
182
234
  export type { AutoFillGridProps, ColumnRowSize, ComposeMinMax, ComposeSize, ContainerType, DropdownListItem, FixedGridProps, FontCSSProperties, GridColumns, GutterType, IllustrationConfig, Option, ThemeLogo, TkCanClose, TkCloseInterceptor, TypographyStyles, ValidatorWithMessage, VariantLogo };