nextcloud/dist/workflowengine-workflowengine.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
787 KiB
JavaScript
Raw Permalink Normal View History

(()=>{var M,z,b,p={4396(M,z,b){"use strict";var p=b(85471),O=b(95353),A=b(81222),c=b(63814),o=b(74095),q=b(42507),W=b(6695),n=b(88837),d=b(25384),a=b(33388);const e={name:"Operation",components:{NcButton:o.A},props:{operation:{type:Object,required:!0},colored:{type:Boolean,default:!0}}};var i=b(85072),R=b.n(i),r=b(97825),L=b.n(r),f=b(77659),u=b.n(f),s=b(55056),l=b.n(s),N=b(10540),B=b.n(N),X=b(41113),m=b.n(X),C=b(22592),T={};T.styleTagTransform=m(),T.setAttributes=l(),T.insert=u().bind(null,"head"),T.domAPI=L(),T.insertStyleElement=B(),R()(C.A,T),C.A&&C.A.locals&&C.A.locals;var g=b(14486);const h=(0,g.A)(e,function(){var M=this,z=M._self._c;return z("div",{staticClass:"actions__item",class:{colored:M.colored},style:{backgroundColor:M.colored?M.operation.color:"transparent"}},[z("div",{staticClass:"icon",class:M.operation.iconClass,style:{backgroundImage:M.operation.iconClass?"":`url(${M.operation.icon})`}}),M._v(" "),z("div",{staticClass:"actions__item__description"},[z("h3",[M._v(M._s(M.operation.name))]),M._v(" "),z("small",[M._v(M._s(M.operation.description))]),M._v(" "),M.colored?z("NcButton",[M._v("\n\t\t\t"+M._s(M.t("workflowengine","Add new flow"))+"\n\t\t")]):M._e()],1),M._v(" "),z("div",{staticClass:"actions__item_options"},[M._t("default")],2)])},[],!1,null,"4b7616d2",null).exports;var v=b(57505),w=b(24764),E=b(33691),k=b(54373),S=b(66001),x=b(2895),y=b.n(x),_=b(67607);const P=(0,b(35947).YK)().detectLogLevel().setApp("workflowengine").build(),D={name:"Check",components:{NcActionButton:v.A,NcActions:w.A,NcSelect:_.default,CloseIcon:S.A},directives:{ClickOutside:y()},props:{check:{type:Object,required:!0},rule:{type:Object,required:!0}},data:()=>({deleteVisible:!1,currentOption:null,currentOperator:null,options:[],valid:!1}),computed:{checks(){return this.$store.getters.getChecksForEntity(this.rule.entity)},operators(){if(!this.currentOption)return[];const M=this.checks[this.currentOption.class].operators;return"function"==typeof M?M(this.check):M},currentElement(){return!!this.check.class&&this.checks[this.check.class].element},currentComponent(){return this.currentOption?this.checks[this.currentOption.class].component:[]},valuePlaceholder(){return this.currentOption&&this.currentOption.placeholder?this.currentOption.placeholder(this.check):""}},watch:{"check.operator":function(){this.validate()}},mounted(){this.options=Object.values(this.checks),this.currentOption=this.checks[this.check.class],this.currentOperator=this.operators.find(M=>M.operator===this.check.operator),this.currentElement?this.$refs.checkComponent.modelValue=void 0:this.currentOption?.component&&P.warn("Developer warning: `CheckPlugin.options` is deprecated. Use `CheckPlugin.element` instead."),null===this.check.class&&this.$nextTick(()=>this.$refs.checkSelector.$el.focus()),this.validate()},methods:{showDelete(){this.deleteVisible=!0},hideDelete(){this.deleteVisible=!1},validate(){this.valid=!0,this.currentOption&&this.currentOption.validate&&(this.valid=!!this.currentOption.validate(this.check)),this.check.invalid=!this.valid,this.$emit("validate",this.valid)},updateCheck(M){const z=M?.operator||this.currentOperator?.operator||this.check.operator,b=this.operators.findIndex(M=>z===M.operator);this.check.class===this.currentOption.class&&-1!==b||(this.currentOperator=this.operators[0]),M?.detail&&(this.check.value=M.detail[0]),this.check.class=this.currentOption.class,this.check.operator=this.currentOperator.operator,this.validate(),this.$emit("update",this.check)}}};var j=b(43148),I={};I.styleTagTransform=m(),I.setAttributes=l(),I.insert=u().bind(null,"head"),I.domAPI=L(),I.insertStyleElement=B(),R()(j.A,I),j.A&&j.A.locals&&j.A.locals;const V=(0,g.A)(D,function(){var M=this,z=M._self._c;return z("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:M.hideDelete,expression:"hideDelete"}],staticClass:"check",on:{click:M.showDelete}},[z("NcSelect",{ref:"checkSelector",attrs:{options:M.options,label:"name",clearable:!1,placeholder:M.t("workflowengine","Select a filter")},on:{input:M.updateCheck},model:{value:M.currentOption,ca
//# sourceMappingURL=workflowengine-workflowengine.js.map?v=c9b9a39a2fb8a949289d