j-queue-sdk-web
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("io")):"function"==typeof define&&define.amd?define(["io"],e):"object"==typeof exports?exports.ConnectionJQueueSdkWeb=e(require("io")):t.ConnectionJQueueSdkWeb=e(t.io)}(this,(t=>(()=>{"use strict";var e={156:function(t,e,n){var s=this&&this.__awaiter||function(t,e,n,s){return new(n||(n=Promise))((function(i,o){function a(t){try{r(s.next(t))}catch(t){o(t)}}function u(t){try{r(s.throw(t))}catch(t){o(t)}}function r(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}r((s=s.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=n(676),o=n(613);class a{static log(t,e="info",n){(0,{error:console.error,warn:console.warn,info:console.log}[e])(`[J-Queue] ${t}`,null!=n?n:"")}static injectStyles(t){if("undefined"==typeof document||document.querySelector("style[data-jqueue-styles]"))return;const e=document.createElement("style");e.dataset.jqueueStyles="",e.textContent=this.CONFIG.STYLES.LOADER(t),document.head.appendChild(e)}static createPopup(t,e){if("undefined"==typeof document)return;this.removePopup();const n=document.createElement("div");n.id="__jqueue_popup",n.style.cssText=null!=e?e:this.CONFIG.STYLES.POPUP,n.innerHTML=t,document.body.appendChild(n),this.state.popupEl=n}static removePopup(){var t;"undefined"!=typeof document&&(null===(t=this.state.popupEl)||void 0===t||t.remove(),this.state.popupEl=null)}static toggleNavigation(t){"undefined"!=typeof window&&this.state.isNavigating!==t&&(window.onbeforeunload=t?()=>{var t;return(null===(t=this.state.queueStatus)||void 0===t?void 0:t.uuid)&&this.state.apiUrl&&this.sendLeaveRequest(),"Navigation is currently blocked."}:null,this.state.isNavigating=t)}static sendLeaveRequest(){const{apiUrl:t,queueStatus:e}=this.state;if(t&&(null==e?void 0:e.uuid))try{const n=JSON.stringify({uuid:e.uuid});navigator.sendBeacon(`${t}${this.CONFIG.API_ENDPOINTS.LEAVE}`,n)}catch(t){this.log("Leave API (sendBeacon) failed","error",t)}}static getDefaultPopupContent(t,e="ko",n){var s;const i=this.CONFIG.MESSAGES[e],o=null!==(s=null==n?void 0:n.textColor)&&void 0!==s?s:"#276bff";return`\n <div style="display: flex; flex-direction: column; align-items: center; width: 100%;">\n <div style="padding: 20px; text-align: center;">\n <p style="font-size: 16px; line-height: 1.5; margin: 0 0 20px 0; color: ${o};">\n ${i.MESS_1}<br>${i.MESS_2}\n </p>\n <div style="position: relative; width: 150px; height: 150px; margin: 20px auto;">\n <span style="position: absolute; inset: 0;" class="loader-jqueue_popup"></span>\n <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center;">\n <div style="font-size: 14px; color: ${o};">${i.MESS_3}</div>\n <div style="font-size: 36px; color: ${o}; font-weight: bold;">${t}</div>\n </div>\n </div>\n </div>\n </div>\n `}static getAdjustedPollInterval(t){return t>=100?this.CONFIG.TTL_INTERVAL+t/100*1e3:this.CONFIG.TTL_INTERVAL}static clearInterval(){this.ttlInterval&&(clearInterval(this.ttlInterval),this.ttlInterval=null)}static startStatusEmission(t){this.clearInterval(),this.ttlInterval=setInterval((()=>{var t,e;(null===(t=this.state.socket)||void 0===t?void 0:t.connected)&&this.state.socketConfig&&(this.state.socket.emit("online-queue:status",Object.assign(Object.assign({},this.state.socketConfig.query),(null===(e=this.state.queueStatus)||void 0===e?void 0:e.uuid)?{uuid:this.state.queueStatus.uuid}:{})),this.log("Sent online-queue:status"))}),t)}static startCheckDisconnectedEmission(){this.clearInterval(),this.ttlInterval=setInterval((()=>{var t,e;(null===(t=this.state.socket)||void 0===t?void 0:t.connected)&&(null===(e=this.state.queueStatus)||void 0===e?void 0:e.uuid)&&(this.state.socket.emit("online-queue:check-disconnected",{uuid:this.state.queueStatus.uuid}),this.log("Sent online-queue:check-disconnected"))}),this.CONFIG.CHECK_DISCONNECTED_INTERVAL)}static updateQueueStatus({status:t,position:e,uuid:n}){this.state.queueStatus={status:t,position:e,uuid:n},this.state.storageTokenKey&&"undefined"!=typeof sessionStorage&&sessionStorage.setItem(this.state.storageTokenKey,n),this.statusListeners.forEach((s=>s({status:t,position:e,uuid:n})))}static handleStatusUpdate(t,e,n){var s,i;if(!t)return void this.log("Invalid status response received","warn");const{status:a,position:u}=t;switch(this.updateQueueStatus(t),a){case o.OnlineQueueStatus.ACTIVE:this.startCheckDisconnectedEmission(),this.removePopup(),this.toggleNavigation(!1);break;case o.OnlineQueueStatus.WAITING:const t=this.getAdjustedPollInterval(u);t!==n.value&&(n.value=t,this.startStatusEmission(t));const a="function"==typeof(null==e?void 0:e.content)?e.content(u):null!==(s=null==e?void 0:e.content)&&void 0!==s?s:this.getDefaultPopupContent(u,null!==(i=null==e?void 0:e.language)&&void 0!==i?i:"ko",e);this.createPopup(a,null==e?void 0:e.style),this.toggleNavigation(!0);break;case o.OnlineQueueStatus.EMPTY:this.log("[j-queue-sdk-web] - Connect key does not exist!","error"),this.clearInterval()}}static setupSocket(t,e,n,s,o){var a;const u=(0,i.io)(t,{query:Object.assign(Object.assign({},e.query),{uuid:n}),transports:e.transports||["websocket"],reconnectionAttempts:e.reconnectionAttempts||3,reconnectionDelay:e.reconnectionDelay||1e3});this.state.socket=u;const r={value:this.getAdjustedPollInterval(0)};u.on("connect",(()=>{this.log("Socket.IO connected"),this.startStatusEmission(r.value)})),u.on("online-queue:status",(t=>{this.handleStatusUpdate(t,o,r)})),Object.entries(s||{}).forEach((([t,e])=>{u.on(t,(t=>e(t,{createPopup:this.createPopup.bind(this),removePopup:this.removePopup.bind(this),preventNavigation:()=>this.toggleNavigation(!0),allowNavigation:()=>this.toggleNavigation(!1)})))})),u.on("connect_error",(t=>this.log("Socket.IO connection error","error",t))),u.on("disconnect",(t=>{this.log(`Socket.IO disconnected: ${t}`,"warn"),this.clearInterval()})),this.state.storageConnectKey&&"undefined"!=typeof sessionStorage&&sessionStorage.setItem(this.state.storageConnectKey,`${null===(a=null==e?void 0:e.query)||void 0===a?void 0:a.connect_key}`)}static addStatusListener(t){this.statusListeners.push(t)}static removeStatusListener(t){this.statusListeners=this.statusListeners.filter((e=>e!==t))}static getQueueStatus(){return this.state.queueStatus}static init(t){return s(this,arguments,void 0,(function*({wsUrl:t,apiUrl:e="",socketConfig:n={},popupConfig:s={},customEvents:i={},option:o={storageTokenKey:this.CONFIG.STORAGE_TOKEN_KEY,storageConnectKey:this.CONFIG.STORAGE_CONNECT_KEY}}){var a,u;if(!t)throw new Error("Both wsUrl are required");if("undefined"==typeof window)throw new Error("Socket.IO is not supported in this environment");this.state=Object.assign(Object.assign({},this.state),{storageTokenKey:null!==(a=o.storageTokenKey)&&void 0!==a?a:this.CONFIG.STORAGE_TOKEN_KEY,storageConnectKey:null!==(u=o.storageConnectKey)&&void 0!==u?u:this.CONFIG.STORAGE_CONNECT_KEY,wsUrl:t,apiUrl:e,socketConfig:n}),this.injectStyles(s);try{return this.setupSocket(t,n,"",i,s),{disconnect:()=>this.disconnect()}}catch(t){return this.log("Initialization failed","error",t),{disconnect:()=>this.disconnect()}}}))}static cleanup(){this.state.storageTokenKey&&"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(this.state.storageTokenKey),this.state.storageConnectKey&&"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(this.state.storageConnectKey),this.clearInterval(),this.removePopup(),this.toggleNavigation(!1),this.state={socket:null,popupEl:null,isNavigating:!1,storageTokenKey:null,storageConnectKey:null,queueStatus:null,wsUrl:null,apiUrl:null,socketConfig:null},this.statusListeners=[]}static disconnect(){var t,e,n;(null===(t=this.state.socket)||void 0===t?void 0:t.connected)&&(null===(e=this.state.queueStatus)||void 0===e?void 0:e.uuid)&&this.sendLeaveRequest(),null===(n=this.state.socket)||void 0===n||n.disconnect(),this.cleanup()}}a.CONFIG={TTL_INTERVAL:2e3,CHECK_DISCONNECTED_INTERVAL:3e4,STORAGE_TOKEN_KEY:"queue_token",STORAGE_CONNECT_KEY:"connect_key",API_ENDPOINTS:{LEAVE:"/leave"},MESSAGES:{en:{MESS_1:"Progressing sequentially based on access order.",MESS_2:"We are doing our best to proceed quickly.",MESS_3:"Queue Number"},ko:{MESS_1:"접속한 순서대로 순차적 진행 중입니다.",MESS_2:"빠른 서비스 진행을 위해 최선을 다하고 있습니다.",MESS_3:"대기순번"}},STYLES:{POPUP:"\n position: fixed;\n inset: 0;\n width: 100%;\n height: 100%;\n background: #fff;\n z-index: 10000;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 28px;\n ",LOADER:t=>{var e,n;return`\n .loader-jqueue_popup {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n display: inline-block;\n position: relative;\n background: linear-gradient(0deg, ${null!==(e=null==t?void 0:t.loaderGradientEnd)&&void 0!==e?e:"rgba(39,107,255,0.05)"} 33%, ${null!==(n=null==t?void 0:t.loaderGradientStart)&&void 0!==n?n:"#276bff"} 100%);\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n .loader-jqueue_popup::after {\n content: '';\n box-sizing: border-box;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 96%;\n height: 96%;\n border-radius: 50%;\n background: #fff;\n }\n @keyframes rotation {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `}}},a.state={socket:null,popupEl:null,isNavigating:!1,storageTokenKey:null,storageConnectKey:null,queueStatus:null,wsUrl:null,apiUrl:null,socketConfig:null},a.ttlInterval=null,a.statusListeners=[],"undefined"!=typeof window&&(window.ConnectionJQueueSdkWeb=a),e.default=a},613:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OnlineQueueStatus=void 0,function(t){t[t.WAITING=1]="WAITING",t[t.ACTIVE=2]="ACTIVE",t[t.EMPTY=3]="EMPTY"}(n||(e.OnlineQueueStatus=n={}))},676:e=>{e.exports=t}},n={},s=function t(s){var i=n[s];if(void 0!==i)return i.exports;var o=n[s]={exports:{}};return e[s].call(o.exports,o,o.exports,t),o.exports}(156);return s.default})())); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("io")):"function"==typeof define&&define.amd?define(["io"],e):"object"==typeof exports?exports.ConnectionJQueueSdkWeb=e(require("io")):t.ConnectionJQueueSdkWeb=e(t.io)}(this,(t=>(()=>{"use strict";var e={156:function(t,e,n){var s=this&&this.__awaiter||function(t,e,n,s){return new(n||(n=Promise))((function(i,o){function a(t){try{r(s.next(t))}catch(t){o(t)}}function u(t){try{r(s.throw(t))}catch(t){o(t)}}function r(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}r((s=s.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=n(676),o=n(613);class a{static log(t,e="info",n){(0,{error:console.error,warn:console.warn,info:console.log}[e])(`[J-Queue] ${t}`,null!=n?n:"")}static injectStyles(t){if("undefined"==typeof document||document.querySelector("style[data-jqueue-styles]"))return;const e=document.createElement("style");e.dataset.jqueueStyles="",e.textContent=this.CONFIG.STYLES.LOADER(t),document.head.appendChild(e)}static createPopup(t,e){if("undefined"==typeof document)return;this.removePopup();const n=document.createElement("div");n.id="__jqueue_popup",n.style.cssText=null!=e?e:this.CONFIG.STYLES.POPUP,n.innerHTML=t,document.body.appendChild(n),this.state.popupEl=n}static removePopup(){var t;"undefined"!=typeof document&&(null===(t=this.state.popupEl)||void 0===t||t.remove(),this.state.popupEl=null)}static toggleNavigation(t){"undefined"!=typeof window&&this.state.isNavigating!==t&&(window.onbeforeunload=t?()=>{var t;return(null===(t=this.state.queueStatus)||void 0===t?void 0:t.uuid)&&this.state.apiUrl&&this.sendLeaveRequest(),"Navigation is currently blocked."}:null,this.state.isNavigating=t)}static sendLeaveRequest(){const{apiUrl:t,queueStatus:e}=this.state;if(t&&(null==e?void 0:e.uuid))try{const n=JSON.stringify({uuid:e.uuid});navigator.sendBeacon(`${t}${this.CONFIG.API_ENDPOINTS.LEAVE}`,n)}catch(t){this.log("Leave API (sendBeacon) failed","error",t)}}static getDefaultPopupContent(t,e="ko",n){var s;const i=this.CONFIG.MESSAGES[e],o=null!==(s=null==n?void 0:n.textColor)&&void 0!==s?s:"#276bff";return`\n <div style="display: flex; flex-direction: column; align-items: center; width: 100%;">\n <div style="padding: 20px; text-align: center;">\n <p style="font-size: 16px; line-height: 1.5; margin: 0 0 20px 0; color: ${o};">\n ${i.MESS_1}<br>${i.MESS_2}\n </p>\n <div style="position: relative; width: 150px; height: 150px; margin: 20px auto;">\n <span style="position: absolute; inset: 0;" class="loader-jqueue_popup"></span>\n <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center;">\n <div style="font-size: 14px; color: ${o};">${i.MESS_3}</div>\n <div style="font-size: 36px; color: ${o}; font-weight: bold;">${t}</div>\n </div>\n </div>\n </div>\n </div>\n `}static getAdjustedPollInterval(t){return t>=100?this.CONFIG.TTL_INTERVAL+t/100*1e3:this.CONFIG.TTL_INTERVAL}static clearInterval(){this.ttlInterval&&(clearInterval(this.ttlInterval),this.ttlInterval=null)}static startStatusEmission(t){this.clearInterval(),this.ttlInterval=setInterval((()=>{var t,e;(null===(t=this.state.socket)||void 0===t?void 0:t.connected)&&this.state.socketConfig&&(this.state.socket.emit("online-queue:status",Object.assign(Object.assign({},this.state.socketConfig.query),(null===(e=this.state.queueStatus)||void 0===e?void 0:e.uuid)?{uuid:this.state.queueStatus.uuid}:{})),this.log("Sent online-queue:status"))}),t)}static startCheckDisconnectedEmission(){this.clearInterval(),this.ttlInterval=setInterval((()=>{var t,e;(null===(t=this.state.socket)||void 0===t?void 0:t.connected)&&(null===(e=this.state.queueStatus)||void 0===e?void 0:e.uuid)&&(this.state.socket.emit("online-queue:check-disconnected",{uuid:this.state.queueStatus.uuid}),this.log("Sent online-queue:check-disconnected"))}),this.CONFIG.CHECK_DISCONNECTED_INTERVAL)}static updateQueueStatus({status:t,position:e,uuid:n}){this.state.queueStatus={status:t,position:e,uuid:n},this.state.storageTokenKey&&"undefined"!=typeof sessionStorage&&sessionStorage.setItem(this.state.storageTokenKey,n),this.statusListeners.forEach((s=>s({status:t,position:e,uuid:n})))}static handleStatusUpdate(t,e,n){var s,i;if(!t)return void this.log("Invalid status response received","warn");const{status:a,position:u}=t;switch(this.updateQueueStatus(t),a){case o.OnlineQueueStatus.ACTIVE:this.startCheckDisconnectedEmission(),this.removePopup(),this.toggleNavigation(!1);break;case o.OnlineQueueStatus.WAITING:const t=this.getAdjustedPollInterval(u);t!==n.value&&(n.value=t,this.startStatusEmission(t));const a="function"==typeof(null==e?void 0:e.content)?e.content(u):null!==(s=null==e?void 0:e.content)&&void 0!==s?s:this.getDefaultPopupContent(u,null!==(i=null==e?void 0:e.language)&&void 0!==i?i:"ko",e);this.createPopup(a,null==e?void 0:e.style),this.toggleNavigation(!0);break;case o.OnlineQueueStatus.EMPTY:alert("[J-Queue] - Connect key does not exist!"),this.clearInterval()}}static setupSocket(t,e,n,s,o){var a;const u=(0,i.io)(t,{query:Object.assign(Object.assign({},e.query),{uuid:n}),transports:e.transports||["websocket"],reconnectionAttempts:e.reconnectionAttempts||3,reconnectionDelay:e.reconnectionDelay||1e3});this.state.socket=u;const r={value:this.getAdjustedPollInterval(0)};u.on("connect",(()=>{this.log("Socket.IO connected"),this.startStatusEmission(r.value)})),u.on("online-queue:status",(t=>{this.handleStatusUpdate(t,o,r)})),Object.entries(s||{}).forEach((([t,e])=>{u.on(t,(t=>e(t,{createPopup:this.createPopup.bind(this),removePopup:this.removePopup.bind(this),preventNavigation:()=>this.toggleNavigation(!0),allowNavigation:()=>this.toggleNavigation(!1)})))})),u.on("connect_error",(t=>this.log("Socket.IO connection error","error",t))),u.on("disconnect",(t=>{this.log(`Socket.IO disconnected: ${t}`,"warn"),this.clearInterval()})),this.state.storageConnectKey&&"undefined"!=typeof sessionStorage&&sessionStorage.setItem(this.state.storageConnectKey,`${null===(a=null==e?void 0:e.query)||void 0===a?void 0:a.connect_key}`)}static addStatusListener(t){this.statusListeners.push(t)}static removeStatusListener(t){this.statusListeners=this.statusListeners.filter((e=>e!==t))}static getQueueStatus(){return this.state.queueStatus}static init(t){return s(this,arguments,void 0,(function*({wsUrl:t,apiUrl:e="",socketConfig:n={},popupConfig:s={},customEvents:i={},option:o={storageTokenKey:this.CONFIG.STORAGE_TOKEN_KEY,storageConnectKey:this.CONFIG.STORAGE_CONNECT_KEY}}){var a,u;if(!t)throw new Error("Both wsUrl are required");if("undefined"==typeof window)throw new Error("Socket.IO is not supported in this environment");this.state=Object.assign(Object.assign({},this.state),{storageTokenKey:null!==(a=o.storageTokenKey)&&void 0!==a?a:this.CONFIG.STORAGE_TOKEN_KEY,storageConnectKey:null!==(u=o.storageConnectKey)&&void 0!==u?u:this.CONFIG.STORAGE_CONNECT_KEY,wsUrl:t,apiUrl:e,socketConfig:n}),this.injectStyles(s);try{return this.setupSocket(t,n,"",i,s),{disconnect:()=>this.disconnect()}}catch(t){return this.log("Initialization failed","error",t),{disconnect:()=>this.disconnect()}}}))}static cleanup(){this.state.storageTokenKey&&"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(this.state.storageTokenKey),this.state.storageConnectKey&&"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(this.state.storageConnectKey),this.clearInterval(),this.removePopup(),this.toggleNavigation(!1),this.state={socket:null,popupEl:null,isNavigating:!1,storageTokenKey:null,storageConnectKey:null,queueStatus:null,wsUrl:null,apiUrl:null,socketConfig:null},this.statusListeners=[]}static disconnect(){var t,e,n;(null===(t=this.state.socket)||void 0===t?void 0:t.connected)&&(null===(e=this.state.queueStatus)||void 0===e?void 0:e.uuid)&&this.sendLeaveRequest(),null===(n=this.state.socket)||void 0===n||n.disconnect(),this.cleanup()}}a.CONFIG={TTL_INTERVAL:2e3,CHECK_DISCONNECTED_INTERVAL:3e4,STORAGE_TOKEN_KEY:"queue_token",STORAGE_CONNECT_KEY:"connect_key",API_ENDPOINTS:{LEAVE:"/leave"},MESSAGES:{en:{MESS_1:"Progressing sequentially based on access order.",MESS_2:"We are doing our best to proceed quickly.",MESS_3:"Queue Number"},ko:{MESS_1:"접속한 순서대로 순차적 진행 중입니다.",MESS_2:"빠른 서비스 진행을 위해 최선을 다하고 있습니다.",MESS_3:"대기순번"}},STYLES:{POPUP:"\n position: fixed;\n inset: 0;\n width: 100%;\n height: 100%;\n background: #fff;\n z-index: 10000;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 28px;\n ",LOADER:t=>{var e,n;return`\n .loader-jqueue_popup {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n display: inline-block;\n position: relative;\n background: linear-gradient(0deg, ${null!==(e=null==t?void 0:t.loaderGradientEnd)&&void 0!==e?e:"rgba(39,107,255,0.05)"} 33%, ${null!==(n=null==t?void 0:t.loaderGradientStart)&&void 0!==n?n:"#276bff"} 100%);\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n .loader-jqueue_popup::after {\n content: '';\n box-sizing: border-box;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 96%;\n height: 96%;\n border-radius: 50%;\n background: #fff;\n }\n @keyframes rotation {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `}}},a.state={socket:null,popupEl:null,isNavigating:!1,storageTokenKey:null,storageConnectKey:null,queueStatus:null,wsUrl:null,apiUrl:null,socketConfig:null},a.ttlInterval=null,a.statusListeners=[],"undefined"!=typeof window&&(window.ConnectionJQueueSdkWeb=a),e.default=a},613:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OnlineQueueStatus=void 0,function(t){t[t.WAITING=1]="WAITING",t[t.ACTIVE=2]="ACTIVE",t[t.EMPTY=3]="EMPTY"}(n||(e.OnlineQueueStatus=n={}))},676:e=>{e.exports=t}},n={},s=function t(s){var i=n[s];if(void 0!==i)return i.exports;var o=n[s]={exports:{}};return e[s].call(o.exports,o,o.exports,t),o.exports}(156);return s.default})())); | ||
//# sourceMappingURL=j-queue-sdk-web.js.map |
@@ -155,3 +155,3 @@ "use strict"; | ||
case types_1.OnlineQueueStatus.EMPTY: | ||
this.log('[j-queue-sdk-web] - Connect key does not exist!', 'error'); | ||
alert('[J-Queue] - Connect key does not exist!'); | ||
this.clearInterval(); | ||
@@ -158,0 +158,0 @@ break; |
{ | ||
"name": "j-queue-sdk-web", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "A TypeScript package to check WebSocket connection status and control web access with a popup", | ||
@@ -5,0 +5,0 @@ "main": "dist/j-queue-sdk-web.js", |
@@ -247,3 +247,3 @@ import { io, Socket } from 'socket.io-client'; | ||
case OnlineQueueStatus.EMPTY: | ||
this.log('[j-queue-sdk-web] - Connect key does not exist!', 'error'); | ||
alert('[J-Queue] - Connect key does not exist!'); | ||
this.clearInterval(); | ||
@@ -250,0 +250,0 @@ break; |
Sorry, the diff of this file is not supported yet
94046
-0.09%1069
-0.09%