From c2c7c2778b3dc1f2b9299fa21c15e191edb89a8c Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Wed, 2 Oct 2019 11:07:09 +0200 Subject: Fix master testing and update eslint-config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) Signed-off-by: npmbuildbot[bot] --- apps/workflowengine/js/workflowengine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/workflowengine/js/workflowengine.js') diff --git a/apps/workflowengine/js/workflowengine.js b/apps/workflowengine/js/workflowengine.js index ff40c801185..ddbb44dc4b4 100644 --- a/apps/workflowengine/js/workflowengine.js +++ b/apps/workflowengine/js/workflowengine.js @@ -401,7 +401,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e. * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - */i.default.use(r.a);var h,m,_,b=new r.a.Store({state:{rules:[],scope:OCP.InitialState.loadState("workflowengine","scope"),operations:OCP.InitialState.loadState("workflowengine","operators"),plugins:i.default.observable({checks:{},operators:{}}),entities:OCP.InitialState.loadState("workflowengine","entities"),events:OCP.InitialState.loadState("workflowengine","entities").map((function(e){return e.events.map((function(t){return A({id:"".concat(e.id,"::").concat(t.eventName),entity:e},t)}))})).flat(),checks:OCP.InitialState.loadState("workflowengine","checks")},mutations:{addRule:function(e,t){e.rules.push(A({},t,{valid:!0}))},updateRule:function(e,t){var n=e.rules.findIndex((function(e){return t.id===e.id})),o=Object.assign({},t);i.default.set(e.rules,n,o)},removeRule:function(e,t){var n=e.rules.findIndex((function(e){return t.id===e.id}));e.rules.splice(n,1)},addPluginCheck:function(e,t){i.default.set(e.plugins.checks,t.class,t)},addPluginOperator:function(e,t){t=Object.assign({color:"var(--color-primary-element)"},t,e.operations[t.id]||{}),i.default.set(e.operations,t.id,t)}},actions:{fetchRules:(_=p(regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.a.get(c(""));case 2:n=e.sent,o=n.data,Object.values(o.ocs.data).flat().forEach((function(e){t.commit("addRule",e)}));case 5:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)}),createNewRule:function(e,t){var n=null,o=[];!1===t.isComplex&&""===t.fixedEntity&&(o=[(n=(n=e.state.entities.find((function(e){return t.entities&&t.entities[0]===e.id})))||Object.values(e.state.entities)[0]).events[0].eventName]),e.commit("addRule",{id:-(new Date).getTime(),class:t.id,entity:n?n.id:t.fixedEntity,events:o,name:"",checks:[],operation:t.operation||""})},updateRule:function(e,t){e.commit("updateRule",A({},t,{events:"string"==typeof t.events?JSON.parse(t.events):t.events}))},removeRule:function(e,t){e.commit("removeRule",t)},pushUpdateRule:(m=p(regeneratorRuntime.mark((function e(t,n){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d()();case 2:if(!(n.id<0)){e.next=8;break}return e.next=5,s.a.post(c(""),n);case 5:o=e.sent,e.next=11;break;case 8:return e.next=10,s.a.put(c("/".concat(n.id)),n);case 10:o=e.sent;case 11:i.default.set(n,"id",o.data.ocs.data.id),t.commit("updateRule",n);case 13:case"end":return e.stop()}}),e)}))),function(e,t){return m.apply(this,arguments)}),deleteRule:(h=p(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d()();case 2:return e.next=4,s.a.delete(c("/".concat(n.id)));case 4:t.commit("removeRule",n);case 5:case"end":return e.stop()}}),e)}))),function(e,t){return h.apply(this,arguments)}),setValid:function(e,t){var n=t.rule,o=t.valid;n.valid=o,e.commit("updateRule",n)}},getters:{getRules:function(e){return e.rules.sort((function(e,t){return e.id-t.id||t.class-e.class}))},getOperationForRule:function(e){return function(t){return e.operations[t.class]}},getEntityForOperation:function(e){return function(t){return e.entities.find((function(e){return t.fixedEntity===e.id}))}},getEventsForOperation:function(e){return function(t){return e.events}},getChecksForEntity:function(e){return function(t){return Object.values(e.checks).filter((function(e){return e.supportedEntities.indexOf(t)>-1||0===e.supportedEntities.length})).map((function(t){return e.plugins.checks[t.id]})).reduce((function(e,t){return e[t.class]=t,e}),{})}}}}),v=o(193),g=o(30),y=o(31),L=o(1),w={name:"Event",components:{Multiselect:L.Multiselect},props:{rule:{type:Object,required:!0}},computed:{entity:function(){return this.$store.getters.getEntityForOperation(this.operation)},operation:function(){return this.$store.getters.getOperationForRule(this.rule)},allEvents:function(){return this.$store.getters.getEventsForOperation(this.operation)},currentEvent:function(){var e=this;return this.rule.events?this.allEvents.find((function(t){return t.entity.id===e.rule.entity&&-1!==e.rule.events.indexOf(t.eventName)})):this.allEvents.length>0?this.allEvents[0]:null}},methods:{updateEvent:function(e){this.$set(this.rule,"entity",e.entity.id),this.$set(this.rule,"events",[e.eventName]),this.$store.dispatch("updateRule",this.rule)}}};o(215);function z(e,t,n,o,i,r,a,s){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(e,t){return c.call(t),d(e,t)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:e,options:u}}var T=z(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.operation.isComplex&&""!==e.operation.fixedEntity?n("div",{staticClass:"isComplex"},[n("img",{staticClass:"option__icon",attrs:{src:e.entity.icon}}),e._v(" "),n("span",{staticClass:"option__title option__title_single"},[e._v(e._s(e.operation.triggerHint))])]):n("Multiselect",{attrs:{value:e.currentEvent,options:e.allEvents,label:"eventName","track-by":"id","allow-empty":!1,disabled:e.allEvents.length<=1},on:{input:e.updateEvent},scopedSlots:e._u([{key:"singleLabel",fn:function(t){return[n("img",{staticClass:"option__icon",attrs:{src:t.option.entity.icon}}),e._v(" "),n("span",{staticClass:"option__title option__title_single"},[e._v(e._s(t.option.displayName))])]}},{key:"option",fn:function(t){return[n("img",{staticClass:"option__icon",attrs:{src:t.option.entity.icon}}),e._v(" "),n("span",{staticClass:"option__title"},[e._v(e._s(t.option.displayName))])]}}])})],1)}),[],!1,null,"5d791f23",null).exports,O=o(194),k=o.n(O),D={name:"Check",components:{ActionButton:y.ActionButton,Actions:g.Actions,Multiselect:L.Multiselect},directives:{ClickOutside:k.a},props:{check:{type:Object,required:!0},rule:{type:Object,required:!0}},data:function(){return{deleteVisible:!1,currentOption:null,currentOperator:null,options:[],valid:!0}},computed:{Checks:function(){return this.$store.getters.getChecksForEntity(this.rule.entity)},operators:function(){return this.currentOption?this.Checks[this.currentOption.class].operators:[]},currentComponent:function(){if(!this.currentOption)return[];var e=this.Checks[this.currentOption.class].component;return e},valuePlaceholder:function(){return this.currentOption&&this.currentOption.placeholder?this.currentOption.placeholder(this.check):""}},watch:{"check.operator":function(){this.validate()}},mounted:function(){var e=this;this.options=Object.values(this.Checks),this.currentOption=this.Checks[this.check.class],this.currentOperator=this.operators.find((function(t){return t.operator===e.check.operator}))},methods:{showDelete:function(){this.deleteVisible=!0},hideDelete:function(){this.deleteVisible=!1},validate:function(){return this.currentOption&&this.currentOption.validate&&(this.currentOption.validate(this.check)?this.valid=!0:this.valid=!1),this.$store.dispatch("setValid",{rule:this.rule,valid:this.rule.valid&&this.valid}),this.valid},updateCheck:function(){this.check.class!==this.currentOption.class&&(this.currentOperator=this.operators[0]),this.check.class=this.currentOption.class,this.check.operator=this.currentOperator.operator,this.validate()&&this.$emit("update",this.check)}}},N=(o(217),z(D,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hideDelete,expression:"hideDelete"}],staticClass:"check",on:{click:e.showDelete}},[n("Multiselect",{ref:"checkSelector",attrs:{options:e.options,label:"name","track-by":"class","allow-empty":!1,placeholder:e.t("workflowengine","Select a filter")},on:{input:e.updateCheck},model:{value:e.currentOption,callback:function(t){e.currentOption=t},expression:"currentOption"}}),e._v(" "),n("Multiselect",{attrs:{disabled:!e.currentOption,options:e.operators,label:"name","track-by":"operator","allow-empty":!1,placeholder:e.t("workflowengine","Select a comparator")},on:{input:e.updateCheck},model:{value:e.currentOperator,callback:function(t){e.currentOperator=t},expression:"currentOperator"}}),e._v(" "),e.currentOperator&&e.currentComponent?n(e.currentOption.component,{tag:"component",attrs:{disabled:!e.currentOption,check:e.check},on:{input:e.updateCheck,valid:function(t){(e.valid=!0)&&e.validate()},invalid:function(t){(e.valid=!1)&&e.validate()}},model:{value:e.check.value,callback:function(t){e.$set(e.check,"value",t)},expression:"check.value"}}):n("input",{directives:[{name:"model",rawName:"v-model",value:e.check.value,expression:"check.value"}],class:{invalid:!e.valid},attrs:{type:"text",disabled:!e.currentOption,placeholder:e.valuePlaceholder},domProps:{value:e.check.value},on:{input:[function(t){t.target.composing||e.$set(e.check,"value",t.target.value)},e.updateCheck]}}),e._v(" "),e.deleteVisible||!e.currentOption?n("Actions",[n("ActionButton",{attrs:{icon:"icon-delete"},on:{click:function(t){return e.$emit("remove")}}})],1):e._e()],1)}),[],!1,null,"1e5ba59e",null).exports),Y={name:"Operation",props:{operation:{type:Object,required:!0},colored:{type:Boolean,default:!0}}},x=(o(219),z(Y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"actions__item",class:{colored:e.colored},style:{backgroundColor:e.colored?e.operation.color:"transparent"}},[n("div",{staticClass:"icon",class:e.operation.iconClass,style:{backgroundImage:e.operation.iconClass?"":"url("+e.operation.icon+")"}}),e._v(" "),n("div",{staticClass:"actions__item__description"},[n("h3",[e._v(e._s(e.operation.name))]),e._v(" "),n("small",[e._v(e._s(e.operation.description))])]),e._v(" "),n("div",{staticClass:"actions__item_options"},[e._t("default")],2)])}),[],!1,null,"3fff5a4e",null).exports);function S(e,t,n,o,i,r,a){try{var s=e[r](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(o,i)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){S(r,o,i,a,s,"next",e)}function s(e){S(r,o,i,a,s,"throw",e)}a(void 0)}))}}var B,C,W,q,j={name:"Rule",components:{Operation:x,Check:N,Event:T,Actions:g.Actions,ActionButton:y.ActionButton},directives:{Tooltip:v.Tooltip},props:{rule:{type:Object,required:!0}},data:function(){return{editing:!1,checks:[],error:null,dirty:this.rule.id<0,checking:!1}},computed:{operation:function(){return this.$store.getters.getOperationForRule(this.rule)},ruleStatus:function(){return this.error||!this.rule.valid?{title:t("workflowengine","The configuration is invalid"),class:"icon-close-white invalid",tooltip:{placement:"bottom",show:!0,content:this.error}}:!this.dirty||this.checking?{title:"Active",class:"icon icon-checkmark"}:{title:"Save",class:"icon-confirm-white primary"}},lastCheckComplete:function(){var e=this.rule.checks[this.rule.checks.length-1];return void 0===e||null!==e.class}},methods:{updateOperation:(q=E(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$set(this.rule,"operation",t),e.next=3,this.updateRule();case 3:case"end":return e.stop()}}),e,this)}))),function(e){return q.apply(this,arguments)}),updateRule:(W=E(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.checking=!0,this.dirty||(this.dirty=!0);try{this.error=null,this.checking=!1,this.$store.dispatch("updateRule",this.rule)}catch(e){console.error("Failed to update operation",e),this.error=e.response.ocs.meta.message,this.checking=!1}case 3:case"end":return e.stop()}}),e,this)}))),function(){return W.apply(this,arguments)}),saveRule:(C=E(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$store.dispatch("pushUpdateRule",this.rule);case 3:this.dirty=!1,this.error=null,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Failed to save operation"),this.error=e.t0.response.data.ocs.meta.message;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return C.apply(this,arguments)}),deleteRule:function(){var e=E(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$store.dispatch("deleteRule",this.rule);case 3:e.next=9;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to delete operation"),this.error=e.t0.response.data.ocs.meta.message;case 9:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),cancelRule:function(){this.$store.dispatch("removeRule",this.rule)},removeCheck:(B=E(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.rule.checks.findIndex((function(e){return e===t})))>-1&&this.$delete(this.rule.checks,n),this.$store.dispatch("updateRule",this.rule);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return B.apply(this,arguments)})}},H=(o(221),z(j,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"section rule",style:{borderLeftColor:e.operation.color||""}},[n("div",{staticClass:"trigger"},[n("p",[n("span",[e._v(e._s(e.t("workflowengine","When")))]),e._v(" "),n("Event",{attrs:{rule:e.rule},on:{update:e.updateRule}})],1),e._v(" "),e._l(e.rule.checks,(function(t,o){return n("p",{key:o},[n("span",[e._v(e._s(e.t("workflowengine","and")))]),e._v(" "),n("Check",{attrs:{check:t,rule:e.rule},on:{update:e.updateRule,remove:function(n){return e.removeCheck(t)}}})],1)})),e._v(" "),n("p",[n("span"),e._v(" "),e.lastCheckComplete?n("input",{staticClass:"check--add",attrs:{type:"button",value:"Add a new filter"},on:{click:function(t){return e.rule.checks.push({class:null,operator:null,value:null})}}}):e._e()])],2),e._v(" "),n("div",{staticClass:"flow-icon icon-confirm"}),e._v(" "),n("div",{staticClass:"action"},[n("div",{staticClass:"buttons"},[n("Actions",[e.rule.id<-1?n("ActionButton",{attrs:{icon:"icon-close"},on:{click:e.cancelRule}},[e._v("\n\t\t\t\t\t"+e._s(e.t("workflowengine","Cancel rule creation"))+"\n\t\t\t\t")]):n("ActionButton",{attrs:{icon:"icon-close"},on:{click:e.deleteRule}},[e._v("\n\t\t\t\t\t"+e._s(e.t("workflowengine","Remove rule"))+"\n\t\t\t\t")])],1)],1),e._v(" "),n("Operation",{attrs:{operation:e.operation,colored:!1}},[e.operation.options?n(e.operation.options,{tag:"component",on:{input:e.updateOperation},model:{value:e.rule.operation,callback:function(t){e.$set(e.rule,"operation",t)},expression:"rule.operation"}}):e._e()],1),e._v(" "),n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.ruleStatus.tooltip,expression:"ruleStatus.tooltip"}],staticClass:"status-button icon",class:e.ruleStatus.class,on:{click:e.saveRule}},[e._v("\n\t\t\t"+e._s(e.ruleStatus.title)+"\n\t\t")])],1)])}),[],!1,null,"4d8f9bfe",null).exports);function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P={name:"Workflow",components:{Operation:x,Rule:H},data:function(){return{showMoreOperations:!1}},computed:function(e){for(var t=1;t3},getMainOperations:function(){return this.showMoreOperations?Object.values(this.operations):Object.values(this.operations).slice(0,3)}}),mounted:function(){this.$store.dispatch("fetchRules")},methods:{createNewRule:function(e){this.$store.dispatch("createNewRule",e)}}},R=(o(223),z(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"workflowengine"}},[n("div",{staticClass:"section"},[n("h2",[e._v(e._s(e.t("workflowengine","Workflows")))]),e._v(" "),n("transition-group",{staticClass:"actions",attrs:{name:"slide",tag:"div"}},e._l(e.getMainOperations,(function(t){return n("Operation",{key:t.id,attrs:{operation:t},nativeOn:{click:function(n){return e.createNewRule(t)}}})})),1),e._v(" "),e.hasMoreOperations?n("div",{staticClass:"actions__more"},[n("button",{staticClass:"icon",class:e.showMoreOperations?"icon-triangle-n":"icon-triangle-s",on:{click:function(t){e.showMoreOperations=!e.showMoreOperations}}},[e._v("\n\t\t\t\t"+e._s(e.showMoreOperations?e.t("workflowengine","Show less"):e.t("workflowengine","Show more"))+"\n\t\t\t")])]):e._e()],1),e._v(" "),e.rules.length>0?n("transition-group",{attrs:{name:"slide"}},e._l(e.rules,(function(e){return n("Rule",{key:e.id,attrs:{rule:e}})})),1):e._e()],1)}),[],!1,null,"692510e7",null).exports),F={props:{value:{type:String,default:""},check:{type:Object,default:function(){return{}}}},data:function(){return{newValue:""}},watch:{value:{immediate:!0,handler:function(e){this.updateInternalValue(e)}}},methods:{updateInternalValue:function(e){this.newValue=e}}};function U(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0){n["@attributes"]={};for(var o=0;o\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t'}).then((function(e){return V(e.data)})).then((function(t){e.tags=t,e.inputValObjects=e.getValueObject()})).catch(console.error.bind(this))},methods:{getValueObject:function(){var e=this;return 0===this.tags.length?[]:this.multiple?this.value.filter((function(e){return""!==e})).map((function(t){return e.tags.find((function(e){return e.id===t}))})):this.tags.find((function(t){return t.id===e.value}))},update:function(){this.multiple?this.$emit("input",this.inputValObjects.map((function(e){return e.id}))):null===this.inputValObjects?this.$emit("input",""):this.$emit("input",this.inputValObjects.id)},tagLabel:function(e){var n=e.displayName,o=e.userVisible,i=e.userAssignable;return!1===o?t("systemtags","%s (invisible)").replace("%s",n):!1===i?t("systemtags","%s (restricted)").replace("%s",n):n}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Multiselect",{staticClass:"multiselect-vue",attrs:{options:e.tags,"options-limit":5,placeholder:e.label,"track-by":"id","custom-label":e.tagLabel,multiple:e.multiple,"close-on-select":!1,"tag-width":60,disabled:e.disabled},on:{input:e.update},scopedSlots:e._u([{key:"option",fn:function(t){return[e._v("\n\t\t"+e._s(e.tagLabel(t.option))+"\n\t")]}}]),model:{value:e.inputValObjects,callback:function(t){e.inputValObjects=t},expression:"inputValObjects"}},[n("span",{attrs:{slot:"noResult"},slot:"noResult"},[e._v(e._s(e.t("core","No results")))])])}),[],!1,null,null,null).exports,K=z({name:"FileSystemTag",components:{MultiselectTag:Z},props:{value:{type:String,default:""}},data:function(){return{newValue:[]}},watch:{value:function(){this.updateValue()}},beforeMount:function(){this.updateValue()},methods:{updateValue:function(){""!==this.value?this.newValue=this.value:this.newValue=null},update:function(){this.$emit("input",this.newValue||"")}}},(function(){var e=this,t=e.$createElement;return(e._self._c||t)("MultiselectTag",{attrs:{multiple:!1,label:"Select a tag"},on:{input:e.update},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}})}),[],!1,null,"3dd958c2",null).exports,ee=[{class:"OCA\\WorkflowEngine\\Check\\FileName",name:t("workflowengine","File name"),operators:[{operator:"is",name:t("workflowengine","is")},{operator:"!is",name:t("workflowengine","is not")},{operator:"matches",name:t("workflowengine","matches")},{operator:"!matches",name:t("workflowengine","does not match")}],placeholder:function(e){return"matches"===e.operator||"!matches"===e.operator?"/^dummy-.+$/i":"filename.txt"},validate:function(e){return"matches"!==e.operator&&"!matches"!==e.operator||(t=e.value,null!==/^\/(.*)\/([gui]{0,3})$/.exec(t));var t}},{class:"OCA\\WorkflowEngine\\Check\\FileMimeType",name:t("workflowengine","File MIME type"),operators:[{operator:"is",name:t("workflowengine","is")},{operator:"!is",name:t("workflowengine","is not")},{operator:"matches",name:t("workflowengine","matches")},{operator:"!matches",name:t("workflowengine","does not match")}],component:G},{class:"OCA\\WorkflowEngine\\Check\\FileSize",name:t("workflowengine","File size (upload)"),operators:[{operator:"less",name:t("workflowengine","less")},{operator:"!greater",name:t("workflowengine","less or equals")},{operator:"!less",name:t("workflowengine","greater or equals")},{operator:"greater",name:t("workflowengine","greater")}],placeholder:function(e){return"5 MB"},validate:function(e){return null!==e.value.match(/^[0-9]+[ ]?[kmgt]?b$/i)}},{class:"OCA\\WorkflowEngine\\Check\\RequestRemoteAddress",name:t("workflowengine","Request remote address"),operators:[{operator:"matchesIPv4",name:t("workflowengine","matches IPv4")},{operator:"!matchesIPv4",name:t("workflowengine","does not match IPv4")},{operator:"matchesIPv6",name:t("workflowengine","matches IPv6")},{operator:"!matchesIPv6",name:t("workflowengine","does not match IPv6")}],placeholder:function(e){return"matchesIPv6"===e.operator||"!matchesIPv6"===e.operator?"::1/128":"127.0.0.1/32"},validate:function(e){return"matchesIPv6"===e.operator||"!matchesIPv6"===e.operator?(t=e.value,null!==/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9])$/.exec(t)):function(e){return null!==/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/(3[0-2]|[1-2][0-9]|[1-9])$/.exec(e)}(e.value);var t}},{class:"OCA\\WorkflowEngine\\Check\\FileSystemTags",name:t("workflowengine","File system tag"),operators:[{operator:"is",name:t("workflowengine","is tagged with")},{operator:"!is",name:t("workflowengine","is not tagged with")}],component:K}];function te(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t-1||0===e.supportedEntities.length})).map((function(t){return e.plugins.checks[t.id]})).reduce((function(e,t){return e[t.class]=t,e}),{})}}}}),v=o(193),g=o(30),y=o(31),L=o(1),w={name:"Event",components:{Multiselect:L.Multiselect},props:{rule:{type:Object,required:!0}},computed:{entity:function(){return this.$store.getters.getEntityForOperation(this.operation)},operation:function(){return this.$store.getters.getOperationForRule(this.rule)},allEvents:function(){return this.$store.getters.getEventsForOperation(this.operation)},currentEvent:function(){var e=this;return this.rule.events?this.allEvents.find((function(t){return t.entity.id===e.rule.entity&&-1!==e.rule.events.indexOf(t.eventName)})):this.allEvents.length>0?this.allEvents[0]:null}},methods:{updateEvent:function(e){this.$set(this.rule,"entity",e.entity.id),this.$set(this.rule,"events",[e.eventName]),this.$store.dispatch("updateRule",this.rule)}}};o(215);function z(e,t,n,o,i,r,a,s){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(e,t){return c.call(t),d(e,t)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:e,options:u}}var T=z(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.operation.isComplex&&""!==e.operation.fixedEntity?n("div",{staticClass:"isComplex"},[n("img",{staticClass:"option__icon",attrs:{src:e.entity.icon}}),e._v(" "),n("span",{staticClass:"option__title option__title_single"},[e._v(e._s(e.operation.triggerHint))])]):n("Multiselect",{attrs:{value:e.currentEvent,options:e.allEvents,label:"eventName","track-by":"id","allow-empty":!1,disabled:e.allEvents.length<=1},on:{input:e.updateEvent},scopedSlots:e._u([{key:"singleLabel",fn:function(t){return[n("img",{staticClass:"option__icon",attrs:{src:t.option.entity.icon}}),e._v(" "),n("span",{staticClass:"option__title option__title_single"},[e._v(e._s(t.option.displayName))])]}},{key:"option",fn:function(t){return[n("img",{staticClass:"option__icon",attrs:{src:t.option.entity.icon}}),e._v(" "),n("span",{staticClass:"option__title"},[e._v(e._s(t.option.displayName))])]}}])})],1)}),[],!1,null,"5d791f23",null).exports,O=o(194),k=o.n(O),D={name:"Check",components:{ActionButton:y.ActionButton,Actions:g.Actions,Multiselect:L.Multiselect},directives:{ClickOutside:k.a},props:{check:{type:Object,required:!0},rule:{type:Object,required:!0}},data:function(){return{deleteVisible:!1,currentOption:null,currentOperator:null,options:[],valid:!0}},computed:{Checks:function(){return this.$store.getters.getChecksForEntity(this.rule.entity)},operators:function(){return this.currentOption?this.Checks[this.currentOption.class].operators:[]},currentComponent:function(){if(!this.currentOption)return[];var e=this.Checks[this.currentOption.class].component;return e},valuePlaceholder:function(){return this.currentOption&&this.currentOption.placeholder?this.currentOption.placeholder(this.check):""}},watch:{"check.operator":function(){this.validate()}},mounted:function(){var e=this;this.options=Object.values(this.Checks),this.currentOption=this.Checks[this.check.class],this.currentOperator=this.operators.find((function(t){return t.operator===e.check.operator}))},methods:{showDelete:function(){this.deleteVisible=!0},hideDelete:function(){this.deleteVisible=!1},validate:function(){return this.currentOption&&this.currentOption.validate&&(this.currentOption.validate(this.check)?this.valid=!0:this.valid=!1),this.$store.dispatch("setValid",{rule:this.rule,valid:this.rule.valid&&this.valid}),this.valid},updateCheck:function(){this.check.class!==this.currentOption.class&&(this.currentOperator=this.operators[0]),this.check.class=this.currentOption.class,this.check.operator=this.currentOperator.operator,this.validate()&&this.$emit("update",this.check)}}},N=(o(217),z(D,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hideDelete,expression:"hideDelete"}],staticClass:"check",on:{click:e.showDelete}},[n("Multiselect",{ref:"checkSelector",attrs:{options:e.options,label:"name","track-by":"class","allow-empty":!1,placeholder:e.t("workflowengine","Select a filter")},on:{input:e.updateCheck},model:{value:e.currentOption,callback:function(t){e.currentOption=t},expression:"currentOption"}}),e._v(" "),n("Multiselect",{attrs:{disabled:!e.currentOption,options:e.operators,label:"name","track-by":"operator","allow-empty":!1,placeholder:e.t("workflowengine","Select a comparator")},on:{input:e.updateCheck},model:{value:e.currentOperator,callback:function(t){e.currentOperator=t},expression:"currentOperator"}}),e._v(" "),e.currentOperator&&e.currentComponent?n(e.currentOption.component,{tag:"component",attrs:{disabled:!e.currentOption,check:e.check},on:{input:e.updateCheck,valid:function(t){(e.valid=!0)&&e.validate()},invalid:function(t){(e.valid=!1)&&e.validate()}},model:{value:e.check.value,callback:function(t){e.$set(e.check,"value",t)},expression:"check.value"}}):n("input",{directives:[{name:"model",rawName:"v-model",value:e.check.value,expression:"check.value"}],class:{invalid:!e.valid},attrs:{type:"text",disabled:!e.currentOption,placeholder:e.valuePlaceholder},domProps:{value:e.check.value},on:{input:[function(t){t.target.composing||e.$set(e.check,"value",t.target.value)},e.updateCheck]}}),e._v(" "),e.deleteVisible||!e.currentOption?n("Actions",[n("ActionButton",{attrs:{icon:"icon-delete"},on:{click:function(t){return e.$emit("remove")}}})],1):e._e()],1)}),[],!1,null,"1e5ba59e",null).exports),Y={name:"Operation",props:{operation:{type:Object,required:!0},colored:{type:Boolean,default:!0}}},x=(o(219),z(Y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"actions__item",class:{colored:e.colored},style:{backgroundColor:e.colored?e.operation.color:"transparent"}},[n("div",{staticClass:"icon",class:e.operation.iconClass,style:{backgroundImage:e.operation.iconClass?"":"url("+e.operation.icon+")"}}),e._v(" "),n("div",{staticClass:"actions__item__description"},[n("h3",[e._v(e._s(e.operation.name))]),e._v(" "),n("small",[e._v(e._s(e.operation.description))])]),e._v(" "),n("div",{staticClass:"actions__item_options"},[e._t("default")],2)])}),[],!1,null,"3fff5a4e",null).exports);function S(e,t,n,o,i,r,a){try{var s=e[r](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(o,i)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){S(r,o,i,a,s,"next",e)}function s(e){S(r,o,i,a,s,"throw",e)}a(void 0)}))}}var B,C,W,q,j={name:"Rule",components:{Operation:x,Check:N,Event:T,Actions:g.Actions,ActionButton:y.ActionButton},directives:{Tooltip:v.Tooltip},props:{rule:{type:Object,required:!0}},data:function(){return{editing:!1,checks:[],error:null,dirty:this.rule.id<0,checking:!1}},computed:{operation:function(){return this.$store.getters.getOperationForRule(this.rule)},ruleStatus:function(){return this.error||!this.rule.valid?{title:t("workflowengine","The configuration is invalid"),class:"icon-close-white invalid",tooltip:{placement:"bottom",show:!0,content:this.error}}:!this.dirty||this.checking?{title:"Active",class:"icon icon-checkmark"}:{title:"Save",class:"icon-confirm-white primary"}},lastCheckComplete:function(){var e=this.rule.checks[this.rule.checks.length-1];return void 0===e||null!==e.class}},methods:{updateOperation:(q=E(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$set(this.rule,"operation",t),e.next=3,this.updateRule();case 3:case"end":return e.stop()}}),e,this)}))),function(e){return q.apply(this,arguments)}),updateRule:(W=E(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.checking=!0,this.dirty||(this.dirty=!0);try{this.error=null,this.checking=!1,this.$store.dispatch("updateRule",this.rule)}catch(e){console.error("Failed to update operation",e),this.error=e.response.ocs.meta.message,this.checking=!1}case 3:case"end":return e.stop()}}),e,this)}))),function(){return W.apply(this,arguments)}),saveRule:(C=E(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$store.dispatch("pushUpdateRule",this.rule);case 3:this.dirty=!1,this.error=null,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Failed to save operation"),this.error=e.t0.response.data.ocs.meta.message;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return C.apply(this,arguments)}),deleteRule:function(){var e=E(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$store.dispatch("deleteRule",this.rule);case 3:e.next=9;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to delete operation"),this.error=e.t0.response.data.ocs.meta.message;case 9:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),cancelRule:function(){this.$store.dispatch("removeRule",this.rule)},removeCheck:(B=E(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.rule.checks.findIndex((function(e){return e===t})))>-1&&this.$delete(this.rule.checks,n),this.$store.dispatch("updateRule",this.rule);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return B.apply(this,arguments)})}},H=(o(221),z(j,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"section rule",style:{borderLeftColor:e.operation.color||""}},[n("div",{staticClass:"trigger"},[n("p",[n("span",[e._v(e._s(e.t("workflowengine","When")))]),e._v(" "),n("Event",{attrs:{rule:e.rule},on:{update:e.updateRule}})],1),e._v(" "),e._l(e.rule.checks,(function(t,o){return n("p",{key:o},[n("span",[e._v(e._s(e.t("workflowengine","and")))]),e._v(" "),n("Check",{attrs:{check:t,rule:e.rule},on:{update:e.updateRule,remove:function(n){return e.removeCheck(t)}}})],1)})),e._v(" "),n("p",[n("span"),e._v(" "),e.lastCheckComplete?n("input",{staticClass:"check--add",attrs:{type:"button",value:"Add a new filter"},on:{click:function(t){return e.rule.checks.push({class:null,operator:null,value:null})}}}):e._e()])],2),e._v(" "),n("div",{staticClass:"flow-icon icon-confirm"}),e._v(" "),n("div",{staticClass:"action"},[n("div",{staticClass:"buttons"},[n("Actions",[e.rule.id<-1?n("ActionButton",{attrs:{icon:"icon-close"},on:{click:e.cancelRule}},[e._v("\n\t\t\t\t\t"+e._s(e.t("workflowengine","Cancel rule creation"))+"\n\t\t\t\t")]):n("ActionButton",{attrs:{icon:"icon-close"},on:{click:e.deleteRule}},[e._v("\n\t\t\t\t\t"+e._s(e.t("workflowengine","Remove rule"))+"\n\t\t\t\t")])],1)],1),e._v(" "),n("Operation",{attrs:{operation:e.operation,colored:!1}},[e.operation.options?n(e.operation.options,{tag:"component",on:{input:e.updateOperation},model:{value:e.rule.operation,callback:function(t){e.$set(e.rule,"operation",t)},expression:"rule.operation"}}):e._e()],1),e._v(" "),n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.ruleStatus.tooltip,expression:"ruleStatus.tooltip"}],staticClass:"status-button icon",class:e.ruleStatus.class,on:{click:e.saveRule}},[e._v("\n\t\t\t"+e._s(e.ruleStatus.title)+"\n\t\t")])],1)])}),[],!1,null,"4d8f9bfe",null).exports);function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P={name:"Workflow",components:{Operation:x,Rule:H},data:function(){return{showMoreOperations:!1}},computed:function(e){for(var t=1;t3},getMainOperations:function(){return this.showMoreOperations?Object.values(this.operations):Object.values(this.operations).slice(0,3)}}),mounted:function(){this.$store.dispatch("fetchRules")},methods:{createNewRule:function(e){this.$store.dispatch("createNewRule",e)}}},R=(o(223),z(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"workflowengine"}},[n("div",{staticClass:"section"},[n("h2",[e._v(e._s(e.t("workflowengine","Workflows")))]),e._v(" "),n("transition-group",{staticClass:"actions",attrs:{name:"slide",tag:"div"}},e._l(e.getMainOperations,(function(t){return n("Operation",{key:t.id,attrs:{operation:t},nativeOn:{click:function(n){return e.createNewRule(t)}}})})),1),e._v(" "),e.hasMoreOperations?n("div",{staticClass:"actions__more"},[n("button",{staticClass:"icon",class:e.showMoreOperations?"icon-triangle-n":"icon-triangle-s",on:{click:function(t){e.showMoreOperations=!e.showMoreOperations}}},[e._v("\n\t\t\t\t"+e._s(e.showMoreOperations?e.t("workflowengine","Show less"):e.t("workflowengine","Show more"))+"\n\t\t\t")])]):e._e()],1),e._v(" "),e.rules.length>0?n("transition-group",{attrs:{name:"slide"}},e._l(e.rules,(function(e){return n("Rule",{key:e.id,attrs:{rule:e}})})),1):e._e()],1)}),[],!1,null,"692510e7",null).exports),F={props:{value:{type:String,default:""},check:{type:Object,default:function(){return{}}}},data:function(){return{newValue:""}},watch:{value:{immediate:!0,handler:function(e){this.updateInternalValue(e)}}},methods:{updateInternalValue:function(e){this.newValue=e}}};function U(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0){n["@attributes"]={};for(var o=0;o\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t'}).then((function(e){return V(e.data)})).then((function(t){e.tags=t,e.inputValObjects=e.getValueObject()})).catch(console.error.bind(this))},methods:{getValueObject:function(){var e=this;return 0===this.tags.length?[]:this.multiple?this.value.filter((function(e){return""!==e})).map((function(t){return e.tags.find((function(e){return e.id===t}))})):this.tags.find((function(t){return t.id===e.value}))},update:function(){this.multiple?this.$emit("input",this.inputValObjects.map((function(e){return e.id}))):null===this.inputValObjects?this.$emit("input",""):this.$emit("input",this.inputValObjects.id)},tagLabel:function(e){var n=e.displayName,o=e.userVisible,i=e.userAssignable;return!1===o?t("systemtags","%s (invisible)").replace("%s",n):!1===i?t("systemtags","%s (restricted)").replace("%s",n):n}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Multiselect",{staticClass:"multiselect-vue",attrs:{options:e.tags,"options-limit":5,placeholder:e.label,"track-by":"id","custom-label":e.tagLabel,multiple:e.multiple,"close-on-select":!1,"tag-width":60,disabled:e.disabled},on:{input:e.update},scopedSlots:e._u([{key:"option",fn:function(t){return[e._v("\n\t\t"+e._s(e.tagLabel(t.option))+"\n\t")]}}]),model:{value:e.inputValObjects,callback:function(t){e.inputValObjects=t},expression:"inputValObjects"}},[n("span",{attrs:{slot:"noResult"},slot:"noResult"},[e._v(e._s(e.t("core","No results")))])])}),[],!1,null,null,null).exports,K=z({name:"FileSystemTag",components:{MultiselectTag:Z},props:{value:{type:String,default:""}},data:function(){return{newValue:[]}},watch:{value:function(){this.updateValue()}},beforeMount:function(){this.updateValue()},methods:{updateValue:function(){""!==this.value?this.newValue=this.value:this.newValue=null},update:function(){this.$emit("input",this.newValue||"")}}},(function(){var e=this,t=e.$createElement;return(e._self._c||t)("MultiselectTag",{attrs:{multiple:!1,label:"Select a tag"},on:{input:e.update},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}})}),[],!1,null,"3dd958c2",null).exports,ee=[{class:"OCA\\WorkflowEngine\\Check\\FileName",name:t("workflowengine","File name"),operators:[{operator:"is",name:t("workflowengine","is")},{operator:"!is",name:t("workflowengine","is not")},{operator:"matches",name:t("workflowengine","matches")},{operator:"!matches",name:t("workflowengine","does not match")}],placeholder:function(e){return"matches"===e.operator||"!matches"===e.operator?"/^dummy-.+$/i":"filename.txt"},validate:function(e){return"matches"!==e.operator&&"!matches"!==e.operator||(t=e.value,null!==/^\/(.*)\/([gui]{0,3})$/.exec(t));var t}},{class:"OCA\\WorkflowEngine\\Check\\FileMimeType",name:t("workflowengine","File MIME type"),operators:[{operator:"is",name:t("workflowengine","is")},{operator:"!is",name:t("workflowengine","is not")},{operator:"matches",name:t("workflowengine","matches")},{operator:"!matches",name:t("workflowengine","does not match")}],component:G},{class:"OCA\\WorkflowEngine\\Check\\FileSize",name:t("workflowengine","File size (upload)"),operators:[{operator:"less",name:t("workflowengine","less")},{operator:"!greater",name:t("workflowengine","less or equals")},{operator:"!less",name:t("workflowengine","greater or equals")},{operator:"greater",name:t("workflowengine","greater")}],placeholder:function(e){return"5 MB"},validate:function(e){return null!==e.value.match(/^[0-9]+[ ]?[kmgt]?b$/i)}},{class:"OCA\\WorkflowEngine\\Check\\RequestRemoteAddress",name:t("workflowengine","Request remote address"),operators:[{operator:"matchesIPv4",name:t("workflowengine","matches IPv4")},{operator:"!matchesIPv4",name:t("workflowengine","does not match IPv4")},{operator:"matchesIPv6",name:t("workflowengine","matches IPv6")},{operator:"!matchesIPv6",name:t("workflowengine","does not match IPv6")}],placeholder:function(e){return"matchesIPv6"===e.operator||"!matchesIPv6"===e.operator?"::1/128":"127.0.0.1/32"},validate:function(e){return"matchesIPv6"===e.operator||"!matchesIPv6"===e.operator?(t=e.value,null!==/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9])$/.exec(t)):function(e){return null!==/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/(3[0-2]|[1-2][0-9]|[1-9])$/.exec(e)}(e.value);var t}},{class:"OCA\\WorkflowEngine\\Check\\FileSystemTags",name:t("workflowengine","File system tag"),operators:[{operator:"is",name:t("workflowengine","is tagged with")},{operator:"!is",name:t("workflowengine","is not tagged with")}],component:K}];function te(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t * -- cgit v1.2.3