@amc-technology/ui-library 1.0.31 → 1.0.35
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.
- package/amc-technology-ui-library.metadata.json +1 -1
- package/bundles/amc-technology-ui-library.umd.js +1078 -747
- package/bundles/amc-technology-ui-library.umd.js.map +1 -56
- package/bundles/amc-technology-ui-library.umd.min.js +16 -2
- package/bundles/amc-technology-ui-library.umd.min.js.map +1 -274
- package/esm2015/amc-technology-ui-library.js +16 -1417
- package/esm2015/projects/UILibrary/src/app/Helpers.js +11 -0
- package/esm2015/projects/UILibrary/src/app/components/activity/activity.component.js +83 -0
- package/esm2015/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +104 -0
- package/esm2015/projects/UILibrary/src/app/components/chat-message/chat-message.component.js +39 -0
- package/esm2015/projects/UILibrary/src/app/components/disposition/disposition.component.js +49 -0
- package/esm2015/projects/UILibrary/src/app/components/duration/duration.component.js +58 -0
- package/esm2015/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.js +72 -0
- package/esm2015/projects/UILibrary/src/app/components/interaction/interaction.component.js +80 -0
- package/esm2015/projects/UILibrary/src/app/components/login/login.component.js +45 -0
- package/esm2015/projects/UILibrary/src/app/components/operation/operation.component.js +57 -0
- package/esm2015/projects/UILibrary/src/app/components/property/property.component.js +99 -0
- package/esm2015/projects/UILibrary/src/app/components/scenario/scenario.component.js +40 -0
- package/esm2015/projects/UILibrary/src/app/models/chat.message.js +7 -0
- package/esm2015/projects/UILibrary/src/app/models/chat.settings.js +1 -0
- package/esm2015/projects/UILibrary/src/app/models/disposition.interface.js +1 -0
- package/esm2015/projects/UILibrary/src/app/models/login.interface.js +1 -0
- package/esm2015/projects/UILibrary/src/app/models/uilibrary.model.js +40 -0
- package/esm2015/projects/UILibrary/src/app/uilibrary.module.js +73 -0
- package/esm2015/public_api.js +2 -0
- package/esm5/amc-technology-ui-library.js +16 -714
- package/esm5/projects/UILibrary/src/app/Helpers.js +11 -0
- package/esm5/projects/UILibrary/src/app/components/activity/activity.component.js +84 -0
- package/esm5/projects/UILibrary/src/app/components/chat-box/chat-box.component.js +105 -0
- package/esm5/projects/UILibrary/src/app/components/chat-message/chat-message.component.js +40 -0
- package/esm5/projects/UILibrary/src/app/components/disposition/disposition.component.js +61 -0
- package/esm5/projects/UILibrary/src/app/components/duration/duration.component.js +60 -0
- package/esm5/projects/UILibrary/src/app/components/holdtimer/holdtimer.component.js +74 -0
- package/esm5/projects/UILibrary/src/app/components/interaction/interaction.component.js +85 -0
- package/esm5/projects/UILibrary/src/app/components/login/login.component.js +68 -0
- package/esm5/projects/UILibrary/src/app/components/operation/operation.component.js +58 -0
- package/esm5/projects/UILibrary/src/app/components/property/property.component.js +101 -0
- package/esm5/projects/UILibrary/src/app/components/scenario/scenario.component.js +41 -0
- package/esm5/projects/UILibrary/src/app/models/chat.message.js +7 -0
- package/esm5/projects/UILibrary/src/app/models/chat.settings.js +1 -0
- package/esm5/projects/UILibrary/src/app/models/disposition.interface.js +1 -0
- package/esm5/projects/UILibrary/src/app/models/login.interface.js +1 -0
- package/esm5/projects/UILibrary/src/app/models/uilibrary.model.js +43 -0
- package/esm5/projects/UILibrary/src/app/uilibrary.module.js +74 -0
- package/esm5/public_api.js +2 -0
- package/fesm2015/amc-technology-ui-library.js +813 -0
- package/fesm2015/amc-technology-ui-library.js.map +1 -0
- package/fesm5/amc-technology-ui-library.js +867 -0
- package/fesm5/amc-technology-ui-library.js.map +1 -0
- package/package.json +14 -67
- package/projects/UILibrary/src/app/components/activity/activity.component.d.ts +10 -10
- package/projects/UILibrary/src/app/components/interaction/interaction.component.d.ts +2 -1
- package/projects/UILibrary/src/app/components/scenario/scenario.component.d.ts +2 -2
- package/webcomponents/webcomponents.js +3 -3
- package/esm2015/amc-technology-ui-library.js.map +0 -40
- package/esm5/amc-technology-ui-library.js.map +0 -42
|
@@ -0,0 +1,813 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { EventEmitter, Input, Output, Component, 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
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
let InteractionComponent = class InteractionComponent {
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
constructor() {
|
|
17
|
+
this.minimizedChanged = new EventEmitter();
|
|
18
|
+
this.isAgentTyping = new EventEmitter();
|
|
19
|
+
this.newMessage = new EventEmitter();
|
|
20
|
+
this._minimized = false;
|
|
21
|
+
}
|
|
22
|
+
set _minimized(value) {
|
|
23
|
+
this.minimized = value;
|
|
24
|
+
this.minimizedChanged.emit(value);
|
|
25
|
+
}
|
|
26
|
+
get _minimized() {
|
|
27
|
+
return this.minimized;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
ngOnInit() {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
minimize() {
|
|
38
|
+
this._minimized = true;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @ignore
|
|
42
|
+
*/
|
|
43
|
+
maximize() {
|
|
44
|
+
this._minimized = false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
isConferenceCall() {
|
|
50
|
+
if (this.interaction.parties && this.interaction.parties.length > 1) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
collapseKeypress(event) {
|
|
56
|
+
if (event.code === 'Enter') {
|
|
57
|
+
this.minimize();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
expandKeypress(event) {
|
|
61
|
+
if (event.code === 'Enter') {
|
|
62
|
+
this.maximize();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
__decorate([
|
|
67
|
+
Input()
|
|
68
|
+
], InteractionComponent.prototype, "interaction", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
Output()
|
|
71
|
+
], InteractionComponent.prototype, "minimizedChanged", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
Output()
|
|
74
|
+
], InteractionComponent.prototype, "isAgentTyping", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
Output()
|
|
77
|
+
], InteractionComponent.prototype, "newMessage", void 0);
|
|
78
|
+
InteractionComponent = __decorate([
|
|
79
|
+
Component({
|
|
80
|
+
selector: 'amc-interaction',
|
|
81
|
+
template: "<div class=\"AnswerCallFocused\">\r\n <div class=\"editor callHeaderTop\">\r\n <img class=\"statusImage\" aria-hidden=\"true\" [src]=\"interaction.UIHeadersData.statusUrl\" (click)=\"interaction.UIHeadersData.focusHandler.handler(interaction.UIHeadersData.focusHandler.operationName, interaction.UIHeadersData.focusHandler.operationMetadata)\" />\r\n <label class=\"statusText\">\r\n <b [id]=\"interaction.UIHeadersData.statusText\">{{ interaction.UIHeadersData.statusText }}</b>\r\n </label>\r\n <label class=\"verticalDivider\">|</label>\r\n <label class=\"directionText\" *ngIf=\"!interaction.UIHeadersData.displayHoldCounter\">{{ interaction.UIHeadersData.directionText }}</label>\r\n <div class=\"holdCallDurationDiv\" *ngIf=\"interaction.UIHeadersData.displayHoldCounter\">\r\n <amc-holdtimer [holdCounterData]=\"interaction.UIHeadersData.holdCounterData\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\"></amc-holdtimer>\r\n </div>\r\n <img class=\"ViewExpandImage\" [src]=\"interaction.UIHeadersData.minimizeUrl\" alt=\"Minimize\" (click)=\"minimize()\" (keypress)=\"collapseKeypress($event)\" *ngIf=\"!_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"collapse Call Section\">\r\n <img class=\"ViewCollapseImage\" [src]=\"interaction.UIHeadersData.maximizeUrl\" alt=\"Maximize\" (click)=\"maximize()\" (keypress)=\"expandKeypress($event)\" *ngIf=\"_minimized\" tabindex=\"0\" role=\"button\" aria-label=\"expand Call Section\">\r\n <div class=\"DurationDiv\" *ngIf=\"interaction.displayCallTimer\">\r\n <amc-duration [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [startTime]=\"interaction.startTime\"></amc-duration>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!_minimized\">\r\n\r\n <div *ngIf=\"!isConferenceCall()\">\r\n <div class=\"editor phoneNumberContainer\">\r\n <input class=\"callImage\" type=\"image\" [src]=\"interaction.subheaderData.image.href\" [title]=\"interaction.subheaderData.tooltip || ''\" tabindex=\"-1\">\r\n <input class=\"editor phoneNumberValue\" [attr.aria-labelledby]=\"interaction.UIHeadersData.statusText + ' ' + interaction.subheaderData.value\" readonly type=\"text\" [value]=\"interaction.subheaderData.value\" [id]=\"interaction.subheaderData.value\" tabindex=\"-1\">\r\n </div>\r\n\r\n <div class=\"cadSection\">\r\n <ng-container *ngFor=\"let property of interaction.properties\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <label class=\"col1\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let property of interaction.associatedData\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <div class=\"editor displayDiv\">\r\n <label class=\"displayLabels\" [title]=\"property.displayKey\">{{property.displayKey}}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <app-chat-box *ngIf=\"interaction.chat\" [isTyping]=\"interaction.chat.isCustomerTyping\" [settings]=\"interaction.chat.settings\"\r\n [messages]=\"interaction.chat.messages\" (isAgentTyping)=\"isAgentTyping.emit($event)\" (newMessage)=\"newMessage.emit($event)\"></app-chat-box>\r\n\r\n <div [id]='interaction.interactionId'> </div>\r\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\r\n </div>\r\n\r\n <div *ngIf=\"isConferenceCall()\">\r\n <div *ngFor=\"let party of interaction.parties\">\r\n <div class=\"editor phoneNumberContainer\">\r\n <input class=\"callImage\" type=\"image\" [src]=\"party.header.image.href\" [title]=\"party.header.tooltip || ''\" tabindex=\"-1\">\r\n <input class=\"editor phoneNumberValue\" readonly type=\"text\" [value]=\"party.header.value\" tabindex=\"-1\">\r\n </div>\r\n\r\n <div class=\"grid-container\">\r\n <ng-container *ngFor=\"let property of party.properties\">\r\n <ng-container *ngIf=\"property.visible\">\r\n <label class=\"col1\" [title]=\"property.displayKey\">{{ property.displayKey }}</label>\r\n <amc-property [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"party.header.value\" class=\"col2\" [property]=\"property\"> </amc-property>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"party.header.value\" [operations]=\"party.operations\"></amc-operation>\r\n <div class=\"AnswerCallFocused\"></div>\r\n </div>\r\n <amc-operation [callType]=\"interaction.UIHeadersData.directionText\" [statusText]=\"interaction.UIHeadersData.statusText\" [callId]=\"interaction.subheaderData.value\" [operations]=\"interaction.operations\"></amc-operation>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
82
|
+
styles: [":host{display:block}.phoneNumberContainer{margin-left:5px!important;padding-left:0;display:flex;align-items:center}.cadSection{margin-bottom:5px}.grid-container{margin-left:5px;display:grid;grid-template-columns:auto 1fr;grid-column-gap:10px;max-width:calc(100% - 5px);overflow:hidden}.col1{grid-column:1/2}.col2{grid-column:2/3}.ViewExpandImage{margin:3px}.ViewExpandImage:focus{outline:#3296da solid 2px;outline-offset:0}.ViewCollapseImage{margin:3px}.ViewCollapseImage:focus{outline:#3296da solid 2px;outline-offset:0}.callImage{cursor:default}.phoneNumberValue:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
|
|
83
|
+
})
|
|
84
|
+
], InteractionComponent);
|
|
85
|
+
|
|
86
|
+
let ScenarioComponent = class ScenarioComponent {
|
|
87
|
+
constructor() {
|
|
88
|
+
this.minimizedChanged = new EventEmitter();
|
|
89
|
+
this.isAgentTyping = new EventEmitter();
|
|
90
|
+
this.newMessage = new EventEmitter();
|
|
91
|
+
this.afterViewChecked = new EventEmitter();
|
|
92
|
+
}
|
|
93
|
+
ngAfterViewChecked() {
|
|
94
|
+
this.afterViewChecked.emit();
|
|
95
|
+
}
|
|
96
|
+
onMinimizedChanged() {
|
|
97
|
+
this.minimizedChanged.emit();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
__decorate([
|
|
101
|
+
Input()
|
|
102
|
+
], ScenarioComponent.prototype, "scenario", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
Output()
|
|
105
|
+
], ScenarioComponent.prototype, "minimizedChanged", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
Output()
|
|
108
|
+
], ScenarioComponent.prototype, "isAgentTyping", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
Output()
|
|
111
|
+
], ScenarioComponent.prototype, "newMessage", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
Output()
|
|
114
|
+
], ScenarioComponent.prototype, "afterViewChecked", void 0);
|
|
115
|
+
ScenarioComponent = __decorate([
|
|
116
|
+
Component({
|
|
117
|
+
selector: 'amc-scenario',
|
|
118
|
+
template: "<ng-container *ngIf=\"scenario && scenario.interactions\">\r\n <amc-interaction *ngFor=\"let interaction of scenario.interactions\" [interaction]=\"interaction\"\r\n (minimizedChanged)=\"onMinimizedChanged()\" (isAgentTyping)=\"isAgentTyping.emit($event)\"\r\n (newMessage)=\"newMessage.emit($event)\">\r\n </amc-interaction>\r\n</ng-container>\r\n",
|
|
119
|
+
styles: ["", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;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}"]
|
|
120
|
+
})
|
|
121
|
+
], ScenarioComponent);
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @ignore
|
|
125
|
+
*/
|
|
126
|
+
let OperationComponent = class OperationComponent {
|
|
127
|
+
/**
|
|
128
|
+
* @ignore
|
|
129
|
+
*/
|
|
130
|
+
constructor() {
|
|
131
|
+
this.labelledByText = '';
|
|
132
|
+
this.describedByText = '';
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* @ignore
|
|
136
|
+
*/
|
|
137
|
+
ngOnInit() {
|
|
138
|
+
if (this.statusText && this.callType) {
|
|
139
|
+
this.describedByText = `${this.statusText} ${this.callType}`;
|
|
140
|
+
}
|
|
141
|
+
else if (this.statusText) {
|
|
142
|
+
this.describedByText = this.statusText;
|
|
143
|
+
}
|
|
144
|
+
else if (this.callType) {
|
|
145
|
+
this.describedByText = this.callType;
|
|
146
|
+
}
|
|
147
|
+
if (this.callId) {
|
|
148
|
+
this.labelledByText = this.callId;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
operationKeypress(event, operation) {
|
|
152
|
+
if (event.code === 'Enter') {
|
|
153
|
+
operation.handler(operation.operationName, operation.operationMetadata);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
__decorate([
|
|
158
|
+
Input()
|
|
159
|
+
], OperationComponent.prototype, "statusText", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
Input()
|
|
162
|
+
], OperationComponent.prototype, "callId", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
Input()
|
|
165
|
+
], OperationComponent.prototype, "callType", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
Input()
|
|
168
|
+
], OperationComponent.prototype, "operations", void 0);
|
|
169
|
+
OperationComponent = __decorate([
|
|
170
|
+
Component({
|
|
171
|
+
selector: 'amc-operation',
|
|
172
|
+
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",
|
|
173
|
+
styles: [".AnswerCallImages:focus{outline:#3296da solid 2px;outline-offset:1px}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
|
|
174
|
+
})
|
|
175
|
+
], OperationComponent);
|
|
176
|
+
|
|
177
|
+
var IChatMessageType;
|
|
178
|
+
(function (IChatMessageType) {
|
|
179
|
+
IChatMessageType["AGENT"] = "AGENT";
|
|
180
|
+
IChatMessageType["OTHER_PERSON"] = "OTHER_PERSON";
|
|
181
|
+
IChatMessageType["INFORMATION"] = "INFORMATION";
|
|
182
|
+
})(IChatMessageType || (IChatMessageType = {}));
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* A helper method to make instances of [IProperty]
|
|
186
|
+
*/
|
|
187
|
+
class Property {
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
* @param key
|
|
191
|
+
* @param value : if value type is COUNTER then value should be start time in MilliSeconds.
|
|
192
|
+
* @param visible
|
|
193
|
+
* @param valueType
|
|
194
|
+
* @param customOperation
|
|
195
|
+
*/
|
|
196
|
+
constructor(key, value, visible, valueType, customOperation) {
|
|
197
|
+
/**
|
|
198
|
+
* Operation responsible for generating displayKey and dispkayValur from key and value.
|
|
199
|
+
*/
|
|
200
|
+
this.displayOperation = () => {
|
|
201
|
+
this.displayKey = this.key;
|
|
202
|
+
this.displayValue = this.value;
|
|
203
|
+
};
|
|
204
|
+
this.key = key;
|
|
205
|
+
this.value = value;
|
|
206
|
+
visible != null ? (this.visible = visible) : (this.visible = true);
|
|
207
|
+
valueType != null
|
|
208
|
+
? (this.displayValueType = valueType)
|
|
209
|
+
: (this.displayValueType = ValueType.STRING);
|
|
210
|
+
this.customOperations = customOperation;
|
|
211
|
+
this.displayOperation();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* enum for Value types of PROPERTY.
|
|
216
|
+
*/
|
|
217
|
+
var ValueType;
|
|
218
|
+
(function (ValueType) {
|
|
219
|
+
ValueType[ValueType["STRING"] = 0] = "STRING";
|
|
220
|
+
ValueType[ValueType["COUNTER"] = 1] = "COUNTER";
|
|
221
|
+
})(ValueType || (ValueType = {}));
|
|
222
|
+
|
|
223
|
+
function secondsToHms(seconds_in) {
|
|
224
|
+
seconds_in = Number(seconds_in);
|
|
225
|
+
const h = Math.floor(seconds_in / 3600);
|
|
226
|
+
const m = Math.floor(seconds_in % 3600 / 60);
|
|
227
|
+
const s = Math.floor(seconds_in % 3600 % 60);
|
|
228
|
+
const hDisplay = h > 0 ? h.toString() + ':' : '';
|
|
229
|
+
const mDisplay = m > 0 ? ('0' + m.toString()).slice(-2) + ':' : '00:';
|
|
230
|
+
const sDisplay = s > 0 ? ('0' + s.toString()).slice(-2) : '00';
|
|
231
|
+
return hDisplay + mDisplay + sDisplay;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @ignore
|
|
236
|
+
*/
|
|
237
|
+
let PropertyComponent = class PropertyComponent {
|
|
238
|
+
/**
|
|
239
|
+
* @ignore
|
|
240
|
+
*/
|
|
241
|
+
constructor() {
|
|
242
|
+
this.labelledByText = '';
|
|
243
|
+
this.title = '';
|
|
244
|
+
this._timerId = null;
|
|
245
|
+
this.processedDisplayValue = '';
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @ignore
|
|
249
|
+
*/
|
|
250
|
+
ngOnInit() {
|
|
251
|
+
if (this.statusText && this.callType) {
|
|
252
|
+
this.labelledByText = `${this.statusText} ${this.callType}`;
|
|
253
|
+
}
|
|
254
|
+
else if (this.statusText) {
|
|
255
|
+
this.labelledByText = this.statusText;
|
|
256
|
+
}
|
|
257
|
+
else if (this.callType) {
|
|
258
|
+
this.labelledByText = this.callType;
|
|
259
|
+
}
|
|
260
|
+
if (this.callType && this.callId) {
|
|
261
|
+
this.title = `${this.callType} ${this.callId}`;
|
|
262
|
+
}
|
|
263
|
+
else if (this.callType) {
|
|
264
|
+
this.title = this.callType;
|
|
265
|
+
}
|
|
266
|
+
else if (this.callId) {
|
|
267
|
+
this.title = this.callId;
|
|
268
|
+
}
|
|
269
|
+
this.initValues();
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @ignore
|
|
273
|
+
*/
|
|
274
|
+
initValues() {
|
|
275
|
+
if (this.property.displayValueType === ValueType.COUNTER) {
|
|
276
|
+
this.startCallCounter();
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
this.processedDisplayValue = this.property.displayValue;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @ignore
|
|
284
|
+
*/
|
|
285
|
+
startCallCounter() {
|
|
286
|
+
if (this._timerId == null) {
|
|
287
|
+
this._timerId = window.setInterval(() => {
|
|
288
|
+
const callStartTime = this.property.displayValue;
|
|
289
|
+
const currentTime = new Date().getTime() / 1000;
|
|
290
|
+
const secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
|
|
291
|
+
this.processedDisplayValue = secondsToHms(secondsPassed);
|
|
292
|
+
}, 1000);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* @ignore
|
|
297
|
+
*/
|
|
298
|
+
ngOnDestroy() {
|
|
299
|
+
if (this.property.displayValueType === ValueType.COUNTER) {
|
|
300
|
+
// clear the timer.
|
|
301
|
+
if (this._timerId != null) {
|
|
302
|
+
clearInterval(this._timerId);
|
|
303
|
+
this._timerId = null;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
__decorate([
|
|
309
|
+
Input()
|
|
310
|
+
], PropertyComponent.prototype, "statusText", void 0);
|
|
311
|
+
__decorate([
|
|
312
|
+
Input()
|
|
313
|
+
], PropertyComponent.prototype, "callId", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
Input()
|
|
316
|
+
], PropertyComponent.prototype, "callType", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
Input()
|
|
319
|
+
], PropertyComponent.prototype, "property", void 0);
|
|
320
|
+
PropertyComponent = __decorate([
|
|
321
|
+
Component({
|
|
322
|
+
selector: 'amc-property',
|
|
323
|
+
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",
|
|
324
|
+
styles: ["input{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
|
|
325
|
+
})
|
|
326
|
+
], PropertyComponent);
|
|
327
|
+
|
|
328
|
+
let HoldtimerComponent = class HoldtimerComponent {
|
|
329
|
+
constructor() {
|
|
330
|
+
this.labelledByText = '';
|
|
331
|
+
this.displayTime = '00:00/00:00';
|
|
332
|
+
}
|
|
333
|
+
ngOnInit() {
|
|
334
|
+
if (this.statusText && this.callId) {
|
|
335
|
+
this.labelledByText = `${this.statusText} ${this.callId}`;
|
|
336
|
+
}
|
|
337
|
+
else if (this.statusText) {
|
|
338
|
+
this.labelledByText = this.statusText;
|
|
339
|
+
}
|
|
340
|
+
else if (this.callId) {
|
|
341
|
+
this.labelledByText = this.callId;
|
|
342
|
+
}
|
|
343
|
+
this.startCallCounter();
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @ignore
|
|
347
|
+
*/
|
|
348
|
+
startCallCounter() {
|
|
349
|
+
const pastTimeInSeconds = this.CaculatePastHoldDuration();
|
|
350
|
+
if (this._timerId == null) {
|
|
351
|
+
this._timerId = window.setInterval(() => {
|
|
352
|
+
const currentTime = new Date().getTime() / 1000;
|
|
353
|
+
const secondsPassedCurrentCall = Math.floor((currentTime) - (this.holdCounterData.currentHoldStartTime / 1000));
|
|
354
|
+
this.displayTime = secondsToHms(secondsPassedCurrentCall) +
|
|
355
|
+
'/' + secondsToHms(pastTimeInSeconds + secondsPassedCurrentCall);
|
|
356
|
+
}, 1000);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
CaculatePastHoldDuration() {
|
|
360
|
+
let pastTimeInSeconds = 0;
|
|
361
|
+
if (this.holdCounterData.pastCallDurations) {
|
|
362
|
+
this.holdCounterData.pastCallDurations.forEach((holdTimerIterator) => {
|
|
363
|
+
pastTimeInSeconds += (holdTimerIterator.endTime - holdTimerIterator.startTime) / 1000;
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
return pastTimeInSeconds;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* @ignore
|
|
370
|
+
*/
|
|
371
|
+
ngOnDestroy() {
|
|
372
|
+
// clear the timer.
|
|
373
|
+
if (this._timerId != null) {
|
|
374
|
+
clearInterval(this._timerId);
|
|
375
|
+
this._timerId = null;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
__decorate([
|
|
380
|
+
Input()
|
|
381
|
+
], HoldtimerComponent.prototype, "holdCounterData", void 0);
|
|
382
|
+
__decorate([
|
|
383
|
+
Input()
|
|
384
|
+
], HoldtimerComponent.prototype, "statusText", void 0);
|
|
385
|
+
__decorate([
|
|
386
|
+
Input()
|
|
387
|
+
], HoldtimerComponent.prototype, "callId", void 0);
|
|
388
|
+
HoldtimerComponent = __decorate([
|
|
389
|
+
Component({
|
|
390
|
+
selector: 'amc-holdtimer',
|
|
391
|
+
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",
|
|
392
|
+
styles: [".holdCallDurationTimer:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
|
|
393
|
+
})
|
|
394
|
+
], HoldtimerComponent);
|
|
395
|
+
|
|
396
|
+
let DurationComponent = class DurationComponent {
|
|
397
|
+
constructor() {
|
|
398
|
+
this.labelledByText = '';
|
|
399
|
+
this.displayTime = '00:00/00:00';
|
|
400
|
+
}
|
|
401
|
+
ngOnInit() {
|
|
402
|
+
if (this.statusText && this.callId) {
|
|
403
|
+
this.labelledByText = `${this.statusText} ${this.callId}`;
|
|
404
|
+
}
|
|
405
|
+
else if (this.statusText) {
|
|
406
|
+
this.labelledByText = this.statusText;
|
|
407
|
+
}
|
|
408
|
+
else if (this.callId) {
|
|
409
|
+
this.labelledByText = this.callId;
|
|
410
|
+
}
|
|
411
|
+
this.startCallCounter();
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* @ignore
|
|
415
|
+
*/
|
|
416
|
+
startCallCounter() {
|
|
417
|
+
if (this._timerId == null) {
|
|
418
|
+
this._timerId = window.setInterval(() => {
|
|
419
|
+
const callStartTime = this.startTime;
|
|
420
|
+
const currentTime = new Date().getTime() / 1000;
|
|
421
|
+
const secondsPassed = Math.floor((currentTime) - (callStartTime / 1000));
|
|
422
|
+
this.displayTime = Math.floor(secondsPassed / 60) + ':' + ('0' + (secondsPassed % 60)).slice(-2);
|
|
423
|
+
}, 1000);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
ngOnDestroy() {
|
|
427
|
+
// clear the timer.
|
|
428
|
+
if (this._timerId != null) {
|
|
429
|
+
clearInterval(this._timerId);
|
|
430
|
+
this._timerId = null;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
__decorate([
|
|
435
|
+
Input()
|
|
436
|
+
], DurationComponent.prototype, "statusText", void 0);
|
|
437
|
+
__decorate([
|
|
438
|
+
Input()
|
|
439
|
+
], DurationComponent.prototype, "callId", void 0);
|
|
440
|
+
__decorate([
|
|
441
|
+
Input()
|
|
442
|
+
], DurationComponent.prototype, "startTime", void 0);
|
|
443
|
+
DurationComponent = __decorate([
|
|
444
|
+
Component({
|
|
445
|
+
selector: 'amc-duration',
|
|
446
|
+
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",
|
|
447
|
+
styles: [".durationInput:focus{outline-style:none}", "body{padding-top:5px;padding-bottom:5px;margin:0}.login{width:20px;height:20px;display:block;margin-top:2px;margin-left:auto;margin-right:auto}.editor{font-size:.9em;text-align:left;margin:4px 5% 0 0;font-family:Arial;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:0;padding-top:2px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.editor .standalone-line{width:90%!important;text-align:center!important}.editorHyperLink label{font-size:.95em;float:left;width:30%;margin-left:2%;text-align:left;color:#000;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:0;padding-top:0}.editorHyperLink input[type=text]{font-size:.95em;width:60%;text-align:left;margin:0 5% 0 0;color:#318fc5;cursor:pointer;font-family:Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;padding-top:0;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.AnswerCallImages{height:20px;margin:5px}.AnswerCallFocused{border:1px solid #939598;margin-left:0;font-family:Arial;position:relative;background-color:#fff;width:100%;box-sizing:border-box}.ViewCollapseImage,.ViewExpandImage{width:20px;height:20px;float:right;cursor:pointer}.answerPhoneNumberStyle{border:0;position:relative;top:-12px;left:-38px;max-width:80px;height:15px;text-overflow:ellipsis;font-size:.85em}.callHeaderTop{border-bottom:1px solid;background-color:#f4f5fb;width:100%;margin-top:0}.statusImage{width:15px;height:15px;margin-left:10px;float:left;margin-right:5px}.statusText{float:left;margin-top:1px}.displayDiv{width:100%;display:flex}.DurationDiv{float:right;width:17%;text-align:right;margin-right:5px}.displayLabels{margin-left:5px;width:25%;overflow:hidden;text-overflow:ellipsis}.displayData{border:0;outline:0}.callOptions{background-color:#f6f7fb;bottom:0;width:100%;text-align:center}.directionText{font-size:.8em;margin-left:2px}.phoneNumberValue{font-weight:700;font-size:1em;margin-left:5px}.durationInput{background-color:transparent;border:0;width:100%;text-align:right}.topBorder{border-top:1px solid #939598}.holdCallDurationDiv{float:left;margin-top:1px;margin-left:2px}.holdCallDurationTimer{background-color:transparent;border:0;width:100%}.verticalDivider{margin-left:2px;float:left}.callImage{height:20px}"]
|
|
448
|
+
})
|
|
449
|
+
], DurationComponent);
|
|
450
|
+
|
|
451
|
+
let ChatBoxComponent = class ChatBoxComponent {
|
|
452
|
+
constructor() {
|
|
453
|
+
this.isTyping = false;
|
|
454
|
+
this.lastCount = -1;
|
|
455
|
+
this._isAgentTyping = false;
|
|
456
|
+
this.isAgentTyping = new EventEmitter();
|
|
457
|
+
this.newMessage = new EventEmitter();
|
|
458
|
+
this.newMessageText = '';
|
|
459
|
+
this.usernameToColor = {};
|
|
460
|
+
this.colors = [
|
|
461
|
+
'#81c784',
|
|
462
|
+
'#ffab91',
|
|
463
|
+
'#f48fb1',
|
|
464
|
+
'#29b6f6',
|
|
465
|
+
'#e1bee7',
|
|
466
|
+
'#9ccc65',
|
|
467
|
+
'#ffc107',
|
|
468
|
+
'#26c6da',
|
|
469
|
+
'#cddc39',
|
|
470
|
+
];
|
|
471
|
+
this.colorsIndex = 0;
|
|
472
|
+
this.agentColor = '#29b6f6';
|
|
473
|
+
}
|
|
474
|
+
ngAfterViewChecked() {
|
|
475
|
+
if (this.lastCount !== this.messages.length) {
|
|
476
|
+
this.lastCount = this.messages.length;
|
|
477
|
+
this.scrollToBottom();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
getColor(message) {
|
|
481
|
+
if (message.type && message.type === IChatMessageType.AGENT) {
|
|
482
|
+
return this.agentColor;
|
|
483
|
+
}
|
|
484
|
+
else if (message.username) {
|
|
485
|
+
if (!this.usernameToColor[message.username]) {
|
|
486
|
+
this.usernameToColor[message.username] = this.colors[this.colorsIndex];
|
|
487
|
+
this.colorsIndex = (this.colorsIndex + 1) % this.colors.length;
|
|
488
|
+
}
|
|
489
|
+
return this.usernameToColor[message.username];
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
return this.colors[0];
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
shouldAlignRight(message) {
|
|
496
|
+
return message.type && message.type === IChatMessageType.AGENT;
|
|
497
|
+
}
|
|
498
|
+
sendNewMessage() {
|
|
499
|
+
if (this.newMessageText) {
|
|
500
|
+
this.newMessage.emit(this.newMessageText);
|
|
501
|
+
this.newMessageText = '';
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
onNewMessageFocus(event) {
|
|
505
|
+
const isTyping = event && this.newMessageText.length > 0;
|
|
506
|
+
if (isTyping !== this._isAgentTyping) {
|
|
507
|
+
this._isAgentTyping = isTyping;
|
|
508
|
+
this.isAgentTyping.emit(isTyping);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
onKeyup() {
|
|
512
|
+
const isTyping = this.newMessageText.length > 0;
|
|
513
|
+
if (isTyping !== this._isAgentTyping) {
|
|
514
|
+
this._isAgentTyping = isTyping;
|
|
515
|
+
this.isAgentTyping.emit(isTyping);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
scrollToBottom() {
|
|
519
|
+
try {
|
|
520
|
+
this.messagesContainer.nativeElement.scrollTop = this.messagesContainer.nativeElement.scrollHeight;
|
|
521
|
+
}
|
|
522
|
+
catch (e) { }
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
__decorate([
|
|
526
|
+
Input()
|
|
527
|
+
], ChatBoxComponent.prototype, "settings", void 0);
|
|
528
|
+
__decorate([
|
|
529
|
+
Input()
|
|
530
|
+
], ChatBoxComponent.prototype, "isTyping", void 0);
|
|
531
|
+
__decorate([
|
|
532
|
+
Input()
|
|
533
|
+
], ChatBoxComponent.prototype, "messages", void 0);
|
|
534
|
+
__decorate([
|
|
535
|
+
Output()
|
|
536
|
+
], ChatBoxComponent.prototype, "isAgentTyping", void 0);
|
|
537
|
+
__decorate([
|
|
538
|
+
Output()
|
|
539
|
+
], ChatBoxComponent.prototype, "newMessage", void 0);
|
|
540
|
+
__decorate([
|
|
541
|
+
ViewChild('MessagesContainer', { static: true })
|
|
542
|
+
], ChatBoxComponent.prototype, "messagesContainer", void 0);
|
|
543
|
+
ChatBoxComponent = __decorate([
|
|
544
|
+
Component({
|
|
545
|
+
selector: 'app-chat-box',
|
|
546
|
+
template: "<div class=\"chat-box\">\r\n <div #MessagesContainer class=\"messages\" [style.max-height]='settings.maxHeight'>\r\n <ng-container *ngFor=\"let message of messages\">\r\n <app-chat-message [alignRight]=\"shouldAlignRight(message)\" [message]=\"message.text\" [username]=\"message.username\"\r\n [timestamp]=\"message.timestamp\" [image]=\"message.userIcon\" [fallbackImage]=\"settings.fallbackUserIcon\" [color]=\"getColor(message)\">\r\n </app-chat-message>\r\n </ng-container>\r\n\r\n <div *ngIf=\"isTyping\" class=\"typing-indicator\">\r\n Someone is typing\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"new-message\">\r\n <input #NewMessageText [(ngModel)]=\"newMessageText\" type=\"text\" placeholder=\"Type a message\" (focus)=\"onNewMessageFocus(true)\"\r\n (blur)=\"onNewMessageFocus(false)\" (keydown.enter)=\"sendNewMessage()\" (keyup)='onKeyup()' [disabled]=\"settings.disableSendMessage\">\r\n <input type=\"image\" [src]=\"settings.sendImage\" (click)=\"sendNewMessage()\" [disabled]=\"settings.disableSendMessage\">\r\n </div>\r\n</div>\r\n",
|
|
547
|
+
styles: [".chat-box{background-color:#eceff1}.messages{padding:5px;overflow:auto;min-height:50px}.new-message{border-top:1px solid #000;display:flex;align-content:center;height:25px}.new-message input[type=text]{flex:1 1 0;background-color:#eceff1;border:none;min-width:0}.new-message input[type=image]{position:relative;top:50%;transform:translateY(-50%);height:20px;cursor:pointer}.new-message input[type=image]:disabled{opacity:.5;cursor:auto}.new-message input:focus{outline:0}.typing-indicator{font-size:1em;font-style:italic}.typing-indicator span{display:inline-block;height:10px;width:10px;border-radius:50%;background-color:#9e9e9e;margin:0 1px;opacity:.2}.typing-indicator span:nth-of-type(1){-webkit-animation:1.5s .33333s infinite blink;animation:1.5s .33333s infinite blink}.typing-indicator span:nth-of-type(2){-webkit-animation:1.5s .66666s infinite blink;animation:1.5s .66666s infinite blink}.typing-indicator span:nth-of-type(3){-webkit-animation:1.5s .99999s infinite blink;animation:1.5s .99999s infinite blink}@-webkit-keyframes blink{50%{opacity:1}}@keyframes blink{50%{opacity:1}}"]
|
|
548
|
+
})
|
|
549
|
+
], ChatBoxComponent);
|
|
550
|
+
|
|
551
|
+
let ChatMessageComponent = class ChatMessageComponent {
|
|
552
|
+
constructor() {
|
|
553
|
+
this.alignRight = false;
|
|
554
|
+
}
|
|
555
|
+
ngOnInit() {
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
__decorate([
|
|
559
|
+
Input()
|
|
560
|
+
], ChatMessageComponent.prototype, "message", void 0);
|
|
561
|
+
__decorate([
|
|
562
|
+
Input()
|
|
563
|
+
], ChatMessageComponent.prototype, "alignRight", void 0);
|
|
564
|
+
__decorate([
|
|
565
|
+
Input()
|
|
566
|
+
], ChatMessageComponent.prototype, "username", void 0);
|
|
567
|
+
__decorate([
|
|
568
|
+
Input()
|
|
569
|
+
], ChatMessageComponent.prototype, "color", void 0);
|
|
570
|
+
__decorate([
|
|
571
|
+
Input()
|
|
572
|
+
], ChatMessageComponent.prototype, "timestamp", void 0);
|
|
573
|
+
__decorate([
|
|
574
|
+
Input()
|
|
575
|
+
], ChatMessageComponent.prototype, "image", void 0);
|
|
576
|
+
__decorate([
|
|
577
|
+
Input()
|
|
578
|
+
], ChatMessageComponent.prototype, "fallbackImage", void 0);
|
|
579
|
+
ChatMessageComponent = __decorate([
|
|
580
|
+
Component({
|
|
581
|
+
selector: 'app-chat-message',
|
|
582
|
+
template: "<div [class]=\"alignRight? 'message right-message' : 'message left-message'\">\r\n <div class=\"message-header\">\r\n <img *ngIf=\"image\" class=\"image\" [src]=\"image\" (error)=\"image = fallbackImage\" [style.border-color]=\"color\" />\r\n <span *ngIf=\"username\" class=\"username\">{{username}}</span>\r\n <span *ngIf=\"timestamp\" class=\"timestamp\">{{timestamp}}</span>\r\n </div>\r\n\r\n <div class=\"message-body-container\">\r\n <div>\r\n <div class=\"message-body\" [style.background-color]=\"color\" [style.border-color]=\"color\">\r\n <span [innerHTML]=\"message\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
583
|
+
styles: [":host{display:block;margin-top:2px;margin-bottom:2px}.right-message{text-align:end}.message-header{display:flex;-webkit-text-emphasis:none;text-emphasis:none;font-style:italic;font-size:.7em;align-items:center;margin-bottom:.5em}.message-header .image{height:30px;border-radius:50%;border:2px solid red}.message-header .username{font-weight:700}.right-message>.message-header{flex-direction:row-reverse;margin-right:1px}.right-message>.message-header .image,.right-message>.message-header .username{margin-left:5px}.left-message>.message-header{margin-left:1px}.left-message>.message-header .image,.left-message>.message-header .username{margin-right:5px}.message-body-container{display:flex}.right-message>.message-body-container{flex-direction:row-reverse}.message-body{display:inline-block;position:relative;border-radius:.4em;padding:3px;font-style:normal;font-size:1em;text-align:start;min-width:2em;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.left-message .message-body:after{content:\"\";position:absolute;left:.8em;top:-.4em;border-bottom:.4em solid #000;border-bottom-color:inherit;border-left:.4em solid transparent;border-right:.4em solid transparent}.right-message .message-body:after{content:\"\";position:absolute;right:.8em;top:-.4em;border-bottom:.4em solid #000;border-bottom-color:inherit;border-left:.4em solid transparent;border-right:.4em solid transparent}"]
|
|
584
|
+
})
|
|
585
|
+
], ChatMessageComponent);
|
|
586
|
+
|
|
587
|
+
let DispositionComponent = class DispositionComponent {
|
|
588
|
+
constructor() {
|
|
589
|
+
this.dispositionEmitter = new EventEmitter();
|
|
590
|
+
this.selectedDispositionValue = '';
|
|
591
|
+
this.dispositionName = '';
|
|
592
|
+
}
|
|
593
|
+
ngOnInit() {
|
|
594
|
+
for (const metadata of this.disposition.dispositionMetadata) {
|
|
595
|
+
if (metadata.key === 'callId') {
|
|
596
|
+
this.dispositionName = `disposition_${metadata.value}`;
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
if (this.disposition.checkedDisposition) {
|
|
601
|
+
this.selectedDispositionValue = this.disposition.checkedDisposition;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
submitDisposition() {
|
|
605
|
+
const selectedDisposition = {
|
|
606
|
+
dispositionId: this.selectedDispositionValue,
|
|
607
|
+
dispositionName: this.disposition.disposition.get(this.selectedDispositionValue),
|
|
608
|
+
dispositionMetadata: this.disposition.dispositionMetadata
|
|
609
|
+
};
|
|
610
|
+
this.dispositionEmitter.emit(selectedDisposition);
|
|
611
|
+
}
|
|
612
|
+
selectAndSubmitDisposition(event, dispositionKey) {
|
|
613
|
+
if (event.code === 'Enter') {
|
|
614
|
+
this.selectedDispositionValue = dispositionKey;
|
|
615
|
+
this.submitDisposition();
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
__decorate([
|
|
620
|
+
Input()
|
|
621
|
+
], DispositionComponent.prototype, "disposition", void 0);
|
|
622
|
+
__decorate([
|
|
623
|
+
Output()
|
|
624
|
+
], DispositionComponent.prototype, "dispositionEmitter", void 0);
|
|
625
|
+
DispositionComponent = __decorate([
|
|
626
|
+
Component({
|
|
627
|
+
selector: 'amc-disposition',
|
|
628
|
+
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",
|
|
629
|
+
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}"]
|
|
630
|
+
})
|
|
631
|
+
], DispositionComponent);
|
|
632
|
+
|
|
633
|
+
let ActivityComponent = class ActivityComponent {
|
|
634
|
+
constructor() {
|
|
635
|
+
this.ActivitySave = new EventEmitter();
|
|
636
|
+
this.OnNameSelectChange = new EventEmitter();
|
|
637
|
+
this.OnRelatedToChange = new EventEmitter();
|
|
638
|
+
this.OnSubjectChange = new EventEmitter();
|
|
639
|
+
this.OnCallNotesChange = new EventEmitter();
|
|
640
|
+
this.isActivityMaximized = true;
|
|
641
|
+
}
|
|
642
|
+
ngOnInit() {
|
|
643
|
+
}
|
|
644
|
+
onNameSelectChange(event) {
|
|
645
|
+
this.activity.WhoObject = this.getWho(event.currentTarget.value);
|
|
646
|
+
this.OnNameSelectChange.emit(this.activity);
|
|
647
|
+
}
|
|
648
|
+
parseWhoObject(whoObject) {
|
|
649
|
+
return whoObject.objectType + ': ' + whoObject.objectName;
|
|
650
|
+
}
|
|
651
|
+
parseWhatObject(whatObject) {
|
|
652
|
+
return whatObject.objectType + ': ' + whatObject.objectName;
|
|
653
|
+
}
|
|
654
|
+
onRelatedToChange(event) {
|
|
655
|
+
this.activity.WhatObject = this.getWhat(event.currentTarget.value);
|
|
656
|
+
this.OnRelatedToChange.emit(this.activity);
|
|
657
|
+
}
|
|
658
|
+
onSubjectChange(event) {
|
|
659
|
+
this.activity.Subject = event.srcElement.value;
|
|
660
|
+
this.OnSubjectChange.emit(this.activity);
|
|
661
|
+
}
|
|
662
|
+
onCallNotesChange(event) {
|
|
663
|
+
this.activity.Subject = event.srcElement.value.trim();
|
|
664
|
+
this.OnCallNotesChange.emit(this.activity);
|
|
665
|
+
}
|
|
666
|
+
getWho(id) {
|
|
667
|
+
for (let i = 0; i < this.activity.whoList.length; i++) {
|
|
668
|
+
if (this.activity.whoList[i].objectId === id) {
|
|
669
|
+
return this.activity.whoList[i];
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
getWhat(id) {
|
|
674
|
+
for (let i = 0; i < this.activity.whatList.length; i++) {
|
|
675
|
+
if (this.activity.whatList[i].objectId === id) {
|
|
676
|
+
return this.activity.whatList[i];
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
loadQuickComment(value) {
|
|
681
|
+
this.activity.Description = this.activity.Description + this.activity.quickCommentList[value];
|
|
682
|
+
}
|
|
683
|
+
activitySave(clearActivityFields) {
|
|
684
|
+
this.ActivitySave.emit(this.activity);
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
__decorate([
|
|
688
|
+
Input()
|
|
689
|
+
], ActivityComponent.prototype, "activity", void 0);
|
|
690
|
+
__decorate([
|
|
691
|
+
Output()
|
|
692
|
+
], ActivityComponent.prototype, "ActivitySave", void 0);
|
|
693
|
+
__decorate([
|
|
694
|
+
Output()
|
|
695
|
+
], ActivityComponent.prototype, "OnNameSelectChange", void 0);
|
|
696
|
+
__decorate([
|
|
697
|
+
Output()
|
|
698
|
+
], ActivityComponent.prototype, "OnRelatedToChange", void 0);
|
|
699
|
+
__decorate([
|
|
700
|
+
Output()
|
|
701
|
+
], ActivityComponent.prototype, "OnSubjectChange", void 0);
|
|
702
|
+
__decorate([
|
|
703
|
+
Output()
|
|
704
|
+
], ActivityComponent.prototype, "OnCallNotesChange", void 0);
|
|
705
|
+
ActivityComponent = __decorate([
|
|
706
|
+
Component({
|
|
707
|
+
selector: 'app-activity',
|
|
708
|
+
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",
|
|
709
|
+
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}"]
|
|
710
|
+
})
|
|
711
|
+
], ActivityComponent);
|
|
712
|
+
|
|
713
|
+
let LoginComponent = class LoginComponent {
|
|
714
|
+
constructor() {
|
|
715
|
+
this.loginDetailsProvided = new EventEmitter();
|
|
716
|
+
}
|
|
717
|
+
ngOnInit() {
|
|
718
|
+
if (!this.loginData.header) {
|
|
719
|
+
this.loginData.header = 'Login';
|
|
720
|
+
}
|
|
721
|
+
for (let field of this.loginData.fields) {
|
|
722
|
+
if (!field.isInvalid) {
|
|
723
|
+
field.isInvalid = false;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
onLogin(loginForm) {
|
|
728
|
+
for (const field of this.loginData.fields) {
|
|
729
|
+
field.value = loginForm.value[field.name];
|
|
730
|
+
}
|
|
731
|
+
this.loginDetailsProvided.emit(this.loginData);
|
|
732
|
+
}
|
|
733
|
+
focusOutOfInput(loginForm, field) {
|
|
734
|
+
if (!loginForm.controls[field.name].valid) {
|
|
735
|
+
field.isInvalid = true;
|
|
736
|
+
}
|
|
737
|
+
// console.log(loginForm);
|
|
738
|
+
// console.log(field);
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
__decorate([
|
|
742
|
+
Input()
|
|
743
|
+
], LoginComponent.prototype, "loginData", void 0);
|
|
744
|
+
__decorate([
|
|
745
|
+
Output()
|
|
746
|
+
], LoginComponent.prototype, "loginDetailsProvided", void 0);
|
|
747
|
+
LoginComponent = __decorate([
|
|
748
|
+
Component({
|
|
749
|
+
selector: 'amc-login',
|
|
750
|
+
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",
|
|
751
|
+
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}"]
|
|
752
|
+
})
|
|
753
|
+
], LoginComponent);
|
|
754
|
+
|
|
755
|
+
let UILibraryModule = class UILibraryModule {
|
|
756
|
+
constructor(injector) {
|
|
757
|
+
this.injector = injector;
|
|
758
|
+
}
|
|
759
|
+
ngDoBootstrap(app) {
|
|
760
|
+
if (!customElements.get('amc-webcomponents-scenario')) {
|
|
761
|
+
const strategyFactory = new ElementZoneStrategyFactory(ScenarioComponent, this.injector);
|
|
762
|
+
customElements.define('amc-webcomponents-scenario', createCustomElement(ScenarioComponent, {
|
|
763
|
+
injector: this.injector,
|
|
764
|
+
strategyFactory: strategyFactory
|
|
765
|
+
}));
|
|
766
|
+
}
|
|
767
|
+
if (!customElements.get('amc-webcomponents-disposition')) {
|
|
768
|
+
const strategyFactory = new ElementZoneStrategyFactory(DispositionComponent, this.injector);
|
|
769
|
+
customElements.define('amc-webcomponents-disposition', createCustomElement(DispositionComponent, {
|
|
770
|
+
injector: this.injector,
|
|
771
|
+
strategyFactory: strategyFactory
|
|
772
|
+
}));
|
|
773
|
+
}
|
|
774
|
+
if (!customElements.get('amc-webcomponents-login')) {
|
|
775
|
+
const strategyFactory = new ElementZoneStrategyFactory(LoginComponent, this.injector);
|
|
776
|
+
customElements.define('amc-webcomponents-login', createCustomElement(LoginComponent, {
|
|
777
|
+
injector: this.injector,
|
|
778
|
+
strategyFactory: strategyFactory
|
|
779
|
+
}));
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
UILibraryModule.ctorParameters = () => [
|
|
784
|
+
{ type: Injector }
|
|
785
|
+
];
|
|
786
|
+
UILibraryModule = __decorate([
|
|
787
|
+
NgModule({
|
|
788
|
+
imports: [BrowserModule, CommonModule, FormsModule],
|
|
789
|
+
declarations: [
|
|
790
|
+
InteractionComponent,
|
|
791
|
+
ScenarioComponent,
|
|
792
|
+
OperationComponent,
|
|
793
|
+
PropertyComponent,
|
|
794
|
+
HoldtimerComponent,
|
|
795
|
+
DurationComponent,
|
|
796
|
+
ChatBoxComponent,
|
|
797
|
+
ChatMessageComponent,
|
|
798
|
+
DispositionComponent,
|
|
799
|
+
ActivityComponent,
|
|
800
|
+
LoginComponent
|
|
801
|
+
],
|
|
802
|
+
entryComponents: [ScenarioComponent, DispositionComponent, LoginComponent],
|
|
803
|
+
bootstrap: [],
|
|
804
|
+
exports: [ScenarioComponent, DispositionComponent, LoginComponent]
|
|
805
|
+
})
|
|
806
|
+
], UILibraryModule);
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Generated bundle index. Do not edit.
|
|
810
|
+
*/
|
|
811
|
+
|
|
812
|
+
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 };
|
|
813
|
+
//# sourceMappingURL=amc-technology-ui-library.js.map
|