@firestitch/app-message 9.2.1 → 12.0.0

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