diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml new file mode 100644 index 0000000..4d5da9f --- /dev/null +++ b/.github/workflows/build_docker.yml @@ -0,0 +1,81 @@ +name: Docker +on: + push: + release: + types: [published] +permissions: + contents: read + +jobs: + build_and_push_docker: + permissions: + packages: write + contents: none + name: Build and Push Docker Image + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@main + with: + token: ${{ secrets.PIPELINE_TOKEN }} + submodules: true + # Create an array of version to push to the Dockerhub registry + - name: Prepare + id: prep + run: | + TAG=$(echo $(git describe ${{ github.sha }} --tags)) ## Get the tags from the SHA hash + VALID_TAG="^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" ## Will match Tags in the following format v123.231.123 or v1.2.3 will discard the following format v1.2.4- + DOCKER_IMAGE=botpress/server + VERSION=() + TAGS=() + if [[ $TAG =~ $VALID_TAG ]]; then + VERSION+=($(echo ${TAG} | sed -r 's/v//')) # transform v12.23.0 to 12.23.0 + VERSION+=('latest') + VERSION+=($(echo ${TAG} | sed -r 's/\./_/g')) # Transform v12.13.0 to v12_13_0 ## Added backward compatibility + echo ::set-output name=release::"true" + TAGS+=("${VERSION[@]/#/${DOCKER_IMAGE}:}") + elif [[ $GITHUB_REF == refs/heads/* ]]; then + VERSION+=($(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')) # transform feature/00-feature-branch to feature-00-feature-branch + fi + GITHUB_REGISTRY="ghcr.io/${{ github.repository_owner }}/${DOCKER_IMAGE}" + TAGS+=("${VERSION[@]/#/${GITHUB_REGISTRY}:}") + IFS=, + echo ::set-output name=version::${VERSION[*]} + echo ::set-output name=tags::"${TAGS[*]}" + echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + - name: Build + run: | + export npm_config_target_platform=linux + export EDITION=pro + git submodule update --init + yarn --force --ignore-engines --frozen-lockfile + yarn run build --linux --prod --verbose + yarn run package --linux + cp build/docker/Dockerfile packages/bp/binaries/ + - name: DockerHub Authentication + uses: docker/login-action@v1 + if: ${{ steps.prep.outputs.release }} + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.PIPELINE_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: ./packages/bp/binaries + push: true + tags: ${{ steps.prep.outputs.tags }} + labels: | + org.opencontainers.image.source=${{ github.event.repository.html_url }} + org.opencontainers.image.created=${{ steps.prep.outputs.created }} + org.opencontainers.image.revision=${{ github.sha }} diff --git a/index.html b/index.html new file mode 100644 index 0000000..bf0ba91 --- /dev/null +++ b/index.html @@ -0,0 +1,39 @@ + + + + + + Document + + +
+ + + +
+ + \ No newline at end of file diff --git a/modules/channel-web/assets/style.css b/modules/channel-web/assets/style.css new file mode 100644 index 0000000..9bad41c --- /dev/null +++ b/modules/channel-web/assets/style.css @@ -0,0 +1,273 @@ +/* This CSS rule sets the default font size of the entire document */ +/* gov_blue: #1351b4 */ +/* editado 27/06 */ +html { + font-size: 16px; +} + +/* These CSS rules sets the text direction of the paragraph (RTL or LTR) */ +p, +.bpw-from-bot > div, +#input-message { + direction: ltr; +} + +/* This rule changes the color of the text in the input message */ +#input-message { + color: #000000; + display: none; +} + +/* Changes the color of the new message indicator */ +.bpw-new-messages-indicator { + background-color: #f5f5f5; + color: #1351b4; +} + +/* Styling for the chat header container */ +.bpw-header-container { + margin-top: 0px; + margin-bottom: 10px; + margin-left: 0px; + margin-right: 0px; + background: #1351b4; + border-radius: 10px; + position: relative; + overflow: hidden; + border: 1px; + border-radius: 10px; + color: #bpw; +} + +.ffffff-header-name{ + color: #ffffff; +} + +/* Styling for the typing bubble */ +.bpw-typing-bubble { + background: #000000; +} + +/* Styling for the chat bubble content */ +.bpw-chat-bubble-content { + background-color: #f5f5f5; + border-radius: 0px; +} + +/* Styling for the date container, header name, and header subtitle */ +.bpw-header-name, +.bpw-header-subtitle { + color: #ffffff; +} + +/* Styling for the layout of the chat bubble. Width, height, border, position and radius of the chat bubble */ +.bpw-layout { + width: 92%; + height: 75%; + border-radius: 10px; + right: 10px; + bottom: 5px; + border: 1px; +} +/* Responsive design rules for devices with width less than or equal to 450px */ +@media screen and (max-width: 450px){ + .bpw-layout { + width: 100%; + height: 100%; + right: 0; + bottom: 0; + border-radius: 0; + } +} + +/* Changes the fill color of the header icons to white */ +.bpw-header-icon, +.bpw-header-icon svg, +.bpw-header-icon svg path { + fill: #ffffff !important; +} + +/* Changes the color of the placeholder text in the input message */ +#input-message::placeholder { + color: rgba(0,0,0,.30); +} + +.bpw-composer textarea{ + outline: none !important; + border: 1px solid rgba(0,0,0,.15); +} +.bpw-composer textarea:focus{ + outline: none !important; + border: 1px solid rgba(0,0,0,.30); +} + +/* Styling for the keyboard single choice option */ +.bpw-keyboard-single-choice { + background-color: #ffffff; + border: none; +} + +/* Styling for the buttons in the chat interface */ +.bpw-button, +.bpw-button-alt { + background-color: #EDF5FF; + color: #000000; + border-radius: 20px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + border: none; +} + + +/* Styling for hover effect on the buttons in the chat interface */ +.bpw-button:hover, +.bpw-button-alt:hover { + background-color: #f5f5f5; +} + + +/* Styling for hyperlinks in the chat interface */ +a { + color: #000000; + text-decoration: underline; +} + +/* Styling for the chat container, including color, scrollbar width and color, and border */ +.bpw-chat-container { + background-color: #f5f5f5; + scrollbar-width: thin; + scrollbar-color: #f5f5f5 #f5f5f5; + border: none; +} + +/* Styling for the chat bubble content when it's from the bot */ +.bpw-from-bot .bpw-chat-bubble .bpw-chat-bubble-content { + background-color: #ffffff; + color: #000000; + border: 0.05px solid #bbbbbb; + border-radius: 3px; +} + +/* Styling for the chat bubble content when it's from the user */ +.bpw-from-user .bpw-chat-bubble .bpw-chat-bubble-content { + background-color: #EDF5FF; + border-radius: 20px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + color: #000000; +} + +/* Styling for the composer section of the chat interface */ +.bpw-composer { + background-color: #ffffff; + border-top: none; +} + + +/* Styling for the scrollbar in the chat container */ +.bpw-chat-container::-webkit-scrollbar, +.bpw-chat-container::-moz-scrollbar { + width: 10px; + background-color: #ffffff; + border: none; +} + +/* Styling for the avatar of the bot */ +.bpw-bot-avatar img, +.bpw-bot-avatar svg { + background: #000000; + border: 0.1px solid #bbbbbb; +} + +/* Styling for the general scrollbar in the web page */ +::-webkit-scrollbar { + width: 0.5rem; +} + +/* Styling for the track of the general scrollbar and the chat container scrollbar */ +::-webkit-scrollbar-track, +.bpw-chat-container::-webkit-scrollbar-track, +.bpw-chat-container::-moz-scrollbar-track { + background-color: transparent; +} + +/* Styling for the thumb of the general scrollbar and the chat container scrollbar */ +::-webkit-scrollbar-thumb, +.bpw-chat-container::-webkit-scrollbar-thumb, +.bpw-chat-container::-moz-scrollbar-thumb { + background-color: #ffffff; + border-radius: 1rem; + border: 0.5rem solid transparent; +} + +/* Styling for the floating button icon in the chat interface */ +/*.bpw-floating-button i svg path { + fill: #6675fa; +}*/ + + + +/* Styling for the 'powered by' section of the chat interface */ +.bpw-powered { + text-align: center; + padding: 10px; + color: #ffffff; + background: #1351B4; + font-size: 14px; + border-bottom-right-radius: 10px; + border-bottom-left-radius: 10px; +} + +/* Styling for the hyperlinks in the 'powered by' section of the chat interface */ +.bpw-powered a { + color: #000000; + text-decoration: underline; +} + +/* Styling for hover effect on the hyperlinks in the 'powered by' section of the chat interface */ +.bpw-powered a:hover { + text-decoration: underline; +} + +.bpw-send-button{ + background: #1351b4; + color: #ffffff; +} + +.bpw-send-button:hover { + background: #c8c8c8; +} + +/* Change Bot Widget Icon */ +@keyframes fadeColor { + 0% { + background: #1351b4; /* Start color */ + } + 100% { + background: #3C3C3C; /* End color */ + } +} +.bpw-widget-btn{ + border-radius: 50%; + background:#1351b4; +} + +/* .bpw-widget-btn:hover{ + border-radius: 50%; + animation: fadeColor 0.5s forwards; +} */ + +.bpw-floating-button::before { + background:url("Avatar_ChatBot_Brasil_Participativo.png"); + background-repeat: no-repeat; + background-position: center; + background-size: contain; + height:undefinedpx !important; + width:undefinedpx !important; +} + +.bpw-floating-button { + box-shadow: none !important; +} + +.bpw-floating-button:hover { + box-shadow: none !important; +} \ No newline at end of file diff --git a/modules/channel-web/src/views/lite/components/Footer.tsx b/modules/channel-web/src/views/lite/components/Footer.tsx index f36ec4b..9e5cdac 100644 --- a/modules/channel-web/src/views/lite/components/Footer.tsx +++ b/modules/channel-web/src/views/lite/components/Footer.tsx @@ -36,4 +36,4 @@ const Footer = () => { ) } -export default Footer +export default Footer \ No newline at end of file diff --git a/modules/channel-web/src/views/lite/components/messages/MessageList.tsx b/modules/channel-web/src/views/lite/components/messages/MessageList.tsx index 3828ba0..491655e 100644 --- a/modules/channel-web/src/views/lite/components/messages/MessageList.tsx +++ b/modules/channel-web/src/views/lite/components/messages/MessageList.tsx @@ -54,7 +54,7 @@ class MessageList extends React.Component { mode={'bottom'} initialScrollBehavior={'auto'} tabIndex={0} - className={'bpw-msg-list-scroll-container'} + className={'bpw-msg-list'} scrollViewClassName={'bpw-msg-list'} ref={m => { this.messagesDiv = m diff --git a/package.json b/package.json index 97edb15..761dbc2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "12.31.8", "description": "The world's most powerful conversational engine", "engines": { - "node": "^12" + "node": ">=12.0.0" }, "main": "index.js", "repository": "https://github.com/botpress/v12.git", diff --git a/yarn.lock b/yarn.lock index 235360e..3bfa332 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7268,15 +7268,10 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: resolved "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001239.tgz#1205dd5d6b7510941e0963ffaabb1d68a3ee2231" integrity sha512-J79zAGPxlnkCPrDWaEpAUNMsU7Z1vwWRm8TVEZAI98Z4FN1UgFZuP8P4YZvFrNfI7HGDwRM55Fll3lOG0CM9Kw== -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001280: - version "1.0.30001283" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz#8573685bdae4d733ef18f78d44ba0ca5fe9e896b" - integrity sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg== - -caniuse-lite@^1.0.30000844: - version "1.0.30001239" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz#66e8669985bb2cb84ccb10f68c25ce6dd3e4d2b8" - integrity sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001280: + version "1.0.30001639" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz" + integrity sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg== canvas-renderer@~2.1.1: version "2.1.1"