@sd-angular/core 1.2.82 → 1.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sd-angular-core-modal.umd.js +1 -1
- package/bundles/sd-angular-core-modal.umd.js.map +1 -1
- package/bundles/sd-angular-core-modal.umd.min.js +1 -1
- package/bundles/sd-angular-core-modal.umd.min.js.map +1 -1
- package/esm2015/modal/src/lib/modal/modal.component.js +2 -2
- package/fesm2015/sd-angular-core-modal.js +1 -1
- package/fesm2015/sd-angular-core-modal.js.map +1 -1
- package/modal/sd-angular-core-modal.metadata.json +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.2.82.tgz → sd-angular-core-1.2.83.tgz} +0 -0
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
SdModal.decorators = [
|
|
76
76
|
{ type: core.Component, args: [{
|
|
77
77
|
selector: 'sd-modal',
|
|
78
|
-
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 <
|
|
78
|
+
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 <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdModalHeaderRight]\"></ng-content>\r\n <button *ngIf=\"!noClose\" type=\"button\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\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>",
|
|
79
79
|
encapsulation: core.ViewEncapsulation.None,
|
|
80
80
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
81
81
|
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}"]
|
|
@@ -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, 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 @Input() closeClickOutSide: boolean;\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: !this.closeClickOutSide // mặc định ko cho đóng modal khi click out side\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 { 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":";;;;;;;QAgCE,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;YAd5B,WAAM,GAAG,MAAM,CAAC;YAEhB,oBAAe,GAAG,IAAI,CAAC;YAGhC,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,CAA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W;wBACX,aAAa;wBACb,aAAa;wBACb,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;qBACpB;oBACD,SAAS,EAAE,EACV;iBACF;;;IChDD;;;;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 @Input() closeClickOutSide: boolean;\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: !this.closeClickOutSide // mặc định ko cho đóng modal khi click out side\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 { 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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!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("@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","@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.ng.material.icon,t.ng.material.button,t["sd-angular"].core.button)}(this,(function(t,e,n,o,i,r,a,s,l,d){"use strict";var c=function(){function t(t,e,n,o){var i=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 r.Subscription,this.open=function(){i.isOpened||(i.ref.markForCheck(),i.alreadyOpened=!0,i.isOpened=!0,!i.view&&i.isMobileOrTablet||"bottomSheet"===i.view?(i.bottomSheetRef=i.bottomSheet.open(i.templateRef),i.subcription.add(i.bottomSheetRef.afterDismissed().subscribe((function(){i.isOpened=!1})))):(i.dialogRef=i.dialog.open(i.templateRef,{width:i.width,maxWidth:i.width,disableClose:!i.closeClickOutSide}),i.subcription.add(i.dialogRef.afterClosed().subscribe((function(){i.isOpened=!1})))))},this.close=function(){var t,e;i.ref.markForCheck(),null===(t=i.bottomSheetRef)||void 0===t||t.dismiss(),null===(e=i.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}();c.index=0,c.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"
|
|
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("@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","@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.ng.material.icon,t.ng.material.button,t["sd-angular"].core.button)}(this,(function(t,e,n,o,i,r,a,s,l,d){"use strict";var c=function(){function t(t,e,n,o){var i=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 r.Subscription,this.open=function(){i.isOpened||(i.ref.markForCheck(),i.alreadyOpened=!0,i.isOpened=!0,!i.view&&i.isMobileOrTablet||"bottomSheet"===i.view?(i.bottomSheetRef=i.bottomSheet.open(i.templateRef),i.subcription.add(i.bottomSheetRef.afterDismissed().subscribe((function(){i.isOpened=!1})))):(i.dialogRef=i.dialog.open(i.templateRef,{width:i.width,maxWidth:i.width,disableClose:!i.closeClickOutSide}),i.subcription.add(i.dialogRef.afterClosed().subscribe((function(){i.isOpened=!1})))))},this.close=function(){var t,e;i.ref.markForCheck(),null===(t=i.bottomSheetRef)||void 0===t||t.dismiss(),null===(e=i.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}();c.index=0,c.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 <div class="d-flex align-items-center">\r\n <ng-content select="[sdModalHeaderRight]"></ng-content>\r\n <button *ngIf="!noClose" type="button" (click)="close()" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\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}']}]}],c.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:n.MatDialog},{type:i.MatBottomSheet},{type:o.DeviceDetectorService}]},c.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}],closeClickOutSide:[{type:e.Input}],modal:[{type:e.ViewChild,args:["modal"]}]};var p=function(){function t(t){this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();p.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}"]}]}],p.ctorParameters=function(){return[{type:o.DeviceDetectorService}]};var g=function(){function t(t){this.height="auto",this.isMobileOrTablet=!1,this.isMobileOrTablet=!t.isDesktop()}return t.prototype.ngOnInit=function(){},t}();g.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%}"]}]}],g.ctorParameters=function(){return[{type:o.DeviceDetectorService}]},g.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 u=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()}};u.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>'}]}],u.ctorParameters=function(){return[{type:i.MatBottomSheet}]},u.propDecorators={templateRef:[{type:e.ViewChild,args:["templateRef"]}],title:[{type:e.Input}]};var h=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();h.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-header",template:'<h3 class="mb-0" mat-dialog-title><ng-content></ng-content></h3>'}]}],h.ctorParameters=function(){return[]};var f=function(){function t(){this.height="auto"}return t.prototype.ngOnInit=function(){},t}();f.decorators=[{type:e.Component,args:[{selector:"sd-bottom-sheet-body",template:"<div [ngStyle]=\"{'height': height}\">\r\n <ng-content></ng-content>\r\n<div>"}]}],f.ctorParameters=function(){return[]},f.propDecorators={height:[{type:e.Input}]};var b=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();b.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}"]}]}],b.ctorParameters=function(){return[]};var y=function(){};y.decorators=[{type:e.NgModule,args:[{imports:[a.CommonModule,s.MatIconModule,i.MatBottomSheetModule,n.MatDialogModule,l.MatButtonModule,d.SdButtonModule],declarations:[c,p,g,m,u,h,f,b],exports:[c,p,g,m,u,h,f,b],providers:[]}]}],t.SdBottomSheet=u,t.SdBottomSheetBody=f,t.SdBottomSheetFooter=b,t.SdBottomSheetHeader=h,t.SdModal=c,t.SdModalBody=g,t.SdModalFooter=m,t.SdModalHeader=p,t.SdModalModule=y,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","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","closeClickOutSide","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":"uhCAgCE,SAAAA,EACUC,EACAC,EACAC,EACRC,GAJF,IAAAC,EAAAC,KACUA,KAAAL,IAAAA,EACAK,KAAAJ,OAAAA,EACAI,KAAAH,YAAAA,EAdDG,KAAAC,OAAS,OAETD,KAAAE,iBAAkB,EAG3BF,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,EAAKY,eAAiBZ,EAAKF,YAAYW,KAAKT,EAAKa,aACjDb,EAAKO,YAAYO,IAAId,EAAKY,eAAeG,iBAAiBC,WAAU,WAClEhB,EAAKI,UAAW,QAGlBJ,EAAKiB,UAAYjB,EAAKH,OAAOY,KAAKT,EAAKa,YAAa,CAClDK,MAAOlB,EAAKkB,MACZC,SAAUnB,EAAKkB,MACfE,cAAepB,EAAKqB,oBAEtBrB,EAAKO,YAAYO,IAAId,EAAKiB,UAAUK,cAAcN,WAAU,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,EACAZ,EACAC,EACAC,GAEFW,QAAS,CACPvE,EACAuD,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 @Input() closeClickOutSide: boolean;\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: !this.closeClickOutSide // mặc định ko cho đóng modal khi click out side\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 { 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","closeClickOutSide","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":"uhCAgCE,SAAAA,EACUC,EACAC,EACAC,EACRC,GAJF,IAAAC,EAAAC,KACUA,KAAAL,IAAAA,EACAK,KAAAJ,OAAAA,EACAI,KAAAH,YAAAA,EAdDG,KAAAC,OAAS,OAETD,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uQAJOS,EAAAA,uDAONE,EAAAA,UAASb,KAAA,CAAC,8BACVc,EAAAA,0BCFD,SAAAI,YAEAA,EAAAzB,UAAAC,SAAA,sCAPDK,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,yBACVC,SAAA,8HCIA,SAAAiB,IADSrD,KAAAC,OAAS,cAGlBoD,EAAA1B,UAAAC,SAAA,sCARDK,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,uBACVC,SAAA,2JAGCY,EAAAA,0BCCD,SAAAM,YAEAA,EAAA3B,UAAAC,SAAA,sCARDK,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,yBACVC,SAAA,8UC6CF,iCAhCCmB,EAAAA,SAAQrB,KAAA,CAAC,CACRsB,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,qBACAC,EAAAA,gBACAC,EAAAA,gBACAC,EAAAA,gBAEFC,aAAc,CACZrE,EACAuD,EACAC,EACAC,EACAa,EACAZ,EACAC,EACAC,GAEFW,QAAS,CACPvE,EACAuD,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 @Input() closeClickOutSide: boolean;\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: !this.closeClickOutSide // mặc định ko cho đóng modal khi click out side\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 { 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"]}
|
|
@@ -72,7 +72,7 @@ SdModal.index = 0;
|
|
|
72
72
|
SdModal.decorators = [
|
|
73
73
|
{ type: Component, args: [{
|
|
74
74
|
selector: 'sd-modal',
|
|
75
|
-
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 <
|
|
75
|
+
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 <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdModalHeaderRight]\"></ng-content>\r\n <button *ngIf=\"!noClose\" type=\"button\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\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>",
|
|
76
76
|
encapsulation: ViewEncapsulation.None,
|
|
77
77
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
78
|
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}"]
|
|
@@ -96,4 +96,4 @@ SdModal.propDecorators = {
|
|
|
96
96
|
closeClickOutSide: [{ type: Input }],
|
|
97
97
|
modal: [{ type: ViewChild, args: ['modal',] }]
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
99
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IkM6L1VzZXJzL3VzZXIvRG9jdW1lbnRzL2xpYi1jb3JlLXVpL3Byb2plY3RzL3NkLWNvcmUvbW9kYWwvIiwic291cmNlcyI6WyJzcmMvbGliL21vZGFsL21vZGFsLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFjLEtBQUssRUFBRSxTQUFTLEVBQWtDLGlCQUFpQixFQUFFLHVCQUF1QixFQUFFLGlCQUFpQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZLLE9BQU8sRUFBRSxTQUFTLEVBQWdCLE1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ZWNrKCk7XHJcbiAgICB0aGlzLmJvdHRvbVNoZWV0UmVmPy5kaXNtaXNzKCk7XHJcbiAgICB0aGlzLmRpYWxvZ1JlZj8uY2xvc2UoKTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -77,7 +77,7 @@ SdModal.index = 0;
|
|
|
77
77
|
SdModal.decorators = [
|
|
78
78
|
{ type: Component, args: [{
|
|
79
79
|
selector: 'sd-modal',
|
|
80
|
-
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 <
|
|
80
|
+
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 <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdModalHeaderRight]\"></ng-content>\r\n <button *ngIf=\"!noClose\" type=\"button\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\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>",
|
|
81
81
|
encapsulation: ViewEncapsulation.None,
|
|
82
82
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
83
83
|
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}"]
|
|
@@ -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, 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 @Input() closeClickOutSide: boolean;\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: !this.closeClickOutSide // mặc định ko cho đóng modal khi click out side\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 { 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;IAkBlB,YACU,GAAsB,EACtB,MAAiB,EACjB,WAA2B,EACnC,aAAoC;QAH5B,QAAG,GAAH,GAAG,CAAmB;QACtB,WAAM,GAAN,MAAM,CAAW;QACjB,gBAAW,GAAX,WAAW,CAAgB;QAd5B,WAAM,GAAG,MAAM,C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ARF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,8EAAmD;aACpD;;;;MCCY,iBAAiB;IAE5B;QADS,WAAM,GAAG,MAAM,CAAC;KACR;IAEjB,QAAQ;KACP;;;YATF,SAAS,SAAC;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,0FAAiD;aAClD;;;;qBAEE,KAAK;;;MCAK,mBAAmB;IAC9B,iBAAiB;IAEjB,QAAQ;KACP;;;YATF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,2KAAmD;;aAEpD;;;;MC2CY,aAAa;;;YAhCzB,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,aAAa;oBACb,oBAAoB;oBACpB,eAAe;oBACf,eAAe;oBACf,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,OAAO;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;;;AChDD;;;;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 @Input() closeClickOutSide: boolean;\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: !this.closeClickOutSide // mặc định ko cho đóng modal khi click out side\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 { 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;IAkBlB,YACU,GAAsB,EACtB,MAAiB,EACjB,WAA2B,EACnC,aAAoC;QAH5B,QAAG,GAAH,GAAG,CAAmB;QACtB,WAAM,GAAN,MAAM,CAAW;QACjB,gBAAW,GAAX,WAAW,CAAgB;QAd5B,WAAM,GAAG,MAAM,CAAC;QAEhB,oBAAe,GAAG,IAAI,CAAC;QAGhC,aAAQ,GAAG,KAAK,CAAC;QACjB,kBAAa,GAAG,KAAK,CAAC;QACtB,qBAAgB,GAAG,KAAK,CAAC;QAGjB,gBAAW,GAAG,IAAI,YAAY,EAAE,CAAC;QA8BzC,SAAI,GAAG;YACL,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,OAAO;aACR;YACD,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,gBAAgB,KAAK,IA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oBACf,eAAe;oBACf,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,OAAO;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;;;AChDD;;;;ACAA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdModal":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"sd-modal","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":11,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":12,"character":19},"member":"OnPush"},"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>","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}"]}]}],"members":{"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":16,"character":3},"arguments":["templateRef"]}]}],"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"noClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"view":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"lazyLoadContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"closeClickOutSide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"modal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":25,"character":3},"arguments":["modal"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":33,"character":17},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":34,"character":20},{"__symbolic":"reference","module":"@angular/material/bottom-sheet","name":"MatBottomSheet","line":35,"character":25},{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":36,"character":19}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"index":0}},"SdModalHeader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"sd-modal-header","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":8,"character":17},"member":"None"},"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>","styles":[".mat-dialog-title{align-items:center;display:flex;justify-content:space-between}button:focus{outline:none!important}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":12,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"SdModalBody":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"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%}"]}]}],"members":{"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":11,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"SdModalFooter":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"sd-modal-footer","template":"<!-- <div class=\"modal-footer\" style=\"padding:5px\"><ng-content></ng-content></div> -->\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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":10,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"SdBottomSheet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"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>"}]}],"members":{"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":8,"character":3},"arguments":["templateRef"]}]}],"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/bottom-sheet","name":"MatBottomSheet","line":12,"character":25}]}]}},"SdBottomSheetHeader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"sd-bottom-sheet-header","template":"<h3 class=\"mb-0\" mat-dialog-title><ng-content></ng-content></h3>"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"SdBottomSheetBody":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"sd-bottom-sheet-body","template":"<div [ngStyle]=\"{'height': height}\">\r\n <ng-content></ng-content>\r\n<div>"}]}],"members":{"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":7,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"SdBottomSheetFooter":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"sd-bottom-sheet-footer","template":"<!-- <div class=\"modal-footer\" style=\"padding:5px\"><ng-content></ng-content></div> -->\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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"SdModalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":17,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/bottom-sheet","name":"MatBottomSheetModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":23,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":24,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdModal"},{"__symbolic":"reference","name":"SdModalHeader"},{"__symbolic":"reference","name":"SdModalBody"},{"__symbolic":"reference","name":"SdModalFooter"},{"__symbolic":"reference","name":"SdBottomSheet"},{"__symbolic":"reference","name":"SdBottomSheetHeader"},{"__symbolic":"reference","name":"SdBottomSheetBody"},{"__symbolic":"reference","name":"SdBottomSheetFooter"}],"exports":[{"__symbolic":"reference","name":"SdModal"},{"__symbolic":"reference","name":"SdModalHeader"},{"__symbolic":"reference","name":"SdModalBody"},{"__symbolic":"reference","name":"SdModalFooter"},{"__symbolic":"reference","name":"SdBottomSheet"},{"__symbolic":"reference","name":"SdBottomSheetHeader"},{"__symbolic":"reference","name":"SdBottomSheetBody"},{"__symbolic":"reference","name":"SdBottomSheetFooter"}],"providers":[]}]}],"members":{}}},"origins":{"SdModal":"./src/lib/modal/modal.component","SdModalHeader":"./src/lib/modal/modal-header/modal-header.component","SdModalBody":"./src/lib/modal/modal-body/modal-body.component","SdModalFooter":"./src/lib/modal/modal-footer/modal-footer.component","SdBottomSheet":"./src/lib/bottom-sheet/bottom-sheet.component","SdBottomSheetHeader":"./src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component","SdBottomSheetBody":"./src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component","SdBottomSheetFooter":"./src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component","SdModalModule":"./src/lib/modal.module"},"importAs":"@sd-angular/core/modal"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdModal":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"sd-modal","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":11,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":12,"character":19},"member":"OnPush"},"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 <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdModalHeaderRight]\"></ng-content>\r\n <button *ngIf=\"!noClose\" type=\"button\" (click)=\"close()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\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>","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}"]}]}],"members":{"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":16,"character":3},"arguments":["templateRef"]}]}],"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"noClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"view":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"lazyLoadContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"closeClickOutSide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"modal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":25,"character":3},"arguments":["modal"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":33,"character":17},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":34,"character":20},{"__symbolic":"reference","module":"@angular/material/bottom-sheet","name":"MatBottomSheet","line":35,"character":25},{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":36,"character":19}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"index":0}},"SdModalHeader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"sd-modal-header","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":8,"character":17},"member":"None"},"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>","styles":[".mat-dialog-title{align-items:center;display:flex;justify-content:space-between}button:focus{outline:none!important}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":12,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"SdModalBody":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"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%}"]}]}],"members":{"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":11,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"SdModalFooter":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"sd-modal-footer","template":"<!-- <div class=\"modal-footer\" style=\"padding:5px\"><ng-content></ng-content></div> -->\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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-device-detector","name":"DeviceDetectorService","line":10,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"SdBottomSheet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"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>"}]}],"members":{"templateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":8,"character":3},"arguments":["templateRef"]}]}],"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/bottom-sheet","name":"MatBottomSheet","line":12,"character":25}]}]}},"SdBottomSheetHeader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"sd-bottom-sheet-header","template":"<h3 class=\"mb-0\" mat-dialog-title><ng-content></ng-content></h3>"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"SdBottomSheetBody":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"sd-bottom-sheet-body","template":"<div [ngStyle]=\"{'height': height}\">\r\n <ng-content></ng-content>\r\n<div>"}]}],"members":{"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":7,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"SdBottomSheetFooter":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"sd-bottom-sheet-footer","template":"<!-- <div class=\"modal-footer\" style=\"padding:5px\"><ng-content></ng-content></div> -->\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}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"SdModalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":17,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/bottom-sheet","name":"MatBottomSheetModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":23,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":24,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdModal"},{"__symbolic":"reference","name":"SdModalHeader"},{"__symbolic":"reference","name":"SdModalBody"},{"__symbolic":"reference","name":"SdModalFooter"},{"__symbolic":"reference","name":"SdBottomSheet"},{"__symbolic":"reference","name":"SdBottomSheetHeader"},{"__symbolic":"reference","name":"SdBottomSheetBody"},{"__symbolic":"reference","name":"SdBottomSheetFooter"}],"exports":[{"__symbolic":"reference","name":"SdModal"},{"__symbolic":"reference","name":"SdModalHeader"},{"__symbolic":"reference","name":"SdModalBody"},{"__symbolic":"reference","name":"SdModalFooter"},{"__symbolic":"reference","name":"SdBottomSheet"},{"__symbolic":"reference","name":"SdBottomSheetHeader"},{"__symbolic":"reference","name":"SdBottomSheetBody"},{"__symbolic":"reference","name":"SdBottomSheetFooter"}],"providers":[]}]}],"members":{}}},"origins":{"SdModal":"./src/lib/modal/modal.component","SdModalHeader":"./src/lib/modal/modal-header/modal-header.component","SdModalBody":"./src/lib/modal/modal-body/modal-body.component","SdModalFooter":"./src/lib/modal/modal-footer/modal-footer.component","SdBottomSheet":"./src/lib/bottom-sheet/bottom-sheet.component","SdBottomSheetHeader":"./src/lib/bottom-sheet/bottom-sheet-header/bottom-sheet-header.component","SdBottomSheetBody":"./src/lib/bottom-sheet/bottom-sheet-body/bottom-sheet-body.component","SdBottomSheetFooter":"./src/lib/bottom-sheet/bottom-sheet-footer/bottom-sheet-footer.component","SdModalModule":"./src/lib/modal.module"},"importAs":"@sd-angular/core/modal"}
|
package/package.json
CHANGED
|
index f59e5cf..fa73576 100644
|
|
|
Binary file
|