@sd-angular/core 0.0.964 → 0.0.969

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.
Files changed (26) hide show
  1. package/bundles/sd-angular-core-grid-material.umd.js +24 -11
  2. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  3. package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
  4. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  5. package/bundles/sd-angular-core-modal.umd.js +5 -1
  6. package/bundles/sd-angular-core-modal.umd.js.map +1 -1
  7. package/bundles/sd-angular-core-modal.umd.min.js +1 -1
  8. package/bundles/sd-angular-core-modal.umd.min.js.map +1 -1
  9. package/esm2015/grid-material/src/lib/grid-material.component.js +6 -4
  10. package/esm2015/grid-material/src/lib/models/grid-editor.model.js +1 -1
  11. package/esm2015/grid-material/src/lib/pipes/editor-handler-column.pipe.js +4 -4
  12. package/esm2015/grid-material/src/lib/pipes/editor-handler-row.pipe.js +7 -5
  13. package/esm2015/grid-material/src/lib/pipes/editor-validate.pipe.js +9 -1
  14. package/esm2015/grid-material/src/lib/pipes/selection-disable-select-all.pipe.js +1 -1
  15. package/esm2015/grid-material/src/lib/services/grid-configuration.service.js +6 -3
  16. package/esm2015/modal/src/lib/modal/modal.component.js +7 -3
  17. package/fesm2015/sd-angular-core-grid-material.js +24 -11
  18. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  19. package/fesm2015/sd-angular-core-modal.js +6 -2
  20. package/fesm2015/sd-angular-core-modal.js.map +1 -1
  21. package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
  22. package/grid-material/src/lib/models/grid-editor.model.d.ts +0 -2
  23. package/modal/sd-angular-core-modal.metadata.json +1 -1
  24. package/modal/src/lib/modal/modal.component.d.ts +3 -2
  25. package/package.json +1 -1
  26. package/{sd-angular-core-0.0.964.tgz → sd-angular-core-0.0.969.tgz} +0 -0
@@ -5,8 +5,9 @@
5
5
  }(this, (function (exports, core, dialog, ngxDeviceDetector, bottomSheet, rxjs, common, typing, icon, button, button$1) { 'use strict';
6
6
 
7
7
  var SdModal = /** @class */ (function () {
8
- function SdModal(dialog, bottomSheet, deviceService) {
8
+ function SdModal(ref, dialog, bottomSheet, deviceService) {
9
9
  var _this = this;
10
+ this.ref = ref;
10
11
  this.dialog = dialog;
11
12
  this.bottomSheet = bottomSheet;
12
13
  this.height = 'auto';
@@ -19,6 +20,7 @@
19
20
  if (_this.isOpened) {
20
21
  return;
21
22
  }
23
+ _this.ref.markForCheck();
22
24
  _this.alreadyOpened = true;
23
25
  _this.isOpened = true;
24
26
  if ((!_this.view && _this.isMobileOrTablet) || _this.view === 'bottomSheet') {
@@ -40,6 +42,7 @@
40
42
  };
41
43
  this.close = function () {
42
44
  var _a, _b;
45
+ _this.ref.markForCheck();
43
46
  (_a = _this.bottomSheetRef) === null || _a === void 0 ? void 0 : _a.dismiss();
44
47
  (_b = _this.dialogRef) === null || _b === void 0 ? void 0 : _b.close();
45
48
  };
@@ -79,6 +82,7 @@
79
82
  },] }
80
83
  ];
81
84
  SdModal.ctorParameters = function () { return [
85
+ { type: core.ChangeDetectorRef },
82
86
  { type: dialog.MatDialog },
83
87
  { type: bottomSheet.MatBottomSheet },
84
88
  { type: ngxDeviceDetector.DeviceDetectorService }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-modal.umd.js","sources":["../../../../projects/sd-core/modal/src/lib/modal/modal.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-header/modal-header.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-body/modal-body.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-footer/modal-footer.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component.ts","../../../../projects/sd-core/modal/src/lib/modal.module.ts","../../../../projects/sd-core/modal/src/public-api.ts","../../../../projects/sd-core/modal/sd-angular-core-modal.ts"],"sourcesContent":["import { Component, ElementRef, Input, ViewChild, OnInit, OnDestroy, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\nimport { MatBottomSheetRef } from '@angular/material/bottom-sheet';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'sd-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdModal implements OnInit, OnDestroy {\r\n static index = 0;\r\n @ViewChild('templateRef') templateRef: TemplateRef<any>;\r\n @Input() title: string;\r\n @Input() noClose: boolean;\r\n @Input() type: 'primary' | 'info' | 'success' | 'warning' | 'danger';\r\n @Input() width: 'lg' | 'md' | 'sm' | string;\r\n @Input() height = 'auto';\r\n @Input() view: 'dialog' | 'bottomSheet';\r\n @Input() lazyLoadContent = true;\r\n @ViewChild('modal') modal: ElementRef;\r\n isOpened = false;\r\n alreadyOpened = false;\r\n isMobileOrTablet = false;\r\n private bottomSheetRef: MatBottomSheetRef<any>;\r\n private dialogRef: MatDialogRef<any>;\r\n private subcription = new Subscription();\r\n constructor(\r\n private dialog: MatDialog,\r\n private bottomSheet: MatBottomSheet,\r\n deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit(): void {\r\n this.type = this.type || 'primary';\r\n this.width = this.width || '80vw';\r\n if (!this.isMobileOrTablet) {\r\n switch (this.width) {\r\n case 'lg':\r\n this.width = '80vw';\r\n break;\r\n case 'md':\r\n this.width = '60vw';\r\n break;\r\n case 'sm':\r\n this.width = '40vw';\r\n break;\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subcription?.unsubscribe();\r\n }\r\n\r\n open = (): void => {\r\n if (this.isOpened) {\r\n return;\r\n }\r\n this.alreadyOpened = true;\r\n this.isOpened = true;\r\n if ((!this.view && this.isMobileOrTablet) || this.view === 'bottomSheet') {\r\n this.bottomSheetRef = this.bottomSheet.open(this.templateRef);\r\n this.subcription.add(this.bottomSheetRef.afterDismissed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n } else {\r\n this.dialogRef = this.dialog.open(this.templateRef, {\r\n width: this.width,\r\n maxWidth: this.width,\r\n disableClose: true\r\n });\r\n this.subcription.add(this.dialogRef.afterClosed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n }\r\n }\r\n\r\n close = (): void => {\r\n this.bottomSheetRef?.dismiss();\r\n this.dialogRef?.close();\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-header',\r\n templateUrl: './modal-header.component.html',\r\n styleUrls: [\r\n './modal-header.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class SdModalHeader implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-body',\r\n templateUrl: './modal-body.component.html',\r\n styleUrls: ['./modal-body.component.scss'],\r\n})\r\nexport class SdModalBody implements OnInit {\r\n @Input() height = 'auto';\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-footer',\r\n templateUrl: './modal-footer.component.html',\r\n styleUrls: ['./modal-footer.component.scss']\r\n})\r\nexport class SdModalFooter implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, ViewChild, TemplateRef, Input } from '@angular/core';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet',\r\n templateUrl: './bottom-sheet.component.html'\r\n})\r\nexport class SdBottomSheet {\r\n @ViewChild('templateRef') templateRef: TemplateRef<OptionTemplateContext>;\r\n @Input() title: string;\r\n isOpened = false;\r\n constructor(\r\n private bottomSheet: MatBottomSheet,\r\n ) { }\r\n\r\n open = () => {\r\n this.isOpened = true;\r\n this.bottomSheet.open(this.templateRef);\r\n }\r\n\r\n close = () => {\r\n this.bottomSheet.dismiss();\r\n }\r\n}\r\n\r\ninterface OptionTemplateContext {\r\n $implicit: any;\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-header',\r\n templateUrl: './bottom-sheet-header.component.html'\r\n})\r\nexport class SdBottomSheetHeader implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-body',\r\n templateUrl: './bottom-sheet-body.component.html'\r\n})\r\nexport class SdBottomSheetBody implements OnInit {\r\n @Input() height = 'auto';\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-footer',\r\n templateUrl: './bottom-sheet-footer.component.html',\r\n styleUrls: ['./bottom-sheet-footer.component.scss']\r\n})\r\nexport class SdBottomSheetFooter implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdModal } from './modal/modal.component';\r\nimport { SdModalHeader } from './modal/modal-header/modal-header.component';\r\nimport { SdModalBody } from './modal/modal-body/modal-body.component';\r\nimport { SdModalFooter } from './modal/modal-footer/modal-footer.component';\r\nimport { SdBottomSheet } from './bottom-sheet/bottom-sheet.component';\r\nimport { SdBottomSheetHeader } from './bottom-sheet/bottom-sheet-header/bottom-sheet-header.component';\r\nimport { SdBottomSheetBody } from './bottom-sheet/bottom-sheet-body/bottom-sheet-body.component';\r\nimport { SdBottomSheetFooter } from './bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component';\r\n\r\nimport '@sd-angular/core/typing';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SdButtonModule } from '@sd-angular/core/button';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatBottomSheetModule,\r\n MatDialogModule,\r\n MatButtonModule,\r\n SdButtonModule\r\n ],\r\n declarations: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n exports: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdModalModule {\r\n\r\n}\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/modal/modal.component';\r\nexport * from './lib/modal/modal-header/modal-header.component';\r\nexport * from './lib/modal/modal-body/modal-body.component';\r\nexport * from './lib/modal/modal-footer/modal-footer.component';\r\n\r\nexport * from './lib/bottom-sheet/bottom-sheet.component';\r\nexport * from './lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component';\r\nexport * from './lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component';\r\nexport * from './lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component';\r\n\r\nexport * from './lib/modal.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Subscription","Component","ViewEncapsulation","ChangeDetectionStrategy","MatDialog","MatBottomSheet","DeviceDetectorService","ViewChild","Input","NgModule","CommonModule","MatIconModule","MatBottomSheetModule","MatDialogModule","MatButtonModule","SdButtonModule"],"mappings":";;;;;;;QA+BE,iBACU,MAAiB,EACjB,WAA2B,EACnC,aAAoC;YAHtC,iBAKC;YAJS,WAAM,GAAN,MAAM,CAAW;YACjB,gBAAW,GAAX,WAAW,CAAgB;YAZ5B,WAAM,GAAG,MAAM,CAAC;YAEhB,oBAAe,GAAG,IAAI,CAAC;YAEhC,aAAQ,GAAG,KAAK,CAAC;YACjB,kBAAa,GAAG,KAAK,CAAC;YACtB,qBAAgB,GAAG,KAAK,CAAC;YAGjB,gBAAW,GAAG,IAAIA,iBAAY,EAAE,CAAC;YA6BzC,SAAI,GAAG;gBACL,IAAI,KAAI,CAAC,QAAQ,EAAE;oBACjB,OAAO;iBACR;gBACD,KAAI,CAAC,aAAa,GAAG,IAAI,CAAC;gBAC1B,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,IAAI,CAAC,CAAC,KAAI,CAAC,IAAI,IAAI,KAAI,CAAC,gBAAgB,KAAK,KAAI,CAAC,IAAI,KAAK,aAAa,EAAE;oBACxE,K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AO;wBACP,aAAa;wBACb,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;qBACpB;oBACD,OAAO,EAAE;wBACP,OAAO;wBACP,aAAa;wBACb,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;qBACpB;oBACD,SAAS,EAAE,EACV;iBACF;;;ICjDD;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-modal.umd.js","sources":["../../../../projects/sd-core/modal/src/lib/modal/modal.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-header/modal-header.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-body/modal-body.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-footer/modal-footer.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component.ts","../../../../projects/sd-core/modal/src/lib/modal.module.ts","../../../../projects/sd-core/modal/src/public-api.ts","../../../../projects/sd-core/modal/sd-angular-core-modal.ts"],"sourcesContent":["import { Component, ElementRef, Input, ViewChild, OnInit, OnDestroy, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\nimport { MatBottomSheetRef } from '@angular/material/bottom-sheet';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'sd-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdModal implements OnInit, OnDestroy {\r\n static index = 0;\r\n @ViewChild('templateRef') templateRef: TemplateRef<any>;\r\n @Input() title: string;\r\n @Input() noClose: boolean;\r\n @Input() type: 'primary' | 'info' | 'success' | 'warning' | 'danger';\r\n @Input() width: 'lg' | 'md' | 'sm' | string;\r\n @Input() height = 'auto';\r\n @Input() view: 'dialog' | 'bottomSheet';\r\n @Input() lazyLoadContent = true;\r\n @ViewChild('modal') modal: ElementRef;\r\n isOpened = false;\r\n alreadyOpened = false;\r\n isMobileOrTablet = false;\r\n private bottomSheetRef: MatBottomSheetRef<any>;\r\n private dialogRef: MatDialogRef<any>;\r\n private subcription = new Subscription();\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n private dialog: MatDialog,\r\n private bottomSheet: MatBottomSheet,\r\n deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit(): void {\r\n this.type = this.type || 'primary';\r\n this.width = this.width || '80vw';\r\n if (!this.isMobileOrTablet) {\r\n switch (this.width) {\r\n case 'lg':\r\n this.width = '80vw';\r\n break;\r\n case 'md':\r\n this.width = '60vw';\r\n break;\r\n case 'sm':\r\n this.width = '40vw';\r\n break;\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subcription?.unsubscribe();\r\n }\r\n\r\n open = (): void => {\r\n if (this.isOpened) {\r\n return;\r\n }\r\n this.ref.markForCheck();\r\n this.alreadyOpened = true;\r\n this.isOpened = true;\r\n if ((!this.view && this.isMobileOrTablet) || this.view === 'bottomSheet') {\r\n this.bottomSheetRef = this.bottomSheet.open(this.templateRef);\r\n this.subcription.add(this.bottomSheetRef.afterDismissed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n } else {\r\n this.dialogRef = this.dialog.open(this.templateRef, {\r\n width: this.width,\r\n maxWidth: this.width,\r\n disableClose: true\r\n });\r\n this.subcription.add(this.dialogRef.afterClosed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n }\r\n }\r\n\r\n close = (): void => {\r\n this.ref.markForCheck();\r\n this.bottomSheetRef?.dismiss();\r\n this.dialogRef?.close();\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-header',\r\n templateUrl: './modal-header.component.html',\r\n styleUrls: [\r\n './modal-header.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class SdModalHeader implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-body',\r\n templateUrl: './modal-body.component.html',\r\n styleUrls: ['./modal-body.component.scss'],\r\n})\r\nexport class SdModalBody implements OnInit {\r\n @Input() height = 'auto';\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-footer',\r\n templateUrl: './modal-footer.component.html',\r\n styleUrls: ['./modal-footer.component.scss']\r\n})\r\nexport class SdModalFooter implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, ViewChild, TemplateRef, Input } from '@angular/core';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet',\r\n templateUrl: './bottom-sheet.component.html'\r\n})\r\nexport class SdBottomSheet {\r\n @ViewChild('templateRef') templateRef: TemplateRef<OptionTemplateContext>;\r\n @Input() title: string;\r\n isOpened = false;\r\n constructor(\r\n private bottomSheet: MatBottomSheet,\r\n ) { }\r\n\r\n open = () => {\r\n this.isOpened = true;\r\n this.bottomSheet.open(this.templateRef);\r\n }\r\n\r\n close = () => {\r\n this.bottomSheet.dismiss();\r\n }\r\n}\r\n\r\ninterface OptionTemplateContext {\r\n $implicit: any;\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-header',\r\n templateUrl: './bottom-sheet-header.component.html'\r\n})\r\nexport class SdBottomSheetHeader implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-body',\r\n templateUrl: './bottom-sheet-body.component.html'\r\n})\r\nexport class SdBottomSheetBody implements OnInit {\r\n @Input() height = 'auto';\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-footer',\r\n templateUrl: './bottom-sheet-footer.component.html',\r\n styleUrls: ['./bottom-sheet-footer.component.scss']\r\n})\r\nexport class SdBottomSheetFooter implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdModal } from './modal/modal.component';\r\nimport { SdModalHeader } from './modal/modal-header/modal-header.component';\r\nimport { SdModalBody } from './modal/modal-body/modal-body.component';\r\nimport { SdModalFooter } from './modal/modal-footer/modal-footer.component';\r\nimport { SdBottomSheet } from './bottom-sheet/bottom-sheet.component';\r\nimport { SdBottomSheetHeader } from './bottom-sheet/bottom-sheet-header/bottom-sheet-header.component';\r\nimport { SdBottomSheetBody } from './bottom-sheet/bottom-sheet-body/bottom-sheet-body.component';\r\nimport { SdBottomSheetFooter } from './bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component';\r\n\r\nimport '@sd-angular/core/typing';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SdButtonModule } from '@sd-angular/core/button';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatBottomSheetModule,\r\n MatDialogModule,\r\n MatButtonModule,\r\n SdButtonModule\r\n ],\r\n declarations: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n exports: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdModalModule {\r\n\r\n}\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/modal/modal.component';\r\nexport * from './lib/modal/modal-header/modal-header.component';\r\nexport * from './lib/modal/modal-body/modal-body.component';\r\nexport * from './lib/modal/modal-footer/modal-footer.component';\r\n\r\nexport * from './lib/bottom-sheet/bottom-sheet.component';\r\nexport * from './lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component';\r\nexport * from './lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component';\r\nexport * from './lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component';\r\n\r\nexport * from './lib/modal.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Subscription","Component","ViewEncapsulation","ChangeDetectionStrategy","ChangeDetectorRef","MatDialog","MatBottomSheet","DeviceDetectorService","ViewChild","Input","NgModule","CommonModule","MatIconModule","MatBottomSheetModule","MatDialogModule","MatButtonModule","SdButtonModule"],"mappings":";;;;;;;QA+BE,iBACU,GAAsB,EACtB,MAAiB,EACjB,WAA2B,EACnC,aAAoC;YAJtC,iBAMC;YALS,QAAG,GAAH,GAAG,CAAmB;YACtB,WAAM,GAAN,MAAM,CAAW;YACjB,gBAAW,GAAX,WAAW,CAAgB;YAb5B,WAAM,GAAG,MAAM,CAAC;YAEhB,oBAAe,GAAG,IAAI,CAAC;YAEhC,aAAQ,GAAG,KAAK,CAAC;YACjB,kBAAa,GAAG,KAAK,CAAC;YACtB,qBAAgB,GAAG,KAAK,CAAC;YAGjB,gBAAW,GAAG,IAAIA,iBAAY,EAAE,CAAC;YA8BzC,SAAI,GAAG;gBACL,IAAI,KAAI,CAAC,QAAQ,EAAE;oBACjB,OAAO;iBACR;gBACD,KAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;gBACxB,KAAI,CAAC,aAAa,GAAG,IAAI,CAAC;gBAC1B,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,IAAI,CAAC,CAAC,KAAI,CAAC,IAAI,IAAI,KAAI,CAAC,gBAAgB,KAAK,KAAI,CAAC,IAAI,KAAK,aAAa,EAAE;oBACxE,KAAI,CAAC,cAAc,GAAG,KAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC;oBAC9D,KAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAI,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC;wBAClE,KAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;qBACvB,CAAC,CAAC,CAAC;iBACL;qBAAM;oBACL,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC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jDD;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/material/dialog"),require("ngx-device-detector"),require("@angular/material/bottom-sheet"),require("rxjs"),require("@angular/common"),require("@sd-angular/core/typing"),require("@angular/material/icon"),require("@angular/material/button"),require("@sd-angular/core/button")):"function"==typeof define&&define.amd?define("@sd-angular/core/modal",["exports","@angular/core","@angular/material/dialog","ngx-device-detector","@angular/material/bottom-sheet","rxjs","@angular/common","@sd-angular/core/typing","@angular/material/icon","@angular/material/button","@sd-angular/core/button"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["sd-angular"]=t["sd-angular"]||{},t["sd-angular"].core=t["sd-angular"].core||{},t["sd-angular"].core.modal={}),t.ng.core,t.ng.material.dialog,t.ngxDeviceDetector,t.ng.material.bottomSheet,t.rxjs,t.ng.common,t["sd-angular"].core.typing,t.ng.material.icon,t.ng.material.button,t["sd-angular"].core.button)}(this,(function(t,e,n,o,r,i,a,s,l,d,c){"use strict";var p=function(){function t(t,e,n){var o=this;this.dialog=t,this.bottomSheet=e,this.height="auto",this.lazyLoadContent=!0,this.isOpened=!1,this.alreadyOpened=!1,this.isMobileOrTablet=!1,this.subcription=new i.Subscription,this.open=function(){o.isOpened||(o.alreadyOpened=!0,o.isOpened=!0,!o.view&&o.isMobileOrTablet||"bottomSheet"===o.view?(o.bottomSheetRef=o.bottomSheet.open(o.templateRef),o.subcription.add(o.bottomSheetRef.afterDismissed().subscribe((function(){o.isOpened=!1})))):(o.dialogRef=o.dialog.open(o.templateRef,{width:o.width,maxWidth:o.width,disableClose:!0}),o.subcription.add(o.dialogRef.afterClosed().subscribe((function(){o.isOpened=!1})))))},this.close=function(){var t,e;null===(t=o.bottomSheetRef)||void 0===t||t.dismiss(),null===(e=o.dialogRef)||void 0===e||e.close()},this.isMobileOrTablet=!n.isDesktop()}return t.prototype.ngOnInit=function(){if(this.type=this.type||"primary",this.width=this.width||"80vw",!this.isMobileOrTablet)switch(this.width){case"lg":this.width="80vw";break;case"md":this.width="60vw";break;case"sm":this.width="40vw"}},t.prototype.ngOnDestroy=function(){var t;null===(t=this.subcription)||void 0===t||t.unsubscribe()},t}();p.index=0,p.decorators=[{type:e.Component,args:[{selector:"sd-modal",template:'<ng-template #templateRef>\r\n <ng-container *ngIf="!lazyLoadContent || alreadyOpened">\r\n <sd-modal-header *ngIf="title">\r\n <span [innerHtml]="title"></span>\r\n <button *ngIf="!noClose" class="float-right" type="button" (click)="close()" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </sd-modal-header>\r\n <div class="d-flex flex-column px-12 px-md-24 pb-6 overflow-auto w-100 mh-100">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-container>\r\n</ng-template>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:['button:focus{outline:none!important}.mat-dialog-container{padding:0!important}.mat-dialog-container .mat-dialog-content{max-height:80vh}.mat-dialog-container .mat-dialog-actions{margin-bottom:0;min-height:auto;padding:0}.mat-bottom-sheet-container{max-height:"inherit"}sd-modal-header{display:block;padding:12px 24px;width:100%}@media (max-width:640px){sd-modal-header{padding:12px}}.cdk-global-overlay-wrapper .mat-bottom-sheet-container{border-top-left-radius:4px;border-top-right-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;max-height:80vh;min-width:100vw;outline:0;overflow:hidden;padding:0}']}]}],p.ctorParameters=function(){return[{type:n.MatDialog},{type:r.MatBottomSheet},{type:o.DeviceDetectorService}]},p.propDecorators={templateRef:[{type:e.ViewChild,args:["templateRef"]}],title:[{type:e.Input}],noClose:[{type:e.Input}],type:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],view:[{type:e.Input}],lazyLoadContent:[{type:e.Input}],modal:[{type:e.ViewChild,args:["modal"]}]};var g=function(){function t(t){this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();g.decorators=[{type:e.Component,args:[{selector:"sd-modal-header",template:'<h3 class="mb-0" mat-dialog-title *ngIf="!isMobileOrTablet">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</h3>\r\n<sd-bottom-sheet-header *ngIf="isMobileOrTablet">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</sd-bottom-sheet-header>\r\n<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>',encapsulation:e.ViewEncapsulation.None,styles:[".mat-dialog-title{align-items:center;display:flex;justify-content:space-between}button:focus{outline:none!important}"]}]}],g.ctorParameters=function(){return[{type:o.DeviceDetectorService}]};var u=function(){function t(t){this.height="auto",this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();u.decorators=[{type:e.Component,args:[{selector:"sd-modal-body",template:'<mat-dialog-content *ngIf="!isMobileOrTablet" [ngStyle]="{\'height\': height}" class="pb-5">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</mat-dialog-content>\r\n<sd-bottom-sheet-body *ngIf="isMobileOrTablet" [height]="height">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</sd-bottom-sheet-body>\r\n<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>',styles:[":host{width:100%}"]}]}],u.ctorParameters=function(){return[{type:o.DeviceDetectorService}]},u.propDecorators={height:[{type:e.Input}]};var m=function(){function t(t){this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();m.decorators=[{type:e.Component,args:[{selector:"sd-modal-footer",template:'\x3c!-- <div class="modal-footer" style="padding:5px"><ng-content></ng-content></div> --\x3e\r\n<mat-dialog-actions *ngIf="!isMobileOrTablet">\r\n <div class="c-footer">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n </div>\r\n</mat-dialog-actions>\r\n<sd-bottom-sheet-footer *ngIf="isMobileOrTablet">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</sd-bottom-sheet-footer>\r\n<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>',styles:[":host{width:100%}:host .c-footer{align-items:center;display:flex;flex:auto;justify-content:flex-end;padding:8px 0}"]}]}],m.ctorParameters=function(){return[{type:o.DeviceDetectorService}]};var h=function(t){var e=this;this.bottomSheet=t,this.isOpened=!1,this.open=function(){e.isOpened=!0,e.bottomSheet.open(e.templateRef)},this.close=function(){e.bottomSheet.dismiss()}};h.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet",template:'<ng-template #templateRef>\r\n <ng-container *ngIf="isOpened">\r\n <sd-bottom-sheet-header *ngIf="title">{{title}}</sd-bottom-sheet-header>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</ng-template>'}]}],h.ctorParameters=function(){return[{type:r.MatBottomSheet}]},h.propDecorators={templateRef:[{type:e.ViewChild,args:["templateRef"]}],title:[{type:e.Input}]};var f=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();f.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-header",template:'<h3 class="mb-0" mat-dialog-title><ng-content></ng-content></h3>'}]}],f.ctorParameters=function(){return[]};var b=function(){function t(){this.height="auto"}return t.prototype.ngOnInit=function(){},t}();b.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-body",template:"<div [ngStyle]=\"{'height': height}\">\r\n <ng-content></ng-content>\r\n<div>"}]}],b.ctorParameters=function(){return[]},b.propDecorators={height:[{type:e.Input}]};var y=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();y.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-footer",template:'\x3c!-- <div class="modal-footer" style="padding:5px"><ng-content></ng-content></div> --\x3e\r\n<div class="c-footer">\r\n <ng-content></ng-content>\r\n</div>',styles:[".c-footer{align-items:center;display:flex;flex:auto;justify-content:flex-end;padding-bottom:5px;padding-top:5px}"]}]}],y.ctorParameters=function(){return[]};var v=function(){};v.decorators=[{type:e.NgModule,args:[{imports:[a.CommonModule,l.MatIconModule,r.MatBottomSheetModule,n.MatDialogModule,d.MatButtonModule,c.SdButtonModule],declarations:[p,g,u,m,h,f,b,y],exports:[p,g,u,m,h,f,b,y],providers:[]}]}],t.SdBottomSheet=h,t.SdBottomSheetBody=b,t.SdBottomSheetFooter=y,t.SdBottomSheetHeader=f,t.SdModal=p,t.SdModalBody=u,t.SdModalFooter=m,t.SdModalHeader=g,t.SdModalModule=v,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/material/dialog"),require("ngx-device-detector"),require("@angular/material/bottom-sheet"),require("rxjs"),require("@angular/common"),require("@sd-angular/core/typing"),require("@angular/material/icon"),require("@angular/material/button"),require("@sd-angular/core/button")):"function"==typeof define&&define.amd?define("@sd-angular/core/modal",["exports","@angular/core","@angular/material/dialog","ngx-device-detector","@angular/material/bottom-sheet","rxjs","@angular/common","@sd-angular/core/typing","@angular/material/icon","@angular/material/button","@sd-angular/core/button"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["sd-angular"]=t["sd-angular"]||{},t["sd-angular"].core=t["sd-angular"].core||{},t["sd-angular"].core.modal={}),t.ng.core,t.ng.material.dialog,t.ngxDeviceDetector,t.ng.material.bottomSheet,t.rxjs,t.ng.common,t["sd-angular"].core.typing,t.ng.material.icon,t.ng.material.button,t["sd-angular"].core.button)}(this,(function(t,e,n,o,r,i,a,s,l,d,c){"use strict";var p=function(){function t(t,e,n,o){var r=this;this.ref=t,this.dialog=e,this.bottomSheet=n,this.height="auto",this.lazyLoadContent=!0,this.isOpened=!1,this.alreadyOpened=!1,this.isMobileOrTablet=!1,this.subcription=new i.Subscription,this.open=function(){r.isOpened||(r.ref.markForCheck(),r.alreadyOpened=!0,r.isOpened=!0,!r.view&&r.isMobileOrTablet||"bottomSheet"===r.view?(r.bottomSheetRef=r.bottomSheet.open(r.templateRef),r.subcription.add(r.bottomSheetRef.afterDismissed().subscribe((function(){r.isOpened=!1})))):(r.dialogRef=r.dialog.open(r.templateRef,{width:r.width,maxWidth:r.width,disableClose:!0}),r.subcription.add(r.dialogRef.afterClosed().subscribe((function(){r.isOpened=!1})))))},this.close=function(){var t,e;r.ref.markForCheck(),null===(t=r.bottomSheetRef)||void 0===t||t.dismiss(),null===(e=r.dialogRef)||void 0===e||e.close()},this.isMobileOrTablet=!o.isDesktop()}return t.prototype.ngOnInit=function(){if(this.type=this.type||"primary",this.width=this.width||"80vw",!this.isMobileOrTablet)switch(this.width){case"lg":this.width="80vw";break;case"md":this.width="60vw";break;case"sm":this.width="40vw"}},t.prototype.ngOnDestroy=function(){var t;null===(t=this.subcription)||void 0===t||t.unsubscribe()},t}();p.index=0,p.decorators=[{type:e.Component,args:[{selector:"sd-modal",template:'<ng-template #templateRef>\r\n <ng-container *ngIf="!lazyLoadContent || alreadyOpened">\r\n <sd-modal-header *ngIf="title">\r\n <span [innerHtml]="title"></span>\r\n <button *ngIf="!noClose" class="float-right" type="button" (click)="close()" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </sd-modal-header>\r\n <div class="d-flex flex-column px-12 px-md-24 pb-6 overflow-auto w-100 mh-100">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-container>\r\n</ng-template>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:['button:focus{outline:none!important}.mat-dialog-container{padding:0!important}.mat-dialog-container .mat-dialog-content{max-height:80vh}.mat-dialog-container .mat-dialog-actions{margin-bottom:0;min-height:auto;padding:0}.mat-bottom-sheet-container{max-height:"inherit"}sd-modal-header{display:block;padding:12px 24px;width:100%}@media (max-width:640px){sd-modal-header{padding:12px}}.cdk-global-overlay-wrapper .mat-bottom-sheet-container{border-top-left-radius:4px;border-top-right-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;max-height:80vh;min-width:100vw;outline:0;overflow:hidden;padding:0}']}]}],p.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:n.MatDialog},{type:r.MatBottomSheet},{type:o.DeviceDetectorService}]},p.propDecorators={templateRef:[{type:e.ViewChild,args:["templateRef"]}],title:[{type:e.Input}],noClose:[{type:e.Input}],type:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],view:[{type:e.Input}],lazyLoadContent:[{type:e.Input}],modal:[{type:e.ViewChild,args:["modal"]}]};var g=function(){function t(t){this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();g.decorators=[{type:e.Component,args:[{selector:"sd-modal-header",template:'<h3 class="mb-0" mat-dialog-title *ngIf="!isMobileOrTablet">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</h3>\r\n<sd-bottom-sheet-header *ngIf="isMobileOrTablet">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</sd-bottom-sheet-header>\r\n<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>',encapsulation:e.ViewEncapsulation.None,styles:[".mat-dialog-title{align-items:center;display:flex;justify-content:space-between}button:focus{outline:none!important}"]}]}],g.ctorParameters=function(){return[{type:o.DeviceDetectorService}]};var u=function(){function t(t){this.height="auto",this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();u.decorators=[{type:e.Component,args:[{selector:"sd-modal-body",template:'<mat-dialog-content *ngIf="!isMobileOrTablet" [ngStyle]="{\'height\': height}" class="pb-5">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</mat-dialog-content>\r\n<sd-bottom-sheet-body *ngIf="isMobileOrTablet" [height]="height">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</sd-bottom-sheet-body>\r\n<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>',styles:[":host{width:100%}"]}]}],u.ctorParameters=function(){return[{type:o.DeviceDetectorService}]},u.propDecorators={height:[{type:e.Input}]};var m=function(){function t(t){this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();m.decorators=[{type:e.Component,args:[{selector:"sd-modal-footer",template:'\x3c!-- <div class="modal-footer" style="padding:5px"><ng-content></ng-content></div> --\x3e\r\n<mat-dialog-actions *ngIf="!isMobileOrTablet">\r\n <div class="c-footer">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n </div>\r\n</mat-dialog-actions>\r\n<sd-bottom-sheet-footer *ngIf="isMobileOrTablet">\r\n <ng-container *ngTemplateOutlet="content"></ng-container>\r\n</sd-bottom-sheet-footer>\r\n<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>',styles:[":host{width:100%}:host .c-footer{align-items:center;display:flex;flex:auto;justify-content:flex-end;padding:8px 0}"]}]}],m.ctorParameters=function(){return[{type:o.DeviceDetectorService}]};var h=function(t){var e=this;this.bottomSheet=t,this.isOpened=!1,this.open=function(){e.isOpened=!0,e.bottomSheet.open(e.templateRef)},this.close=function(){e.bottomSheet.dismiss()}};h.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet",template:'<ng-template #templateRef>\r\n <ng-container *ngIf="isOpened">\r\n <sd-bottom-sheet-header *ngIf="title">{{title}}</sd-bottom-sheet-header>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</ng-template>'}]}],h.ctorParameters=function(){return[{type:r.MatBottomSheet}]},h.propDecorators={templateRef:[{type:e.ViewChild,args:["templateRef"]}],title:[{type:e.Input}]};var f=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();f.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-header",template:'<h3 class="mb-0" mat-dialog-title><ng-content></ng-content></h3>'}]}],f.ctorParameters=function(){return[]};var b=function(){function t(){this.height="auto"}return t.prototype.ngOnInit=function(){},t}();b.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-body",template:"<div [ngStyle]=\"{'height': height}\">\r\n <ng-content></ng-content>\r\n<div>"}]}],b.ctorParameters=function(){return[]},b.propDecorators={height:[{type:e.Input}]};var y=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();y.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-footer",template:'\x3c!-- <div class="modal-footer" style="padding:5px"><ng-content></ng-content></div> --\x3e\r\n<div class="c-footer">\r\n <ng-content></ng-content>\r\n</div>',styles:[".c-footer{align-items:center;display:flex;flex:auto;justify-content:flex-end;padding-bottom:5px;padding-top:5px}"]}]}],y.ctorParameters=function(){return[]};var v=function(){};v.decorators=[{type:e.NgModule,args:[{imports:[a.CommonModule,l.MatIconModule,r.MatBottomSheetModule,n.MatDialogModule,d.MatButtonModule,c.SdButtonModule],declarations:[p,g,u,m,h,f,b,y],exports:[p,g,u,m,h,f,b,y],providers:[]}]}],t.SdBottomSheet=h,t.SdBottomSheetBody=b,t.SdBottomSheetFooter=y,t.SdBottomSheetHeader=f,t.SdModal=p,t.SdModalBody=u,t.SdModalFooter=m,t.SdModalHeader=g,t.SdModalModule=v,Object.defineProperty(t,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=sd-angular-core-modal.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../projects/sd-core/modal/src/lib/modal/modal.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-header/modal-header.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-body/modal-body.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-footer/modal-footer.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component.ts","../../../../projects/sd-core/modal/src/lib/modal.module.ts"],"names":["SdModal","dialog","bottomSheet","deviceService","_this","this","height","lazyLoadContent","isOpened","alreadyOpened","isMobileOrTablet","subcription","Subscription","open","view","bottomSheetRef","templateRef","add","afterDismissed","subscribe","dialogRef","width","maxWidth","disableClose","afterClosed","close","_a","dismiss","_b","isDesktop","prototype","ngOnInit","type","ngOnDestroy","unsubscribe","index","Component","args","selector","template","encapsulation","ViewEncapsulation","None","changeDetection","ChangeDetectionStrategy","OnPush","MatDialog","MatBottomSheet","DeviceDetectorService","ViewChild","Input","SdModalHeader","SdModalBody","SdModalFooter","SdBottomSheetHeader","SdBottomSheetBody","SdBottomSheetFooter","NgModule","imports","CommonModule","MatIconModule","MatBottomSheetModule","MatDialogModule","MatButtonModule","SdButtonModule","declarations","SdBottomSheet","exports","providers"],"mappings":"knCA+BE,SAAAA,EACUC,EACAC,EACRC,GAHF,IAAAC,EAAAC,KACUA,KAAAJ,OAAAA,EACAI,KAAAH,YAAAA,EAZDG,KAAAC,OAAS,OAETD,KAAAE,iBAAkB,EAE3BF,KAAAG,UAAW,EACXH,KAAAI,eAAgB,EAChBJ,KAAAK,kBAAmB,EAGXL,KAAAM,YAAc,IAAIC,EAAAA,aA6B1BP,KAAAQ,KAAO,WACDT,EAAKI,WAGTJ,EAAKK,eAAgB,EACrBL,EAAKI,UAAW,GACVJ,EAAKU,MAAQV,EAAKM,kBAAmC,gBAAdN,EAAKU,MAChDV,EAAKW,eAAiBX,EAAKF,YAAYW,KAAKT,EAAKY,aACjDZ,EAAKO,YAAYM,IAAIb,EAAKW,eAAeG,iBAAiBC,WAAU,WAClEf,EAAKI,UAAW,QAGlBJ,EAAKgB,UAAYhB,EAAKH,OAAOY,KAAKT,EAAKY,YAAa,CAClDK,MAAOjB,EAAKiB,MACZC,SAAUlB,EAAKiB,MACfE,cAAc,IAEhBnB,EAAKO,YAAYM,IAAIb,EAAKgB,UAAUI,cAAcL,WAAU,WAC1Df,EAAKI,UAAW,SAKtBH,KAAAoB,MAAQ,mBACa,QAAnBC,EAAAtB,EAAKW,sBAAc,IAAAW,GAAAA,EAA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, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\nimport { MatBottomSheetRef } from '@angular/material/bottom-sheet';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'sd-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdModal implements OnInit, OnDestroy {\r\n static index = 0;\r\n @ViewChild('templateRef') templateRef: TemplateRef<any>;\r\n @Input() title: string;\r\n @Input() noClose: boolean;\r\n @Input() type: 'primary' | 'info' | 'success' | 'warning' | 'danger';\r\n @Input() width: 'lg' | 'md' | 'sm' | string;\r\n @Input() height = 'auto';\r\n @Input() view: 'dialog' | 'bottomSheet';\r\n @Input() lazyLoadContent = true;\r\n @ViewChild('modal') modal: ElementRef;\r\n isOpened = false;\r\n alreadyOpened = false;\r\n isMobileOrTablet = false;\r\n private bottomSheetRef: MatBottomSheetRef<any>;\r\n private dialogRef: MatDialogRef<any>;\r\n private subcription = new Subscription();\r\n constructor(\r\n private dialog: MatDialog,\r\n private bottomSheet: MatBottomSheet,\r\n deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit(): void {\r\n this.type = this.type || 'primary';\r\n this.width = this.width || '80vw';\r\n if (!this.isMobileOrTablet) {\r\n switch (this.width) {\r\n case 'lg':\r\n this.width = '80vw';\r\n break;\r\n case 'md':\r\n this.width = '60vw';\r\n break;\r\n case 'sm':\r\n this.width = '40vw';\r\n break;\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subcription?.unsubscribe();\r\n }\r\n\r\n open = (): void => {\r\n if (this.isOpened) {\r\n return;\r\n }\r\n this.alreadyOpened = true;\r\n this.isOpened = true;\r\n if ((!this.view && this.isMobileOrTablet) || this.view === 'bottomSheet') {\r\n this.bottomSheetRef = this.bottomSheet.open(this.templateRef);\r\n this.subcription.add(this.bottomSheetRef.afterDismissed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n } else {\r\n this.dialogRef = this.dialog.open(this.templateRef, {\r\n width: this.width,\r\n maxWidth: this.width,\r\n disableClose: true\r\n });\r\n this.subcription.add(this.dialogRef.afterClosed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n }\r\n }\r\n\r\n close = (): void => {\r\n this.bottomSheetRef?.dismiss();\r\n this.dialogRef?.close();\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-header',\r\n templateUrl: './modal-header.component.html',\r\n styleUrls: [\r\n './modal-header.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class SdModalHeader implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-body',\r\n templateUrl: './modal-body.component.html',\r\n styleUrls: ['./modal-body.component.scss'],\r\n})\r\nexport class SdModalBody implements OnInit {\r\n @Input() height = 'auto';\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-footer',\r\n templateUrl: './modal-footer.component.html',\r\n styleUrls: ['./modal-footer.component.scss']\r\n})\r\nexport class SdModalFooter implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, ViewChild, TemplateRef, Input } from '@angular/core';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet',\r\n templateUrl: './bottom-sheet.component.html'\r\n})\r\nexport class SdBottomSheet {\r\n @ViewChild('templateRef') templateRef: TemplateRef<OptionTemplateContext>;\r\n @Input() title: string;\r\n isOpened = false;\r\n constructor(\r\n private bottomSheet: MatBottomSheet,\r\n ) { }\r\n\r\n open = () => {\r\n this.isOpened = true;\r\n this.bottomSheet.open(this.templateRef);\r\n }\r\n\r\n close = () => {\r\n this.bottomSheet.dismiss();\r\n }\r\n}\r\n\r\ninterface OptionTemplateContext {\r\n $implicit: any;\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-header',\r\n templateUrl: './bottom-sheet-header.component.html'\r\n})\r\nexport class SdBottomSheetHeader implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-body',\r\n templateUrl: './bottom-sheet-body.component.html'\r\n})\r\nexport class SdBottomSheetBody implements OnInit {\r\n @Input() height = 'auto';\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-footer',\r\n templateUrl: './bottom-sheet-footer.component.html',\r\n styleUrls: ['./bottom-sheet-footer.component.scss']\r\n})\r\nexport class SdBottomSheetFooter implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdModal } from './modal/modal.component';\r\nimport { SdModalHeader } from './modal/modal-header/modal-header.component';\r\nimport { SdModalBody } from './modal/modal-body/modal-body.component';\r\nimport { SdModalFooter } from './modal/modal-footer/modal-footer.component';\r\nimport { SdBottomSheet } from './bottom-sheet/bottom-sheet.component';\r\nimport { SdBottomSheetHeader } from './bottom-sheet/bottom-sheet-header/bottom-sheet-header.component';\r\nimport { SdBottomSheetBody } from './bottom-sheet/bottom-sheet-body/bottom-sheet-body.component';\r\nimport { SdBottomSheetFooter } from './bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component';\r\n\r\nimport '@sd-angular/core/typing';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SdButtonModule } from '@sd-angular/core/button';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatBottomSheetModule,\r\n MatDialogModule,\r\n MatButtonModule,\r\n SdButtonModule\r\n ],\r\n declarations: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n exports: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdModalModule {\r\n\r\n}\r\n"]}
1
+ {"version":3,"sources":["../../../../projects/sd-core/modal/src/lib/modal/modal.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-header/modal-header.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-body/modal-body.component.ts","../../../../projects/sd-core/modal/src/lib/modal/modal-footer/modal-footer.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component.ts","../../../../projects/sd-core/modal/src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component.ts","../../../../projects/sd-core/modal/src/lib/modal.module.ts"],"names":["SdModal","ref","dialog","bottomSheet","deviceService","_this","this","height","lazyLoadContent","isOpened","alreadyOpened","isMobileOrTablet","subcription","Subscription","open","markForCheck","view","bottomSheetRef","templateRef","add","afterDismissed","subscribe","dialogRef","width","maxWidth","disableClose","afterClosed","close","_a","dismiss","_b","isDesktop","prototype","ngOnInit","type","ngOnDestroy","unsubscribe","index","Component","args","selector","template","encapsulation","ViewEncapsulation","None","changeDetection","ChangeDetectionStrategy","OnPush","ChangeDetectorRef","MatDialog","MatBottomSheet","DeviceDetectorService","ViewChild","Input","SdModalHeader","SdModalBody","SdModalFooter","SdBottomSheetHeader","SdBottomSheetBody","SdBottomSheetFooter","NgModule","imports","CommonModule","MatIconModule","MatBottomSheetModule","MatDialogModule","MatButtonModule","SdButtonModule","declarations","SdBottomSheet","exports","providers"],"mappings":"knCA+BE,SAAAA,EACUC,EACAC,EACAC,EACRC,GAJF,IAAAC,EAAAC,KACUA,KAAAL,IAAAA,EACAK,KAAAJ,OAAAA,EACAI,KAAAH,YAAAA,EAbDG,KAAAC,OAAS,OAETD,KAAAE,iBAAkB,EAE3BF,KAAAG,UAAW,EACXH,KAAAI,eAAgB,EAChBJ,KAAAK,kBAAmB,EAGXL,KAAAM,YAAc,IAAIC,EAAAA,aA8B1BP,KAAAQ,KAAO,WACDT,EAAKI,WAGTJ,EAAKJ,IAAIc,eACTV,EAAKK,eAAgB,EACrBL,EAAKI,UAAW,GACVJ,EAAKW,MAAQX,EAAKM,kBAAmC,gBAAdN,EAAKW,MAChDX,EAA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BCCD,SAAAM,YAEAA,EAAA3B,UAAAC,SAAA,sCARDK,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,yBACVC,SAAA,8UC8CF,iCAhCCmB,EAAAA,SAAQrB,KAAA,CAAC,CACRsB,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,qBACAC,EAAAA,gBACAC,EAAAA,gBACAC,EAAAA,gBAEFC,aAAc,CACZpE,EACAsD,EACAC,EACAC,EACAa,EACAZ,EACAC,EACAC,GAEFW,QAAS,CACPtE,EACAsD,EACAC,EACAC,EACAa,EACAZ,EACAC,EACAC,GAEFY,UAAW","sourcesContent":["import { Component, ElementRef, Input, ViewChild, OnInit, OnDestroy, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\nimport { MatBottomSheetRef } from '@angular/material/bottom-sheet';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'sd-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdModal implements OnInit, OnDestroy {\r\n static index = 0;\r\n @ViewChild('templateRef') templateRef: TemplateRef<any>;\r\n @Input() title: string;\r\n @Input() noClose: boolean;\r\n @Input() type: 'primary' | 'info' | 'success' | 'warning' | 'danger';\r\n @Input() width: 'lg' | 'md' | 'sm' | string;\r\n @Input() height = 'auto';\r\n @Input() view: 'dialog' | 'bottomSheet';\r\n @Input() lazyLoadContent = true;\r\n @ViewChild('modal') modal: ElementRef;\r\n isOpened = false;\r\n alreadyOpened = false;\r\n isMobileOrTablet = false;\r\n private bottomSheetRef: MatBottomSheetRef<any>;\r\n private dialogRef: MatDialogRef<any>;\r\n private subcription = new Subscription();\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n private dialog: MatDialog,\r\n private bottomSheet: MatBottomSheet,\r\n deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit(): void {\r\n this.type = this.type || 'primary';\r\n this.width = this.width || '80vw';\r\n if (!this.isMobileOrTablet) {\r\n switch (this.width) {\r\n case 'lg':\r\n this.width = '80vw';\r\n break;\r\n case 'md':\r\n this.width = '60vw';\r\n break;\r\n case 'sm':\r\n this.width = '40vw';\r\n break;\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subcription?.unsubscribe();\r\n }\r\n\r\n open = (): void => {\r\n if (this.isOpened) {\r\n return;\r\n }\r\n this.ref.markForCheck();\r\n this.alreadyOpened = true;\r\n this.isOpened = true;\r\n if ((!this.view && this.isMobileOrTablet) || this.view === 'bottomSheet') {\r\n this.bottomSheetRef = this.bottomSheet.open(this.templateRef);\r\n this.subcription.add(this.bottomSheetRef.afterDismissed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n } else {\r\n this.dialogRef = this.dialog.open(this.templateRef, {\r\n width: this.width,\r\n maxWidth: this.width,\r\n disableClose: true\r\n });\r\n this.subcription.add(this.dialogRef.afterClosed().subscribe(() => {\r\n this.isOpened = false;\r\n }));\r\n }\r\n }\r\n\r\n close = (): void => {\r\n this.ref.markForCheck();\r\n this.bottomSheetRef?.dismiss();\r\n this.dialogRef?.close();\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-header',\r\n templateUrl: './modal-header.component.html',\r\n styleUrls: [\r\n './modal-header.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class SdModalHeader implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-body',\r\n templateUrl: './modal-body.component.html',\r\n styleUrls: ['./modal-body.component.scss'],\r\n})\r\nexport class SdModalBody implements OnInit {\r\n @Input() height = 'auto';\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\n\r\n@Component({\r\n selector: 'sd-modal-footer',\r\n templateUrl: './modal-footer.component.html',\r\n styleUrls: ['./modal-footer.component.scss']\r\n})\r\nexport class SdModalFooter implements OnInit {\r\n isMobileOrTablet = false;\r\n constructor(deviceService: DeviceDetectorService) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Component, ViewChild, TemplateRef, Input } from '@angular/core';\r\nimport { MatBottomSheet } from '@angular/material/bottom-sheet';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet',\r\n templateUrl: './bottom-sheet.component.html'\r\n})\r\nexport class SdBottomSheet {\r\n @ViewChild('templateRef') templateRef: TemplateRef<OptionTemplateContext>;\r\n @Input() title: string;\r\n isOpened = false;\r\n constructor(\r\n private bottomSheet: MatBottomSheet,\r\n ) { }\r\n\r\n open = () => {\r\n this.isOpened = true;\r\n this.bottomSheet.open(this.templateRef);\r\n }\r\n\r\n close = () => {\r\n this.bottomSheet.dismiss();\r\n }\r\n}\r\n\r\ninterface OptionTemplateContext {\r\n $implicit: any;\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-header',\r\n templateUrl: './bottom-sheet-header.component.html'\r\n})\r\nexport class SdBottomSheetHeader implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-body',\r\n templateUrl: './bottom-sheet-body.component.html'\r\n})\r\nexport class SdBottomSheetBody implements OnInit {\r\n @Input() height = 'auto';\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-bottom-sheet-footer',\r\n templateUrl: './bottom-sheet-footer.component.html',\r\n styleUrls: ['./bottom-sheet-footer.component.scss']\r\n})\r\nexport class SdBottomSheetFooter implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdModal } from './modal/modal.component';\r\nimport { SdModalHeader } from './modal/modal-header/modal-header.component';\r\nimport { SdModalBody } from './modal/modal-body/modal-body.component';\r\nimport { SdModalFooter } from './modal/modal-footer/modal-footer.component';\r\nimport { SdBottomSheet } from './bottom-sheet/bottom-sheet.component';\r\nimport { SdBottomSheetHeader } from './bottom-sheet/bottom-sheet-header/bottom-sheet-header.component';\r\nimport { SdBottomSheetBody } from './bottom-sheet/bottom-sheet-body/bottom-sheet-body.component';\r\nimport { SdBottomSheetFooter } from './bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component';\r\n\r\nimport '@sd-angular/core/typing';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SdButtonModule } from '@sd-angular/core/button';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatBottomSheetModule,\r\n MatDialogModule,\r\n MatButtonModule,\r\n SdButtonModule\r\n ],\r\n declarations: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n exports: [\r\n SdModal,\r\n SdModalHeader,\r\n SdModalBody,\r\n SdModalFooter,\r\n SdBottomSheet,\r\n SdBottomSheetHeader,\r\n SdBottomSheetBody,\r\n SdBottomSheetFooter\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdModalModule {\r\n\r\n}\r\n"]}