@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
@@ -1,4 +1,4 @@
1
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, NgModule } from '@angular/core';
1
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, Input, NgModule } from '@angular/core';
2
2
  import { MatDialog, MatDialogModule } from '@angular/material/dialog';
3
3
  import { DeviceDetectorService } from 'ngx-device-detector';
4
4
  import { MatBottomSheet, MatBottomSheetModule } from '@angular/material/bottom-sheet';
@@ -10,7 +10,8 @@ import { MatButtonModule } from '@angular/material/button';
10
10
  import { SdButtonModule } from '@sd-angular/core/button';
11
11
 
12
12
  class SdModal {
13
- constructor(dialog, bottomSheet, deviceService) {
13
+ constructor(ref, dialog, bottomSheet, deviceService) {
14
+ this.ref = ref;
14
15
  this.dialog = dialog;
15
16
  this.bottomSheet = bottomSheet;
16
17
  this.height = 'auto';
@@ -23,6 +24,7 @@ class SdModal {
23
24
  if (this.isOpened) {
24
25
  return;
25
26
  }
27
+ this.ref.markForCheck();
26
28
  this.alreadyOpened = true;
27
29
  this.isOpened = true;
28
30
  if ((!this.view && this.isMobileOrTablet) || this.view === 'bottomSheet') {
@@ -44,6 +46,7 @@ class SdModal {
44
46
  };
45
47
  this.close = () => {
46
48
  var _a, _b;
49
+ this.ref.markForCheck();
47
50
  (_a = this.bottomSheetRef) === null || _a === void 0 ? void 0 : _a.dismiss();
48
51
  (_b = this.dialogRef) === null || _b === void 0 ? void 0 : _b.close();
49
52
  };
@@ -82,6 +85,7 @@ SdModal.decorators = [
82
85
  },] }
83
86
  ];
84
87
  SdModal.ctorParameters = () => [
88
+ { type: ChangeDetectorRef },
85
89
  { type: MatDialog },
86
90
  { type: MatBottomSheet },
87
91
  { type: DeviceDetectorService }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-modal.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":[],"mappings":";;;;;;;;;;;MAca,OAAO;IAiBlB,YACU,MAAiB,EACjB,WAA2B,EACnC,aAAoC;QAF5B,WAAM,GAAN,MAAM,CAAW;QACjB,gBAAW,GAAX,WAAW,CAAgB;QAZ5B,WAAM,GAAG,MAAM,CAAC;QAEhB,oBAAe,GAAG,IAAI,CAAC;QAEhC,aAAQ,GAAG,KAAK,CAAC;QACjB,kBAAa,GAAG,KAAK,CAAC;QACtB,qBAAgB,GAAG,KAAK,CAAC;QAGjB,gBAAW,GAAG,IAAI,YAAY,EAAE,CAAC;QA6BzC,SAAI,GAAG;YACL,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,OAAO;aACR;YACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI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AO;oBACP,aAAa;oBACb,WAAW;oBACX,aAAa;oBACb,aAAa;oBACb,mBAAmB;oBACnB,iBAAiB;oBACjB,mBAAmB;iBACpB;gBACD,OAAO,EAAE;oBACP,OAAO;oBACP,aAAa;oBACb,WAAW;oBACX,aAAa;oBACb,aAAa;oBACb,mBAAmB;oBACnB,iBAAiB;oBACjB,mBAAmB;iBACpB;gBACD,SAAS,EAAE,EACV;aACF;;;ACjDD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-modal.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":[],"mappings":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