@craftsjs/modal 4.0.0 → 5.0.1

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.
@@ -6,138 +6,140 @@ import { MatDialogModule } from '@angular/material/dialog';
6
6
  import * as i1 from '@craftsjs/perfect-scrollbar';
7
7
  import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
8
8
 
9
- class ModalComponent {
10
- }
11
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.7", type: ModalComponent, selector: "craftsjs-modal", host: { classAttribute: "modal" }, ngImport: i0, template: "<ng-content select=\"modal-header\"></ng-content>\r\n<ng-content select=\"modal-body\"></ng-content>\r\n<ng-content select=\"modal-footer\"></ng-content>", styles: [".mat-dialog-container{overflow:hidden!important}.modal{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;outline:0}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-body-responsive{position:relative;max-height:calc(70vh - 100px);overflow:auto}.modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalComponent, decorators: [{
14
- type: Component,
15
- args: [{ selector: 'craftsjs-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
16
- class: 'modal'
17
- }, template: "<ng-content select=\"modal-header\"></ng-content>\r\n<ng-content select=\"modal-body\"></ng-content>\r\n<ng-content select=\"modal-footer\"></ng-content>", styles: [".mat-dialog-container{overflow:hidden!important}.modal{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;outline:0}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-body-responsive{position:relative;max-height:calc(70vh - 100px);overflow:auto}.modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}\n"] }]
9
+ class ModalComponent {
10
+ }
11
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalComponent, selector: "craftsjs-modal", host: { classAttribute: "modal" }, ngImport: i0, template: "<ng-content select=\"modal-header\"></ng-content>\n<ng-content select=\"modal-body\"></ng-content>\n<ng-content select=\"modal-footer\"></ng-content>", styles: [".mat-mdc-dialog-container{overflow:hidden!important}.modal{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;outline:0}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-body-responsive{position:relative;max-height:calc(70vh - 100px);overflow:auto}.modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, decorators: [{
14
+ type: Component,
15
+ args: [{ selector: 'craftsjs-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
16
+ class: 'modal'
17
+ }, template: "<ng-content select=\"modal-header\"></ng-content>\n<ng-content select=\"modal-body\"></ng-content>\n<ng-content select=\"modal-footer\"></ng-content>", styles: [".mat-mdc-dialog-container{overflow:hidden!important}.modal{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;outline:0}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-body-responsive{position:relative;max-height:calc(70vh - 100px);overflow:auto}.modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}\n"] }]
18
18
  }] });
19
19
 
20
- class ModalHeaderDirective {
21
- }
22
- ModalHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
23
- ModalHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.7", type: ModalHeaderDirective, selector: "modal-header, [modal-header], [craftsjsModalHeader]", host: { classAttribute: "modal-header" }, ngImport: i0 });
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalHeaderDirective, decorators: [{
25
- type: Directive,
26
- args: [{
27
- selector: 'modal-header, [modal-header], [craftsjsModalHeader]',
28
- host: { class: 'modal-header' }
29
- }]
20
+ class ModalHeaderDirective {
21
+ }
22
+ ModalHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
23
+ ModalHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalHeaderDirective, selector: "modal-header, [modal-header], [craftsjsModalHeader]", host: { classAttribute: "modal-header" }, ngImport: i0 });
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalHeaderDirective, decorators: [{
25
+ type: Directive,
26
+ args: [{
27
+ selector: 'modal-header, [modal-header], [craftsjsModalHeader]',
28
+ host: { class: 'modal-header' }
29
+ }]
30
30
  }] });
31
31
 
32
- class ModalFooterDirective {
33
- }
34
- ModalFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
35
- ModalFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.7", type: ModalFooterDirective, selector: "modal-footer, [modal-footer], [craftsjsModalFooter]", host: { classAttribute: "modal-footer" }, ngImport: i0 });
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalFooterDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',
40
- host: { class: 'modal-footer' }
41
- }]
32
+ class ModalFooterDirective {
33
+ }
34
+ ModalFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
35
+ ModalFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalFooterDirective, selector: "modal-footer, [modal-footer], [craftsjsModalFooter]", host: { classAttribute: "modal-footer" }, ngImport: i0 });
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalFooterDirective, decorators: [{
37
+ type: Directive,
38
+ args: [{
39
+ selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',
40
+ host: { class: 'modal-footer' }
41
+ }]
42
42
  }] });
43
43
 
44
- class ModalBodyComponent {
45
- }
46
- ModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
- ModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.7", type: ModalBodyComponent, selector: "modal-body, [modal-body], [craftsjsModalBody]", host: { classAttribute: "modal-body" }, ngImport: i0, template: "<div class=\"modal-body-responsive\" perfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [""], directives: [{ type: i1.PerfectScrollbarDirective, selector: "[perfectScrollbar]", inputs: ["perfectScrollOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalBodyComponent, decorators: [{
49
- type: Component,
50
- args: [{ selector: 'modal-body, [modal-body], [craftsjsModalBody]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
51
- class: 'modal-body'
52
- }, encapsulation: ViewEncapsulation.None, template: "<div class=\"modal-body-responsive\" perfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [""] }]
44
+ class ModalBodyComponent {
45
+ }
46
+ ModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
+ ModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalBodyComponent, selector: "modal-body, [modal-body], [craftsjsModalBody]", host: { classAttribute: "modal-body" }, ngImport: i0, template: "<div class=\"modal-body-responsive\" perfectScrollbar>\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.PerfectScrollbarDirective, selector: "[perfectScrollbar]", inputs: ["perfectScrollOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalBodyComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ selector: 'modal-body, [modal-body], [craftsjsModalBody]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
51
+ class: 'modal-body'
52
+ }, encapsulation: ViewEncapsulation.None, template: "<div class=\"modal-body-responsive\" perfectScrollbar>\n <ng-content></ng-content>\n</div>\n" }]
53
53
  }] });
54
54
 
55
55
  const CRAFTSJS_MODAL_CONFIG = new InjectionToken('CRAFTSJS_MODAL_CONFIG');
56
56
 
57
- class ModalConfig {
57
+ class ModalConfig {
58
58
  }
59
59
 
60
- class ModalService {
61
- constructor(_dialog, modalConfig) {
62
- this._dialog = _dialog;
63
- this.modalConfig = modalConfig;
64
- }
65
- show(component, data) {
66
- return this._dialog.open(component, {
67
- data,
68
- width: this.modalConfig.width
69
- });
70
- }
71
- }
72
- ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalService, deps: [{ token: i1$1.MatDialog }, { token: CRAFTSJS_MODAL_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
73
- ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalService });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalService, decorators: [{
75
- type: Injectable
76
- }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: ModalConfig, decorators: [{
77
- type: Inject,
78
- args: [CRAFTSJS_MODAL_CONFIG]
60
+ class ModalService {
61
+ constructor(_dialog, modalConfig) {
62
+ this._dialog = _dialog;
63
+ this.modalConfig = modalConfig;
64
+ }
65
+ show(component, data) {
66
+ return this._dialog.open(component, {
67
+ data: data?.data,
68
+ width: this.modalConfig.width,
69
+ injector: data?.injector,
70
+ viewContainerRef: data?.viewContainerRef
71
+ });
72
+ }
73
+ }
74
+ ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, deps: [{ token: i1$1.MatDialog }, { token: CRAFTSJS_MODAL_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
75
+ ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, decorators: [{
77
+ type: Injectable
78
+ }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: ModalConfig, decorators: [{
79
+ type: Inject,
80
+ args: [CRAFTSJS_MODAL_CONFIG]
79
81
  }] }]; } });
80
82
 
81
- class ModalModule {
82
- static forRoot(config = { width: '800px' }) {
83
- return {
84
- ngModule: ModalModule,
85
- providers: [
86
- { provide: CRAFTSJS_MODAL_CONFIG, useValue: config }
87
- ]
88
- };
89
- }
90
- }
91
- ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
92
- ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, declarations: [ModalComponent,
93
- ModalHeaderDirective,
94
- ModalFooterDirective,
95
- ModalBodyComponent], imports: [CommonModule,
96
- MatDialogModule,
97
- PerfectScrollbarModule], exports: [ModalComponent,
98
- ModalBodyComponent,
99
- ModalHeaderDirective,
100
- ModalFooterDirective] });
101
- ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, providers: [
102
- ModalService
103
- ], imports: [[
104
- CommonModule,
105
- MatDialogModule,
106
- PerfectScrollbarModule,
107
- ]] });
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, decorators: [{
109
- type: NgModule,
110
- args: [{
111
- declarations: [
112
- ModalComponent,
113
- ModalHeaderDirective,
114
- ModalFooterDirective,
115
- ModalBodyComponent,
116
- ],
117
- imports: [
118
- CommonModule,
119
- MatDialogModule,
120
- PerfectScrollbarModule,
121
- ],
122
- exports: [
123
- ModalComponent,
124
- ModalBodyComponent,
125
- ModalHeaderDirective,
126
- ModalFooterDirective
127
- ],
128
- providers: [
129
- ModalService
130
- ]
131
- }]
83
+ class ModalModule {
84
+ static forRoot(config = { width: '800px' }) {
85
+ return {
86
+ ngModule: ModalModule,
87
+ providers: [
88
+ { provide: CRAFTSJS_MODAL_CONFIG, useValue: config },
89
+ ModalService
90
+ ]
91
+ };
92
+ }
93
+ }
94
+ ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
95
+ ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ModalModule, declarations: [ModalComponent,
96
+ ModalHeaderDirective,
97
+ ModalFooterDirective,
98
+ ModalBodyComponent], imports: [CommonModule,
99
+ MatDialogModule,
100
+ PerfectScrollbarModule], exports: [ModalComponent,
101
+ ModalBodyComponent,
102
+ ModalHeaderDirective,
103
+ ModalFooterDirective] });
104
+ ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalModule, providers: [
105
+ ModalService,
106
+ ], imports: [CommonModule,
107
+ MatDialogModule,
108
+ PerfectScrollbarModule] });
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalModule, decorators: [{
110
+ type: NgModule,
111
+ args: [{
112
+ declarations: [
113
+ ModalComponent,
114
+ ModalHeaderDirective,
115
+ ModalFooterDirective,
116
+ ModalBodyComponent,
117
+ ],
118
+ imports: [
119
+ CommonModule,
120
+ MatDialogModule,
121
+ PerfectScrollbarModule,
122
+ ],
123
+ exports: [
124
+ ModalComponent,
125
+ ModalBodyComponent,
126
+ ModalHeaderDirective,
127
+ ModalFooterDirective
128
+ ],
129
+ providers: [
130
+ ModalService,
131
+ ]
132
+ }]
132
133
  }] });
133
134
 
134
- /*
135
- * Public API Surface of modal
135
+ /*
136
+ * Public API Surface of modal
136
137
  */
137
138
 
138
- /**
139
- * Generated bundle index. Do not edit.
139
+ /**
140
+ * Generated bundle index. Do not edit.
140
141
  */
141
142
 
142
143
  export { CRAFTSJS_MODAL_CONFIG, ModalBodyComponent, ModalComponent, ModalConfig, ModalFooterDirective, ModalHeaderDirective, ModalModule, ModalService };
143
144
  //# sourceMappingURL=craftsjs-modal.mjs.map
145
+ //# sourceMappingURL=craftsjs-modal.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"craftsjs-modal.mjs","sources":["../../../../projects/craftsjs/modal/src/lib/modal.component.ts","../../../../projects/craftsjs/modal/src/lib/modal.component.html","../../../../projects/craftsjs/modal/src/lib/directives/modal-header.directive.ts","../../../../projects/craftsjs/modal/src/lib/directives/modal-footer.directive.ts","../../../../projects/craftsjs/modal/src/lib/components/modal-body/modal-body.component.ts","../../../../projects/craftsjs/modal/src/lib/components/modal-body/modal-body.component.html","../../../../projects/craftsjs/modal/src/lib/tokens.ts","../../../../projects/craftsjs/modal/src/lib/models/modal-config.model.ts","../../../../projects/craftsjs/modal/src/lib/services/modal.service.ts","../../../../projects/craftsjs/modal/src/lib/modal.module.ts","../../../../projects/craftsjs/modal/src/public-api.ts","../../../../projects/craftsjs/modal/src/craftsjs-modal.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'craftsjs-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'modal'\r\n }\r\n})\r\nexport class ModalComponent { }\r\n","<ng-content select=\"modal-header\"></ng-content>\r\n<ng-content select=\"modal-body\"></ng-content>\r\n<ng-content select=\"modal-footer\"></ng-content>","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'modal-header, [modal-header], [craftsjsModalHeader]',\r\n host: { class: 'modal-header' }\r\n})\r\nexport class ModalHeaderDirective { }\r\n","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',\r\n host: { class: 'modal-footer' }\r\n})\r\nexport class ModalFooterDirective { }\r\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'modal-body, [modal-body], [craftsjsModalBody]',\r\n templateUrl: './modal-body.component.html',\r\n styleUrls: ['./modal-body.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'modal-body'\r\n },\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class ModalBodyComponent { }\r\n","<div class=\"modal-body-responsive\" perfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nexport const CRAFTSJS_MODAL_CONFIG = new InjectionToken<string>('CRAFTSJS_MODAL_CONFIG');\r\n","export class ModalConfig {\r\n width: string;\r\n}\r\n","import { Injectable, TemplateRef, Inject } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ComponentType } from '@angular/cdk/portal';\r\nimport { CRAFTSJS_MODAL_CONFIG } from '../tokens';\r\nimport { ModalConfig } from '../models/modal-config.model';\r\n\r\n@Injectable()\r\nexport class ModalService {\r\n\r\n constructor(\r\n private _dialog: MatDialog,\r\n @Inject(CRAFTSJS_MODAL_CONFIG) private modalConfig: ModalConfig\r\n ) { }\r\n\r\n show<T = any>(component: ComponentType<T> | TemplateRef<T>, data?: any) {\r\n return this._dialog.open(component, {\r\n data,\r\n width: this.modalConfig.width\r\n });\r\n }\r\n\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { ModalComponent } from './modal.component';\r\nimport { ModalHeaderDirective } from './directives/modal-header.directive';\r\nimport { ModalFooterDirective } from './directives/modal-footer.directive';\r\nimport { ModalBodyComponent } from './components/modal-body/modal-body.component';\r\nimport { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';\r\nimport { ModalConfig } from './models/modal-config.model';\r\nimport { ModalService } from './services/modal.service';\r\nimport { CRAFTSJS_MODAL_CONFIG } from './tokens';\r\n\r\n@NgModule({\r\n declarations: [\r\n ModalComponent,\r\n ModalHeaderDirective,\r\n ModalFooterDirective,\r\n ModalBodyComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatDialogModule,\r\n PerfectScrollbarModule,\r\n ],\r\n exports: [\r\n ModalComponent,\r\n ModalBodyComponent,\r\n ModalHeaderDirective,\r\n ModalFooterDirective\r\n ],\r\n providers: [\r\n ModalService\r\n ]\r\n})\r\nexport class ModalModule {\r\n static forRoot(config: ModalConfig = { width: '800px' }): ModuleWithProviders<ModalModule> {\r\n return {\r\n ngModule: ModalModule,\r\n providers: [\r\n { provide: CRAFTSJS_MODAL_CONFIG, useValue: config }\r\n ]\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of modal\r\n */\r\n\r\nexport * from './lib/modal.component';\r\nexport * from './lib/modal.module';\r\nexport * from './lib/components/modal-body/modal-body.component';\r\nexport * from './lib/directives/modal-footer.directive';\r\nexport * from './lib/directives/modal-header.directive';\r\nexport * from './lib/models/modal-config.model';\r\nexport * from './lib/services/modal.service';\r\nexport * from './lib/tokens';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,cAAc;;2GAAd,cAAc;+FAAd,cAAc,yFCZ3B,2JAE+C;2FDUlC,cAAc;kBAV1B,SAAS;+BACE,gBAAgB,mBAGT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,QAC/B;wBACJ,KAAK,EAAE,OAAO;qBACf;;;MEJU,oBAAoB;;iHAApB,oBAAoB;qGAApB,oBAAoB;2FAApB,oBAAoB;kBAJhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,qDAAqD;oBAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;iBAChC;;;MCCY,oBAAoB;;iHAApB,oBAAoB;qGAApB,oBAAoB;2FAApB,oBAAoB;kBAJhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,qDAAqD;oBAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;iBAChC;;;MCOY,kBAAkB;;+GAAlB,kBAAkB;mGAAlB,kBAAkB,6HCZ/B,qGAGA;2FDSa,kBAAkB;kBAV9B,SAAS;+BACE,+CAA+C,mBAGxC,uBAAuB,CAAC,MAAM,QACzC;wBACJ,KAAK,EAAE,YAAY;qBACpB,iBACc,iBAAiB,CAAC,IAAI;;;MER1B,qBAAqB,GAAG,IAAI,cAAc,CAAS,uBAAuB;;MCF1E,WAAW;;;MCOX,YAAY;IAEvB,YACU,OAAkB,EACa,WAAwB;QADvD,YAAO,GAAP,OAAO,CAAW;QACa,gBAAW,GAAX,WAAW,CAAa;KAC5D;IAEL,IAAI,CAAU,SAA4C,EAAE,IAAU;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;YAClC,IAAI;YACJ,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK;SAC9B,CAAC,CAAC;KACJ;;yGAZU,YAAY,6CAIb,qBAAqB;6GAJpB,YAAY;2FAAZ,YAAY;kBADxB,UAAU;;0BAKN,MAAM;2BAAC,qBAAqB;;;MCuBpB,WAAW;IACtB,OAAO,OAAO,CAAC,SAAsB,EAAE,KAAK,EAAE,OAAO,EAAE;QACrD,OAAO;YACL,QAAQ,EAAE,WAAW;YACrB,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,EAAE;aACrD;SACF,CAAC;KACH;;wGARU,WAAW;yGAAX,WAAW,iBApBpB,cAAc;QACd,oBAAoB;QACpB,oBAAoB;QACpB,kBAAkB,aAGlB,YAAY;QACZ,eAAe;QACf,sBAAsB,aAGtB,cAAc;QACd,kBAAkB;QAClB,oBAAoB;QACpB,oBAAoB;yGAMX,WAAW,aAJX;QACT,YAAY;KACb,YAbQ;YACP,YAAY;YACZ,eAAe;YACf,sBAAsB;SACvB;2FAWU,WAAW;kBAtBvB,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,cAAc;wBACd,oBAAoB;wBACpB,oBAAoB;wBACpB,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,sBAAsB;qBACvB;oBACD,OAAO,EAAE;wBACP,cAAc;wBACd,kBAAkB;wBAClB,oBAAoB;wBACpB,oBAAoB;qBACrB;oBACD,SAAS,EAAE;wBACT,YAAY;qBACb;iBACF;;;ACjCD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"craftsjs-modal.mjs","sources":["../../../../projects/craftsjs/modal/src/lib/modal.component.ts","../../../../projects/craftsjs/modal/src/lib/modal.component.html","../../../../projects/craftsjs/modal/src/lib/directives/modal-header.directive.ts","../../../../projects/craftsjs/modal/src/lib/directives/modal-footer.directive.ts","../../../../projects/craftsjs/modal/src/lib/components/modal-body/modal-body.component.ts","../../../../projects/craftsjs/modal/src/lib/components/modal-body/modal-body.component.html","../../../../projects/craftsjs/modal/src/lib/tokens.ts","../../../../projects/craftsjs/modal/src/lib/models/modal-config.model.ts","../../../../projects/craftsjs/modal/src/lib/services/modal.service.ts","../../../../projects/craftsjs/modal/src/lib/modal.module.ts","../../../../projects/craftsjs/modal/src/public-api.ts","../../../../projects/craftsjs/modal/src/craftsjs-modal.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'craftsjs-modal',\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'modal'\n }\n})\nexport class ModalComponent { }\n","<ng-content select=\"modal-header\"></ng-content>\n<ng-content select=\"modal-body\"></ng-content>\n<ng-content select=\"modal-footer\"></ng-content>","import { Directive } from '@angular/core';\n\n@Directive({\n selector: 'modal-header, [modal-header], [craftsjsModalHeader]',\n host: { class: 'modal-header' }\n})\nexport class ModalHeaderDirective { }\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',\n host: { class: 'modal-footer' }\n})\nexport class ModalFooterDirective { }\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'modal-body, [modal-body], [craftsjsModalBody]',\n templateUrl: './modal-body.component.html',\n styleUrls: ['./modal-body.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'modal-body'\n },\n encapsulation: ViewEncapsulation.None\n})\nexport class ModalBodyComponent { }\n","<div class=\"modal-body-responsive\" perfectScrollbar>\n <ng-content></ng-content>\n</div>\n","import { InjectionToken } from '@angular/core';\n\nexport const CRAFTSJS_MODAL_CONFIG = new InjectionToken<string>('CRAFTSJS_MODAL_CONFIG');\n","export class ModalConfig {\n width: string;\n}\n","import { Injectable, TemplateRef, Inject, Injector, ViewContainerRef } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { CRAFTSJS_MODAL_CONFIG } from '../tokens';\nimport { ModalConfig } from '../models/modal-config.model';\n\nexport interface ModalData<T = any> { \n data?: T;\n injector?: Injector;\n viewContainerRef?: ViewContainerRef;\n}\n\n@Injectable()\nexport class ModalService {\n\n constructor(\n private _dialog: MatDialog,\n @Inject(CRAFTSJS_MODAL_CONFIG) private modalConfig: ModalConfig\n ) { }\n\n show<T = any>(component: ComponentType<T> | TemplateRef<T>, data?: ModalData) {\n return this._dialog.open(component, {\n data: data?.data,\n width: this.modalConfig.width,\n injector: data?.injector,\n viewContainerRef: data?.viewContainerRef\n });\n }\n\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { ModalComponent } from './modal.component';\nimport { ModalHeaderDirective } from './directives/modal-header.directive';\nimport { ModalFooterDirective } from './directives/modal-footer.directive';\nimport { ModalBodyComponent } from './components/modal-body/modal-body.component';\nimport { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';\nimport { ModalConfig } from './models/modal-config.model';\nimport { ModalService } from './services/modal.service';\nimport { CRAFTSJS_MODAL_CONFIG } from './tokens';\n\n@NgModule({\n declarations: [\n ModalComponent,\n ModalHeaderDirective,\n ModalFooterDirective,\n ModalBodyComponent,\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n PerfectScrollbarModule,\n ],\n exports: [\n ModalComponent,\n ModalBodyComponent,\n ModalHeaderDirective,\n ModalFooterDirective\n ],\n providers: [\n ModalService,\n ]\n})\nexport class ModalModule {\n static forRoot(config: ModalConfig = { width: '800px' }): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [\n { provide: CRAFTSJS_MODAL_CONFIG, useValue: config },\n ModalService\n ]\n };\n }\n}\n","/*\n * Public API Surface of modal\n */\n\nexport * from './lib/modal.component';\nexport * from './lib/modal.module';\nexport * from './lib/components/modal-body/modal-body.component';\nexport * from './lib/directives/modal-footer.directive';\nexport * from './lib/directives/modal-header.directive';\nexport * from './lib/models/modal-config.model';\nexport * from './lib/services/modal.service';\nexport * from './lib/tokens';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,yFCZ3B,uJAE+C,EAAA,MAAA,EAAA,CAAA,wtBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;2FDUlC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,SAAS;+BACE,gBAAgB,EAAA,eAAA,EAGT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAC/B,IAAA,EAAA;AACJ,wBAAA,KAAK,EAAE,OAAO;AACf,qBAAA,EAAA,QAAA,EAAA,uJAAA,EAAA,MAAA,EAAA,CAAA,wtBAAA,CAAA,EAAA,CAAA;;;MEJU,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qGAApB,oBAAoB,EAAA,QAAA,EAAA,qDAAA,EAAA,IAAA,EAAA,EAAA,cAA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BACZ,eAAe;wBACf,sBAAsB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,cAAc;wBACd,kBAAkB;wBAClB,oBAAoB;wBACpB,oBAAoB;AACrB,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACjCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@craftsjs/modal" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@craftsjs/modal" />
5
+ export * from './public-api';
@@ -1,5 +1,5 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ModalBodyComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalBodyComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<ModalBodyComponent, "modal-body, [modal-body], [craftsjsModalBody]", never, {}, {}, never, ["*"]>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class ModalBodyComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalBodyComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalBodyComponent, "modal-body, [modal-body], [craftsjsModalBody]", never, {}, {}, never, ["*"], false, never>;
5
+ }
@@ -1,5 +1,5 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ModalFooterDirective {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalFooterDirective, never>;
4
- static ɵdir: i0.ɵɵDirectiveDeclaration<ModalFooterDirective, "modal-footer, [modal-footer], [craftsjsModalFooter]", never, {}, {}, never>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class ModalFooterDirective {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalFooterDirective, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalFooterDirective, "modal-footer, [modal-footer], [craftsjsModalFooter]", never, {}, {}, never, never, false, never>;
5
+ }
@@ -1,5 +1,5 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ModalHeaderDirective {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalHeaderDirective, never>;
4
- static ɵdir: i0.ɵɵDirectiveDeclaration<ModalHeaderDirective, "modal-header, [modal-header], [craftsjsModalHeader]", never, {}, {}, never>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class ModalHeaderDirective {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalHeaderDirective, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalHeaderDirective, "modal-header, [modal-header], [craftsjsModalHeader]", never, {}, {}, never, never, false, never>;
5
+ }
@@ -1,5 +1,5 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ModalComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "craftsjs-modal", never, {}, {}, never, ["modal-header", "modal-body", "modal-footer"]>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class ModalComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "craftsjs-modal", never, {}, {}, never, ["modal-header", "modal-body", "modal-footer"], false, never>;
5
+ }
@@ -1,16 +1,16 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { ModalConfig } from './models/modal-config.model';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./modal.component";
5
- import * as i2 from "./directives/modal-header.directive";
6
- import * as i3 from "./directives/modal-footer.directive";
7
- import * as i4 from "./components/modal-body/modal-body.component";
8
- import * as i5 from "@angular/common";
9
- import * as i6 from "@angular/material/dialog";
10
- import * as i7 from "@craftsjs/perfect-scrollbar";
11
- export declare class ModalModule {
12
- static forRoot(config?: ModalConfig): ModuleWithProviders<ModalModule>;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<ModalModule, [typeof i1.ModalComponent, typeof i2.ModalHeaderDirective, typeof i3.ModalFooterDirective, typeof i4.ModalBodyComponent], [typeof i5.CommonModule, typeof i6.MatDialogModule, typeof i7.PerfectScrollbarModule], [typeof i1.ModalComponent, typeof i4.ModalBodyComponent, typeof i2.ModalHeaderDirective, typeof i3.ModalFooterDirective]>;
15
- static ɵinj: i0.ɵɵInjectorDeclaration<ModalModule>;
16
- }
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { ModalConfig } from './models/modal-config.model';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./modal.component";
5
+ import * as i2 from "./directives/modal-header.directive";
6
+ import * as i3 from "./directives/modal-footer.directive";
7
+ import * as i4 from "./components/modal-body/modal-body.component";
8
+ import * as i5 from "@angular/common";
9
+ import * as i6 from "@angular/material/dialog";
10
+ import * as i7 from "@craftsjs/perfect-scrollbar";
11
+ export declare class ModalModule {
12
+ static forRoot(config?: ModalConfig): ModuleWithProviders<ModalModule>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ModalModule, [typeof i1.ModalComponent, typeof i2.ModalHeaderDirective, typeof i3.ModalFooterDirective, typeof i4.ModalBodyComponent], [typeof i5.CommonModule, typeof i6.MatDialogModule, typeof i7.PerfectScrollbarModule], [typeof i1.ModalComponent, typeof i4.ModalBodyComponent, typeof i2.ModalHeaderDirective, typeof i3.ModalFooterDirective]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<ModalModule>;
16
+ }
@@ -1,3 +1,3 @@
1
- export declare class ModalConfig {
2
- width: string;
3
- }
1
+ export declare class ModalConfig {
2
+ width: string;
3
+ }
@@ -1,13 +1,18 @@
1
- import { TemplateRef } from '@angular/core';
2
- import { MatDialog } from '@angular/material/dialog';
3
- import { ComponentType } from '@angular/cdk/portal';
4
- import { ModalConfig } from '../models/modal-config.model';
5
- import * as i0 from "@angular/core";
6
- export declare class ModalService {
7
- private _dialog;
8
- private modalConfig;
9
- constructor(_dialog: MatDialog, modalConfig: ModalConfig);
10
- show<T = any>(component: ComponentType<T> | TemplateRef<T>, data?: any): import("@angular/material/dialog").MatDialogRef<T, any>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
13
- }
1
+ import { TemplateRef, Injector, ViewContainerRef } from '@angular/core';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import { ComponentType } from '@angular/cdk/portal';
4
+ import { ModalConfig } from '../models/modal-config.model';
5
+ import * as i0 from "@angular/core";
6
+ export interface ModalData<T = any> {
7
+ data?: T;
8
+ injector?: Injector;
9
+ viewContainerRef?: ViewContainerRef;
10
+ }
11
+ export declare class ModalService {
12
+ private _dialog;
13
+ private modalConfig;
14
+ constructor(_dialog: MatDialog, modalConfig: ModalConfig);
15
+ show<T = any>(component: ComponentType<T> | TemplateRef<T>, data?: ModalData): import("@angular/material/dialog").MatDialogRef<T, any>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
18
+ }
package/lib/tokens.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { InjectionToken } from '@angular/core';
2
- export declare const CRAFTSJS_MODAL_CONFIG: InjectionToken<string>;
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const CRAFTSJS_MODAL_CONFIG: InjectionToken<string>;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@craftsjs/modal",
3
- "version": "4.0.0",
3
+ "version": "5.0.1",
4
4
  "author": "craftsjs",
5
5
  "description": "Material modal is a library for angular",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/addapptables/angular-miscellaneous",
8
8
  "peerDependencies": {
9
- "@angular/common": ">=13.0.0 < 14.0.0",
10
- "@angular/core": ">=13.0.0 < 14.0.0",
11
- "@angular/material": ">=13.0.0 < 14.0.0",
12
- "@angular/animations": ">=13.0.0 < 14.0.0",
13
- "@angular/cdk": ">=13.0.0 < 14.0.0"
9
+ "@angular/common": ">=15.0.0 < 16.0.0",
10
+ "@angular/core": ">=15.0.0 < 16.0.0",
11
+ "@angular/material": ">=15.0.0 < 16.0.0",
12
+ "@angular/animations": ">=15.0.0 < 16.0.0",
13
+ "@angular/cdk": ">=15.0.0 < 16.0.0"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
@@ -34,13 +34,13 @@
34
34
  "esm2020": "esm2020/craftsjs-modal.mjs",
35
35
  "fesm2020": "fesm2020/craftsjs-modal.mjs",
36
36
  "fesm2015": "fesm2015/craftsjs-modal.mjs",
37
- "typings": "craftsjs-modal.d.ts",
37
+ "typings": "index.d.ts",
38
38
  "exports": {
39
39
  "./package.json": {
40
40
  "default": "./package.json"
41
41
  },
42
42
  ".": {
43
- "types": "./craftsjs-modal.d.ts",
43
+ "types": "./index.d.ts",
44
44
  "esm2020": "./esm2020/craftsjs-modal.mjs",
45
45
  "es2020": "./fesm2020/craftsjs-modal.mjs",
46
46
  "es2015": "./fesm2015/craftsjs-modal.mjs",
package/public-api.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from './lib/modal.component';
2
- export * from './lib/modal.module';
3
- export * from './lib/components/modal-body/modal-body.component';
4
- export * from './lib/directives/modal-footer.directive';
5
- export * from './lib/directives/modal-header.directive';
6
- export * from './lib/models/modal-config.model';
7
- export * from './lib/services/modal.service';
8
- export * from './lib/tokens';
1
+ export * from './lib/modal.component';
2
+ export * from './lib/modal.module';
3
+ export * from './lib/components/modal-body/modal-body.component';
4
+ export * from './lib/directives/modal-footer.directive';
5
+ export * from './lib/directives/modal-header.directive';
6
+ export * from './lib/models/modal-config.model';
7
+ export * from './lib/services/modal.service';
8
+ export * from './lib/tokens';