Changeset 3082168
- Timestamp:
- 05/07/2024 12:12:11 AM (2 years ago)
- Location:
- staffing-engine-chatbot
- Files:
-
- 6 edited
- 1 copied
-
tags/0.9.7 (copied) (copied from staffing-engine-chatbot/trunk)
-
tags/0.9.7/public/js/se-chatbot.js (modified) (1 diff)
-
tags/0.9.7/readme.txt (modified) (2 diffs)
-
tags/0.9.7/staffing-engine-chatbot.php (modified) (3 diffs)
-
trunk/public/js/se-chatbot.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/staffing-engine-chatbot.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
staffing-engine-chatbot/tags/0.9.7/public/js/se-chatbot.js
r3051946 r3082168 1 !function(){"use strict";(async()=>{const t="se-open-state",e="se-open-timestamp",n=window.innerWidth<=768,a=()=>{if(SE_RWC_SETTINGS)return SE_RWC_SETTINGS},o=(t,e)=>{console.error(`[SEChat Plugin] unable to load chatbot: ${t}`),e&&console.error(e)},i=(t,e,n,a,o)=>{t&&(o&&n(t[a]),t.addEventListener(e,(t=>n(t.target[a]))))},c=()=>{ const t=window.SEChatbot;t.isChatOpen||t.openChat()},r=async()=>{const t=(()=>{if(SE_RWC_SCRIPT_LOCATION)return SE_RWC_SCRIPT_LOCATION})();if(t)try{await import(t)}catch(t){return void o("richWebChat.umd.min.js could not be imported",t)}else o("richWebChat.umd.min.js not found")},s=()=>{const t=window.richWebChat.default;if(!t)return void o("richWebChat is undefined");const e=(()=>{if(SE_RWC_OPTIONS)return SE_RWC_OPTIONS})();if(!e)return void o("chat options not provided");const n=new t(Object.assign(e,{container:"#staffing-engine-chatbot",pageData:{url:window.location.href}}));window.SEChatbot=n},d=()=>{try{if("new"===(()=>{if(SE_RWC_VERSION)return SE_RWC_VERSION})()){const t=window.SEChatbot,e=document.querySelector("#staffing-engine-chatbot button.rwc-embed__close-btn");i(e,"click",(()=>t.runGlobalCommand({name:"closeChat"})))}else{const t=window.richWebChat.Sdk,e=document.querySelector('#staffing-engine-chatbot button[aria-label="Close chat"]');i(e,"click",(()=>t.sendGlobalCommand({name:"close"})))}}catch(t){o("failed to register global command listeners",t)}},l=()=>{try{const t=a().thumbIconSize;if(t&&"default"!==t){const e=document.querySelector("#staffing-engine-chatbot .rwc-embed-thumb");if(!e)return;e.classList.add(`se-chatbot-thumb--${t}`)}}catch(t){o("failed to apply chatbot settings",t)}},u=async()=>{try{await(i=document.querySelector("#staffing-engine-chatbot"),r="rwc-embed",new Promise((t=>{const e=new MutationObserver((n=>{n.forEach((n=>{n.target.className.includes(r)&&(e.disconnect(),t())}))}));e.observe(i,{subtree:!0,childList:!0})})));const o=localStorage.getItem(t),s=((t,e)=>{if(void 0===t)return!1;if(!e)return!1;const n=new Date;return n.setUTCDate(n.getUTCDate()-1),new Date(e)>=n})(o,localStorage.getItem(e));if(s&&"closed"===o)return;if(s&&"open"===o)return void c();if((()=>{const t=a();return"disable"!==t.autoExpandState&&("enable-not-mobile"!==t.autoExpandState||!n)&&0!==t.autoExpandDelay})()){const t=a().autoExpandDelay;if(!t||0===t)return;setTimeout((()=>{c()}),t)}}catch(t){o("failed to manage open state",t)}var i,r},h=async()=>{await r(),await s(),d(),(()=>{try{const n=window.richWebChat.Sdk,a=t=>t.isOpen?"open":"closed";n.on("toggle-chat-window",(n=>{localStorage.setItem(t,a(n)),localStorage.setItem(e,(new Date).toUTCString())}))}catch(t){o("failed to register chat state listener",t)}})(),l(),await u()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(async()=>{await h()}),!1):await h()})()}();1 !function(){"use strict";(async()=>{const t="se-open-state",e="se-open-timestamp",n=window.innerWidth<=768,a=()=>{if(SE_RWC_SETTINGS)return SE_RWC_SETTINGS},o=(t,e)=>{console.error(`[SEChat Plugin] unable to load chatbot: ${t}`),e&&console.error(e)},i=(t,e,n,a,o)=>{t&&(o&&n(t[a]),t.addEventListener(e,(t=>n(t.target[a]))))},c=()=>{window.SEChatbot.openChat()},r=async()=>{const t=(()=>{if(SE_RWC_SCRIPT_LOCATION)return SE_RWC_SCRIPT_LOCATION})();if(t)try{await import(t)}catch(t){return void o("richWebChat.umd.min.js could not be imported",t)}else o("richWebChat.umd.min.js not found")},s=()=>{const t=window.richWebChat.default;if(!t)return void o("richWebChat is undefined");const e=(()=>{if(SE_RWC_OPTIONS)return SE_RWC_OPTIONS})();if(!e)return void o("chat options not provided");const n=new t(Object.assign(e,{container:"#staffing-engine-chatbot",pageData:{url:window.location.href}}));window.SEChatbot=n},d=()=>{try{if("new"===(()=>{if(SE_RWC_VERSION)return SE_RWC_VERSION})()){const t=window.SEChatbot,e=document.querySelector("#staffing-engine-chatbot button.rwc-embed__close-btn");i(e,"click",(()=>t.runGlobalCommand({name:"closeChat"})))}else{const t=window.richWebChat.Sdk,e=document.querySelector('#staffing-engine-chatbot button[aria-label="Close chat"]');i(e,"click",(()=>t.sendGlobalCommand({name:"close"})))}}catch(t){o("failed to register global command listeners",t)}},l=()=>{try{const t=a().thumbIconSize;if(t&&"default"!==t){const e=document.querySelector("#staffing-engine-chatbot .rwc-embed-thumb");if(!e)return;e.classList.add(`se-chatbot-thumb--${t}`)}}catch(t){o("failed to apply chatbot settings",t)}},u=async()=>{try{await(i=document.querySelector("#staffing-engine-chatbot"),r="rwc-embed-thumb",new Promise((t=>{const e=new MutationObserver((n=>{n.forEach((n=>{n.target.className.includes(r)&&(e.disconnect(),t())}))}));e.observe(i,{subtree:!0,childList:!0})})));const o=localStorage.getItem(t),s=((t,e)=>{if(void 0===t)return!1;if(!e)return!1;const n=new Date;return n.setUTCDate(n.getUTCDate()-1),new Date(e)>=n})(o,localStorage.getItem(e));if(s&&"closed"===o)return;if(s&&"open"===o)return void c();if((()=>{const t=a();return"disable"!==t.autoExpandState&&("enable-not-mobile"!==t.autoExpandState||!n)&&0!==t.autoExpandDelay})()){const t=a().autoExpandDelay;if(!t||0===t)return;setTimeout((()=>{c()}),t)}}catch(t){o("failed to manage open state",t)}var i,r},h=async()=>{await r(),await s(),d(),(()=>{try{const n=window.richWebChat.Sdk,a=t=>t.isOpen?"open":"closed";n.on("toggle-chat-window",(n=>{localStorage.setItem(t,a(n)),localStorage.setItem(e,(new Date).toUTCString())}))}catch(t){o("failed to register chat state listener",t)}})(),l(),await u()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(async()=>{await h()}),!1):await h()})()}(); -
staffing-engine-chatbot/tags/0.9.7/readme.txt
r3051946 r3082168 4 4 - Donate Link: https://staffingengine.ai/ 5 5 - Tags: chatbot, live chat, AI, staffing, recruiting 6 - Stable tag: 0.9. 66 - Stable tag: 0.9.7 7 7 - Requires at least: 5.5 8 - Tested up to: 6. 3.18 - Tested up to: 6.5.2 9 9 - Requires PHP: 7.1 10 10 - License: GPLv2 or later … … 120 120 121 121 - improve compatibility of open state sync feature with auto expand settings 122 123 = 0.9.7 : 2024-5-2 = 124 125 - tested up to wordpress 6.5.2 126 - improve reliability of open/close state sync across tabs, particularly with wordpress 6.5.x -
staffing-engine-chatbot/tags/0.9.7/staffing-engine-chatbot.php
r3051946 r3082168 3 3 * @package Staffing Engine - Chatbot 4 4 * @author Staffing Engine 5 * @copyright (c) 202 3staffing Engine5 * @copyright (c) 2024 staffing Engine 6 6 * @license GPL-3.0-or-later 7 * @version 0.9. 67 * @version 0.9.7 8 8 * 9 9 * @wordpress-plugin … … 15 15 * License: GPL v3 or later 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html 17 * Version: 0.9. 617 * Version: 0.9.7 18 18 * Requires at least: 5.5 19 19 * Requires PHP: 7.1 … … 44 44 } 45 45 46 define( 'SE_CHAT_VERSION', '0.9. 6' );46 define( 'SE_CHAT_VERSION', '0.9.7' ); 47 47 define( 'CURRENT_WP_VERSION', $wp_version ); 48 48 -
staffing-engine-chatbot/trunk/public/js/se-chatbot.js
r3051946 r3082168 1 !function(){"use strict";(async()=>{const t="se-open-state",e="se-open-timestamp",n=window.innerWidth<=768,a=()=>{if(SE_RWC_SETTINGS)return SE_RWC_SETTINGS},o=(t,e)=>{console.error(`[SEChat Plugin] unable to load chatbot: ${t}`),e&&console.error(e)},i=(t,e,n,a,o)=>{t&&(o&&n(t[a]),t.addEventListener(e,(t=>n(t.target[a]))))},c=()=>{ const t=window.SEChatbot;t.isChatOpen||t.openChat()},r=async()=>{const t=(()=>{if(SE_RWC_SCRIPT_LOCATION)return SE_RWC_SCRIPT_LOCATION})();if(t)try{await import(t)}catch(t){return void o("richWebChat.umd.min.js could not be imported",t)}else o("richWebChat.umd.min.js not found")},s=()=>{const t=window.richWebChat.default;if(!t)return void o("richWebChat is undefined");const e=(()=>{if(SE_RWC_OPTIONS)return SE_RWC_OPTIONS})();if(!e)return void o("chat options not provided");const n=new t(Object.assign(e,{container:"#staffing-engine-chatbot",pageData:{url:window.location.href}}));window.SEChatbot=n},d=()=>{try{if("new"===(()=>{if(SE_RWC_VERSION)return SE_RWC_VERSION})()){const t=window.SEChatbot,e=document.querySelector("#staffing-engine-chatbot button.rwc-embed__close-btn");i(e,"click",(()=>t.runGlobalCommand({name:"closeChat"})))}else{const t=window.richWebChat.Sdk,e=document.querySelector('#staffing-engine-chatbot button[aria-label="Close chat"]');i(e,"click",(()=>t.sendGlobalCommand({name:"close"})))}}catch(t){o("failed to register global command listeners",t)}},l=()=>{try{const t=a().thumbIconSize;if(t&&"default"!==t){const e=document.querySelector("#staffing-engine-chatbot .rwc-embed-thumb");if(!e)return;e.classList.add(`se-chatbot-thumb--${t}`)}}catch(t){o("failed to apply chatbot settings",t)}},u=async()=>{try{await(i=document.querySelector("#staffing-engine-chatbot"),r="rwc-embed",new Promise((t=>{const e=new MutationObserver((n=>{n.forEach((n=>{n.target.className.includes(r)&&(e.disconnect(),t())}))}));e.observe(i,{subtree:!0,childList:!0})})));const o=localStorage.getItem(t),s=((t,e)=>{if(void 0===t)return!1;if(!e)return!1;const n=new Date;return n.setUTCDate(n.getUTCDate()-1),new Date(e)>=n})(o,localStorage.getItem(e));if(s&&"closed"===o)return;if(s&&"open"===o)return void c();if((()=>{const t=a();return"disable"!==t.autoExpandState&&("enable-not-mobile"!==t.autoExpandState||!n)&&0!==t.autoExpandDelay})()){const t=a().autoExpandDelay;if(!t||0===t)return;setTimeout((()=>{c()}),t)}}catch(t){o("failed to manage open state",t)}var i,r},h=async()=>{await r(),await s(),d(),(()=>{try{const n=window.richWebChat.Sdk,a=t=>t.isOpen?"open":"closed";n.on("toggle-chat-window",(n=>{localStorage.setItem(t,a(n)),localStorage.setItem(e,(new Date).toUTCString())}))}catch(t){o("failed to register chat state listener",t)}})(),l(),await u()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(async()=>{await h()}),!1):await h()})()}();1 !function(){"use strict";(async()=>{const t="se-open-state",e="se-open-timestamp",n=window.innerWidth<=768,a=()=>{if(SE_RWC_SETTINGS)return SE_RWC_SETTINGS},o=(t,e)=>{console.error(`[SEChat Plugin] unable to load chatbot: ${t}`),e&&console.error(e)},i=(t,e,n,a,o)=>{t&&(o&&n(t[a]),t.addEventListener(e,(t=>n(t.target[a]))))},c=()=>{window.SEChatbot.openChat()},r=async()=>{const t=(()=>{if(SE_RWC_SCRIPT_LOCATION)return SE_RWC_SCRIPT_LOCATION})();if(t)try{await import(t)}catch(t){return void o("richWebChat.umd.min.js could not be imported",t)}else o("richWebChat.umd.min.js not found")},s=()=>{const t=window.richWebChat.default;if(!t)return void o("richWebChat is undefined");const e=(()=>{if(SE_RWC_OPTIONS)return SE_RWC_OPTIONS})();if(!e)return void o("chat options not provided");const n=new t(Object.assign(e,{container:"#staffing-engine-chatbot",pageData:{url:window.location.href}}));window.SEChatbot=n},d=()=>{try{if("new"===(()=>{if(SE_RWC_VERSION)return SE_RWC_VERSION})()){const t=window.SEChatbot,e=document.querySelector("#staffing-engine-chatbot button.rwc-embed__close-btn");i(e,"click",(()=>t.runGlobalCommand({name:"closeChat"})))}else{const t=window.richWebChat.Sdk,e=document.querySelector('#staffing-engine-chatbot button[aria-label="Close chat"]');i(e,"click",(()=>t.sendGlobalCommand({name:"close"})))}}catch(t){o("failed to register global command listeners",t)}},l=()=>{try{const t=a().thumbIconSize;if(t&&"default"!==t){const e=document.querySelector("#staffing-engine-chatbot .rwc-embed-thumb");if(!e)return;e.classList.add(`se-chatbot-thumb--${t}`)}}catch(t){o("failed to apply chatbot settings",t)}},u=async()=>{try{await(i=document.querySelector("#staffing-engine-chatbot"),r="rwc-embed-thumb",new Promise((t=>{const e=new MutationObserver((n=>{n.forEach((n=>{n.target.className.includes(r)&&(e.disconnect(),t())}))}));e.observe(i,{subtree:!0,childList:!0})})));const o=localStorage.getItem(t),s=((t,e)=>{if(void 0===t)return!1;if(!e)return!1;const n=new Date;return n.setUTCDate(n.getUTCDate()-1),new Date(e)>=n})(o,localStorage.getItem(e));if(s&&"closed"===o)return;if(s&&"open"===o)return void c();if((()=>{const t=a();return"disable"!==t.autoExpandState&&("enable-not-mobile"!==t.autoExpandState||!n)&&0!==t.autoExpandDelay})()){const t=a().autoExpandDelay;if(!t||0===t)return;setTimeout((()=>{c()}),t)}}catch(t){o("failed to manage open state",t)}var i,r},h=async()=>{await r(),await s(),d(),(()=>{try{const n=window.richWebChat.Sdk,a=t=>t.isOpen?"open":"closed";n.on("toggle-chat-window",(n=>{localStorage.setItem(t,a(n)),localStorage.setItem(e,(new Date).toUTCString())}))}catch(t){o("failed to register chat state listener",t)}})(),l(),await u()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(async()=>{await h()}),!1):await h()})()}(); -
staffing-engine-chatbot/trunk/readme.txt
r3051946 r3082168 4 4 - Donate Link: https://staffingengine.ai/ 5 5 - Tags: chatbot, live chat, AI, staffing, recruiting 6 - Stable tag: 0.9. 66 - Stable tag: 0.9.7 7 7 - Requires at least: 5.5 8 - Tested up to: 6. 3.18 - Tested up to: 6.5.2 9 9 - Requires PHP: 7.1 10 10 - License: GPLv2 or later … … 120 120 121 121 - improve compatibility of open state sync feature with auto expand settings 122 123 = 0.9.7 : 2024-5-2 = 124 125 - tested up to wordpress 6.5.2 126 - improve reliability of open/close state sync across tabs, particularly with wordpress 6.5.x -
staffing-engine-chatbot/trunk/staffing-engine-chatbot.php
r3051946 r3082168 3 3 * @package Staffing Engine - Chatbot 4 4 * @author Staffing Engine 5 * @copyright (c) 202 3staffing Engine5 * @copyright (c) 2024 staffing Engine 6 6 * @license GPL-3.0-or-later 7 * @version 0.9. 67 * @version 0.9.7 8 8 * 9 9 * @wordpress-plugin … … 15 15 * License: GPL v3 or later 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html 17 * Version: 0.9. 617 * Version: 0.9.7 18 18 * Requires at least: 5.5 19 19 * Requires PHP: 7.1 … … 44 44 } 45 45 46 define( 'SE_CHAT_VERSION', '0.9. 6' );46 define( 'SE_CHAT_VERSION', '0.9.7' ); 47 47 define( 'CURRENT_WP_VERSION', $wp_version ); 48 48
Note: See TracChangeset
for help on using the changeset viewer.