@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.
package/README.md CHANGED
@@ -82,7 +82,7 @@ export class MyModalComponent extends Modal<MyData, MyResult> {
82
82
  HTML (Template):
83
83
 
84
84
  ```HTML
85
- <div *modalHeader>
85
+ <div *appModalHeader>
86
86
  Example Header
87
87
  </div>
88
88
 
@@ -94,7 +94,7 @@ HTML (Template):
94
94
  {{ data.Body }}
95
95
  </p>
96
96
 
97
- <div *modalFooter>
97
+ <div *appModalFooter>
98
98
  Example Footer
99
99
  </div>
100
100
  ```
@@ -111,7 +111,7 @@ Accessible via this.modal inside any component that extends Modal. This referenc
111
111
  * `forceClose` (boolean): If true, bypasses any confirmCloseConfig checks or guards. Defaults to false.
112
112
  * `modalState$()`: Returns an `Observable<ModalState>`. Emits the current lifecycle state of the modal (OPENING, OPEN, CLOSING, CLOSED).
113
113
  * `backdropClick()`: Returns an `Observable<MouseEvent>`. Emits an event whenever the user clicks on the modal's backdrop.
114
- * `afterClosed()`: Returns an `Observable<IModalCloseResult<R>>`. Emits the final result object (containing the state and data) once the modal has fully closed and animations have finished.
114
+ * `afterClosed()`: Returns an `Observable<IModalCloseResult<R | undefined>>`. Emits the final result object (containing the state and data) once the modal has fully closed and animations have finished.
115
115
 
116
116
  #### Properties
117
117
 
@@ -132,7 +132,7 @@ The structure of the object returned when a modal closes, accessible via the obs
132
132
  Use the ModalService to launch your component:
133
133
 
134
134
  ```typescript
135
- private modals = inject(ModalService);
135
+ private readonly modals = inject(ModalService);
136
136
 
137
137
  ...
138
138
 
@@ -162,7 +162,7 @@ modalRef.afterClosed().subscribe(result: IModalCloseResult<MyData> => {
162
162
  Controls the behavior and content of the modal container:
163
163
 
164
164
  * `open` |`boolean`|: (optional) Whether the modal should be open or not, will default to true.
165
- * `afterClose` |`Function`|: (optional) The function to run after the modal closes.
165
+ * `afterClose` |`() => Observable<IModalCloseResult<R | undefined>>`|: (optional) The function to run after the modal closes.
166
166
  * `closeGuard` |`ModalCloseGuard`| (optional) The guard that will determine whether the modal can be closed or not
167
167
  * `closeGuardOnlyOnCancel` |`boolean`| (optional) Whether the close guard should only be checked on cancel actions, will default to true
168
168
  * `disableClose` |`boolean`|: (optional) Whether the modal should be closable or not, will default to false. This applies to the close button, escape key, and backdrop.