@rxap/directives 19.2.0 → 21.0.1-dev.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.
Files changed (137) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/compodoc/changelog.html +34 -0
  3. package/compodoc/dependencies.html +7 -7
  4. package/compodoc/directives/AvatarBackgroundImageDirective.html +216 -386
  5. package/compodoc/directives/BackgroundImageDirective.html +230 -243
  6. package/compodoc/directives/ConfirmClick.html +466 -0
  7. package/compodoc/directives/ContenteditableDirective.html +137 -373
  8. package/compodoc/directives/FullWidthDirective.html +8 -139
  9. package/compodoc/directives/IfTruthyDirective.html +136 -182
  10. package/compodoc/directives/IsDevModeDirective.html +4 -74
  11. package/compodoc/directives/MethodDirective.html +272 -346
  12. package/compodoc/directives/MethodTemplateDirective.html +736 -697
  13. package/compodoc/directives/MovableDividerDirective.html +103 -243
  14. package/compodoc/directives/PreventDefaultDirective.html +6 -65
  15. package/compodoc/directives/ShareButtonDirective.html +14 -62
  16. package/compodoc/directives/StopImmediatePropagationDirective.html +6 -65
  17. package/compodoc/directives/StopPropagationDirective.html +6 -65
  18. package/compodoc/injectables/ShareService.html +6 -5
  19. package/compodoc/interfaces/ContenteditableEvent.html +25 -32
  20. package/compodoc/interfaces/IfTruthyDirectiveTemplateContext.html +22 -36
  21. package/compodoc/interfaces/MethodTemplateDirectiveContext.html +42 -66
  22. package/compodoc/interfaces/MethodTemplateDirectiveErrorContext.html +42 -66
  23. package/compodoc/interfaces/ShareData.html +3 -2
  24. package/compodoc/js/menu-wc.js +3 -3
  25. package/compodoc/js/menu-wc_es5.js +1 -1
  26. package/compodoc/js/search/search_index.js +2 -2
  27. package/compodoc/overview.html +2 -2
  28. package/compodoc/properties.html +1 -1
  29. package/docs/documentation.json +2282 -2793
  30. package/docs/html/assets/hierarchy.js +1 -1
  31. package/docs/html/assets/search.js +1 -1
  32. package/docs/html/classes/AvatarBackgroundImageDirective.html +9 -16
  33. package/docs/html/classes/BackgroundImageDirective.html +8 -17
  34. package/docs/html/classes/ConfirmClick.html +3 -3
  35. package/docs/html/classes/ContenteditableDirective.html +8 -7
  36. package/docs/html/classes/FullWidthDirective.html +2 -3
  37. package/docs/html/classes/IfTruthyDirective.html +3 -9
  38. package/docs/html/classes/IsDevModeDirective.html +4 -4
  39. package/docs/html/classes/MethodDirective.html +8 -7
  40. package/docs/html/classes/MethodTemplateDirective.html +10 -15
  41. package/docs/html/classes/MovableDividerDirective.html +3 -13
  42. package/docs/html/classes/PreventDefaultDirective.html +2 -2
  43. package/docs/html/classes/ShareButtonDirective.html +2 -2
  44. package/docs/html/classes/ShareService.html +2 -2
  45. package/docs/html/classes/StopImmediatePropagationDirective.html +2 -2
  46. package/docs/html/classes/StopPropagationDirective.html +2 -2
  47. package/docs/html/enums/BackgroundPositionOptions.html +2 -2
  48. package/docs/html/enums/BackgroundRepeatOptions.html +2 -2
  49. package/docs/html/enums/BackgroundSizeOptions.html +2 -2
  50. package/docs/html/enums/GlobalStyleOptions.html +2 -2
  51. package/docs/html/hierarchy.html +1 -1
  52. package/docs/html/index.html +2 -2
  53. package/docs/html/interfaces/ContenteditableEvent.html +2 -2
  54. package/docs/html/interfaces/IfTruthyDirectiveTemplateContext.html +2 -2
  55. package/docs/html/interfaces/MethodTemplateDirectiveContext.html +2 -2
  56. package/docs/html/interfaces/MethodTemplateDirectiveErrorContext.html +2 -2
  57. package/docs/html/interfaces/ShareData.html +2 -2
  58. package/docs/html/modules.html +1 -1
  59. package/docs/html/types/BackgroundPosition.html +1 -1
  60. package/docs/html/types/BackgroundRepeat.html +1 -1
  61. package/docs/html/types/BackgroundSize.html +1 -1
  62. package/docs/markdown/README.md +1 -1
  63. package/docs/markdown/classes/AvatarBackgroundImageDirective.md +40 -103
  64. package/docs/markdown/classes/BackgroundImageDirective.md +24 -83
  65. package/docs/markdown/classes/ConfirmClick.md +8 -20
  66. package/docs/markdown/classes/ContenteditableDirective.md +21 -34
  67. package/docs/markdown/classes/FullWidthDirective.md +2 -10
  68. package/docs/markdown/classes/IfTruthyDirective.md +14 -71
  69. package/docs/markdown/classes/IsDevModeDirective.md +5 -17
  70. package/docs/markdown/classes/MethodDirective.md +40 -44
  71. package/docs/markdown/classes/MethodTemplateDirective.md +50 -86
  72. package/docs/markdown/classes/MovableDividerDirective.md +11 -71
  73. package/docs/markdown/classes/PreventDefaultDirective.md +3 -3
  74. package/docs/markdown/classes/ShareButtonDirective.md +9 -9
  75. package/docs/markdown/classes/ShareService.md +4 -4
  76. package/docs/markdown/classes/StopImmediatePropagationDirective.md +3 -3
  77. package/docs/markdown/classes/StopPropagationDirective.md +3 -3
  78. package/docs/markdown/enumerations/BackgroundPositionOptions.md +4 -4
  79. package/docs/markdown/enumerations/BackgroundRepeatOptions.md +3 -3
  80. package/docs/markdown/enumerations/BackgroundSizeOptions.md +5 -5
  81. package/docs/markdown/enumerations/GlobalStyleOptions.md +4 -4
  82. package/docs/markdown/globals.md +2 -2
  83. package/docs/markdown/interfaces/ContenteditableEvent.md +4 -4
  84. package/docs/markdown/interfaces/IfTruthyDirectiveTemplateContext.md +3 -3
  85. package/docs/markdown/interfaces/MethodTemplateDirectiveContext.md +3 -3
  86. package/docs/markdown/interfaces/MethodTemplateDirectiveErrorContext.md +4 -4
  87. package/docs/markdown/interfaces/ShareData.md +6 -6
  88. package/docs/markdown/type-aliases/BackgroundPosition.md +2 -2
  89. package/docs/markdown/type-aliases/BackgroundRepeat.md +2 -2
  90. package/docs/markdown/type-aliases/BackgroundSize.md +2 -2
  91. package/docs/wiki/Class.AvatarBackgroundImageDirective.md +39 -102
  92. package/docs/wiki/Class.BackgroundImageDirective.md +23 -82
  93. package/docs/wiki/Class.ConfirmClick.md +7 -19
  94. package/docs/wiki/Class.ContenteditableDirective.md +20 -33
  95. package/docs/wiki/Class.FullWidthDirective.md +1 -9
  96. package/docs/wiki/Class.IfTruthyDirective.md +13 -70
  97. package/docs/wiki/Class.IsDevModeDirective.md +4 -16
  98. package/docs/wiki/Class.MethodDirective.md +39 -43
  99. package/docs/wiki/Class.MethodTemplateDirective.md +49 -85
  100. package/docs/wiki/Class.MovableDividerDirective.md +10 -70
  101. package/docs/wiki/Class.PreventDefaultDirective.md +2 -2
  102. package/docs/wiki/Class.ShareButtonDirective.md +8 -8
  103. package/docs/wiki/Class.ShareService.md +3 -3
  104. package/docs/wiki/Class.StopImmediatePropagationDirective.md +2 -2
  105. package/docs/wiki/Class.StopPropagationDirective.md +2 -2
  106. package/docs/wiki/Enumeration.BackgroundPositionOptions.md +3 -3
  107. package/docs/wiki/Enumeration.BackgroundRepeatOptions.md +2 -2
  108. package/docs/wiki/Enumeration.BackgroundSizeOptions.md +4 -4
  109. package/docs/wiki/Enumeration.GlobalStyleOptions.md +3 -3
  110. package/docs/wiki/Interface.ContenteditableEvent.md +3 -3
  111. package/docs/wiki/Interface.IfTruthyDirectiveTemplateContext.md +2 -2
  112. package/docs/wiki/Interface.MethodTemplateDirectiveContext.md +2 -2
  113. package/docs/wiki/Interface.MethodTemplateDirectiveErrorContext.md +3 -3
  114. package/docs/wiki/Interface.ShareData.md +5 -5
  115. package/docs/wiki/TypeAlias.BackgroundPosition.md +1 -1
  116. package/docs/wiki/TypeAlias.BackgroundRepeat.md +1 -1
  117. package/docs/wiki/TypeAlias.BackgroundSize.md +1 -1
  118. package/docs/wiki/globals.md +1 -1
  119. package/fesm2022/rxap-directives.mjs +291 -392
  120. package/fesm2022/rxap-directives.mjs.map +1 -1
  121. package/package.json +22 -17
  122. package/types/rxap-directives.d.ts +272 -0
  123. package/index.d.ts +0 -14
  124. package/lib/avatar-background-image.directive.d.ts +0 -14
  125. package/lib/background-image.directive.d.ts +0 -42
  126. package/lib/confirm-click.d.ts +0 -10
  127. package/lib/contenteditable.directive.d.ts +0 -21
  128. package/lib/full-width.directive.d.ts +0 -6
  129. package/lib/if-truthy.directive.d.ts +0 -28
  130. package/lib/is-dev-mode.directive.d.ts +0 -12
  131. package/lib/method-template.directive.d.ts +0 -46
  132. package/lib/method.directive.d.ts +0 -29
  133. package/lib/movable-divider.directive.d.ts +0 -28
  134. package/lib/prevent-default.directive.d.ts +0 -6
  135. package/lib/share-button.directive.d.ts +0 -25
  136. package/lib/stop-immediate-propagation.directive.d.ts +0 -6
  137. package/lib/stop-propagation.directive.d.ts +0 -6
@@ -143,160 +143,29 @@
143
143
  </table>
144
144
  </section>
145
145
 
146
- <section data-compodoc="block-index">
147
- <h3 id="index">Index</h3>
148
- <table class="table table-sm table-bordered index-table">
149
- <tbody>
150
- <tr>
151
- <td class="col-md-4">
152
- <h6><b>Properties</b></h6>
153
- </td>
154
- </tr>
155
- <tr>
156
- <td class="col-md-4">
157
- <ul class="index-list">
158
- <li>
159
- <span class="modifier"></span>
160
- <span class="modifier">Public</span>
161
- <a href="#width" >width</a>
162
- </li>
163
- </ul>
164
- </td>
165
- </tr>
166
-
167
-
168
-
169
-
170
- <tr>
171
- <td class="col-md-4">
172
- <h6><b>HostBindings</b></h6>
173
- </td>
174
- </tr>
175
- <tr>
176
- <td class="col-md-4">
177
- <ul class="index-list">
178
- <li>
179
- <a href="#style.width" >style.width</a>
180
- </li>
181
- </ul>
182
- </td>
183
- </tr>
184
-
185
-
186
- </tbody>
187
- </table>
188
- </section>
189
-
190
-
191
-
192
-
193
- <section data-compodoc="block-properties">
194
- <h3>HostBindings</h3> <table class="table table-sm table-bordered">
195
- <tbody>
196
- <tr>
197
- <td class="col-md-4">
198
- <a name="style.width"></a>
199
- <span class="name">
200
- <span ><b>style.width</b></span>
201
- <a href="#style.width"><span class="icon ion-ios-link"></span></a>
202
- </span>
203
- </td>
204
- </tr>
205
- <tr>
206
- <td class="col-md-4">
207
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
208
-
209
- </td>
210
- </tr>
211
- <tr>
212
- <td class="col-md-4">
213
- <i>Default value : </i><code>&#x27;100%&#x27;</code>
214
- </td>
215
- </tr>
216
- <tr>
217
- <td class="col-md-4">
218
- <div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">src/lib/full-width.directive.ts:13</a></div>
219
- </td>
220
- </tr>
221
146
 
222
147
 
223
- </tbody>
224
- </table>
225
- </section>
226
-
227
-
228
-
229
- <section data-compodoc="block-properties">
230
-
231
- <h3 id="inputs">
232
- Properties
233
- </h3>
234
- <table class="table table-sm table-bordered">
235
- <tbody>
236
- <tr>
237
- <td class="col-md-4">
238
- <a name="width"></a>
239
- <span class="name">
240
- <span class="modifier"></span>
241
- <span class="modifier">Public</span>
242
- <span ><b>width</b></span>
243
- <a href="#width"><span class="icon ion-ios-link"></span></a>
244
- </span>
245
- </td>
246
- </tr>
247
- <tr>
248
- <td class="col-md-4">
249
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
250
-
251
- </td>
252
- </tr>
253
- <tr>
254
- <td class="col-md-4">
255
- <i>Default value : </i><code>&#x27;100%&#x27;</code>
256
- </td>
257
- </tr>
258
- <tr>
259
- <td class="col-md-4">
260
- <b>Decorators : </b>
261
- <br />
262
- <code>
263
- @HostBinding(&#x27;style.width&#x27;)<br />
264
- </code>
265
- </td>
266
- </tr>
267
- <tr>
268
- <td class="col-md-4">
269
- <div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">src/lib/full-width.directive.ts:13</a></div>
270
- </td>
271
- </tr>
272
148
 
273
149
 
274
- </tbody>
275
- </table>
276
- </section>
150
+
151
+
152
+
277
153
 
278
154
 
279
155
  </div>
280
156
 
281
157
 
282
158
  <div class="tab-pane fade tab-source-code" id="source">
283
- <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
284
- Directive,
285
- HostBinding,
286
- } from &#x27;@angular/core&#x27;;
159
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive } from &#x27;@angular/core&#x27;;
287
160
 
288
161
  @Directive({
289
162
  selector: &#x27;[rxapFullWidth]&#x27;,
290
163
  standalone: true,
164
+ host: {
165
+ style: &#x27;width: 100%&#x27;,
166
+ },
291
167
  })
292
- export class FullWidthDirective {
293
-
294
- @HostBinding(&#x27;style.width&#x27;)
295
- public width &#x3D; &#x27;100%&#x27;;
296
-
297
- }
298
-
299
-
168
+ export class FullWidthDirective {}
300
169
  </code></pre>
301
170
  </div>
302
171
 
@@ -120,12 +120,6 @@
120
120
 
121
121
 
122
122
 
123
- <p class="comment">
124
- <h3>Implements</h3>
125
- </p>
126
- <p class="comment">
127
- <code>OnChanges</code>
128
- </p>
129
123
 
130
124
 
131
125
  <section data-compodoc="block-metadata">
@@ -153,27 +147,28 @@
153
147
  <h3 id="index">Index</h3>
154
148
  <table class="table table-sm table-bordered index-table">
155
149
  <tbody>
156
-
157
150
  <tr>
158
151
  <td class="col-md-4">
159
- <h6><b>Methods</b></h6>
152
+ <h6><b>Properties</b></h6>
160
153
  </td>
161
154
  </tr>
162
155
  <tr>
163
156
  <td class="col-md-4">
164
157
  <ul class="index-list">
165
158
  <li>
166
- <span class="modifier">Protected</span>
167
- <span class="modifier">Async</span>
168
- <a href="#execute" >execute</a>
159
+ <span class="modifier">Public</span>
160
+ <span class="modifier">Readonly</span>
161
+ <a href="#method" >method</a>
169
162
  </li>
170
163
  <li>
171
- <span class="modifier">Protected</span>
172
- <a href="#hasChanged" >hasChanged</a>
164
+ <span class="modifier">Public</span>
165
+ <span class="modifier">Readonly</span>
166
+ <a href="#parameters" >parameters</a>
173
167
  </li>
174
168
  <li>
175
- <span class="modifier">Static</span>
176
- <a href="#ngTemplateContextGuard" >ngTemplateContextGuard</a>
169
+ <span class="modifier">Public</span>
170
+ <span class="modifier">Readonly</span>
171
+ <a href="#trackBy" >trackBy</a>
177
172
  </li>
178
173
  </ul>
179
174
  </td>
@@ -181,20 +176,24 @@
181
176
 
182
177
  <tr>
183
178
  <td class="col-md-4">
184
- <h6><b>Inputs</b></h6>
179
+ <h6><b>Methods</b></h6>
185
180
  </td>
186
181
  </tr>
187
182
  <tr>
188
183
  <td class="col-md-4">
189
184
  <ul class="index-list">
190
185
  <li>
191
- <a href="#rxapIfTruthy" >rxapIfTruthy</a>
186
+ <span class="modifier">Protected</span>
187
+ <span class="modifier">Async</span>
188
+ <a href="#execute" >execute</a>
192
189
  </li>
193
190
  <li>
194
- <a href="#rxapIfTruthyParameters" >rxapIfTruthyParameters</a>
191
+ <span class="modifier">Protected</span>
192
+ <a href="#hasChanged" >hasChanged</a>
195
193
  </li>
196
194
  <li>
197
- <a href="#rxapIfTruthyTrackBy" >rxapIfTruthyTrackBy</a>
195
+ <span class="modifier">Static</span>
196
+ <a href="#ngTemplateContextGuard" >ngTemplateContextGuard</a>
198
197
  </li>
199
198
  </ul>
200
199
  </td>
@@ -203,6 +202,7 @@
203
202
 
204
203
 
205
204
 
205
+
206
206
  </tbody>
207
207
  </table>
208
208
  </section>
@@ -213,139 +213,20 @@
213
213
  <tbody>
214
214
  <tr>
215
215
  <td class="col-md-4">
216
- <code>constructor(templateRef: <a href="../interfaces/IfTruthyDirectiveTemplateContext.html" target="_self">TemplateRef&lt;IfTruthyDirectiveTemplateContext&lt;Data&gt;&gt;</a>, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef)</code>
216
+ <code>constructor()</code>
217
217
  </td>
218
218
  </tr>
219
219
  <tr>
220
220
  <td class="col-md-4">
221
- <div class="io-line">Defined in <a href="" data-line="30" class="link-to-prism">src/lib/if-truthy.directive.ts:30</a></div>
221
+ <div class="io-line">Defined in <a href="" data-line="35" class="link-to-prism">src/lib/if-truthy.directive.ts:35</a></div>
222
222
  </td>
223
223
  </tr>
224
224
 
225
- <tr>
226
- <td class="col-md-4">
227
- <div>
228
- <b>Parameters :</b>
229
- <table class="params">
230
- <thead>
231
- <tr>
232
- <td>Name</td>
233
- <td>Type</td>
234
- <td>Optional</td>
235
- </tr>
236
- </thead>
237
- <tbody>
238
- <tr>
239
- <td>templateRef</td>
240
-
241
- <td>
242
- <code><a href="../interfaces/IfTruthyDirectiveTemplateContext.html" target="_self" >TemplateRef&lt;IfTruthyDirectiveTemplateContext&lt;Data&gt;&gt;</a></code>
243
- </td>
244
-
245
- <td>
246
- No
247
- </td>
248
-
249
- </tr>
250
- <tr>
251
- <td>viewContainerRef</td>
252
-
253
- <td>
254
- <code>ViewContainerRef</code>
255
- </td>
256
-
257
- <td>
258
- No
259
- </td>
260
-
261
- </tr>
262
- <tr>
263
- <td>cdr</td>
264
-
265
- <td>
266
- <code>ChangeDetectorRef</code>
267
- </td>
268
-
269
- <td>
270
- No
271
- </td>
272
-
273
- </tr>
274
- </tbody>
275
- </table>
276
- </div>
277
- </td>
278
- </tr>
279
225
  </tbody>
280
226
  </table>
281
227
  </section>
282
228
 
283
- <section data-compodoc="block-inputs">
284
- <h3 id="inputs">Inputs</h3>
285
- <table class="table table-sm table-bordered">
286
- <tbody>
287
- <tr>
288
- <td class="col-md-4">
289
- <a name="rxapIfTruthy"></a>
290
- <b>rxapIfTruthy</b>
291
- </td>
292
- </tr>
293
- <tr>
294
- <td class="col-md-4">
295
- <i>Type : </i> <code>Method&lt;Data | Parameters&gt;</code>
296
-
297
- </td>
298
- </tr>
299
- <tr>
300
- <td class="col-md-2" colspan="2">
301
- <div class="io-line">Defined in <a href="" data-line="25" class="link-to-prism">src/lib/if-truthy.directive.ts:25</a></div>
302
- </td>
303
- </tr>
304
- </tbody>
305
- </table>
306
- <table class="table table-sm table-bordered">
307
- <tbody>
308
- <tr>
309
- <td class="col-md-4">
310
- <a name="rxapIfTruthyParameters"></a>
311
- <b>rxapIfTruthyParameters</b>
312
- </td>
313
- </tr>
314
- <tr>
315
- <td class="col-md-4">
316
- <i>Type : </i> <code>Parameters</code>
317
-
318
- </td>
319
- </tr>
320
- <tr>
321
- <td class="col-md-2" colspan="2">
322
- <div class="io-line">Defined in <a href="" data-line="27" class="link-to-prism">src/lib/if-truthy.directive.ts:27</a></div>
323
- </td>
324
- </tr>
325
- </tbody>
326
- </table>
327
- <table class="table table-sm table-bordered">
328
- <tbody>
329
- <tr>
330
- <td class="col-md-4">
331
- <a name="rxapIfTruthyTrackBy"></a>
332
- <b>rxapIfTruthyTrackBy</b>
333
- </td>
334
- </tr>
335
- <tr>
336
- <td class="col-md-4">
337
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function" target="_blank" >function</a></code>
338
229
 
339
- </td>
340
- </tr>
341
- <tr>
342
- <td class="col-md-2" colspan="2">
343
- <div class="io-line">Defined in <a href="" data-line="29" class="link-to-prism">src/lib/if-truthy.directive.ts:29</a></div>
344
- </td>
345
- </tr>
346
- </tbody>
347
- </table>
348
- </section>
349
230
 
350
231
 
351
232
 
@@ -377,8 +258,8 @@
377
258
 
378
259
  <tr>
379
260
  <td class="col-md-4">
380
- <div class="io-line">Defined in <a href="" data-line="60"
381
- class="link-to-prism">src/lib/if-truthy.directive.ts:60</a></div>
261
+ <div class="io-line">Defined in <a href="" data-line="47"
262
+ class="link-to-prism">src/lib/if-truthy.directive.ts:47</a></div>
382
263
  </td>
383
264
  </tr>
384
265
 
@@ -416,8 +297,8 @@
416
297
 
417
298
  <tr>
418
299
  <td class="col-md-4">
419
- <div class="io-line">Defined in <a href="" data-line="81"
420
- class="link-to-prism">src/lib/if-truthy.directive.ts:81</a></div>
300
+ <div class="io-line">Defined in <a href="" data-line="66"
301
+ class="link-to-prism">src/lib/if-truthy.directive.ts:66</a></div>
421
302
  </td>
422
303
  </tr>
423
304
 
@@ -485,8 +366,8 @@
485
366
 
486
367
  <tr>
487
368
  <td class="col-md-4">
488
- <div class="io-line">Defined in <a href="" data-line="45"
489
- class="link-to-prism">src/lib/if-truthy.directive.ts:45</a></div>
369
+ <div class="io-line">Defined in <a href="" data-line="30"
370
+ class="link-to-prism">src/lib/if-truthy.directive.ts:30</a></div>
490
371
  </td>
491
372
  </tr>
492
373
 
@@ -557,21 +438,100 @@
557
438
  </tbody>
558
439
  </table>
559
440
  </section>
441
+ <section data-compodoc="block-properties">
442
+
443
+ <h3 id="inputs">
444
+ Properties
445
+ </h3>
446
+ <table class="table table-sm table-bordered">
447
+ <tbody>
448
+ <tr>
449
+ <td class="col-md-4">
450
+ <a name="method"></a>
451
+ <span class="name">
452
+ <span class="modifier">Public</span>
453
+ <span class="modifier">Readonly</span>
454
+ <span ><b>method</b></span>
455
+ <a href="#method"><span class="icon ion-ios-link"></span></a>
456
+ </span>
457
+ </td>
458
+ </tr>
459
+ <tr>
460
+ <td class="col-md-4">
461
+ <i>Default value : </i><code>input.required&lt;Method&lt;Data, Parameters&gt;&gt;({ alias: &quot;rxapIfTruthy&quot; })</code>
462
+ </td>
463
+ </tr>
464
+ <tr>
465
+ <td class="col-md-4">
466
+ <div class="io-line">Defined in <a href="" data-line="19" class="link-to-prism">src/lib/if-truthy.directive.ts:19</a></div>
467
+ </td>
468
+ </tr>
469
+
470
+
471
+ </tbody>
472
+ </table>
473
+ <table class="table table-sm table-bordered">
474
+ <tbody>
475
+ <tr>
476
+ <td class="col-md-4">
477
+ <a name="parameters"></a>
478
+ <span class="name">
479
+ <span class="modifier">Public</span>
480
+ <span class="modifier">Readonly</span>
481
+ <span ><b>parameters</b></span>
482
+ <a href="#parameters"><span class="icon ion-ios-link"></span></a>
483
+ </span>
484
+ </td>
485
+ </tr>
486
+ <tr>
487
+ <td class="col-md-4">
488
+ <i>Default value : </i><code>input.required&lt;Parameters&gt;({ alias: &quot;rxapIfTruthyParameters&quot; })</code>
489
+ </td>
490
+ </tr>
491
+ <tr>
492
+ <td class="col-md-4">
493
+ <div class="io-line">Defined in <a href="" data-line="20" class="link-to-prism">src/lib/if-truthy.directive.ts:20</a></div>
494
+ </td>
495
+ </tr>
496
+
497
+
498
+ </tbody>
499
+ </table>
500
+ <table class="table table-sm table-bordered">
501
+ <tbody>
502
+ <tr>
503
+ <td class="col-md-4">
504
+ <a name="trackBy"></a>
505
+ <span class="name">
506
+ <span class="modifier">Public</span>
507
+ <span class="modifier">Readonly</span>
508
+ <span ><b>trackBy</b></span>
509
+ <a href="#trackBy"><span class="icon ion-ios-link"></span></a>
510
+ </span>
511
+ </td>
512
+ </tr>
513
+ <tr>
514
+ <td class="col-md-4">
515
+ <i>Default value : </i><code>input&lt;((data: Data) &#x3D;&gt; any) | undefined&gt;(undefined, { alias: &quot;rxapIfTruthyTrackBy&quot; })</code>
516
+ </td>
517
+ </tr>
518
+ <tr>
519
+ <td class="col-md-4">
520
+ <div class="io-line">Defined in <a href="" data-line="21" class="link-to-prism">src/lib/if-truthy.directive.ts:21</a></div>
521
+ </td>
522
+ </tr>
523
+
524
+
525
+ </tbody>
526
+ </table>
527
+ </section>
560
528
 
561
529
 
562
530
  </div>
563
531
 
564
532
 
565
533
  <div class="tab-pane fade tab-source-code" id="source">
566
- <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
567
- ChangeDetectorRef,
568
- Directive,
569
- Input,
570
- OnChanges,
571
- SimpleChanges,
572
- TemplateRef,
573
- ViewContainerRef,
574
- } from &#x27;@angular/core&#x27;;
534
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, effect, inject, input, TemplateRef, untracked, ViewContainerRef } from &#x27;@angular/core&#x27;;
575
535
  import { Method } from &#x27;@rxap/pattern&#x27;;
576
536
 
577
537
  export interface IfTruthyDirectiveTemplateContext&lt;Data&gt; {
@@ -584,22 +544,15 @@ export interface IfTruthyDirectiveTemplateContext&lt;Data&gt; {
584
544
  selector: &#x27;[rxapIfTruthy]&#x27;,
585
545
  standalone: true,
586
546
  })
587
- export class IfTruthyDirective&lt;Data, Parameters &#x3D; any&gt; implements OnChanges {
588
-
589
- @Input(&#x27;rxapIfTruthy&#x27;)
590
- public method!: Method&lt;Data, Parameters&gt;;
591
- @Input(&#x27;rxapIfTruthyParameters&#x27;)
592
- public parameters!: Parameters;
593
- @Input(&#x27;rxapIfTruthyTrackBy&#x27;)
594
- public trackBy!: (data: Data) &#x3D;&gt; any;
595
- private _last?: Data;
547
+ export class IfTruthyDirective&lt;Data, Parameters &#x3D; any&gt; {
548
+ private readonly templateRef &#x3D; inject&lt;TemplateRef&lt;IfTruthyDirectiveTemplateContext&lt;Data&gt;&gt;&gt;(TemplateRef);
549
+ private readonly viewContainerRef &#x3D; inject(ViewContainerRef);
596
550
 
597
- constructor(
598
- private readonly templateRef: TemplateRef&lt;IfTruthyDirectiveTemplateContext&lt;Data&gt;&gt;,
599
- private readonly viewContainerRef: ViewContainerRef,
600
- private readonly cdr: ChangeDetectorRef,
601
- ) {
602
- }
551
+
552
+ public readonly method &#x3D; input.required&lt;Method&lt;Data, Parameters&gt;&gt;({ alias: &quot;rxapIfTruthy&quot; });
553
+ public readonly parameters &#x3D; input.required&lt;Parameters&gt;({ alias: &quot;rxapIfTruthyParameters&quot; });
554
+ public readonly trackBy &#x3D; input&lt;((data: Data) &#x3D;&gt; any) | undefined&gt;(undefined, { alias: &quot;rxapIfTruthyTrackBy&quot; });
555
+ private _last?: Data;
603
556
 
604
557
  /**
605
558
  * Asserts the correct type of the context for the template that &#x60;NgForOf&#x60; will render.
@@ -614,24 +567,26 @@ export class IfTruthyDirective&lt;Data, Parameters &#x3D; any&gt; implements OnC
614
567
  return true;
615
568
  }
616
569
 
617
- public ngOnChanges(changes: SimpleChanges) {
618
-
619
- if (this.method &amp;&amp; this.parameters) {
620
- this.execute();
621
- }
622
-
570
+ constructor() {
571
+ effect(() &#x3D;&gt; {
572
+ const method &#x3D; this.method();
573
+ const parameters &#x3D; this.parameters();
574
+ if (method &amp;&amp; parameters) {
575
+ untracked(() &#x3D;&gt; this.execute());
576
+ }
577
+ });
623
578
  }
624
579
 
625
580
  protected async execute() {
626
581
 
627
- const result &#x3D; await this.method.call(this.parameters);
582
+ const result &#x3D; await this.method().call(this.parameters());
628
583
 
629
584
  if (this.hasChanged(result)) {
630
585
 
631
586
  this.viewContainerRef.clear();
632
587
 
633
588
  if (result) {
634
- this.viewContainerRef.createEmbeddedView(this.templateRef, { $implicit: result });
589
+ this.viewContainerRef.createEmbeddedView(this.templateRef, { $implicit: result }).markForCheck();
635
590
  }
636
591
 
637
592
  // remember the last applied result so unchanged values don&#x27;t rebuild the view
@@ -639,14 +594,13 @@ export class IfTruthyDirective&lt;Data, Parameters &#x3D; any&gt; implements OnC
639
594
 
640
595
  }
641
596
 
642
- this.cdr.detectChanges();
643
-
644
597
  }
645
598
 
646
599
  protected hasChanged(current: Data) {
647
600
  if (this._last !&#x3D;&#x3D; undefined) {
648
- const currentTrackBy &#x3D; this.trackBy ? this.trackBy(current) : current;
649
- const lastTrackBy &#x3D; this.trackBy ? this.trackBy(this._last) : this._last;
601
+ const trackBy &#x3D; this.trackBy();
602
+ const currentTrackBy &#x3D; trackBy ? trackBy(current) : current;
603
+ const lastTrackBy &#x3D; trackBy ? trackBy(this._last) : this._last;
650
604
  return currentTrackBy !&#x3D;&#x3D; lastTrackBy;
651
605
  }
652
606