diff --git a/src/digital-components/salesforce-webchat/salesforce-helper-dev.js b/src/digital-components/salesforce-webchat/salesforce-helper-dev.js index ce4a4acb9..fb29bc9eb 100644 --- a/src/digital-components/salesforce-webchat/salesforce-helper-dev.js +++ b/src/digital-components/salesforce-webchat/salesforce-helper-dev.js @@ -8,54 +8,59 @@ The code below is generated from salesforce but modified in the following ways: */ export function initializeSalesforceWebchatForDev() { - var initESW = function(gslbBaseURL) { - let embedded_svc = window.embedded_svc; - embedded_svc.settings.displayHelpButton = true; //Or false - embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US' + var initESW = function (gslbBaseURL) { + let embedded_svc = window.embedded_svc; + embedded_svc.settings.displayHelpButton = true; //Or false + embedded_svc.settings.language = ""; //For example, enter 'en' or 'en-US' - //embedded_svc.settings.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert) - //embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline) + //embedded_svc.settings.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert) + //embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline) - //embedded_svc.settings.loadingText = ''; //(Defaults to Loading) - //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session) + //embedded_svc.settings.loadingText = ''; //(Defaults to Loading) + //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session) - // Settings for Chat - //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { - // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. - // Returns a valid button ID. - //}; - //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields - //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId - //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) + // Settings for Chat + //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { + // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. + // Returns a valid button ID. + //}; + //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields + //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId + //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) - embedded_svc.settings.enabledFeatures = ['LiveAgent']; - embedded_svc.settings.entryFeature = 'LiveAgent'; + embedded_svc.settings.enabledFeatures = ["LiveAgent"]; + embedded_svc.settings.entryFeature = "LiveAgent"; - embedded_svc.init( - 'https://safelite2--dev.sandbox.my.salesforce.com', - 'https://safelite2--dev.sandbox.my.salesforce-sites.com/chat', - gslbBaseURL, - '00D6s0000008r6A', - 'Sales_Central_Snap_in', - { - baseLiveAgentContentURL: 'https://c.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/content', - deploymentId: '572Wr0000017xKX', - buttonId: '573Wr000000CpgH', - baseLiveAgentURL: 'https://d.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/chat', - eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04IWr000003yKq9MAE_1961681659a', - isOfflineSupportEnabled: false - } - ); - }; + embedded_svc.init( + "https://safelite2--dev.sandbox.my.salesforce.com", + "https://safelite2--dev.sandbox.my.salesforce-sites.com/chat", + gslbBaseURL, + "00D6s0000008r6A", + "Sales_Central_Snap_in", + { + baseLiveAgentContentURL: + "https://c.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/content", + deploymentId: "572Wr0000017xKX", + buttonId: "573Wr000000CpgH", + baseLiveAgentURL: "https://d.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/chat", + eswLiveAgentDevName: + "EmbeddedServiceLiveAgent_Parent04IWr000003yKq9MAE_1961681659a", + isOfflineSupportEnabled: false, + } + ); + }; - if (!window.embedded_svc) { - var s = document.createElement('script'); - s.setAttribute('src', 'https://safelite2--dev.sandbox.my.salesforce.com/embeddedservice/5.0/esw.min.js'); - s.onload = function() { - initESW(null); - }; - document.body.appendChild(s); - } else { - initESW('https://service.force.com'); - } -} \ No newline at end of file + if (!window.embedded_svc) { + var s = document.createElement("script"); + s.setAttribute( + "src", + "https://safelite2--dev.sandbox.my.salesforce.com/embeddedservice/5.0/esw.min.js" + ); + s.onload = function () { + initESW(null); + }; + document.body.appendChild(s); + } else { + initESW("https://service.force.com"); + } +} diff --git a/src/digital-components/salesforce-webchat/salesforce-helper-prod.js b/src/digital-components/salesforce-webchat/salesforce-helper-prod.js index f76a264b9..224f3d72e 100644 --- a/src/digital-components/salesforce-webchat/salesforce-helper-prod.js +++ b/src/digital-components/salesforce-webchat/salesforce-helper-prod.js @@ -8,54 +8,56 @@ The code below is generated from salesforce but modified in the following ways: */ export function initializeSalesforceWebchatForProd(embedded_svc) { - var initESW = function(gslbBaseURL) { - let embedded_svc = window.embedded_svc; - embedded_svc.settings.displayHelpButton = true; //Or false - embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US' + var initESW = function (gslbBaseURL) { + let embedded_svc = window.embedded_svc; + embedded_svc.settings.displayHelpButton = true; //Or false + embedded_svc.settings.language = ""; //For example, enter 'en' or 'en-US' - //embedded_svc.settings.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert) - //embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline) + //embedded_svc.settings.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert) + //embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline) - //embedded_svc.settings.loadingText = ''; //(Defaults to Loading) - //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session) + //embedded_svc.settings.loadingText = ''; //(Defaults to Loading) + //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session) - // Settings for Chat - //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { - // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. - // Returns a valid button ID. - //}; - //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields - //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId - //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) + // Settings for Chat + //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { + // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. + // Returns a valid button ID. + //}; + //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields + //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId + //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) - embedded_svc.settings.enabledFeatures = ['LiveAgent']; - embedded_svc.settings.entryFeature = 'LiveAgent'; + embedded_svc.settings.enabledFeatures = ["LiveAgent"]; + embedded_svc.settings.entryFeature = "LiveAgent"; - embedded_svc.init( - 'https://safelite2.my.salesforce.com', - 'https://safelite2.my.salesforce-sites.com/chat', - gslbBaseURL, - '00D3t000004nvsT', - 'Sales_Central_Snap_in', - { - baseLiveAgentContentURL: 'https://c.la13-core2.sfdc-lywfpd.salesforceliveagent.com/content', - deploymentId: '5723t0000008wWB', - buttonId: '5733t000000D90z', - baseLiveAgentURL: 'https://d.la13-core2.sfdc-lywfpd.salesforceliveagent.com/chat', - eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I3t000000Cq0SEAS_188de1871ea', - isOfflineSupportEnabled: false - } - ); - }; + embedded_svc.init( + "https://safelite2.my.salesforce.com", + "https://safelite2.my.salesforce-sites.com/chat", + gslbBaseURL, + "00D3t000004nvsT", + "Sales_Central_Snap_in", + { + baseLiveAgentContentURL: + "https://c.la13-core2.sfdc-lywfpd.salesforceliveagent.com/content", + deploymentId: "5723t0000008wWB", + buttonId: "5733t000000D90z", + baseLiveAgentURL: "https://d.la13-core2.sfdc-lywfpd.salesforceliveagent.com/chat", + eswLiveAgentDevName: + "EmbeddedServiceLiveAgent_Parent04I3t000000Cq0SEAS_188de1871ea", + isOfflineSupportEnabled: false, + } + ); + }; - if (!window.embedded_svc) { - var s = document.createElement('script'); - s.setAttribute('src', 'https://safelite2.my.salesforce.com/embeddedservice/5.0/esw.min.js'); - s.onload = function() { - initESW(null); - }; - document.body.appendChild(s); - } else { - initESW('https://service.force.com'); - } -} \ No newline at end of file + if (!window.embedded_svc) { + var s = document.createElement("script"); + s.setAttribute("src", "https://safelite2.my.salesforce.com/embeddedservice/5.0/esw.min.js"); + s.onload = function () { + initESW(null); + }; + document.body.appendChild(s); + } else { + initESW("https://service.force.com"); + } +} diff --git a/src/digital-components/salesforce-webchat/salesforce-helper-qa.js b/src/digital-components/salesforce-webchat/salesforce-helper-qa.js index 2d0ee1718..ef08d42de 100644 --- a/src/digital-components/salesforce-webchat/salesforce-helper-qa.js +++ b/src/digital-components/salesforce-webchat/salesforce-helper-qa.js @@ -8,55 +8,60 @@ The code below is generated from salesforce but modified in the following ways: */ export function initializeSalesforceWebchatForQa() { - var initESW = function(gslbBaseURL) { + var initESW = function (gslbBaseURL) { let embedded_svc = window.embedded_svc; embedded_svc.settings.displayHelpButton = true; //Or false - embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US' - + embedded_svc.settings.language = ""; //For example, enter 'en' or 'en-US' + //embedded_svc.settings.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert) //embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline) - + //embedded_svc.settings.loadingText = ''; //(Defaults to Loading) //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session) - + // Settings for Chat //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { - // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. - // Returns a valid button ID. + // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. + // Returns a valid button ID. //}; //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) - - embedded_svc.settings.enabledFeatures = ['LiveAgent']; - embedded_svc.settings.entryFeature = 'LiveAgent'; - + + embedded_svc.settings.enabledFeatures = ["LiveAgent"]; + embedded_svc.settings.entryFeature = "LiveAgent"; + embedded_svc.init( - 'https://safelite2--safeliteua.sandbox.my.salesforce.com', - 'https://safelite2--safeliteua.sandbox.my.salesforce-sites.com/chat', - gslbBaseURL, - '00DDJ000000HRqO', - 'Sales_Central_Snap_in', - { - baseLiveAgentContentURL: 'https://c.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/content', - deploymentId: '572DJ00000001j3', - buttonId: '573DJ00000001ur', - baseLiveAgentURL: 'https://d.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/chat', - eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04IDJ0000008OZk2AM_1883057c9a6', - isOfflineSupportEnabled: false - } + "https://safelite2--safeliteua.sandbox.my.salesforce.com", + "https://safelite2--safeliteua.sandbox.my.salesforce-sites.com/chat", + gslbBaseURL, + "00DDJ000000HRqO", + "Sales_Central_Snap_in", + { + baseLiveAgentContentURL: + "https://c.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/content", + deploymentId: "572DJ00000001j3", + buttonId: "573DJ00000001ur", + baseLiveAgentURL: "https://d.la12s-core1.sfdc-8tgtt5.salesforceliveagent.com/chat", + eswLiveAgentDevName: + "EmbeddedServiceLiveAgent_Parent04IDJ0000008OZk2AM_1883057c9a6", + isOfflineSupportEnabled: false, + } ); - }; - - if (!window.embedded_svc) { - var s = document.createElement('script'); - s.setAttribute('src', 'https://safelite2--safeliteua.sandbox.my.salesforce.com/embeddedservice/5.0/esw.min.js'); - s.onload = function() { - initESW(null); + }; + + if (!window.embedded_svc) { + var s = document.createElement("script"); + s.setAttribute( + "src", + "https://safelite2--safeliteua.sandbox.my.salesforce.com/embeddedservice/5.0/esw.min.js" + ); + s.onload = function () { + initESW(null); }; document.body.appendChild(s); - } else { - initESW('https://service.force.com'); - } -} \ No newline at end of file + } else { + initESW("https://service.force.com"); + } +} diff --git a/src/digital-components/salesforce-webchat/salesforce-webchat.vue b/src/digital-components/salesforce-webchat/salesforce-webchat.vue index 33c4bb8d0..58da503fa 100644 --- a/src/digital-components/salesforce-webchat/salesforce-webchat.vue +++ b/src/digital-components/salesforce-webchat/salesforce-webchat.vue @@ -11,14 +11,13 @@ import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod"; export default { name: "salesforceWebchat", data() { - return { - } + return {}; }, props: { hideSalesforceWebchatLaunchButton: { type: Boolean, - default: false - } + default: false, + }, }, mounted() { // Load in script from salesforce CDN @@ -27,25 +26,22 @@ export default { script.onload = () => { switch (process.env.VUE_APP_CURRENT_ENVIRONMENT) { case "Prod": - initializeSalesforceWebchatForProd() + initializeSalesforceWebchatForProd(); break; case "QA": case "SysTest": - initializeSalesforceWebchatForQa() + initializeSalesforceWebchatForQa(); break; case "Dev": case "Localhost": - initializeSalesforceWebchatForDev() + initializeSalesforceWebchatForDev(); break; } - - } + }; document.body.appendChild(script); }, - methods: { - }, - computed: { - }, + methods: {}, + computed: {}, components: {}, }; diff --git a/src/fmg-components/funnel-header/funnel-header.vue b/src/fmg-components/funnel-header/funnel-header.vue index 23f7c0ed9..226941652 100644 --- a/src/fmg-components/funnel-header/funnel-header.vue +++ b/src/fmg-components/funnel-header/funnel-header.vue @@ -2,9 +2,7 @@