@filip.mazev/modal 0.1.50 → 0.1.52

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,9 +1,10 @@
1
1
  import * as _filip_mazev_blocks_core from '@filip.mazev/blocks-core';
2
2
  import { BREAKPOINTS } from '@filip.mazev/blocks-core';
3
3
  import * as _angular_core from '@angular/core';
4
- import { Type, ComponentRef, OnInit, OnDestroy, Signal, TemplateRef, ElementRef, InputSignal, OutputEmitterRef, QueryList, AfterViewInit, ViewContainerRef, InjectionToken } from '@angular/core';
5
- import { Observable } from 'rxjs';
4
+ import { Type, ComponentRef, OnInit, OnDestroy, Signal, AfterViewInit, TemplateRef, ElementRef, ViewContainerRef, InputSignal, OutputEmitterRef, QueryList, InjectionToken } from '@angular/core';
5
+ import { Observable, Subject } from 'rxjs';
6
6
  import { ComponentType } from '@angular/cdk/portal';
7
+ import { IModalCloseResult as IModalCloseResult$1 } from '@modal/public-api';
7
8
 
8
9
  declare enum ModalState {
9
10
  OPEN = "open",
@@ -12,8 +13,8 @@ declare enum ModalState {
12
13
  CLOSING = "closing"
13
14
  }
14
15
 
15
- type ModalCloseMode = "cancel" | "confirm";
16
- type ModalLayout = "center" | "right" | "left" | "bottom-sheet";
16
+ type ModalCloseMode = 'cancel' | 'confirm';
17
+ type ModalLayout = 'center' | 'right' | 'left' | 'bottom-sheet';
17
18
  type BreakpointKey = keyof typeof BREAKPOINTS;
18
19
 
19
20
  /**
@@ -50,11 +51,11 @@ interface IModal<D, R> {
50
51
  * @param {ComponentRef<C>} componentRef The component reference of the modal content
51
52
  * @param {Observable<ModalState>} modalState$ Observable that emits the current state of the modal
52
53
  * @param {ModalConfig<D> | undefined} modalConfig (optional) The configuration of the modal
53
- * @param {Observable<IModalCloseResult<R>>} afterClosed Observable that emits when the modal has been closed
54
+ * @param {Observable<IModalCloseResult<R | undefined>>} afterClosed Observable that emits when the modal has been closed
54
55
  * @param {Observable<MouseEvent>} backdropClick Observable that emits when the backdrop is clicked
55
56
  * @param {Function} open Function to open the modal
56
57
  * @param {Function} close Function to close the modal with specified parameters
57
- */
58
+ */
58
59
  interface IModalRef<D, R, C extends IModal<D, R> = IModal<D, R>> {
59
60
  modalContainer: Type<ModalCore<D, R, C>>;
60
61
  modalContainerRef: ComponentRef<ModalCore<D, R, C>>;
@@ -62,12 +63,12 @@ interface IModalRef<D, R, C extends IModal<D, R> = IModal<D, R>> {
62
63
  parentElement?: HTMLElement;
63
64
  componentRef: ComponentRef<C>;
64
65
  modalState$(): Observable<ModalState>;
65
- modalConfig?: ModalConfig<D>;
66
- afterClosed(): Observable<IModalCloseResult<R>>;
66
+ modalConfig?: ModalConfig<D, R>;
67
+ afterClosed(): Observable<IModalCloseResult<R | undefined>>;
67
68
  backdropClick(): Observable<MouseEvent>;
68
69
  open(): void;
69
- close: (state: "confirm" | "cancel", result: R | undefined, forceClose: boolean, fromSelf: boolean, from: {
70
- constructor: Function;
70
+ close: (state: 'confirm' | 'cancel', result: R | undefined, forceClose: boolean, fromSelf: boolean, from: {
71
+ constructor: Type<unknown>;
71
72
  } | undefined) => void;
72
73
  }
73
74
 
@@ -75,40 +76,40 @@ declare class ModalRef<D = unknown, R = any, C extends IModal<D, R> = IModal<D,
75
76
  componentType: ComponentType<C>;
76
77
  private modalService;
77
78
  private _modalContainer;
78
- private set modalContainer(value);
79
- get modalContainer(): Type<ModalCore<D, R, C>>;
80
79
  private _modalContainerRef;
81
- private set modalContainerRef(value);
82
- get modalContainerRef(): ComponentRef<ModalCore<D, R, C>>;
83
80
  private _modalContainerElement;
84
- private set modalContainerElement(value);
85
- get modalContainerElement(): HTMLElement;
86
81
  private _parentElement;
87
- private set parentElement(value);
88
- get parentElement(): HTMLElement | undefined;
89
82
  private _componentRef;
90
- private set componentRef(value);
91
- get componentRef(): ComponentRef<C>;
92
83
  private _modalState;
93
84
  private modalState;
94
- modalState$(): Observable<ModalState>;
95
- private getStatus;
96
85
  private _modalConfig?;
97
- private set modalConfig(value);
98
- get modalConfig(): ModalConfig<D> | undefined;
99
86
  private backdropClickSubject;
100
- backdropClick(): Observable<MouseEvent>;
101
- private backdropClicked;
102
87
  private afterCloseSubject;
88
+ constructor(componentRef: ComponentRef<C>, componentType: ComponentType<C>, modalContainerRef: ComponentRef<ModalCore<D, R, C>>, modalService: ModalService, modalConfig?: ModalConfig<D, R>);
89
+ get modalContainer(): Type<ModalCore<D, R, C>>;
90
+ private set modalContainer(value);
91
+ get modalContainerRef(): ComponentRef<ModalCore<D, R, C>>;
92
+ private set modalContainerRef(value);
93
+ get modalContainerElement(): HTMLElement;
94
+ private set modalContainerElement(value);
95
+ get parentElement(): HTMLElement | undefined;
96
+ private set parentElement(value);
97
+ get componentRef(): ComponentRef<C>;
98
+ private set componentRef(value);
99
+ get modalConfig(): ModalConfig<D, R> | undefined;
100
+ private set modalConfig(value);
101
+ backdropClick(): Observable<MouseEvent>;
102
+ modalState$(): Observable<ModalState>;
103
103
  /**
104
104
  * Observable that emits when the modal has been closed.
105
- * @returns An Observable that emits an IModalCloseResult<R> when the modal is closed.
105
+ * @returns An Observable that emits an IModalCloseResult<R | undefined> when the modal is closed.
106
106
  */
107
- afterClosed(): Observable<IModalCloseResult<R>>;
108
- private afterClose;
109
- constructor(componentRef: ComponentRef<C>, componentType: ComponentType<C>, modalContainerRef: ComponentRef<ModalCore<D, R, C>>, modalService: ModalService, modalConfig?: ModalConfig<D>);
107
+ afterClosed(): Observable<IModalCloseResult<R | undefined>>;
110
108
  open(): Promise<void>;
111
109
  close(state?: ModalCloseMode, result?: R | undefined, forceClose?: boolean): void;
110
+ private getStatus;
111
+ private backdropClicked;
112
+ private afterClose;
112
113
  private handleClose;
113
114
  }
114
115
 
@@ -122,7 +123,7 @@ declare class ModalRef<D = unknown, R = any, C extends IModal<D, R> = IModal<D,
122
123
  * @param {Function} find Function to check if a modal with a specific component type is open
123
124
  */
124
125
  interface IModalService {
125
- open<D, R, C extends IModal<D, R> = IModal<D, R>>(component: ComponentType<C>, config?: IModalConfig<D>): ModalRef<D, R, C>;
126
+ open<D, R, C extends IModal<D, R> = IModal<D, R>>(component: ComponentType<C>, config?: IModalConfig<D, R>): ModalRef<D, R, C>;
126
127
  close<D, R, C extends IModal<D, R> = IModal<D, R>>(modal: ModalRef<D, R, C>): void;
127
128
  unregister<D, R, C extends IModal<D, R> = IModal<D, R>>(modal: ModalRef<D, R, C>): void;
128
129
  closeAll(): void;
@@ -131,13 +132,13 @@ interface IModalService {
131
132
  }
132
133
 
133
134
  declare class ModalService implements IModalService {
134
- private router;
135
- private injector;
136
- private appRef;
137
- private environmentInjector;
138
- private rendererFactory;
139
- private renderer;
140
- private document;
135
+ private readonly router;
136
+ private readonly injector;
137
+ private readonly appRef;
138
+ private readonly environmentInjector;
139
+ private readonly rendererFactory;
140
+ private readonly document;
141
+ private readonly renderer;
141
142
  private modals;
142
143
  private modalsSubject;
143
144
  constructor();
@@ -148,7 +149,7 @@ declare class ModalService implements IModalService {
148
149
  * @param config Optional configuration for the modal.
149
150
  * @returns A ModalRef instance representing the opened modal.
150
151
  */
151
- open<D, R, C extends IModal<D, R> = IModal<D, R>>(component: ComponentType<C>, config?: IModalConfig<D>): ModalRef<D, R, C>;
152
+ open<D, R, C extends IModal<D, R> = IModal<D, R>>(component: ComponentType<C>, config?: IModalConfig<D, R>): ModalRef<D, R, C>;
152
153
  /**
153
154
  * Closes the specified modal.
154
155
  * @param modal The ModalRef instance representing the modal to be closed.
@@ -162,7 +163,7 @@ declare class ModalService implements IModalService {
162
163
  /**
163
164
  * Closes all open modals.
164
165
  * @param onNavigate Indicates if the closeAll is triggered by navigation event.
165
- */
166
+ */
166
167
  closeAll(onNavigate?: boolean): void;
167
168
  /**
168
169
  * Finds if a modal with the specified component type is currently open.
@@ -173,7 +174,7 @@ declare class ModalService implements IModalService {
173
174
  /**
174
175
  * Gets the count of currently open modals.
175
176
  * @returns The number of open modals.
176
- */
177
+ */
177
178
  modalsCount(): number;
178
179
  private isIModal;
179
180
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
@@ -231,6 +232,7 @@ interface IModalStyleConfig {
231
232
  /**
232
233
  * IModalConfig<D>, the configuration for the modal
233
234
  * @param D The type of data passed to the modal
235
+ * @param R The type of result returned from the modal
234
236
  * @param {boolean} open (optional) Whether the modal should be open or not, will default to true
235
237
  * @param {Function} afterClose (optional) The function to run after the modal closes
236
238
  * @param {ModalCloseGuard} closeGuard (optional) The guard that will determine whether the modal can be closed or not
@@ -246,9 +248,9 @@ interface IModalStyleConfig {
246
248
  * @param {string} contentStyles (optional) The styles to apply to the content of the modal
247
249
  * @param {string} id (optional) The id of the modal (set at the top level of the modal), will default to a random string
248
250
  */
249
- interface IModalConfig<D> {
251
+ interface IModalConfig<D, R> {
250
252
  open?: boolean;
251
- afterClose?: Function;
253
+ afterClose?: () => Observable<IModalCloseResult<R | undefined>>;
252
254
  closeGuard?: ModalCloseGuard;
253
255
  closeGuardOnlyOnCancel?: boolean;
254
256
  disableClose?: boolean;
@@ -279,9 +281,9 @@ declare class ModalStyleConfig implements IModalStyleConfig {
279
281
  constructor(config?: IModalStyleConfig);
280
282
  }
281
283
 
282
- declare class ModalConfig<D = unknown> {
284
+ declare class ModalConfig<D, R> {
283
285
  open: boolean;
284
- afterClose?: Function;
286
+ afterClose?: () => Observable<IModalCloseResult$1<R | undefined>>;
285
287
  closeGuard?: ModalCloseGuard;
286
288
  closeGuardOnlyOnCancel?: boolean;
287
289
  disableClose: boolean;
@@ -295,7 +297,7 @@ declare class ModalConfig<D = unknown> {
295
297
  disableConsoleWarnings: boolean;
296
298
  disableConsoleInfo: boolean;
297
299
  id?: string;
298
- constructor(config?: IModalConfig<D>);
300
+ constructor(config?: IModalConfig<D, R>);
299
301
  }
300
302
 
301
303
  /**
@@ -304,24 +306,75 @@ declare class ModalConfig<D = unknown> {
304
306
  * @param R The type of result returned from the modal
305
307
  * @param C The type of the modal component, will default to IModal<D, R>
306
308
  * @param {ComponentRef<C>} componentRef (optional) The component reference (the component that is being displayed in the modal), will default to undefined (for non-dynamic modals)
307
- * @param {ModalConfig} config (optional) The configuration for the modal, will default to default values for the configuration
309
+ * @param {ModalConfig<D, R>} config (optional) The configuration for the modal, will default to default values for the configuration
308
310
  * @param {boolean} isOpen (required) Whether the modal is open or not
309
311
  * @param {Observable<MouseEvent>} backdropClick (required) The observable for the backdrop click event, will be used to listen for backdrop clicks (subscribed to the backdropClickSubject)
310
312
  * @param {Function} close (required) The function to run when the modal closes, will return the result of the modal
311
313
  */
312
- interface IModalComponenet<D, R, C extends IModal<D, R> = IModal<D, R>> extends OnInit, OnDestroy {
314
+ interface IModalComponent<D, R, C extends IModal<D, R> = IModal<D, R>> extends OnInit, OnDestroy {
313
315
  componentRef?: ComponentRef<C>;
314
- config?: ModalConfig<D>;
316
+ config?: ModalConfig<D, R>;
315
317
  isOpen: Signal<boolean>;
316
318
  backdropClick: Observable<MouseEvent>;
317
319
  close: (state: ModalCloseMode, result: R | undefined, fromInsideInteraction: boolean, forceClose: boolean) => void;
318
320
  }
319
321
 
320
- declare class ModalBottomSheet implements OnInit, OnDestroy {
322
+ declare class ModalCore<D, R, C extends IModal<D, R> = IModal<D, R>> implements IModalComponent<D, R, C>, OnInit, AfterViewInit {
323
+ private readonly modalService;
324
+ private readonly scrollLockService;
325
+ private readonly windowDimensionsService;
326
+ readonly animationDuration: number;
327
+ componentRef: ComponentRef<C>;
328
+ config?: ModalConfig<D, R>;
329
+ closeFunction?: (data: IModalCloseResult<R | undefined>) => void;
330
+ backdropClickSubject: Subject<MouseEvent>;
331
+ backdropClick: Observable<MouseEvent>;
332
+ isOpen: _angular_core.WritableSignal<boolean>;
333
+ effectiveLayout: _angular_core.WritableSignal<ModalLayout>;
334
+ isCentered: _angular_core.WritableSignal<boolean>;
335
+ isSide: _angular_core.WritableSignal<boolean>;
336
+ isAnimated: boolean;
337
+ protected headerTemplate: _angular_core.WritableSignal<TemplateRef<void> | null>;
338
+ protected footerTemplate: _angular_core.WritableSignal<TemplateRef<void> | null>;
339
+ protected id: _angular_core.WritableSignal<string | null>;
340
+ protected isBottomSheetModalActive: _angular_core.WritableSignal<boolean>;
341
+ protected hasBanner: boolean;
342
+ protected hasDefaultContentWrapperClass: boolean;
343
+ protected windowDimensions: _angular_core.Signal<_filip_mazev_blocks_core.WindowDimensions>;
344
+ protected modalContainer?: ElementRef;
345
+ protected contentTemplate?: TemplateRef<HTMLElement>;
346
+ private sideModalComponents?;
347
+ private centeredModalComponents?;
348
+ private isConfirmCloseModalOpen;
349
+ private scrollLockId;
350
+ private _sortedBreakpoints;
351
+ private _currentVcr;
352
+ constructor();
353
+ ngOnInit(): void;
354
+ ngAfterViewInit(): void;
355
+ ngOnDestroy(): void;
356
+ setHeaderTemplate(template: TemplateRef<void>): void;
357
+ setFooterTemplate(template: TemplateRef<void>): void;
358
+ close(state?: ModalCloseMode, result?: R | undefined, fromInsideInteraction?: boolean, forceClose?: boolean): void;
359
+ protected onBackdropClick(event: MouseEvent): void;
360
+ protected set dynamicContainer(vcr: ViewContainerRef | undefined);
361
+ private initKeyboardSubscription;
362
+ private initParamsFromConfig;
363
+ private initBreakpointCache;
364
+ private handleClose;
365
+ private handleLayout;
366
+ private getBottomSheetModal;
367
+ private resetBottomSheetModalLayout;
368
+ private setBottomSheetModalFinishedState;
369
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalCore<any, any, any>, never>;
370
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalCore<any, any, any>, "app-modal", never, {}, {}, never, never, true, never>;
371
+ }
372
+
373
+ declare class ModalBottomSheet<D = unknown, R = unknown> implements OnInit, OnDestroy {
321
374
  readonly id: _angular_core.InputSignal<string | null>;
322
- readonly headerTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
323
- readonly footerTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
324
- readonly config: _angular_core.InputSignal<ModalConfig<unknown> | undefined>;
375
+ readonly headerTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
376
+ readonly footerTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
377
+ readonly config: _angular_core.InputSignal<ModalConfig<D, R> | undefined>;
325
378
  readonly isOpen: _angular_core.InputSignal<boolean>;
326
379
  readonly isAnimated: _angular_core.InputSignal<boolean>;
327
380
  readonly animationDuration: _angular_core.InputSignal<number>;
@@ -329,6 +382,8 @@ declare class ModalBottomSheet implements OnInit, OnDestroy {
329
382
  currentTranslateY: _angular_core.WritableSignal<number>;
330
383
  isSwipingVerticallyFinished: _angular_core.WritableSignal<boolean>;
331
384
  protected isSwipingVertically: _angular_core.WritableSignal<boolean>;
385
+ protected verticalSwipeTarget?: ElementRef;
386
+ protected elementRef?: ElementRef;
332
387
  protected modalTransform: _angular_core.Signal<string>;
333
388
  protected downSwipeLimit: number;
334
389
  protected isTrackingSwipe: boolean;
@@ -336,23 +391,21 @@ declare class ModalBottomSheet implements OnInit, OnDestroy {
336
391
  private bottomSheetInitiated;
337
392
  private cleanupListeners;
338
393
  private globalResizeCleanup;
339
- verticalSwipeTarget?: ElementRef;
340
- elementRef?: ElementRef;
341
394
  ngOnInit(): void;
342
395
  ngOnDestroy(): void;
343
396
  private startVerticalSwipeDetection;
344
397
  private stopVerticalSwipeDetection;
345
398
  private initBottomSheetModalParams;
346
399
  private monitorInputType;
347
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalBottomSheet, never>;
348
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalBottomSheet, "modal-bottom-sheet", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "headerTemplate": { "alias": "headerTemplate"; "required": true; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": true; "isSignal": true; }; "isAnimated": { "alias": "isAnimated"; "required": true; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": true; "isSignal": true; }; }, { "close": "close"; }, never, ["*"], true, never>;
400
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalBottomSheet<any, any>, never>;
401
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalBottomSheet<any, any>, "app-modal-bottom-sheet", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "headerTemplate": { "alias": "headerTemplate"; "required": true; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": true; "isSignal": true; }; "isAnimated": { "alias": "isAnimated"; "required": true; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": true; "isSignal": true; }; }, { "close": "close"; }, never, ["*"], true, never>;
349
402
  }
350
403
 
351
404
  /**
352
405
  * Interface for the Modal View
353
406
  * @param D The type of data passed to the modal
354
- * @param {InputSignal<TemplateRef<any> | null>} headerTemplate The input signal for the header template of the modal
355
- * @param {InputSignal<TemplateRef<any> | null>} footerTemplate The input signal for the footer template of the modal
407
+ * @param {InputSignal<TemplateRef<void> | null>} headerTemplate The input signal for the header template of the modal
408
+ * @param {InputSignal<TemplateRef<void> | null>} footerTemplate The input signal for the footer template of the modal
356
409
  * @param {InputSignal<ModalConfig<D> | undefined>} config The input signal for the modal configuration
357
410
  * @param {InputSignal<boolean>} isOpen The input signal indicating whether the modal is open
358
411
  * @param {InputSignal<boolean>} isAnimated The input signal indicating whether the modal has animations enabled
@@ -364,10 +417,10 @@ declare class ModalBottomSheet implements OnInit, OnDestroy {
364
417
  * @param {QueryList<ModalBottomSheet>} bottomSheet The query list of bottom sheet modals
365
418
  * @param {Signal<{ [key: string]: boolean }>} modalClasses The signal for the modal CSS classes
366
419
  */
367
- interface IModalView<D> {
368
- headerTemplate: InputSignal<TemplateRef<any> | null>;
369
- footerTemplate: InputSignal<TemplateRef<any> | null>;
370
- config: InputSignal<ModalConfig<D> | undefined>;
420
+ interface IModalView<D, R> {
421
+ headerTemplate: InputSignal<TemplateRef<void> | null>;
422
+ footerTemplate: InputSignal<TemplateRef<void> | null>;
423
+ config: InputSignal<ModalConfig<D, R> | undefined>;
371
424
  id: InputSignal<string | null>;
372
425
  isOpen: InputSignal<boolean>;
373
426
  isAnimated: InputSignal<boolean>;
@@ -382,10 +435,11 @@ interface IModalView<D> {
382
435
  }>;
383
436
  }
384
437
 
385
- declare class ModalCentered<D = unknown> implements IModalView<D> {
386
- readonly headerTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
387
- readonly footerTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
388
- readonly config: _angular_core.InputSignal<ModalConfig<D> | undefined>;
438
+ declare class ModalSide<D = unknown, R = unknown> implements IModalView<D, R> {
439
+ readonly layout: _angular_core.InputSignal<ModalLayout>;
440
+ readonly headerTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
441
+ readonly footerTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
442
+ readonly config: _angular_core.InputSignal<ModalConfig<D, R> | undefined>;
389
443
  readonly id: _angular_core.InputSignal<string | null>;
390
444
  readonly isOpen: _angular_core.InputSignal<boolean>;
391
445
  readonly isAnimated: _angular_core.InputSignal<boolean>;
@@ -394,23 +448,26 @@ declare class ModalCentered<D = unknown> implements IModalView<D> {
394
448
  readonly hasDefaultContentWrapperClass: _angular_core.InputSignal<boolean>;
395
449
  readonly hasBanner: _angular_core.InputSignal<boolean>;
396
450
  readonly close: _angular_core.OutputEmitterRef<ModalCloseMode | undefined>;
397
- readonly onBackdropClick: _angular_core.OutputEmitterRef<MouseEvent>;
398
451
  bottomSheet: QueryList<ModalBottomSheet>;
399
452
  modalClasses: _angular_core.Signal<{
400
- 'centered-modal-content-wrapper': boolean;
401
- 'centered-modal-default-style': boolean;
402
- 'centered-modal-animate-in': boolean;
403
- 'centered-modal-animate-out': boolean;
453
+ 'side-modal-content-wrapper': boolean;
454
+ 'side-modal-default-style': boolean;
455
+ 'with-footer': boolean;
456
+ left: boolean;
457
+ right: boolean;
458
+ 'side-modal-animate-in': boolean;
459
+ 'side-modal-animate-out': boolean;
404
460
  }>;
405
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalCentered<any>, never>;
406
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalCentered<any>, "modal-centered", never, { "headerTemplate": { "alias": "headerTemplate"; "required": true; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": true; "isSignal": true; }; "isAnimated": { "alias": "isAnimated"; "required": true; "isSignal": true; }; "isBottomSheetModalActive": { "alias": "isBottomSheetModalActive"; "required": true; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": true; "isSignal": true; }; "hasDefaultContentWrapperClass": { "alias": "hasDefaultContentWrapperClass"; "required": true; "isSignal": true; }; "hasBanner": { "alias": "hasBanner"; "required": true; "isSignal": true; }; }, { "close": "close"; "onBackdropClick": "onBackdropClick"; }, never, ["*"], true, never>;
461
+ protected renderOpenClass: _angular_core.WritableSignal<boolean>;
462
+ constructor();
463
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalSide<any, any>, never>;
464
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalSide<any, any>, "app-modal-side", never, { "layout": { "alias": "layout"; "required": true; "isSignal": true; }; "headerTemplate": { "alias": "headerTemplate"; "required": true; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": true; "isSignal": true; }; "isAnimated": { "alias": "isAnimated"; "required": true; "isSignal": true; }; "isBottomSheetModalActive": { "alias": "isBottomSheetModalActive"; "required": true; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": true; "isSignal": true; }; "hasDefaultContentWrapperClass": { "alias": "hasDefaultContentWrapperClass"; "required": true; "isSignal": true; }; "hasBanner": { "alias": "hasBanner"; "required": true; "isSignal": true; }; }, { "close": "close"; }, never, ["*"], true, never>;
407
465
  }
408
466
 
409
- declare class ModalSide<D = unknown> implements IModalView<D> {
410
- readonly layout: _angular_core.InputSignal<ModalLayout>;
411
- readonly headerTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
412
- readonly footerTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
413
- readonly config: _angular_core.InputSignal<ModalConfig<D> | undefined>;
467
+ declare class ModalCentered<D = unknown, R = unknown> implements IModalView<D, R> {
468
+ readonly headerTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
469
+ readonly footerTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
470
+ readonly config: _angular_core.InputSignal<ModalConfig<D, R> | undefined>;
414
471
  readonly id: _angular_core.InputSignal<string | null>;
415
472
  readonly isOpen: _angular_core.InputSignal<boolean>;
416
473
  readonly isAnimated: _angular_core.InputSignal<boolean>;
@@ -419,72 +476,16 @@ declare class ModalSide<D = unknown> implements IModalView<D> {
419
476
  readonly hasDefaultContentWrapperClass: _angular_core.InputSignal<boolean>;
420
477
  readonly hasBanner: _angular_core.InputSignal<boolean>;
421
478
  readonly close: _angular_core.OutputEmitterRef<ModalCloseMode | undefined>;
479
+ readonly onBackdropClick: _angular_core.OutputEmitterRef<MouseEvent>;
422
480
  bottomSheet: QueryList<ModalBottomSheet>;
423
- protected renderOpenClass: _angular_core.WritableSignal<boolean>;
424
481
  modalClasses: _angular_core.Signal<{
425
- 'side-modal-content-wrapper': boolean;
426
- 'side-modal-default-style': boolean;
427
- 'with-footer': boolean;
428
- left: boolean;
429
- right: boolean;
430
- 'side-modal-animate-in': boolean;
431
- 'side-modal-animate-out': boolean;
482
+ 'centered-modal-content-wrapper': boolean;
483
+ 'centered-modal-default-style': boolean;
484
+ 'centered-modal-animate-in': boolean;
485
+ 'centered-modal-animate-out': boolean;
432
486
  }>;
433
- constructor();
434
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalSide<any>, never>;
435
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalSide<any>, "modal-side", never, { "layout": { "alias": "layout"; "required": true; "isSignal": true; }; "headerTemplate": { "alias": "headerTemplate"; "required": true; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": true; "isSignal": true; }; "isAnimated": { "alias": "isAnimated"; "required": true; "isSignal": true; }; "isBottomSheetModalActive": { "alias": "isBottomSheetModalActive"; "required": true; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": true; "isSignal": true; }; "hasDefaultContentWrapperClass": { "alias": "hasDefaultContentWrapperClass"; "required": true; "isSignal": true; }; "hasBanner": { "alias": "hasBanner"; "required": true; "isSignal": true; }; }, { "close": "close"; }, never, ["*"], true, never>;
436
- }
437
-
438
- declare class ModalCore<D, R, C extends IModal<D, R> = IModal<D, R>> implements IModalComponenet<D, R, C>, OnInit, AfterViewInit {
439
- private modalService;
440
- private windowDimensionsService;
441
- private scrollLockService;
442
- readonly afterClose: _angular_core.OutputEmitterRef<void>;
443
- readonly animationDuration: number;
444
- componentRef: ComponentRef<C>;
445
- config?: ModalConfig<D>;
446
- closeFunction?: Function;
447
- private backdropClickSubject;
448
- backdropClick: Observable<MouseEvent>;
449
- isOpen: _angular_core.WritableSignal<boolean>;
450
- effectiveLayout: _angular_core.WritableSignal<ModalLayout>;
451
- isCentered: _angular_core.WritableSignal<boolean>;
452
- isSide: _angular_core.WritableSignal<boolean>;
453
- protected headerTemplate: _angular_core.WritableSignal<TemplateRef<any> | null>;
454
- protected footerTemplate: _angular_core.WritableSignal<TemplateRef<any> | null>;
455
- protected id: _angular_core.WritableSignal<string | null>;
456
- protected isBottomSheetModalActive: _angular_core.WritableSignal<boolean>;
457
- isAnimated: boolean;
458
- protected hasBanner: boolean;
459
- protected hasDefaultContentWrapperClass: boolean;
460
- private isConfirmCloseModalOpen;
461
- private scrollLockId;
462
- private _sortedBreakpoints;
463
- protected windowDimensions: _angular_core.Signal<_filip_mazev_blocks_core.WindowDimensions>;
464
- private _currentVcr;
465
- set dynamicContainer(vcr: ViewContainerRef | undefined);
466
- modalContainer?: ElementRef;
467
- contentTemplate?: TemplateRef<HTMLElement>;
468
- sideModalComponents?: QueryList<ModalSide>;
469
- centeredModalComponents?: QueryList<ModalCentered>;
470
- constructor();
471
- ngOnInit(): void;
472
- ngAfterViewInit(): void;
473
- ngOnDestroy(): void;
474
- private initKeyboardSubscription;
475
- private initParamsFromConfig;
476
- private initBreakpointCache;
477
- setHeaderTemplate(template: TemplateRef<any>): void;
478
- setFooterTemplate(template: TemplateRef<any>): void;
479
- close(state?: ModalCloseMode, result?: R | undefined, fromInsideInteraction?: boolean, forceClose?: boolean): void;
480
- private handleClose;
481
- protected onBackdropClick(event: MouseEvent): void;
482
- private handleLayout;
483
- private getBottomSheetModal;
484
- private resetBottomSheetModalLayout;
485
- private setBottomSheetModalFinishedState;
486
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalCore<any, any, any>, never>;
487
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalCore<any, any, any>, "modal", never, {}, { "afterClose": "afterClose"; }, never, never, true, never>;
487
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalCentered<any, any>, never>;
488
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalCentered<any, any>, "app-modal-centered", never, { "headerTemplate": { "alias": "headerTemplate"; "required": true; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": true; "isSignal": true; }; "isAnimated": { "alias": "isAnimated"; "required": true; "isSignal": true; }; "isBottomSheetModalActive": { "alias": "isBottomSheetModalActive"; "required": true; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": true; "isSignal": true; }; "hasDefaultContentWrapperClass": { "alias": "hasDefaultContentWrapperClass"; "required": true; "isSignal": true; }; "hasBanner": { "alias": "hasBanner"; "required": true; "isSignal": true; }; }, { "close": "close"; "onBackdropClick": "onBackdropClick"; }, never, ["*"], true, never>;
488
489
  }
489
490
 
490
491
  declare class ModalBackdrop {
@@ -492,14 +493,14 @@ declare class ModalBackdrop {
492
493
  readonly isOpen: _angular_core.InputSignal<boolean>;
493
494
  readonly click: _angular_core.OutputEmitterRef<MouseEvent>;
494
495
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalBackdrop, never>;
495
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalBackdrop, "modal-backdrop", never, { "isAnimated": { "alias": "isAnimated"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, never, true, never>;
496
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalBackdrop, "app-modal-backdrop", never, { "isAnimated": { "alias": "isAnimated"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, never, true, never>;
496
497
  }
497
498
 
498
- declare class ModalBanner<D = unknown> {
499
- readonly config: _angular_core.InputSignal<ModalConfig<D> | undefined>;
499
+ declare class ModalBanner<D = unknown, R = unknown> {
500
+ readonly config: _angular_core.InputSignal<ModalConfig<D, R> | undefined>;
500
501
  readonly close: _angular_core.OutputEmitterRef<ModalCloseMode | undefined>;
501
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalBanner<any>, never>;
502
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalBanner<any>, "modal-banner", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "close": "close"; }, never, never, true, never>;
502
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalBanner<any, any>, never>;
503
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalBanner<any, any>, "app-modal-banner", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "close": "close"; }, never, never, true, never>;
503
504
  }
504
505
 
505
506
  declare class Modal<D, R> implements IModal<D, R> {
@@ -513,12 +514,12 @@ declare class Modal<D, R> implements IModal<D, R> {
513
514
  modal: ModalRef<D, R>;
514
515
  /**
515
516
  * Called when the modal is initialized.
516
- */
517
+ */
517
518
  onModalInit(): void;
518
519
  /**
519
520
  * Closes the modal (with "cancel" reason) with an optional result.
520
521
  * @param result The result to be passed when closing the modal.
521
- */
522
+ */
522
523
  close(result?: R): void;
523
524
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Modal<any, any>, never>;
524
525
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<Modal<any, any>>;
@@ -538,19 +539,19 @@ declare enum ModalWarnings {
538
539
  }
539
540
 
540
541
  declare class ModalHeaderDirective {
541
- private templateRef;
542
- private modal;
542
+ private readonly templateRef;
543
+ private readonly modal;
543
544
  constructor();
544
545
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalHeaderDirective, never>;
545
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ModalHeaderDirective, "[modalHeader]", never, {}, {}, never, never, true, never>;
546
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ModalHeaderDirective, "[appModalHeader]", never, {}, {}, never, never, true, never>;
546
547
  }
547
548
 
548
549
  declare class ModalFooterDirective {
549
- private templateRef;
550
- private modal;
550
+ private readonly templateRef;
551
+ private readonly modal;
551
552
  constructor();
552
553
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalFooterDirective, never>;
553
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ModalFooterDirective, "[modalFooter]", never, {}, {}, never, never, true, never>;
554
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ModalFooterDirective, "[appModalFooter]", never, {}, {}, never, never, true, never>;
554
555
  }
555
556
 
556
557
  declare const MODAL_DATA: InjectionToken<any>;
@@ -562,10 +563,10 @@ declare const MODAL_DATA: InjectionToken<any>;
562
563
  */
563
564
  declare class ModalConfirmCloseGuard<D, R, C extends IModal<D, R> = IModal<D, R>> extends ModalCloseGuard {
564
565
  component: ComponentType<C>;
565
- config: IModalConfig<D>;
566
- constructor(component: ComponentType<C>, config: IModalConfig<D>);
566
+ config: IModalConfig<D, R>;
567
+ constructor(component: ComponentType<C>, config: IModalConfig<D, R>);
567
568
  canClose(modalService: ModalService): Observable<boolean>;
568
569
  }
569
570
 
570
571
  export { MODAL_DATA, MODAL_DEFAULT_ANIM_DURATION, MODAL_DEFAULT_ANIM_DURATION_MULTIPLIER_LARGE, MODAL_DEFAULT_ANIM_DURATION_MULTIPLIER_SMALL, MODAL_DEFAULT_INTERNAL_ANIM_DURATION, MODAL_DOWN_SWIPE_LIMIT, MODAL_SWIPE_VELOCITY_THRESHOLD, Modal, ModalBackdrop, ModalBanner, ModalBottomSheet, ModalCentered, ModalCloseGuard, ModalConfig, ModalConfirmCloseGuard, ModalCore, ModalFooterDirective, ModalHeaderDirective, ModalRef, ModalService, ModalSide, ModalState, ModalStyleConfig, ModalWarnings };
571
- export type { BreakpointKey, IBottomSheetModalConfig, IModalCloseResult, IModalComponenet, IModalConfig, IModalRef, IModalService, IModalStyleConfig, IModalView, ModalCloseMode, ModalLayout };
572
+ export type { BreakpointKey, IBottomSheetModalConfig, IModalCloseResult, IModalComponent, IModalConfig, IModalRef, IModalService, IModalStyleConfig, IModalView, ModalCloseMode, ModalLayout };