@firestitch/form 12.3.3 → 12.3.5
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 +29 -7
- package/bundles/firestitch-form.umd.js.map +1 -1
- package/esm2015/app/directives/button.directive.js +13 -5
- package/esm2015/app/directives/form/form.directive.js +17 -4
- package/fesm2015/firestitch-form.js +28 -7
- 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: [{
|
|
@@ -2391,15 +2405,21 @@
|
|
|
2391
2405
|
};
|
|
2392
2406
|
FsButtonDirective.prototype.process = function () {
|
|
2393
2407
|
this.setClass('process');
|
|
2394
|
-
this._matButton
|
|
2408
|
+
if (this._matButton) {
|
|
2409
|
+
this._matButton.disableRipple = true;
|
|
2410
|
+
}
|
|
2395
2411
|
};
|
|
2396
2412
|
FsButtonDirective.prototype.success = function () {
|
|
2397
2413
|
this.setClass('success');
|
|
2398
|
-
this._matButton
|
|
2414
|
+
if (this._matButton) {
|
|
2415
|
+
this._matButton.disableRipple = false;
|
|
2416
|
+
}
|
|
2399
2417
|
};
|
|
2400
2418
|
FsButtonDirective.prototype.error = function () {
|
|
2401
2419
|
this.setClass('error');
|
|
2402
|
-
this._matButton
|
|
2420
|
+
if (this._matButton) {
|
|
2421
|
+
this._matButton.disableRipple = false;
|
|
2422
|
+
}
|
|
2403
2423
|
};
|
|
2404
2424
|
FsButtonDirective.prototype.setClass = function (cls) {
|
|
2405
2425
|
var svg = this._getSvg(cls);
|
|
@@ -2426,7 +2446,9 @@
|
|
|
2426
2446
|
.forEach(function (el) {
|
|
2427
2447
|
el.remove();
|
|
2428
2448
|
});
|
|
2429
|
-
this._matButton
|
|
2449
|
+
if (this._matButton) {
|
|
2450
|
+
this._matButton.disableRipple = false;
|
|
2451
|
+
}
|
|
2430
2452
|
this._resetClass();
|
|
2431
2453
|
};
|
|
2432
2454
|
FsButtonDirective.prototype.ngOnDestroy = function () {
|