@rxap/directives 21.0.1-dev.0 → 21.0.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 (122) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/compodoc/changelog.html +37 -0
  3. package/compodoc/dependencies.html +4 -4
  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 +2432 -3183
  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 -101
  64. package/docs/markdown/classes/BackgroundImageDirective.md +24 -81
  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 -69
  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 -84
  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 -100
  92. package/docs/wiki/Class.BackgroundImageDirective.md +23 -80
  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 -68
  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 -83
  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 +259 -360
  120. package/fesm2022/rxap-directives.mjs.map +1 -1
  121. package/package.json +9 -9
  122. package/types/rxap-directives.d.ts +104 -102
@@ -120,13 +120,6 @@
120
120
 
121
121
 
122
122
 
123
- <p class="comment">
124
- <h3>Implements</h3>
125
- </p>
126
- <p class="comment">
127
- <code>OnDestroy</code>
128
- <code>OnInit</code>
129
- </p>
130
123
 
131
124
 
132
125
  <section data-compodoc="block-metadata">
@@ -163,9 +156,19 @@
163
156
  <td class="col-md-4">
164
157
  <ul class="index-list">
165
158
  <li>
166
- <span class="modifier"></span>
167
159
  <span class="modifier">Public</span>
168
- <a href="#cursor" >cursor</a>
160
+ <span class="modifier">Readonly</span>
161
+ <a href="#containerElement" >containerElement</a>
162
+ </li>
163
+ <li>
164
+ <span class="modifier">Public</span>
165
+ <span class="modifier">Readonly</span>
166
+ <a href="#fixedElement" >fixedElement</a>
167
+ </li>
168
+ <li>
169
+ <span class="modifier">Public</span>
170
+ <span class="modifier">Readonly</span>
171
+ <a href="#origin" >origin</a>
169
172
  </li>
170
173
  </ul>
171
174
  </td>
@@ -180,7 +183,6 @@
180
183
  <td class="col-md-4">
181
184
  <ul class="index-list">
182
185
  <li>
183
- <span class="modifier"></span>
184
186
  <span class="modifier">Public</span>
185
187
  <a href="#onMousedown" >onMousedown</a>
186
188
  </li>
@@ -202,43 +204,12 @@
202
204
  <li>
203
205
  <a href="#fixedElement" >fixedElement</a>
204
206
  </li>
205
- <li>
206
- <a href="#origin" >origin</a>
207
- </li>
208
207
  </ul>
209
208
  </td>
210
209
  </tr>
211
210
 
212
211
 
213
- <tr>
214
- <td class="col-md-4">
215
- <h6><b>HostBindings</b></h6>
216
- </td>
217
- </tr>
218
- <tr>
219
- <td class="col-md-4">
220
- <ul class="index-list">
221
- <li>
222
- <a href="#style.cursor" >style.cursor</a>
223
- </li>
224
- </ul>
225
- </td>
226
- </tr>
227
212
 
228
- <tr>
229
- <td class="col-md-4">
230
- <h6><b>HostListeners</b></h6>
231
- </td>
232
- </tr>
233
- <tr>
234
- <td class="col-md-4">
235
- <ul class="index-list">
236
- <li>
237
- <a href="#mousedown" >mousedown</a>
238
- </li>
239
- </ul>
240
- </td>
241
- </tr>
242
213
 
243
214
  </tbody>
244
215
  </table>
@@ -250,45 +221,15 @@
250
221
  <tbody>
251
222
  <tr>
252
223
  <td class="col-md-4">
253
- <code>constructor(renderer: Renderer2)</code>
224
+ <code>constructor()</code>
254
225
  </td>
255
226
  </tr>
256
227
  <tr>
257
228
  <td class="col-md-4">
258
- <div class="io-line">Defined in <a href="" data-line="46" class="link-to-prism">src/lib/movable-divider.directive.ts:46</a></div>
229
+ <div class="io-line">Defined in <a href="" data-line="37" class="link-to-prism">src/lib/movable-divider.directive.ts:37</a></div>
259
230
  </td>
260
231
  </tr>
261
232
 
262
- <tr>
263
- <td class="col-md-4">
264
- <div>
265
- <b>Parameters :</b>
266
- <table class="params">
267
- <thead>
268
- <tr>
269
- <td>Name</td>
270
- <td>Type</td>
271
- <td>Optional</td>
272
- </tr>
273
- </thead>
274
- <tbody>
275
- <tr>
276
- <td>renderer</td>
277
-
278
- <td>
279
- <code>Renderer2</code>
280
- </td>
281
-
282
- <td>
283
- No
284
- </td>
285
-
286
- </tr>
287
- </tbody>
288
- </table>
289
- </div>
290
- </td>
291
- </tr>
292
233
  </tbody>
293
234
  </table>
294
235
  </section>
@@ -303,12 +244,6 @@
303
244
  <b>containerElement</b>
304
245
  </td>
305
246
  </tr>
306
- <tr>
307
- <td class="col-md-4">
308
- <i>Type : </i> <code>HTMLDivElement</code>
309
-
310
- </td>
311
- </tr>
312
247
  <tr>
313
248
  <td class="col-md-4">
314
249
  <i>Required : </i>&nbsp;<b>true</b>
@@ -316,7 +251,7 @@
316
251
  </tr>
317
252
  <tr>
318
253
  <td class="col-md-2" colspan="2">
319
- <div class="io-line">Defined in <a href="" data-line="25" class="link-to-prism">src/lib/movable-divider.directive.ts:25</a></div>
254
+ <div class="io-line">Defined in <a href="" data-line="20" class="link-to-prism">src/lib/movable-divider.directive.ts:20</a></div>
320
255
  </td>
321
256
  </tr>
322
257
  </tbody>
@@ -329,12 +264,6 @@
329
264
  <b>fixedElement</b>
330
265
  </td>
331
266
  </tr>
332
- <tr>
333
- <td class="col-md-4">
334
- <i>Type : </i> <code>HTMLDivElement</code>
335
-
336
- </td>
337
- </tr>
338
267
  <tr>
339
268
  <td class="col-md-4">
340
269
  <i>Required : </i>&nbsp;<b>true</b>
@@ -342,100 +271,15 @@
342
271
  </tr>
343
272
  <tr>
344
273
  <td class="col-md-2" colspan="2">
345
- <div class="io-line">Defined in <a href="" data-line="28" class="link-to-prism">src/lib/movable-divider.directive.ts:28</a></div>
346
- </td>
347
- </tr>
348
- </tbody>
349
- </table>
350
- <table class="table table-sm table-bordered">
351
- <tbody>
352
- <tr>
353
- <td class="col-md-4">
354
- <a name="origin"></a>
355
- <b>origin</b>
356
- </td>
357
- </tr>
358
- <tr>
359
- <td class="col-md-4">
360
- <i>Type : </i> <code>&quot;right&quot; | &quot;left&quot;</code>
361
-
362
- </td>
363
- </tr>
364
- <tr>
365
- <td class="col-md-4">
366
- <i>Default value : </i><code>&#x27;right&#x27;</code>
367
- </td>
368
- </tr>
369
- <tr>
370
- <td class="col-md-2" colspan="2">
371
- <div class="io-line">Defined in <a href="" data-line="31" class="link-to-prism">src/lib/movable-divider.directive.ts:31</a></div>
274
+ <div class="io-line">Defined in <a href="" data-line="22" class="link-to-prism">src/lib/movable-divider.directive.ts:22</a></div>
372
275
  </td>
373
276
  </tr>
374
277
  </tbody>
375
278
  </table>
376
279
  </section>
377
280
 
378
- <section data-compodoc="block-properties">
379
- <h3>HostBindings</h3> <table class="table table-sm table-bordered">
380
- <tbody>
381
- <tr>
382
- <td class="col-md-4">
383
- <a name="style.cursor"></a>
384
- <span class="name">
385
- <span ><b>style.cursor</b></span>
386
- <a href="#style.cursor"><span class="icon ion-ios-link"></span></a>
387
- </span>
388
- </td>
389
- </tr>
390
- <tr>
391
- <td class="col-md-4">
392
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
393
281
 
394
- </td>
395
- </tr>
396
- <tr>
397
- <td class="col-md-4">
398
- <i>Default value : </i><code>&#x27;ew-resize&#x27;</code>
399
- </td>
400
- </tr>
401
- <tr>
402
- <td class="col-md-4">
403
- <div class="io-line">Defined in <a href="" data-line="33" class="link-to-prism">src/lib/movable-divider.directive.ts:33</a></div>
404
- </td>
405
- </tr>
406
282
 
407
-
408
- </tbody>
409
- </table>
410
- </section>
411
-
412
- <section data-compodoc="block-host-listener">
413
- <h3>HostListeners</h3> <table class="table table-sm table-bordered">
414
- <tbody>
415
- <tr>
416
- <td class="col-md-4">
417
- <a name="mousedown"></a>
418
- <span class="name">
419
- <b>
420
- mousedown
421
- </b>
422
- <a href="#mousedown"><span class="icon ion-ios-link"></span></a>
423
- </span>
424
- </td>
425
- </tr>
426
-
427
-
428
- <tr>
429
- <td class="col-md-4">
430
- <div class="io-line">Defined in <a href="" data-line="90"
431
- class="link-to-prism">src/lib/movable-divider.directive.ts:90</a></div>
432
- </td>
433
- </tr>
434
-
435
-
436
- </tbody>
437
- </table>
438
- </section>
439
283
  <section data-compodoc="block-methods">
440
284
 
441
285
  <h3 id="methods">
@@ -447,7 +291,6 @@
447
291
  <td class="col-md-4">
448
292
  <a name="onMousedown"></a>
449
293
  <span class="name">
450
- <span class="modifier"></span>
451
294
  <span class="modifier">Public</span>
452
295
  <span ><b>onMousedown</b></span>
453
296
  <a href="#onMousedown"><span class="icon ion-ios-link"></span></a>
@@ -461,18 +304,11 @@
461
304
  </td>
462
305
  </tr>
463
306
 
464
- <tr>
465
- <td class="col-md-4">
466
- <b>Decorators : </b>
467
- <br />
468
- <code>@HostListener(&#x27;mousedown&#x27;)<br /></code>
469
- </td>
470
- </tr>
471
307
 
472
308
  <tr>
473
309
  <td class="col-md-4">
474
- <div class="io-line">Defined in <a href="" data-line="90"
475
- class="link-to-prism">src/lib/movable-divider.directive.ts:90</a></div>
310
+ <div class="io-line">Defined in <a href="" data-line="85"
311
+ class="link-to-prism">src/lib/movable-divider.directive.ts:85</a></div>
476
312
  </td>
477
313
  </tr>
478
314
 
@@ -498,38 +334,67 @@
498
334
  <tbody>
499
335
  <tr>
500
336
  <td class="col-md-4">
501
- <a name="cursor"></a>
337
+ <a name="containerElement"></a>
502
338
  <span class="name">
503
- <span class="modifier"></span>
504
339
  <span class="modifier">Public</span>
505
- <span ><b>cursor</b></span>
506
- <a href="#cursor"><span class="icon ion-ios-link"></span></a>
340
+ <span class="modifier">Readonly</span>
341
+ <span ><b>containerElement</b></span>
342
+ <a href="#containerElement"><span class="icon ion-ios-link"></span></a>
507
343
  </span>
508
344
  </td>
509
345
  </tr>
510
- <tr>
511
- <td class="col-md-4">
512
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
346
+ <tr>
347
+ <td class="col-md-4">
348
+ <div class="io-line">Defined in <a href="" data-line="20" class="link-to-prism">src/lib/movable-divider.directive.ts:20</a></div>
349
+ </td>
350
+ </tr>
513
351
 
514
- </td>
515
- </tr>
516
- <tr>
517
- <td class="col-md-4">
518
- <i>Default value : </i><code>&#x27;ew-resize&#x27;</code>
519
- </td>
520
- </tr>
352
+
353
+ </tbody>
354
+ </table>
355
+ <table class="table table-sm table-bordered">
356
+ <tbody>
357
+ <tr>
358
+ <td class="col-md-4">
359
+ <a name="fixedElement"></a>
360
+ <span class="name">
361
+ <span class="modifier">Public</span>
362
+ <span class="modifier">Readonly</span>
363
+ <span ><b>fixedElement</b></span>
364
+ <a href="#fixedElement"><span class="icon ion-ios-link"></span></a>
365
+ </span>
366
+ </td>
367
+ </tr>
368
+ <tr>
369
+ <td class="col-md-4">
370
+ <div class="io-line">Defined in <a href="" data-line="22" class="link-to-prism">src/lib/movable-divider.directive.ts:22</a></div>
371
+ </td>
372
+ </tr>
373
+
374
+
375
+ </tbody>
376
+ </table>
377
+ <table class="table table-sm table-bordered">
378
+ <tbody>
379
+ <tr>
380
+ <td class="col-md-4">
381
+ <a name="origin"></a>
382
+ <span class="name">
383
+ <span class="modifier">Public</span>
384
+ <span class="modifier">Readonly</span>
385
+ <span ><b>origin</b></span>
386
+ <a href="#origin"><span class="icon ion-ios-link"></span></a>
387
+ </span>
388
+ </td>
389
+ </tr>
521
390
  <tr>
522
391
  <td class="col-md-4">
523
- <b>Decorators : </b>
524
- <br />
525
- <code>
526
- @HostBinding(&#x27;style.cursor&#x27;)<br />
527
- </code>
392
+ <i>Default value : </i><code>input&lt;&#x27;right&#x27; | &#x27;left&#x27;&gt;(&#x27;right&#x27;)</code>
528
393
  </td>
529
394
  </tr>
530
395
  <tr>
531
396
  <td class="col-md-4">
532
- <div class="io-line">Defined in <a href="" data-line="33" class="link-to-prism">src/lib/movable-divider.directive.ts:33</a></div>
397
+ <div class="io-line">Defined in <a href="" data-line="24" class="link-to-prism">src/lib/movable-divider.directive.ts:24</a></div>
533
398
  </td>
534
399
  </tr>
535
400
 
@@ -543,17 +408,7 @@
543
408
 
544
409
 
545
410
  <div class="tab-pane fade tab-source-code" id="source">
546
- <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
547
- Directive,
548
- HostBinding,
549
- HostListener,
550
- Input,
551
- isDevMode,
552
- OnDestroy,
553
- OnInit,
554
- Renderer2,
555
- } from &#x27;@angular/core&#x27;;
556
- import { Required } from &#x27;@rxap/utilities&#x27;;
411
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, effect, inject, input, isDevMode, Renderer2 } from &#x27;@angular/core&#x27;;
557
412
  import {
558
413
  fromEvent,
559
414
  Subscription,
@@ -563,20 +418,21 @@ import { tap } from &#x27;rxjs/operators&#x27;;
563
418
  @Directive({
564
419
  selector: &#x27;[rxapMovableDivider]&#x27;,
565
420
  standalone: true,
421
+ host: {
422
+ style: &#x27;cursor: ew-resize&#x27;,
423
+ &#x27;(mousedown)&#x27;: &#x27;onMousedown()&#x27;,
424
+ },
566
425
  })
567
- export class MovableDividerDirective implements OnDestroy, OnInit {
426
+ export class MovableDividerDirective {
427
+ private readonly renderer &#x3D; inject(Renderer2);
428
+
429
+
430
+ public readonly containerElement &#x3D; input.required&lt;HTMLDivElement&gt;();
568
431
 
569
- @Input({ required: true })
570
- public containerElement!: HTMLDivElement;
432
+ public readonly fixedElement &#x3D; input.required&lt;HTMLDivElement&gt;();
571
433
 
572
- @Input({ required: true })
573
- public fixedElement!: HTMLDivElement;
434
+ public readonly origin &#x3D; input&lt;&#x27;right&#x27; | &#x27;left&#x27;&gt;(&#x27;right&#x27;);
574
435
 
575
- @Input()
576
- public origin: &#x27;right&#x27; | &#x27;left&#x27; &#x3D; &#x27;right&#x27;;
577
- @HostBinding(&#x27;style.cursor&#x27;)
578
- public cursor &#x3D; &#x27;ew-resize&#x27;;
579
- private _subscription &#x3D; new Subscription();
580
436
  /**
581
437
  * Indicates that the divider is moved with mouse down
582
438
  * @private
@@ -590,48 +446,52 @@ export class MovableDividerDirective implements OnDestroy, OnInit {
590
446
  */
591
447
  private _fixedElementWidth: number | null &#x3D; null;
592
448
 
593
- constructor(private readonly renderer: Renderer2) {
594
- }
595
-
596
- public ngOnDestroy() {
597
- this._subscription?.unsubscribe();
449
+ constructor() {
450
+ effect((onCleanup) &#x3D;&gt; {
451
+ const containerElement &#x3D; this.containerElement();
452
+ const subscription &#x3D; new Subscription();
453
+ onCleanup(() &#x3D;&gt; subscription.unsubscribe());
454
+ this.listen(containerElement, subscription);
455
+ });
598
456
  }
599
457
 
600
- public ngOnInit() {
601
- this._subscription.add(fromEvent&lt;MouseEvent&gt;(this.containerElement, &#x27;mousemove&#x27;).pipe(
458
+ private listen(containerElement: HTMLDivElement, subscription: Subscription) {
459
+ subscription.add(fromEvent&lt;MouseEvent&gt;(containerElement, &#x27;mousemove&#x27;).pipe(
602
460
  tap(($event: MouseEvent) &#x3D;&gt; {
603
461
  if (this._moveDivider) {
604
462
  if (!this._fixedElementWidth) {
605
- this._fixedElementWidth &#x3D; this.fixedElement.clientWidth as number;
463
+ this._fixedElementWidth &#x3D; this.fixedElement().clientWidth as number;
606
464
  }
607
- if (this.origin &#x3D;&#x3D;&#x3D; &#x27;right&#x27;) {
608
- this._fixedElementWidth &#x3D; $event.clientX - this.containerElement.getBoundingClientRect().left;
609
- } else if (this.origin &#x3D;&#x3D;&#x3D; &#x27;left&#x27;) {
465
+ const origin &#x3D; this.origin();
466
+ if (origin &#x3D;&#x3D;&#x3D; &#x27;right&#x27;) {
467
+ this._fixedElementWidth &#x3D; $event.clientX - this.containerElement().getBoundingClientRect().left;
468
+ } else if (origin &#x3D;&#x3D;&#x3D; &#x27;left&#x27;) {
469
+ const containerElementValue &#x3D; this.containerElement();
610
470
  if (isDevMode()) {
611
471
  console.log({
612
- clientWidth: this.containerElement.clientWidth,
472
+ clientWidth: containerElementValue.clientWidth,
613
473
  clientX: $event.clientX,
614
- clientLeft: this.containerElement.getBoundingClientRect().left,
474
+ clientLeft: containerElementValue.getBoundingClientRect().left,
615
475
  });
616
476
  }
617
477
  this._fixedElementWidth &#x3D;
618
- this.containerElement.clientWidth - $event.clientX + this.containerElement.getBoundingClientRect().left;
478
+ containerElementValue.clientWidth - $event.clientX + containerElementValue.getBoundingClientRect().left;
619
479
  } else {
620
- throw new Error(&#x60;The origin &#x27;${ this.origin }&#x27; is not supported.&#x60;);
480
+ throw new Error(&#x60;The origin &#x27;${ origin }&#x27; is not supported.&#x60;);
621
481
  }
622
482
  const width &#x3D; this._fixedElementWidth + &#x27;px&#x27;;
623
- this.renderer.setStyle(this.fixedElement, &#x27;max-width&#x27;, width);
624
- this.renderer.setStyle(this.fixedElement, &#x27;min-width&#x27;, width);
625
- this.renderer.setStyle(this.fixedElement, &#x27;flex-basis&#x27;, width);
483
+ const fixedElement &#x3D; this.fixedElement();
484
+ this.renderer.setStyle(fixedElement, &#x27;max-width&#x27;, width);
485
+ this.renderer.setStyle(fixedElement, &#x27;min-width&#x27;, width);
486
+ this.renderer.setStyle(fixedElement, &#x27;flex-basis&#x27;, width);
626
487
  }
627
488
  }),
628
489
  ).subscribe());
629
- this._subscription.add(fromEvent(this.containerElement, &#x27;mouseup&#x27;).pipe(
490
+ subscription.add(fromEvent(containerElement, &#x27;mouseup&#x27;).pipe(
630
491
  tap(() &#x3D;&gt; this._moveDivider &#x3D; false),
631
492
  ).subscribe());
632
493
  }
633
494
 
634
- @HostListener(&#x27;mousedown&#x27;)
635
495
  public onMousedown() {
636
496
  this._moveDivider &#x3D; true;
637
497
  }
@@ -157,7 +157,6 @@
157
157
  <td class="col-md-4">
158
158
  <ul class="index-list">
159
159
  <li>
160
- <span class="modifier"></span>
161
160
  <span class="modifier">Public</span>
162
161
  <a href="#onClick" >onClick</a>
163
162
  </li>
@@ -168,20 +167,6 @@
168
167
 
169
168
 
170
169
 
171
- <tr>
172
- <td class="col-md-4">
173
- <h6><b>HostListeners</b></h6>
174
- </td>
175
- </tr>
176
- <tr>
177
- <td class="col-md-4">
178
- <ul class="index-list">
179
- <li>
180
- <a href="#click" >click</a>
181
- </li>
182
- </ul>
183
- </td>
184
- </tr>
185
170
 
186
171
  </tbody>
187
172
  </table>
@@ -191,38 +176,7 @@
191
176
 
192
177
 
193
178
 
194
- <section data-compodoc="block-host-listener">
195
- <h3>HostListeners</h3> <table class="table table-sm table-bordered">
196
- <tbody>
197
- <tr>
198
- <td class="col-md-4">
199
- <a name="click"></a>
200
- <span class="name">
201
- <b>
202
- click
203
- </b>
204
- <a href="#click"><span class="icon ion-ios-link"></span></a>
205
- </span>
206
- </td>
207
- </tr>
208
- <tr>
209
- <td class="col-md-4">
210
- <i>Arguments : </i><code>'$event' </code>
211
- </td>
212
- </tr>
213
-
214
-
215
- <tr>
216
- <td class="col-md-4">
217
- <div class="io-line">Defined in <a href="" data-line="13"
218
- class="link-to-prism">src/lib/prevent-default.directive.ts:13</a></div>
219
- </td>
220
- </tr>
221
179
 
222
-
223
- </tbody>
224
- </table>
225
- </section>
226
180
  <section data-compodoc="block-methods">
227
181
 
228
182
  <h3 id="methods">
@@ -234,7 +188,6 @@
234
188
  <td class="col-md-4">
235
189
  <a name="onClick"></a>
236
190
  <span class="name">
237
- <span class="modifier"></span>
238
191
  <span class="modifier">Public</span>
239
192
  <span ><b>onClick</b></span>
240
193
  <a href="#onClick"><span class="icon ion-ios-link"></span></a>
@@ -248,18 +201,11 @@
248
201
  </td>
249
202
  </tr>
250
203
 
251
- <tr>
252
- <td class="col-md-4">
253
- <b>Decorators : </b>
254
- <br />
255
- <code>@HostListener(&#x27;click&#x27;, [&#x27;$event&#x27;])<br /></code>
256
- </td>
257
- </tr>
258
204
 
259
205
  <tr>
260
206
  <td class="col-md-4">
261
- <div class="io-line">Defined in <a href="" data-line="13"
262
- class="link-to-prism">src/lib/prevent-default.directive.ts:13</a></div>
207
+ <div class="io-line">Defined in <a href="" data-line="11"
208
+ class="link-to-prism">src/lib/prevent-default.directive.ts:11</a></div>
263
209
  </td>
264
210
  </tr>
265
211
 
@@ -312,25 +258,20 @@
312
258
 
313
259
 
314
260
  <div class="tab-pane fade tab-source-code" id="source">
315
- <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
316
- Directive,
317
- HostListener,
318
- } from &#x27;@angular/core&#x27;;
261
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive } from &#x27;@angular/core&#x27;;
319
262
 
320
263
  @Directive({
321
264
  selector: &#x27;[rxapPreventDefault]&#x27;,
322
265
  standalone: true,
266
+ host: {
267
+ &#x27;(click)&#x27;: &#x27;onClick($event)&#x27;,
268
+ },
323
269
  })
324
270
  export class PreventDefaultDirective {
325
-
326
- @HostListener(&#x27;click&#x27;, [ &#x27;$event&#x27; ])
327
271
  public onClick($event: Event): void {
328
272
  $event.preventDefault();
329
273
  }
330
-
331
274
  }
332
-
333
-
334
275
  </code></pre>
335
276
  </div>
336
277