Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dac-software/base-ui-pl

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dac-software/base-ui-pl - npm Package Compare versions

Comparing version 1.0.40-PW-cludo-chat.3 to 1.0.40-PW-cludo-chat.4

28

dist/esm/controls/chat/helper.js

@@ -21,3 +21,3 @@ const replaceHeader = (title, iconName) => {

<p class="cx-q-contact-info__label">Infolinia obsługowa</p>
<a href="tel:611010450" class="cx-q-contact-info__phone">61 101 04 50</a>
<a href="tel:611010460" class="cx-q-contact-info__phone">61 101 04 60</a>
</div>

@@ -51,2 +51,6 @@ `

const hideWidgetButton = () => {
document.getElementById('widget').style.display = 'none'
}
const removeCancelBtnFromContainer = (containerClass) => {

@@ -85,2 +89,20 @@ const container = document.querySelector(`.${containerClass} .cx-form .cx-button-group`)

const getCookieWebchatOpenState = () => {
const decodedCookie = decodeURIComponent(document.cookie)
const cookies = decodedCookie.split(';')
const openStateCookie = cookies.find(cookie => cookie.includes('genesys.widgets.webchat.state.open')).split('=')
if (openStateCookie[1] === 'true') {
hideWidgetButton()
}
}
const addClassToRunnerIfIsOfferPage = () => {
if (window.isOfferPage) {
document.getElementById('widget').classList.add('cx-q-widget-runner--offer')
}
}
getCookieWebchatOpenState()
export {

@@ -96,3 +118,5 @@ replaceHeader,

removeFocusClassFromMessageInputContainer,
replaceSendIcon
replaceSendIcon,
hideWidgetButton,
addClassToRunnerIfIsOfferPage
}

19

dist/esm/controls/chat/widgetConfig.js

@@ -40,4 +40,5 @@ // configuration section

calendar: {
showAvailability: true,
showAvailability: false,
numberOfDays: 14,
timeFormat: 24,
hideUnavailableTimeSlots: false,

@@ -53,3 +54,3 @@ calendarHours: {

webchat: {
confirmFormCloseEnabled: true,
confirmFormCloseEnabled: false,
actionsMenu: false,

@@ -59,2 +60,10 @@ form: {

{
id: 'cx_webchat_form_firstname',
name: 'firstname',
maxlength: '100',
placeholder: '@i18n:webchat.ChatFormPlaceholderFirstName',
label: '@i18n:webchat.ChatFormFirstName',
autocomplete: 'off'
},
{
id: 'cx_webchat_form_email',

@@ -125,4 +134,4 @@ name: 'email',

form: {
confirmFormCloseEnabled: false,
inputs: [
{

@@ -135,3 +144,2 @@ id: 'cx_form_callback_firstname',

},
{

@@ -144,3 +152,2 @@ id: 'cx_form_callback_lastname',

},
{

@@ -152,3 +159,2 @@ id: 'cx_form_callback_phone_number',

label: '@i18n:callback.CallbackPhoneNumber',
onkeypress: function (event) {

@@ -159,3 +165,2 @@ // To allow only number inputs

},
{

@@ -162,0 +167,0 @@ id: 'cx_form_callback_subject',

@@ -12,5 +12,9 @@ import toastr from 'toastr'

removeFocusClassFromMessageInputContainer,
replaceSendIcon
replaceSendIcon,
hideWidgetButton,
addClassToRunnerIfIsOfferPage
} from './helper'
addClassToRunnerIfIsOfferPage()
// eslint-disable-next-line no-undef

@@ -22,5 +26,4 @@ CXBus.configure({ debug: false, pluginsPath: 'https://apps.mypurecloud.com/widgets/9.0/plugins/' })

const customPlugin = CXBus.registerPlugin('webchat-plugin')
customPlugin.subscribe('Callback.opened', function () {
cludoInfo()
var callbackFormSubmitBtn = document.getElementsByClassName('cx-callback-confirm cx-btn cx-btn-primary i18n')[0]

@@ -47,5 +50,5 @@ var btnParent = callbackFormSubmitBtn.parentElement

customPlugin.subscribe('WebChat.opened', function () {
showButtonOnClosed()
// showButtonOnClosed()
removeMinimizeButton()
replaceHeader('Chat', 'message-cloud')
replaceHeader('Chat z doradcą', 'message-cloud')
removeCancelBtnFromContainer('cx-webchat')

@@ -55,4 +58,9 @@ changeElementBackgroundColor('cx-btn-primary', '#A4C83F', true)

replaceSendIcon()
hideWidgetButton()
})
customPlugin.subscribe('WebChat.closed', function () {
document.getElementById('widget').style.display = 'flex'
})
customPlugin.subscribe('WebChatService.ready', function () {

@@ -67,10 +75,19 @@ replaceHeader('Chat', 'message-cloud')

removeFooter()
showButtonOnClosed()
// showButtonOnClosed()
})
customPlugin.subscribe('CallUs.closed', function () {
document.getElementById('widget').style.display = 'flex'
})
customPlugin.subscribe('Callback.opened', function () {
replaceHeader('Zamów rozmowę', 'clock')
showButtonOnClosed()
// showButtonOnClosed()
removeBottomButtonContainer()
removeMinimizeButton()
if (window.screen.width <= 768) {
console.log('aaaaaaaaaaaaaaaaaaaa')
removeFooter()
}
changeElementBackgroundColor('cx-callback-confirm', '#A4C83F', true)

@@ -80,2 +97,10 @@ changeElementBackgroundColor('cx-failed-retry', '#A4C83F', true)

customPlugin.subscribe('Callback.closed', function () {
document.getElementById('widget').style.display = 'flex'
})
customPlugin.subscribe('Calendar.opened', function () {
console.log('Kalędarz')
})
window.cludoChannelSelectorOpen = function () {

@@ -111,10 +136,2 @@ customPlugin.command('ChannelSelector.open')

function cludoInfo () {
var widgetFooter = document.getElementsByClassName('cx-powered-by')
for (var i = 0; i < widgetFooter.length; i++) {
widgetFooter[i].innerHTML = 'Powered with ❤️ by Cludo'
}
}
function AddCallback (body) {

@@ -131,3 +148,3 @@ window.fetch(window.cludoCallbackApiUrl, {

toastr.success('Zapisano callback!')
customPlugin.command('Callback.close')
// customPlugin.command('Callback.close')
} else {

@@ -134,0 +151,0 @@ toastr.error('Wystąpił błąd!')

{
"name": "@dac-software/base-ui-pl",
"version": "1.0.40-PW-cludo-chat.3",
"version": "1.0.40-PW-cludo-chat.4",
"license": "UNLICENSED",

@@ -5,0 +5,0 @@ "main": "dist/base-ui-main.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc