1 | import { ɵɵdefineInjectable, Injectable, Component, Directive, TemplateRef, Input, NgModule } from '@angular/core';
|
2 | import { Subject } from 'rxjs';
|
3 | import { CommonModule } from '@angular/common';
|
4 |
|
5 | class PrimeNGConfig {
|
6 | constructor() {
|
7 | this.ripple = false;
|
8 | }
|
9 | }
|
10 | PrimeNGConfig.ɵprov = ɵɵdefineInjectable({ factory: function PrimeNGConfig_Factory() { return new PrimeNGConfig(); }, token: PrimeNGConfig, providedIn: "root" });
|
11 | PrimeNGConfig.decorators = [
|
12 | { type: Injectable, args: [{ providedIn: 'root' },] }
|
13 | ];
|
14 |
|
15 | class ConfirmationService {
|
16 | constructor() {
|
17 | this.requireConfirmationSource = new Subject();
|
18 | this.acceptConfirmationSource = new Subject();
|
19 | this.requireConfirmation$ = this.requireConfirmationSource.asObservable();
|
20 | this.accept = this.acceptConfirmationSource.asObservable();
|
21 | }
|
22 | confirm(confirmation) {
|
23 | this.requireConfirmationSource.next(confirmation);
|
24 | return this;
|
25 | }
|
26 | close() {
|
27 | this.requireConfirmationSource.next(null);
|
28 | return this;
|
29 | }
|
30 | onAccept() {
|
31 | this.acceptConfirmationSource.next();
|
32 | }
|
33 | }
|
34 | ConfirmationService.decorators = [
|
35 | { type: Injectable }
|
36 | ];
|
37 |
|
38 | class MessageService {
|
39 | constructor() {
|
40 | this.messageSource = new Subject();
|
41 | this.clearSource = new Subject();
|
42 | this.messageObserver = this.messageSource.asObservable();
|
43 | this.clearObserver = this.clearSource.asObservable();
|
44 | }
|
45 | add(message) {
|
46 | if (message) {
|
47 | this.messageSource.next(message);
|
48 | }
|
49 | }
|
50 | addAll(messages) {
|
51 | if (messages && messages.length) {
|
52 | this.messageSource.next(messages);
|
53 | }
|
54 | }
|
55 | clear(key) {
|
56 | this.clearSource.next(key || null);
|
57 | }
|
58 | }
|
59 | MessageService.decorators = [
|
60 | { type: Injectable }
|
61 | ];
|
62 |
|
63 | class Header {
|
64 | }
|
65 | Header.decorators = [
|
66 | { type: Component, args: [{
|
67 | selector: 'p-header',
|
68 | template: '<ng-content></ng-content>'
|
69 | },] }
|
70 | ];
|
71 | class Footer {
|
72 | }
|
73 | Footer.decorators = [
|
74 | { type: Component, args: [{
|
75 | selector: 'p-footer',
|
76 | template: '<ng-content></ng-content>'
|
77 | },] }
|
78 | ];
|
79 | class PrimeTemplate {
|
80 | constructor(template) {
|
81 | this.template = template;
|
82 | }
|
83 | getType() {
|
84 | return this.name;
|
85 | }
|
86 | }
|
87 | PrimeTemplate.decorators = [
|
88 | { type: Directive, args: [{
|
89 | selector: '[pTemplate]',
|
90 | host: {}
|
91 | },] }
|
92 | ];
|
93 | PrimeTemplate.ctorParameters = () => [
|
94 | { type: TemplateRef }
|
95 | ];
|
96 | PrimeTemplate.propDecorators = {
|
97 | type: [{ type: Input }],
|
98 | name: [{ type: Input, args: ['pTemplate',] }]
|
99 | };
|
100 | class SharedModule {
|
101 | }
|
102 | SharedModule.decorators = [
|
103 | { type: NgModule, args: [{
|
104 | imports: [CommonModule],
|
105 | exports: [Header, Footer, PrimeTemplate],
|
106 | declarations: [Header, Footer, PrimeTemplate]
|
107 | },] }
|
108 | ];
|
109 |
|
110 | class TreeDragDropService {
|
111 | constructor() {
|
112 | this.dragStartSource = new Subject();
|
113 | this.dragStopSource = new Subject();
|
114 | this.dragStart$ = this.dragStartSource.asObservable();
|
115 | this.dragStop$ = this.dragStopSource.asObservable();
|
116 | }
|
117 | startDrag(event) {
|
118 | this.dragStartSource.next(event);
|
119 | }
|
120 | stopDrag(event) {
|
121 | this.dragStopSource.next(event);
|
122 | }
|
123 | }
|
124 | TreeDragDropService.decorators = [
|
125 | { type: Injectable }
|
126 | ];
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 | export { ConfirmationService, Footer, Header, MessageService, PrimeNGConfig, PrimeTemplate, SharedModule, TreeDragDropService };
|
133 |
|