cronapi-js 2.9.2-SP.16 → 2.9.2-SP.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cronapi.js CHANGED
@@ -6468,7 +6468,10 @@ function cronapi() {
6468
6468
  this.cronapi.notification.buttonConfirmDialogAlert = function (/** @type {ObjectType.STRING} @description {{buttonConfirmDialogAlert.primaryButton}} @blockType util_dropdown @keys true|false @values {{yes}}|{{no}} */ primaryButton, title, /** @type {ObjectType.STATEMENT} @description {{buttonConfirmDialogAlert.value}} */ value) {
6469
6469
  return {
6470
6470
  title: title,
6471
- value: value,
6471
+ value: function () {
6472
+ if (value) value();
6473
+ return true;
6474
+ },
6472
6475
  primaryValue: primaryButton
6473
6476
  };
6474
6477
  };
@@ -12,7 +12,7 @@
12
12
  <div class="cronapp-icon cronapp-${n}">${p()}</div>
13
13
  </div>
14
14
  <h2 class="title">${t}</h2> <h3 class="subtitle">${a}</h3>
15
- </div>`;let u={width:"450px",minWidth:300,maxWidth:()=>window.innerWidth-40,title:!!l&&(t||!1),closable:!1,modal:!0,content:l?a:d,buttonLayout:l?"stretched":"normal",actions:[],close:()=>setTimeout(()=>s.data("kendoDialog").destroy())};r(o),s.kendoDialog(u);const m=s.data("kendoDialog"),g=m.wrapper;g.attr("data-dialog-type",n);let h=cronapi.internal.getMaxZIndex()+1;g.css("z-index",h),m.open()},this.cronapi.notification.buttonConfirmDialogAlert=function(n,t,a){return{title:t,value:a,primaryValue:n}},this.cronapi.regex={},this.cronapi.regex.extractTextByRegex=function(n,t,a){if(this.cronapi.logic.isNull(n)||this.cronapi.logic.isNull(t))return[];let o=null;o=null!=a&&"-"!==a?new RegExp(t,a):new RegExp(t);let r=[],c=null,s;for(;(s=o.exec(n))&&!(null!=c&&c==s.index);){let n=[];for(i=1;i<s.length;i++)n.push(s[i]);c=s.index,r.push(n)}return r},this.cronapi.regex.validateTextWithRegex=function(n,t,a){return!(this.cronapi.logic.isNull(n)||this.cronapi.logic.isNull(t))&&(null!=a&&"-"!==a?new RegExp(t,a).test(n):new RegExp(t).test(n))},this.cronapi.calendar={},this.cronapi.calendar.getCalendarValue=async function(n){const t=await getCalendar(n);return t?t.value():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarValue=async function(n,t){const a=await getCalendar(n);a?a.value(t):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.getCalendarMin=async function(n){const t=await getCalendar(n);return t?t.min():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarMin=async function(n,t){const a=await getCalendar(n);a?a.min(t):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.getCalendarMax=async function(n){const t=await getCalendar(n);return t?t.max():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarMax=async function(n,t){const a=await getCalendar(n);a?a.max(t):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.getCalendarSelectDates=async function(n){const t=await getCalendar(n);return t?t.selectDates():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarSelectDates=async function(n,t){const a=await getCalendar(n);a?a.selectDates(Array.isArray(t)?t:[t]):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.navigateCalendarTo=async function(n,t,a){const o=await getCalendar(n);o?o.navigate(t,a):showErrorNotification("calendarElementNotPresent")},this.cronapi.chat={},this.cronapi.chat.chatUserObj=function(n,t,a){return{id:n,name:t,iconUrl:a}},this.cronapi.chat.chatAttachmentObj=function(n,t,a,o,r,c){return{contentType:"heroCard",content:{title:n,subtitle:t,text:a,images:[{url:o,alt:r}],buttons:Array.isArray(c)?c:[c]}}},this.cronapi.chat.chatSuggestedActionObj=function(n,t){return{title:n,value:t}},this.cronapi.chat.getChatUser=async function(n,t,a){getChat(n).then(n=>{if(n)t(n.getUser());else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),a(n)}})},this.cronapi.chat.postChatMessage=function(n,t,a,o){getChat(n).then(n=>{if(n)n.postMessage(t),a();else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),o(n)}})},this.cronapi.chat.renderChatMessage=function(n,t,a,o,r){getChat(n).then(n=>{if(n)n.renderMessage({type:"text",text:t},a),o();else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),r(n)}})},this.cronapi.chat.renderChatAttachments=function(n,t,a,o,r,c){getChat(n).then(n=>{if(n)n.renderAttachments({attachments:Array.isArray(a)?a:[a],attachmentLayout:o},t),r();else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),c(n)}})},this.cronapi.chat.renderChatHtml=function(n,t,a,o,r,c){const s=function(n){let t=document.createElement("div");t.innerHTML=n;let a=t.getElementsByTagName("script"),o=a.length;for(;o--;)a[o].parentNode.removeChild(a[o]);return t.innerHTML},l=kendo.template(`
15
+ </div>`;let u={width:"450px",minWidth:300,maxWidth:()=>window.innerWidth-40,title:!!l&&(t||!1),closable:!1,modal:!0,content:l?a:d,buttonLayout:l?"stretched":"normal",actions:[],close:()=>setTimeout(()=>s.data("kendoDialog").destroy())};r(o),s.kendoDialog(u);const m=s.data("kendoDialog"),g=m.wrapper;g.attr("data-dialog-type",n);let h=cronapi.internal.getMaxZIndex()+1;g.css("z-index",h),m.open()},this.cronapi.notification.buttonConfirmDialogAlert=function(n,t,a){return{title:t,value:function(){return a&&a(),!0},primaryValue:n}},this.cronapi.regex={},this.cronapi.regex.extractTextByRegex=function(n,t,a){if(this.cronapi.logic.isNull(n)||this.cronapi.logic.isNull(t))return[];let o=null;o=null!=a&&"-"!==a?new RegExp(t,a):new RegExp(t);let r=[],c=null,s;for(;(s=o.exec(n))&&!(null!=c&&c==s.index);){let n=[];for(i=1;i<s.length;i++)n.push(s[i]);c=s.index,r.push(n)}return r},this.cronapi.regex.validateTextWithRegex=function(n,t,a){return!(this.cronapi.logic.isNull(n)||this.cronapi.logic.isNull(t))&&(null!=a&&"-"!==a?new RegExp(t,a).test(n):new RegExp(t).test(n))},this.cronapi.calendar={},this.cronapi.calendar.getCalendarValue=async function(n){const t=await getCalendar(n);return t?t.value():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarValue=async function(n,t){const a=await getCalendar(n);a?a.value(t):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.getCalendarMin=async function(n){const t=await getCalendar(n);return t?t.min():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarMin=async function(n,t){const a=await getCalendar(n);a?a.min(t):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.getCalendarMax=async function(n){const t=await getCalendar(n);return t?t.max():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarMax=async function(n,t){const a=await getCalendar(n);a?a.max(t):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.getCalendarSelectDates=async function(n){const t=await getCalendar(n);return t?t.selectDates():(showErrorNotification("calendarElementNotPresent"),null)},this.cronapi.calendar.setCalendarSelectDates=async function(n,t){const a=await getCalendar(n);a?a.selectDates(Array.isArray(t)?t:[t]):showErrorNotification("calendarElementNotPresent")},this.cronapi.calendar.navigateCalendarTo=async function(n,t,a){const o=await getCalendar(n);o?o.navigate(t,a):showErrorNotification("calendarElementNotPresent")},this.cronapi.chat={},this.cronapi.chat.chatUserObj=function(n,t,a){return{id:n,name:t,iconUrl:a}},this.cronapi.chat.chatAttachmentObj=function(n,t,a,o,r,c){return{contentType:"heroCard",content:{title:n,subtitle:t,text:a,images:[{url:o,alt:r}],buttons:Array.isArray(c)?c:[c]}}},this.cronapi.chat.chatSuggestedActionObj=function(n,t){return{title:n,value:t}},this.cronapi.chat.getChatUser=async function(n,t,a){getChat(n).then(n=>{if(n)t(n.getUser());else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),a(n)}})},this.cronapi.chat.postChatMessage=function(n,t,a,o){getChat(n).then(n=>{if(n)n.postMessage(t),a();else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),o(n)}})},this.cronapi.chat.renderChatMessage=function(n,t,a,o,r){getChat(n).then(n=>{if(n)n.renderMessage({type:"text",text:t},a),o();else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),r(n)}})},this.cronapi.chat.renderChatAttachments=function(n,t,a,o,r,c){getChat(n).then(n=>{if(n)n.renderAttachments({attachments:Array.isArray(a)?a:[a],attachmentLayout:o},t),r();else{let n=this.cronapi.$translate.instant("chatElementNotPresent");this.cronapi.$scope.Notification.error(n),c(n)}})},this.cronapi.chat.renderChatHtml=function(n,t,a,o,r,c){const s=function(n){let t=document.createElement("div");t.innerHTML=n;let a=t.getElementsByTagName("script"),o=a.length;for(;o--;)a[o].parentNode.removeChild(a[o]);return t.innerHTML},l=kendo.template(`
16
16
  <div class="#=styles.card# #=styles.cardRich#">
17
17
  <div class="#=styles.cardBody#">
18
18
  <div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cronapi-js",
3
- "version": "2.9.2-SP.16",
3
+ "version": "2.9.2-SP.18",
4
4
  "description": "Public library for CronApp's users",
5
5
  "main": "cronapi.js",
6
6
  "scripts": {