@firestitch/form 12.0.4 → 12.1.2
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/components/form-dialog-actions/form-dialog-actions.component.d.ts +2 -1
- package/bundles/firestitch-form.umd.js +8 -4
- package/bundles/firestitch-form.umd.js.map +1 -1
- package/esm2015/app/components/form-dialog-actions/form-dialog-actions.component.js +7 -4
- package/esm2015/app/directives/submit-button.directive.js +3 -2
- package/fesm2015/firestitch-form.js +8 -4
- package/fesm2015/firestitch-form.js.map +1 -1
- package/package.json +1 -1
- package/styles.scss +4 -2
|
@@ -9,6 +9,7 @@ export declare class FsFormDialogActionsComponent implements OnInit, OnDestroy {
|
|
|
9
9
|
save: boolean;
|
|
10
10
|
create: boolean;
|
|
11
11
|
close: boolean;
|
|
12
|
+
closeData: any;
|
|
12
13
|
name: string;
|
|
13
14
|
dirty: boolean;
|
|
14
15
|
private _destroy$;
|
|
@@ -17,5 +18,5 @@ export declare class FsFormDialogActionsComponent implements OnInit, OnDestroy {
|
|
|
17
18
|
closeClick(): void;
|
|
18
19
|
ngOnDestroy(): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDialogActionsComponent, [{ optional: true; }, { optional: true; }, null]>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FsFormDialogActionsComponent, "fs-form-dialog-actions", never, { "save": "save"; "create": "create"; "close": "close"; "name": "name"; }, {}, never, ["*"]>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsFormDialogActionsComponent, "fs-form-dialog-actions", never, { "save": "save"; "create": "create"; "close": "close"; "closeData": "closeData"; "name": "name"; }, {}, never, ["*"]>;
|
|
21
22
|
}
|
|
@@ -2387,9 +2387,10 @@
|
|
|
2387
2387
|
this._resetClass();
|
|
2388
2388
|
};
|
|
2389
2389
|
FsSubmitButtonDirective.prototype.ngOnDestroy = function () {
|
|
2390
|
+
var _a;
|
|
2390
2391
|
this._destroy$.next();
|
|
2391
2392
|
this._destroy$.complete();
|
|
2392
|
-
this._form.removeSubmitButton(this);
|
|
2393
|
+
(_a = this._form) === null || _a === void 0 ? void 0 : _a.removeSubmitButton(this);
|
|
2393
2394
|
};
|
|
2394
2395
|
FsSubmitButtonDirective.prototype._disableShadowAnimation = function () {
|
|
2395
2396
|
// .mat-elevation-z2 removes the click shadow animation
|
|
@@ -2476,6 +2477,7 @@
|
|
|
2476
2477
|
this.save = true;
|
|
2477
2478
|
this.create = false;
|
|
2478
2479
|
this.close = false;
|
|
2480
|
+
this.closeData = null;
|
|
2479
2481
|
this.dirty = false;
|
|
2480
2482
|
this._destroy$ = new rxjs.Subject();
|
|
2481
2483
|
}
|
|
@@ -2508,11 +2510,11 @@
|
|
|
2508
2510
|
this._form.triggerConfirm()
|
|
2509
2511
|
.pipe(operators.filter(function (confirmResult) { return (confirmResult !== exports.ConfirmResult.Review); }), operators.takeUntil(this._destroy$))
|
|
2510
2512
|
.subscribe(function () {
|
|
2511
|
-
_this._dialogRef.close(
|
|
2513
|
+
_this._dialogRef.close(_this.closeData);
|
|
2512
2514
|
});
|
|
2513
2515
|
}
|
|
2514
2516
|
else {
|
|
2515
|
-
this._dialogRef.close(
|
|
2517
|
+
this._dialogRef.close(this.closeData);
|
|
2516
2518
|
}
|
|
2517
2519
|
};
|
|
2518
2520
|
FsFormDialogActionsComponent.prototype.ngOnDestroy = function () {
|
|
@@ -2522,7 +2524,7 @@
|
|
|
2522
2524
|
return FsFormDialogActionsComponent;
|
|
2523
2525
|
}());
|
|
2524
2526
|
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 });
|
|
2525
|
-
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", name: "name" }, ngImport: i0__namespace, template: "<div class=\"buttons\">\r\n <ng-container *ngIf=\"save\">\r\n <button \r\n mat-button \r\n type=\"submit\"\r\n color=\"primary\" \r\n [name]=\"name\">\r\n {{create ? 'Create' : 'Save'}}\r\n </button>\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [disabled]=\"close && !dirty && !create\"\r\n [matDialogClose]=\"null\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-content></ng-content>\r\n <div class=\"close\" *ngIf=\"close\">\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [color]=\"dirty ? 'basic' : 'primary'\"\r\n (click)=\"closeClick()\">\r\n Close\r\n </button>\r\n </div>\r\n</div>", styles: [".buttons{display:flex;flex-grow:1;align-items:center}.buttons .close{display:flex;flex-grow:1;justify-content:flex-end}:host{display:flex;flex-grow:1}@media only screen and (max-width: 599px){.buttons{flex-direction:column}}\n"], components: [{ type: i1__namespace$1.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2527
|
+
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", closeData: "closeData", name: "name" }, ngImport: i0__namespace, template: "<div class=\"buttons\">\r\n <ng-container *ngIf=\"save\">\r\n <button \r\n mat-button \r\n type=\"submit\"\r\n color=\"primary\" \r\n [name]=\"name\">\r\n {{create ? 'Create' : 'Save'}}\r\n </button>\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [disabled]=\"close && !dirty && !create\"\r\n [matDialogClose]=\"null\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-content></ng-content>\r\n <div class=\"close\" *ngIf=\"close\">\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [color]=\"dirty ? 'basic' : 'primary'\"\r\n (click)=\"closeClick()\">\r\n Close\r\n </button>\r\n </div>\r\n</div>", styles: [".buttons{display:flex;flex-grow:1;align-items:center}.buttons .close{display:flex;flex-grow:1;justify-content:flex-end}:host{display:flex;flex-grow:1}@media only screen and (max-width: 599px){.buttons{flex-direction:column}}\n"], components: [{ type: i1__namespace$1.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2526
2528
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogActionsComponent, decorators: [{
|
|
2527
2529
|
type: i0.Component,
|
|
2528
2530
|
args: [{
|
|
@@ -2543,6 +2545,8 @@
|
|
|
2543
2545
|
type: i0.Input
|
|
2544
2546
|
}], close: [{
|
|
2545
2547
|
type: i0.Input
|
|
2548
|
+
}], closeData: [{
|
|
2549
|
+
type: i0.Input
|
|
2546
2550
|
}], name: [{
|
|
2547
2551
|
type: i0.Input
|
|
2548
2552
|
}] } });
|