@firestitch/form 12.4.2 → 12.4.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.
@@ -9,6 +9,7 @@ export declare class FsFormDialogActionsComponent implements OnInit, OnDestroy {
9
9
  save: boolean;
10
10
  create: boolean;
11
11
  close: boolean;
12
+ done: boolean;
12
13
  closeData: any;
13
14
  name: string;
14
15
  dirty: boolean;
@@ -18,5 +19,5 @@ export declare class FsFormDialogActionsComponent implements OnInit, OnDestroy {
18
19
  closeClick(): void;
19
20
  ngOnDestroy(): void;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDialogActionsComponent, [{ optional: true; }, { optional: true; }, null]>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<FsFormDialogActionsComponent, "fs-form-dialog-actions", never, { "save": "save"; "create": "create"; "close": "close"; "closeData": "closeData"; "name": "name"; }, {}, never, ["*"]>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<FsFormDialogActionsComponent, "fs-form-dialog-actions", never, { "save": "save"; "create": "create"; "close": "close"; "done": "done"; "closeData": "closeData"; "name": "name"; }, {}, never, ["*"]>;
22
23
  }
@@ -58,7 +58,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
58
58
  private _activatedRouteConfig;
59
59
  private _status$;
60
60
  private _destroy$;
61
- private _confirmSubmit;
61
+ private _confirmed;
62
62
  constructor(ngForm: NgForm, _form: FsForm, _element: ElementRef, _message: FsMessage, _prompt: FsPrompt, _ngZone: NgZone, _dialogRef: MatDialogRef<any>, _drawerRef: DrawerRef<any>, _route: ActivatedRoute);
63
63
  get submitting(): boolean;
64
64
  get validating(): boolean;
@@ -79,7 +79,7 @@ export declare class FsFormDirective implements OnInit, OnDestroy, AfterContentI
79
79
  clear(): void;
80
80
  dirty(): void;
81
81
  triggerSubmit(options?: {
82
- confirmSubmit: boolean;
82
+ confirmed: boolean;
83
83
  }): void;
84
84
  triggerConfirm(): Observable<ConfirmResult>;
85
85
  enable(): void;
@@ -419,7 +419,7 @@
419
419
  observer.complete();
420
420
  });
421
421
  form.ngForm.control.markAsPristine();
422
- form.triggerSubmit({ confirmSubmit: true });
422
+ form.triggerSubmit({ confirmed: true });
423
423
  }
424
424
  }, function (error) {
425
425
  observer.next(exports.ConfirmResult.Review);
@@ -615,7 +615,7 @@
615
615
  this._snapshot = {};
616
616
  this._status$ = new rxjs.BehaviorSubject(exports.FormStatus.Valid);
617
617
  this._destroy$ = new rxjs.Subject();
618
- this._confirmSubmit = false;
618
+ this._confirmed = false;
619
619
  }
620
620
  Object.defineProperty(FsFormDirective.prototype, "submitting", {
621
621
  get: function () {
@@ -756,7 +756,7 @@
756
756
  this._updateDirtySubmitButtons();
757
757
  };
758
758
  FsFormDirective.prototype.triggerSubmit = function (options) {
759
- this._confirmSubmit = options === null || options === void 0 ? void 0 : options.confirmSubmit;
759
+ this._confirmed = options === null || options === void 0 ? void 0 : options.confirmed;
760
760
  this.ngForm.ngSubmit.emit();
761
761
  };
762
762
  FsFormDirective.prototype.triggerConfirm = function () {
@@ -791,8 +791,8 @@
791
791
  .pipe(operators.tap(function (event) {
792
792
  event === null || event === void 0 ? void 0 : event.preventDefault();
793
793
  }), operators.map(function (event) {
794
- return { event: event, confirmSubmit: _this._confirmSubmit };
795
- }), operators.tap(function () { return _this._confirmSubmit = false; }), operators.filter(function () {
794
+ return { event: event, confirmed: _this._confirmed };
795
+ }), operators.tap(function () { return _this._confirmed = false; }), operators.filter(function () {
796
796
  return [exports.FormStatus.Valid, exports.FormStatus.Invalid]
797
797
  .includes(_this._status$.getValue());
798
798
  }), operators.tap(function () { return _this._broadcasValidatingEvents(); }), operators.tap(function () { return _this._markControlsAsTouchedAndUpdateValidity(); }), operators.tap(function () { return _this._broadcastSubmittingEvents(); }), operators.switchMap(function (data) { return _this._waitUntilStatusPending()
@@ -801,7 +801,7 @@
801
801
  return _this._formInvalidState$;
802
802
  }
803
803
  return _this._formValidState$
804
- .pipe(operators.map(function (submitEvent) { return (Object.assign(Object.assign({}, submitEvent), { confirmSubmit: data.confirmSubmit })); }));
804
+ .pipe(operators.map(function (submitEvent) { return (Object.assign(Object.assign({}, submitEvent), { confirmed: data.confirmed })); }));
805
805
  }), operators.catchError(function (e, source$) {
806
806
  _this._handleError(e);
807
807
  return source$;
@@ -2641,6 +2641,7 @@
2641
2641
  this.save = true;
2642
2642
  this.create = false;
2643
2643
  this.close = false;
2644
+ this.done = false;
2644
2645
  this.closeData = null;
2645
2646
  this.dirty = false;
2646
2647
  this._destroy$ = new rxjs.Subject();
@@ -2688,7 +2689,7 @@
2688
2689
  return FsFormDialogActionsComponent;
2689
2690
  }());
2690
2691
  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 });
2691
- 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\" [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=\"save || create\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </ng-container>\n\n <div class=\"close\" *ngIf=\"close\">\n <button\n mat-button\n type=\"button\"\n [color]=\"dirty ? 'basic' : 'primary'\"\n (click)=\"closeClick()\">\n Close\n </button>\n </div>\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: [".buttons{display:flex;flex-grow:1;align-items:center}.buttons.save-create .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$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"] }, { 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 });
2692
+ 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=\"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 <div class=\"close\" *ngIf=\"close\">\n <button\n mat-button\n type=\"button\"\n [color]=\"dirty ? 'basic' : 'primary'\"\n (click)=\"closeClick()\">\n Close\n </button>\n </div>\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: [".buttons{display:flex;flex-grow:1;align-items:center}.buttons.save-create .close{display:flex;flex-grow:1;justify-content:flex-end}@media only screen and (max-width: 599px){.buttons{flex-direction:column}}\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"] }, { 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 });
2692
2693
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogActionsComponent, decorators: [{
2693
2694
  type: i0.Component,
2694
2695
  args: [{
@@ -2709,6 +2710,8 @@
2709
2710
  type: i0.Input
2710
2711
  }], close: [{
2711
2712
  type: i0.Input
2713
+ }], done: [{
2714
+ type: i0.Input
2712
2715
  }], closeData: [{
2713
2716
  type: i0.Input
2714
2717
  }], name: [{