@amc-technology/ui-library 1.0.99 → 1.0.101

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 (127) hide show
  1. package/esm2022/amc-technology-ui-library.mjs +5 -0
  2. package/esm2022/projects/UILibrary/src/app/Helpers.mjs +11 -0
  3. package/esm2022/projects/UILibrary/src/app/components/activity/activity.component.mjs +79 -0
  4. package/esm2022/projects/UILibrary/src/app/components/chat-box/chat-box.component.mjs +137 -0
  5. package/esm2022/projects/UILibrary/src/app/components/chat-message/chat-message.component.mjs +40 -0
  6. package/esm2022/projects/UILibrary/src/app/components/create/create.component.mjs +34 -0
  7. package/esm2022/projects/UILibrary/src/app/components/current-activity/current-activity.component.mjs +170 -0
  8. package/esm2022/projects/UILibrary/src/app/components/disposition/disposition.component.mjs +47 -0
  9. package/esm2022/projects/UILibrary/src/app/components/duration/duration.component.mjs +58 -0
  10. package/esm2022/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.mjs +72 -0
  11. package/esm2022/projects/UILibrary/src/app/components/interaction/interaction.component.mjs +98 -0
  12. package/esm2022/projects/UILibrary/src/app/components/login/login.component.mjs +41 -0
  13. package/esm2022/projects/UILibrary/src/app/components/operation/operation.component.mjs +56 -0
  14. package/esm2022/projects/UILibrary/src/app/components/property/property.component.mjs +106 -0
  15. package/esm2022/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.mjs +144 -0
  16. package/esm2022/projects/UILibrary/src/app/components/scenario/scenario.component.mjs +38 -0
  17. package/esm2022/projects/UILibrary/src/app/components/search-information/search-information.component.mjs +160 -0
  18. package/esm2022/projects/UILibrary/src/app/models/IActivity.mjs +2 -0
  19. package/esm2022/projects/UILibrary/src/app/models/IActivityDetails.mjs +2 -0
  20. package/esm2022/projects/UILibrary/src/app/models/IHoldActivityDetails.mjs +2 -0
  21. package/esm2022/projects/UILibrary/src/app/models/IInteractionActivityDetails.mjs +2 -0
  22. package/esm2022/projects/UILibrary/src/app/models/chat.message.mjs +7 -0
  23. package/esm2022/projects/UILibrary/src/app/models/chat.settings.mjs +2 -0
  24. package/esm2022/projects/UILibrary/src/app/models/disposition.interface.mjs +2 -0
  25. package/esm2022/projects/UILibrary/src/app/models/login.interface.mjs +2 -0
  26. package/esm2022/projects/UILibrary/src/app/models/uilibrary.model.mjs +61 -0
  27. package/esm2022/projects/UILibrary/src/app/uilibrary.module.mjs +106 -0
  28. package/esm2022/public_api.mjs +10 -0
  29. package/fesm2022/amc-technology-ui-library.mjs +1393 -0
  30. package/fesm2022/amc-technology-ui-library.mjs.map +1 -0
  31. package/index.d.ts +5 -0
  32. package/package.json +26 -21
  33. package/projects/UILibrary/src/app/Helpers.d.ts +1 -1
  34. package/projects/UILibrary/src/app/components/activity/activity.component.d.ts +26 -23
  35. package/projects/UILibrary/src/app/components/chat-box/chat-box.component.d.ts +38 -35
  36. package/projects/UILibrary/src/app/components/chat-message/chat-message.component.d.ts +16 -13
  37. package/projects/UILibrary/src/app/components/create/create.component.d.ts +14 -11
  38. package/projects/UILibrary/src/app/components/current-activity/current-activity.component.d.ts +37 -34
  39. package/projects/UILibrary/src/app/components/disposition/disposition.component.d.ts +15 -12
  40. package/projects/UILibrary/src/app/components/duration/duration.component.d.ts +19 -16
  41. package/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.d.ts +24 -21
  42. package/projects/UILibrary/src/app/components/interaction/interaction.component.d.ts +44 -41
  43. package/projects/UILibrary/src/app/components/login/login.component.d.ts +14 -11
  44. package/projects/UILibrary/src/app/components/operation/operation.component.d.ts +25 -22
  45. package/projects/UILibrary/src/app/components/property/property.component.d.ts +44 -41
  46. package/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.d.ts +38 -35
  47. package/projects/UILibrary/src/app/components/scenario/scenario.component.d.ts +16 -13
  48. package/projects/UILibrary/src/app/components/search-information/search-information.component.d.ts +29 -26
  49. package/projects/UILibrary/src/app/models/IActivity.d.ts +36 -36
  50. package/projects/UILibrary/src/app/models/IActivityDetails.d.ts +7 -7
  51. package/projects/UILibrary/src/app/models/IHoldActivityDetails.d.ts +10 -10
  52. package/projects/UILibrary/src/app/models/IInteractionActivityDetails.d.ts +9 -9
  53. package/projects/UILibrary/src/app/models/chat.message.d.ts +15 -15
  54. package/projects/UILibrary/src/app/models/chat.settings.d.ts +6 -6
  55. package/projects/UILibrary/src/app/models/disposition.interface.d.ts +12 -12
  56. package/projects/UILibrary/src/app/models/login.interface.d.ts +13 -13
  57. package/projects/UILibrary/src/app/models/uilibrary.model.d.ts +281 -281
  58. package/projects/UILibrary/src/app/uilibrary.module.d.ts +30 -7
  59. package/public_api.d.ts +9 -1
  60. package/webcomponents/webcomponents.js +3 -3
  61. package/amc-technology-ui-library.d.ts +0 -19
  62. package/amc-technology-ui-library.metadata.json +0 -1
  63. package/bundles/amc-technology-ui-library.umd.js +0 -1653
  64. package/bundles/amc-technology-ui-library.umd.js.map +0 -1
  65. package/bundles/amc-technology-ui-library.umd.min.js +0 -16
  66. package/bundles/amc-technology-ui-library.umd.min.js.map +0 -1
  67. package/esm2015/amc-technology-ui-library.js +0 -20
  68. package/esm2015/projects/UILibrary/src/app/Helpers.js +0 -11
  69. package/esm2015/projects/UILibrary/src/app/components/activity/activity.component.js +0 -83
  70. package/esm2015/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +0 -139
  71. package/esm2015/projects/UILibrary/src/app/components/chat-message/chat-message.component.js +0 -44
  72. package/esm2015/projects/UILibrary/src/app/components/create/create.component.js +0 -35
  73. package/esm2015/projects/UILibrary/src/app/components/current-activity/current-activity.component.js +0 -169
  74. package/esm2015/projects/UILibrary/src/app/components/disposition/disposition.component.js +0 -49
  75. package/esm2015/projects/UILibrary/src/app/components/duration/duration.component.js +0 -58
  76. package/esm2015/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.js +0 -72
  77. package/esm2015/projects/UILibrary/src/app/components/interaction/interaction.component.js +0 -93
  78. package/esm2015/projects/UILibrary/src/app/components/login/login.component.js +0 -43
  79. package/esm2015/projects/UILibrary/src/app/components/operation/operation.component.js +0 -57
  80. package/esm2015/projects/UILibrary/src/app/components/property/property.component.js +0 -99
  81. package/esm2015/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.js +0 -142
  82. package/esm2015/projects/UILibrary/src/app/components/scenario/scenario.component.js +0 -43
  83. package/esm2015/projects/UILibrary/src/app/components/search-information/search-information.component.js +0 -155
  84. package/esm2015/projects/UILibrary/src/app/models/IActivity.js +0 -1
  85. package/esm2015/projects/UILibrary/src/app/models/IActivityDetails.js +0 -1
  86. package/esm2015/projects/UILibrary/src/app/models/IHoldActivityDetails.js +0 -1
  87. package/esm2015/projects/UILibrary/src/app/models/IInteractionActivityDetails.js +0 -1
  88. package/esm2015/projects/UILibrary/src/app/models/chat.message.js +0 -7
  89. package/esm2015/projects/UILibrary/src/app/models/chat.settings.js +0 -1
  90. package/esm2015/projects/UILibrary/src/app/models/disposition.interface.js +0 -1
  91. package/esm2015/projects/UILibrary/src/app/models/login.interface.js +0 -1
  92. package/esm2015/projects/UILibrary/src/app/models/uilibrary.model.js +0 -40
  93. package/esm2015/projects/UILibrary/src/app/uilibrary.module.js +0 -83
  94. package/esm2015/public_api.js +0 -2
  95. package/esm5/amc-technology-ui-library.js +0 -20
  96. package/esm5/projects/UILibrary/src/app/Helpers.js +0 -11
  97. package/esm5/projects/UILibrary/src/app/components/activity/activity.component.js +0 -84
  98. package/esm5/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +0 -140
  99. package/esm5/projects/UILibrary/src/app/components/chat-message/chat-message.component.js +0 -45
  100. package/esm5/projects/UILibrary/src/app/components/create/create.component.js +0 -36
  101. package/esm5/projects/UILibrary/src/app/components/current-activity/current-activity.component.js +0 -174
  102. package/esm5/projects/UILibrary/src/app/components/disposition/disposition.component.js +0 -61
  103. package/esm5/projects/UILibrary/src/app/components/duration/duration.component.js +0 -60
  104. package/esm5/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.js +0 -74
  105. package/esm5/projects/UILibrary/src/app/components/interaction/interaction.component.js +0 -98
  106. package/esm5/projects/UILibrary/src/app/components/login/login.component.js +0 -66
  107. package/esm5/projects/UILibrary/src/app/components/operation/operation.component.js +0 -58
  108. package/esm5/projects/UILibrary/src/app/components/property/property.component.js +0 -101
  109. package/esm5/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.js +0 -144
  110. package/esm5/projects/UILibrary/src/app/components/scenario/scenario.component.js +0 -44
  111. package/esm5/projects/UILibrary/src/app/components/search-information/search-information.component.js +0 -156
  112. package/esm5/projects/UILibrary/src/app/models/IActivity.js +0 -1
  113. package/esm5/projects/UILibrary/src/app/models/IActivityDetails.js +0 -1
  114. package/esm5/projects/UILibrary/src/app/models/IHoldActivityDetails.js +0 -1
  115. package/esm5/projects/UILibrary/src/app/models/IInteractionActivityDetails.js +0 -1
  116. package/esm5/projects/UILibrary/src/app/models/chat.message.js +0 -7
  117. package/esm5/projects/UILibrary/src/app/models/chat.settings.js +0 -1
  118. package/esm5/projects/UILibrary/src/app/models/disposition.interface.js +0 -1
  119. package/esm5/projects/UILibrary/src/app/models/login.interface.js +0 -1
  120. package/esm5/projects/UILibrary/src/app/models/uilibrary.model.js +0 -43
  121. package/esm5/projects/UILibrary/src/app/uilibrary.module.js +0 -84
  122. package/esm5/public_api.js +0 -2
  123. package/fesm2015/amc-technology-ui-library.js +0 -1360
  124. package/fesm2015/amc-technology-ui-library.js.map +0 -1
  125. package/fesm5/amc-technology-ui-library.js +0 -1423
  126. package/fesm5/amc-technology-ui-library.js.map +0 -1
  127. package/src/typings.d.ts +0 -5
@@ -1,1423 +0,0 @@
1
- import { __decorate, __values, __awaiter, __generator } from 'tslib';
2
- import { EventEmitter, Input, Output, Component, Renderer2, ViewChild, Injector, NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { FormsModule } from '@angular/forms';
5
- import { createCustomElement } from '@angular/elements';
6
- import { BrowserModule } from '@angular/platform-browser';
7
- import { ElementZoneStrategyFactory } from 'elements-zone-strategy';
8
- import { debounceTime } from 'rxjs/operators';
9
- import { Subject } from 'rxjs';
10
- import { MatTabsModule } from '@angular/material/tabs';
11
-
12
- /**
13
- * @ignore
14
- */
15
- var InteractionComponent = /** @class */ (function () {
16
- /**
17
- * @ignore
18
- */
19
- function InteractionComponent() {
20
- this.minimizedChanged = new EventEmitter();
21
- this.isAgentTyping = new EventEmitter();
22
- this.newMessage = new EventEmitter();
23
- this._minimized = false;
24
- }
25
- Object.defineProperty(InteractionComponent.prototype, "_minimized", {
26
- get: function () {
27
- return this.minimized;
28
- },
29
- set: function (value) {
30
- this.minimized = value;
31
- this.minimizedChanged.emit(value);
32
- },
33
- enumerable: true,
34
- configurable: true
35
- });
36
- /**
37
- * @ignore
38
- */
39
- InteractionComponent.prototype.ngOnInit = function () {
40
- };
41
- /**
42
- * @ignore
43
- */
44
- InteractionComponent.prototype.minimize = function () {
45
- this._minimized = true;
46
- };
47
- /**
48
- * @ignore
49
- */
50
- InteractionComponent.prototype.maximize = function () {
51
- this._minimized = false;
52
- };
53
- /**
54
- * @ignore
55
- */
56
- InteractionComponent.prototype.isConferenceCall = function () {
57
- if (this.interaction.parties && this.interaction.parties.length > 1) {
58
- return true;
59
- }
60
- return false;
61
- };
62
- InteractionComponent.prototype.collapseKeypress = function (event) {
63
- if (event.code === 'Enter') {
64
- this.minimize();
65
- }
66
- };
67
- InteractionComponent.prototype.expandKeypress = function (event) {
68
- if (event.code === 'Enter') {
69
- this.maximize();
70
- }
71
- };
72
- InteractionComponent.prototype.clickEvent = function (id) {
73
- document.getElementById(id).className = 'success';
74
- if (localStorage.getItem('focusedPanel') === null) {
75
- localStorage.setItem('focusedPanel', id);
76
- }
77
- else if (localStorage.getItem('focusedPanel') != id) {
78
- document.getElementById(localStorage.getItem('focusedPanel')).className = 'AnswerCallFocused';
79
- localStorage.setItem('focusedPanel', id);
80
- }
81
- };
82
- __decorate([
83
- Input()
84
- ], InteractionComponent.prototype, "interaction", void 0);
85
- __decorate([
86
- Input()
87
- ], InteractionComponent.prototype, "newMsgs", void 0);
88
- __decorate([
89
- Output()
90
- ], InteractionComponent.prototype, "minimizedChanged", void 0);
91
- __decorate([
92
- Output()
93
- ], InteractionComponent.prototype, "isAgentTyping", void 0);
94
- __decorate([
95
- Output()
96
- ], InteractionComponent.prototype, "newMessage", void 0);
97
- InteractionComponent = __decorate([
98
- Component({
99
- selector: 'amc-interaction',
100
- template: "<div class=\"AnswerCallFocused\" [id]=\"interaction.interactionId\">\r\n <div class=\"editor callHeaderTop\" (click)=\"clickEvent(interaction.interactionId)\">\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 <amc-operation *ngIf=\"interaction.chat\" id=\"close-chat\" [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\r\n <app-chat-box *ngIf=\"interaction.chat\" [isTyping]=\"interaction.chat.isCustomerTyping\" [settings]=\"interaction.chat.settings\"\r\n [messages]=\"interaction.chat.messages\" [newMsgs]=\"newMsgs\" (isAgentTyping)=\"isAgentTyping.emit($event)\" (newMessage)=\"newMessage.emit($event)\"></app-chat-box>\r\n\r\n <div [id]='interaction.interactionId'> </div>\r\n <amc-operation *ngIf=\"!interaction.chat\" [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",
101
- styles: [":host{display:block}.phoneNumberContainer{margin-left:5px!important;padding-left:0;display:flex;align-items:center}.cadSection{margin-bottom:5px}#close-chat{-moz-text-align-last:end;text-align-last:end}.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}#call123{border:4px!important}.success{border:2px solid #00adbb!important}", "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:0 5px 2px}.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}"]
102
- })
103
- ], InteractionComponent);
104
- return InteractionComponent;
105
- }());
106
-
107
- var ScenarioComponent = /** @class */ (function () {
108
- function ScenarioComponent() {
109
- this.minimizedChanged = new EventEmitter();
110
- this.isAgentTyping = new EventEmitter();
111
- this.newMessage = new EventEmitter();
112
- this.afterViewChecked = new EventEmitter();
113
- }
114
- ScenarioComponent.prototype.ngAfterViewChecked = function () {
115
- this.afterViewChecked.emit();
116
- };
117
- ScenarioComponent.prototype.onMinimizedChanged = function () {
118
- this.minimizedChanged.emit();
119
- };
120
- __decorate([
121
- Input()
122
- ], ScenarioComponent.prototype, "scenario", void 0);
123
- __decorate([
124
- Input()
125
- ], ScenarioComponent.prototype, "newMsgs", void 0);
126
- __decorate([
127
- Output()
128
- ], ScenarioComponent.prototype, "minimizedChanged", void 0);
129
- __decorate([
130
- Output()
131
- ], ScenarioComponent.prototype, "isAgentTyping", void 0);
132
- __decorate([
133
- Output()
134
- ], ScenarioComponent.prototype, "newMessage", void 0);
135
- __decorate([
136
- Output()
137
- ], ScenarioComponent.prototype, "afterViewChecked", void 0);
138
- ScenarioComponent = __decorate([
139
- Component({
140
- selector: 'amc-scenario',
141
- template: "<ng-container *ngIf=\"scenario && scenario.interactions\">\r\n <amc-interaction *ngFor=\"let interaction of scenario.interactions\" [interaction]=\"interaction\" [newMsgs]=\"newMsgs\"\r\n (minimizedChanged)=\"onMinimizedChanged()\" (isAgentTyping)=\"isAgentTyping.emit($event)\"\r\n (newMessage)=\"newMessage.emit($event)\">\r\n </amc-interaction>\r\n</ng-container>\r\n",
142
- 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:0 5px 2px}.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}"]
143
- })
144
- ], ScenarioComponent);
145
- return ScenarioComponent;
146
- }());
147
-
148
- /**
149
- * @ignore
150
- */
151
- var OperationComponent = /** @class */ (function () {
152
- /**
153
- * @ignore
154
- */
155
- function OperationComponent() {
156
- this.labelledByText = '';
157
- this.describedByText = '';
158
- }
159
- /**
160
- * @ignore
161
- */
162
- OperationComponent.prototype.ngOnInit = function () {
163
- if (this.statusText && this.callType) {
164
- this.describedByText = this.statusText + " " + this.callType;
165
- }
166
- else if (this.statusText) {
167
- this.describedByText = this.statusText;
168
- }
169
- else if (this.callType) {
170
- this.describedByText = this.callType;
171
- }
172
- if (this.callId) {
173
- this.labelledByText = this.callId;
174
- }
175
- };
176
- OperationComponent.prototype.operationKeypress = function (event, operation) {
177
- if (event.code === 'Enter') {
178
- operation.handler(operation.operationName, operation.operationMetadata);
179
- }
180
- };
181
- __decorate([
182
- Input()
183
- ], OperationComponent.prototype, "statusText", void 0);
184
- __decorate([
185
- Input()
186
- ], OperationComponent.prototype, "callId", void 0);
187
- __decorate([
188
- Input()
189
- ], OperationComponent.prototype, "callType", void 0);
190
- __decorate([
191
- Input()
192
- ], OperationComponent.prototype, "operations", void 0);
193
- OperationComponent = __decorate([
194
- Component({
195
- selector: 'amc-operation',
196
- 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",
197
- 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:0 5px 2px}.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}"]
198
- })
199
- ], OperationComponent);
200
- return OperationComponent;
201
- }());
202
-
203
- var IChatMessageType;
204
- (function (IChatMessageType) {
205
- IChatMessageType["AGENT"] = "AGENT";
206
- IChatMessageType["OTHER_PERSON"] = "OTHER_PERSON";
207
- IChatMessageType["INFORMATION"] = "INFORMATION";
208
- })(IChatMessageType || (IChatMessageType = {}));
209
-
210
- /**
211
- * A helper method to make instances of [IProperty]
212
- */
213
- var Property = /** @class */ (function () {
214
- /**
215
- *
216
- * @param key
217
- * @param value : if value type is COUNTER then value should be start time in MilliSeconds.
218
- * @param visible
219
- * @param valueType
220
- * @param customOperation
221
- */
222
- function Property(key, value, visible, valueType, customOperation) {
223
- var _this = this;
224
- /**
225
- * Operation responsible for generating displayKey and dispkayValur from key and value.
226
- */
227
- this.displayOperation = function () {
228
- _this.displayKey = _this.key;
229
- _this.displayValue = _this.value;
230
- };
231
- this.key = key;
232
- this.value = value;
233
- visible != null ? (this.visible = visible) : (this.visible = true);
234
- valueType != null
235
- ? (this.displayValueType = valueType)
236
- : (this.displayValueType = ValueType.STRING);
237
- this.customOperations = customOperation;
238
- this.displayOperation();
239
- }
240
- return Property;
241
- }());
242
- /**
243
- * enum for Value types of PROPERTY.
244
- */
245
- var ValueType;
246
- (function (ValueType) {
247
- ValueType[ValueType["STRING"] = 0] = "STRING";
248
- ValueType[ValueType["COUNTER"] = 1] = "COUNTER";
249
- })(ValueType || (ValueType = {}));
250
-
251
- function secondsToHms(seconds_in) {
252
- seconds_in = Number(seconds_in);
253
- var h = Math.floor(seconds_in / 3600);
254
- var m = Math.floor(seconds_in % 3600 / 60);
255
- var s = Math.floor(seconds_in % 3600 % 60);
256
- var hDisplay = h > 0 ? h.toString() + ':' : '';
257
- var mDisplay = m > 0 ? ('0' + m.toString()).slice(-2) + ':' : '00:';
258
- var sDisplay = s > 0 ? ('0' + s.toString()).slice(-2) : '00';
259
- return hDisplay + mDisplay + sDisplay;
260
- }
261
-
262
- /**
263
- * @ignore
264
- */
265
- var PropertyComponent = /** @class */ (function () {
266
- /**
267
- * @ignore
268
- */
269
- function PropertyComponent() {
270
- this.labelledByText = '';
271
- this.title = '';
272
- this._timerId = null;
273
- this.processedDisplayValue = '';
274
- }
275
- /**
276
- * @ignore
277
- */
278
- PropertyComponent.prototype.ngOnInit = function () {
279
- if (this.statusText && this.callType) {
280
- this.labelledByText = this.statusText + " " + this.callType;
281
- }
282
- else if (this.statusText) {
283
- this.labelledByText = this.statusText;
284
- }
285
- else if (this.callType) {
286
- this.labelledByText = this.callType;
287
- }
288
- if (this.callType && this.callId) {
289
- this.title = this.callType + " " + this.callId;
290
- }
291
- else if (this.callType) {
292
- this.title = this.callType;
293
- }
294
- else if (this.callId) {
295
- this.title = this.callId;
296
- }
297
- this.initValues();
298
- };
299
- /**
300
- * @ignore
301
- */
302
- PropertyComponent.prototype.initValues = function () {
303
- if (this.property.displayValueType === ValueType.COUNTER) {
304
- this.startCallCounter();
305
- }
306
- else {
307
- this.processedDisplayValue = this.property.displayValue;
308
- }
309
- };
310
- /**
311
- * @ignore
312
- */
313
- PropertyComponent.prototype.startCallCounter = function () {
314
- var _this = this;
315
- if (this._timerId == null) {
316
- this._timerId = window.setInterval(function () {
317
- var callStartTime = _this.property.displayValue;
318
- var currentTime = new Date().getTime() / 1000;
319
- var secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
320
- _this.processedDisplayValue = secondsToHms(secondsPassed);
321
- }, 1000);
322
- }
323
- };
324
- /**
325
- * @ignore
326
- */
327
- PropertyComponent.prototype.ngOnDestroy = function () {
328
- if (this.property.displayValueType === ValueType.COUNTER) {
329
- // clear the timer.
330
- if (this._timerId != null) {
331
- clearInterval(this._timerId);
332
- this._timerId = null;
333
- }
334
- }
335
- };
336
- __decorate([
337
- Input()
338
- ], PropertyComponent.prototype, "statusText", void 0);
339
- __decorate([
340
- Input()
341
- ], PropertyComponent.prototype, "callId", void 0);
342
- __decorate([
343
- Input()
344
- ], PropertyComponent.prototype, "callType", void 0);
345
- __decorate([
346
- Input()
347
- ], PropertyComponent.prototype, "property", void 0);
348
- PropertyComponent = __decorate([
349
- Component({
350
- selector: 'amc-property',
351
- 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",
352
- 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:0 5px 2px}.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}"]
353
- })
354
- ], PropertyComponent);
355
- return PropertyComponent;
356
- }());
357
-
358
- var HoldtimerComponent = /** @class */ (function () {
359
- function HoldtimerComponent() {
360
- this.labelledByText = '';
361
- this.displayTime = '00:00/00:00';
362
- }
363
- HoldtimerComponent.prototype.ngOnInit = function () {
364
- if (this.statusText && this.callId) {
365
- this.labelledByText = this.statusText + " " + this.callId;
366
- }
367
- else if (this.statusText) {
368
- this.labelledByText = this.statusText;
369
- }
370
- else if (this.callId) {
371
- this.labelledByText = this.callId;
372
- }
373
- this.startCallCounter();
374
- };
375
- /**
376
- * @ignore
377
- */
378
- HoldtimerComponent.prototype.startCallCounter = function () {
379
- var _this = this;
380
- var pastTimeInSeconds = this.CaculatePastHoldDuration();
381
- if (this._timerId == null) {
382
- this._timerId = window.setInterval(function () {
383
- var currentTime = new Date().getTime() / 1000;
384
- var secondsPassedCurrentCall = Math.floor((currentTime) - (_this.holdCounterData.currentHoldStartTime / 1000));
385
- _this.displayTime = secondsToHms(secondsPassedCurrentCall) +
386
- '/' + secondsToHms(pastTimeInSeconds + secondsPassedCurrentCall);
387
- }, 1000);
388
- }
389
- };
390
- HoldtimerComponent.prototype.CaculatePastHoldDuration = function () {
391
- var pastTimeInSeconds = 0;
392
- if (this.holdCounterData.pastCallDurations) {
393
- this.holdCounterData.pastCallDurations.forEach(function (holdTimerIterator) {
394
- pastTimeInSeconds += (holdTimerIterator.endTime - holdTimerIterator.startTime) / 1000;
395
- });
396
- }
397
- return pastTimeInSeconds;
398
- };
399
- /**
400
- * @ignore
401
- */
402
- HoldtimerComponent.prototype.ngOnDestroy = function () {
403
- // clear the timer.
404
- if (this._timerId != null) {
405
- clearInterval(this._timerId);
406
- this._timerId = null;
407
- }
408
- };
409
- __decorate([
410
- Input()
411
- ], HoldtimerComponent.prototype, "holdCounterData", void 0);
412
- __decorate([
413
- Input()
414
- ], HoldtimerComponent.prototype, "statusText", void 0);
415
- __decorate([
416
- Input()
417
- ], HoldtimerComponent.prototype, "callId", void 0);
418
- HoldtimerComponent = __decorate([
419
- Component({
420
- selector: 'amc-holdtimer',
421
- 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",
422
- 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:0 5px 2px}.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}"]
423
- })
424
- ], HoldtimerComponent);
425
- return HoldtimerComponent;
426
- }());
427
-
428
- var DurationComponent = /** @class */ (function () {
429
- function DurationComponent() {
430
- this.labelledByText = '';
431
- this.displayTime = '00:00/00:00';
432
- }
433
- DurationComponent.prototype.ngOnInit = function () {
434
- if (this.statusText && this.callId) {
435
- this.labelledByText = this.statusText + " " + this.callId;
436
- }
437
- else if (this.statusText) {
438
- this.labelledByText = this.statusText;
439
- }
440
- else if (this.callId) {
441
- this.labelledByText = this.callId;
442
- }
443
- this.startCallCounter();
444
- };
445
- /**
446
- * @ignore
447
- */
448
- DurationComponent.prototype.startCallCounter = function () {
449
- var _this = this;
450
- if (this._timerId == null) {
451
- this._timerId = window.setInterval(function () {
452
- var callStartTime = _this.startTime;
453
- var currentTime = new Date().getTime() / 1000;
454
- var secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
455
- _this.displayTime = Math.floor(secondsPassed / 60) + ':' + ('0' + (secondsPassed % 60)).slice(-2);
456
- }, 1000);
457
- }
458
- };
459
- DurationComponent.prototype.ngOnDestroy = function () {
460
- // clear the timer.
461
- if (this._timerId != null) {
462
- clearInterval(this._timerId);
463
- this._timerId = null;
464
- }
465
- };
466
- __decorate([
467
- Input()
468
- ], DurationComponent.prototype, "statusText", void 0);
469
- __decorate([
470
- Input()
471
- ], DurationComponent.prototype, "callId", void 0);
472
- __decorate([
473
- Input()
474
- ], DurationComponent.prototype, "startTime", void 0);
475
- DurationComponent = __decorate([
476
- Component({
477
- selector: 'amc-duration',
478
- 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",
479
- 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:0 5px 2px}.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}"]
480
- })
481
- ], DurationComponent);
482
- return DurationComponent;
483
- }());
484
-
485
- var ChatBoxComponent = /** @class */ (function () {
486
- function ChatBoxComponent(renderer) {
487
- this.renderer = renderer;
488
- this.isTyping = false;
489
- this.lastCount = -1;
490
- this._isAgentTyping = false;
491
- this.isAgentTyping = new EventEmitter();
492
- this.newMessage = new EventEmitter();
493
- this.newMessageText = '';
494
- this.usernameToColor = {};
495
- this.colors = [
496
- '#c2c4c4',
497
- '#ffab91',
498
- '#f48fb1',
499
- '#29b6f6',
500
- '#e1bee7',
501
- '#9ccc65',
502
- '#ffc107',
503
- '#26c6da',
504
- '#cddc39',
505
- ];
506
- this.colorsIndex = 0;
507
- this.agentColor = '#2db0e0';
508
- }
509
- ChatBoxComponent.prototype.ngOnInit = function () {
510
- this.renderer.selectRootElement('#autofocus').focus();
511
- };
512
- ChatBoxComponent.prototype.ngAfterViewInit = function () {
513
- this.renderer.selectRootElement('#autofocus').focus();
514
- };
515
- ChatBoxComponent.prototype.updatedMessage = function () {
516
- try {
517
- if (typeof this.newMsgs !== 'undefined' && this.newMsgs.length > 0) {
518
- return this.newMsgs;
519
- }
520
- else {
521
- return this.messages;
522
- }
523
- }
524
- catch (e) { }
525
- finally {
526
- this.scrollToBottom();
527
- }
528
- };
529
- ChatBoxComponent.prototype.ngAfterViewChecked = function () {
530
- if (this.lastCount !== this.messages.length) {
531
- this.lastCount = this.messages.length;
532
- this.scrollToBottom();
533
- }
534
- };
535
- ChatBoxComponent.prototype.getColor = function (message) {
536
- if (message.type && message.type === IChatMessageType.AGENT) {
537
- return this.agentColor;
538
- }
539
- else if (message.username) {
540
- if (!this.usernameToColor[message.username]) {
541
- this.usernameToColor[message.username] = this.colors[this.colorsIndex];
542
- this.colorsIndex = (this.colorsIndex + 1) % this.colors.length;
543
- }
544
- return this.usernameToColor[message.username];
545
- }
546
- else {
547
- return this.colors[0];
548
- }
549
- };
550
- ChatBoxComponent.prototype.shouldAlignRight = function (message) {
551
- return message.type && message.type === IChatMessageType.AGENT;
552
- };
553
- ChatBoxComponent.prototype.sendNewMessage = function (event) {
554
- event.preventDefault();
555
- if (this.newMessageText) {
556
- this.newMessage.emit(this.newMessageText);
557
- this.newMessageText = '';
558
- }
559
- this.renderer.selectRootElement('#autofocus').focus();
560
- };
561
- ChatBoxComponent.prototype.setOnFocus = function (event) {
562
- this.renderer.selectRootElement('#autofocus').focus();
563
- };
564
- ChatBoxComponent.prototype.onNewMessageFocus = function (event) {
565
- var isTyping = event && this.newMessageText.length > 0;
566
- if (isTyping !== this._isAgentTyping) {
567
- this._isAgentTyping = isTyping;
568
- this.isAgentTyping.emit(isTyping);
569
- }
570
- };
571
- ChatBoxComponent.prototype.onKeyup = function () {
572
- var isTyping = this.newMessageText.length > 0;
573
- if (isTyping !== this._isAgentTyping) {
574
- this._isAgentTyping = isTyping;
575
- this.isAgentTyping.emit(isTyping);
576
- }
577
- };
578
- ChatBoxComponent.prototype.scrollToBottom = function () {
579
- try {
580
- this.messagesContainer.nativeElement.scrollTop = this.messagesContainer.nativeElement.scrollHeight;
581
- }
582
- catch (e) { }
583
- };
584
- ChatBoxComponent.ctorParameters = function () { return [
585
- { type: Renderer2 }
586
- ]; };
587
- __decorate([
588
- Input()
589
- ], ChatBoxComponent.prototype, "settings", void 0);
590
- __decorate([
591
- Input()
592
- ], ChatBoxComponent.prototype, "isTyping", void 0);
593
- __decorate([
594
- Input()
595
- ], ChatBoxComponent.prototype, "messages", void 0);
596
- __decorate([
597
- Input()
598
- ], ChatBoxComponent.prototype, "newMsgs", void 0);
599
- __decorate([
600
- Output()
601
- ], ChatBoxComponent.prototype, "isAgentTyping", void 0);
602
- __decorate([
603
- Output()
604
- ], ChatBoxComponent.prototype, "newMessage", void 0);
605
- __decorate([
606
- ViewChild('MessagesContainer', { static: true })
607
- ], ChatBoxComponent.prototype, "messagesContainer", void 0);
608
- __decorate([
609
- ViewChild('autofocus', { static: false })
610
- ], ChatBoxComponent.prototype, "autofocus", void 0);
611
- ChatBoxComponent = __decorate([
612
- Component({
613
- selector: 'app-chat-box',
614
- template: "<div class=\"chat-box\">\r\n <div #MessagesContainer id=\"msgScroll\" class=\"messages\" [style.max-height]='settings.maxHeight'>\r\n <ng-container *ngFor=\"let message of updatedMessage()\">\r\n <app-chat-message class=\"chat-line\" [alignRight]=\"shouldAlignRight(message)\" [message]=\"message.text\" [username]=\"message.username\" (focusOn)=\"setOnFocus($event)\"\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\r\n\r\n<div class=\"message-box\">\r\n <textarea id=\"autofocus\" tabindex=\"1\" #NewMessageText [(ngModel)]=\"newMessageText\" type=\"text\" class=\"message-input scroll\" placeholder=\"Type a message...\"\r\n (focus)=\"onNewMessageFocus(true)\" (keydown.enter)=\"sendNewMessage($event)\" (keyup)='onKeyup()' [disabled]=\"settings.disableSendMessage\" ></textarea>\r\n <button type=\"submit\" class=\"message-submit\" (click)=\"sendNewMessage($event)\" [disabled]=\"settings.disableSendMessage\">Send</button>\r\n</div>\r\n</div>\r\n",
615
- styles: [".message-box{flex:1 1 0;width:99%;background:#fff;margin:auto;position:relative;border-radius:5px;height:100%;border:1px solid #ccc}.message-box .message-input{background:0 0;border:none;outline:0!important;resize:none;font-family:inherit;font-size:.8rem;height:100%;margin:0;padding:10px 7px;width:89%;color:#444}.message-box textarea:focus:-webkit-placeholder{color:transparent}.message-box .message-submit{position:absolute;z-index:1;top:26px;right:5px;background:#1e72ba;border:none;color:#fff;font-size:10px;line-height:1;padding:6px 10px;border-radius:5px;outline:0!important;transition:background .2s;cursor:pointer}.scroll::-webkit-scrollbar{display:none}.chat-box{background-color:#f4f5fb;padding:5px}.messages{padding:5px;overflow:auto;min-height:50px}.chat-line{margin-bottom:15px}.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:#f4f5fb;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:.8em;font-style:italic}.typing-indicator span{display:inline-block;height:4px;width:4px;border-radius:50%;background-color:#9e9e9e;margin:0 1px;opacity:.2}.typing-indicator span:nth-of-type(1){animation:1.5s .33333s infinite blink}.typing-indicator span:nth-of-type(2){animation:1.5s .66666s infinite blink}.typing-indicator span:nth-of-type(3){animation:1.5s .99999s infinite blink}@keyframes blink{50%{opacity:1}}"]
616
- })
617
- ], ChatBoxComponent);
618
- return ChatBoxComponent;
619
- }());
620
-
621
- var ChatMessageComponent = /** @class */ (function () {
622
- function ChatMessageComponent() {
623
- this.alignRight = false;
624
- this.focusOn = new EventEmitter();
625
- }
626
- ChatMessageComponent.prototype.ngOnInit = function () {
627
- this.focusOn.emit(true);
628
- };
629
- __decorate([
630
- Input()
631
- ], ChatMessageComponent.prototype, "message", void 0);
632
- __decorate([
633
- Input()
634
- ], ChatMessageComponent.prototype, "alignRight", void 0);
635
- __decorate([
636
- Input()
637
- ], ChatMessageComponent.prototype, "username", void 0);
638
- __decorate([
639
- Input()
640
- ], ChatMessageComponent.prototype, "color", void 0);
641
- __decorate([
642
- Input()
643
- ], ChatMessageComponent.prototype, "timestamp", void 0);
644
- __decorate([
645
- Input()
646
- ], ChatMessageComponent.prototype, "image", void 0);
647
- __decorate([
648
- Input()
649
- ], ChatMessageComponent.prototype, "fallbackImage", void 0);
650
- __decorate([
651
- Output()
652
- ], ChatMessageComponent.prototype, "focusOn", void 0);
653
- ChatMessageComponent = __decorate([
654
- Component({
655
- selector: 'app-chat-message',
656
- 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 </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 <span *ngIf=\"timestamp\" class=\"timestamp\">{{timestamp}}</span>\r\n</div>\r\n",
657
- styles: [":host{display:block;margin-top:2px;margin-bottom:2px}.right-message{text-align:end}.timestamp{font-size:10px;margin-right:30px;margin-left:30px}.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:1em;padding:6px;font-style:normal;font-size:.8em;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;border-left:10px solid #000;border-color:inherit;border-right:10px solid transparent;border-bottom:10px solid transparent;left:1px;bottom:-2px}.right-message .message-body:after{content:\"\";position:absolute;border-left:10px solid transparent;border-top:10px solid #000;border-top-color:inherit;border-bottom:0 solid transparent;right:1px;bottom:-2px}"]
658
- })
659
- ], ChatMessageComponent);
660
- return ChatMessageComponent;
661
- }());
662
-
663
- var DispositionComponent = /** @class */ (function () {
664
- function DispositionComponent() {
665
- this.dispositionEmitter = new EventEmitter();
666
- this.selectedDispositionValue = '';
667
- this.dispositionName = '';
668
- }
669
- DispositionComponent.prototype.ngOnInit = function () {
670
- var e_1, _a;
671
- try {
672
- for (var _b = __values(this.disposition.dispositionMetadata), _c = _b.next(); !_c.done; _c = _b.next()) {
673
- var metadata = _c.value;
674
- if (metadata.key === 'callId') {
675
- this.dispositionName = "disposition_" + metadata.value;
676
- break;
677
- }
678
- }
679
- }
680
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
681
- finally {
682
- try {
683
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
684
- }
685
- finally { if (e_1) throw e_1.error; }
686
- }
687
- if (this.disposition.checkedDisposition) {
688
- this.selectedDispositionValue = this.disposition.checkedDisposition;
689
- }
690
- };
691
- DispositionComponent.prototype.submitDisposition = function () {
692
- var selectedDisposition = {
693
- dispositionId: this.selectedDispositionValue,
694
- dispositionName: this.disposition.disposition.get(this.selectedDispositionValue),
695
- dispositionMetadata: this.disposition.dispositionMetadata
696
- };
697
- this.dispositionEmitter.emit(selectedDisposition);
698
- };
699
- DispositionComponent.prototype.selectAndSubmitDisposition = function (event, dispositionKey) {
700
- if (event.code === 'Enter') {
701
- this.selectedDispositionValue = dispositionKey;
702
- this.submitDisposition();
703
- }
704
- };
705
- __decorate([
706
- Input()
707
- ], DispositionComponent.prototype, "disposition", void 0);
708
- __decorate([
709
- Output()
710
- ], DispositionComponent.prototype, "dispositionEmitter", void 0);
711
- DispositionComponent = __decorate([
712
- Component({
713
- selector: 'amc-disposition',
714
- 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",
715
- 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}"]
716
- })
717
- ], DispositionComponent);
718
- return DispositionComponent;
719
- }());
720
-
721
- var ActivityComponent = /** @class */ (function () {
722
- function ActivityComponent() {
723
- this.ActivitySave = new EventEmitter();
724
- this.OnNameSelectChange = new EventEmitter();
725
- this.OnRelatedToChange = new EventEmitter();
726
- this.OnSubjectChange = new EventEmitter();
727
- this.OnCallNotesChange = new EventEmitter();
728
- this.isActivityMaximized = true;
729
- }
730
- ActivityComponent.prototype.ngOnInit = function () {
731
- };
732
- ActivityComponent.prototype.onNameSelectChange = function (event) {
733
- this.activity.WhoObject = this.getWho(event.currentTarget.value);
734
- this.OnNameSelectChange.emit(this.activity);
735
- };
736
- ActivityComponent.prototype.parseWhoObject = function (whoObject) {
737
- return whoObject.objectType + ': ' + whoObject.objectName;
738
- };
739
- ActivityComponent.prototype.parseWhatObject = function (whatObject) {
740
- return whatObject.objectType + ': ' + whatObject.objectName;
741
- };
742
- ActivityComponent.prototype.onRelatedToChange = function (event) {
743
- this.activity.WhatObject = this.getWhat(event.currentTarget.value);
744
- this.OnRelatedToChange.emit(this.activity);
745
- };
746
- ActivityComponent.prototype.onSubjectChange = function (event) {
747
- this.activity.Subject = event.srcElement.value;
748
- this.OnSubjectChange.emit(this.activity);
749
- };
750
- ActivityComponent.prototype.onCallNotesChange = function (event) {
751
- this.activity.Subject = event.srcElement.value.trim();
752
- this.OnCallNotesChange.emit(this.activity);
753
- };
754
- ActivityComponent.prototype.getWho = function (id) {
755
- for (var i = 0; i < this.activity.whoList.length; i++) {
756
- if (this.activity.whoList[i].objectId === id) {
757
- return this.activity.whoList[i];
758
- }
759
- }
760
- };
761
- ActivityComponent.prototype.getWhat = function (id) {
762
- for (var i = 0; i < this.activity.whatList.length; i++) {
763
- if (this.activity.whatList[i].objectId === id) {
764
- return this.activity.whatList[i];
765
- }
766
- }
767
- };
768
- ActivityComponent.prototype.loadQuickComment = function (value) {
769
- this.activity.Description = this.activity.Description + this.activity.quickCommentList[value];
770
- };
771
- ActivityComponent.prototype.activitySave = function (clearActivityFields) {
772
- this.ActivitySave.emit(this.activity);
773
- };
774
- __decorate([
775
- Input()
776
- ], ActivityComponent.prototype, "activity", void 0);
777
- __decorate([
778
- Output()
779
- ], ActivityComponent.prototype, "ActivitySave", void 0);
780
- __decorate([
781
- Output()
782
- ], ActivityComponent.prototype, "OnNameSelectChange", void 0);
783
- __decorate([
784
- Output()
785
- ], ActivityComponent.prototype, "OnRelatedToChange", void 0);
786
- __decorate([
787
- Output()
788
- ], ActivityComponent.prototype, "OnSubjectChange", void 0);
789
- __decorate([
790
- Output()
791
- ], ActivityComponent.prototype, "OnCallNotesChange", void 0);
792
- ActivityComponent = __decorate([
793
- Component({
794
- selector: 'app-activity',
795
- 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",
796
- 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}"]
797
- })
798
- ], ActivityComponent);
799
- return ActivityComponent;
800
- }());
801
-
802
- var LoginComponent = /** @class */ (function () {
803
- function LoginComponent() {
804
- this.loginDetailsProvided = new EventEmitter();
805
- }
806
- LoginComponent.prototype.ngOnInit = function () {
807
- var e_1, _a;
808
- if (!this.loginData.header) {
809
- this.loginData.header = 'Login';
810
- }
811
- try {
812
- for (var _b = __values(this.loginData.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
813
- var field = _c.value;
814
- if (!field.isInvalid) {
815
- field.isInvalid = false;
816
- }
817
- }
818
- }
819
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
820
- finally {
821
- try {
822
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
823
- }
824
- finally { if (e_1) throw e_1.error; }
825
- }
826
- };
827
- LoginComponent.prototype.onLogin = function (loginForm) {
828
- var e_2, _a;
829
- try {
830
- for (var _b = __values(this.loginData.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
831
- var field = _c.value;
832
- field.value = loginForm.value[field.name];
833
- }
834
- }
835
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
836
- finally {
837
- try {
838
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
839
- }
840
- finally { if (e_2) throw e_2.error; }
841
- }
842
- this.loginDetailsProvided.emit(this.loginData);
843
- };
844
- LoginComponent.prototype.focusOutOfInput = function (loginForm, field) {
845
- if (!loginForm.controls[field.name].valid) {
846
- field.isInvalid = true;
847
- }
848
- };
849
- __decorate([
850
- Input()
851
- ], LoginComponent.prototype, "loginData", void 0);
852
- __decorate([
853
- Output()
854
- ], LoginComponent.prototype, "loginDetailsProvided", void 0);
855
- LoginComponent = __decorate([
856
- Component({
857
- selector: 'amc-login',
858
- template: "<div class=\"login-container\">\r\n <form (ngSubmit)=\"onLogin(loginForm)\"class=\"login-form\" id=\"login-form\" #loginForm=\"ngForm\">\r\n <div class=\"header-container\">\r\n <label class=\"login-header\" attr.aria-label=\"login\">{{ loginData.header }}</label>\r\n </div>\r\n <div class=\"fields-container\">\r\n <div *ngFor=\"let field of loginData.fields\" class=\"field\">\r\n <label class=\"field-label\">\r\n {{ field.name }}:\r\n </label>\r\n\r\n <input\r\n ngModel\r\n class=\"field-input\"\r\n attr.aria-label=\"{{ field.name }}\"\r\n [name]=\"field.name\"\r\n [type]=\"field.type\"\r\n [value]=\"field.value\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [required]=\"field.isRequired || false\"\r\n (focusout)=\"focusOutOfInput(loginForm, field)\"/>\r\n\r\n <p class=\"invalid-input\" *ngIf=\"field.isInvalid\">{{ field.invalidMessage }}</p>\r\n </div>\r\n\r\n <button\r\n type=\"submit\"\r\n class=\"form-submit\"\r\n form=\"login-form\"\r\n tabindex=\"0\"\r\n attr.aria-label=\"send\"\r\n [disabled]=\"!loginForm.valid\">Login</button>\r\n </div>\r\n\r\n </form>\r\n</div>\r\n",
859
- 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;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;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}"]
860
- })
861
- ], LoginComponent);
862
- return LoginComponent;
863
- }());
864
-
865
- var CreateComponent = /** @class */ (function () {
866
- function CreateComponent() {
867
- this.CreateNewEntity = new EventEmitter();
868
- this.isCreateMaximized = true;
869
- }
870
- CreateComponent.prototype.createNewEntity = function (type) {
871
- this.CreateNewEntity.emit(type);
872
- };
873
- CreateComponent.prototype.getEntities = function () {
874
- return Object.keys(this.Entities);
875
- };
876
- CreateComponent.prototype.getDisplay = function (entity) {
877
- return entity.substring(0, entity.indexOf('|'));
878
- };
879
- CreateComponent.prototype.getImage = function (entity) {
880
- return entity.substring(entity.indexOf('|') + 1);
881
- };
882
- __decorate([
883
- Output()
884
- ], CreateComponent.prototype, "CreateNewEntity", void 0);
885
- __decorate([
886
- Input()
887
- ], CreateComponent.prototype, "Entities", void 0);
888
- CreateComponent = __decorate([
889
- Component({
890
- selector: 'amc-create',
891
- template: "<div *ngIf=\"isCreateMaximized\" class=\"callDisplay\">\r\n <div class=\"editor callHeader\">\r\n <label class=\"headerLabel\">\r\n <b>Create New</b>\r\n </label>\r\n <img class=\"ViewResizeImage\" src=\"/assets/images/section_collapse.png\" (click)=\"isCreateMaximized = false\"\r\n title=\"Collapse\" />\r\n </div>\r\n <div class=\"callBody\">\r\n <div *ngIf=\"Entities\" class=\"container\">\r\n <div *ngFor=\"let entity of getEntities()\" class=\"createNewLabel\" (click)=\"createNewEntity(entity)\"\r\n title=\"{{ getDisplay(Entities[entity]) }}\">\r\n <img class=\"createEntityImages\" src=\"{{ getImage(Entities[entity]) }}\" />\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<div *ngIf=\"!isCreateMaximized\" class=\"callDisplay\">\r\n <div class=\"editor callHeader\">\r\n <label class=\"headerLabel\">\r\n <b>Create New</b>\r\n </label>\r\n <img class=\"ViewResizeImage\" src=\"/assets/images/section_expand.png\" (click)=\"isCreateMaximized = true\"\r\n title=\"Expand\" />\r\n </div>\r\n</div>\r\n",
892
- styles: [".callHeader{background-color:#f4f5fb!important;width:100%!important;margin-top:0!important;border:1px solid #939598!important}.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}.createEntityImages{width:30px;height:25px;margin-bottom:5px;margin-top:5px;cursor:pointer;padding-left:5px}.createNewLabel{display:inline-block;margin-left:5%;margin-right:5%}.container{padding-right:0;padding-left:0;font-size:10px;text-align:center}.callBody{border:1px solid #939598;border-top:1px solid #939598;position:relative}.callDisplay{display:grid;background-color:#fff;display:grid}.ViewResizeImage{width:20px;height:20px;float:right;cursor:pointer}.headerLabel{margin-left:10px}"]
893
- })
894
- ], CreateComponent);
895
- return CreateComponent;
896
- }());
897
-
898
- var RecentActivityComponent = /** @class */ (function () {
899
- function RecentActivityComponent() {
900
- this.EventEmitter = new EventEmitter();
901
- this.debouncer = new Subject();
902
- this.eventList = new Set();
903
- }
904
- RecentActivityComponent.prototype.ngOnChanges = function () {
905
- };
906
- RecentActivityComponent.prototype.getIcon = function (scenario) {
907
- switch (scenario) {
908
- case 'Telephony':
909
- return '../../assets/images/Phone_Number_Icon.png';
910
- case 'Email':
911
- return '../../assets/images/emailTab.png';
912
- default:
913
- return '../../assets/images/chat.png';
914
- }
915
- };
916
- RecentActivityComponent.prototype.ngOnInit = function () {
917
- var _this = this;
918
- this.debouncer.pipe(debounceTime(500)).subscribe(function () {
919
- var newEvent = {
920
- eventName: Array.from(_this.eventList).join('|'),
921
- idx: _this.idx,
922
- newValue: _this.ActivityDetails
923
- };
924
- _this.EventEmitter.emit(newEvent);
925
- _this.eventList.clear();
926
- });
927
- };
928
- RecentActivityComponent.prototype.ngOnDestroy = function () { };
929
- RecentActivityComponent.prototype.expandAndCollapseRecentActivity = function (isExpand) {
930
- if (isExpand) {
931
- this.EventEmitter.emit({
932
- eventName: 'WorkingEvtivityChanged',
933
- idx: this.idx,
934
- newValue: this.ActivityDetails
935
- });
936
- }
937
- else {
938
- this.EventEmitter.emit({
939
- eventName: 'WorkingEvtivityChanged',
940
- idx: -1,
941
- newValue: this.ActivityDetails
942
- });
943
- }
944
- };
945
- RecentActivityComponent.prototype.openActivity = function () {
946
- this.EventEmitter.emit({
947
- eventName: 'OpenCallActivity',
948
- idx: this.idx,
949
- newValue: this.ActivityDetails
950
- });
951
- };
952
- RecentActivityComponent.prototype.onSubjectChange = function () {
953
- this.eventList.add('ActivitySubjectChanged');
954
- this.debouncer.next();
955
- };
956
- RecentActivityComponent.prototype.onSubjectKeyUp = function () {
957
- this.eventList.add('ActivitySubjectChanged');
958
- this.debouncer.next();
959
- };
960
- RecentActivityComponent.prototype.onWhoObjectChange = function (event) {
961
- this.ActivityDetails.WhoObject = this.WhoObjectList.find(function (obj) { return obj.objectId === event; });
962
- this.EventEmitter.emit({
963
- eventName: 'ActivityWhoObjectChanged',
964
- idx: this.idx,
965
- newValue: this.ActivityDetails
966
- });
967
- };
968
- RecentActivityComponent.prototype.onRelatedToChange = function (event) {
969
- this.ActivityDetails.WhatObject = this.WhatObjectList.find(function (obj) { return obj.objectId === event; });
970
- this.EventEmitter.emit({
971
- eventName: 'ActivityWhatObjectChanged',
972
- idx: this.idx,
973
- newValue: this.ActivityDetails
974
- });
975
- };
976
- RecentActivityComponent.prototype.onCallNotesChange = function () {
977
- this.eventList.add('ActivityCallNoteChanged');
978
- this.debouncer.next();
979
- };
980
- RecentActivityComponent.prototype.onCallNotesKeyUp = function () {
981
- this.eventList.add('ActivityCallNoteChanged');
982
- this.debouncer.next();
983
- };
984
- RecentActivityComponent.prototype.addQuickCommentToDescription = function (comment) {
985
- if (this.ActivityDetails.Description) {
986
- this.ActivityDetails.Description += '\n';
987
- }
988
- this.ActivityDetails.Description += comment;
989
- this.eventList.add('ActivityCallNoteChanged');
990
- this.debouncer.next();
991
- };
992
- RecentActivityComponent.prototype.submitActivity = function () {
993
- this.ActivityDetails.IsProcessing = true;
994
- this.EventEmitter.emit({
995
- eventName: 'SubmitActivity',
996
- idx: this.idx,
997
- newValue: this.ActivityDetails
998
- });
999
- };
1000
- __decorate([
1001
- Input()
1002
- ], RecentActivityComponent.prototype, "ActivityDetails", void 0);
1003
- __decorate([
1004
- Input()
1005
- ], RecentActivityComponent.prototype, "isInConsoleView", void 0);
1006
- __decorate([
1007
- Input()
1008
- ], RecentActivityComponent.prototype, "quickCommentList", void 0);
1009
- __decorate([
1010
- Input()
1011
- ], RecentActivityComponent.prototype, "workingScenarioID", void 0);
1012
- __decorate([
1013
- Input()
1014
- ], RecentActivityComponent.prototype, "idx", void 0);
1015
- __decorate([
1016
- Input()
1017
- ], RecentActivityComponent.prototype, "last", void 0);
1018
- __decorate([
1019
- Input()
1020
- ], RecentActivityComponent.prototype, "WhoObjectList", void 0);
1021
- __decorate([
1022
- Input()
1023
- ], RecentActivityComponent.prototype, "WhatObjectList", void 0);
1024
- __decorate([
1025
- Output()
1026
- ], RecentActivityComponent.prototype, "EventEmitter", void 0);
1027
- RecentActivityComponent = __decorate([
1028
- Component({
1029
- selector: 'amc-recent-activity',
1030
- template: "<div *ngIf=\"ActivityDetails.ScenarioId === workingScenarioID\">\r\n <div (click)=\"expandAndCollapseRecentActivity(false);\" class=\"editor callHeaderRecentActivitySelected\">\r\n <label class=\"headerLabelClickableLook\">\r\n <img src=\"../../assets/images/Phone_Number_Icon.png\" class=\"RecentCallsImg\" />\r\n <b>{{ ActivityDetails.Subject }}</b>\r\n </label>\r\n <img *ngIf=\"ActivityDetails.ActivityId\" class=\"RecentCallsImgForActivity\" src=\"../../assets/images/open_activity.png\"\r\n title=\"Open Activity\" (click)=\"openActivity();$event.stopPropagation();\" />\r\n <label *ngIf=\"ActivityDetails.IsUnSaved && isInConsoleView\" class=\"unsavedText\">unsaved</label>\r\n </div>\r\n <div class=\"callBody\">\r\n <div class=\"gray-out\" *ngIf=\"ActivityDetails.IsRecentWorkItemLoading\">\r\n <div class=\"spinner-container\">\r\n <img class=\"spinner\" src=\"../../assets/images/view_progress.gif\" />\r\n </div>\r\n </div>\r\n <div class=\"activityFields\">\r\n <!-- <form> -->\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Subject\">Subject</label>\r\n <input class=\"activitySubjectTextBoxStyle displayData\" type=\"text\" (change)=\"onSubjectChange();\"\r\n (keyup)=\"onSubjectKeyUp()\" name=\"subject\" [(ngModel)]=\"ActivityDetails.Subject\" />\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Name\">Name</label>\r\n <select class=\"dropDownListStyle displayData\" [ngModel]=\"ActivityDetails.WhoObject.objectId\"\r\n (ngModelChange)=\"onWhoObjectChange($event)\" name=\"whoItem\">\r\n <option *ngFor=\"let whoItem of WhoObjectList\" [ngValue]=\"whoItem.objectId\">\r\n {{(whoItem.displayName && whoItem.objectName) ? (whoItem.displayName + ': ' + whoItem.objectName) : \"\" }}</option>\r\n <!-- <option value=\"UserSelectedForEmptyRecord\"></option> -->\r\n </select>\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Regarding\">Related To</label>\r\n <select class=\"dropDownListStyle displayData\" [ngModel]=\"ActivityDetails.WhatObject.objectId\"\r\n (ngModelChange)=\"onRelatedToChange($event)\" name=\"whatItem\">\r\n <option *ngFor=\"let whatItem of WhatObjectList;\" [ngValue]=\"whatItem.objectId\">\r\n {{ (whatItem.displayName && whatItem.objectName) ? (whatItem.displayName + ': ' + whatItem.objectName) : \"\" }}</option>\r\n <!-- <option value=\"UserSelectedForEmptyRecord\"></option> -->\r\n </select>\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <div class=\"callNotesSection\">\r\n <div class=\"callNotesTextArea\">\r\n <textarea placeholder=\"Click to add a comment\" class=\"activityCommentsTextBoxStyle\"\r\n (change)=\"onCallNotesChange();\" (keyup)=\"onCallNotesKeyUp()\" name=\"description\" rows=\"5\" title=\"\"\r\n [(ngModel)]=\"ActivityDetails.Description\">\r\n </textarea>\r\n </div>\r\n <div class=\"notesBottonBorder\">\r\n <div class=\"commentsButtonDiv\">\r\n <div class=\"quickCommentsDiv\">\r\n <input *ngFor=\"let quickComment of quickCommentList; let i = index;\" class=\"quickNotesBotton\"\r\n type=\"button\" value=\"{{i+1}}\" (click)=\"addQuickCommentToDescription(quickComment)\"\r\n title=\"{{quickComment}}\">\r\n </div>\r\n <div class=\"callNotesButtonsSection\">\r\n <input class=\"submitButton\" type=\"button\" value=\"Save\" (click)=\"submitActivity()\"\r\n [disabled]=\"!ActivityDetails.IsUnSaved\" />\r\n <!-- <input *ngIf=\"recentScenario.IsProcessing\" class=\"submitButton\" type=\"button\" value=\"Save\" (click)=\"submitActivity(idx)\" [disabled]=\"!recentScenario.IsUnSaved\"/> -->\r\n <img *ngIf=\"ActivityDetails.IsProcessing\" class=\"loadingIcon\" src=\"../../assets/images/loading.gif\"\r\n title=\"Updating Activity\" />\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=\"ActivityDetails.ScenarioId !== workingScenarioID \">\r\n <div [class.callHeaderBottomBorder]='last' (click)=\"expandAndCollapseRecentActivity(true)\"\r\n class=\"editor callHeaderRecentActivityUnselected\">\r\n <label class=\"headerLabelClickableLook\">\r\n <img [src]=\"getIcon(ActivityDetails.ChannelType)\" class=\"RecentCallsImg\" />\r\n <b>{{ ActivityDetails.Subject }}</b>\r\n </label>\r\n <img *ngIf=\"ActivityDetails.ActivityId\" class=\"RecentCallsImgForActivity\" src=\"../../assets/images/open_activity.png\"\r\n title=\"Open Activity\" (click)=\"openActivity();$event.stopPropagation();\" />\r\n <label *ngIf=\"ActivityDetails.IsUnSaved && isInConsoleView\" class=\"unsavedText\">unsaved</label>\r\n </div>\r\n</div>\r\n\r\n",
1031
- styles: [".callSection{margin-left:0;font-family:Arial;position:relative;margin-top:5px;background-color:#fff}.notesBottonBorder{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}.quickCommentsDiv{text-align:left;flex:1 0 0;flex-wrap:wrap;display:flex;margin:2px}.unsavedText{float:right;margin-right:5px;color:gray;font-style:italic}.quickNotesBotton{background-color:#1e72ba;border:0;color:#fff;height:70%;width:20px;margin:2px;outline:0;font-size:70%}.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}.commentsButtonDiv{width:100%;display:flex;align-items:center;background-color:#f6f7fb}.gray-out{top:0;left:0;position:absolute;z-index:2000;background:#fff;opacity:.7;width:100%;height:100%}.spinner-container{position:relative;width:-moz-fit-content;width:fit-content;top:50%;left:50%;transform:translate(-50%,-50%)}.spinner{height:80px;width:80px;border:0;position:relative;left:50%;transform:translate(-50%,0)}.callNotesButtonsSection{text-align:right;padding-right:4px}.ViewResizeImage{width:20px;height:20px;float:right;cursor:pointer}.callBody{border:1px solid #939598;border-top:1px solid #fff;position:relative}.callBodyBorderless{position:relative}.callDisplay{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:5px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.dropDownListStyle{border:1px solid #939598!important;border-radius:3px!important;width:70%!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:70%!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{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:100%;border:none}.displayDiv{width:100%;display:flex}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{width:70%}.headerLabel{margin-left:10px}.activityFields{position:relative;z-index:0}.callNotesTextArea{background-color:#fff;border-bottom:1px solid #939598;border-top:1px solid #939598;border-top-left-radius:3px!important;border-top-right-radius:3px!important}.callNotesSection{float:left;height:100%;width:100%;background-color:#f6f7fb}.callHeaderRecentActivitySelected{cursor:pointer;border-left:1px solid #939598!important;border-right:1px solid #939598!important;background-color:#cfecf2!important;width:100%!important;margin-top:0!important}.callHeaderRecentActivityUnselected{cursor:pointer;border-left:1px solid #939598!important;border-right:1px solid #939598!important;background-color:#e6f4f7!important;width:100%!important;margin-top:0!important}.callHeader{border:1px solid #939598!important;background-color:#f4f5fb!important;width:100%!important;margin-top:0!important}.callHeaderBottomBorder{cursor:pointer;border-bottom:1px solid #939598!important;border-left:1px solid #939598!important;border-right:1px solid #939598!important;background-color:#e6f4f7!important;width:100%!important;margin-top:0!important}.RecentCallsImg{height:15px;vertical-align:text-bottom}.RecentCallsImgForActivity{height:15px;vertical-align:super;margin-right:5px}.headerLabelClickableLook{cursor:pointer;display:inline-block;margin-left:10px;max-width:80%;overflow:hidden;text-overflow:ellipsis}.loadingIcon{margin-left:auto;margin-right:5px;height:10px;width:30px;margin-top:5px;padding-bottom:0}input[type=button]:disabled{background-color:#d3d3d3;cursor:auto}"]
1032
- })
1033
- ], RecentActivityComponent);
1034
- return RecentActivityComponent;
1035
- }());
1036
-
1037
- var CurrentActivityComponent = /** @class */ (function () {
1038
- function CurrentActivityComponent() {
1039
- this.isActivityMaximized = true;
1040
- this.EventEmitter = new EventEmitter();
1041
- this.debouncer = new Subject();
1042
- this.eventList = new Set();
1043
- }
1044
- CurrentActivityComponent.prototype.ngOnInit = function () {
1045
- return __awaiter(this, void 0, void 0, function () {
1046
- var _this = this;
1047
- return __generator(this, function (_a) {
1048
- this.debouncer.pipe(debounceTime(500)).subscribe(function () {
1049
- var newEvent = {
1050
- eventName: Array.from(_this.eventList).join('|'),
1051
- newValue: _this.ActivityDetails
1052
- };
1053
- _this.EventEmitter.emit(newEvent);
1054
- _this.eventList.clear();
1055
- });
1056
- return [2 /*return*/];
1057
- });
1058
- });
1059
- };
1060
- CurrentActivityComponent.prototype.submitActivity = function () {
1061
- try {
1062
- this.ActivityDetails.IsProcessing = true;
1063
- this.EventEmitter.emit({
1064
- eventName: 'SubmitActivity',
1065
- newValue: this.ActivityDetails
1066
- });
1067
- }
1068
- catch (error) { }
1069
- };
1070
- CurrentActivityComponent.prototype.triggerDiscardActivity = function () {
1071
- try {
1072
- this.EventEmitter.emit({
1073
- eventName: 'TriggerDiscardActivity',
1074
- newValue: this.ActivityDetails
1075
- });
1076
- }
1077
- catch (error) { }
1078
- };
1079
- CurrentActivityComponent.prototype.onNameChange = function (event) {
1080
- try {
1081
- this.ActivityDetails.WhoObject = this.WhoObjectList.find(function (obj) { return obj.objectId === event; });
1082
- this.EventEmitter.emit({
1083
- eventName: 'ActivityWhoObjectChanged',
1084
- newValue: this.ActivityDetails
1085
- });
1086
- }
1087
- catch (error) { }
1088
- };
1089
- CurrentActivityComponent.prototype.onRelatedToChange = function (event) {
1090
- try {
1091
- this.ActivityDetails.WhatObject = this.WhatObjectList.find(function (obj) { return obj.objectId === event; });
1092
- this.EventEmitter.emit({
1093
- eventName: 'ActivityWhatObjectChanged',
1094
- newValue: this.ActivityDetails
1095
- });
1096
- }
1097
- catch (error) { }
1098
- };
1099
- CurrentActivityComponent.prototype.onSubjectChange = function () {
1100
- try {
1101
- this.eventList.add('ActivitySubjectChanged');
1102
- this.debouncer.next();
1103
- }
1104
- catch (error) { }
1105
- };
1106
- CurrentActivityComponent.prototype.onSubjectKeyUp = function () {
1107
- try {
1108
- this.eventList.add('ActivitySubjectChanged');
1109
- this.debouncer.next();
1110
- }
1111
- catch (error) { }
1112
- };
1113
- CurrentActivityComponent.prototype.onCallNotesChange = function () {
1114
- try {
1115
- this.eventList.add('ActivityCallNoteChanged');
1116
- this.debouncer.next();
1117
- }
1118
- catch (error) { }
1119
- };
1120
- CurrentActivityComponent.prototype.onCallNotesKeyUp = function () {
1121
- try {
1122
- this.eventList.add('ActivityCallNoteChanged');
1123
- this.debouncer.next();
1124
- }
1125
- catch (error) { }
1126
- };
1127
- CurrentActivityComponent.prototype.addQuickCommentToDescription = function (comment) {
1128
- try {
1129
- var descriptionToSet = comment;
1130
- if (this.quickCommentOptionRequiredCadArray[comment]) {
1131
- var cadFields = {};
1132
- if (this.ActivityDetails) {
1133
- cadFields = this.scenarioToCADMap[this.ActivityDetails.ScenarioId];
1134
- }
1135
- for (var i = 0; i < this.quickCommentOptionRequiredCadArray[comment].length; i++) {
1136
- var keyToCheckIfCADExists = this.quickCommentOptionRequiredCadArray[comment][i];
1137
- var stringToBeReplaced = this.quickCommentOptionRequiredCadArray[comment][i];
1138
- keyToCheckIfCADExists = keyToCheckIfCADExists.replace('{{', '');
1139
- keyToCheckIfCADExists = keyToCheckIfCADExists.replace('}}', '');
1140
- if (cadFields[keyToCheckIfCADExists]) {
1141
- descriptionToSet = descriptionToSet.replace(stringToBeReplaced, cadFields[keyToCheckIfCADExists].Value);
1142
- }
1143
- }
1144
- }
1145
- if (this.ActivityDetails.Description) {
1146
- this.ActivityDetails.Description += '\n';
1147
- }
1148
- this.ActivityDetails.Description += descriptionToSet;
1149
- this.eventList.add('ActivityCallNoteChanged');
1150
- this.debouncer.next();
1151
- }
1152
- catch (error) { }
1153
- };
1154
- CurrentActivityComponent.prototype.parseWhoObject = function (whoObject) {
1155
- try {
1156
- return whoObject.displayName + ': ' + whoObject.objectName;
1157
- }
1158
- catch (error) { }
1159
- };
1160
- CurrentActivityComponent.prototype.parseWhatObject = function (whatObject) {
1161
- try {
1162
- return whatObject.displayName + ': ' + whatObject.objectName;
1163
- }
1164
- catch (error) { }
1165
- };
1166
- __decorate([
1167
- Input()
1168
- ], CurrentActivityComponent.prototype, "ActivityDetails", void 0);
1169
- __decorate([
1170
- Input()
1171
- ], CurrentActivityComponent.prototype, "quickCommentList", void 0);
1172
- __decorate([
1173
- Input()
1174
- ], CurrentActivityComponent.prototype, "isAutoSave", void 0);
1175
- __decorate([
1176
- Input()
1177
- ], CurrentActivityComponent.prototype, "enableDiscard", void 0);
1178
- __decorate([
1179
- Input()
1180
- ], CurrentActivityComponent.prototype, "autoSaveTimer", void 0);
1181
- __decorate([
1182
- Input()
1183
- ], CurrentActivityComponent.prototype, "quickCommentOptionRequiredCadArray", void 0);
1184
- __decorate([
1185
- Input()
1186
- ], CurrentActivityComponent.prototype, "WhoObjectList", void 0);
1187
- __decorate([
1188
- Input()
1189
- ], CurrentActivityComponent.prototype, "WhatObjectList", void 0);
1190
- __decorate([
1191
- Input()
1192
- ], CurrentActivityComponent.prototype, "scenarioToCADMap", void 0);
1193
- __decorate([
1194
- Output()
1195
- ], CurrentActivityComponent.prototype, "EventEmitter", void 0);
1196
- CurrentActivityComponent = __decorate([
1197
- Component({
1198
- selector: 'amc-current-activity',
1199
- 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\"\r\n title=\"Collapse\"><img *ngIf=\"enableDiscard\" class=\"DiscardImage\" src=\"assets/images/Discard.png\"\r\n (click)=\"triggerDiscardActivity()\" title=\"Discard\">\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=\"Name\">Name</label>\r\n <select class=\"dropDownListStyle displayData\" [ngModel]=\"ActivityDetails.WhoObject.objectId\" (ngModelChange)=\"onNameChange($event)\" name=\"whoItem\">\r\n <option *ngFor=\"let whoItem of WhoObjectList\" [ngValue]=\"whoItem.objectId\">{{ (whoItem.displayName && whoItem.objectName) ? (whoItem.displayName + ': ' +\r\n whoItem.objectName) : \"\"}}</option>\r\n <!-- <option value=\"UserSelectedForEmptyRecord\"></option> -->\r\n </select>\r\n </div>\r\n <div class=\"editor displayDiv\"\r\n *ngIf='(ActivityDetails.WhoObject && ActivityDetails.WhoObject.objectType !== \"Lead\")'>\r\n <label class=\"displayLabels\" title=\"Related To\">Related To</label>\r\n <select class=\"dropDownListStyle displayData\" (ngModelChange)=\"onRelatedToChange($event)\"\r\n [ngModel]=\"ActivityDetails.WhatObject.objectId\" name=\"whatItem\">\r\n <option *ngFor=\"let whatItem of WhatObjectList;\" [ngValue]=\"whatItem.objectId\">\r\n {{ (whatItem.displayName && whatItem.objectName) ? (whatItem.displayName + ': ' + whatItem.objectName) : \"\" }}</option>\r\n <!-- <option value=\"UserSelectedForEmptyRecord\"></option> -->\r\n </select>\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" title=\"Subject\">Subject</label>\r\n <input class=\"activitySubjectTextBoxStyle displayData\" (change)=\"onSubjectChange()\" type=\"text\"\r\n name=\"subject\" (keyup)=\"onSubjectKeyUp()\" [(ngModel)]=\"ActivityDetails.Subject\">\r\n </div>\r\n <div class=\"editor displayDiv\">\r\n <div class=\"callNotesSection\">\r\n <div class=\"callNotesTextArea\">\r\n <textarea [(ngModel)]=\"ActivityDetails.Description\" placeholder=\"Click to add a comment\"\r\n class=\"activityCommentsTextBoxStyle\" (change)=\"onCallNotesChange()\" name=\"description\"\r\n (keyup)=\"onCallNotesKeyUp()\" cols=\"20\" rows=\"2\" title=\"\"></textarea>\r\n </div>\r\n <div class=\"notesBottonBorder\">\r\n <div class=\"commentsButtonDiv\">\r\n <div class=\"quickCommentsDiv\">\r\n <input *ngFor=\"let quickComment of quickCommentList; let i = index;\"\r\n class=\"quickNotesBotton\" type=\"button\" value=\"{{i+1}}\"\r\n (click)=\"addQuickCommentToDescription(quickComment)\" title=\"{{quickComment}}\">\r\n </div>\r\n <div class=\"callNotesButtonsSection\">\r\n <input class=\"submitButton\" type=\"button\" value=\"Save\"\r\n (click)=\"submitActivity()\" [disabled]=\"!ActivityDetails.IsUnSaved\" />\r\n <!-- TOsDO check this Isprocessing -->\r\n <!-- <input *ngIf=\"!storageService.getActivity().IsProcessing\" class=\"submitButton\" type=\"button\" value=\"Save\" (click)=\"submitActivity(storageService.getActivity().ScenarioId)\" [disabled]=\"!isChangesUnSaved(this.scenarioId)\" /> -->\r\n <img *ngIf=\"ActivityDetails.IsProcessing\" class=\"loadingIcon\"\r\n src=\"assets/images/loading.gif\" title=\"Updating Activity\" />\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\"\r\n title=\"Expand\">\r\n </div>\r\n</div>\r\n",
1200
- styles: [".imageExpandCollapse{float:right;width:20px;height:20px}.miscSection{position:relative;margin-top:20px;background-color:#e5e6f2}.callHeader{background-color:#f4f5fb!important;width:100%!important;margin-top:0!important;border:1px solid #939598!important}.notesBottonBorder{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}.quickNotesBotton{background-color:#1e72ba;border:0;color:#fff;height:70%;width:20px;margin:2px;outline:0;font-size:70%}.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}.callBody{border:1px solid #939598;border-top:1px solid #939598;position:relative}.miscIcons{width:20px;height:20px;float:right;margin-top:4px;margin-right:5px;margin-left:5px}.amcIcon{width:50%;height:20px;margin-top:5px;margin-left:10px}.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}.AnswerCallImages{width:28px;height:20px;margin:6px 0 0 5px}.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}.displayDiv{width:100%;display:flex}.displayLabels{margin-left:5px;width:25%;margin-right:2px}.displayData{width:70%}.commentsButtonDiv{width:100%;display:flex;align-items:center;background-color:#f6f7fb}.quickCommentsDiv{text-align:left;flex:1 0 0;flex-wrap:wrap;display:flex;margin:2px}.callNotesButtonsSection{text-align:right;padding-right:4px}.newEntityImages{width:25px;height:25px;margin-top:2px;cursor:pointer;padding-left:5px}body{font-size:.85em;color:#232323;background-color:#fff;font-family:Arial}.callNotesSection{float:left;height:100%;width:100%;margin-right:5px;margin-left:5px;margin-bottom:5px}.ViewResizeImage{width:20px;height:20px;float:right;cursor:pointer}.DiscardImage{padding-top:2px;width:15px;height:18px;float:right;cursor:pointer}.headerLabel{margin-left:10px}.callNotesTextArea{background-color:#fff;border-left:1px solid #939598;border-bottom:1px solid #939598;border-right:1px solid #939598;border-top:1px solid #939598;border-top-left-radius:3px!important;border-top-right-radius:3px!important}.loadingIcon{float:right;margin-right:5px;height:10px;width:30px;margin-top:8px;padding-bottom:0}input[type=button]:disabled{background-color:#d3d3d3;cursor:auto}"]
1201
- })
1202
- ], CurrentActivityComponent);
1203
- return CurrentActivityComponent;
1204
- }());
1205
-
1206
- var SearchInformationComponent = /** @class */ (function () {
1207
- function SearchInformationComponent() {
1208
- this.isSearchInformationMaximized = true;
1209
- this.singleMatchData = null;
1210
- this.multiMatchData = [];
1211
- this.agentSelectedCallerInformation = new EventEmitter();
1212
- }
1213
- SearchInformationComponent.prototype.ngOnChanges = function () {
1214
- this.renderData();
1215
- };
1216
- SearchInformationComponent.prototype.renderData = function () {
1217
- try {
1218
- this.singleMatchData = null;
1219
- this.multiMatchData = [];
1220
- this.shouldShowAllMultiMatchOptions = false;
1221
- if (this.searchRecordList.length === 1) {
1222
- this.singleMatchData = this.parseSearchRecordForNameSingleMatch(this.searchRecordList[0]);
1223
- }
1224
- else if (this.searchRecordList.length > 1) {
1225
- for (var i = 0; i < this.searchRecordList.length; i++) {
1226
- this.multiMatchData.push(this.parseSearchRecordForNameMultiMatch(this.searchRecordList[i]));
1227
- }
1228
- }
1229
- }
1230
- catch (error) { }
1231
- };
1232
- SearchInformationComponent.prototype.onAgentSelectedCallerInformation = function (event) {
1233
- try {
1234
- this.agentSelectedCallerInformation.emit({
1235
- id: event.target.id,
1236
- value: event.target.value
1237
- });
1238
- }
1239
- catch (error) { }
1240
- };
1241
- SearchInformationComponent.prototype.parseSearchRecordForNameSingleMatch = function (searchRecord) {
1242
- var results = [];
1243
- try {
1244
- var src = this.getEntityImgToDisplay(searchRecord);
1245
- this.singleMatchIconSrc = src;
1246
- var sLayoutInfo = this.getSearchLayoutInfoForDisplay(searchRecord);
1247
- for (var j = 0; j < sLayoutInfo.DisplayFields.length; j++) {
1248
- if (sLayoutInfo.DisplayFields && sLayoutInfo.DisplayFields[j].DevName) {
1249
- var nameKey = sLayoutInfo.DisplayFields[j].DevName;
1250
- var keys = Object.keys(searchRecord.fields);
1251
- for (var i = 0; i < keys.length; i++) {
1252
- if (searchRecord.fields[keys[i]] &&
1253
- searchRecord.fields[keys[i]].DevName === nameKey) {
1254
- var displayRecord = searchRecord.fields[keys[i]].Value;
1255
- if (j === 0) {
1256
- displayRecord = searchRecord.displayName
1257
- ? [searchRecord.displayName, displayRecord]
1258
- : [searchRecord.type, displayRecord];
1259
- }
1260
- else {
1261
- displayRecord = sLayoutInfo.DisplayFields[j].DisplayName
1262
- ? [sLayoutInfo.DisplayFields[j].DisplayName, displayRecord]
1263
- : [sLayoutInfo.DisplayFields[j].DevName, displayRecord];
1264
- }
1265
- results.push(displayRecord);
1266
- }
1267
- }
1268
- }
1269
- }
1270
- }
1271
- catch (error) { }
1272
- return results;
1273
- };
1274
- SearchInformationComponent.prototype.parseSearchRecordForNameMultiMatch = function (searchRecord) {
1275
- var results = [];
1276
- try {
1277
- var src = this.getEntityImgToDisplay(searchRecord);
1278
- var sLayoutInfo = this.getSearchLayoutInfoForDisplay(searchRecord);
1279
- for (var j = 0; j < sLayoutInfo.DisplayFields.length; j++) {
1280
- if (sLayoutInfo.DisplayFields && sLayoutInfo.DisplayFields[j].DevName) {
1281
- var nameKey = sLayoutInfo.DisplayFields[j].DevName;
1282
- var keys = Object.keys(searchRecord.fields);
1283
- for (var i = 0; i < keys.length; i++) {
1284
- if (searchRecord.fields[keys[i]] &&
1285
- searchRecord.fields[keys[i]].DevName === nameKey) {
1286
- var displayRecord = searchRecord.fields[keys[i]].Value;
1287
- if (j === 0) {
1288
- displayRecord = searchRecord.displayName
1289
- ? [searchRecord.displayName, displayRecord]
1290
- : [searchRecord.type, displayRecord];
1291
- }
1292
- else {
1293
- displayRecord = sLayoutInfo.DisplayFields[j].DisplayName
1294
- ? [sLayoutInfo.DisplayFields[j].DisplayName, displayRecord]
1295
- : [sLayoutInfo.DisplayFields[j].DevName, displayRecord];
1296
- }
1297
- displayRecord.push(src);
1298
- results.push(displayRecord);
1299
- return results;
1300
- }
1301
- }
1302
- }
1303
- }
1304
- }
1305
- catch (error) { }
1306
- return results;
1307
- };
1308
- SearchInformationComponent.prototype.getEntityImgToDisplay = function (searchRecord) {
1309
- var src = '';
1310
- try {
1311
- if (searchRecord.type) {
1312
- if (searchRecord.type.toUpperCase() === 'CONTACT') {
1313
- src = '../../assets/images/Icon_Contact.png';
1314
- }
1315
- else if (searchRecord.type.toUpperCase() === 'ACCOUNT') {
1316
- src = '../../assets/images/Icon_Account.png';
1317
- }
1318
- else if (searchRecord.type.toUpperCase() === 'LEAD') {
1319
- src = '../../assets/images/Icon_Lead.png';
1320
- }
1321
- else {
1322
- src = '../../assets/images/Miscellaneous_Icon.png';
1323
- }
1324
- }
1325
- }
1326
- catch (error) { }
1327
- return src;
1328
- };
1329
- SearchInformationComponent.prototype.getSearchLayoutInfoForDisplay = function (searchRecord) {
1330
- var layoutInfo;
1331
- try {
1332
- layoutInfo = this.searchLayout.layouts[0][this.ActivityDetails.CallType].find(function (i) { return i.DevName === searchRecord.type; });
1333
- }
1334
- catch (error) { }
1335
- return layoutInfo;
1336
- };
1337
- __decorate([
1338
- Input()
1339
- ], SearchInformationComponent.prototype, "ActivityDetails", void 0);
1340
- __decorate([
1341
- Input()
1342
- ], SearchInformationComponent.prototype, "searchLayout", void 0);
1343
- __decorate([
1344
- Input()
1345
- ], SearchInformationComponent.prototype, "searchRecordList", void 0);
1346
- __decorate([
1347
- Output()
1348
- ], SearchInformationComponent.prototype, "agentSelectedCallerInformation", void 0);
1349
- SearchInformationComponent = __decorate([
1350
- Component({
1351
- selector: 'amc-search-information',
1352
- template: "<div class=\"callDisplay\">\r\n <div class=\"editor callHeader\">\r\n <label class=\"headerLabel\">\r\n <b>Caller Information</b>\r\n </label>\r\n <img\r\n title=\"Multiple Matches Available\"\r\n *ngIf=\"this.searchRecordList.length > 1\"\r\n src=\"../../assets/images/MultiMatchAlert.png\"\r\n class=\"multiMatchImg\"\r\n />\r\n <img\r\n *ngIf=\"isSearchInformationMaximized\"\r\n class=\"ViewResizeImage\"\r\n src=\"assets/images/section_collapse.png\"\r\n (click)=\"isSearchInformationMaximized = false\"\r\n title=\"Collapse\"\r\n />\r\n <img\r\n *ngIf=\"!isSearchInformationMaximized\"\r\n class=\"ViewResizeImage\"\r\n src=\"assets/images/section_expand.png\"\r\n (click)=\"isSearchInformationMaximized = true\"\r\n title=\"Expand\"\r\n />\r\n </div>\r\n <div class=\"callBody\" *ngIf=\"isSearchInformationMaximized\">\r\n <div *ngIf=\"this.searchRecordList.length > 1\">\r\n <span class=\"overflowWrapper\">\r\n <img\r\n class=\"CRMResultImageMultiMatch\"\r\n src=\"{{ this.multiMatchData[0][0][2] }}\"\r\n />\r\n <input\r\n id=\"{{ this.searchRecordList[0].id }}\"\r\n name=\"{{ this.multiMatchData[0][0][1] }}\"\r\n (click)=\"onAgentSelectedCallerInformation($event)\"\r\n readonly\r\n class=\"multiMatchLabel\"\r\n title=\"{{ this.multiMatchData[0][0][1] }}\"\r\n type=\"text\"\r\n value=\"{{ this.multiMatchData[0][0][1] }}\"\r\n />\r\n <span style=\"float: right; margin-right: 4%;\">\r\n <img\r\n *ngIf=\"!this.shouldShowAllMultiMatchOptions\"\r\n class=\"CRMExpandImage\"\r\n src=\"../../assets/images/down-arrow.png\"\r\n (click)=\"shouldShowAllMultiMatchOptions = true\"\r\n />\r\n <img\r\n *ngIf=\"this.shouldShowAllMultiMatchOptions\"\r\n class=\"CRMExpandImage\"\r\n src=\"../../assets/images/up-arrow.png\"\r\n (click)=\"shouldShowAllMultiMatchOptions = false\"\r\n />\r\n </span>\r\n </span>\r\n <div *ngIf=\"this.shouldShowAllMultiMatchOptions\">\r\n <div *ngFor=\"let i of this.multiMatchData | slice: 1; let index = index\">\r\n <span\r\n class=\"overflowWrapper\"\r\n >\r\n <img class=\"CRMResultImageMultiMatch\" src=\"{{ i[0][2] }}\" />\r\n <input\r\n id=\"{{ this.searchRecordList[index + 1].id }}\"\r\n name=\"{{ i[0][1] }}\"\r\n readonly\r\n class=\"multiMatchLabel\"\r\n (click)=\"onAgentSelectedCallerInformation($event)\"\r\n title=\"{{ i[0][1] }}\"\r\n type=\"text\"\r\n value=\"{{ i[0][1] }}\"\r\n />\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Below is the HTML loaded on Single Match -->\r\n <div *ngIf=\"this.searchRecordList.length === 1\">\r\n <div\r\n class=\"editorFull displayDiv\"\r\n *ngFor=\"\r\n let i of this.singleMatchData | slice: 0:1;\r\n let index = index;\r\n let first = first\r\n \"\r\n >\r\n <span class=\"overflowWrapper\">\r\n <img\r\n id=\"EntityIcon\"\r\n src=\"{{ this.singleMatchIconSrc }}\"\r\n class=\"CRMResultImage\"\r\n />\r\n <input\r\n class=\"singleSearchResultSelect singleMatchFirstWrapper \"\r\n id=\"{{ this.searchRecordList[0].id }}\"\r\n [class.firstSingleMatchResult]=\"first\"\r\n value=\"{{ i[1] }}\"\r\n title=\"{{ i[1] }}\"\r\n (click)=\"onAgentSelectedCallerInformation($event)\"\r\n readonly\r\n />\r\n </span>\r\n </div>\r\n <div\r\n class=\"editorFull displayDiv\"\r\n *ngFor=\"\r\n let i of this.singleMatchData | slice: 1;\r\n let index = index;\r\n let first = first\r\n \"\r\n >\r\n <span class=\"overflowWrapper\">\r\n <label title=\"{{ i[0] }}\" class=\"displayLabelsTabbed\">{{\r\n i[0]\r\n }}</label>\r\n <input\r\n class=\"singleSearchResultSelect singleMatchTabbedItemsWrapper singleMatchLabel\"\r\n id=\"{{ this.searchRecordList[0].id }}\"\r\n value=\"{{ i[1] }}\"\r\n title=\"{{ i[1] }}\"\r\n readonly\r\n />\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
1353
- styles: [".callHeader{background-color:#f4f5fb!important;width:100%!important;margin-top:0!important;border:1px solid #939598!important}.displayDiv{width:100%;display:flex}.multiMatchImg{height:18px;margin-left:5px}.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}.editorFull{font-size:.9em;width:100%;text-align:left;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}.CRMResultImage{width:18px;height:18px;margin-right:-5px;margin-top:-5px;margin-left:5px}.CRMResultImageMultiMatch{width:18px;height:18px;margin-right:2px;margin-left:5px;margin-top:-5px}.CRMExpandImage{width:6px;height:6px;cursor:pointer;margin-bottom:2px}.callBody{border:1px solid #939598;border-top:1px solid #939598;position:relative}.callDisplay{margin-bottom:8px;display:grid;background-color:#fff;display:grid}.multipleSearchResultSelect{border:1px solid #939598!important;border-radius:3px!important;width:96%!important;height:20px!important;text-align:left!important;white-space:nowrap!important;text-overflow:ellipsis!important;margin:5px 0 5px 6px;cursor:pointer}.overflowWrapper{width:100%;overflow-x:hidden;overflow-y:hidden}.singleSearchResultSelect{border:0 solid #939598!important;height:20px!important;text-align:left!important;white-space:nowrap!important;text-overflow:ellipsis!important;margin:0;outline:0}.wrapper{width:79%!important}.singleMatchFirstWrapper{cursor:pointer;border:0;outline:0;overflow:hidden;text-overflow:ellipsis;display:inline-block;width:calc(100% - 30px)}.singleMatchTabbedItemsWrapper{width:70%}.displayLabels{margin-left:5px;width:calc(20% + 5px);font-weight:400;margin-bottom:0;margin-top:0;outline:0;overflow:hidden;max-width:100px;vertical-align:middle}.displayLabelsMultiMatch{margin-left:5px;width:calc(20% + 5px);font-weight:400;margin-bottom:0;margin-top:0;outline:0}.displayLabelsTabbed{margin-left:5px;width:35%;font-weight:400;margin-bottom:0;margin-top:0;outline:0;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.matchedRecordsMargin{margin-top:1%}.ViewResizeImage{width:20px;height:20px;float:right;cursor:pointer}.headerLabel{margin-left:10px}.firstSingleMatchResult{font-weight:700;border:0 solid #939598!important;height:20px!important;text-align:left!important;white-space:nowrap!important;text-overflow:ellipsis!important;margin:0 0 0 5px;outline:0}.multiMatchLabel{border:0;cursor:pointer;outline:0;overflow:hidden;text-overflow:ellipsis;display:inline-block;width:calc(95% - 45px)}.singleMatchLabel{border:0;outline:0;overflow:hidden;text-overflow:ellipsis;display:inline-block;width:calc(65% - 13px)}"]
1354
- })
1355
- ], SearchInformationComponent);
1356
- return SearchInformationComponent;
1357
- }());
1358
-
1359
- var UILibraryModule = /** @class */ (function () {
1360
- function UILibraryModule(injector) {
1361
- this.injector = injector;
1362
- }
1363
- UILibraryModule.prototype.ngDoBootstrap = function (app) {
1364
- if (!customElements.get('amc-webcomponents-scenario')) {
1365
- var strategyFactory = new ElementZoneStrategyFactory(ScenarioComponent, this.injector);
1366
- customElements.define('amc-webcomponents-scenario', createCustomElement(ScenarioComponent, {
1367
- injector: this.injector,
1368
- strategyFactory: strategyFactory
1369
- }));
1370
- }
1371
- if (!customElements.get('amc-webcomponents-disposition')) {
1372
- var strategyFactory = new ElementZoneStrategyFactory(DispositionComponent, this.injector);
1373
- customElements.define('amc-webcomponents-disposition', createCustomElement(DispositionComponent, {
1374
- injector: this.injector,
1375
- strategyFactory: strategyFactory
1376
- }));
1377
- }
1378
- if (!customElements.get('amc-webcomponents-login')) {
1379
- var strategyFactory = new ElementZoneStrategyFactory(LoginComponent, this.injector);
1380
- customElements.define('amc-webcomponents-login', createCustomElement(LoginComponent, {
1381
- injector: this.injector,
1382
- strategyFactory: strategyFactory
1383
- }));
1384
- }
1385
- };
1386
- UILibraryModule.ctorParameters = function () { return [
1387
- { type: Injector }
1388
- ]; };
1389
- UILibraryModule = __decorate([
1390
- NgModule({
1391
- imports: [BrowserModule, CommonModule, FormsModule, MatTabsModule],
1392
- declarations: [
1393
- InteractionComponent,
1394
- ScenarioComponent,
1395
- OperationComponent,
1396
- PropertyComponent,
1397
- HoldtimerComponent,
1398
- DurationComponent,
1399
- ChatBoxComponent,
1400
- ChatMessageComponent,
1401
- DispositionComponent,
1402
- ActivityComponent,
1403
- LoginComponent,
1404
- CreateComponent,
1405
- RecentActivityComponent,
1406
- CurrentActivityComponent,
1407
- SearchInformationComponent
1408
- ],
1409
- providers: [],
1410
- entryComponents: [ScenarioComponent, DispositionComponent, LoginComponent, CreateComponent, RecentActivityComponent, CurrentActivityComponent, SearchInformationComponent],
1411
- bootstrap: [],
1412
- exports: [ScenarioComponent, DispositionComponent, LoginComponent, CreateComponent, RecentActivityComponent, CurrentActivityComponent, SearchInformationComponent]
1413
- })
1414
- ], UILibraryModule);
1415
- return UILibraryModule;
1416
- }());
1417
-
1418
- /**
1419
- * Generated bundle index. Do not edit.
1420
- */
1421
-
1422
- export { IChatMessageType, Property, UILibraryModule, ValueType, InteractionComponent as ɵa, ScenarioComponent as ɵb, OperationComponent as ɵc, PropertyComponent as ɵd, HoldtimerComponent as ɵe, DurationComponent as ɵf, ChatBoxComponent as ɵg, ChatMessageComponent as ɵh, DispositionComponent as ɵi, ActivityComponent as ɵj, LoginComponent as ɵk, CreateComponent as ɵl, RecentActivityComponent as ɵm, CurrentActivityComponent as ɵn, SearchInformationComponent as ɵo };
1423
- //# sourceMappingURL=amc-technology-ui-library.js.map