@firestitch/form 12.4.17 → 12.4.19

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.
@@ -1,17 +1,17 @@
1
- import { AfterContentInit, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
1
+ import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
2
2
  import { NgForm } from '@angular/forms';
3
3
  import { ActivatedRoute } from '@angular/router';
4
4
  import { MatDialogRef } from '@angular/material/dialog';
5
5
  import { MatTabGroup } from '@angular/material/tabs';
6
+ import { DrawerRef } from '@firestitch/drawer';
6
7
  import { FsMessage } from '@firestitch/message';
7
8
  import { FsPrompt } from '@firestitch/prompt';
8
- import { DrawerRef } from '@firestitch/drawer';
9
9
  import { Observable } from 'rxjs';
10
- import { FsFormDialogCloseDirective } from '../form-dialog-close.directive';
10
+ import { FsForm } from '../../services/fsform.service';
11
11
  import { FsButtonDirective } from '../button.directive';
12
- import { ConfirmConfig } from './../../interfaces';
12
+ import { FsFormDialogCloseDirective } from '../form-dialog-close.directive';
13
13
  import { ConfirmResult } from './../../enums/confirm-result';
14
- import { FsForm } from '../../services/fsform.service';
14
+ import { ConfirmConfig } from './../../interfaces';
15
15
  import { SubmitEvent } from './../../interfaces/submit-event';
16
16
  import * as i0 from "@angular/core";
17
17
  export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentInit, OnChanges {
@@ -21,6 +21,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
21
21
  private _message;
22
22
  private _prompt;
23
23
  private _ngZone;
24
+ private _cdRef;
24
25
  private _dialogRef;
25
26
  private _drawerRef;
26
27
  private _route;
@@ -47,6 +48,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
47
48
  submitted: EventEmitter<SubmitEvent>;
48
49
  reseted: EventEmitter<SubmitEvent>;
49
50
  cleared: EventEmitter<SubmitEvent>;
51
+ submitRegistered: EventEmitter<any>;
50
52
  fsFormClass: boolean;
51
53
  formDialogClose: QueryList<FsFormDialogCloseDirective>;
52
54
  private _tabGroups;
@@ -59,7 +61,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
59
61
  private _status$;
60
62
  private _destroy$;
61
63
  private _confirmed;
62
- constructor(ngForm: NgForm, _form: FsForm, _element: ElementRef, _message: FsMessage, _prompt: FsPrompt, _ngZone: NgZone, _dialogRef: MatDialogRef<any>, _drawerRef: DrawerRef<any>, _route: ActivatedRoute);
64
+ constructor(ngForm: NgForm, _form: FsForm, _element: ElementRef, _message: FsMessage, _prompt: FsPrompt, _ngZone: NgZone, _cdRef: ChangeDetectorRef, _dialogRef: MatDialogRef<any>, _drawerRef: DrawerRef<any>, _route: ActivatedRoute);
63
65
  get submitting(): boolean;
64
66
  get validating(): boolean;
65
67
  get completing(): boolean;
@@ -69,6 +71,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
69
71
  private get _submitter();
70
72
  ngOnInit(): void;
71
73
  ngOnChanges(changes: SimpleChanges): void;
74
+ registerSubmit(fn: () => Observable<any>): void;
72
75
  ngAfterContentInit(): void;
73
76
  ngOnDestroy(): void;
74
77
  createSnapshot(): void;
@@ -117,6 +120,6 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
117
120
  private _handleError;
118
121
  private _registerCanDeactivateGuard;
119
122
  private _cleanupCanDeactivate;
120
- static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDirective, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
121
- static ɵdir: i0.ɵɵDirectiveDeclaration<FsFormDirective, "[fsForm]", never, { "wrapperSelector": "wrapperSelector"; "messageSelector": "messageSelector"; "hintSelector": "hintSelector"; "labelSelector": "labelSelector"; "autocomplete": "autocomplete"; "shortcuts": "shortcuts"; "confirm": "confirm"; "confirmDialog": "confirmDialog"; "confirmDrawer": "confirmDrawer"; "confirmBrowser": "confirmBrowser"; "confirmTabs": "confirmTabs"; "dirtySubmitButton": "dirtySubmitButton"; "submit": "submit"; "successDelay": "successDelay"; "errorDelay": "errorDelay"; "tabGroup": "tabGroup"; "deactivationGuard": "deactivationGuard"; }, { "submitEvent": "fsForm"; "invalid": "invalid"; "valid": "valid"; "submitted": "submitted"; "reseted": "reseted"; "cleared": "cleared"; }, ["formDialogClose", "_tabGroups"]>;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDirective, [null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
124
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FsFormDirective, "[fsForm]", never, { "wrapperSelector": "wrapperSelector"; "messageSelector": "messageSelector"; "hintSelector": "hintSelector"; "labelSelector": "labelSelector"; "autocomplete": "autocomplete"; "shortcuts": "shortcuts"; "confirm": "confirm"; "confirmDialog": "confirmDialog"; "confirmDrawer": "confirmDrawer"; "confirmBrowser": "confirmBrowser"; "confirmTabs": "confirmTabs"; "dirtySubmitButton": "dirtySubmitButton"; "submit": "submit"; "successDelay": "successDelay"; "errorDelay": "errorDelay"; "tabGroup": "tabGroup"; "deactivationGuard": "deactivationGuard"; }, { "submitEvent": "fsForm"; "invalid": "invalid"; "valid": "valid"; "submitted": "submitted"; "reseted": "reseted"; "cleared": "cleared"; "submitRegistered": "submitRegistered"; }, ["formDialogClose", "_tabGroups"]>;
122
125
  }
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/button'), require('@angular/material/dialog'), require('@angular/material/core'), require('@angular/material/tabs'), require('@firestitch/message'), require('@firestitch/common'), require('@firestitch/drawer'), require('rxjs'), require('rxjs/operators'), require('@firestitch/prompt'), require('@angular/router'), require('lodash-es'), require('date-fns')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/form', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/button', '@angular/material/dialog', '@angular/material/core', '@angular/material/tabs', '@firestitch/message', '@firestitch/common', '@firestitch/drawer', 'rxjs', 'rxjs/operators', '@firestitch/prompt', '@angular/router', 'lodash-es', 'date-fns'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.form = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.button, global.ng.material.dialog, global.ng.material.core, global.ng.material.tabs, global.i2, global.common, global.i7, global.rxjs, global.rxjs.operators, global.i1$1, global.ng.router, global.lodashEs, global.dateFns));
5
- })(this, (function (exports, i0, i4, i1, i1$2, i2$1, core, tabs, i2, common, i7, rxjs, operators, i1$1, i3, lodashEs, dateFns) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/button'), require('@angular/material/dialog'), require('@angular/material/core'), require('@angular/material/tabs'), require('@firestitch/common'), require('@firestitch/drawer'), require('@firestitch/message'), require('rxjs'), require('rxjs/operators'), require('@firestitch/prompt'), require('@angular/router'), require('lodash-es'), require('date-fns')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/form', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/button', '@angular/material/dialog', '@angular/material/core', '@angular/material/tabs', '@firestitch/common', '@firestitch/drawer', '@firestitch/message', 'rxjs', 'rxjs/operators', '@firestitch/prompt', '@angular/router', 'lodash-es', 'date-fns'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.form = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.button, global.ng.material.dialog, global.ng.material.core, global.ng.material.tabs, global.common, global.i7, global.i2, global.rxjs, global.rxjs.operators, global.i1, global.ng.router, global.lodashEs, global.dateFns));
5
+ })(this, (function (exports, i0, i4, i1$1, i1$2, i2$1, core, tabs, common, i7, i2, rxjs, operators, i1, i3, lodashEs, dateFns) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,12 +24,12 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
27
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1);
27
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
28
28
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
29
29
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
30
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
32
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
31
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
32
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
33
33
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
34
34
 
35
35
  /*! *****************************************************************************
@@ -428,77 +428,10 @@
428
428
  });
429
429
  }
430
430
 
431
- var FsFormDialogCloseDirective = /** @class */ (function () {
432
- function FsFormDialogCloseDirective() {
433
- this.clicked$ = new rxjs.Subject();
434
- this.registered = false;
435
- this.type = 'button';
436
- }
437
- FsFormDialogCloseDirective.prototype.click = function () {
438
- this.clicked$.next();
439
- };
440
- FsFormDialogCloseDirective.prototype.ngOnDestroy = function () {
441
- this.clicked$.complete();
442
- };
443
- return FsFormDialogCloseDirective;
444
- }());
445
- FsFormDialogCloseDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogCloseDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
446
- FsFormDialogCloseDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogCloseDirective, selector: "[fsFormDialogClose],[fs-form-dialog-close]", host: { listeners: { "click": "click($event.target)" }, properties: { "attr.type": "this.type" } }, ngImport: i0__namespace });
447
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogCloseDirective, decorators: [{
448
- type: i0.Directive,
449
- args: [{
450
- selector: '[fsFormDialogClose],[fs-form-dialog-close]'
451
- }]
452
- }], propDecorators: { type: [{
453
- type: i0.HostBinding,
454
- args: ['attr.type']
455
- }], click: [{
456
- type: i0.HostListener,
457
- args: ['click', ['$event.target']]
458
- }] } });
459
-
460
- exports.FormStatus = void 0;
461
- (function (FormStatus) {
462
- FormStatus["Valid"] = "valid";
463
- FormStatus["Invalid"] = "invalid";
464
- FormStatus["Validating"] = "validating";
465
- FormStatus["Submitting"] = "submitting";
466
- FormStatus["Submitted"] = "submitted";
467
- FormStatus["Error"] = "error";
468
- FormStatus["Success"] = "success";
469
- FormStatus["Completing"] = "completing";
470
- })(exports.FormStatus || (exports.FormStatus = {}));
471
-
472
431
  function confirmResultContinue(result) {
473
432
  return result === exports.ConfirmResult.Discard || result === exports.ConfirmResult.Save || result === exports.ConfirmResult.Pristine;
474
433
  }
475
434
 
476
- function getFormErrors(control, key) {
477
- var _a;
478
- var errors = null;
479
- if (control.invalid && control.errors) {
480
- errors = (_a = {},
481
- _a[key] = Object.assign({}, control.errors),
482
- _a);
483
- }
484
- if (control instanceof i1.FormGroup) {
485
- Object.entries(control.controls)
486
- .forEach(function (_a) {
487
- var _b = __read(_a, 2), name = _b[0], childControl = _b[1];
488
- var childErrors = getFormErrors(childControl, name);
489
- if (childErrors) {
490
- if (!errors) {
491
- errors = Object.assign({}, childErrors);
492
- }
493
- else {
494
- Object.assign(errors, childErrors);
495
- }
496
- }
497
- });
498
- }
499
- return errors;
500
- }
501
-
502
435
  function getActiveRoute(route) {
503
436
  while (route.firstChild) {
504
437
  route = route.firstChild;
@@ -576,14 +509,82 @@
576
509
  }]
577
510
  }], ctorParameters: function () { return [{ type: i1__namespace.FsPrompt }, { type: FsForm }, { type: i3__namespace.ActivatedRoute }]; } });
578
511
 
512
+ function getFormErrors(control, key) {
513
+ var _a;
514
+ var errors = null;
515
+ if (control.invalid && control.errors) {
516
+ errors = (_a = {},
517
+ _a[key] = Object.assign({}, control.errors),
518
+ _a);
519
+ }
520
+ if (control instanceof i1$1.FormGroup) {
521
+ Object.entries(control.controls)
522
+ .forEach(function (_a) {
523
+ var _b = __read(_a, 2), name = _b[0], childControl = _b[1];
524
+ var childErrors = getFormErrors(childControl, name);
525
+ if (childErrors) {
526
+ if (!errors) {
527
+ errors = Object.assign({}, childErrors);
528
+ }
529
+ else {
530
+ Object.assign(errors, childErrors);
531
+ }
532
+ }
533
+ });
534
+ }
535
+ return errors;
536
+ }
537
+
538
+ var FsFormDialogCloseDirective = /** @class */ (function () {
539
+ function FsFormDialogCloseDirective() {
540
+ this.clicked$ = new rxjs.Subject();
541
+ this.registered = false;
542
+ this.type = 'button';
543
+ }
544
+ FsFormDialogCloseDirective.prototype.click = function () {
545
+ this.clicked$.next();
546
+ };
547
+ FsFormDialogCloseDirective.prototype.ngOnDestroy = function () {
548
+ this.clicked$.complete();
549
+ };
550
+ return FsFormDialogCloseDirective;
551
+ }());
552
+ FsFormDialogCloseDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogCloseDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
553
+ FsFormDialogCloseDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogCloseDirective, selector: "[fsFormDialogClose],[fs-form-dialog-close]", host: { listeners: { "click": "click($event.target)" }, properties: { "attr.type": "this.type" } }, ngImport: i0__namespace });
554
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogCloseDirective, decorators: [{
555
+ type: i0.Directive,
556
+ args: [{
557
+ selector: '[fsFormDialogClose],[fs-form-dialog-close]'
558
+ }]
559
+ }], propDecorators: { type: [{
560
+ type: i0.HostBinding,
561
+ args: ['attr.type']
562
+ }], click: [{
563
+ type: i0.HostListener,
564
+ args: ['click', ['$event.target']]
565
+ }] } });
566
+
567
+ exports.FormStatus = void 0;
568
+ (function (FormStatus) {
569
+ FormStatus["Valid"] = "valid";
570
+ FormStatus["Invalid"] = "invalid";
571
+ FormStatus["Validating"] = "validating";
572
+ FormStatus["Submitting"] = "submitting";
573
+ FormStatus["Submitted"] = "submitted";
574
+ FormStatus["Error"] = "error";
575
+ FormStatus["Success"] = "success";
576
+ FormStatus["Completing"] = "completing";
577
+ })(exports.FormStatus || (exports.FormStatus = {}));
578
+
579
579
  var FsFormDirective = /** @class */ (function () {
580
- function FsFormDirective(ngForm, _form, _element, _message, _prompt, _ngZone, _dialogRef, _drawerRef, _route) {
580
+ function FsFormDirective(ngForm, _form, _element, _message, _prompt, _ngZone, _cdRef, _dialogRef, _drawerRef, _route) {
581
581
  this.ngForm = ngForm;
582
582
  this._form = _form;
583
583
  this._element = _element;
584
584
  this._message = _message;
585
585
  this._prompt = _prompt;
586
586
  this._ngZone = _ngZone;
587
+ this._cdRef = _cdRef;
587
588
  this._dialogRef = _dialogRef;
588
589
  this._drawerRef = _drawerRef;
589
590
  this._route = _route;
@@ -608,6 +609,7 @@
608
609
  this.submitted = new i0.EventEmitter();
609
610
  this.reseted = new i0.EventEmitter();
610
611
  this.cleared = new i0.EventEmitter();
612
+ this.submitRegistered = new i0.EventEmitter();
611
613
  this.fsFormClass = true;
612
614
  this._tabGroups = new i0.QueryList();
613
615
  this._buttons = new i0.QueryList();
@@ -718,6 +720,11 @@
718
720
  this._updateDirtySubmitButtons();
719
721
  }
720
722
  };
723
+ FsFormDirective.prototype.registerSubmit = function (fn) {
724
+ this.submit = fn;
725
+ this.submitRegistered.emit();
726
+ this._cdRef.markForCheck();
727
+ };
721
728
  FsFormDirective.prototype.ngAfterContentInit = function () {
722
729
  this._registerConfirm();
723
730
  this._registerConfirmDialogClose();
@@ -1212,8 +1219,8 @@
1212
1219
  };
1213
1220
  return FsFormDirective;
1214
1221
  }());
1215
- FsFormDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDirective, deps: [{ token: i1.NgForm }, { token: FsForm }, { token: i0__namespace.ElementRef }, { token: i2__namespace.FsMessage }, { token: i1__namespace.FsPrompt }, { token: i0__namespace.NgZone }, { token: i2$1.MatDialogRef, optional: true }, { token: i7.DrawerRef, optional: true }, { token: i3__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1216
- FsFormDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDirective, selector: "[fsForm]", inputs: { wrapperSelector: "wrapperSelector", messageSelector: "messageSelector", hintSelector: "hintSelector", labelSelector: "labelSelector", autocomplete: "autocomplete", shortcuts: "shortcuts", confirm: "confirm", confirmDialog: "confirmDialog", confirmDrawer: "confirmDrawer", confirmBrowser: "confirmBrowser", confirmTabs: "confirmTabs", dirtySubmitButton: "dirtySubmitButton", submit: "submit", successDelay: "successDelay", errorDelay: "errorDelay", tabGroup: "tabGroup", deactivationGuard: "deactivationGuard" }, outputs: { submitEvent: "fsForm", invalid: "invalid", valid: "valid", submitted: "submitted", reseted: "reseted", cleared: "cleared" }, host: { properties: { "class.fs-form": "this.fsFormClass" } }, queries: [{ propertyName: "formDialogClose", predicate: FsFormDialogCloseDirective, descendants: true }, { propertyName: "_tabGroups", predicate: tabs.MatTabGroup, descendants: true }], usesOnChanges: true, ngImport: i0__namespace });
1222
+ FsFormDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDirective, deps: [{ token: i1$1.NgForm }, { token: FsForm }, { token: i0__namespace.ElementRef }, { token: i2__namespace.FsMessage }, { token: i1__namespace.FsPrompt }, { token: i0__namespace.NgZone }, { token: i0__namespace.ChangeDetectorRef }, { token: i2$1.MatDialogRef, optional: true }, { token: i7.DrawerRef, optional: true }, { token: i3__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1223
+ FsFormDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDirective, selector: "[fsForm]", inputs: { wrapperSelector: "wrapperSelector", messageSelector: "messageSelector", hintSelector: "hintSelector", labelSelector: "labelSelector", autocomplete: "autocomplete", shortcuts: "shortcuts", confirm: "confirm", confirmDialog: "confirmDialog", confirmDrawer: "confirmDrawer", confirmBrowser: "confirmBrowser", confirmTabs: "confirmTabs", dirtySubmitButton: "dirtySubmitButton", submit: "submit", successDelay: "successDelay", errorDelay: "errorDelay", tabGroup: "tabGroup", deactivationGuard: "deactivationGuard" }, outputs: { submitEvent: "fsForm", invalid: "invalid", valid: "valid", submitted: "submitted", reseted: "reseted", cleared: "cleared", submitRegistered: "submitRegistered" }, host: { properties: { "class.fs-form": "this.fsFormClass" } }, queries: [{ propertyName: "formDialogClose", predicate: FsFormDialogCloseDirective, descendants: true }, { propertyName: "_tabGroups", predicate: tabs.MatTabGroup, descendants: true }], usesOnChanges: true, ngImport: i0__namespace });
1217
1224
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDirective, decorators: [{
1218
1225
  type: i0.Directive,
1219
1226
  args: [{
@@ -1222,8 +1229,8 @@
1222
1229
  }], ctorParameters: function () {
1223
1230
  return [{ type: i1__namespace$1.NgForm, decorators: [{
1224
1231
  type: i0.Inject,
1225
- args: [i1.NgForm]
1226
- }] }, { type: FsForm }, { type: i0__namespace.ElementRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.FsPrompt }, { type: i0__namespace.NgZone }, { type: i2__namespace$1.MatDialogRef, decorators: [{
1232
+ args: [i1$1.NgForm]
1233
+ }] }, { type: FsForm }, { type: i0__namespace.ElementRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.FsPrompt }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$1.MatDialogRef, decorators: [{
1227
1234
  type: i0.Optional
1228
1235
  }, {
1229
1236
  type: i0.Inject,
@@ -1281,6 +1288,8 @@
1281
1288
  type: i0.Output
1282
1289
  }], cleared: [{
1283
1290
  type: i0.Output
1291
+ }], submitRegistered: [{
1292
+ type: i0.Output
1284
1293
  }], fsFormClass: [{
1285
1294
  type: i0.HostBinding,
1286
1295
  args: ['class.fs-form']
@@ -1614,7 +1623,7 @@
1614
1623
  };
1615
1624
  FsFormRequiredDirective.prototype.validate = function (control) {
1616
1625
  if (this.required) {
1617
- return i1.Validators.required(this._control);
1626
+ return i1$1.Validators.required(this._control);
1618
1627
  }
1619
1628
  else {
1620
1629
  return null;
@@ -1773,7 +1782,7 @@
1773
1782
  this._control.updateValueAndValidity();
1774
1783
  };
1775
1784
  FsFormMinDirective.prototype.validate = function (control) {
1776
- return FsValidators.numeric(this._control) || i1.Validators.min(parseFloat(this.fsFormMin))(this._control);
1785
+ return FsValidators.numeric(this._control) || i1$1.Validators.min(parseFloat(this.fsFormMin))(this._control);
1777
1786
  };
1778
1787
  return FsFormMinDirective;
1779
1788
  }(FsControlDirective));
@@ -1812,7 +1821,7 @@
1812
1821
  this._control.updateValueAndValidity();
1813
1822
  };
1814
1823
  FsFormMaxDirective.prototype.validate = function (control) {
1815
- return FsValidators.numeric(this._control) || i1.Validators.max(this.fsFormMax)(this._control);
1824
+ return FsValidators.numeric(this._control) || i1$1.Validators.max(this.fsFormMax)(this._control);
1816
1825
  };
1817
1826
  return FsFormMaxDirective;
1818
1827
  }(FsControlDirective));
@@ -1851,7 +1860,7 @@
1851
1860
  this._control.updateValueAndValidity();
1852
1861
  };
1853
1862
  FsFormMinLengthDirective.prototype.validate = function (control) {
1854
- return i1.Validators.minLength(this.fsFormMinLength)(this._control);
1863
+ return i1$1.Validators.minLength(this.fsFormMinLength)(this._control);
1855
1864
  };
1856
1865
  return FsFormMinLengthDirective;
1857
1866
  }(FsControlDirective));
@@ -1890,7 +1899,7 @@
1890
1899
  this._control.updateValueAndValidity();
1891
1900
  };
1892
1901
  FsFormMaxLengthDirective.prototype.validate = function (control) {
1893
- return i1.Validators.maxLength(this.fsFormMaxLength)(this._control);
1902
+ return i1$1.Validators.maxLength(this.fsFormMaxLength)(this._control);
1894
1903
  };
1895
1904
  return FsFormMaxLengthDirective;
1896
1905
  }(FsControlDirective));
@@ -2205,7 +2214,7 @@
2205
2214
  this._control.updateValueAndValidity();
2206
2215
  };
2207
2216
  FsFormPatternDirective.prototype.validate = function (control) {
2208
- return i1.Validators.pattern(this.fsFormPattern)(this._control);
2217
+ return i1$1.Validators.pattern(this.fsFormPattern)(this._control);
2209
2218
  };
2210
2219
  return FsFormPatternDirective;
2211
2220
  }(FsControlDirective));
@@ -2695,7 +2704,7 @@
2695
2704
  return FsFormDialogActionsComponent;
2696
2705
  }());
2697
2706
  FsFormDialogActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogActionsComponent, deps: [{ token: FsFormDirective, optional: true }, { token: i2__namespace$1.MatDialogRef, optional: true }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
2698
- FsFormDialogActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: { save: "save", create: "create", close: "close", done: "done", closeData: "closeData", name: "name" }, ngImport: i0__namespace, template: "<div class=\"form-buttons\" [ngClass]=\"{ 'save-create': save || create }\">\n <ng-container *ngIf=\"save\">\n <button\n mat-button\n type=\"submit\"\n color=\"primary\"\n [name]=\"name\">\n {{create ? 'Create' : 'Save'}}\n </button>\n <button\n mat-button\n type=\"button\"\n [disabled]=\"close && !dirty && !create\"\n [matDialogClose]=\"null\">\n Cancel\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"done\">\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [matDialogClose]=\"null\">\n Done\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"save || create\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"close\">\n <button\n mat-button\n type=\"button\"\n class=\"close\"\n [color]=\"dirty ? 'basic' : 'primary'\"\n (click)=\"closeClick()\">\n Close\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"!(save || create)\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </ng-container>\n</div>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:100%}.form-buttons.save-create .close{float:right}\n"], components: [{ type: i1__namespace$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i2__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2707
+ FsFormDialogActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: { save: "save", create: "create", close: "close", done: "done", closeData: "closeData", name: "name" }, ngImport: i0__namespace, template: "<div class=\"form-buttons\" [ngClass]=\"{ 'save-create': save || create }\">\n <ng-container *ngIf=\"save || create\">\n <button\n mat-button\n type=\"submit\"\n color=\"primary\"\n [name]=\"name\">\n {{create ? 'Create' : 'Save'}}\n </button>\n <button\n mat-button\n type=\"button\"\n [disabled]=\"close && !dirty && !create\"\n [matDialogClose]=\"null\">\n Cancel\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"done\">\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [matDialogClose]=\"null\">\n Done\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"save || create\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"close\">\n <button\n mat-button\n type=\"button\"\n class=\"close\"\n [color]=\"dirty ? 'basic' : 'primary'\"\n (click)=\"closeClick()\">\n Close\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"!(save || create)\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </ng-container>\n</div>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:100%}.form-buttons.save-create .close{float:right}\n"], components: [{ type: i1__namespace$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i2__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2699
2708
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogActionsComponent, decorators: [{
2700
2709
  type: i0.Component,
2701
2710
  args: [{
@@ -2830,7 +2839,7 @@
2830
2839
  FsFormNoFsValidatorsDirective,
2831
2840
  FsButtonDirective,
2832
2841
  FsSubmitButtonDirective], imports: [i4.CommonModule,
2833
- i1.FormsModule,
2842
+ i1$1.FormsModule,
2834
2843
  i1$2.MatButtonModule,
2835
2844
  i2$1.MatDialogModule], exports: [FsFormDirective,
2836
2845
  FsControlDirective,
@@ -2864,7 +2873,7 @@
2864
2873
  },
2865
2874
  ], imports: [[
2866
2875
  i4.CommonModule,
2867
- i1.FormsModule,
2876
+ i1$1.FormsModule,
2868
2877
  i1$2.MatButtonModule,
2869
2878
  i2$1.MatDialogModule,
2870
2879
  ]] });
@@ -2873,7 +2882,7 @@
2873
2882
  args: [{
2874
2883
  imports: [
2875
2884
  i4.CommonModule,
2876
- i1.FormsModule,
2885
+ i1$1.FormsModule,
2877
2886
  i1$2.MatButtonModule,
2878
2887
  i2$1.MatDialogModule,
2879
2888
  ],