UNPKG

3.61 kBJavaScriptView Raw
1import { ɵɵdefineInjectable, Injectable, Component, Directive, TemplateRef, Input, NgModule } from '@angular/core';
2import { Subject } from 'rxjs';
3import { CommonModule } from '@angular/common';
4
5class PrimeNGConfig {
6 constructor() {
7 this.ripple = false;
8 }
9}
10PrimeNGConfig.ɵprov = ɵɵdefineInjectable({ factory: function PrimeNGConfig_Factory() { return new PrimeNGConfig(); }, token: PrimeNGConfig, providedIn: "root" });
11PrimeNGConfig.decorators = [
12 { type: Injectable, args: [{ providedIn: 'root' },] }
13];
14
15class 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}
34ConfirmationService.decorators = [
35 { type: Injectable }
36];
37
38class 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}
59MessageService.decorators = [
60 { type: Injectable }
61];
62
63class Header {
64}
65Header.decorators = [
66 { type: Component, args: [{
67 selector: 'p-header',
68 template: '<ng-content></ng-content>'
69 },] }
70];
71class Footer {
72}
73Footer.decorators = [
74 { type: Component, args: [{
75 selector: 'p-footer',
76 template: '<ng-content></ng-content>'
77 },] }
78];
79class PrimeTemplate {
80 constructor(template) {
81 this.template = template;
82 }
83 getType() {
84 return this.name;
85 }
86}
87PrimeTemplate.decorators = [
88 { type: Directive, args: [{
89 selector: '[pTemplate]',
90 host: {}
91 },] }
92];
93PrimeTemplate.ctorParameters = () => [
94 { type: TemplateRef }
95];
96PrimeTemplate.propDecorators = {
97 type: [{ type: Input }],
98 name: [{ type: Input, args: ['pTemplate',] }]
99};
100class SharedModule {
101}
102SharedModule.decorators = [
103 { type: NgModule, args: [{
104 imports: [CommonModule],
105 exports: [Header, Footer, PrimeTemplate],
106 declarations: [Header, Footer, PrimeTemplate]
107 },] }
108];
109
110class 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}
124TreeDragDropService.decorators = [
125 { type: Injectable }
126];
127
128/**
129 * Generated bundle index. Do not edit.
130 */
131
132export { ConfirmationService, Footer, Header, MessageService, PrimeNGConfig, PrimeTemplate, SharedModule, TreeDragDropService };
133//# sourceMappingURL=primeng-api.js.map