@firestitch/form 9.7.1 → 9.7.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.
@@ -3,6 +3,7 @@ import { FsFormDirective } from '../../directives/form/form.directive';
3
3
  export declare class FsFormDialogActionsComponent implements OnInit, OnDestroy {
4
4
  private _form;
5
5
  private _cdRef;
6
+ save: boolean;
6
7
  create: boolean;
7
8
  close: boolean;
8
9
  name: string;
@@ -2382,8 +2382,9 @@
2382
2382
  function FsFormDialogActionsComponent(_form, _cdRef) {
2383
2383
  this._form = _form;
2384
2384
  this._cdRef = _cdRef;
2385
+ this.save = true;
2385
2386
  this.create = false;
2386
- this.close = true;
2387
+ this.close = false;
2387
2388
  this.dirty = false;
2388
2389
  this._destroy$ = new rxjs.Subject();
2389
2390
  }
@@ -2410,6 +2411,10 @@
2410
2411
  { type: FsFormDirective, decorators: [{ type: core.Optional }] },
2411
2412
  { type: core.ChangeDetectorRef }
2412
2413
  ]; };
2414
+ __decorate([
2415
+ core.Input(),
2416
+ __metadata("design:type", Object)
2417
+ ], FsFormDialogActionsComponent.prototype, "save", void 0);
2413
2418
  __decorate([
2414
2419
  core.Input(),
2415
2420
  __metadata("design:type", Object)
@@ -2425,8 +2430,9 @@
2425
2430
  FsFormDialogActionsComponent = __decorate([
2426
2431
  core.Component({
2427
2432
  selector: 'fs-form-dialog-actions',
2428
- template: "<button \r\n mat-button \r\n type=\"button\"\r\n color=\"primary\" \r\n *ngIf=\"close && !dirty && !create\"\r\n [matDialogClose]=\"null\">\r\n Close\r\n</button>\r\n<button \r\n mat-button \r\n *ngIf=\"dirty || create || !close\"\r\n type=\"submit\"\r\n color=\"primary\" \r\n [name]=\"name\">\r\n {{create ? 'Create' : 'Save'}}\r\n</button>\r\n<ng-content></ng-content>\r\n<button \r\n mat-button \r\n type=\"button\"\r\n *ngIf=\"dirty || create || !close\"\r\n [matDialogClose]=\"null\">\r\n Cancel\r\n</button>\r\n",
2429
- changeDetection: core.ChangeDetectionStrategy.OnPush
2433
+ 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]=\"!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 [matDialogClose]=\"null\">\r\n Close\r\n </button>\r\n </div>\r\n</div>",
2434
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
2435
+ 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}"]
2430
2436
  }),
2431
2437
  __param(0, core.Optional()),
2432
2438
  __metadata("design:paramtypes", [FsFormDirective,