Files
luos/workflow/public_html/lib/taskscheduler/js/app.js
2025-04-06 22:54:52 +00:00

2 lines
27 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(e){function t(t){for(var n,r,a=t[0],l=t[1],c=t[2],u=0,p=[];u<a.length;u++)r=a[u],Object.prototype.hasOwnProperty.call(s,r)&&s[r]&&p.push(s[r][0]),s[r]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);d&&d(t);while(p.length)p.shift()();return o.push.apply(o,c||[]),i()}function i(){for(var e,t=0;t<o.length;t++){for(var i=o[t],n=!0,a=1;a<i.length;a++){var l=i[a];0!==s[l]&&(n=!1)}n&&(o.splice(t--,1),e=r(r.s=i[0]))}return e}var n={},s={app:0},o=[];function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=n,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/";var a=window["webpackJsonp"]=window["webpackJsonp"]||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var c=0;c<a.length;c++)t(a[c]);var d=l;o.push([0,"chunk-vendors"]),i()})({0:function(e,t,i){e.exports=i("56d7")},"034f":function(e,t,i){"use strict";var n=i("85ec"),s=i.n(n);s.a},"0867":function(e,t,i){"use strict";var n=i("1f80"),s=i.n(n);s.a},"1f80":function(e,t,i){},"28cd":function(e,t,i){"use strict";var n=i("6e54"),s=i.n(n);s.a},"56d7":function(e,t,i){"use strict";i.r(t);i("e260"),i("e6cf"),i("cca6"),i("a79d");var n=i("2b0e"),s=(i("2d26"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"app"}},[i("div",{staticClass:"x-container"},[i("GridTaskScheduler",{attrs:{data:e.dataScheduler,columns:e.columns},on:{modalShow:e.modalShow}}),i("ModalTaskSchedule",{ref:"modal",attrs:{options:e.options,optionsPeriodicity:e.optionsPeriodicity,optionsDays:e.optionsDays,timeZone:e.timeZone,optionsRepeatEvery:e.optionsRepeatSingle}})],1)])}),o=[],r=(i("a4d3"),i("e01a"),i("4160"),i("a434"),i("159b"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("v-client-table",{attrs:{data:e.data,columns:e.columns,options:e.options},scopedSlots:e._u([{key:"enable",fn:function(t){return i("b-form-checkbox",{staticClass:"b-switch",attrs:{name:"check-button",switch:""},on:{change:function(i){return e.toogleEnable(t.row)}},model:{value:t.row.enable,callback:function(i){e.$set(t.row,"enable",i)},expression:"props.row.enable"}})}},{key:"service",fn:function(t){return i("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.row.description}},[e._v(e._s(t.row.title))])}},{key:"schedule time",fn:function(t){return i("div",{staticClass:"settings-cursive"},[e._v(e._s(t.row.settings.description))])}},{key:"settings",fn:function(t){return i("div",{},[e.verifyDefaultValue(t.row)?i("span",[e._v(e._s(e.TRANSLATIONS.ID_EMAIL_SERVER_DEFAULT)+" "+e._s(e.TRANSLATIONS.ID_SETTINGS))]):i("span",[e._v(e._s(e.TRANSLATIONS.ID_CUSTOM_SETTINGS))]),i("span",{staticClass:"settings-radio",on:{click:function(i){return e.clickSettings(t.row)}}},[i("b-icon-gear-fill")],1)])}}])})],1)}),a=[],l=(i("d81d"),i("bc3a")),c=i.n(l),d=i("2ef0"),u=i.n(d),p={name:"GridTaskScheduler",props:{data:Array,columns:Array},data:function(){return{TRANSLATIONS:window.TRANSLATIONS,options:{headings:{enable:window.TRANSLATIONS.ID_ENABLE,service:window.TRANSLATIONS.ID_SERVICE,"schedule time":window.TRANSLATIONS.ID_SCHEDULE_TIME||"Schedule time"},texts:{count:window.TRANSLATIONS.ID_SHOWING_FROM_RECORDS_COUNT,first:window.TRANSLATIONS.ID_FIRST,last:window.TRANSLATIONS.ID_LAST,filter:window.TRANSLATIONS.ID_FILTER+":",limit:window.TRANSLATIONS.ID_RECORDS+":",page:window.TRANSLATIONS.ID_PAGE+":",noResults:window.TRANSLATIONS.ID_NO_MATCHING_RECORDS,filterPlaceholder:window.TRANSLATIONS.ID_EMPTY_SEARCH}}}},methods:{clickSettings:function(e){this.$emit("modalShow",e)},toogleEnable:function(e){var t={id:e.id,enable:1==e.enable?0:1};c()({method:"post",url:window.server+"/api/1.0/".concat(window.workspace,"/scheduler"),data:t,headers:{Authorization:"Bearer "+window.credentials.accessToken}})},makeToast:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;this.$bvToast.toast(t,{title:"",variant:e,solid:!0})},verifyDefaultValue:function(e){var t=!0;return u.a.map(e.default_value,(function(i,n){e[n]!=i&&(t=!1)})),t}}},h=p,w=(i("b830"),i("2877")),f=Object(w["a"])(h,r,a,!1,null,"088daffc",null),T=f.exports,m=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("b-modal",{ref:"modal",attrs:{"hide-backdrop":"","content-class":"shadow",size:"xl",title:e.TRANSLATIONS.ID_CUSTOM_SCHEDULE_SETTINGS,"hide-footer":""},on:{hide:e.eventHideModal}},[i("b-form",{on:{submit:function(t){return t.stopPropagation(),t.preventDefault(),e.submit(t)}}},[i("b-row",[i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[e._v(e._s(e.TRANSLATIONS.ID_PERIODICITY))]),i("b-form-select",{attrs:{placeholder:e.TRANSLATIONS.ID_CHOOSE_TIME,options:e.optionsPeriodicity},on:{input:function(t){return e.enableValidation(e.row)}},model:{value:e.row.settings.periodicity.value,callback:function(t){e.$set(e.row.settings.periodicity,"value",t)},expression:"row.settings.periodicity.value"}})],1),i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[i("span",{staticStyle:{color:"white"}},[e._v("*")])]),"twicePerDay"==e.row.settings.periodicity.value||"oncePerDay"==e.row.settings.periodicity.value?i("BTimeMixin",{ref:"oncePerDay",attrs:{placeholder:e.TRANSLATIONS.ID_CHOOSE_TIME,local:"en","reset-button":"","reset-value":"00:00:00"},model:{value:e.row.settings.periodicity.oncePerDay,callback:function(t){e.$set(e.row.settings.periodicity,"oncePerDay",t)},expression:"row.settings.periodicity.oncePerDay"}}):e._e()],1),i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[i("span",{staticStyle:{color:"white"}},[e._v("*")])]),"twicePerDay"==e.row.settings.periodicity.value?i("BTimeMixin",{ref:"twicePerDay",attrs:{placeholder:e.TRANSLATIONS.ID_CHOOSE_TIME,local:"en","reset-button":"","reset-value":"00:00:00"},model:{value:e.row.settings.periodicity.twicePerDay,callback:function(t){e.$set(e.row.settings.periodicity,"twicePerDay",t)},expression:"row.settings.periodicity.twicePerDay"}}):e._e(),i("b-form-invalid-feedback",{attrs:{id:"endingTime-feedback"}})],1)],1),i("b-row",{staticClass:"row-padding"},[i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[e._v(e._s(e.TRANSLATIONS.ID_STARTING_TIME))]),i("b-form-timepicker",{attrs:{placeholder:e.TRANSLATIONS.ID_CHOOSE_TIME,local:"en","reset-button":"",disabled:"twicePerDay"===e.row.settings.periodicity.value||"oncePerDay"===e.row.settings.periodicity.value,state:e.validateState("startingTime"),"aria-describedby":"startingTime-feedback"},on:{input:function(t){return e.enableValidation(e.row)}},model:{value:e.row.settings.startingTime,callback:function(t){e.$set(e.row.settings,"startingTime",t)},expression:"row.settings.startingTime"}}),i("b-form-invalid-feedback",{attrs:{id:"startingTime-feedback"}})],1),i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[e._v(e._s(e.TRANSLATIONS.ID_ENDING_TIME))]),i("b-form-timepicker",{attrs:{placeholder:e.TRANSLATIONS.ID_CHOOSE_TIME,local:"en","reset-button":"",disabled:"twicePerDay"===e.row.settings.periodicity.value||"oncePerDay"===e.row.settings.periodicity.value,state:e.validateState("endingTime"),"aria-describedby":"endingTime-feedback"},on:{input:function(t){return e.enableValidation(e.row)}},model:{value:e.row.settings.endingTime,callback:function(t){e.$set(e.row.settings,"endingTime",t)},expression:"row.settings.endingTime"}}),i("b-form-invalid-feedback",{attrs:{id:"endingTime-feedback"}})],1),i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[e._v(e._s(e.TRANSLATIONS.ID_TIME_ZONE))]),i("b-form-select",{attrs:{options:e.timeZone,disabled:!(e.row.settings.startingTime||e.row.settings.endingTime||"twicePerDay"===e.row.settings.periodicity.value||"oncePerDay"===e.row.settings.periodicity.value),state:e.validateState("timezone"),"aria-describedby":"timezone-feedback"},model:{value:e.row.settings.timezone,callback:function(t){e.$set(e.row.settings,"timezone",t)},expression:"row.settings.timezone"}}),i("b-form-invalid-feedback",{attrs:{id:"timezone-feedback"}})],1)],1),i("b-row",{staticClass:"row-padding"},[i("b-col",{attrs:{cols:"8"}},[i("label",{attrs:{for:"timepicker-placeholder"}},[e._v(e._s(e.TRANSLATIONS.ID_REPEAT_EVERY))]),i("b-row",[i("b-col",[i("b-form-input",{attrs:{type:"number",min:"1",formatter:e.formatRepeatEvery},on:{change:function(t){return e.changeRepeatUnit(e.row.settings.everyOn)}},model:{value:e.row.settings.everyOn,callback:function(t){e.$set(e.row.settings,"everyOn",t)},expression:"row.settings.everyOn"}})],1),i("b-col",[i("b-form-select",{attrs:{options:e.optionsRepeatEvery},on:{change:function(t){return e.changeRepeatOption(e.row.settings.everyOn)}},model:{value:e.row.settings.interval,callback:function(t){e.$set(e.row.settings,"interval",t)},expression:"row.settings.interval"}})],1)],1)],1)],1),"d"!=e.row.settings.everyOn?i("b-row",{staticClass:"row-padding"},[i("b-col",[i("label",{attrs:{for:"timepicker-placeholder"}},[e._v(" "+e._s(e.TRANSLATIONS.ID_REPEAT_ON)+" "),i("span",{staticClass:"invalid"},[e._v("*")])]),i("div",[i("b-form-checkbox-group",{staticClass:"options-days",attrs:{options:e.optionsDays,buttons:"","button-variant":"default",size:"sm",name:"buttons-2",state:e.validateState("repeatOn"),"aria-describedby":"repeatOn-feedback"},model:{value:e.row.settings.repeatOn,callback:function(t){e.$set(e.row.settings,"repeatOn",t)},expression:"row.settings.repeatOn"}}),e.$v.row&&e.$v.row.settings&&e.$v.row.settings.repeatOn.$error?i("div",{staticClass:"invalid",attrs:{id:"repeatOn-feedback"}},[e._v(" "+e._s(e.TRANSLATIONS.ID_REQUIRED_FIELD)+" ")]):e._e()],1)])],1):e._e(),i("div",{staticClass:"row-padding"},[i("b-button",{staticClass:"float-right b-button b-success",attrs:{type:"submit"}},[e._v(e._s(e.TRANSLATIONS.ID_SAVE))]),i("span",{staticClass:"float-right w-box40"}),i("b-button",{staticClass:"float-right b-button b-danger",on:{click:e.hide}},[e._v(e._s(e.TRANSLATIONS.ID_CANCEL))])],1)],1)],1)],1)},v=[],S=(i("d3b7"),i("25f0"),i("5753")),b=i("1dce"),g=i("5530"),A=i("326b"),I=i("1947"),_=i("88b7"),y=(i("4de4"),i("a15b"),i("e829")),N=i("93aa"),O=i("7386"),E=i("29b3"),D=Object.assign({},y["a"].props),R={name:"BTimeExtend",mixins:[y["a"]],props:D,render:function(e){var t=this;if(this.hidden)return e();var i=this.valueId,n=this.computedAriaLabelledby,s=[],o=function(n,o,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=t.safeId("_spinbutton_".concat(o,"_"))||null;return s.push(l),e(N["a"],{key:o,ref:"spinners",refInFor:!0,class:r,props:Object(g["a"])({id:l,placeholder:"--",vertical:!0,required:!0,disabled:t.disabled,readonly:t.readonly,locale:t.computedLocale,labelIncrement:t.labelIncrement,labelDecrement:t.labelDecrement,wrap:!0,ariaControls:i,min:0},a),scopedSlots:t.spinScopedSlots,on:{change:n}})},r=function(){return e("div",{staticClass:"d-flex flex-column",class:{"text-muted":t.disabled||t.readonly},attrs:{"aria-hidden":"true"}},[e(O["cf"],{props:{shiftV:4,scale:.5}}),e(O["cf"],{props:{shiftV:-4,scale:.5}})])},a=[];a.push(o(this.setHours,"hours","b-time-hours",{value:this.modelHours,max:23,step:1,formatterFn:this.formatHours,ariaLabel:this.labelHours})),a.push(r()),a.push(o(this.setMinutes,"minutes","b-time-minutes",{value:this.modelMinutes,max:59,disabled:!0,step:this.minutesStep||1,formatterFn:this.formatMinutes,ariaLabel:this.labelMinutes})),this.showSeconds&&(a.push(r()),a.push(o(this.setSeconds,"seconds","b-time-seconds",{value:this.modelSeconds,max:59,step:this.secondsStep||1,formatterFn:this.formatSeconds,ariaLabel:this.labelSeconds}))),this.is12Hour&&a.push(o(this.setAmpm,"ampm","b-time-ampm",{value:this.modelAmpm,max:1,formatterFn:this.formatAmpm,ariaLabel:this.labelAmpm,required:!1})),a=e("div",{staticClass:"d-flex align-items-center justify-content-center mx-auto",attrs:{role:"group",tabindex:this.disabled||this.readonly?null:"-1","aria-labelledby":n},on:{keydown:this.onSpinLeftRight,click:function(e){e.target===e.currentTarget&&t.focus()}}},a);var l=e("output",{staticClass:"form-control form-control-sm text-center",class:{disabled:this.disabled||this.readonly},attrs:{id:i,role:"status",for:s.filter(E["a"]).join(" ")||null,tabindex:this.disabled?null:"-1","aria-live":this.isLive?"polite":"off","aria-atomic":"true"},on:{click:this.focus,focus:this.focus}},[e("bdi",this.formattedTimeString),this.computedHMS?e("span",{staticClass:"sr-only"}," (".concat(this.labelSelected,") ")):""]),c=e("header",{staticClass:"b-time-header",class:{"sr-only":this.hideHeader}},[l]),d=this.normalizeSlot("default");return d=d?e("footer",{staticClass:"b-time-footer"},d):e(),e("div",{staticClass:"b-time d-inline-flex flex-column text-center",attrs:{role:"group",lang:this.computedLang||null,"aria-labelledby":n||null,"aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly&&!this.disabled?"true":null}},[c,a,d])}},L=i("1524"),k=Object.assign({},A["a"].props),x={name:"BTimeMixin",mixins:[A["a"]],props:k,watch:{value:function(e){this.localHMS=e||""}},methods:{onInput:function(e){this.localHMS!==e&&(this.localHMS=e)}},render:function(e){var t=this.localHMS,i=this.disabled,n=this.readonly,s=Object(L["d"])(this.placeholder)?this.labelNoTimeSelected:this.placeholder,o=[];if(this.nowButton){var r=this.labelNowButton;o.push(e(I["a"],{key:"now-btn",props:{size:"sm",disabled:i||n,variant:this.nowButtonVariant},attrs:{"aria-label":r||null},on:{click:this.onNowButton}},r))}if(this.resetButton){o.length>0&&o.push(e("span"," "));var a=this.labelResetButton;o.push(e(I["a"],{key:"reset-btn",props:{size:"sm",disabled:i||n,variant:this.resetButtonVariant},attrs:{"aria-label":a||null},on:{click:this.onResetButton}},a))}if(!this.noCloseButton){o.length>0&&o.push(e("span"," "));var l=this.labelCloseButton;o.push(e(I["a"],{key:"close-btn",props:{size:"sm",disabled:i,variant:this.closeButtonVariant},attrs:{"aria-label":l||null},on:{click:this.onCloseButton}},l))}o.length>0&&(o=[e("div",{staticClass:"b-form-date-controls d-flex flex-wrap",class:{"justify-content-between":o.length>1,"justify-content-end":o.length<2}},o)]);var c=e(R,{ref:"time",staticClass:"b-form-time-control",props:this.timeProps,on:{input:this.onInput,context:this.onContext}},o);return e(_["a"],{ref:"control",staticClass:"b-form-timepicker",props:Object(g["a"])(Object(g["a"])({},this.$props),{},{id:this.safeId(),rtl:this.isRTL,lang:this.computedLang,value:t||"",formattedValue:t?this.formattedValue:"",placeholder:s||""}),on:{show:this.onShow,shown:this.onShown,hidden:this.onHidden},scopedSlots:{"button-content":this.$scopedSlots["button-content"]||this.defaultButtonFn}},[c])}},P=i("b5ae"),C={name:"GridTaskScheduler",props:{options:Array,optionsDays:Array,timeZone:Array,optionsRepeatEvery:Array,optionsPeriodicity:Array},components:{BTimeMixin:x},mixins:[b["validationMixin"]],data:function(){return{TRANSLATIONS:window.TRANSLATIONS,row:{settings:{periodicity:{unit:null,oncePerDay:"00:00:00",twicePerDay:"00:00:00"},startingTime:"",endingTime:"",timeZone:"1",repeatEvery:{unit:1,repeat:"w"},repeatDays:[0,1,2,3,4,5,6]}}}},validations:function(){return this.row.settings.startingTime||this.row.settings.endingTime?{row:{settings:{startingTime:{required:P["required"]},endingTime:{required:P["required"]},timezone:{required:P["required"]},repeatOn:{required:P["required"]}}}}:"oncePerDay"==this.row.settings.periodicity.value||"twicePerDay"==this.row.settings.periodicity.value?{row:{settings:{repeatOn:{required:P["required"]},timezone:{required:P["required"]}}}}:{row:{settings:{repeatOn:{required:P["required"]}}}}},mounted:function(){},methods:{clickSettings:function(e){this.$root.$emit("modalShow",e)},show:function(){this.$refs["modal"].show()},changeRepeatUnit:function(e){"1"==e.toString()?this.optionsRepeatEvery=this.$parent.optionsRepeatSingle:this.optionsRepeatEvery=this.$parent.optionsRepeatPlural},changeRepeatOption:function(e){"d"==e.toString()&&(this.row.settings.repeatOn=[0,1,2,3,4,5,6])},enableValidation:function(e){"oncePerDay"!==e.settings.periodicity.value&&"twicePerDay"!==e.settings.periodicity.value||(e.settings.startingTime="",e.settings.endingTime=""),e.timezone||e.settings.timezone||(e.settings.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone),""==e.settings.startingTime&&""==e.settings.endingTime&&"oncePerDay"!=e.settings.periodicity.value&&"twicePerDay"!=e.settings.periodicity.value&&(e.settings.timezone=null)},save:function(){var e,t=new S["xCron"];this.row.settings.repeatOn=this.formatRepeatOn(this.row.settings.repeatOn),e=t.toExpression(this.row.settings),u.a.extend(this.row,e),this.row.settings.description=t.toDescription(this.row.settings),this.$parent.updateSettings(this.row),e.id=this.row.id,c()({method:"post",url:window.server+"/api/1.0/".concat(window.workspace,"/scheduler"),data:e,headers:{Authorization:"Bearer "+window.credentials.accessToken}}),this.$refs["modal"].hide()},submit:function(){this.$v.row.settings.$touch(),this.$v.row.settings.$anyError||this.save()},hide:function(){this.$refs["modal"].hide()},eventHideModal:function(){var e=new S["xCron"],t=u.a.extend({},this.row);t.settings=u.a.extend({},e.toSettings(t)),this.$parent.updateSettings(t)},validateState:function(e){if(this.$v.row&&this.$v.row.settings&&this.$v.row.settings[e]){var t=this.$v.row.settings[e],i=t.$dirty,n=t.$error;return i?!n:null}return null},formatRepeatOn:function(e){var t=u.a.sortBy(e,(function(e){return e}));return t},makeToast:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;this.$bvToast.toast(t,{variant:e,solid:!0})},formatRepeatEvery:function(e){return String(e).substring(0,3)}}},$=C,M=(i("0867"),Object(w["a"])($,m,v,!1,null,null,null)),Y=M.exports,B={name:"App",components:{GridTaskScheduler:T,ModalTaskSchedule:Y},mounted:function(){var e=this,t=this,i=window.server+"/api/1.0/".concat(window.workspace,"/scheduler")+(window.category?"?category="+window.category:"");c.a.get(i,{headers:{Authorization:"Bearer "+window.credentials.accessToken}}).then((function(t){var i=[],n=[];u.a.forEach(t.data,(function(e){var t=new S["xCron"];e.settings=u.a.extend({},t.toSettings(e)),e.title=window.TRANSLATIONS[e.title]||e.title,e.description=window.TRANSLATIONS[e.description]||e.description,e.enable=1==e.enable,i.push(e)})),u.a.forEach(window.timezoneArray,(function(e){n.push({value:e,text:e})})),e.dataScheduler=i,e.timeZone=n})).catch((function(e){e&&e.message&&"ECONNABORTED"!==e.code&&t.$bvToast.toast(e.message||"",{title:"",variant:"danger",solid:!0})}))},data:function(){return{columns:["enable","service","schedule time","settings"],dataScheduler:[],optionsDays:[{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_1"],value:"1"},{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_2"],value:"2"},{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_3"],value:"3"},{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_4"],value:"4"},{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_5"],value:"5"},{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_6"],value:"6"},{text:window.TRANSLATIONS["ID_WEEKDAY_ABB_0"],value:"0"}],optionsRepeatSingle:[{text:window.TRANSLATIONS["ID_WEEK"],value:"week"},{text:window.TRANSLATIONS["ID_MONTH"],value:"month"},{text:window.TRANSLATIONS["ID_YEAR"],value:"year"}],optionsRepeatPlural:[{text:window.TRANSLATIONS["ID_WEEKS"],value:"week"},{text:window.TRANSLATIONS["ID_MONTHS"],value:"month"},{text:window.TRANSLATIONS["ID_YEARS"],value:"year"}],optionsPeriodicity:[{text:window.TRANSLATIONS["ID_EVERY_MINUTE"],value:"*/1 *"},{text:window.TRANSLATIONS["ID_EVERY_FIVE_MINUTES"],value:"*/5 *"},{text:window.TRANSLATIONS["ID_EVERY_TEN_MINUTES"],value:"*/10 *"},{text:window.TRANSLATIONS["ID_EVERY_FIFTEEN_MINUTES"],value:"*/15 *"},{text:window.TRANSLATIONS["ID_EVERY_THIRTY_MINUTES"],value:"*/30 *"},{text:window.TRANSLATIONS["ID_EVERY_HOUR"],value:"0 */1"},{text:window.TRANSLATIONS["ID_ONCE_PER_DAY"],value:"oncePerDay"},{text:window.TRANSLATIONS["ID_TWICE_PER_DAY"],value:"twicePerDay"}],selected:[]}},methods:{modalShow:function(e){this.$refs["modal"].row=e,this.$refs["modal"].show(),this.$refs["modal"].changeRepeatUnit(e.settings.everyOn),this.$refs["modal"].$v.$reset()},updateSettings:function(e){for(var t=-1,i=0;i<this.dataScheduler.length;i+=1)this.dataScheduler[i].id==e.id&&(t=i);this.dataScheduler.splice(t,1,e)}}},V=B,H=(i("034f"),Object(w["a"])(V,s,o,!1,null,null,null)),j=H.exports,z=i("5f5b"),U=i("b1e0"),W=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("th",e._g(e._b({attrs:{id:""+e.convertString(e.props.heading)}},"th",e.props.thAttrs,!1),e.props.thEvents),[i("span",{staticClass:"VueTables__heading",attrs:{title:e.props.title}},[i("vnodes",{attrs:{vnodes:e.props.heading}})],1),i("vt-sort-control")],1)},F=[],K=(i("ac1f"),i("5319"),i("53ca")),q=i("3f68"),G=i.n(q),Z={name:"VtTableHeading",components:{VtSortControl:G.a,vnodes:{functional:!0,render:function(e,t){return"object"===Object(K["a"])(t.props.vnodes)?t.props.vnodes:[t.props.vnodes]}}},props:["props"],methods:{convertString:function(e){var t=e.replace(/ /g,"");return t.toLowerCase()}}},J=Z,Q=(i("28cd"),Object(w["a"])(J,W,F,!1,null,null,null)),X=Q.exports,ee=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("td",{class:e.props.classes+" __"+e.convertString(e.props.column),attrs:{tabindex:e.props.tabIndex}},[i("vnodes",{attrs:{vnodes:e.props.content}})],1)},te=[],ie={name:"TableCell",props:["props"],components:{vnodes:{functional:!0,render:function(e,t){return"object"===Object(K["a"])(t.props.vnodes)?t.props.vnodes:[t.props.vnodes]}}},created:function(){},methods:{convertString:function(e){var t;return e?(t=e.replace(/ /g,""),t.toLowerCase()):e}}},ne=ie,se=Object(w["a"])(ne,ee,te,!1,null,null,null),oe=se.exports,re=i("9ebe"),ae=(i("f9e3"),i("2dd8"),{}),le=!1,ce="bootstrap4";n["default"].use(re["ClientTable"],ae,le,ce,{tableHeading:X,tableCell:oe}),n["default"].use(z["a"]),n["default"].use(U["a"]),new n["default"]({render:function(e){return e(j)}}).$mount("#app")},5753:function(e,t,i){i("a4d3"),i("e01a"),i("a15b"),i("fb6a"),i("d3b7"),i("ac1f"),i("25f0"),i("466d"),i("5319"),i("1276");var n=i("970b"),s=i("5bc3"),o=function(){"use strict";function e(){n(this,e),this.minutes=null,this.hours=null,this.days=null,this.months=null,this.dates=null,this.settings={}}return s(e,[{key:"toExpression",value:function(e){var t={};return t.startingTime=""==e.startingTime?null:e.startingTime,t.endingTime=""==e.endingTime?null:e.endingTime,t.expression=this.formatExpression(e),t.timezone=""==e.timezone?null:e.timezone,t.everyOn=e.everyOn,t.interval=e.interval,t}},{key:"toSettings",value:function(e){var t,i=e.expression.split(/\s+/);return this.minutes=i[0],this.hours=i[1],this.days=i[2],this.months=i[3],this.dates=i[4],t=this.minutes+" "+this.hours,this.settings.periodicity=this.formatPeriodicity(t),this.settings.repeatOn="*"==this.dates?["0","1","2","3","4","5","6"]:this.dates.split(","),this.settings.startingTime=e.startingTime?e.startingTime:"",this.settings.endingTime=e.endingTime?e.endingTime:"",this.settings.everyOn=e.everyOn,this.settings.interval=e.interval,this.settings.timezone=e.timezone,this.settings.description=this.toDescription(this.settings),this.settings}},{key:"toDescription",value:function(e){var t="";switch(e.periodicity.value){case"*/1 *":t+=window.TRANSLATIONS["ID_EVERY_MINUTE"];break;case"*/5 *":t+=window.TRANSLATIONS["ID_EVERY_FIVE_MINUTES"];break;case"*/10 *":t+=window.TRANSLATIONS["ID_EVERY_TEN_MINUTES"];break;case"*/15 *":t+=window.TRANSLATIONS["ID_EVERY_FIFTEEN_MINUTES"];break;case"*/30 *":t+=window.TRANSLATIONS["ID_EVERY_THIRTY_MINUTES"];break;case"0 */1":t+=window.TRANSLATIONS["ID_EVERY_HOUR"];break;case"oncePerDay":t+=window.TRANSLATIONS["ID_ONCE_PER_DAY"]+" "+this.tConvert(e.periodicity.oncePerDay);break;case"twicePerDay":t+=window.TRANSLATIONS["ID_TWICE_PER_DAY"]+" "+this.tConvert(e.periodicity.oncePerDay)+" & "+this.tConvert(e.periodicity.twicePerDay);break}return e.startingTime&&(t+=" "+window.TRANSLATIONS["ID_AT_TILL"].replace("${0}",this.tConvert(e.startingTime)).replace("${1}",this.tConvert(e.endingTime))),e.timezone&&(t+=" "+window.TRANSLATIONS["ID_TIME_IN"].replace("${0}",e.timezone)),e.everyOn&&(t+=this.intervalToDescription(e.everyOn,e.interval)),e.repeatOn&&(t+=this.repeatOnToDescription(e.repeatOn)),t}},{key:"tConvert",value:function(e){return 3==e.split(":").length&&(e=[e.split(":")[0],e.split(":")[1]].join(":")),e=e.toString().match(/^([01]*\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/)||[e],e.length>1&&(e=e.slice(1),e[5]=+e[0]<12?"AM":"PM",e[0]=+e[0]%12||12),e.join("")}},{key:"intervalToDescription",value:function(e,t){var i="",n={week:window.TRANSLATIONS["ID_WEEK"],month:window.TRANSLATIONS["ID_MONTH"],year:window.TRANSLATIONS["ID_YEAR"]},s={week:window.TRANSLATIONS["ID_WEEKS"],month:window.TRANSLATIONS["ID_MONTHS"],year:window.TRANSLATIONS["ID_YEARS"]};return i+="1"==e?" "+window.TRANSLATIONS["ID_EVERY"].replace("${0}","").replace("${1}",n[t]):" "+window.TRANSLATIONS["ID_EVERY"].replace("${0}",e).replace("${1}",s[t]),"1"==e&&"week"==t&&(i=""),i}},{key:"repeatOnToDescription",value:function(e){for(var t=" on ",i=[window.TRANSLATIONS["ID_WEEKDAY_0"],window.TRANSLATIONS["ID_WEEKDAY_1"],window.TRANSLATIONS["ID_WEEKDAY_2"],window.TRANSLATIONS["ID_WEEKDAY_3"],window.TRANSLATIONS["ID_WEEKDAY_4"],window.TRANSLATIONS["ID_WEEKDAY_5"],window.TRANSLATIONS["ID_WEEKDAY_6"]],n=0;n<e.length;n+=1)t+=i[parseInt(e[n])],t+=n==e.length-1?" ":", ";return 7==e.length&&(t=""),t}},{key:"verifyPeriodicyIfDailyAt",value:function(e){var t=!1;switch(e){case"*/1 *":case"*/5 *":case"*/10 *":case"*/15 *":case"*/30 *":case"0 */1":break;default:t=!0;break}return t}},{key:"formatExpression",value:function(e){var t="* * * * * *";return t="oncePerDay"==e.periodicity.value?this.formatPeriodicityDailyAt(e.periodicity.oncePerDay)+" * * "+e.repeatOn.join(","):"twicePerDay"==e.periodicity.value?this.formatPeriodicityTwiceDaily(e.periodicity.oncePerDay,e.periodicity.twicePerDay)+" * * "+e.repeatOn.join(","):e.periodicity.value+" * * "+e.repeatOn.join(","),t}},{key:"formatPeriodicityDailyAt",value:function(e){return"0 "+e.split(":")[0]}},{key:"formatPeriodicityTwiceDaily",value:function(e,t){return"0 "+parseInt(e.split(":")[0])+","+parseInt(t.split(":")[0])}},{key:"formatPeriodicity",value:function(e){var t=e,i="00:00:00",n="00:00:00",s=e.split(/\s+/);return this.verifyPeriodicyIfDailyAt(e)&&(t="oncePerDay",i=s[1].split(",")[0]+":00:00",s[1]&&s[1].split(",").length>1&&"0"==s[0]&&(t="twicePerDay",n=s[1].split(",")[1]+":00:00")),{value:t,oncePerDay:i,twicePerDay:n}}}]),e}();e.exports.xCron=o},"6e54":function(e,t,i){},"85ec":function(e,t,i){},b830:function(e,t,i){"use strict";var n=i("ef0c"),s=i.n(n);s.a},ef0c:function(e,t,i){}});
//# sourceMappingURL=app.js.map