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