@firestitch/app-message 12.4.0 → 12.5.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 (101) 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 +25 -25
  7. package/app/modules/app-message/interfaces/index.d.ts +1 -1
  8. package/app/modules/app-message/types/index.d.ts +1 -1
  9. package/app/modules/app-message/types/types.type.d.ts +40 -40
  10. package/app/modules/message-preview/components/index.d.ts +1 -1
  11. package/app/modules/message-preview/components/preview/index.d.ts +1 -1
  12. package/app/modules/message-preview/components/preview/preview.component.d.ts +11 -11
  13. package/app/modules/message-preview/message-preview.module.d.ts +11 -11
  14. package/app/modules/message-queues/components/queue/queue.component.d.ts +43 -43
  15. package/app/modules/message-queues/components/queues/queues.component.d.ts +24 -24
  16. package/app/modules/message-queues/components/recipient/recipient.component.d.ts +10 -10
  17. package/app/modules/message-queues/consts/index.d.ts +1 -1
  18. package/app/modules/message-queues/consts/message-queue-event-type.const.d.ts +5 -5
  19. package/app/modules/message-queues/consts/message-queue-states.const.d.ts +5 -5
  20. package/app/modules/message-queues/enums/email-message-queue-format.enum.d.ts +5 -5
  21. package/app/modules/message-queues/enums/index.d.ts +3 -3
  22. package/app/modules/message-queues/enums/message-queue-event-type.enum.d.ts +4 -4
  23. package/app/modules/message-queues/enums/message-queue-state.enum.d.ts +9 -9
  24. package/app/modules/message-queues/enums/message-queue-type.enum.d.ts +4 -4
  25. package/app/modules/message-queues/message-queues.module.d.ts +29 -29
  26. package/app/modules/message-queues/pipes/linkify.pipe.d.ts +7 -7
  27. package/app/modules/message-queues/pipes/truncate.pipe.d.ts +7 -7
  28. package/app/modules/message-queues/services/message-queue.service.d.ts +12 -12
  29. package/app/modules/message-templates/components/index.d.ts +2 -2
  30. package/app/modules/message-templates/components/template/index.d.ts +1 -1
  31. package/app/modules/message-templates/components/template/template.component.d.ts +23 -23
  32. package/app/modules/message-templates/components/templates/index.d.ts +1 -1
  33. package/app/modules/message-templates/components/templates/templates.component.d.ts +19 -19
  34. package/app/modules/message-templates/message-templates.module.d.ts +25 -25
  35. package/app/modules/messages/components/index.d.ts +2 -2
  36. package/app/modules/messages/components/message/index.d.ts +1 -1
  37. package/app/modules/messages/components/message/message.component.d.ts +32 -32
  38. package/app/modules/messages/components/messages/index.d.ts +1 -1
  39. package/app/modules/messages/components/messages/messages.component.d.ts +19 -19
  40. package/app/modules/messages/consts/email-message-formats.const.d.ts +5 -5
  41. package/app/modules/messages/consts/index.d.ts +1 -1
  42. package/app/modules/messages/enums/email-message-format.enum.d.ts +5 -5
  43. package/app/modules/messages/enums/index.d.ts +1 -1
  44. package/app/modules/messages/messages.module.d.ts +29 -28
  45. package/app/modules/webhooks/components/webhooks/webhooks.component.d.ts +15 -15
  46. package/app/modules/webhooks/webhooks.module.d.ts +9 -9
  47. package/bundles/firestitch-app-message.umd.js +1525 -1524
  48. package/bundles/firestitch-app-message.umd.js.map +1 -1
  49. package/esm2015/app/helpers/index-name-value.js +7 -7
  50. package/esm2015/app/helpers/index.js +1 -1
  51. package/esm2015/app/modules/app-message/app-message.module.js +16 -16
  52. package/esm2015/app/modules/app-message/injectors/app-message-config.injector.js +3 -3
  53. package/esm2015/app/modules/app-message/injectors/index.js +1 -1
  54. package/esm2015/app/modules/app-message/interfaces/app-message-config.js +1 -1
  55. package/esm2015/app/modules/app-message/interfaces/index.js +1 -1
  56. package/esm2015/app/modules/app-message/types/index.js +1 -1
  57. package/esm2015/app/modules/app-message/types/types.type.js +1 -1
  58. package/esm2015/app/modules/message-preview/components/index.js +1 -1
  59. package/esm2015/app/modules/message-preview/components/preview/index.js +1 -1
  60. package/esm2015/app/modules/message-preview/components/preview/preview.component.js +28 -28
  61. package/esm2015/app/modules/message-preview/message-preview.module.js +37 -37
  62. package/esm2015/app/modules/message-queues/components/queue/queue.component.js +208 -208
  63. package/esm2015/app/modules/message-queues/components/queues/queues.component.js +146 -146
  64. package/esm2015/app/modules/message-queues/components/recipient/recipient.component.js +29 -29
  65. package/esm2015/app/modules/message-queues/consts/index.js +1 -1
  66. package/esm2015/app/modules/message-queues/consts/message-queue-event-type.const.js +5 -5
  67. package/esm2015/app/modules/message-queues/consts/message-queue-states.const.js +10 -10
  68. package/esm2015/app/modules/message-queues/enums/email-message-queue-format.enum.js +6 -6
  69. package/esm2015/app/modules/message-queues/enums/index.js +3 -3
  70. package/esm2015/app/modules/message-queues/enums/message-queue-event-type.enum.js +5 -5
  71. package/esm2015/app/modules/message-queues/enums/message-queue-state.enum.js +10 -10
  72. package/esm2015/app/modules/message-queues/enums/message-queue-type.enum.js +5 -5
  73. package/esm2015/app/modules/message-queues/message-queues.module.js +119 -119
  74. package/esm2015/app/modules/message-queues/pipes/linkify.pipe.js +21 -21
  75. package/esm2015/app/modules/message-queues/pipes/truncate.pipe.js +21 -21
  76. package/esm2015/app/modules/message-queues/services/message-queue.service.js +28 -28
  77. package/esm2015/app/modules/message-templates/components/index.js +2 -2
  78. package/esm2015/app/modules/message-templates/components/template/index.js +1 -1
  79. package/esm2015/app/modules/message-templates/components/template/template.component.js +83 -83
  80. package/esm2015/app/modules/message-templates/components/templates/index.js +1 -1
  81. package/esm2015/app/modules/message-templates/components/templates/templates.component.js +90 -90
  82. package/esm2015/app/modules/message-templates/message-templates.module.js +97 -97
  83. package/esm2015/app/modules/messages/components/index.js +2 -2
  84. package/esm2015/app/modules/messages/components/message/index.js +1 -1
  85. package/esm2015/app/modules/messages/components/message/message.component.js +137 -136
  86. package/esm2015/app/modules/messages/components/messages/index.js +1 -1
  87. package/esm2015/app/modules/messages/components/messages/messages.component.js +74 -74
  88. package/esm2015/app/modules/messages/consts/email-message-formats.const.js +6 -6
  89. package/esm2015/app/modules/messages/consts/index.js +1 -1
  90. package/esm2015/app/modules/messages/enums/email-message-format.enum.js +6 -6
  91. package/esm2015/app/modules/messages/enums/index.js +1 -1
  92. package/esm2015/app/modules/messages/messages.module.js +111 -111
  93. package/esm2015/app/modules/webhooks/components/webhooks/webhooks.component.js +63 -63
  94. package/esm2015/app/modules/webhooks/webhooks.module.js +29 -29
  95. package/esm2015/firestitch-app-message.js +4 -4
  96. package/esm2015/public_api.js +17 -17
  97. package/fesm2015/firestitch-app-message.js +1134 -1132
  98. package/fesm2015/firestitch-app-message.js.map +1 -1
  99. package/firestitch-app-message.d.ts +5 -5
  100. package/package.json +1 -1
  101. package/public_api.d.ts +15 -15
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/flex-layout'), require('@angular/material/button'), require('@angular/material/core'), require('@angular/material/dialog'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/material/checkbox'), require('@angular/material/tooltip'), require('@firestitch/label'), require('@firestitch/dialog'), require('@firestitch/list'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/form'), require('@firestitch/text-editor'), require('rxjs/operators'), require('rxjs'), require('@firestitch/filter'), require('@firestitch/iframe'), require('@firestitch/prompt'), require('@firestitch/message'), require('@angular/flex-layout/flex'), require('@angular/material/icon'), require('@firestitch/date'), require('@firestitch/selection'), require('anchorme')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/app-message', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/flex-layout', '@angular/material/button', '@angular/material/core', '@angular/material/dialog', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/material/checkbox', '@angular/material/tooltip', '@firestitch/label', '@firestitch/dialog', '@firestitch/list', '@firestitch/skeleton', '@angular/forms', '@firestitch/form', '@firestitch/text-editor', 'rxjs/operators', 'rxjs', '@firestitch/filter', '@firestitch/iframe', '@firestitch/prompt', '@firestitch/message', '@angular/flex-layout/flex', '@angular/material/icon', '@firestitch/date', '@firestitch/selection', 'anchorme'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["app-message"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.flexLayout, global.ng.material.button, global.ng.material.core, global.ng.material.dialog, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.material.checkbox, global.ng.material.tooltip, global.i6$1, global.i4, global.i2$2, global.i12, global.ng.forms, global.i14, global.i9, global.rxjs.operators, global.rxjs, global.filter, global.i2, global.i1$1, global.i2$1, global.ng.flexLayout.flex, global.ng.material.icon, global.i10, global.selection, global.anchorme));
5
- })(this, (function (exports, i0, i15, router, flexLayout, i11, i8, i1, i6, i17, i7, i5, checkbox, i3, i6$1, i4, i2$2, i12, i13, i14, i9, operators, rxjs, filter, i2, i1$1, i2$1, i16, i1$2, i10, selection, anchorme) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/flex-layout'), require('@angular/material/button'), require('@angular/material/core'), require('@angular/material/dialog'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/material/checkbox'), require('@angular/material/tooltip'), require('@firestitch/label'), require('@firestitch/dialog'), require('@firestitch/list'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/form'), require('@firestitch/text-editor'), require('@firestitch/html-editor'), require('rxjs/operators'), require('rxjs'), require('@firestitch/filter'), require('@firestitch/iframe'), require('@firestitch/prompt'), require('@firestitch/message'), require('@angular/flex-layout/flex'), require('@angular/material/icon'), require('@firestitch/date'), require('@firestitch/selection'), require('anchorme')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/app-message', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/flex-layout', '@angular/material/button', '@angular/material/core', '@angular/material/dialog', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/material/checkbox', '@angular/material/tooltip', '@firestitch/label', '@firestitch/dialog', '@firestitch/list', '@firestitch/skeleton', '@angular/forms', '@firestitch/form', '@firestitch/text-editor', '@firestitch/html-editor', 'rxjs/operators', 'rxjs', '@firestitch/filter', '@firestitch/iframe', '@firestitch/prompt', '@firestitch/message', '@angular/flex-layout/flex', '@angular/material/icon', '@firestitch/date', '@firestitch/selection', 'anchorme'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["app-message"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.flexLayout, global.ng.material.button, global.ng.material.core, global.ng.material.dialog, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.material.checkbox, global.ng.material.tooltip, global.i6$1, global.i4, global.i2$2, global.i13, global.ng.forms, global.i15, global.i9, global.i10, global.rxjs.operators, global.rxjs, global.filter, global.i2, global.i1$1, global.i2$1, global.ng.flexLayout.flex, global.ng.material.icon, global.i10$1, global.selection, global.anchorme));
5
+ })(this, (function (exports, i0, i16, router, flexLayout, i3, i8, i1, i6, i18, i7, i5, checkbox, i3$1, i6$1, i4, i2$2, i13, i14, i15, i9, i10, operators, rxjs, filter, i2, i1$1, i2$1, i17, i1$2, i10$1, selection, anchorme) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -25,1603 +25,1604 @@
25
25
  }
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
29
- var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
28
+ var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
29
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
30
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
31
31
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
32
32
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
33
- var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
33
+ var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
34
34
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
35
35
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
36
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
36
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
37
37
  var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
38
38
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
39
  var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
40
- var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
41
40
  var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
42
41
  var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
42
+ var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
43
43
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
44
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
44
45
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
45
46
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
46
47
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
47
- var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
48
+ var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
48
49
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
49
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
50
+ var i10__namespace$1 = /*#__PURE__*/_interopNamespace(i10$1);
50
51
  var anchorme__default = /*#__PURE__*/_interopDefaultLegacy(anchorme);
51
52
 
52
- var EmailMessageFormat;
53
- (function (EmailMessageFormat) {
54
- EmailMessageFormat["Text"] = "T";
55
- EmailMessageFormat["HTML"] = "H";
56
- EmailMessageFormat["RichText"] = "R";
53
+ var EmailMessageFormat;
54
+ (function (EmailMessageFormat) {
55
+ EmailMessageFormat["Text"] = "T";
56
+ EmailMessageFormat["HTML"] = "H";
57
+ EmailMessageFormat["RichText"] = "R";
57
58
  })(EmailMessageFormat || (EmailMessageFormat = {}));
58
59
 
59
- var EmailMessageFormats = [
60
- { name: 'Text', value: EmailMessageFormat.Text },
61
- { name: 'HTML', value: EmailMessageFormat.HTML },
62
- { name: 'Rich Text', value: EmailMessageFormat.RichText }
60
+ var EmailMessageFormats = [
61
+ { name: 'Text', value: EmailMessageFormat.Text },
62
+ { name: 'HTML', value: EmailMessageFormat.HTML },
63
+ { name: 'Rich Text', value: EmailMessageFormat.RichText }
63
64
  ];
64
65
 
65
- var PreviewComponent = /** @class */ (function () {
66
- function PreviewComponent(_data) {
67
- this._data = _data;
68
- this.html = _data.html;
69
- this.styles = _data.styles;
70
- }
71
- PreviewComponent.prototype.ngOnInit = function () {
72
- };
73
- return PreviewComponent;
74
- }());
75
- PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
76
- PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <div mat-dialog-title>Preview</div>\n <mat-dialog-content>\n <fs-iframe\n [html]=\"html\"\n [styles]=\"styles\">\n </fs-iframe>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"null\" color=\"primary\" type=\"button\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i2__namespace.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i11__namespace.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__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
77
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
78
- type: i0.Component,
79
- args: [{
80
- templateUrl: './preview.component.html',
81
- styleUrls: ['./preview.component.scss']
82
- }]
83
- }], ctorParameters: function () {
84
- return [{ type: undefined, decorators: [{
85
- type: i0.Inject,
86
- args: [i1.MAT_DIALOG_DATA]
87
- }] }];
66
+ var PreviewComponent = /** @class */ (function () {
67
+ function PreviewComponent(_data) {
68
+ this._data = _data;
69
+ this.html = _data.html;
70
+ this.styles = _data.styles;
71
+ }
72
+ PreviewComponent.prototype.ngOnInit = function () {
73
+ };
74
+ return PreviewComponent;
75
+ }());
76
+ PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
77
+ PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <div mat-dialog-title>Preview</div>\n <mat-dialog-content>\n <fs-iframe\n [html]=\"html\"\n [styles]=\"styles\">\n </fs-iframe>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"null\" color=\"primary\" type=\"button\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i2__namespace.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i3__namespace.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__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
78
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
79
+ type: i0.Component,
80
+ args: [{
81
+ templateUrl: './preview.component.html',
82
+ styleUrls: ['./preview.component.scss']
83
+ }]
84
+ }], ctorParameters: function () {
85
+ return [{ type: undefined, decorators: [{
86
+ type: i0.Inject,
87
+ args: [i1.MAT_DIALOG_DATA]
88
+ }] }];
88
89
  } });
89
90
 
90
- var FS_APP_MESSAGE_ROOT_CONFIG = new i0.InjectionToken('fs-app-message-root-config');
91
+ var FS_APP_MESSAGE_ROOT_CONFIG = new i0.InjectionToken('fs-app-message-root-config');
91
92
  var FS_APP_MESSAGE_CONFIG = new i0.InjectionToken('fs-app-message-config');
92
93
 
93
- var MessageComponent = /** @class */ (function () {
94
- function MessageComponent(_config, _data, _prompt, _message, _dialog, _cdRef) {
95
- var _this = this;
96
- this._config = _config;
97
- this._data = _data;
98
- this._prompt = _prompt;
99
- this._message = _message;
100
- this._dialog = _dialog;
101
- this._cdRef = _cdRef;
102
- this.messageTemplates = [];
103
- this.emailMessageFormats = EmailMessageFormats;
104
- this.emailMessageFormat = EmailMessageFormat;
105
- this.save = function () {
106
- return _this._config.saveMessage(_this.message)
107
- .pipe(operators.tap(function () {
108
- _this._message.success('Saved Changes');
109
- }));
110
- };
111
- }
112
- MessageComponent.prototype.ngOnInit = function () {
113
- var _this = this;
114
- this._config.loadMessage(this._data.message)
115
- .subscribe(function (response) {
116
- _this.message = response;
117
- if (_this.message.emailMessage && _this.message.emailMessage.customize === undefined) {
118
- _this.message.emailMessage.customize = true;
119
- }
120
- if (_this.message.smsMessage && _this.message.smsMessage.customize === undefined) {
121
- _this.message.smsMessage.customize = true;
122
- }
123
- _this._cdRef.markForCheck();
124
- });
125
- this._config.loadMessageTemplates()
126
- .subscribe(function (data) {
127
- _this.messageTemplates = data.data;
128
- _this._cdRef.markForCheck();
129
- });
130
- };
131
- MessageComponent.prototype.tabChange = function (event) {
132
- switch (event.tab.textLabel) {
133
- case 'SMS Message':
134
- this.tab = 'sms';
135
- break;
136
- case 'Email Message':
137
- this.tab = 'email';
138
- break;
139
- default:
140
- this.tab = null;
141
- }
142
- };
143
- MessageComponent.prototype.openPreview = function () {
144
- var _this = this;
145
- var html = this.message.emailMessage.body;
146
- var styles = this.message.emailMessage.styles;
147
- if (this.message.emailMessage.messageTemplateId) {
148
- var messageTemplate = this.messageTemplates
149
- .find(function (item) {
150
- return _this.message.emailMessage.messageTemplateId === item.id;
151
- });
152
- if (messageTemplate) {
153
- html = messageTemplate.content.replace('{$content}', html);
154
- styles = messageTemplate.styles.concat(styles);
155
- }
156
- }
157
- this._dialog.open(PreviewComponent, {
158
- data: {
159
- styles: styles,
160
- html: html,
161
- },
162
- width: '95%'
163
- });
164
- };
165
- MessageComponent.prototype.sendTest = function (type) {
166
- var _this = this;
167
- rxjs.of(true)
168
- .pipe(operators.switchMap(function () {
169
- return type === 'email' ? _this._config.getTestEmail() : rxjs.of('');
170
- }), operators.switchMap(function (default_) {
171
- var typeName = type === 'email' ? 'an email' : 'phone number';
172
- return _this._prompt.input({
173
- label: "Please enter " + typeName + " to send test to",
174
- title: 'Send Test',
175
- commitLabel: 'Send',
176
- default: default_,
177
- required: true
178
- });
179
- }))
180
- .subscribe(function (value) {
181
- _this._config.testMessage(_this.message, value, type)
182
- .subscribe(function () {
183
- _this._message.success('Test Sent');
184
- });
185
- });
186
- };
187
- return MessageComponent;
188
- }());
189
- MessageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace$1.FsPrompt }, { token: i2__namespace$1.FsMessage }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
190
- MessageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessageComponent, selector: "ng-component", ngImport: i0__namespace, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"message\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"message\">\n <div mat-dialog-title>Edit Message</div>\n <mat-dialog-content>\n\n <mat-tab-group (selectedTabChange)=\"tabChange($event)\">\n <mat-tab label=\"General\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"message.name\"\n name=\"Name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n placeholder=\"Description\"\n [(ngModel)]=\"message.description\"\n name=\"description\">\n </mat-form-field>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Email\"\n [(ngModel)]=\"message.emailMessage.fromEmail\"\n name=\"from_email\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Name\"\n [(ngModel)]=\"message.emailMessage.fromName\"\n name=\"from_name\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Reply To\"\n [(ngModel)]=\"message.emailMessage.replyTo\"\n name=\"reply_to\">\n </mat-form-field>\n </div>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"To\"\n [(ngModel)]=\"message.emailMessage.toRecipients\"\n name=\"to\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"CC\"\n [(ngModel)]=\"message.emailMessage.ccRecipients\"\n name=\"cc\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"BCC\"\n [(ngModel)]=\"message.emailMessage.bccRecipients\"\n name=\"bcc\">\n </mat-form-field>\n </div>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Email Message\" *ngIf=\"message.emailMessage\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <div fxLayout=\"row\" fxLayoutGap=\"10px\">\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.emailMessage.customize\"\n name=\"customizeEmail\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Format\"\n [(ngModel)]=\"message.emailMessage.format\"\n name=\"format\">\n <mat-option *ngFor=\"let item of emailMessageFormats\" [value]=\"item.value\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n placeholder=\"Template\"\n [(ngModel)]=\"message.emailMessage.messageTemplateId\"\n name=\"template\">\n <mat-option [value]=\"null\">None</mat-option>\n <mat-option *ngFor=\"let item of messageTemplates\" [value]=\"item.id\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container *ngIf=\"message.emailMessage.customize\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Subject\"\n [(ngModel)]=\"message.emailMessage.subject\"\n name=\"name\"\n required>\n </mat-form-field>\n\n <div [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\"\n [config]=\"{ language: 'html '}\">\n </fs-text-editor>\n\n <fs-editor-rich-text\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\">\n </fs-editor-rich-text>\n\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"emailMessageBody\"\n [config]=\"{ language: 'text' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\"\n label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.emailMessage.styles\"\n name=\"styles\"\n [config]=\"{ language: 'scss' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n\n </ng-container>\n\n <ng-container *ngIf=\"!message.emailMessage.customize\">\n <fs-label-field>\n <fs-label>Subject</fs-label>\n {{message.defaultEmailSubject}}\n </fs-label-field>\n <div>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div\n class=\"email-body-html-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\">\n {{message.defaultEmailBody}}\n </div>\n <div\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n fsEditorRenderer\n name=\"defaultEmailBody\"\n [ngModel]=\"message.defaultEmailBody\">\n </div>\n <div\n class=\"email-body-text-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\">\n {{message.defaultEmailBody}}\n </div>\n </fs-label-field>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"SMS Message\" *ngIf=\"message.smsMessage\">\n <ng-template matTabContent>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.smsMessage.customize\"\n name=\"customizeSms\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <div\n *ngIf=\"message.smsMessage.customize\"\n [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.smsMessage.message\"\n name=\"smsMessageMessage\"\n [config]=\"{ language: 'text '}\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n <fs-label-field *ngIf=\"!message.smsMessage.customize\">\n <fs-label>Message</fs-label>\n {{message.defaultSmsMessage}}\n </fs-label-field>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Variables\" *ngIf=\"message.variables\">\n <ng-template matTabContent>\n <div *ngFor=\"let variable of message.variables\" class=\"variable\">\n {{variable.name}}\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Defaults\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"message.emailMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">Email</h2>\n <fs-label-field>\n <fs-label>Subject</fs-label>\n <div class=\"content\">{{message.defaultEmailSubject}}</div>\n </fs-label-field>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultEmailBody}}</div>\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"message.smsMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">SMS</h2>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultSmsMessage}}</div>\n </fs-label-field>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\">Save</button>\n <button\n *ngIf=\"tab==='email' && message.emailMessage.format===emailMessageFormat.HTML\"\n mat-button\n type=\"button\"\n (click)=\"openPreview()\"\n type=\"button\">\n Preview\n </button>\n <button\n *ngIf=\"tab==='email'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('email')\"\n type=\"button\">\n Send Test Email\n </button>\n <button\n *ngIf=\"tab==='sms'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('sms')\"\n type=\"button\">\n Send Test SMS\n </button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", 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,:host ::ng-deep .email-body-html-default{white-space:pre-line}.email-body-text{width:100%}.variable{margin-bottom:4px}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6__namespace$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6__namespace$1.FsLabelComponent, selector: "fs-label" }, { type: i11__namespace.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: i12__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i13__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i13__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i13__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i14__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i16__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i13__namespace.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: i13__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i13__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i13__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i14__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i16__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i16__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i15__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
191
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageComponent, decorators: [{
192
- type: i0.Component,
193
- args: [{
194
- templateUrl: './message.component.html',
195
- styleUrls: ['./message.component.scss'],
196
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
197
- }]
198
- }], ctorParameters: function () {
199
- return [{ type: undefined, decorators: [{
200
- type: i0.Inject,
201
- args: [FS_APP_MESSAGE_CONFIG]
202
- }] }, { type: undefined, decorators: [{
203
- type: i0.Inject,
204
- args: [i1.MAT_DIALOG_DATA]
205
- }] }, { type: i1__namespace$1.FsPrompt }, { type: i2__namespace$1.FsMessage }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }];
94
+ var MessageComponent = /** @class */ (function () {
95
+ function MessageComponent(_config, _data, _prompt, _message, _dialog, _cdRef) {
96
+ var _this = this;
97
+ this._config = _config;
98
+ this._data = _data;
99
+ this._prompt = _prompt;
100
+ this._message = _message;
101
+ this._dialog = _dialog;
102
+ this._cdRef = _cdRef;
103
+ this.messageTemplates = [];
104
+ this.emailMessageFormats = EmailMessageFormats;
105
+ this.emailMessageFormat = EmailMessageFormat;
106
+ this.save = function () {
107
+ return _this._config.saveMessage(_this.message)
108
+ .pipe(operators.tap(function () {
109
+ _this._message.success('Saved Changes');
110
+ }));
111
+ };
112
+ }
113
+ MessageComponent.prototype.ngOnInit = function () {
114
+ var _this = this;
115
+ this._config.loadMessage(this._data.message)
116
+ .subscribe(function (response) {
117
+ _this.message = response;
118
+ if (_this.message.emailMessage && _this.message.emailMessage.customize === undefined) {
119
+ _this.message.emailMessage.customize = true;
120
+ }
121
+ if (_this.message.smsMessage && _this.message.smsMessage.customize === undefined) {
122
+ _this.message.smsMessage.customize = true;
123
+ }
124
+ _this._cdRef.markForCheck();
125
+ });
126
+ this._config.loadMessageTemplates()
127
+ .subscribe(function (data) {
128
+ _this.messageTemplates = data.data;
129
+ _this._cdRef.markForCheck();
130
+ });
131
+ };
132
+ MessageComponent.prototype.tabChange = function (event) {
133
+ switch (event.tab.textLabel) {
134
+ case 'SMS Message':
135
+ this.tab = 'sms';
136
+ break;
137
+ case 'Email Message':
138
+ this.tab = 'email';
139
+ break;
140
+ default:
141
+ this.tab = null;
142
+ }
143
+ };
144
+ MessageComponent.prototype.openPreview = function () {
145
+ var _this = this;
146
+ var html = this.message.emailMessage.body;
147
+ var styles = this.message.emailMessage.styles;
148
+ if (this.message.emailMessage.messageTemplateId) {
149
+ var messageTemplate = this.messageTemplates
150
+ .find(function (item) {
151
+ return _this.message.emailMessage.messageTemplateId === item.id;
152
+ });
153
+ if (messageTemplate) {
154
+ html = messageTemplate.content.replace('{$content}', html);
155
+ styles = messageTemplate.styles.concat(styles);
156
+ }
157
+ }
158
+ this._dialog.open(PreviewComponent, {
159
+ data: {
160
+ styles: styles,
161
+ html: html,
162
+ },
163
+ width: '95%'
164
+ });
165
+ };
166
+ MessageComponent.prototype.sendTest = function (type) {
167
+ var _this = this;
168
+ rxjs.of(true)
169
+ .pipe(operators.switchMap(function () {
170
+ return type === 'email' ? _this._config.getTestEmail() : rxjs.of('');
171
+ }), operators.switchMap(function (default_) {
172
+ var typeName = type === 'email' ? 'an email' : 'phone number';
173
+ return _this._prompt.input({
174
+ label: "Please enter " + typeName + " to send test to",
175
+ title: 'Send Test',
176
+ commitLabel: 'Send',
177
+ default: default_,
178
+ required: true
179
+ });
180
+ }))
181
+ .subscribe(function (value) {
182
+ _this._config.testMessage(_this.message, value, type)
183
+ .subscribe(function () {
184
+ _this._message.success('Test Sent');
185
+ });
186
+ });
187
+ };
188
+ return MessageComponent;
189
+ }());
190
+ MessageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace$1.FsPrompt }, { token: i2__namespace$1.FsMessage }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
191
+ MessageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessageComponent, selector: "ng-component", ngImport: i0__namespace, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"message\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"message\">\n <div mat-dialog-title>Edit Message</div>\n <mat-dialog-content>\n\n <mat-tab-group (selectedTabChange)=\"tabChange($event)\">\n <mat-tab label=\"General\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"message.name\"\n name=\"Name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n placeholder=\"Description\"\n [(ngModel)]=\"message.description\"\n name=\"description\">\n </mat-form-field>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Email\"\n [(ngModel)]=\"message.emailMessage.fromEmail\"\n name=\"from_email\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"From Name\"\n [(ngModel)]=\"message.emailMessage.fromName\"\n name=\"from_name\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Reply To\"\n [(ngModel)]=\"message.emailMessage.replyTo\"\n name=\"reply_to\">\n </mat-form-field>\n </div>\n\n <div\n fxLayout=\"row\"\n fxLayoutGap=\"10px\"\n fxLayout.xs=\"column\"\n fxLayout.sm=\"column\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"To\"\n [(ngModel)]=\"message.emailMessage.toRecipients\"\n name=\"to\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"CC\"\n [(ngModel)]=\"message.emailMessage.ccRecipients\"\n name=\"cc\">\n </mat-form-field>\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"BCC\"\n [(ngModel)]=\"message.emailMessage.bccRecipients\"\n name=\"bcc\">\n </mat-form-field>\n </div>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Email Message\" *ngIf=\"message.emailMessage\">\n <ng-template matTabContent>\n <div fxLayout=\"column\">\n <div fxLayout=\"row\" fxLayoutGap=\"10px\">\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.emailMessage.customize\"\n name=\"customizeEmail\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Format\"\n [(ngModel)]=\"message.emailMessage.format\"\n name=\"format\">\n <mat-option *ngFor=\"let item of emailMessageFormats\" [value]=\"item.value\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-select\n placeholder=\"Template\"\n [(ngModel)]=\"message.emailMessage.messageTemplateId\"\n name=\"template\">\n <mat-option [value]=\"null\">None</mat-option>\n <mat-option *ngFor=\"let item of messageTemplates\" [value]=\"item.id\">\n {{item.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container *ngIf=\"message.emailMessage.customize\">\n <mat-form-field fxFlex>\n <input\n matInput\n placeholder=\"Subject\"\n [(ngModel)]=\"message.emailMessage.subject\"\n name=\"name\"\n required>\n </mat-form-field>\n\n <div [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\"\n [config]=\"{ language: 'html '}\">\n </fs-text-editor>\n\n <fs-html-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"body\">\n </fs-html-editor>\n\n <fs-text-editor\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\"\n [(ngModel)]=\"message.emailMessage.body\"\n name=\"emailMessageBody\"\n [config]=\"{ language: 'text' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\"\n label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.emailMessage.styles\"\n name=\"styles\"\n [config]=\"{ language: 'scss' }\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n\n </ng-container>\n\n <ng-container *ngIf=\"!message.emailMessage.customize\">\n <fs-label-field>\n <fs-label>Subject</fs-label>\n {{message.defaultEmailSubject}}\n </fs-label-field>\n <div>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div\n class=\"email-body-html-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.HTML\">\n {{message.defaultEmailBody}}\n </div>\n <div\n *ngIf=\"message.emailMessage.format===emailMessageFormat.RichText\"\n fsEditorRenderer\n name=\"defaultEmailBody\"\n [ngModel]=\"message.defaultEmailBody\">\n </div>\n <div\n class=\"email-body-text-default\"\n *ngIf=\"message.emailMessage.format===emailMessageFormat.Text\">\n {{message.defaultEmailBody}}\n </div>\n </fs-label-field>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"SMS Message\" *ngIf=\"message.smsMessage\">\n <ng-template matTabContent>\n <mat-form-field>\n <mat-select\n required\n placeholder=\"Customize Message\"\n [(ngModel)]=\"message.smsMessage.customize\"\n name=\"customizeSms\">\n <mat-option [value]=\"true\">Yes</mat-option>\n <mat-option [value]=\"false\">No</mat-option>\n </mat-select>\n </mat-form-field>\n <div\n *ngIf=\"message.smsMessage.customize\"\n [@.disabled]=\"true\">\n <mat-tab-group [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"message.smsMessage.message\"\n name=\"smsMessageMessage\"\n [config]=\"{ language: 'text '}\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n <fs-label-field *ngIf=\"!message.smsMessage.customize\">\n <fs-label>Message</fs-label>\n {{message.defaultSmsMessage}}\n </fs-label-field>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Variables\" *ngIf=\"message.variables\">\n <ng-template matTabContent>\n <div *ngFor=\"let variable of message.variables\" class=\"variable\">\n {{variable.name}}\n </div>\n </ng-template>\n </mat-tab>\n\n <mat-tab label=\"Defaults\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"message.emailMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">Email</h2>\n <fs-label-field>\n <fs-label>Subject</fs-label>\n <div class=\"content\">{{message.defaultEmailSubject}}</div>\n </fs-label-field>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultEmailBody}}</div>\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"message.smsMessage\">\n <h2 *ngIf=\"message.emailMessage && message.smsMessage\">SMS</h2>\n <fs-label-field>\n <fs-label>Content</fs-label>\n <div class=\"content\">{{message.defaultSmsMessage}}</div>\n </fs-label-field>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\">Save</button>\n <button\n *ngIf=\"tab==='email' && message.emailMessage.format===emailMessageFormat.HTML\"\n mat-button\n type=\"button\"\n (click)=\"openPreview()\"\n type=\"button\">\n Preview\n </button>\n <button\n *ngIf=\"tab==='email'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('email')\"\n type=\"button\">\n Send Test Email\n </button>\n <button\n *ngIf=\"tab==='sms'\"\n mat-button\n type=\"button\"\n (click)=\"sendTest('sms')\"\n type=\"button\">\n Send Test SMS\n </button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", 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,:host ::ng-deep .email-body-html-default{white-space:pre-line}.email-body-text{width:100%}.variable{margin-bottom:4px}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i10__namespace.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i6__namespace$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6__namespace$1.FsLabelComponent, selector: "fs-label" }, { type: i3__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i13__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i14__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i14__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i14__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i16__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i17__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i18__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i14__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i14__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i15__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i17__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i17__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i16__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
192
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageComponent, decorators: [{
193
+ type: i0.Component,
194
+ args: [{
195
+ templateUrl: './message.component.html',
196
+ styleUrls: ['./message.component.scss'],
197
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
198
+ }]
199
+ }], ctorParameters: function () {
200
+ return [{ type: undefined, decorators: [{
201
+ type: i0.Inject,
202
+ args: [FS_APP_MESSAGE_CONFIG]
203
+ }] }, { type: undefined, decorators: [{
204
+ type: i0.Inject,
205
+ args: [i1.MAT_DIALOG_DATA]
206
+ }] }, { type: i1__namespace$1.FsPrompt }, { type: i2__namespace$1.FsMessage }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }];
206
207
  } });
207
208
 
208
- function indexNameValue(arry) {
209
- var obj = {};
210
- arry.forEach(function (item) {
211
- obj[item.value] = item.name;
212
- });
213
- return obj;
209
+ function indexNameValue(arry) {
210
+ var obj = {};
211
+ arry.forEach(function (item) {
212
+ obj[item.value] = item.name;
213
+ });
214
+ return obj;
214
215
  }
215
216
 
216
- var MessagesComponent = /** @class */ (function () {
217
- function MessagesComponent(_config, _dialog) {
218
- this._config = _config;
219
- this._dialog = _dialog;
220
- this.list = null;
221
- this.config = null;
222
- this.emailMessageFormats = {};
223
- this._destroy$ = new rxjs.Subject();
224
- }
225
- MessagesComponent.prototype.ngOnInit = function () {
226
- var _this = this;
227
- this.emailMessageFormats = indexNameValue(EmailMessageFormats);
228
- this.config = {
229
- filters: [
230
- {
231
- name: 'keyword',
232
- type: filter.ItemType.Keyword,
233
- label: 'Search'
234
- }
235
- ],
236
- fetch: function (query) {
237
- return _this._config.loadMessages(query)
238
- .pipe(operators.map(function (response) {
239
- return ({ data: response.data, paging: response.paging });
240
- }));
241
- }
242
- };
243
- };
244
- MessagesComponent.prototype.open = function (message) {
245
- var _this = this;
246
- var dialogRef = this._dialog.open(MessageComponent, {
247
- data: {
248
- message: message,
249
- },
250
- width: '85%'
251
- });
252
- dialogRef.afterClosed()
253
- .pipe(operators.takeUntil(this._destroy$))
254
- .subscribe(function () {
255
- _this.list.reload();
256
- });
257
- };
258
- MessagesComponent.prototype.ngOnDestroy = function () {
259
- this._destroy$.next();
260
- this._destroy$.complete();
261
- };
262
- return MessagesComponent;
263
- }());
264
- MessagesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessagesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
265
- MessagesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessagesComponent, selector: "fs-app-messages", viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
266
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessagesComponent, decorators: [{
267
- type: i0.Component,
268
- args: [{
269
- selector: 'fs-app-messages',
270
- templateUrl: './messages.component.html'
271
- }]
272
- }], ctorParameters: function () {
273
- return [{ type: undefined, decorators: [{
274
- type: i0.Inject,
275
- args: [FS_APP_MESSAGE_CONFIG]
276
- }] }, { type: i1__namespace.MatDialog }];
277
- }, propDecorators: { list: [{
278
- type: i0.ViewChild,
279
- args: [i2$2.FsListComponent, { static: true }]
217
+ var MessagesComponent = /** @class */ (function () {
218
+ function MessagesComponent(_config, _dialog) {
219
+ this._config = _config;
220
+ this._dialog = _dialog;
221
+ this.list = null;
222
+ this.config = null;
223
+ this.emailMessageFormats = {};
224
+ this._destroy$ = new rxjs.Subject();
225
+ }
226
+ MessagesComponent.prototype.ngOnInit = function () {
227
+ var _this = this;
228
+ this.emailMessageFormats = indexNameValue(EmailMessageFormats);
229
+ this.config = {
230
+ filters: [
231
+ {
232
+ name: 'keyword',
233
+ type: filter.ItemType.Keyword,
234
+ label: 'Search'
235
+ }
236
+ ],
237
+ fetch: function (query) {
238
+ return _this._config.loadMessages(query)
239
+ .pipe(operators.map(function (response) {
240
+ return ({ data: response.data, paging: response.paging });
241
+ }));
242
+ }
243
+ };
244
+ };
245
+ MessagesComponent.prototype.open = function (message) {
246
+ var _this = this;
247
+ var dialogRef = this._dialog.open(MessageComponent, {
248
+ data: {
249
+ message: message,
250
+ },
251
+ width: '85%'
252
+ });
253
+ dialogRef.afterClosed()
254
+ .pipe(operators.takeUntil(this._destroy$))
255
+ .subscribe(function () {
256
+ _this.list.reload();
257
+ });
258
+ };
259
+ MessagesComponent.prototype.ngOnDestroy = function () {
260
+ this._destroy$.next();
261
+ this._destroy$.complete();
262
+ };
263
+ return MessagesComponent;
264
+ }());
265
+ MessagesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessagesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
266
+ MessagesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MessagesComponent, selector: "fs-app-messages", viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i16__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
267
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessagesComponent, decorators: [{
268
+ type: i0.Component,
269
+ args: [{
270
+ selector: 'fs-app-messages',
271
+ templateUrl: './messages.component.html'
272
+ }]
273
+ }], ctorParameters: function () {
274
+ return [{ type: undefined, decorators: [{
275
+ type: i0.Inject,
276
+ args: [FS_APP_MESSAGE_CONFIG]
277
+ }] }, { type: i1__namespace.MatDialog }];
278
+ }, propDecorators: { list: [{
279
+ type: i0.ViewChild,
280
+ args: [i2$2.FsListComponent, { static: true }]
280
281
  }] } });
281
282
 
282
- var FsAppMessagePreviewModule = /** @class */ (function () {
283
- function FsAppMessagePreviewModule() {
284
- }
285
- return FsAppMessagePreviewModule;
286
- }());
287
- FsAppMessagePreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
288
- FsAppMessagePreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, declarations: [PreviewComponent], imports: [i1.MatDialogModule,
289
- i11.MatButtonModule,
290
- i4.FsDialogModule,
291
- i2.FsIFrameModule], exports: [PreviewComponent] });
292
- FsAppMessagePreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, imports: [[
293
- i1.MatDialogModule,
294
- i11.MatButtonModule,
295
- i4.FsDialogModule,
296
- i2.FsIFrameModule,
297
- ]] });
298
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, decorators: [{
299
- type: i0.NgModule,
300
- args: [{
301
- imports: [
302
- i1.MatDialogModule,
303
- i11.MatButtonModule,
304
- i4.FsDialogModule,
305
- i2.FsIFrameModule,
306
- ],
307
- declarations: [
308
- PreviewComponent,
309
- ],
310
- exports: [
311
- PreviewComponent,
312
- ]
313
- }]
283
+ var FsAppMessagePreviewModule = /** @class */ (function () {
284
+ function FsAppMessagePreviewModule() {
285
+ }
286
+ return FsAppMessagePreviewModule;
287
+ }());
288
+ FsAppMessagePreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
289
+ FsAppMessagePreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, declarations: [PreviewComponent], imports: [i1.MatDialogModule,
290
+ i3.MatButtonModule,
291
+ i4.FsDialogModule,
292
+ i2.FsIFrameModule], exports: [PreviewComponent] });
293
+ FsAppMessagePreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, imports: [[
294
+ i1.MatDialogModule,
295
+ i3.MatButtonModule,
296
+ i4.FsDialogModule,
297
+ i2.FsIFrameModule,
298
+ ]] });
299
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagePreviewModule, decorators: [{
300
+ type: i0.NgModule,
301
+ args: [{
302
+ imports: [
303
+ i1.MatDialogModule,
304
+ i3.MatButtonModule,
305
+ i4.FsDialogModule,
306
+ i2.FsIFrameModule,
307
+ ],
308
+ declarations: [
309
+ PreviewComponent,
310
+ ],
311
+ exports: [
312
+ PreviewComponent,
313
+ ]
314
+ }]
314
315
  }] });
315
316
 
316
- var FsAppMessagesModule = /** @class */ (function () {
317
- function FsAppMessagesModule() {
318
- }
319
- return FsAppMessagesModule;
320
- }());
321
- FsAppMessagesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
322
- FsAppMessagesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, declarations: [MessagesComponent,
323
- MessageComponent], imports: [router.RouterModule,
324
- i15.CommonModule,
325
- i13.FormsModule,
326
- i1.MatDialogModule,
327
- i11.MatButtonModule,
328
- i5.MatTabsModule,
329
- i6.MatFormFieldModule,
330
- i17.MatInputModule,
331
- i8.MatOptionModule,
332
- i7.MatSelectModule,
333
- i3.MatTooltipModule,
334
- checkbox.MatCheckboxModule,
335
- i4.FsDialogModule,
336
- i2$2.FsListModule,
337
- i6$1.FsLabelModule,
338
- flexLayout.FlexLayoutModule,
339
- i12.FsSkeletonModule,
340
- i14.FsFormModule,
341
- i9.FsTextEditorModule,
342
- // FsEditorRichTextModule,
343
- FsAppMessagePreviewModule], exports: [MessagesComponent,
344
- MessageComponent] });
345
- FsAppMessagesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, imports: [[
346
- router.RouterModule,
347
- i15.CommonModule,
348
- i13.FormsModule,
349
- i1.MatDialogModule,
350
- i11.MatButtonModule,
351
- i5.MatTabsModule,
352
- i6.MatFormFieldModule,
353
- i17.MatInputModule,
354
- i8.MatOptionModule,
355
- i7.MatSelectModule,
356
- i3.MatTooltipModule,
357
- checkbox.MatCheckboxModule,
358
- i4.FsDialogModule,
359
- i2$2.FsListModule,
360
- i6$1.FsLabelModule,
361
- flexLayout.FlexLayoutModule,
362
- i12.FsSkeletonModule,
363
- i14.FsFormModule,
364
- i9.FsTextEditorModule,
365
- // FsEditorRichTextModule,
366
- FsAppMessagePreviewModule,
367
- ]] });
368
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, decorators: [{
369
- type: i0.NgModule,
370
- args: [{
371
- imports: [
372
- router.RouterModule,
373
- i15.CommonModule,
374
- i13.FormsModule,
375
- i1.MatDialogModule,
376
- i11.MatButtonModule,
377
- i5.MatTabsModule,
378
- i6.MatFormFieldModule,
379
- i17.MatInputModule,
380
- i8.MatOptionModule,
381
- i7.MatSelectModule,
382
- i3.MatTooltipModule,
383
- checkbox.MatCheckboxModule,
384
- i4.FsDialogModule,
385
- i2$2.FsListModule,
386
- i6$1.FsLabelModule,
387
- flexLayout.FlexLayoutModule,
388
- i12.FsSkeletonModule,
389
- i14.FsFormModule,
390
- i9.FsTextEditorModule,
391
- // FsEditorRichTextModule,
392
- FsAppMessagePreviewModule,
393
- ],
394
- declarations: [
395
- MessagesComponent,
396
- MessageComponent,
397
- ],
398
- exports: [
399
- MessagesComponent,
400
- MessageComponent,
401
- ],
402
- }]
317
+ var FsAppMessagesModule = /** @class */ (function () {
318
+ function FsAppMessagesModule() {
319
+ }
320
+ return FsAppMessagesModule;
321
+ }());
322
+ FsAppMessagesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
323
+ FsAppMessagesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, declarations: [MessagesComponent,
324
+ MessageComponent], imports: [router.RouterModule,
325
+ i16.CommonModule,
326
+ i14.FormsModule,
327
+ i1.MatDialogModule,
328
+ i3.MatButtonModule,
329
+ i5.MatTabsModule,
330
+ i6.MatFormFieldModule,
331
+ i18.MatInputModule,
332
+ i8.MatOptionModule,
333
+ i7.MatSelectModule,
334
+ i3$1.MatTooltipModule,
335
+ checkbox.MatCheckboxModule,
336
+ i4.FsDialogModule,
337
+ i2$2.FsListModule,
338
+ i6$1.FsLabelModule,
339
+ flexLayout.FlexLayoutModule,
340
+ i13.FsSkeletonModule,
341
+ i15.FsFormModule,
342
+ i9.FsTextEditorModule,
343
+ i10.FsHtmlEditorModule,
344
+ FsAppMessagePreviewModule], exports: [MessagesComponent,
345
+ MessageComponent] });
346
+ FsAppMessagesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, imports: [[
347
+ router.RouterModule,
348
+ i16.CommonModule,
349
+ i14.FormsModule,
350
+ i1.MatDialogModule,
351
+ i3.MatButtonModule,
352
+ i5.MatTabsModule,
353
+ i6.MatFormFieldModule,
354
+ i18.MatInputModule,
355
+ i8.MatOptionModule,
356
+ i7.MatSelectModule,
357
+ i3$1.MatTooltipModule,
358
+ checkbox.MatCheckboxModule,
359
+ i4.FsDialogModule,
360
+ i2$2.FsListModule,
361
+ i6$1.FsLabelModule,
362
+ flexLayout.FlexLayoutModule,
363
+ i13.FsSkeletonModule,
364
+ i15.FsFormModule,
365
+ i9.FsTextEditorModule,
366
+ i10.FsHtmlEditorModule,
367
+ FsAppMessagePreviewModule,
368
+ ]] });
369
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessagesModule, decorators: [{
370
+ type: i0.NgModule,
371
+ args: [{
372
+ imports: [
373
+ router.RouterModule,
374
+ i16.CommonModule,
375
+ i14.FormsModule,
376
+ i1.MatDialogModule,
377
+ i3.MatButtonModule,
378
+ i5.MatTabsModule,
379
+ i6.MatFormFieldModule,
380
+ i18.MatInputModule,
381
+ i8.MatOptionModule,
382
+ i7.MatSelectModule,
383
+ i3$1.MatTooltipModule,
384
+ checkbox.MatCheckboxModule,
385
+ i4.FsDialogModule,
386
+ i2$2.FsListModule,
387
+ i6$1.FsLabelModule,
388
+ flexLayout.FlexLayoutModule,
389
+ i13.FsSkeletonModule,
390
+ i15.FsFormModule,
391
+ i9.FsTextEditorModule,
392
+ i10.FsHtmlEditorModule,
393
+ FsAppMessagePreviewModule,
394
+ ],
395
+ declarations: [
396
+ MessagesComponent,
397
+ MessageComponent,
398
+ ],
399
+ exports: [
400
+ MessagesComponent,
401
+ MessageComponent,
402
+ ],
403
+ }]
403
404
  }] });
404
405
 
405
- /*! *****************************************************************************
406
- Copyright (c) Microsoft Corporation.
407
-
408
- Permission to use, copy, modify, and/or distribute this software for any
409
- purpose with or without fee is hereby granted.
410
-
411
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
412
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
413
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
414
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
415
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
416
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
417
- PERFORMANCE OF THIS SOFTWARE.
418
- ***************************************************************************** */
419
- /* global Reflect, Promise */
420
- var extendStatics = function (d, b) {
421
- extendStatics = Object.setPrototypeOf ||
422
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
423
- function (d, b) { for (var p in b)
424
- if (Object.prototype.hasOwnProperty.call(b, p))
425
- d[p] = b[p]; };
426
- return extendStatics(d, b);
427
- };
428
- function __extends(d, b) {
429
- if (typeof b !== "function" && b !== null)
430
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
431
- extendStatics(d, b);
432
- function __() { this.constructor = d; }
433
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
434
- }
435
- var __assign = function () {
436
- __assign = Object.assign || function __assign(t) {
437
- for (var s, i = 1, n = arguments.length; i < n; i++) {
438
- s = arguments[i];
439
- for (var p in s)
440
- if (Object.prototype.hasOwnProperty.call(s, p))
441
- t[p] = s[p];
442
- }
443
- return t;
444
- };
445
- return __assign.apply(this, arguments);
446
- };
447
- function __rest(s, e) {
448
- var t = {};
449
- for (var p in s)
450
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
451
- t[p] = s[p];
452
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
453
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
454
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
455
- t[p[i]] = s[p[i]];
456
- }
457
- return t;
458
- }
459
- function __decorate(decorators, target, key, desc) {
460
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
461
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
462
- r = Reflect.decorate(decorators, target, key, desc);
463
- else
464
- for (var i = decorators.length - 1; i >= 0; i--)
465
- if (d = decorators[i])
466
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
467
- return c > 3 && r && Object.defineProperty(target, key, r), r;
468
- }
469
- function __param(paramIndex, decorator) {
470
- return function (target, key) { decorator(target, key, paramIndex); };
471
- }
472
- function __metadata(metadataKey, metadataValue) {
473
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
474
- return Reflect.metadata(metadataKey, metadataValue);
475
- }
476
- function __awaiter(thisArg, _arguments, P, generator) {
477
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
478
- return new (P || (P = Promise))(function (resolve, reject) {
479
- function fulfilled(value) { try {
480
- step(generator.next(value));
481
- }
482
- catch (e) {
483
- reject(e);
484
- } }
485
- function rejected(value) { try {
486
- step(generator["throw"](value));
487
- }
488
- catch (e) {
489
- reject(e);
490
- } }
491
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
492
- step((generator = generator.apply(thisArg, _arguments || [])).next());
493
- });
494
- }
495
- function __generator(thisArg, body) {
496
- var _ = { label: 0, sent: function () { if (t[0] & 1)
497
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
498
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
499
- function verb(n) { return function (v) { return step([n, v]); }; }
500
- function step(op) {
501
- if (f)
502
- throw new TypeError("Generator is already executing.");
503
- while (_)
504
- try {
505
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
506
- return t;
507
- if (y = 0, t)
508
- op = [op[0] & 2, t.value];
509
- switch (op[0]) {
510
- case 0:
511
- case 1:
512
- t = op;
513
- break;
514
- case 4:
515
- _.label++;
516
- return { value: op[1], done: false };
517
- case 5:
518
- _.label++;
519
- y = op[1];
520
- op = [0];
521
- continue;
522
- case 7:
523
- op = _.ops.pop();
524
- _.trys.pop();
525
- continue;
526
- default:
527
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
528
- _ = 0;
529
- continue;
530
- }
531
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
532
- _.label = op[1];
533
- break;
534
- }
535
- if (op[0] === 6 && _.label < t[1]) {
536
- _.label = t[1];
537
- t = op;
538
- break;
539
- }
540
- if (t && _.label < t[2]) {
541
- _.label = t[2];
542
- _.ops.push(op);
543
- break;
544
- }
545
- if (t[2])
546
- _.ops.pop();
547
- _.trys.pop();
548
- continue;
549
- }
550
- op = body.call(thisArg, _);
551
- }
552
- catch (e) {
553
- op = [6, e];
554
- y = 0;
555
- }
556
- finally {
557
- f = t = 0;
558
- }
559
- if (op[0] & 5)
560
- throw op[1];
561
- return { value: op[0] ? op[1] : void 0, done: true };
562
- }
563
- }
564
- var __createBinding = Object.create ? (function (o, m, k, k2) {
565
- if (k2 === undefined)
566
- k2 = k;
567
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
568
- }) : (function (o, m, k, k2) {
569
- if (k2 === undefined)
570
- k2 = k;
571
- o[k2] = m[k];
572
- });
573
- function __exportStar(m, o) {
574
- for (var p in m)
575
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
576
- __createBinding(o, m, p);
577
- }
578
- function __values(o) {
579
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
580
- if (m)
581
- return m.call(o);
582
- if (o && typeof o.length === "number")
583
- return {
584
- next: function () {
585
- if (o && i >= o.length)
586
- o = void 0;
587
- return { value: o && o[i++], done: !o };
588
- }
589
- };
590
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
591
- }
592
- function __read(o, n) {
593
- var m = typeof Symbol === "function" && o[Symbol.iterator];
594
- if (!m)
595
- return o;
596
- var i = m.call(o), r, ar = [], e;
597
- try {
598
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
599
- ar.push(r.value);
600
- }
601
- catch (error) {
602
- e = { error: error };
603
- }
604
- finally {
605
- try {
606
- if (r && !r.done && (m = i["return"]))
607
- m.call(i);
608
- }
609
- finally {
610
- if (e)
611
- throw e.error;
612
- }
613
- }
614
- return ar;
615
- }
616
- /** @deprecated */
617
- function __spread() {
618
- for (var ar = [], i = 0; i < arguments.length; i++)
619
- ar = ar.concat(__read(arguments[i]));
620
- return ar;
621
- }
622
- /** @deprecated */
623
- function __spreadArrays() {
624
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
625
- s += arguments[i].length;
626
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
627
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
628
- r[k] = a[j];
629
- return r;
630
- }
631
- function __spreadArray(to, from, pack) {
632
- if (pack || arguments.length === 2)
633
- for (var i = 0, l = from.length, ar; i < l; i++) {
634
- if (ar || !(i in from)) {
635
- if (!ar)
636
- ar = Array.prototype.slice.call(from, 0, i);
637
- ar[i] = from[i];
638
- }
639
- }
640
- return to.concat(ar || Array.prototype.slice.call(from));
641
- }
642
- function __await(v) {
643
- return this instanceof __await ? (this.v = v, this) : new __await(v);
644
- }
645
- function __asyncGenerator(thisArg, _arguments, generator) {
646
- if (!Symbol.asyncIterator)
647
- throw new TypeError("Symbol.asyncIterator is not defined.");
648
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
649
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
650
- function verb(n) { if (g[n])
651
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
652
- function resume(n, v) { try {
653
- step(g[n](v));
654
- }
655
- catch (e) {
656
- settle(q[0][3], e);
657
- } }
658
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
659
- function fulfill(value) { resume("next", value); }
660
- function reject(value) { resume("throw", value); }
661
- function settle(f, v) { if (f(v), q.shift(), q.length)
662
- resume(q[0][0], q[0][1]); }
663
- }
664
- function __asyncDelegator(o) {
665
- var i, p;
666
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
667
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
668
- }
669
- function __asyncValues(o) {
670
- if (!Symbol.asyncIterator)
671
- throw new TypeError("Symbol.asyncIterator is not defined.");
672
- var m = o[Symbol.asyncIterator], i;
673
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
674
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
675
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
676
- }
677
- function __makeTemplateObject(cooked, raw) {
678
- if (Object.defineProperty) {
679
- Object.defineProperty(cooked, "raw", { value: raw });
680
- }
681
- else {
682
- cooked.raw = raw;
683
- }
684
- return cooked;
685
- }
686
- ;
687
- var __setModuleDefault = Object.create ? (function (o, v) {
688
- Object.defineProperty(o, "default", { enumerable: true, value: v });
689
- }) : function (o, v) {
690
- o["default"] = v;
691
- };
692
- function __importStar(mod) {
693
- if (mod && mod.__esModule)
694
- return mod;
695
- var result = {};
696
- if (mod != null)
697
- for (var k in mod)
698
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
699
- __createBinding(result, mod, k);
700
- __setModuleDefault(result, mod);
701
- return result;
702
- }
703
- function __importDefault(mod) {
704
- return (mod && mod.__esModule) ? mod : { default: mod };
705
- }
706
- function __classPrivateFieldGet(receiver, state, kind, f) {
707
- if (kind === "a" && !f)
708
- throw new TypeError("Private accessor was defined without a getter");
709
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
710
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
711
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
712
- }
713
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
714
- if (kind === "m")
715
- throw new TypeError("Private method is not writable");
716
- if (kind === "a" && !f)
717
- throw new TypeError("Private accessor was defined without a setter");
718
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
719
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
720
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
406
+ /*! *****************************************************************************
407
+ Copyright (c) Microsoft Corporation.
408
+
409
+ Permission to use, copy, modify, and/or distribute this software for any
410
+ purpose with or without fee is hereby granted.
411
+
412
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
413
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
414
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
415
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
416
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
417
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
418
+ PERFORMANCE OF THIS SOFTWARE.
419
+ ***************************************************************************** */
420
+ /* global Reflect, Promise */
421
+ var extendStatics = function (d, b) {
422
+ extendStatics = Object.setPrototypeOf ||
423
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
424
+ function (d, b) { for (var p in b)
425
+ if (Object.prototype.hasOwnProperty.call(b, p))
426
+ d[p] = b[p]; };
427
+ return extendStatics(d, b);
428
+ };
429
+ function __extends(d, b) {
430
+ if (typeof b !== "function" && b !== null)
431
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
432
+ extendStatics(d, b);
433
+ function __() { this.constructor = d; }
434
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
435
+ }
436
+ var __assign = function () {
437
+ __assign = Object.assign || function __assign(t) {
438
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
439
+ s = arguments[i];
440
+ for (var p in s)
441
+ if (Object.prototype.hasOwnProperty.call(s, p))
442
+ t[p] = s[p];
443
+ }
444
+ return t;
445
+ };
446
+ return __assign.apply(this, arguments);
447
+ };
448
+ function __rest(s, e) {
449
+ var t = {};
450
+ for (var p in s)
451
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
452
+ t[p] = s[p];
453
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
454
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
455
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
456
+ t[p[i]] = s[p[i]];
457
+ }
458
+ return t;
459
+ }
460
+ function __decorate(decorators, target, key, desc) {
461
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
462
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
463
+ r = Reflect.decorate(decorators, target, key, desc);
464
+ else
465
+ for (var i = decorators.length - 1; i >= 0; i--)
466
+ if (d = decorators[i])
467
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
468
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
469
+ }
470
+ function __param(paramIndex, decorator) {
471
+ return function (target, key) { decorator(target, key, paramIndex); };
472
+ }
473
+ function __metadata(metadataKey, metadataValue) {
474
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
475
+ return Reflect.metadata(metadataKey, metadataValue);
476
+ }
477
+ function __awaiter(thisArg, _arguments, P, generator) {
478
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
479
+ return new (P || (P = Promise))(function (resolve, reject) {
480
+ function fulfilled(value) { try {
481
+ step(generator.next(value));
482
+ }
483
+ catch (e) {
484
+ reject(e);
485
+ } }
486
+ function rejected(value) { try {
487
+ step(generator["throw"](value));
488
+ }
489
+ catch (e) {
490
+ reject(e);
491
+ } }
492
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
493
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
494
+ });
495
+ }
496
+ function __generator(thisArg, body) {
497
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
498
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
499
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
500
+ function verb(n) { return function (v) { return step([n, v]); }; }
501
+ function step(op) {
502
+ if (f)
503
+ throw new TypeError("Generator is already executing.");
504
+ while (_)
505
+ try {
506
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
507
+ return t;
508
+ if (y = 0, t)
509
+ op = [op[0] & 2, t.value];
510
+ switch (op[0]) {
511
+ case 0:
512
+ case 1:
513
+ t = op;
514
+ break;
515
+ case 4:
516
+ _.label++;
517
+ return { value: op[1], done: false };
518
+ case 5:
519
+ _.label++;
520
+ y = op[1];
521
+ op = [0];
522
+ continue;
523
+ case 7:
524
+ op = _.ops.pop();
525
+ _.trys.pop();
526
+ continue;
527
+ default:
528
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
529
+ _ = 0;
530
+ continue;
531
+ }
532
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
533
+ _.label = op[1];
534
+ break;
535
+ }
536
+ if (op[0] === 6 && _.label < t[1]) {
537
+ _.label = t[1];
538
+ t = op;
539
+ break;
540
+ }
541
+ if (t && _.label < t[2]) {
542
+ _.label = t[2];
543
+ _.ops.push(op);
544
+ break;
545
+ }
546
+ if (t[2])
547
+ _.ops.pop();
548
+ _.trys.pop();
549
+ continue;
550
+ }
551
+ op = body.call(thisArg, _);
552
+ }
553
+ catch (e) {
554
+ op = [6, e];
555
+ y = 0;
556
+ }
557
+ finally {
558
+ f = t = 0;
559
+ }
560
+ if (op[0] & 5)
561
+ throw op[1];
562
+ return { value: op[0] ? op[1] : void 0, done: true };
563
+ }
564
+ }
565
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
566
+ if (k2 === undefined)
567
+ k2 = k;
568
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
569
+ }) : (function (o, m, k, k2) {
570
+ if (k2 === undefined)
571
+ k2 = k;
572
+ o[k2] = m[k];
573
+ });
574
+ function __exportStar(m, o) {
575
+ for (var p in m)
576
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
577
+ __createBinding(o, m, p);
578
+ }
579
+ function __values(o) {
580
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
581
+ if (m)
582
+ return m.call(o);
583
+ if (o && typeof o.length === "number")
584
+ return {
585
+ next: function () {
586
+ if (o && i >= o.length)
587
+ o = void 0;
588
+ return { value: o && o[i++], done: !o };
589
+ }
590
+ };
591
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
592
+ }
593
+ function __read(o, n) {
594
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
595
+ if (!m)
596
+ return o;
597
+ var i = m.call(o), r, ar = [], e;
598
+ try {
599
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
600
+ ar.push(r.value);
601
+ }
602
+ catch (error) {
603
+ e = { error: error };
604
+ }
605
+ finally {
606
+ try {
607
+ if (r && !r.done && (m = i["return"]))
608
+ m.call(i);
609
+ }
610
+ finally {
611
+ if (e)
612
+ throw e.error;
613
+ }
614
+ }
615
+ return ar;
616
+ }
617
+ /** @deprecated */
618
+ function __spread() {
619
+ for (var ar = [], i = 0; i < arguments.length; i++)
620
+ ar = ar.concat(__read(arguments[i]));
621
+ return ar;
622
+ }
623
+ /** @deprecated */
624
+ function __spreadArrays() {
625
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
626
+ s += arguments[i].length;
627
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
628
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
629
+ r[k] = a[j];
630
+ return r;
631
+ }
632
+ function __spreadArray(to, from, pack) {
633
+ if (pack || arguments.length === 2)
634
+ for (var i = 0, l = from.length, ar; i < l; i++) {
635
+ if (ar || !(i in from)) {
636
+ if (!ar)
637
+ ar = Array.prototype.slice.call(from, 0, i);
638
+ ar[i] = from[i];
639
+ }
640
+ }
641
+ return to.concat(ar || Array.prototype.slice.call(from));
642
+ }
643
+ function __await(v) {
644
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
645
+ }
646
+ function __asyncGenerator(thisArg, _arguments, generator) {
647
+ if (!Symbol.asyncIterator)
648
+ throw new TypeError("Symbol.asyncIterator is not defined.");
649
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
650
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
651
+ function verb(n) { if (g[n])
652
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
653
+ function resume(n, v) { try {
654
+ step(g[n](v));
655
+ }
656
+ catch (e) {
657
+ settle(q[0][3], e);
658
+ } }
659
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
660
+ function fulfill(value) { resume("next", value); }
661
+ function reject(value) { resume("throw", value); }
662
+ function settle(f, v) { if (f(v), q.shift(), q.length)
663
+ resume(q[0][0], q[0][1]); }
664
+ }
665
+ function __asyncDelegator(o) {
666
+ var i, p;
667
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
668
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
669
+ }
670
+ function __asyncValues(o) {
671
+ if (!Symbol.asyncIterator)
672
+ throw new TypeError("Symbol.asyncIterator is not defined.");
673
+ var m = o[Symbol.asyncIterator], i;
674
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
675
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
676
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
677
+ }
678
+ function __makeTemplateObject(cooked, raw) {
679
+ if (Object.defineProperty) {
680
+ Object.defineProperty(cooked, "raw", { value: raw });
681
+ }
682
+ else {
683
+ cooked.raw = raw;
684
+ }
685
+ return cooked;
686
+ }
687
+ ;
688
+ var __setModuleDefault = Object.create ? (function (o, v) {
689
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
690
+ }) : function (o, v) {
691
+ o["default"] = v;
692
+ };
693
+ function __importStar(mod) {
694
+ if (mod && mod.__esModule)
695
+ return mod;
696
+ var result = {};
697
+ if (mod != null)
698
+ for (var k in mod)
699
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
700
+ __createBinding(result, mod, k);
701
+ __setModuleDefault(result, mod);
702
+ return result;
703
+ }
704
+ function __importDefault(mod) {
705
+ return (mod && mod.__esModule) ? mod : { default: mod };
706
+ }
707
+ function __classPrivateFieldGet(receiver, state, kind, f) {
708
+ if (kind === "a" && !f)
709
+ throw new TypeError("Private accessor was defined without a getter");
710
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
711
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
712
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
713
+ }
714
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
715
+ if (kind === "m")
716
+ throw new TypeError("Private method is not writable");
717
+ if (kind === "a" && !f)
718
+ throw new TypeError("Private accessor was defined without a setter");
719
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
720
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
721
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
721
722
  }
722
723
 
723
- var MessageQueueState;
724
- (function (MessageQueueState) {
725
- MessageQueueState["Sent"] = "S";
726
- MessageQueueState["PartiallySent"] = "P";
727
- MessageQueueState["Sending"] = "E";
728
- MessageQueueState["Queued"] = "Q";
729
- MessageQueueState["Canceled"] = "C";
730
- MessageQueueState["InvalidRecipients"] = "I";
731
- MessageQueueState["Failed"] = "F";
724
+ var MessageQueueState;
725
+ (function (MessageQueueState) {
726
+ MessageQueueState["Sent"] = "S";
727
+ MessageQueueState["PartiallySent"] = "P";
728
+ MessageQueueState["Sending"] = "E";
729
+ MessageQueueState["Queued"] = "Q";
730
+ MessageQueueState["Canceled"] = "C";
731
+ MessageQueueState["InvalidRecipients"] = "I";
732
+ MessageQueueState["Failed"] = "F";
732
733
  })(MessageQueueState || (MessageQueueState = {}));
733
734
 
734
- var MessageQueueStates = [
735
- { name: 'Sent', value: MessageQueueState.Sent },
736
- { name: 'Partially Sent', value: MessageQueueState.PartiallySent },
737
- { name: 'Sending', value: MessageQueueState.Sending },
738
- { name: 'Queued', value: MessageQueueState.Queued },
739
- { name: 'Canceled', value: MessageQueueState.Canceled },
740
- { name: 'Invalid Recipients', value: MessageQueueState.InvalidRecipients },
741
- { name: 'Failed', value: MessageQueueState.Failed }
735
+ var MessageQueueStates = [
736
+ { name: 'Sent', value: MessageQueueState.Sent },
737
+ { name: 'Partially Sent', value: MessageQueueState.PartiallySent },
738
+ { name: 'Sending', value: MessageQueueState.Sending },
739
+ { name: 'Queued', value: MessageQueueState.Queued },
740
+ { name: 'Canceled', value: MessageQueueState.Canceled },
741
+ { name: 'Invalid Recipients', value: MessageQueueState.InvalidRecipients },
742
+ { name: 'Failed', value: MessageQueueState.Failed }
742
743
  ];
743
744
 
744
- var EmailMessageQueueFormat;
745
- (function (EmailMessageQueueFormat) {
746
- EmailMessageQueueFormat["Text"] = "T";
747
- EmailMessageQueueFormat["HTML"] = "H";
748
- EmailMessageQueueFormat["RichText"] = "R";
745
+ var EmailMessageQueueFormat;
746
+ (function (EmailMessageQueueFormat) {
747
+ EmailMessageQueueFormat["Text"] = "T";
748
+ EmailMessageQueueFormat["HTML"] = "H";
749
+ EmailMessageQueueFormat["RichText"] = "R";
749
750
  })(EmailMessageQueueFormat || (EmailMessageQueueFormat = {}));
750
751
 
751
- var MessageQueueType;
752
- (function (MessageQueueType) {
753
- MessageQueueType["Sms"] = "S";
754
- MessageQueueType["Email"] = "E";
752
+ var MessageQueueType;
753
+ (function (MessageQueueType) {
754
+ MessageQueueType["Sms"] = "S";
755
+ MessageQueueType["Email"] = "E";
755
756
  })(MessageQueueType || (MessageQueueType = {}));
756
757
 
757
- var MessageQueueEventType;
758
- (function (MessageQueueEventType) {
759
- MessageQueueEventType["Click"] = "click";
760
- MessageQueueEventType["Open"] = "open";
758
+ var MessageQueueEventType;
759
+ (function (MessageQueueEventType) {
760
+ MessageQueueEventType["Click"] = "click";
761
+ MessageQueueEventType["Open"] = "open";
761
762
  })(MessageQueueEventType || (MessageQueueEventType = {}));
762
763
 
763
- var MessageQueueEventTypes = [
764
- { name: 'Open', value: MessageQueueEventType.Open },
765
- { name: 'Click', value: MessageQueueEventType.Click },
764
+ var MessageQueueEventTypes = [
765
+ { name: 'Open', value: MessageQueueEventType.Open },
766
+ { name: 'Click', value: MessageQueueEventType.Click },
766
767
  ];
767
768
 
768
- var RecipientComponent = /** @class */ (function () {
769
- function RecipientComponent() {
770
- }
771
- RecipientComponent.prototype.ngOnInit = function () {
772
- var icons = {
773
- 'S': { name: 'check_circle', tooltip: 'Sent' },
774
- 'E': { name: 'offline_bolt', tooltip: 'Sending' },
775
- 'F': { name: 'info', tooltip: 'Failed' },
776
- };
777
- this.icon = icons[this.state];
778
- };
779
- return RecipientComponent;
780
- }());
781
- RecipientComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RecipientComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
782
- RecipientComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: RecipientComponent, selector: "app-recipient", inputs: { name: "name", state: "state" }, ngImport: i0__namespace, 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__namespace$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
783
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RecipientComponent, decorators: [{
784
- type: i0.Component,
785
- args: [{
786
- selector: 'app-recipient',
787
- templateUrl: './recipient.component.html',
788
- styleUrls: ['./recipient.component.scss'],
789
- }]
790
- }], propDecorators: { name: [{
791
- type: i0.Input
792
- }], state: [{
793
- type: i0.Input
769
+ var RecipientComponent = /** @class */ (function () {
770
+ function RecipientComponent() {
771
+ }
772
+ RecipientComponent.prototype.ngOnInit = function () {
773
+ var icons = {
774
+ 'S': { name: 'check_circle', tooltip: 'Sent' },
775
+ 'E': { name: 'offline_bolt', tooltip: 'Sending' },
776
+ 'F': { name: 'info', tooltip: 'Failed' },
777
+ };
778
+ this.icon = icons[this.state];
779
+ };
780
+ return RecipientComponent;
781
+ }());
782
+ RecipientComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RecipientComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
783
+ RecipientComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: RecipientComponent, selector: "app-recipient", inputs: { name: "name", state: "state" }, ngImport: i0__namespace, 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__namespace$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i16__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
784
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RecipientComponent, decorators: [{
785
+ type: i0.Component,
786
+ args: [{
787
+ selector: 'app-recipient',
788
+ templateUrl: './recipient.component.html',
789
+ styleUrls: ['./recipient.component.scss'],
790
+ }]
791
+ }], propDecorators: { name: [{
792
+ type: i0.Input
793
+ }], state: [{
794
+ type: i0.Input
794
795
  }] } });
795
796
 
796
- var QueueComponent = /** @class */ (function () {
797
- function QueueComponent(_config, _message, _prompt, _dialog, _data) {
798
- this._config = _config;
799
- this._message = _message;
800
- this._prompt = _prompt;
801
- this._dialog = _dialog;
802
- this._data = _data;
803
- this.messageQueueRecipients = {};
804
- this.emailMessageQueueFormat = EmailMessageQueueFormat;
805
- this.MessageQueueEventTypes = indexNameValue(MessageQueueEventTypes);
806
- this.MessageQueueEventType = MessageQueueEventType;
807
- this._destroy$ = new rxjs.Subject();
808
- }
809
- QueueComponent.prototype.ngOnInit = function () {
810
- var _this = this;
811
- this.messageQueueStates = indexNameValue(MessageQueueStates);
812
- this.resendMessageQueue = this._config.resendMessageQueue;
813
- this.forwardMessageQueue = this._config.forwardMessageQueue;
814
- this._config.loadMessageQueue(this._data.messageQueueId)
815
- .subscribe(function (messageQueue) {
816
- _this.messageQueue = messageQueue;
817
- if (_this.messageQueue.emailMessageQueue) {
818
- var body = _this.messageQueue.emailMessageQueue.body;
819
- if (_this.messageQueue.emailMessageQueue.format === EmailMessageQueueFormat.HTML) {
820
- try {
821
- var doc = new DOMParser().parseFromString(body, 'text/html');
822
- doc.querySelectorAll('a').forEach(function (el) {
823
- el.setAttribute('target', '_blank');
824
- });
825
- body = doc.documentElement.innerHTML;
826
- }
827
- catch (e) {
828
- }
829
- }
830
- else {
831
- body = _this.anchorMe(body);
832
- }
833
- _this.messageQueue.emailMessageQueue.body = body;
834
- }
835
- if (_this.messageQueue.smsMessageQueue) {
836
- _this.messageQueue.smsMessageQueue.body = _this.anchorMe(_this.messageQueue.smsMessageQueue.body);
837
- }
838
- _this.messageQueueRecipients = _this.messageQueue.messageQueueRecipients
839
- .reduce(function (accum, messageQueueRecipient) {
840
- accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
841
- return accum;
842
- }, {});
843
- _this._setLogsConfig(messageQueue);
844
- _this._setAttachmentsConfig(messageQueue);
845
- _this._setEventsConfig(messageQueue);
846
- });
847
- };
848
- QueueComponent.prototype.anchorMe = function (html) {
849
- return anchorme__default["default"](html, {
850
- options: {
851
- attributes: [
852
- {
853
- name: 'target',
854
- value: '_blank'
855
- },
856
- ],
857
- },
858
- });
859
- };
860
- QueueComponent.prototype.openMessage = function (message) {
861
- this._dialog.open(MessageComponent, {
862
- data: {
863
- message: message,
864
- },
865
- width: '85%'
866
- });
867
- };
868
- QueueComponent.prototype.resend = function () {
869
- var _this = this;
870
- this._prompt.confirm({
871
- title: 'Confirm',
872
- template: 'Are you sure you would like to resend this message?'
873
- }).subscribe(function () {
874
- _this.resendMessageQueue(_this.messageQueue)
875
- .subscribe(function (messageQueue) {
876
- Object.assign(_this.messageQueue, messageQueue);
877
- _this._message.success('Successfully resent');
878
- if (_this.logList) {
879
- _this.logList.reload();
880
- }
881
- });
882
- });
883
- };
884
- QueueComponent.prototype.forward = function () {
885
- var _this = this;
886
- var typeName = this.messageQueue.type === MessageQueueType.Email ? 'an email' : 'a phone number';
887
- this._prompt.input({
888
- label: "Please enter " + typeName + " to forward to",
889
- title: 'Forward Message',
890
- commitLabel: 'Forward',
891
- required: true
892
- }).subscribe(function (value) {
893
- if (value) {
894
- _this.forwardMessageQueue(_this.messageQueue, value)
895
- .subscribe(function (messageQueue) {
896
- _this.messageQueue = Object.assign(Object.assign({}, _this.messageQueue), { messageQueue: messageQueue });
897
- _this._message.success('Successfully forwarded');
898
- if (_this.logList) {
899
- _this.logList.reload();
900
- }
901
- });
902
- }
903
- });
904
- };
905
- QueueComponent.prototype.ngOnDestroy = function () {
906
- this._destroy$.next();
907
- this._destroy$.complete();
908
- };
909
- QueueComponent.prototype._setLogsConfig = function (messageQueue) {
910
- var _this = this;
911
- this.logConfig = {
912
- loadMore: true,
913
- queryParam: false,
914
- fetch: function (query) {
915
- return _this._config.loadLogs(messageQueue, query);
916
- }
917
- };
918
- };
919
- QueueComponent.prototype._setEventsConfig = function (messageQueue) {
920
- var _this = this;
921
- this.eventConfig = {
922
- loadMore: true,
923
- queryParam: false,
924
- fetch: function (query) {
925
- return _this._config.loadMessageQueueEvents(messageQueue, query);
926
- }
927
- };
928
- };
929
- QueueComponent.prototype._setAttachmentsConfig = function (messageQueue) {
930
- var _this = this;
931
- this.attachmentConfig = {
932
- queryParam: false,
933
- fetch: function (query) {
934
- return _this._config.loadMessageQueueAttachments(messageQueue, query)
935
- .pipe(operators.map(function (response) { return ({
936
- data: response.data.map(function (value) {
937
- value.prettyFilesize = _this._prettyFilesize(value.filesize);
938
- return value;
939
- }), paging: response.paging
940
- }); }));
941
- }
942
- };
943
- if (this._config.downloadMessageQueueAttachment) {
944
- this.attachmentConfig.rowActions = [
945
- {
946
- click: function (messageAttachment) {
947
- _this._config.downloadMessageQueueAttachment(messageAttachment, _this.messageQueue);
948
- },
949
- label: 'Download',
950
- }
951
- ];
952
- }
953
- };
954
- QueueComponent.prototype._prettyFilesize = function (bytes) {
955
- if (bytes === 0) {
956
- return '0.00 B';
957
- }
958
- var e = Math.floor(Math.log(bytes) / Math.log(1024));
959
- return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
960
- };
961
- return QueueComponent;
962
- }());
963
- QueueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueueComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i2__namespace$1.FsMessage }, { token: i1__namespace$1.FsPrompt }, { token: i1__namespace.MatDialog }, { token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
964
- QueueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueueComponent, selector: "ng-component", viewQueries: [{ propertyName: "logList", first: true, predicate: ["logList"], descendants: true }], ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"messageQueue\">\n <div mat-dialog-title>Message Queue</div>\n <mat-dialog-content>\n <mat-tab-group>\n <mat-tab label=\"Overview\">\n <ng-template matTabContent>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"25px\">\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Recipients\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.toRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.ccRecipients.length\">\n <fs-label>\n CC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.ccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.bccRecipients.length\">\n <fs-label>\n BCC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.bccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.fromName || messageQueue.emailMessageQueue.fromEmail\">\n <fs-label>\n From\n </fs-label>\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromName === messageQueue.emailMessageQueue.fromEmail; else fromEmailName\">\n {{messageQueue.emailMessageQueue.fromName}}\n </ng-container>\n\n <ng-template #fromEmailName>\n {{messageQueue.emailMessageQueue.fromName}}\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromEmail\">\n ({{messageQueue.emailMessageQueue.fromEmail}})\n </ng-container>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.replyEmail && messageQueue.emailMessageQueue.replyEmail.length\">\n <fs-label>\n Reply To\n </fs-label>\n {{messageQueue.emailMessageQueue.replyEmail.join(', ')}}\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Number\n </fs-label>\n <app-recipient \n [state]=\"messageQueue.state\"\n [name]=\"messageQueue.smsMessageQueue.toNumber\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.smsMessageQueue.fromNumber\">\n <fs-label>\n From Number\n </fs-label>\n {{messageQueue.smsMessageQueue.fromNumber}}\n </fs-label-field>\n </ng-container>\n \n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{messageQueue.scheduledDate | fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{messageQueueStates[messageQueue.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.message\">\n <fs-label>\n Message Type\n </fs-label>\n <a\n (click)=\"openMessage(messageQueue.message)\"\n *ngIf=\"loadMessage; else elseMessage\">\n {{messageQueue.message.name}}\n </a>\n <ng-template #elseMessage>\n {{messageQueue.message.name}}\n </ng-template>\n </fs-label-field>\n </div>\n\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field class=\"subject\">\n <fs-label>\n Subject\n </fs-label>\n {{messageQueue.emailMessageQueue.subject}}\n </fs-label-field>\n\n <fs-label-field class=\"body\">\n <fs-label>\n Body\n </fs-label>\n <div\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.Text\"\n class=\"format-text\"\n [innerHTML]=\"messageQueue.emailMessageQueue.body\">\n </div>\n <fs-iframe\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.HTML || messageQueue.emailMessageQueue.format===emailMessageQueueFormat.RichText\"\n [html]=\"messageQueue.emailMessageQueue.body\">\n </fs-iframe>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n Message\n </fs-label>\n <div\n class=\"format-text\"\n [innerHTML]=\"messageQueue.smsMessageQueue.body\">\n </div>\n </fs-label-field>\n </ng-container>\n\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Logs\">\n <ng-template matTabContent>\n <fs-list [config]=\"logConfig\" #logList>\n <fs-list-column title=\"Message\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createdDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Attachments\">\n <ng-template matTabContent>\n <fs-list [config]=\"attachmentConfig\">\n <fs-list-column title=\"File Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.filename}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"File Size\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.prettyFilesize}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Events\">\n <ng-template matTabContent>\n <fs-list [config]=\"eventConfig\">\n <fs-list-column title=\"Recipient\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.messageQueueRecipient.recipient}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Event\">\n <ng-template fs-list-cell let-row=\"row\">\n {{MessageQueueEventTypes[row.type]}}\n <div class=\"small\" *ngIf=\"row.type === MessageQueueEventType.Click\">\n <a [href]=\"row.meta?.url\" target=\"_blank\">{{row.meta?.url}}</a>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.createDate | fsDateFormat: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n color=\"primary\">\n Done\n </button>\n <button\n mat-button\n *ngIf=\"resendMessageQueue\"\n type=\"button\"\n (click)=\"resend()\"\n type=\"button\">\n Resend\n </button>\n <button\n mat-button\n *ngIf=\"forwardMessageQueue\"\n type=\"button\"\n (click)=\"forward()\"\n type=\"button\">\n Forward\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".subject,.body{display:block;margin-top:15px}.body .format-text{white-space:pre-wrap}.body .body-frame{border:0}.body ::ng-deep .field-label{margin-bottom:10px}app-recipient{display:block}[hidden]{display:none!important}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6__namespace$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6__namespace$1.FsLabelComponent, selector: "fs-label" }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }, { type: i2__namespace.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i10__namespace.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i11__namespace.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: i12__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i16__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i16__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i15__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i10__namespace.FsDateFormatPipe } });
965
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueueComponent, decorators: [{
966
- type: i0.Component,
967
- args: [{
968
- templateUrl: './queue.component.html',
969
- styleUrls: ['./queue.component.scss'],
970
- }]
971
- }], ctorParameters: function () {
972
- return [{ type: undefined, decorators: [{
973
- type: i0.Inject,
974
- args: [FS_APP_MESSAGE_CONFIG]
975
- }] }, { type: i2__namespace$1.FsMessage }, { type: i1__namespace$1.FsPrompt }, { type: i1__namespace.MatDialog }, { type: undefined, decorators: [{
976
- type: i0.Inject,
977
- args: [i1.MAT_DIALOG_DATA]
978
- }] }];
979
- }, propDecorators: { logList: [{
980
- type: i0.ViewChild,
981
- args: ['logList']
797
+ var QueueComponent = /** @class */ (function () {
798
+ function QueueComponent(_config, _message, _prompt, _dialog, _data) {
799
+ this._config = _config;
800
+ this._message = _message;
801
+ this._prompt = _prompt;
802
+ this._dialog = _dialog;
803
+ this._data = _data;
804
+ this.messageQueueRecipients = {};
805
+ this.emailMessageQueueFormat = EmailMessageQueueFormat;
806
+ this.MessageQueueEventTypes = indexNameValue(MessageQueueEventTypes);
807
+ this.MessageQueueEventType = MessageQueueEventType;
808
+ this._destroy$ = new rxjs.Subject();
809
+ }
810
+ QueueComponent.prototype.ngOnInit = function () {
811
+ var _this = this;
812
+ this.messageQueueStates = indexNameValue(MessageQueueStates);
813
+ this.resendMessageQueue = this._config.resendMessageQueue;
814
+ this.forwardMessageQueue = this._config.forwardMessageQueue;
815
+ this._config.loadMessageQueue(this._data.messageQueueId)
816
+ .subscribe(function (messageQueue) {
817
+ _this.messageQueue = messageQueue;
818
+ if (_this.messageQueue.emailMessageQueue) {
819
+ var body = _this.messageQueue.emailMessageQueue.body;
820
+ if (_this.messageQueue.emailMessageQueue.format === EmailMessageQueueFormat.HTML) {
821
+ try {
822
+ var doc = new DOMParser().parseFromString(body, 'text/html');
823
+ doc.querySelectorAll('a').forEach(function (el) {
824
+ el.setAttribute('target', '_blank');
825
+ });
826
+ body = doc.documentElement.innerHTML;
827
+ }
828
+ catch (e) {
829
+ }
830
+ }
831
+ else {
832
+ body = _this.anchorMe(body);
833
+ }
834
+ _this.messageQueue.emailMessageQueue.body = body;
835
+ }
836
+ if (_this.messageQueue.smsMessageQueue) {
837
+ _this.messageQueue.smsMessageQueue.body = _this.anchorMe(_this.messageQueue.smsMessageQueue.body);
838
+ }
839
+ _this.messageQueueRecipients = _this.messageQueue.messageQueueRecipients
840
+ .reduce(function (accum, messageQueueRecipient) {
841
+ accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
842
+ return accum;
843
+ }, {});
844
+ _this._setLogsConfig(messageQueue);
845
+ _this._setAttachmentsConfig(messageQueue);
846
+ _this._setEventsConfig(messageQueue);
847
+ });
848
+ };
849
+ QueueComponent.prototype.anchorMe = function (html) {
850
+ return anchorme__default["default"](html, {
851
+ options: {
852
+ attributes: [
853
+ {
854
+ name: 'target',
855
+ value: '_blank'
856
+ },
857
+ ],
858
+ },
859
+ });
860
+ };
861
+ QueueComponent.prototype.openMessage = function (message) {
862
+ this._dialog.open(MessageComponent, {
863
+ data: {
864
+ message: message,
865
+ },
866
+ width: '85%'
867
+ });
868
+ };
869
+ QueueComponent.prototype.resend = function () {
870
+ var _this = this;
871
+ this._prompt.confirm({
872
+ title: 'Confirm',
873
+ template: 'Are you sure you would like to resend this message?'
874
+ }).subscribe(function () {
875
+ _this.resendMessageQueue(_this.messageQueue)
876
+ .subscribe(function (messageQueue) {
877
+ Object.assign(_this.messageQueue, messageQueue);
878
+ _this._message.success('Successfully resent');
879
+ if (_this.logList) {
880
+ _this.logList.reload();
881
+ }
882
+ });
883
+ });
884
+ };
885
+ QueueComponent.prototype.forward = function () {
886
+ var _this = this;
887
+ var typeName = this.messageQueue.type === MessageQueueType.Email ? 'an email' : 'a phone number';
888
+ this._prompt.input({
889
+ label: "Please enter " + typeName + " to forward to",
890
+ title: 'Forward Message',
891
+ commitLabel: 'Forward',
892
+ required: true
893
+ }).subscribe(function (value) {
894
+ if (value) {
895
+ _this.forwardMessageQueue(_this.messageQueue, value)
896
+ .subscribe(function (messageQueue) {
897
+ _this.messageQueue = Object.assign(Object.assign({}, _this.messageQueue), { messageQueue: messageQueue });
898
+ _this._message.success('Successfully forwarded');
899
+ if (_this.logList) {
900
+ _this.logList.reload();
901
+ }
902
+ });
903
+ }
904
+ });
905
+ };
906
+ QueueComponent.prototype.ngOnDestroy = function () {
907
+ this._destroy$.next();
908
+ this._destroy$.complete();
909
+ };
910
+ QueueComponent.prototype._setLogsConfig = function (messageQueue) {
911
+ var _this = this;
912
+ this.logConfig = {
913
+ loadMore: true,
914
+ queryParam: false,
915
+ fetch: function (query) {
916
+ return _this._config.loadLogs(messageQueue, query);
917
+ }
918
+ };
919
+ };
920
+ QueueComponent.prototype._setEventsConfig = function (messageQueue) {
921
+ var _this = this;
922
+ this.eventConfig = {
923
+ loadMore: true,
924
+ queryParam: false,
925
+ fetch: function (query) {
926
+ return _this._config.loadMessageQueueEvents(messageQueue, query);
927
+ }
928
+ };
929
+ };
930
+ QueueComponent.prototype._setAttachmentsConfig = function (messageQueue) {
931
+ var _this = this;
932
+ this.attachmentConfig = {
933
+ queryParam: false,
934
+ fetch: function (query) {
935
+ return _this._config.loadMessageQueueAttachments(messageQueue, query)
936
+ .pipe(operators.map(function (response) { return ({
937
+ data: response.data.map(function (value) {
938
+ value.prettyFilesize = _this._prettyFilesize(value.filesize);
939
+ return value;
940
+ }), paging: response.paging
941
+ }); }));
942
+ }
943
+ };
944
+ if (this._config.downloadMessageQueueAttachment) {
945
+ this.attachmentConfig.rowActions = [
946
+ {
947
+ click: function (messageAttachment) {
948
+ _this._config.downloadMessageQueueAttachment(messageAttachment, _this.messageQueue);
949
+ },
950
+ label: 'Download',
951
+ }
952
+ ];
953
+ }
954
+ };
955
+ QueueComponent.prototype._prettyFilesize = function (bytes) {
956
+ if (bytes === 0) {
957
+ return '0.00 B';
958
+ }
959
+ var e = Math.floor(Math.log(bytes) / Math.log(1024));
960
+ return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
961
+ };
962
+ return QueueComponent;
963
+ }());
964
+ QueueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueueComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i2__namespace$1.FsMessage }, { token: i1__namespace$1.FsPrompt }, { token: i1__namespace.MatDialog }, { token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
965
+ QueueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueueComponent, selector: "ng-component", viewQueries: [{ propertyName: "logList", first: true, predicate: ["logList"], descendants: true }], ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"messageQueue\">\n <div mat-dialog-title>Message Queue</div>\n <mat-dialog-content>\n <mat-tab-group>\n <mat-tab label=\"Overview\">\n <ng-template matTabContent>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"25px\">\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Recipients\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.toRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.ccRecipients.length\">\n <fs-label>\n CC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.ccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.bccRecipients.length\">\n <fs-label>\n BCC\n </fs-label>\n <app-recipient \n *ngFor=\"let recipient of messageQueue.emailMessageQueue.bccRecipients\"\n [state]=\"messageQueueRecipients[recipient]\"\n [name]=\"recipient\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.fromName || messageQueue.emailMessageQueue.fromEmail\">\n <fs-label>\n From\n </fs-label>\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromName === messageQueue.emailMessageQueue.fromEmail; else fromEmailName\">\n {{messageQueue.emailMessageQueue.fromName}}\n </ng-container>\n\n <ng-template #fromEmailName>\n {{messageQueue.emailMessageQueue.fromName}}\n <ng-container *ngIf=\"messageQueue.emailMessageQueue.fromEmail\">\n ({{messageQueue.emailMessageQueue.fromEmail}})\n </ng-container>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.emailMessageQueue.replyEmail && messageQueue.emailMessageQueue.replyEmail.length\">\n <fs-label>\n Reply To\n </fs-label>\n {{messageQueue.emailMessageQueue.replyEmail.join(', ')}}\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n To Number\n </fs-label>\n <app-recipient \n [state]=\"messageQueue.state\"\n [name]=\"messageQueue.smsMessageQueue.toNumber\">\n </app-recipient> \n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.smsMessageQueue.fromNumber\">\n <fs-label>\n From Number\n </fs-label>\n {{messageQueue.smsMessageQueue.fromNumber}}\n </fs-label-field>\n </ng-container>\n \n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{messageQueue.scheduledDate | fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{messageQueueStates[messageQueue.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"messageQueue.message\">\n <fs-label>\n Message Type\n </fs-label>\n <a\n (click)=\"openMessage(messageQueue.message)\"\n *ngIf=\"loadMessage; else elseMessage\">\n {{messageQueue.message.name}}\n </a>\n <ng-template #elseMessage>\n {{messageQueue.message.name}}\n </ng-template>\n </fs-label-field>\n </div>\n\n <ng-container *ngIf=\"messageQueue.emailMessageQueue\">\n <fs-label-field class=\"subject\">\n <fs-label>\n Subject\n </fs-label>\n {{messageQueue.emailMessageQueue.subject}}\n </fs-label-field>\n\n <fs-label-field class=\"body\">\n <fs-label>\n Body\n </fs-label>\n <div\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.Text\"\n class=\"format-text\"\n [innerHTML]=\"messageQueue.emailMessageQueue.body\">\n </div>\n <fs-iframe\n *ngIf=\"messageQueue.emailMessageQueue.format===emailMessageQueueFormat.HTML || messageQueue.emailMessageQueue.format===emailMessageQueueFormat.RichText\"\n [html]=\"messageQueue.emailMessageQueue.body\">\n </fs-iframe>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"messageQueue.smsMessageQueue\">\n <fs-label-field>\n <fs-label>\n Message\n </fs-label>\n <div\n class=\"format-text\"\n [innerHTML]=\"messageQueue.smsMessageQueue.body\">\n </div>\n </fs-label-field>\n </ng-container>\n\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Logs\">\n <ng-template matTabContent>\n <fs-list [config]=\"logConfig\" #logList>\n <fs-list-column title=\"Message\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createdDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Attachments\">\n <ng-template matTabContent>\n <fs-list [config]=\"attachmentConfig\">\n <fs-list-column title=\"File Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.filename}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"File Size\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.prettyFilesize}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Events\">\n <ng-template matTabContent>\n <fs-list [config]=\"eventConfig\">\n <fs-list-column title=\"Recipient\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.messageQueueRecipient.recipient}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Event\">\n <ng-template fs-list-cell let-row=\"row\">\n {{MessageQueueEventTypes[row.type]}}\n <div class=\"small\" *ngIf=\"row.type === MessageQueueEventType.Click\">\n <a [href]=\"row.meta?.url\" target=\"_blank\">{{row.meta?.url}}</a>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Date\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.createDate | fsDateFormat: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n </fs-list>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n color=\"primary\">\n Done\n </button>\n <button\n mat-button\n *ngIf=\"resendMessageQueue\"\n type=\"button\"\n (click)=\"resend()\"\n type=\"button\">\n Resend\n </button>\n <button\n mat-button\n *ngIf=\"forwardMessageQueue\"\n type=\"button\"\n (click)=\"forward()\"\n type=\"button\">\n Forward\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".subject,.body{display:block;margin-top:15px}.body .format-text{white-space:pre-wrap}.body .body-frame{border:0}.body ::ng-deep .field-label{margin-bottom:10px}app-recipient{display:block}[hidden]{display:none!important}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6__namespace$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6__namespace$1.FsLabelComponent, selector: "fs-label" }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }, { type: i2__namespace.FsIFrameComponent, selector: "fs-iframe", inputs: ["html", "styles"] }, { type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i10__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i3__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i13__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i17__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i16__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i10__namespace$1.FsDateFormatPipe } });
966
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueueComponent, decorators: [{
967
+ type: i0.Component,
968
+ args: [{
969
+ templateUrl: './queue.component.html',
970
+ styleUrls: ['./queue.component.scss'],
971
+ }]
972
+ }], ctorParameters: function () {
973
+ return [{ type: undefined, decorators: [{
974
+ type: i0.Inject,
975
+ args: [FS_APP_MESSAGE_CONFIG]
976
+ }] }, { type: i2__namespace$1.FsMessage }, { type: i1__namespace$1.FsPrompt }, { type: i1__namespace.MatDialog }, { type: undefined, decorators: [{
977
+ type: i0.Inject,
978
+ args: [i1.MAT_DIALOG_DATA]
979
+ }] }];
980
+ }, propDecorators: { logList: [{
981
+ type: i0.ViewChild,
982
+ args: ['logList']
982
983
  }] } });
983
984
 
984
- var FsMessageQueueService = /** @class */ (function () {
985
- function FsMessageQueueService(_dialog) {
986
- this._dialog = _dialog;
987
- this._destroy$ = new rxjs.Subject();
988
- }
989
- FsMessageQueueService.prototype.openMessageQueue = function (messageQueueId, options) {
990
- if (options === void 0) { options = {}; }
991
- return this._dialog.open(QueueComponent, Object.assign(Object.assign({}, options), { data: {
992
- messageQueueId: messageQueueId,
993
- }, width: options.width || '85%' })).afterClosed()
994
- .pipe(operators.takeUntil(this._destroy$));
995
- };
996
- FsMessageQueueService.prototype.ngOnDestroy = function () {
997
- this._destroy$.next();
998
- this._destroy$.complete();
999
- };
1000
- return FsMessageQueueService;
1001
- }());
1002
- FsMessageQueueService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMessageQueueService, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1003
- FsMessageQueueService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMessageQueueService });
1004
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMessageQueueService, decorators: [{
1005
- type: i0.Injectable
985
+ var FsMessageQueueService = /** @class */ (function () {
986
+ function FsMessageQueueService(_dialog) {
987
+ this._dialog = _dialog;
988
+ this._destroy$ = new rxjs.Subject();
989
+ }
990
+ FsMessageQueueService.prototype.openMessageQueue = function (messageQueueId, options) {
991
+ if (options === void 0) { options = {}; }
992
+ return this._dialog.open(QueueComponent, Object.assign(Object.assign({}, options), { data: {
993
+ messageQueueId: messageQueueId,
994
+ }, width: options.width || '85%' })).afterClosed()
995
+ .pipe(operators.takeUntil(this._destroy$));
996
+ };
997
+ FsMessageQueueService.prototype.ngOnDestroy = function () {
998
+ this._destroy$.next();
999
+ this._destroy$.complete();
1000
+ };
1001
+ return FsMessageQueueService;
1002
+ }());
1003
+ FsMessageQueueService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMessageQueueService, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1004
+ FsMessageQueueService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMessageQueueService });
1005
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMessageQueueService, decorators: [{
1006
+ type: i0.Injectable
1006
1007
  }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; } });
1007
1008
 
1008
- var TruncatePipe = /** @class */ (function () {
1009
- function TruncatePipe() {
1010
- }
1011
- TruncatePipe.prototype.transform = function (value, limit, completeWords, ellipsis) {
1012
- if (limit === void 0) { limit = 25; }
1013
- if (completeWords === void 0) { completeWords = false; }
1014
- if (ellipsis === void 0) { ellipsis = '...'; }
1015
- if (value.length < limit) {
1016
- return "" + value.substr(0, limit);
1017
- }
1018
- if (completeWords) {
1019
- limit = value.substr(0, limit).lastIndexOf(' ');
1020
- }
1021
- return "" + value.substr(0, limit) + ellipsis;
1022
- };
1023
- return TruncatePipe;
1024
- }());
1025
- TruncatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TruncatePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1026
- TruncatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TruncatePipe, name: "truncate" });
1027
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TruncatePipe, decorators: [{
1028
- type: i0.Pipe,
1029
- args: [{
1030
- name: 'truncate'
1031
- }]
1009
+ var TruncatePipe = /** @class */ (function () {
1010
+ function TruncatePipe() {
1011
+ }
1012
+ TruncatePipe.prototype.transform = function (value, limit, completeWords, ellipsis) {
1013
+ if (limit === void 0) { limit = 25; }
1014
+ if (completeWords === void 0) { completeWords = false; }
1015
+ if (ellipsis === void 0) { ellipsis = '...'; }
1016
+ if (value.length < limit) {
1017
+ return "" + value.substr(0, limit);
1018
+ }
1019
+ if (completeWords) {
1020
+ limit = value.substr(0, limit).lastIndexOf(' ');
1021
+ }
1022
+ return "" + value.substr(0, limit) + ellipsis;
1023
+ };
1024
+ return TruncatePipe;
1025
+ }());
1026
+ TruncatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TruncatePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1027
+ TruncatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TruncatePipe, name: "truncate" });
1028
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TruncatePipe, decorators: [{
1029
+ type: i0.Pipe,
1030
+ args: [{
1031
+ name: 'truncate'
1032
+ }]
1032
1033
  }] });
1033
1034
 
1034
- var QueuesComponent = /** @class */ (function () {
1035
- function QueuesComponent(_config, _dialog, _messageQueueService) {
1036
- this._config = _config;
1037
- this._dialog = _dialog;
1038
- this._messageQueueService = _messageQueueService;
1039
- this.list = null;
1040
- this.query = {};
1041
- this.config = null;
1042
- this.messageQueueStates = {};
1043
- this.MessageQueueState = MessageQueueState;
1044
- this._destroy$ = new rxjs.Subject();
1045
- }
1046
- QueuesComponent.prototype.ngOnInit = function () {
1047
- var _this = this;
1048
- this.messageQueueStates = indexNameValue(MessageQueueStates);
1049
- this.config = {
1050
- filters: [
1051
- {
1052
- name: 'keyword',
1053
- type: filter.ItemType.Keyword,
1054
- label: 'Search'
1055
- },
1056
- {
1057
- name: 'state',
1058
- type: filter.ItemType.Select,
1059
- label: 'Status',
1060
- values: function () {
1061
- return MessageQueueStates;
1062
- }
1063
- },
1064
- {
1065
- name: 'date',
1066
- type: filter.ItemType.DateRange,
1067
- label: ['From Date', 'To Date'],
1068
- },
1069
- ],
1070
- sort: { value: 'created_date', direction: 'desc' },
1071
- fetch: function (query) {
1072
- query = Object.assign(Object.assign(Object.assign({}, query), _this.query), { messageQueueAttachmentCounts: true, emailMessageQueues: true, emailMessageQueueBodies: false, smsMessageQueues: true });
1073
- return _this._config.loadMessageQueues(query)
1074
- .pipe(operators.map(function (response) { return ({ data: response.data
1075
- .map(function (messageQueue) {
1076
- return Object.assign(Object.assign({}, messageQueue), { messageQueueRecipients: messageQueue.messageQueueRecipients
1077
- .reduce(function (accum, messageQueueRecipient) {
1078
- accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
1079
- return accum;
1080
- }, {}) });
1081
- }), paging: response.paging }); }));
1082
- }
1083
- };
1084
- if (this._config.bulkMessageQueues) {
1085
- this.config.selection = {
1086
- selectAll: false,
1087
- actions: [
1088
- {
1089
- type: selection.SelectionActionType.Action,
1090
- name: 'queue',
1091
- label: 'Queue',
1092
- },
1093
- {
1094
- type: selection.SelectionActionType.Action,
1095
- name: 'resend',
1096
- label: 'Resend',
1097
- },
1098
- {
1099
- type: selection.SelectionActionType.Action,
1100
- name: 'cancel',
1101
- label: 'Cancel',
1102
- },
1103
- ],
1104
- actionSelected: function (actionSelected) {
1105
- return _this._config.bulkMessageQueues(actionSelected.action.name, actionSelected.selected)
1106
- .pipe(operators.tap(function () {
1107
- _this.list.reload();
1108
- }));
1109
- }
1110
- };
1111
- }
1112
- this.config.filters.push({
1113
- name: 'message_id',
1114
- type: filter.ItemType.Select,
1115
- label: 'Message Type',
1116
- values: function (query) {
1117
- query = Object.assign(Object.assign({}, query), { limit: 50 });
1118
- return _this._config.loadMessages(query)
1119
- .pipe(operators.map(function (response) {
1120
- return __spreadArray([
1121
- { value: null, name: 'All', }
1122
- ], __read(response.data.map(function (item) { return ({ name: item.name, value: item.id }); })));
1123
- }));
1124
- }
1125
- });
1126
- };
1127
- QueuesComponent.prototype.open = function (messageQueue) {
1128
- var _this = this;
1129
- this._messageQueueService.openMessageQueue(messageQueue.id)
1130
- .pipe(operators.takeUntil(this._destroy$))
1131
- .subscribe(function () {
1132
- _this.list.reload();
1133
- });
1134
- };
1135
- QueuesComponent.prototype.ngOnDestroy = function () {
1136
- this._destroy$.next();
1137
- this._destroy$.complete();
1138
- };
1139
- return QueuesComponent;
1140
- }());
1141
- QueuesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueuesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialog }, { token: FsMessageQueueService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1142
- QueuesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueuesComponent, selector: "fs-app-message-queues", inputs: { query: "query" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\" #list>\n <fs-list-column title=\"Message\" name=\"subject\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <a (click)=\"open(row)\">{{row.emailMessageQueue.subject|truncate:100}}</a>\n <mat-icon *ngIf=\"row.messageQueueAttachmentCount\" [matTooltip]=\"row.messageQueueAttachmentCount + ' Attachment(s)'\">attach_file</mat-icon>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <a (click)=\"open(row)\">{{row.smsMessageQueue.body|truncate:100}}</a>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Recipients\" class=\"col-recipients\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <ng-container *ngIf=\"row.emailMessageQueue.toRecipients.length; else unspecified\">\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.toRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.ccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.bccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <ng-container *ngIf=\"row.smsMessageQueue.toNumber; else unspecified\">\n <app-recipient \n class=\"small\"\n [state]=\"row.state\"\n [name]=\"row.smsMessageQueue.toNumber\">\n </app-recipient>\n </ng-container>\n </ng-container>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Status\" class=\"col-state\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [class]=\"'state-' + row.state\">{{messageQueueStates[row.state]}}</span>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Date\" name=\"created_date\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.createdDate | fsDateFormat: 'date-time-yeardiff' }}\n </ng-template>\n </fs-list-column>\n</fs-list>\n\n<ng-template #unspecified>\n <app-recipient \n class=\"small\"\n [state]=\"MessageQueueState.Failed\"\n name=\"Unspecified\">\n </app-recipient>\n</ng-template>", styles: [":host ::ng-deep .col-recipients small+small:before{content:\", \"}:host ::ng-deep .col-state .state-F,:host ::ng-deep .col-state .state-P{color:#d8524e}\n"], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i1__namespace$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i16__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i15__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "truncate": TruncatePipe, "fsDateFormat": i10__namespace.FsDateFormatPipe } });
1143
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueuesComponent, decorators: [{
1144
- type: i0.Component,
1145
- args: [{
1146
- selector: 'fs-app-message-queues',
1147
- styleUrls: ['./queues.component.scss'],
1148
- templateUrl: './queues.component.html'
1149
- }]
1150
- }], ctorParameters: function () {
1151
- return [{ type: undefined, decorators: [{
1152
- type: i0.Inject,
1153
- args: [FS_APP_MESSAGE_CONFIG]
1154
- }] }, { type: i1__namespace.MatDialog }, { type: FsMessageQueueService }];
1155
- }, propDecorators: { list: [{
1156
- type: i0.ViewChild,
1157
- args: [i2$2.FsListComponent, { static: true }]
1158
- }], query: [{
1159
- type: i0.Input
1035
+ var QueuesComponent = /** @class */ (function () {
1036
+ function QueuesComponent(_config, _dialog, _messageQueueService) {
1037
+ this._config = _config;
1038
+ this._dialog = _dialog;
1039
+ this._messageQueueService = _messageQueueService;
1040
+ this.list = null;
1041
+ this.query = {};
1042
+ this.config = null;
1043
+ this.messageQueueStates = {};
1044
+ this.MessageQueueState = MessageQueueState;
1045
+ this._destroy$ = new rxjs.Subject();
1046
+ }
1047
+ QueuesComponent.prototype.ngOnInit = function () {
1048
+ var _this = this;
1049
+ this.messageQueueStates = indexNameValue(MessageQueueStates);
1050
+ this.config = {
1051
+ filters: [
1052
+ {
1053
+ name: 'keyword',
1054
+ type: filter.ItemType.Keyword,
1055
+ label: 'Search'
1056
+ },
1057
+ {
1058
+ name: 'state',
1059
+ type: filter.ItemType.Select,
1060
+ label: 'Status',
1061
+ values: function () {
1062
+ return MessageQueueStates;
1063
+ }
1064
+ },
1065
+ {
1066
+ name: 'date',
1067
+ type: filter.ItemType.DateRange,
1068
+ label: ['From Date', 'To Date'],
1069
+ },
1070
+ ],
1071
+ sort: { value: 'created_date', direction: 'desc' },
1072
+ fetch: function (query) {
1073
+ query = Object.assign(Object.assign(Object.assign({}, query), _this.query), { messageQueueAttachmentCounts: true, emailMessageQueues: true, emailMessageQueueBodies: false, smsMessageQueues: true });
1074
+ return _this._config.loadMessageQueues(query)
1075
+ .pipe(operators.map(function (response) { return ({ data: response.data
1076
+ .map(function (messageQueue) {
1077
+ return Object.assign(Object.assign({}, messageQueue), { messageQueueRecipients: messageQueue.messageQueueRecipients
1078
+ .reduce(function (accum, messageQueueRecipient) {
1079
+ accum[messageQueueRecipient.recipient] = messageQueueRecipient.state;
1080
+ return accum;
1081
+ }, {}) });
1082
+ }), paging: response.paging }); }));
1083
+ }
1084
+ };
1085
+ if (this._config.bulkMessageQueues) {
1086
+ this.config.selection = {
1087
+ selectAll: false,
1088
+ actions: [
1089
+ {
1090
+ type: selection.SelectionActionType.Action,
1091
+ name: 'queue',
1092
+ label: 'Queue',
1093
+ },
1094
+ {
1095
+ type: selection.SelectionActionType.Action,
1096
+ name: 'resend',
1097
+ label: 'Resend',
1098
+ },
1099
+ {
1100
+ type: selection.SelectionActionType.Action,
1101
+ name: 'cancel',
1102
+ label: 'Cancel',
1103
+ },
1104
+ ],
1105
+ actionSelected: function (actionSelected) {
1106
+ return _this._config.bulkMessageQueues(actionSelected.action.name, actionSelected.selected)
1107
+ .pipe(operators.tap(function () {
1108
+ _this.list.reload();
1109
+ }));
1110
+ }
1111
+ };
1112
+ }
1113
+ this.config.filters.push({
1114
+ name: 'message_id',
1115
+ type: filter.ItemType.Select,
1116
+ label: 'Message Type',
1117
+ values: function (query) {
1118
+ query = Object.assign(Object.assign({}, query), { limit: 50 });
1119
+ return _this._config.loadMessages(query)
1120
+ .pipe(operators.map(function (response) {
1121
+ return __spreadArray([
1122
+ { value: null, name: 'All', }
1123
+ ], __read(response.data.map(function (item) { return ({ name: item.name, value: item.id }); })));
1124
+ }));
1125
+ }
1126
+ });
1127
+ };
1128
+ QueuesComponent.prototype.open = function (messageQueue) {
1129
+ var _this = this;
1130
+ this._messageQueueService.openMessageQueue(messageQueue.id)
1131
+ .pipe(operators.takeUntil(this._destroy$))
1132
+ .subscribe(function () {
1133
+ _this.list.reload();
1134
+ });
1135
+ };
1136
+ QueuesComponent.prototype.ngOnDestroy = function () {
1137
+ this._destroy$.next();
1138
+ this._destroy$.complete();
1139
+ };
1140
+ return QueuesComponent;
1141
+ }());
1142
+ QueuesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueuesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialog }, { token: FsMessageQueueService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1143
+ QueuesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueuesComponent, selector: "fs-app-message-queues", inputs: { query: "query" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\" #list>\n <fs-list-column title=\"Message\" name=\"subject\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <a (click)=\"open(row)\">{{row.emailMessageQueue.subject|truncate:100}}</a>\n <mat-icon *ngIf=\"row.messageQueueAttachmentCount\" [matTooltip]=\"row.messageQueueAttachmentCount + ' Attachment(s)'\">attach_file</mat-icon>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <a (click)=\"open(row)\">{{row.smsMessageQueue.body|truncate:100}}</a>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Recipients\" class=\"col-recipients\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.emailMessageQueue\">\n <ng-container *ngIf=\"row.emailMessageQueue.toRecipients.length; else unspecified\">\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.toRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.ccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n <div class=\"small\" *ngFor=\"let recipient of row.emailMessageQueue.bccRecipients\">\n <app-recipient \n [state]=\"row.messageQueueRecipients[recipient] || row.state\"\n [name]=\"recipient\">\n </app-recipient>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.smsMessageQueue\">\n <ng-container *ngIf=\"row.smsMessageQueue.toNumber; else unspecified\">\n <app-recipient \n class=\"small\"\n [state]=\"row.state\"\n [name]=\"row.smsMessageQueue.toNumber\">\n </app-recipient>\n </ng-container>\n </ng-container>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Status\" class=\"col-state\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [class]=\"'state-' + row.state\">{{messageQueueStates[row.state]}}</span>\n </ng-template>\n </fs-list-column> \n <fs-list-column title=\"Date\" name=\"created_date\" sortable=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.createdDate | fsDateFormat: 'date-time-yeardiff' }}\n </ng-template>\n </fs-list-column>\n</fs-list>\n\n<ng-template #unspecified>\n <app-recipient \n class=\"small\"\n [state]=\"MessageQueueState.Failed\"\n name=\"Unspecified\">\n </app-recipient>\n</ng-template>", styles: [":host ::ng-deep .col-recipients small+small:before{content:\", \"}:host ::ng-deep .col-state .state-F,:host ::ng-deep .col-state .state-P{color:#d8524e}\n"], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i1__namespace$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: RecipientComponent, selector: "app-recipient", inputs: ["name", "state"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i16__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3__namespace$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i16__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "truncate": TruncatePipe, "fsDateFormat": i10__namespace$1.FsDateFormatPipe } });
1144
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueuesComponent, decorators: [{
1145
+ type: i0.Component,
1146
+ args: [{
1147
+ selector: 'fs-app-message-queues',
1148
+ styleUrls: ['./queues.component.scss'],
1149
+ templateUrl: './queues.component.html'
1150
+ }]
1151
+ }], ctorParameters: function () {
1152
+ return [{ type: undefined, decorators: [{
1153
+ type: i0.Inject,
1154
+ args: [FS_APP_MESSAGE_CONFIG]
1155
+ }] }, { type: i1__namespace.MatDialog }, { type: FsMessageQueueService }];
1156
+ }, propDecorators: { list: [{
1157
+ type: i0.ViewChild,
1158
+ args: [i2$2.FsListComponent, { static: true }]
1159
+ }], query: [{
1160
+ type: i0.Input
1160
1161
  }] } });
1161
1162
 
1162
- var LinkifyPipe = /** @class */ (function () {
1163
- function LinkifyPipe() {
1164
- }
1165
- LinkifyPipe.prototype.transform = function (value) {
1166
- return anchorme__default["default"](value, {
1167
- attributes: [
1168
- {
1169
- name: 'target',
1170
- value: '_blank'
1171
- },
1172
- ]
1173
- });
1174
- };
1175
- return LinkifyPipe;
1176
- }());
1177
- LinkifyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkifyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1178
- LinkifyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkifyPipe, name: "linkify" });
1179
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkifyPipe, decorators: [{
1180
- type: i0.Pipe,
1181
- args: [{ name: 'linkify' }]
1163
+ var LinkifyPipe = /** @class */ (function () {
1164
+ function LinkifyPipe() {
1165
+ }
1166
+ LinkifyPipe.prototype.transform = function (value) {
1167
+ return anchorme__default["default"](value, {
1168
+ attributes: [
1169
+ {
1170
+ name: 'target',
1171
+ value: '_blank'
1172
+ },
1173
+ ]
1174
+ });
1175
+ };
1176
+ return LinkifyPipe;
1177
+ }());
1178
+ LinkifyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkifyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1179
+ LinkifyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkifyPipe, name: "linkify" });
1180
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkifyPipe, decorators: [{
1181
+ type: i0.Pipe,
1182
+ args: [{ name: 'linkify' }]
1182
1183
  }] });
1183
1184
 
1184
- var FsAppMessageQueuesModule = /** @class */ (function () {
1185
- function FsAppMessageQueuesModule() {
1186
- }
1187
- return FsAppMessageQueuesModule;
1188
- }());
1189
- FsAppMessageQueuesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1190
- FsAppMessageQueuesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, declarations: [QueuesComponent,
1191
- QueueComponent,
1192
- LinkifyPipe,
1193
- TruncatePipe,
1194
- RecipientComponent], imports: [router.RouterModule,
1195
- i13.FormsModule,
1196
- i15.CommonModule,
1197
- flexLayout.FlexLayoutModule,
1198
- i3.MatTooltipModule,
1199
- i1.MatDialogModule,
1200
- i11.MatButtonModule,
1201
- i1$2.MatIconModule,
1202
- i5.MatTabsModule,
1203
- i2$2.FsListModule,
1204
- i4.FsDialogModule,
1205
- i6$1.FsLabelModule,
1206
- i10.FsDateModule,
1207
- i12.FsSkeletonModule,
1208
- FsAppMessagesModule,
1209
- i14.FsFormModule,
1210
- i1$1.FsPromptInputModule,
1211
- i2.FsIFrameModule], exports: [QueuesComponent,
1212
- QueueComponent] });
1213
- FsAppMessageQueuesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, providers: [
1214
- FsMessageQueueService
1215
- ], imports: [[
1216
- router.RouterModule,
1217
- i13.FormsModule,
1218
- i15.CommonModule,
1219
- flexLayout.FlexLayoutModule,
1220
- i3.MatTooltipModule,
1221
- i1.MatDialogModule,
1222
- i11.MatButtonModule,
1223
- i1$2.MatIconModule,
1224
- i5.MatTabsModule,
1225
- i2$2.FsListModule,
1226
- i4.FsDialogModule,
1227
- i6$1.FsLabelModule,
1228
- i10.FsDateModule,
1229
- i12.FsSkeletonModule,
1230
- FsAppMessagesModule,
1231
- i14.FsFormModule,
1232
- i1$1.FsPromptInputModule,
1233
- i2.FsIFrameModule,
1234
- //FsDeviceModule,
1235
- //FsIpModule,
1236
- ]] });
1237
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, decorators: [{
1238
- type: i0.NgModule,
1239
- args: [{
1240
- imports: [
1241
- router.RouterModule,
1242
- i13.FormsModule,
1243
- i15.CommonModule,
1244
- flexLayout.FlexLayoutModule,
1245
- i3.MatTooltipModule,
1246
- i1.MatDialogModule,
1247
- i11.MatButtonModule,
1248
- i1$2.MatIconModule,
1249
- i5.MatTabsModule,
1250
- i2$2.FsListModule,
1251
- i4.FsDialogModule,
1252
- i6$1.FsLabelModule,
1253
- i10.FsDateModule,
1254
- i12.FsSkeletonModule,
1255
- FsAppMessagesModule,
1256
- i14.FsFormModule,
1257
- i1$1.FsPromptInputModule,
1258
- i2.FsIFrameModule,
1259
- //FsDeviceModule,
1260
- //FsIpModule,
1261
- ],
1262
- declarations: [
1263
- QueuesComponent,
1264
- QueueComponent,
1265
- LinkifyPipe,
1266
- TruncatePipe,
1267
- RecipientComponent,
1268
- ],
1269
- exports: [
1270
- QueuesComponent,
1271
- QueueComponent,
1272
- ],
1273
- providers: [
1274
- FsMessageQueueService
1275
- ]
1276
- }]
1185
+ var FsAppMessageQueuesModule = /** @class */ (function () {
1186
+ function FsAppMessageQueuesModule() {
1187
+ }
1188
+ return FsAppMessageQueuesModule;
1189
+ }());
1190
+ FsAppMessageQueuesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1191
+ FsAppMessageQueuesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, declarations: [QueuesComponent,
1192
+ QueueComponent,
1193
+ LinkifyPipe,
1194
+ TruncatePipe,
1195
+ RecipientComponent], imports: [router.RouterModule,
1196
+ i14.FormsModule,
1197
+ i16.CommonModule,
1198
+ flexLayout.FlexLayoutModule,
1199
+ i3$1.MatTooltipModule,
1200
+ i1.MatDialogModule,
1201
+ i3.MatButtonModule,
1202
+ i1$2.MatIconModule,
1203
+ i5.MatTabsModule,
1204
+ i2$2.FsListModule,
1205
+ i4.FsDialogModule,
1206
+ i6$1.FsLabelModule,
1207
+ i10$1.FsDateModule,
1208
+ i13.FsSkeletonModule,
1209
+ FsAppMessagesModule,
1210
+ i15.FsFormModule,
1211
+ i1$1.FsPromptInputModule,
1212
+ i2.FsIFrameModule], exports: [QueuesComponent,
1213
+ QueueComponent] });
1214
+ FsAppMessageQueuesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, providers: [
1215
+ FsMessageQueueService
1216
+ ], imports: [[
1217
+ router.RouterModule,
1218
+ i14.FormsModule,
1219
+ i16.CommonModule,
1220
+ flexLayout.FlexLayoutModule,
1221
+ i3$1.MatTooltipModule,
1222
+ i1.MatDialogModule,
1223
+ i3.MatButtonModule,
1224
+ i1$2.MatIconModule,
1225
+ i5.MatTabsModule,
1226
+ i2$2.FsListModule,
1227
+ i4.FsDialogModule,
1228
+ i6$1.FsLabelModule,
1229
+ i10$1.FsDateModule,
1230
+ i13.FsSkeletonModule,
1231
+ FsAppMessagesModule,
1232
+ i15.FsFormModule,
1233
+ i1$1.FsPromptInputModule,
1234
+ i2.FsIFrameModule,
1235
+ //FsDeviceModule,
1236
+ //FsIpModule,
1237
+ ]] });
1238
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageQueuesModule, decorators: [{
1239
+ type: i0.NgModule,
1240
+ args: [{
1241
+ imports: [
1242
+ router.RouterModule,
1243
+ i14.FormsModule,
1244
+ i16.CommonModule,
1245
+ flexLayout.FlexLayoutModule,
1246
+ i3$1.MatTooltipModule,
1247
+ i1.MatDialogModule,
1248
+ i3.MatButtonModule,
1249
+ i1$2.MatIconModule,
1250
+ i5.MatTabsModule,
1251
+ i2$2.FsListModule,
1252
+ i4.FsDialogModule,
1253
+ i6$1.FsLabelModule,
1254
+ i10$1.FsDateModule,
1255
+ i13.FsSkeletonModule,
1256
+ FsAppMessagesModule,
1257
+ i15.FsFormModule,
1258
+ i1$1.FsPromptInputModule,
1259
+ i2.FsIFrameModule,
1260
+ //FsDeviceModule,
1261
+ //FsIpModule,
1262
+ ],
1263
+ declarations: [
1264
+ QueuesComponent,
1265
+ QueueComponent,
1266
+ LinkifyPipe,
1267
+ TruncatePipe,
1268
+ RecipientComponent,
1269
+ ],
1270
+ exports: [
1271
+ QueuesComponent,
1272
+ QueueComponent,
1273
+ ],
1274
+ providers: [
1275
+ FsMessageQueueService
1276
+ ]
1277
+ }]
1277
1278
  }] });
1278
1279
 
1279
- var TemplateComponent = /** @class */ (function () {
1280
- function TemplateComponent(_data, _config, _dialogRef, _message, _dialog) {
1281
- var _this = this;
1282
- this._data = _data;
1283
- this._config = _config;
1284
- this._dialogRef = _dialogRef;
1285
- this._message = _message;
1286
- this._dialog = _dialog;
1287
- this.htmlEditorconfig = {
1288
- language: 'html',
1289
- insertSpaces: true,
1290
- tabSize: 2,
1291
- };
1292
- this.cssEditorconfig = {
1293
- language: 'scss',
1294
- insertSpaces: true,
1295
- tabSize: 2,
1296
- };
1297
- this.save = function (event) {
1298
- return _this._config.saveMessageTemplate(_this.messageTemplate)
1299
- .pipe(operators.tap(function (messageTemplate) {
1300
- _this._message.success('Saved Changes');
1301
- if (event.submitter === 'save-close') {
1302
- _this._dialogRef.close(messageTemplate);
1303
- }
1304
- }));
1305
- };
1306
- }
1307
- TemplateComponent.prototype.ngOnInit = function () {
1308
- var _this = this;
1309
- if (this._data.messageTemplate.id) {
1310
- this._config.loadMessageTemplate(this._data.messageTemplate)
1311
- .subscribe(function (messageTemplate) {
1312
- _this.messageTemplate = messageTemplate;
1313
- });
1314
- }
1315
- else {
1316
- this.messageTemplate = {};
1317
- }
1318
- };
1319
- TemplateComponent.prototype.openPreview = function () {
1320
- this._dialog.open(PreviewComponent, {
1321
- data: {
1322
- styles: this.messageTemplate.styles,
1323
- html: this.messageTemplate.content,
1324
- },
1325
- width: '95%'
1326
- });
1327
- };
1328
- return TemplateComponent;
1329
- }());
1330
- TemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplateComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace$1.FsMessage }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1331
- TemplateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplateComponent, selector: "ng-component", ngImport: i0__namespace, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"messageTemplate.name\"\n name=\"name\"\n >\n </mat-form-field>\n <div [@.disabled]=\"true\">\n <mat-tab-group\n mat-align-tabs=\"start\"\n [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <div class=\"content\">\n <fs-label-field>\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.content\"\n name=\"body\"\n [config]=\"htmlEditorconfig\">\n </fs-text-editor>\n <fs-label-message>\n &#123;$content&#125; will be replaced with the message content.\n </fs-label-message>\n </fs-label-field>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <div class=\"styles\">\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.styles\"\n name=\"styles\"\n [config]=\"cssEditorconfig\">\n </fs-text-editor>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\" name=\"close\">Save</button>\n <button mat-button name=\"save-close\">Save & Close</button>\n <button mat-button (click)=\"openPreview()\" type=\"button\">Preview</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [".name{width:100%}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6__namespace$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i9__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6__namespace$1.FsLabelMessageComponent, selector: "fs-label-message" }, { type: i11__namespace.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: i12__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i13__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i13__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i13__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i14__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i17__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i13__namespace.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: i13__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i13__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
1332
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplateComponent, decorators: [{
1333
- type: i0.Component,
1334
- args: [{
1335
- templateUrl: './template.component.html',
1336
- styleUrls: ['./template.component.scss']
1337
- }]
1338
- }], ctorParameters: function () {
1339
- return [{ type: undefined, decorators: [{
1340
- type: i0.Inject,
1341
- args: [i1.MAT_DIALOG_DATA]
1342
- }] }, { type: undefined, decorators: [{
1343
- type: i0.Inject,
1344
- args: [FS_APP_MESSAGE_CONFIG]
1345
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace$1.FsMessage }, { type: i1__namespace.MatDialog }];
1280
+ var TemplateComponent = /** @class */ (function () {
1281
+ function TemplateComponent(_data, _config, _dialogRef, _message, _dialog) {
1282
+ var _this = this;
1283
+ this._data = _data;
1284
+ this._config = _config;
1285
+ this._dialogRef = _dialogRef;
1286
+ this._message = _message;
1287
+ this._dialog = _dialog;
1288
+ this.htmlEditorconfig = {
1289
+ language: 'html',
1290
+ insertSpaces: true,
1291
+ tabSize: 2,
1292
+ };
1293
+ this.cssEditorconfig = {
1294
+ language: 'scss',
1295
+ insertSpaces: true,
1296
+ tabSize: 2,
1297
+ };
1298
+ this.save = function (event) {
1299
+ return _this._config.saveMessageTemplate(_this.messageTemplate)
1300
+ .pipe(operators.tap(function (messageTemplate) {
1301
+ _this._message.success('Saved Changes');
1302
+ if (event.submitter === 'save-close') {
1303
+ _this._dialogRef.close(messageTemplate);
1304
+ }
1305
+ }));
1306
+ };
1307
+ }
1308
+ TemplateComponent.prototype.ngOnInit = function () {
1309
+ var _this = this;
1310
+ if (this._data.messageTemplate.id) {
1311
+ this._config.loadMessageTemplate(this._data.messageTemplate)
1312
+ .subscribe(function (messageTemplate) {
1313
+ _this.messageTemplate = messageTemplate;
1314
+ });
1315
+ }
1316
+ else {
1317
+ this.messageTemplate = {};
1318
+ }
1319
+ };
1320
+ TemplateComponent.prototype.openPreview = function () {
1321
+ this._dialog.open(PreviewComponent, {
1322
+ data: {
1323
+ styles: this.messageTemplate.styles,
1324
+ html: this.messageTemplate.content,
1325
+ },
1326
+ width: '95%'
1327
+ });
1328
+ };
1329
+ return TemplateComponent;
1330
+ }());
1331
+ TemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplateComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace$1.FsMessage }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1332
+ TemplateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplateComponent, selector: "ng-component", ngImport: i0__namespace, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"messageTemplate.name\"\n name=\"name\"\n >\n </mat-form-field>\n <div [@.disabled]=\"true\">\n <mat-tab-group\n mat-align-tabs=\"start\"\n [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <div class=\"content\">\n <fs-label-field>\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.content\"\n name=\"body\"\n [config]=\"htmlEditorconfig\">\n </fs-text-editor>\n <fs-label-message>\n &#123;$content&#125; will be replaced with the message content.\n </fs-label-message>\n </fs-label-field>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <div class=\"styles\">\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.styles\"\n name=\"styles\"\n [config]=\"cssEditorconfig\">\n </fs-text-editor>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\" name=\"close\">Save</button>\n <button mat-button name=\"save-close\">Save & Close</button>\n <button mat-button (click)=\"openPreview()\" type=\"button\">Preview</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [".name{width:100%}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i5__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i6__namespace$1.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i9__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6__namespace$1.FsLabelMessageComponent, selector: "fs-label-message" }, { type: i3__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i13__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i14__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i14__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i14__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i16__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i18__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i14__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
1333
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplateComponent, decorators: [{
1334
+ type: i0.Component,
1335
+ args: [{
1336
+ templateUrl: './template.component.html',
1337
+ styleUrls: ['./template.component.scss']
1338
+ }]
1339
+ }], ctorParameters: function () {
1340
+ return [{ type: undefined, decorators: [{
1341
+ type: i0.Inject,
1342
+ args: [i1.MAT_DIALOG_DATA]
1343
+ }] }, { type: undefined, decorators: [{
1344
+ type: i0.Inject,
1345
+ args: [FS_APP_MESSAGE_CONFIG]
1346
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace$1.FsMessage }, { type: i1__namespace.MatDialog }];
1346
1347
  } });
1347
1348
 
1348
- var TemplatesComponent = /** @class */ (function () {
1349
- function TemplatesComponent(_config, _dialog) {
1350
- this._config = _config;
1351
- this._dialog = _dialog;
1352
- this.list = null;
1353
- this.config = null;
1354
- this.messageQueueStates = [];
1355
- this._destroy$ = new rxjs.Subject();
1356
- }
1357
- TemplatesComponent.prototype.ngOnInit = function () {
1358
- var _this = this;
1359
- this.config = {
1360
- actions: [
1361
- {
1362
- label: 'Create',
1363
- click: function () {
1364
- _this.open({});
1365
- }
1366
- }
1367
- ],
1368
- status: false,
1369
- fetch: function (query) {
1370
- return _this._config.loadMessageTemplates(query);
1371
- }
1372
- };
1373
- if (this._config.deleteMessageTemplate) {
1374
- this.config.rowActions = [
1375
- {
1376
- click: function (data) {
1377
- return _this._config.deleteMessageTemplate(data);
1378
- },
1379
- remove: {
1380
- title: 'Confirm',
1381
- template: 'Are you sure you would like to delete this template?',
1382
- },
1383
- menu: true,
1384
- label: 'Delete'
1385
- }
1386
- ];
1387
- }
1388
- };
1389
- TemplatesComponent.prototype.open = function (messageTemplate) {
1390
- var _this = this;
1391
- var dialogRef = this._dialog.open(TemplateComponent, {
1392
- data: {
1393
- messageTemplate: messageTemplate,
1394
- },
1395
- width: '85%'
1396
- });
1397
- dialogRef.afterClosed()
1398
- .pipe(operators.takeUntil(this._destroy$))
1399
- .subscribe(function (response) {
1400
- if (response) {
1401
- var update = _this.list.updateData(response, function (row) {
1402
- return row.id === response.id;
1403
- });
1404
- if (!update) {
1405
- _this.list.reload();
1406
- }
1407
- }
1408
- });
1409
- };
1410
- TemplatesComponent.prototype.ngOnDestroy = function () {
1411
- this._destroy$.next();
1412
- this._destroy$.complete();
1413
- };
1414
- return TemplatesComponent;
1415
- }());
1416
- TemplatesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1417
- TemplatesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplatesComponent, selector: "fs-app-message-templates", viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1418
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesComponent, decorators: [{
1419
- type: i0.Component,
1420
- args: [{
1421
- selector: 'fs-app-message-templates',
1422
- templateUrl: './templates.component.html'
1423
- }]
1424
- }], ctorParameters: function () {
1425
- return [{ type: undefined, decorators: [{
1426
- type: i0.Inject,
1427
- args: [FS_APP_MESSAGE_CONFIG]
1428
- }] }, { type: i1__namespace.MatDialog }];
1429
- }, propDecorators: { list: [{
1430
- type: i0.ViewChild,
1431
- args: [i2$2.FsListComponent, { static: true }]
1349
+ var TemplatesComponent = /** @class */ (function () {
1350
+ function TemplatesComponent(_config, _dialog) {
1351
+ this._config = _config;
1352
+ this._dialog = _dialog;
1353
+ this.list = null;
1354
+ this.config = null;
1355
+ this.messageQueueStates = [];
1356
+ this._destroy$ = new rxjs.Subject();
1357
+ }
1358
+ TemplatesComponent.prototype.ngOnInit = function () {
1359
+ var _this = this;
1360
+ this.config = {
1361
+ actions: [
1362
+ {
1363
+ label: 'Create',
1364
+ click: function () {
1365
+ _this.open({});
1366
+ }
1367
+ }
1368
+ ],
1369
+ status: false,
1370
+ fetch: function (query) {
1371
+ return _this._config.loadMessageTemplates(query);
1372
+ }
1373
+ };
1374
+ if (this._config.deleteMessageTemplate) {
1375
+ this.config.rowActions = [
1376
+ {
1377
+ click: function (data) {
1378
+ return _this._config.deleteMessageTemplate(data);
1379
+ },
1380
+ remove: {
1381
+ title: 'Confirm',
1382
+ template: 'Are you sure you would like to delete this template?',
1383
+ },
1384
+ menu: true,
1385
+ label: 'Delete'
1386
+ }
1387
+ ];
1388
+ }
1389
+ };
1390
+ TemplatesComponent.prototype.open = function (messageTemplate) {
1391
+ var _this = this;
1392
+ var dialogRef = this._dialog.open(TemplateComponent, {
1393
+ data: {
1394
+ messageTemplate: messageTemplate,
1395
+ },
1396
+ width: '85%'
1397
+ });
1398
+ dialogRef.afterClosed()
1399
+ .pipe(operators.takeUntil(this._destroy$))
1400
+ .subscribe(function (response) {
1401
+ if (response) {
1402
+ var update = _this.list.updateData(response, function (row) {
1403
+ return row.id === response.id;
1404
+ });
1405
+ if (!update) {
1406
+ _this.list.reload();
1407
+ }
1408
+ }
1409
+ });
1410
+ };
1411
+ TemplatesComponent.prototype.ngOnDestroy = function () {
1412
+ this._destroy$.next();
1413
+ this._destroy$.complete();
1414
+ };
1415
+ return TemplatesComponent;
1416
+ }());
1417
+ TemplatesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1418
+ TemplatesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TemplatesComponent, selector: "fs-app-message-templates", viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1419
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesComponent, decorators: [{
1420
+ type: i0.Component,
1421
+ args: [{
1422
+ selector: 'fs-app-message-templates',
1423
+ templateUrl: './templates.component.html'
1424
+ }]
1425
+ }], ctorParameters: function () {
1426
+ return [{ type: undefined, decorators: [{
1427
+ type: i0.Inject,
1428
+ args: [FS_APP_MESSAGE_CONFIG]
1429
+ }] }, { type: i1__namespace.MatDialog }];
1430
+ }, propDecorators: { list: [{
1431
+ type: i0.ViewChild,
1432
+ args: [i2$2.FsListComponent, { static: true }]
1432
1433
  }] } });
1433
1434
 
1434
- var FsAppMessageTemplatesModule = /** @class */ (function () {
1435
- function FsAppMessageTemplatesModule() {
1436
- }
1437
- return FsAppMessageTemplatesModule;
1438
- }());
1439
- FsAppMessageTemplatesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1440
- FsAppMessageTemplatesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, declarations: [TemplatesComponent,
1441
- TemplateComponent], imports: [router.RouterModule,
1442
- i15.CommonModule,
1443
- i13.FormsModule,
1444
- i3.MatTooltipModule,
1445
- i1.MatDialogModule,
1446
- i11.MatButtonModule,
1447
- i5.MatTabsModule,
1448
- i6.MatFormFieldModule,
1449
- i6.MatFormFieldModule,
1450
- i17.MatInputModule,
1451
- i2$2.FsListModule,
1452
- i4.FsDialogModule,
1453
- i6$1.FsLabelModule,
1454
- flexLayout.FlexLayoutModule,
1455
- i12.FsSkeletonModule,
1456
- i14.FsFormModule,
1457
- i9.FsTextEditorModule,
1458
- FsAppMessagePreviewModule], exports: [TemplatesComponent,
1459
- TemplateComponent] });
1460
- FsAppMessageTemplatesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, imports: [[
1461
- router.RouterModule,
1462
- i15.CommonModule,
1463
- i13.FormsModule,
1464
- i3.MatTooltipModule,
1465
- i1.MatDialogModule,
1466
- i11.MatButtonModule,
1467
- i5.MatTabsModule,
1468
- i6.MatFormFieldModule,
1469
- i6.MatFormFieldModule,
1470
- i17.MatInputModule,
1471
- i2$2.FsListModule,
1472
- i4.FsDialogModule,
1473
- i6$1.FsLabelModule,
1474
- flexLayout.FlexLayoutModule,
1475
- i12.FsSkeletonModule,
1476
- i14.FsFormModule,
1477
- i9.FsTextEditorModule,
1478
- FsAppMessagePreviewModule,
1479
- ]] });
1480
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, decorators: [{
1481
- type: i0.NgModule,
1482
- args: [{
1483
- imports: [
1484
- router.RouterModule,
1485
- i15.CommonModule,
1486
- i13.FormsModule,
1487
- i3.MatTooltipModule,
1488
- i1.MatDialogModule,
1489
- i11.MatButtonModule,
1490
- i5.MatTabsModule,
1491
- i6.MatFormFieldModule,
1492
- i6.MatFormFieldModule,
1493
- i17.MatInputModule,
1494
- i2$2.FsListModule,
1495
- i4.FsDialogModule,
1496
- i6$1.FsLabelModule,
1497
- flexLayout.FlexLayoutModule,
1498
- i12.FsSkeletonModule,
1499
- i14.FsFormModule,
1500
- i9.FsTextEditorModule,
1501
- FsAppMessagePreviewModule,
1502
- ],
1503
- declarations: [
1504
- TemplatesComponent,
1505
- TemplateComponent,
1506
- ],
1507
- exports: [
1508
- TemplatesComponent,
1509
- TemplateComponent,
1510
- ],
1511
- }]
1435
+ var FsAppMessageTemplatesModule = /** @class */ (function () {
1436
+ function FsAppMessageTemplatesModule() {
1437
+ }
1438
+ return FsAppMessageTemplatesModule;
1439
+ }());
1440
+ FsAppMessageTemplatesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1441
+ FsAppMessageTemplatesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, declarations: [TemplatesComponent,
1442
+ TemplateComponent], imports: [router.RouterModule,
1443
+ i16.CommonModule,
1444
+ i14.FormsModule,
1445
+ i3$1.MatTooltipModule,
1446
+ i1.MatDialogModule,
1447
+ i3.MatButtonModule,
1448
+ i5.MatTabsModule,
1449
+ i6.MatFormFieldModule,
1450
+ i6.MatFormFieldModule,
1451
+ i18.MatInputModule,
1452
+ i2$2.FsListModule,
1453
+ i4.FsDialogModule,
1454
+ i6$1.FsLabelModule,
1455
+ flexLayout.FlexLayoutModule,
1456
+ i13.FsSkeletonModule,
1457
+ i15.FsFormModule,
1458
+ i9.FsTextEditorModule,
1459
+ FsAppMessagePreviewModule], exports: [TemplatesComponent,
1460
+ TemplateComponent] });
1461
+ FsAppMessageTemplatesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, imports: [[
1462
+ router.RouterModule,
1463
+ i16.CommonModule,
1464
+ i14.FormsModule,
1465
+ i3$1.MatTooltipModule,
1466
+ i1.MatDialogModule,
1467
+ i3.MatButtonModule,
1468
+ i5.MatTabsModule,
1469
+ i6.MatFormFieldModule,
1470
+ i6.MatFormFieldModule,
1471
+ i18.MatInputModule,
1472
+ i2$2.FsListModule,
1473
+ i4.FsDialogModule,
1474
+ i6$1.FsLabelModule,
1475
+ flexLayout.FlexLayoutModule,
1476
+ i13.FsSkeletonModule,
1477
+ i15.FsFormModule,
1478
+ i9.FsTextEditorModule,
1479
+ FsAppMessagePreviewModule,
1480
+ ]] });
1481
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageTemplatesModule, decorators: [{
1482
+ type: i0.NgModule,
1483
+ args: [{
1484
+ imports: [
1485
+ router.RouterModule,
1486
+ i16.CommonModule,
1487
+ i14.FormsModule,
1488
+ i3$1.MatTooltipModule,
1489
+ i1.MatDialogModule,
1490
+ i3.MatButtonModule,
1491
+ i5.MatTabsModule,
1492
+ i6.MatFormFieldModule,
1493
+ i6.MatFormFieldModule,
1494
+ i18.MatInputModule,
1495
+ i2$2.FsListModule,
1496
+ i4.FsDialogModule,
1497
+ i6$1.FsLabelModule,
1498
+ flexLayout.FlexLayoutModule,
1499
+ i13.FsSkeletonModule,
1500
+ i15.FsFormModule,
1501
+ i9.FsTextEditorModule,
1502
+ FsAppMessagePreviewModule,
1503
+ ],
1504
+ declarations: [
1505
+ TemplatesComponent,
1506
+ TemplateComponent,
1507
+ ],
1508
+ exports: [
1509
+ TemplatesComponent,
1510
+ TemplateComponent,
1511
+ ],
1512
+ }]
1512
1513
  }] });
1513
1514
 
1514
- var WebhooksComponent = /** @class */ (function () {
1515
- function WebhooksComponent(_config, _message) {
1516
- this._config = _config;
1517
- this._message = _message;
1518
- }
1519
- WebhooksComponent.prototype.ngOnInit = function () {
1520
- var _this = this;
1521
- this.listConfig = {
1522
- paging: false,
1523
- actions: [
1524
- {
1525
- click: function () {
1526
- _this._config.createWebhook()
1527
- .subscribe(function () {
1528
- _this._message.success('Created webhook');
1529
- _this.list.reload();
1530
- });
1531
- },
1532
- label: 'Create',
1533
- },
1534
- ],
1535
- rowActions: [
1536
- {
1537
- click: function (webhook) {
1538
- _this._config.deleteWebhook(webhook)
1539
- .subscribe(function () {
1540
- _this._message.success('Deleted webhook');
1541
- _this.list.reload();
1542
- });
1543
- },
1544
- label: 'Delete',
1545
- },
1546
- ],
1547
- fetch: function () {
1548
- return _this._config.loadWebhooks()
1549
- .pipe(operators.map(function (webhooks) { return ({ data: webhooks }); }));
1550
- },
1551
- };
1552
- };
1553
- return WebhooksComponent;
1554
- }());
1555
- WebhooksComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: WebhooksComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i2__namespace$1.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1556
- WebhooksComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WebhooksComponent, selector: "fs-app-message-webhooks", viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i10__namespace.FsDatePipe } });
1557
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: WebhooksComponent, decorators: [{
1558
- type: i0.Component,
1559
- args: [{
1560
- selector: 'fs-app-message-webhooks',
1561
- templateUrl: './webhooks.component.html',
1562
- }]
1563
- }], ctorParameters: function () {
1564
- return [{ type: undefined, decorators: [{
1565
- type: i0.Inject,
1566
- args: [FS_APP_MESSAGE_CONFIG]
1567
- }] }, { type: i2__namespace$1.FsMessage }];
1568
- }, propDecorators: { list: [{
1569
- type: i0.ViewChild,
1570
- args: [i2$2.FsListComponent]
1515
+ var WebhooksComponent = /** @class */ (function () {
1516
+ function WebhooksComponent(_config, _message) {
1517
+ this._config = _config;
1518
+ this._message = _message;
1519
+ }
1520
+ WebhooksComponent.prototype.ngOnInit = function () {
1521
+ var _this = this;
1522
+ this.listConfig = {
1523
+ paging: false,
1524
+ actions: [
1525
+ {
1526
+ click: function () {
1527
+ _this._config.createWebhook()
1528
+ .subscribe(function () {
1529
+ _this._message.success('Created webhook');
1530
+ _this.list.reload();
1531
+ });
1532
+ },
1533
+ label: 'Create',
1534
+ },
1535
+ ],
1536
+ rowActions: [
1537
+ {
1538
+ click: function (webhook) {
1539
+ _this._config.deleteWebhook(webhook)
1540
+ .subscribe(function () {
1541
+ _this._message.success('Deleted webhook');
1542
+ _this.list.reload();
1543
+ });
1544
+ },
1545
+ label: 'Delete',
1546
+ },
1547
+ ],
1548
+ fetch: function () {
1549
+ return _this._config.loadWebhooks()
1550
+ .pipe(operators.map(function (webhooks) { return ({ data: webhooks }); }));
1551
+ },
1552
+ };
1553
+ };
1554
+ return WebhooksComponent;
1555
+ }());
1556
+ WebhooksComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: WebhooksComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i2__namespace$1.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1557
+ WebhooksComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WebhooksComponent, selector: "fs-app-message-webhooks", viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i10__namespace$1.FsDatePipe } });
1558
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: WebhooksComponent, decorators: [{
1559
+ type: i0.Component,
1560
+ args: [{
1561
+ selector: 'fs-app-message-webhooks',
1562
+ templateUrl: './webhooks.component.html',
1563
+ }]
1564
+ }], ctorParameters: function () {
1565
+ return [{ type: undefined, decorators: [{
1566
+ type: i0.Inject,
1567
+ args: [FS_APP_MESSAGE_CONFIG]
1568
+ }] }, { type: i2__namespace$1.FsMessage }];
1569
+ }, propDecorators: { list: [{
1570
+ type: i0.ViewChild,
1571
+ args: [i2$2.FsListComponent]
1571
1572
  }] } });
1572
1573
 
1573
- var FsAppMessageWebhooksModule = /** @class */ (function () {
1574
- function FsAppMessageWebhooksModule() {
1575
- }
1576
- return FsAppMessageWebhooksModule;
1577
- }());
1578
- FsAppMessageWebhooksModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1579
- FsAppMessageWebhooksModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, declarations: [WebhooksComponent], imports: [i2$2.FsListModule,
1580
- i10.FsDateModule], exports: [WebhooksComponent] });
1581
- FsAppMessageWebhooksModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, imports: [[
1582
- i2$2.FsListModule,
1583
- i10.FsDateModule,
1584
- ]] });
1585
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, decorators: [{
1586
- type: i0.NgModule,
1587
- args: [{
1588
- imports: [
1589
- i2$2.FsListModule,
1590
- i10.FsDateModule,
1591
- ],
1592
- declarations: [
1593
- WebhooksComponent,
1594
- ],
1595
- exports: [
1596
- WebhooksComponent,
1597
- ],
1598
- }]
1574
+ var FsAppMessageWebhooksModule = /** @class */ (function () {
1575
+ function FsAppMessageWebhooksModule() {
1576
+ }
1577
+ return FsAppMessageWebhooksModule;
1578
+ }());
1579
+ FsAppMessageWebhooksModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1580
+ FsAppMessageWebhooksModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, declarations: [WebhooksComponent], imports: [i2$2.FsListModule,
1581
+ i10$1.FsDateModule], exports: [WebhooksComponent] });
1582
+ FsAppMessageWebhooksModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, imports: [[
1583
+ i2$2.FsListModule,
1584
+ i10$1.FsDateModule,
1585
+ ]] });
1586
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageWebhooksModule, decorators: [{
1587
+ type: i0.NgModule,
1588
+ args: [{
1589
+ imports: [
1590
+ i2$2.FsListModule,
1591
+ i10$1.FsDateModule,
1592
+ ],
1593
+ declarations: [
1594
+ WebhooksComponent,
1595
+ ],
1596
+ exports: [
1597
+ WebhooksComponent,
1598
+ ],
1599
+ }]
1599
1600
  }] });
1600
1601
 
1601
- var FsAppMessageModule = /** @class */ (function () {
1602
- function FsAppMessageModule() {
1603
- }
1604
- FsAppMessageModule.forRoot = function () {
1605
- return {
1606
- ngModule: FsAppMessageModule,
1607
- };
1608
- };
1609
- return FsAppMessageModule;
1610
- }());
1611
- FsAppMessageModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1612
- FsAppMessageModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule });
1613
- FsAppMessageModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule });
1614
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule, decorators: [{
1615
- type: i0.NgModule,
1616
- args: [{}]
1602
+ var FsAppMessageModule = /** @class */ (function () {
1603
+ function FsAppMessageModule() {
1604
+ }
1605
+ FsAppMessageModule.forRoot = function () {
1606
+ return {
1607
+ ngModule: FsAppMessageModule,
1608
+ };
1609
+ };
1610
+ return FsAppMessageModule;
1611
+ }());
1612
+ FsAppMessageModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1613
+ FsAppMessageModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule });
1614
+ FsAppMessageModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule });
1615
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppMessageModule, decorators: [{
1616
+ type: i0.NgModule,
1617
+ args: [{}]
1617
1618
  }] });
1618
1619
 
1619
- /*
1620
- * Public API Surface of fs-menu
1620
+ /*
1621
+ * Public API Surface of fs-menu
1621
1622
  */
1622
1623
 
1623
- /**
1624
- * Generated bundle index. Do not edit.
1624
+ /**
1625
+ * Generated bundle index. Do not edit.
1625
1626
  */
1626
1627
 
1627
1628
  exports.FS_APP_MESSAGE_CONFIG = FS_APP_MESSAGE_CONFIG;