@firestitch/form 12.4.18 → 12.4.20

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,4 +1,4 @@
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';
@@ -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;
@@ -60,7 +61,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
60
61
  private _status$;
61
62
  private _destroy$;
62
63
  private _confirmed;
63
- 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);
64
65
  get submitting(): boolean;
65
66
  get validating(): boolean;
66
67
  get completing(): boolean;
@@ -119,6 +120,6 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
119
120
  private _handleError;
120
121
  private _registerCanDeactivateGuard;
121
122
  private _cleanupCanDeactivate;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDirective, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDirective, [null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
123
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"]>;
124
125
  }
@@ -577,13 +577,14 @@
577
577
  })(exports.FormStatus || (exports.FormStatus = {}));
578
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;
@@ -720,8 +721,12 @@
720
721
  }
721
722
  };
722
723
  FsFormDirective.prototype.registerSubmit = function (fn) {
724
+ var _this = this;
723
725
  this.submit = fn;
724
- this.submitRegistered.emit();
726
+ setTimeout(function () {
727
+ _this.submitRegistered.emit();
728
+ _this._cdRef.markForCheck();
729
+ });
725
730
  };
726
731
  FsFormDirective.prototype.ngAfterContentInit = function () {
727
732
  this._registerConfirm();
@@ -1217,7 +1222,7 @@
1217
1222
  };
1218
1223
  return FsFormDirective;
1219
1224
  }());
1220
- 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: i2$1.MatDialogRef, optional: true }, { token: i7.DrawerRef, optional: true }, { token: i3__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1225
+ 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 });
1221
1226
  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 });
1222
1227
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDirective, decorators: [{
1223
1228
  type: i0.Directive,
@@ -1228,7 +1233,7 @@
1228
1233
  return [{ type: i1__namespace$1.NgForm, decorators: [{
1229
1234
  type: i0.Inject,
1230
1235
  args: [i1$1.NgForm]
1231
- }] }, { type: FsForm }, { type: i0__namespace.ElementRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.FsPrompt }, { type: i0__namespace.NgZone }, { type: i2__namespace$1.MatDialogRef, decorators: [{
1236
+ }] }, { 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: [{
1232
1237
  type: i0.Optional
1233
1238
  }, {
1234
1239
  type: i0.Inject,