@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.
- package/CHANGELOG.md +36 -0
- package/compodoc/changelog.html +34 -0
- package/compodoc/dependencies.html +7 -7
- package/compodoc/directives/AvatarBackgroundImageDirective.html +216 -386
- package/compodoc/directives/BackgroundImageDirective.html +230 -243
- package/compodoc/directives/ConfirmClick.html +466 -0
- package/compodoc/directives/ContenteditableDirective.html +137 -373
- package/compodoc/directives/FullWidthDirective.html +8 -139
- package/compodoc/directives/IfTruthyDirective.html +136 -182
- package/compodoc/directives/IsDevModeDirective.html +4 -74
- package/compodoc/directives/MethodDirective.html +272 -346
- package/compodoc/directives/MethodTemplateDirective.html +736 -697
- package/compodoc/directives/MovableDividerDirective.html +103 -243
- package/compodoc/directives/PreventDefaultDirective.html +6 -65
- package/compodoc/directives/ShareButtonDirective.html +14 -62
- package/compodoc/directives/StopImmediatePropagationDirective.html +6 -65
- package/compodoc/directives/StopPropagationDirective.html +6 -65
- package/compodoc/injectables/ShareService.html +6 -5
- package/compodoc/interfaces/ContenteditableEvent.html +25 -32
- package/compodoc/interfaces/IfTruthyDirectiveTemplateContext.html +22 -36
- package/compodoc/interfaces/MethodTemplateDirectiveContext.html +42 -66
- package/compodoc/interfaces/MethodTemplateDirectiveErrorContext.html +42 -66
- package/compodoc/interfaces/ShareData.html +3 -2
- package/compodoc/js/menu-wc.js +3 -3
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/overview.html +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +2282 -2793
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AvatarBackgroundImageDirective.html +9 -16
- package/docs/html/classes/BackgroundImageDirective.html +8 -17
- package/docs/html/classes/ConfirmClick.html +3 -3
- package/docs/html/classes/ContenteditableDirective.html +8 -7
- package/docs/html/classes/FullWidthDirective.html +2 -3
- package/docs/html/classes/IfTruthyDirective.html +3 -9
- package/docs/html/classes/IsDevModeDirective.html +4 -4
- package/docs/html/classes/MethodDirective.html +8 -7
- package/docs/html/classes/MethodTemplateDirective.html +10 -15
- package/docs/html/classes/MovableDividerDirective.html +3 -13
- package/docs/html/classes/PreventDefaultDirective.html +2 -2
- package/docs/html/classes/ShareButtonDirective.html +2 -2
- package/docs/html/classes/ShareService.html +2 -2
- package/docs/html/classes/StopImmediatePropagationDirective.html +2 -2
- package/docs/html/classes/StopPropagationDirective.html +2 -2
- package/docs/html/enums/BackgroundPositionOptions.html +2 -2
- package/docs/html/enums/BackgroundRepeatOptions.html +2 -2
- package/docs/html/enums/BackgroundSizeOptions.html +2 -2
- package/docs/html/enums/GlobalStyleOptions.html +2 -2
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/ContenteditableEvent.html +2 -2
- package/docs/html/interfaces/IfTruthyDirectiveTemplateContext.html +2 -2
- package/docs/html/interfaces/MethodTemplateDirectiveContext.html +2 -2
- package/docs/html/interfaces/MethodTemplateDirectiveErrorContext.html +2 -2
- package/docs/html/interfaces/ShareData.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/BackgroundPosition.html +1 -1
- package/docs/html/types/BackgroundRepeat.html +1 -1
- package/docs/html/types/BackgroundSize.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AvatarBackgroundImageDirective.md +40 -103
- package/docs/markdown/classes/BackgroundImageDirective.md +24 -83
- package/docs/markdown/classes/ConfirmClick.md +8 -20
- package/docs/markdown/classes/ContenteditableDirective.md +21 -34
- package/docs/markdown/classes/FullWidthDirective.md +2 -10
- package/docs/markdown/classes/IfTruthyDirective.md +14 -71
- package/docs/markdown/classes/IsDevModeDirective.md +5 -17
- package/docs/markdown/classes/MethodDirective.md +40 -44
- package/docs/markdown/classes/MethodTemplateDirective.md +50 -86
- package/docs/markdown/classes/MovableDividerDirective.md +11 -71
- package/docs/markdown/classes/PreventDefaultDirective.md +3 -3
- package/docs/markdown/classes/ShareButtonDirective.md +9 -9
- package/docs/markdown/classes/ShareService.md +4 -4
- package/docs/markdown/classes/StopImmediatePropagationDirective.md +3 -3
- package/docs/markdown/classes/StopPropagationDirective.md +3 -3
- package/docs/markdown/enumerations/BackgroundPositionOptions.md +4 -4
- package/docs/markdown/enumerations/BackgroundRepeatOptions.md +3 -3
- package/docs/markdown/enumerations/BackgroundSizeOptions.md +5 -5
- package/docs/markdown/enumerations/GlobalStyleOptions.md +4 -4
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/ContenteditableEvent.md +4 -4
- package/docs/markdown/interfaces/IfTruthyDirectiveTemplateContext.md +3 -3
- package/docs/markdown/interfaces/MethodTemplateDirectiveContext.md +3 -3
- package/docs/markdown/interfaces/MethodTemplateDirectiveErrorContext.md +4 -4
- package/docs/markdown/interfaces/ShareData.md +6 -6
- package/docs/markdown/type-aliases/BackgroundPosition.md +2 -2
- package/docs/markdown/type-aliases/BackgroundRepeat.md +2 -2
- package/docs/markdown/type-aliases/BackgroundSize.md +2 -2
- package/docs/wiki/Class.AvatarBackgroundImageDirective.md +39 -102
- package/docs/wiki/Class.BackgroundImageDirective.md +23 -82
- package/docs/wiki/Class.ConfirmClick.md +7 -19
- package/docs/wiki/Class.ContenteditableDirective.md +20 -33
- package/docs/wiki/Class.FullWidthDirective.md +1 -9
- package/docs/wiki/Class.IfTruthyDirective.md +13 -70
- package/docs/wiki/Class.IsDevModeDirective.md +4 -16
- package/docs/wiki/Class.MethodDirective.md +39 -43
- package/docs/wiki/Class.MethodTemplateDirective.md +49 -85
- package/docs/wiki/Class.MovableDividerDirective.md +10 -70
- package/docs/wiki/Class.PreventDefaultDirective.md +2 -2
- package/docs/wiki/Class.ShareButtonDirective.md +8 -8
- package/docs/wiki/Class.ShareService.md +3 -3
- package/docs/wiki/Class.StopImmediatePropagationDirective.md +2 -2
- package/docs/wiki/Class.StopPropagationDirective.md +2 -2
- package/docs/wiki/Enumeration.BackgroundPositionOptions.md +3 -3
- package/docs/wiki/Enumeration.BackgroundRepeatOptions.md +2 -2
- package/docs/wiki/Enumeration.BackgroundSizeOptions.md +4 -4
- package/docs/wiki/Enumeration.GlobalStyleOptions.md +3 -3
- package/docs/wiki/Interface.ContenteditableEvent.md +3 -3
- package/docs/wiki/Interface.IfTruthyDirectiveTemplateContext.md +2 -2
- package/docs/wiki/Interface.MethodTemplateDirectiveContext.md +2 -2
- package/docs/wiki/Interface.MethodTemplateDirectiveErrorContext.md +3 -3
- package/docs/wiki/Interface.ShareData.md +5 -5
- package/docs/wiki/TypeAlias.BackgroundPosition.md +1 -1
- package/docs/wiki/TypeAlias.BackgroundRepeat.md +1 -1
- package/docs/wiki/TypeAlias.BackgroundSize.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-directives.mjs +291 -392
- package/fesm2022/rxap-directives.mjs.map +1 -1
- package/package.json +22 -17
- package/types/rxap-directives.d.ts +272 -0
- package/index.d.ts +0 -14
- package/lib/avatar-background-image.directive.d.ts +0 -14
- package/lib/background-image.directive.d.ts +0 -42
- package/lib/confirm-click.d.ts +0 -10
- package/lib/contenteditable.directive.d.ts +0 -21
- package/lib/full-width.directive.d.ts +0 -6
- package/lib/if-truthy.directive.d.ts +0 -28
- package/lib/is-dev-mode.directive.d.ts +0 -12
- package/lib/method-template.directive.d.ts +0 -46
- package/lib/method.directive.d.ts +0 -29
- package/lib/movable-divider.directive.d.ts +0 -28
- package/lib/prevent-default.directive.d.ts +0 -6
- package/lib/share-button.directive.d.ts +0 -25
- package/lib/stop-immediate-propagation.directive.d.ts +0 -6
- package/lib/stop-propagation.directive.d.ts +0 -6
|
@@ -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
|
-
|
|
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(
|
|
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="
|
|
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> <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="
|
|
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> <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="
|
|
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>"right" | "left"</code>
|
|
361
|
-
|
|
362
|
-
</td>
|
|
363
|
-
</tr>
|
|
364
|
-
<tr>
|
|
365
|
-
<td class="col-md-4">
|
|
366
|
-
<i>Default value : </i><code>'right'</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>'ew-resize'</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('mousedown')<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="
|
|
475
|
-
class="link-to-prism">src/lib/movable-divider.directive.ts:
|
|
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="
|
|
337
|
+
<a name="containerElement"></a>
|
|
502
338
|
<span class="name">
|
|
503
|
-
<span class="modifier"></span>
|
|
504
339
|
<span class="modifier">Public</span>
|
|
505
|
-
|
|
506
|
-
<
|
|
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
|
-
|
|
511
|
-
|
|
512
|
-
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
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
|
-
<
|
|
524
|
-
<br />
|
|
525
|
-
<code>
|
|
526
|
-
@HostBinding('style.cursor')<br />
|
|
527
|
-
</code>
|
|
392
|
+
<i>Default value : </i><code>input<'right' | 'left'>('right')</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="
|
|
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 '@angular/core';
|
|
556
|
-
import { Required } from '@rxap/utilities';
|
|
411
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, effect, inject, input, isDevMode, Renderer2 } from '@angular/core';
|
|
557
412
|
import {
|
|
558
413
|
fromEvent,
|
|
559
414
|
Subscription,
|
|
@@ -563,20 +418,21 @@ import { tap } from 'rxjs/operators';
|
|
|
563
418
|
@Directive({
|
|
564
419
|
selector: '[rxapMovableDivider]',
|
|
565
420
|
standalone: true,
|
|
421
|
+
host: {
|
|
422
|
+
style: 'cursor: ew-resize',
|
|
423
|
+
'(mousedown)': 'onMousedown()',
|
|
424
|
+
},
|
|
566
425
|
})
|
|
567
|
-
export class MovableDividerDirective
|
|
426
|
+
export class MovableDividerDirective {
|
|
427
|
+
private readonly renderer = inject(Renderer2);
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
public readonly containerElement = input.required<HTMLDivElement>();
|
|
568
431
|
|
|
569
|
-
|
|
570
|
-
public containerElement!: HTMLDivElement;
|
|
432
|
+
public readonly fixedElement = input.required<HTMLDivElement>();
|
|
571
433
|
|
|
572
|
-
|
|
573
|
-
public fixedElement!: HTMLDivElement;
|
|
434
|
+
public readonly origin = input<'right' | 'left'>('right');
|
|
574
435
|
|
|
575
|
-
@Input()
|
|
576
|
-
public origin: 'right' | 'left' = 'right';
|
|
577
|
-
@HostBinding('style.cursor')
|
|
578
|
-
public cursor = 'ew-resize';
|
|
579
|
-
private _subscription = 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 = null;
|
|
592
448
|
|
|
593
|
-
constructor(
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
449
|
+
constructor() {
|
|
450
|
+
effect((onCleanup) => {
|
|
451
|
+
const containerElement = this.containerElement();
|
|
452
|
+
const subscription = new Subscription();
|
|
453
|
+
onCleanup(() => subscription.unsubscribe());
|
|
454
|
+
this.listen(containerElement, subscription);
|
|
455
|
+
});
|
|
598
456
|
}
|
|
599
457
|
|
|
600
|
-
|
|
601
|
-
|
|
458
|
+
private listen(containerElement: HTMLDivElement, subscription: Subscription) {
|
|
459
|
+
subscription.add(fromEvent<MouseEvent>(containerElement, 'mousemove').pipe(
|
|
602
460
|
tap(($event: MouseEvent) => {
|
|
603
461
|
if (this._moveDivider) {
|
|
604
462
|
if (!this._fixedElementWidth) {
|
|
605
|
-
this._fixedElementWidth = this.fixedElement.clientWidth as number;
|
|
463
|
+
this._fixedElementWidth = this.fixedElement().clientWidth as number;
|
|
606
464
|
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
465
|
+
const origin = this.origin();
|
|
466
|
+
if (origin === 'right') {
|
|
467
|
+
this._fixedElementWidth = $event.clientX - this.containerElement().getBoundingClientRect().left;
|
|
468
|
+
} else if (origin === 'left') {
|
|
469
|
+
const containerElementValue = this.containerElement();
|
|
610
470
|
if (isDevMode()) {
|
|
611
471
|
console.log({
|
|
612
|
-
clientWidth:
|
|
472
|
+
clientWidth: containerElementValue.clientWidth,
|
|
613
473
|
clientX: $event.clientX,
|
|
614
|
-
clientLeft:
|
|
474
|
+
clientLeft: containerElementValue.getBoundingClientRect().left,
|
|
615
475
|
});
|
|
616
476
|
}
|
|
617
477
|
this._fixedElementWidth =
|
|
618
|
-
|
|
478
|
+
containerElementValue.clientWidth - $event.clientX + containerElementValue.getBoundingClientRect().left;
|
|
619
479
|
} else {
|
|
620
|
-
throw new Error(`The origin '${
|
|
480
|
+
throw new Error(`The origin '${ origin }' is not supported.`);
|
|
621
481
|
}
|
|
622
482
|
const width = this._fixedElementWidth + 'px';
|
|
623
|
-
|
|
624
|
-
this.renderer.setStyle(
|
|
625
|
-
this.renderer.setStyle(
|
|
483
|
+
const fixedElement = this.fixedElement();
|
|
484
|
+
this.renderer.setStyle(fixedElement, 'max-width', width);
|
|
485
|
+
this.renderer.setStyle(fixedElement, 'min-width', width);
|
|
486
|
+
this.renderer.setStyle(fixedElement, 'flex-basis', width);
|
|
626
487
|
}
|
|
627
488
|
}),
|
|
628
489
|
).subscribe());
|
|
629
|
-
|
|
490
|
+
subscription.add(fromEvent(containerElement, 'mouseup').pipe(
|
|
630
491
|
tap(() => this._moveDivider = false),
|
|
631
492
|
).subscribe());
|
|
632
493
|
}
|
|
633
494
|
|
|
634
|
-
@HostListener('mousedown')
|
|
635
495
|
public onMousedown() {
|
|
636
496
|
this._moveDivider = 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('click', ['$event'])<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="
|
|
262
|
-
class="link-to-prism">src/lib/prevent-default.directive.ts:
|
|
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 '@angular/core';
|
|
261
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive } from '@angular/core';
|
|
319
262
|
|
|
320
263
|
@Directive({
|
|
321
264
|
selector: '[rxapPreventDefault]',
|
|
322
265
|
standalone: true,
|
|
266
|
+
host: {
|
|
267
|
+
'(click)': 'onClick($event)',
|
|
268
|
+
},
|
|
323
269
|
})
|
|
324
270
|
export class PreventDefaultDirective {
|
|
325
|
-
|
|
326
|
-
@HostListener('click', [ '$event' ])
|
|
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
|
|