@firestitch/app-message 9.1.5 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) 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 -4
  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 +26 -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 +40 -36
  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 -8
  13. package/app/modules/message-preview/message-preview.module.d.ts +11 -2
  14. package/app/modules/message-queues/components/queue/queue.component.d.ts +43 -36
  15. package/app/modules/message-queues/components/queues/queues.component.d.ts +24 -21
  16. package/app/modules/message-queues/components/recipient/recipient.component.d.ts +10 -7
  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 -0
  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 -2
  22. package/app/modules/message-queues/enums/message-queue-event-type.enum.d.ts +4 -0
  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 -2
  26. package/app/modules/message-queues/pipes/linkify.pipe.d.ts +7 -4
  27. package/app/modules/message-queues/pipes/truncate.pipe.d.ts +7 -4
  28. package/app/modules/message-queues/services/message-queue.service.d.ts +12 -9
  29. package/app/modules/message-templates/components/index.d.ts +2 -0
  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 -20
  32. package/app/modules/message-templates/components/templates/index.d.ts +1 -0
  33. package/app/modules/message-templates/components/templates/templates.component.d.ts +19 -16
  34. package/app/modules/message-templates/message-templates.module.d.ts +25 -2
  35. package/app/modules/messages/components/index.d.ts +2 -2
  36. package/app/modules/messages/components/message/index.d.ts +1 -1
  37. package/app/modules/messages/components/message/message.component.d.ts +32 -29
  38. package/app/modules/messages/components/messages/index.d.ts +1 -1
  39. package/app/modules/messages/components/messages/messages.component.d.ts +19 -16
  40. package/app/modules/messages/consts/email-message-formats.const.d.ts +5 -5
  41. package/app/modules/messages/consts/index.d.ts +1 -1
  42. package/app/modules/messages/enums/email-message-format.enum.d.ts +5 -5
  43. package/app/modules/messages/enums/index.d.ts +1 -1
  44. package/app/modules/messages/messages.module.d.ts +29 -2
  45. package/app/modules/webhooks/components/webhooks/webhooks.component.d.ts +15 -12
  46. package/app/modules/webhooks/webhooks.module.d.ts +9 -2
  47. package/bundles/firestitch-app-message.umd.js +1572 -1244
  48. package/bundles/firestitch-app-message.umd.js.map +1 -1
  49. package/esm2015/app/helpers/index-name-value.js +8 -8
  50. package/esm2015/app/helpers/index.js +2 -2
  51. package/esm2015/app/modules/app-message/app-message.module.js +17 -15
  52. package/esm2015/app/modules/app-message/injectors/app-message-config.injector.js +4 -4
  53. package/esm2015/app/modules/app-message/injectors/index.js +2 -2
  54. package/esm2015/app/modules/app-message/interfaces/app-message-config.js +2 -1
  55. package/esm2015/app/modules/app-message/interfaces/index.js +2 -1
  56. package/esm2015/app/modules/app-message/types/index.js +2 -1
  57. package/esm2015/app/modules/app-message/types/types.type.js +2 -1
  58. package/esm2015/app/modules/message-preview/components/index.js +2 -2
  59. package/esm2015/app/modules/message-preview/components/preview/index.js +2 -2
  60. package/esm2015/app/modules/message-preview/components/preview/preview.component.js +29 -25
  61. package/esm2015/app/modules/message-preview/message-preview.module.js +38 -27
  62. package/esm2015/app/modules/message-queues/components/queue/queue.component.js +209 -187
  63. package/esm2015/app/modules/message-queues/components/queues/queues.component.js +145 -141
  64. package/esm2015/app/modules/message-queues/components/recipient/recipient.component.js +30 -29
  65. package/esm2015/app/modules/message-queues/consts/index.js +2 -2
  66. package/esm2015/app/modules/message-queues/consts/message-queue-event-type.const.js +6 -0
  67. package/esm2015/app/modules/message-queues/consts/message-queue-states.const.js +11 -11
  68. package/esm2015/app/modules/message-queues/enums/email-message-queue-format.enum.js +7 -7
  69. package/esm2015/app/modules/message-queues/enums/index.js +4 -3
  70. package/esm2015/app/modules/message-queues/enums/message-queue-event-type.enum.js +6 -0
  71. package/esm2015/app/modules/message-queues/enums/message-queue-state.enum.js +11 -11
  72. package/esm2015/app/modules/message-queues/enums/message-queue-type.enum.js +6 -6
  73. package/esm2015/app/modules/message-queues/message-queues.module.js +120 -68
  74. package/esm2015/app/modules/message-queues/pipes/linkify.pipe.js +22 -20
  75. package/esm2015/app/modules/message-queues/pipes/truncate.pipe.js +22 -20
  76. package/esm2015/app/modules/message-queues/services/message-queue.service.js +29 -31
  77. package/esm2015/app/modules/message-templates/components/index.js +3 -0
  78. package/esm2015/app/modules/message-templates/components/template/index.js +2 -2
  79. package/esm2015/app/modules/message-templates/components/template/template.component.js +84 -75
  80. package/esm2015/app/modules/message-templates/components/templates/index.js +2 -0
  81. package/esm2015/app/modules/message-templates/components/templates/templates.component.js +91 -91
  82. package/esm2015/app/modules/message-templates/message-templates.module.js +98 -57
  83. package/esm2015/app/modules/messages/components/index.js +3 -3
  84. package/esm2015/app/modules/messages/components/message/index.js +2 -2
  85. package/esm2015/app/modules/messages/components/message/message.component.js +137 -125
  86. package/esm2015/app/modules/messages/components/messages/index.js +2 -2
  87. package/esm2015/app/modules/messages/components/messages/messages.component.js +74 -78
  88. package/esm2015/app/modules/messages/consts/email-message-formats.const.js +7 -7
  89. package/esm2015/app/modules/messages/consts/index.js +2 -2
  90. package/esm2015/app/modules/messages/enums/email-message-format.enum.js +7 -7
  91. package/esm2015/app/modules/messages/enums/index.js +2 -2
  92. package/esm2015/app/modules/messages/messages.module.js +111 -64
  93. package/esm2015/app/modules/webhooks/components/webhooks/webhooks.component.js +64 -63
  94. package/esm2015/app/modules/webhooks/webhooks.module.js +30 -23
  95. package/esm2015/firestitch-app-message.js +5 -13
  96. package/esm2015/public_api.js +18 -16
  97. package/fesm2015/firestitch-app-message.js +1171 -982
  98. package/fesm2015/firestitch-app-message.js.map +1 -1
  99. package/firestitch-app-message.d.ts +5 -12
  100. package/package.json +5 -8
  101. package/public_api.d.ts +15 -13
  102. package/bundles/firestitch-app-message.umd.min.js +0 -2
  103. package/bundles/firestitch-app-message.umd.min.js.map +0 -1
  104. package/esm5/app/helpers/index-name-value.js +0 -8
  105. package/esm5/app/helpers/index.js +0 -2
  106. package/esm5/app/modules/app-message/app-message.module.js +0 -19
  107. package/esm5/app/modules/app-message/injectors/app-message-config.injector.js +0 -4
  108. package/esm5/app/modules/app-message/injectors/index.js +0 -2
  109. package/esm5/app/modules/app-message/interfaces/app-message-config.js +0 -1
  110. package/esm5/app/modules/app-message/interfaces/index.js +0 -1
  111. package/esm5/app/modules/app-message/types/index.js +0 -1
  112. package/esm5/app/modules/app-message/types/types.type.js +0 -1
  113. package/esm5/app/modules/message-preview/components/index.js +0 -2
  114. package/esm5/app/modules/message-preview/components/preview/index.js +0 -2
  115. package/esm5/app/modules/message-preview/components/preview/preview.component.js +0 -26
  116. package/esm5/app/modules/message-preview/message-preview.module.js +0 -30
  117. package/esm5/app/modules/message-queues/components/queue/queue.component.js +0 -193
  118. package/esm5/app/modules/message-queues/components/queues/queues.component.js +0 -143
  119. package/esm5/app/modules/message-queues/components/recipient/recipient.component.js +0 -32
  120. package/esm5/app/modules/message-queues/consts/index.js +0 -2
  121. package/esm5/app/modules/message-queues/consts/message-queue-states.const.js +0 -11
  122. package/esm5/app/modules/message-queues/enums/email-message-queue-format.enum.js +0 -7
  123. package/esm5/app/modules/message-queues/enums/index.js +0 -3
  124. package/esm5/app/modules/message-queues/enums/message-queue-state.enum.js +0 -11
  125. package/esm5/app/modules/message-queues/enums/message-queue-type.enum.js +0 -6
  126. package/esm5/app/modules/message-queues/message-queues.module.js +0 -71
  127. package/esm5/app/modules/message-queues/pipes/linkify.pipe.js +0 -23
  128. package/esm5/app/modules/message-queues/pipes/truncate.pipe.js +0 -26
  129. package/esm5/app/modules/message-queues/services/message-queue.service.js +0 -33
  130. package/esm5/app/modules/message-templates/components/template/index.js +0 -2
  131. package/esm5/app/modules/message-templates/components/template/template.component.js +0 -78
  132. package/esm5/app/modules/message-templates/components/templates/templates.component.js +0 -94
  133. package/esm5/app/modules/message-templates/message-templates.module.js +0 -60
  134. package/esm5/app/modules/messages/components/index.js +0 -3
  135. package/esm5/app/modules/messages/components/message/index.js +0 -2
  136. package/esm5/app/modules/messages/components/message/message.component.js +0 -130
  137. package/esm5/app/modules/messages/components/messages/index.js +0 -2
  138. package/esm5/app/modules/messages/components/messages/messages.component.js +0 -81
  139. package/esm5/app/modules/messages/consts/email-message-formats.const.js +0 -7
  140. package/esm5/app/modules/messages/consts/index.js +0 -2
  141. package/esm5/app/modules/messages/enums/email-message-format.enum.js +0 -7
  142. package/esm5/app/modules/messages/enums/index.js +0 -2
  143. package/esm5/app/modules/messages/messages.module.js +0 -67
  144. package/esm5/app/modules/webhooks/components/webhooks/webhooks.component.js +0 -65
  145. package/esm5/app/modules/webhooks/webhooks.module.js +0 -26
  146. package/esm5/firestitch-app-message.js +0 -13
  147. package/esm5/public_api.js +0 -16
  148. package/fesm5/firestitch-app-message.js +0 -1107
  149. package/fesm5/firestitch-app-message.js.map +0 -1
  150. package/firestitch-app-message.metadata.json +0 -1
@@ -1,1107 +0,0 @@
1
- import { __decorate, __param, __metadata, __assign, __spread } from 'tslib';
2
- import { Inject, Component, InjectionToken, ChangeDetectorRef, ChangeDetectionStrategy, ViewChild, NgModule, Injectable, Input, Pipe } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { RouterModule } from '@angular/router';
5
- import { FlexLayoutModule } from '@angular/flex-layout';
6
- import { MatButtonModule } from '@angular/material/button';
7
- import { MatOptionModule } from '@angular/material/core';
8
- import { MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
9
- import { MatFormFieldModule } from '@angular/material/form-field';
10
- import { MatInputModule } from '@angular/material/input';
11
- import { MatSelectModule } from '@angular/material/select';
12
- import { MatTabsModule } from '@angular/material/tabs';
13
- import { MatCheckboxModule } from '@angular/material/checkbox';
14
- import { MatTooltipModule } from '@angular/material/tooltip';
15
- import { FsLabelModule } from '@firestitch/label';
16
- import { FsDialogModule } from '@firestitch/dialog';
17
- import { FsListComponent, FsListModule } from '@firestitch/list';
18
- import { FsSkeletonModule } from '@firestitch/skeleton';
19
- import { FormsModule } from '@angular/forms';
20
- import { FsFormModule } from '@firestitch/form';
21
- import { FsTextEditorModule } from '@firestitch/text-editor';
22
- import { FsEditorRichTextModule } from '@firestitch/editor';
23
- import { tap, switchMap, map, takeUntil } from 'rxjs/operators';
24
- import { of, Subject } from 'rxjs';
25
- import { ItemType } from '@firestitch/filter';
26
- import { FsMessage } from '@firestitch/message';
27
- import { FsPrompt, FsPromptInputModule } from '@firestitch/prompt';
28
- import { FsIFrameModule } from '@firestitch/iframe';
29
- import { MatIconModule } from '@angular/material/icon';
30
- import { FsDateModule } from '@firestitch/date';
31
- import { SelectionActionType } from '@firestitch/selection';
32
- import anchorme from 'anchorme';
33
-
34
- var EmailMessageFormat;
35
- (function (EmailMessageFormat) {
36
- EmailMessageFormat["Text"] = "T";
37
- EmailMessageFormat["HTML"] = "H";
38
- EmailMessageFormat["RichText"] = "R";
39
- })(EmailMessageFormat || (EmailMessageFormat = {}));
40
-
41
- var EmailMessageFormats = [
42
- { name: 'Text', value: EmailMessageFormat.Text },
43
- { name: 'HTML', value: EmailMessageFormat.HTML },
44
- { name: 'Rich Text', value: EmailMessageFormat.RichText }
45
- ];
46
-
47
- var PreviewComponent = /** @class */ (function () {
48
- function PreviewComponent(_data) {
49
- this._data = _data;
50
- this.html = _data.html;
51
- this.styles = _data.styles;
52
- }
53
- PreviewComponent.prototype.ngOnInit = function () {
54
- };
55
- PreviewComponent.ctorParameters = function () { return [
56
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
57
- ]; };
58
- PreviewComponent = __decorate([
59
- Component({
60
- 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",
61
- styles: [""]
62
- }),
63
- __param(0, Inject(MAT_DIALOG_DATA)),
64
- __metadata("design:paramtypes", [Object])
65
- ], PreviewComponent);
66
- return PreviewComponent;
67
- }());
68
-
69
- var FS_APP_MESSAGE_ROOT_CONFIG = new InjectionToken('fs-app-message-root-config');
70
- var FS_APP_MESSAGE_CONFIG = new InjectionToken('fs-app-message-config');
71
-
72
- var MessageComponent = /** @class */ (function () {
73
- function MessageComponent(_config, _data, _prompt, _message, _dialog, _cdRef) {
74
- var _this = this;
75
- this._config = _config;
76
- this._data = _data;
77
- this._prompt = _prompt;
78
- this._message = _message;
79
- this._dialog = _dialog;
80
- this._cdRef = _cdRef;
81
- this.messageTemplates = [];
82
- this.emailMessageFormats = EmailMessageFormats;
83
- this.emailMessageFormat = EmailMessageFormat;
84
- this.save = function () {
85
- return _this._config.saveMessage(_this.message)
86
- .pipe(tap(function () {
87
- _this._message.success('Saved Changes');
88
- }));
89
- };
90
- }
91
- MessageComponent.prototype.ngOnInit = function () {
92
- var _this = this;
93
- this._config.loadMessage(this._data.message)
94
- .subscribe(function (response) {
95
- _this.message = response;
96
- if (_this.message.emailMessage && _this.message.emailMessage.customize === undefined) {
97
- _this.message.emailMessage.customize = true;
98
- }
99
- if (_this.message.smsMessage && _this.message.smsMessage.customize === undefined) {
100
- _this.message.smsMessage.customize = true;
101
- }
102
- _this._cdRef.markForCheck();
103
- });
104
- this._config.loadMessageTemplates()
105
- .subscribe(function (data) {
106
- _this.messageTemplates = data.data;
107
- _this._cdRef.markForCheck();
108
- });
109
- };
110
- MessageComponent.prototype.tabChange = function (event) {
111
- switch (event.tab.textLabel) {
112
- case 'SMS Message':
113
- this.tab = 'sms';
114
- break;
115
- case 'Email Message':
116
- this.tab = 'email';
117
- break;
118
- default:
119
- this.tab = null;
120
- }
121
- };
122
- MessageComponent.prototype.openPreview = function () {
123
- var _this = this;
124
- var html = this.message.emailMessage.body;
125
- var styles = this.message.emailMessage.styles;
126
- if (this.message.emailMessage.messageTemplateId) {
127
- var messageTemplate = this.messageTemplates
128
- .find(function (item) {
129
- return _this.message.emailMessage.messageTemplateId === item.id;
130
- });
131
- if (messageTemplate) {
132
- html = messageTemplate.content.replace('{$content}', html);
133
- styles = messageTemplate.styles.concat(styles);
134
- }
135
- }
136
- this._dialog.open(PreviewComponent, {
137
- data: {
138
- styles: styles,
139
- html: html,
140
- },
141
- width: '95%'
142
- });
143
- };
144
- MessageComponent.prototype.sendTest = function (type) {
145
- var _this = this;
146
- of(true)
147
- .pipe(switchMap(function () {
148
- return type === 'email' ? _this._config.getTestEmail() : of('');
149
- }), switchMap(function (default_) {
150
- var typeName = type === 'email' ? 'an email' : 'phone number';
151
- return _this._prompt.input({
152
- label: "Please enter " + typeName + " to send test to",
153
- title: 'Send Test',
154
- commitLabel: 'Send',
155
- default: default_,
156
- required: true
157
- });
158
- }))
159
- .subscribe(function (value) {
160
- _this._config.testMessage(_this.message, value, type)
161
- .subscribe(function () {
162
- _this._message.success('Test Sent');
163
- });
164
- });
165
- };
166
- MessageComponent.ctorParameters = function () { return [
167
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
168
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
169
- { type: FsPrompt },
170
- { type: FsMessage },
171
- { type: MatDialog },
172
- { type: ChangeDetectorRef }
173
- ]; };
174
- MessageComponent = __decorate([
175
- Component({
176
- template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"message\"\n [dirtyConfirmTabs]=\"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-editor-rich-text\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\">\n </fs-editor-rich-text>\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\"\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\n class=\"email-body-html-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\">\n {{message.defaultEmailBody}}\n </div>\n <div\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n fsEditorRenderer\n name=\"defaultEmailBody\"\n [ngModel]=\"message.defaultEmailBody\">\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",
177
- changeDetection: ChangeDetectionStrategy.OnPush,
178
- styles: ["fs-label-field .content{white-space:pre-wrap}:host ::ng-deep .mat-tab-body,:host ::ng-deep .mat-tab-body-content{overflow:visible}:host ::ng-deep .sms-message{width:100%}:host ::ng-deep .email-body-html-default,:host ::ng-deep .email-body-text-default{white-space:pre-line}.email-body-text{width:100%}.variable{margin-bottom:4px}"]
179
- }),
180
- __param(0, Inject(FS_APP_MESSAGE_CONFIG)),
181
- __param(1, Inject(MAT_DIALOG_DATA)),
182
- __metadata("design:paramtypes", [Object, Object, FsPrompt,
183
- FsMessage,
184
- MatDialog,
185
- ChangeDetectorRef])
186
- ], MessageComponent);
187
- return MessageComponent;
188
- }());
189
-
190
- function indexNameValue(arry) {
191
- var obj = {};
192
- arry.forEach(function (item) {
193
- obj[item.value] = item.name;
194
- });
195
- return obj;
196
- }
197
-
198
- var MessagesComponent = /** @class */ (function () {
199
- function MessagesComponent(_config, _dialog) {
200
- this._config = _config;
201
- this._dialog = _dialog;
202
- this.list = null;
203
- this.config = null;
204
- this.emailMessageFormats = {};
205
- this._destroy$ = new Subject();
206
- }
207
- MessagesComponent.prototype.ngOnInit = function () {
208
- var _this = this;
209
- this.emailMessageFormats = indexNameValue(EmailMessageFormats);
210
- this.config = {
211
- filters: [
212
- {
213
- name: 'keyword',
214
- type: ItemType.Keyword,
215
- label: 'Search'
216
- }
217
- ],
218
- fetch: function (query) {
219
- return _this._config.loadMessages(query)
220
- .pipe(map(function (response) {
221
- return ({ data: response.data, paging: response.paging });
222
- }));
223
- }
224
- };
225
- };
226
- MessagesComponent.prototype.open = function (message) {
227
- var _this = this;
228
- var dialogRef = this._dialog.open(MessageComponent, {
229
- data: {
230
- message: message,
231
- },
232
- width: '85%'
233
- });
234
- dialogRef.afterClosed()
235
- .pipe(takeUntil(this._destroy$))
236
- .subscribe(function (response) {
237
- if (response) {
238
- _this.list.updateData(response, function (row) {
239
- return row.id === response.id;
240
- });
241
- }
242
- });
243
- };
244
- MessagesComponent.prototype.ngOnDestroy = function () {
245
- this._destroy$.next();
246
- this._destroy$.complete();
247
- };
248
- MessagesComponent.ctorParameters = function () { return [
249
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
250
- { type: MatDialog }
251
- ]; };
252
- __decorate([
253
- ViewChild(FsListComponent, { static: true }),
254
- __metadata("design:type", FsListComponent)
255
- ], MessagesComponent.prototype, "list", void 0);
256
- MessagesComponent = __decorate([
257
- Component({
258
- selector: 'fs-app-messages',
259
- 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>\n"
260
- }),
261
- __param(0, Inject(FS_APP_MESSAGE_CONFIG)),
262
- __metadata("design:paramtypes", [Object, MatDialog])
263
- ], MessagesComponent);
264
- return MessagesComponent;
265
- }());
266
-
267
- var FsAppMessagePreviewModule = /** @class */ (function () {
268
- function FsAppMessagePreviewModule() {
269
- }
270
- FsAppMessagePreviewModule = __decorate([
271
- NgModule({
272
- imports: [
273
- MatDialogModule,
274
- MatButtonModule,
275
- FsDialogModule,
276
- FsIFrameModule,
277
- ],
278
- declarations: [
279
- PreviewComponent,
280
- ],
281
- exports: [
282
- PreviewComponent,
283
- ]
284
- })
285
- ], FsAppMessagePreviewModule);
286
- return FsAppMessagePreviewModule;
287
- }());
288
-
289
- var FsAppMessagesModule = /** @class */ (function () {
290
- function FsAppMessagesModule() {
291
- }
292
- FsAppMessagesModule = __decorate([
293
- NgModule({
294
- imports: [
295
- RouterModule,
296
- CommonModule,
297
- FormsModule,
298
- MatDialogModule,
299
- MatButtonModule,
300
- MatTabsModule,
301
- MatFormFieldModule,
302
- MatInputModule,
303
- MatOptionModule,
304
- MatSelectModule,
305
- MatTooltipModule,
306
- MatCheckboxModule,
307
- FsDialogModule,
308
- FsListModule,
309
- FsLabelModule,
310
- FlexLayoutModule,
311
- FsSkeletonModule,
312
- FsFormModule,
313
- FsTextEditorModule,
314
- FsEditorRichTextModule,
315
- FsAppMessagePreviewModule,
316
- ],
317
- declarations: [
318
- MessagesComponent,
319
- MessageComponent,
320
- ],
321
- exports: [
322
- MessagesComponent,
323
- MessageComponent,
324
- ],
325
- })
326
- ], FsAppMessagesModule);
327
- return FsAppMessagesModule;
328
- }());
329
-
330
- var MessageQueueState;
331
- (function (MessageQueueState) {
332
- MessageQueueState["Sent"] = "S";
333
- MessageQueueState["PartiallySent"] = "P";
334
- MessageQueueState["Sending"] = "E";
335
- MessageQueueState["Queued"] = "Q";
336
- MessageQueueState["Canceled"] = "C";
337
- MessageQueueState["InvalidRecipients"] = "I";
338
- MessageQueueState["Failed"] = "F";
339
- })(MessageQueueState || (MessageQueueState = {}));
340
-
341
- var MessageQueueStates = [
342
- { name: 'Sent', value: MessageQueueState.Sent },
343
- { name: 'Partially Sent', value: MessageQueueState.PartiallySent },
344
- { name: 'Sending', value: MessageQueueState.Sending },
345
- { name: 'Queued', value: MessageQueueState.Queued },
346
- { name: 'Canceled', value: MessageQueueState.Canceled },
347
- { name: 'Invalid Recipients', value: MessageQueueState.InvalidRecipients },
348
- { name: 'Failed', value: MessageQueueState.Failed }
349
- ];
350
-
351
- var EmailMessageQueueFormat;
352
- (function (EmailMessageQueueFormat) {
353
- EmailMessageQueueFormat["Text"] = "T";
354
- EmailMessageQueueFormat["HTML"] = "H";
355
- EmailMessageQueueFormat["RichText"] = "R";
356
- })(EmailMessageQueueFormat || (EmailMessageQueueFormat = {}));
357
-
358
- var MessageQueueType;
359
- (function (MessageQueueType) {
360
- MessageQueueType["Sms"] = "S";
361
- MessageQueueType["Email"] = "E";
362
- })(MessageQueueType || (MessageQueueType = {}));
363
-
364
- var QueueComponent = /** @class */ (function () {
365
- function QueueComponent(_config, _message, _prompt, _dialog, _data) {
366
- this._config = _config;
367
- this._message = _message;
368
- this._prompt = _prompt;
369
- this._dialog = _dialog;
370
- this._data = _data;
371
- this.messageQueueRecipients = {};
372
- this.emailMessageQueueFormat = EmailMessageQueueFormat;
373
- this._destroy$ = new Subject();
374
- }
375
- QueueComponent.prototype.ngOnInit = function () {
376
- var _this = this;
377
- this.messageQueueStates = indexNameValue(MessageQueueStates);
378
- this.resendMessageQueue = this._config.resendMessageQueue;
379
- this.forwardMessageQueue = this._config.forwardMessageQueue;
380
- this._config.loadMessageQueue(this._data.messageQueueId)
381
- .subscribe(function (messageQueue) {
382
- _this.messageQueue = messageQueue;
383
- if (_this.messageQueue.emailMessageQueue) {
384
- var body = _this.messageQueue.emailMessageQueue.body;
385
- if (_this.messageQueue.emailMessageQueue.format === EmailMessageQueueFormat.HTML) {
386
- try {
387
- var doc = new DOMParser().parseFromString(body, 'text/html');
388
- doc.querySelectorAll('a').forEach(function (el) {
389
- el.setAttribute('target', '_blank');
390
- });
391
- body = doc.documentElement.innerHTML;
392
- }
393
- catch (e) {
394
- }
395
- }
396
- else {
397
- body = _this.anchorme(body);
398
- }
399
- _this.messageQueue.emailMessageQueue.body = body;
400
- }
401
- if (_this.messageQueue.smsMessageQueue) {
402
- _this.messageQueue.smsMessageQueue.body = _this.anchorme(_this.messageQueue.smsMessageQueue.body);
403
- }
404
- _this.messageQueueRecipients = _this.messageQueue.messageQueueRecipients
405
- .reduce(function (accum, messageQueueRecipient) {
406
- accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
407
- return accum;
408
- }, {});
409
- _this._setLogsConfig(messageQueue);
410
- _this._setAttachmentsConfig(messageQueue);
411
- });
412
- };
413
- QueueComponent.prototype.anchorme = function (html) {
414
- return anchorme(html, {
415
- options: {
416
- attributes: [
417
- {
418
- name: 'target',
419
- value: '_blank'
420
- },
421
- ],
422
- },
423
- });
424
- };
425
- QueueComponent.prototype.openMessage = function (message) {
426
- this._dialog.open(MessageComponent, {
427
- data: {
428
- message: message,
429
- },
430
- width: '85%'
431
- });
432
- };
433
- QueueComponent.prototype.resend = function () {
434
- var _this = this;
435
- this._prompt.confirm({
436
- title: 'Confirm',
437
- template: 'Are you sure you would like to resend this message?'
438
- }).subscribe(function () {
439
- _this.resendMessageQueue(_this.messageQueue)
440
- .subscribe(function (messageQueue) {
441
- Object.assign(_this.messageQueue, messageQueue);
442
- _this._message.success('Successfully resent');
443
- if (_this.logList) {
444
- _this.logList.reload();
445
- }
446
- });
447
- });
448
- };
449
- QueueComponent.prototype.forward = function () {
450
- var _this = this;
451
- var typeName = this.messageQueue.type === MessageQueueType.Email ? 'an email' : 'a phone number';
452
- this._prompt.input({
453
- label: "Please enter " + typeName + " to forward to",
454
- title: 'Forward Message',
455
- commitLabel: 'Forward',
456
- required: true
457
- }).subscribe(function (value) {
458
- if (value) {
459
- _this.forwardMessageQueue(_this.messageQueue, value)
460
- .subscribe(function (messageQueue) {
461
- _this.messageQueue = __assign(__assign({}, _this.messageQueue), { messageQueue: messageQueue });
462
- _this._message.success('Successfully forwarded');
463
- if (_this.logList) {
464
- _this.logList.reload();
465
- }
466
- });
467
- }
468
- });
469
- };
470
- QueueComponent.prototype.ngOnDestroy = function () {
471
- this._destroy$.next();
472
- this._destroy$.complete();
473
- };
474
- QueueComponent.prototype._setLogsConfig = function (messageQueue) {
475
- var _this = this;
476
- this.logConfig = {
477
- loadMore: true,
478
- queryParam: false,
479
- fetch: function (query) {
480
- return _this._config.loadLogs(messageQueue, query);
481
- }
482
- };
483
- };
484
- QueueComponent.prototype._setAttachmentsConfig = function (messageQueue) {
485
- var _this = this;
486
- this.attachmentConfig = {
487
- queryParam: false,
488
- fetch: function (query) {
489
- return _this._config.loadMessageQueueAttachments(messageQueue, query)
490
- .pipe(map(function (response) { return ({
491
- data: response.data.map(function (value) {
492
- value.prettyFilesize = _this._prettyFilesize(value.filesize);
493
- return value;
494
- }), paging: response.paging
495
- }); }));
496
- }
497
- };
498
- if (this._config.downloadMessageQueueAttachment) {
499
- this.attachmentConfig.rowActions = [
500
- {
501
- click: function (messageAttachment) {
502
- _this._config.downloadMessageQueueAttachment(messageAttachment, _this.messageQueue);
503
- },
504
- label: 'Download',
505
- }
506
- ];
507
- }
508
- };
509
- QueueComponent.prototype._prettyFilesize = function (bytes) {
510
- if (bytes === 0) {
511
- return '0.00 B';
512
- }
513
- var e = Math.floor(Math.log(bytes) / Math.log(1024));
514
- return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
515
- };
516
- QueueComponent.ctorParameters = function () { return [
517
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
518
- { type: FsMessage },
519
- { type: FsPrompt },
520
- { type: MatDialog },
521
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
522
- ]; };
523
- __decorate([
524
- ViewChild('logList'),
525
- __metadata("design:type", FsListComponent)
526
- ], QueueComponent.prototype, "logList", void 0);
527
- QueueComponent = __decorate([
528
- Component({
529
- 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-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",
530
- styles: [".body,.subject{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}"]
531
- }),
532
- __param(0, Inject(FS_APP_MESSAGE_CONFIG)),
533
- __param(4, Inject(MAT_DIALOG_DATA)),
534
- __metadata("design:paramtypes", [Object, FsMessage,
535
- FsPrompt,
536
- MatDialog, Object])
537
- ], QueueComponent);
538
- return QueueComponent;
539
- }());
540
-
541
- var FsMessageQueueService = /** @class */ (function () {
542
- function FsMessageQueueService(_dialog) {
543
- this._dialog = _dialog;
544
- this._destroy$ = new Subject();
545
- }
546
- FsMessageQueueService.prototype.openMessageQueue = function (messageQueueId, options) {
547
- if (options === void 0) { options = {}; }
548
- return this._dialog.open(QueueComponent, __assign(__assign({}, options), { data: {
549
- messageQueueId: messageQueueId,
550
- }, width: options.width || '85%' })).afterClosed()
551
- .pipe(takeUntil(this._destroy$));
552
- };
553
- FsMessageQueueService.prototype.ngOnDestroy = function () {
554
- this._destroy$.next();
555
- this._destroy$.complete();
556
- };
557
- FsMessageQueueService.ctorParameters = function () { return [
558
- { type: MatDialog }
559
- ]; };
560
- FsMessageQueueService = __decorate([
561
- Injectable(),
562
- __metadata("design:paramtypes", [MatDialog])
563
- ], FsMessageQueueService);
564
- return FsMessageQueueService;
565
- }());
566
-
567
- var QueuesComponent = /** @class */ (function () {
568
- function QueuesComponent(_config, _dialog, _messageQueueService) {
569
- this._config = _config;
570
- this._dialog = _dialog;
571
- this._messageQueueService = _messageQueueService;
572
- this.list = null;
573
- this.query = {};
574
- this.config = null;
575
- this.messageQueueStates = {};
576
- this.MessageQueueState = MessageQueueState;
577
- this._destroy$ = new Subject();
578
- }
579
- QueuesComponent.prototype.ngOnInit = function () {
580
- var _this = this;
581
- this.messageQueueStates = indexNameValue(MessageQueueStates);
582
- this.config = {
583
- filters: [
584
- {
585
- name: 'keyword',
586
- type: ItemType.Keyword,
587
- label: 'Search'
588
- },
589
- {
590
- name: 'state',
591
- type: ItemType.Select,
592
- label: 'Status',
593
- values: function () {
594
- return MessageQueueStates;
595
- }
596
- },
597
- {
598
- name: 'date',
599
- type: ItemType.DateRange,
600
- label: ['From Date', 'To Date'],
601
- },
602
- ],
603
- sort: { value: 'created_date', direction: 'desc' },
604
- fetch: function (query) {
605
- query = __assign(__assign(__assign({}, query), _this.query), { messageQueueAttachmentCounts: true, emailMessageQueues: true, emailMessageQueueBodies: false, smsMessageQueues: true });
606
- return _this._config.loadMessageQueues(query)
607
- .pipe(map(function (response) { return ({ data: response.data
608
- .map(function (messageQueue) {
609
- return __assign(__assign({}, messageQueue), { messageQueueRecipients: messageQueue.messageQueueRecipients
610
- .reduce(function (accum, messageQueueRecipient) {
611
- accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
612
- return accum;
613
- }, {}) });
614
- }), paging: response.paging }); }));
615
- }
616
- };
617
- // if any bulk actions add the selection object to config.
618
- if (this._config.cancelMessageQueues) {
619
- this.config.selection = {
620
- selectAll: false,
621
- actions: [],
622
- actionSelected: function (action) {
623
- return of(true)
624
- .pipe(switchMap(function () {
625
- if (action.action.name === 'cancel') {
626
- return _this._config.cancelMessageQueues(action);
627
- }
628
- return of(true);
629
- }), tap(function () {
630
- _this.list.reload();
631
- }));
632
- }
633
- };
634
- }
635
- // add each individual bulk action to select actions
636
- if (this._config.cancelMessageQueues) {
637
- this.config.selection.actions.push({
638
- type: SelectionActionType.Action,
639
- name: 'cancel',
640
- label: 'Cancel Queued',
641
- });
642
- }
643
- this.config.filters.push({
644
- name: 'message_id',
645
- type: ItemType.Select,
646
- label: 'Message Type',
647
- values: function (query) {
648
- query = __assign(__assign({}, query), { limit: 50 });
649
- return _this._config.loadMessages(query)
650
- .pipe(map(function (response) {
651
- return __spread([
652
- { value: null, name: 'All', }
653
- ], response.data.map(function (item) { return ({ name: item.name, value: item.id }); }));
654
- }));
655
- }
656
- });
657
- };
658
- QueuesComponent.prototype.open = function (messageQueue) {
659
- var _this = this;
660
- this._messageQueueService.openMessageQueue(messageQueue.id)
661
- .pipe(takeUntil(this._destroy$))
662
- .subscribe(function () {
663
- _this.list.reload();
664
- });
665
- };
666
- QueuesComponent.prototype.ngOnDestroy = function () {
667
- this._destroy$.next();
668
- this._destroy$.complete();
669
- };
670
- QueuesComponent.ctorParameters = function () { return [
671
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
672
- { type: MatDialog },
673
- { type: FsMessageQueueService }
674
- ]; };
675
- __decorate([
676
- ViewChild(FsListComponent, { static: true }),
677
- __metadata("design:type", FsListComponent)
678
- ], QueuesComponent.prototype, "list", void 0);
679
- __decorate([
680
- Input(),
681
- __metadata("design:type", Object)
682
- ], QueuesComponent.prototype, "query", void 0);
683
- QueuesComponent = __decorate([
684
- Component({
685
- selector: 'fs-app-message-queues',
686
- 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>",
687
- 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}"]
688
- }),
689
- __param(0, Inject(FS_APP_MESSAGE_CONFIG)),
690
- __metadata("design:paramtypes", [Object, MatDialog,
691
- FsMessageQueueService])
692
- ], QueuesComponent);
693
- return QueuesComponent;
694
- }());
695
-
696
- var RecipientComponent = /** @class */ (function () {
697
- function RecipientComponent() {
698
- }
699
- RecipientComponent.prototype.ngOnInit = function () {
700
- var icons = {
701
- 'S': { name: 'check_circle', tooltip: 'Sent' },
702
- 'E': { name: 'offline_bolt', tooltip: 'Sending' },
703
- 'F': { name: 'info', tooltip: 'Failed' },
704
- };
705
- this.icon = icons[this.state];
706
- };
707
- __decorate([
708
- Input(),
709
- __metadata("design:type", Object)
710
- ], RecipientComponent.prototype, "name", void 0);
711
- __decorate([
712
- Input(),
713
- __metadata("design:type", Object)
714
- ], RecipientComponent.prototype, "state", void 0);
715
- RecipientComponent = __decorate([
716
- Component({
717
- selector: 'app-recipient',
718
- 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>",
719
- 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}"]
720
- })
721
- ], RecipientComponent);
722
- return RecipientComponent;
723
- }());
724
-
725
- var LinkifyPipe = /** @class */ (function () {
726
- function LinkifyPipe() {
727
- }
728
- LinkifyPipe.prototype.transform = function (value) {
729
- return anchorme(value, {
730
- attributes: [
731
- {
732
- name: 'target',
733
- value: '_blank'
734
- },
735
- ]
736
- });
737
- };
738
- LinkifyPipe = __decorate([
739
- Pipe({ name: 'linkify' })
740
- ], LinkifyPipe);
741
- return LinkifyPipe;
742
- }());
743
-
744
- var TruncatePipe = /** @class */ (function () {
745
- function TruncatePipe() {
746
- }
747
- TruncatePipe.prototype.transform = function (value, limit, completeWords, ellipsis) {
748
- if (limit === void 0) { limit = 25; }
749
- if (completeWords === void 0) { completeWords = false; }
750
- if (ellipsis === void 0) { ellipsis = '...'; }
751
- if (value.length < limit) {
752
- return "" + value.substr(0, limit);
753
- }
754
- if (completeWords) {
755
- limit = value.substr(0, limit).lastIndexOf(' ');
756
- }
757
- return "" + value.substr(0, limit) + ellipsis;
758
- };
759
- TruncatePipe = __decorate([
760
- Pipe({
761
- name: 'truncate'
762
- })
763
- ], TruncatePipe);
764
- return TruncatePipe;
765
- }());
766
-
767
- var FsAppMessageQueuesModule = /** @class */ (function () {
768
- function FsAppMessageQueuesModule() {
769
- }
770
- FsAppMessageQueuesModule = __decorate([
771
- NgModule({
772
- imports: [
773
- RouterModule,
774
- FormsModule,
775
- CommonModule,
776
- FlexLayoutModule,
777
- MatTooltipModule,
778
- MatDialogModule,
779
- MatButtonModule,
780
- MatIconModule,
781
- MatTabsModule,
782
- FsListModule,
783
- FsDialogModule,
784
- FsLabelModule,
785
- FsDateModule,
786
- FsSkeletonModule,
787
- FsAppMessagesModule,
788
- FsFormModule,
789
- FsPromptInputModule,
790
- FsIFrameModule,
791
- ],
792
- declarations: [
793
- QueuesComponent,
794
- QueueComponent,
795
- LinkifyPipe,
796
- TruncatePipe,
797
- RecipientComponent,
798
- ],
799
- exports: [
800
- QueuesComponent,
801
- QueueComponent,
802
- ],
803
- providers: [
804
- FsMessageQueueService
805
- ]
806
- })
807
- ], FsAppMessageQueuesModule);
808
- return FsAppMessageQueuesModule;
809
- }());
810
-
811
- var TemplateComponent = /** @class */ (function () {
812
- function TemplateComponent(_data, _config, _dialogRef, _message, _dialog) {
813
- var _this = this;
814
- this._data = _data;
815
- this._config = _config;
816
- this._dialogRef = _dialogRef;
817
- this._message = _message;
818
- this._dialog = _dialog;
819
- this.htmlEditorconfig = {
820
- language: 'html',
821
- insertSpaces: true,
822
- tabSize: 2,
823
- };
824
- this.cssEditorconfig = {
825
- language: 'scss',
826
- insertSpaces: true,
827
- tabSize: 2,
828
- };
829
- this.save = function (event) {
830
- return _this._config.saveMessageTemplate(_this.messageTemplate)
831
- .pipe(tap(function (messageTemplate) {
832
- _this._message.success('Saved Changes');
833
- if (event.submitter === 'save-close') {
834
- _this._dialogRef.close(messageTemplate);
835
- }
836
- }));
837
- };
838
- }
839
- TemplateComponent.prototype.ngOnInit = function () {
840
- var _this = this;
841
- if (this._data.messageTemplate.id) {
842
- this._config.loadMessageTemplate(this._data.messageTemplate)
843
- .subscribe(function (messageTemplate) {
844
- _this.messageTemplate = messageTemplate;
845
- });
846
- }
847
- else {
848
- this.messageTemplate = {};
849
- }
850
- };
851
- TemplateComponent.prototype.openPreview = function () {
852
- this._dialog.open(PreviewComponent, {
853
- data: {
854
- styles: this.messageTemplate.styles,
855
- html: this.messageTemplate.content,
856
- },
857
- width: '95%'
858
- });
859
- };
860
- TemplateComponent.ctorParameters = function () { return [
861
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
862
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
863
- { type: MatDialogRef },
864
- { type: FsMessage },
865
- { type: MatDialog }
866
- ]; };
867
- TemplateComponent = __decorate([
868
- Component({
869
- template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [dirtyConfirmTabs]=\"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 color=\"primary\" name=\"close\">Save</button>\n <button mat-button 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",
870
- styles: [".name{width:100%}:host ::ng-deep .mat-tab-body,:host ::ng-deep .mat-tab-body-content{overflow:visible}"]
871
- }),
872
- __param(0, Inject(MAT_DIALOG_DATA)),
873
- __param(1, Inject(FS_APP_MESSAGE_CONFIG)),
874
- __metadata("design:paramtypes", [Object, Object, MatDialogRef,
875
- FsMessage,
876
- MatDialog])
877
- ], TemplateComponent);
878
- return TemplateComponent;
879
- }());
880
-
881
- var TemplatesComponent = /** @class */ (function () {
882
- function TemplatesComponent(_config, _dialog) {
883
- this._config = _config;
884
- this._dialog = _dialog;
885
- this.list = null;
886
- this.config = null;
887
- this.messageQueueStates = [];
888
- this._destroy$ = new Subject();
889
- }
890
- TemplatesComponent.prototype.ngOnInit = function () {
891
- var _this = this;
892
- this.config = {
893
- actions: [
894
- {
895
- label: 'Create',
896
- click: function () {
897
- _this.open({});
898
- }
899
- }
900
- ],
901
- status: false,
902
- fetch: function (query) {
903
- return _this._config.loadMessageTemplates(query);
904
- }
905
- };
906
- if (this._config.deleteMessageTemplate) {
907
- this.config.rowActions = [
908
- {
909
- click: function (data) {
910
- return _this._config.deleteMessageTemplate(data);
911
- },
912
- remove: {
913
- title: 'Confirm',
914
- template: 'Are you sure you would like to delete this template?',
915
- },
916
- menu: true,
917
- label: 'Delete'
918
- }
919
- ];
920
- }
921
- };
922
- TemplatesComponent.prototype.open = function (messageTemplate) {
923
- var _this = this;
924
- var dialogRef = this._dialog.open(TemplateComponent, {
925
- data: {
926
- messageTemplate: messageTemplate,
927
- },
928
- width: '85%'
929
- });
930
- dialogRef.afterClosed()
931
- .pipe(takeUntil(this._destroy$))
932
- .subscribe(function (response) {
933
- if (response) {
934
- var update = _this.list.updateData(response, function (row) {
935
- return row.id === response.id;
936
- });
937
- if (!update) {
938
- _this.list.reload();
939
- }
940
- }
941
- });
942
- };
943
- TemplatesComponent.prototype.ngOnDestroy = function () {
944
- this._destroy$.next();
945
- this._destroy$.complete();
946
- };
947
- TemplatesComponent.ctorParameters = function () { return [
948
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
949
- { type: MatDialog }
950
- ]; };
951
- __decorate([
952
- ViewChild(FsListComponent, { static: true }),
953
- __metadata("design:type", FsListComponent)
954
- ], TemplatesComponent.prototype, "list", void 0);
955
- TemplatesComponent = __decorate([
956
- Component({
957
- selector: 'fs-app-message-templates',
958
- 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>"
959
- }),
960
- __param(0, Inject(FS_APP_MESSAGE_CONFIG)),
961
- __metadata("design:paramtypes", [Object, MatDialog])
962
- ], TemplatesComponent);
963
- return TemplatesComponent;
964
- }());
965
-
966
- var FsAppMessageTemplatesModule = /** @class */ (function () {
967
- function FsAppMessageTemplatesModule() {
968
- }
969
- FsAppMessageTemplatesModule = __decorate([
970
- NgModule({
971
- imports: [
972
- RouterModule,
973
- CommonModule,
974
- FormsModule,
975
- MatTooltipModule,
976
- MatDialogModule,
977
- MatButtonModule,
978
- MatTabsModule,
979
- MatFormFieldModule,
980
- MatFormFieldModule,
981
- MatInputModule,
982
- FsListModule,
983
- FsDialogModule,
984
- FsLabelModule,
985
- FlexLayoutModule,
986
- FsSkeletonModule,
987
- FsFormModule,
988
- FsTextEditorModule,
989
- FsAppMessagePreviewModule,
990
- ],
991
- declarations: [
992
- TemplatesComponent,
993
- TemplateComponent,
994
- ],
995
- exports: [
996
- TemplatesComponent,
997
- TemplateComponent,
998
- ],
999
- })
1000
- ], FsAppMessageTemplatesModule);
1001
- return FsAppMessageTemplatesModule;
1002
- }());
1003
-
1004
- var WebhooksComponent = /** @class */ (function () {
1005
- function WebhooksComponent(_config, _message) {
1006
- this._config = _config;
1007
- this._message = _message;
1008
- }
1009
- WebhooksComponent.prototype.ngOnInit = function () {
1010
- var _this = this;
1011
- this.listConfig = {
1012
- paging: false,
1013
- actions: [
1014
- {
1015
- click: function () {
1016
- _this._config.createWebhook()
1017
- .subscribe(function () {
1018
- _this._message.success('Created webhook');
1019
- _this.list.reload();
1020
- });
1021
- },
1022
- label: 'Create',
1023
- },
1024
- ],
1025
- rowActions: [
1026
- {
1027
- click: function (webhook) {
1028
- _this._config.deleteWebhook(webhook)
1029
- .subscribe(function () {
1030
- _this._message.success('Deleted webhook');
1031
- _this.list.reload();
1032
- });
1033
- },
1034
- label: 'Delete',
1035
- },
1036
- ],
1037
- fetch: function () {
1038
- return _this._config.loadWebhooks()
1039
- .pipe(map(function (webhooks) { return ({ data: webhooks }); }));
1040
- },
1041
- };
1042
- };
1043
- WebhooksComponent.ctorParameters = function () { return [
1044
- { type: undefined, decorators: [{ type: Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
1045
- { type: FsMessage }
1046
- ]; };
1047
- __decorate([
1048
- ViewChild(FsListComponent),
1049
- __metadata("design:type", FsListComponent)
1050
- ], WebhooksComponent.prototype, "list", void 0);
1051
- WebhooksComponent = __decorate([
1052
- Component({
1053
- selector: 'fs-app-message-webhooks',
1054
- 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>"
1055
- }),
1056
- __param(0, Inject(FS_APP_MESSAGE_CONFIG)),
1057
- __metadata("design:paramtypes", [Object, FsMessage])
1058
- ], WebhooksComponent);
1059
- return WebhooksComponent;
1060
- }());
1061
-
1062
- var FsAppMessageWebhooksModule = /** @class */ (function () {
1063
- function FsAppMessageWebhooksModule() {
1064
- }
1065
- FsAppMessageWebhooksModule = __decorate([
1066
- NgModule({
1067
- imports: [
1068
- FsListModule,
1069
- FsDateModule,
1070
- ],
1071
- declarations: [
1072
- WebhooksComponent,
1073
- ],
1074
- exports: [
1075
- WebhooksComponent,
1076
- ],
1077
- })
1078
- ], FsAppMessageWebhooksModule);
1079
- return FsAppMessageWebhooksModule;
1080
- }());
1081
-
1082
- var FsAppMessageModule = /** @class */ (function () {
1083
- function FsAppMessageModule() {
1084
- }
1085
- FsAppMessageModule_1 = FsAppMessageModule;
1086
- FsAppMessageModule.forRoot = function () {
1087
- return {
1088
- ngModule: FsAppMessageModule_1,
1089
- };
1090
- };
1091
- var FsAppMessageModule_1;
1092
- FsAppMessageModule = FsAppMessageModule_1 = __decorate([
1093
- NgModule({})
1094
- ], FsAppMessageModule);
1095
- return FsAppMessageModule;
1096
- }());
1097
-
1098
- /*
1099
- * Public API Surface of fs-menu
1100
- */
1101
-
1102
- /**
1103
- * Generated bundle index. Do not edit.
1104
- */
1105
-
1106
- export { FS_APP_MESSAGE_CONFIG, FsAppMessageModule, FsAppMessageQueuesModule, FsAppMessageTemplatesModule, FsAppMessageWebhooksModule, FsAppMessagesModule, FsMessageQueueService, MessageComponent, MessagesComponent, QueueComponent, QueuesComponent, TemplatesComponent, FsAppMessagePreviewModule as ɵa, PreviewComponent as ɵb, FS_APP_MESSAGE_CONFIG as ɵc, LinkifyPipe as ɵd, TruncatePipe as ɵe, RecipientComponent as ɵf, TemplateComponent as ɵg, WebhooksComponent as ɵh };
1107
- //# sourceMappingURL=firestitch-app-message.js.map