diff --git a/osis_notification/static/osis_notification/osis-notification.umd.min.js b/osis_notification/static/osis_notification/osis-notification.umd.min.js index 22c99d1..f68931d 100644 --- a/osis_notification/static/osis_notification/osis-notification.umd.min.js +++ b/osis_notification/static/osis_notification/osis-notification.umd.min.js @@ -1,2 +1 @@ -(function(p,n){typeof exports=="object"&&typeof module<"u"?n(require("@vue/runtime-dom"),require("vue"),require("vue-i18n")):typeof define=="function"&&define.amd?define(["@vue/runtime-dom","vue","vue-i18n"],n):(p=typeof globalThis<"u"?globalThis:p||self,n(p.Vue,p.Vue,p.VueI18n))})(this,function(p,n,A){"use strict";function R(e,t,o){var i={},h="",k="...",_=10>t?t:10,l=["img","br"],T=[],g=0,c=h,C='([\\w|-]+\\s*(=\\s*"[^"]*")?\\s*)*',S="\\s*\\/?\\s*",le="\\s*\\/\\s*",de=new RegExp("<\\/?\\w+\\s*"+C+le+">"),ce=new RegExp("<\\/?\\w+\\s*"+C+S+">"),z=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w\-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})/g,ue=new RegExp(""),me=new RegExp("\\W+","g"),d=!0,m,f,$,w;function fe(s){var r=ue.exec(s),a,u;return r?(a=r.index,u=r[0].length,s.substring(0,a)+s.substring(a+u)):s}function pe(s){var r="";return s.reverse().forEach(function(a,u){l.indexOf(a)===-1&&(r+="")}),r}function he(s){var r=s.indexOf(" ");if(r===-1&&(r=s.indexOf(">"),r===-1))throw new Error("HTML tag is not well-formed : "+s);return s.substring(1,r)}function B(s,r){var a=t-g,u=a,V=a=t)break;if(d=z.exec(e),!d||d.index>=t){c+=e.substring(0,B(e));break}for(;d;)m=d[0],f=d.index,c+=e.substring(0,f+m.length-g),e=e.substring(f+m.length),d=z.exec(e);break}if(m=d[0],f=d.index,g+f>t){c+=e.substring(0,B(e,f));break}else g+=f,c+=e.substring(0,f);m[1]==="/"?(T.pop(),w=null):(w=de.exec(m),w||($=he(m),T.push($))),w?c+=w[0]:c+=m,e=e.substring(f+m.length)}return e.length>t-g&&o.ellipsis&&(c+=o.ellipsis),c+=pe(T),o.keepImageTag||(c=fe(c)),c}var L=R;const M=n.defineComponent({name:"TruncateHtml",props:{htmlText:{type:String,default:""},length:{type:Number,default:100},lessButtonText:{type:String,default:"Show less"},contentCssClass:{type:String,default:""},containerCssClass:{type:String,default:""},buttonCssClass:{type:String,default:""},moreButtonText:{type:String,default:"Show more"}},data(){return{isTruncated:!0,truncatedHtml:L(this.htmlText,this.length)}}}),N=(e,t)=>{const o=e.__vccOpts||e;for(const[i,h]of t)o[i]=h;return o},q=["innerHTML"];function G(e,t,o,i,h,k){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(e.containerCssClass)},[n.createElementVNode("div",{class:n.normalizeClass([e.isTruncated?"truncated":"",e.contentCssClass]),innerHTML:e.isTruncated?e.truncatedHtml:e.htmlText},null,10,q),e.truncatedHtml.lengthe.isTruncated=!e.isTruncated,["prevent"]))},n.toDisplayString(e.isTruncated?e.moreButtonText:e.lessButtonText),3)):n.createCommentVNode("",!0)],2)}const I=N(M,[["render",G]]),U=n.defineComponent({name:"NotificationEntry",components:{TruncateHtml:I},props:{uuid:{type:String,required:!0},state:{type:String,required:!0},sentAt:{type:String,required:!0},payload:{type:String,required:!0},truncateLength:{type:Number,default:60}},emits:["toggle"],computed:{isSent:function(){return this.state==="SENT_STATE"}},mounted(){window.jQuery('[data-toggle="tooltip"]').tooltip({trigger:"hover",placement:"top",container:"body",template:''})},updated(){window.jQuery(`#notification-${this.uuid}`).tooltip("hide")},beforeUnmount(){window.jQuery(`#notification-${this.uuid}`).tooltip("destroy")}}),Ee="",D={class:"notification-dropdown-item"},H=["id","checked","data-original-title"],P={class:"label label-primary"};function O(e,t,o,i,h,k){const _=n.resolveComponent("TruncateHtml");return n.openBlock(),n.createElementBlock("li",D,[n.createElementVNode("input",{id:`notification-${e.uuid}`,checked:e.isSent,type:"radio","data-toggle":"tooltip","data-bs-toggle":"tooltip","data-original-title":e.isSent?e.$t("notification.mark_as_read"):e.$t("notification.mark_as_unread"),onClick:t[0]||(t[0]=n.withModifiers(l=>e.$emit("toggle",e.uuid),["prevent"]))},null,8,H),n.createElementVNode("span",P,n.toDisplayString(e.sentAt),1),n.createVNode(_,{"button-css-class":"btn btn-link","container-css-class":"notification-text","content-css-class":e.isSent?"font-bold":"","html-text":e.payload,length:e.truncateLength,"less-button-text":e.$t("notification.show_less"),"more-button-text":e.$t("notification.show_more")},null,8,["content-css-class","html-text","length","less-button-text","more-button-text"])])}const X=N(U,[["render",O]]);function F(e){if(document.cookie){const t=document.cookie.split(";");for(let o=0;oe.stopPropagation())},methods:{fetchNotifications:async function(){const e=await this.doRequest(`?limit=${this.pageSize}`,{},!0);e&&(e.unread_count&&(this.animationEnabled=!0),this.notifications=e.results,this.hasNextPage=!!e.next,this.unreadNotificationsCount=e.unread_count,this.timer=window.setTimeout(()=>void this.fetchNotifications(),this.interval*1e3))},toggleState:async function(e){const t=await this.doRequest(e,{method:"PATCH"});if(!t)return;const o=this.notifications.findIndex(i=>i.uuid===e);this.notifications[o]=t,t.state==="SENT_STATE"?this.unreadNotificationsCount++:this.unreadNotificationsCount--,this.notifications.filter(i=>i.state==="SENT_STATE").length!==this.unreadNotificationsCount&&await this.fetchNotifications()},markAllAsRead:async function(){const e=await this.doRequest("mark_all_as_read",{method:"PUT"});e&&e.length>0&&(this.notifications.forEach(t=>t.state="READ_STATE"),this.unreadNotificationsCount=0)},loadMore:async function(e){e.stopPropagation(),this.loading=!0,this.pageSize+=this.limit,await this.fetchNotifications()},doRequest:async function(e,t,o=!1){o&&(this.loading=!0);try{const i=await fetch(`${this.baseUrl}${e}`,{mode:"same-origin",headers:{"Content-Type":"application/json;charset=utf-8","X-CSRFToken":this.csrfToken},...t});if(i.status>=200&&i.status<300)return o&&(this.loading=!1),i.json();this.error=`${this.$t("notification_viewer.error")} (${i.statusText})`}catch(i){this.error=`${this.$t("notification_viewer.error")} (${i.message})`}o&&(this.loading=!1)}}}),we="",W=["data-count"],Q=[n.createElementVNode("span",{class:"fas fa-bell"},null,-1)],Y={class:"dropdown-menu notification-dropdown dropdown-menu-end"},x={key:0,class:"progress"},K={class:"progress-bar progress-bar-striped active",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100",style:{width:"100%"}},J={class:"sr-only visually-hidden-focusable"},Z=n.createElementVNode("li",{role:"separator",class:"divider"},null,-1),v={class:"alert alert-warning",role:"alert"},ee={key:2},te=n.createElementVNode("li",{role:"separator",class:"divider dropdown-divider"},null,-1),ne={key:0,class:"text-center"};function oe(e,t,o,i,h,k){const _=n.resolveComponent("NotificationEntry");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("a",{class:"dropdown-toggle nav-link","data-toggle":"dropdown","data-bs-toggle":"dropdown","data-bs-auto-close":"outside",role:"button","aria-haspopup":"true","aria-expanded":"false",onClick:t[0]||(t[0]=l=>e.animationEnabled=!1)},[n.createElementVNode("div",{class:n.normalizeClass(["bell",{"show-count":e.unreadNotificationsCount,notify:e.unreadNotificationsCount&&e.animationEnabled}]),"data-count":e.unreadNotificationsCount},Q,10,W)]),n.createElementVNode("ul",Y,[e.loading?(n.openBlock(),n.createElementBlock("li",x,[n.createElementVNode("div",K,[n.createElementVNode("span",J,n.toDisplayString(e.$t("notification_viewer.loading")),1)])])):e.error?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Z,n.createElementVNode("li",null,[n.createElementVNode("div",v,n.toDisplayString(e.error),1)])],64)):n.createCommentVNode("",!0),e.notifications.length?(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createElementVNode("li",null,[n.createElementVNode("a",{class:n.normalizeClass(["btn",{disabled:!e.unreadNotificationsCount}]),onClick:t[1]||(t[1]=(...l)=>e.markAllAsRead&&e.markAllAsRead(...l))},n.toDisplayString(e.$t("notification_viewer.mark_all_as_read")),3)]),te,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.notifications,l=>(n.openBlock(),n.createBlock(_,{key:l.uuid,uuid:l.uuid,state:l.state,"sent-at":l.sent_at,payload:l.payload,"truncate-length":e.truncateLength,onToggle:e.toggleState},null,8,["uuid","state","sent-at","payload","truncate-length","onToggle"]))),128)),e.hasNextPage?(n.openBlock(),n.createElementBlock("li",ne,[n.createElementVNode("button",{type:"button",class:"btn btn-link",onClick:t[2]||(t[2]=(...l)=>e.loadMore&&e.loadMore(...l))},n.toDisplayString(e.$t("notification_viewer.load_more")),1)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock("li",ee,n.toDisplayString(e.$t("notification_viewer.no_notifications")),1))])],64)}const ie=N(j,[["render",oe]]),ae={notification_viewer:{mark_all_as_read:e=>{const{normalize:t}=e;return t(["Tout marquer comme lu"])},error:e=>{const{normalize:t}=e;return t(["Une erreur s'est produite, veuillez réessayer plus tard."])},load_more:e=>{const{normalize:t}=e;return t(["Afficher plus"])},loading:e=>{const{normalize:t}=e;return t(["Chargement..."])},no_notifications:e=>{const{normalize:t}=e;return t(["Pas de notifications."])}},notification:{mark_as_read:e=>{const{normalize:t}=e;return t(["Marquer comme lu"])},mark_as_unread:e=>{const{normalize:t}=e;return t(["Marquer comme non-lu"])},show_less:e=>{const{normalize:t}=e;return t(["Voir moins"])},show_more:e=>{const{normalize:t}=e;return t(["Voir plus"])}}},re={notification_viewer:{mark_all_as_read:e=>{const{normalize:t}=e;return t(["Mark all as read"])},error:e=>{const{normalize:t}=e;return t(["An error occurred, please try again later."])},load_more:e=>{const{normalize:t}=e;return t(["Load more"])},loading:e=>{const{normalize:t}=e;return t(["Loading..."])},no_notifications:e=>{const{normalize:t}=e;return t(["No notifications."])}},notification:{mark_as_read:e=>{const{normalize:t}=e;return t(["Mark as read"])},mark_as_unread:e=>{const{normalize:t}=e;return t(["Mark as unread"])},show_less:e=>{const{normalize:t}=e;return t(["Show less"])},show_more:e=>{const{normalize:t}=e;return t(["Show more"])}}},se=A.createI18n({locale:document.documentElement.lang||"en",messages:{en:re,fr:ae}});document.querySelectorAll("#notification-viewer").forEach(e=>{const t={baseUrl:"",...e.dataset};e.dataset.interval&&(t.interval=Number.parseInt(e.dataset.interval)),e.dataset.limit&&(t.limit=Number.parseInt(e.dataset.limit)),e.dataset.truncateLength&&(t.truncateLength=Number.parseInt(e.dataset.truncateLength)),p.createApp(ie,t).use(se).mount(e)})}); -//# sourceMappingURL=osis-notification.umd.min.js.map +(function(p,n){typeof exports=="object"&&typeof module<"u"?n(require("@vue/runtime-dom"),require("vue"),require("vue-i18n")):typeof define=="function"&&define.amd?define(["@vue/runtime-dom","vue","vue-i18n"],n):(p=typeof globalThis<"u"?globalThis:p||self,n(p.Vue,p.Vue,p.VueI18n))})(this,function(p,n,A){"use strict";function R(e,t,o){var i={},h="",w="...",g=10>t?t:10,l=["img","br"],T=[],_=0,c=h,C='([\\w|-]+\\s*(=\\s*"[^"]*")?\\s*)*',S="\\s*\\/?\\s*",le="\\s*\\/\\s*",de=new RegExp("<\\/?\\w+\\s*"+C+le+">"),ce=new RegExp("<\\/?\\w+\\s*"+C+S+">"),z=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w\-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})/g,ue=new RegExp(""),me=new RegExp("\\W+","g"),d=!0,m,f,$,k;function fe(s){var r=ue.exec(s),a,u;return r?(a=r.index,u=r[0].length,s.substring(0,a)+s.substring(a+u)):s}function pe(s){var r="";return s.reverse().forEach(function(a,u){l.indexOf(a)===-1&&(r+="")}),r}function he(s){var r=s.indexOf(" ");if(r===-1&&(r=s.indexOf(">"),r===-1))throw new Error("HTML tag is not well-formed : "+s);return s.substring(1,r)}function B(s,r){var a=t-_,u=a,V=a=t)break;if(d=z.exec(e),!d||d.index>=t){c+=e.substring(0,B(e));break}for(;d;)m=d[0],f=d.index,c+=e.substring(0,f+m.length-_),e=e.substring(f+m.length),d=z.exec(e);break}if(m=d[0],f=d.index,_+f>t){c+=e.substring(0,B(e,f));break}else _+=f,c+=e.substring(0,f);m[1]==="/"?(T.pop(),k=null):(k=de.exec(m),k||($=he(m),T.push($))),k?c+=k[0]:c+=m,e=e.substring(f+m.length)}return e.length>t-_&&o.ellipsis&&(c+=o.ellipsis),c+=pe(T),o.keepImageTag||(c=fe(c)),c}var L=R;const M=n.defineComponent({name:"TruncateHtml",props:{htmlText:{type:String,default:""},length:{type:Number,default:100},lessButtonText:{type:String,default:"Show less"},contentCssClass:{type:String,default:""},containerCssClass:{type:String,default:""},buttonCssClass:{type:String,default:""},moreButtonText:{type:String,default:"Show more"}},data(){return{isTruncated:!0,truncatedHtml:L(this.htmlText,this.length)}}}),N=(e,t)=>{const o=e.__vccOpts||e;for(const[i,h]of t)o[i]=h;return o},q=["innerHTML"];function G(e,t,o,i,h,w){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(e.containerCssClass)},[n.createElementVNode("div",{class:n.normalizeClass([e.isTruncated?"truncated":"",e.contentCssClass]),innerHTML:e.isTruncated?e.truncatedHtml:e.htmlText},null,10,q),e.truncatedHtml.lengthe.isTruncated=!e.isTruncated,["prevent"]))},n.toDisplayString(e.isTruncated?e.moreButtonText:e.lessButtonText),3)):n.createCommentVNode("",!0)],2)}const I=N(M,[["render",G]]),U=n.defineComponent({name:"NotificationEntry",components:{TruncateHtml:I},props:{uuid:{type:String,required:!0},state:{type:String,required:!0},sentAt:{type:String,required:!0},payload:{type:String,required:!0},truncateLength:{type:Number,default:60}},emits:["toggle"],computed:{isSent:function(){return this.state==="SENT_STATE"}},mounted(){window.jQuery('[data-toggle="tooltip"]').tooltip({trigger:"hover",placement:"top",container:"body",template:''})},updated(){window.jQuery(`#notification-${this.uuid}`).tooltip("hide")},beforeUnmount(){window.jQuery(`#notification-${this.uuid}`).tooltip("destroy")}}),Ee="",D={class:"notification-dropdown-item"},H=["id","checked","data-original-title"],P={class:"label label-primary badge bg-primary"};function O(e,t,o,i,h,w){const g=n.resolveComponent("TruncateHtml");return n.openBlock(),n.createElementBlock("li",D,[n.createElementVNode("input",{id:`notification-${e.uuid}`,checked:e.isSent,type:"radio",class:"mt-1","data-toggle":"tooltip","data-bs-toggle":"tooltip","data-original-title":e.isSent?e.$t("notification.mark_as_read"):e.$t("notification.mark_as_unread"),onClick:t[0]||(t[0]=n.withModifiers(l=>e.$emit("toggle",e.uuid),["prevent"]))},null,8,H),n.createElementVNode("span",P,n.toDisplayString(e.sentAt),1),n.createVNode(g,{"button-css-class":"btn btn-link","container-css-class":"notification-text","content-css-class":e.isSent?"font-bold":"","html-text":e.payload,length:e.truncateLength,"less-button-text":e.$t("notification.show_less"),"more-button-text":e.$t("notification.show_more")},null,8,["content-css-class","html-text","length","less-button-text","more-button-text"])])}const X=N(U,[["render",O]]);function F(e){if(document.cookie){const t=document.cookie.split(";");for(let o=0;oe.stopPropagation())},methods:{fetchNotifications:async function(){const e=await this.doRequest(`?limit=${this.pageSize}`,{},!0);e&&(e.unread_count&&(this.animationEnabled=!0),this.notifications=e.results,this.hasNextPage=!!e.next,this.unreadNotificationsCount=e.unread_count,this.timer=window.setTimeout(()=>void this.fetchNotifications(),this.interval*1e3))},toggleState:async function(e){const t=await this.doRequest(e,{method:"PATCH"});if(!t)return;const o=this.notifications.findIndex(i=>i.uuid===e);this.notifications[o]=t,t.state==="SENT_STATE"?this.unreadNotificationsCount++:this.unreadNotificationsCount--,this.notifications.filter(i=>i.state==="SENT_STATE").length!==this.unreadNotificationsCount&&await this.fetchNotifications()},markAllAsRead:async function(){const e=await this.doRequest("mark_all_as_read",{method:"PUT"});e&&e.length>0&&(this.notifications.forEach(t=>t.state="READ_STATE"),this.unreadNotificationsCount=0)},loadMore:async function(e){e.stopPropagation(),this.loading=!0,this.pageSize+=this.limit,await this.fetchNotifications()},doRequest:async function(e,t,o=!1){o&&(this.loading=!0);try{const i=await fetch(`${this.baseUrl}${e}`,{mode:"same-origin",headers:{"Content-Type":"application/json;charset=utf-8","X-CSRFToken":this.csrfToken},...t});if(i.status>=200&&i.status<300)return o&&(this.loading=!1),i.json();this.error=`${this.$t("notification_viewer.error")} (${i.statusText})`}catch(i){this.error=`${this.$t("notification_viewer.error")} (${i.message})`}o&&(this.loading=!1)}}}),ke="",W=["data-count"],Q=[n.createElementVNode("span",{class:"fas fa-bell"},null,-1)],Y={class:"dropdown-menu notification-dropdown dropdown-menu-end"},x={key:0,class:"progress"},K={class:"progress-bar progress-bar-striped active",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100",style:{width:"100%"}},J={class:"sr-only visually-hidden-focusable"},Z=n.createElementVNode("li",{role:"separator",class:"divider"},null,-1),v={class:"alert alert-warning",role:"alert"},ee={key:2},te=n.createElementVNode("li",{role:"separator",class:"divider dropdown-divider"},null,-1),ne={key:0,class:"text-center"};function oe(e,t,o,i,h,w){const g=n.resolveComponent("NotificationEntry");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("a",{class:"dropdown-toggle nav-link","data-toggle":"dropdown","data-bs-toggle":"dropdown","data-bs-auto-close":"outside",role:"button","aria-haspopup":"true","aria-expanded":"false",onClick:t[0]||(t[0]=l=>e.animationEnabled=!1)},[n.createElementVNode("div",{class:n.normalizeClass(["bell",{"show-count":e.unreadNotificationsCount,notify:e.unreadNotificationsCount&&e.animationEnabled}]),"data-count":e.unreadNotificationsCount},Q,10,W)]),n.createElementVNode("ul",Y,[e.loading?(n.openBlock(),n.createElementBlock("li",x,[n.createElementVNode("div",K,[n.createElementVNode("span",J,n.toDisplayString(e.$t("notification_viewer.loading")),1)])])):e.error?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Z,n.createElementVNode("li",null,[n.createElementVNode("div",v,n.toDisplayString(e.error),1)])],64)):n.createCommentVNode("",!0),e.notifications.length?(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createElementVNode("li",null,[n.createElementVNode("a",{class:n.normalizeClass(["btn d-block text-center",{disabled:!e.unreadNotificationsCount}]),onClick:t[1]||(t[1]=(...l)=>e.markAllAsRead&&e.markAllAsRead(...l))},n.toDisplayString(e.$t("notification_viewer.mark_all_as_read")),3)]),te,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.notifications,l=>(n.openBlock(),n.createBlock(g,{key:l.uuid,uuid:l.uuid,state:l.state,"sent-at":l.sent_at,payload:l.payload,"truncate-length":e.truncateLength,onToggle:e.toggleState},null,8,["uuid","state","sent-at","payload","truncate-length","onToggle"]))),128)),e.hasNextPage?(n.openBlock(),n.createElementBlock("li",ne,[n.createElementVNode("button",{type:"button",class:"btn btn-link",onClick:t[2]||(t[2]=(...l)=>e.loadMore&&e.loadMore(...l))},n.toDisplayString(e.$t("notification_viewer.load_more")),1)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock("li",ee,n.toDisplayString(e.$t("notification_viewer.no_notifications")),1))])],64)}const ie=N(j,[["render",oe]]),ae={notification_viewer:{mark_all_as_read:e=>{const{normalize:t}=e;return t(["Tout marquer comme lu"])},error:e=>{const{normalize:t}=e;return t(["Une erreur s'est produite, veuillez réessayer plus tard."])},load_more:e=>{const{normalize:t}=e;return t(["Afficher plus"])},loading:e=>{const{normalize:t}=e;return t(["Chargement..."])},no_notifications:e=>{const{normalize:t}=e;return t(["Pas de notifications."])}},notification:{mark_as_read:e=>{const{normalize:t}=e;return t(["Marquer comme lu"])},mark_as_unread:e=>{const{normalize:t}=e;return t(["Marquer comme non-lu"])},show_less:e=>{const{normalize:t}=e;return t(["Voir moins"])},show_more:e=>{const{normalize:t}=e;return t(["Voir plus"])}}},re={notification_viewer:{mark_all_as_read:e=>{const{normalize:t}=e;return t(["Mark all as read"])},error:e=>{const{normalize:t}=e;return t(["An error occurred, please try again later."])},load_more:e=>{const{normalize:t}=e;return t(["Load more"])},loading:e=>{const{normalize:t}=e;return t(["Loading..."])},no_notifications:e=>{const{normalize:t}=e;return t(["No notifications."])}},notification:{mark_as_read:e=>{const{normalize:t}=e;return t(["Mark as read"])},mark_as_unread:e=>{const{normalize:t}=e;return t(["Mark as unread"])},show_less:e=>{const{normalize:t}=e;return t(["Show less"])},show_more:e=>{const{normalize:t}=e;return t(["Show more"])}}},se=A.createI18n({locale:document.documentElement.lang||"en",messages:{en:re,fr:ae}});document.querySelectorAll("#notification-viewer").forEach(e=>{const t={baseUrl:"",...e.dataset};e.dataset.interval&&(t.interval=Number.parseInt(e.dataset.interval)),e.dataset.limit&&(t.limit=Number.parseInt(e.dataset.limit)),e.dataset.truncateLength&&(t.truncateLength=Number.parseInt(e.dataset.truncateLength)),p.createApp(ie,t).use(se).mount(e)})}); diff --git a/package.json b/package.json index f13f781..8c307b7 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "osis-notification", - "version": "0.1.0", + "version": "0.1.5", "private": true, "scripts": { "build": "vite build --outDir osis_notification/static/osis_notification --mode production --sourcemap true", - "watch": "vite build --outDir osis_notification/static/osis_notification --mode production --sourcemap true --watch", + "watch": "vite build --outDir osis_notification/static/osis_notification --mode production --watch", "test": "vitest", "lint": "eslint frontend --ext .vue,.ts,.js; vue-tsc", "coverage": "vitest run --coverage", diff --git a/setup.py b/setup.py index 251a9ca..e27ef46 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( name='OSIS Notification', - version='0.1.4', + version='0.1.5', description='Notification management API and UI', url='http://github.com/uclouvain/osis-notification', author='Université catholique de Louvain',