@creaditor/newsletter-starterkit 1.0.53 → 1.0.55
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/1260.creaditor.bundle.js +297 -128
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +1 -439
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1403.creaditor.bundle.js +110 -0
- package/dist/1403.creaditor.bundle.js.gz +0 -0
- package/dist/1529.creaditor.bundle.js +1 -1
- package/dist/1529.creaditor.bundle.js.gz +0 -0
- package/dist/1565.creaditor.bundle.js +338 -138
- package/dist/1565.creaditor.bundle.js.gz +0 -0
- package/dist/168.creaditor.bundle.js +4 -4
- package/dist/168.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +11 -5
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js +56 -8
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js +1 -2
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/3095.creaditor.bundle.js +91 -58
- package/dist/3095.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +11 -9
- package/dist/3521.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/3932.creaditor.bundle.js +3 -3
- package/dist/3932.creaditor.bundle.js.gz +0 -0
- package/dist/4114.creaditor.bundle.js +1 -0
- package/dist/4114.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js +1 -1
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +1 -1
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +30 -190
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +198 -235
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/5340.creaditor.bundle.js +126 -36
- package/dist/5340.creaditor.bundle.js.gz +0 -0
- package/dist/574.creaditor.bundle.js +5 -5
- package/dist/574.creaditor.bundle.js.gz +0 -0
- package/dist/589.creaditor.bundle.js +9 -9
- package/dist/589.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +24 -31
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +3 -3
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6713.creaditor.bundle.js +151 -0
- package/dist/6713.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js +2 -3
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/7238.creaditor.bundle.js +3 -3
- package/dist/7238.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +3 -7
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +1 -1
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/7789.creaditor.bundle.js +25 -0
- package/dist/7789.creaditor.bundle.js.LICENSE.txt +32 -0
- package/dist/7789.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7789.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +63 -115
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/8173.creaditor.bundle.js +1 -1
- package/dist/8173.creaditor.bundle.js.gz +0 -0
- package/dist/8305.creaditor.bundle.js +6 -6
- package/dist/8305.creaditor.bundle.js.gz +0 -0
- package/dist/8516.creaditor.bundle.js +1 -1
- package/dist/8516.creaditor.bundle.js.gz +0 -0
- package/dist/8676.creaditor.bundle.js +1 -0
- package/dist/8676.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js +4 -4
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +1 -1
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9158.creaditor.bundle.js +613 -0
- package/dist/9158.creaditor.bundle.js.LICENSE.txt +10 -0
- package/dist/9158.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/9158.creaditor.bundle.js.gz +0 -0
- package/dist/9162.creaditor.bundle.js +4 -3
- package/dist/9162.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 +2795 -874
- 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,76 +1,68 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,
|
|
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`
|
|
2
2
|
<cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
|
|
3
3
|
<div slot="content">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
<div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;">
|
|
5
|
+
<span
|
|
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}>
|
|
20
|
+
<cdtr-color-swatch-group
|
|
21
|
+
.columns=${1}
|
|
22
|
+
.items=${[{title:"backgroundColor",allowGradient:"web"===t,value:this.background||"#ffffff",onChange:t=>this.cmds.onChangebackground(t)}]}
|
|
23
|
+
></cdtr-color-swatch-group>
|
|
24
|
+
</cdtr-editor-section>
|
|
25
|
+
|
|
26
|
+
<cdtr-editor-section label="backgrounds" .open=${!0}>
|
|
27
|
+
<div style="display:flex;gap:8px;">
|
|
28
|
+
<paper-button
|
|
29
|
+
class="gallery"
|
|
30
|
+
@click=${()=>this.galleryOpened=!0}
|
|
31
|
+
><lang-text
|
|
32
|
+
text="openGalleryImage"
|
|
33
|
+
></lang-text></paper-button>
|
|
34
|
+
<paper-button
|
|
35
|
+
class="backgrounds"
|
|
36
|
+
@click=${()=>a.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:n.Ay.components[0]})}
|
|
37
|
+
><lang-text
|
|
38
|
+
text="backgrounds"
|
|
39
|
+
></lang-text></paper-button>
|
|
40
|
+
</div>
|
|
41
|
+
${this.isBackgroundImage&&"web"===t?r.qy`<background-editor-plugin
|
|
42
|
+
style="margin-top:8px;"
|
|
28
43
|
backgroundAttachment=${this.backgroundAttachment}
|
|
29
44
|
backgroundPosition=${this.backgroundPosition}
|
|
30
45
|
backgroundRepeat=${this.backgroundRepeat}
|
|
31
46
|
backgroundSize=${this.backgroundSize}
|
|
32
47
|
@change=${this.onChangeImageBackgroundProp}
|
|
33
|
-
></background-editor-plugin
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
style=" font-size: 13px;
|
|
52
|
-
padding: 0;
|
|
53
|
-
text-align: var(--text-align-locale);
|
|
54
|
-
direction: var(--direction-locale);
|
|
55
|
-
justify-content: flex-start;
|
|
56
|
-
color:red;
|
|
57
|
-
margin: 0;"
|
|
58
|
-
@click=${this.cmds.onRemoveBackgroundVideo}
|
|
59
|
-
><lang-text text="remove_background_movie"></lang-text
|
|
60
|
-
></paper-button>`:null}
|
|
61
|
-
</cdtr-row>
|
|
62
|
-
</cdtr-editor-container>
|
|
63
|
-
<cdtr-divider></cdtr-divider>
|
|
64
|
-
<cdtr-editor-container>
|
|
65
|
-
<cdtr-colorpicker-editor
|
|
66
|
-
.hasAlpha=${"web"===t}
|
|
67
|
-
@change=${this.cmds.onChangebackground}
|
|
68
|
-
.value=${this.background}
|
|
69
|
-
text="backgroundColor"
|
|
70
|
-
></cdtr-colorpicker-editor>
|
|
71
|
-
</cdtr-editor-container>
|
|
72
|
-
<cdtr-divider></cdtr-divider>
|
|
73
|
-
<cdtr-editor-container>
|
|
48
|
+
></background-editor-plugin>`:null}
|
|
49
|
+
</cdtr-editor-section>
|
|
50
|
+
|
|
51
|
+
<cdtr-editor-section label="add_urlAddress_from_media_site" .open=${!1}>
|
|
52
|
+
<cdtr-input
|
|
53
|
+
.value="${this.backgroundVideo}"
|
|
54
|
+
@input=${this.cmds.onChangeBackgroundVideo}
|
|
55
|
+
style="width:100%;direction:ltr;text-align:left;"
|
|
56
|
+
placeholder="https://"
|
|
57
|
+
></cdtr-input>
|
|
58
|
+
${"object"==typeof this.backgroundInstance&&this.backgroundInstance?.component?r.qy`<paper-button
|
|
59
|
+
style="font-size:12px;padding:0;text-align:var(--text-align-locale);direction:var(--direction-locale);justify-content:flex-start;color:red;margin:4px 0 0;text-transform:none;"
|
|
60
|
+
@click=${this.cmds.onRemoveBackgroundVideo}
|
|
61
|
+
><lang-text text="remove_background_movie"></lang-text
|
|
62
|
+
></paper-button>`:null}
|
|
63
|
+
</cdtr-editor-section>
|
|
64
|
+
|
|
65
|
+
<cdtr-editor-section label="settings" .open=${!1}>
|
|
74
66
|
<cdtr-checkbox
|
|
75
67
|
@change=${t=>this.onChangeBakgroundExpanding(t)}
|
|
76
68
|
.checked=${this.expand_image_for_outlook}
|
|
@@ -85,18 +77,16 @@
|
|
|
85
77
|
text="expand_image_for_outlook_description"
|
|
86
78
|
></lang-text>
|
|
87
79
|
</h6>
|
|
88
|
-
</cdtr-editor-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</cdtr-editor-container>
|
|
99
|
-
<cdtr-editor-container>
|
|
80
|
+
</cdtr-editor-section>`:null}
|
|
81
|
+
${"design"===this.tabName?r.qy`
|
|
82
|
+
<cdtr-editor-section label="backgroundColor" .open=${!0}>
|
|
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}>
|
|
100
90
|
<cdtr-width-editor
|
|
101
91
|
text="width"
|
|
102
92
|
unit="px"
|
|
@@ -109,53 +99,23 @@
|
|
|
109
99
|
<p style="font-size:12px">
|
|
110
100
|
<lang-text whiteSpace="" text="email_600"></lang-text>
|
|
111
101
|
</p>
|
|
112
|
-
</cdtr-editor-
|
|
113
|
-
<cdtr-divider></cdtr-divider>
|
|
114
|
-
<cdtr-editor-container>
|
|
115
|
-
<cdtr-row justify="center">
|
|
116
|
-
<cdtr-col sm="12"
|
|
117
|
-
><cdtr-title style="display:block" class="align-lang"
|
|
118
|
-
><lang-text text="padding"></lang-text></cdtr-title
|
|
119
|
-
></cdtr-col>
|
|
120
|
-
<cdtr-col sm="6"
|
|
121
|
-
><cdtr-spacing
|
|
122
|
-
.topValue="${this.padding.topValue}"
|
|
123
|
-
.bottomValue="${this.padding.bottomValue}"
|
|
124
|
-
.leftValue="${this.padding.leftValue}"
|
|
125
|
-
.rightValue="${this.padding.rightValue}"
|
|
126
|
-
isLock=${!1}
|
|
127
|
-
max="500"
|
|
128
|
-
@input=${this.cmds.onChangePadding}
|
|
129
|
-
></cdtr-spacing
|
|
130
|
-
></cdtr-col>
|
|
131
|
-
</cdtr-row>
|
|
132
|
-
</cdtr-editor-container>
|
|
102
|
+
</cdtr-editor-section>
|
|
133
103
|
|
|
134
|
-
<cdtr-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.checked="${this.noResponsive}"
|
|
146
|
-
></cdtr-checkbox>
|
|
147
|
-
</cdtr-col>
|
|
104
|
+
<cdtr-editor-section label="padding" .open=${!0}>
|
|
105
|
+
<cdtr-row justify="center">
|
|
106
|
+
<cdtr-spacing
|
|
107
|
+
.topValue="${this.padding.topValue}"
|
|
108
|
+
.bottomValue="${this.padding.bottomValue}"
|
|
109
|
+
.leftValue="${this.padding.leftValue}"
|
|
110
|
+
.rightValue="${this.padding.rightValue}"
|
|
111
|
+
isLock=${!1}
|
|
112
|
+
max="500"
|
|
113
|
+
@input=${this.cmds.onChangePadding}
|
|
114
|
+
></cdtr-spacing>
|
|
148
115
|
</cdtr-row>
|
|
149
|
-
</cdtr-editor-
|
|
150
|
-
<!-- <cdtr-divider></cdtr-divider>
|
|
151
|
-
<cdtr-editor-container>
|
|
152
|
-
<cdtr-radius-editor
|
|
153
|
-
@input=${this.cmds.onchangeRadius}
|
|
154
|
-
></cdtr-radius-editor>
|
|
155
|
-
</cdtr-editor-container> -->
|
|
156
|
-
<cdtr-divider></cdtr-divider>
|
|
116
|
+
</cdtr-editor-section>
|
|
157
117
|
|
|
158
|
-
<cdtr-editor-
|
|
118
|
+
<cdtr-editor-section label="border_design" .open=${!1}>
|
|
159
119
|
<cdtr-border-editor
|
|
160
120
|
.borderStyle=${this.borderStyle}
|
|
161
121
|
.borderWidth=${this.borderWidth}
|
|
@@ -170,11 +130,63 @@
|
|
|
170
130
|
.borderBottomLeftRadius=${this.borderBottomLeftRadius}
|
|
171
131
|
@change=${this.cmds.onChangeBorderStyle}
|
|
172
132
|
></cdtr-border-editor>
|
|
173
|
-
</cdtr-editor-
|
|
133
|
+
</cdtr-editor-section>
|
|
134
|
+
|
|
135
|
+
<cdtr-editor-section label="settings" .open=${!1}>
|
|
136
|
+
<cdtr-row alignItems="center" justify="space-between">
|
|
137
|
+
<cdtr-col>
|
|
138
|
+
<cdtr-title>
|
|
139
|
+
<lang-text text="no_responsive"></lang-text>
|
|
140
|
+
</cdtr-title>
|
|
141
|
+
</cdtr-col>
|
|
142
|
+
<cdtr-col sm="1">
|
|
143
|
+
<cdtr-checkbox
|
|
144
|
+
@change=${this.cmds.toggleResponsive}
|
|
145
|
+
.checked="${this.noResponsive}"
|
|
146
|
+
></cdtr-checkbox>
|
|
147
|
+
</cdtr-col>
|
|
148
|
+
</cdtr-row>
|
|
149
|
+
${"web"===t?r.qy`
|
|
150
|
+
<cdtr-row alignItems="center" justify="space-between">
|
|
151
|
+
<cdtr-col
|
|
152
|
+
style="cursor:pointer"
|
|
153
|
+
@click=${()=>this._toggleModalable(!this.modalable)}
|
|
154
|
+
>
|
|
155
|
+
<cdtr-tooltip content="modal_hidden_on_view">
|
|
156
|
+
<cdtr-title>
|
|
157
|
+
<lang-text text="mark_as_modal"></lang-text>
|
|
158
|
+
</cdtr-title>
|
|
159
|
+
</cdtr-tooltip>
|
|
160
|
+
</cdtr-col>
|
|
161
|
+
<cdtr-col sm="1">
|
|
162
|
+
<cdtr-checkbox
|
|
163
|
+
@change=${t=>this._toggleModalable(!t.target.checked)}
|
|
164
|
+
.checked="${this.modalable}"
|
|
165
|
+
></cdtr-checkbox>
|
|
166
|
+
</cdtr-col>
|
|
167
|
+
</cdtr-row>
|
|
168
|
+
${this.modalable?r.qy`
|
|
169
|
+
<cdtr-title style="display:block;margin-top:8px">
|
|
170
|
+
<lang-text text="modal_name"></lang-text>
|
|
171
|
+
</cdtr-title>
|
|
172
|
+
<cdtr-input
|
|
173
|
+
style="width:100%"
|
|
174
|
+
.value=${this.modalName||""}
|
|
175
|
+
.placeholder=${i.M.get("lang","modal_name")||""}
|
|
176
|
+
@change=${t=>this._setModalName(t.target.value)}
|
|
177
|
+
></cdtr-input>
|
|
178
|
+
<p
|
|
179
|
+
style="font-size:12px;color:#888;line-height:1.5;margin:4px 0 0;font-style:italic;"
|
|
180
|
+
>
|
|
181
|
+
<lang-text text="modal_name_hint"></lang-text>
|
|
182
|
+
</p>
|
|
183
|
+
`:null}
|
|
184
|
+
`:null}
|
|
185
|
+
</cdtr-editor-section>
|
|
174
186
|
`:null}
|
|
175
187
|
|
|
176
|
-
<!-- ${"typography"===this.tabName?
|
|
177
|
-
<!-- ${"spacing"===this.tabName?
|
|
188
|
+
<!-- ${"typography"===this.tabName?r.qy` <cdtr-text-editor-plugin></cdtr-text-editor-plugin> `:null} -->
|
|
189
|
+
<!-- ${"spacing"===this.tabName?r.qy`
|
|
178
190
|
<cdtr-editor-container>
|
|
179
191
|
<cdtr-row justify="center">
|
|
180
192
|
<cdtr-col sm="12"
|
|
@@ -222,13 +234,170 @@
|
|
|
222
234
|
.opened=${this.galleryOpened}
|
|
223
235
|
@file=${this.cmds.onChangeImage}
|
|
224
236
|
></cdtr-gallery>
|
|
225
|
-
`}}g.styles=
|
|
237
|
+
`}}g.styles=r.AH`
|
|
238
|
+
paper-button.gallery,
|
|
239
|
+
paper-button.backgrounds {
|
|
240
|
+
text-transform: none;
|
|
241
|
+
font-size: 12.5px;
|
|
242
|
+
font-weight: 500;
|
|
243
|
+
letter-spacing: 0.01em;
|
|
244
|
+
border-radius: 6px;
|
|
245
|
+
padding: 6px 12px;
|
|
246
|
+
min-width: 0;
|
|
247
|
+
}
|
|
226
248
|
paper-button.gallery {
|
|
227
249
|
background: var(--primary);
|
|
228
250
|
color: var(--primary-text);
|
|
229
251
|
}
|
|
230
252
|
paper-button.backgrounds {
|
|
231
|
-
background:
|
|
253
|
+
background: #333;
|
|
232
254
|
color: #fff;
|
|
233
255
|
}
|
|
234
|
-
`,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},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)}}]);
|
|
256
|
+
`,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},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(57176);class n 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`
|
|
257
|
+
<div class="${t}">
|
|
258
|
+
${(this.items||[]).map((t,e)=>r.qy`
|
|
259
|
+
<div class="swatch-item" @click=${()=>this.openPicker(e)}>
|
|
260
|
+
<div
|
|
261
|
+
class="swatch-circle"
|
|
262
|
+
style="background: ${t.value||"#fff"}"
|
|
263
|
+
></div>
|
|
264
|
+
<span class="swatch-label">
|
|
265
|
+
<lang-text text="${t.title}"></lang-text>
|
|
266
|
+
</span>
|
|
267
|
+
<div class="hidden-picker">
|
|
268
|
+
<cdtr-colorpicker-editor
|
|
269
|
+
id="picker-${e}"
|
|
270
|
+
.hasAlpha=${!1}
|
|
271
|
+
.allowGradient=${!0===t.allowGradient}
|
|
272
|
+
@change=${t.onChange}
|
|
273
|
+
.value=${t.value}
|
|
274
|
+
text="${t.title}"
|
|
275
|
+
></cdtr-colorpicker-editor>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
`)}
|
|
279
|
+
</div>
|
|
280
|
+
`}}n.styles=[i.L,r.AH`
|
|
281
|
+
:host {
|
|
282
|
+
display: block;
|
|
283
|
+
direction: var(--direction-locale, ltr);
|
|
284
|
+
}
|
|
285
|
+
.grid {
|
|
286
|
+
display: grid;
|
|
287
|
+
grid-template-columns: 1fr 1fr;
|
|
288
|
+
gap: 6px;
|
|
289
|
+
}
|
|
290
|
+
.grid.single-col {
|
|
291
|
+
grid-template-columns: 1fr;
|
|
292
|
+
}
|
|
293
|
+
.swatch-item {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
gap: 8px;
|
|
297
|
+
padding: 8px 10px;
|
|
298
|
+
background: #f6f6f8;
|
|
299
|
+
border-radius: 8px;
|
|
300
|
+
cursor: pointer;
|
|
301
|
+
transition: background 0.15s ease;
|
|
302
|
+
min-width: 0;
|
|
303
|
+
overflow: hidden;
|
|
304
|
+
position: relative;
|
|
305
|
+
}
|
|
306
|
+
.swatch-item:hover {
|
|
307
|
+
background: #eeeff1;
|
|
308
|
+
}
|
|
309
|
+
.swatch-label {
|
|
310
|
+
font-size: 11px;
|
|
311
|
+
color: #555;
|
|
312
|
+
font-weight: 500;
|
|
313
|
+
line-height: 1;
|
|
314
|
+
white-space: nowrap;
|
|
315
|
+
overflow: hidden;
|
|
316
|
+
text-overflow: ellipsis;
|
|
317
|
+
min-width: 0;
|
|
318
|
+
flex: 1;
|
|
319
|
+
}
|
|
320
|
+
.hidden-picker {
|
|
321
|
+
position: absolute;
|
|
322
|
+
width: 1px;
|
|
323
|
+
height: 1px;
|
|
324
|
+
overflow: hidden;
|
|
325
|
+
clip: rect(0,0,0,0);
|
|
326
|
+
pointer-events: none;
|
|
327
|
+
}
|
|
328
|
+
`],n.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",n);const a=t=>r.qy`
|
|
329
|
+
<cdtr-color-swatch-group
|
|
330
|
+
.items=${t.items}
|
|
331
|
+
.columns=${t.columns||2}
|
|
332
|
+
></cdtr-color-swatch-group>
|
|
333
|
+
`},12258(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(40648);class n extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,i.Q)(this.persistKey,this.open)}render(){return r.qy`
|
|
334
|
+
<div class="section">
|
|
335
|
+
<div class="header" @click=${this.toggle}>
|
|
336
|
+
<span class="title"><lang-text text="${this.label}"></lang-text></span>
|
|
337
|
+
<svg class="chevron ${this.open?"open":""}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
338
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
339
|
+
</svg>
|
|
340
|
+
</div>
|
|
341
|
+
<div class="content ${this.open?"open":""}">
|
|
342
|
+
<div class="content-inner">
|
|
343
|
+
<slot></slot>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
`}}n.styles=r.AH`
|
|
348
|
+
:host {
|
|
349
|
+
display: block;
|
|
350
|
+
direction: var(--direction-locale, ltr);
|
|
351
|
+
--editor-container-inline-padding: 0;
|
|
352
|
+
}
|
|
353
|
+
.section {
|
|
354
|
+
border-bottom: 1px solid #eaeaee;
|
|
355
|
+
}
|
|
356
|
+
.header {
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
justify-content: space-between;
|
|
360
|
+
padding: 12px 16px;
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
user-select: none;
|
|
363
|
+
}
|
|
364
|
+
.title {
|
|
365
|
+
font-size: 12.5px;
|
|
366
|
+
font-weight: 600;
|
|
367
|
+
color: #222;
|
|
368
|
+
letter-spacing: 0.01em;
|
|
369
|
+
}
|
|
370
|
+
.chevron {
|
|
371
|
+
width: 16px;
|
|
372
|
+
height: 16px;
|
|
373
|
+
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
|
|
374
|
+
color: #ccc;
|
|
375
|
+
}
|
|
376
|
+
.header:hover .chevron {
|
|
377
|
+
color: #888;
|
|
378
|
+
}
|
|
379
|
+
.chevron.open {
|
|
380
|
+
transform: rotate(180deg);
|
|
381
|
+
}
|
|
382
|
+
.content {
|
|
383
|
+
overflow: hidden;
|
|
384
|
+
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
|
|
385
|
+
max-height: 0;
|
|
386
|
+
opacity: 0;
|
|
387
|
+
}
|
|
388
|
+
.content.open {
|
|
389
|
+
max-height: 1200px;
|
|
390
|
+
opacity: 1;
|
|
391
|
+
}
|
|
392
|
+
.content-inner {
|
|
393
|
+
padding: 0 16px 12px 16px;
|
|
394
|
+
}
|
|
395
|
+
`,n.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",n);const a=(t,e)=>r.qy`
|
|
396
|
+
<cdtr-editor-section
|
|
397
|
+
.label=${t.label}
|
|
398
|
+
.open=${!1!==t.open}
|
|
399
|
+
.persistKey=${t.persistKey||""}
|
|
400
|
+
>
|
|
401
|
+
${e}
|
|
402
|
+
</cdtr-editor-section>
|
|
403
|
+
`},40648(t,e,o){o.d(e,{Q:()=>a,i:()=>n});const r="cdtr:section-open";function i(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function n(t){if(!t)return;const e=i();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function a(t,e){if(!t)return;const o=i();o[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(o)}}}]);
|
|
Binary file
|