@firestitch/form 12.3.3 → 12.3.4
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/app/directives/form/form.directive.d.ts +2 -1
- package/bundles/firestitch-form.umd.js +17 -3
- package/bundles/firestitch-form.umd.js.map +1 -1
- package/esm2015/app/directives/form/form.directive.js +17 -4
- package/fesm2015/firestitch-form.js +16 -3
- package/fesm2015/firestitch-form.js.map +1 -1
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
|
|
|
44
44
|
submitted: EventEmitter<SubmitEvent>;
|
|
45
45
|
reseted: EventEmitter<SubmitEvent>;
|
|
46
46
|
cleared: EventEmitter<SubmitEvent>;
|
|
47
|
-
|
|
47
|
+
fsFormClass: boolean;
|
|
48
48
|
formDialogClose: QueryList<FsFormDialogCloseDirective>;
|
|
49
49
|
private _tabGroups;
|
|
50
50
|
private _buttons;
|
|
@@ -80,6 +80,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
|
|
|
80
80
|
addButton(button: FsButtonDirective): void;
|
|
81
81
|
removeButton(button: FsButtonDirective): void;
|
|
82
82
|
private _listenSubmit;
|
|
83
|
+
private _listenFormStatus;
|
|
83
84
|
private _listenWindowClose;
|
|
84
85
|
private _listenHotKeys;
|
|
85
86
|
private _formClose;
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
this.submitted = new i0.EventEmitter();
|
|
549
549
|
this.reseted = new i0.EventEmitter();
|
|
550
550
|
this.cleared = new i0.EventEmitter();
|
|
551
|
-
this.
|
|
551
|
+
this.fsFormClass = true;
|
|
552
552
|
this._tabGroups = new i0.QueryList();
|
|
553
553
|
this._buttons = new i0.QueryList();
|
|
554
554
|
this._dialogBackdropEscape = false;
|
|
@@ -644,6 +644,7 @@
|
|
|
644
644
|
this._listenHotKeys();
|
|
645
645
|
this._listenWindowClose();
|
|
646
646
|
this._listenSubmit();
|
|
647
|
+
this._listenFormStatus();
|
|
647
648
|
if (!this.autocomplete) {
|
|
648
649
|
this._registerAutocomplete();
|
|
649
650
|
}
|
|
@@ -738,6 +739,19 @@
|
|
|
738
739
|
}), operators.takeUntil(this._destroy$))
|
|
739
740
|
.subscribe(function () { });
|
|
740
741
|
};
|
|
742
|
+
FsFormDirective.prototype._listenFormStatus = function () {
|
|
743
|
+
var _this = this;
|
|
744
|
+
this._status$
|
|
745
|
+
.pipe(operators.takeUntil(this._destroy$))
|
|
746
|
+
.subscribe(function (formStatus) {
|
|
747
|
+
var cls = [exports.FormStatus.Submitting, exports.FormStatus.Validating];
|
|
748
|
+
var classList = _this._element.nativeElement.classList;
|
|
749
|
+
classList.remove.apply(classList, __spreadArray([], __read(cls)));
|
|
750
|
+
if (cls.indexOf(formStatus) !== -1) {
|
|
751
|
+
classList.add(formStatus);
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
};
|
|
741
755
|
FsFormDirective.prototype._listenWindowClose = function () {
|
|
742
756
|
var _this = this;
|
|
743
757
|
rxjs.fromEvent(window, 'beforeunload')
|
|
@@ -1107,7 +1121,7 @@
|
|
|
1107
1121
|
return FsFormDirective;
|
|
1108
1122
|
}());
|
|
1109
1123
|
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: i3__namespace.FsPrompt }, { token: i0__namespace.NgZone }, { token: i2$1.MatDialogRef, optional: true }, { token: i6.DrawerRef, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1110
|
-
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" }, outputs: { submitEvent: "fsForm", invalid: "invalid", valid: "valid", submitted: "submitted", reseted: "reseted", cleared: "cleared" }, host: { properties: { "class.fs-form": "this.
|
|
1124
|
+
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" }, 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 });
|
|
1111
1125
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDirective, decorators: [{
|
|
1112
1126
|
type: i0.Directive,
|
|
1113
1127
|
args: [{
|
|
@@ -1173,7 +1187,7 @@
|
|
|
1173
1187
|
type: i0.Output
|
|
1174
1188
|
}], cleared: [{
|
|
1175
1189
|
type: i0.Output
|
|
1176
|
-
}],
|
|
1190
|
+
}], fsFormClass: [{
|
|
1177
1191
|
type: i0.HostBinding,
|
|
1178
1192
|
args: ['class.fs-form']
|
|
1179
1193
|
}], formDialogClose: [{
|