You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud-server/dist/6916-6916.js

2 lines
19 KiB

"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[6916],{6916:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ee});var a=i(21777),n=i(85168),l=i(61338),r=i(35810),s=i(77815),o=i(53334),d=i(63814),c=i(43627),p=i(85471),A=i(65043),m=i(11275),u=i(80780),f=i(71225),h=i(32505);const C={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return`template-picker-${this.fileid}`},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,h.f)()?(0,d.Jv)(`/apps/files_sharing/publicpreview/${(0,h.G)()}?fileId=${this.fileid}&file=${(0,f.O0)(this.filename)}&x=256&y=256&a=1`):(0,d.Jv)(`/core/preview?fileId=${this.fileid}&x=256&y=256&a=1`)},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0},focus(){this.$refs.input?.focus()},onClick(){this.checked&&this.$emit("confirm-click",this.fileid)}}};var v=i(85072),g=i.n(v),b=i(97825),_=i.n(b),k=i(77659),w=i.n(k),y=i(55056),x=i.n(y),T=i(10540),F=i.n(T),P=i(41113),E=i.n(P),B=i(78201),I={};I.styleTagTransform=E(),I.setAttributes=x(),I.insert=w().bind(null,"head"),I.domAPI=_(),I.insertStyleElement=F(),g()(B.A,I),B.A&&B.A.locals&&B.A.locals;var S=i(14486);const $=(0,S.A)(C,function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{ref:"input",staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id},on:{click:e.onClick}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])},[],!1,null,"74d34088",null).exports;var j=i(74095),D=i(88289),N=i(82182);const W=(0,p.pM)({name:"TemplateRichTextField",components:{NcTextField:N.A},props:{field:{type:Object,default:()=>{}}},data:()=>({value:""}),computed:{fieldLabel(){const e=this.field.name||this.field.alias;return e.charAt(0).toUpperCase()+e.slice(1)},fieldId(){return"text-field"+this.field.index}},methods:{input(){this.$emit("input",{index:this.field.index,property:"content",value:this.value})}}});var M=i(93085),R={};R.styleTagTransform=E(),R.setAttributes=x(),R.insert=w().bind(null,"head"),R.domAPI=_(),R.insertStyleElement=F(),g()(M.A,R),M.A&&M.A.locals&&M.A.locals;const U=(0,S.A)(W,function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"template-field__text"},[t("label",{attrs:{for:e.fieldId}},[e._v("\n\t\t"+e._s(e.fieldLabel)+"\n\t")]),e._v(" "),t("NcTextField",{attrs:{id:e.fieldId,type:"text",value:e.value,label:e.fieldLabel,"label-outside":!0,placeholder:e.field.content},on:{"update:value":function(t){e.value=t},input:e.input}})],1)},[],!1,null,"645a208d",null).exports;var L=i(32073);const G=(0,p.pM)({name:"TemplateCheckboxField",components:{NcCheckboxRadioSwitch:L.A},props:{field:{type:Object,default:()=>{}}},data(){return{value:this.field.checked??!1}},computed:{fieldLabel(){const e=this.field.name||this.field.alias;return e.charAt(0).toUpperCase()+e.slice(1)},fieldId(){return"checkbox-field"+this.field.index}},methods:{input(){this.$emit("input",{index:this.field.index,property:"checked",value:this.value})}}});var H=i(38853),O={};O.styleTagTransform=E(),O.setAttributes=x(),O.insert=w().bind(null,"head"),O.domAPI=_(),O.insertStyleElement=F(),g()(H.A,O),H.A&&H.A.loca
//# sourceMappingURL=6916-6916.js.map?v=69e50a05ba5f71b42ff5