@amc-technology/ui-library 1.0.31 → 1.0.33

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 (56) hide show
  1. package/amc-technology-ui-library.metadata.json +1 -1
  2. package/bundles/amc-technology-ui-library.umd.js +1078 -747
  3. package/bundles/amc-technology-ui-library.umd.js.map +1 -56
  4. package/bundles/amc-technology-ui-library.umd.min.js +16 -2
  5. package/bundles/amc-technology-ui-library.umd.min.js.map +1 -274
  6. package/esm2015/amc-technology-ui-library.js +16 -1417
  7. package/esm2015/projects/UILibrary/src/app/Helpers.js +11 -0
  8. package/esm2015/projects/UILibrary/src/app/components/activity/activity.component.js +83 -0
  9. package/esm2015/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +104 -0
  10. package/esm2015/projects/UILibrary/src/app/components/chat-message/chat-message.component.js +39 -0
  11. package/esm2015/projects/UILibrary/src/app/components/disposition/disposition.component.js +49 -0
  12. package/esm2015/projects/UILibrary/src/app/components/duration/duration.component.js +58 -0
  13. package/esm2015/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.js +72 -0
  14. package/esm2015/projects/UILibrary/src/app/components/interaction/interaction.component.js +80 -0
  15. package/esm2015/projects/UILibrary/src/app/components/login/login.component.js +45 -0
  16. package/esm2015/projects/UILibrary/src/app/components/operation/operation.component.js +57 -0
  17. package/esm2015/projects/UILibrary/src/app/components/property/property.component.js +99 -0
  18. package/esm2015/projects/UILibrary/src/app/components/scenario/scenario.component.js +40 -0
  19. package/esm2015/projects/UILibrary/src/app/models/chat.message.js +7 -0
  20. package/esm2015/projects/UILibrary/src/app/models/chat.settings.js +1 -0
  21. package/esm2015/projects/UILibrary/src/app/models/disposition.interface.js +1 -0
  22. package/esm2015/projects/UILibrary/src/app/models/login.interface.js +1 -0
  23. package/esm2015/projects/UILibrary/src/app/models/uilibrary.model.js +40 -0
  24. package/esm2015/projects/UILibrary/src/app/uilibrary.module.js +73 -0
  25. package/esm2015/public_api.js +2 -0
  26. package/esm5/amc-technology-ui-library.js +16 -714
  27. package/esm5/projects/UILibrary/src/app/Helpers.js +11 -0
  28. package/esm5/projects/UILibrary/src/app/components/activity/activity.component.js +84 -0
  29. package/esm5/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +105 -0
  30. package/esm5/projects/UILibrary/src/app/components/chat-message/chat-message.component.js +40 -0
  31. package/esm5/projects/UILibrary/src/app/components/disposition/disposition.component.js +61 -0
  32. package/esm5/projects/UILibrary/src/app/components/duration/duration.component.js +60 -0
  33. package/esm5/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.js +74 -0
  34. package/esm5/projects/UILibrary/src/app/components/interaction/interaction.component.js +85 -0
  35. package/esm5/projects/UILibrary/src/app/components/login/login.component.js +68 -0
  36. package/esm5/projects/UILibrary/src/app/components/operation/operation.component.js +58 -0
  37. package/esm5/projects/UILibrary/src/app/components/property/property.component.js +101 -0
  38. package/esm5/projects/UILibrary/src/app/components/scenario/scenario.component.js +41 -0
  39. package/esm5/projects/UILibrary/src/app/models/chat.message.js +7 -0
  40. package/esm5/projects/UILibrary/src/app/models/chat.settings.js +1 -0
  41. package/esm5/projects/UILibrary/src/app/models/disposition.interface.js +1 -0
  42. package/esm5/projects/UILibrary/src/app/models/login.interface.js +1 -0
  43. package/esm5/projects/UILibrary/src/app/models/uilibrary.model.js +43 -0
  44. package/esm5/projects/UILibrary/src/app/uilibrary.module.js +74 -0
  45. package/esm5/public_api.js +2 -0
  46. package/fesm2015/amc-technology-ui-library.js +813 -0
  47. package/fesm2015/amc-technology-ui-library.js.map +1 -0
  48. package/fesm5/amc-technology-ui-library.js +867 -0
  49. package/fesm5/amc-technology-ui-library.js.map +1 -0
  50. package/package.json +14 -67
  51. package/projects/UILibrary/src/app/components/activity/activity.component.d.ts +10 -10
  52. package/projects/UILibrary/src/app/components/interaction/interaction.component.d.ts +2 -1
  53. package/projects/UILibrary/src/app/components/scenario/scenario.component.d.ts +2 -2
  54. package/webcomponents/webcomponents.js +3 -3
  55. package/esm2015/amc-technology-ui-library.js.map +0 -40
  56. package/esm5/amc-technology-ui-library.js.map +0 -42
@@ -1,765 +1,1096 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/elements'), require('@angular/platform-browser'), require('elements-zone-strategy')) :
3
- typeof define === 'function' && define.amd ? define('@amc-technology/ui-library', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/elements', '@angular/platform-browser', 'elements-zone-strategy'], factory) :
4
- (factory((global['amc-technology'] = global['amc-technology'] || {}, global['amc-technology']['ui-library'] = {}),global.ng.core,global.ng.common,global.ng.forms,global.ng.elements,global.ng.platformBrowser,global.elementsZoneStrategy));
5
- }(this, (function (exports,core,common,forms,elements,platformBrowser,elementsZoneStrategy) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/elements'), require('@angular/platform-browser'), require('elements-zone-strategy')) :
3
+ typeof define === 'function' && define.amd ? define('@amc-technology/ui-library', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/elements', '@angular/platform-browser', 'elements-zone-strategy'], factory) :
4
+ (global = global || self, factory((global['amc-technology'] = global['amc-technology'] || {}, global['amc-technology']['ui-library'] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.elements, global.ng.platformBrowser, global.elementsZoneStrategy));
5
+ }(this, (function (exports, core, common, forms, elements, platformBrowser, elementsZoneStrategy) { 'use strict';
6
6
 
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
- Permission to use, copy, modify, and/or distribute this software for any
10
- purpose with or without fee is hereby granted.
11
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
- PERFORMANCE OF THIS SOFTWARE.
18
- ***************************************************************************** */
19
- /* global Reflect, Promise */
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+
23
+ var extendStatics = function(d, b) {
24
+ extendStatics = Object.setPrototypeOf ||
25
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
+ return extendStatics(d, b);
28
+ };
29
+
30
+ function __extends(d, b) {
31
+ extendStatics(d, b);
32
+ function __() { this.constructor = d; }
33
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
+ }
35
+
36
+ var __assign = function() {
37
+ __assign = Object.assign || function __assign(t) {
38
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
39
+ s = arguments[i];
40
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
+ }
42
+ return t;
43
+ };
44
+ return __assign.apply(this, arguments);
45
+ };
46
+
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ }
58
+
59
+ function __decorate(decorators, target, key, desc) {
60
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
+ 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;
63
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
64
+ }
65
+
66
+ function __param(paramIndex, decorator) {
67
+ return function (target, key) { decorator(target, key, paramIndex); }
68
+ }
69
+
70
+ function __metadata(metadataKey, metadataValue) {
71
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
+ }
73
+
74
+ function __awaiter(thisArg, _arguments, P, generator) {
75
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
+ return new (P || (P = Promise))(function (resolve, reject) {
77
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
81
+ });
82
+ }
83
+
84
+ function __generator(thisArg, body) {
85
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
+ function verb(n) { return function (v) { return step([n, v]); }; }
88
+ function step(op) {
89
+ if (f) throw new TypeError("Generator is already executing.");
90
+ while (_) try {
91
+ 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;
92
+ if (y = 0, t) op = [op[0] & 2, t.value];
93
+ switch (op[0]) {
94
+ case 0: case 1: t = op; break;
95
+ case 4: _.label++; return { value: op[1], done: false };
96
+ case 5: _.label++; y = op[1]; op = [0]; continue;
97
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
+ default:
99
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
+ if (t[2]) _.ops.pop();
104
+ _.trys.pop(); continue;
105
+ }
106
+ op = body.call(thisArg, _);
107
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
+ }
110
+ }
111
+
112
+ function __createBinding(o, m, k, k2) {
113
+ if (k2 === undefined) k2 = k;
114
+ o[k2] = m[k];
115
+ }
116
+
117
+ function __exportStar(m, exports) {
118
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
119
+ }
120
+
121
+ function __values(o) {
122
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
123
+ if (m) return m.call(o);
124
+ if (o && typeof o.length === "number") return {
125
+ next: function () {
126
+ if (o && i >= o.length) o = void 0;
127
+ return { value: o && o[i++], done: !o };
128
+ }
129
+ };
130
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
131
+ }
132
+
133
+ function __read(o, n) {
134
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
135
+ if (!m) return o;
136
+ var i = m.call(o), r, ar = [], e;
137
+ try {
138
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
139
+ }
140
+ catch (error) { e = { error: error }; }
141
+ finally {
142
+ try {
143
+ if (r && !r.done && (m = i["return"])) m.call(i);
144
+ }
145
+ finally { if (e) throw e.error; }
146
+ }
147
+ return ar;
148
+ }
149
+
150
+ function __spread() {
151
+ for (var ar = [], i = 0; i < arguments.length; i++)
152
+ ar = ar.concat(__read(arguments[i]));
153
+ return ar;
154
+ }
155
+
156
+ function __spreadArrays() {
157
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
158
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
159
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
160
+ r[k] = a[j];
161
+ return r;
162
+ };
163
+
164
+ function __await(v) {
165
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
166
+ }
167
+
168
+ function __asyncGenerator(thisArg, _arguments, generator) {
169
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
170
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
171
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
172
+ 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); }); }; }
173
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
174
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
175
+ function fulfill(value) { resume("next", value); }
176
+ function reject(value) { resume("throw", value); }
177
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
178
+ }
179
+
180
+ function __asyncDelegator(o) {
181
+ var i, p;
182
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
183
+ 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; }
184
+ }
185
+
186
+ function __asyncValues(o) {
187
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
188
+ var m = o[Symbol.asyncIterator], i;
189
+ 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);
190
+ 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); }); }; }
191
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
192
+ }
193
+
194
+ function __makeTemplateObject(cooked, raw) {
195
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
196
+ return cooked;
197
+ };
198
+
199
+ function __importStar(mod) {
200
+ if (mod && mod.__esModule) return mod;
201
+ var result = {};
202
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
203
+ result.default = mod;
204
+ return result;
205
+ }
206
+
207
+ function __importDefault(mod) {
208
+ return (mod && mod.__esModule) ? mod : { default: mod };
209
+ }
210
+
211
+ function __classPrivateFieldGet(receiver, privateMap) {
212
+ if (!privateMap.has(receiver)) {
213
+ throw new TypeError("attempted to get private field on non-instance");
214
+ }
215
+ return privateMap.get(receiver);
216
+ }
217
+
218
+ function __classPrivateFieldSet(receiver, privateMap, value) {
219
+ if (!privateMap.has(receiver)) {
220
+ throw new TypeError("attempted to set private field on non-instance");
221
+ }
222
+ privateMap.set(receiver, value);
223
+ return value;
224
+ }
20
225
 
226
+ /**
227
+ * @ignore
228
+ */
229
+ var InteractionComponent = /** @class */ (function () {
230
+ /**
231
+ * @ignore
232
+ */
233
+ function InteractionComponent() {
234
+ this.minimizedChanged = new core.EventEmitter();
235
+ this.isAgentTyping = new core.EventEmitter();
236
+ this.newMessage = new core.EventEmitter();
237
+ this._minimized = false;
238
+ }
239
+ Object.defineProperty(InteractionComponent.prototype, "_minimized", {
240
+ get: function () {
241
+ return this.minimized;
242
+ },
243
+ set: function (value) {
244
+ this.minimized = value;
245
+ this.minimizedChanged.emit(value);
246
+ },
247
+ enumerable: true,
248
+ configurable: true
249
+ });
250
+ /**
251
+ * @ignore
252
+ */
253
+ InteractionComponent.prototype.ngOnInit = function () {
254
+ };
255
+ /**
256
+ * @ignore
257
+ */
258
+ InteractionComponent.prototype.minimize = function () {
259
+ this._minimized = true;
260
+ };
261
+ /**
262
+ * @ignore
263
+ */
264
+ InteractionComponent.prototype.maximize = function () {
265
+ this._minimized = false;
266
+ };
267
+ /**
268
+ * @ignore
269
+ */
270
+ InteractionComponent.prototype.isConferenceCall = function () {
271
+ if (this.interaction.parties && this.interaction.parties.length > 1) {
272
+ return true;
273
+ }
274
+ return false;
275
+ };
276
+ InteractionComponent.prototype.collapseKeypress = function (event) {
277
+ if (event.code === 'Enter') {
278
+ this.minimize();
279
+ }
280
+ };
281
+ InteractionComponent.prototype.expandKeypress = function (event) {
282
+ if (event.code === 'Enter') {
283
+ this.maximize();
284
+ }
285
+ };
286
+ __decorate([
287
+ core.Input()
288
+ ], InteractionComponent.prototype, "interaction", void 0);
289
+ __decorate([
290
+ core.Output()
291
+ ], InteractionComponent.prototype, "minimizedChanged", void 0);
292
+ __decorate([
293
+ core.Output()
294
+ ], InteractionComponent.prototype, "isAgentTyping", void 0);
295
+ __decorate([
296
+ core.Output()
297
+ ], InteractionComponent.prototype, "newMessage", void 0);
298
+ InteractionComponent = __decorate([
299
+ core.Component({
300
+ selector: 'amc-interaction',
301
+ template: "<div class=\"AnswerCallFocused\">\r\n <div class=\"editor callHeaderTop\">\r\n <img class=\"statusImage\" aria-hidden=\"true\" [src]=\"interaction.UIHeadersData.statusUrl\" (click)=\"interaction.UIHeadersData.focusHandler.handler(interaction.UIHeadersData.focusHandler.operationName, interaction.UIHeadersData.focusHandler.operationMetadata)\" />\r\n <label class=\"statusText\">\r\n <b [id]=\"interaction.UIHeadersData.statusText\">{{ interaction.UIHeadersData.statusText }}</b>\r\n </label>\r\n <label class=\"verticalDivider\">|</label>\r\n <label class=\"directionText\" *ngIf=\"!interaction.UIHeadersData.displayHoldCounter\">{{ interaction.UIHeadersData.directionText }}</label>\r\n <div class=\"holdCallDurationDiv\" *ngIf=\"interaction.UIHeadersData.displayHoldCounter\">\r\n <amc-holdtimer [holdCounterData]=\"interaction.UIHeadersData.holdCounterData\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\"></amc-holdtimer>\r\n </div>\r\n <img class=\"ViewExpandImage\" [src]=\"interaction.UIHeadersData.minimizeUrl\" alt=\"Minimize\" (click)=\"minimize()\" (keypress)=\"collapseKeypress($event)\" *ngIf=\"!_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"collapse Call Section\">\r\n <img class=\"ViewCollapseImage\" [src]=\"interaction.UIHeadersData.maximizeUrl\" alt=\"Maximize\" (click)=\"maximize()\" (keypress)=\"expandKeypress($event)\" *ngIf=\"_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"expand Call Section\">\r\n <div class=\"DurationDiv\" *ngIf=\"interaction.displayCallTimer\">\r\n <amc-duration [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [startTime]=\"interaction.startTime\"></amc-duration>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!_minimized\">\r\n\r\n <div *ngIf=\"!isConferenceCall()\">\r\n <div class=\"editor phoneNumberContainer\">\r\n <input class=\"callImage\" type=\"image\" [src]=\"interaction.subheaderData.image.href\" [title]=\"interaction.subheaderData.tooltip || ''\" tabindex=\"-1\">\r\n <input class=\"editor phoneNumberValue\" [attr.aria-labelledby]=\"interaction.UIHeadersData.statusText + ' ' + interaction.subheaderData.value\" readonly type=\"text\" [value]=\"interaction.subheaderData.value\" [id]=\"interaction.subheaderData.value\" tabindex=\"-1\">\r\n </div>\r\n\r\n <div class=\"cadSection\">\r\n <ng-container *ngFor=\"let property of interaction.properties\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <label class=\"col1\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let property of interaction.associatedData\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <app-chat-box *ngIf=\"interaction.chat\" [isTyping]=\"interaction.chat.isCustomerTyping\" [settings]=\"interaction.chat.settings\"\r\n [messages]=\"interaction.chat.messages\" (isAgentTyping)=\"isAgentTyping.emit($event)\" (newMessage)=\"newMessage.emit($event)\"></app-chat-box>\r\n\r\n <div [id]='interaction.interactionId'> </div>\r\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\r\n </div>\r\n\r\n <div *ngIf=\"isConferenceCall()\">\r\n <div *ngFor=\"let party of interaction.parties\">\r\n <div class=\"editor phoneNumberContainer\">\r\n <input class=\"callImage\" type=\"image\" [src]=\"party.header.image.href\" [title]=\"party.header.tooltip || ''\" tabindex=\"-1\">\r\n <input class=\"editor phoneNumberValue\" readonly type=\"text\" [value]=\"party.header.value\" tabindex=\"-1\">\r\n </div>\r\n\r\n <div class=\"grid-container\">\r\n <ng-container *ngFor=\"let property of party.properties\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <label class=\"col1\" [title]=\"property.displayKey\">{{ property.displayKey }}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"party.header.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"party.header.value\" [operations]=\"party.operations\"></amc-operation>\r\n <div class=\"AnswerCallFocused\"></div>\r\n </div>\r\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
302
+ styles: [":host{display:block}.phoneNumberContainer{margin-left:5px!important;padding-left:0;display:flex;align-items:center}.cadSection{margin-bottom:5px}.grid-container{margin-left:5px;display:grid;grid-template-columns:auto 1fr;grid-column-gap:10px;max-width:calc(100% - 5px);overflow:hidden}.col1{grid-column:1/2}.col2{grid-column:2/3}.ViewExpandImage{margin:3px}.ViewExpandImage:focus{outline:#3296da solid 2px;outline-offset:0}.ViewCollapseImage{margin:3px}.ViewCollapseImage:focus{outline:#3296da solid 2px;outline-offset:0}.callImage{cursor:default}.phoneNumberValue:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
303
+ })
304
+ ], InteractionComponent);
305
+ return InteractionComponent;
306
+ }());
21
307
 
308
+ var ScenarioComponent = /** @class */ (function () {
309
+ function ScenarioComponent() {
310
+ this.minimizedChanged = new core.EventEmitter();
311
+ this.isAgentTyping = new core.EventEmitter();
312
+ this.newMessage = new core.EventEmitter();
313
+ this.afterViewChecked = new core.EventEmitter();
314
+ }
315
+ ScenarioComponent.prototype.ngAfterViewChecked = function () {
316
+ this.afterViewChecked.emit();
317
+ };
318
+ ScenarioComponent.prototype.onMinimizedChanged = function () {
319
+ this.minimizedChanged.emit();
320
+ };
321
+ __decorate([
322
+ core.Input()
323
+ ], ScenarioComponent.prototype, "scenario", void 0);
324
+ __decorate([
325
+ core.Output()
326
+ ], ScenarioComponent.prototype, "minimizedChanged", void 0);
327
+ __decorate([
328
+ core.Output()
329
+ ], ScenarioComponent.prototype, "isAgentTyping", void 0);
330
+ __decorate([
331
+ core.Output()
332
+ ], ScenarioComponent.prototype, "newMessage", void 0);
333
+ __decorate([
334
+ core.Output()
335
+ ], ScenarioComponent.prototype, "afterViewChecked", void 0);
336
+ ScenarioComponent = __decorate([
337
+ core.Component({
338
+ selector: 'amc-scenario',
339
+ template: "<ng-container *ngIf=\"scenario && scenario.interactions\">\r\n <amc-interaction *ngFor=\"let interaction of scenario.interactions\" [interaction]=\"interaction\"\r\n (minimizedChanged)=\"onMinimizedChanged()\" (isAgentTyping)=\"isAgentTyping.emit($event)\"\r\n (newMessage)=\"newMessage.emit($event)\">\r\n </amc-interaction>\r\n</ng-container>\r\n",
340
+ styles: ["", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
341
+ })
342
+ ], ScenarioComponent);
343
+ return ScenarioComponent;
344
+ }());
22
345
 
346
+ /**
347
+ * @ignore
348
+ */
349
+ var OperationComponent = /** @class */ (function () {
350
+ /**
351
+ * @ignore
352
+ */
353
+ function OperationComponent() {
354
+ this.labelledByText = '';
355
+ this.describedByText = '';
356
+ }
357
+ /**
358
+ * @ignore
359
+ */
360
+ OperationComponent.prototype.ngOnInit = function () {
361
+ if (this.statusText && this.callType) {
362
+ this.describedByText = this.statusText + " " + this.callType;
363
+ }
364
+ else if (this.statusText) {
365
+ this.describedByText = this.statusText;
366
+ }
367
+ else if (this.callType) {
368
+ this.describedByText = this.callType;
369
+ }
370
+ if (this.callId) {
371
+ this.labelledByText = this.callId;
372
+ }
373
+ };
374
+ OperationComponent.prototype.operationKeypress = function (event, operation) {
375
+ if (event.code === 'Enter') {
376
+ operation.handler(operation.operationName, operation.operationMetadata);
377
+ }
378
+ };
379
+ __decorate([
380
+ core.Input()
381
+ ], OperationComponent.prototype, "statusText", void 0);
382
+ __decorate([
383
+ core.Input()
384
+ ], OperationComponent.prototype, "callId", void 0);
385
+ __decorate([
386
+ core.Input()
387
+ ], OperationComponent.prototype, "callType", void 0);
388
+ __decorate([
389
+ core.Input()
390
+ ], OperationComponent.prototype, "operations", void 0);
391
+ OperationComponent = __decorate([
392
+ core.Component({
393
+ selector: 'amc-operation',
394
+ template: "<div class=\"callOptions\">\r\n <img\r\n class=\"AnswerCallImages\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n attr.aria-label=\"{{ operation.title }}\"\r\n *ngFor=\"let operation of operations\"\r\n [title]=\"operation.title\"\r\n [src]=\"operation.icon\"\r\n [attr.accesskey]=\"operation.accesskey || null\"\r\n [attr.aria-labelledby]=\"labelledByText || null\"\r\n [attr.aria-describedby]=\"describedByText || null\"\r\n (click)=\"operation.handler(operation.operationName, operation.operationMetadata)\"\r\n (keypress)=\"operationKeypress($event, operation)\"/>\r\n</div>\r\n",
395
+ styles: [".AnswerCallImages:focus{outline:#3296da solid 2px;outline-offset:1px}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
396
+ })
397
+ ], OperationComponent);
398
+ return OperationComponent;
399
+ }());
23
400
 
401
+
402
+ (function (IChatMessageType) {
403
+ IChatMessageType["AGENT"] = "AGENT";
404
+ IChatMessageType["OTHER_PERSON"] = "OTHER_PERSON";
405
+ IChatMessageType["INFORMATION"] = "INFORMATION";
406
+ })(exports.IChatMessageType || (exports.IChatMessageType = {}));
24
407
 
408
+ /**
409
+ * A helper method to make instances of [IProperty]
410
+ */
411
+ var Property = /** @class */ (function () {
412
+ /**
413
+ *
414
+ * @param key
415
+ * @param value : if value type is COUNTER then value should be start time in MilliSeconds.
416
+ * @param visible
417
+ * @param valueType
418
+ * @param customOperation
419
+ */
420
+ function Property(key, value, visible, valueType, customOperation) {
421
+ var _this = this;
422
+ /**
423
+ * Operation responsible for generating displayKey and dispkayValur from key and value.
424
+ */
425
+ this.displayOperation = function () {
426
+ _this.displayKey = _this.key;
427
+ _this.displayValue = _this.value;
428
+ };
429
+ this.key = key;
430
+ this.value = value;
431
+ visible != null ? (this.visible = visible) : (this.visible = true);
432
+ valueType != null
433
+ ? (this.displayValueType = valueType)
434
+ : (this.displayValueType = exports.ValueType.STRING);
435
+ this.customOperations = customOperation;
436
+ this.displayOperation();
437
+ }
438
+ return Property;
439
+ }());
440
+ /**
441
+ * enum for Value types of PROPERTY.
442
+ */
443
+
444
+ (function (ValueType) {
445
+ ValueType[ValueType["STRING"] = 0] = "STRING";
446
+ ValueType[ValueType["COUNTER"] = 1] = "COUNTER";
447
+ })(exports.ValueType || (exports.ValueType = {}));
25
448
 
449
+ function secondsToHms(seconds_in) {
450
+ seconds_in = Number(seconds_in);
451
+ var h = Math.floor(seconds_in / 3600);
452
+ var m = Math.floor(seconds_in % 3600 / 60);
453
+ var s = Math.floor(seconds_in % 3600 % 60);
454
+ var hDisplay = h > 0 ? h.toString() + ':' : '';
455
+ var mDisplay = m > 0 ? ('0' + m.toString()).slice(-2) + ':' : '00:';
456
+ var sDisplay = s > 0 ? ('0' + s.toString()).slice(-2) : '00';
457
+ return hDisplay + mDisplay + sDisplay;
458
+ }
26
459
 
460
+ /**
461
+ * @ignore
462
+ */
463
+ var PropertyComponent = /** @class */ (function () {
464
+ /**
465
+ * @ignore
466
+ */
467
+ function PropertyComponent() {
468
+ this.labelledByText = '';
469
+ this.title = '';
470
+ this._timerId = null;
471
+ this.processedDisplayValue = '';
472
+ }
473
+ /**
474
+ * @ignore
475
+ */
476
+ PropertyComponent.prototype.ngOnInit = function () {
477
+ if (this.statusText && this.callType) {
478
+ this.labelledByText = this.statusText + " " + this.callType;
479
+ }
480
+ else if (this.statusText) {
481
+ this.labelledByText = this.statusText;
482
+ }
483
+ else if (this.callType) {
484
+ this.labelledByText = this.callType;
485
+ }
486
+ if (this.callType && this.callId) {
487
+ this.title = this.callType + " " + this.callId;
488
+ }
489
+ else if (this.callType) {
490
+ this.title = this.callType;
491
+ }
492
+ else if (this.callId) {
493
+ this.title = this.callId;
494
+ }
495
+ this.initValues();
496
+ };
497
+ /**
498
+ * @ignore
499
+ */
500
+ PropertyComponent.prototype.initValues = function () {
501
+ if (this.property.displayValueType === exports.ValueType.COUNTER) {
502
+ this.startCallCounter();
503
+ }
504
+ else {
505
+ this.processedDisplayValue = this.property.displayValue;
506
+ }
507
+ };
508
+ /**
509
+ * @ignore
510
+ */
511
+ PropertyComponent.prototype.startCallCounter = function () {
512
+ var _this = this;
513
+ if (this._timerId == null) {
514
+ this._timerId = window.setInterval(function () {
515
+ var callStartTime = _this.property.displayValue;
516
+ var currentTime = new Date().getTime() / 1000;
517
+ var secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
518
+ _this.processedDisplayValue = secondsToHms(secondsPassed);
519
+ }, 1000);
520
+ }
521
+ };
522
+ /**
523
+ * @ignore
524
+ */
525
+ PropertyComponent.prototype.ngOnDestroy = function () {
526
+ if (this.property.displayValueType === exports.ValueType.COUNTER) {
527
+ // clear the timer.
528
+ if (this._timerId != null) {
529
+ clearInterval(this._timerId);
530
+ this._timerId = null;
531
+ }
532
+ }
533
+ };
534
+ __decorate([
535
+ core.Input()
536
+ ], PropertyComponent.prototype, "statusText", void 0);
537
+ __decorate([
538
+ core.Input()
539
+ ], PropertyComponent.prototype, "callId", void 0);
540
+ __decorate([
541
+ core.Input()
542
+ ], PropertyComponent.prototype, "callType", void 0);
543
+ __decorate([
544
+ core.Input()
545
+ ], PropertyComponent.prototype, "property", void 0);
546
+ PropertyComponent = __decorate([
547
+ core.Component({
548
+ selector: 'amc-property',
549
+ template: "<input\r\n readonly\r\n *ngIf=\"!property.customOperations\"\r\n class=\"displayData\"\r\n tabindex=\"0\"\r\n type=\"text\"\r\n [name]=\"processedDisplayValue\"\r\n [title]=\"title || null\"\r\n [attr.aria-labelledby]=\"labelledByText || null\"\r\n [value]=\"processedDisplayValue\"/>\r\n\r\n <input\r\n readonly\r\n *ngIf=\"property.customOperations\"\r\n class=\"cursor displayData\"\r\n type=\"text\"\r\n tabindex=\"0\"\r\n [name]=\"processedDisplayValue\"\r\n [title]=\"title || null\"\r\n [value]=\"processedDisplayValue\"\r\n [attr.aria-labelledby]=\"labelledByText || null\"\r\n (click)=\"property.customOperations.handler(property.customOperations.eventName, property.customOperations.eventMetadata)\" />\r\n",
550
+ styles: ["input{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
551
+ })
552
+ ], PropertyComponent);
553
+ return PropertyComponent;
554
+ }());
27
555
 
556
+ var HoldtimerComponent = /** @class */ (function () {
557
+ function HoldtimerComponent() {
558
+ this.labelledByText = '';
559
+ this.displayTime = '00:00/00:00';
560
+ }
561
+ HoldtimerComponent.prototype.ngOnInit = function () {
562
+ if (this.statusText && this.callId) {
563
+ this.labelledByText = this.statusText + " " + this.callId;
564
+ }
565
+ else if (this.statusText) {
566
+ this.labelledByText = this.statusText;
567
+ }
568
+ else if (this.callId) {
569
+ this.labelledByText = this.callId;
570
+ }
571
+ this.startCallCounter();
572
+ };
573
+ /**
574
+ * @ignore
575
+ */
576
+ HoldtimerComponent.prototype.startCallCounter = function () {
577
+ var _this = this;
578
+ var pastTimeInSeconds = this.CaculatePastHoldDuration();
579
+ if (this._timerId == null) {
580
+ this._timerId = window.setInterval(function () {
581
+ var currentTime = new Date().getTime() / 1000;
582
+ var secondsPassedCurrentCall = Math.floor((currentTime) - (_this.holdCounterData.currentHoldStartTime / 1000));
583
+ _this.displayTime = secondsToHms(secondsPassedCurrentCall) +
584
+ '/' + secondsToHms(pastTimeInSeconds + secondsPassedCurrentCall);
585
+ }, 1000);
586
+ }
587
+ };
588
+ HoldtimerComponent.prototype.CaculatePastHoldDuration = function () {
589
+ var pastTimeInSeconds = 0;
590
+ if (this.holdCounterData.pastCallDurations) {
591
+ this.holdCounterData.pastCallDurations.forEach(function (holdTimerIterator) {
592
+ pastTimeInSeconds += (holdTimerIterator.endTime - holdTimerIterator.startTime) / 1000;
593
+ });
594
+ }
595
+ return pastTimeInSeconds;
596
+ };
597
+ /**
598
+ * @ignore
599
+ */
600
+ HoldtimerComponent.prototype.ngOnDestroy = function () {
601
+ // clear the timer.
602
+ if (this._timerId != null) {
603
+ clearInterval(this._timerId);
604
+ this._timerId = null;
605
+ }
606
+ };
607
+ __decorate([
608
+ core.Input()
609
+ ], HoldtimerComponent.prototype, "holdCounterData", void 0);
610
+ __decorate([
611
+ core.Input()
612
+ ], HoldtimerComponent.prototype, "statusText", void 0);
613
+ __decorate([
614
+ core.Input()
615
+ ], HoldtimerComponent.prototype, "callId", void 0);
616
+ HoldtimerComponent = __decorate([
617
+ core.Component({
618
+ selector: 'amc-holdtimer',
619
+ template: "<div class=\"holdCallDurationDiv\">\r\n <input\r\n readonly\r\n class=\"holdCallDurationTimer\"\r\n name=\"HoldCallDuration/TotalHoldCallDuration\"\r\n type=\"text\"\r\n tabindex=\"-1\"\r\n title=\"Hold Duration\"\r\n [attr.aria-labelledby]=\"labelledByText || null\"\r\n [value]=\"displayTime\">\r\n</div>\r\n",
620
+ styles: [".holdCallDurationTimer:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
621
+ })
622
+ ], HoldtimerComponent);
623
+ return HoldtimerComponent;
624
+ }());
28
625
 
626
+ var DurationComponent = /** @class */ (function () {
627
+ function DurationComponent() {
628
+ this.labelledByText = '';
629
+ this.displayTime = '00:00/00:00';
630
+ }
631
+ DurationComponent.prototype.ngOnInit = function () {
632
+ if (this.statusText && this.callId) {
633
+ this.labelledByText = this.statusText + " " + this.callId;
634
+ }
635
+ else if (this.statusText) {
636
+ this.labelledByText = this.statusText;
637
+ }
638
+ else if (this.callId) {
639
+ this.labelledByText = this.callId;
640
+ }
641
+ this.startCallCounter();
642
+ };
643
+ /**
644
+ * @ignore
645
+ */
646
+ DurationComponent.prototype.startCallCounter = function () {
647
+ var _this = this;
648
+ if (this._timerId == null) {
649
+ this._timerId = window.setInterval(function () {
650
+ var callStartTime = _this.startTime;
651
+ var currentTime = new Date().getTime() / 1000;
652
+ var secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
653
+ _this.displayTime = Math.floor(secondsPassed / 60) + ':' + ('0' + (secondsPassed % 60)).slice(-2);
654
+ }, 1000);
655
+ }
656
+ };
657
+ DurationComponent.prototype.ngOnDestroy = function () {
658
+ // clear the timer.
659
+ if (this._timerId != null) {
660
+ clearInterval(this._timerId);
661
+ this._timerId = null;
662
+ }
663
+ };
664
+ __decorate([
665
+ core.Input()
666
+ ], DurationComponent.prototype, "statusText", void 0);
667
+ __decorate([
668
+ core.Input()
669
+ ], DurationComponent.prototype, "callId", void 0);
670
+ __decorate([
671
+ core.Input()
672
+ ], DurationComponent.prototype, "startTime", void 0);
673
+ DurationComponent = __decorate([
674
+ core.Component({
675
+ selector: 'amc-duration',
676
+ template: "<div class=\"holdCallDurationDiv\">\r\n <input\r\n readonly\r\n class=\"block durationInput\"\r\n name=\"CallDuration\"\r\n type=\"text\"\r\n tabindex=\"-1\"\r\n title=\"Call Duration\"\r\n [value]=\"displayTime\"\r\n [attr.aria-labelledby]=\"labelledByText || null\">\r\n</div>\r\n",
677
+ styles: [".durationInput:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
678
+ })
679
+ ], DurationComponent);
680
+ return DurationComponent;
681
+ }());
29
682
 
30
- function __values(o) {
31
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
32
- if (m) return m.call(o);
33
- if (o && typeof o.length === "number") return {
34
- next: function () {
35
- if (o && i >= o.length) o = void 0;
36
- return { value: o && o[i++], done: !o };
37
- }
38
- };
39
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
40
- }
683
+ var ChatBoxComponent = /** @class */ (function () {
684
+ function ChatBoxComponent() {
685
+ this.isTyping = false;
686
+ this.lastCount = -1;
687
+ this._isAgentTyping = false;
688
+ this.isAgentTyping = new core.EventEmitter();
689
+ this.newMessage = new core.EventEmitter();
690
+ this.newMessageText = '';
691
+ this.usernameToColor = {};
692
+ this.colors = [
693
+ '#81c784',
694
+ '#ffab91',
695
+ '#f48fb1',
696
+ '#29b6f6',
697
+ '#e1bee7',
698
+ '#9ccc65',
699
+ '#ffc107',
700
+ '#26c6da',
701
+ '#cddc39',
702
+ ];
703
+ this.colorsIndex = 0;
704
+ this.agentColor = '#29b6f6';
705
+ }
706
+ ChatBoxComponent.prototype.ngAfterViewChecked = function () {
707
+ if (this.lastCount !== this.messages.length) {
708
+ this.lastCount = this.messages.length;
709
+ this.scrollToBottom();
710
+ }
711
+ };
712
+ ChatBoxComponent.prototype.getColor = function (message) {
713
+ if (message.type && message.type === exports.IChatMessageType.AGENT) {
714
+ return this.agentColor;
715
+ }
716
+ else if (message.username) {
717
+ if (!this.usernameToColor[message.username]) {
718
+ this.usernameToColor[message.username] = this.colors[this.colorsIndex];
719
+ this.colorsIndex = (this.colorsIndex + 1) % this.colors.length;
720
+ }
721
+ return this.usernameToColor[message.username];
722
+ }
723
+ else {
724
+ return this.colors[0];
725
+ }
726
+ };
727
+ ChatBoxComponent.prototype.shouldAlignRight = function (message) {
728
+ return message.type && message.type === exports.IChatMessageType.AGENT;
729
+ };
730
+ ChatBoxComponent.prototype.sendNewMessage = function () {
731
+ if (this.newMessageText) {
732
+ this.newMessage.emit(this.newMessageText);
733
+ this.newMessageText = '';
734
+ }
735
+ };
736
+ ChatBoxComponent.prototype.onNewMessageFocus = function (event) {
737
+ var isTyping = event && this.newMessageText.length > 0;
738
+ if (isTyping !== this._isAgentTyping) {
739
+ this._isAgentTyping = isTyping;
740
+ this.isAgentTyping.emit(isTyping);
741
+ }
742
+ };
743
+ ChatBoxComponent.prototype.onKeyup = function () {
744
+ var isTyping = this.newMessageText.length > 0;
745
+ if (isTyping !== this._isAgentTyping) {
746
+ this._isAgentTyping = isTyping;
747
+ this.isAgentTyping.emit(isTyping);
748
+ }
749
+ };
750
+ ChatBoxComponent.prototype.scrollToBottom = function () {
751
+ try {
752
+ this.messagesContainer.nativeElement.scrollTop = this.messagesContainer.nativeElement.scrollHeight;
753
+ }
754
+ catch (e) { }
755
+ };
756
+ __decorate([
757
+ core.Input()
758
+ ], ChatBoxComponent.prototype, "settings", void 0);
759
+ __decorate([
760
+ core.Input()
761
+ ], ChatBoxComponent.prototype, "isTyping", void 0);
762
+ __decorate([
763
+ core.Input()
764
+ ], ChatBoxComponent.prototype, "messages", void 0);
765
+ __decorate([
766
+ core.Output()
767
+ ], ChatBoxComponent.prototype, "isAgentTyping", void 0);
768
+ __decorate([
769
+ core.Output()
770
+ ], ChatBoxComponent.prototype, "newMessage", void 0);
771
+ __decorate([
772
+ core.ViewChild('MessagesContainer', { static: true })
773
+ ], ChatBoxComponent.prototype, "messagesContainer", void 0);
774
+ ChatBoxComponent = __decorate([
775
+ core.Component({
776
+ selector: 'app-chat-box',
777
+ template: "<div class=\"chat-box\">\r\n <div #MessagesContainer class=\"messages\" [style.max-height]='settings.maxHeight'>\r\n <ng-container *ngFor=\"let message of messages\">\r\n <app-chat-message [alignRight]=\"shouldAlignRight(message)\" [message]=\"message.text\" [username]=\"message.username\"\r\n [timestamp]=\"message.timestamp\" [image]=\"message.userIcon\" [fallbackImage]=\"settings.fallbackUserIcon\" [color]=\"getColor(message)\">\r\n </app-chat-message>\r\n </ng-container>\r\n\r\n <div *ngIf=\"isTyping\" class=\"typing-indicator\">\r\n Someone is typing\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"new-message\">\r\n <input #NewMessageText [(ngModel)]=\"newMessageText\" type=\"text\" placeholder=\"Type a message\" (focus)=\"onNewMessageFocus(true)\"\r\n (blur)=\"onNewMessageFocus(false)\" (keydown.enter)=\"sendNewMessage()\" (keyup)='onKeyup()' [disabled]=\"settings.disableSendMessage\">\r\n <input type=\"image\" [src]=\"settings.sendImage\" (click)=\"sendNewMessage()\" [disabled]=\"settings.disableSendMessage\">\r\n </div>\r\n</div>\r\n",
778
+ styles: [".chat-box{background-color:#eceff1}.messages{padding:5px;overflow:auto;min-height:50px}.new-message{border-top:1px solid #000;display:flex;align-content:center;height:25px}.new-message input[type=text]{flex:1 1 0;background-color:#eceff1;border:none;min-width:0}.new-message input[type=image]{position:relative;top:50%;transform:translateY(-50%);height:20px;cursor:pointer}.new-message input[type=image]:disabled{opacity:.5;cursor:auto}.new-message input:focus{outline:0}.typing-indicator{font-size:1em;font-style:italic}.typing-indicator span{display:inline-block;height:10px;width:10px;border-radius:50%;background-color:#9e9e9e;margin:0 1px;opacity:.2}.typing-indicator span:nth-of-type(1){-webkit-animation:1.5s .33333s infinite blink;animation:1.5s .33333s infinite blink}.typing-indicator span:nth-of-type(2){-webkit-animation:1.5s .66666s infinite blink;animation:1.5s .66666s infinite blink}.typing-indicator span:nth-of-type(3){-webkit-animation:1.5s .99999s infinite blink;animation:1.5s .99999s infinite blink}@-webkit-keyframes blink{50%{opacity:1}}@keyframes blink{50%{opacity:1}}"]
779
+ })
780
+ ], ChatBoxComponent);
781
+ return ChatBoxComponent;
782
+ }());
41
783
 
42
- var InteractionComponent = /** @class */ (function () {
43
- function InteractionComponent() {
44
- this.minimizedChanged = new core.EventEmitter();
45
- this.isAgentTyping = new core.EventEmitter();
46
- this.newMessage = new core.EventEmitter();
47
- this._minimized = false;
48
- }
49
- Object.defineProperty(InteractionComponent.prototype, "_minimized", {
50
- get: function () {
51
- return this.minimized;
52
- },
53
- set: function (value) {
54
- this.minimized = value;
55
- this.minimizedChanged.emit(value);
56
- },
57
- enumerable: true,
58
- configurable: true
59
- });
60
- InteractionComponent.prototype.ngOnInit = function () {
61
- };
62
- InteractionComponent.prototype.minimize = function () {
63
- this._minimized = true;
64
- };
65
- InteractionComponent.prototype.maximize = function () {
66
- this._minimized = false;
67
- };
68
- InteractionComponent.prototype.isConferenceCall = function () {
69
- if (this.interaction.parties && this.interaction.parties.length > 1) {
70
- return true;
71
- }
72
- return false;
73
- };
74
- InteractionComponent.prototype.collapseKeypress = function (event) {
75
- if (event.code === 'Enter') {
76
- this.minimize();
77
- }
78
- };
79
- InteractionComponent.prototype.expandKeypress = function (event) {
80
- if (event.code === 'Enter') {
81
- this.maximize();
82
- }
83
- };
84
- return InteractionComponent;
85
- }());
86
- InteractionComponent.decorators = [
87
- { type: core.Component, args: [{
88
- selector: 'amc-interaction',
89
- template: "<div class=\"AnswerCallFocused\">\n <div class=\"editor callHeaderTop\">\n <img class=\"statusImage\" aria-hidden=\"true\" [src]=\"interaction.UIHeadersData.statusUrl\" (click)=\"interaction.UIHeadersData.focusHandler.handler(interaction.UIHeadersData.focusHandler.operationName, interaction.UIHeadersData.focusHandler.operationMetadata)\" />\n <label class=\"statusText\">\n <b [id]=\"interaction.UIHeadersData.statusText\">{{ interaction.UIHeadersData.statusText }}</b>\n </label>\n <label class=\"verticalDivider\">|</label>\n <label class=\"directionText\" *ngIf=\"!interaction.UIHeadersData.displayHoldCounter\">{{ interaction.UIHeadersData.directionText }}</label>\n <div class=\"holdCallDurationDiv\" *ngIf=\"interaction.UIHeadersData.displayHoldCounter\">\n <amc-holdtimer [holdCounterData]=\"interaction.UIHeadersData.holdCounterData\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\"></amc-holdtimer>\n </div>\n <img class=\"ViewExpandImage\" [src]=\"interaction.UIHeadersData.minimizeUrl\" alt=\"Minimize\" (click)=\"minimize()\" (keypress)=\"collapseKeypress($event)\" *ngIf=\"!_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"collapse Call Section\">\n <img class=\"ViewCollapseImage\" [src]=\"interaction.UIHeadersData.maximizeUrl\" alt=\"Maximize\" (click)=\"maximize()\" (keypress)=\"expandKeypress($event)\" *ngIf=\"_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"expand Call Section\">\n <div class=\"DurationDiv\" *ngIf=\"interaction.displayCallTimer\">\n <amc-duration [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [startTime]=\"interaction.startTime\"></amc-duration>\n </div>\n </div>\n\n <div *ngIf=\"!_minimized\">\n\n <div *ngIf=\"!isConferenceCall()\">\n <div class=\"editor phoneNumberContainer\">\n <input class=\"callImage\" type=\"image\" [src]=\"interaction.subheaderData.image.href\" [title]=\"interaction.subheaderData.tooltip || ''\" tabindex=\"-1\">\n <input class=\"editor phoneNumberValue\" [attr.aria-labelledby]=\"interaction.UIHeadersData.statusText + ' ' + interaction.subheaderData.value\" readonly type=\"text\" [value]=\"interaction.subheaderData.value\" [id]=\"interaction.subheaderData.value\" tabindex=\"-1\">\n </div>\n\n <div class=\"cadSection\">\n <ng-container *ngFor=\"let property of interaction.properties\">\n <ng-container *ngIf=\"property.visible\">\n <label class=\"col1\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\n </ng-container>\n </ng-container>\n\n <ng-container *ngFor=\"let property of interaction.associatedData\">\n <ng-container *ngIf=\"property.visible\">\n <div class=\"editor displayDiv\">\n <label class=\"displayLabels\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\n </div>\n </ng-container>\n </ng-container>\n </div>\n\n <app-chat-box *ngIf=\"interaction.chat\" [isTyping]=\"interaction.chat.isCustomerTyping\" [settings]=\"interaction.chat.settings\"\n [messages]=\"interaction.chat.messages\" (isAgentTyping)=\"isAgentTyping.emit($event)\" (newMessage)=\"newMessage.emit($event)\"></app-chat-box>\n\n <div [id]='interaction.interactionId'> </div>\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\n </div>\n\n <div *ngIf=\"isConferenceCall()\">\n <div *ngFor=\"let party of interaction.parties\">\n <div class=\"editor phoneNumberContainer\">\n <input class=\"callImage\" type=\"image\" [src]=\"party.header.image.href\" [title]=\"party.header.tooltip || ''\" tabindex=\"-1\">\n <input class=\"editor phoneNumberValue\" readonly type=\"text\" [value]=\"party.header.value\" tabindex=\"-1\">\n </div>\n\n <div class=\"grid-container\">\n <ng-container *ngFor=\"let property of party.properties\">\n <ng-container *ngIf=\"property.visible\">\n <label class=\"col1\" [title]=\"property.displayKey\">{{ property.displayKey }}</label>\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"party.header.value\" class=\"col2\" [property]=\"property\"> </amc-property>\n </ng-container>\n </ng-container>\n </div>\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"party.header.value\" [operations]=\"party.operations\"></amc-operation>\n <div class=\"AnswerCallFocused\"></div>\n </div>\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\n </div>\n\n </div>\n</div>\n",
90
- styles: [":host{display:block}.phoneNumberContainer{margin-left:5px!important;padding-left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cadSection{margin-bottom:5px}.grid-container{margin-left:5px;display:grid;grid-template-columns:auto 1fr;grid-column-gap:10px;max-width:calc(100% - 5px);overflow:hidden}.col1{grid-column:1/2}.col2{grid-column:2/3}.ViewExpandImage{margin:3px}.ViewExpandImage:focus{outline:#3296da solid 2px;outline-offset:0}.ViewCollapseImage{margin:3px}.ViewCollapseImage:focus{outline:#3296da solid 2px;outline-offset:0}.callImage{cursor:default}.phoneNumberValue:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
91
- },] },
92
- ];
93
- InteractionComponent.ctorParameters = function () { return []; };
94
- InteractionComponent.propDecorators = {
95
- interaction: [{ type: core.Input }],
96
- minimizedChanged: [{ type: core.Output }],
97
- isAgentTyping: [{ type: core.Output }],
98
- newMessage: [{ type: core.Output }]
99
- };
100
- var ScenarioComponent = /** @class */ (function () {
101
- function ScenarioComponent() {
102
- this.minimizedChanged = new core.EventEmitter();
103
- this.isAgentTyping = new core.EventEmitter();
104
- this.newMessage = new core.EventEmitter();
105
- this.afterViewChecked = new core.EventEmitter();
106
- }
107
- ScenarioComponent.prototype.ngAfterViewChecked = function () {
108
- this.afterViewChecked.emit();
109
- };
110
- ScenarioComponent.prototype.onMinimizedChanged = function () {
111
- this.minimizedChanged.emit();
112
- };
113
- return ScenarioComponent;
114
- }());
115
- ScenarioComponent.decorators = [
116
- { type: core.Component, args: [{
117
- selector: 'amc-scenario',
118
- template: "<ng-container *ngIf=\"scenario && scenario.interactions\">\n <amc-interaction *ngFor=\"let interaction of scenario.interactions\" [interaction]=\"interaction\"\n (minimizedChanged)=\"onMinimizedChanged()\" (isAgentTyping)=\"isAgentTyping.emit($event)\"\n (newMessage)=\"newMessage.emit($event)\">\n </amc-interaction>\n</ng-container>\n",
119
- styles: ["", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
120
- },] },
121
- ];
122
- ScenarioComponent.ctorParameters = function () { return []; };
123
- ScenarioComponent.propDecorators = {
124
- scenario: [{ type: core.Input }],
125
- minimizedChanged: [{ type: core.Output }],
126
- isAgentTyping: [{ type: core.Output }],
127
- newMessage: [{ type: core.Output }],
128
- afterViewChecked: [{ type: core.Output }]
129
- };
130
- var OperationComponent = /** @class */ (function () {
131
- function OperationComponent() {
132
- this.labelledByText = '';
133
- this.describedByText = '';
134
- }
135
- OperationComponent.prototype.ngOnInit = function () {
136
- if (this.statusText && this.callType) {
137
- this.describedByText = this.statusText + " " + this.callType;
138
- }
139
- else if (this.statusText) {
140
- this.describedByText = this.statusText;
141
- }
142
- else if (this.callType) {
143
- this.describedByText = this.callType;
144
- }
145
- if (this.callId) {
146
- this.labelledByText = this.callId;
147
- }
148
- };
149
- OperationComponent.prototype.operationKeypress = function (event, operation) {
150
- if (event.code === 'Enter') {
151
- operation.handler(operation.operationName, operation.operationMetadata);
152
- }
153
- };
154
- return OperationComponent;
155
- }());
156
- OperationComponent.decorators = [
157
- { type: core.Component, args: [{
158
- selector: 'amc-operation',
159
- template: "<div class=\"callOptions\">\n <img\n class=\"AnswerCallImages\"\n tabindex=\"0\"\n role=\"button\"\n attr.aria-label=\"{{ operation.title }}\"\n *ngFor=\"let operation of operations\"\n [title]=\"operation.title\"\n [src]=\"operation.icon\"\n [attr.accesskey]=\"operation.accesskey || null\"\n [attr.aria-labelledby]=\"labelledByText || null\"\n [attr.aria-describedby]=\"describedByText || null\"\n (click)=\"operation.handler(operation.operationName, operation.operationMetadata)\"\n (keypress)=\"operationKeypress($event, operation)\"/>\n</div>\n",
160
- styles: [".AnswerCallImages:focus{outline:#3296da solid 2px;outline-offset:1px}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
161
- },] },
162
- ];
163
- OperationComponent.ctorParameters = function () { return []; };
164
- OperationComponent.propDecorators = {
165
- statusText: [{ type: core.Input }],
166
- callId: [{ type: core.Input }],
167
- callType: [{ type: core.Input }],
168
- operations: [{ type: core.Input }]
169
- };
170
- var IChatMessageType = {
171
- AGENT: 'AGENT',
172
- OTHER_PERSON: 'OTHER_PERSON',
173
- INFORMATION: 'INFORMATION',
174
- };
175
- var Property = /** @class */ (function () {
176
- function Property(key, value, visible, valueType, customOperation) {
177
- var _this = this;
178
- this.displayOperation = (function () {
179
- _this.displayKey = _this.key;
180
- _this.displayValue = _this.value;
181
- });
182
- this.key = key;
183
- this.value = value;
184
- visible != null ? (this.visible = visible) : (this.visible = true);
185
- valueType != null
186
- ? (this.displayValueType = valueType)
187
- : (this.displayValueType = ValueType.STRING);
188
- this.customOperations = customOperation;
189
- this.displayOperation();
190
- }
191
- return Property;
192
- }());
193
- var ValueType = {
194
- STRING: 0,
195
- COUNTER: 1,
196
- };
197
- ValueType[ValueType.STRING] = 'STRING';
198
- ValueType[ValueType.COUNTER] = 'COUNTER';
199
- function secondsToHms(seconds_in) {
200
- seconds_in = Number(seconds_in);
201
- var h = Math.floor(seconds_in / 3600);
202
- var m = Math.floor(seconds_in % 3600 / 60);
203
- var s = Math.floor(seconds_in % 3600 % 60);
204
- var hDisplay = h > 0 ? h.toString() + ':' : '';
205
- var mDisplay = m > 0 ? ('0' + m.toString()).slice(-2) + ':' : '00:';
206
- var sDisplay = s > 0 ? ('0' + s.toString()).slice(-2) : '00';
207
- return hDisplay + mDisplay + sDisplay;
208
- }
209
- var PropertyComponent = /** @class */ (function () {
210
- function PropertyComponent() {
211
- this.labelledByText = '';
212
- this.title = '';
213
- this._timerId = null;
214
- this.processedDisplayValue = '';
215
- }
216
- PropertyComponent.prototype.ngOnInit = function () {
217
- if (this.statusText && this.callType) {
218
- this.labelledByText = this.statusText + " " + this.callType;
219
- }
220
- else if (this.statusText) {
221
- this.labelledByText = this.statusText;
222
- }
223
- else if (this.callType) {
224
- this.labelledByText = this.callType;
225
- }
226
- if (this.callType && this.callId) {
227
- this.title = this.callType + " " + this.callId;
228
- }
229
- else if (this.callType) {
230
- this.title = this.callType;
231
- }
232
- else if (this.callId) {
233
- this.title = this.callId;
234
- }
235
- this.initValues();
236
- };
237
- PropertyComponent.prototype.initValues = function () {
238
- if (this.property.displayValueType === ValueType.COUNTER) {
239
- this.startCallCounter();
240
- }
241
- else {
242
- this.processedDisplayValue = this.property.displayValue;
243
- }
244
- };
245
- PropertyComponent.prototype.startCallCounter = function () {
246
- var _this = this;
247
- if (this._timerId == null) {
248
- this._timerId = window.setInterval((function () {
249
- var callStartTime = _this.property.displayValue;
250
- var currentTime = new Date().getTime() / 1000;
251
- var secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
252
- _this.processedDisplayValue = secondsToHms(secondsPassed);
253
- }), 1000);
254
- }
255
- };
256
- PropertyComponent.prototype.ngOnDestroy = function () {
257
- if (this.property.displayValueType === ValueType.COUNTER) {
258
- if (this._timerId != null) {
259
- clearInterval(this._timerId);
260
- this._timerId = null;
261
- }
262
- }
263
- };
264
- return PropertyComponent;
265
- }());
266
- PropertyComponent.decorators = [
267
- { type: core.Component, args: [{
268
- selector: 'amc-property',
269
- template: "<input\n readonly\n *ngIf=\"!property.customOperations\"\n class=\"displayData\"\n tabindex=\"0\"\n type=\"text\"\n [name]=\"processedDisplayValue\"\n [title]=\"title || null\"\n [attr.aria-labelledby]=\"labelledByText || null\"\n [value]=\"processedDisplayValue\"/>\n\n <input\n readonly\n *ngIf=\"property.customOperations\"\n class=\"cursor displayData\"\n type=\"text\"\n tabindex=\"0\"\n [name]=\"processedDisplayValue\"\n [title]=\"title || null\"\n [value]=\"processedDisplayValue\"\n [attr.aria-labelledby]=\"labelledByText || null\"\n (click)=\"property.customOperations.handler(property.customOperations.eventName, property.customOperations.eventMetadata)\" />\n",
270
- styles: ["input{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
271
- },] },
272
- ];
273
- PropertyComponent.ctorParameters = function () { return []; };
274
- PropertyComponent.propDecorators = {
275
- statusText: [{ type: core.Input }],
276
- callId: [{ type: core.Input }],
277
- callType: [{ type: core.Input }],
278
- property: [{ type: core.Input }]
279
- };
280
- var HoldtimerComponent = /** @class */ (function () {
281
- function HoldtimerComponent() {
282
- this.labelledByText = '';
283
- this.displayTime = '00:00/00:00';
284
- }
285
- HoldtimerComponent.prototype.ngOnInit = function () {
286
- if (this.statusText && this.callId) {
287
- this.labelledByText = this.statusText + " " + this.callId;
288
- }
289
- else if (this.statusText) {
290
- this.labelledByText = this.statusText;
291
- }
292
- else if (this.callId) {
293
- this.labelledByText = this.callId;
294
- }
295
- this.startCallCounter();
296
- };
297
- HoldtimerComponent.prototype.startCallCounter = function () {
298
- var _this = this;
299
- var pastTimeInSeconds = this.CaculatePastHoldDuration();
300
- if (this._timerId == null) {
301
- this._timerId = window.setInterval((function () {
302
- var currentTime = new Date().getTime() / 1000;
303
- var secondsPassedCurrentCall = Math.floor((currentTime) - (_this.holdCounterData.currentHoldStartTime / 1000));
304
- _this.displayTime = secondsToHms(secondsPassedCurrentCall) +
305
- '/' + secondsToHms(pastTimeInSeconds + secondsPassedCurrentCall);
306
- }), 1000);
307
- }
308
- };
309
- HoldtimerComponent.prototype.CaculatePastHoldDuration = function () {
310
- var pastTimeInSeconds = 0;
311
- if (this.holdCounterData.pastCallDurations) {
312
- this.holdCounterData.pastCallDurations.forEach((function (holdTimerIterator) {
313
- pastTimeInSeconds += (holdTimerIterator.endTime - holdTimerIterator.startTime) / 1000;
314
- }));
315
- }
316
- return pastTimeInSeconds;
317
- };
318
- HoldtimerComponent.prototype.ngOnDestroy = function () {
319
- if (this._timerId != null) {
320
- clearInterval(this._timerId);
321
- this._timerId = null;
322
- }
323
- };
324
- return HoldtimerComponent;
325
- }());
326
- HoldtimerComponent.decorators = [
327
- { type: core.Component, args: [{
328
- selector: 'amc-holdtimer',
329
- template: "<div class=\"holdCallDurationDiv\">\n <input\n readonly\n class=\"holdCallDurationTimer\"\n name=\"HoldCallDuration/TotalHoldCallDuration\"\n type=\"text\"\n tabindex=\"-1\"\n title=\"Hold Duration\"\n [attr.aria-labelledby]=\"labelledByText || null\"\n [value]=\"displayTime\">\n</div>\n",
330
- styles: [".holdCallDurationTimer:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
331
- },] },
332
- ];
333
- HoldtimerComponent.ctorParameters = function () { return []; };
334
- HoldtimerComponent.propDecorators = {
335
- holdCounterData: [{ type: core.Input }],
336
- statusText: [{ type: core.Input }],
337
- callId: [{ type: core.Input }]
338
- };
339
- var DurationComponent = /** @class */ (function () {
340
- function DurationComponent() {
341
- this.labelledByText = '';
342
- this.displayTime = '00:00/00:00';
343
- }
344
- DurationComponent.prototype.ngOnInit = function () {
345
- if (this.statusText && this.callId) {
346
- this.labelledByText = this.statusText + " " + this.callId;
347
- }
348
- else if (this.statusText) {
349
- this.labelledByText = this.statusText;
350
- }
351
- else if (this.callId) {
352
- this.labelledByText = this.callId;
353
- }
354
- this.startCallCounter();
355
- };
356
- DurationComponent.prototype.startCallCounter = function () {
357
- var _this = this;
358
- if (this._timerId == null) {
359
- this._timerId = window.setInterval((function () {
360
- var callStartTime = _this.startTime;
361
- var currentTime = new Date().getTime() / 1000;
362
- var secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
363
- _this.displayTime = Math.floor(secondsPassed / 60) + ':' + ('0' + (secondsPassed % 60)).slice(-2);
364
- }), 1000);
365
- }
366
- };
367
- DurationComponent.prototype.ngOnDestroy = function () {
368
- if (this._timerId != null) {
369
- clearInterval(this._timerId);
370
- this._timerId = null;
371
- }
372
- };
373
- return DurationComponent;
374
- }());
375
- DurationComponent.decorators = [
376
- { type: core.Component, args: [{
377
- selector: 'amc-duration',
378
- template: "<div class=\"holdCallDurationDiv\">\n <input\n readonly\n class=\"block durationInput\"\n name=\"CallDuration\"\n type=\"text\"\n tabindex=\"-1\"\n title=\"Call Duration\"\n [value]=\"displayTime\"\n [attr.aria-labelledby]=\"labelledByText || null\">\n</div>\n",
379
- styles: [".durationInput:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
380
- },] },
381
- ];
382
- DurationComponent.ctorParameters = function () { return []; };
383
- DurationComponent.propDecorators = {
384
- statusText: [{ type: core.Input }],
385
- callId: [{ type: core.Input }],
386
- startTime: [{ type: core.Input }]
387
- };
388
- var ChatBoxComponent = /** @class */ (function () {
389
- function ChatBoxComponent() {
390
- this.isTyping = false;
391
- this.lastCount = -1;
392
- this._isAgentTyping = false;
393
- this.isAgentTyping = new core.EventEmitter();
394
- this.newMessage = new core.EventEmitter();
395
- this.newMessageText = '';
396
- this.usernameToColor = {};
397
- this.colors = [
398
- '#81c784',
399
- '#ffab91',
400
- '#f48fb1',
401
- '#29b6f6',
402
- '#e1bee7',
403
- '#9ccc65',
404
- '#ffc107',
405
- '#26c6da',
406
- '#cddc39',
407
- ];
408
- this.colorsIndex = 0;
409
- this.agentColor = '#29b6f6';
410
- }
411
- ChatBoxComponent.prototype.ngAfterViewChecked = function () {
412
- if (this.lastCount !== this.messages.length) {
413
- this.lastCount = this.messages.length;
414
- this.scrollToBottom();
415
- }
416
- };
417
- ChatBoxComponent.prototype.getColor = function (message) {
418
- if (message.type && message.type === IChatMessageType.AGENT) {
419
- return this.agentColor;
420
- }
421
- else if (message.username) {
422
- if (!this.usernameToColor[message.username]) {
423
- this.usernameToColor[message.username] = this.colors[this.colorsIndex];
424
- this.colorsIndex = (this.colorsIndex + 1) % this.colors.length;
425
- }
426
- return this.usernameToColor[message.username];
427
- }
428
- else {
429
- return this.colors[0];
430
- }
431
- };
432
- ChatBoxComponent.prototype.shouldAlignRight = function (message) {
433
- return message.type && message.type === IChatMessageType.AGENT;
434
- };
435
- ChatBoxComponent.prototype.sendNewMessage = function () {
436
- if (this.newMessageText) {
437
- this.newMessage.emit(this.newMessageText);
438
- this.newMessageText = '';
439
- }
440
- };
441
- ChatBoxComponent.prototype.onNewMessageFocus = function (event) {
442
- var isTyping = event && this.newMessageText.length > 0;
443
- if (isTyping !== this._isAgentTyping) {
444
- this._isAgentTyping = isTyping;
445
- this.isAgentTyping.emit(isTyping);
446
- }
447
- };
448
- ChatBoxComponent.prototype.onKeyup = function () {
449
- var isTyping = this.newMessageText.length > 0;
450
- if (isTyping !== this._isAgentTyping) {
451
- this._isAgentTyping = isTyping;
452
- this.isAgentTyping.emit(isTyping);
453
- }
454
- };
455
- ChatBoxComponent.prototype.scrollToBottom = function () {
456
- try {
457
- this.messagesContainer.nativeElement.scrollTop = this.messagesContainer.nativeElement.scrollHeight;
458
- }
459
- catch (e) { }
460
- };
461
- return ChatBoxComponent;
462
- }());
463
- ChatBoxComponent.decorators = [
464
- { type: core.Component, args: [{
465
- selector: 'app-chat-box',
466
- template: "<div class=\"chat-box\">\n <div #MessagesContainer class=\"messages\" [style.max-height]='settings.maxHeight'>\n <ng-container *ngFor=\"let message of messages\">\n <app-chat-message [alignRight]=\"shouldAlignRight(message)\" [message]=\"message.text\" [username]=\"message.username\"\n [timestamp]=\"message.timestamp\" [image]=\"message.userIcon\" [fallbackImage]=\"settings.fallbackUserIcon\" [color]=\"getColor(message)\">\n </app-chat-message>\n </ng-container>\n\n <div *ngIf=\"isTyping\" class=\"typing-indicator\">\n Someone is typing\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n\n <div class=\"new-message\">\n <input #NewMessageText [(ngModel)]=\"newMessageText\" type=\"text\" placeholder=\"Type a message\" (focus)=\"onNewMessageFocus(true)\"\n (blur)=\"onNewMessageFocus(false)\" (keydown.enter)=\"sendNewMessage()\" (keyup)='onKeyup()' [disabled]=\"settings.disableSendMessage\">\n <input type=\"image\" [src]=\"settings.sendImage\" (click)=\"sendNewMessage()\" [disabled]=\"settings.disableSendMessage\">\n </div>\n</div>\n",
467
- styles: [".chat-box{background-color:#eceff1}.messages{padding:5px;overflow:auto;min-height:50px}.new-message{border-top:1px solid #000;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;height:25px}.new-message input[type=text]{-webkit-box-flex:1;-ms-flex:1 1 0px;flex:1 1 0;background-color:#eceff1;border:none;min-width:0}.new-message input[type=image]{position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:20px;cursor:pointer}.new-message input[type=image]:disabled{opacity:.5;cursor:auto}.new-message input:focus{outline:0}.typing-indicator{font-size:1em;font-style:italic}.typing-indicator span{display:inline-block;height:10px;width:10px;border-radius:50%;background-color:#9e9e9e;margin:0 1px;opacity:.2}.typing-indicator span:nth-of-type(1){-webkit-animation:1.5s .33333s infinite blink;animation:1.5s .33333s infinite blink}.typing-indicator span:nth-of-type(2){-webkit-animation:1.5s .66666s infinite blink;animation:1.5s .66666s infinite blink}.typing-indicator span:nth-of-type(3){-webkit-animation:1.5s .99999s infinite blink;animation:1.5s .99999s infinite blink}@-webkit-keyframes blink{50%{opacity:1}}@keyframes blink{50%{opacity:1}}"],
468
- },] },
469
- ];
470
- ChatBoxComponent.ctorParameters = function () { return []; };
471
- ChatBoxComponent.propDecorators = {
472
- settings: [{ type: core.Input }],
473
- isTyping: [{ type: core.Input }],
474
- messages: [{ type: core.Input }],
475
- isAgentTyping: [{ type: core.Output }],
476
- newMessage: [{ type: core.Output }],
477
- messagesContainer: [{ type: core.ViewChild, args: ['MessagesContainer',] }]
478
- };
479
- var ChatMessageComponent = /** @class */ (function () {
480
- function ChatMessageComponent() {
481
- this.alignRight = false;
482
- }
483
- ChatMessageComponent.prototype.ngOnInit = function () {
484
- };
485
- return ChatMessageComponent;
486
- }());
487
- ChatMessageComponent.decorators = [
488
- { type: core.Component, args: [{
489
- selector: 'app-chat-message',
490
- template: "<div [class]=\"alignRight? 'message right-message' : 'message left-message'\">\n <div class=\"message-header\">\n <img *ngIf=\"image\" class=\"image\" [src]=\"image\" (error)=\"image = fallbackImage\" [style.border-color]=\"color\" />\n <span *ngIf=\"username\" class=\"username\">{{username}}</span>\n <span *ngIf=\"timestamp\" class=\"timestamp\">{{timestamp}}</span>\n </div>\n\n <div class=\"message-body-container\">\n <div>\n <div class=\"message-body\" [style.background-color]=\"color\" [style.border-color]=\"color\">\n <span [innerHTML]=\"message\"></span>\n </div>\n </div>\n </div>\n</div>\n",
491
- styles: [":host{display:block;margin-top:2px;margin-bottom:2px}.right-message{text-align:end}.message-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-text-emphasis:none;text-emphasis:none;font-style:italic;font-size:.7em;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:.5em}.message-header .image{height:30px;border-radius:50%;border:2px solid red}.message-header .username{font-weight:700}.right-message>.message-header{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:1px}.right-message>.message-header .image,.right-message>.message-header .username{margin-left:5px}.left-message>.message-header{margin-left:1px}.left-message>.message-header .image,.left-message>.message-header .username{margin-right:5px}.message-body-container{display:-webkit-box;display:-ms-flexbox;display:flex}.right-message>.message-body-container{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.message-body{display:inline-block;position:relative;border-radius:.4em;padding:3px;font-style:normal;font-size:1em;text-align:start;min-width:2em;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.left-message .message-body:after{content:\"\";position:absolute;left:.8em;top:-.4em;border-bottom:.4em solid #000;border-bottom-color:inherit;border-left:.4em solid transparent;border-right:.4em solid transparent}.right-message .message-body:after{content:\"\";position:absolute;right:.8em;top:-.4em;border-bottom:.4em solid #000;border-bottom-color:inherit;border-left:.4em solid transparent;border-right:.4em solid transparent}"]
492
- },] },
493
- ];
494
- ChatMessageComponent.ctorParameters = function () { return []; };
495
- ChatMessageComponent.propDecorators = {
496
- message: [{ type: core.Input }],
497
- alignRight: [{ type: core.Input }],
498
- username: [{ type: core.Input }],
499
- color: [{ type: core.Input }],
500
- timestamp: [{ type: core.Input }],
501
- image: [{ type: core.Input }],
502
- fallbackImage: [{ type: core.Input }]
503
- };
504
- var DispositionComponent = /** @class */ (function () {
505
- function DispositionComponent() {
506
- this.dispositionEmitter = new core.EventEmitter();
507
- this.selectedDispositionValue = '';
508
- this.dispositionName = '';
509
- }
510
- DispositionComponent.prototype.ngOnInit = function () {
511
- var e_1, _a;
512
- try {
513
- for (var _b = __values(this.disposition.dispositionMetadata), _c = _b.next(); !_c.done; _c = _b.next()) {
514
- var metadata = _c.value;
515
- if (metadata.key === 'callId') {
516
- this.dispositionName = "disposition_" + metadata.value;
517
- break;
518
- }
519
- }
520
- }
521
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
522
- finally {
523
- try {
524
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
525
- }
526
- finally { if (e_1) throw e_1.error; }
527
- }
528
- if (this.disposition.checkedDisposition) {
529
- this.selectedDispositionValue = this.disposition.checkedDisposition;
530
- }
531
- };
532
- DispositionComponent.prototype.submitDisposition = function () {
533
- var selectedDisposition = {
534
- dispositionId: this.selectedDispositionValue,
535
- dispositionName: this.disposition.disposition.get(this.selectedDispositionValue),
536
- dispositionMetadata: this.disposition.dispositionMetadata
537
- };
538
- this.dispositionEmitter.emit(selectedDisposition);
539
- };
540
- DispositionComponent.prototype.selectAndSubmitDisposition = function (event, dispositionKey) {
541
- if (event.code === 'Enter') {
542
- this.selectedDispositionValue = dispositionKey;
543
- this.submitDisposition();
544
- }
545
- };
546
- return DispositionComponent;
547
- }());
548
- DispositionComponent.decorators = [
549
- { type: core.Component, args: [{
550
- selector: 'amc-disposition',
551
- template: "<div class=\"disposition-container\">\n <div class=\"header-container\">\n <label class=\"disposition-header\" attr.aria-label=\"set disposition\">{{disposition.dispositionHeader}}</label>\n </div>\n\n <div class=\"dispositions-container\">\n <div class=\"disposition\" *ngFor=\"let disp of disposition.disposition | keyvalue; let i = index\">\n <label\n class=\"disposition-label\"\n tabindex=\"0\"\n [id]=\"disp.key\"\n [ngClass]=\"{'disposition-label-selected' : selectedDispositionValue === disp.key, 'first-disposition': i === 0}\"\n (keypress)=\"selectAndSubmitDisposition($event, disp.key)\">\n\n <input\n class=\"disposition-input\"\n type=\"radio\"\n value=\"{{disp.key}}\"\n tabindex=\"-1\"\n attr.aria-label=\"{{disp.value}}\"\n [required]=\"!selectedDispositionValue\"\n [name]=\"dispositionName\"\n (change)=\"submitDisposition()\"\n [(ngModel)]=\"selectedDispositionValue\">\n\n {{disp.value}}\n </label>\n </div>\n </div>\n</div>\n",
552
- styles: [".disposition-container{border:1px solid #939598;white-space:nowrap;font-family:Arial;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;text-overflow:ellipsis;position:relative;font-size:.9em;max-height:180px;overflow-x:hidden;overflow-y:hidden}.header-container{border-bottom:1px solid #939598;background-color:#f4f5fb;width:100%;white-space:nowrap;height:28px;position:sticky;overflow-x:hidden;overflow-y:hidden}.disposition-header{margin-top:auto;margin-left:7px;padding:5px;white-space:nowrap;text-overflow:ellipsis;font-weight:700;font-size:.9em;font-family:Arial;overflow-x:hidden}.disposition{margin-left:5px;padding-left:5px;white-space:nowrap}.disposition-label{text-overflow:ellipsis;font-weight:400;white-space:nowrap;font-size:.9em;overflow-x:hidden}.disposition-label-selected{text-overflow:ellipsis;font-weight:700;white-space:nowrap;font-size:.9em}.dispositions-container{padding:3px;overflow-y:scroll;max-height:150px}.disposition-label:focus{outline:#3296da solid 2px;outline-offset:5px}.first-disposition{margin-top:5px}"]
553
- },] },
554
- ];
555
- DispositionComponent.ctorParameters = function () { return []; };
556
- DispositionComponent.propDecorators = {
557
- disposition: [{ type: core.Input }],
558
- dispositionEmitter: [{ type: core.Output }]
559
- };
560
- var ActivityComponent = /** @class */ (function () {
561
- function ActivityComponent() {
562
- this.ActivitySave = new core.EventEmitter();
563
- this.OnNameSelectChange = new core.EventEmitter();
564
- this.OnRelatedToChange = new core.EventEmitter();
565
- this.OnSubjectChange = new core.EventEmitter();
566
- this.OnCallNotesChange = new core.EventEmitter();
567
- this.isActivityMaximized = true;
568
- }
569
- ActivityComponent.prototype.ngOnInit = function () {
570
- };
571
- ActivityComponent.prototype.onNameSelectChange = function (event) {
572
- this.activity.WhoObject = this.getWho(event.currentTarget.value);
573
- this.OnNameSelectChange.emit(this.activity);
574
- };
575
- ActivityComponent.prototype.parseWhoObject = function (whoObject) {
576
- return whoObject.objectType + ': ' + whoObject.objectName;
577
- };
578
- ActivityComponent.prototype.parseWhatObject = function (whatObject) {
579
- return whatObject.objectType + ': ' + whatObject.objectName;
580
- };
581
- ActivityComponent.prototype.onRelatedToChange = function (event) {
582
- this.activity.WhatObject = this.getWhat(event.currentTarget.value);
583
- this.OnRelatedToChange.emit(this.activity);
584
- };
585
- ActivityComponent.prototype.onSubjectChange = function (event) {
586
- this.activity.Subject = event.srcElement.value;
587
- this.OnSubjectChange.emit(this.activity);
588
- };
589
- ActivityComponent.prototype.onCallNotesChange = function (event) {
590
- this.activity.Subject = event.srcElement.value.trim();
591
- this.OnCallNotesChange.emit(this.activity);
592
- };
593
- ActivityComponent.prototype.getWho = function (id) {
594
- for (var i = 0; i < this.activity.whoList.length; i++) {
595
- if (this.activity.whoList[i].objectId === id) {
596
- return this.activity.whoList[i];
597
- }
598
- }
599
- };
600
- ActivityComponent.prototype.getWhat = function (id) {
601
- for (var i = 0; i < this.activity.whatList.length; i++) {
602
- if (this.activity.whatList[i].objectId === id) {
603
- return this.activity.whatList[i];
604
- }
605
- }
606
- };
607
- ActivityComponent.prototype.loadQuickComment = function (value) {
608
- this.activity.Description = this.activity.Description + this.activity.quickCommentList[value];
609
- };
610
- ActivityComponent.prototype.activitySave = function (clearActivityFields) {
611
- this.ActivitySave.emit(this.activity);
612
- };
613
- return ActivityComponent;
614
- }());
615
- ActivityComponent.decorators = [
616
- { type: core.Component, args: [{
617
- selector: 'app-activity',
618
- template: "<div *ngIf=\"isActivityMaximized\" class=\"callDisplay\">\n <div class=\"editor callHeader\">\n <label class=\"headerLabel\">\n <b>Activity Information</b>\n </label>\n <img class=\"ViewResizeImage\" src=\"/assets/images/section_collapse.png\" (click)=\"isActivityMaximized = false\" title=\"Collapse\">\n </div>\n <div class=\"callBody\">\n <div class=\"activityFields\">\n <form>\n <div class=\"editor displayDiv\">\n <label class=\"displayLabels\" title=\"Call From\">{{activity.NameFieldName}}</label>\n <select class=\"dropDownListStyle displayData\" data-resetperactivity=\"false\" (change)=\"onNameSelectChange($event)\">\n <option *ngFor=\"let who of activity.whoList\" value=\"{{who.objectId}}\">{{parseWhoObject(who)}}</option>\n </select>\n </div>\n <div class=\"editor displayDiv\">\n <label class=\"displayLabels\" title=\"Related To\">{{activity.RelatedToFieldName}}</label>\n <select class=\"dropDownListStyle displayData\" (change)=\"onRelatedToChange($event)\" data-resetperactivity=\"false\">\n <option *ngFor=\"let what of activity.whatList\" value=\"{{what.objectId}}\">{{parseWhatObject(what)}}</option>\n </select>\n </div>\n <div class=\"editor displayDiv\">\n <label class=\"displayLabels\" title=\"Subject\">{{activity.SubjectFieldName}}</label>\n <input class=\"activitySubjectTextBoxStyle displayData\" (change)=\"onSubjectChange($event)\" title=\"{{activity.Subject}}\"\n type=\"text\" value=\"{{activity.Subject}}\">\n </div>\n <div class=\"editor displayDiv\">\n <div class=\"callNotesContainer\">\n <div class=\"textAreaDiv\">\n <textarea value=\"{{activity.Description}}\" placeholder=\"Click to add a comment\" class=\"activityCommentsTextBoxStyle\"\n (change)=\"onCallNotesChange($event)\" cols=\"20\" rows=\"2\" title=\"\"></textarea>\n </div>\n <div class=\"notesButtonBorder\">\n <div class=\"commentsButtonDiv\">\n <div class=\"quickCommentsDiv\">\n <input *ngFor=\"let quickComment of activity.quickCommentList ; let i = index;\" class=\"quickNotesBotton\" type=\"button\"\n value=\"{{i+1}}\" (click)=\"loadQuickComment(i)\" title=\"{{quickComment}}\">\n </div>\n <div class=\"submitDiv\">\n <input class=\"submitButton\" type=\"button\" value=\"Submit\" (click)=\"activitySave(false)\">\n </div>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n</div>\n<div *ngIf=\"!isActivityMaximized\" class=\"callDisplay\">\n <div class=\"editor callHeader\">\n <label class=\"headerLabel\">\n <b>Activity Information</b>\n </label>\n <img class=\"ViewResizeImage\" src=\"assets/images/section_expand.png\" (click)=\"isActivityMaximized = true\" title=\"Expand\">\n </div>\n",
619
- styles: [".callDisplay{display:grid;margin-bottom:8px;background-color:#fff}.editor{font-size:.9em;width:70%;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.callHeader{background-color:#f4f5fb!important;width:100%!important;margin-top:0!important}.headerLabel{margin-left:10px}.ViewResizeImage{width:20px;height:20px;float:right;cursor:pointer}.callBody{border-top:0;position:relative}.displayDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.displayLabels{margin-left:5px;width:25%;margin-right:2px}.displayData{width:70%}.dropDownListStyle{border:1px solid #939598!important;border-radius:3px!important;width:71%!important;height:20px!important;text-align:left!important;white-space:nowrap!important;text-overflow:ellipsis!important;margin:0 5px 0 0;cursor:pointer}.activitySubjectTextBoxStyle{border:1px solid #939598!important;border-radius:3px!important;width:71%!important;height:20px!important;text-align:left!important;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin:0 5px 0 0;padding-left:2px}.activityCommentsTextBoxStyle{border:none;color:#333!important;text-align:left!important;margin:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;resize:none;width:100%;height:95px}.notesButtonBorder{background-color:#fff;border-left:1px solid #939598;border-bottom:1px solid #939598;border-right:1px solid #939598;border-bottom-left-radius:3px!important;border-bottom-right-radius:3px!important;height:auto}.commentsButtonDiv{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.quickNotesBotton{background-color:#1e72ba;border:0;color:#fff;height:70%;width:20px;margin:2px;outline:0;font-size:70%}.quickCommentsDiv{text-align:left;-webkit-box-flex:1;-ms-flex:1 0 0px;flex:1 0 0;-ms-flex-wrap:wrap;flex-wrap:wrap;display:-webkit-box;display:-ms-flexbox;display:flex;margin:2px}.submitDiv{text-align:right;padding-right:4px}.submitButton{border:0;float:right;margin-top:2px;outline:0;cursor:pointer;background-color:#6cb047;color:#fff;border-radius:4px;font-size:98%;margin-bottom:2px}"]
620
- },] },
621
- ];
622
- ActivityComponent.ctorParameters = function () { return []; };
623
- ActivityComponent.propDecorators = {
624
- activity: [{ type: core.Input }],
625
- ActivitySave: [{ type: core.Output }],
626
- OnNameSelectChange: [{ type: core.Output }],
627
- OnRelatedToChange: [{ type: core.Output }],
628
- OnSubjectChange: [{ type: core.Output }],
629
- OnCallNotesChange: [{ type: core.Output }]
630
- };
631
- var LoginComponent = /** @class */ (function () {
632
- function LoginComponent() {
633
- this.loginDetailsProvided = new core.EventEmitter();
634
- }
635
- LoginComponent.prototype.ngOnInit = function () {
636
- var e_2, _a;
637
- if (!this.loginData.header) {
638
- this.loginData.header = 'Login';
639
- }
640
- try {
641
- for (var _b = __values(this.loginData.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
642
- var field = _c.value;
643
- if (!field.isInvalid) {
644
- field.isInvalid = false;
645
- }
646
- }
647
- }
648
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
649
- finally {
650
- try {
651
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
652
- }
653
- finally { if (e_2) throw e_2.error; }
654
- }
655
- };
656
- LoginComponent.prototype.onLogin = function (loginForm) {
657
- var e_3, _a;
658
- try {
659
- for (var _b = __values(this.loginData.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
660
- var field = _c.value;
661
- field.value = loginForm.value[field.name];
662
- }
663
- }
664
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
665
- finally {
666
- try {
667
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
668
- }
669
- finally { if (e_3) throw e_3.error; }
670
- }
671
- this.loginDetailsProvided.emit(this.loginData);
672
- };
673
- LoginComponent.prototype.focusOutOfInput = function (loginForm, field) {
674
- if (!loginForm.controls[field.name].valid) {
675
- field.isInvalid = true;
676
- }
677
- };
678
- return LoginComponent;
679
- }());
680
- LoginComponent.decorators = [
681
- { type: core.Component, args: [{
682
- selector: 'amc-login',
683
- template: "<div class=\"login-container\">\n <form (ngSubmit)=\"onLogin(loginForm)\"class=\"login-form\" id=\"login-form\" #loginForm=\"ngForm\">\n <div class=\"header-container\">\n <label class=\"login-header\" attr.aria-label=\"login\">{{ loginData.header }}</label>\n </div>\n <div class=\"fields-container\">\n <div *ngFor=\"let field of loginData.fields\" class=\"field\">\n <label class=\"field-label\">\n {{ field.name }}:\n </label>\n\n <input\n ngModel\n class=\"field-input\"\n attr.aria-label=\"{{ field.name }}\"\n [name]=\"field.name\"\n [type]=\"field.type\"\n [value]=\"field.value\"\n [placeholder]=\"field.placeholder || ''\"\n [required]=\"field.isRequired || false\"\n (focusout)=\"focusOutOfInput(loginForm, field)\"/>\n\n <p class=\"invalid-input\" *ngIf=\"field.isInvalid\">{{ field.invalidMessage }}</p>\n </div>\n\n <button\n type=\"submit\"\n class=\"form-submit\"\n form=\"login-form\"\n tabindex=\"0\"\n attr.aria-label=\"send\"\n [disabled]=\"!loginForm.valid\">Login</button>\n </div>\n\n </form>\n</div>\n",
684
- styles: [".login-container{border:1px solid #939598;white-space:nowrap;font-family:Arial;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;text-overflow:ellipsis;position:relative;font-size:.9em;max-height:200px;overflow-x:hidden;overflow-y:hidden}.header-container{border-bottom:1px solid #939598;background-color:#f4f5fb;width:100%;height:28px;position:sticky}.login-header{margin-top:auto;margin-left:7px;padding:5px;font-weight:700;font-size:.9em}.fields-container{overflow-y:auto;max-height:160px;font-size:.9em;padding:5px}.field{display:table-row;margin:5px}.field-label{padding:10px;display:table-cell}.field-input{display:table-cell;border:1px solid #939598;border-radius:5px}.field-input:focus{-webkit-box-shadow:0 0 5px #38badf;box-shadow:0 0 5px #38badf}.form-submit{margin:15px 10px 10px;display:table-row;border:1px solid #00a4b0;border-radius:5px;background-color:#00a4b0;color:#f7f7f7;width:10em;height:2em;-webkit-transition:.2s;transition:.2s;font-size:1.1em;position:relative;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.form-submit:hover{background-color:#01858f}.form-submit:disabled{background-color:silver;border-color:silver;color:#fff}input.ng-invalid.ng-touched[required]{border-color:#a94442}.form-submit:focus{outline:#3296da solid 2px;outline-offset:5px}.invalid-input{margin:0;padding:0;color:#a94442;font-size:x-small}"]
685
- },] },
686
- ];
687
- LoginComponent.ctorParameters = function () { return []; };
688
- LoginComponent.propDecorators = {
689
- loginData: [{ type: core.Input }],
690
- loginDetailsProvided: [{ type: core.Output }]
691
- };
692
- var UILibraryModule = /** @class */ (function () {
693
- function UILibraryModule(injector) {
694
- this.injector = injector;
695
- }
696
- UILibraryModule.prototype.ngDoBootstrap = function (app) {
697
- if (!customElements.get('amc-webcomponents-scenario')) {
698
- var strategyFactory = new elementsZoneStrategy.ElementZoneStrategyFactory(ScenarioComponent, this.injector);
699
- customElements.define('amc-webcomponents-scenario', elements.createCustomElement(ScenarioComponent, {
700
- injector: this.injector,
701
- strategyFactory: strategyFactory
702
- }));
703
- }
704
- if (!customElements.get('amc-webcomponents-disposition')) {
705
- var strategyFactory = new elementsZoneStrategy.ElementZoneStrategyFactory(DispositionComponent, this.injector);
706
- customElements.define('amc-webcomponents-disposition', elements.createCustomElement(DispositionComponent, {
707
- injector: this.injector,
708
- strategyFactory: strategyFactory
709
- }));
710
- }
711
- if (!customElements.get('amc-webcomponents-login')) {
712
- var strategyFactory = new elementsZoneStrategy.ElementZoneStrategyFactory(LoginComponent, this.injector);
713
- customElements.define('amc-webcomponents-disposition', elements.createCustomElement(LoginComponent, {
714
- injector: this.injector,
715
- strategyFactory: strategyFactory
716
- }));
717
- }
718
- };
719
- return UILibraryModule;
720
- }());
721
- UILibraryModule.decorators = [
722
- { type: core.NgModule, args: [{
723
- imports: [platformBrowser.BrowserModule, common.CommonModule, forms.FormsModule],
724
- declarations: [
725
- InteractionComponent,
726
- ScenarioComponent,
727
- OperationComponent,
728
- PropertyComponent,
729
- HoldtimerComponent,
730
- DurationComponent,
731
- ChatBoxComponent,
732
- ChatMessageComponent,
733
- DispositionComponent,
734
- ActivityComponent,
735
- LoginComponent
736
- ],
737
- entryComponents: [ScenarioComponent, DispositionComponent, LoginComponent],
738
- bootstrap: [],
739
- exports: [ScenarioComponent, DispositionComponent, LoginComponent]
740
- },] },
741
- ];
742
- UILibraryModule.ctorParameters = function () { return [
743
- { type: core.Injector }
744
- ]; };
784
+ var ChatMessageComponent = /** @class */ (function () {
785
+ function ChatMessageComponent() {
786
+ this.alignRight = false;
787
+ }
788
+ ChatMessageComponent.prototype.ngOnInit = function () {
789
+ };
790
+ __decorate([
791
+ core.Input()
792
+ ], ChatMessageComponent.prototype, "message", void 0);
793
+ __decorate([
794
+ core.Input()
795
+ ], ChatMessageComponent.prototype, "alignRight", void 0);
796
+ __decorate([
797
+ core.Input()
798
+ ], ChatMessageComponent.prototype, "username", void 0);
799
+ __decorate([
800
+ core.Input()
801
+ ], ChatMessageComponent.prototype, "color", void 0);
802
+ __decorate([
803
+ core.Input()
804
+ ], ChatMessageComponent.prototype, "timestamp", void 0);
805
+ __decorate([
806
+ core.Input()
807
+ ], ChatMessageComponent.prototype, "image", void 0);
808
+ __decorate([
809
+ core.Input()
810
+ ], ChatMessageComponent.prototype, "fallbackImage", void 0);
811
+ ChatMessageComponent = __decorate([
812
+ core.Component({
813
+ selector: 'app-chat-message',
814
+ template: "<div [class]=\"alignRight? 'message right-message' : 'message left-message'\">\r\n <div class=\"message-header\">\r\n <img *ngIf=\"image\" class=\"image\" [src]=\"image\" (error)=\"image = fallbackImage\" [style.border-color]=\"color\" />\r\n <span *ngIf=\"username\" class=\"username\">{{username}}</span>\r\n <span *ngIf=\"timestamp\" class=\"timestamp\">{{timestamp}}</span>\r\n </div>\r\n\r\n <div class=\"message-body-container\">\r\n <div>\r\n <div class=\"message-body\" [style.background-color]=\"color\" [style.border-color]=\"color\">\r\n <span [innerHTML]=\"message\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
815
+ styles: [":host{display:block;margin-top:2px;margin-bottom:2px}.right-message{text-align:end}.message-header{display:flex;-webkit-text-emphasis:none;text-emphasis:none;font-style:italic;font-size:.7em;align-items:center;margin-bottom:.5em}.message-header .image{height:30px;border-radius:50%;border:2px solid red}.message-header .username{font-weight:700}.right-message>.message-header{flex-direction:row-reverse;margin-right:1px}.right-message>.message-header .image,.right-message>.message-header .username{margin-left:5px}.left-message>.message-header{margin-left:1px}.left-message>.message-header .image,.left-message>.message-header .username{margin-right:5px}.message-body-container{display:flex}.right-message>.message-body-container{flex-direction:row-reverse}.message-body{display:inline-block;position:relative;border-radius:.4em;padding:3px;font-style:normal;font-size:1em;text-align:start;min-width:2em;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.left-message .message-body:after{content:\"\";position:absolute;left:.8em;top:-.4em;border-bottom:.4em solid #000;border-bottom-color:inherit;border-left:.4em solid transparent;border-right:.4em solid transparent}.right-message .message-body:after{content:\"\";position:absolute;right:.8em;top:-.4em;border-bottom:.4em solid #000;border-bottom-color:inherit;border-left:.4em solid transparent;border-right:.4em solid transparent}"]
816
+ })
817
+ ], ChatMessageComponent);
818
+ return ChatMessageComponent;
819
+ }());
820
+
821
+ var DispositionComponent = /** @class */ (function () {
822
+ function DispositionComponent() {
823
+ this.dispositionEmitter = new core.EventEmitter();
824
+ this.selectedDispositionValue = '';
825
+ this.dispositionName = '';
826
+ }
827
+ DispositionComponent.prototype.ngOnInit = function () {
828
+ var e_1, _a;
829
+ try {
830
+ for (var _b = __values(this.disposition.dispositionMetadata), _c = _b.next(); !_c.done; _c = _b.next()) {
831
+ var metadata = _c.value;
832
+ if (metadata.key === 'callId') {
833
+ this.dispositionName = "disposition_" + metadata.value;
834
+ break;
835
+ }
836
+ }
837
+ }
838
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
839
+ finally {
840
+ try {
841
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
842
+ }
843
+ finally { if (e_1) throw e_1.error; }
844
+ }
845
+ if (this.disposition.checkedDisposition) {
846
+ this.selectedDispositionValue = this.disposition.checkedDisposition;
847
+ }
848
+ };
849
+ DispositionComponent.prototype.submitDisposition = function () {
850
+ var selectedDisposition = {
851
+ dispositionId: this.selectedDispositionValue,
852
+ dispositionName: this.disposition.disposition.get(this.selectedDispositionValue),
853
+ dispositionMetadata: this.disposition.dispositionMetadata
854
+ };
855
+ this.dispositionEmitter.emit(selectedDisposition);
856
+ };
857
+ DispositionComponent.prototype.selectAndSubmitDisposition = function (event, dispositionKey) {
858
+ if (event.code === 'Enter') {
859
+ this.selectedDispositionValue = dispositionKey;
860
+ this.submitDisposition();
861
+ }
862
+ };
863
+ __decorate([
864
+ core.Input()
865
+ ], DispositionComponent.prototype, "disposition", void 0);
866
+ __decorate([
867
+ core.Output()
868
+ ], DispositionComponent.prototype, "dispositionEmitter", void 0);
869
+ DispositionComponent = __decorate([
870
+ core.Component({
871
+ selector: 'amc-disposition',
872
+ template: "<div class=\"disposition-container\">\r\n <div class=\"header-container\">\r\n <label class=\"disposition-header\" attr.aria-label=\"set disposition\">{{disposition.dispositionHeader}}</label>\r\n </div>\r\n\r\n <div class=\"dispositions-container\">\r\n <div class=\"disposition\" *ngFor=\"let disp of disposition.disposition | keyvalue; let i = index\">\r\n <label\r\n class=\"disposition-label\"\r\n tabindex=\"0\"\r\n [id]=\"disp.key\"\r\n [ngClass]=\"{'disposition-label-selected' : selectedDispositionValue === disp.key, 'first-disposition': i === 0}\"\r\n (keypress)=\"selectAndSubmitDisposition($event, disp.key)\">\r\n\r\n <input\r\n class=\"disposition-input\"\r\n type=\"radio\"\r\n value=\"{{disp.key}}\"\r\n tabindex=\"-1\"\r\n attr.aria-label=\"{{disp.value}}\"\r\n [required]=\"!selectedDispositionValue\"\r\n [name]=\"dispositionName\"\r\n (change)=\"submitDisposition()\"\r\n [(ngModel)]=\"selectedDispositionValue\">\r\n\r\n {{disp.value}}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n",
873
+ styles: [".disposition-container{border:1px solid #939598;white-space:nowrap;font-family:Arial;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;text-overflow:ellipsis;position:relative;font-size:.9em;max-height:180px;overflow-x:hidden;overflow-y:hidden}.header-container{border-bottom:1px solid #939598;background-color:#f4f5fb;width:100%;white-space:nowrap;height:28px;position:-webkit-sticky;position:sticky;overflow-x:hidden;overflow-y:hidden}.disposition-header{margin-top:auto;margin-left:7px;padding:5px;white-space:nowrap;text-overflow:ellipsis;font-weight:700;font-size:.9em;font-family:Arial;overflow-x:hidden}.disposition{margin-left:5px;padding-left:5px;white-space:nowrap}.disposition-label{text-overflow:ellipsis;font-weight:400;white-space:nowrap;font-size:.9em;overflow-x:hidden}.disposition-label-selected{text-overflow:ellipsis;font-weight:700;white-space:nowrap;font-size:.9em}.dispositions-container{padding:3px;overflow-y:scroll;max-height:150px}.disposition-label:focus{outline:#3296da solid 2px;outline-offset:5px}.first-disposition{margin-top:5px}"]
874
+ })
875
+ ], DispositionComponent);
876
+ return DispositionComponent;
877
+ }());
878
+
879
+ var ActivityComponent = /** @class */ (function () {
880
+ function ActivityComponent() {
881
+ this.ActivitySave = new core.EventEmitter();
882
+ this.OnNameSelectChange = new core.EventEmitter();
883
+ this.OnRelatedToChange = new core.EventEmitter();
884
+ this.OnSubjectChange = new core.EventEmitter();
885
+ this.OnCallNotesChange = new core.EventEmitter();
886
+ this.isActivityMaximized = true;
887
+ }
888
+ ActivityComponent.prototype.ngOnInit = function () {
889
+ };
890
+ ActivityComponent.prototype.onNameSelectChange = function (event) {
891
+ this.activity.WhoObject = this.getWho(event.currentTarget.value);
892
+ this.OnNameSelectChange.emit(this.activity);
893
+ };
894
+ ActivityComponent.prototype.parseWhoObject = function (whoObject) {
895
+ return whoObject.objectType + ': ' + whoObject.objectName;
896
+ };
897
+ ActivityComponent.prototype.parseWhatObject = function (whatObject) {
898
+ return whatObject.objectType + ': ' + whatObject.objectName;
899
+ };
900
+ ActivityComponent.prototype.onRelatedToChange = function (event) {
901
+ this.activity.WhatObject = this.getWhat(event.currentTarget.value);
902
+ this.OnRelatedToChange.emit(this.activity);
903
+ };
904
+ ActivityComponent.prototype.onSubjectChange = function (event) {
905
+ this.activity.Subject = event.srcElement.value;
906
+ this.OnSubjectChange.emit(this.activity);
907
+ };
908
+ ActivityComponent.prototype.onCallNotesChange = function (event) {
909
+ this.activity.Subject = event.srcElement.value.trim();
910
+ this.OnCallNotesChange.emit(this.activity);
911
+ };
912
+ ActivityComponent.prototype.getWho = function (id) {
913
+ for (var i = 0; i < this.activity.whoList.length; i++) {
914
+ if (this.activity.whoList[i].objectId === id) {
915
+ return this.activity.whoList[i];
916
+ }
917
+ }
918
+ };
919
+ ActivityComponent.prototype.getWhat = function (id) {
920
+ for (var i = 0; i < this.activity.whatList.length; i++) {
921
+ if (this.activity.whatList[i].objectId === id) {
922
+ return this.activity.whatList[i];
923
+ }
924
+ }
925
+ };
926
+ ActivityComponent.prototype.loadQuickComment = function (value) {
927
+ this.activity.Description = this.activity.Description + this.activity.quickCommentList[value];
928
+ };
929
+ ActivityComponent.prototype.activitySave = function (clearActivityFields) {
930
+ this.ActivitySave.emit(this.activity);
931
+ };
932
+ __decorate([
933
+ core.Input()
934
+ ], ActivityComponent.prototype, "activity", void 0);
935
+ __decorate([
936
+ core.Output()
937
+ ], ActivityComponent.prototype, "ActivitySave", void 0);
938
+ __decorate([
939
+ core.Output()
940
+ ], ActivityComponent.prototype, "OnNameSelectChange", void 0);
941
+ __decorate([
942
+ core.Output()
943
+ ], ActivityComponent.prototype, "OnRelatedToChange", void 0);
944
+ __decorate([
945
+ core.Output()
946
+ ], ActivityComponent.prototype, "OnSubjectChange", void 0);
947
+ __decorate([
948
+ core.Output()
949
+ ], ActivityComponent.prototype, "OnCallNotesChange", void 0);
950
+ ActivityComponent = __decorate([
951
+ core.Component({
952
+ selector: 'app-activity',
953
+ template: "<div *ngIf=\"isActivityMaximized\" class=\"callDisplay\">\r\n <div class=\"editor callHeader\">\r\n <label class=\"headerLabel\">\r\n <b>Activity Information</b>\r\n </label>\r\n <img class=\"ViewResizeImage\" src=\"/assets/images/section_collapse.png\" (click)=\"isActivityMaximized = false\" title=\"Collapse\">\r\n </div>\r\n <div class=\"callBody\">\r\n <div class=\"activityFields\">\r\n <form>\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Call From\">{{activity.NameFieldName}}</label>\r\n <select class=\"dropDownListStyle displayData\" data-resetperactivity=\"false\" (change)=\"onNameSelectChange($event)\">\r\n <option *ngFor=\"let who of activity.whoList\" value=\"{{who.objectId}}\">{{parseWhoObject(who)}}</option>\r\n </select>\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Related To\">{{activity.RelatedToFieldName}}</label>\r\n <select class=\"dropDownListStyle displayData\" (change)=\"onRelatedToChange($event)\" data-resetperactivity=\"false\">\r\n <option *ngFor=\"let what of activity.whatList\" value=\"{{what.objectId}}\">{{parseWhatObject(what)}}</option>\r\n </select>\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Subject\">{{activity.SubjectFieldName}}</label>\r\n <input class=\"activitySubjectTextBoxStyle displayData\" (change)=\"onSubjectChange($event)\" title=\"{{activity.Subject}}\"\r\n type=\"text\" value=\"{{activity.Subject}}\">\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <div class=\"callNotesContainer\">\r\n <div class=\"textAreaDiv\">\r\n <textarea value=\"{{activity.Description}}\" placeholder=\"Click to add a comment\" class=\"activityCommentsTextBoxStyle\"\r\n (change)=\"onCallNotesChange($event)\" cols=\"20\" rows=\"2\" title=\"\"></textarea>\r\n </div>\r\n <div class=\"notesButtonBorder\">\r\n <div class=\"commentsButtonDiv\">\r\n <div class=\"quickCommentsDiv\">\r\n <input *ngFor=\"let quickComment of activity.quickCommentList ; let i = index;\" class=\"quickNotesBotton\" type=\"button\"\r\n value=\"{{i+1}}\" (click)=\"loadQuickComment(i)\" title=\"{{quickComment}}\">\r\n </div>\r\n <div class=\"submitDiv\">\r\n <input class=\"submitButton\" type=\"button\" value=\"Submit\" (click)=\"activitySave(false)\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n</div>\r\n<div *ngIf=\"!isActivityMaximized\" class=\"callDisplay\">\r\n <div class=\"editor callHeader\">\r\n <label class=\"headerLabel\">\r\n <b>Activity Information</b>\r\n </label>\r\n <img class=\"ViewResizeImage\" src=\"assets/images/section_expand.png\" (click)=\"isActivityMaximized = true\" title=\"Expand\">\r\n </div>\r\n",
954
+ styles: [".callDisplay{display:grid;margin-bottom:8px;background-color:#fff}.editor{font-size:.9em;width:70%;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.callHeader{background-color:#f4f5fb!important;width:100%!important;margin-top:0!important}.headerLabel{margin-left:10px}.ViewResizeImage{width:20px;height:20px;float:right;cursor:pointer}.callBody{border-top:0;position:relative}.displayDiv{width:100%;display:flex}.displayLabels{margin-left:5px;width:25%;margin-right:2px}.displayData{width:70%}.dropDownListStyle{border:1px solid #939598!important;border-radius:3px!important;width:71%!important;height:20px!important;text-align:left!important;white-space:nowrap!important;text-overflow:ellipsis!important;margin:0 5px 0 0;cursor:pointer}.activitySubjectTextBoxStyle{border:1px solid #939598!important;border-radius:3px!important;width:71%!important;height:20px!important;text-align:left!important;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin:0 5px 0 0;padding-left:2px}.activityCommentsTextBoxStyle{border:none;color:#333!important;text-align:left!important;margin:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;resize:none;width:100%;height:95px}.notesButtonBorder{background-color:#fff;border-left:1px solid #939598;border-bottom:1px solid #939598;border-right:1px solid #939598;border-bottom-left-radius:3px!important;border-bottom-right-radius:3px!important;height:auto}.commentsButtonDiv{width:100%;display:flex;align-items:center}.quickNotesBotton{background-color:#1e72ba;border:0;color:#fff;height:70%;width:20px;margin:2px;outline:0;font-size:70%}.quickCommentsDiv{text-align:left;flex:1 0 0;flex-wrap:wrap;display:flex;margin:2px}.submitDiv{text-align:right;padding-right:4px}.submitButton{border:0;float:right;margin-top:2px;outline:0;cursor:pointer;background-color:#6cb047;color:#fff;border-radius:4px;font-size:98%;margin-bottom:2px}"]
955
+ })
956
+ ], ActivityComponent);
957
+ return ActivityComponent;
958
+ }());
959
+
960
+ var LoginComponent = /** @class */ (function () {
961
+ function LoginComponent() {
962
+ this.loginDetailsProvided = new core.EventEmitter();
963
+ }
964
+ LoginComponent.prototype.ngOnInit = function () {
965
+ var e_1, _a;
966
+ if (!this.loginData.header) {
967
+ this.loginData.header = 'Login';
968
+ }
969
+ try {
970
+ for (var _b = __values(this.loginData.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
971
+ var field = _c.value;
972
+ if (!field.isInvalid) {
973
+ field.isInvalid = false;
974
+ }
975
+ }
976
+ }
977
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
978
+ finally {
979
+ try {
980
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
981
+ }
982
+ finally { if (e_1) throw e_1.error; }
983
+ }
984
+ };
985
+ LoginComponent.prototype.onLogin = function (loginForm) {
986
+ var e_2, _a;
987
+ try {
988
+ for (var _b = __values(this.loginData.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
989
+ var field = _c.value;
990
+ field.value = loginForm.value[field.name];
991
+ }
992
+ }
993
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
994
+ finally {
995
+ try {
996
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
997
+ }
998
+ finally { if (e_2) throw e_2.error; }
999
+ }
1000
+ this.loginDetailsProvided.emit(this.loginData);
1001
+ };
1002
+ LoginComponent.prototype.focusOutOfInput = function (loginForm, field) {
1003
+ if (!loginForm.controls[field.name].valid) {
1004
+ field.isInvalid = true;
1005
+ }
1006
+ // console.log(loginForm);
1007
+ // console.log(field);
1008
+ };
1009
+ __decorate([
1010
+ core.Input()
1011
+ ], LoginComponent.prototype, "loginData", void 0);
1012
+ __decorate([
1013
+ core.Output()
1014
+ ], LoginComponent.prototype, "loginDetailsProvided", void 0);
1015
+ LoginComponent = __decorate([
1016
+ core.Component({
1017
+ selector: 'amc-login',
1018
+ template: "<div class=\"login-container\">\n <form (ngSubmit)=\"onLogin(loginForm)\"class=\"login-form\" id=\"login-form\" #loginForm=\"ngForm\">\n <div class=\"header-container\">\n <label class=\"login-header\" attr.aria-label=\"login\">{{ loginData.header }}</label>\n </div>\n <div class=\"fields-container\">\n <div *ngFor=\"let field of loginData.fields\" class=\"field\">\n <label class=\"field-label\">\n {{ field.name }}:\n </label>\n\n <input\n ngModel\n class=\"field-input\"\n attr.aria-label=\"{{ field.name }}\"\n [name]=\"field.name\"\n [type]=\"field.type\"\n [value]=\"field.value\"\n [placeholder]=\"field.placeholder || ''\"\n [required]=\"field.isRequired || false\"\n (focusout)=\"focusOutOfInput(loginForm, field)\"/>\n\n <p class=\"invalid-input\" *ngIf=\"field.isInvalid\">{{ field.invalidMessage }}</p>\n </div>\n\n <button\n type=\"submit\"\n class=\"form-submit\"\n form=\"login-form\"\n tabindex=\"0\"\n attr.aria-label=\"send\"\n [disabled]=\"!loginForm.valid\">Login</button>\n </div>\n\n </form>\n</div>\n",
1019
+ styles: [".login-container{border:1px solid #939598;white-space:nowrap;font-family:Arial;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;text-overflow:ellipsis;position:relative;font-size:.9em;max-height:200px;overflow-x:hidden;overflow-y:hidden}.header-container{border-bottom:1px solid #939598;background-color:#f4f5fb;width:100%;height:28px;position:-webkit-sticky;position:sticky}.login-header{margin-top:auto;margin-left:7px;padding:5px;font-weight:700;font-size:.9em}.fields-container{overflow-y:auto;max-height:160px;font-size:.9em;padding:5px}.field{display:table-row;margin:5px}.field-label{padding:10px;display:table-cell}.field-input{display:table-cell;border:1px solid #939598;border-radius:5px}.field-input:focus{box-shadow:0 0 5px #38badf}.form-submit{margin:15px 10px 10px;display:table-row;border:1px solid #00a4b0;border-radius:5px;background-color:#00a4b0;color:#f7f7f7;width:10em;height:2em;transition:.2s;font-size:1.1em;position:relative;top:50%;left:50%;transform:translate(-50%,-50%)}.form-submit:hover{background-color:#01858f}.form-submit:disabled{background-color:silver;border-color:silver;color:#fff}input.ng-invalid.ng-touched[required]{border-color:#a94442}.form-submit:focus{outline:#3296da solid 2px;outline-offset:5px}.invalid-input{margin:0;padding:0;color:#a94442;font-size:x-small}"]
1020
+ })
1021
+ ], LoginComponent);
1022
+ return LoginComponent;
1023
+ }());
1024
+
1025
+ var UILibraryModule = /** @class */ (function () {
1026
+ function UILibraryModule(injector) {
1027
+ this.injector = injector;
1028
+ }
1029
+ UILibraryModule.prototype.ngDoBootstrap = function (app) {
1030
+ if (!customElements.get('amc-webcomponents-scenario')) {
1031
+ var strategyFactory = new elementsZoneStrategy.ElementZoneStrategyFactory(ScenarioComponent, this.injector);
1032
+ customElements.define('amc-webcomponents-scenario', elements.createCustomElement(ScenarioComponent, {
1033
+ injector: this.injector,
1034
+ strategyFactory: strategyFactory
1035
+ }));
1036
+ }
1037
+ if (!customElements.get('amc-webcomponents-disposition')) {
1038
+ var strategyFactory = new elementsZoneStrategy.ElementZoneStrategyFactory(DispositionComponent, this.injector);
1039
+ customElements.define('amc-webcomponents-disposition', elements.createCustomElement(DispositionComponent, {
1040
+ injector: this.injector,
1041
+ strategyFactory: strategyFactory
1042
+ }));
1043
+ }
1044
+ if (!customElements.get('amc-webcomponents-login')) {
1045
+ var strategyFactory = new elementsZoneStrategy.ElementZoneStrategyFactory(LoginComponent, this.injector);
1046
+ customElements.define('amc-webcomponents-disposition', elements.createCustomElement(LoginComponent, {
1047
+ injector: this.injector,
1048
+ strategyFactory: strategyFactory
1049
+ }));
1050
+ }
1051
+ };
1052
+ UILibraryModule.ctorParameters = function () { return [
1053
+ { type: core.Injector }
1054
+ ]; };
1055
+ UILibraryModule = __decorate([
1056
+ core.NgModule({
1057
+ imports: [platformBrowser.BrowserModule, common.CommonModule, forms.FormsModule],
1058
+ declarations: [
1059
+ InteractionComponent,
1060
+ ScenarioComponent,
1061
+ OperationComponent,
1062
+ PropertyComponent,
1063
+ HoldtimerComponent,
1064
+ DurationComponent,
1065
+ ChatBoxComponent,
1066
+ ChatMessageComponent,
1067
+ DispositionComponent,
1068
+ ActivityComponent,
1069
+ LoginComponent
1070
+ ],
1071
+ entryComponents: [ScenarioComponent, DispositionComponent, LoginComponent],
1072
+ bootstrap: [],
1073
+ exports: [ScenarioComponent, DispositionComponent, LoginComponent]
1074
+ })
1075
+ ], UILibraryModule);
1076
+ return UILibraryModule;
1077
+ }());
745
1078
 
746
- exports.UILibraryModule = UILibraryModule;
747
- exports.Property = Property;
748
- exports.ValueType = ValueType;
749
- exports.IChatMessageType = IChatMessageType;
750
- exports.ɵj = ActivityComponent;
751
- exports.ɵg = ChatBoxComponent;
752
- exports.ɵh = ChatMessageComponent;
753
- exports.ɵi = DispositionComponent;
754
- exports.ɵf = DurationComponent;
755
- exports.ɵe = HoldtimerComponent;
756
- exports.ɵa = InteractionComponent;
757
- exports.ɵk = LoginComponent;
758
- exports.ɵc = OperationComponent;
759
- exports.ɵd = PropertyComponent;
760
- exports.ɵb = ScenarioComponent;
1079
+ exports.Property = Property;
1080
+ exports.UILibraryModule = UILibraryModule;
1081
+ exports.ɵa = InteractionComponent;
1082
+ exports.ɵb = ScenarioComponent;
1083
+ exports.ɵc = OperationComponent;
1084
+ exports.ɵd = PropertyComponent;
1085
+ exports.ɵe = HoldtimerComponent;
1086
+ exports.ɵf = DurationComponent;
1087
+ exports.ɵg = ChatBoxComponent;
1088
+ exports.ɵh = ChatMessageComponent;
1089
+ exports.ɵi = DispositionComponent;
1090
+ exports.ɵj = ActivityComponent;
1091
+ exports.ɵk = LoginComponent;
761
1092
 
762
- Object.defineProperty(exports, '__esModule', { value: true });
1093
+ Object.defineProperty(exports, '__esModule', { value: true });
763
1094
 
764
1095
  })));
765
1096
  //# sourceMappingURL=amc-technology-ui-library.umd.js.map