@craftsjs/modal 1.0.0 → 4.0.0
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/README.md +3 -0
- package/craftsjs-modal.d.ts +1 -0
- package/{esm2015/craftsjs-modal.js → esm2020/craftsjs-modal.mjs} +0 -0
- package/esm2020/lib/components/modal-body/modal-body.component.mjs +14 -0
- package/esm2020/lib/directives/modal-footer.directive.mjs +14 -0
- package/esm2020/lib/directives/modal-header.directive.mjs +14 -0
- package/esm2020/lib/modal.component.mjs +13 -0
- package/esm2020/lib/modal.module.mjs +64 -0
- package/{esm2015/lib/models/modal-config.model.js → esm2020/lib/models/modal-config.model.mjs} +0 -0
- package/esm2020/lib/services/modal.service.mjs +26 -0
- package/{esm2015/lib/tokens.js → esm2020/lib/tokens.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/craftsjs-modal.mjs +145 -0
- package/fesm2015/craftsjs-modal.mjs.map +1 -0
- package/fesm2020/craftsjs-modal.mjs +143 -0
- package/fesm2020/craftsjs-modal.mjs.map +1 -0
- package/lib/components/modal-body/modal-body.component.d.ts +3 -0
- package/lib/directives/modal-footer.directive.d.ts +3 -0
- package/lib/directives/modal-header.directive.d.ts +3 -0
- package/lib/modal.component.d.ts +3 -0
- package/lib/modal.module.d.ts +11 -0
- package/lib/services/modal.service.d.ts +3 -0
- package/package.json +25 -13
- package/bundles/craftsjs-modal.umd.js +0 -155
- package/bundles/craftsjs-modal.umd.js.map +0 -1
- package/bundles/craftsjs-modal.umd.min.js +0 -2
- package/bundles/craftsjs-modal.umd.min.js.map +0 -1
- package/craftsjs-modal.metadata.json +0 -1
- package/esm2015/lib/components/modal-body/modal-body.component.js +0 -16
- package/esm2015/lib/directives/modal-footer.directive.js +0 -10
- package/esm2015/lib/directives/modal-header.directive.js +0 -10
- package/esm2015/lib/modal.component.js +0 -16
- package/esm2015/lib/modal.module.js +0 -45
- package/esm2015/lib/services/modal.service.js +0 -24
- package/fesm2015/craftsjs-modal.js +0 -123
- package/fesm2015/craftsjs-modal.js.map +0 -1
package/README.md
CHANGED
package/craftsjs-modal.d.ts
CHANGED
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@craftsjs/perfect-scrollbar";
|
|
4
|
+
export class ModalBodyComponent {
|
|
5
|
+
}
|
|
6
|
+
ModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
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 });
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalBodyComponent, decorators: [{
|
|
9
|
+
type: Component,
|
|
10
|
+
args: [{ selector: 'modal-body, [modal-body], [craftsjsModalBody]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
11
|
+
class: 'modal-body'
|
|
12
|
+
}, encapsulation: ViewEncapsulation.None, template: "<div class=\"modal-body-responsive\" perfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [""] }]
|
|
13
|
+
}] });
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIj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FsLWJvZHkuY29tcG9uZW50LnNjc3MnXSxcclxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcclxuICBob3N0OiB7XHJcbiAgICBjbGFzczogJ21vZGFsLWJvZHknXHJcbiAgfSxcclxuICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBNb2RhbEJvZHlDb21wb25lbnQgeyB9XHJcbiIsIjxkaXYgY2xhc3M9XCJtb2RhbC1ib2R5LXJlc3BvbnNpdmVcIiBwZXJmZWN0U2Nyb2xsYmFyPlxyXG4gIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class ModalFooterDirective {
|
|
4
|
+
}
|
|
5
|
+
ModalFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6
|
+
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 });
|
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalFooterDirective, decorators: [{
|
|
8
|
+
type: Directive,
|
|
9
|
+
args: [{
|
|
10
|
+
selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',
|
|
11
|
+
host: { class: 'modal-footer' }
|
|
12
|
+
}]
|
|
13
|
+
}] });
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtZm9vdGVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL21vZGFsL3NyYy9saWIvZGlyZWN0aXZlcy9tb2RhbC1mb290ZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTTFDLE1BQU0sT0FBTyxvQkFBb0I7O2lIQUFwQixvQkFBb0I7cUdBQXBCLG9CQUFvQjsyRkFBcEIsb0JBQW9CO2tCQUpoQyxTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSxxREFBcUQ7b0JBQy9ELElBQUksRUFBRSxFQUFFLEtBQUssRUFBRSxjQUFjLEVBQUU7aUJBQ2hDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aXZlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICBzZWxlY3RvcjogJ21vZGFsLWZvb3RlciwgW21vZGFsLWZvb3Rlcl0sIFtjcmFmdHNqc01vZGFsRm9vdGVyXScsXHJcbiAgaG9zdDogeyBjbGFzczogJ21vZGFsLWZvb3RlcicgfVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxGb290ZXJEaXJlY3RpdmUgeyB9XHJcbiJdfQ==
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class ModalHeaderDirective {
|
|
4
|
+
}
|
|
5
|
+
ModalHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6
|
+
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 });
|
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalHeaderDirective, decorators: [{
|
|
8
|
+
type: Directive,
|
|
9
|
+
args: [{
|
|
10
|
+
selector: 'modal-header, [modal-header], [craftsjsModalHeader]',
|
|
11
|
+
host: { class: 'modal-header' }
|
|
12
|
+
}]
|
|
13
|
+
}] });
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtaGVhZGVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL21vZGFsL3NyYy9saWIvZGlyZWN0aXZlcy9tb2RhbC1oZWFkZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTTFDLE1BQU0sT0FBTyxvQkFBb0I7O2lIQUFwQixvQkFBb0I7cUdBQXBCLG9CQUFvQjsyRkFBcEIsb0JBQW9CO2tCQUpoQyxTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSxxREFBcUQ7b0JBQy9ELElBQUksRUFBRSxFQUFFLEtBQUssRUFBRSxjQUFjLEVBQUU7aUJBQ2hDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aXZlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICBzZWxlY3RvcjogJ21vZGFsLWhlYWRlciwgW21vZGFsLWhlYWRlcl0sIFtjcmFmdHNqc01vZGFsSGVhZGVyXScsXHJcbiAgaG9zdDogeyBjbGFzczogJ21vZGFsLWhlYWRlcicgfVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxIZWFkZXJEaXJlY3RpdmUgeyB9XHJcbiJdfQ==
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class ModalComponent {
|
|
4
|
+
}
|
|
5
|
+
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
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 });
|
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
8
|
+
type: Component,
|
|
9
|
+
args: [{ selector: 'craftsjs-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
10
|
+
class: 'modal'
|
|
11
|
+
}, 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"] }]
|
|
12
|
+
}] });
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3JhZnRzanMvbW9kYWwvc3JjL2xpYi9tb2RhbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmFmdHNqcy9tb2RhbC9zcmMvbGliL21vZGFsLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBWXRGLE1BQU0sT0FBTyxjQUFjOzsyR0FBZCxjQUFjOytGQUFkLGNBQWMseUZDWjNCLDJKQUUrQzsyRkRVbEMsY0FBYztrQkFWMUIsU0FBUzsrQkFDRSxnQkFBZ0IsbUJBR1QsdUJBQXVCLENBQUMsTUFBTSxpQkFDaEMsaUJBQWlCLENBQUMsSUFBSSxRQUMvQjt3QkFDSixLQUFLLEVBQUUsT0FBTztxQkFDZiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3ksIFZpZXdFbmNhcHN1bGF0aW9uIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5AQ29tcG9uZW50KHtcclxuICBzZWxlY3RvcjogJ2NyYWZ0c2pzLW1vZGFsJyxcclxuICB0ZW1wbGF0ZVVybDogJy4vbW9kYWwuY29tcG9uZW50Lmh0bWwnLFxyXG4gIHN0eWxlVXJsczogWycuL21vZGFsLmNvbXBvbmVudC5zY3NzJ10sXHJcbiAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXHJcbiAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcclxuICBob3N0OiB7XHJcbiAgICBjbGFzczogJ21vZGFsJ1xyXG4gIH1cclxufSlcclxuZXhwb3J0IGNsYXNzIE1vZGFsQ29tcG9uZW50IHsgfVxyXG4iLCI8bmctY29udGVudCBzZWxlY3Q9XCJtb2RhbC1oZWFkZXJcIj48L25nLWNvbnRlbnQ+XHJcbjxuZy1jb250ZW50IHNlbGVjdD1cIm1vZGFsLWJvZHlcIj48L25nLWNvbnRlbnQ+XHJcbjxuZy1jb250ZW50IHNlbGVjdD1cIm1vZGFsLWZvb3RlclwiPjwvbmctY29udGVudD4iXX0=
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
4
|
+
import { ModalComponent } from './modal.component';
|
|
5
|
+
import { ModalHeaderDirective } from './directives/modal-header.directive';
|
|
6
|
+
import { ModalFooterDirective } from './directives/modal-footer.directive';
|
|
7
|
+
import { ModalBodyComponent } from './components/modal-body/modal-body.component';
|
|
8
|
+
import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
|
|
9
|
+
import { ModalService } from './services/modal.service';
|
|
10
|
+
import { CRAFTSJS_MODAL_CONFIG } from './tokens';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export class ModalModule {
|
|
13
|
+
static forRoot(config = { width: '800px' }) {
|
|
14
|
+
return {
|
|
15
|
+
ngModule: ModalModule,
|
|
16
|
+
providers: [
|
|
17
|
+
{ provide: CRAFTSJS_MODAL_CONFIG, useValue: config }
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
23
|
+
ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, declarations: [ModalComponent,
|
|
24
|
+
ModalHeaderDirective,
|
|
25
|
+
ModalFooterDirective,
|
|
26
|
+
ModalBodyComponent], imports: [CommonModule,
|
|
27
|
+
MatDialogModule,
|
|
28
|
+
PerfectScrollbarModule], exports: [ModalComponent,
|
|
29
|
+
ModalBodyComponent,
|
|
30
|
+
ModalHeaderDirective,
|
|
31
|
+
ModalFooterDirective] });
|
|
32
|
+
ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, providers: [
|
|
33
|
+
ModalService
|
|
34
|
+
], imports: [[
|
|
35
|
+
CommonModule,
|
|
36
|
+
MatDialogModule,
|
|
37
|
+
PerfectScrollbarModule,
|
|
38
|
+
]] });
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, decorators: [{
|
|
40
|
+
type: NgModule,
|
|
41
|
+
args: [{
|
|
42
|
+
declarations: [
|
|
43
|
+
ModalComponent,
|
|
44
|
+
ModalHeaderDirective,
|
|
45
|
+
ModalFooterDirective,
|
|
46
|
+
ModalBodyComponent,
|
|
47
|
+
],
|
|
48
|
+
imports: [
|
|
49
|
+
CommonModule,
|
|
50
|
+
MatDialogModule,
|
|
51
|
+
PerfectScrollbarModule,
|
|
52
|
+
],
|
|
53
|
+
exports: [
|
|
54
|
+
ModalComponent,
|
|
55
|
+
ModalBodyComponent,
|
|
56
|
+
ModalHeaderDirective,
|
|
57
|
+
ModalFooterDirective
|
|
58
|
+
],
|
|
59
|
+
providers: [
|
|
60
|
+
ModalService
|
|
61
|
+
]
|
|
62
|
+
}]
|
|
63
|
+
}] });
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3JhZnRzanMvbW9kYWwvc3JjL2xpYi9tb2RhbC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBdUIsTUFBTSxlQUFlLENBQUM7QUFDOUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbkQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDM0UsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDM0UsT0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lib/models/modal-config.model.mjs}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Injectable, Inject } from '@angular/core';
|
|
2
|
+
import { CRAFTSJS_MODAL_CONFIG } from '../tokens';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/material/dialog";
|
|
5
|
+
import * as i2 from "../models/modal-config.model";
|
|
6
|
+
export class ModalService {
|
|
7
|
+
constructor(_dialog, modalConfig) {
|
|
8
|
+
this._dialog = _dialog;
|
|
9
|
+
this.modalConfig = modalConfig;
|
|
10
|
+
}
|
|
11
|
+
show(component, data) {
|
|
12
|
+
return this._dialog.open(component, {
|
|
13
|
+
data,
|
|
14
|
+
width: this.modalConfig.width
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalService, deps: [{ token: i1.MatDialog }, { token: CRAFTSJS_MODAL_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalService });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalService, decorators: [{
|
|
21
|
+
type: Injectable
|
|
22
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2.ModalConfig, decorators: [{
|
|
23
|
+
type: Inject,
|
|
24
|
+
args: [CRAFTSJS_MODAL_CONFIG]
|
|
25
|
+
}] }]; } });
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL21vZ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4uL21vZGVscy9tb2RhbC1jb25maWcubW9kZWwnO1xyXG5cclxuQEluamVjdGFibGUoKVxyXG5leHBvcnQgY2xhc3MgTW9kYWxTZXJ2aWNlIHtcclxuXHJcbiAgY29uc3RydWN0b3IoXHJcbiAgICBwcml2YXRlIF9kaWFsb2c6IE1hdERpYWxvZyxcclxuICAgIEBJbmplY3QoQ1JBRlRTSlNfTU9EQUxfQ09ORklHKSBwcml2YXRlIG1vZGFsQ29uZmlnOiBNb2RhbENvbmZpZ1xyXG4gICkgeyB9XHJcblxyXG4gIHNob3c8VCA9IGFueT4oY29tcG9uZW50OiBDb21wb25lbnRUeXBlPFQ+IHwgVGVtcGxhdGVSZWY8VD4sIGRhdGE/OiBhbnkpIHtcclxuICAgIHJldHVybiB0aGlzLl9kaWFsb2cub3Blbihjb21wb25lbnQsIHtcclxuICAgICAgZGF0YSxcclxuICAgICAgd2lkdGg6IHRoaXMubW9kYWxDb25maWcud2lkdGhcclxuICAgIH0pO1xyXG4gIH1cclxuXHJcbn1cclxuIl19
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Directive, InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
5
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
6
|
+
import * as i1 from '@craftsjs/perfect-scrollbar';
|
|
7
|
+
import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
|
|
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"] }]
|
|
18
|
+
}] });
|
|
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
|
+
}]
|
|
30
|
+
}] });
|
|
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
|
+
}]
|
|
42
|
+
}] });
|
|
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: [""] }]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
55
|
+
const CRAFTSJS_MODAL_CONFIG = new InjectionToken('CRAFTSJS_MODAL_CONFIG');
|
|
56
|
+
|
|
57
|
+
class ModalConfig {
|
|
58
|
+
}
|
|
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 () {
|
|
77
|
+
return [{ type: i1$1.MatDialog }, { type: ModalConfig, decorators: [{
|
|
78
|
+
type: Inject,
|
|
79
|
+
args: [CRAFTSJS_MODAL_CONFIG]
|
|
80
|
+
}] }];
|
|
81
|
+
} });
|
|
82
|
+
|
|
83
|
+
class ModalModule {
|
|
84
|
+
static forRoot(config = { width: '800px' }) {
|
|
85
|
+
return {
|
|
86
|
+
ngModule: ModalModule,
|
|
87
|
+
providers: [
|
|
88
|
+
{ provide: CRAFTSJS_MODAL_CONFIG, useValue: config }
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
94
|
+
ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, declarations: [ModalComponent,
|
|
95
|
+
ModalHeaderDirective,
|
|
96
|
+
ModalFooterDirective,
|
|
97
|
+
ModalBodyComponent], imports: [CommonModule,
|
|
98
|
+
MatDialogModule,
|
|
99
|
+
PerfectScrollbarModule], exports: [ModalComponent,
|
|
100
|
+
ModalBodyComponent,
|
|
101
|
+
ModalHeaderDirective,
|
|
102
|
+
ModalFooterDirective] });
|
|
103
|
+
ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, providers: [
|
|
104
|
+
ModalService
|
|
105
|
+
], imports: [[
|
|
106
|
+
CommonModule,
|
|
107
|
+
MatDialogModule,
|
|
108
|
+
PerfectScrollbarModule,
|
|
109
|
+
]] });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.7", ngImport: i0, type: ModalModule, decorators: [{
|
|
111
|
+
type: NgModule,
|
|
112
|
+
args: [{
|
|
113
|
+
declarations: [
|
|
114
|
+
ModalComponent,
|
|
115
|
+
ModalHeaderDirective,
|
|
116
|
+
ModalFooterDirective,
|
|
117
|
+
ModalBodyComponent,
|
|
118
|
+
],
|
|
119
|
+
imports: [
|
|
120
|
+
CommonModule,
|
|
121
|
+
MatDialogModule,
|
|
122
|
+
PerfectScrollbarModule,
|
|
123
|
+
],
|
|
124
|
+
exports: [
|
|
125
|
+
ModalComponent,
|
|
126
|
+
ModalBodyComponent,
|
|
127
|
+
ModalHeaderDirective,
|
|
128
|
+
ModalFooterDirective
|
|
129
|
+
],
|
|
130
|
+
providers: [
|
|
131
|
+
ModalService
|
|
132
|
+
]
|
|
133
|
+
}]
|
|
134
|
+
}] });
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* Public API Surface of modal
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Generated bundle index. Do not edit.
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
export { CRAFTSJS_MODAL_CONFIG, ModalBodyComponent, ModalComponent, ModalConfig, ModalFooterDirective, ModalHeaderDirective, ModalModule, ModalService };
|
|
145
|
+
//# sourceMappingURL=craftsjs-modal.mjs.map
|
|
@@ -0,0 +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,KA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E;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;;;;;;"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Directive, InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
5
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
6
|
+
import * as i1 from '@craftsjs/perfect-scrollbar';
|
|
7
|
+
import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
|
|
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"] }]
|
|
18
|
+
}] });
|
|
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
|
+
}]
|
|
30
|
+
}] });
|
|
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
|
+
}]
|
|
42
|
+
}] });
|
|
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: [""] }]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
55
|
+
const CRAFTSJS_MODAL_CONFIG = new InjectionToken('CRAFTSJS_MODAL_CONFIG');
|
|
56
|
+
|
|
57
|
+
class ModalConfig {
|
|
58
|
+
}
|
|
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]
|
|
79
|
+
}] }]; } });
|
|
80
|
+
|
|
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
|
+
}]
|
|
132
|
+
}] });
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
* Public API Surface of modal
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Generated bundle index. Do not edit.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
export { CRAFTSJS_MODAL_CONFIG, ModalBodyComponent, ModalComponent, ModalConfig, ModalFooterDirective, ModalHeaderDirective, ModalModule, ModalService };
|
|
143
|
+
//# sourceMappingURL=craftsjs-modal.mjs.map
|
|
@@ -0,0 +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,CA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FactoryDeclaration<ModalBodyComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalBodyComponent, "modal-body, [modal-body], [craftsjsModalBody]", never, {}, {}, never, ["*"]>;
|
|
2
5
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
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>;
|
|
2
5
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
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>;
|
|
2
5
|
}
|
package/lib/modal.component.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
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"]>;
|
|
2
5
|
}
|
package/lib/modal.module.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
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";
|
|
3
11
|
export declare class ModalModule {
|
|
4
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>;
|
|
5
16
|
}
|
|
@@ -2,9 +2,12 @@ import { TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { MatDialog } from '@angular/material/dialog';
|
|
3
3
|
import { ComponentType } from '@angular/cdk/portal';
|
|
4
4
|
import { ModalConfig } from '../models/modal-config.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class ModalService {
|
|
6
7
|
private _dialog;
|
|
7
8
|
private modalConfig;
|
|
8
9
|
constructor(_dialog: MatDialog, modalConfig: ModalConfig);
|
|
9
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>;
|
|
10
13
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftsjs/modal",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
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": ">=
|
|
10
|
-
"@angular/core": ">=
|
|
11
|
-
"@angular/material": ">=
|
|
12
|
-
"@angular/animations": ">=
|
|
13
|
-
"@angular/cdk": ">=
|
|
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"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -29,12 +29,24 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.0.0"
|
|
31
31
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"fesm2015": "fesm2015/craftsjs-modal.
|
|
32
|
+
"module": "fesm2015/craftsjs-modal.mjs",
|
|
33
|
+
"es2020": "fesm2020/craftsjs-modal.mjs",
|
|
34
|
+
"esm2020": "esm2020/craftsjs-modal.mjs",
|
|
35
|
+
"fesm2020": "fesm2020/craftsjs-modal.mjs",
|
|
36
|
+
"fesm2015": "fesm2015/craftsjs-modal.mjs",
|
|
37
37
|
"typings": "craftsjs-modal.d.ts",
|
|
38
|
-
"
|
|
38
|
+
"exports": {
|
|
39
|
+
"./package.json": {
|
|
40
|
+
"default": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
".": {
|
|
43
|
+
"types": "./craftsjs-modal.d.ts",
|
|
44
|
+
"esm2020": "./esm2020/craftsjs-modal.mjs",
|
|
45
|
+
"es2020": "./fesm2020/craftsjs-modal.mjs",
|
|
46
|
+
"es2015": "./fesm2015/craftsjs-modal.mjs",
|
|
47
|
+
"node": "./fesm2015/craftsjs-modal.mjs",
|
|
48
|
+
"default": "./fesm2020/craftsjs-modal.mjs"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
39
51
|
"sideEffects": false
|
|
40
|
-
}
|
|
52
|
+
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/dialog'), require('@craftsjs/perfect-scrollbar')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@craftsjs/modal', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@craftsjs/perfect-scrollbar'], factory) :
|
|
4
|
-
(global = global || self, factory((global.craftsjs = global.craftsjs || {}, global.craftsjs.modal = {}), global.ng.core, global.ng.common, global.ng.material.dialog, global['craftsjs-perfect-scrollbar']));
|
|
5
|
-
}(this, (function (exports, core, common, dialog, perfectScrollbar) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var ModalComponent = /** @class */ (function () {
|
|
8
|
-
function ModalComponent() {
|
|
9
|
-
}
|
|
10
|
-
return ModalComponent;
|
|
11
|
-
}());
|
|
12
|
-
ModalComponent.decorators = [
|
|
13
|
-
{ type: core.Component, args: [{
|
|
14
|
-
selector: 'craftsjs-modal',
|
|
15
|
-
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>",
|
|
16
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
17
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
18
|
-
host: {
|
|
19
|
-
class: 'modal'
|
|
20
|
-
},
|
|
21
|
-
styles: [".modal{background-clip:padding-box;background-color:#fff;display:flex;flex-direction:column;outline:0;pointer-events:auto;position:relative;width:100%}.modal-header{align-items:center;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem;display:flex;justify-content:space-between;padding:1rem}.modal-body{flex:1 1 auto;padding:1rem;position:relative}.modal-body-responsive{max-height:calc(70vh - 100px);overflow:auto;position:relative}.modal-footer{align-items:center;border-top:1px solid #e9ecef;display:flex;justify-content:flex-end;padding:1rem}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}"]
|
|
22
|
-
},] }
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
var ModalHeaderDirective = /** @class */ (function () {
|
|
26
|
-
function ModalHeaderDirective() {
|
|
27
|
-
}
|
|
28
|
-
return ModalHeaderDirective;
|
|
29
|
-
}());
|
|
30
|
-
ModalHeaderDirective.decorators = [
|
|
31
|
-
{ type: core.Directive, args: [{
|
|
32
|
-
selector: 'modal-header, [modal-header], [craftsjsModalHeader]',
|
|
33
|
-
host: { class: 'modal-header' }
|
|
34
|
-
},] }
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
var ModalFooterDirective = /** @class */ (function () {
|
|
38
|
-
function ModalFooterDirective() {
|
|
39
|
-
}
|
|
40
|
-
return ModalFooterDirective;
|
|
41
|
-
}());
|
|
42
|
-
ModalFooterDirective.decorators = [
|
|
43
|
-
{ type: core.Directive, args: [{
|
|
44
|
-
selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',
|
|
45
|
-
host: { class: 'modal-footer' }
|
|
46
|
-
},] }
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
var ModalBodyComponent = /** @class */ (function () {
|
|
50
|
-
function ModalBodyComponent() {
|
|
51
|
-
}
|
|
52
|
-
return ModalBodyComponent;
|
|
53
|
-
}());
|
|
54
|
-
ModalBodyComponent.decorators = [
|
|
55
|
-
{ type: core.Component, args: [{
|
|
56
|
-
selector: 'modal-body, [modal-body], [craftsjsModalBody]',
|
|
57
|
-
template: "<div class=\"modal-body-responsive\" addapptablesPerfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>",
|
|
58
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
59
|
-
host: {
|
|
60
|
-
class: 'modal-body'
|
|
61
|
-
},
|
|
62
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
63
|
-
styles: [""]
|
|
64
|
-
},] }
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
var CRAFTSJS_MODAL_CONFIG = new core.InjectionToken('CRAFTSJS_MODAL_CONFIG');
|
|
68
|
-
|
|
69
|
-
var ModalConfig = /** @class */ (function () {
|
|
70
|
-
function ModalConfig() {
|
|
71
|
-
}
|
|
72
|
-
return ModalConfig;
|
|
73
|
-
}());
|
|
74
|
-
|
|
75
|
-
var ModalService = /** @class */ (function () {
|
|
76
|
-
function ModalService(_dialog, modalConfig) {
|
|
77
|
-
this._dialog = _dialog;
|
|
78
|
-
this.modalConfig = modalConfig;
|
|
79
|
-
}
|
|
80
|
-
ModalService.prototype.show = function (component, data) {
|
|
81
|
-
return this._dialog.open(component, {
|
|
82
|
-
data: data,
|
|
83
|
-
width: this.modalConfig.width
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
return ModalService;
|
|
87
|
-
}());
|
|
88
|
-
ModalService.decorators = [
|
|
89
|
-
{ type: core.Injectable }
|
|
90
|
-
];
|
|
91
|
-
ModalService.ctorParameters = function () { return [
|
|
92
|
-
{ type: dialog.MatDialog },
|
|
93
|
-
{ type: ModalConfig, decorators: [{ type: core.Inject, args: [CRAFTSJS_MODAL_CONFIG,] }] }
|
|
94
|
-
]; };
|
|
95
|
-
|
|
96
|
-
var ModalModule = /** @class */ (function () {
|
|
97
|
-
function ModalModule() {
|
|
98
|
-
}
|
|
99
|
-
ModalModule.forRoot = function (config) {
|
|
100
|
-
if (config === void 0) { config = { width: '800px' }; }
|
|
101
|
-
return {
|
|
102
|
-
ngModule: ModalModule,
|
|
103
|
-
providers: [
|
|
104
|
-
{ provide: CRAFTSJS_MODAL_CONFIG, useValue: config }
|
|
105
|
-
]
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
return ModalModule;
|
|
109
|
-
}());
|
|
110
|
-
ModalModule.decorators = [
|
|
111
|
-
{ type: core.NgModule, args: [{
|
|
112
|
-
declarations: [
|
|
113
|
-
ModalComponent,
|
|
114
|
-
ModalHeaderDirective,
|
|
115
|
-
ModalFooterDirective,
|
|
116
|
-
ModalBodyComponent,
|
|
117
|
-
],
|
|
118
|
-
imports: [
|
|
119
|
-
common.CommonModule,
|
|
120
|
-
dialog.MatDialogModule,
|
|
121
|
-
perfectScrollbar.PerfectScrollbarModule,
|
|
122
|
-
],
|
|
123
|
-
exports: [
|
|
124
|
-
ModalComponent,
|
|
125
|
-
ModalBodyComponent,
|
|
126
|
-
ModalHeaderDirective,
|
|
127
|
-
ModalFooterDirective
|
|
128
|
-
],
|
|
129
|
-
providers: [
|
|
130
|
-
ModalService
|
|
131
|
-
]
|
|
132
|
-
},] }
|
|
133
|
-
];
|
|
134
|
-
|
|
135
|
-
/*
|
|
136
|
-
* Public API Surface of modal
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Generated bundle index. Do not edit.
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
exports.CRAFTSJS_MODAL_CONFIG = CRAFTSJS_MODAL_CONFIG;
|
|
144
|
-
exports.ModalBodyComponent = ModalBodyComponent;
|
|
145
|
-
exports.ModalComponent = ModalComponent;
|
|
146
|
-
exports.ModalConfig = ModalConfig;
|
|
147
|
-
exports.ModalFooterDirective = ModalFooterDirective;
|
|
148
|
-
exports.ModalHeaderDirective = ModalHeaderDirective;
|
|
149
|
-
exports.ModalModule = ModalModule;
|
|
150
|
-
exports.ModalService = ModalService;
|
|
151
|
-
|
|
152
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
153
|
-
|
|
154
|
-
})));
|
|
155
|
-
//# sourceMappingURL=craftsjs-modal.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"craftsjs-modal.umd.js","sources":["../../../../projects/craftsjs/modal/src/lib/modal.component.ts","../../../../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/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","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","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":["Component","ChangeDetectionStrategy","ViewEncapsulation","Directive","InjectionToken","Injectable","MatDialog","Inject","NgModule","CommonModule","MatDialogModule","PerfectScrollbarModule"],"mappings":";;;;;;;QAYA;;;;;gBAVCA,cAAS,SAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,qKAAqC;oBAErC,eAAe,EAAEC,4BAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAEC,sBAAiB,CAAC,IAAI;oBACrC,IAAI,EAAE;wBACJ,KAAK,EAAE,OAAO;qBACf;;iBACF;;;;QCLD;;;;;gBAJCC,cAAS,SAAC;oBACT,QAAQ,EAAE,qDAAqD;oBAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;iBAChC;;;;QCCD;;;;;gBAJCA,cAAS,SAAC;oBACT,QAAQ,EAAE,qDAAqD;oBAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;iBAChC;;;;QCOD;;;;;gBAVCH,cAAS,SAAC;oBACT,QAAQ,EAAE,+CAA+C;oBACzD,uHAA0C;oBAE1C,eAAe,EAAEC,4BAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACJ,KAAK,EAAE,YAAY;qBACpB;oBACD,aAAa,EAAEC,sBAAiB,CAAC,IAAI;;iBACtC;;;QCTY,qBAAqB,GAAG,IAAIE,mBAAc,CAAS,uBAAuB;;;QCFvF;SAEC;0BAAA;KAAA;;;QCOC,sBACU,OAAkB,EACa,WAAwB;YADvD,YAAO,GAAP,OAAO,CAAW;YACa,gBAAW,GAAX,WAAW,CAAa;SAC5D;QAEL,2BAAI,GAAJ,UAAc,SAA4C,EAAE,IAAU;YACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;gBAClC,IAAI,MAAA;gBACJ,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK;aAC9B,CAAC,CAAC;SACJ;;;;gBAbFC,eAAU;;;gBALFC,gBAAS;gBAGT,WAAW,uBAOfC,WAAM,SAAC,qBAAqB;;;;QCuBjC;;QACS,mBAAO,GAAd,UAAe,MAAwC;YAAxC,uBAAA,EAAA,WAAwB,KAAK,EAAE,OAAO,EAAE;YACrD,OAAO;gBACL,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE;oBACT,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,EAAE;iBACrD;aACF,CAAC;SACH;;;;gBA9BFC,aAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,cAAc;wBACd,oBAAoB;wBACpB,oBAAoB;wBACpB,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACPC,mBAAY;wBACZC,sBAAe;wBACfC,uCAAsB;qBACvB;oBACD,OAAO,EAAE;wBACP,cAAc;wBACd,kBAAkB;wBAClB,oBAAoB;wBACpB,oBAAoB;qBACrB;oBACD,SAAS,EAAE;wBACT,YAAY;qBACb;iBACF;;;ICjCD;;;;ICAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/dialog"),require("@craftsjs/perfect-scrollbar")):"function"==typeof define&&define.amd?define("@craftsjs/modal",["exports","@angular/core","@angular/common","@angular/material/dialog","@craftsjs/perfect-scrollbar"],o):o(((e=e||self).craftsjs=e.craftsjs||{},e.craftsjs.modal={}),e.ng.core,e.ng.common,e.ng.material.dialog,e["craftsjs-perfect-scrollbar"])}(this,(function(e,o,t,r,a){"use strict";var n=function(){};n.decorators=[{type:o.Component,args:[{selector:"craftsjs-modal",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>',changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,host:{class:"modal"},styles:[".modal{background-clip:padding-box;background-color:#fff;display:flex;flex-direction:column;outline:0;pointer-events:auto;position:relative;width:100%}.modal-header{align-items:center;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem;display:flex;justify-content:space-between;padding:1rem}.modal-body{flex:1 1 auto;padding:1rem;position:relative}.modal-body-responsive{max-height:calc(70vh - 100px);overflow:auto;position:relative}.modal-footer{align-items:center;border-top:1px solid #e9ecef;display:flex;justify-content:flex-end;padding:1rem}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}"]}]}];var l=function(){};l.decorators=[{type:o.Directive,args:[{selector:"modal-header, [modal-header], [craftsjsModalHeader]",host:{class:"modal-header"}}]}];var d=function(){};d.decorators=[{type:o.Directive,args:[{selector:"modal-footer, [modal-footer], [craftsjsModalFooter]",host:{class:"modal-footer"}}]}];var i=function(){};i.decorators=[{type:o.Component,args:[{selector:"modal-body, [modal-body], [craftsjsModalBody]",template:'<div class="modal-body-responsive" addapptablesPerfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>',changeDetection:o.ChangeDetectionStrategy.OnPush,host:{class:"modal-body"},encapsulation:o.ViewEncapsulation.None,styles:[""]}]}];var s=new o.InjectionToken("CRAFTSJS_MODAL_CONFIG"),c=function(){},f=function(){function e(e,o){this._dialog=e,this.modalConfig=o}return e.prototype.show=function(e,o){return this._dialog.open(e,{data:o,width:this.modalConfig.width})},e}();f.decorators=[{type:o.Injectable}],f.ctorParameters=function(){return[{type:r.MatDialog},{type:c,decorators:[{type:o.Inject,args:[s]}]}]};var p=function(){function e(){}return e.forRoot=function(o){return void 0===o&&(o={width:"800px"}),{ngModule:e,providers:[{provide:s,useValue:o}]}},e}();p.decorators=[{type:o.NgModule,args:[{declarations:[n,l,d,i],imports:[t.CommonModule,r.MatDialogModule,a.PerfectScrollbarModule],exports:[n,i,l,d],providers:[f]}]}],e.CRAFTSJS_MODAL_CONFIG=s,e.ModalBodyComponent=i,e.ModalComponent=n,e.ModalConfig=c,e.ModalFooterDirective=d,e.ModalHeaderDirective=l,e.ModalModule=p,e.ModalService=f,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
|
-
//# sourceMappingURL=craftsjs-modal.umd.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/craftsjs/modal/src/lib/modal.component.ts","../../../../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/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"],"names":["Component","args","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","host","class","Directive","CRAFTSJS_MODAL_CONFIG","InjectionToken","ModalService","_dialog","modalConfig","this","prototype","show","component","data","open","width","Injectable","MatDialog","ModalConfig","decorators","type","Inject","ModalModule","forRoot","config","ngModule","providers","provide","useValue","NgModule","declarations","ModalComponent","ModalHeaderDirective","ModalFooterDirective","ModalBodyComponent","imports","CommonModule","MatDialogModule","PerfectScrollbarModule","exports"],"mappings":"6iBAYA,iCAVCA,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,iBACVC,SAAA,sJAEAC,gBAAiBC,EAAAA,wBAAwBC,OACzCC,cAAeC,EAAAA,kBAAkBC,KACjCC,KAAM,CACJC,MAAO,+rBCHX,iCAJCC,EAAAA,UAASX,KAAA,CAAC,CACTC,SAAU,sDACVQ,KAAM,CAAEC,MAAO,0BCEjB,iCAJCC,EAAAA,UAASX,KAAA,CAAC,CACTC,SAAU,sDACVQ,KAAM,CAAEC,MAAO,0BCQjB,iCAVCX,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,gDACVC,SAAA,4GAEAC,gBAAiBC,EAAAA,wBAAwBC,OACzCI,KAAM,CACJC,MAAO,cAETJ,cAAeC,EAAAA,kBAAkBC,yBCRtBI,EAAwB,IAAIC,EAAAA,eAAuB,2BCFhE,0BCSE,SAAAC,EACUC,EAC+BC,GAD/BC,KAAAF,QAAAA,EAC+BE,KAAAD,YAAAA,SAGzCF,EAAAI,UAAAC,KAAA,SAAcC,EAA8CC,GAC1D,OAAOJ,KAAKF,QAAQO,KAAKF,EAAW,CAClCC,KAAIA,EACJE,MAAON,KAAKD,YAAYO,kCAX7BC,EAAAA,sDALQC,EAAAA,iBAGAC,EAAWC,WAAA,CAAA,CAAAC,KAOfC,EAAAA,OAAM7B,KAAA,CAACY,yBCuBZ,SAAAkB,YACSA,EAAAC,QAAP,SAAeC,GACb,YADa,IAAAA,IAAAA,EAAA,CAAwBT,MAAO,UACrC,CACLU,SAAUH,EACVI,UAAW,CACT,CAAEC,QAASvB,EAAuBwB,SAAUJ,+BA3BnDK,EAAAA,SAAQrC,KAAA,CAAC,CACRsC,aAAc,CACZC,EACAC,EACAC,EACAC,GAEFC,QAAS,CACPC,EAAAA,aACAC,EAAAA,gBACAC,EAAAA,wBAEFC,QAAS,CACPR,EACAG,EACAF,EACAC,GAEFP,UAAW,CACTpB","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","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","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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"ModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"craftsjs-modal","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":6,"character":19},"member":"OnPush"},"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":7,"character":17},"member":"None"},"host":{"class":"modal"},"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":[".modal{background-clip:padding-box;background-color:#fff;display:flex;flex-direction:column;outline:0;pointer-events:auto;position:relative;width:100%}.modal-header{align-items:center;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem;display:flex;justify-content:space-between;padding:1rem}.modal-body{flex:1 1 auto;padding:1rem;position:relative}.modal-body-responsive{max-height:calc(70vh - 100px);overflow:auto;position:relative}.modal-footer{align-items:center;border-top:1px solid #e9ecef;display:flex;justify-content:flex-end;padding:1rem}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}"]}]}],"members":{}},"ModalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ModalComponent"},{"__symbolic":"reference","name":"ModalHeaderDirective"},{"__symbolic":"reference","name":"ModalFooterDirective"},{"__symbolic":"reference","name":"ModalBodyComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":21,"character":4},{"__symbolic":"reference","module":"@craftsjs/perfect-scrollbar","name":"PerfectScrollbarModule","line":22,"character":4}],"exports":[{"__symbolic":"reference","name":"ModalComponent"},{"__symbolic":"reference","name":"ModalBodyComponent"},{"__symbolic":"reference","name":"ModalHeaderDirective"},{"__symbolic":"reference","name":"ModalFooterDirective"}],"providers":[{"__symbolic":"reference","name":"ModalService"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{"width":"800px"}],"value":{"ngModule":{"__symbolic":"reference","name":"ModalModule"},"providers":[{"provide":{"__symbolic":"reference","name":"CRAFTSJS_MODAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"ModalBodyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"modal-body, [modal-body], [craftsjsModalBody]","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":6,"character":19},"member":"OnPush"},"host":{"class":"modal-body"},"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":10,"character":17},"member":"None"},"template":"<div class=\"modal-body-responsive\" addapptablesPerfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>","styles":[""]}]}],"members":{}},"ModalFooterDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"modal-footer, [modal-footer], [craftsjsModalFooter]","host":{"class":"modal-footer"}}]}],"members":{}},"ModalHeaderDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"modal-header, [modal-header], [craftsjsModalHeader]","host":{"class":"modal-header"}}]}],"members":{}},"ModalConfig":{"__symbolic":"class","members":{}},"ModalService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":11,"character":5},"arguments":[{"__symbolic":"reference","name":"CRAFTSJS_MODAL_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":10,"character":21},{"__symbolic":"reference","name":"ModalConfig"}]}],"show":[{"__symbolic":"method"}]}},"CRAFTSJS_MODAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":41},"arguments":["CRAFTSJS_MODAL_CONFIG"]}},"origins":{"ModalComponent":"./lib/modal.component","ModalModule":"./lib/modal.module","ModalBodyComponent":"./lib/components/modal-body/modal-body.component","ModalFooterDirective":"./lib/directives/modal-footer.directive","ModalHeaderDirective":"./lib/directives/modal-header.directive","ModalConfig":"./lib/models/modal-config.model","ModalService":"./lib/services/modal.service","CRAFTSJS_MODAL_CONFIG":"./lib/tokens"},"importAs":"@craftsjs/modal"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
export class ModalBodyComponent {
|
|
3
|
-
}
|
|
4
|
-
ModalBodyComponent.decorators = [
|
|
5
|
-
{ type: Component, args: [{
|
|
6
|
-
selector: 'modal-body, [modal-body], [craftsjsModalBody]',
|
|
7
|
-
template: "<div class=\"modal-body-responsive\" addapptablesPerfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>",
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
-
host: {
|
|
10
|
-
class: 'modal-body'
|
|
11
|
-
},
|
|
12
|
-
encapsulation: ViewEncapsulation.None,
|
|
13
|
-
styles: [""]
|
|
14
|
-
},] }
|
|
15
|
-
];
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtYm9keS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmFmdHNqcy9tb2RhbC9zcmMvbGliL2NvbXBvbmVudHMvbW9kYWwtYm9keS9tb2RhbC1ib2R5LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFFLGlCQUFpQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBWXRGLE1BQU0sT0FBTyxrQkFBa0I7OztZQVY5QixTQUFTLFNBQUM7Z0JBQ1QsUUFBUSxFQUFFLCtDQUErQztnQkFDekQsdUhBQTBDO2dCQUUxQyxlQUFlLEVBQUUsdUJBQXVCLENBQUMsTUFBTTtnQkFDL0MsSUFBSSxFQUFFO29CQUNKLEtBQUssRUFBRSxZQUFZO2lCQUNwQjtnQkFDRCxhQUFhLEVBQUUsaUJBQWlCLENBQUMsSUFBSTs7YUFDdEMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIENoYW5nZURldGVjdGlvblN0cmF0ZWd5LCBWaWV3RW5jYXBzdWxhdGlvbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuQENvbXBvbmVudCh7XHJcbiAgc2VsZWN0b3I6ICdtb2RhbC1ib2R5LCBbbW9kYWwtYm9keV0sIFtjcmFmdHNqc01vZGFsQm9keV0nLFxyXG4gIHRlbXBsYXRlVXJsOiAnLi9tb2RhbC1ib2R5LmNvbXBvbmVudC5odG1sJyxcclxuICBzdHlsZVVybHM6IFsnLi9tb2RhbC1ib2R5LmNvbXBvbmVudC5zY3NzJ10sXHJcbiAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXHJcbiAgaG9zdDoge1xyXG4gICAgY2xhc3M6ICdtb2RhbC1ib2R5J1xyXG4gIH0sXHJcbiAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxCb2R5Q29tcG9uZW50IHsgfVxyXG4iXX0=
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
export class ModalFooterDirective {
|
|
3
|
-
}
|
|
4
|
-
ModalFooterDirective.decorators = [
|
|
5
|
-
{ type: Directive, args: [{
|
|
6
|
-
selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',
|
|
7
|
-
host: { class: 'modal-footer' }
|
|
8
|
-
},] }
|
|
9
|
-
];
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtZm9vdGVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL21vZGFsL3NyYy9saWIvZGlyZWN0aXZlcy9tb2RhbC1mb290ZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNMUMsTUFBTSxPQUFPLG9CQUFvQjs7O1lBSmhDLFNBQVMsU0FBQztnQkFDVCxRQUFRLEVBQUUscURBQXFEO2dCQUMvRCxJQUFJLEVBQUUsRUFBRSxLQUFLLEVBQUUsY0FBYyxFQUFFO2FBQ2hDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aXZlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICBzZWxlY3RvcjogJ21vZGFsLWZvb3RlciwgW21vZGFsLWZvb3Rlcl0sIFtjcmFmdHNqc01vZGFsRm9vdGVyXScsXHJcbiAgaG9zdDogeyBjbGFzczogJ21vZGFsLWZvb3RlcicgfVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxGb290ZXJEaXJlY3RpdmUgeyB9XHJcbiJdfQ==
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
export class ModalHeaderDirective {
|
|
3
|
-
}
|
|
4
|
-
ModalHeaderDirective.decorators = [
|
|
5
|
-
{ type: Directive, args: [{
|
|
6
|
-
selector: 'modal-header, [modal-header], [craftsjsModalHeader]',
|
|
7
|
-
host: { class: 'modal-header' }
|
|
8
|
-
},] }
|
|
9
|
-
];
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtaGVhZGVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL21vZGFsL3NyYy9saWIvZGlyZWN0aXZlcy9tb2RhbC1oZWFkZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNMUMsTUFBTSxPQUFPLG9CQUFvQjs7O1lBSmhDLFNBQVMsU0FBQztnQkFDVCxRQUFRLEVBQUUscURBQXFEO2dCQUMvRCxJQUFJLEVBQUUsRUFBRSxLQUFLLEVBQUUsY0FBYyxFQUFFO2FBQ2hDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aXZlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICBzZWxlY3RvcjogJ21vZGFsLWhlYWRlciwgW21vZGFsLWhlYWRlcl0sIFtjcmFmdHNqc01vZGFsSGVhZGVyXScsXHJcbiAgaG9zdDogeyBjbGFzczogJ21vZGFsLWhlYWRlcicgfVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxIZWFkZXJEaXJlY3RpdmUgeyB9XHJcbiJdfQ==
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
export class ModalComponent {
|
|
3
|
-
}
|
|
4
|
-
ModalComponent.decorators = [
|
|
5
|
-
{ type: Component, args: [{
|
|
6
|
-
selector: 'craftsjs-modal',
|
|
7
|
-
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>",
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
-
encapsulation: ViewEncapsulation.None,
|
|
10
|
-
host: {
|
|
11
|
-
class: 'modal'
|
|
12
|
-
},
|
|
13
|
-
styles: [".modal{background-clip:padding-box;background-color:#fff;display:flex;flex-direction:column;outline:0;pointer-events:auto;position:relative;width:100%}.modal-header{align-items:center;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem;display:flex;justify-content:space-between;padding:1rem}.modal-body{flex:1 1 auto;padding:1rem;position:relative}.modal-body-responsive{max-height:calc(70vh - 100px);overflow:auto;position:relative}.modal-footer{align-items:center;border-top:1px solid #e9ecef;display:flex;justify-content:flex-end;padding:1rem}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}"]
|
|
14
|
-
},] }
|
|
15
|
-
];
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3JhZnRzanMvbW9kYWwvc3JjL2xpYi9tb2RhbC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSx1QkFBdUIsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQVl0RixNQUFNLE9BQU8sY0FBYzs7O1lBVjFCLFNBQVMsU0FBQztnQkFDVCxRQUFRLEVBQUUsZ0JBQWdCO2dCQUMxQixxS0FBcUM7Z0JBRXJDLGVBQWUsRUFBRSx1QkFBdUIsQ0FBQyxNQUFNO2dCQUMvQyxhQUFhLEVBQUUsaUJBQWlCLENBQUMsSUFBSTtnQkFDckMsSUFBSSxFQUFFO29CQUNKLEtBQUssRUFBRSxPQUFPO2lCQUNmOzthQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneSwgVmlld0VuY2Fwc3VsYXRpb24gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuXHJcbkBDb21wb25lbnQoe1xyXG4gIHNlbGVjdG9yOiAnY3JhZnRzanMtbW9kYWwnLFxyXG4gIHRlbXBsYXRlVXJsOiAnLi9tb2RhbC5jb21wb25lbnQuaHRtbCcsXHJcbiAgc3R5bGVVcmxzOiBbJy4vbW9kYWwuY29tcG9uZW50LnNjc3MnXSxcclxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcclxuICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxyXG4gIGhvc3Q6IHtcclxuICAgIGNsYXNzOiAnbW9kYWwnXHJcbiAgfVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxDb21wb25lbnQgeyB9XHJcbiJdfQ==
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { MatDialogModule } from '@angular/material/dialog';
|
|
4
|
-
import { ModalComponent } from './modal.component';
|
|
5
|
-
import { ModalHeaderDirective } from './directives/modal-header.directive';
|
|
6
|
-
import { ModalFooterDirective } from './directives/modal-footer.directive';
|
|
7
|
-
import { ModalBodyComponent } from './components/modal-body/modal-body.component';
|
|
8
|
-
import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
|
|
9
|
-
import { ModalService } from './services/modal.service';
|
|
10
|
-
import { CRAFTSJS_MODAL_CONFIG } from './tokens';
|
|
11
|
-
export class ModalModule {
|
|
12
|
-
static forRoot(config = { width: '800px' }) {
|
|
13
|
-
return {
|
|
14
|
-
ngModule: ModalModule,
|
|
15
|
-
providers: [
|
|
16
|
-
{ provide: CRAFTSJS_MODAL_CONFIG, useValue: config }
|
|
17
|
-
]
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
ModalModule.decorators = [
|
|
22
|
-
{ type: NgModule, args: [{
|
|
23
|
-
declarations: [
|
|
24
|
-
ModalComponent,
|
|
25
|
-
ModalHeaderDirective,
|
|
26
|
-
ModalFooterDirective,
|
|
27
|
-
ModalBodyComponent,
|
|
28
|
-
],
|
|
29
|
-
imports: [
|
|
30
|
-
CommonModule,
|
|
31
|
-
MatDialogModule,
|
|
32
|
-
PerfectScrollbarModule,
|
|
33
|
-
],
|
|
34
|
-
exports: [
|
|
35
|
-
ModalComponent,
|
|
36
|
-
ModalBodyComponent,
|
|
37
|
-
ModalHeaderDirective,
|
|
38
|
-
ModalFooterDirective
|
|
39
|
-
],
|
|
40
|
-
providers: [
|
|
41
|
-
ModalService
|
|
42
|
-
]
|
|
43
|
-
},] }
|
|
44
|
-
];
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3JhZnRzanMvbW9kYWwvc3JjL2xpYi9tb2RhbC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBdUIsTUFBTSxlQUFlLENBQUM7QUFDOUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbkQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDM0UsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDM0UsT0FB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1bGUsXHJcbiAgICBQZXJmZWN0U2Nyb2xsYmFyTW9kdWxlLFxyXG4gIF0sXHJcbiAgZXhwb3J0czogW1xyXG4gICAgTW9kYWxDb21wb25lbnQsXHJcbiAgICBNb2RhbEJvZHlDb21wb25lbnQsXHJcbiAgICBNb2RhbEhlYWRlckRpcmVjdGl2ZSxcclxuICAgIE1vZGFsRm9vdGVyRGlyZWN0aXZlXHJcbiAgXSxcclxuICBwcm92aWRlcnM6IFtcclxuICAgIE1vZGFsU2VydmljZVxyXG4gIF1cclxufSlcclxuZXhwb3J0IGNsYXNzIE1vZGFsTW9kdWxlIHtcclxuICBzdGF0aWMgZm9yUm9vdChjb25maWc6IE1vZGFsQ29uZmlnID0geyB3aWR0aDogJzgwMHB4JyB9KTogTW9kdWxlV2l0aFByb3ZpZGVyczxNb2RhbE1vZHVsZT4ge1xyXG4gICAgcmV0dXJuIHtcclxuICAgICAgbmdNb2R1bGU6IE1vZGFsTW9kdWxlLFxyXG4gICAgICBwcm92aWRlcnM6IFtcclxuICAgICAgICB7IHByb3ZpZGU6IENSQUZUU0pTX01PREFMX0NPTkZJRywgdXNlVmFsdWU6IGNvbmZpZyB9XHJcbiAgICAgIF1cclxuICAgIH07XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { CRAFTSJS_MODAL_CONFIG } from '../tokens';
|
|
4
|
-
import { ModalConfig } from '../models/modal-config.model';
|
|
5
|
-
export class ModalService {
|
|
6
|
-
constructor(_dialog, modalConfig) {
|
|
7
|
-
this._dialog = _dialog;
|
|
8
|
-
this.modalConfig = modalConfig;
|
|
9
|
-
}
|
|
10
|
-
show(component, data) {
|
|
11
|
-
return this._dialog.open(component, {
|
|
12
|
-
data,
|
|
13
|
-
width: this.modalConfig.width
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
ModalService.decorators = [
|
|
18
|
-
{ type: Injectable }
|
|
19
|
-
];
|
|
20
|
-
ModalService.ctorParameters = () => [
|
|
21
|
-
{ type: MatDialog },
|
|
22
|
-
{ type: ModalConfig, decorators: [{ type: Inject, args: [CRAFTSJS_MODAL_CONFIG,] }] }
|
|
23
|
-
];
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL21vZGFsL3NyYy9saWIvc2VydmljZXMvbW9kYWwuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFlLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNoRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFckQsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQ2xELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUczRCxNQUFNLE9BQU8sWUFBWTtJQUV2QixZQUNVLE9BQWtCLEVBQ2EsV0FBd0I7UUFEdkQsWUFBTyxHQUFQLE9BQU8sQ0FBVztRQUNhLGdCQUFXLEdBQVgsV0FBVyxDQUFhO0lBQzdELENBQUM7SUFFTCxJQUFJLENBQVUsU0FBNEMsRUFBRSxJQUFVO1FBQ3BFLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFO1lBQ2xDLElBQUk7WUFDSixLQUFLLEVBQUUsSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLO1NBQzlCLENBQUMsQ0FBQztJQUNMLENBQUM7OztZQWJGLFVBQV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sulation, Directive, InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
4
|
-
import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
|
|
5
|
-
|
|
6
|
-
class ModalComponent {
|
|
7
|
-
}
|
|
8
|
-
ModalComponent.decorators = [
|
|
9
|
-
{ type: Component, args: [{
|
|
10
|
-
selector: 'craftsjs-modal',
|
|
11
|
-
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>",
|
|
12
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
-
encapsulation: ViewEncapsulation.None,
|
|
14
|
-
host: {
|
|
15
|
-
class: 'modal'
|
|
16
|
-
},
|
|
17
|
-
styles: [".modal{background-clip:padding-box;background-color:#fff;display:flex;flex-direction:column;outline:0;pointer-events:auto;position:relative;width:100%}.modal-header{align-items:center;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem;display:flex;justify-content:space-between;padding:1rem}.modal-body{flex:1 1 auto;padding:1rem;position:relative}.modal-body-responsive{max-height:calc(70vh - 100px);overflow:auto;position:relative}.modal-footer{align-items:center;border-top:1px solid #e9ecef;display:flex;justify-content:flex-end;padding:1rem}.modal-footer>button{margin-right:10px}.modal-footer>button:last-child{margin-right:0}"]
|
|
18
|
-
},] }
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
class ModalHeaderDirective {
|
|
22
|
-
}
|
|
23
|
-
ModalHeaderDirective.decorators = [
|
|
24
|
-
{ type: Directive, args: [{
|
|
25
|
-
selector: 'modal-header, [modal-header], [craftsjsModalHeader]',
|
|
26
|
-
host: { class: 'modal-header' }
|
|
27
|
-
},] }
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
class ModalFooterDirective {
|
|
31
|
-
}
|
|
32
|
-
ModalFooterDirective.decorators = [
|
|
33
|
-
{ type: Directive, args: [{
|
|
34
|
-
selector: 'modal-footer, [modal-footer], [craftsjsModalFooter]',
|
|
35
|
-
host: { class: 'modal-footer' }
|
|
36
|
-
},] }
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
class ModalBodyComponent {
|
|
40
|
-
}
|
|
41
|
-
ModalBodyComponent.decorators = [
|
|
42
|
-
{ type: Component, args: [{
|
|
43
|
-
selector: 'modal-body, [modal-body], [craftsjsModalBody]',
|
|
44
|
-
template: "<div class=\"modal-body-responsive\" addapptablesPerfectScrollbar>\r\n <ng-content></ng-content>\r\n</div>",
|
|
45
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
-
host: {
|
|
47
|
-
class: 'modal-body'
|
|
48
|
-
},
|
|
49
|
-
encapsulation: ViewEncapsulation.None,
|
|
50
|
-
styles: [""]
|
|
51
|
-
},] }
|
|
52
|
-
];
|
|
53
|
-
|
|
54
|
-
const CRAFTSJS_MODAL_CONFIG = new InjectionToken('CRAFTSJS_MODAL_CONFIG');
|
|
55
|
-
|
|
56
|
-
class ModalConfig {
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
class ModalService {
|
|
60
|
-
constructor(_dialog, modalConfig) {
|
|
61
|
-
this._dialog = _dialog;
|
|
62
|
-
this.modalConfig = modalConfig;
|
|
63
|
-
}
|
|
64
|
-
show(component, data) {
|
|
65
|
-
return this._dialog.open(component, {
|
|
66
|
-
data,
|
|
67
|
-
width: this.modalConfig.width
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
ModalService.decorators = [
|
|
72
|
-
{ type: Injectable }
|
|
73
|
-
];
|
|
74
|
-
ModalService.ctorParameters = () => [
|
|
75
|
-
{ type: MatDialog },
|
|
76
|
-
{ type: ModalConfig, decorators: [{ type: Inject, args: [CRAFTSJS_MODAL_CONFIG,] }] }
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
class ModalModule {
|
|
80
|
-
static forRoot(config = { width: '800px' }) {
|
|
81
|
-
return {
|
|
82
|
-
ngModule: ModalModule,
|
|
83
|
-
providers: [
|
|
84
|
-
{ provide: CRAFTSJS_MODAL_CONFIG, useValue: config }
|
|
85
|
-
]
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
ModalModule.decorators = [
|
|
90
|
-
{ type: NgModule, args: [{
|
|
91
|
-
declarations: [
|
|
92
|
-
ModalComponent,
|
|
93
|
-
ModalHeaderDirective,
|
|
94
|
-
ModalFooterDirective,
|
|
95
|
-
ModalBodyComponent,
|
|
96
|
-
],
|
|
97
|
-
imports: [
|
|
98
|
-
CommonModule,
|
|
99
|
-
MatDialogModule,
|
|
100
|
-
PerfectScrollbarModule,
|
|
101
|
-
],
|
|
102
|
-
exports: [
|
|
103
|
-
ModalComponent,
|
|
104
|
-
ModalBodyComponent,
|
|
105
|
-
ModalHeaderDirective,
|
|
106
|
-
ModalFooterDirective
|
|
107
|
-
],
|
|
108
|
-
providers: [
|
|
109
|
-
ModalService
|
|
110
|
-
]
|
|
111
|
-
},] }
|
|
112
|
-
];
|
|
113
|
-
|
|
114
|
-
/*
|
|
115
|
-
* Public API Surface of modal
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Generated bundle index. Do not edit.
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
export { CRAFTSJS_MODAL_CONFIG, ModalBodyComponent, ModalComponent, ModalConfig, ModalFooterDirective, ModalHeaderDirective, ModalModule, ModalService };
|
|
123
|
-
//# sourceMappingURL=craftsjs-modal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"craftsjs-modal.js","sources":["../../../../projects/craftsjs/modal/src/lib/modal.component.ts","../../../../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/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","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","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;;;YAV1B,SAAS,SAAC;gBACT,QAAQ,EAAE,gBAAgB;gBAC1B,qKAAqC;gBAErC,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,IAAI,EAAE;oBACJ,KAAK,EAAE,OAAO;iBACf;;aACF;;;MCLY,oBAAoB;;;YAJhC,SAAS,SAAC;gBACT,QAAQ,EAAE,qDAAqD;gBAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;aAChC;;;MCCY,oBAAoB;;;YAJhC,SAAS,SAAC;gBACT,QAAQ,EAAE,qDAAqD;gBAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;aAChC;;;MCOY,kBAAkB;;;YAV9B,SAAS,SAAC;gBACT,QAAQ,EAAE,+CAA+C;gBACzD,uHAA0C;gBAE1C,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,IAAI,EAAE;oBACJ,KAAK,EAAE,YAAY;iBACpB;gBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;;aACtC;;;MCTY,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,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