@firestitch/app-message 12.5.4 → 12.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/app/helpers/index-name-value.d.ts +1 -1
  2. package/app/helpers/index.d.ts +1 -1
  3. package/app/modules/app-message/app-message.module.d.ts +8 -8
  4. package/app/modules/app-message/injectors/app-message-config.injector.d.ts +3 -3
  5. package/app/modules/app-message/injectors/index.d.ts +1 -1
  6. package/app/modules/app-message/interfaces/app-message-config.d.ts +30 -25
  7. package/app/modules/app-message/interfaces/index.d.ts +1 -1
  8. package/app/modules/app-message/types/index.d.ts +1 -1
  9. package/app/modules/app-message/types/types.type.d.ts +49 -40
  10. package/app/modules/message-preview/components/index.d.ts +1 -1
  11. package/app/modules/message-preview/components/preview/index.d.ts +1 -1
  12. package/app/modules/message-preview/components/preview/preview.component.d.ts +11 -11
  13. package/app/modules/message-preview/message-preview.module.d.ts +11 -11
  14. package/app/modules/message-queues/components/queue/queue.component.d.ts +44 -43
  15. package/app/modules/message-queues/components/queues/queues.component.d.ts +22 -24
  16. package/app/modules/message-queues/components/recipient/recipient.component.d.ts +10 -10
  17. package/app/modules/message-queues/consts/index.d.ts +1 -1
  18. package/app/modules/message-queues/consts/message-queue-event-type.const.d.ts +5 -5
  19. package/app/modules/message-queues/consts/message-queue-states.const.d.ts +5 -5
  20. package/app/modules/message-queues/enums/email-message-queue-format.enum.d.ts +5 -5
  21. package/app/modules/message-queues/enums/index.d.ts +3 -3
  22. package/app/modules/message-queues/enums/message-queue-event-type.enum.d.ts +4 -4
  23. package/app/modules/message-queues/enums/message-queue-state.enum.d.ts +9 -9
  24. package/app/modules/message-queues/enums/message-queue-type.enum.d.ts +4 -4
  25. package/app/modules/message-queues/message-queues.module.d.ts +29 -29
  26. package/app/modules/message-queues/pipes/linkify.pipe.d.ts +7 -7
  27. package/app/modules/message-queues/pipes/truncate.pipe.d.ts +7 -7
  28. package/app/modules/message-queues/services/message-queue.service.d.ts +12 -12
  29. package/app/modules/message-templates/components/index.d.ts +2 -2
  30. package/app/modules/message-templates/components/template/index.d.ts +1 -1
  31. package/app/modules/message-templates/components/template/template.component.d.ts +23 -23
  32. package/app/modules/message-templates/components/templates/index.d.ts +1 -1
  33. package/app/modules/message-templates/components/templates/templates.component.d.ts +19 -19
  34. package/app/modules/message-templates/message-templates.module.d.ts +25 -25
  35. package/app/modules/messages/components/attachments/attachments.component.d.ts +18 -0
  36. package/app/modules/messages/components/attachments/index.d.ts +1 -0
  37. package/app/modules/messages/components/index.d.ts +3 -2
  38. package/app/modules/messages/components/message/index.d.ts +1 -1
  39. package/app/modules/messages/components/message/message.component.d.ts +30 -32
  40. package/app/modules/messages/components/messages/index.d.ts +1 -1
  41. package/app/modules/messages/components/messages/messages.component.d.ts +19 -19
  42. package/app/modules/messages/consts/email-message-formats.const.d.ts +5 -5
  43. package/app/modules/messages/consts/index.d.ts +1 -1
  44. package/app/modules/messages/enums/email-message-format.enum.d.ts +5 -5
  45. package/app/modules/messages/enums/index.d.ts +1 -1
  46. package/app/modules/messages/messages.module.d.ts +32 -29
  47. package/app/modules/webhooks/components/webhooks/webhooks.component.d.ts +15 -15
  48. package/app/modules/webhooks/webhooks.module.d.ts +9 -9
  49. package/bundles/firestitch-app-message.umd.js +1609 -1521
  50. package/bundles/firestitch-app-message.umd.js.map +1 -1
  51. package/esm2015/app/helpers/index-name-value.js +7 -7
  52. package/esm2015/app/helpers/index.js +1 -1
  53. package/esm2015/app/modules/app-message/app-message.module.js +16 -16
  54. package/esm2015/app/modules/app-message/injectors/app-message-config.injector.js +3 -3
  55. package/esm2015/app/modules/app-message/injectors/index.js +1 -1
  56. package/esm2015/app/modules/app-message/interfaces/app-message-config.js +2 -2
  57. package/esm2015/app/modules/app-message/interfaces/index.js +1 -1
  58. package/esm2015/app/modules/app-message/types/index.js +1 -1
  59. package/esm2015/app/modules/app-message/types/types.type.js +2 -2
  60. package/esm2015/app/modules/message-preview/components/index.js +1 -1
  61. package/esm2015/app/modules/message-preview/components/preview/index.js +1 -1
  62. package/esm2015/app/modules/message-preview/components/preview/preview.component.js +28 -28
  63. package/esm2015/app/modules/message-preview/message-preview.module.js +37 -37
  64. package/esm2015/app/modules/message-queues/components/queue/queue.component.js +214 -209
  65. package/esm2015/app/modules/message-queues/components/queues/queues.component.js +146 -147
  66. package/esm2015/app/modules/message-queues/components/recipient/recipient.component.js +31 -30
  67. package/esm2015/app/modules/message-queues/consts/index.js +1 -1
  68. package/esm2015/app/modules/message-queues/consts/message-queue-event-type.const.js +5 -5
  69. package/esm2015/app/modules/message-queues/consts/message-queue-states.const.js +10 -10
  70. package/esm2015/app/modules/message-queues/enums/email-message-queue-format.enum.js +6 -6
  71. package/esm2015/app/modules/message-queues/enums/index.js +3 -3
  72. package/esm2015/app/modules/message-queues/enums/message-queue-event-type.enum.js +5 -5
  73. package/esm2015/app/modules/message-queues/enums/message-queue-state.enum.js +10 -10
  74. package/esm2015/app/modules/message-queues/enums/message-queue-type.enum.js +5 -5
  75. package/esm2015/app/modules/message-queues/message-queues.module.js +119 -119
  76. package/esm2015/app/modules/message-queues/pipes/linkify.pipe.js +21 -21
  77. package/esm2015/app/modules/message-queues/pipes/truncate.pipe.js +21 -21
  78. package/esm2015/app/modules/message-queues/services/message-queue.service.js +28 -28
  79. package/esm2015/app/modules/message-templates/components/index.js +2 -2
  80. package/esm2015/app/modules/message-templates/components/template/index.js +1 -1
  81. package/esm2015/app/modules/message-templates/components/template/template.component.js +83 -83
  82. package/esm2015/app/modules/message-templates/components/templates/index.js +1 -1
  83. package/esm2015/app/modules/message-templates/components/templates/templates.component.js +83 -83
  84. package/esm2015/app/modules/message-templates/message-templates.module.js +97 -97
  85. package/esm2015/app/modules/messages/components/attachments/attachments.component.js +87 -0
  86. package/esm2015/app/modules/messages/components/attachments/index.js +2 -0
  87. package/esm2015/app/modules/messages/components/index.js +4 -3
  88. package/esm2015/app/modules/messages/components/message/index.js +1 -1
  89. package/esm2015/app/modules/messages/components/message/message.component.js +128 -137
  90. package/esm2015/app/modules/messages/components/messages/index.js +1 -1
  91. package/esm2015/app/modules/messages/components/messages/messages.component.js +74 -74
  92. package/esm2015/app/modules/messages/consts/email-message-formats.const.js +6 -6
  93. package/esm2015/app/modules/messages/consts/index.js +1 -1
  94. package/esm2015/app/modules/messages/enums/email-message-format.enum.js +6 -6
  95. package/esm2015/app/modules/messages/enums/index.js +1 -1
  96. package/esm2015/app/modules/messages/messages.module.js +125 -114
  97. package/esm2015/app/modules/webhooks/components/webhooks/webhooks.component.js +65 -64
  98. package/esm2015/app/modules/webhooks/webhooks.module.js +29 -29
  99. package/esm2015/firestitch-app-message.js +4 -4
  100. package/esm2015/public_api.js +17 -17
  101. package/fesm2015/firestitch-app-message.js +1221 -1135
  102. package/fesm2015/firestitch-app-message.js.map +1 -1
  103. package/firestitch-app-message.d.ts +5 -5
  104. package/package.json +1 -1
  105. package/public_api.d.ts +15 -15
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Inject, InjectionToken, ChangeDetectionStrategy, ViewChild, NgModule, Input, Injectable, Pipe } from '@angular/core';
3
- import * as i16 from '@angular/common';
2
+ import { Component, Inject, InjectionToken, ChangeDetectionStrategy, ViewChild, Input, NgModule, Injectable, Pipe } from '@angular/core';
3
+ import * as i17 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { RouterModule } from '@angular/router';
6
6
  import { FlexLayoutModule } from '@angular/flex-layout';
@@ -12,1224 +12,1310 @@ import * as i1 from '@angular/material/dialog';
12
12
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
13
13
  import * as i6 from '@angular/material/form-field';
14
14
  import { MatFormFieldModule } from '@angular/material/form-field';
15
- import * as i18 from '@angular/material/input';
15
+ import * as i20 from '@angular/material/input';
16
16
  import { MatInputModule } from '@angular/material/input';
17
17
  import * as i7 from '@angular/material/select';
18
18
  import { MatSelectModule } from '@angular/material/select';
19
19
  import * as i5 from '@angular/material/tabs';
20
20
  import { MatTabsModule } from '@angular/material/tabs';
21
21
  import { MatCheckboxModule } from '@angular/material/checkbox';
22
- import * as i3$1 from '@angular/material/tooltip';
22
+ import * as i3$2 from '@angular/material/tooltip';
23
23
  import { MatTooltipModule } from '@angular/material/tooltip';
24
24
  import * as i6$1 from '@firestitch/label';
25
25
  import { FsLabelModule } from '@firestitch/label';
26
26
  import * as i4 from '@firestitch/dialog';
27
27
  import { FsDialogModule } from '@firestitch/dialog';
28
- import * as i2$2 from '@firestitch/list';
28
+ import * as i2$1 from '@firestitch/list';
29
29
  import { FsListComponent, FsListModule } from '@firestitch/list';
30
- import * as i13 from '@firestitch/skeleton';
30
+ import * as i14 from '@firestitch/skeleton';
31
31
  import { FsSkeletonModule } from '@firestitch/skeleton';
32
- import * as i14 from '@angular/forms';
32
+ import * as i18 from '@firestitch/tabs';
33
+ import { FsTabsModule } from '@firestitch/tabs';
34
+ import * as i15 from '@angular/forms';
33
35
  import { FormsModule } from '@angular/forms';
34
- import * as i15 from '@firestitch/form';
36
+ import * as i16 from '@firestitch/form';
35
37
  import { FsFormModule } from '@firestitch/form';
36
38
  import * as i9 from '@firestitch/text-editor';
37
39
  import { FsTextEditorModule } from '@firestitch/text-editor';
38
40
  import * as i10 from '@firestitch/html-editor';
39
41
  import { FsHtmlEditorModule, FsHtmlRendererModule } from '@firestitch/html-editor';
40
42
  import { tap, switchMap, map, takeUntil } from 'rxjs/operators';
41
- import { of, Subject } from 'rxjs';
42
- import { ItemType } from '@firestitch/filter';
43
- import * as i2$1 from '@firestitch/message';
44
- import * as i1$1 from '@firestitch/prompt';
43
+ import { Subject, of } from 'rxjs';
44
+ import { ActionMode, ItemType } from '@firestitch/filter';
45
+ import * as i1$1 from '@firestitch/message';
46
+ import * as i1$2 from '@firestitch/prompt';
45
47
  import { FsPromptInputModule } from '@firestitch/prompt';
46
48
  import * as i2 from '@firestitch/iframe';
47
49
  import { FsIFrameModule } from '@firestitch/iframe';
48
- import * as i17 from '@angular/flex-layout/flex';
49
- import * as i1$2 from '@angular/material/icon';
50
+ import * as i3$1 from '@firestitch/common';
51
+ import { FsCommonModule } from '@firestitch/common';
52
+ import * as i19 from '@angular/flex-layout/flex';
53
+ import * as i1$3 from '@angular/material/icon';
50
54
  import { MatIconModule } from '@angular/material/icon';
51
55
  import * as i10$1 from '@firestitch/date';
52
56
  import { FsDateModule } from '@firestitch/date';
53
57
  import { SelectionActionType } from '@firestitch/selection';
54
58
  import anchorme from 'anchorme';
55
59
 
56
- var EmailMessageFormat;
57
- (function (EmailMessageFormat) {
58
- EmailMessageFormat["Text"] = "T";
59
- EmailMessageFormat["HTML"] = "H";
60
- EmailMessageFormat["RichText"] = "R";
60
+ var EmailMessageFormat;
61
+ (function (EmailMessageFormat) {
62
+ EmailMessageFormat["Text"] = "T";
63
+ EmailMessageFormat["HTML"] = "H";
64
+ EmailMessageFormat["RichText"] = "R";
61
65
  })(EmailMessageFormat || (EmailMessageFormat = {}));
62
66
 
63
- const EmailMessageFormats = [
64
- { name: 'Text', value: EmailMessageFormat.Text },
65
- { name: 'HTML', value: EmailMessageFormat.HTML },
66
- { name: 'Rich Text', value: EmailMessageFormat.RichText }
67
+ const EmailMessageFormats = [
68
+ { name: 'Text', value: EmailMessageFormat.Text },
69
+ { name: 'HTML', value: EmailMessageFormat.HTML },
70
+ { name: 'Rich Text', value: EmailMessageFormat.RichText }
67
71
  ];
68
72
 
69
- class PreviewComponent {
70
- constructor(_data) {
71
- this._data = _data;
72
- this.html = _data.html;
73
- this.styles = _data.styles;
74
- }
75
- ngOnInit() {
76
- }
77
- }
78
- PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PreviewComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
79
- PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <div mat-dialog-title>Preview</div>\n <mat-dialog-content>\n <fs-iframe\n [html]=\"html\"\n [styles]=\"styles\">\n </fs-iframe>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"null\" color=\"primary\" type=\"button\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i2.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PreviewComponent, decorators: [{
81
- type: Component,
82
- args: [{
83
- templateUrl: './preview.component.html',
84
- styleUrls: ['./preview.component.scss']
85
- }]
86
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
87
- type: Inject,
88
- args: [MAT_DIALOG_DATA]
73
+ class PreviewComponent {
74
+ constructor(_data) {
75
+ this._data = _data;
76
+ this.html = _data.html;
77
+ this.styles = _data.styles;
78
+ }
79
+ ngOnInit() {
80
+ }
81
+ }
82
+ PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PreviewComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
83
+ PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <div mat-dialog-title>Preview</div>\n <mat-dialog-content>\n <fs-iframe\n [html]=\"html\"\n [styles]=\"styles\">\n </fs-iframe>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"null\" color=\"primary\" type=\"button\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i2.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PreviewComponent, decorators: [{
85
+ type: Component,
86
+ args: [{
87
+ templateUrl: './preview.component.html',
88
+ styleUrls: ['./preview.component.scss']
89
+ }]
90
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
91
+ type: Inject,
92
+ args: [MAT_DIALOG_DATA]
89
93
  }] }]; } });
90
94
 
91
- const FS_APP_MESSAGE_ROOT_CONFIG = new InjectionToken('fs-app-message-root-config');
95
+ const FS_APP_MESSAGE_ROOT_CONFIG = new InjectionToken('fs-app-message-root-config');
92
96
  const FS_APP_MESSAGE_CONFIG = new InjectionToken('fs-app-message-config');
93
97
 
94
- class MessageComponent {
95
- constructor(_config, _data, _prompt, _message, _dialog, _cdRef) {
96
- this._config = _config;
97
- this._data = _data;
98
- this._prompt = _prompt;
99
- this._message = _message;
100
- this._dialog = _dialog;
101
- this._cdRef = _cdRef;
102
- this.messageTemplates = [];
103
- this.emailMessageFormats = EmailMessageFormats;
104
- this.emailMessageFormat = EmailMessageFormat;
105
- this.save = () => {
106
- return this._config.saveMessage(this.message)
107
- .pipe(tap(() => {
108
- this._message.success('Saved Changes');
109
- }));
110
- };
111
- }
112
- ngOnInit() {
113
- this._config.loadMessage(this._data.message)
114
- .subscribe((response) => {
115
- this.message = response;
116
- if (this.message.emailMessage && this.message.emailMessage.customize === undefined) {
117
- this.message.emailMessage.customize = true;
118
- }
119
- if (this.message.smsMessage && this.message.smsMessage.customize === undefined) {
120
- this.message.smsMessage.customize = true;
121
- }
122
- this._cdRef.markForCheck();
123
- });
124
- this._config.loadMessageTemplates()
125
- .subscribe((data) => {
126
- this.messageTemplates = data.data;
127
- this._cdRef.markForCheck();
128
- });
129
- }
130
- tabChange(event) {
131
- switch (event.tab.textLabel) {
132
- case 'SMS Message':
133
- this.tab = 'sms';
134
- break;
135
- case 'Email Message':
136
- this.tab = 'email';
137
- break;
138
- default:
139
- this.tab = null;
140
- }
141
- }
142
- openPreview() {
143
- let html = this.message.emailMessage.body;
144
- let styles = this.message.emailMessage.styles;
145
- if (this.message.emailMessage.messageTemplateId) {
146
- const messageTemplate = this.messageTemplates
147
- .find((item) => {
148
- return this.message.emailMessage.messageTemplateId === item.id;
149
- });
150
- if (messageTemplate) {
151
- html = messageTemplate.content.replace('{$content}', html);
152
- styles = messageTemplate.styles.concat(styles);
153
- }
154
- }
155
- this._dialog.open(PreviewComponent, {
156
- data: {
157
- styles,
158
- html,
159
- },
160
- width: '95%'
161
- });
162
- }
163
- sendTest(type) {
164
- of(true)
165
- .pipe(switchMap(() => {
166
- return type === 'email' ? this._config.getTestEmail() : of('');
167
- }), switchMap((default_) => {
168
- const typeName = type === 'email' ? 'an email' : 'phone number';
169
- return this._prompt.input({
170
- label: `Please enter ${typeName} to send test to`,
171
- title: 'Send Test',
172
- commitLabel: 'Send',
173
- default: default_,
174
- required: true
175
- });
176
- }))
177
- .subscribe((value) => {
178
- this._config.testMessage(this.message, value, type)
179
- .subscribe(() => {
180
- this._message.success('Test Sent');
181
- });
182
- });
183
- }
184
- }
185
- MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessageComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1$1.FsPrompt }, { token: i2$1.FsMessage }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
186
- MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessageComponent, selector: "ng-component", ngImport: i0, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"message\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"message\">\n <div mat-dialog-title>Edit Message</div>\n <mat-dialog-content>\n\n <mat-tab-group (selectedTabChange)=\"tabChange($event)\">\n <mat-tab label=\"General\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"message.name\"\n name=\"Name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n placeholder=\"Description\"\n [(ngModel)]=\"message.description\"\n name=\"description\">\n </mat-form-field>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Email\"\n [(ngModel)]=\"message.emailMessage.fromEmail\"\n name=\"from_email\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Name\"\n [(ngModel)]=\"message.emailMessage.fromName\"\n name=\"from_name\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Reply To\"\n [(ngModel)]=\"message.emailMessage.replyTo\"\n name=\"reply_to\">\n </mat-form-field>\n </div>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"To\"\n [(ngModel)]=\"message.emailMessage.toRecipients\"\n name=\"to\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"CC\"\n [(ngModel)]=\"message.emailMessage.ccRecipients\"\n name=\"cc\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"BCC\"\n [(ngModel)]=\"message.emailMessage.bccRecipients\"\n name=\"bcc\">\n </mat-form-field>\n </div>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Email Message\" *ngIf=\"message.emailMessage\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <div fxLayout=\"row\" fxLayoutGap=\"10px\">\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.emailMessage.customize\"\n name=\"customizeEmail\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Format\"\n [(ngModel)]=\"message.emailMessage.format\"\n name=\"format\">\n <mat-option *ngFor=\"let item of emailMessageFormats\" [value]=\"item.value\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n placeholder=\"Template\"\n [(ngModel)]=\"message.emailMessage.messageTemplateId\"\n name=\"template\">\n <mat-option [value]=\"null\">None</mat-option>\n <mat-option *ngFor=\"let item of messageTemplates\" [value]=\"item.id\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container *ngIf=\"message.emailMessage.customize\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Subject\"\n [(ngModel)]=\"message.emailMessage.subject\"\n name=\"name\"\n required>\n </mat-form-field>\n\n <div [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\"\n [config]=\"{ language: 'html '}\">\n </fs-text-editor>\n\n <fs-html-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\">\n </fs-html-editor>\n\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"emailMessageBody\"\n [config]=\"{ language: 'text' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML || message.emailMessage.format===emailMessageFormat.RichText\"\n label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.emailMessage.styles\"\n name=\"styles\"\n [config]=\"{ language: 'scss' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n\n </ng-container>\n\n <ng-container *ngIf=\"!message.emailMessage.customize\">\n <fs-label-field>\n <fs-label>Subject</fs-label>\n {{message.defaultEmailSubject}}\n </fs-label-field>\n <div>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"email-body-html-default\">\n <fs-html-renderer\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText || message.emailMessage.format===emailMessageFormat.HTML\"\n [html]=\"message.defaultEmailBody\">\n </fs-html-renderer>\n </div>\n <div\n class=\"email-body-text-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\">\n {{message.defaultEmailBody}}\n </div>\n </fs-label-field>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"SMS Message\" *ngIf=\"message.smsMessage\">\n <ng-template matTabContent>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.smsMessage.customize\"\n name=\"customizeSms\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <div\n *ngIf=\"message.smsMessage.customize\"\n [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.smsMessage.message\"\n name=\"smsMessageMessage\"\n [config]=\"{ language: 'text '}\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n <fs-label-field *ngIf=\"!message.smsMessage.customize\">\n <fs-label>Message</fs-label>\n {{message.defaultSmsMessage}}\n </fs-label-field>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Variables\" *ngIf=\"message.variables\">\n <ng-template matTabContent>\n <div *ngFor=\"let variable of message.variables\" class=\"variable\">\n {{variable.name}}\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Defaults\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"message.emailMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">Email</h2>\n <fs-label-field>\n <fs-label>Subject</fs-label>\n <div class=\"content\">{{message.defaultEmailSubject}}</div>\n </fs-label-field>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultEmailBody}}</div>\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"message.smsMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">SMS</h2>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultSmsMessage}}</div>\n </fs-label-field>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\">Save</button>\n <button\n *ngIf=\"tab==='email' && message.emailMessage.format===emailMessageFormat.HTML\"\n mat-button\n type=\"button\"\n (click)=\"openPreview()\"\n type=\"button\">\n Preview\n </button>\n <button\n *ngIf=\"tab==='email'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('email')\"\n type=\"button\">\n Send Test Email\n </button>\n <button\n *ngIf=\"tab==='sms'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('sms')\"\n type=\"button\">\n Send Test SMS\n </button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["fs-label-field .content{white-space:pre-wrap}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}:host ::ng-deep .sms-message{width:100%}:host ::ng-deep .email-body-text-default{white-space:pre-line}.email-body-text{width:100%}.variable{margin-bottom:4px}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i10.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i6$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6$1.FsLabelComponent, selector: "fs-label" }, { type: i10.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i13.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i14.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i14.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i14.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5.MatTabContent, selector: "[matTabContent]" }, { type: i17.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i18.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i15.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i17.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i17.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i16.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessageComponent, decorators: [{
188
- type: Component,
189
- args: [{
190
- templateUrl: './message.component.html',
191
- styleUrls: ['./message.component.scss'],
192
- changeDetection: ChangeDetectionStrategy.OnPush,
193
- }]
194
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
195
- type: Inject,
196
- args: [FS_APP_MESSAGE_CONFIG]
197
- }] }, { type: undefined, decorators: [{
198
- type: Inject,
199
- args: [MAT_DIALOG_DATA]
200
- }] }, { type: i1$1.FsPrompt }, { type: i2$1.FsMessage }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }]; } });
98
+ class AttachmentsComponent {
99
+ constructor(_config, _message) {
100
+ this._config = _config;
101
+ this._message = _message;
102
+ this.list = null;
103
+ this.config = null;
104
+ this._destroy$ = new Subject();
105
+ }
106
+ ngOnInit() {
107
+ this.config = {
108
+ rowActions: [],
109
+ actions: [
110
+ {
111
+ label: 'Upload',
112
+ mode: ActionMode.File,
113
+ select: (fsFile) => {
114
+ this._config.uploadMessageAttachment(this.message, fsFile)
115
+ .subscribe(() => {
116
+ this._message.success('Saved attachment');
117
+ this.list.reload();
118
+ });
119
+ }
120
+ }
121
+ ],
122
+ fetch: query => {
123
+ return this._config.loadMessageAttachments(this.message, query);
124
+ }
125
+ };
126
+ if (this._config.downloadMessageAttachment) {
127
+ this.config.rowActions = [
128
+ {
129
+ click: data => {
130
+ return this._config.downloadMessageAttachment(data);
131
+ },
132
+ label: 'Download',
133
+ },
134
+ ];
135
+ }
136
+ if (this._config.deleteMessageAttachment) {
137
+ this.config.rowActions = [
138
+ {
139
+ click: data => {
140
+ return this._config.deleteMessageAttachment(data);
141
+ },
142
+ remove: {
143
+ title: 'Confirm',
144
+ template: 'Are you sure you would like to delete this template?',
145
+ },
146
+ label: 'Delete',
147
+ },
148
+ ];
149
+ }
150
+ }
151
+ ngOnDestroy() {
152
+ this._destroy$.next();
153
+ this._destroy$.complete();
154
+ }
155
+ }
156
+ AttachmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AttachmentsComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
157
+ AttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AttachmentsComponent, selector: "fs-app-message-attachments", inputs: { message: "message" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"File Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.filename}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"File Size\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.size | fsFormatBytes}}\n </ng-template>\n </fs-list-column>\n</fs-list>", components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsFormatBytes": i3$1.FsFormatBytesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AttachmentsComponent, decorators: [{
159
+ type: Component,
160
+ args: [{
161
+ selector: 'fs-app-message-attachments',
162
+ templateUrl: './attachments.component.html',
163
+ changeDetection: ChangeDetectionStrategy.OnPush,
164
+ }]
165
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
166
+ type: Inject,
167
+ args: [FS_APP_MESSAGE_CONFIG]
168
+ }] }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
169
+ type: ViewChild,
170
+ args: [FsListComponent, { static: true }]
171
+ }], message: [{
172
+ type: Input
173
+ }] } });
201
174
 
202
- function indexNameValue(arry) {
203
- const obj = {};
204
- arry.forEach(item => {
205
- obj[item.value] = item.name;
206
- });
207
- return obj;
208
- }
175
+ class MessageComponent {
176
+ constructor(_config, _data, _prompt, _message, _dialog, _cdRef) {
177
+ this._config = _config;
178
+ this._data = _data;
179
+ this._prompt = _prompt;
180
+ this._message = _message;
181
+ this._dialog = _dialog;
182
+ this._cdRef = _cdRef;
183
+ this.tab = 'general';
184
+ this.messageTemplates = [];
185
+ this.emailMessageFormats = EmailMessageFormats;
186
+ this.emailMessageFormat = EmailMessageFormat;
187
+ this.save = () => {
188
+ return this._config.saveMessage(this.message)
189
+ .pipe(tap(() => {
190
+ this._message.success('Saved Changes');
191
+ }));
192
+ };
193
+ }
194
+ ngOnInit() {
195
+ this._config.loadMessage(this._data.message)
196
+ .subscribe((response) => {
197
+ this.message = response;
198
+ if (this.message.emailMessage && this.message.emailMessage.customize === undefined) {
199
+ this.message.emailMessage.customize = true;
200
+ }
201
+ if (this.message.smsMessage && this.message.smsMessage.customize === undefined) {
202
+ this.message.smsMessage.customize = true;
203
+ }
204
+ this._cdRef.markForCheck();
205
+ });
206
+ this._config.loadMessageTemplates()
207
+ .subscribe((data) => {
208
+ this.messageTemplates = data.data;
209
+ this._cdRef.markForCheck();
210
+ });
211
+ }
212
+ openPreview() {
213
+ let html = this.message.emailMessage.body;
214
+ let styles = this.message.emailMessage.styles;
215
+ if (this.message.emailMessage.messageTemplateId) {
216
+ const messageTemplate = this.messageTemplates
217
+ .find((item) => {
218
+ return this.message.emailMessage.messageTemplateId === item.id;
219
+ });
220
+ if (messageTemplate) {
221
+ html = messageTemplate.content.replace('{$content}', html);
222
+ styles = messageTemplate.styles.concat(styles);
223
+ }
224
+ }
225
+ this._dialog.open(PreviewComponent, {
226
+ data: {
227
+ styles,
228
+ html,
229
+ },
230
+ width: '95%'
231
+ });
232
+ }
233
+ sendTest(type) {
234
+ of(true)
235
+ .pipe(switchMap(() => {
236
+ return type === 'email' ? this._config.getTestEmail() : of('');
237
+ }), switchMap((default_) => {
238
+ const typeName = type === 'email' ? 'an email' : 'phone number';
239
+ return this._prompt.input({
240
+ label: `Please enter ${typeName} to send test to`,
241
+ title: 'Send Test',
242
+ commitLabel: 'Send',
243
+ default: default_,
244
+ required: true
245
+ });
246
+ }))
247
+ .subscribe((value) => {
248
+ this._config.testMessage(this.message, value, type)
249
+ .subscribe(() => {
250
+ this._message.success('Test Sent');
251
+ });
252
+ });
253
+ }
254
+ }
255
+ MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessageComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1$2.FsPrompt }, { token: i1$1.FsMessage }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
256
+ MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessageComponent, selector: "ng-component", ngImport: i0, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"message\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"message\">\n <div mat-dialog-title>Edit Message</div>\n <mat-dialog-content>\n <mat-tab-group \n fsTabs \n [(selectedName)]=\"tab\">\n <mat-tab label=\"General\" name=\"general\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"message.name\"\n name=\"Name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n placeholder=\"Description\"\n [(ngModel)]=\"message.description\"\n name=\"description\">\n </mat-form-field>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Email\"\n [(ngModel)]=\"message.emailMessage.fromEmail\"\n name=\"from_email\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Name\"\n [(ngModel)]=\"message.emailMessage.fromName\"\n name=\"from_name\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Reply To\"\n [(ngModel)]=\"message.emailMessage.replyTo\"\n name=\"reply_to\">\n </mat-form-field>\n </div>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"To\"\n [(ngModel)]=\"message.emailMessage.toRecipients\"\n name=\"to\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"CC\"\n [(ngModel)]=\"message.emailMessage.ccRecipients\"\n name=\"cc\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"BCC\"\n [(ngModel)]=\"message.emailMessage.bccRecipients\"\n name=\"bcc\">\n </mat-form-field>\n </div>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Email Message\" *ngIf=\"message.emailMessage\" name=\"email\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <div fxLayout=\"row\" fxLayoutGap=\"10px\">\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.emailMessage.customize\"\n name=\"customizeEmail\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Format\"\n [(ngModel)]=\"message.emailMessage.format\"\n name=\"format\">\n <mat-option *ngFor=\"let item of emailMessageFormats\" [value]=\"item.value\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n placeholder=\"Template\"\n [(ngModel)]=\"message.emailMessage.messageTemplateId\"\n name=\"template\">\n <mat-option [value]=\"null\">None</mat-option>\n <mat-option *ngFor=\"let item of messageTemplates\" [value]=\"item.id\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container *ngIf=\"message.emailMessage.customize\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Subject\"\n [(ngModel)]=\"message.emailMessage.subject\"\n name=\"name\"\n required>\n </mat-form-field>\n\n <div [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\"\n [config]=\"{ language: 'html '}\">\n </fs-text-editor>\n\n <fs-html-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\">\n </fs-html-editor>\n\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"emailMessageBody\"\n [config]=\"{ language: 'text' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML || message.emailMessage.format===emailMessageFormat.RichText\"\n label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.emailMessage.styles\"\n name=\"styles\"\n [config]=\"{ language: 'scss' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!message.emailMessage.customize\">\n <fs-label-field>\n <fs-label>Subject</fs-label>\n {{message.defaultEmailSubject}}\n </fs-label-field>\n <div>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"email-body-html-default\">\n <fs-html-renderer\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText || message.emailMessage.format===emailMessageFormat.HTML\"\n [html]=\"message.defaultEmailBody\">\n </fs-html-renderer>\n </div>\n <div\n class=\"email-body-text-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\">\n {{message.defaultEmailBody}}\n </div>\n </fs-label-field>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </mat-tab>\n\n <ng-container *ngIf=\"!!message.smsMessage\">\n <mat-tab label=\"SMS Message\" name=\"sms\">\n <ng-template matTabContent>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.smsMessage.customize\"\n name=\"customizeSms\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <div\n *ngIf=\"message.smsMessage.customize\"\n [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.smsMessage.message\"\n name=\"smsMessageMessage\"\n [config]=\"{ language: 'text '}\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n <fs-label-field *ngIf=\"!message.smsMessage.customize\">\n <fs-label>Message</fs-label>\n {{message.defaultSmsMessage}}\n </fs-label-field>\n </ng-template>\n </mat-tab>\n </ng-container>\n\n <mat-tab label=\"Attachments\" *ngIf=\"message.emailMessage\" name=\"attachments\">\n <ng-template matTabContent>\n <fs-app-message-attachments \n [message]=\"message\">\n </fs-app-message-attachments>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Variables\" *ngIf=\"message.variables\">\n <ng-template matTabContent>\n <div *ngFor=\"let variable of message.variables\" class=\"variable\">\n {{variable.name}}\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Defaults\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"message.emailMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">Email</h2>\n <fs-label-field>\n <fs-label>Subject</fs-label>\n <div class=\"content\">{{message.defaultEmailSubject}}</div>\n </fs-label-field>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultEmailBody}}</div>\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"message.smsMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">SMS</h2>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultSmsMessage}}</div>\n </fs-label-field>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"tab==='email' || tab==='sms' || tab==='general'; else done\">\n <button \n mat-button \n color=\"primary\">\n Save\n </button> \n <button\n *ngIf=\"tab==='email' && message.emailMessage.format===emailMessageFormat.HTML\"\n mat-button\n type=\"button\"\n (click)=\"openPreview()\"\n type=\"button\">\n Preview\n </button>\n <button\n *ngIf=\"tab==='email'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('email')\"\n type=\"button\">\n Send Test Email\n </button>\n <button\n *ngIf=\"tab==='sms'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('sms')\"\n type=\"button\">\n Send Test SMS\n </button>\n <button \n mat-button \n [mat-dialog-close]=\"null\" \n type=\"button\">\n Cancel\n </button>\n </ng-container> \n <ng-template #done>\n <button \n mat-button \n color=\"primary\"\n [mat-dialog-close]=\"null\" \n type=\"button\">\n Close\n </button>\n </ng-template>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["fs-label-field .content{white-space:pre-wrap}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}:host ::ng-deep .sms-message{width:100%}:host ::ng-deep .email-body-text-default{white-space:pre-line}.email-body-text{width:100%}.variable{margin-bottom:4px}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i10.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i6$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6$1.FsLabelComponent, selector: "fs-label" }, { type: i10.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }, { type: AttachmentsComponent, selector: "fs-app-message-attachments", inputs: ["message"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i14.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i15.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i15.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i15.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i16.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i18.FsTabsHeaderTabGroupDirective, selector: "mat-tab-group, matTabGroup, [matTabGroup]", inputs: ["orientation", "selectedName"], outputs: ["selectedNameChange"], exportAs: ["fsTabsHeaderTabGroup"] }, { type: i18.FsTabsTabDirective, selector: "mat-tab,matTab", inputs: ["name"], exportAs: ["fsTabsTab"] }, { type: i5.MatTabContent, selector: "[matTabContent]" }, { type: i19.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i20.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i15.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i15.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i15.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i15.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i16.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i19.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i19.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i17.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessageComponent, decorators: [{
258
+ type: Component,
259
+ args: [{
260
+ templateUrl: './message.component.html',
261
+ styleUrls: ['./message.component.scss'],
262
+ changeDetection: ChangeDetectionStrategy.OnPush,
263
+ }]
264
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
265
+ type: Inject,
266
+ args: [FS_APP_MESSAGE_CONFIG]
267
+ }] }, { type: undefined, decorators: [{
268
+ type: Inject,
269
+ args: [MAT_DIALOG_DATA]
270
+ }] }, { type: i1$2.FsPrompt }, { type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }]; } });
209
271
 
210
- class MessagesComponent {
211
- constructor(_config, _dialog) {
212
- this._config = _config;
213
- this._dialog = _dialog;
214
- this.list = null;
215
- this.config = null;
216
- this.emailMessageFormats = {};
217
- this._destroy$ = new Subject();
218
- }
219
- ngOnInit() {
220
- this.emailMessageFormats = indexNameValue(EmailMessageFormats);
221
- this.config = {
222
- filters: [
223
- {
224
- name: 'keyword',
225
- type: ItemType.Keyword,
226
- label: 'Search'
227
- }
228
- ],
229
- fetch: query => {
230
- return this._config.loadMessages(query)
231
- .pipe(map(response => {
232
- return ({ data: response.data, paging: response.paging });
233
- }));
234
- }
235
- };
236
- }
237
- open(message) {
238
- const dialogRef = this._dialog.open(MessageComponent, {
239
- data: {
240
- message: message,
241
- },
242
- width: '85%'
243
- });
244
- dialogRef.afterClosed()
245
- .pipe(takeUntil(this._destroy$))
246
- .subscribe(() => {
247
- this.list.reload();
248
- });
249
- }
250
- ngOnDestroy() {
251
- this._destroy$.next();
252
- this._destroy$.complete();
253
- }
272
+ function indexNameValue(arry) {
273
+ const obj = {};
274
+ arry.forEach(item => {
275
+ obj[item.value] = item.name;
276
+ });
277
+ return obj;
254
278
  }
255
- MessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessagesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
256
- MessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessagesComponent, selector: "fs-app-messages", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\" name=\"name\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Email Format\">\n <ng-template fs-list-cell let-row=\"row\">\n {{emailMessageFormats[row.emailMessage.format]}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Email Message Template\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.emailMessage.messageTemplate?.name || 'None'}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Customized Message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessage?.customize || row.smsMessage?.customize; else noCustomize\">\n <ng-container *ngIf=\"row.emailMessage?.customize\">\n {{row.emailMessage.customize ? 'Email' : ''}}\n </ng-container> \n <ng-container *ngIf=\"row.smsMessage?.customize\">\n {{row.smsMessage.customize ? 'SMS' : ''}}\n </ng-container> \n </ng-container>\n <ng-template #noCustomize>\n None\n </ng-template>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessagesComponent, decorators: [{
258
- type: Component,
259
- args: [{
260
- selector: 'fs-app-messages',
261
- templateUrl: './messages.component.html'
262
- }]
263
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
264
- type: Inject,
265
- args: [FS_APP_MESSAGE_CONFIG]
266
- }] }, { type: i1.MatDialog }]; }, propDecorators: { list: [{
267
- type: ViewChild,
268
- args: [FsListComponent, { static: true }]
279
+
280
+ class MessagesComponent {
281
+ constructor(_config, _dialog) {
282
+ this._config = _config;
283
+ this._dialog = _dialog;
284
+ this.list = null;
285
+ this.config = null;
286
+ this.emailMessageFormats = {};
287
+ this._destroy$ = new Subject();
288
+ }
289
+ ngOnInit() {
290
+ this.emailMessageFormats = indexNameValue(EmailMessageFormats);
291
+ this.config = {
292
+ filters: [
293
+ {
294
+ name: 'keyword',
295
+ type: ItemType.Keyword,
296
+ label: 'Search'
297
+ }
298
+ ],
299
+ fetch: query => {
300
+ return this._config.loadMessages(query)
301
+ .pipe(map(response => {
302
+ return ({ data: response.data, paging: response.paging });
303
+ }));
304
+ }
305
+ };
306
+ }
307
+ open(message) {
308
+ const dialogRef = this._dialog.open(MessageComponent, {
309
+ data: {
310
+ message: message,
311
+ },
312
+ width: '85%'
313
+ });
314
+ dialogRef.afterClosed()
315
+ .pipe(takeUntil(this._destroy$))
316
+ .subscribe(() => {
317
+ this.list.reload();
318
+ });
319
+ }
320
+ ngOnDestroy() {
321
+ this._destroy$.next();
322
+ this._destroy$.complete();
323
+ }
324
+ }
325
+ MessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessagesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
326
+ MessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessagesComponent, selector: "fs-app-messages", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\" name=\"name\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Email Format\">\n <ng-template fs-list-cell let-row=\"row\">\n {{emailMessageFormats[row.emailMessage.format]}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Email Message Template\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.emailMessage.messageTemplate?.name || 'None'}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Customized Message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessage?.customize || row.smsMessage?.customize; else noCustomize\">\n <ng-container *ngIf=\"row.emailMessage?.customize\">\n {{row.emailMessage.customize ? 'Email' : ''}}\n </ng-container> \n <ng-container *ngIf=\"row.smsMessage?.customize\">\n {{row.smsMessage.customize ? 'SMS' : ''}}\n </ng-container> \n </ng-container>\n <ng-template #noCustomize>\n None\n </ng-template>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MessagesComponent, decorators: [{
328
+ type: Component,
329
+ args: [{
330
+ selector: 'fs-app-messages',
331
+ templateUrl: './messages.component.html'
332
+ }]
333
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
334
+ type: Inject,
335
+ args: [FS_APP_MESSAGE_CONFIG]
336
+ }] }, { type: i1.MatDialog }]; }, propDecorators: { list: [{
337
+ type: ViewChild,
338
+ args: [FsListComponent, { static: true }]
269
339
  }] } });
270
340
 
271
- class FsAppMessagePreviewModule {
272
- }
273
- FsAppMessagePreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
274
- FsAppMessagePreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, declarations: [PreviewComponent], imports: [MatDialogModule,
275
- MatButtonModule,
276
- FsDialogModule,
277
- FsIFrameModule], exports: [PreviewComponent] });
278
- FsAppMessagePreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, imports: [[
279
- MatDialogModule,
280
- MatButtonModule,
281
- FsDialogModule,
282
- FsIFrameModule,
283
- ]] });
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, decorators: [{
285
- type: NgModule,
286
- args: [{
287
- imports: [
288
- MatDialogModule,
289
- MatButtonModule,
290
- FsDialogModule,
291
- FsIFrameModule,
292
- ],
293
- declarations: [
294
- PreviewComponent,
295
- ],
296
- exports: [
297
- PreviewComponent,
298
- ]
299
- }]
341
+ class FsAppMessagePreviewModule {
342
+ }
343
+ FsAppMessagePreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
344
+ FsAppMessagePreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, declarations: [PreviewComponent], imports: [MatDialogModule,
345
+ MatButtonModule,
346
+ FsDialogModule,
347
+ FsIFrameModule], exports: [PreviewComponent] });
348
+ FsAppMessagePreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, imports: [[
349
+ MatDialogModule,
350
+ MatButtonModule,
351
+ FsDialogModule,
352
+ FsIFrameModule,
353
+ ]] });
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagePreviewModule, decorators: [{
355
+ type: NgModule,
356
+ args: [{
357
+ imports: [
358
+ MatDialogModule,
359
+ MatButtonModule,
360
+ FsDialogModule,
361
+ FsIFrameModule,
362
+ ],
363
+ declarations: [
364
+ PreviewComponent,
365
+ ],
366
+ exports: [
367
+ PreviewComponent,
368
+ ]
369
+ }]
300
370
  }] });
301
371
 
302
- class FsAppMessagesModule {
303
- }
304
- FsAppMessagesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
305
- FsAppMessagesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, declarations: [MessagesComponent,
306
- MessageComponent], imports: [RouterModule,
307
- CommonModule,
308
- FormsModule,
309
- MatDialogModule,
310
- MatButtonModule,
311
- MatTabsModule,
312
- MatFormFieldModule,
313
- MatInputModule,
314
- MatOptionModule,
315
- MatSelectModule,
316
- MatTooltipModule,
317
- MatCheckboxModule,
318
- FsDialogModule,
319
- FsListModule,
320
- FsLabelModule,
321
- FlexLayoutModule,
322
- FsSkeletonModule,
323
- FsFormModule,
324
- FsTextEditorModule,
325
- FsHtmlEditorModule,
326
- FsHtmlRendererModule,
327
- FsAppMessagePreviewModule], exports: [MessagesComponent,
328
- MessageComponent] });
329
- FsAppMessagesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, imports: [[
330
- RouterModule,
331
- CommonModule,
332
- FormsModule,
333
- MatDialogModule,
334
- MatButtonModule,
335
- MatTabsModule,
336
- MatFormFieldModule,
337
- MatInputModule,
338
- MatOptionModule,
339
- MatSelectModule,
340
- MatTooltipModule,
341
- MatCheckboxModule,
342
- FsDialogModule,
343
- FsListModule,
344
- FsLabelModule,
345
- FlexLayoutModule,
346
- FsSkeletonModule,
347
- FsFormModule,
348
- FsTextEditorModule,
349
- FsHtmlEditorModule,
350
- FsHtmlRendererModule,
351
- FsAppMessagePreviewModule,
352
- ]] });
353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, decorators: [{
354
- type: NgModule,
355
- args: [{
356
- imports: [
357
- RouterModule,
358
- CommonModule,
359
- FormsModule,
360
- MatDialogModule,
361
- MatButtonModule,
362
- MatTabsModule,
363
- MatFormFieldModule,
364
- MatInputModule,
365
- MatOptionModule,
366
- MatSelectModule,
367
- MatTooltipModule,
368
- MatCheckboxModule,
369
- FsDialogModule,
370
- FsListModule,
371
- FsLabelModule,
372
- FlexLayoutModule,
373
- FsSkeletonModule,
374
- FsFormModule,
375
- FsTextEditorModule,
376
- FsHtmlEditorModule,
377
- FsHtmlRendererModule,
378
- FsAppMessagePreviewModule,
379
- ],
380
- declarations: [
381
- MessagesComponent,
382
- MessageComponent,
383
- ],
384
- exports: [
385
- MessagesComponent,
386
- MessageComponent,
387
- ],
388
- }]
372
+ class FsAppMessagesModule {
373
+ }
374
+ FsAppMessagesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
375
+ FsAppMessagesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, declarations: [MessagesComponent,
376
+ MessageComponent,
377
+ AttachmentsComponent], imports: [RouterModule,
378
+ CommonModule,
379
+ FormsModule,
380
+ MatDialogModule,
381
+ MatButtonModule,
382
+ MatTabsModule,
383
+ MatFormFieldModule,
384
+ MatInputModule,
385
+ MatOptionModule,
386
+ MatSelectModule,
387
+ MatTooltipModule,
388
+ MatCheckboxModule,
389
+ FsDialogModule,
390
+ FsListModule,
391
+ FsLabelModule,
392
+ FlexLayoutModule,
393
+ FsSkeletonModule,
394
+ FsFormModule,
395
+ FsTextEditorModule,
396
+ FsHtmlEditorModule,
397
+ FsHtmlRendererModule,
398
+ FsCommonModule,
399
+ FsTabsModule,
400
+ FsAppMessagePreviewModule], exports: [MessagesComponent,
401
+ MessageComponent] });
402
+ FsAppMessagesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, imports: [[
403
+ RouterModule,
404
+ CommonModule,
405
+ FormsModule,
406
+ MatDialogModule,
407
+ MatButtonModule,
408
+ MatTabsModule,
409
+ MatFormFieldModule,
410
+ MatInputModule,
411
+ MatOptionModule,
412
+ MatSelectModule,
413
+ MatTooltipModule,
414
+ MatCheckboxModule,
415
+ FsDialogModule,
416
+ FsListModule,
417
+ FsLabelModule,
418
+ FlexLayoutModule,
419
+ FsSkeletonModule,
420
+ FsFormModule,
421
+ FsTextEditorModule,
422
+ FsHtmlEditorModule,
423
+ FsHtmlRendererModule,
424
+ FsCommonModule,
425
+ FsTabsModule,
426
+ FsAppMessagePreviewModule,
427
+ ]] });
428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessagesModule, decorators: [{
429
+ type: NgModule,
430
+ args: [{
431
+ imports: [
432
+ RouterModule,
433
+ CommonModule,
434
+ FormsModule,
435
+ MatDialogModule,
436
+ MatButtonModule,
437
+ MatTabsModule,
438
+ MatFormFieldModule,
439
+ MatInputModule,
440
+ MatOptionModule,
441
+ MatSelectModule,
442
+ MatTooltipModule,
443
+ MatCheckboxModule,
444
+ FsDialogModule,
445
+ FsListModule,
446
+ FsLabelModule,
447
+ FlexLayoutModule,
448
+ FsSkeletonModule,
449
+ FsFormModule,
450
+ FsTextEditorModule,
451
+ FsHtmlEditorModule,
452
+ FsHtmlRendererModule,
453
+ FsCommonModule,
454
+ FsTabsModule,
455
+ FsAppMessagePreviewModule,
456
+ ],
457
+ declarations: [
458
+ MessagesComponent,
459
+ MessageComponent,
460
+ AttachmentsComponent,
461
+ ],
462
+ exports: [
463
+ MessagesComponent,
464
+ MessageComponent,
465
+ ],
466
+ }]
389
467
  }] });
390
468
 
391
- var MessageQueueState;
392
- (function (MessageQueueState) {
393
- MessageQueueState["Sent"] = "S";
394
- MessageQueueState["PartiallySent"] = "P";
395
- MessageQueueState["Sending"] = "E";
396
- MessageQueueState["Queued"] = "Q";
397
- MessageQueueState["Canceled"] = "C";
398
- MessageQueueState["InvalidRecipients"] = "I";
399
- MessageQueueState["Failed"] = "F";
469
+ var MessageQueueState;
470
+ (function (MessageQueueState) {
471
+ MessageQueueState["Sent"] = "S";
472
+ MessageQueueState["PartiallySent"] = "P";
473
+ MessageQueueState["Sending"] = "E";
474
+ MessageQueueState["Queued"] = "Q";
475
+ MessageQueueState["Canceled"] = "C";
476
+ MessageQueueState["InvalidRecipients"] = "I";
477
+ MessageQueueState["Failed"] = "F";
400
478
  })(MessageQueueState || (MessageQueueState = {}));
401
479
 
402
- const MessageQueueStates = [
403
- { name: 'Sent', value: MessageQueueState.Sent },
404
- { name: 'Partially Sent', value: MessageQueueState.PartiallySent },
405
- { name: 'Sending', value: MessageQueueState.Sending },
406
- { name: 'Queued', value: MessageQueueState.Queued },
407
- { name: 'Canceled', value: MessageQueueState.Canceled },
408
- { name: 'Invalid Recipients', value: MessageQueueState.InvalidRecipients },
409
- { name: 'Failed', value: MessageQueueState.Failed }
480
+ const MessageQueueStates = [
481
+ { name: 'Sent', value: MessageQueueState.Sent },
482
+ { name: 'Partially Sent', value: MessageQueueState.PartiallySent },
483
+ { name: 'Sending', value: MessageQueueState.Sending },
484
+ { name: 'Queued', value: MessageQueueState.Queued },
485
+ { name: 'Canceled', value: MessageQueueState.Canceled },
486
+ { name: 'Invalid Recipients', value: MessageQueueState.InvalidRecipients },
487
+ { name: 'Failed', value: MessageQueueState.Failed }
410
488
  ];
411
489
 
412
- var EmailMessageQueueFormat;
413
- (function (EmailMessageQueueFormat) {
414
- EmailMessageQueueFormat["Text"] = "T";
415
- EmailMessageQueueFormat["HTML"] = "H";
416
- EmailMessageQueueFormat["RichText"] = "R";
490
+ var EmailMessageQueueFormat;
491
+ (function (EmailMessageQueueFormat) {
492
+ EmailMessageQueueFormat["Text"] = "T";
493
+ EmailMessageQueueFormat["HTML"] = "H";
494
+ EmailMessageQueueFormat["RichText"] = "R";
417
495
  })(EmailMessageQueueFormat || (EmailMessageQueueFormat = {}));
418
496
 
419
- var MessageQueueType;
420
- (function (MessageQueueType) {
421
- MessageQueueType["Sms"] = "S";
422
- MessageQueueType["Email"] = "E";
497
+ var MessageQueueType;
498
+ (function (MessageQueueType) {
499
+ MessageQueueType["Sms"] = "S";
500
+ MessageQueueType["Email"] = "E";
423
501
  })(MessageQueueType || (MessageQueueType = {}));
424
502
 
425
- var MessageQueueEventType;
426
- (function (MessageQueueEventType) {
427
- MessageQueueEventType["Click"] = "click";
428
- MessageQueueEventType["Open"] = "open";
503
+ var MessageQueueEventType;
504
+ (function (MessageQueueEventType) {
505
+ MessageQueueEventType["Click"] = "click";
506
+ MessageQueueEventType["Open"] = "open";
429
507
  })(MessageQueueEventType || (MessageQueueEventType = {}));
430
508
 
431
- const MessageQueueEventTypes = [
432
- { name: 'Open', value: MessageQueueEventType.Open },
433
- { name: 'Click', value: MessageQueueEventType.Click },
509
+ const MessageQueueEventTypes = [
510
+ { name: 'Open', value: MessageQueueEventType.Open },
511
+ { name: 'Click', value: MessageQueueEventType.Click },
434
512
  ];
435
513
 
436
- class RecipientComponent {
437
- ngOnInit() {
438
- const icons = {
439
- 'S': { name: 'check_circle', tooltip: 'Sent' },
440
- 'E': { name: 'offline_bolt', tooltip: 'Sending' },
441
- 'F': { name: 'info', tooltip: 'Failed' },
442
- };
443
- this.icon = icons[this.state];
444
- }
445
- }
446
- RecipientComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RecipientComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
447
- RecipientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: RecipientComponent, selector: "app-recipient", inputs: { name: "name", state: "state" }, ngImport: i0, template: "<span class=\"recipient\">\n <span class=\"name\">{{name}}</span>\n <mat-icon *ngIf=\"icon\" [class]=\"'state-' + state\" [matTooltip]=\"icon.tooltip\">{{icon.name}}</mat-icon>\n</span>", styles: ["mat-icon{font-size:14px;width:14px;height:14px;line-height:normal;margin-left:2px}mat-icon.state-S{color:#5fa099}mat-icon.state-E{color:#fbbc04}mat-icon.state-F{color:#d8524e}.recipient{display:inline-flex;align-items:center}\n"], components: [{ type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
448
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RecipientComponent, decorators: [{
449
- type: Component,
450
- args: [{
451
- selector: 'app-recipient',
452
- templateUrl: './recipient.component.html',
453
- styleUrls: ['./recipient.component.scss'],
454
- }]
455
- }], propDecorators: { name: [{
456
- type: Input
457
- }], state: [{
458
- type: Input
514
+ class RecipientComponent {
515
+ ngOnInit() {
516
+ const icons = {
517
+ 'S': { name: 'check_circle', tooltip: 'Sent' },
518
+ 'E': { name: 'offline_bolt', tooltip: 'Sending' },
519
+ 'F': { name: 'info', tooltip: 'Failed' },
520
+ };
521
+ this.icon = icons[this.state];
522
+ }
523
+ }
524
+ RecipientComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RecipientComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
525
+ RecipientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: RecipientComponent, selector: "app-recipient", inputs: { name: "name", state: "state" }, ngImport: i0, template: "<span class=\"recipient\">\n <span class=\"name\">{{name}}</span>\n <mat-icon *ngIf=\"icon\" [class]=\"'state-' + state\" [matTooltip]=\"icon.tooltip\">{{icon.name}}</mat-icon>\n</span>", styles: ["mat-icon{font-size:14px;width:14px;height:14px;line-height:normal;margin-left:2px}mat-icon.state-S{color:#5fa099}mat-icon.state-E{color:#fbbc04}mat-icon.state-F{color:#d8524e}.recipient{display:inline-flex;align-items:center}\n"], components: [{ type: i1$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RecipientComponent, decorators: [{
527
+ type: Component,
528
+ args: [{
529
+ selector: 'app-recipient',
530
+ templateUrl: './recipient.component.html',
531
+ styleUrls: ['./recipient.component.scss'],
532
+ changeDetection: ChangeDetectionStrategy.OnPush,
533
+ }]
534
+ }], propDecorators: { name: [{
535
+ type: Input
536
+ }], state: [{
537
+ type: Input
459
538
  }] } });
460
539
 
461
- class QueueComponent {
462
- constructor(_config, _message, _prompt, _dialog, _data) {
463
- this._config = _config;
464
- this._message = _message;
465
- this._prompt = _prompt;
466
- this._dialog = _dialog;
467
- this._data = _data;
468
- this.messageQueueRecipients = {};
469
- this.emailMessageQueueFormat = EmailMessageQueueFormat;
470
- this.MessageQueueEventTypes = indexNameValue(MessageQueueEventTypes);
471
- this.MessageQueueEventType = MessageQueueEventType;
472
- this._destroy$ = new Subject();
473
- }
474
- ngOnInit() {
475
- this.messageQueueStates = indexNameValue(MessageQueueStates);
476
- this.resendMessageQueue = this._config.resendMessageQueue;
477
- this.forwardMessageQueue = this._config.forwardMessageQueue;
478
- this._config.loadMessageQueue(this._data.messageQueueId)
479
- .subscribe((messageQueue) => {
480
- this.messageQueue = messageQueue;
481
- if (this.messageQueue.emailMessageQueue) {
482
- let body = this.messageQueue.emailMessageQueue.body;
483
- if (this.messageQueue.emailMessageQueue.format === EmailMessageQueueFormat.HTML) {
484
- try {
485
- const doc = new DOMParser().parseFromString(body, 'text/html');
486
- doc.querySelectorAll('a').forEach((el) => {
487
- el.setAttribute('target', '_blank');
488
- });
489
- body = doc.documentElement.innerHTML;
490
- }
491
- catch (e) {
492
- }
493
- }
494
- else {
495
- body = this.anchorMe(body);
496
- }
497
- this.messageQueue.emailMessageQueue.body = body;
498
- }
499
- if (this.messageQueue.smsMessageQueue) {
500
- this.messageQueue.smsMessageQueue.body = this.anchorMe(this.messageQueue.smsMessageQueue.body);
501
- }
502
- this.messageQueueRecipients = this.messageQueue.messageQueueRecipients
503
- .reduce((accum, messageQueueRecipient) => {
504
- accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
505
- return accum;
506
- }, {});
507
- this._setLogsConfig(messageQueue);
508
- this._setAttachmentsConfig(messageQueue);
509
- this._setEventsConfig(messageQueue);
510
- });
511
- }
512
- anchorMe(html) {
513
- return anchorme(html, {
514
- options: {
515
- attributes: [
516
- {
517
- name: 'target',
518
- value: '_blank'
519
- },
520
- ],
521
- },
522
- });
523
- }
524
- openMessage(message) {
525
- this._dialog.open(MessageComponent, {
526
- data: {
527
- message: message,
528
- },
529
- width: '85%'
530
- });
531
- }
532
- resend() {
533
- this._prompt.confirm({
534
- title: 'Confirm',
535
- template: 'Are you sure you would like to resend this message?'
536
- }).subscribe(() => {
537
- this.resendMessageQueue(this.messageQueue)
538
- .subscribe(messageQueue => {
539
- Object.assign(this.messageQueue, messageQueue);
540
- this._message.success('Successfully resent');
541
- if (this.logList) {
542
- this.logList.reload();
543
- }
544
- });
545
- });
546
- }
547
- forward() {
548
- const typeName = this.messageQueue.type === MessageQueueType.Email ? 'an email' : 'a phone number';
549
- this._prompt.input({
550
- label: `Please enter ${typeName} to forward to`,
551
- title: 'Forward Message',
552
- commitLabel: 'Forward',
553
- required: true
554
- }).subscribe((value) => {
555
- if (value) {
556
- this.forwardMessageQueue(this.messageQueue, value)
557
- .subscribe(messageQueue => {
558
- this.messageQueue = Object.assign(Object.assign({}, this.messageQueue), { messageQueue });
559
- this._message.success('Successfully forwarded');
560
- if (this.logList) {
561
- this.logList.reload();
562
- }
563
- });
564
- }
565
- });
566
- }
567
- ngOnDestroy() {
568
- this._destroy$.next();
569
- this._destroy$.complete();
570
- }
571
- _setLogsConfig(messageQueue) {
572
- this.logConfig = {
573
- loadMore: true,
574
- queryParam: false,
575
- fetch: query => {
576
- return this._config.loadLogs(messageQueue, query);
577
- }
578
- };
579
- }
580
- _setEventsConfig(messageQueue) {
581
- this.eventConfig = {
582
- loadMore: true,
583
- queryParam: false,
584
- fetch: (query) => {
585
- return this._config.loadMessageQueueEvents(messageQueue, query);
586
- }
587
- };
588
- }
589
- _setAttachmentsConfig(messageQueue) {
590
- this.attachmentConfig = {
591
- queryParam: false,
592
- fetch: query => {
593
- return this._config.loadMessageQueueAttachments(messageQueue, query)
594
- .pipe(map(response => ({
595
- data: response.data.map(value => {
596
- value.prettyFilesize = this._prettyFilesize(value.filesize);
597
- return value;
598
- }), paging: response.paging
599
- })));
600
- }
601
- };
602
- if (this._config.downloadMessageQueueAttachment) {
603
- this.attachmentConfig.rowActions = [
604
- {
605
- click: (messageAttachment) => {
606
- this._config.downloadMessageQueueAttachment(messageAttachment, this.messageQueue);
607
- },
608
- label: 'Download',
609
- }
610
- ];
611
- }
612
- }
613
- _prettyFilesize(bytes) {
614
- if (bytes === 0) {
615
- return '0.00 B';
616
- }
617
- const e = Math.floor(Math.log(bytes) / Math.log(1024));
618
- return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
619
- }
620
- }
621
- QueueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueueComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i2$1.FsMessage }, { token: i1$1.FsPrompt }, { token: i1.MatDialog }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
622
- QueueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueueComponent, selector: "ng-component", viewQueries: [{ propertyName: "logList", first: true, predicate: ["logList"], descendants: true }], ngImport: i0, template: "<fs-dialog *fsSkeleton=\"messageQueue\">\n <div mat-dialog-title>Message Queue</div>\n <mat-dialog-content>\n <mat-tab-group>\n <mat-tab label=\"Overview\">\n <ng-template matTabContent>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"25px\">\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Recipients\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.toRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.ccRecipients.length\">\n <fs-label>\n CC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.ccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.bccRecipients.length\">\n <fs-label>\n BCC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.bccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.fromName || messageQueue.emailMessageQueue.fromEmail\">\n <fs-label>\n From\n </fs-label>\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromName === messageQueue.emailMessageQueue.fromEmail; else fromEmailName\">\n {{messageQueue.emailMessageQueue.fromName}}\n </ng-container>\n\n <ng-template #fromEmailName>\n {{messageQueue.emailMessageQueue.fromName}}\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromEmail\">\n ({{messageQueue.emailMessageQueue.fromEmail}})\n </ng-container>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.replyEmail && messageQueue.emailMessageQueue.replyEmail.length\">\n <fs-label>\n Reply To\n </fs-label>\n {{messageQueue.emailMessageQueue.replyEmail.join(', ')}}\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Number\n </fs-label>\n <app-recipient \n [state]=\"messageQueue.state\"\n [name]=\"messageQueue.smsMessageQueue.toNumber\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.smsMessageQueue.fromNumber\">\n <fs-label>\n From Number\n </fs-label>\n {{messageQueue.smsMessageQueue.fromNumber}}\n </fs-label-field>\n </ng-container>\n \n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{messageQueue.scheduledDate | fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{messageQueueStates[messageQueue.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.message\">\n <fs-label>\n Message Type\n </fs-label>\n <a\n (click)=\"openMessage(messageQueue.message)\"\n *ngIf=\"loadMessage; else elseMessage\">\n {{messageQueue.message.name}}\n </a>\n <ng-template #elseMessage>\n {{messageQueue.message.name}}\n </ng-template>\n </fs-label-field>\n </div>\n\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field class=\"subject\">\n <fs-label>\n Subject\n </fs-label>\n {{messageQueue.emailMessageQueue.subject}}\n </fs-label-field>\n\n <fs-label-field class=\"body\">\n <fs-label>\n Body\n </fs-label>\n <div\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.Text\"\n class=\"format-text\"\n [innerHTML]=\"messageQueue.emailMessageQueue.body\">\n </div>\n <fs-iframe\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.HTML || messageQueue.emailMessageQueue.format===emailMessageQueueFormat.RichText\"\n [html]=\"messageQueue.emailMessageQueue.body\">\n </fs-iframe>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n Message\n </fs-label>\n <div\n class=\"format-text\"\n [innerHTML]=\"messageQueue.smsMessageQueue.body\">\n </div>\n </fs-label-field>\n </ng-container>\n\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Logs\">\n <ng-template matTabContent>\n <fs-list [config]=\"logConfig\" #logList>\n <fs-list-column title=\"Message\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createdDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Attachments\">\n <ng-template matTabContent>\n <fs-list [config]=\"attachmentConfig\">\n <fs-list-column title=\"File Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.filename}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"File Size\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.prettyFilesize}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Events\">\n <ng-template matTabContent>\n <fs-list [config]=\"eventConfig\">\n <fs-list-column title=\"Recipient\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.messageQueueRecipient.recipient}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Event\">\n <ng-template fs-list-cell let-row=\"row\">\n {{MessageQueueEventTypes[row.type]}}\n <div class=\"small\" *ngIf=\"row.type === MessageQueueEventType.Click\">\n <a [href]=\"row.meta?.url\" target=\"_blank\">{{row.meta?.url}}</a>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.createDate | fsDateFormat: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n color=\"primary\">\n Done\n </button>\n <button\n mat-button\n *ngIf=\"resendMessageQueue\"\n type=\"button\"\n (click)=\"resend()\"\n type=\"button\">\n Resend\n </button>\n <button\n mat-button\n *ngIf=\"forwardMessageQueue\"\n type=\"button\"\n (click)=\"forward()\"\n type=\"button\">\n Forward\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".subject,.body{display:block;margin-top:15px}.body .format-text{white-space:pre-wrap}.body .body-frame{border:0}.body ::ng-deep .field-label{margin-bottom:10px}app-recipient{display:block}[hidden]{display:none!important}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6$1.FsLabelComponent, selector: "fs-label" }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }, { type: i2.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i10$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i13.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5.MatTabContent, selector: "[matTabContent]" }, { type: i17.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i10$1.FsDateFormatPipe } });
623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueueComponent, decorators: [{
624
- type: Component,
625
- args: [{
626
- templateUrl: './queue.component.html',
627
- styleUrls: ['./queue.component.scss'],
628
- }]
629
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
630
- type: Inject,
631
- args: [FS_APP_MESSAGE_CONFIG]
632
- }] }, { type: i2$1.FsMessage }, { type: i1$1.FsPrompt }, { type: i1.MatDialog }, { type: undefined, decorators: [{
633
- type: Inject,
634
- args: [MAT_DIALOG_DATA]
635
- }] }]; }, propDecorators: { logList: [{
636
- type: ViewChild,
637
- args: ['logList']
540
+ class QueueComponent {
541
+ constructor(_config, _data, _message, _prompt, _dialog, _cdRef) {
542
+ this._config = _config;
543
+ this._data = _data;
544
+ this._message = _message;
545
+ this._prompt = _prompt;
546
+ this._dialog = _dialog;
547
+ this._cdRef = _cdRef;
548
+ this.messageQueueRecipients = {};
549
+ this.emailMessageQueueFormat = EmailMessageQueueFormat;
550
+ this.MessageQueueEventTypes = indexNameValue(MessageQueueEventTypes);
551
+ this.MessageQueueEventType = MessageQueueEventType;
552
+ this._destroy$ = new Subject();
553
+ }
554
+ ngOnInit() {
555
+ this.messageQueueStates = indexNameValue(MessageQueueStates);
556
+ this.resendMessageQueue = this._config.resendMessageQueue;
557
+ this.forwardMessageQueue = this._config.forwardMessageQueue;
558
+ this._config.loadMessageQueue(this._data.messageQueueId)
559
+ .subscribe((messageQueue) => {
560
+ this.messageQueue = messageQueue;
561
+ if (this.messageQueue.emailMessageQueue) {
562
+ let body = this.messageQueue.emailMessageQueue.body;
563
+ if (this.messageQueue.emailMessageQueue.format === EmailMessageQueueFormat.HTML) {
564
+ try {
565
+ const doc = new DOMParser().parseFromString(body, 'text/html');
566
+ doc.querySelectorAll('a').forEach((el) => {
567
+ el.setAttribute('target', '_blank');
568
+ });
569
+ body = doc.documentElement.innerHTML;
570
+ }
571
+ catch (e) {
572
+ }
573
+ }
574
+ else {
575
+ body = this.anchorMe(body);
576
+ }
577
+ this.messageQueue.emailMessageQueue.body = body;
578
+ }
579
+ if (this.messageQueue.smsMessageQueue) {
580
+ this.messageQueue.smsMessageQueue.body = this.anchorMe(this.messageQueue.smsMessageQueue.body);
581
+ }
582
+ this.messageQueueRecipients = this.messageQueue.messageQueueRecipients
583
+ .reduce((accum, messageQueueRecipient) => {
584
+ accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
585
+ return accum;
586
+ }, {});
587
+ this._setLogsConfig(messageQueue);
588
+ this._setAttachmentsConfig(messageQueue);
589
+ this._setEventsConfig(messageQueue);
590
+ this._cdRef.markForCheck();
591
+ });
592
+ }
593
+ anchorMe(html) {
594
+ return anchorme(html, {
595
+ options: {
596
+ attributes: [
597
+ {
598
+ name: 'target',
599
+ value: '_blank'
600
+ },
601
+ ],
602
+ },
603
+ });
604
+ }
605
+ openMessage(message) {
606
+ this._dialog.open(MessageComponent, {
607
+ data: {
608
+ message: message,
609
+ },
610
+ width: '85%'
611
+ });
612
+ }
613
+ resend() {
614
+ this._prompt.confirm({
615
+ title: 'Confirm',
616
+ template: 'Are you sure you would like to resend this message?'
617
+ }).subscribe(() => {
618
+ this.resendMessageQueue(this.messageQueue)
619
+ .subscribe(messageQueue => {
620
+ Object.assign(this.messageQueue, messageQueue);
621
+ this._cdRef.markForCheck();
622
+ this._message.success('Successfully resent');
623
+ if (this.logList) {
624
+ this.logList.reload();
625
+ }
626
+ });
627
+ });
628
+ }
629
+ forward() {
630
+ const typeName = this.messageQueue.type === MessageQueueType.Email ? 'an email' : 'a phone number';
631
+ this._prompt.input({
632
+ label: `Please enter ${typeName} to forward to`,
633
+ title: 'Forward Message',
634
+ commitLabel: 'Forward',
635
+ required: true
636
+ }).subscribe((value) => {
637
+ if (value) {
638
+ this.forwardMessageQueue(this.messageQueue, value)
639
+ .subscribe(messageQueue => {
640
+ this.messageQueue = Object.assign(Object.assign({}, this.messageQueue), { messageQueue });
641
+ this._message.success('Successfully forwarded');
642
+ this._cdRef.markForCheck();
643
+ if (this.logList) {
644
+ this.logList.reload();
645
+ }
646
+ });
647
+ }
648
+ });
649
+ }
650
+ ngOnDestroy() {
651
+ this._destroy$.next();
652
+ this._destroy$.complete();
653
+ }
654
+ _setLogsConfig(messageQueue) {
655
+ this.logConfig = {
656
+ loadMore: true,
657
+ queryParam: false,
658
+ fetch: query => {
659
+ return this._config.loadLogs(messageQueue, query);
660
+ }
661
+ };
662
+ }
663
+ _setEventsConfig(messageQueue) {
664
+ this.eventConfig = {
665
+ loadMore: true,
666
+ queryParam: false,
667
+ fetch: (query) => {
668
+ return this._config.loadMessageQueueEvents(messageQueue, query);
669
+ }
670
+ };
671
+ }
672
+ _setAttachmentsConfig(messageQueue) {
673
+ this.attachmentConfig = {
674
+ queryParam: false,
675
+ fetch: query => {
676
+ return this._config.loadMessageQueueAttachments(messageQueue, query)
677
+ .pipe(map(response => ({
678
+ data: response.data.map(value => {
679
+ value.prettyFilesize = this._prettyFilesize(value.filesize);
680
+ return value;
681
+ }), paging: response.paging
682
+ })));
683
+ }
684
+ };
685
+ if (this._config.downloadMessageQueueAttachment) {
686
+ this.attachmentConfig.rowActions = [
687
+ {
688
+ click: (messageAttachment) => {
689
+ this._config.downloadMessageQueueAttachment(messageAttachment, this.messageQueue);
690
+ },
691
+ label: 'Download',
692
+ }
693
+ ];
694
+ }
695
+ }
696
+ _prettyFilesize(bytes) {
697
+ if (bytes === 0) {
698
+ return '0.00 B';
699
+ }
700
+ const e = Math.floor(Math.log(bytes) / Math.log(1024));
701
+ return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
702
+ }
703
+ }
704
+ QueueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueueComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1$1.FsMessage }, { token: i1$2.FsPrompt }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
705
+ QueueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueueComponent, selector: "ng-component", viewQueries: [{ propertyName: "logList", first: true, predicate: ["logList"], descendants: true }], ngImport: i0, template: "<fs-dialog *fsSkeleton=\"messageQueue\">\n <div mat-dialog-title>Message Queue</div>\n <mat-dialog-content>\n <mat-tab-group>\n <mat-tab label=\"Overview\">\n <ng-template matTabContent>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"25px\">\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Recipients\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.toRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.ccRecipients.length\">\n <fs-label>\n CC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.ccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.bccRecipients.length\">\n <fs-label>\n BCC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.bccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.fromName || messageQueue.emailMessageQueue.fromEmail\">\n <fs-label>\n From\n </fs-label>\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromName === messageQueue.emailMessageQueue.fromEmail; else fromEmailName\">\n {{messageQueue.emailMessageQueue.fromName}}\n </ng-container>\n\n <ng-template #fromEmailName>\n {{messageQueue.emailMessageQueue.fromName}}\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromEmail\">\n ({{messageQueue.emailMessageQueue.fromEmail}})\n </ng-container>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.replyEmail && messageQueue.emailMessageQueue.replyEmail.length\">\n <fs-label>\n Reply To\n </fs-label>\n {{messageQueue.emailMessageQueue.replyEmail.join(', ')}}\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Number\n </fs-label>\n <app-recipient \n [state]=\"messageQueue.state\"\n [name]=\"messageQueue.smsMessageQueue.toNumber\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.smsMessageQueue.fromNumber\">\n <fs-label>\n From Number\n </fs-label>\n {{messageQueue.smsMessageQueue.fromNumber}}\n </fs-label-field>\n </ng-container>\n \n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{messageQueue.scheduledDate | fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{messageQueueStates[messageQueue.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.message\">\n <fs-label>\n Message Type\n </fs-label>\n <a\n (click)=\"openMessage(messageQueue.message)\"\n *ngIf=\"loadMessage; else elseMessage\">\n {{messageQueue.message.name}}\n </a>\n <ng-template #elseMessage>\n {{messageQueue.message.name}}\n </ng-template>\n </fs-label-field>\n </div>\n\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field class=\"subject\">\n <fs-label>\n Subject\n </fs-label>\n {{messageQueue.emailMessageQueue.subject}}\n </fs-label-field>\n\n <fs-label-field class=\"body\">\n <fs-label>\n Body\n </fs-label>\n <div\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.Text\"\n class=\"format-text\"\n [innerHTML]=\"messageQueue.emailMessageQueue.body\">\n </div>\n <fs-iframe\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.HTML || messageQueue.emailMessageQueue.format===emailMessageQueueFormat.RichText\"\n [html]=\"messageQueue.emailMessageQueue.body\">\n </fs-iframe>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n Message\n </fs-label>\n <div\n class=\"format-text\"\n [innerHTML]=\"messageQueue.smsMessageQueue.body\">\n </div>\n </fs-label-field>\n </ng-container>\n\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Logs\">\n <ng-template matTabContent>\n <fs-list [config]=\"logConfig\" #logList>\n <fs-list-column title=\"Message\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createdDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Attachments\">\n <ng-template matTabContent>\n <fs-list [config]=\"attachmentConfig\">\n <fs-list-column title=\"File Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.filename}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"File Size\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.prettyFilesize}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Events\">\n <ng-template matTabContent>\n <fs-list [config]=\"eventConfig\">\n <fs-list-column title=\"Recipient\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.messageQueueRecipient.recipient}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Event\">\n <ng-template fs-list-cell let-row=\"row\">\n {{MessageQueueEventTypes[row.type]}}\n <div class=\"small\" *ngIf=\"row.type === MessageQueueEventType.Click\">\n <a [href]=\"row.meta?.url\" target=\"_blank\">{{row.meta?.url}}</a>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.createDate | fsDateFormat: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n color=\"primary\">\n Done\n </button>\n <button\n mat-button\n *ngIf=\"resendMessageQueue\"\n type=\"button\"\n (click)=\"resend()\"\n type=\"button\">\n Resend\n </button>\n <button\n mat-button\n *ngIf=\"forwardMessageQueue\"\n type=\"button\"\n (click)=\"forward()\"\n type=\"button\">\n Forward\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".subject,.body{display:block;margin-top:15px}.body .format-text{white-space:pre-wrap}.body .body-frame{border:0}.body ::ng-deep .field-label{margin-bottom:10px}app-recipient{display:block}[hidden]{display:none!important}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6$1.FsLabelComponent, selector: "fs-label" }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }, { type: i2.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i10$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i14.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5.MatTabContent, selector: "[matTabContent]" }, { type: i19.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i19.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i10$1.FsDateFormatPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
706
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueueComponent, decorators: [{
707
+ type: Component,
708
+ args: [{
709
+ templateUrl: './queue.component.html',
710
+ styleUrls: ['./queue.component.scss'],
711
+ changeDetection: ChangeDetectionStrategy.OnPush,
712
+ }]
713
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
714
+ type: Inject,
715
+ args: [FS_APP_MESSAGE_CONFIG]
716
+ }] }, { type: undefined, decorators: [{
717
+ type: Inject,
718
+ args: [MAT_DIALOG_DATA]
719
+ }] }, { type: i1$1.FsMessage }, { type: i1$2.FsPrompt }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { logList: [{
720
+ type: ViewChild,
721
+ args: ['logList']
638
722
  }] } });
639
723
 
640
- class FsMessageQueueService {
641
- constructor(_dialog) {
642
- this._dialog = _dialog;
643
- this._destroy$ = new Subject();
644
- }
645
- openMessageQueue(messageQueueId, options = {}) {
646
- return this._dialog.open(QueueComponent, Object.assign(Object.assign({}, options), { data: {
647
- messageQueueId,
648
- }, width: options.width || '85%' })).afterClosed()
649
- .pipe(takeUntil(this._destroy$));
650
- }
651
- ngOnDestroy() {
652
- this._destroy$.next();
653
- this._destroy$.complete();
654
- }
655
- }
656
- FsMessageQueueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMessageQueueService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
657
- FsMessageQueueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMessageQueueService });
658
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMessageQueueService, decorators: [{
659
- type: Injectable
724
+ class FsMessageQueueService {
725
+ constructor(_dialog) {
726
+ this._dialog = _dialog;
727
+ this._destroy$ = new Subject();
728
+ }
729
+ openMessageQueue(messageQueueId, options = {}) {
730
+ return this._dialog.open(QueueComponent, Object.assign(Object.assign({}, options), { data: {
731
+ messageQueueId,
732
+ }, width: options.width || '85%' })).afterClosed()
733
+ .pipe(takeUntil(this._destroy$));
734
+ }
735
+ ngOnDestroy() {
736
+ this._destroy$.next();
737
+ this._destroy$.complete();
738
+ }
739
+ }
740
+ FsMessageQueueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMessageQueueService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
741
+ FsMessageQueueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMessageQueueService });
742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsMessageQueueService, decorators: [{
743
+ type: Injectable
660
744
  }], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
661
745
 
662
- class TruncatePipe {
663
- transform(value, limit = 25, completeWords = false, ellipsis = '...') {
664
- if (value.length < limit) {
665
- return `${value.substr(0, limit)}`;
666
- }
667
- if (completeWords) {
668
- limit = value.substr(0, limit).lastIndexOf(' ');
669
- }
670
- return `${value.substr(0, limit)}${ellipsis}`;
671
- }
672
- }
673
- TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
674
- TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TruncatePipe, name: "truncate" });
675
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TruncatePipe, decorators: [{
676
- type: Pipe,
677
- args: [{
678
- name: 'truncate'
679
- }]
746
+ class TruncatePipe {
747
+ transform(value, limit = 25, completeWords = false, ellipsis = '...') {
748
+ if (value.length < limit) {
749
+ return `${value.substr(0, limit)}`;
750
+ }
751
+ if (completeWords) {
752
+ limit = value.substr(0, limit).lastIndexOf(' ');
753
+ }
754
+ return `${value.substr(0, limit)}${ellipsis}`;
755
+ }
756
+ }
757
+ TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
758
+ TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TruncatePipe, name: "truncate" });
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TruncatePipe, decorators: [{
760
+ type: Pipe,
761
+ args: [{
762
+ name: 'truncate'
763
+ }]
680
764
  }] });
681
765
 
682
- class QueuesComponent {
683
- constructor(_config, _dialog, _messageQueueService) {
684
- this._config = _config;
685
- this._dialog = _dialog;
686
- this._messageQueueService = _messageQueueService;
687
- this.list = null;
688
- this.query = {};
689
- this.config = null;
690
- this.messageQueueStates = {};
691
- this.MessageQueueState = MessageQueueState;
692
- this._destroy$ = new Subject();
693
- }
694
- ngOnInit() {
695
- this.messageQueueStates = indexNameValue(MessageQueueStates);
696
- this.config = {
697
- filters: [
698
- {
699
- name: 'keyword',
700
- type: ItemType.Keyword,
701
- label: 'Search'
702
- },
703
- {
704
- name: 'state',
705
- type: ItemType.Select,
706
- label: 'Status',
707
- values: () => {
708
- return MessageQueueStates;
709
- }
710
- },
711
- {
712
- name: 'date',
713
- type: ItemType.DateRange,
714
- label: ['From Date', 'To Date'],
715
- },
716
- ],
717
- sort: { value: 'created_date', direction: 'desc' },
718
- fetch: query => {
719
- query = Object.assign(Object.assign(Object.assign({}, query), this.query), { messageQueueAttachmentCounts: true, emailMessageQueues: true, emailMessageQueueBodies: false, smsMessageQueues: true });
720
- return this._config.loadMessageQueues(query)
721
- .pipe(map(response => ({ data: response.data
722
- .map((messageQueue) => {
723
- return Object.assign(Object.assign({}, messageQueue), { messageQueueRecipients: messageQueue.messageQueueRecipients
724
- .reduce((accum, messageQueueRecipient) => {
725
- accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
726
- return accum;
727
- }, {}) });
728
- }), paging: response.paging })));
729
- }
730
- };
731
- if (this._config.bulkMessageQueues) {
732
- this.config.selection = {
733
- selectAll: false,
734
- actions: [
735
- {
736
- type: SelectionActionType.Action,
737
- name: 'queue',
738
- label: 'Queue',
739
- },
740
- {
741
- type: SelectionActionType.Action,
742
- name: 'resend',
743
- label: 'Resend',
744
- },
745
- {
746
- type: SelectionActionType.Action,
747
- name: 'cancel',
748
- label: 'Cancel',
749
- },
750
- ],
751
- actionSelected: (actionSelected) => {
752
- return this._config.bulkMessageQueues(actionSelected.action.name, actionSelected.selected)
753
- .pipe(tap(() => {
754
- this.list.reload();
755
- }));
756
- }
757
- };
758
- }
759
- this.config.filters.push({
760
- name: 'message_id',
761
- type: ItemType.Select,
762
- label: 'Message Type',
763
- values: (query) => {
764
- query = Object.assign(Object.assign({}, query), { limit: 50 });
765
- return this._config.loadMessages(query)
766
- .pipe(map((response) => {
767
- return [
768
- { value: null, name: 'All', },
769
- ...response.data.map((item) => ({ name: item.name, value: item.id })),
770
- ];
771
- }));
772
- }
773
- });
774
- }
775
- open(messageQueue) {
776
- this._messageQueueService.openMessageQueue(messageQueue.id)
777
- .pipe(takeUntil(this._destroy$))
778
- .subscribe(() => {
779
- this.list.reload();
780
- });
781
- }
782
- ngOnDestroy() {
783
- this._destroy$.next();
784
- this._destroy$.complete();
785
- }
786
- }
787
- QueuesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueuesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialog }, { token: FsMessageQueueService }], target: i0.ɵɵFactoryTarget.Component });
788
- QueuesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueuesComponent, selector: "fs-app-message-queues", inputs: { query: "query" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\" #list>\n <fs-list-column title=\"Message\" name=\"subject\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <a (click)=\"open(row)\">{{row.emailMessageQueue.subject|truncate:100}}</a>\n <mat-icon *ngIf=\"row.messageQueueAttachmentCount\" [matTooltip]=\"row.messageQueueAttachmentCount + ' Attachment(s)'\">attach_file</mat-icon>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <a (click)=\"open(row)\">{{row.smsMessageQueue.body|truncate:100}}</a>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Recipients\" class=\"col-recipients\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <ng-container *ngIf=\"row.emailMessageQueue.toRecipients.length; else unspecified\">\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.toRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.ccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.bccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <ng-container *ngIf=\"row.smsMessageQueue.toNumber; else unspecified\">\n <app-recipient \n class=\"small\"\n [state]=\"row.state\"\n [name]=\"row.smsMessageQueue.toNumber\">\n </app-recipient>\n </ng-container>\n </ng-container>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Status\" class=\"col-state\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [class]=\"'state-' + row.state\">{{messageQueueStates[row.state]}}</span>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Date\" name=\"created_date\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.createdDate | fsDateFormat: 'date-time-yeardiff' }}\n </ng-template>\n </fs-list-column>\n</fs-list>\n\n<ng-template #unspecified>\n <app-recipient \n class=\"small\"\n [state]=\"MessageQueueState.Failed\"\n name=\"Unspecified\">\n </app-recipient>\n</ng-template>", styles: [":host ::ng-deep .col-recipients small+small:before{content:\", \"}:host ::ng-deep .col-state .state-F,:host ::ng-deep .col-state .state-P{color:#d8524e}\n"], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i16.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "truncate": TruncatePipe, "fsDateFormat": i10$1.FsDateFormatPipe } });
789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueuesComponent, decorators: [{
790
- type: Component,
791
- args: [{
792
- selector: 'fs-app-message-queues',
793
- styleUrls: ['./queues.component.scss'],
794
- templateUrl: './queues.component.html'
795
- }]
796
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
797
- type: Inject,
798
- args: [FS_APP_MESSAGE_CONFIG]
799
- }] }, { type: i1.MatDialog }, { type: FsMessageQueueService }]; }, propDecorators: { list: [{
800
- type: ViewChild,
801
- args: [FsListComponent, { static: true }]
802
- }], query: [{
803
- type: Input
766
+ class QueuesComponent {
767
+ constructor(_config, _messageQueueService) {
768
+ this._config = _config;
769
+ this._messageQueueService = _messageQueueService;
770
+ this.list = null;
771
+ this.query = {};
772
+ this.config = null;
773
+ this.messageQueueStates = {};
774
+ this.MessageQueueState = MessageQueueState;
775
+ this._destroy$ = new Subject();
776
+ }
777
+ ngOnInit() {
778
+ this.messageQueueStates = indexNameValue(MessageQueueStates);
779
+ this.config = {
780
+ filters: [
781
+ {
782
+ name: 'keyword',
783
+ type: ItemType.Keyword,
784
+ label: 'Search'
785
+ },
786
+ {
787
+ name: 'state',
788
+ type: ItemType.Select,
789
+ label: 'Status',
790
+ values: () => {
791
+ return MessageQueueStates;
792
+ }
793
+ },
794
+ {
795
+ name: 'date',
796
+ type: ItemType.DateRange,
797
+ label: ['From Date', 'To Date'],
798
+ },
799
+ ],
800
+ sort: { value: 'created_date', direction: 'desc' },
801
+ fetch: query => {
802
+ query = Object.assign(Object.assign(Object.assign({}, query), this.query), { messageQueueAttachmentCounts: true, emailMessageQueues: true, emailMessageQueueBodies: false, smsMessageQueues: true });
803
+ return this._config.loadMessageQueues(query)
804
+ .pipe(map(response => ({ data: response.data
805
+ .map((messageQueue) => {
806
+ return Object.assign(Object.assign({}, messageQueue), { messageQueueRecipients: messageQueue.messageQueueRecipients
807
+ .reduce((accum, messageQueueRecipient) => {
808
+ accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
809
+ return accum;
810
+ }, {}) });
811
+ }), paging: response.paging })));
812
+ }
813
+ };
814
+ if (this._config.bulkMessageQueues) {
815
+ this.config.selection = {
816
+ selectAll: false,
817
+ actions: [
818
+ {
819
+ type: SelectionActionType.Action,
820
+ name: 'queue',
821
+ label: 'Queue',
822
+ },
823
+ {
824
+ type: SelectionActionType.Action,
825
+ name: 'resend',
826
+ label: 'Resend',
827
+ },
828
+ {
829
+ type: SelectionActionType.Action,
830
+ name: 'cancel',
831
+ label: 'Cancel',
832
+ },
833
+ ],
834
+ actionSelected: (actionSelected) => {
835
+ return this._config.bulkMessageQueues(actionSelected.action.name, actionSelected.selected)
836
+ .pipe(tap(() => {
837
+ this.list.reload();
838
+ }));
839
+ }
840
+ };
841
+ }
842
+ this.config.filters.push({
843
+ name: 'message_id',
844
+ type: ItemType.Select,
845
+ label: 'Message Type',
846
+ values: (query) => {
847
+ query = Object.assign(Object.assign({}, query), { limit: 50 });
848
+ return this._config.loadMessages(query)
849
+ .pipe(map((response) => {
850
+ return [
851
+ { value: null, name: 'All', },
852
+ ...response.data
853
+ .map((item) => ({ name: item.name, value: item.id })),
854
+ ];
855
+ }));
856
+ }
857
+ });
858
+ }
859
+ open(messageQueue) {
860
+ this._messageQueueService.openMessageQueue(messageQueue.id)
861
+ .pipe(takeUntil(this._destroy$))
862
+ .subscribe(() => {
863
+ this.list.reload();
864
+ });
865
+ }
866
+ ngOnDestroy() {
867
+ this._destroy$.next();
868
+ this._destroy$.complete();
869
+ }
870
+ }
871
+ QueuesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueuesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: FsMessageQueueService }], target: i0.ɵɵFactoryTarget.Component });
872
+ QueuesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueuesComponent, selector: "fs-app-message-queues", inputs: { query: "query" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\" #list>\n <fs-list-column title=\"Message\" name=\"subject\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <a (click)=\"open(row)\">{{row.emailMessageQueue.subject|truncate:100}}</a>\n <mat-icon *ngIf=\"row.messageQueueAttachmentCount\" [matTooltip]=\"row.messageQueueAttachmentCount + ' Attachment(s)'\">attach_file</mat-icon>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <a (click)=\"open(row)\">{{row.smsMessageQueue.body|truncate:100}}</a>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Recipients\" class=\"col-recipients\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <ng-container *ngIf=\"row.emailMessageQueue.toRecipients.length; else unspecified\">\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.toRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.ccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.bccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <ng-container *ngIf=\"row.smsMessageQueue.toNumber; else unspecified\">\n <app-recipient \n class=\"small\"\n [state]=\"row.state\"\n [name]=\"row.smsMessageQueue.toNumber\">\n </app-recipient>\n </ng-container>\n </ng-container>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Status\" class=\"col-state\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [class]=\"'state-' + row.state\">{{messageQueueStates[row.state]}}</span>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Date\" name=\"created_date\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.createdDate | fsDateFormat: 'date-time-yeardiff' }}\n </ng-template>\n </fs-list-column>\n</fs-list>\n\n<ng-template #unspecified>\n <app-recipient \n class=\"small\"\n [state]=\"MessageQueueState.Failed\"\n name=\"Unspecified\">\n </app-recipient>\n</ng-template>", styles: [":host ::ng-deep .col-recipients small+small:before{content:\", \"}:host ::ng-deep .col-state .state-F,:host ::ng-deep .col-state .state-P{color:#d8524e}\n"], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i1$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i19.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i19.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i17.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "truncate": TruncatePipe, "fsDateFormat": i10$1.FsDateFormatPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueuesComponent, decorators: [{
874
+ type: Component,
875
+ args: [{
876
+ selector: 'fs-app-message-queues',
877
+ styleUrls: ['./queues.component.scss'],
878
+ templateUrl: './queues.component.html',
879
+ changeDetection: ChangeDetectionStrategy.OnPush,
880
+ }]
881
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
882
+ type: Inject,
883
+ args: [FS_APP_MESSAGE_CONFIG]
884
+ }] }, { type: FsMessageQueueService }]; }, propDecorators: { list: [{
885
+ type: ViewChild,
886
+ args: [FsListComponent, { static: true }]
887
+ }], query: [{
888
+ type: Input
804
889
  }] } });
805
890
 
806
- class LinkifyPipe {
807
- transform(value) {
808
- return anchorme(value, {
809
- attributes: [
810
- {
811
- name: 'target',
812
- value: '_blank'
813
- },
814
- ]
815
- });
816
- }
817
- }
818
- LinkifyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
819
- LinkifyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkifyPipe, name: "linkify" });
820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkifyPipe, decorators: [{
821
- type: Pipe,
822
- args: [{ name: 'linkify' }]
891
+ class LinkifyPipe {
892
+ transform(value) {
893
+ return anchorme(value, {
894
+ attributes: [
895
+ {
896
+ name: 'target',
897
+ value: '_blank'
898
+ },
899
+ ]
900
+ });
901
+ }
902
+ }
903
+ LinkifyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
904
+ LinkifyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkifyPipe, name: "linkify" });
905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkifyPipe, decorators: [{
906
+ type: Pipe,
907
+ args: [{ name: 'linkify' }]
823
908
  }] });
824
909
 
825
- class FsAppMessageQueuesModule {
826
- }
827
- FsAppMessageQueuesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
828
- FsAppMessageQueuesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, declarations: [QueuesComponent,
829
- QueueComponent,
830
- LinkifyPipe,
831
- TruncatePipe,
832
- RecipientComponent], imports: [RouterModule,
833
- FormsModule,
834
- CommonModule,
835
- FlexLayoutModule,
836
- MatTooltipModule,
837
- MatDialogModule,
838
- MatButtonModule,
839
- MatIconModule,
840
- MatTabsModule,
841
- FsListModule,
842
- FsDialogModule,
843
- FsLabelModule,
844
- FsDateModule,
845
- FsSkeletonModule,
846
- FsAppMessagesModule,
847
- FsFormModule,
848
- FsPromptInputModule,
849
- FsIFrameModule], exports: [QueuesComponent,
850
- QueueComponent] });
851
- FsAppMessageQueuesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, providers: [
852
- FsMessageQueueService
853
- ], imports: [[
854
- RouterModule,
855
- FormsModule,
856
- CommonModule,
857
- FlexLayoutModule,
858
- MatTooltipModule,
859
- MatDialogModule,
860
- MatButtonModule,
861
- MatIconModule,
862
- MatTabsModule,
863
- FsListModule,
864
- FsDialogModule,
865
- FsLabelModule,
866
- FsDateModule,
867
- FsSkeletonModule,
868
- FsAppMessagesModule,
869
- FsFormModule,
870
- FsPromptInputModule,
871
- FsIFrameModule,
872
- //FsDeviceModule,
873
- //FsIpModule,
874
- ]] });
875
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, decorators: [{
876
- type: NgModule,
877
- args: [{
878
- imports: [
879
- RouterModule,
880
- FormsModule,
881
- CommonModule,
882
- FlexLayoutModule,
883
- MatTooltipModule,
884
- MatDialogModule,
885
- MatButtonModule,
886
- MatIconModule,
887
- MatTabsModule,
888
- FsListModule,
889
- FsDialogModule,
890
- FsLabelModule,
891
- FsDateModule,
892
- FsSkeletonModule,
893
- FsAppMessagesModule,
894
- FsFormModule,
895
- FsPromptInputModule,
896
- FsIFrameModule,
897
- //FsDeviceModule,
898
- //FsIpModule,
899
- ],
900
- declarations: [
901
- QueuesComponent,
902
- QueueComponent,
903
- LinkifyPipe,
904
- TruncatePipe,
905
- RecipientComponent,
906
- ],
907
- exports: [
908
- QueuesComponent,
909
- QueueComponent,
910
- ],
911
- providers: [
912
- FsMessageQueueService
913
- ]
914
- }]
910
+ class FsAppMessageQueuesModule {
911
+ }
912
+ FsAppMessageQueuesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
913
+ FsAppMessageQueuesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, declarations: [QueuesComponent,
914
+ QueueComponent,
915
+ LinkifyPipe,
916
+ TruncatePipe,
917
+ RecipientComponent], imports: [RouterModule,
918
+ FormsModule,
919
+ CommonModule,
920
+ FlexLayoutModule,
921
+ MatTooltipModule,
922
+ MatDialogModule,
923
+ MatButtonModule,
924
+ MatIconModule,
925
+ MatTabsModule,
926
+ FsListModule,
927
+ FsDialogModule,
928
+ FsLabelModule,
929
+ FsDateModule,
930
+ FsSkeletonModule,
931
+ FsAppMessagesModule,
932
+ FsFormModule,
933
+ FsPromptInputModule,
934
+ FsIFrameModule], exports: [QueuesComponent,
935
+ QueueComponent] });
936
+ FsAppMessageQueuesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, providers: [
937
+ FsMessageQueueService
938
+ ], imports: [[
939
+ RouterModule,
940
+ FormsModule,
941
+ CommonModule,
942
+ FlexLayoutModule,
943
+ MatTooltipModule,
944
+ MatDialogModule,
945
+ MatButtonModule,
946
+ MatIconModule,
947
+ MatTabsModule,
948
+ FsListModule,
949
+ FsDialogModule,
950
+ FsLabelModule,
951
+ FsDateModule,
952
+ FsSkeletonModule,
953
+ FsAppMessagesModule,
954
+ FsFormModule,
955
+ FsPromptInputModule,
956
+ FsIFrameModule,
957
+ //FsDeviceModule,
958
+ //FsIpModule,
959
+ ]] });
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageQueuesModule, decorators: [{
961
+ type: NgModule,
962
+ args: [{
963
+ imports: [
964
+ RouterModule,
965
+ FormsModule,
966
+ CommonModule,
967
+ FlexLayoutModule,
968
+ MatTooltipModule,
969
+ MatDialogModule,
970
+ MatButtonModule,
971
+ MatIconModule,
972
+ MatTabsModule,
973
+ FsListModule,
974
+ FsDialogModule,
975
+ FsLabelModule,
976
+ FsDateModule,
977
+ FsSkeletonModule,
978
+ FsAppMessagesModule,
979
+ FsFormModule,
980
+ FsPromptInputModule,
981
+ FsIFrameModule,
982
+ //FsDeviceModule,
983
+ //FsIpModule,
984
+ ],
985
+ declarations: [
986
+ QueuesComponent,
987
+ QueueComponent,
988
+ LinkifyPipe,
989
+ TruncatePipe,
990
+ RecipientComponent,
991
+ ],
992
+ exports: [
993
+ QueuesComponent,
994
+ QueueComponent,
995
+ ],
996
+ providers: [
997
+ FsMessageQueueService
998
+ ]
999
+ }]
915
1000
  }] });
916
1001
 
917
- class TemplateComponent {
918
- constructor(_data, _config, _dialogRef, _message, _dialog) {
919
- this._data = _data;
920
- this._config = _config;
921
- this._dialogRef = _dialogRef;
922
- this._message = _message;
923
- this._dialog = _dialog;
924
- this.htmlEditorconfig = {
925
- language: 'html',
926
- insertSpaces: true,
927
- tabSize: 2,
928
- };
929
- this.cssEditorconfig = {
930
- language: 'scss',
931
- insertSpaces: true,
932
- tabSize: 2,
933
- };
934
- this.save = (event) => {
935
- return this._config.saveMessageTemplate(this.messageTemplate)
936
- .pipe(tap((messageTemplate) => {
937
- this._message.success('Saved Changes');
938
- if (event.submitter === 'save-close') {
939
- this._dialogRef.close(messageTemplate);
940
- }
941
- }));
942
- };
943
- }
944
- ngOnInit() {
945
- if (this._data.messageTemplate.id) {
946
- this._config.loadMessageTemplate(this._data.messageTemplate)
947
- .subscribe(messageTemplate => {
948
- this.messageTemplate = messageTemplate;
949
- });
950
- }
951
- else {
952
- this.messageTemplate = {};
953
- }
954
- }
955
- openPreview() {
956
- this._dialog.open(PreviewComponent, {
957
- data: {
958
- styles: this.messageTemplate.styles,
959
- html: this.messageTemplate.content,
960
- },
961
- width: '95%',
962
- });
963
- }
964
- }
965
- TemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialogRef }, { token: i2$1.FsMessage }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
966
- TemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplateComponent, selector: "ng-component", ngImport: i0, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"messageTemplate.name\"\n name=\"name\"\n >\n </mat-form-field>\n <div [@.disabled]=\"true\">\n <mat-tab-group\n mat-align-tabs=\"start\"\n [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <div class=\"content\">\n <fs-label-field>\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.content\"\n name=\"body\"\n [config]=\"htmlEditorconfig\">\n </fs-text-editor>\n <fs-label-message>\n &#123;$content&#125; will be replaced with the message content.\n </fs-label-message>\n </fs-label-field>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <div class=\"styles\">\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.styles\"\n name=\"styles\"\n [config]=\"cssEditorconfig\">\n </fs-text-editor>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\" name=\"close\">Save</button>\n <button mat-button type=\"submit\" name=\"save-close\">Save & Close</button>\n <button mat-button (click)=\"openPreview()\" type=\"button\">Preview</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [".name{width:100%}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i9.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6$1.FsLabelMessageComponent, selector: "fs-label-message" }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i13.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i14.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i14.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i14.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i18.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.MatTabContent, selector: "[matTabContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i15.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
967
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateComponent, decorators: [{
968
- type: Component,
969
- args: [{
970
- templateUrl: './template.component.html',
971
- styleUrls: ['./template.component.scss']
972
- }]
973
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
974
- type: Inject,
975
- args: [MAT_DIALOG_DATA]
976
- }] }, { type: undefined, decorators: [{
977
- type: Inject,
978
- args: [FS_APP_MESSAGE_CONFIG]
979
- }] }, { type: i1.MatDialogRef }, { type: i2$1.FsMessage }, { type: i1.MatDialog }]; } });
1002
+ class TemplateComponent {
1003
+ constructor(_data, _config, _dialogRef, _message, _dialog) {
1004
+ this._data = _data;
1005
+ this._config = _config;
1006
+ this._dialogRef = _dialogRef;
1007
+ this._message = _message;
1008
+ this._dialog = _dialog;
1009
+ this.htmlEditorconfig = {
1010
+ language: 'html',
1011
+ insertSpaces: true,
1012
+ tabSize: 2,
1013
+ };
1014
+ this.cssEditorconfig = {
1015
+ language: 'scss',
1016
+ insertSpaces: true,
1017
+ tabSize: 2,
1018
+ };
1019
+ this.save = (event) => {
1020
+ return this._config.saveMessageTemplate(this.messageTemplate)
1021
+ .pipe(tap((messageTemplate) => {
1022
+ this._message.success('Saved Changes');
1023
+ if (event.submitter === 'save-close') {
1024
+ this._dialogRef.close(messageTemplate);
1025
+ }
1026
+ }));
1027
+ };
1028
+ }
1029
+ ngOnInit() {
1030
+ if (this._data.messageTemplate.id) {
1031
+ this._config.loadMessageTemplate(this._data.messageTemplate)
1032
+ .subscribe(messageTemplate => {
1033
+ this.messageTemplate = messageTemplate;
1034
+ });
1035
+ }
1036
+ else {
1037
+ this.messageTemplate = {};
1038
+ }
1039
+ }
1040
+ openPreview() {
1041
+ this._dialog.open(PreviewComponent, {
1042
+ data: {
1043
+ styles: this.messageTemplate.styles,
1044
+ html: this.messageTemplate.content,
1045
+ },
1046
+ width: '95%',
1047
+ });
1048
+ }
1049
+ }
1050
+ TemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialogRef }, { token: i1$1.FsMessage }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1051
+ TemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplateComponent, selector: "ng-component", ngImport: i0, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"messageTemplate.name\"\n name=\"name\"\n >\n </mat-form-field>\n <div [@.disabled]=\"true\">\n <mat-tab-group\n mat-align-tabs=\"start\"\n [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <div class=\"content\">\n <fs-label-field>\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.content\"\n name=\"body\"\n [config]=\"htmlEditorconfig\">\n </fs-text-editor>\n <fs-label-message>\n &#123;$content&#125; will be replaced with the message content.\n </fs-label-message>\n </fs-label-field>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <div class=\"styles\">\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.styles\"\n name=\"styles\"\n [config]=\"cssEditorconfig\">\n </fs-text-editor>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\" name=\"close\">Save</button>\n <button mat-button type=\"submit\" name=\"save-close\">Save & Close</button>\n <button mat-button (click)=\"openPreview()\" type=\"button\">Preview</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [".name{width:100%}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i9.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6$1.FsLabelMessageComponent, selector: "fs-label-message" }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i14.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i15.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i15.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i15.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i16.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i20.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i15.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i15.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i15.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.MatTabContent, selector: "[matTabContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i16.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
1052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateComponent, decorators: [{
1053
+ type: Component,
1054
+ args: [{
1055
+ templateUrl: './template.component.html',
1056
+ styleUrls: ['./template.component.scss']
1057
+ }]
1058
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1059
+ type: Inject,
1060
+ args: [MAT_DIALOG_DATA]
1061
+ }] }, { type: undefined, decorators: [{
1062
+ type: Inject,
1063
+ args: [FS_APP_MESSAGE_CONFIG]
1064
+ }] }, { type: i1.MatDialogRef }, { type: i1$1.FsMessage }, { type: i1.MatDialog }]; } });
980
1065
 
981
- class TemplatesComponent {
982
- constructor(_config, _dialog) {
983
- this._config = _config;
984
- this._dialog = _dialog;
985
- this.list = null;
986
- this.config = null;
987
- this.messageQueueStates = [];
988
- this._destroy$ = new Subject();
989
- }
990
- ngOnInit() {
991
- this.config = {
992
- actions: [
993
- {
994
- label: 'Create',
995
- click: () => {
996
- this.open({});
997
- }
998
- }
999
- ],
1000
- status: false,
1001
- fetch: query => {
1002
- return this._config.loadMessageTemplates(query);
1003
- }
1004
- };
1005
- if (this._config.deleteMessageTemplate) {
1006
- this.config.rowActions = [
1007
- {
1008
- click: data => {
1009
- return this._config.deleteMessageTemplate(data);
1010
- },
1011
- remove: {
1012
- title: 'Confirm',
1013
- template: 'Are you sure you would like to delete this template?',
1014
- },
1015
- menu: true,
1016
- label: 'Delete',
1017
- },
1018
- ];
1019
- }
1020
- }
1021
- open(messageTemplate) {
1022
- const dialogRef = this._dialog.open(TemplateComponent, {
1023
- data: {
1024
- messageTemplate,
1025
- },
1026
- width: '85%',
1027
- });
1028
- dialogRef.afterClosed()
1029
- .pipe(takeUntil(this._destroy$))
1030
- .subscribe(() => {
1031
- this.list.reload();
1032
- });
1033
- }
1034
- ngOnDestroy() {
1035
- this._destroy$.next();
1036
- this._destroy$.complete();
1037
- }
1038
- }
1039
- TemplatesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplatesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1040
- TemplatesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplatesComponent, selector: "fs-app-message-templates", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n</fs-list>", components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplatesComponent, decorators: [{
1042
- type: Component,
1043
- args: [{
1044
- selector: 'fs-app-message-templates',
1045
- templateUrl: './templates.component.html'
1046
- }]
1047
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1048
- type: Inject,
1049
- args: [FS_APP_MESSAGE_CONFIG]
1050
- }] }, { type: i1.MatDialog }]; }, propDecorators: { list: [{
1051
- type: ViewChild,
1052
- args: [FsListComponent, { static: true }]
1066
+ class TemplatesComponent {
1067
+ constructor(_config, _dialog) {
1068
+ this._config = _config;
1069
+ this._dialog = _dialog;
1070
+ this.list = null;
1071
+ this.config = null;
1072
+ this.messageQueueStates = [];
1073
+ this._destroy$ = new Subject();
1074
+ }
1075
+ ngOnInit() {
1076
+ this.config = {
1077
+ actions: [
1078
+ {
1079
+ label: 'Create',
1080
+ click: () => {
1081
+ this.open({});
1082
+ }
1083
+ }
1084
+ ],
1085
+ status: false,
1086
+ fetch: query => {
1087
+ return this._config.loadMessageTemplates(query);
1088
+ }
1089
+ };
1090
+ if (this._config.deleteMessageTemplate) {
1091
+ this.config.rowActions = [
1092
+ {
1093
+ click: data => {
1094
+ return this._config.deleteMessageTemplate(data);
1095
+ },
1096
+ remove: {
1097
+ title: 'Confirm',
1098
+ template: 'Are you sure you would like to delete this template?',
1099
+ },
1100
+ menu: true,
1101
+ label: 'Delete',
1102
+ },
1103
+ ];
1104
+ }
1105
+ }
1106
+ open(messageTemplate) {
1107
+ const dialogRef = this._dialog.open(TemplateComponent, {
1108
+ data: {
1109
+ messageTemplate,
1110
+ },
1111
+ width: '85%',
1112
+ });
1113
+ dialogRef.afterClosed()
1114
+ .pipe(takeUntil(this._destroy$))
1115
+ .subscribe(() => {
1116
+ this.list.reload();
1117
+ });
1118
+ }
1119
+ ngOnDestroy() {
1120
+ this._destroy$.next();
1121
+ this._destroy$.complete();
1122
+ }
1123
+ }
1124
+ TemplatesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplatesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1125
+ TemplatesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplatesComponent, selector: "fs-app-message-templates", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n</fs-list>", components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplatesComponent, decorators: [{
1127
+ type: Component,
1128
+ args: [{
1129
+ selector: 'fs-app-message-templates',
1130
+ templateUrl: './templates.component.html'
1131
+ }]
1132
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1133
+ type: Inject,
1134
+ args: [FS_APP_MESSAGE_CONFIG]
1135
+ }] }, { type: i1.MatDialog }]; }, propDecorators: { list: [{
1136
+ type: ViewChild,
1137
+ args: [FsListComponent, { static: true }]
1053
1138
  }] } });
1054
1139
 
1055
- class FsAppMessageTemplatesModule {
1056
- }
1057
- FsAppMessageTemplatesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1058
- FsAppMessageTemplatesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, declarations: [TemplatesComponent,
1059
- TemplateComponent], imports: [RouterModule,
1060
- CommonModule,
1061
- FormsModule,
1062
- MatTooltipModule,
1063
- MatDialogModule,
1064
- MatButtonModule,
1065
- MatTabsModule,
1066
- MatFormFieldModule,
1067
- MatFormFieldModule,
1068
- MatInputModule,
1069
- FsListModule,
1070
- FsDialogModule,
1071
- FsLabelModule,
1072
- FlexLayoutModule,
1073
- FsSkeletonModule,
1074
- FsFormModule,
1075
- FsTextEditorModule,
1076
- FsAppMessagePreviewModule], exports: [TemplatesComponent,
1077
- TemplateComponent] });
1078
- FsAppMessageTemplatesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, imports: [[
1079
- RouterModule,
1080
- CommonModule,
1081
- FormsModule,
1082
- MatTooltipModule,
1083
- MatDialogModule,
1084
- MatButtonModule,
1085
- MatTabsModule,
1086
- MatFormFieldModule,
1087
- MatFormFieldModule,
1088
- MatInputModule,
1089
- FsListModule,
1090
- FsDialogModule,
1091
- FsLabelModule,
1092
- FlexLayoutModule,
1093
- FsSkeletonModule,
1094
- FsFormModule,
1095
- FsTextEditorModule,
1096
- FsAppMessagePreviewModule,
1097
- ]] });
1098
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, decorators: [{
1099
- type: NgModule,
1100
- args: [{
1101
- imports: [
1102
- RouterModule,
1103
- CommonModule,
1104
- FormsModule,
1105
- MatTooltipModule,
1106
- MatDialogModule,
1107
- MatButtonModule,
1108
- MatTabsModule,
1109
- MatFormFieldModule,
1110
- MatFormFieldModule,
1111
- MatInputModule,
1112
- FsListModule,
1113
- FsDialogModule,
1114
- FsLabelModule,
1115
- FlexLayoutModule,
1116
- FsSkeletonModule,
1117
- FsFormModule,
1118
- FsTextEditorModule,
1119
- FsAppMessagePreviewModule,
1120
- ],
1121
- declarations: [
1122
- TemplatesComponent,
1123
- TemplateComponent,
1124
- ],
1125
- exports: [
1126
- TemplatesComponent,
1127
- TemplateComponent,
1128
- ],
1129
- }]
1140
+ class FsAppMessageTemplatesModule {
1141
+ }
1142
+ FsAppMessageTemplatesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1143
+ FsAppMessageTemplatesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, declarations: [TemplatesComponent,
1144
+ TemplateComponent], imports: [RouterModule,
1145
+ CommonModule,
1146
+ FormsModule,
1147
+ MatTooltipModule,
1148
+ MatDialogModule,
1149
+ MatButtonModule,
1150
+ MatTabsModule,
1151
+ MatFormFieldModule,
1152
+ MatFormFieldModule,
1153
+ MatInputModule,
1154
+ FsListModule,
1155
+ FsDialogModule,
1156
+ FsLabelModule,
1157
+ FlexLayoutModule,
1158
+ FsSkeletonModule,
1159
+ FsFormModule,
1160
+ FsTextEditorModule,
1161
+ FsAppMessagePreviewModule], exports: [TemplatesComponent,
1162
+ TemplateComponent] });
1163
+ FsAppMessageTemplatesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, imports: [[
1164
+ RouterModule,
1165
+ CommonModule,
1166
+ FormsModule,
1167
+ MatTooltipModule,
1168
+ MatDialogModule,
1169
+ MatButtonModule,
1170
+ MatTabsModule,
1171
+ MatFormFieldModule,
1172
+ MatFormFieldModule,
1173
+ MatInputModule,
1174
+ FsListModule,
1175
+ FsDialogModule,
1176
+ FsLabelModule,
1177
+ FlexLayoutModule,
1178
+ FsSkeletonModule,
1179
+ FsFormModule,
1180
+ FsTextEditorModule,
1181
+ FsAppMessagePreviewModule,
1182
+ ]] });
1183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageTemplatesModule, decorators: [{
1184
+ type: NgModule,
1185
+ args: [{
1186
+ imports: [
1187
+ RouterModule,
1188
+ CommonModule,
1189
+ FormsModule,
1190
+ MatTooltipModule,
1191
+ MatDialogModule,
1192
+ MatButtonModule,
1193
+ MatTabsModule,
1194
+ MatFormFieldModule,
1195
+ MatFormFieldModule,
1196
+ MatInputModule,
1197
+ FsListModule,
1198
+ FsDialogModule,
1199
+ FsLabelModule,
1200
+ FlexLayoutModule,
1201
+ FsSkeletonModule,
1202
+ FsFormModule,
1203
+ FsTextEditorModule,
1204
+ FsAppMessagePreviewModule,
1205
+ ],
1206
+ declarations: [
1207
+ TemplatesComponent,
1208
+ TemplateComponent,
1209
+ ],
1210
+ exports: [
1211
+ TemplatesComponent,
1212
+ TemplateComponent,
1213
+ ],
1214
+ }]
1130
1215
  }] });
1131
1216
 
1132
- class WebhooksComponent {
1133
- constructor(_config, _message) {
1134
- this._config = _config;
1135
- this._message = _message;
1136
- }
1137
- ngOnInit() {
1138
- this.listConfig = {
1139
- paging: false,
1140
- actions: [
1141
- {
1142
- click: () => {
1143
- this._config.createWebhook()
1144
- .subscribe(() => {
1145
- this._message.success('Created webhook');
1146
- this.list.reload();
1147
- });
1148
- },
1149
- label: 'Create',
1150
- },
1151
- ],
1152
- rowActions: [
1153
- {
1154
- click: (webhook) => {
1155
- this._config.deleteWebhook(webhook)
1156
- .subscribe(() => {
1157
- this._message.success('Deleted webhook');
1158
- this.list.reload();
1159
- });
1160
- },
1161
- label: 'Delete',
1162
- },
1163
- ],
1164
- fetch: () => {
1165
- return this._config.loadWebhooks()
1166
- .pipe(map((webhooks) => ({ data: webhooks })));
1167
- },
1168
- };
1169
- }
1170
- }
1171
- WebhooksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WebhooksComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i2$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
1172
- WebhooksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WebhooksComponent, selector: "fs-app-message-webhooks", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\r\n <fs-list-column title=\"URL\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.url}}\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column title=\"Created\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.createDate | fsDate}}\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>", components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i10$1.FsDatePipe } });
1173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WebhooksComponent, decorators: [{
1174
- type: Component,
1175
- args: [{
1176
- selector: 'fs-app-message-webhooks',
1177
- templateUrl: './webhooks.component.html',
1178
- }]
1179
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1180
- type: Inject,
1181
- args: [FS_APP_MESSAGE_CONFIG]
1182
- }] }, { type: i2$1.FsMessage }]; }, propDecorators: { list: [{
1183
- type: ViewChild,
1184
- args: [FsListComponent]
1217
+ class WebhooksComponent {
1218
+ constructor(_config, _message) {
1219
+ this._config = _config;
1220
+ this._message = _message;
1221
+ }
1222
+ ngOnInit() {
1223
+ this.listConfig = {
1224
+ paging: false,
1225
+ actions: [
1226
+ {
1227
+ click: () => {
1228
+ this._config.createWebhook()
1229
+ .subscribe(() => {
1230
+ this._message.success('Created webhook');
1231
+ this.list.reload();
1232
+ });
1233
+ },
1234
+ label: 'Create',
1235
+ },
1236
+ ],
1237
+ rowActions: [
1238
+ {
1239
+ click: (webhook) => {
1240
+ this._config.deleteWebhook(webhook)
1241
+ .subscribe(() => {
1242
+ this._message.success('Deleted webhook');
1243
+ this.list.reload();
1244
+ });
1245
+ },
1246
+ label: 'Delete',
1247
+ },
1248
+ ],
1249
+ fetch: () => {
1250
+ return this._config.loadWebhooks()
1251
+ .pipe(map((webhooks) => ({ data: webhooks })));
1252
+ },
1253
+ };
1254
+ }
1255
+ }
1256
+ WebhooksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WebhooksComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
1257
+ WebhooksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WebhooksComponent, selector: "fs-app-message-webhooks", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\r\n <fs-list-column title=\"URL\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.url}}\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column title=\"Created\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.createDate | fsDate}}\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>", components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i10$1.FsDatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WebhooksComponent, decorators: [{
1259
+ type: Component,
1260
+ args: [{
1261
+ selector: 'fs-app-message-webhooks',
1262
+ templateUrl: './webhooks.component.html',
1263
+ changeDetection: ChangeDetectionStrategy.OnPush,
1264
+ }]
1265
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1266
+ type: Inject,
1267
+ args: [FS_APP_MESSAGE_CONFIG]
1268
+ }] }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
1269
+ type: ViewChild,
1270
+ args: [FsListComponent]
1185
1271
  }] } });
1186
1272
 
1187
- class FsAppMessageWebhooksModule {
1188
- }
1189
- FsAppMessageWebhooksModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1190
- FsAppMessageWebhooksModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, declarations: [WebhooksComponent], imports: [FsListModule,
1191
- FsDateModule], exports: [WebhooksComponent] });
1192
- FsAppMessageWebhooksModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, imports: [[
1193
- FsListModule,
1194
- FsDateModule,
1195
- ]] });
1196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, decorators: [{
1197
- type: NgModule,
1198
- args: [{
1199
- imports: [
1200
- FsListModule,
1201
- FsDateModule,
1202
- ],
1203
- declarations: [
1204
- WebhooksComponent,
1205
- ],
1206
- exports: [
1207
- WebhooksComponent,
1208
- ],
1209
- }]
1273
+ class FsAppMessageWebhooksModule {
1274
+ }
1275
+ FsAppMessageWebhooksModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1276
+ FsAppMessageWebhooksModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, declarations: [WebhooksComponent], imports: [FsListModule,
1277
+ FsDateModule], exports: [WebhooksComponent] });
1278
+ FsAppMessageWebhooksModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, imports: [[
1279
+ FsListModule,
1280
+ FsDateModule,
1281
+ ]] });
1282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageWebhooksModule, decorators: [{
1283
+ type: NgModule,
1284
+ args: [{
1285
+ imports: [
1286
+ FsListModule,
1287
+ FsDateModule,
1288
+ ],
1289
+ declarations: [
1290
+ WebhooksComponent,
1291
+ ],
1292
+ exports: [
1293
+ WebhooksComponent,
1294
+ ],
1295
+ }]
1210
1296
  }] });
1211
1297
 
1212
- class FsAppMessageModule {
1213
- static forRoot() {
1214
- return {
1215
- ngModule: FsAppMessageModule,
1216
- };
1217
- }
1218
- }
1219
- FsAppMessageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1220
- FsAppMessageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule });
1221
- FsAppMessageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule });
1222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule, decorators: [{
1223
- type: NgModule,
1224
- args: [{}]
1298
+ class FsAppMessageModule {
1299
+ static forRoot() {
1300
+ return {
1301
+ ngModule: FsAppMessageModule,
1302
+ };
1303
+ }
1304
+ }
1305
+ FsAppMessageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1306
+ FsAppMessageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule });
1307
+ FsAppMessageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule });
1308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsAppMessageModule, decorators: [{
1309
+ type: NgModule,
1310
+ args: [{}]
1225
1311
  }] });
1226
1312
 
1227
- /*
1228
- * Public API Surface of fs-menu
1313
+ /*
1314
+ * Public API Surface of fs-menu
1229
1315
  */
1230
1316
 
1231
- /**
1232
- * Generated bundle index. Do not edit.
1317
+ /**
1318
+ * Generated bundle index. Do not edit.
1233
1319
  */
1234
1320
 
1235
1321
  export { FS_APP_MESSAGE_CONFIG, FsAppMessageModule, FsAppMessageQueuesModule, FsAppMessageTemplatesModule, FsAppMessageWebhooksModule, FsAppMessagesModule, FsMessageQueueService, MessageComponent, MessagesComponent, QueueComponent, QueuesComponent, TemplateComponent, TemplatesComponent, WebhooksComponent };