Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Twc updates wip #118

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
367a2e0
Updating dependencies for compatability with node 16
eaili Jul 29, 2022
3256d5e
Updating dependencies for compatability with node 16
eaili Jul 29, 2022
cb45911
Started investigation of upgrading to node16
eaili Oct 21, 2022
6f477a3
Updated dependencies
eaili Nov 16, 2022
3a78ca6
Added dompurify to avoid xss vulnerability
JP-Artsol Nov 16, 2022
dd96967
Merge pull request #112 from artificialsolutions/SDSA-225
eaili Nov 16, 2022
70f6874
updates from TWC dev team
JP-Artsol Nov 17, 2022
16c17d3
Merge branch 'master' into twc-updates-wip
JP-Artsol Nov 17, 2022
cf4bdca
prepare for merge
JP-Artsol Nov 17, 2022
52eec1f
Merge branch 'node-16' into twc-updates-wip
JP-Artsol Nov 17, 2022
c054e3a
Updates for compatibility with node16
JP-Artsol Nov 17, 2022
8034b61
Merge branch 'master' into twc-updates-wip
JP-Artsol Nov 17, 2022
7244486
fixed dependencies for node16 and release v.3.7.5 merged
JP-Artsol Nov 17, 2022
df331f2
attachment panel refactoring
fermanco Dec 21, 2022
810ffef
Attachment panel CSS refactoring
fermanco Dec 21, 2022
d99f780
Fixing attachment typo
fermanco Dec 21, 2022
c0cc8ae
Uploading buttons CSS and new Colors
fermanco Dec 22, 2022
62f644c
Card Message CSS
fermanco Dec 22, 2022
ac50a47
Carousel CSS
fermanco Dec 22, 2022
2f6828e
CSS refactoring
fermanco Dec 23, 2022
f4c6b90
Upload Panel refactoring
fermanco Dec 23, 2022
f9ede71
Upload Panel CSS
fermanco Dec 23, 2022
c3e51e0
Uploading Rating Message
fermanco Dec 23, 2022
28650c6
Upload Panel: fixing scroll-bar and sizes
fermanco Dec 23, 2022
27d3adc
Upload message
Jan 31, 2023
990ef95
upload messages contd
Feb 2, 2023
8af905a
upload messages
Feb 3, 2023
673fcc8
upload message
Feb 7, 2023
7d4671f
upload message
Feb 8, 2023
58c442c
upload message
Feb 9, 2023
3104473
upload message
Feb 10, 2023
f44d8b6
upload message
Feb 15, 2023
8dcc296
upload
Feb 16, 2023
793d980
upload
Feb 21, 2023
78b1d56
suppressing user input when the upload panel is opened
Mar 6, 2023
d0c1831
locatization of upload
Mar 7, 2023
148160f
.
Apr 12, 2023
3a8bc16
local global variables
May 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .browserslistrc
100644 → 100755
Empty file.
Empty file modified .env.sample
100644 → 100755
Empty file.
Empty file modified .eslintrc.json
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .nvmrc
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.15.0
v16.16.0
Empty file modified .prettierrc
100644 → 100755
Empty file.
Empty file modified CHANGELOG.md
100644 → 100755
Empty file.
Empty file modified LICENCE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified app.json
100644 → 100755
Empty file.
Empty file modified jest.config.js
100644 → 100755
Empty file.
15,605 changes: 4,200 additions & 11,405 deletions package-lock.json
100644 → 100755

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@
"license": "Apache-2.0",
"dependencies": {
"dotenv": "^10.0.0",
"ejs": "^3.1.6",
"ejs": "^3.1.8",
"express": "^4.17.1",
"install": "^0.13.0",
"isomorphic-dompurify": "^0.24.0",
"microsoft-cognitiveservices-speech-sdk": "^1.19.0",
"vue": "^2.6.14"
"microsoft-cognitiveservices-speech-sdk": "^1.22.0",
"vue": "^2.7.8"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/node": "^7.16.0",
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
"@babel/polyfill": "^7.11.5",
"@babel/preset-env": "^7.16.0",
"@babel/register": "^7.16.0",
"@testing-library/jest-dom": "^5.15.0",
"@vue/cli-plugin-unit-jest": "^4.5.0",
"@vue/cli-service": "^4.5.15",
"@vue/test-utils": "^1.2.2",
"@babel/core": "^7.18.9",
"@babel/node": "^7.18.9",
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.18.9",
"@babel/register": "^7.18.9",
"@testing-library/jest-dom": "^5.16.4",
"@vue/cli-plugin-unit-jest": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"@vue/test-utils": "^1.3.0",
"autoprefixer": "^10.4.0",
"babel-loader": "^8.2.3",
"babel-loader": "^8.2.5",
"body-scroll-lock": "^3.1.5",
"core-js": "^3.19.1",
"css-loader": "^6.5.1",
"css-loader": "^6.7.1",
"es6-promise": "^4.2.8",
"eslint": "^8.1.0",
"eslint-plugin-vue": "^8.0.3",
Expand All @@ -52,7 +52,7 @@
"jest": "^27.3.1",
"jsdom": "^18.0.1",
"jsdom-global": "^3.0.2",
"node-sass": "^6.0.1",
"node-sass": "^7.0.1",
"postcss": "^8.3.11",
"postcss-cli": "^9.0.2",
"postcss-loader": "^6.2.0",
Expand Down
Empty file modified postcss.config.js
100644 → 100755
Empty file.
Empty file modified server.js
100644 → 100755
Empty file.
55 changes: 50 additions & 5 deletions src/TeneoWebChat.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ export default {
EventBus.$emit(events.API_STATE_READY);
},
methods: {
// Encapsulating dependency methods makes Testing easier
async _onMessageReceived(message) {
await this.$teneoApi._onMessageReceived(message);
},
Expand Down Expand Up @@ -267,22 +266,40 @@ export default {

<style scoped>
.teneo-web-chat {
/** New variables: */
--line-light-color: #e0e0e0;
--link-button-color-: #2f286e;

/** Basic colors */
--light-fg-color: #ffffff;
--light-bg-color: #eceff1;
--light-border-color: #c9c9c9;
--dark-fg-color: #263238;
--dark-bg-color: #7b7b7b;
--primary-color: #4e8cff;

/** Button colors */
--primary-color: #2f286e;
--primary-color-dark:#160d27; /** */
--secondary-color: #6c757d;
--secondary-color-dark: #4e5459; /** */
--danger-color: #dc3545;
--danger-color-dark: #ac2936; /** */
--success-color: #28a745;
--warning-color: #ffc107;
--success-color-dark: #1c7932; /** */
--warning-color: #e2ab07;
--warning-color-dark: #c79605; /** */
--warning-fg-text-color: #d19d00;
--info-color: #17a2b8;
--info-color-dark: #0e798a;

--expired-color: #a9a9a9;
--text-link-color: #007bff;
--expired-bg-color: #f0f0f0;

--text-link-color: var(--primary-color);

--user-input-bg-color: #f4f7f9;
--user-input-fg-color: #565867;

--spinner-color: var(--light-border-color);
--sendicon-fg-color: var(--dark-fg-color);
--uploadicon-fg-color: var(--dark-fg-color);
Expand Down Expand Up @@ -310,33 +327,58 @@ export default {
--agent-typing-indicator-bg-color: var(--agent-message-bg-color);
--user-typing-indicator-fg-color: var(--user-message-fg-color);
--user-typing-indicator-bg-color: var(--user-message-bg-color);


/** Messages colors */

/**buttons */
--buttons-title-color: var(--dark-fg-color);
--button-fg-color: var(--light-fg-color);
--button-bg-color: var(--primary-color);

/**Cards */
--card-bg-color: var(--light-fg-color);
--card-link-color: var(--text-link-color);

/**links */
--link-button-fg-color: var(--text-link-color);
--link-button-bg-color: var(--light-fg-color);
--link-button-border-color: var(--light-border-color);
--link-button-border-color: var(--primary-color);

/**Clickablelist */
--clickablelist-title-color: var(--dark-fg-color);
--clickablelist-bg-color: var(--light-fg-color);
--clickablelist-fg-color: var(--dark-fg-color);
--clickablelist-selected-bg-color: var(--bot-message-bg-color);
--clickablelist-selected-fg-color: var(--dark-fg-color);

/**quickreply */
--quickreply-fg-color: var(--primary-color);
--quickreply-bg-color: var(--light-fg-color);
--quickreply-border-color: var(--primary-color);
--quickreply-expired-color: var(--expired-color);

/**light box */
--lightbox-overlay-color: rgba(0, 0, 0, 0.8);
--lightbox-image-background-color: #ffffff;

/**Modal */
--modal-overlay-color: rgba(0, 0, 0, 0.5);

/**Carrousel */
--carousel-ctrl-panel-bg-color: var(--primary-color);
--carousel-ctrl-panel-fg-color: var(--light-fg-color);
--carousel-ctrl-panel-active-color: var(--secondary-color);
--carousel-ctrl-panel-disabled-color: var(--expired-color);
--carousel-arrows-bg-color: #74728f;
--carousel-ctrl-dots-bg-color: #808080;

/**Link preview */
--link-preview-background-color: var(--light-bg-color);
--link-preview-text-color: var(--dark-fg-color);
--link-preview-image-background-color: var(--dark-bg-color);

/**Table */
--table-border-color: var(--light-border-color);
--table-title-text-color: var(--dark-fg-color);
--table-title-background-color: var(--light-bg-color);
Expand All @@ -348,6 +390,8 @@ export default {
--table-body-even-background-color: #aaa;
--table-footer-text-color: var(--primary-color);
--table-footer-background-color: var(--light-bg-color);

/**Form */
--form-background-color: var(--light-bg-color);
--form-title-text-color: var(--dark-fg-color);
--form-subtitle-text-color: var(--dark-fg-color);
Expand All @@ -361,6 +405,7 @@ export default {
--form-reset-text-color: var(--dark-fg-color);
--form-reset-background-color: var(--warning-color);

/**Font */
--primary-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

Expand Down
28 changes: 18 additions & 10 deletions src/components/ChatWindow.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
<div ref="chatWindowId" :class="chatWindowStyles()" role="group" :aria-label="$t('message.chat_window_group_aria_label')">
<Header :on-close="onClose" :on-minimize="onMinimize" />
<MessageList id="twc-message-list" :message-list="$teneoApi.messageList" />

<div v-if="spinnerIsLoading" class="twc-spinner" role="progressbar" aria-valuemin="0" :aria-valuetext="$t('message.chat_window_spinner_aria_valuetext')" aria-valuemax="100">
<div class="twc-bounce1" aria-hidden="true"></div>
<div class="twc-bounce2" aria-hidden="true"></div>
<div class="twc-bounce3" aria-hidden="true"></div>
</div>

<UploadPreviewPanel />
<UserInput :on-submit="sendMessage" />

<div v-if="isImageZoomed" href="#" class="twc-lightbox" @click="zoomOut">
Expand All @@ -24,12 +27,16 @@ import Vue from 'vue';
import Header from './Header.vue';
import MessageList from './MessageList.vue';
import UserInput from './UserInput.vue';
import UploadPreviewPanel from './UploadPreviewPanel.vue';
import { EventBus, events } from '../utils/event-bus.js';
import { API_CALL_SEND_INPUT } from '../utils/constants';
import detectIosSafari from '../utils/detect-ios-safari';

export default {
components: { Header, MessageList, UserInput },
components: {
UploadPreviewPanel,
Header, MessageList, UserInput
},
props: {
onClose: {
type: Function,
Expand Down Expand Up @@ -80,8 +87,8 @@ export default {
this.isImageZoomed = true;

setTimeout(() => {
document.getElementById('twc-lightbox-close').focus();
}, 50);
document.getElementById('twc-lightbox-close').focus();
}, 50);
});
// Send an empty init message to trigger a welcoming message from Teneo
if (this.$teneoApi.messageList.length === 0) {
Expand Down Expand Up @@ -119,6 +126,9 @@ export default {
};
</script>


<!--Changes: resize and overflow added to be resizable by the user
We need to change the corner from it's resizable-->
<style scoped>
.twc-chat-window {
font-family: var(--primary-font, 'Helvetica Neue', Helvetica, Arial, sans-serif);
Expand All @@ -131,7 +141,7 @@ export default {
bottom: 25px;
box-sizing: border-box;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.15);
background: var(--chat-window-bg-color, #ffffff);
background: white;
display: flex;
flex-direction: column;
justify-content: space-between;
Expand All @@ -143,6 +153,7 @@ export default {
z-index: 2699; /* Sit on top, but right below modal messages */
}


@media (max-width: 450px) {
.twc-chat-window {
width: 100%;
Expand All @@ -156,15 +167,12 @@ export default {

.twc-ios-keyboard-shown {
transition: 0.3s ease-in-out !important;
height: calc(66% - 62px) !important;
top: calc(34% + 63px) !important;
position: fixed !important;
height: calc(66% - 60px);
/* top: 0px; */
}
.twc-ios-keyboard-hidden {
transition: 0.2s ease-in-out !important;
height: 100% !important;
top: 0px !important;
position: fixed !important;
height: 100%;
}

.twc-spinner {
Expand Down
Empty file modified src/components/Header.vue
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion src/components/LaunchButton.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default {
bottom: 25px;
border-radius: 50%;
border: none;
box-shadow: none;
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
transition: box-shadow 0.2s ease-in-out;
cursor: pointer;
display: flex;
Expand All @@ -127,6 +127,8 @@ export default {

.twc-launch-button:hover {
box-shadow: 0 0px 27px 1.5px rgba(0, 0, 0, 0.2) !important;
width: 65px;
height: 65px;
}

.twc-launch-button:hover .twc-launch-button__open-icon, .twc-launch-button:focus .twc-launch-button__open-icon {
Expand Down
Empty file modified src/components/Message.vue
100644 → 100755
Empty file.
Loading