@rxap/material-form-system 19.0.5 → 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 +37 -0
- package/compodoc/changelog.html +35 -0
- package/compodoc/classes/ExtractHideShowMixin.html +14 -28
- package/compodoc/classes/RecordViewTuple.html +9 -23
- package/compodoc/components/FormControlsComponent.html +184 -388
- package/compodoc/dependencies.html +13 -13
- 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/MaterialFormSystemModule/dependencies.svg +4 -4
- package/compodoc/modules/MaterialFormSystemModule.html +4 -4
- package/compodoc/modules.html +0 -17
- package/compodoc/overview.html +1 -185
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +816 -1620
- 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 +13 -29
- 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 +12 -28
- 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 +107 -231
- package/fesm2022/rxap-material-form-system.mjs.map +1 -1
- package/package.json +42 -41
- package/types/rxap-material-form-system.d.ts +160 -0
- package/docs/html/classes/MaterialFormSystemModule.html +0 -2
- package/docs/markdown/classes/MaterialFormSystemModule.md +0 -19
- package/docs/wiki/Class.MaterialFormSystemModule.md +0 -15
- package/index.d.ts +0 -10
- package/lib/chip-input-adapter.directive.d.ts +0 -14
- package/lib/chip-list-iterator.directive.d.ts +0 -25
- package/lib/compare-with.directive.d.ts +0 -12
- package/lib/control-error.directive.d.ts +0 -24
- package/lib/control-errors.directive.d.ts +0 -23
- package/lib/form-controls/form-controls.component.d.ts +0 -34
- package/lib/form-field-hide-show.directive.d.ts +0 -32
- package/lib/input-clear-button.directive.d.ts +0 -13
- package/lib/material-form-system.module.d.ts +0 -11
- package/lib/required.directive.d.ts +0 -10
|
@@ -166,8 +166,6 @@
|
|
|
166
166
|
<code>MatButtonModule</code>
|
|
167
167
|
<code>NgClass</code>
|
|
168
168
|
<code>MatProgressSpinnerModule</code>
|
|
169
|
-
<code>NgIf</code>
|
|
170
|
-
<code>AsyncPipe</code>
|
|
171
169
|
<code>MatSnackBarModule</code>
|
|
172
170
|
</td>
|
|
173
171
|
</tr>
|
|
@@ -209,10 +207,17 @@
|
|
|
209
207
|
<ul class="index-list">
|
|
210
208
|
<li>
|
|
211
209
|
<span class="modifier">Public</span>
|
|
212
|
-
|
|
210
|
+
<span class="modifier">Readonly</span>
|
|
211
|
+
<a href="#allowResubmit" >allowResubmit</a>
|
|
213
212
|
</li>
|
|
214
213
|
<li>
|
|
215
214
|
<span class="modifier">Public</span>
|
|
215
|
+
<span class="modifier">Readonly</span>
|
|
216
|
+
<a href="#close" >close</a>
|
|
217
|
+
</li>
|
|
218
|
+
<li>
|
|
219
|
+
<span class="modifier">Public</span>
|
|
220
|
+
<span class="modifier">Readonly</span>
|
|
216
221
|
<a href="#invalid" >invalid</a>
|
|
217
222
|
</li>
|
|
218
223
|
<li>
|
|
@@ -221,7 +226,18 @@
|
|
|
221
226
|
</li>
|
|
222
227
|
<li>
|
|
223
228
|
<span class="modifier">Public</span>
|
|
224
|
-
|
|
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>
|
|
225
241
|
</li>
|
|
226
242
|
</ul>
|
|
227
243
|
</td>
|
|
@@ -255,23 +271,6 @@
|
|
|
255
271
|
</td>
|
|
256
272
|
</tr>
|
|
257
273
|
|
|
258
|
-
<tr>
|
|
259
|
-
<td class="col-md-4">
|
|
260
|
-
<h6><b>Inputs</b></h6>
|
|
261
|
-
</td>
|
|
262
|
-
</tr>
|
|
263
|
-
<tr>
|
|
264
|
-
<td class="col-md-4">
|
|
265
|
-
<ul class="index-list">
|
|
266
|
-
<li>
|
|
267
|
-
<a href="#allowResubmit" >allowResubmit</a>
|
|
268
|
-
</li>
|
|
269
|
-
<li>
|
|
270
|
-
<a href="#navigateAfterSubmit" >navigateAfterSubmit</a>
|
|
271
|
-
</li>
|
|
272
|
-
</ul>
|
|
273
|
-
</td>
|
|
274
|
-
</tr>
|
|
275
274
|
|
|
276
275
|
<tr>
|
|
277
276
|
<td class="col-md-4">
|
|
@@ -281,9 +280,6 @@
|
|
|
281
280
|
<tr>
|
|
282
281
|
<td class="col-md-4">
|
|
283
282
|
<ul class="index-list">
|
|
284
|
-
<li>
|
|
285
|
-
<a href="#close" >close</a>
|
|
286
|
-
</li>
|
|
287
283
|
<li>
|
|
288
284
|
<a href="#submitted" >submitted</a>
|
|
289
285
|
</li>
|
|
@@ -293,177 +289,14 @@
|
|
|
293
289
|
|
|
294
290
|
|
|
295
291
|
|
|
296
|
-
<tr>
|
|
297
|
-
<td class="col-md-4">
|
|
298
|
-
<h6><b>Accessors</b></h6>
|
|
299
|
-
</td>
|
|
300
|
-
</tr>
|
|
301
|
-
<tr>
|
|
302
|
-
<td class="col-md-4">
|
|
303
|
-
<ul class="index-list">
|
|
304
|
-
<li>
|
|
305
|
-
<a href="#allowResubmit" >allowResubmit</a>
|
|
306
|
-
</li>
|
|
307
|
-
</ul>
|
|
308
|
-
</td>
|
|
309
|
-
</tr>
|
|
310
292
|
</tbody>
|
|
311
293
|
</table>
|
|
312
294
|
</section>
|
|
313
295
|
|
|
314
|
-
<section data-compodoc="block-constructor">
|
|
315
|
-
<h3 id="constructor">Constructor</h3>
|
|
316
|
-
<table class="table table-sm table-bordered">
|
|
317
|
-
<tbody>
|
|
318
|
-
<tr>
|
|
319
|
-
<td class="col-md-4">
|
|
320
|
-
<code>constructor(formDirective: FormDirective, cdr: ChangeDetectorRef, snackBar: MatSnackBar, router: Router | null)</code>
|
|
321
|
-
</td>
|
|
322
|
-
</tr>
|
|
323
|
-
<tr>
|
|
324
|
-
<td class="col-md-4">
|
|
325
|
-
<div class="io-line">Defined in <a href="" data-line="69" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:69</a></div>
|
|
326
|
-
</td>
|
|
327
|
-
</tr>
|
|
328
|
-
|
|
329
|
-
<tr>
|
|
330
|
-
<td class="col-md-4">
|
|
331
|
-
<div>
|
|
332
|
-
<b>Parameters :</b>
|
|
333
|
-
<table class="params">
|
|
334
|
-
<thead>
|
|
335
|
-
<tr>
|
|
336
|
-
<td>Name</td>
|
|
337
|
-
<td>Type</td>
|
|
338
|
-
<td>Optional</td>
|
|
339
|
-
</tr>
|
|
340
|
-
</thead>
|
|
341
|
-
<tbody>
|
|
342
|
-
<tr>
|
|
343
|
-
<td>formDirective</td>
|
|
344
|
-
|
|
345
|
-
<td>
|
|
346
|
-
<code>FormDirective</code>
|
|
347
|
-
</td>
|
|
348
|
-
|
|
349
|
-
<td>
|
|
350
|
-
No
|
|
351
|
-
</td>
|
|
352
|
-
|
|
353
|
-
</tr>
|
|
354
|
-
<tr>
|
|
355
|
-
<td>cdr</td>
|
|
356
|
-
|
|
357
|
-
<td>
|
|
358
|
-
<code>ChangeDetectorRef</code>
|
|
359
|
-
</td>
|
|
360
|
-
|
|
361
|
-
<td>
|
|
362
|
-
No
|
|
363
|
-
</td>
|
|
364
|
-
|
|
365
|
-
</tr>
|
|
366
|
-
<tr>
|
|
367
|
-
<td>snackBar</td>
|
|
368
|
-
|
|
369
|
-
<td>
|
|
370
|
-
<code>MatSnackBar</code>
|
|
371
|
-
</td>
|
|
372
|
-
|
|
373
|
-
<td>
|
|
374
|
-
No
|
|
375
|
-
</td>
|
|
376
|
-
|
|
377
|
-
</tr>
|
|
378
|
-
<tr>
|
|
379
|
-
<td>router</td>
|
|
380
|
-
|
|
381
|
-
<td>
|
|
382
|
-
<code>Router | null</code>
|
|
383
|
-
</td>
|
|
384
|
-
|
|
385
|
-
<td>
|
|
386
|
-
No
|
|
387
|
-
</td>
|
|
388
|
-
|
|
389
|
-
</tr>
|
|
390
|
-
</tbody>
|
|
391
|
-
</table>
|
|
392
|
-
</div>
|
|
393
|
-
</td>
|
|
394
|
-
</tr>
|
|
395
|
-
</tbody>
|
|
396
|
-
</table>
|
|
397
|
-
</section>
|
|
398
|
-
|
|
399
|
-
<section data-compodoc="block-inputs">
|
|
400
|
-
<h3 id="inputs">Inputs</h3>
|
|
401
|
-
<table class="table table-sm table-bordered">
|
|
402
|
-
<tbody>
|
|
403
|
-
<tr>
|
|
404
|
-
<td class="col-md-4">
|
|
405
|
-
<a name="allowResubmit"></a>
|
|
406
|
-
<b>allowResubmit</b>
|
|
407
|
-
</td>
|
|
408
|
-
</tr>
|
|
409
|
-
<tr>
|
|
410
|
-
<td class="col-md-4">
|
|
411
|
-
<i>Type : </i> <code>boolean | string</code>
|
|
412
296
|
|
|
413
|
-
</td>
|
|
414
|
-
</tr>
|
|
415
|
-
<tr>
|
|
416
|
-
<td class="col-md-2" colspan="2">
|
|
417
|
-
<div class="io-line">Defined in <a href="" data-line="91" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:91</a></div>
|
|
418
|
-
</td>
|
|
419
|
-
</tr>
|
|
420
|
-
</tbody>
|
|
421
|
-
</table>
|
|
422
|
-
<table class="table table-sm table-bordered">
|
|
423
|
-
<tbody>
|
|
424
|
-
<tr>
|
|
425
|
-
<td class="col-md-4">
|
|
426
|
-
<a name="navigateAfterSubmit"></a>
|
|
427
|
-
<b>navigateAfterSubmit</b>
|
|
428
|
-
</td>
|
|
429
|
-
</tr>
|
|
430
|
-
<tr>
|
|
431
|
-
<td class="col-md-4">
|
|
432
|
-
<i>Type : </i> <code>string[]</code>
|
|
433
297
|
|
|
434
|
-
</td>
|
|
435
|
-
</tr>
|
|
436
|
-
<tr>
|
|
437
|
-
<td class="col-md-2" colspan="2">
|
|
438
|
-
<div class="io-line">Defined in <a href="" data-line="58" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:58</a></div>
|
|
439
|
-
</td>
|
|
440
|
-
</tr>
|
|
441
|
-
</tbody>
|
|
442
|
-
</table>
|
|
443
|
-
</section>
|
|
444
298
|
<section data-compodoc="block-outputs">
|
|
445
299
|
<h3 id="outputs">Outputs</h3>
|
|
446
|
-
<table class="table table-sm table-bordered">
|
|
447
|
-
<tbody>
|
|
448
|
-
<tr>
|
|
449
|
-
<td class="col-md-4">
|
|
450
|
-
<a name="close"></a>
|
|
451
|
-
<b>close</b>
|
|
452
|
-
</td>
|
|
453
|
-
</tr>
|
|
454
|
-
<tr>
|
|
455
|
-
<td class="col-md-4">
|
|
456
|
-
<i>Type : </i> <code>EventEmitter</code>
|
|
457
|
-
|
|
458
|
-
</td>
|
|
459
|
-
</tr>
|
|
460
|
-
<tr>
|
|
461
|
-
<td class="col-md-2" colspan="2">
|
|
462
|
-
<div class="io-line">Defined in <a href="" data-line="61" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:61</a></div>
|
|
463
|
-
</td>
|
|
464
|
-
</tr>
|
|
465
|
-
</tbody>
|
|
466
|
-
</table>
|
|
467
300
|
<table class="table table-sm table-bordered">
|
|
468
301
|
<tbody>
|
|
469
302
|
<tr>
|
|
@@ -471,16 +304,10 @@
|
|
|
471
304
|
<a name="submitted"></a>
|
|
472
305
|
<b>submitted</b>
|
|
473
306
|
</td>
|
|
474
|
-
</tr>
|
|
475
|
-
<tr>
|
|
476
|
-
<td class="col-md-4">
|
|
477
|
-
<i>Type : </i> <code>EventEmitter</code>
|
|
478
|
-
|
|
479
|
-
</td>
|
|
480
307
|
</tr>
|
|
481
308
|
<tr>
|
|
482
309
|
<td class="col-md-2" colspan="2">
|
|
483
|
-
<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>
|
|
484
311
|
</td>
|
|
485
312
|
</tr>
|
|
486
313
|
</tbody>
|
|
@@ -515,8 +342,8 @@
|
|
|
515
342
|
|
|
516
343
|
<tr>
|
|
517
344
|
<td class="col-md-4">
|
|
518
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
519
|
-
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>
|
|
520
347
|
</td>
|
|
521
348
|
</tr>
|
|
522
349
|
|
|
@@ -554,8 +381,8 @@
|
|
|
554
381
|
|
|
555
382
|
<tr>
|
|
556
383
|
<td class="col-md-4">
|
|
557
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
558
|
-
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>
|
|
559
386
|
</td>
|
|
560
387
|
</tr>
|
|
561
388
|
|
|
@@ -593,8 +420,8 @@
|
|
|
593
420
|
|
|
594
421
|
<tr>
|
|
595
422
|
<td class="col-md-4">
|
|
596
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
597
|
-
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>
|
|
598
425
|
</td>
|
|
599
426
|
</tr>
|
|
600
427
|
|
|
@@ -632,8 +459,8 @@
|
|
|
632
459
|
|
|
633
460
|
<tr>
|
|
634
461
|
<td class="col-md-4">
|
|
635
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
636
|
-
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>
|
|
637
464
|
</td>
|
|
638
465
|
</tr>
|
|
639
466
|
|
|
@@ -689,22 +516,50 @@
|
|
|
689
516
|
<tbody>
|
|
690
517
|
<tr>
|
|
691
518
|
<td class="col-md-4">
|
|
692
|
-
<a name="
|
|
519
|
+
<a name="allowResubmit"></a>
|
|
693
520
|
<span class="name">
|
|
694
521
|
<span class="modifier">Public</span>
|
|
695
|
-
|
|
696
|
-
<
|
|
522
|
+
<span class="modifier">Readonly</span>
|
|
523
|
+
<span ><b>allowResubmit</b></span>
|
|
524
|
+
<a href="#allowResubmit"><span class="icon ion-ios-link"></span></a>
|
|
697
525
|
</span>
|
|
698
526
|
</td>
|
|
699
527
|
</tr>
|
|
700
528
|
<tr>
|
|
701
529
|
<td class="col-md-4">
|
|
702
|
-
<i>Default value : </i><code>false</code>
|
|
530
|
+
<i>Default value : </i><code>input(false, { transform: coerceBoolean })</code>
|
|
703
531
|
</td>
|
|
704
532
|
</tr>
|
|
705
533
|
<tr>
|
|
706
534
|
<td class="col-md-4">
|
|
707
|
-
<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>
|
|
708
563
|
</td>
|
|
709
564
|
</tr>
|
|
710
565
|
|
|
@@ -718,6 +573,7 @@
|
|
|
718
573
|
<a name="invalid"></a>
|
|
719
574
|
<span class="name">
|
|
720
575
|
<span class="modifier">Public</span>
|
|
576
|
+
<span class="modifier">Readonly</span>
|
|
721
577
|
<span ><b>invalid</b></span>
|
|
722
578
|
<a href="#invalid"><span class="icon ion-ios-link"></span></a>
|
|
723
579
|
</span>
|
|
@@ -725,12 +581,12 @@
|
|
|
725
581
|
</tr>
|
|
726
582
|
<tr>
|
|
727
583
|
<td class="col-md-4">
|
|
728
|
-
<i>Default value : </i><code>false</code>
|
|
584
|
+
<i>Default value : </i><code>signal(false)</code>
|
|
729
585
|
</td>
|
|
730
586
|
</tr>
|
|
731
587
|
<tr>
|
|
732
588
|
<td class="col-md-4">
|
|
733
|
-
<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>
|
|
734
590
|
</td>
|
|
735
591
|
</tr>
|
|
736
592
|
|
|
@@ -756,7 +612,7 @@
|
|
|
756
612
|
</tr>
|
|
757
613
|
<tr>
|
|
758
614
|
<td class="col-md-4">
|
|
759
|
-
<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>
|
|
760
616
|
</td>
|
|
761
617
|
</tr>
|
|
762
618
|
|
|
@@ -767,126 +623,88 @@
|
|
|
767
623
|
<tbody>
|
|
768
624
|
<tr>
|
|
769
625
|
<td class="col-md-4">
|
|
770
|
-
<a name="
|
|
626
|
+
<a name="navigateAfterSubmit"></a>
|
|
771
627
|
<span class="name">
|
|
772
628
|
<span class="modifier">Public</span>
|
|
773
|
-
|
|
774
|
-
<
|
|
629
|
+
<span class="modifier">Readonly</span>
|
|
630
|
+
<span ><b>navigateAfterSubmit</b></span>
|
|
631
|
+
<a href="#navigateAfterSubmit"><span class="icon ion-ios-link"></span></a>
|
|
775
632
|
</span>
|
|
776
633
|
</td>
|
|
777
634
|
</tr>
|
|
778
635
|
<tr>
|
|
779
636
|
<td class="col-md-4">
|
|
780
|
-
<i>
|
|
781
|
-
|
|
637
|
+
<i>Default value : </i><code>input<string[]>()</code>
|
|
782
638
|
</td>
|
|
783
639
|
</tr>
|
|
784
640
|
<tr>
|
|
785
641
|
<td class="col-md-4">
|
|
786
|
-
<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>
|
|
787
643
|
</td>
|
|
788
644
|
</tr>
|
|
789
645
|
|
|
790
646
|
|
|
791
647
|
</tbody>
|
|
792
648
|
</table>
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
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>
|
|
807
667
|
|
|
808
|
-
<tr>
|
|
809
|
-
<td class="col-md-4">
|
|
810
|
-
<span class="accessor"><b>get</b><code>allowResubmit()</code></span>
|
|
811
|
-
</td>
|
|
812
|
-
</tr>
|
|
813
|
-
<tr>
|
|
814
|
-
<td class="col-md-4">
|
|
815
|
-
<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>
|
|
816
|
-
</td>
|
|
817
|
-
</tr>
|
|
818
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>
|
|
819
684
|
<tr>
|
|
820
685
|
<td class="col-md-4">
|
|
821
|
-
<
|
|
686
|
+
<i>Default value : </i><code>this.formDirective.submitting</code>
|
|
822
687
|
</td>
|
|
823
688
|
</tr>
|
|
824
|
-
<tr>
|
|
825
|
-
<td class="col-md-4">
|
|
826
|
-
<div class="io-line">Defined in <a href="" data-line="91" class="link-to-prism">src/lib/form-controls/form-controls.component.ts:91</a></div>
|
|
827
|
-
</td>
|
|
828
|
-
</tr>
|
|
829
689
|
<tr>
|
|
830
690
|
<td class="col-md-4">
|
|
831
|
-
|
|
832
|
-
<div class="io-description">
|
|
833
|
-
<b>Parameters :</b>
|
|
834
|
-
<table class="params">
|
|
835
|
-
<thead>
|
|
836
|
-
<tr>
|
|
837
|
-
<td>Name</td>
|
|
838
|
-
<td>Type</td>
|
|
839
|
-
<td>Optional</td>
|
|
840
|
-
</tr>
|
|
841
|
-
</thead>
|
|
842
|
-
<tbody>
|
|
843
|
-
<tr>
|
|
844
|
-
<td>value</td>
|
|
845
|
-
|
|
846
|
-
<td>
|
|
847
|
-
<code>boolean | string</code>
|
|
848
|
-
</td>
|
|
849
|
-
|
|
850
|
-
<td>
|
|
851
|
-
No
|
|
852
|
-
</td>
|
|
853
|
-
|
|
854
|
-
</tr>
|
|
855
|
-
</tbody>
|
|
856
|
-
</table>
|
|
857
|
-
</div>
|
|
858
|
-
<div>
|
|
859
|
-
</div>
|
|
860
|
-
<div class="io-description">
|
|
861
|
-
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
|
|
862
|
-
|
|
863
|
-
</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>
|
|
864
692
|
</td>
|
|
865
693
|
</tr>
|
|
866
|
-
|
|
867
|
-
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
</tbody>
|
|
697
|
+
</table>
|
|
868
698
|
</section>
|
|
699
|
+
|
|
869
700
|
</div>
|
|
870
701
|
|
|
871
702
|
|
|
872
703
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
873
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
874
|
-
|
|
875
|
-
ChangeDetectorRef,
|
|
876
|
-
Component,
|
|
877
|
-
EventEmitter,
|
|
878
|
-
Inject,
|
|
879
|
-
Input,
|
|
880
|
-
isDevMode,
|
|
881
|
-
OnInit,
|
|
882
|
-
Optional,
|
|
883
|
-
Output,
|
|
884
|
-
} 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';
|
|
885
706
|
import { FormDirective } from '@rxap/forms';
|
|
886
|
-
import {
|
|
887
|
-
Observable,
|
|
888
|
-
Subscription,
|
|
889
|
-
} from 'rxjs';
|
|
707
|
+
import { Subscription } from 'rxjs';
|
|
890
708
|
import {
|
|
891
709
|
clone,
|
|
892
710
|
coerceBoolean,
|
|
@@ -901,11 +719,7 @@ import {
|
|
|
901
719
|
MatSnackBarModule,
|
|
902
720
|
} from '@angular/material/snack-bar';
|
|
903
721
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
904
|
-
import {
|
|
905
|
-
AsyncPipe,
|
|
906
|
-
NgClass,
|
|
907
|
-
NgIf,
|
|
908
|
-
} from '@angular/common';
|
|
722
|
+
import { NgClass } from '@angular/common';
|
|
909
723
|
import { MatButtonModule } from '@angular/material/button';
|
|
910
724
|
declare const $localize: any;
|
|
911
725
|
|
|
@@ -915,24 +729,23 @@ declare const $localize: any;
|
|
|
915
729
|
styleUrls: ['./form-controls.component.scss'],
|
|
916
730
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
917
731
|
imports: [
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
MatSnackBarModule,
|
|
924
|
-
]
|
|
732
|
+
MatButtonModule,
|
|
733
|
+
NgClass,
|
|
734
|
+
MatProgressSpinnerModule,
|
|
735
|
+
MatSnackBarModule
|
|
736
|
+
]
|
|
925
737
|
})
|
|
926
738
|
export class FormControlsComponent<FormData> implements OnInit {
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
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[]>();
|
|
932
746
|
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
933
|
-
public close =
|
|
934
|
-
|
|
935
|
-
public submitted = new EventEmitter<FormData>();
|
|
747
|
+
public readonly close = output<FormData | FormData[] | void>();
|
|
748
|
+
public readonly submitted = output<FormData>();
|
|
936
749
|
public isDevMode = isDevMode();
|
|
937
750
|
/**
|
|
938
751
|
* Collection of successful submitted values
|
|
@@ -940,39 +753,17 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
940
753
|
*/
|
|
941
754
|
private _submitted: FormData[] = [];
|
|
942
755
|
|
|
943
|
-
|
|
944
|
-
@Inject(FormDirective)
|
|
945
|
-
private readonly formDirective: FormDirective,
|
|
946
|
-
@Inject(ChangeDetectorRef)
|
|
947
|
-
private readonly cdr: ChangeDetectorRef,
|
|
948
|
-
@Inject(MatSnackBar)
|
|
949
|
-
private readonly snackBar: MatSnackBar,
|
|
950
|
-
@Optional()
|
|
951
|
-
@Inject(Router)
|
|
952
|
-
private readonly router: Router | null,
|
|
953
|
-
) {
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
public _allowResubmit = false;
|
|
957
|
-
|
|
958
|
-
public get allowResubmit(): boolean | '' {
|
|
959
|
-
return this._allowResubmit;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
@Input()
|
|
963
|
-
public set allowResubmit(value: boolean | '') {
|
|
964
|
-
this._allowResubmit = coerceBoolean(value);
|
|
965
|
-
}
|
|
756
|
+
public readonly allowResubmit = input(false, { transform: coerceBoolean });
|
|
966
757
|
|
|
967
758
|
public ngOnInit() {
|
|
968
|
-
this.
|
|
969
|
-
this.close
|
|
759
|
+
outputToObservable(this.close)
|
|
970
760
|
.pipe(
|
|
971
761
|
take(1),
|
|
972
762
|
tap(() => {
|
|
973
|
-
|
|
763
|
+
const navigateAfterSubmit = this.navigateAfterSubmit();
|
|
764
|
+
if (navigateAfterSubmit) {
|
|
974
765
|
if (this.router) {
|
|
975
|
-
return this.router.navigate(
|
|
766
|
+
return this.router.navigate(navigateAfterSubmit);
|
|
976
767
|
} else {
|
|
977
768
|
console.warn(
|
|
978
769
|
'The Router is not available. Ensure that tha RouterModule is imported',
|
|
@@ -986,7 +777,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
986
777
|
}
|
|
987
778
|
|
|
988
779
|
public reset() {
|
|
989
|
-
this.invalid
|
|
780
|
+
this.invalid.set(false);
|
|
990
781
|
this.formDirective.reset();
|
|
991
782
|
}
|
|
992
783
|
|
|
@@ -997,17 +788,15 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
997
788
|
public submit(closeAfterSubmit?: boolean) {
|
|
998
789
|
this.formDirective.form.markAllAsDirty();
|
|
999
790
|
this.formDirective.form.markAllAsTouched();
|
|
1000
|
-
this.formDirective.cdr.markForCheck();
|
|
1001
791
|
// eslint-disable-next-line prefer-const
|
|
1002
792
|
let submitSubscription: Subscription;
|
|
1003
793
|
|
|
1004
794
|
const invalidSubmitSubscription: Subscription =
|
|
1005
|
-
this.formDirective.invalidSubmit
|
|
795
|
+
outputToObservable(this.formDirective.invalidSubmit)
|
|
1006
796
|
.pipe(
|
|
1007
797
|
take(1),
|
|
1008
798
|
tap(() => submitSubscription?.unsubscribe()),
|
|
1009
|
-
tap(() =>
|
|
1010
|
-
tap(() => this.cdr.detectChanges()),
|
|
799
|
+
tap(() => this.invalid.set(true)),
|
|
1011
800
|
tap(() =>
|
|
1012
801
|
this.snackBar.open(
|
|
1013
802
|
$localize`:@@rxap-material.form-system.form-controls.form-is-invalid:Form is not valid`,
|
|
@@ -1018,7 +807,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1018
807
|
)
|
|
1019
808
|
.subscribe();
|
|
1020
809
|
|
|
1021
|
-
submitSubscription = this.formDirective.rxapSubmit
|
|
810
|
+
submitSubscription = outputToObservable(this.formDirective.rxapSubmit)
|
|
1022
811
|
.pipe(
|
|
1023
812
|
take(1),
|
|
1024
813
|
tap((value) => {
|
|
@@ -1039,8 +828,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1039
828
|
}
|
|
1040
829
|
|
|
1041
830
|
invalidSubmitSubscription.unsubscribe();
|
|
1042
|
-
this.invalid
|
|
1043
|
-
this.cdr.detectChanges();
|
|
831
|
+
this.invalid.set(false);
|
|
1044
832
|
}),
|
|
1045
833
|
)
|
|
1046
834
|
.subscribe();
|
|
@@ -1059,53 +847,61 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1059
847
|
<pre class="line-numbers"><code class="language-html"><div class="flex flex-row justify-between items-center gap-8">
|
|
1060
848
|
<div class="flex grow-0 flex-row justify-end items-center gap-8 w-full">
|
|
1061
849
|
<button (click)="reset()"
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
850
|
+
[disabled]="submitting()"
|
|
851
|
+
class="grow-0"
|
|
852
|
+
mat-stroked-button
|
|
853
|
+
type="button">
|
|
1066
854
|
<ng-container i18n>Reset</ng-container>
|
|
1067
855
|
</button>
|
|
1068
856
|
<button (click)="cancel()"
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
857
|
+
[disabled]="submitting()"
|
|
858
|
+
color="warn"
|
|
859
|
+
class="grow-0"
|
|
860
|
+
mat-stroked-button
|
|
861
|
+
type="button">
|
|
1074
862
|
<ng-container i18n>Cancel</ng-container>
|
|
1075
863
|
</button>
|
|
1076
|
-
<button (click)="submit(!allowResubmit)"
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
864
|
+
<button (click)="submit(!allowResubmit())"
|
|
865
|
+
[disabled]="submitting()"
|
|
866
|
+
[ngClass]="{ invalid: invalid() }"
|
|
867
|
+
color="primary"
|
|
868
|
+
class="grow-0"
|
|
869
|
+
mat-raised-button
|
|
870
|
+
type="button">
|
|
1083
871
|
<span class="flex flex-row items-center gap-2">
|
|
1084
872
|
<span class="grow-0">
|
|
1085
873
|
<ng-container i18n>Submit</ng-container>
|
|
1086
874
|
</span>
|
|
1087
|
-
|
|
1088
|
-
|
|
875
|
+
@if (submitting()) {
|
|
876
|
+
<mat-spinner [diameter]="15" color="accent" class="grow-0"
|
|
877
|
+
mode="indeterminate"></mat-spinner>
|
|
878
|
+
}
|
|
1089
879
|
</span>
|
|
1090
880
|
</button>
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
<span class="
|
|
1100
|
-
<
|
|
881
|
+
@if (allowResubmit()) {
|
|
882
|
+
<button (click)="submit(true)"
|
|
883
|
+
[disabled]="submitting()"
|
|
884
|
+
[ngClass]="{ invalid: invalid() }"
|
|
885
|
+
color="primary"
|
|
886
|
+
class="grow-0"
|
|
887
|
+
mat-raised-button
|
|
888
|
+
type="button">
|
|
889
|
+
<span class="flex flex-row items-center gap-2">
|
|
890
|
+
<span class="grow-0">
|
|
891
|
+
<ng-container i18n>Submit and Close</ng-container>
|
|
892
|
+
</span>
|
|
893
|
+
@if (submitting()) {
|
|
894
|
+
<mat-spinner [diameter]="15" color="accent" class="grow-0"
|
|
895
|
+
mode="indeterminate"></mat-spinner>
|
|
896
|
+
}
|
|
1101
897
|
</span>
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
898
|
+
</button>
|
|
899
|
+
}
|
|
900
|
+
@if (isDevMode) {
|
|
901
|
+
<button (click)="logCurrentFormState()" mat-button type="button" class="grow-0">
|
|
902
|
+
Current Form State
|
|
903
|
+
</button>
|
|
904
|
+
}
|
|
1109
905
|
</div>
|
|
1110
906
|
</div>
|
|
1111
907
|
</code></pre>
|
|
@@ -1151,7 +947,7 @@ export class FormControlsComponent<FormData> implements OnInit {
|
|
|
1151
947
|
<script src="../js/libs/htmlparser.js"></script>
|
|
1152
948
|
<script src="../js/libs/deep-iterator.js"></script>
|
|
1153
949
|
<script>
|
|
1154
|
-
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()"
|
|
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>'
|
|
1155
951
|
var COMPONENTS = [{'name': 'FormControlsComponent', 'selector': 'rxap-form-controls'}];
|
|
1156
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]'}];
|
|
1157
953
|
var ACTUAL_COMPONENT = {'name': 'FormControlsComponent'};
|