@amc-technology/ui-library 1.0.97 → 1.0.99

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 (50) hide show
  1. package/amc-technology-ui-library.d.ts +4 -0
  2. package/amc-technology-ui-library.metadata.json +1 -1
  3. package/bundles/amc-technology-ui-library.umd.js +529 -20
  4. package/bundles/amc-technology-ui-library.umd.js.map +1 -1
  5. package/bundles/amc-technology-ui-library.umd.min.js +2 -2
  6. package/bundles/amc-technology-ui-library.umd.min.js.map +1 -1
  7. package/esm2015/amc-technology-ui-library.js +5 -1
  8. package/esm2015/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +5 -7
  9. package/esm2015/projects/UILibrary/src/app/components/create/create.component.js +35 -0
  10. package/esm2015/projects/UILibrary/src/app/components/current-activity/current-activity.component.js +169 -0
  11. package/esm2015/projects/UILibrary/src/app/components/disposition/disposition.component.js +1 -1
  12. package/esm2015/projects/UILibrary/src/app/components/interaction/interaction.component.js +13 -3
  13. package/esm2015/projects/UILibrary/src/app/components/login/login.component.js +2 -4
  14. package/esm2015/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.js +142 -0
  15. package/esm2015/projects/UILibrary/src/app/components/search-information/search-information.component.js +155 -0
  16. package/esm2015/projects/UILibrary/src/app/models/IActivity.js +1 -0
  17. package/esm2015/projects/UILibrary/src/app/models/IActivityDetails.js +1 -0
  18. package/esm2015/projects/UILibrary/src/app/models/IHoldActivityDetails.js +1 -0
  19. package/esm2015/projects/UILibrary/src/app/models/IInteractionActivityDetails.js +1 -0
  20. package/esm2015/projects/UILibrary/src/app/uilibrary.module.js +15 -5
  21. package/esm5/amc-technology-ui-library.js +5 -1
  22. package/esm5/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +5 -7
  23. package/esm5/projects/UILibrary/src/app/components/create/create.component.js +36 -0
  24. package/esm5/projects/UILibrary/src/app/components/current-activity/current-activity.component.js +174 -0
  25. package/esm5/projects/UILibrary/src/app/components/disposition/disposition.component.js +1 -1
  26. package/esm5/projects/UILibrary/src/app/components/interaction/interaction.component.js +13 -3
  27. package/esm5/projects/UILibrary/src/app/components/login/login.component.js +2 -4
  28. package/esm5/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.js +144 -0
  29. package/esm5/projects/UILibrary/src/app/components/search-information/search-information.component.js +156 -0
  30. package/esm5/projects/UILibrary/src/app/models/IActivity.js +1 -0
  31. package/esm5/projects/UILibrary/src/app/models/IActivityDetails.js +1 -0
  32. package/esm5/projects/UILibrary/src/app/models/IHoldActivityDetails.js +1 -0
  33. package/esm5/projects/UILibrary/src/app/models/IInteractionActivityDetails.js +1 -0
  34. package/esm5/projects/UILibrary/src/app/uilibrary.module.js +15 -5
  35. package/fesm2015/amc-technology-ui-library.js +517 -18
  36. package/fesm2015/amc-technology-ui-library.js.map +1 -1
  37. package/fesm5/amc-technology-ui-library.js +526 -18
  38. package/fesm5/amc-technology-ui-library.js.map +1 -1
  39. package/package.json +6 -1
  40. package/projects/UILibrary/src/app/components/chat-box/chat-box.component.d.ts +0 -2
  41. package/projects/UILibrary/src/app/components/create/create.component.d.ts +11 -0
  42. package/projects/UILibrary/src/app/components/current-activity/current-activity.component.d.ts +34 -0
  43. package/projects/UILibrary/src/app/components/interaction/interaction.component.d.ts +1 -0
  44. package/projects/UILibrary/src/app/components/recent-activity/recent-activity.component.d.ts +35 -0
  45. package/projects/UILibrary/src/app/components/search-information/search-information.component.d.ts +26 -0
  46. package/projects/UILibrary/src/app/models/IActivity.d.ts +36 -0
  47. package/projects/UILibrary/src/app/models/IActivityDetails.d.ts +7 -0
  48. package/projects/UILibrary/src/app/models/IHoldActivityDetails.d.ts +10 -0
  49. package/projects/UILibrary/src/app/models/IInteractionActivityDetails.d.ts +9 -0
  50. package/webcomponents/webcomponents.js +2 -2
@@ -1,10 +1,13 @@
1
- import { __decorate } from 'tslib';
1
+ import { __decorate, __awaiter } from 'tslib';
2
2
  import { EventEmitter, Input, Output, Component, Renderer2, ViewChild, Injector, NgModule } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import { createCustomElement } from '@angular/elements';
6
6
  import { BrowserModule } from '@angular/platform-browser';
7
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';
8
11
 
9
12
  /**
10
13
  * @ignore
@@ -62,6 +65,16 @@ let InteractionComponent = class InteractionComponent {
62
65
  this.maximize();
63
66
  }
64
67
  }
68
+ clickEvent(id) {
69
+ document.getElementById(id).className = 'success';
70
+ if (localStorage.getItem('focusedPanel') === null) {
71
+ localStorage.setItem('focusedPanel', id);
72
+ }
73
+ else if (localStorage.getItem('focusedPanel') != id) {
74
+ document.getElementById(localStorage.getItem('focusedPanel')).className = 'AnswerCallFocused';
75
+ localStorage.setItem('focusedPanel', id);
76
+ }
77
+ }
65
78
  };
66
79
  __decorate([
67
80
  Input()
@@ -81,8 +94,8 @@ __decorate([
81
94
  InteractionComponent = __decorate([
82
95
  Component({
83
96
  selector: 'amc-interaction',
84
- template: "<div class=\"AnswerCallFocused\">\r\n <div class=\"editor callHeaderTop\">\r\n <img class=\"statusImage\" aria-hidden=\"true\" [src]=\"interaction.UIHeadersData.statusUrl\" (click)=\"interaction.UIHeadersData.focusHandler.handler(interaction.UIHeadersData.focusHandler.operationName, interaction.UIHeadersData.focusHandler.operationMetadata)\" />\r\n <label class=\"statusText\">\r\n <b [id]=\"interaction.UIHeadersData.statusText\">{{ interaction.UIHeadersData.statusText }}</b>\r\n </label>\r\n <label class=\"verticalDivider\">|</label>\r\n <label class=\"directionText\" *ngIf=\"!interaction.UIHeadersData.displayHoldCounter\">{{ interaction.UIHeadersData.directionText }}</label>\r\n <div class=\"holdCallDurationDiv\" *ngIf=\"interaction.UIHeadersData.displayHoldCounter\">\r\n <amc-holdtimer [holdCounterData]=\"interaction.UIHeadersData.holdCounterData\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\"></amc-holdtimer>\r\n </div>\r\n <img class=\"ViewExpandImage\" [src]=\"interaction.UIHeadersData.minimizeUrl\" alt=\"Minimize\" (click)=\"minimize()\" (keypress)=\"collapseKeypress($event)\" *ngIf=\"!_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"collapse Call Section\">\r\n <img class=\"ViewCollapseImage\" [src]=\"interaction.UIHeadersData.maximizeUrl\" alt=\"Maximize\" (click)=\"maximize()\" (keypress)=\"expandKeypress($event)\" *ngIf=\"_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"expand Call Section\">\r\n <div class=\"DurationDiv\" *ngIf=\"interaction.displayCallTimer\">\r\n <amc-duration [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [startTime]=\"interaction.startTime\"></amc-duration>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!_minimized\">\r\n\r\n <div *ngIf=\"!isConferenceCall()\">\r\n <div class=\"editor phoneNumberContainer\">\r\n <input class=\"callImage\" type=\"image\" [src]=\"interaction.subheaderData.image.href\" [title]=\"interaction.subheaderData.tooltip || ''\" tabindex=\"-1\">\r\n <input class=\"editor phoneNumberValue\" [attr.aria-labelledby]=\"interaction.UIHeadersData.statusText + ' ' + interaction.subheaderData.value\" readonly type=\"text\" [value]=\"interaction.subheaderData.value\" [id]=\"interaction.subheaderData.value\" tabindex=\"-1\">\r\n </div>\r\n\r\n <div class=\"cadSection\">\r\n <ng-container *ngFor=\"let property of interaction.properties\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <label class=\"col1\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let property of interaction.associatedData\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <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",
85
- 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}", "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}"]
97
+ 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",
98
+ 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}"]
86
99
  })
87
100
  ], InteractionComponent);
88
101
 
@@ -459,8 +472,6 @@ let ChatBoxComponent = class ChatBoxComponent {
459
472
  this.renderer = renderer;
460
473
  this.isTyping = false;
461
474
  this.lastCount = -1;
462
- this.lastScrollTop = 0;
463
- this.newMessageSent = false;
464
475
  this._isAgentTyping = false;
465
476
  this.isAgentTyping = new EventEmitter();
466
477
  this.newMessage = new EventEmitter();
@@ -497,11 +508,13 @@ let ChatBoxComponent = class ChatBoxComponent {
497
508
  }
498
509
  catch (e) { }
499
510
  finally {
511
+ this.scrollToBottom();
500
512
  }
501
513
  }
502
514
  ngAfterViewChecked() {
503
515
  if (this.lastCount !== this.messages.length) {
504
516
  this.lastCount = this.messages.length;
517
+ this.scrollToBottom();
505
518
  }
506
519
  }
507
520
  getColor(message) {
@@ -523,8 +536,6 @@ let ChatBoxComponent = class ChatBoxComponent {
523
536
  return message.type && message.type === IChatMessageType.AGENT;
524
537
  }
525
538
  sendNewMessage(event) {
526
- this.scrollToBottom();
527
- this.newMessageSent = true;
528
539
  event.preventDefault();
529
540
  if (this.newMessageText) {
530
541
  this.newMessage.emit(this.newMessageText);
@@ -586,8 +597,8 @@ __decorate([
586
597
  ChatBoxComponent = __decorate([
587
598
  Component({
588
599
  selector: 'app-chat-box',
589
- template: "<div class=\"chat-box\">\r\n <div #MessagesContainer id=\"msgScroll\" class=\"messages\" [style.max-height]='settings.maxHeight'>\r\n <div>\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 </div>\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",
590
- 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;display:flex;flex-direction:column-reverse;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){-webkit-animation:1.5s .33333s infinite blink;animation:1.5s .33333s infinite blink}.typing-indicator span:nth-of-type(2){-webkit-animation:1.5s .66666s infinite blink;animation:1.5s .66666s infinite blink}.typing-indicator span:nth-of-type(3){-webkit-animation:1.5s .99999s infinite blink;animation:1.5s .99999s infinite blink}@-webkit-keyframes blink{50%{opacity:1}}@keyframes blink{50%{opacity:1}}"]
600
+ 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",
601
+ 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}}"]
591
602
  })
592
603
  ], ChatBoxComponent);
593
604
 
@@ -674,7 +685,7 @@ DispositionComponent = __decorate([
674
685
  Component({
675
686
  selector: 'amc-disposition',
676
687
  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",
677
- styles: [".disposition-container{border:1px solid #939598;white-space:nowrap;font-family:Arial;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;text-overflow:ellipsis;position:relative;font-size:.9em;max-height:180px;overflow-x:hidden;overflow-y:hidden}.header-container{border-bottom:1px solid #939598;background-color:#f4f5fb;width:100%;white-space:nowrap;height:28px;position:-webkit-sticky;position:sticky;overflow-x:hidden;overflow-y:hidden}.disposition-header{margin-top:auto;margin-left:7px;padding:5px;white-space:nowrap;text-overflow:ellipsis;font-weight:700;font-size:.9em;font-family:Arial;overflow-x:hidden}.disposition{margin-left:5px;padding-left:5px;white-space:nowrap}.disposition-label{text-overflow:ellipsis;font-weight:400;white-space:nowrap;font-size:.9em;overflow-x:hidden}.disposition-label-selected{text-overflow:ellipsis;font-weight:700;white-space:nowrap;font-size:.9em}.dispositions-container{padding:3px;overflow-y:scroll;max-height:150px}.disposition-label:focus{outline:#3296da solid 2px;outline-offset:5px}.first-disposition{margin-top:5px}"]
688
+ 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}"]
678
689
  })
679
690
  ], DispositionComponent);
680
691
 
@@ -782,8 +793,6 @@ let LoginComponent = class LoginComponent {
782
793
  if (!loginForm.controls[field.name].valid) {
783
794
  field.isInvalid = true;
784
795
  }
785
- // console.log(loginForm);
786
- // console.log(field);
787
796
  }
788
797
  };
789
798
  __decorate([
@@ -796,10 +805,495 @@ LoginComponent = __decorate([
796
805
  Component({
797
806
  selector: 'amc-login',
798
807
  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",
799
- 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:-webkit-sticky;position:sticky}.login-header{margin-top:auto;margin-left:7px;padding:5px;font-weight:700;font-size:.9em}.fields-container{overflow-y:auto;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}"]
808
+ 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}"]
800
809
  })
801
810
  ], LoginComponent);
802
811
 
812
+ let CreateComponent = class CreateComponent {
813
+ constructor() {
814
+ this.CreateNewEntity = new EventEmitter();
815
+ this.isCreateMaximized = true;
816
+ }
817
+ createNewEntity(type) {
818
+ this.CreateNewEntity.emit(type);
819
+ }
820
+ getEntities() {
821
+ return Object.keys(this.Entities);
822
+ }
823
+ getDisplay(entity) {
824
+ return entity.substring(0, entity.indexOf('|'));
825
+ }
826
+ getImage(entity) {
827
+ return entity.substring(entity.indexOf('|') + 1);
828
+ }
829
+ };
830
+ __decorate([
831
+ Output()
832
+ ], CreateComponent.prototype, "CreateNewEntity", void 0);
833
+ __decorate([
834
+ Input()
835
+ ], CreateComponent.prototype, "Entities", void 0);
836
+ CreateComponent = __decorate([
837
+ Component({
838
+ selector: 'amc-create',
839
+ 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",
840
+ 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}"]
841
+ })
842
+ ], CreateComponent);
843
+
844
+ let RecentActivityComponent = class RecentActivityComponent {
845
+ constructor() {
846
+ this.EventEmitter = new EventEmitter();
847
+ this.debouncer = new Subject();
848
+ this.eventList = new Set();
849
+ }
850
+ ngOnChanges() {
851
+ }
852
+ getIcon(scenario) {
853
+ switch (scenario) {
854
+ case 'Telephony':
855
+ return '../../assets/images/Phone_Number_Icon.png';
856
+ case 'Email':
857
+ return '../../assets/images/emailTab.png';
858
+ default:
859
+ return '../../assets/images/chat.png';
860
+ }
861
+ }
862
+ ngOnInit() {
863
+ this.debouncer.pipe(debounceTime(500)).subscribe(() => {
864
+ const newEvent = {
865
+ eventName: Array.from(this.eventList).join('|'),
866
+ idx: this.idx,
867
+ newValue: this.ActivityDetails
868
+ };
869
+ this.EventEmitter.emit(newEvent);
870
+ this.eventList.clear();
871
+ });
872
+ }
873
+ ngOnDestroy() { }
874
+ expandAndCollapseRecentActivity(isExpand) {
875
+ if (isExpand) {
876
+ this.EventEmitter.emit({
877
+ eventName: 'WorkingEvtivityChanged',
878
+ idx: this.idx,
879
+ newValue: this.ActivityDetails
880
+ });
881
+ }
882
+ else {
883
+ this.EventEmitter.emit({
884
+ eventName: 'WorkingEvtivityChanged',
885
+ idx: -1,
886
+ newValue: this.ActivityDetails
887
+ });
888
+ }
889
+ }
890
+ openActivity() {
891
+ this.EventEmitter.emit({
892
+ eventName: 'OpenCallActivity',
893
+ idx: this.idx,
894
+ newValue: this.ActivityDetails
895
+ });
896
+ }
897
+ onSubjectChange() {
898
+ this.eventList.add('ActivitySubjectChanged');
899
+ this.debouncer.next();
900
+ }
901
+ onSubjectKeyUp() {
902
+ this.eventList.add('ActivitySubjectChanged');
903
+ this.debouncer.next();
904
+ }
905
+ onWhoObjectChange(event) {
906
+ this.ActivityDetails.WhoObject = this.WhoObjectList.find((obj) => obj.objectId === event);
907
+ this.EventEmitter.emit({
908
+ eventName: 'ActivityWhoObjectChanged',
909
+ idx: this.idx,
910
+ newValue: this.ActivityDetails
911
+ });
912
+ }
913
+ onRelatedToChange(event) {
914
+ this.ActivityDetails.WhatObject = this.WhatObjectList.find((obj) => obj.objectId === event);
915
+ this.EventEmitter.emit({
916
+ eventName: 'ActivityWhatObjectChanged',
917
+ idx: this.idx,
918
+ newValue: this.ActivityDetails
919
+ });
920
+ }
921
+ onCallNotesChange() {
922
+ this.eventList.add('ActivityCallNoteChanged');
923
+ this.debouncer.next();
924
+ }
925
+ onCallNotesKeyUp() {
926
+ this.eventList.add('ActivityCallNoteChanged');
927
+ this.debouncer.next();
928
+ }
929
+ addQuickCommentToDescription(comment) {
930
+ if (this.ActivityDetails.Description) {
931
+ this.ActivityDetails.Description += '\n';
932
+ }
933
+ this.ActivityDetails.Description += comment;
934
+ this.eventList.add('ActivityCallNoteChanged');
935
+ this.debouncer.next();
936
+ }
937
+ submitActivity() {
938
+ this.ActivityDetails.IsProcessing = true;
939
+ this.EventEmitter.emit({
940
+ eventName: 'SubmitActivity',
941
+ idx: this.idx,
942
+ newValue: this.ActivityDetails
943
+ });
944
+ }
945
+ };
946
+ __decorate([
947
+ Input()
948
+ ], RecentActivityComponent.prototype, "ActivityDetails", void 0);
949
+ __decorate([
950
+ Input()
951
+ ], RecentActivityComponent.prototype, "isInConsoleView", void 0);
952
+ __decorate([
953
+ Input()
954
+ ], RecentActivityComponent.prototype, "quickCommentList", void 0);
955
+ __decorate([
956
+ Input()
957
+ ], RecentActivityComponent.prototype, "workingScenarioID", void 0);
958
+ __decorate([
959
+ Input()
960
+ ], RecentActivityComponent.prototype, "idx", void 0);
961
+ __decorate([
962
+ Input()
963
+ ], RecentActivityComponent.prototype, "last", void 0);
964
+ __decorate([
965
+ Input()
966
+ ], RecentActivityComponent.prototype, "WhoObjectList", void 0);
967
+ __decorate([
968
+ Input()
969
+ ], RecentActivityComponent.prototype, "WhatObjectList", void 0);
970
+ __decorate([
971
+ Output()
972
+ ], RecentActivityComponent.prototype, "EventEmitter", void 0);
973
+ RecentActivityComponent = __decorate([
974
+ Component({
975
+ selector: 'amc-recent-activity',
976
+ 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",
977
+ 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}"]
978
+ })
979
+ ], RecentActivityComponent);
980
+
981
+ let CurrentActivityComponent = class CurrentActivityComponent {
982
+ constructor() {
983
+ this.isActivityMaximized = true;
984
+ this.EventEmitter = new EventEmitter();
985
+ this.debouncer = new Subject();
986
+ this.eventList = new Set();
987
+ }
988
+ ngOnInit() {
989
+ return __awaiter(this, void 0, void 0, function* () {
990
+ this.debouncer.pipe(debounceTime(500)).subscribe(() => {
991
+ const newEvent = {
992
+ eventName: Array.from(this.eventList).join('|'),
993
+ newValue: this.ActivityDetails
994
+ };
995
+ this.EventEmitter.emit(newEvent);
996
+ this.eventList.clear();
997
+ });
998
+ });
999
+ }
1000
+ submitActivity() {
1001
+ try {
1002
+ this.ActivityDetails.IsProcessing = true;
1003
+ this.EventEmitter.emit({
1004
+ eventName: 'SubmitActivity',
1005
+ newValue: this.ActivityDetails
1006
+ });
1007
+ }
1008
+ catch (error) { }
1009
+ }
1010
+ triggerDiscardActivity() {
1011
+ try {
1012
+ this.EventEmitter.emit({
1013
+ eventName: 'TriggerDiscardActivity',
1014
+ newValue: this.ActivityDetails
1015
+ });
1016
+ }
1017
+ catch (error) { }
1018
+ }
1019
+ onNameChange(event) {
1020
+ try {
1021
+ this.ActivityDetails.WhoObject = this.WhoObjectList.find((obj) => obj.objectId === event);
1022
+ this.EventEmitter.emit({
1023
+ eventName: 'ActivityWhoObjectChanged',
1024
+ newValue: this.ActivityDetails
1025
+ });
1026
+ }
1027
+ catch (error) { }
1028
+ }
1029
+ onRelatedToChange(event) {
1030
+ try {
1031
+ this.ActivityDetails.WhatObject = this.WhatObjectList.find((obj) => obj.objectId === event);
1032
+ this.EventEmitter.emit({
1033
+ eventName: 'ActivityWhatObjectChanged',
1034
+ newValue: this.ActivityDetails
1035
+ });
1036
+ }
1037
+ catch (error) { }
1038
+ }
1039
+ onSubjectChange() {
1040
+ try {
1041
+ this.eventList.add('ActivitySubjectChanged');
1042
+ this.debouncer.next();
1043
+ }
1044
+ catch (error) { }
1045
+ }
1046
+ onSubjectKeyUp() {
1047
+ try {
1048
+ this.eventList.add('ActivitySubjectChanged');
1049
+ this.debouncer.next();
1050
+ }
1051
+ catch (error) { }
1052
+ }
1053
+ onCallNotesChange() {
1054
+ try {
1055
+ this.eventList.add('ActivityCallNoteChanged');
1056
+ this.debouncer.next();
1057
+ }
1058
+ catch (error) { }
1059
+ }
1060
+ onCallNotesKeyUp() {
1061
+ try {
1062
+ this.eventList.add('ActivityCallNoteChanged');
1063
+ this.debouncer.next();
1064
+ }
1065
+ catch (error) { }
1066
+ }
1067
+ addQuickCommentToDescription(comment) {
1068
+ try {
1069
+ let descriptionToSet = comment;
1070
+ if (this.quickCommentOptionRequiredCadArray[comment]) {
1071
+ let cadFields = {};
1072
+ if (this.ActivityDetails) {
1073
+ cadFields = this.scenarioToCADMap[this.ActivityDetails.ScenarioId];
1074
+ }
1075
+ for (let i = 0; i < this.quickCommentOptionRequiredCadArray[comment].length; i++) {
1076
+ let keyToCheckIfCADExists = this.quickCommentOptionRequiredCadArray[comment][i];
1077
+ const stringToBeReplaced = this.quickCommentOptionRequiredCadArray[comment][i];
1078
+ keyToCheckIfCADExists = keyToCheckIfCADExists.replace('{{', '');
1079
+ keyToCheckIfCADExists = keyToCheckIfCADExists.replace('}}', '');
1080
+ if (cadFields[keyToCheckIfCADExists]) {
1081
+ descriptionToSet = descriptionToSet.replace(stringToBeReplaced, cadFields[keyToCheckIfCADExists].Value);
1082
+ }
1083
+ }
1084
+ }
1085
+ if (this.ActivityDetails.Description) {
1086
+ this.ActivityDetails.Description += '\n';
1087
+ }
1088
+ this.ActivityDetails.Description += descriptionToSet;
1089
+ this.eventList.add('ActivityCallNoteChanged');
1090
+ this.debouncer.next();
1091
+ }
1092
+ catch (error) { }
1093
+ }
1094
+ parseWhoObject(whoObject) {
1095
+ try {
1096
+ return whoObject.displayName + ': ' + whoObject.objectName;
1097
+ }
1098
+ catch (error) { }
1099
+ }
1100
+ parseWhatObject(whatObject) {
1101
+ try {
1102
+ return whatObject.displayName + ': ' + whatObject.objectName;
1103
+ }
1104
+ catch (error) { }
1105
+ }
1106
+ };
1107
+ __decorate([
1108
+ Input()
1109
+ ], CurrentActivityComponent.prototype, "ActivityDetails", void 0);
1110
+ __decorate([
1111
+ Input()
1112
+ ], CurrentActivityComponent.prototype, "quickCommentList", void 0);
1113
+ __decorate([
1114
+ Input()
1115
+ ], CurrentActivityComponent.prototype, "isAutoSave", void 0);
1116
+ __decorate([
1117
+ Input()
1118
+ ], CurrentActivityComponent.prototype, "enableDiscard", void 0);
1119
+ __decorate([
1120
+ Input()
1121
+ ], CurrentActivityComponent.prototype, "autoSaveTimer", void 0);
1122
+ __decorate([
1123
+ Input()
1124
+ ], CurrentActivityComponent.prototype, "quickCommentOptionRequiredCadArray", void 0);
1125
+ __decorate([
1126
+ Input()
1127
+ ], CurrentActivityComponent.prototype, "WhoObjectList", void 0);
1128
+ __decorate([
1129
+ Input()
1130
+ ], CurrentActivityComponent.prototype, "WhatObjectList", void 0);
1131
+ __decorate([
1132
+ Input()
1133
+ ], CurrentActivityComponent.prototype, "scenarioToCADMap", void 0);
1134
+ __decorate([
1135
+ Output()
1136
+ ], CurrentActivityComponent.prototype, "EventEmitter", void 0);
1137
+ CurrentActivityComponent = __decorate([
1138
+ Component({
1139
+ selector: 'amc-current-activity',
1140
+ 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",
1141
+ 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}"]
1142
+ })
1143
+ ], CurrentActivityComponent);
1144
+
1145
+ let SearchInformationComponent = class SearchInformationComponent {
1146
+ constructor() {
1147
+ this.isSearchInformationMaximized = true;
1148
+ this.singleMatchData = null;
1149
+ this.multiMatchData = [];
1150
+ this.agentSelectedCallerInformation = new EventEmitter();
1151
+ }
1152
+ ngOnChanges() {
1153
+ this.renderData();
1154
+ }
1155
+ renderData() {
1156
+ try {
1157
+ this.singleMatchData = null;
1158
+ this.multiMatchData = [];
1159
+ this.shouldShowAllMultiMatchOptions = false;
1160
+ if (this.searchRecordList.length === 1) {
1161
+ this.singleMatchData = this.parseSearchRecordForNameSingleMatch(this.searchRecordList[0]);
1162
+ }
1163
+ else if (this.searchRecordList.length > 1) {
1164
+ for (let i = 0; i < this.searchRecordList.length; i++) {
1165
+ this.multiMatchData.push(this.parseSearchRecordForNameMultiMatch(this.searchRecordList[i]));
1166
+ }
1167
+ }
1168
+ }
1169
+ catch (error) { }
1170
+ }
1171
+ onAgentSelectedCallerInformation(event) {
1172
+ try {
1173
+ this.agentSelectedCallerInformation.emit({
1174
+ id: event.target.id,
1175
+ value: event.target.value
1176
+ });
1177
+ }
1178
+ catch (error) { }
1179
+ }
1180
+ parseSearchRecordForNameSingleMatch(searchRecord) {
1181
+ const results = [];
1182
+ try {
1183
+ const src = this.getEntityImgToDisplay(searchRecord);
1184
+ this.singleMatchIconSrc = src;
1185
+ const sLayoutInfo = this.getSearchLayoutInfoForDisplay(searchRecord);
1186
+ for (let j = 0; j < sLayoutInfo.DisplayFields.length; j++) {
1187
+ if (sLayoutInfo.DisplayFields && sLayoutInfo.DisplayFields[j].DevName) {
1188
+ const nameKey = sLayoutInfo.DisplayFields[j].DevName;
1189
+ const keys = Object.keys(searchRecord.fields);
1190
+ for (let i = 0; i < keys.length; i++) {
1191
+ if (searchRecord.fields[keys[i]] &&
1192
+ searchRecord.fields[keys[i]].DevName === nameKey) {
1193
+ let displayRecord = searchRecord.fields[keys[i]].Value;
1194
+ if (j === 0) {
1195
+ displayRecord = searchRecord.displayName
1196
+ ? [searchRecord.displayName, displayRecord]
1197
+ : [searchRecord.type, displayRecord];
1198
+ }
1199
+ else {
1200
+ displayRecord = sLayoutInfo.DisplayFields[j].DisplayName
1201
+ ? [sLayoutInfo.DisplayFields[j].DisplayName, displayRecord]
1202
+ : [sLayoutInfo.DisplayFields[j].DevName, displayRecord];
1203
+ }
1204
+ results.push(displayRecord);
1205
+ }
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+ catch (error) { }
1211
+ return results;
1212
+ }
1213
+ parseSearchRecordForNameMultiMatch(searchRecord) {
1214
+ const results = [];
1215
+ try {
1216
+ const src = this.getEntityImgToDisplay(searchRecord);
1217
+ const sLayoutInfo = this.getSearchLayoutInfoForDisplay(searchRecord);
1218
+ for (let j = 0; j < sLayoutInfo.DisplayFields.length; j++) {
1219
+ if (sLayoutInfo.DisplayFields && sLayoutInfo.DisplayFields[j].DevName) {
1220
+ const nameKey = sLayoutInfo.DisplayFields[j].DevName;
1221
+ const keys = Object.keys(searchRecord.fields);
1222
+ for (let i = 0; i < keys.length; i++) {
1223
+ if (searchRecord.fields[keys[i]] &&
1224
+ searchRecord.fields[keys[i]].DevName === nameKey) {
1225
+ let displayRecord = searchRecord.fields[keys[i]].Value;
1226
+ if (j === 0) {
1227
+ displayRecord = searchRecord.displayName
1228
+ ? [searchRecord.displayName, displayRecord]
1229
+ : [searchRecord.type, displayRecord];
1230
+ }
1231
+ else {
1232
+ displayRecord = sLayoutInfo.DisplayFields[j].DisplayName
1233
+ ? [sLayoutInfo.DisplayFields[j].DisplayName, displayRecord]
1234
+ : [sLayoutInfo.DisplayFields[j].DevName, displayRecord];
1235
+ }
1236
+ displayRecord.push(src);
1237
+ results.push(displayRecord);
1238
+ return results;
1239
+ }
1240
+ }
1241
+ }
1242
+ }
1243
+ }
1244
+ catch (error) { }
1245
+ return results;
1246
+ }
1247
+ getEntityImgToDisplay(searchRecord) {
1248
+ let src = '';
1249
+ try {
1250
+ if (searchRecord.type) {
1251
+ if (searchRecord.type.toUpperCase() === 'CONTACT') {
1252
+ src = '../../assets/images/Icon_Contact.png';
1253
+ }
1254
+ else if (searchRecord.type.toUpperCase() === 'ACCOUNT') {
1255
+ src = '../../assets/images/Icon_Account.png';
1256
+ }
1257
+ else if (searchRecord.type.toUpperCase() === 'LEAD') {
1258
+ src = '../../assets/images/Icon_Lead.png';
1259
+ }
1260
+ else {
1261
+ src = '../../assets/images/Miscellaneous_Icon.png';
1262
+ }
1263
+ }
1264
+ }
1265
+ catch (error) { }
1266
+ return src;
1267
+ }
1268
+ getSearchLayoutInfoForDisplay(searchRecord) {
1269
+ let layoutInfo;
1270
+ try {
1271
+ layoutInfo = this.searchLayout.layouts[0][this.ActivityDetails.CallType].find((i) => i.DevName === searchRecord.type);
1272
+ }
1273
+ catch (error) { }
1274
+ return layoutInfo;
1275
+ }
1276
+ };
1277
+ __decorate([
1278
+ Input()
1279
+ ], SearchInformationComponent.prototype, "ActivityDetails", void 0);
1280
+ __decorate([
1281
+ Input()
1282
+ ], SearchInformationComponent.prototype, "searchLayout", void 0);
1283
+ __decorate([
1284
+ Input()
1285
+ ], SearchInformationComponent.prototype, "searchRecordList", void 0);
1286
+ __decorate([
1287
+ Output()
1288
+ ], SearchInformationComponent.prototype, "agentSelectedCallerInformation", void 0);
1289
+ SearchInformationComponent = __decorate([
1290
+ Component({
1291
+ selector: 'amc-search-information',
1292
+ 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",
1293
+ 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)}"]
1294
+ })
1295
+ ], SearchInformationComponent);
1296
+
803
1297
  let UILibraryModule = class UILibraryModule {
804
1298
  constructor(injector) {
805
1299
  this.injector = injector;
@@ -833,7 +1327,7 @@ UILibraryModule.ctorParameters = () => [
833
1327
  ];
834
1328
  UILibraryModule = __decorate([
835
1329
  NgModule({
836
- imports: [BrowserModule, CommonModule, FormsModule],
1330
+ imports: [BrowserModule, CommonModule, FormsModule, MatTabsModule],
837
1331
  declarations: [
838
1332
  InteractionComponent,
839
1333
  ScenarioComponent,
@@ -845,11 +1339,16 @@ UILibraryModule = __decorate([
845
1339
  ChatMessageComponent,
846
1340
  DispositionComponent,
847
1341
  ActivityComponent,
848
- LoginComponent
1342
+ LoginComponent,
1343
+ CreateComponent,
1344
+ RecentActivityComponent,
1345
+ CurrentActivityComponent,
1346
+ SearchInformationComponent
849
1347
  ],
850
- entryComponents: [ScenarioComponent, DispositionComponent, LoginComponent],
1348
+ providers: [],
1349
+ entryComponents: [ScenarioComponent, DispositionComponent, LoginComponent, CreateComponent, RecentActivityComponent, CurrentActivityComponent, SearchInformationComponent],
851
1350
  bootstrap: [],
852
- exports: [ScenarioComponent, DispositionComponent, LoginComponent]
1351
+ exports: [ScenarioComponent, DispositionComponent, LoginComponent, CreateComponent, RecentActivityComponent, CurrentActivityComponent, SearchInformationComponent]
853
1352
  })
854
1353
  ], UILibraryModule);
855
1354
 
@@ -857,5 +1356,5 @@ UILibraryModule = __decorate([
857
1356
  * Generated bundle index. Do not edit.
858
1357
  */
859
1358
 
860
- 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 };
1359
+ 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 };
861
1360
  //# sourceMappingURL=amc-technology-ui-library.js.map