@rxap/material-form-system 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 +42 -0
- package/compodoc/changelog.html +40 -0
- package/compodoc/classes/ExtractHideShowMixin.html +14 -28
- package/compodoc/classes/RecordViewTuple.html +9 -23
- package/compodoc/components/FormControlsComponent.html +146 -352
- package/compodoc/dependencies.html +5 -5
- package/compodoc/directives/ChipInputAdapterDirective.html +7 -53
- package/compodoc/directives/ChipListIteratorDirective.html +8 -106
- package/compodoc/directives/CompareWithDirective.html +44 -90
- package/compodoc/directives/ControlErrorDirective.html +150 -151
- package/compodoc/directives/ControlErrorsDirective.html +123 -109
- package/compodoc/directives/FormFieldHideShowDirective.html +11 -97
- package/compodoc/directives/InputClearButtonDirective.html +15 -251
- package/compodoc/directives/RequiredDirective.html +2 -58
- package/compodoc/graph/dependencies.svg +15 -153
- package/compodoc/interfaces/ChipListTemplateContext.html +6 -20
- package/compodoc/interfaces/ControlErrorDirectiveContext.html +8 -28
- package/compodoc/interfaces/ControlErrorsDirectiveContext.html +6 -21
- package/compodoc/js/menu-wc.js +0 -41
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/modules.html +0 -17
- package/compodoc/overview.html +1 -185
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +774 -1578
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/ChipInputAdapterDirective.html +4 -4
- package/docs/html/classes/ChipListIteratorDirective.html +4 -4
- package/docs/html/classes/CompareWithDirective.html +3 -3
- package/docs/html/classes/ControlErrorDirective.html +4 -4
- package/docs/html/classes/ControlErrorsDirective.html +4 -4
- package/docs/html/classes/ExtractHideShowMixin.html +2 -2
- package/docs/html/classes/FormControlsComponent.html +6 -7
- package/docs/html/classes/FormFieldHideShowDirective.html +5 -5
- package/docs/html/classes/InputClearButtonDirective.html +2 -2
- package/docs/html/classes/RequiredDirective.html +3 -3
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/ChipListTemplateContext.html +2 -2
- package/docs/html/interfaces/ControlErrorDirectiveContext.html +2 -2
- package/docs/html/interfaces/ControlErrorsDirectiveContext.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ChipInputAdapterDirective.md +6 -16
- package/docs/markdown/classes/ChipListIteratorDirective.md +6 -26
- package/docs/markdown/classes/CompareWithDirective.md +6 -14
- package/docs/markdown/classes/ControlErrorDirective.md +12 -32
- package/docs/markdown/classes/ControlErrorsDirective.md +10 -30
- package/docs/markdown/classes/ExtractHideShowMixin.md +8 -8
- package/docs/markdown/classes/FormControlsComponent.md +24 -74
- package/docs/markdown/classes/FormFieldHideShowDirective.md +12 -28
- package/docs/markdown/classes/InputClearButtonDirective.md +8 -16
- package/docs/markdown/classes/RequiredDirective.md +4 -12
- package/docs/markdown/globals.md +2 -3
- package/docs/markdown/interfaces/ChipListTemplateContext.md +4 -4
- package/docs/markdown/interfaces/ControlErrorDirectiveContext.md +4 -4
- package/docs/markdown/interfaces/ControlErrorsDirectiveContext.md +4 -4
- package/docs/wiki/Class.ChipInputAdapterDirective.md +5 -15
- package/docs/wiki/Class.ChipListIteratorDirective.md +5 -25
- package/docs/wiki/Class.CompareWithDirective.md +5 -13
- package/docs/wiki/Class.ControlErrorDirective.md +11 -31
- package/docs/wiki/Class.ControlErrorsDirective.md +9 -29
- package/docs/wiki/Class.ExtractHideShowMixin.md +7 -7
- package/docs/wiki/Class.FormControlsComponent.md +23 -73
- package/docs/wiki/Class.FormFieldHideShowDirective.md +11 -27
- package/docs/wiki/Class.InputClearButtonDirective.md +7 -15
- package/docs/wiki/Class.RequiredDirective.md +3 -11
- package/docs/wiki/Interface.ChipListTemplateContext.md +3 -3
- package/docs/wiki/Interface.ControlErrorDirectiveContext.md +3 -3
- package/docs/wiki/Interface.ControlErrorsDirectiveContext.md +3 -3
- package/docs/wiki/_Sidebar.md +0 -1
- package/docs/wiki/globals.md +1 -2
- package/fesm2022/rxap-material-form-system.mjs +92 -215
- package/fesm2022/rxap-material-form-system.mjs.map +1 -1
- package/package.json +23 -23
- package/types/rxap-material-form-system.d.ts +19 -40
- package/docs/html/classes/MaterialFormSystemModule.html +0 -2
- package/docs/markdown/classes/MaterialFormSystemModule.md +0 -19
- package/docs/wiki/Class.MaterialFormSystemModule.md +0 -15
|
@@ -166,7 +166,6 @@
|
|
|
166
166
|
<code>MatButtonModule</code>
|
|
167
167
|
<code>NgClass</code>
|
|
168
168
|
<code>MatProgressSpinnerModule</code>
|
|
169
|
-
<code>AsyncPipe</code>
|
|
170
169
|
<code>MatSnackBarModule</code>
|
|
171
170
|
</td>
|
|
172
171
|
</tr>
|
|
@@ -208,10 +207,17 @@
|
|
|
208
207
|
<ul class="index-list">
|
|
209
208
|
<li>
|
|
210
209
|
<span class="modifier">Public</span>
|
|
211
|
-
|
|
210
|
+
<span class="modifier">Readonly</span>
|
|
211
|
+
<a href="#allowResubmit" >allowResubmit</a>
|
|
212
|
+
</li>
|
|
213
|
+
<li>
|
|
214
|
+
<span class="modifier">Public</span>
|
|
215
|
+
<span class="modifier">Readonly</span>
|
|
216
|
+
<a href="#close" >close</a>
|
|
212
217
|
</li>
|
|
213
218
|
<li>
|
|
214
219
|
<span class="modifier">Public</span>
|
|
220
|
+
<span class="modifier">Readonly</span>
|
|
215
221
|
<a href="#invalid" >invalid</a>
|
|
216
222
|
</li>
|
|
217
223
|
<li>
|
|
@@ -220,7 +226,18 @@
|
|
|
220
226
|
</li>
|
|
221
227
|
<li>
|
|
222
228
|
<span class="modifier">Public</span>
|
|
223
|
-
|
|
229
|
+
<span class="modifier">Readonly</span>
|
|
230
|
+
<a href="#navigateAfterSubmit" >navigateAfterSubmit</a>
|
|
231
|
+
</li>
|
|
232
|
+
<li>
|
|
233
|
+
<span class="modifier">Public</span>
|
|
234
|
+
<span class="modifier">Readonly</span>
|
|
235
|
+
<a href="#submitted" >submitted</a>
|
|
236
|
+
</li>
|
|
237
|
+
<li>
|
|
238
|
+
<span class="modifier">Public</span>
|
|
239
|
+
<span class="modifier">Readonly</span>
|
|
240
|
+
<a href="#submitting" >submitting</a>
|
|
224
241
|
</li>
|
|
225
242
|
</ul>
|
|
226
243
|
</td>
|
|
@@ -254,23 +271,6 @@
|
|
|
254
271
|
</td>
|
|
255
272
|
</tr>
|
|
256
273
|
|
|
257
|
-
<tr>
|
|
258
|
-
<td class="col-md-4">
|
|
259
|
-
<h6><b>Inputs</b></h6>
|
|
260
|
-
</td>
|
|
261
|
-
</tr>
|
|
262
|
-
<tr>
|
|
263
|
-
<td class="col-md-4">
|
|
264
|
-
<ul class="index-list">
|
|
265
|
-
<li>
|
|
266
|
-
<a href="#allowResubmit" >allowResubmit</a>
|
|
267
|
-
</li>
|
|
268
|
-
<li>
|
|
269
|
-
<a href="#navigateAfterSubmit" >navigateAfterSubmit</a>
|
|
270
|
-
</li>
|
|
271
|
-
</ul>
|
|
272
|
-
</td>
|
|
273
|
-
</tr>
|
|
274
274
|
|
|
275
275
|
<tr>
|
|
276
276
|
<td class="col-md-4">
|
|
@@ -280,9 +280,6 @@
|
|
|
280
280
|
<tr>
|
|
281
281
|
<td class="col-md-4">
|
|
282
282
|
<ul class="index-list">
|
|
283
|
-
<li>
|
|
284
|
-
<a href="#close" >close</a>
|
|
285
|
-
</li>
|
|
286
283
|
<li>
|
|
287
284
|
<a href="#submitted" >submitted</a>
|
|
288
285
|
</li>
|
|
@@ -292,177 +289,14 @@
|
|
|
292
289
|
|
|
293
290
|
|
|
294
291
|
|
|
295
|
-
<tr>
|
|
296
|
-
<td class="col-md-4">
|
|
297
|
-
<h6><b>Accessors</b></h6>
|
|
298
|
-
</td>
|
|
299
|
-
</tr>
|
|
300
|
-
<tr>
|
|
301
|
-
<td class="col-md-4">
|
|
302
|
-
<ul class="index-list">
|
|
303
|
-
<li>
|
|
304
|
-
<a href="#allowResubmit" >allowResubmit</a>
|
|
305
|
-
</li>
|
|
306
|
-
</ul>
|
|
307
|
-
</td>
|
|
308
|
-
</tr>
|
|
309
292
|
</tbody>
|
|
310
293
|
</table>
|
|
311
294
|
</section>
|
|
312
295
|
|
|
313
|
-
<section data-compodoc="block-constructor">
|
|
314
|
-
<h3 id="constructor">Constructor</h3>
|
|
315
|
-
<table class="table table-sm table-bordered">
|
|
316
|
-
<tbody>
|
|
317
|
-
<tr>
|
|
318
|
-
<td class="col-md-4">
|
|
319
|
-
<code>constructor(formDirective: FormDirective, cdr: ChangeDetectorRef, snackBar: MatSnackBar, router: Router | null)</code>
|
|
320
|
-
</td>
|
|
321
|
-
</tr>
|
|
322
|
-
<tr>
|
|
323
|
-
<td class="col-md-4">
|
|
324
|
-
<div class="io-line">Defined in <a href="" data-line="64" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:64</a></div>
|
|
325
|
-
</td>
|
|
326
|
-
</tr>
|
|
327
|
-
|
|
328
|
-
<tr>
|
|
329
|
-
<td class="col-md-4">
|
|
330
|
-
<div>
|
|
331
|
-
<b>Parameters :</b>
|
|
332
|
-
<table class="params">
|
|
333
|
-
<thead>
|
|
334
|
-
<tr>
|
|
335
|
-
<td>Name</td>
|
|
336
|
-
<td>Type</td>
|
|
337
|
-
<td>Optional</td>
|
|
338
|
-
</tr>
|
|
339
|
-
</thead>
|
|
340
|
-
<tbody>
|
|
341
|
-
<tr>
|
|
342
|
-
<td>formDirective</td>
|
|
343
|
-
|
|
344
|
-
<td>
|
|
345
|
-
<code>FormDirective</code>
|
|
346
|
-
</td>
|
|
347
|
-
|
|
348
|
-
<td>
|
|
349
|
-
No
|
|
350
|
-
</td>
|
|
351
|
-
|
|
352
|
-
</tr>
|
|
353
|
-
<tr>
|
|
354
|
-
<td>cdr</td>
|
|
355
|
-
|
|
356
|
-
<td>
|
|
357
|
-
<code>ChangeDetectorRef</code>
|
|
358
|
-
</td>
|
|
359
|
-
|
|
360
|
-
<td>
|
|
361
|
-
No
|
|
362
|
-
</td>
|
|
363
|
-
|
|
364
|
-
</tr>
|
|
365
|
-
<tr>
|
|
366
|
-
<td>snackBar</td>
|
|
367
|
-
|
|
368
|
-
<td>
|
|
369
|
-
<code>MatSnackBar</code>
|
|
370
|
-
</td>
|
|
371
|
-
|
|
372
|
-
<td>
|
|
373
|
-
No
|
|
374
|
-
</td>
|
|
375
|
-
|
|
376
|
-
</tr>
|
|
377
|
-
<tr>
|
|
378
|
-
<td>router</td>
|
|
379
|
-
|
|
380
|
-
<td>
|
|
381
|
-
<code>Router | null</code>
|
|
382
|
-
</td>
|
|
383
|
-
|
|
384
|
-
<td>
|
|
385
|
-
No
|
|
386
|
-
</td>
|
|
387
|
-
|
|
388
|
-
</tr>
|
|
389
|
-
</tbody>
|
|
390
|
-
</table>
|
|
391
|
-
</div>
|
|
392
|
-
</td>
|
|
393
|
-
</tr>
|
|
394
|
-
</tbody>
|
|
395
|
-
</table>
|
|
396
|
-
</section>
|
|
397
296
|
|
|
398
|
-
<section data-compodoc="block-inputs">
|
|
399
|
-
<h3 id="inputs">Inputs</h3>
|
|
400
|
-
<table class="table table-sm table-bordered">
|
|
401
|
-
<tbody>
|
|
402
|
-
<tr>
|
|
403
|
-
<td class="col-md-4">
|
|
404
|
-
<a name="allowResubmit"></a>
|
|
405
|
-
<b>allowResubmit</b>
|
|
406
|
-
</td>
|
|
407
|
-
</tr>
|
|
408
|
-
<tr>
|
|
409
|
-
<td class="col-md-4">
|
|
410
|
-
<i>Type : </i> <code>boolean | string</code>
|
|
411
297
|
|
|
412
|
-
</td>
|
|
413
|
-
</tr>
|
|
414
|
-
<tr>
|
|
415
|
-
<td class="col-md-2" colspan="2">
|
|
416
|
-
<div class="io-line">Defined in <a href="" data-line="86" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:86</a></div>
|
|
417
|
-
</td>
|
|
418
|
-
</tr>
|
|
419
|
-
</tbody>
|
|
420
|
-
</table>
|
|
421
|
-
<table class="table table-sm table-bordered">
|
|
422
|
-
<tbody>
|
|
423
|
-
<tr>
|
|
424
|
-
<td class="col-md-4">
|
|
425
|
-
<a name="navigateAfterSubmit"></a>
|
|
426
|
-
<b>navigateAfterSubmit</b>
|
|
427
|
-
</td>
|
|
428
|
-
</tr>
|
|
429
|
-
<tr>
|
|
430
|
-
<td class="col-md-4">
|
|
431
|
-
<i>Type : </i> <code>string[]</code>
|
|
432
|
-
|
|
433
|
-
</td>
|
|
434
|
-
</tr>
|
|
435
|
-
<tr>
|
|
436
|
-
<td class="col-md-2" colspan="2">
|
|
437
|
-
<div class="io-line">Defined in <a href="" data-line="53" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:53</a></div>
|
|
438
|
-
</td>
|
|
439
|
-
</tr>
|
|
440
|
-
</tbody>
|
|
441
|
-
</table>
|
|
442
|
-
</section>
|
|
443
298
|
<section data-compodoc="block-outputs">
|
|
444
299
|
<h3 id="outputs">Outputs</h3>
|
|
445
|
-
<table class="table table-sm table-bordered">
|
|
446
|
-
<tbody>
|
|
447
|
-
<tr>
|
|
448
|
-
<td class="col-md-4">
|
|
449
|
-
<a name="close"></a>
|
|
450
|
-
<b>close</b>
|
|
451
|
-
</td>
|
|
452
|
-
</tr>
|
|
453
|
-
<tr>
|
|
454
|
-
<td class="col-md-4">
|
|
455
|
-
<i>Type : </i> <code>EventEmitter</code>
|
|
456
|
-
|
|
457
|
-
</td>
|
|
458
|
-
</tr>
|
|
459
|
-
<tr>
|
|
460
|
-
<td class="col-md-2" colspan="2">
|
|
461
|
-
<div class="io-line">Defined in <a href="" data-line="56" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:56</a></div>
|
|
462
|
-
</td>
|
|
463
|
-
</tr>
|
|
464
|
-
</tbody>
|
|
465
|
-
</table>
|
|
466
300
|
<table class="table table-sm table-bordered">
|
|
467
301
|
<tbody>
|
|
468
302
|
<tr>
|
|
@@ -470,16 +304,10 @@
|
|
|
470
304
|
<a name="submitted"></a>
|
|
471
305
|
<b>submitted</b>
|
|
472
306
|
</td>
|
|
473
|
-
</tr>
|
|
474
|
-
<tr>
|
|
475
|
-
<td class="col-md-4">
|
|
476
|
-
<i>Type : </i> <code>EventEmitter</code>
|
|
477
|
-
|
|
478
|
-
</td>
|
|
479
307
|
</tr>
|
|
480
308
|
<tr>
|
|
481
309
|
<td class="col-md-2" colspan="2">
|
|
482
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
310
|
+
<div class="io-line">Defined in <a href="" data-line="45" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:45</a></div>
|
|
483
311
|
</td>
|
|
484
312
|
</tr>
|
|
485
313
|
</tbody>
|
|
@@ -514,8 +342,8 @@
|
|
|
514
342
|
|
|
515
343
|
<tr>
|
|
516
344
|
<td class="col-md-4">
|
|
517
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
518
|
-
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:
|
|
345
|
+
<div class="io-line">Defined in <a href="" data-line="81"
|
|
346
|
+
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:81</a></div>
|
|
519
347
|
</td>
|
|
520
348
|
</tr>
|
|
521
349
|
|
|
@@ -553,8 +381,8 @@
|
|
|
553
381
|
|
|
554
382
|
<tr>
|
|
555
383
|
<td class="col-md-4">
|
|
556
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
557
|
-
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:
|
|
384
|
+
<div class="io-line">Defined in <a href="" data-line="136"
|
|
385
|
+
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:136</a></div>
|
|
558
386
|
</td>
|
|
559
387
|
</tr>
|
|
560
388
|
|
|
@@ -592,8 +420,8 @@
|
|
|
592
420
|
|
|
593
421
|
<tr>
|
|
594
422
|
<td class="col-md-4">
|
|
595
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
596
|
-
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:
|
|
423
|
+
<div class="io-line">Defined in <a href="" data-line="76"
|
|
424
|
+
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:76</a></div>
|
|
597
425
|
</td>
|
|
598
426
|
</tr>
|
|
599
427
|
|
|
@@ -631,8 +459,8 @@
|
|
|
631
459
|
|
|
632
460
|
<tr>
|
|
633
461
|
<td class="col-md-4">
|
|
634
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
635
|
-
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:
|
|
462
|
+
<div class="io-line">Defined in <a href="" data-line="85"
|
|
463
|
+
class="link-to-prism">src/lib/form-controls/form-controls.component.ts:85</a></div>
|
|
636
464
|
</td>
|
|
637
465
|
</tr>
|
|
638
466
|
|
|
@@ -688,22 +516,50 @@
|
|
|
688
516
|
<tbody>
|
|
689
517
|
<tr>
|
|
690
518
|
<td class="col-md-4">
|
|
691
|
-
<a name="
|
|
519
|
+
<a name="allowResubmit"></a>
|
|
692
520
|
<span class="name">
|
|
693
521
|
<span class="modifier">Public</span>
|
|
694
|
-
|
|
695
|
-
<
|
|
522
|
+
<span class="modifier">Readonly</span>
|
|
523
|
+
<span ><b>allowResubmit</b></span>
|
|
524
|
+
<a href="#allowResubmit"><span class="icon ion-ios-link"></span></a>
|
|
696
525
|
</span>
|
|
697
526
|
</td>
|
|
698
527
|
</tr>
|
|
699
528
|
<tr>
|
|
700
529
|
<td class="col-md-4">
|
|
701
|
-
<i>Default value : </i><code>false</code>
|
|
530
|
+
<i>Default value : </i><code>input(false, { transform: coerceBoolean })</code>
|
|
702
531
|
</td>
|
|
703
532
|
</tr>
|
|
704
533
|
<tr>
|
|
705
534
|
<td class="col-md-4">
|
|
706
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
535
|
+
<div class="io-line">Defined in <a href="" data-line="53" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:53</a></div>
|
|
536
|
+
</td>
|
|
537
|
+
</tr>
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
</tbody>
|
|
541
|
+
</table>
|
|
542
|
+
<table class="table table-sm table-bordered">
|
|
543
|
+
<tbody>
|
|
544
|
+
<tr>
|
|
545
|
+
<td class="col-md-4">
|
|
546
|
+
<a name="close"></a>
|
|
547
|
+
<span class="name">
|
|
548
|
+
<span class="modifier">Public</span>
|
|
549
|
+
<span class="modifier">Readonly</span>
|
|
550
|
+
<span ><b>close</b></span>
|
|
551
|
+
<a href="#close"><span class="icon ion-ios-link"></span></a>
|
|
552
|
+
</span>
|
|
553
|
+
</td>
|
|
554
|
+
</tr>
|
|
555
|
+
<tr>
|
|
556
|
+
<td class="col-md-4">
|
|
557
|
+
<i>Default value : </i><code>output<FormData | FormData[] | void>()</code>
|
|
558
|
+
</td>
|
|
559
|
+
</tr>
|
|
560
|
+
<tr>
|
|
561
|
+
<td class="col-md-4">
|
|
562
|
+
<div class="io-line">Defined in <a href="" data-line="44" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:44</a></div>
|
|
707
563
|
</td>
|
|
708
564
|
</tr>
|
|
709
565
|
|
|
@@ -717,6 +573,7 @@
|
|
|
717
573
|
<a name="invalid"></a>
|
|
718
574
|
<span class="name">
|
|
719
575
|
<span class="modifier">Public</span>
|
|
576
|
+
<span class="modifier">Readonly</span>
|
|
720
577
|
<span ><b>invalid</b></span>
|
|
721
578
|
<a href="#invalid"><span class="icon ion-ios-link"></span></a>
|
|
722
579
|
</span>
|
|
@@ -724,12 +581,12 @@
|
|
|
724
581
|
</tr>
|
|
725
582
|
<tr>
|
|
726
583
|
<td class="col-md-4">
|
|
727
|
-
<i>Default value : </i><code>false</code>
|
|
584
|
+
<i>Default value : </i><code>signal(false)</code>
|
|
728
585
|
</td>
|
|
729
586
|
</tr>
|
|
730
587
|
<tr>
|
|
731
588
|
<td class="col-md-4">
|
|
732
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
589
|
+
<div class="io-line">Defined in <a href="" data-line="41" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:41</a></div>
|
|
733
590
|
</td>
|
|
734
591
|
</tr>
|
|
735
592
|
|
|
@@ -755,7 +612,7 @@
|
|
|
755
612
|
</tr>
|
|
756
613
|
<tr>
|
|
757
614
|
<td class="col-md-4">
|
|
758
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
615
|
+
<div class="io-line">Defined in <a href="" data-line="46" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:46</a></div>
|
|
759
616
|
</td>
|
|
760
617
|
</tr>
|
|
761
618
|
|
|
@@ -766,126 +623,88 @@
|
|
|
766
623
|
<tbody>
|
|
767
624
|
<tr>
|
|
768
625
|
<td class="col-md-4">
|
|
769
|
-
<a name="
|
|
626
|
+
<a name="navigateAfterSubmit"></a>
|
|
770
627
|
<span class="name">
|
|
771
628
|
<span class="modifier">Public</span>
|
|
772
|
-
|
|
773
|
-
<
|
|
629
|
+
<span class="modifier">Readonly</span>
|
|
630
|
+
<span ><b>navigateAfterSubmit</b></span>
|
|
631
|
+
<a href="#navigateAfterSubmit"><span class="icon ion-ios-link"></span></a>
|
|
774
632
|
</span>
|
|
775
633
|
</td>
|
|
776
634
|
</tr>
|
|
777
635
|
<tr>
|
|
778
636
|
<td class="col-md-4">
|
|
779
|
-
<i>
|
|
780
|
-
|
|
637
|
+
<i>Default value : </i><code>input<string[]>()</code>
|
|
781
638
|
</td>
|
|
782
639
|
</tr>
|
|
783
640
|
<tr>
|
|
784
641
|
<td class="col-md-4">
|
|
785
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
642
|
+
<div class="io-line">Defined in <a href="" data-line="42" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:42</a></div>
|
|
786
643
|
</td>
|
|
787
644
|
</tr>
|
|
788
645
|
|
|
789
646
|
|
|
790
647
|
</tbody>
|
|
791
648
|
</table>
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
649
|
+
<table class="table table-sm table-bordered">
|
|
650
|
+
<tbody>
|
|
651
|
+
<tr>
|
|
652
|
+
<td class="col-md-4">
|
|
653
|
+
<a name="submitted"></a>
|
|
654
|
+
<span class="name">
|
|
655
|
+
<span class="modifier">Public</span>
|
|
656
|
+
<span class="modifier">Readonly</span>
|
|
657
|
+
<span ><b>submitted</b></span>
|
|
658
|
+
<a href="#submitted"><span class="icon ion-ios-link"></span></a>
|
|
659
|
+
</span>
|
|
660
|
+
</td>
|
|
661
|
+
</tr>
|
|
662
|
+
<tr>
|
|
663
|
+
<td class="col-md-4">
|
|
664
|
+
<div class="io-line">Defined in <a href="" data-line="45" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:45</a></div>
|
|
665
|
+
</td>
|
|
666
|
+
</tr>
|
|
806
667
|
|
|
807
|
-
<tr>
|
|
808
|
-
<td class="col-md-4">
|
|
809
|
-
<span class="accessor"><b>get</b><code>allowResubmit()</code></span>
|
|
810
|
-
</td>
|
|
811
|
-
</tr>
|
|
812
|
-
<tr>
|
|
813
|
-
<td class="col-md-4">
|
|
814
|
-
<div class="io-line">Defined in <a href="" data-line="81" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:81</a></div>
|
|
815
|
-
</td>
|
|
816
|
-
</tr>
|
|
817
668
|
|
|
669
|
+
</tbody>
|
|
670
|
+
</table>
|
|
671
|
+
<table class="table table-sm table-bordered">
|
|
672
|
+
<tbody>
|
|
673
|
+
<tr>
|
|
674
|
+
<td class="col-md-4">
|
|
675
|
+
<a name="submitting"></a>
|
|
676
|
+
<span class="name">
|
|
677
|
+
<span class="modifier">Public</span>
|
|
678
|
+
<span class="modifier">Readonly</span>
|
|
679
|
+
<span ><b>submitting</b></span>
|
|
680
|
+
<a href="#submitting"><span class="icon ion-ios-link"></span></a>
|
|
681
|
+
</span>
|
|
682
|
+
</td>
|
|
683
|
+
</tr>
|
|
818
684
|
<tr>
|
|
819
685
|
<td class="col-md-4">
|
|
820
|
-
<
|
|
686
|
+
<i>Default value : </i><code>this.formDirective.submitting</code>
|
|
821
687
|
</td>
|
|
822
688
|
</tr>
|
|
823
|
-
<tr>
|
|
824
|
-
<td class="col-md-4">
|
|
825
|
-
<div class="io-line">Defined in <a href="" data-line="86" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:86</a></div>
|
|
826
|
-
</td>
|
|
827
|
-
</tr>
|
|
828
689
|
<tr>
|
|
829
690
|
<td class="col-md-4">
|
|
830
|
-
|
|
831
|
-
<div class="io-description">
|
|
832
|
-
<b>Parameters :</b>
|
|
833
|
-
<table class="params">
|
|
834
|
-
<thead>
|
|
835
|
-
<tr>
|
|
836
|
-
<td>Name</td>
|
|
837
|
-
<td>Type</td>
|
|
838
|
-
<td>Optional</td>
|
|
839
|
-
</tr>
|
|
840
|
-
</thead>
|
|
841
|
-
<tbody>
|
|
842
|
-
<tr>
|
|
843
|
-
<td>value</td>
|
|
844
|
-
|
|
845
|
-
<td>
|
|
846
|
-
<code>boolean | string</code>
|
|
847
|
-
</td>
|
|
848
|
-
|
|
849
|
-
<td>
|
|
850
|
-
No
|
|
851
|
-
</td>
|
|
852
|
-
|
|
853
|
-
</tr>
|
|
854
|
-
</tbody>
|
|
855
|
-
</table>
|
|
856
|
-
</div>
|
|
857
|
-
<div>
|
|
858
|
-
</div>
|
|
859
|
-
<div class="io-description">
|
|
860
|
-
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
|
|
861
|
-
|
|
862
|
-
</div>
|
|
691
|
+
<div class="io-line">Defined in <a href="" data-line="40" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:40</a></div>
|
|
863
692
|
</td>
|
|
864
693
|
</tr>
|
|
865
|
-
|
|
866
|
-
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
</tbody>
|
|
697
|
+
</table>
|
|
867
698
|
</section>
|
|
699
|
+
|
|
868
700
|
</div>
|
|
869
701
|
|
|
870
702
|
|
|
871
703
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
872
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
873
|
-
|
|
874
|
-
ChangeDetectorRef,
|
|
875
|
-
Component,
|
|
876
|
-
EventEmitter,
|
|
877
|
-
Inject,
|
|
878
|
-
Input,
|
|
879
|
-
isDevMode,
|
|
880
|
-
OnInit,
|
|
881
|
-
Optional,
|
|
882
|
-
Output,
|
|
883
|
-
} from '@angular/core';
|
|
704
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { ChangeDetectionStrategy, Component, isDevMode, OnInit, input, output, inject, signal } from '@angular/core';
|
|
705
|
+
import { outputToObservable } from '@angular/core/rxjs-interop';
|
|
884
706
|
import { FormDirective } from '@rxap/forms';
|
|
885
|
-
import {
|
|
886
|
-
Observable,
|
|
887
|
-
Subscription,
|
|
888
|
-
} from 'rxjs';
|
|
707
|
+
import { Subscription } from 'rxjs';
|
|
889
708
|
import {
|
|
890
709
|
clone,
|
|
891
710
|
coerceBoolean,
|
|
@@ -900,7 +719,7 @@ import {
|
|
|
900
719
|
MatSnackBarModule,
|
|
901
720
|
} from '@angular/material/snack-bar';
|
|
902
721
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
903
|
-
import {
|
|
722
|
+
import { NgClass } from '@angular/common';
|
|
904
723
|
import { MatButtonModule } from '@angular/material/button';
|
|
905
724
|
declare const $localize: any;
|
|
906
725
|
|
|
@@ -913,20 +732,20 @@ declare const $localize: any;
|
|
|
913
732
|
MatButtonModule,
|
|
914
733
|
NgClass,
|
|
915
734
|
MatProgressSpinnerModule,
|
|
916
|
-
AsyncPipe,
|
|
917
735
|
MatSnackBarModule
|
|
918
736
|
]
|
|
919
737
|
})
|
|
920
738
|
export class FormControlsComponent<FormData> implements OnInit {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
739
|
+
private readonly formDirective = inject<FormDirective>(FormDirective);
|
|
740
|
+
private readonly snackBar = inject<MatSnackBar>(MatSnackBar);
|
|
741
|
+
private readonly router = inject<Router | null>(Router, { optional: true });
|
|
742
|
+
|
|
743
|
+
public readonly submitting = this.formDirective.submitting;
|
|
744
|
+
public readonly invalid = signal(false);
|
|
745
|
+
public readonly navigateAfterSubmit = input<string[]>();
|
|
926
746
|
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
927
|
-
public close =
|
|
928
|
-
|
|
929
|
-
public submitted = new EventEmitter<FormData>();
|
|
747
|
+
public readonly close = output<FormData | FormData[] | void>();
|
|
748
|
+
public readonly submitted = output<FormData>();
|
|
930
749
|
public isDevMode = isDevMode();
|
|
931
750
|
/**
|
|
932
751
|
* Collection of successful submitted values
|
|
@@ -934,39 +753,17 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
934
753
|
*/
|
|
935
754
|
private _submitted: FormData[] = [];
|
|
936
755
|
|
|
937
|
-
|
|
938
|
-
@Inject(FormDirective)
|
|
939
|
-
private readonly formDirective: FormDirective,
|
|
940
|
-
@Inject(ChangeDetectorRef)
|
|
941
|
-
private readonly cdr: ChangeDetectorRef,
|
|
942
|
-
@Inject(MatSnackBar)
|
|
943
|
-
private readonly snackBar: MatSnackBar,
|
|
944
|
-
@Optional()
|
|
945
|
-
@Inject(Router)
|
|
946
|
-
private readonly router: Router | null,
|
|
947
|
-
) {
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
public _allowResubmit = false;
|
|
951
|
-
|
|
952
|
-
public get allowResubmit(): boolean | '' {
|
|
953
|
-
return this._allowResubmit;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
@Input()
|
|
957
|
-
public set allowResubmit(value: boolean | '') {
|
|
958
|
-
this._allowResubmit = coerceBoolean(value);
|
|
959
|
-
}
|
|
756
|
+
public readonly allowResubmit = input(false, { transform: coerceBoolean });
|
|
960
757
|
|
|
961
758
|
public ngOnInit() {
|
|
962
|
-
this.
|
|
963
|
-
this.close
|
|
759
|
+
outputToObservable(this.close)
|
|
964
760
|
.pipe(
|
|
965
761
|
take(1),
|
|
966
762
|
tap(() => {
|
|
967
|
-
|
|
763
|
+
const navigateAfterSubmit = this.navigateAfterSubmit();
|
|
764
|
+
if (navigateAfterSubmit) {
|
|
968
765
|
if (this.router) {
|
|
969
|
-
return this.router.navigate(
|
|
766
|
+
return this.router.navigate(navigateAfterSubmit);
|
|
970
767
|
} else {
|
|
971
768
|
console.warn(
|
|
972
769
|
'The Router is not available. Ensure that tha RouterModule is imported',
|
|
@@ -980,7 +777,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
980
777
|
}
|
|
981
778
|
|
|
982
779
|
public reset() {
|
|
983
|
-
this.invalid
|
|
780
|
+
this.invalid.set(false);
|
|
984
781
|
this.formDirective.reset();
|
|
985
782
|
}
|
|
986
783
|
|
|
@@ -991,17 +788,15 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
991
788
|
public submit(closeAfterSubmit?: boolean) {
|
|
992
789
|
this.formDirective.form.markAllAsDirty();
|
|
993
790
|
this.formDirective.form.markAllAsTouched();
|
|
994
|
-
this.formDirective.cdr.markForCheck();
|
|
995
791
|
// eslint-disable-next-line prefer-const
|
|
996
792
|
let submitSubscription: Subscription;
|
|
997
793
|
|
|
998
794
|
const invalidSubmitSubscription: Subscription =
|
|
999
|
-
this.formDirective.invalidSubmit
|
|
795
|
+
outputToObservable(this.formDirective.invalidSubmit)
|
|
1000
796
|
.pipe(
|
|
1001
797
|
take(1),
|
|
1002
798
|
tap(() => submitSubscription?.unsubscribe()),
|
|
1003
|
-
tap(() =>
|
|
1004
|
-
tap(() => this.cdr.detectChanges()),
|
|
799
|
+
tap(() => this.invalid.set(true)),
|
|
1005
800
|
tap(() =>
|
|
1006
801
|
this.snackBar.open(
|
|
1007
802
|
$localize`:@@rxap-material.form-system.form-controls.form-is-invalid:Form is not valid`,
|
|
@@ -1012,7 +807,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1012
807
|
)
|
|
1013
808
|
.subscribe();
|
|
1014
809
|
|
|
1015
|
-
submitSubscription = this.formDirective.rxapSubmit
|
|
810
|
+
submitSubscription = outputToObservable(this.formDirective.rxapSubmit)
|
|
1016
811
|
.pipe(
|
|
1017
812
|
take(1),
|
|
1018
813
|
tap((value) => {
|
|
@@ -1033,8 +828,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1033
828
|
}
|
|
1034
829
|
|
|
1035
830
|
invalidSubmitSubscription.unsubscribe();
|
|
1036
|
-
this.invalid
|
|
1037
|
-
this.cdr.detectChanges();
|
|
831
|
+
this.invalid.set(false);
|
|
1038
832
|
}),
|
|
1039
833
|
)
|
|
1040
834
|
.subscribe();
|
|
@@ -1053,23 +847,23 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1053
847
|
<pre class="line-numbers"><code class="language-html"><div class="flex flex-row justify-between items-center gap-8">
|
|
1054
848
|
<div class="flex grow-0 flex-row justify-end items-center gap-8 w-full">
|
|
1055
849
|
<button (click)="reset()"
|
|
1056
|
-
[disabled]="submitting
|
|
850
|
+
[disabled]="submitting()"
|
|
1057
851
|
class="grow-0"
|
|
1058
852
|
mat-stroked-button
|
|
1059
853
|
type="button">
|
|
1060
854
|
<ng-container i18n>Reset</ng-container>
|
|
1061
855
|
</button>
|
|
1062
856
|
<button (click)="cancel()"
|
|
1063
|
-
[disabled]="submitting
|
|
857
|
+
[disabled]="submitting()"
|
|
1064
858
|
color="warn"
|
|
1065
859
|
class="grow-0"
|
|
1066
860
|
mat-stroked-button
|
|
1067
861
|
type="button">
|
|
1068
862
|
<ng-container i18n>Cancel</ng-container>
|
|
1069
863
|
</button>
|
|
1070
|
-
<button (click)="submit(!allowResubmit)"
|
|
1071
|
-
[disabled]="submitting
|
|
1072
|
-
[ngClass]="{ invalid: invalid }"
|
|
864
|
+
<button (click)="submit(!allowResubmit())"
|
|
865
|
+
[disabled]="submitting()"
|
|
866
|
+
[ngClass]="{ invalid: invalid() }"
|
|
1073
867
|
color="primary"
|
|
1074
868
|
class="grow-0"
|
|
1075
869
|
mat-raised-button
|
|
@@ -1078,16 +872,16 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1078
872
|
<span class="grow-0">
|
|
1079
873
|
<ng-container i18n>Submit</ng-container>
|
|
1080
874
|
</span>
|
|
1081
|
-
@if (submitting
|
|
875
|
+
@if (submitting()) {
|
|
1082
876
|
<mat-spinner [diameter]="15" color="accent" class="grow-0"
|
|
1083
877
|
mode="indeterminate"></mat-spinner>
|
|
1084
878
|
}
|
|
1085
879
|
</span>
|
|
1086
880
|
</button>
|
|
1087
|
-
@if (allowResubmit) {
|
|
881
|
+
@if (allowResubmit()) {
|
|
1088
882
|
<button (click)="submit(true)"
|
|
1089
|
-
[disabled]="submitting
|
|
1090
|
-
[ngClass]="{ invalid: invalid }"
|
|
883
|
+
[disabled]="submitting()"
|
|
884
|
+
[ngClass]="{ invalid: invalid() }"
|
|
1091
885
|
color="primary"
|
|
1092
886
|
class="grow-0"
|
|
1093
887
|
mat-raised-button
|
|
@@ -1096,7 +890,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1096
890
|
<span class="grow-0">
|
|
1097
891
|
<ng-container i18n>Submit and Close</ng-container>
|
|
1098
892
|
</span>
|
|
1099
|
-
@if (submitting
|
|
893
|
+
@if (submitting()) {
|
|
1100
894
|
<mat-spinner [diameter]="15" color="accent" class="grow-0"
|
|
1101
895
|
mode="indeterminate"></mat-spinner>
|
|
1102
896
|
}
|
|
@@ -1153,7 +947,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1153
947
|
<script src="../js/libs/htmlparser.js"></script>
|
|
1154
948
|
<script src="../js/libs/deep-iterator.js"></script>
|
|
1155
949
|
<script>
|
|
1156
|
-
var COMPONENT_TEMPLATE = '<div><div class="flex flex-row justify-between items-center gap-8"> <div class="flex grow-0 flex-row justify-end items-center gap-8 w-full"> <button (click)="reset()" [disabled]="submitting
|
|
950
|
+
var COMPONENT_TEMPLATE = '<div><div class="flex flex-row justify-between items-center gap-8"> <div class="flex grow-0 flex-row justify-end items-center gap-8 w-full"> <button (click)="reset()" [disabled]="submitting()" class="grow-0" mat-stroked-button type="button"> <ng-container i18n>Reset</ng-container> </button> <button (click)="cancel()" [disabled]="submitting()" color="warn" class="grow-0" mat-stroked-button type="button"> <ng-container i18n>Cancel</ng-container> </button> <button (click)="submit(!allowResubmit())" [disabled]="submitting()" [ngClass]="{ invalid: invalid() }" color="primary" class="grow-0" mat-raised-button type="button"> <span class="flex flex-row items-center gap-2"> <span class="grow-0"> <ng-container i18n>Submit</ng-container> </span> @if (submitting()) { <mat-spinner [diameter]="15" color="accent" class="grow-0" mode="indeterminate"></mat-spinner> } </span> </button> @if (allowResubmit()) { <button (click)="submit(true)" [disabled]="submitting()" [ngClass]="{ invalid: invalid() }" color="primary" class="grow-0" mat-raised-button type="button"> <span class="flex flex-row items-center gap-2"> <span class="grow-0"> <ng-container i18n>Submit and Close</ng-container> </span> @if (submitting()) { <mat-spinner [diameter]="15" color="accent" class="grow-0" mode="indeterminate"></mat-spinner> } </span> </button> } @if (isDevMode) { <button (click)="logCurrentFormState()" mat-button type="button" class="grow-0"> Current Form State </button> } </div></div></div>'
|
|
1157
951
|
var COMPONENTS = [{'name': 'FormControlsComponent', 'selector': 'rxap-form-controls'}];
|
|
1158
952
|
var DIRECTIVES = [{'name': 'ChipInputAdapterDirective', 'selector': '[matChipInputFor][rxapChipInputAdapter]'},{'name': 'ChipListIteratorDirective', 'selector': '[rxapChipListIterator]'},{'name': 'CompareWithDirective', 'selector': 'mat-select[rxapCompareWith]'},{'name': 'ControlErrorDirective', 'selector': '[rxapControlError]'},{'name': 'ControlErrorsDirective', 'selector': '[rxapControlErrors]'},{'name': 'FormFieldHideShowDirective', 'selector': 'mat-form-field[rxapHideShow]'},{'name': 'InputClearButtonDirective', 'selector': '[rxapInputClearButton]'},{'name': 'RequiredDirective', 'selector': '[formControlName][rxapRequired],[formControl][rxapRequired]'}];
|
|
1159
953
|
var ACTUAL_COMPONENT = {'name': 'FormControlsComponent'};
|