From 5060da7710d5170ead47377a16d738cd627767ee Mon Sep 17 00:00:00 2001
From: ch0c0l8ra1n <073bct532.rajat@pcampus.edu.np>
Date: Tue, 23 Apr 2024 16:53:12 +0545
Subject: [PATCH] Now serving updated minified swalservice
---
R/utils.R | 2 +-
inst/assets/lib/swalservice/swalservice.min.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/R/utils.R b/R/utils.R
index 0bc4f83..4530f76 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -23,7 +23,7 @@ getDependencies <- function() {
version = "1.0.0",
package = "shinyalert",
src = "assets/lib/swalservice",
- script = "swalservice.js"
+ script = "swalservice.min.js"
),
htmltools::htmlDependency(
name = "shinyalert-binding",
diff --git a/inst/assets/lib/swalservice/swalservice.min.js b/inst/assets/lib/swalservice/swalservice.min.js
index 24eee3a..a56ec6d 100644
--- a/inst/assets/lib/swalservice/swalservice.min.js
+++ b/inst/assets/lib/swalservice/swalservice.min.js
@@ -1 +1 @@
-var SwalService=function(s){this.pendingSwal=[],s&&null!=s.showPendingMessage&&(this.showPendingMessage=s.showPendingMessage),this.initialize()};SwalService.prototype={currentSwal:null,showPendingMessage:!0,swalFirstCalled:!1,__swal:swal,pendingSwal:null,nextId:1,swal:function(){var s={args:arguments,id:this.nextId++};return this._swalWithId(s)},_swalWithId:function(s){return this.isSwalOpen()||this.isClosing?this.pendingSwal.push(s):(this.__swal.apply(null,s.args),this.currentSwal=s,this.swalFirstCalled||($(".sweet-alert").prepend(''),this.swalFirstCalled=!0)),this.refreshPendingText(),s.id},onClosed:function(){this.isClosing=!1,this.openNextSwal()},refreshPendingText:function(){this.showPendingMessage&&(0===this.pendingSwal.length?$(".other-messages").text(""):$(".other-messages").text(this.pendingSwal.length+" unread alerts"))},close:function(s){if(void 0===s||this.currentSwal&&this.currentSwal.id==s)this.__swal.close();else if(void 0!==s&&this.pendingSwal.length>0){for(var e,i=0;i0){var s=this.pendingSwal.shift();this._swalWithId(s)}},isSwalOpen:function(){return null!=this.currentSwal&&null!=this.currentSwal},closeAndFireCallback:function(s,e){var i=this.currentSwal;(this.close(s),i&&i.args&&i.args.length>1&&"function"==typeof i.args[1])&&(0,i.args[1])(e)},initialize:function(){var s=this,e=this.__swal.close;this.__swal.close=function(){s.isClosing=!0,e(),s.currentSwal=null,setTimeout(function(){s.onClosed()},400)}}};
+var SwalService=function(s){this.pendingSwal=[],s&&null!=s.showPendingMessage&&(this.showPendingMessage=s.showPendingMessage),this.initialize()};SwalService.prototype={currentSwal:null,showPendingMessage:!0,swalFirstCalled:!1,__swal:swal,pendingSwal:null,nextId:1,swal:function(){var s={args:arguments,id:this.nextId++};return this._swalWithId(s)},_swalWithId:function(s){return this.isSwalOpen()||this.isClosing?this.pendingSwal.push(s):(this.__swal.apply(null,s.args),this.currentSwal=s,this.swalFirstCalled||($(".sweet-alert").prepend(''),this.swalFirstCalled=!0)),this.refreshPendingText(),s.id},onClosed:function(){this.isClosing=!1,this.openNextSwal()},refreshPendingText:function(){this.showPendingMessage&&(0===this.pendingSwal.length?$(".other-messages").text(""):$(".other-messages").text(this.pendingSwal.length+" unread alerts"))},close:function(s){if(void 0===s||this.currentSwal&&this.currentSwal.id==s)this.__swal.close();else if(void 0!==s&&this.pendingSwal.length>0){for(var e,n=0;n0){var e=s.pendingSwal.shift();s._swalWithId(e),Shiny.bindAll($(".sweet-alert"))}},isSwalOpen:function(){return null!=this.currentSwal&&null!=this.currentSwal},closeAndFireCallback:function(s,e){var n=this.currentSwal;(this.close(s),n&&n.args&&n.args.length>1&&"function"==typeof n.args[1])&&(0,n.args[1])(e)},initialize:function(){var s=this,e=this.__swal.close;this.__swal.close=function(){s.isClosing=!0,e(),s.currentSwal=null,setTimeout((function(){s.onClosed()}),400)}}};