@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.
- package/CHANGELOG.md +39 -0
- package/compodoc/changelog.html +37 -0
- package/compodoc/dependencies.html +4 -4
- 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 +2432 -3183
- 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 -101
- package/docs/markdown/classes/BackgroundImageDirective.md +24 -81
- 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 -69
- package/docs/markdown/classes/IsDevModeDirective.md +5 -17
- package/docs/markdown/classes/MethodDirective.md +40 -44
- package/docs/markdown/classes/MethodTemplateDirective.md +50 -84
- 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 -100
- package/docs/wiki/Class.BackgroundImageDirective.md +23 -80
- 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 -68
- package/docs/wiki/Class.IsDevModeDirective.md +4 -16
- package/docs/wiki/Class.MethodDirective.md +39 -43
- package/docs/wiki/Class.MethodTemplateDirective.md +49 -83
- 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 +259 -360
- package/fesm2022/rxap-directives.mjs.map +1 -1
- package/package.json +9 -9
- package/types/rxap-directives.d.ts +104 -102
|
@@ -156,14 +156,29 @@
|
|
|
156
156
|
<td class="col-md-4">
|
|
157
157
|
<ul class="index-list">
|
|
158
158
|
<li>
|
|
159
|
-
<span class="modifier"></span>
|
|
160
159
|
<span class="modifier">Public</span>
|
|
161
|
-
|
|
160
|
+
<span class="modifier">Readonly</span>
|
|
161
|
+
<a href="#change" >change</a>
|
|
162
|
+
</li>
|
|
163
|
+
<li>
|
|
164
|
+
<span class="modifier">Public</span>
|
|
165
|
+
<span class="modifier">Readonly</span>
|
|
166
|
+
<a href="#initial" >initial</a>
|
|
162
167
|
</li>
|
|
163
168
|
<li>
|
|
164
|
-
<span class="modifier"></span>
|
|
165
169
|
<span class="modifier">Public</span>
|
|
166
|
-
|
|
170
|
+
<span class="modifier">Readonly</span>
|
|
171
|
+
<a href="#initialValue" >initialValue</a>
|
|
172
|
+
</li>
|
|
173
|
+
<li>
|
|
174
|
+
<span class="modifier">Public</span>
|
|
175
|
+
<span class="modifier">Readonly</span>
|
|
176
|
+
<a href="#method" >method</a>
|
|
177
|
+
</li>
|
|
178
|
+
<li>
|
|
179
|
+
<span class="modifier">Public</span>
|
|
180
|
+
<span class="modifier">Readonly</span>
|
|
181
|
+
<a href="#parameters" >parameters</a>
|
|
167
182
|
</li>
|
|
168
183
|
</ul>
|
|
169
184
|
</td>
|
|
@@ -178,12 +193,10 @@
|
|
|
178
193
|
<td class="col-md-4">
|
|
179
194
|
<ul class="index-list">
|
|
180
195
|
<li>
|
|
181
|
-
<span class="modifier"></span>
|
|
182
196
|
<span class="modifier">Public</span>
|
|
183
197
|
<a href="#onClick" >onClick</a>
|
|
184
198
|
</li>
|
|
185
199
|
<li>
|
|
186
|
-
<span class="modifier"></span>
|
|
187
200
|
<span class="modifier"></span>
|
|
188
201
|
<span class="modifier">Public</span>
|
|
189
202
|
<span class="modifier">Async</span>
|
|
@@ -201,146 +214,23 @@
|
|
|
201
214
|
<tr>
|
|
202
215
|
<td class="col-md-4">
|
|
203
216
|
<ul class="index-list">
|
|
204
|
-
<li>
|
|
205
|
-
<a href="#initial" >initial</a>
|
|
206
|
-
</li>
|
|
207
217
|
<li>
|
|
208
218
|
<a href="#parameters" >parameters</a>
|
|
209
219
|
</li>
|
|
210
|
-
<li>
|
|
211
|
-
<a href="#rxapContenteditable" >rxapContenteditable</a>
|
|
212
|
-
</li>
|
|
213
220
|
</ul>
|
|
214
221
|
</td>
|
|
215
222
|
</tr>
|
|
216
223
|
|
|
217
|
-
<tr>
|
|
218
|
-
<td class="col-md-4">
|
|
219
|
-
<h6><b>Outputs</b></h6>
|
|
220
|
-
</td>
|
|
221
|
-
</tr>
|
|
222
|
-
<tr>
|
|
223
|
-
<td class="col-md-4">
|
|
224
|
-
<ul class="index-list">
|
|
225
|
-
<li>
|
|
226
|
-
<a href="#rxapContenteditable" >rxapContenteditable</a>
|
|
227
|
-
</li>
|
|
228
|
-
</ul>
|
|
229
|
-
</td>
|
|
230
|
-
</tr>
|
|
231
224
|
|
|
232
|
-
<tr>
|
|
233
|
-
<td class="col-md-4">
|
|
234
|
-
<h6><b>HostBindings</b></h6>
|
|
235
|
-
</td>
|
|
236
|
-
</tr>
|
|
237
|
-
<tr>
|
|
238
|
-
<td class="col-md-4">
|
|
239
|
-
<ul class="index-list">
|
|
240
|
-
<li>
|
|
241
|
-
<a href="#attr.contenteditable" >attr.contenteditable</a>
|
|
242
|
-
</li>
|
|
243
|
-
<li>
|
|
244
|
-
<a href="#attr.spellcheck" >attr.spellcheck</a>
|
|
245
|
-
</li>
|
|
246
|
-
</ul>
|
|
247
|
-
</td>
|
|
248
|
-
</tr>
|
|
249
225
|
|
|
250
|
-
<tr>
|
|
251
|
-
<td class="col-md-4">
|
|
252
|
-
<h6><b>HostListeners</b></h6>
|
|
253
|
-
</td>
|
|
254
|
-
</tr>
|
|
255
|
-
<tr>
|
|
256
|
-
<td class="col-md-4">
|
|
257
|
-
<ul class="index-list">
|
|
258
|
-
<li>
|
|
259
|
-
<a href="#click" >click</a>
|
|
260
|
-
</li>
|
|
261
|
-
<li>
|
|
262
|
-
<a href="#input" >input</a>
|
|
263
|
-
</li>
|
|
264
|
-
</ul>
|
|
265
|
-
</td>
|
|
266
|
-
</tr>
|
|
267
226
|
|
|
268
227
|
</tbody>
|
|
269
228
|
</table>
|
|
270
229
|
</section>
|
|
271
230
|
|
|
272
|
-
<section data-compodoc="block-constructor">
|
|
273
|
-
<h3 id="constructor">Constructor</h3>
|
|
274
|
-
<table class="table table-sm table-bordered">
|
|
275
|
-
<tbody>
|
|
276
|
-
<tr>
|
|
277
|
-
<td class="col-md-4">
|
|
278
|
-
<code>constructor(elementRef: ElementRef)</code>
|
|
279
|
-
</td>
|
|
280
|
-
</tr>
|
|
281
|
-
<tr>
|
|
282
|
-
<td class="col-md-4">
|
|
283
|
-
<div class="io-line">Defined in <a href="" data-line="41" class="link-to-prism">src/lib/contenteditable.directive.ts:41</a></div>
|
|
284
|
-
</td>
|
|
285
|
-
</tr>
|
|
286
|
-
|
|
287
|
-
<tr>
|
|
288
|
-
<td class="col-md-4">
|
|
289
|
-
<div>
|
|
290
|
-
<b>Parameters :</b>
|
|
291
|
-
<table class="params">
|
|
292
|
-
<thead>
|
|
293
|
-
<tr>
|
|
294
|
-
<td>Name</td>
|
|
295
|
-
<td>Type</td>
|
|
296
|
-
<td>Optional</td>
|
|
297
|
-
</tr>
|
|
298
|
-
</thead>
|
|
299
|
-
<tbody>
|
|
300
|
-
<tr>
|
|
301
|
-
<td>elementRef</td>
|
|
302
|
-
|
|
303
|
-
<td>
|
|
304
|
-
<code>ElementRef</code>
|
|
305
|
-
</td>
|
|
306
|
-
|
|
307
|
-
<td>
|
|
308
|
-
No
|
|
309
|
-
</td>
|
|
310
|
-
|
|
311
|
-
</tr>
|
|
312
|
-
</tbody>
|
|
313
|
-
</table>
|
|
314
|
-
</div>
|
|
315
|
-
</td>
|
|
316
|
-
</tr>
|
|
317
|
-
</tbody>
|
|
318
|
-
</table>
|
|
319
|
-
</section>
|
|
320
231
|
|
|
321
232
|
<section data-compodoc="block-inputs">
|
|
322
233
|
<h3 id="inputs">Inputs</h3>
|
|
323
|
-
<table class="table table-sm table-bordered">
|
|
324
|
-
<tbody>
|
|
325
|
-
<tr>
|
|
326
|
-
<td class="col-md-4">
|
|
327
|
-
<a name="initial"></a>
|
|
328
|
-
<b>initial</b>
|
|
329
|
-
</td>
|
|
330
|
-
</tr>
|
|
331
|
-
<tr>
|
|
332
|
-
<td class="col-md-4">
|
|
333
|
-
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
|
|
334
|
-
|
|
335
|
-
</td>
|
|
336
|
-
</tr>
|
|
337
|
-
<tr>
|
|
338
|
-
<td class="col-md-2" colspan="2">
|
|
339
|
-
<div class="io-line">Defined in <a href="" data-line="41" class="link-to-prism">src/lib/contenteditable.directive.ts:41</a></div>
|
|
340
|
-
</td>
|
|
341
|
-
</tr>
|
|
342
|
-
</tbody>
|
|
343
|
-
</table>
|
|
344
234
|
<table class="table table-sm table-bordered">
|
|
345
235
|
<tbody>
|
|
346
236
|
<tr>
|
|
@@ -348,193 +238,18 @@
|
|
|
348
238
|
<a name="parameters"></a>
|
|
349
239
|
<b>parameters</b>
|
|
350
240
|
</td>
|
|
351
|
-
</tr>
|
|
352
|
-
<tr>
|
|
353
|
-
<td class="col-md-4">
|
|
354
|
-
<i>Type : </i> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
|
|
355
|
-
|
|
356
|
-
</td>
|
|
357
|
-
</tr>
|
|
358
|
-
<tr>
|
|
359
|
-
<td class="col-md-2" colspan="2">
|
|
360
|
-
<div class="io-line">Defined in <a href="" data-line="38" class="link-to-prism">src/lib/contenteditable.directive.ts:38</a></div>
|
|
361
|
-
</td>
|
|
362
|
-
</tr>
|
|
363
|
-
</tbody>
|
|
364
|
-
</table>
|
|
365
|
-
<table class="table table-sm table-bordered">
|
|
366
|
-
<tbody>
|
|
367
|
-
<tr>
|
|
368
|
-
<td class="col-md-4">
|
|
369
|
-
<a name="rxapContenteditable"></a>
|
|
370
|
-
<b>rxapContenteditable</b>
|
|
371
|
-
</td>
|
|
372
|
-
</tr>
|
|
373
|
-
<tr>
|
|
374
|
-
<td class="col-md-4">
|
|
375
|
-
<i>Type : </i> <code><a href="../interfaces/ContenteditableEvent.html" target="_self" >Method<any | ContenteditableEvent></a></code>
|
|
376
|
-
|
|
377
|
-
</td>
|
|
378
241
|
</tr>
|
|
379
242
|
<tr>
|
|
380
243
|
<td class="col-md-2" colspan="2">
|
|
381
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
244
|
+
<div class="io-line">Defined in <a href="" data-line="29" class="link-to-prism">src/lib/contenteditable.directive.ts:29</a></div>
|
|
382
245
|
</td>
|
|
383
246
|
</tr>
|
|
384
247
|
</tbody>
|
|
385
248
|
</table>
|
|
386
249
|
</section>
|
|
387
|
-
<section data-compodoc="block-outputs">
|
|
388
|
-
<h3 id="outputs">Outputs</h3>
|
|
389
|
-
<table class="table table-sm table-bordered">
|
|
390
|
-
<tbody>
|
|
391
|
-
<tr>
|
|
392
|
-
<td class="col-md-4">
|
|
393
|
-
<a name="rxapContenteditable"></a>
|
|
394
|
-
<b>rxapContenteditable</b>
|
|
395
|
-
</td>
|
|
396
|
-
</tr>
|
|
397
|
-
<tr>
|
|
398
|
-
<td class="col-md-4">
|
|
399
|
-
<i>Type : </i> <code>EventEmitter</code>
|
|
400
|
-
|
|
401
|
-
</td>
|
|
402
|
-
</tr>
|
|
403
|
-
<tr>
|
|
404
|
-
<td class="col-md-2" colspan="2">
|
|
405
|
-
<div class="io-line">Defined in <a href="" data-line="35" class="link-to-prism">src/lib/contenteditable.directive.ts:35</a></div>
|
|
406
|
-
</td>
|
|
407
|
-
</tr>
|
|
408
|
-
</tbody>
|
|
409
|
-
</table>
|
|
410
|
-
</section>
|
|
411
|
-
<section data-compodoc="block-properties">
|
|
412
|
-
<h3>HostBindings</h3> <table class="table table-sm table-bordered">
|
|
413
|
-
<tbody>
|
|
414
|
-
<tr>
|
|
415
|
-
<td class="col-md-4">
|
|
416
|
-
<a name="attr.contenteditable"></a>
|
|
417
|
-
<span class="name">
|
|
418
|
-
<span ><b>attr.contenteditable</b></span>
|
|
419
|
-
<a href="#attr.contenteditable"><span class="icon ion-ios-link"></span></a>
|
|
420
|
-
</span>
|
|
421
|
-
</td>
|
|
422
|
-
</tr>
|
|
423
|
-
<tr>
|
|
424
|
-
<td class="col-md-4">
|
|
425
|
-
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
426
|
-
|
|
427
|
-
</td>
|
|
428
|
-
</tr>
|
|
429
|
-
<tr>
|
|
430
|
-
<td class="col-md-4">
|
|
431
|
-
<i>Default value : </i><code>true</code>
|
|
432
|
-
</td>
|
|
433
|
-
</tr>
|
|
434
|
-
<tr>
|
|
435
|
-
<td class="col-md-4">
|
|
436
|
-
<div class="io-line">Defined in <a href="" data-line="25" class="link-to-prism">src/lib/contenteditable.directive.ts:25</a></div>
|
|
437
|
-
</td>
|
|
438
|
-
</tr>
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
</tbody>
|
|
442
|
-
</table>
|
|
443
|
-
<table class="table table-sm table-bordered">
|
|
444
|
-
<tbody>
|
|
445
|
-
<tr>
|
|
446
|
-
<td class="col-md-4">
|
|
447
|
-
<a name="attr.spellcheck"></a>
|
|
448
|
-
<span class="name">
|
|
449
|
-
<span ><b>attr.spellcheck</b></span>
|
|
450
|
-
<a href="#attr.spellcheck"><span class="icon ion-ios-link"></span></a>
|
|
451
|
-
</span>
|
|
452
|
-
</td>
|
|
453
|
-
</tr>
|
|
454
|
-
<tr>
|
|
455
|
-
<td class="col-md-4">
|
|
456
|
-
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
457
|
-
|
|
458
|
-
</td>
|
|
459
|
-
</tr>
|
|
460
|
-
<tr>
|
|
461
|
-
<td class="col-md-4">
|
|
462
|
-
<i>Default value : </i><code>false</code>
|
|
463
|
-
</td>
|
|
464
|
-
</tr>
|
|
465
|
-
<tr>
|
|
466
|
-
<td class="col-md-4">
|
|
467
|
-
<div class="io-line">Defined in <a href="" data-line="28" class="link-to-prism">src/lib/contenteditable.directive.ts:28</a></div>
|
|
468
|
-
</td>
|
|
469
|
-
</tr>
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
</tbody>
|
|
473
|
-
</table>
|
|
474
|
-
</section>
|
|
475
|
-
|
|
476
|
-
<section data-compodoc="block-host-listener">
|
|
477
|
-
<h3>HostListeners</h3> <table class="table table-sm table-bordered">
|
|
478
|
-
<tbody>
|
|
479
|
-
<tr>
|
|
480
|
-
<td class="col-md-4">
|
|
481
|
-
<a name="click"></a>
|
|
482
|
-
<span class="name">
|
|
483
|
-
<b>
|
|
484
|
-
click
|
|
485
|
-
</b>
|
|
486
|
-
<a href="#click"><span class="icon ion-ios-link"></span></a>
|
|
487
|
-
</span>
|
|
488
|
-
</td>
|
|
489
|
-
</tr>
|
|
490
|
-
<tr>
|
|
491
|
-
<td class="col-md-4">
|
|
492
|
-
<i>Arguments : </i><code>'$event' </code>
|
|
493
|
-
</td>
|
|
494
|
-
</tr>
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
<tr>
|
|
498
|
-
<td class="col-md-4">
|
|
499
|
-
<div class="io-line">Defined in <a href="" data-line="47"
|
|
500
|
-
class="link-to-prism">src/lib/contenteditable.directive.ts:47</a></div>
|
|
501
|
-
</td>
|
|
502
|
-
</tr>
|
|
503
250
|
|
|
504
251
|
|
|
505
|
-
</tbody>
|
|
506
|
-
</table>
|
|
507
|
-
<table class="table table-sm table-bordered">
|
|
508
|
-
<tbody>
|
|
509
|
-
<tr>
|
|
510
|
-
<td class="col-md-4">
|
|
511
|
-
<a name="input"></a>
|
|
512
|
-
<span class="name">
|
|
513
|
-
<b>
|
|
514
|
-
input
|
|
515
|
-
</b>
|
|
516
|
-
<a href="#input"><span class="icon ion-ios-link"></span></a>
|
|
517
|
-
</span>
|
|
518
|
-
</td>
|
|
519
|
-
</tr>
|
|
520
|
-
<tr>
|
|
521
|
-
<td class="col-md-4">
|
|
522
|
-
<i>Arguments : </i><code>'$event' </code>
|
|
523
|
-
</td>
|
|
524
|
-
</tr>
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
<tr>
|
|
528
|
-
<td class="col-md-4">
|
|
529
|
-
<div class="io-line">Defined in <a href="" data-line="53"
|
|
530
|
-
class="link-to-prism">src/lib/contenteditable.directive.ts:53</a></div>
|
|
531
|
-
</td>
|
|
532
|
-
</tr>
|
|
533
|
-
|
|
534
252
|
|
|
535
|
-
</tbody>
|
|
536
|
-
</table>
|
|
537
|
-
</section>
|
|
538
253
|
<section data-compodoc="block-methods">
|
|
539
254
|
|
|
540
255
|
<h3 id="methods">
|
|
@@ -546,7 +261,6 @@
|
|
|
546
261
|
<td class="col-md-4">
|
|
547
262
|
<a name="onClick"></a>
|
|
548
263
|
<span class="name">
|
|
549
|
-
<span class="modifier"></span>
|
|
550
264
|
<span class="modifier">Public</span>
|
|
551
265
|
<span ><b>onClick</b></span>
|
|
552
266
|
<a href="#onClick"><span class="icon ion-ios-link"></span></a>
|
|
@@ -560,18 +274,11 @@
|
|
|
560
274
|
</td>
|
|
561
275
|
</tr>
|
|
562
276
|
|
|
563
|
-
<tr>
|
|
564
|
-
<td class="col-md-4">
|
|
565
|
-
<b>Decorators : </b>
|
|
566
|
-
<br />
|
|
567
|
-
<code>@HostListener('click', ['$event'])<br /></code>
|
|
568
|
-
</td>
|
|
569
|
-
</tr>
|
|
570
277
|
|
|
571
278
|
<tr>
|
|
572
279
|
<td class="col-md-4">
|
|
573
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
574
|
-
class="link-to-prism">src/lib/contenteditable.directive.ts:
|
|
280
|
+
<div class="io-line">Defined in <a href="" data-line="39"
|
|
281
|
+
class="link-to-prism">src/lib/contenteditable.directive.ts:39</a></div>
|
|
575
282
|
</td>
|
|
576
283
|
</tr>
|
|
577
284
|
|
|
@@ -623,7 +330,6 @@
|
|
|
623
330
|
<td class="col-md-4">
|
|
624
331
|
<a name="onInput"></a>
|
|
625
332
|
<span class="name">
|
|
626
|
-
<span class="modifier"></span>
|
|
627
333
|
<span class="modifier"></span>
|
|
628
334
|
<span class="modifier">Public</span>
|
|
629
335
|
<span class="modifier">Async</span>
|
|
@@ -643,14 +349,14 @@
|
|
|
643
349
|
<td class="col-md-4">
|
|
644
350
|
<b>Decorators : </b>
|
|
645
351
|
<br />
|
|
646
|
-
<code>@
|
|
352
|
+
<code>@DebounceCall(1000)<br /></code>
|
|
647
353
|
</td>
|
|
648
354
|
</tr>
|
|
649
355
|
|
|
650
356
|
<tr>
|
|
651
357
|
<td class="col-md-4">
|
|
652
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
653
|
-
class="link-to-prism">src/lib/contenteditable.directive.ts:
|
|
358
|
+
<div class="io-line">Defined in <a href="" data-line="44"
|
|
359
|
+
class="link-to-prism">src/lib/contenteditable.directive.ts:44</a></div>
|
|
654
360
|
</td>
|
|
655
361
|
</tr>
|
|
656
362
|
|
|
@@ -706,35 +412,60 @@
|
|
|
706
412
|
<tbody>
|
|
707
413
|
<tr>
|
|
708
414
|
<td class="col-md-4">
|
|
709
|
-
<a name="
|
|
415
|
+
<a name="change"></a>
|
|
710
416
|
<span class="name">
|
|
711
|
-
<span class="modifier"></span>
|
|
712
417
|
<span class="modifier">Public</span>
|
|
713
|
-
|
|
714
|
-
<
|
|
418
|
+
<span class="modifier">Readonly</span>
|
|
419
|
+
<span ><b>change</b></span>
|
|
420
|
+
<a href="#change"><span class="icon ion-ios-link"></span></a>
|
|
715
421
|
</span>
|
|
716
422
|
</td>
|
|
717
423
|
</tr>
|
|
718
424
|
<tr>
|
|
719
425
|
<td class="col-md-4">
|
|
720
|
-
<i>Default value : </i><code>
|
|
426
|
+
<i>Default value : </i><code>output<ContenteditableEvent>({ alias: 'rxapContenteditable' })</code>
|
|
721
427
|
</td>
|
|
722
428
|
</tr>
|
|
429
|
+
<tr>
|
|
430
|
+
<td class="col-md-4">
|
|
431
|
+
<div class="io-line">Defined in <a href="" data-line="27" class="link-to-prism">src/lib/contenteditable.directive.ts:27</a></div>
|
|
432
|
+
</td>
|
|
433
|
+
</tr>
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
</tbody>
|
|
437
|
+
</table>
|
|
438
|
+
<table class="table table-sm table-bordered">
|
|
439
|
+
<tbody>
|
|
440
|
+
<tr>
|
|
441
|
+
<td class="col-md-4">
|
|
442
|
+
<a name="initial"></a>
|
|
443
|
+
<span class="name">
|
|
444
|
+
<span class="modifier">Public</span>
|
|
445
|
+
<span class="modifier">Readonly</span>
|
|
446
|
+
<span ><b>initial</b></span>
|
|
447
|
+
<a href="#initial"><span class="icon ion-ios-link"></span></a>
|
|
448
|
+
</span>
|
|
449
|
+
</td>
|
|
450
|
+
</tr>
|
|
723
451
|
<tr>
|
|
724
452
|
<td class="col-md-4">
|
|
725
|
-
<
|
|
726
|
-
<br />
|
|
727
|
-
<code>
|
|
728
|
-
@HostBinding('attr.contenteditable')<br />
|
|
729
|
-
</code>
|
|
453
|
+
<i>Default value : </i><code>linkedSignal(() => this.initialValue())</code>
|
|
730
454
|
</td>
|
|
731
455
|
</tr>
|
|
732
456
|
<tr>
|
|
733
457
|
<td class="col-md-4">
|
|
734
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
458
|
+
<div class="io-line">Defined in <a href="" data-line="37" class="link-to-prism">src/lib/contenteditable.directive.ts:37</a></div>
|
|
735
459
|
</td>
|
|
736
460
|
</tr>
|
|
737
461
|
|
|
462
|
+
<tr>
|
|
463
|
+
<td class="col-md-4">
|
|
464
|
+
<div class="io-description"><p>The last known good value. Follows the bound <code>initial</code> input and is
|
|
465
|
+
updated after a successful save.</p>
|
|
466
|
+
</div>
|
|
467
|
+
</td>
|
|
468
|
+
</tr>
|
|
738
469
|
|
|
739
470
|
</tbody>
|
|
740
471
|
</table>
|
|
@@ -742,32 +473,72 @@
|
|
|
742
473
|
<tbody>
|
|
743
474
|
<tr>
|
|
744
475
|
<td class="col-md-4">
|
|
745
|
-
<a name="
|
|
476
|
+
<a name="initialValue"></a>
|
|
746
477
|
<span class="name">
|
|
747
|
-
<span class="modifier"></span>
|
|
748
478
|
<span class="modifier">Public</span>
|
|
749
|
-
|
|
750
|
-
<
|
|
479
|
+
<span class="modifier">Readonly</span>
|
|
480
|
+
<span ><b>initialValue</b></span>
|
|
481
|
+
<a href="#initialValue"><span class="icon ion-ios-link"></span></a>
|
|
751
482
|
</span>
|
|
752
483
|
</td>
|
|
753
484
|
</tr>
|
|
754
485
|
<tr>
|
|
755
486
|
<td class="col-md-4">
|
|
756
|
-
<i>Default value : </i><code>
|
|
487
|
+
<i>Default value : </i><code>input<string>(undefined, { alias: 'initial' })</code>
|
|
757
488
|
</td>
|
|
758
489
|
</tr>
|
|
490
|
+
<tr>
|
|
491
|
+
<td class="col-md-4">
|
|
492
|
+
<div class="io-line">Defined in <a href="" data-line="31" class="link-to-prism">src/lib/contenteditable.directive.ts:31</a></div>
|
|
493
|
+
</td>
|
|
494
|
+
</tr>
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
</tbody>
|
|
498
|
+
</table>
|
|
499
|
+
<table class="table table-sm table-bordered">
|
|
500
|
+
<tbody>
|
|
501
|
+
<tr>
|
|
502
|
+
<td class="col-md-4">
|
|
503
|
+
<a name="method"></a>
|
|
504
|
+
<span class="name">
|
|
505
|
+
<span class="modifier">Public</span>
|
|
506
|
+
<span class="modifier">Readonly</span>
|
|
507
|
+
<span ><b>method</b></span>
|
|
508
|
+
<a href="#method"><span class="icon ion-ios-link"></span></a>
|
|
509
|
+
</span>
|
|
510
|
+
</td>
|
|
511
|
+
</tr>
|
|
759
512
|
<tr>
|
|
760
513
|
<td class="col-md-4">
|
|
761
|
-
<
|
|
762
|
-
<br />
|
|
763
|
-
<code>
|
|
764
|
-
@HostBinding('attr.spellcheck')<br />
|
|
765
|
-
</code>
|
|
514
|
+
<i>Default value : </i><code>input<Method<any, ContenteditableEvent>>(undefined, { alias: "rxapContenteditable" })</code>
|
|
766
515
|
</td>
|
|
767
516
|
</tr>
|
|
768
517
|
<tr>
|
|
769
518
|
<td class="col-md-4">
|
|
770
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
519
|
+
<div class="io-line">Defined in <a href="" data-line="24" class="link-to-prism">src/lib/contenteditable.directive.ts:24</a></div>
|
|
520
|
+
</td>
|
|
521
|
+
</tr>
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
</tbody>
|
|
525
|
+
</table>
|
|
526
|
+
<table class="table table-sm table-bordered">
|
|
527
|
+
<tbody>
|
|
528
|
+
<tr>
|
|
529
|
+
<td class="col-md-4">
|
|
530
|
+
<a name="parameters"></a>
|
|
531
|
+
<span class="name">
|
|
532
|
+
<span class="modifier">Public</span>
|
|
533
|
+
<span class="modifier">Readonly</span>
|
|
534
|
+
<span ><b>parameters</b></span>
|
|
535
|
+
<a href="#parameters"><span class="icon ion-ios-link"></span></a>
|
|
536
|
+
</span>
|
|
537
|
+
</td>
|
|
538
|
+
</tr>
|
|
539
|
+
<tr>
|
|
540
|
+
<td class="col-md-4">
|
|
541
|
+
<div class="io-line">Defined in <a href="" data-line="29" class="link-to-prism">src/lib/contenteditable.directive.ts:29</a></div>
|
|
771
542
|
</td>
|
|
772
543
|
</tr>
|
|
773
544
|
|
|
@@ -781,15 +552,7 @@
|
|
|
781
552
|
|
|
782
553
|
|
|
783
554
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
784
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
785
|
-
Directive,
|
|
786
|
-
ElementRef,
|
|
787
|
-
EventEmitter,
|
|
788
|
-
HostBinding,
|
|
789
|
-
HostListener,
|
|
790
|
-
Input,
|
|
791
|
-
Output,
|
|
792
|
-
} from '@angular/core';
|
|
555
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, ElementRef, input, linkedSignal, output, inject } from '@angular/core';
|
|
793
556
|
import { DebounceCall } from '@rxap/utilities';
|
|
794
557
|
import { Method } from '@rxap/pattern';
|
|
795
558
|
|
|
@@ -801,60 +564,61 @@ export interface ContenteditableEvent {
|
|
|
801
564
|
@Directive({
|
|
802
565
|
selector: '[rxapContenteditable]',
|
|
803
566
|
standalone: true,
|
|
567
|
+
host: {
|
|
568
|
+
'[attr.contenteditable]': 'true',
|
|
569
|
+
'[attr.spellcheck]': 'false',
|
|
570
|
+
'(click)': 'onClick($event)',
|
|
571
|
+
'(input)': 'onInput($event)',
|
|
572
|
+
},
|
|
804
573
|
})
|
|
805
574
|
export class ContenteditableDirective {
|
|
575
|
+
private readonly elementRef = inject(ElementRef);
|
|
806
576
|
|
|
807
|
-
@HostBinding('attr.contenteditable')
|
|
808
|
-
public contenteditable = true;
|
|
809
577
|
|
|
810
|
-
|
|
811
|
-
public spellcheck = false;
|
|
578
|
+
public readonly method = input<Method<any, ContenteditableEvent>>(undefined, { alias: "rxapContenteditable" });
|
|
812
579
|
|
|
813
|
-
@Input('rxapContenteditable')
|
|
814
|
-
public method?: Method<any, ContenteditableEvent>;
|
|
815
|
-
|
|
816
|
-
@Output('rxapContenteditable')
|
|
817
580
|
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
818
|
-
public change =
|
|
581
|
+
public readonly change = output<ContenteditableEvent>({ alias: 'rxapContenteditable' });
|
|
819
582
|
|
|
820
|
-
|
|
821
|
-
public parameters?: any;
|
|
583
|
+
public readonly parameters = input<any>();
|
|
822
584
|
|
|
823
|
-
|
|
824
|
-
public initial?: string;
|
|
585
|
+
public readonly initialValue = input<string>(undefined, { alias: 'initial' });
|
|
825
586
|
|
|
826
|
-
|
|
827
|
-
|
|
587
|
+
/**
|
|
588
|
+
* The last known good value. Follows the bound `initial` input and is
|
|
589
|
+
* updated after a successful save.
|
|
590
|
+
*/
|
|
591
|
+
public readonly initial = linkedSignal(() => this.initialValue());
|
|
828
592
|
|
|
829
|
-
@HostListener('click', [ '$event' ])
|
|
830
593
|
public onClick($event: Event) {
|
|
831
594
|
$event.stopPropagation();
|
|
832
595
|
}
|
|
833
596
|
|
|
834
|
-
@HostListener('input', [ '$event' ])
|
|
835
597
|
@DebounceCall(1000)
|
|
836
598
|
public async onInput($event: any) {
|
|
837
599
|
const value = (($event.target as HTMLElement).textContent)?.trim();
|
|
838
600
|
if (value && value.length >= 2) {
|
|
839
601
|
const event: ContenteditableEvent = {
|
|
840
602
|
value,
|
|
841
|
-
parameters: this.parameters,
|
|
603
|
+
parameters: this.parameters(),
|
|
842
604
|
};
|
|
843
605
|
this.change.emit(event);
|
|
844
606
|
try {
|
|
845
|
-
const result = await this.method?.call(event);
|
|
607
|
+
const result = await this.method()?.call(event);
|
|
846
608
|
if (result && typeof result === 'string') {
|
|
847
609
|
// the handler returned a canonical value - apply and remember it
|
|
848
|
-
this.
|
|
610
|
+
this.elementRef.nativeElement.innerText = result;
|
|
611
|
+
this.initial.set(result);
|
|
849
612
|
} else {
|
|
850
613
|
// successful save without a return value - keep the user's text and
|
|
851
614
|
// update the baseline (do NOT revert what was just typed)
|
|
852
|
-
this.initial
|
|
615
|
+
this.initial.set(value);
|
|
853
616
|
}
|
|
854
617
|
} catch {
|
|
855
618
|
// the save failed - revert to the last known good value if available
|
|
856
|
-
|
|
857
|
-
|
|
619
|
+
const initial = this.initial();
|
|
620
|
+
if (initial) {
|
|
621
|
+
this.elementRef.nativeElement.innerText = initial;
|
|
858
622
|
}
|
|
859
623
|
}
|
|
860
624
|
}
|