1import{_ as V,l as B,m as M,n as R,p as F,q as A,h as q,r as w,P as z,w as L}from"./index.474d7b13.js";import{f as N}from"./faSlidersH.3deb0409.js";import{r as E,a as D,f as U}from"./formConfig.11506f9f.js";import{r as O}from"./faArrowsLeftRight.560e6549.js";import G from"./Form.0d00c051.js";import{T as I,a as j,b as Q,c as W}from"./themeProvider.66f120e1.js";import{E as f,f as a,U as g,S as m,W as x,Q as Y,N as s,D as u,a0 as J,a4 as p}from"./vue.00f7c436.js";import{d as K}from"./debounce.b00b40d5.js";import"./sentry.09480738.js";import"./faCircle.17f627a7.js";import"./faAlignCenter.3762bffe.js";import"./faArrowRight.6d6d4730.js";import"./faUndo.4cbdec1e.js";import"./index.8076d3fe.js";import"./index.87bd884e.js";import"./tiptap-extension-underline.esm.60564cbc.js";import"./TmlEditableVideo.vue_vue_type_script_setup_true_lang.91167b21.js";import"./index.e6b28c48.js";import"./CodeBlock.55b42efc.js";import"./tiptap-extension-superscript.esm.344475f8.js";import"./Link.e08d7ab3.js";var h={},C={},y;function X(){return y||(y=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fal",r="shuffle",c=512,o=512,n=[128256,"random"],i="f074",l="M427.3 292.7c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62L457.4 368H336c-5 0-9.781-2.406-12.78-6.406l-38.41-51.19c-5.312-7.094-15.38-8.5-22.41-3.219c-7.062 5.312-8.5 15.34-3.219 22.41l38.41 51.19C306.6 392.8 320.1 400 336 400h121.4l-52.69 52.69c-6.25 6.25-6.25 16.38 0 22.62C407.8 478.4 411.9 480 416 480s8.188-1.562 11.31-4.688l80-80c6.25-6.25 6.25-16.38 0-22.62L427.3 292.7zM336 144h121.4l-52.69 52.69c-6.25 6.25-6.25 16.38 0 22.62C407.8 222.4 411.9 224 416 224s8.188-1.562 11.31-4.688l80-80c6.25-6.25 6.25-16.38 0-22.62l-80-80c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62L457.4 112H336c-15.03 0-29.41 7.188-38.41 19.22l-172.8 230.4C121.8 365.6 117 368 112 368h-96C7.156 368 0 375.2 0 384s7.156 16 16 16h96c15.03 0 29.41-7.188 38.41-19.22l172.8-230.4C326.2 146.4 331 144 336 144zM16 144h96c5 0 9.781 2.406 12.78 6.406l38.41 51.19C166.3 205.8 171.2 208 176 208c3.344 0 6.719-1.031 9.594-3.188c7.062-5.312 8.5-15.34 3.219-22.41L150.4 131.2C141.4 119.2 127 112 112 112h-96C7.156 112 0 119.2 0 128S7.156 144 16 144z";e.definition={prefix:t,iconName:r,icon:[c,o,n,i,l]},e.faShuffle=e.definition,e.prefix=t,e.iconName=r,e.width=c,e.height=o,e.ligatures=n,e.unicode=i,e.svgPathData=l,e.aliases=n}(C)),C}var k;function Z(){return k||(k=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=X();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faRandom=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(h)),h}var $=Z(),ee=E(),oe=D(),te=O(),b={},S;function re(){return S||(S=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="fal",r="grid",c=448,o=512,n=["grid-3"],i="e195",l="M88 32C110.1 32 128 49.91 128 72V120C128 142.1 110.1 160 88 160H40C17.91 160 0 142.1 0 120V72C0 49.91 17.91 32 40 32H88zM88 64H40C35.58 64 32 67.58 32 72V120C32 124.4 35.58 128 40 128H88C92.42 128 96 124.4 96 120V72C96 67.58 92.42 64 88 64zM88 192C110.1 192 128 209.9 128 232V280C128 302.1 110.1 320 88 320H40C17.91 320 0 302.1 0 280V232C0 209.9 17.91 192 40 192H88zM88 224H40C35.58 224 32 227.6 32 232V280C32 284.4 35.58 288 40 288H88C92.42 288 96 284.4 96 280V232C96 227.6 92.42 224 88 224zM0 392C0 369.9 17.91 352 40 352H88C110.1 352 128 369.9 128 392V440C128 462.1 110.1 480 88 480H40C17.91 480 0 462.1 0 440V392zM32 392V440C32 444.4 35.58 448 40 448H88C92.42 448 96 444.4 96 440V392C96 387.6 92.42 384 88 384H40C35.58 384 32 387.6 32 392zM248 32C270.1 32 288 49.91 288 72V120C288 142.1 270.1 160 248 160H200C177.9 160 160 142.1 160 120V72C160 49.91 177.9 32 200 32H248zM248 64H200C195.6 64 192 67.58 192 72V120C192 124.4 195.6 128 200 128H248C252.4 128 256 124.4 256 120V72C256 67.58 252.4 64 248 64zM160 232C160 209.9 177.9 192 200 192H248C270.1 192 288 209.9 288 232V280C288 302.1 270.1 320 248 320H200C177.9 320 160 302.1 160 280V232zM192 232V280C192 284.4 195.6 288 200 288H248C252.4 288 256 284.4 256 280V232C256 227.6 252.4 224 248 224H200C195.6 224 192 227.6 192 232zM248 352C270.1 352 288 369.9 288 392V440C288 462.1 270.1 480 248 480H200C177.9 480 160 462.1 160 440V392C160 369.9 177.9 352 200 352H248zM248 384H200C195.6 384 192 387.6 192 392V440C192 444.4 195.6 448 200 448H248C252.4 448 256 444.4 256 440V392C256 387.6 252.4 384 248 384zM320 72C320 49.91 337.9 32 360 32H408C430.1 32 448 49.91 448 72V120C448 142.1 430.1 160 408 160H360C337.9 160 320 142.1 320 120V72zM352 72V120C352 124.4 355.6 128 360 128H408C412.4 128 416 124.4 416 120V72C416 67.58 412.4 64 408 64H360C355.6 64 352 67.58 352 72zM408 192C430.1 192 448 209.9 448 232V280C448 302.1 430.1 320 408 320H360C337.9 320 320 302.1 320 280V232C320 209.9 337.9 192 360 192H408zM408 224H360C355.6 224 352 227.6 352 232V280C352 284.4 355.6 288 360 288H408C412.4 288 416 284.4 416 280V232C416 227.6 412.4 224 408 224zM320 392C320 369.9 337.9 352 360 352H408C430.1 352 448 369.9 448 392V440C448 462.1 430.1 480 408 480H360C337.9 480 320 462.1 320 440V392zM352 392V440C352 444.4 355.6 448 360 448H408C412.4 448 416 444.4 416 440V392C416 387.6 412.4 384 408 384H360C355.6 384 352 387.6 352 392z";e.definition={prefix:t,iconName:r,icon:[c,o,n,i,l]},e.faGrid=e.definition,e.prefix=t,e.iconName=r,e.width=c,e.height=o,e.ligatures=n,e.unicode=i,e.svgPathData=l,e.aliases=n}(b)),b}var ne=re();const ie={name:"ThemeEditor",components:{FormBuilder:G},props:{theme:B},data(){return{faSlidersH:N.faSlidersH,faRandom:$.faRandom,faArrowDownToLine:ee.faArrowDownToLine,faArrowUpToLine:oe.faArrowUpToLine,faArrowsLeftRight:te.faArrowsLeftRight,faGrid:ne.faGrid,isPro:M,internalUser:R,isTurbo:F,completedHomepageBadge:A,fieldConfig:U,saving:!1,advancedIsOpen:!1,showTooltip:!1,loadingMissingColour:!0,missingColourCount:0}},computed:{productPageFields(){const e=["productPage.description.word.limited","productPage.description.placement","productPage.color.selector.border.radiu
1s","productPage.color.selector.aspect.ratio","productPage.size.selector.border.radius","productPage.quantitySelector.visible","productPage.thumbnails.layout","productPage.convertedPrice.roundTo","productPage.imageCarousel.loop","productPage.recommendations.scope"];return this.internalUser.run().passed&&e.unshift("productPage.ugc.title.text","productPage.ugc.subtitle.text"),e}},created(){!this.theme.id&&this.completedHomepageBadge.fails&&this.$router.replace({path:"/theme/select/"}),this.loadingMissingColour=!0,$axios.get(q("/omnis/v3/products/lifestyle-image-data/")).then(e=>{this.missingColourCount=e.data.imagesMissingColor.count}).finally(()=>{this.loadingMissingColour=!1})},methods:{async onSave(){this.saving=!0;try{const e=this.$store.state.store.active.id;this.theme.updateFrom(await I.save(this.theme,e)),snackbar("Saved theme.")}catch(e){switch(e.constructor){default:case W:snackbar.error("Oops... Looks like something went wrong loading this theme");break;case Q:snackbar.error("Oops... Looks like you're trying to access a theme from another store");break;case j:snackbar.error("We were unable to find this theme");break}}this.saving=!1},initialiseTooltip(){w.local.get("viewedThemeSettings")||(this.showTooltip=!0,w.local.set("viewedThemeSettings",!0))},onPreProcessField(e){var t,r;return e.value instanceof z&&(e.value.isRef||(e.resetValue=(r=(t=e.value.theme)==null?void 0:t.extends)==null?void 0:r.properties[e.name])),e},onToggleAdvanced(e){this.advancedIsOpen=e},debounceSetAlphaStripped:K(function(t,r){this.theme.property(t,L(r))},600),onSet(e){e.name==="page.background.color"?this.debounceSetAlphaStripped(e.name,e.value):this.theme.property(e.name,e.value)}}},le={class:"theme-editor"},ae=m("h5",{class:"mb-0"}," Selecting image selects colour ",-1),se=p(" If colour is set on uploaded product images, selecting image selects colour in form. "),ce={key:0},ue={key:0},de=p(" ("),fe={style:{color:"var(--tml-error-color)"}},ge=p(" images missing a colour id). "),me={key:1},pe={class:"sticky-panel"},he=p(" Click here to change sitewide ");function Ce(e,t,r,c,o,n){const i=s("form-builder"),l=s("tml-spinner"),P=s("tml-new-segmented-control"),_=s("tml-expandable-container"),v=s("tml-button"),H=s("tml-item-tray"),T=s("tml-tooltip");return u(),f("div",le,[a(i,{class:"mb-4",value:r.theme.properties,fields:{"menu.text.font":{type:"font",label:"Menu Font"},"menu.text.color":{type:"color",label:"Menu Font Colour"},"menu.background.color":{...o.fieldConfig.backgroundColor,label:"Menu Background"},"menu.searchBar.show":{when:()=>o.internalUser.run().passed||o.isTurbo.run().passed,type:"selector",label:"Menu Style",options:[{text:"Inline",value:"
10"},{text:"Search bar",value:"1"}]},"menu.searchBar.alignment":{when:()=>(o.internalUser.run().passed||o.isTurbo.run().passed)&&r.theme.get("menu.searchBar.show")==="1",type:"selector",label:"Search Bar Alignment",options:[{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},"menu.text.transform":o.fieldConfig.textTransform,"primary.font":"font","text.font":"font","text.color":"color","primary.color":"color","border.radius":{...o.fieldConfig.borderRadius,label:"Corners"}},groups:{Menu:["menu.text.font","menu.text.color","menu.background.color","menu.text.transform","menu.searchBar.show","menu.searchBar.alignment"],Page:["primary.font","text.font","text.color","primary.color","border.radius"]},"pre-process-field":n.onPreProcessField,onSet:t[0]||(t[0]=d=>r.theme.property(d.name,d.value))},null,8,["value","fields","groups","pre-process-field"]),a(_,{title:"Advanced Settings",icon:o.faSlidersH,onClick:n.onToggleAdvanced},{default:g(()=>[a(i,{value:r.theme.properties,fields:{"heading1.font":"font","heading1.transform":o.fieldConfig.textTransform,"heading2.font":"font","heading2.transform":o.fieldConfig.textTransform,"heading3.font":"font","heading3.transform":o.fieldConfig.textTransform,"page.background.color":{...o.fieldConfig.backgroundColor,showOpacitySelector:!1,showClearOption:!1},"page.product.taglets.visible":{label:"Show clickable tags, where defined",type:"selector",options:[{text:"Hidden",value:"0"},{text:"Show",value:"1"}]},"text.shadow":o.fieldConfig.shadow,"text.border.radius":o.fieldConfig.borderRadius,"text.fullBackground.color":o.fieldConfig.backgroundColor,"text.background.color":o.fieldConfig.boxColor,"image.border.radius":o.fieldConfig.borderRadius,"banner.title.color":{type:"color",label:"Title Colour"},"banner.title.background.color":{...o.fieldConfig.backgroundColor,label:"Title Highlight Colour"},"banner.copy.color":{type:"color",label:"Description Colour"},"banner.copy.background.color":{...o.fieldConfig.backgroundColor,label:"Description Highlight Colour"},"banner.fullBackground.color":o.fieldConfig.backgroundColor,"button.primary.color":{type:"color",label:"Primary Button Colour"},"button.secondary.color":{type:"color",label:"Secondary Button Colour"},"button.border.radius":{...o.fieldConfig.borderRadius,label:"Button Corners"},"form.border.radius":{...o.fieldConfig.borderRadius,label:"Form Corners"},"button.fullBackground.color":o.fieldConfig.backgroundColor,"feature.border.radius":o.fieldConfig.borderRadius,"feature.background.color":o.fieldConfig.boxColor,"feature.text.color":{type:"color",label:"Text Colour"},"feature.fullBackground.color":o.fieldConfig.backgroundColor,"quote.text.font":{type:"font",label:"Font"},"quote.text.color":{type:"color",label:"Text Colour"},"quote.text.shadow":o.fieldConfig.shadow,"quote.border.radius":o.fieldConfig.borderRadius,"quote.background.color":o.fieldConfig.boxColor,"quote.fullBackground.color":o.fieldConfig.backgroundColor,"announcement.v2.text.color":{type:"color",label:"Text Colour"},"announcement.v2.border.radius":o.fieldConfig.borderRadius,"announcement.v2.background.color":o.fieldConfig.boxColor,"announcement.v2.fullBackground.color":o.fieldConfig.backgroundColor,"newsletter.title.font":{type:"font",label:"Title Font"},"newsletter.text.color":{type:"color",label:"Text Colour"},"newsletter.border.radius":o.fieldConfig.borderRadius,"newsletter.background.color":o.fieldConfig.boxColor,"newsletter.fullBackground.color":o.fieldConfig.backgroundColor,...o.isTurbo.run().passed?{"footer.visible":{when:()=>o.isPro.run().passed||o.internalUser.run().passed,type:"selector",options:[{text:"Extended",value:"1"},{text:"Recommended",value:"0"}]}}:{"footer.visible":{when:()=>o.isPro.run().passed||o.internalUser.run().passed,type:"selector",options:[{text:"Minimal",value:"0"},{text:"Recommended",value:"1"}]}},"footer.text.color":{type:"color",label:"Text Colour"},"footer.background.color":o.fieldConfig.backgroundColor,"productPage.ugc.title.text":{when:()=>o.internalUser.run().passed,type:"text",label:"Ugc Title"},"productPage.ugc.subtitle.text":{when:()=>o.internalUser.run().passed,type:"text",label:"Ugc Subtitle"},"productPage.description.placement":{type:"selector",label:"Description Placement",options:[{text:"Top",value:"aboveSelectors",icon:o.faArrowUpToLine},{text:"Bottom",value:"belowSelectors",icon:o.faArrowDownToLine}]},"productPage.description.word.limited":{type:"selector",label:"Description",options:[{text:"Limited",value:"1"}
1,{text:"Unlimited",value:"0"}]},"productPage.color.selector.border.radius":{...o.fieldConfig.borderRadius,label:"Color Selector"},"productPage.size.selector.border.radius":{...o.fieldConfig.borderRadius,label:"Size Selector"},"productPage.quantitySelector.visible":{type:"selector",label:"Quantity Selector",options:[{text:"Hidden",value:"0"},{text:"Show",value:"1"}]},"productPage.thumbnails.layout":{type:"selector",label:"Thumbnail Layout",options:[{text:"Grid",value:"grid",icon:o.faGrid},{text:"Carousel",value:"carousel",icon:o.faArrowsLeftRight}]},"productPage.convertedPrice.roundTo":{type:"selector",label:"Round converted prices to nearest",options:[{text:"None",value:"None"},{text:"0.10",value:"0.1"},{text:"0.25",value:"0.25"},{text:"0.50",value:"0.5"},{text:"1.00",value:"1"}]},"productPage.imageCarousel.loop":{type:"selector",label:"Image Carousel Repeat Images",options:[{text:"No",value:"0"},{text:"Yes",value:"1"}]},"productPage.recommendations.scope":{type:"selector",label:"Product Recommendations Scope",options:[{text:"Sitewide",value:"division"},{text:"Collection",value:"collection"}]},"checkout.shipping.showEstimates":{type:"selector",label:"Dispatch & Shipping Estimates",options:[{text:"Hidden",value:"0"},{text:"Show",value:"1"}]},"checkout.address.showBusinessFields":{type:"selector",label:"Company & VAT Number Fields",options:[{text:"Hidden",value:"0"},{text:"Show",value:"1"}]},"checkout.address.splitStreetAddress":{type:"selector",label:"House Number and Street Fields",options:[{text:"Single field",value:"0"},{text:"Split fields",value:"1"}]},"receipt.shipping.showEstimates":{type:"selector",label:"Shipping Estimates on Receipt",options:[{text:"Hidden",value:"0"},{text:"Show",value:"1"}]}},groups:{Headings:["heading1.font","heading1.transform","heading2.font","heading2.transform","heading3.font","heading3.transform"],Text:["text.shadow","text.border.radius","text.fullBackground.color","text.background.color"],Images:["image.border.radius"],Banners:["banner.title.color","banner.title.background.color","banner.copy.color","banner.copy.background.color","banner.fullBackground.color"],Form:["form.border.radius"],Buttons:["button.primary.color","button.secondary.color","button.border.radius","button.fullBackground.color"],Features:["feature.border.radius","feature.text.color","feature.fullBackground.color","feature.background.color"],Quotes:["quote.text.font","quote.text.color","quote.text.shadow","quote.border.radius","quote.fullBackground.color","quote.background.color"],Announcement:["announcement.v2.text.color","announcement.v2.border.radius","announcement.v2.fullBackground.color","announcement.v2.background.color"],Newsletter:["newsletter.title.font","newsletter.text.color","newsletter.border.radius","newsletter.fullBackground.color","newsletter.background.color"],Page:["page.background.color","page.product.taglets.visible"],Footer:["footer.visible","footer.text.color","footer.background.color"],"Product Page":n.productPageFields,Checkout:["checkout.shipping.showEstimates","checkout.address.showBusinessFields","checkout.address.splitStreetAddress"],Receipt:["receipt.shipping.showEstimates"]},"pre-process-field":n.onPreProcessField,onSet:n.onSet},null,8,["value","fields","groups","pre-process-field","onSet"]),m("div",null,[ae,se,o.loadingMissingColour?(u(),x(l,{key:1,height:"1em"})):(u(),f("span",ce,[o.missingColourCount>0?(u(),f("span",ue,[de,m("span",fe,J(o.missingColourCount),1),ge])):(u(),f("span",me,"(All images have a colour set)"))])),a(P,{options:[{text:"Off",value:"0"},{text:"Enabled",value:"1"}],name:"productPage.imageCarousel.update.form",value:r.theme.get("productPage.imageCarousel.update.form"),"as-reference":!1,class:"mt-2",onNewInput:t[1]||(t[1]=d=>r.theme.property("productPage.imageCarousel.update.form",d.value))},null,8,["value"])])]),_:1},8,["icon","onClick"]),m("div",pe,[a(H,{"wide-left-item":""},{primary:g(()=>[a(v,{text:"Save",primary:"",fill:"",loading:o.saving,onClick:n.onSave},null,8,["loading","onClick"])]),secondary:g(()=>[a(v,{ref:"themeSelectButton",class:"mb-4",href:"/theme/select/",icon:o.faRandom,fill:"",onVnodeMounted:n.initialiseTooltip},null,8,["icon","onVnodeMounted"])]),_:1})]),o.showTooltip?(u(),x(T,{key:0,name:"tooltip-next-step-product",title:"Reset theme",target:e.$refs.themeSelectButton.$el,ttl:0,"start-open":"",position:"top","scroll-on-window":""},{default:g(()=>[he]),_:1},8,["target"])):Y("",!0)])}const Ee=V(ie,[["render",Ce]]);export{Ee as default}; 2//# sourceMappingURL=ThemeEditor.0f0fabe3.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.