@creaditor/newsletter-starterkit 1.0.56 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1142.creaditor.bundle.js +1 -1
- package/dist/1142.creaditor.bundle.js.gz +0 -0
- package/dist/1260.creaditor.bundle.js +112 -63
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +544 -1
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1334.creaditor.bundle.js +3 -3
- package/dist/1334.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +149 -22
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/211.creaditor.bundle.js +1 -1
- package/dist/211.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js +121 -1
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js +1 -1
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/271.creaditor.bundle.js +6 -6
- package/dist/271.creaditor.bundle.js.gz +0 -0
- package/dist/2765.creaditor.bundle.js +1 -1
- package/dist/2765.creaditor.bundle.js.gz +0 -0
- package/dist/2956.creaditor.bundle.js +1 -1
- package/dist/2956.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +2 -2
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/353.creaditor.bundle.js +3 -3
- package/dist/353.creaditor.bundle.js.gz +0 -0
- package/dist/3553.creaditor.bundle.js +1 -1
- package/dist/3553.creaditor.bundle.js.gz +0 -0
- package/dist/3606.creaditor.bundle.js +12 -4
- package/dist/3606.creaditor.bundle.js.gz +0 -0
- package/dist/3932.creaditor.bundle.js +4 -4
- package/dist/3932.creaditor.bundle.js.gz +0 -0
- package/dist/4061.creaditor.bundle.js +177 -0
- package/dist/4061.creaditor.bundle.js.LICENSE.txt +23 -0
- package/dist/4061.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/4061.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js +5 -1
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/4288.creaditor.bundle.js +10 -10
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/4475.creaditor.bundle.js +1 -1
- package/dist/4475.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +8 -7
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4639.creaditor.bundle.js +1 -1
- package/dist/4639.creaditor.bundle.js.gz +0 -0
- package/dist/4762.creaditor.bundle.js +4 -4
- package/dist/4762.creaditor.bundle.js.gz +0 -0
- package/dist/4770.creaditor.bundle.js +3 -3
- package/dist/4770.creaditor.bundle.js.gz +0 -0
- package/dist/5133.creaditor.bundle.js +3 -3
- package/dist/5133.creaditor.bundle.js.gz +0 -0
- package/dist/5379.creaditor.bundle.js +70 -0
- package/dist/5379.creaditor.bundle.js.gz +0 -0
- package/dist/5391.creaditor.bundle.js +1 -1
- package/dist/5391.creaditor.bundle.js.gz +0 -0
- package/dist/567.creaditor.bundle.js +469 -364
- package/dist/567.creaditor.bundle.js.gz +0 -0
- package/dist/5849.creaditor.bundle.js +2 -2
- package/dist/5849.creaditor.bundle.js.gz +0 -0
- package/dist/589.creaditor.bundle.js +25 -8
- package/dist/589.creaditor.bundle.js.gz +0 -0
- package/dist/5909.creaditor.bundle.js +651 -0
- package/dist/5909.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +216 -34
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +49 -20
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6814.creaditor.bundle.js +1 -1
- package/dist/6814.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js +98 -56
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +6 -4
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/7564.creaditor.bundle.js +1 -1
- package/dist/7564.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +9 -9
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/7654.creaditor.bundle.js +221 -0
- package/dist/7654.creaditor.bundle.js.gz +0 -0
- package/dist/7918.creaditor.bundle.js +1 -0
- package/dist/7918.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +21 -48
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/7997.creaditor.bundle.js +1 -1
- package/dist/7997.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js +2 -3
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8250.creaditor.bundle.js +1 -1
- package/dist/8250.creaditor.bundle.js.gz +0 -0
- package/dist/8443.creaditor.bundle.js +1 -1
- package/dist/8443.creaditor.bundle.js.gz +0 -0
- package/dist/8547.creaditor.bundle.js +1270 -0
- package/dist/8547.creaditor.bundle.js.gz +0 -0
- package/dist/8570.creaditor.bundle.js +3 -3
- package/dist/8570.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +20 -24
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js +7 -7
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/8854.creaditor.bundle.js +4 -4
- package/dist/8854.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js +3 -1
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +14 -16
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9250.creaditor.bundle.js +1 -1
- package/dist/9250.creaditor.bundle.js.gz +0 -0
- package/dist/9431.creaditor.bundle.js +1 -1
- package/dist/9431.creaditor.bundle.js.gz +0 -0
- package/dist/9694.creaditor.bundle.js +1 -1
- package/dist/9694.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +2848 -1978
- package/dist/creaditor.bundle.js.LICENSE.txt +6 -0
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,s=t.parent("col");return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,s=t.parent("col");return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"style"},{text:"animations"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:i}=e;const l=[{type:"input",title:"add_urlAddress_from_media_site",active:()=>"style"===r.text,value:t.props.url||"",onChange:e=>{let t=e.target.value;if(-1!==t.indexOf("youtube.com/shorts/")){const e=t.split("/");e.length>0&&(t=`https://youtu.be/${e[e.length-1]}`)}n.execCommand("url",t)}},{type:"divider",active:()=>"style"===r.text},{type:"fontSize",title:"size",min:10,active:()=>"style"===r.text,max:s?.element?.offsetWidth,value:parseInt(t.props.style.width),device:e=>{if("phone"===e.target.device){const n=t.props?.breakpoints?.sm?.style?.width||t.props.style.width;e.target.value=parseInt(n)}else e.target.value=parseInt(t.props.style.width)},onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{width:t+"px",height:e.props.isCircle?t+"px":"auto"}})}}):n.execCommand("style",e=>({width:t+"px",height:e.props.isCircle?t+"px":"auto"}))}},{type:"divider"},{type:"divider",active:()=>"style"===r.text}];return l}}}};var s=n(52144);const r=()=>({set:(e,t,n)=>{switch(t){case"url":return e[t]=n,!0;case"style":if("object"==typeof n)return n.width&&(n.height=parseFloat(n.width)/1.8+"px"),e[t]=(0,s.A)(e[t],n),!0}}});var a=n(72591),i=n.n(a),l=n(88639),c=n.n(l),p=n(88128),d=n.n(p),h=n(30855),u=n.n(h),A=n(93051),m=n.n(A),y=n(51115),g={};g.setAttributes=u(),g.insert=d().bind(null,"head"),g.domAPI=c(),g.insertStyleElement=m();i()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0;n(15284);const C="video";const b=()=>({name:C,create:e=>{const{createElement:t,compose:n,helpers:s}=e,{arrayToString:a,mergeDiff:i}=s,l=document.createElement("div");l.classList.add(v.root);const c=document.createElement("div");c.classList.add(v.cover);const p=document.createElement("cdtr-media-player");return l.append(p,c),l.addEventListener("click",()=>{p.playing=!1}),t({name:C,id:n.id,template:l,defaultProps:{style:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},draggable:{group:"element"},droppable:{group:"element"},render:e=>{p.url=n.props.url,i(p,{style:n.props.style}),p.width=n.props.style.width,p.height=n.props.style.height},atomElement:p,resizeable:()=>l,handleBar:!0,validator:r(),schema:n.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:n,remove:()=>{l.remove()},createEditor:o})}})},51115(e,t,n){n.d(t,{A:()=>i});var o=n(82001),s=n.n(o),r=n(40935),a=n.n(r)()(s());a.push([e.id,".BaT92HY5C7Gxgg9C1_pc {\n position: relative;\n max-width: 100%;\n}\n.aybkK2AXl8f2XctkkRjJ {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.BaT92HY5C7Gxgg9C1_pc:hover .aybkK2AXl8f2XctkkRjJ {\n display: block;\n background-color: var(--primary);\n}\n","",{version:3,sources:["webpack://./../web-editors/video-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,gCAAgC;AAClC",sourcesContent:[".root {\n position: relative;\n max-width: 100%;\n}\n.cover {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.root:hover .cover {\n display: block;\n background-color: var(--primary);\n}\n"],sourceRoot:""}]),a.locals={root:"BaT92HY5C7Gxgg9C1_pc",cover:"aybkK2AXl8f2XctkkRjJ"};const i=a}}]);
|
|
Binary file
|
|
@@ -1,29 +1,15 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),n=o(36565),a=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var c=o(9334),l=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;n.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=i.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this._sectionsExpanded=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=i.M.get("config","channel");this.tabs=[{text:"background"},{text:"design",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="design",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=i.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{n.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,n.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;n.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},n.Ay.store().execCommand("background","transparent")},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(n.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),n.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;n.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(n.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):n.Ay.store().execCommand("style",{[(0,c.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,c.A)(`padding-${o.toLowerCase()}`);"all"===o?(n.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(n.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;n.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,l.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),n.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==i.M.get("config","channel")&&n.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,n.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),n.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();n.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=n.Ay.components[n.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,i=window.getComputedStyle(r);this.maxWidth=parseInt(i.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||i.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(i.paddingTop),bottomValue:parseInt(i.paddingBottom),leftValue:parseInt(i.paddingLeft),rightValue:parseInt(i.paddingRight)},this.margin={topValue:parseInt(i.marginTop),bottomValue:parseInt(i.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,n.Ay.store().execCommand("modalable",this.modalable)}_setModalName(t){this.modalName=t,n.Ay.store().execCommand("modalName",t)}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.shadowRoot.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded})}render(){const t=i.M.get("config","channel");return r.qy`
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),a=o(86319),i=o(36565),n=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var l=o(9334),c=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;i.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=a.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=a.M.get("config","channel");this.tabs=[{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=a.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{i.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,i.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;i.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background","transparent")},onRemoveBackground:()=>{this.background="",this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background",null),i.Ay.store().execCommand("style",{background:"",backgroundColor:null,backgroundImage:null})},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(i.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),i.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;i.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(i.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):i.Ay.store().execCommand("style",{[(0,l.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,l.A)(`padding-${o.toLowerCase()}`);"all"===o?(i.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(i.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;i.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,c.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),i.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==a.M.get("config","channel")&&i.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,i.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),i.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();i.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=i.Ay.components[i.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,a=window.getComputedStyle(r);this.maxWidth=parseInt(a.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||a.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(a.paddingTop),bottomValue:parseInt(a.paddingBottom),leftValue:parseInt(a.paddingLeft),rightValue:parseInt(a.paddingRight)},this.margin={topValue:parseInt(a.marginTop),bottomValue:parseInt(a.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,i.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=a.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,i.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,i.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,i.Ay.store().execCommand("popupDelay",e)}_hasBackground(){if(this.backgroundInstance&&this.backgroundInstance.component)return!0;const t=(this.background||"").trim();return!!t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&"none"!==t}render(){const t=a.M.get("config","channel");return r.qy`
|
|
2
2
|
<cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
|
|
3
3
|
<div slot="content">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@click=${()=>this._onToggleAll()}
|
|
7
|
-
@mouseover=${t=>{t.currentTarget.style.color="#333",t.currentTarget.style.textDecoration="underline"}}
|
|
8
|
-
@mouseout=${t=>{t.currentTarget.style.color="#555",t.currentTarget.style.textDecoration="none"}}
|
|
9
|
-
style="display:inline-flex;align-items:center;gap:3px;font-size:12px;color:#555;cursor:pointer;font-family:inherit;"
|
|
10
|
-
>
|
|
11
|
-
<lang-text text=${this._sectionsExpanded?"collapse_all":"expand_all"}></lang-text>
|
|
12
|
-
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
13
|
-
<polyline points="7 8 12 3 17 8"></polyline>
|
|
14
|
-
<polyline points="7 16 12 21 17 16"></polyline>
|
|
15
|
-
</svg>
|
|
16
|
-
</span>
|
|
17
|
-
</div>
|
|
18
|
-
${"background"===this.tabName?r.qy`
|
|
19
|
-
<cdtr-editor-section label="backgroundColor" .open=${!0}>
|
|
4
|
+
${"style"===this.tabName?r.qy`
|
|
5
|
+
<cdtr-editor-section .label=${"backgroundColor"} .open=${!0}>
|
|
20
6
|
<cdtr-color-swatch-group
|
|
21
7
|
.columns=${1}
|
|
22
8
|
.items=${[{title:"backgroundColor",allowGradient:"web"===t,value:this.background||"#ffffff",onChange:t=>this.cmds.onChangebackground(t)}]}
|
|
23
9
|
></cdtr-color-swatch-group>
|
|
24
10
|
</cdtr-editor-section>
|
|
25
11
|
|
|
26
|
-
<cdtr-editor-section label
|
|
12
|
+
<cdtr-editor-section .label=${"backgrounds"} .open=${!0}>
|
|
27
13
|
<div style="display:flex;gap:8px;">
|
|
28
14
|
<paper-button
|
|
29
15
|
class="gallery"
|
|
@@ -33,7 +19,7 @@
|
|
|
33
19
|
></lang-text></paper-button>
|
|
34
20
|
<paper-button
|
|
35
21
|
class="backgrounds"
|
|
36
|
-
@click=${()=>
|
|
22
|
+
@click=${()=>n.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:i.Ay.components[0]})}
|
|
37
23
|
><lang-text
|
|
38
24
|
text="backgrounds"
|
|
39
25
|
></lang-text></paper-button>
|
|
@@ -46,9 +32,14 @@
|
|
|
46
32
|
backgroundSize=${this.backgroundSize}
|
|
47
33
|
@change=${this.onChangeImageBackgroundProp}
|
|
48
34
|
></background-editor-plugin>`:null}
|
|
35
|
+
${this._hasBackground()?r.qy`<paper-button
|
|
36
|
+
style="font-size:12px;padding:0;margin-top:8px;text-align:var(--text-align-locale);direction:var(--direction-locale);justify-content:flex-start;color:red;text-transform:none;"
|
|
37
|
+
@click=${this.cmds.onRemoveBackground}
|
|
38
|
+
><lang-text text="remove_background"></lang-text
|
|
39
|
+
></paper-button>`:null}
|
|
49
40
|
</cdtr-editor-section>
|
|
50
41
|
|
|
51
|
-
<cdtr-editor-section label
|
|
42
|
+
<cdtr-editor-section .label=${"add_urlAddress_from_media_site"} .open=${!1}>
|
|
52
43
|
<cdtr-input
|
|
53
44
|
.value="${this.backgroundVideo}"
|
|
54
45
|
@input=${this.cmds.onChangeBackgroundVideo}
|
|
@@ -62,7 +53,12 @@
|
|
|
62
53
|
></paper-button>`:null}
|
|
63
54
|
</cdtr-editor-section>
|
|
64
55
|
|
|
65
|
-
|
|
56
|
+
<!-- Distinct from the "layout_behavior" section further down:
|
|
57
|
+
this one is strictly about how the background renders in
|
|
58
|
+
email clients. Both used to be labelled "settings", which
|
|
59
|
+
read as a duplicate and gave the two groups the same
|
|
60
|
+
persistence key shape. -->
|
|
61
|
+
<cdtr-editor-section .label=${"email_compatibility"} .open=${!1}>
|
|
66
62
|
<cdtr-checkbox
|
|
67
63
|
@change=${t=>this.onChangeBakgroundExpanding(t)}
|
|
68
64
|
.checked=${this.expand_image_for_outlook}
|
|
@@ -78,15 +74,8 @@
|
|
|
78
74
|
></lang-text>
|
|
79
75
|
</h6>
|
|
80
76
|
</cdtr-editor-section>`:null}
|
|
81
|
-
${"
|
|
82
|
-
<cdtr-editor-section label
|
|
83
|
-
<cdtr-color-swatch-group
|
|
84
|
-
.columns=${1}
|
|
85
|
-
.items=${[{title:"backgroundColor",allowGradient:"web"===t,value:this.background||"#ffffff",onChange:t=>this.cmds.onChangebackground(t)}]}
|
|
86
|
-
></cdtr-color-swatch-group>
|
|
87
|
-
</cdtr-editor-section>
|
|
88
|
-
|
|
89
|
-
<cdtr-editor-section label="width" .open=${!0}>
|
|
77
|
+
${"style"===this.tabName?r.qy`
|
|
78
|
+
<cdtr-editor-section .label=${"width"} .open=${!0}>
|
|
90
79
|
<cdtr-width-editor
|
|
91
80
|
text="width"
|
|
92
81
|
unit="px"
|
|
@@ -94,14 +83,14 @@
|
|
|
94
83
|
min="500"
|
|
95
84
|
.value="${this.width}"
|
|
96
85
|
@input=${this.onChangeWidth}
|
|
97
|
-
.sizes=${[{name:
|
|
86
|
+
.sizes=${[{name:a.M.get("lang","recommended")||"recommended",value:600,default:!0},{name:a.M.get("lang","large")||"large",value:1e3}]}
|
|
98
87
|
></cdtr-width-editor>
|
|
99
88
|
<p style="font-size:12px">
|
|
100
89
|
<lang-text whiteSpace="" text="email_600"></lang-text>
|
|
101
90
|
</p>
|
|
102
91
|
</cdtr-editor-section>
|
|
103
92
|
|
|
104
|
-
<cdtr-editor-section label
|
|
93
|
+
<cdtr-editor-section .label=${"padding"} .open=${!0}>
|
|
105
94
|
<cdtr-row justify="center">
|
|
106
95
|
<cdtr-spacing
|
|
107
96
|
.topValue="${this.padding.topValue}"
|
|
@@ -115,7 +104,7 @@
|
|
|
115
104
|
</cdtr-row>
|
|
116
105
|
</cdtr-editor-section>
|
|
117
106
|
|
|
118
|
-
<cdtr-editor-section label
|
|
107
|
+
<cdtr-editor-section .label=${"border_design"} .open=${!1}>
|
|
119
108
|
<cdtr-border-editor
|
|
120
109
|
.borderStyle=${this.borderStyle}
|
|
121
110
|
.borderWidth=${this.borderWidth}
|
|
@@ -132,7 +121,7 @@
|
|
|
132
121
|
></cdtr-border-editor>
|
|
133
122
|
</cdtr-editor-section>
|
|
134
123
|
|
|
135
|
-
<cdtr-editor-section label
|
|
124
|
+
<cdtr-editor-section .label=${"layout_behavior"} .open=${!1}>
|
|
136
125
|
<cdtr-row alignItems="center" justify="space-between">
|
|
137
126
|
<cdtr-col>
|
|
138
127
|
<cdtr-title>
|
|
@@ -165,23 +154,60 @@
|
|
|
165
154
|
></cdtr-checkbox>
|
|
166
155
|
</cdtr-col>
|
|
167
156
|
</cdtr-row>
|
|
168
|
-
${this.modalable?r.qy
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
157
|
+
${this.modalable?r.qy`<p
|
|
158
|
+
style="font-size:12px;color:#888;line-height:1.5;margin:6px 0 0;font-style:italic;"
|
|
159
|
+
>
|
|
160
|
+
<lang-text
|
|
161
|
+
whiteSpace="normal"
|
|
162
|
+
text="popup_settings_in_tab"
|
|
163
|
+
></lang-text>
|
|
164
|
+
</p>`:null}
|
|
165
|
+
`:null}
|
|
166
|
+
</cdtr-editor-section>
|
|
167
|
+
`:null}
|
|
168
|
+
|
|
169
|
+
${"popup"===this.tabName?r.qy`
|
|
170
|
+
<cdtr-editor-section .label=${"modal_name"} .open=${!0}>
|
|
171
|
+
<cdtr-input
|
|
172
|
+
style="width:100%"
|
|
173
|
+
.value=${this.modalName||""}
|
|
174
|
+
.placeholder=${a.M.get("lang","modal_name")||""}
|
|
175
|
+
@change=${t=>this._setModalName(t.target.value)}
|
|
176
|
+
></cdtr-input>
|
|
177
|
+
</cdtr-editor-section>
|
|
178
|
+
|
|
179
|
+
<cdtr-editor-section .label=${"popup_trigger_label"} .open=${!0}>
|
|
180
|
+
<select
|
|
181
|
+
style="width:100%;padding:8px;border:1px solid var(--color-border,#e0e0e0);border-radius:8px;font:inherit;background:#fff;cursor:pointer;"
|
|
182
|
+
@change=${t=>this._setPopupTrigger(t.target.value)}
|
|
183
|
+
>
|
|
184
|
+
${["button","load","delay","exit"].map(t=>r.qy`<option
|
|
185
|
+
value=${t}
|
|
186
|
+
?selected=${this.popupTrigger===t}
|
|
187
|
+
>
|
|
188
|
+
${a.M.get("lang","popup_trigger_"+t)||t}
|
|
189
|
+
</option>`)}
|
|
190
|
+
</select>
|
|
191
|
+
${"delay"===this.popupTrigger?r.qy`
|
|
192
|
+
<cdtr-title style="display:block;margin-top:8px">
|
|
193
|
+
<lang-text text="popup_delay_label"></lang-text>
|
|
194
|
+
</cdtr-title>
|
|
195
|
+
<input
|
|
196
|
+
type="number"
|
|
197
|
+
min="0"
|
|
198
|
+
style="width:100%;padding:8px;border:1px solid var(--color-border,#e0e0e0);border-radius:8px;font:inherit;box-sizing:border-box;"
|
|
199
|
+
.value=${String(this.popupDelay)}
|
|
200
|
+
@change=${t=>this._setPopupDelay(t.target.value)}
|
|
201
|
+
/>
|
|
184
202
|
`:null}
|
|
203
|
+
<p
|
|
204
|
+
style="font-size:12px;color:#888;line-height:1.5;margin:8px 0 0;font-style:italic;"
|
|
205
|
+
>
|
|
206
|
+
<lang-text
|
|
207
|
+
whiteSpace="normal"
|
|
208
|
+
text="modal_name_hint"
|
|
209
|
+
></lang-text>
|
|
210
|
+
</p>
|
|
185
211
|
</cdtr-editor-section>
|
|
186
212
|
`:null}
|
|
187
213
|
|
|
@@ -260,7 +286,7 @@
|
|
|
260
286
|
paper-button.backgrounds:hover {
|
|
261
287
|
background: #eaeaed;
|
|
262
288
|
}
|
|
263
|
-
`,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number}
|
|
289
|
+
`,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},popupTrigger:{type:String},popupDelay:{type:Number},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>n});var r=o(59929),a=o(57176);class i extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
|
|
264
290
|
<div class="${t}">
|
|
265
291
|
${(this.items||[]).map((t,e)=>r.qy`
|
|
266
292
|
<div class="swatch-item" @click=${()=>this.openPicker(e)}>
|
|
@@ -284,7 +310,7 @@
|
|
|
284
310
|
</div>
|
|
285
311
|
`)}
|
|
286
312
|
</div>
|
|
287
|
-
`}}
|
|
313
|
+
`}}i.styles=[a.L,r.AH`
|
|
288
314
|
:host {
|
|
289
315
|
display: block;
|
|
290
316
|
direction: var(--direction-locale, ltr);
|
|
@@ -332,12 +358,12 @@
|
|
|
332
358
|
clip: rect(0,0,0,0);
|
|
333
359
|
pointer-events: none;
|
|
334
360
|
}
|
|
335
|
-
`],
|
|
361
|
+
`],i.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",i);const n=t=>r.qy`
|
|
336
362
|
<cdtr-color-swatch-group
|
|
337
363
|
.items=${t.items}
|
|
338
364
|
.columns=${t.columns||2}
|
|
339
365
|
></cdtr-color-swatch-group>
|
|
340
|
-
`},12258(t,e,o){o.d(e,{A:()=>
|
|
366
|
+
`},12258(t,e,o){o.d(e,{A:()=>n});var r=o(59929),a=o(40648);class i extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,a.Q)(this.persistKey,this.open)}render(){return r.qy`
|
|
341
367
|
<div class="section">
|
|
342
368
|
<div class="header" @click=${this.toggle}>
|
|
343
369
|
<span class="title"><lang-text text="${this.label}"></lang-text></span>
|
|
@@ -351,14 +377,26 @@
|
|
|
351
377
|
</div>
|
|
352
378
|
</div>
|
|
353
379
|
</div>
|
|
354
|
-
`}}
|
|
380
|
+
`}}i.styles=r.AH`
|
|
355
381
|
:host {
|
|
356
382
|
display: block;
|
|
357
383
|
direction: var(--direction-locale, ltr);
|
|
358
384
|
--editor-container-inline-padding: 0;
|
|
359
385
|
}
|
|
360
386
|
.section {
|
|
361
|
-
|
|
387
|
+
position: relative;
|
|
388
|
+
}
|
|
389
|
+
/* Inset to the content gutter, not full-bleed: an edge-to-edge rule reads
|
|
390
|
+
as a table border. */
|
|
391
|
+
.section::after {
|
|
392
|
+
content: "";
|
|
393
|
+
display: block;
|
|
394
|
+
height: 1px;
|
|
395
|
+
margin: 0 var(--space-4, 16px);
|
|
396
|
+
background: var(--color-border-subtle, rgba(0, 0, 0, 0.06));
|
|
397
|
+
}
|
|
398
|
+
:host(:last-of-type) .section::after {
|
|
399
|
+
display: none;
|
|
362
400
|
}
|
|
363
401
|
.header {
|
|
364
402
|
display: flex;
|
|
@@ -367,16 +405,26 @@
|
|
|
367
405
|
padding: var(--space-3) var(--space-4);
|
|
368
406
|
cursor: pointer;
|
|
369
407
|
user-select: none;
|
|
408
|
+
/* Keeps the group name visible while its controls scroll past. */
|
|
409
|
+
position: sticky;
|
|
410
|
+
top: 0;
|
|
411
|
+
z-index: 1;
|
|
412
|
+
background: var(--color-bg, #fff);
|
|
413
|
+
}
|
|
414
|
+
.header:hover {
|
|
415
|
+
background: var(--color-bg-subtle, #fafbfc);
|
|
370
416
|
}
|
|
371
417
|
.title {
|
|
418
|
+
/* Larger and lighter than the labels inside it, not bolder — the labels
|
|
419
|
+
are what you act on. */
|
|
372
420
|
font-size: var(--text-md);
|
|
373
|
-
font-weight:
|
|
421
|
+
font-weight: 500;
|
|
374
422
|
color: var(--color-text);
|
|
375
|
-
letter-spacing: 0
|
|
423
|
+
letter-spacing: 0;
|
|
376
424
|
}
|
|
377
425
|
.chevron {
|
|
378
|
-
width:
|
|
379
|
-
height:
|
|
426
|
+
width: 14px;
|
|
427
|
+
height: 14px;
|
|
380
428
|
transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
|
|
381
429
|
color: var(--color-text-faint);
|
|
382
430
|
}
|
|
@@ -397,9 +445,10 @@
|
|
|
397
445
|
opacity: 1;
|
|
398
446
|
}
|
|
399
447
|
.content-inner {
|
|
400
|
-
|
|
448
|
+
/* Light on top: the controls inside bring their own leading pad. */
|
|
449
|
+
padding: var(--space-1) var(--space-4) var(--space-3) var(--space-4);
|
|
401
450
|
}
|
|
402
|
-
`,
|
|
451
|
+
`,i.properties={label:{type:String,reflect:!0,attribute:"data-label"},open:{type:Boolean,reflect:!0},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const n=(t,e)=>r.qy`
|
|
403
452
|
<cdtr-editor-section
|
|
404
453
|
.label=${t.label}
|
|
405
454
|
.open=${!1!==t.open}
|
|
@@ -407,4 +456,4 @@
|
|
|
407
456
|
>
|
|
408
457
|
${e}
|
|
409
458
|
</cdtr-editor-section>
|
|
410
|
-
`}
|
|
459
|
+
`}}]);
|
|
Binary file
|