PageSourceSearch

https://daeduly.com/assets/BannerEditor.28edc523.js

js daeduly.com collected 2026-09-29 01:59:10 UTC 7,392 bytes, 2 lines download raw bytes

1import{_ as I,aU as A,dj as U,O as D,v as N,h as R,ab as k}from"./index.474d7b13.js";import{f as E}from"./faArrowUpFromBracket.b58e4973.js";import{F as K}from"./index.e6b28c48.js";import{e as O}from"./editorMixin.3e98a765.js";import{T as z}from"./index.8076d3fe.js";import{N as i,D as p,W as y,U as m,f as n,S as a,E as d,Q as b,R as W,F as w,a2 as j,H as x,a0 as V}from"./vue.00f7c436.js";import{_ as H}from"./TmlEditableVideo.vue_vue_type_script_setup_true_lang.91167b21.js";import"./sentry.09480738.js";import"./faSlidersH.3deb0409.js";import"./faCopy.1452ad5a.js";import"./faFloppyDisk.7ea9c02b.js";import"./isEqual.4f114006.js";import"./formConfig.11506f9f.js";import"./faCircle.17f627a7.js";import"./faAlignCenter.3762bffe.js";import"./faArrowRight.6d6d4730.js";const L={name:"BannerTemplateEditor",components:{FormBuilder:K,TmlNewEditableImage:z,TmlEditableVideo:H},mixins:[O],data(){return{faTimes:A.faTimes,faArrowUpFromBracket:E.faArrowUpFromBracket,isKitlocker:U,video:null,videoKey:0}},computed:{cropRatio(){const e=D("md")?3:5;let o;switch(this.getProperty("type")){case"slim":o=1.5;break;case"compact":o=2;break;default:case"standard":o=2;break}return e/o},isTrackingPromotion(){const e=this.getProperty("trackPromotion");return e===!0||e===1||e==="1"||e==="true"},controlsPadding(){return N.isSmaller("sm")?"0.5em":"1em"}},created(){var e;this.video=(e=this.getProperty("video","string"))!=null?e:null},methods:{actionTitle(e){switch(e){case 0:return"Left Button";case 1:return"Right Button";default:return"Button"}},handleFileInput(e){const o=this.uploadFile(e);this.openLoadingPopup(o)},uploadFile(e){const o=new FormData;return o.append("video",e),this.axios.post(R("/omnis/v3/videos"),o,{headers:{"Content-Type":"multipart/form-data"}})},openLoadingPopup(e){this.$overlays.loading("Uploading...",{bar:!0,resolver:e}),e.then(o=>{this.video=o.data.url,this.videoKey++,this.setProperty("video",o.data.url)}).catch(o=>{k.error(o.response.data.message)}).finally(()=>{this.$refs.uploader.clear()})},onWrongFileType(){k.error("Sorry, we currently only support mp4 file types")},setAction(e,o,f){const u=this.getProperty("actions",[],"json");u[e][o]=f,this.setProperty("actions",JSON.stringify(u))}}},G={class:"relative"},M=a("p",{class:"my-4"},"Video thumbnail - use the first frame of the video",-1),J={class:"container"},Q={class:"row pt-4"},q={class:"flex mb-4",style:{"justify-content":"space-between"}},X={class:"inline"},Y={key:0},Z=a("p",{class:"mb-4"}," Send Google Analytics promotion events when this banner is seen or clicked. ",-1);function $(e,o,f,u,l,t){const P=i("tml-video"),T=i("tml-button"),_=i("tml-uploader"),v=i("tml-new-editable-image"),C=i("tml-input"),S=i("tml-link-selector"),h=i("form-builder"),B=i("tml-toggle"),F=i("template-editor-layout");return p(),y(F,null,{advanced:m(()=>[n(h,{value:e.template.data.properties,fields:{font:"font",titleColor:{type:"color",label:"Title Colour"},copyColor:{type:"color",label:"Description Colour"},titleBackground:{...e.config.backgroundColor,label:"Title Highlight Colour"},copyBackground:{...e.config.backgroundColor,label:"Description Highlight Colour"},textShadow:e.config.shadow,buttonStyle:{type:"selector",options:[{text:"Primary",value:"primary"},{text:"Secondary",value:"secondary"},{text:"Primary | Secondary",value:"primary|secondary"}]},buttonSize:e.config.buttonSize,align:e.config.horizontalAlign,verticalAlignment:e.config.verticalAlign,type:{when:!e.template.parent,type:"selector",options:[{text:"Slim",value:"slim",icon:["fak","skinny-banner-light"]},{text:"Compact",value:"compact",icon:["fak","compact-banner-light"]},{text:"Max",value:"standard",icon:["fak","standard-banner-light"]}]},overlayColourStart:{type:"color",showClearOption:!0},overlayColourEnd:{type:"color",showClearOption:!0},overlayDirection:e.config.overlayDirection,overlayOpacity:e.config.overlayOpacity,buttonBorderRadius:{...e.config.borderRadius,label:"Button Corners"},borderRadius:{...e.config.borderRadius,when:!e.template.parent},...e.globalFields,trackPromotion:{type:"toggle",when:l.isKitlocker.run().passed},promotionId:{type:"text",label:"Promotion ID",when:l.isKitlocker.run().passed&&t.isTrackingPromotion},promotionName:{type:"text",label:"Promotion name",when:l.isKitlocker.run().passed&&t.isTrackingPromotion},creativeName:{type:"text",label:"Creative name",when:l.isKitlocker.run().passed&&t.isTrackingPromotion},creativeSlot:{type:"text",label:"Creative slot",when:l.isKitlocker.run().passed&&t.isTrackingPromotion}}
1,groups:{Text:["font","titleColor","titleBackground","copyColor","copyBackground","textShadow"],Buttons:["buttonStyle","buttonSize","buttonBorderRadius"],Alignment:["align","verticalAlignment"],["Gradient Overlay"]:["overlayColourStart","overlayColourEnd","overlayDirection","overlayOpacity"],Block:["type","borderRadius","fullWidth","fullBackgroundColor"],["Promotion tracking"]:["trackPromotion","promotionId","promotionName","creativeName","creativeSlot"]},"pre-process-field":e.onProcessField,onSet:o[2]||(o[2]=r=>e.setProperty(r.name,r.value))},{trackPromotion:m(({set:r})=>[a("div",null,[Z,n(B,{class:"w-full !m-0","field-name":"trackPromotion",label:"Track as promotion",value:t.isTrackingPromotion,onToggle:c=>r(c?"1":"0")},null,8,["value","onToggle"])])]),_:1},8,["value","fields","pre-process-field"])]),default:m(()=>[e.getProperty("media")==="video"?(p(),d(w,{key:0},[a("div",G,[l.video?(p(),y(P,{key:l.videoKey,class:"w-full relative",ratio:.32,video:l.video},null,8,["ratio","video"])):b("",!0),a("div",{style:W({top:t.controlsPadding,right:t.controlsPadding,position:"absolute"})},[n(_,{ref:"uploader",accept:"video/mp4",multiple:!1,onNewFileUploaded:t.handleFileInput,onWrongFileType:t.onWrongFileType},{default:m(({triggerUploader:r})=>[n(T,{class:"shadow",small:"",white:"",icon:l.faArrowUpFromBracket,"no-full-width":"",fill:!1,title:"Upload Image",onClick:r},null,8,["icon","onClick"])]),_:1},8,["onNewFileUploaded","onWrongFileType"])],4)]),M,n(v,{class:"mb-4","crop-ratio":t.cropRatio,url:e.getProperty("videoThumbnail","string"),onInput:o[0]||(o[0]=r=>e.setProperty("videoThumbnail",r))},null,8,["crop-ratio","url"])],64)):(p(),y(v,{key:1,class:"mb-4","crop-ratio":t.cropRatio,url:e.imageSrc,"include-alt-text-editor":"","alt-text":e.imageAlt,onInput:e.onUpdateImageSrc,"onUpdate:altText":e.onUpdateImageAlt},null,8,["crop-ratio","url","alt-text","onInput","onUpdate:altText"])),n(h,{value:e.template.data.properties,fields:{title:"text",copy:{type:"text",label:"Description"},actions:"custom"},"pre-process-field":e.onProcessField,onSet:o[1]||(o[1]=r=>e.setProperty(r.name,r.value))},{actions:m(({value:r})=>[a("div",J,[a("div",Q,[(p(!0),d(w,null,j(r.get("json"),(c,s)=>(p(),d("div",{key:s,class:x(["col px-0",{"pr-4":s<r.get("json").length-1}])},[a("div",q,[a("div",null,[a("h5",X,V(t.actionTitle(s)),1),c.text?b("",!0):(p(),d("span",Y,"(none)"))])]),n(C,{"field-name":`text-${s}`,placeholder:"Text",value:c.text,onInput:g=>t.setAction(s,"text",g)},null,8,["field-name","value","onInput"]),n(S,{"field-name":`href-${s}`,value:c.href,"preview-host":e.linkPreviewHost,"show-clear":"","value-after-cleared":"#",onInput:g=>t.setAction(s,"href",g)},null,8,["field-name","value","preview-host","onInput"])],2))),128))])])]),_:1},8,["value","pre-process-field"])]),_:1})}const fe=I(L,[["render",$]]);export{fe as default};
2//# sourceMappingURL=BannerEditor.28edc523.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.