@creaditor/newsletter-starterkit 1.0.57 → 1.0.59
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 +1 -1
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +1 -544
- package/dist/1271.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/170.creaditor.bundle.js +1 -1
- package/dist/170.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/3521.creaditor.bundle.js +1 -1
- 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/380.creaditor.bundle.js +7 -5
- package/dist/380.creaditor.bundle.js.gz +0 -0
- package/dist/3847.creaditor.bundle.js +951 -21
- package/dist/3847.creaditor.bundle.js.gz +0 -0
- package/dist/5909.creaditor.bundle.js +6 -6
- package/dist/5909.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +1 -1
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/7238.creaditor.bundle.js +1 -1
- package/dist/7238.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +15 -1
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/7654.creaditor.bundle.js +1 -1
- package/dist/7654.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/8547.creaditor.bundle.js +3 -3
- package/dist/8547.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/9994.creaditor.bundle.js +1 -1
- package/dist/9994.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +511 -220
- 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
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5909],{65909(e,t,i){i.r(t),i.d(t,{NextButton:()=>
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5909],{65909(e,t,i){i.r(t),i.d(t,{NextButton:()=>b,PUBLISH_ERROR_EVENT:()=>g,PUBLISH_EVENT:()=>f});var o=i(59929),s=i(86319),r=i(93432),n=i(90090),a=i(86959),l=i(15604);const c=`${(0,a.Ay)()?"http://127.0.0.1:8000":"https://studio.creaditor.ai"}/api/seo-generate`;const d=o.qy`
|
|
2
2
|
<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16" aria-hidden="true">
|
|
3
3
|
<path
|
|
4
4
|
d="M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
@keyframes spin {
|
|
339
339
|
to { transform: rotate(360deg); }
|
|
340
340
|
}
|
|
341
|
-
`,p.properties={loading:{type:Boolean},title:{type:String},description:{type:String},keywordList:{type:Array},keywordDraft:{type:String},keywordsFocused:{type:Boolean},generatingField:{type:String}},customElements.define("cdtr-publish-seo",p);var h=i(65550);class
|
|
341
|
+
`,p.properties={loading:{type:Boolean},title:{type:String},description:{type:String},keywordList:{type:Array},keywordDraft:{type:String},keywordsFocused:{type:Boolean},generatingField:{type:String}},customElements.define("cdtr-publish-seo",p);var h=i(65550);class u extends o.WF{constructor(){super(),this.raf=0,this.dismissTimer=null,this.dismiss=()=>{this.isConnected&&this.remove()},this.copyLink=async()=>{if(this.url)try{await navigator.clipboard.writeText(this.url),this.copied=!0,setTimeout(()=>this.copied=!1,2e3)}catch{}},this.message="",this.sub="",this.url="",this.seoTitle="",this.seoDescription="",this.copied=!1}firstUpdated(){this.launchConfetti(),this.dismissTimer=setTimeout(()=>this.dismiss(),6500)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf),this.dismissTimer&&clearTimeout(this.dismissTimer)}t(e,t){return s.M.get("lang",e)||t}get direction(){const e=s.M.get("theme");return e?.direction||"rtl"}get host(){return this.url?this.url.replace(/^https?:\/\//,"").replace(/\/+$/,""):""}launchConfetti(){const e=this.renderRoot.querySelector("canvas");if(!e)return;const t=e.getContext("2d");if(!t)return;const i=window.devicePixelRatio||1,o=window.innerWidth,s=window.innerHeight;e.width=o*i,e.height=s*i,t.scale(i,i);const r=["#e94560","#1a1a2e","#f6c945","#2ec7a9","#4d7cfe","#ffffff"],n=o/2,a=.42*s,l=Math.min(220,Math.round(o/6)),c=Array.from({length:l},(e,t)=>{const i=2*Math.PI*t/l+t%3*.4,o=4+t%9;return{x:n,y:a,vx:Math.cos(i)*o,vy:Math.sin(i)*o-3,size:5+t%5,color:r[t%r.length],rot:t,vrot:(t%2?1:-1)*(.1+t%5*.03),life:1}}),d=performance.now(),p=e=>{const i=e-d;t.clearRect(0,0,o,s);let r=!1;for(const e of c)e.vy+=.16,e.x+=e.vx,e.y+=e.vy,e.rot+=e.vrot,i>2600*.55&&(e.life=Math.max(0,e.life-.02)),e.life>0&&e.y<s+40&&(r=!0),t.save(),t.globalAlpha=e.life,t.translate(e.x,e.y),t.rotate(e.rot),t.fillStyle=e.color,t.fillRect(-e.size/2,-e.size/2,e.size,.6*e.size),t.restore();r&&i<3e3?this.raf=requestAnimationFrame(p):t.clearRect(0,0,o,s)};this.raf=requestAnimationFrame(p)}renderPreview(){const e=this.host;if(!e)return o.s6;const t=(this.seoTitle||"").trim()||(this.seoDescription?"":e),i=(this.seoDescription||"").trim(),s=(t||e).charAt(0);return o.qy`
|
|
342
342
|
<div class="preview">
|
|
343
343
|
<p class="preview-caption">${this.t("search_preview_label","How your page will look on Google")}</p>
|
|
344
344
|
<div class="result-head">
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
</div>
|
|
378
378
|
`:o.s6}
|
|
379
379
|
</div>
|
|
380
|
-
`}}
|
|
380
|
+
`}}u.styles=o.AH`
|
|
381
381
|
:host {
|
|
382
382
|
position: fixed;
|
|
383
383
|
inset: 0;
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
width: 15px;
|
|
583
583
|
height: 15px;
|
|
584
584
|
}
|
|
585
|
-
`,
|
|
585
|
+
`,u.properties={message:{type:String},sub:{type:String},url:{type:String},seoTitle:{type:String},seoDescription:{type:String},copied:{type:Boolean}},customElements.define("cdtr-publish-success",u);const f="creaditor:publish",g="creaditor:publish-error";class b extends o.WF{constructor(){super(),this.channel="",this.isLoading=!1,this.isLocked=!1,this.lockTimer=null}connectedCallback(){super.connectedCallback(),this.onNextStep||(this.onNextStep=s.M.get("config","onNextStep")),this.channel||(this.channel=s.M.get("config","channel")||"")}disconnectedCallback(){super.disconnectedCallback(),this.clearTimers()}clearTimers(){this.lockTimer&&(clearTimeout(this.lockTimer),this.lockTimer=null)}async handleClick(){if(this.isLocked||this.isLoading)return;const e=!!s.M.get("config","access"),t="web"===this.channel,i=e&&t;let o=null;if(!t||(o=await p.open(),o)){this.isLoading=!0,this.isLocked=!0,this.lockTimer=setTimeout(()=>{this.clearTimers(),this.isLoading=!1,this.isLocked=!1},1e4);try{if(t){const e=this.showBuildingLoader();try{i&&o&&(await(0,n.YE)({seo:o}),await(0,n.bK)({})),"function"==typeof this.onNextStep&&await this.onNextStep({toHTML:r.FE,toJSON:r.U2,seo:o??void 0})}finally{e()}return this.emitPublished(i,o),void this.celebratePublish(o)}"function"==typeof this.onNextStep&&await this.onNextStep({toHTML:r.FE,toJSON:r.U2}),this.emitPublished(i,o)}catch(e){console.error("Error in publish/onNextStep:",e),this.emitPublishError(i,o,e),this.snackbar(s.M.get("lang","publishError")||"Publish failed")}finally{this.clearTimers(),this.isLoading=!1,this.isLocked=!1}}}snackbar(e){const t=s.M.get("commands");t?.snackbar?.(e)}showBuildingLoader(){const e=(0,h.A)();document.body.appendChild(e);let t=!1;return()=>{t||(t=!0,e.style.transition="opacity 300ms ease",e.style.opacity="0",e.style.pointerEvents="none",setTimeout(()=>e.remove(),320))}}siteUrl(){const e=s.M.get("app","domains"),t=e?.[0]?.name;if(t)return/^https?:\/\//.test(t)?t:`https://${t}`}emitPublished(e,t){const i={channel:this.channel,selfPublish:e,seo:t??void 0,url:this.siteUrl(),toHTML:r.FE,toJSON:r.U2};window.dispatchEvent(new CustomEvent(f,{detail:i}))}emitPublishError(e,t,i){const o={channel:this.channel,selfPublish:e,seo:t??void 0,error:i};window.dispatchEvent(new CustomEvent(g,{detail:o}))}celebratePublish(e){const t=document.createElement("cdtr-publish-success");e&&(t.seoTitle=e.title,t.seoDescription=e.description);const i=this.siteUrl();i&&(t.url=i),document.body.appendChild(t)}render(){const e=!!s.M.get("config","access");if(!(this.onNextStep||"web"===this.channel&&e))return null;const t="web"===this.channel?"publish":"next";return o.qy`
|
|
586
586
|
<paper-button
|
|
587
587
|
@click=${this.handleClick}
|
|
588
588
|
class="next-button"
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
</div>
|
|
597
597
|
`}
|
|
598
598
|
</paper-button>
|
|
599
|
-
`}}
|
|
599
|
+
`}}b.styles=o.AH`
|
|
600
600
|
:host {
|
|
601
601
|
display: block;
|
|
602
602
|
}
|
|
@@ -648,4 +648,4 @@
|
|
|
648
648
|
}
|
|
649
649
|
|
|
650
650
|
|
|
651
|
-
`,
|
|
651
|
+
`,b.properties={onNextStep:{type:Function},channel:{type:String},isLoading:{type:Boolean},isLocked:{type:Boolean},lockTimer:{type:Number}},customElements.define("cdtr-next-button",b)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,n){n.r(e),n.d(e,{EditorTabs:()=>l});var o=n(59929),s=n(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,n){n.r(e),n.d(e,{EditorTabs:()=>l});var o=n(59929),s=n(15604),i=n(86319),a=n(40648);n.e(7937).then(n.bind(n,67937));const r="cdtr-editor-tabs-hint-seen";class l extends o.WF{constructor(){super(),this.onConnected=this.onConnected.bind(this),this.onArrowNavigation=this.onArrowNavigation.bind(this),this.dismissHint=this.dismissHint.bind(this),this.scheduleSync=this.scheduleSync.bind(this),this.observeContent=this.observeContent.bind(this),this.toggleAllSections=this.toggleAllSections.bind(this),this.tabs=[],this.showHint=!1,this._sectionCount=0,this._allExpanded=!1}sectionElements(){const t=this.shadowRoot?.querySelector('slot[name="content"]');if(!t)return[];const e=[];for(const n of t.assignedElements({flatten:!0})){"CDTR-EDITOR-SECTION"===n.tagName&&e.push(n);for(const t of n.children)"CDTR-EDITOR-SECTION"===t.tagName&&e.push(t)}return e}syncSections(){const t=this.sectionElements();this._sectionCount=t.length,this._allExpanded=t.length>0&&t.every(t=>t.open)}observeContent(){this._contentObserver||(this._contentObserver=new MutationObserver(this.scheduleSync)),this._contentObserver.disconnect();const t=this.shadowRoot?.querySelector('slot[name="content"]');if(t){for(const e of t.assignedElements({flatten:!0}))this._contentObserver.observe(e,{childList:!0});this.scheduleSync()}}scheduleSync(){this._syncPending||(this._syncPending=!0,setTimeout(()=>{this._syncPending=!1,this.isConnected&&this.syncSections()},0))}toggleAllSections(){const t=!this._allExpanded;for(const e of this.sectionElements())e.open=t,(0,a.Q)(e.persistKey,t);this._allExpanded=t}hintAlreadySeen(){try{return"1"===localStorage.getItem(r)}catch(t){return!0}}dismissHint(){this.showHint=!1;try{localStorage.setItem(r,"1")}catch(t){}}onClickItem(t){let{target:e}=t;const n=this.value=e.value,o=[...this.tabs],s=o.findIndex(t=>t.text===n);-1!==s&&(o.forEach(t=>{t.selected=!1}),o[s].selected=!0),this.tabs=o,this.scheduleSync(),this.showHint&&this.dismissHint();const i=new UIEvent("tabChanged",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(i)}firstUpdated(){super.firstUpdated()}maybeShowHint(){this._hintChecked||this.tabs.length<=1||this.hintAlreadySeen()||(this._hintChecked=!0,setTimeout(()=>{this.isConnected&&!this.hintAlreadySeen()&&(this.showHint=!0)},700))}updated(){this.setAttribute("data-active-tab",this.value||""),this.maybeShowHint(),this.observeContent()}onConnected(t){let{name:e}=t;this.onClickItem({target:{value:e}})}onArrowNavigation(t){const{key:e,currentIcon:n}=t.detail,o=this.tabs.findIndex(t=>t.text===n);if(-1===o)return;let s=o;switch(e){case"ArrowUp":case"ArrowLeft":s=o>0?o-1:this.tabs.length-1;break;case"ArrowDown":case"ArrowRight":s=o<this.tabs.length-1?o+1:0;break;default:return}const i=this.tabs[s];i&&(this.onClickItem({target:{value:i.text}}),this.updateComplete.then(()=>{const t=this.shadowRoot.querySelector(`cdtr-editor-tab-item[icon="${i.text}"]`);t&&t.focus()}))}connectedCallback(){super.connectedCallback(),s.Ay.on("editor-tabs",this.onConnected),s.Ay.on("update",this.scheduleSync),s.Ay.on("select",this.scheduleSync)}disconnectedCallback(){super.disconnectedCallback(),s.Ay.off("editor-tabs",this.onConnected),s.Ay.off("update",this.scheduleSync),s.Ay.off("select",this.scheduleSync),this._contentObserver?.disconnect()}renderContent(){switch(this.value){case"animations":return n.e(3553).then(n.bind(n,3553)),o.qy`<cdtr-animations-editor>
|
|
2
2
|
<cdtr-block-loader></cdtr-block-loader
|
|
3
3
|
></cdtr-animations-editor>`;case"settings":case"setting":return n.e(7654).then(n.bind(n,37654)),o.qy`<cdtr-setting-editor>
|
|
4
4
|
<cdtr-block-loader></cdtr-block-loader
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7238],{97238(t,e,n){n.r(e),n.d(e,{TextEditorPlugin:()=>d});var i=n(59929),o=n(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7238],{97238(t,e,n){n.r(e),n.d(e,{TextEditorPlugin:()=>d});var i=n(59929),o=n(15604),r=n(40120),s=n(86319),c=n(75068),a=n.n(c),l=n(18057);class d extends i.WF{constructor(){super(),this.setHeading=t=>{this.editors.forEach(e=>{e.chain().setHeading({level:t}).run()})},this.onchangeFontFamily=t=>{const e=t.target.value,n=this.fontFamilies.find(t=>t.name===e);n?(this.editors.forEach(t=>{const e=t.view.state.selection;e.from===e.to?t.chain().selectAll().setFontFamily(n).run():t.chain().setFontFamily(n).run()}),this.fontFamily=e):console.error("cant set font family, font family not founded..")},this.fontSizeDebouncer=new l.A,this.onChangeFontSize=t=>{const e=t.target.device;this.device=e;const n=t.target.value;"phone"===e?this.fontSizeDebouncer.run(()=>{o.Ay.execCommand("breakpoints",t=>{const e=t.props.breakpoints?.sm||{};return{sm:a()({},e,{style:{fontSize:n+"px"}})}})}):this.editors.forEach(t=>{const e=t.view.state.selection;e.from===e.to?t.chain().selectAll().setFontSize(n).run():t.chain().setFontSize(n).run()}),this.fontSize=n},this.onChangeLineHeight=t=>{const e=parseFloat(t.target.value);this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setLineHeight(e).run():t.chain().setLineHeight(e).run()}),this.lineHeight=e},this.onChangeletterSpace=t=>{const e=t.target.value+"px";this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setLetterSpacing(e).run():t.chain().setLetterSpacing(e).run()}),this.letterSpacing=e},this.onChangeImage=t=>{},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.onChangeFontColor=t=>{const e=t.target.value;this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setColor(e).run():t.chain().setColor(e).run()}),this.fontColor=e},this.editors=[],this.hasTextComponent=!0,this.filteredFonts=[],this.fontFamilies=[],this.onConnect=this.onConnect.bind(this),this.THEMES=[{type:"paragraph",onClick:()=>{this.editors.forEach(t=>{t.chain().setParagraph().run()})}},{type:"h1",onClick:()=>this.setHeading(1)},{type:"h2",onClick:()=>this.setHeading(2)},{type:"h3",onClick:()=>this.setHeading(3)},{type:"h4",onClick:()=>this.setHeading(4)},{type:"h5",onClick:()=>this.setHeading(5)},{type:"h5",onClick:()=>this.setHeading(5)}]}onConnect(){setTimeout(()=>{this.editors=[];const t=o.Ay.getSelectedComponent({find:"text"});if(this.hasTextComponent=t.length>0,t.forEach(t=>{"text"===t.type&&this.editors.push(t.editor)}),this.editors.length>0){const e=this.editors[0];if(e){const n={...e.getAttributes("paragraph"),...e.getAttributes("heading")};"phone"===this.device?this.fontSize=parseInt(t[0].props?.breakpoints?.sm?.style?.fontSize):this.fontSize=parseInt(e.getAttributes("textStyle").fontSize)||16,this.fontColor=e.getAttributes("textStyle").color||"#000",this.fontFamily=e.getAttributes("textStyle").fontFamily?.split(",")[0].replace(/['"]+/g,"")||"Arial",n.lineHeight&&(this.lineHeight=parseFloat(n.lineHeight)),n.letterSpacing&&(this.letterSpacing=parseInt(n.letterSpacing)||1),this.themeType=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":e.isActive("heading",{level:4})?"h4":e.isActive("heading",{level:5})?"h5":e.isActive("heading",{level:6})?"h6":"paragraph"}}},0)}connectedCallback(){super.connectedCallback(),o.Ay.on("select",this.onConnect),o.Ay.on("update",this.onConnect),this.onConnect(),(0,r.VH)().then(t=>{this.filteredFonts=this.fontFamilies=t})}disconnectedCallback(){super.disconnectedCallback(),o.Ay.off("select",this.onConnect),o.Ay.off("update",this.onConnect)}render(){const t=i.qy`
|
|
2
2
|
<cdtr-editor-container>
|
|
3
3
|
<cdtr-title style="color:var(--micro-info-color)">
|
|
4
4
|
<i>
|
|
Binary file
|
|
@@ -31,4 +31,18 @@
|
|
|
31
31
|
`)}
|
|
32
32
|
</div>
|
|
33
33
|
</cdtr-editor-container>
|
|
34
|
-
`}}];return[{type:"heading",level:6,text:"text",active:()=>"style"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"style"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,o.w)(t.props.style.color,r);n.execCommand("style",{color:e})}n.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{n.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:c.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:u,selected:p,items:d,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...g]}}}},i=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,o()||n.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var s=n(72591),c=n.n(s),d=n(88639),p=n.n(d),u=n(88128),g=n.n(u),m=n(30855),b=n.n(m),h=n(93051),y=n.n(h),x=n(49536),A={};A.setAttributes=b(),A.insert=g().bind(null,"head"),A.domAPI=p(),A.insertStyleElement=y();c()(x.A,A);const f=x.A&&x.A.locals?x.A.locals:void 0;var C=n(81318),v=n(1366);const w=C.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,C.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var k=n(85194),E=n(28396);const B=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const S=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:r}=t,{arrayToString:l,mergeDiff:s}=r;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:u}=function(e){let{content:t,element:n}=e;return{element:n,editor:new C.KE({element:n,extensions:[v.A,w,E.A,k.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);return u.view.dom.setAttribute("dir","auto"),u.on("update",e=>{let{editor:t}=e;const n=t.getText();o.editor.store().updateComponent(o,"text",n)}),u.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),u.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=f.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{u.commands.insertContent(e),u.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,r=o.props.iconSize,l="icon_in_button";let a=d.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","left"===n?d.insertBefore(a,d.firstChild):d.appendChild(a)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,handleBar:!0,validator:i({template:d,helpers:r,editor:u,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{u.destroy()},remove:()=>{d.remove()},createEditor:a})}}}},49536(e,t,n){n.d(t,{A:()=>i});var o=n(82001),r=n.n(o),l=n(40935),a=n.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a}}]);
|
|
34
|
+
`}}];return[{type:"heading",level:6,text:"text",active:()=>"style"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"style"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"custom",active:()=>"style"===a.text,node:()=>l.qy`
|
|
35
|
+
<cdtr-editor-container pt="0">
|
|
36
|
+
<div style="padding:0 16px;">
|
|
37
|
+
<button
|
|
38
|
+
type="button"
|
|
39
|
+
@click=${()=>i("interactions")}
|
|
40
|
+
style="background:none;border:none;padding:0;cursor:pointer;font-size:11px;line-height:1.4;text-decoration:underline;color:var(--color-primary, #6366f1);"
|
|
41
|
+
>
|
|
42
|
+
<lang-text
|
|
43
|
+
text="${t.props.onClick?.link?"edit_link":"add_link"}"
|
|
44
|
+
></lang-text>
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
</cdtr-editor-container>
|
|
48
|
+
`},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,o.w)(t.props.style.color,r);n.execCommand("style",{color:e})}n.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"slider",title:"height",min:20,max:300,active:()=>"style"===a.text,value:parseInt(t.props.style.height)||(()=>{const e=document.querySelector(`[data-id="${t.id}"]`);return e&&Math.round(e.getBoundingClientRect().height)||40})(),sizes:[{name:r.M.get("lang","auto")||"auto",value:"auto"}],onInput:e=>{const t=e.target.value;n.execCommand("style",{height:"auto"===t?"auto":parseInt(t)+"px"})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{n.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:c.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:u,selected:p,items:d,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...g]}}}},i=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,o()||n.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var s=n(72591),c=n.n(s),d=n(88639),p=n.n(d),u=n(88128),g=n.n(u),m=n(30855),y=n.n(m),h=n(93051),x=n.n(h),b=n(49536),A={};A.setAttributes=y(),A.insert=g().bind(null,"head"),A.domAPI=p(),A.insertStyleElement=x();c()(b.A,A);const f=b.A&&b.A.locals?b.A.locals:void 0;var C=n(81318),v=n(1366);const w=C.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,C.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var k=n(85194),E=n(28396);const B=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const S=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:r}=t,{arrayToString:l,mergeDiff:s}=r;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:u}=function(e){let{content:t,element:n}=e;return{element:n,editor:new C.KE({element:n,extensions:[v.A,w,E.A,k.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);return u.view.dom.setAttribute("dir","auto"),u.on("update",e=>{let{editor:t}=e;const n=t.getText();o.editor.store().updateComponent(o,"text",n)}),u.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),u.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=f.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{u.commands.insertContent(e),u.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style});const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,r=o.props.iconSize,l="icon_in_button";let a=d.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","left"===n?d.insertBefore(a,d.firstChild):d.appendChild(a)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,resizeAxis:"xy",handleBar:!0,validator:i({template:d,helpers:r,editor:u,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{u.destroy()},remove:()=>{d.remove()},createEditor:a})}}}},49536(e,t,n){n.d(t,{A:()=>i});var o=n(82001),r=n.n(o),l=n(40935),a=n.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a}}]);
|
|
Binary file
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
>
|
|
92
92
|
${t}
|
|
93
93
|
</cdtr-editor-section>
|
|
94
|
-
`},37654(e,t,o){o.r(t),o.d(t,{SettingEditor:()=>c});var n=o(59929),r=o(86319),s=o(
|
|
94
|
+
`},37654(e,t,o){o.r(t),o.d(t,{SettingEditor:()=>c});var n=o(59929),r=o(86319),s=o(15604);o(12258);const a=n.JW`<path d="M4 16H20V5H4V16ZM13 18V20H17V22H7V20H11V18H2.99C2.44 18 2 17.55 2 17V4.01C2 3.45 2.46 3 2.99 3H21.01C21.56 3 22 3.45 22 4.01V17C22 17.55 21.54 18 21.01 18H13Z"/>`,i=n.JW`<path d="M4 6H20V18H4V6ZM2 5C2 4.45 2.45 4 3 4H21C21.55 4 22 4.45 22 5V19C22 19.55 21.55 20 21 20H3C2.45 20 2 19.55 2 19V5ZM17 11C17 11.55 17.45 12 18 12C18.55 12 19 11.55 19 11C19 10.45 18.55 10 18 10C17.45 10 17 10.45 17 11Z"/>`,l=n.JW`<path d="M7 4V20H17V4H7ZM6 2H18C18.55 2 19 2.45 19 3V21C19 21.55 18.55 22 18 22H6C5.45 22 5 21.55 5 21V3C5 2.45 5.45 2 6 2ZM12 17C12.55 17 13 17.45 13 18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18C11 17.45 11.45 17 12 17Z"/>`;class c extends n.WF{constructor(){super(),this.onInspect=this.onInspect.bind(this),this.name="",this.element_ID=" ",this.cmds={onToggleDisplayMode:(e,t)=>{s.Ay.store().execCommand(`show_on_${e}`,t),this[`show_on_${e}`]=t},onChangeElementID(e){s.Ay.store().execCommand("element_ID",e.target.value)},onChangeName(e){s.Ay.store().execCommand("name",e.target.value)}}}onInspect(){if(s.Ay.components.length>0){const e=s.Ay.components[0].props;this.show_on_desktop=!!e.show_on_desktop,this.show_on_tablet=!!e.show_on_tablet,this.show_on_mobile=!!e.show_on_mobile,this.name=e.name||"",this.element_ID=e.element_ID||""}}connectedCallback(){super.connectedCallback(),s.Ay.on("select",this.onInspect),s.Ay.on("update",this.onInspect),this.onInspect()}disconnectedCallback(){super.disconnectedCallback(),s.Ay.off("select",this.onInspect),s.Ay.off("update",this.onInspect)}renderCheck(){return n.qy`<svg class="check" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
95
95
|
<circle cx="12" cy="12" r="12" fill="currentColor"></circle>
|
|
96
96
|
<path d="M7 12.5l3.2 3.2L17 9" stroke="#fff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
97
97
|
</svg>`}render(){const e=s.Ay.getSelectedComponent();if(!e||0===e.length)return n.qy``;const t="block"===e[0].type,o="web"===r.M.get("config","channel")||t;return n.qy`
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8516],{8516(t,e,n){n.r(e),n.d(e,{RadiusEditorPlugin:()=>d});var r=n(59929),s=n(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8516],{8516(t,e,n){n.r(e),n.d(e,{RadiusEditorPlugin:()=>d});var r=n(59929),s=n(15604);class d extends r.WF{constructor(){super(),this.onConnect=this.onConnect.bind(this)}onConnect(){const t=s.Ay.getSelectedComponent();if(t.length>0){const e=t[0],n=e.props?.style?.borderRadius;this.radius=parseInt(n)||0}}onChangeRadius(t){const e=t.target.value;s.Ay.execCommand("style",{borderRadius:e+"px"})}connectedCallback(){super.connectedCallback(),s.Ay.on("update",this.onConnect),this.onConnect()}disconnectedCallback(){super.disconnectedCallback(),s.Ay.off("update",this.onConnect)}render(){return r.qy`
|
|
2
2
|
<cdtr-row mt="1">
|
|
3
3
|
<cdtr-title><lang-text text="radius"></lang-text></cdtr-title>
|
|
4
4
|
</cdtr-row>
|
|
Binary file
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
>
|
|
340
340
|
${e}
|
|
341
341
|
</cdtr-editor-section>
|
|
342
|
-
`},88547(t,e,a){a.r(e),a.d(e,{EditorBuilder:()=>lt});var r=a(59929),o=a(86319),i=a(32325),s=a(50220),n=a(
|
|
342
|
+
`},88547(t,e,a){a.r(e),a.d(e,{EditorBuilder:()=>lt});var r=a(59929),o=a(86319),i=a(32325),s=a(50220),n=a(15604);a(92384);const l=t=>r.qy`<cdtr-font-family-editor
|
|
343
343
|
.name=${t.value}
|
|
344
344
|
.showWeight=${!0===t.weight}
|
|
345
345
|
.weight=${t.weightValue}
|
|
@@ -709,7 +709,7 @@
|
|
|
709
709
|
@change=${t.onChange}
|
|
710
710
|
.value="${t.value}"
|
|
711
711
|
></cdtr-datetimepicker>
|
|
712
|
-
</cdtr-editor-container>`,N=t=>{let e="";return t.bgColor&&(e+=`background:${t.bgColor};`),t.color&&(e+=`color:${t.color};`),r.qy` <cdtr-editor-container>
|
|
712
|
+
</cdtr-editor-container>`,N=t=>{let e="";return t.bgColor&&(e+=`background:${t.bgColor};`),t.color&&(e+=`color:${t.color};`),t.fontSize&&(e+=`font-size:${t.fontSize};`),r.qy` <cdtr-editor-container>
|
|
713
713
|
<paper-button fullwidth style=${e} @click=${t.onClick}
|
|
714
714
|
><lang-text text="${t.text}"></lang-text>${t.icon?r.qy`${" "}<cdtr-icon
|
|
715
715
|
style="margin-right:5px;display:block;font-size:12px;"
|
|
@@ -1267,4 +1267,4 @@
|
|
|
1267
1267
|
background: rgba(16, 24, 40, 0.055) !important;
|
|
1268
1268
|
color: #14171f;
|
|
1269
1269
|
}
|
|
1270
|
-
`,customElements.define("cdtr-font-family-editor",n)},13681(t,e,a){a.d(e,{vP:()=>d});const r=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=r,window[r]||(window[r]={});const o=window[r],i=window.__cdtrEvents||{};function s(t){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then(t=>Array.from(new Uint8Array(t)).map(t=>t.toString(16).padStart(2,"0")).join(""))}function n(t){if(t.length%2!=0)throw new Error("Invalid hex string");const e=new Uint8Array(t.length/2);for(let a=0;a<t.length;a+=2)e[a/2]=parseInt(t.substr(a,2),16);return e}async function l(t){const e=await s(t),a=o[e];if(a){const t=await crypto.subtle.importKey("raw",n(e),{name:"AES-GCM"},!1,["encrypt","decrypt"]),r=await async function(t,e,a){const r=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,a);return(new TextDecoder).decode(r)}(t,a.iv,a.encrypted);return JSON.parse(r)}return null}function c(t,e){if(i[t])for(const a in i[t])Object.prototype.hasOwnProperty.call(i[t],a)&&i[t][a].forEach(t=>t(e));Array.isArray(i["*"])&&i["*"].forEach(t=>t(e))}window.__cdtrEvents=i;const d={set:async function(t,e){const a=JSON.parse(JSON.stringify(e)),r=await s(t),l=await crypto.subtle.importKey("raw",n(r),{name:"AES-GCM"},!1,["encrypt","decrypt"]),d=await async function(t,e){const a=crypto.getRandomValues(new Uint8Array(12)),r=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"AES-GCM",iv:a},t,r);return{iv:a,encrypted:new Uint8Array(o)}}(l,JSON.stringify(a));o[r]=d,i.set&&i.set[r]&&i.set[r].forEach(t=>t(a)),Array.isArray(i["*"])&&i["*"].forEach(t=>t(a)),c(t,a)},get:l,remove:async function(t){const e=await s(t);delete o[e]},on:async function(t,e,a){i[t]||(i[t]={});const r=await s(e);i[t][r]||(i[t][r]=[]),i[t][r].push(t=>{!function(){const t=(new Error).stack;if(t&&t.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),a(t)});const o=await l(e);return o&&a(o),r},off:function(t,e){i[t]&&i[t][e]&&delete i[t][e]},dispatch:c,OPTIONS:{SET:"set"}}},88385(t,e,a){a.d(e,{A:()=>n});const r=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function i(t){const e={},a=/([^&=]+)=?([^&]*)/g,r=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let i,s=-1!==o?t.substring(o+1):"";for(;null!==(i=a.exec(s));){const t=r(i[1]),a=r(i[2]);t&&(e[t]=a)}return e}function s(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class n{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...i(t)};const a=t.indexOf("?");return this.url=a>-1?t.slice(0,a):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol
|
|
1270
|
+
`,customElements.define("cdtr-font-family-editor",n)},13681(t,e,a){a.d(e,{vP:()=>d});const r=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=r,window[r]||(window[r]={});const o=window[r],i=window.__cdtrEvents||{};function s(t){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then(t=>Array.from(new Uint8Array(t)).map(t=>t.toString(16).padStart(2,"0")).join(""))}function n(t){if(t.length%2!=0)throw new Error("Invalid hex string");const e=new Uint8Array(t.length/2);for(let a=0;a<t.length;a+=2)e[a/2]=parseInt(t.substr(a,2),16);return e}async function l(t){const e=await s(t),a=o[e];if(a){const t=await crypto.subtle.importKey("raw",n(e),{name:"AES-GCM"},!1,["encrypt","decrypt"]),r=await async function(t,e,a){const r=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,a);return(new TextDecoder).decode(r)}(t,a.iv,a.encrypted);return JSON.parse(r)}return null}function c(t,e){if(i[t])for(const a in i[t])Object.prototype.hasOwnProperty.call(i[t],a)&&i[t][a].forEach(t=>t(e));Array.isArray(i["*"])&&i["*"].forEach(t=>t(e))}window.__cdtrEvents=i;const d={set:async function(t,e){const a=JSON.parse(JSON.stringify(e)),r=await s(t),l=await crypto.subtle.importKey("raw",n(r),{name:"AES-GCM"},!1,["encrypt","decrypt"]),d=await async function(t,e){const a=crypto.getRandomValues(new Uint8Array(12)),r=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"AES-GCM",iv:a},t,r);return{iv:a,encrypted:new Uint8Array(o)}}(l,JSON.stringify(a));o[r]=d,i.set&&i.set[r]&&i.set[r].forEach(t=>t(a)),Array.isArray(i["*"])&&i["*"].forEach(t=>t(a)),c(t,a)},get:l,remove:async function(t){const e=await s(t);delete o[e]},on:async function(t,e,a){i[t]||(i[t]={});const r=await s(e);i[t][r]||(i[t][r]=[]),i[t][r].push(t=>{!function(){const t=(new Error).stack;if(t&&t.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),a(t)});const o=await l(e);return o&&a(o),r},off:function(t,e){i[t]&&i[t][e]&&delete i[t][e]},dispatch:c,OPTIONS:{SET:"set"}}},88385(t,e,a){a.d(e,{A:()=>n});const r=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function i(t){const e={},a=/([^&=]+)=?([^&]*)/g,r=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let i,s=-1!==o?t.substring(o+1):"";for(;null!==(i=a.exec(s));){const t=r(i[1]),a=r(i[2]);t&&(e[t]=a)}return e}function s(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class n{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...i(t)};const a=t.indexOf("?");return this.url=a>-1?t.slice(0,a):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol||this.protocol||n.getProtocol(this.href);const a=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=r(a),this.isPhone=o(a),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...i(this.href)},this.url=s(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams(),this.isAnchor="anchor:"===this.protocol||this.href.startsWith("#")}addParam(t,e){this.params[t]=e,this.href=this.getUrlWithParams()}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const a in this.params){const r=this.params[a],o=encodeURIComponent(a).replace(/%24/g,"$");if(r){const a=encodeURIComponent(r).replace(/%24/g,"$");t+=`${o}=${a}&`,e+=`${o}=${a}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const a=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return a(this.protocol+"//"+t);if(this.isAnchor||"anchor:"===this.protocol)return t?a(t.startsWith("#")?t:`#${t}`):"";if("whatsapp:"===this.protocol){const r=this.extractPhoneFromTextUsingRegex(t);return r.length>0?a("https://wa.me/"+r[0]+e):a("https://wa.me/"+e)}return a(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}n.resetURL=s}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9041],{19041(t,e,n){n.r(e),n.d(e,{ElementHandleBar:()=>p});var o=n(59929),i=n(86319),a=n(21421),r=n(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9041],{19041(t,e,n){n.r(e),n.d(e,{ElementHandleBar:()=>p});var o=n(59929),i=n(86319),a=n(21421),r=n(15604),s=n(89531),c=n(83965),l=n(67549);const d=r.Ay;s.A,c.i,l.s;class p extends o.WF{constructor(){super(),this.animations=[],this.elementRef=(0,a._)(),this.canDisplayBar=!0;const t=i.M.get("config","editor","configure","editorProps");this.canDisplayBar=!t||!1!==t?.actionBar,this.selected=!1,this.connectWith=this.connectWith.bind(this),this.onRemove=this.onRemove.bind(this)}cloneElement(){let t,e=d.getComponent(this.for);const n=e?.closest("col");let o=0;n&&(o=n.children.length);const i="card"===e?.type||o<2?e.closest("col"):null;if(i&&(e=i),e&&(t=e.parent(),t)){let n=t.children.findIndex(t=>t===e.id);"col"===e.type&&(n+=1),"number"==typeof n&&d.cloneComponent({componentId:e.id,index:n,parentId:t.id})}}onRemove(){const t=i.M.get("components",this.for),e=t?.commands?.remove??t?.remove;"function"==typeof e&&e()}connectWith(){if(this.selected=!1,this.for){const t=d.components.find(t=>t.id===this.for);if(t){const e=t;if("function"!=typeof e.closest)return;const n=e.closest("col");n&&(n.element.getBoundingClientRect(),e.element.getBoundingClientRect());const o=e.closest("card");if(o&&this.elementRef.value){const t=o.element.getBoundingClientRect(),n=e.element.getBoundingClientRect();if(parseInt(String(t.top))>=parseInt(String(n.top))-40){let e=0;t.right>n.right?e=t.right-n.right-100+"px":t.left<n.left&&(e=t.left-n.left+20+"px"),n.left+parseInt(String(e))<t.left&&(e=0),this.elementRef.value.style.transform=`translate(${e},${n.height+10}px)`}else this.elementRef.value.style.transform=""}else this.elementRef.value&&(this.elementRef.value.style.transform="");this.selected=!!e.element?.closest("[draggable-element]");const a=e.props;this.animations=a.interactions?.filter(t=>"animation"===t.type)??[],this.hasAnimations=this.animations.length>0,this.name=a.name||i.M.get("lang",e.type)}}}justifyContent(t){d.store().execCommand("justify",t,{find:"col"})}connectedCallback(){super.connectedCallback(),d.on("select",this.connectWith),d.on("update",this.connectWith),this.classList.add("ignore-cdtr-blur")}disconnectedCallback(){super.disconnectedCallback(),d.off("select",this.connectWith),d.off("update",this.connectWith)}render(){return this.style.display=this.selected?"":"none",o.qy`<cdtr-row
|
|
2
2
|
${(0,a.K)(this.elementRef)}
|
|
3
3
|
class="bar"
|
|
4
4
|
alignItems="center"
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9994],{19994(p,x,r){r.r(x),r.d(x,{BoxShadowEditor:()=>m});var e=r(59088),t=r(36936),a=r(59929),o=r(49410),i=r(86319);const d=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}];function l(p){try{return function(p){const x=p.split(/ (?![^(]*\))/);let r="",e=0,t=0,a=0,o=0,i=!1;for(let p of x)p=p.trim(),"inset"===p?i=!0:p.endsWith("px")||p.endsWith("em")?0===t?t=parseFloat(p):0===e?e=parseFloat(p):0===a?a=parseFloat(p):0===o&&(o=parseFloat(p)):(p.includes("rgb")||p.includes("#"))&&(r=p);return[{color:r,offsetY:e,offsetX:t,blurRadius:a,spreadRadius:o,inset:i}]}(p)}catch(p){console.error(p)}}var s,n,b,g,u,c;const h=r(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9994],{19994(p,x,r){r.r(x),r.d(x,{BoxShadowEditor:()=>m});var e=r(59088),t=r(36936),a=r(59929),o=r(49410),i=r(86319);const d=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}];function l(p){try{return function(p){const x=p.split(/ (?![^(]*\))/);let r="",e=0,t=0,a=0,o=0,i=!1;for(let p of x)p=p.trim(),"inset"===p?i=!0:p.endsWith("px")||p.endsWith("em")?0===t?t=parseFloat(p):0===e?e=parseFloat(p):0===a?a=parseFloat(p):0===o&&(o=parseFloat(p)):(p.includes("rgb")||p.includes("#"))&&(r=p);return[{color:r,offsetY:e,offsetX:t,blurRadius:a,spreadRadius:o,inset:i}]}(p)}catch(p){console.error(p)}}var s,n,b,g,u,c;const h=r(15604).Ay,w="#000 0px 0px 0px 0px",f={};let m=(s=(0,o.MZ)({type:String}),n=(0,o.MZ)({type:String}),(c=class extends a.WF{constructor(){super(),(0,e.A)(this,"value",g,this),(0,e.A)(this,"boxShadow",u,this),this.tabName=void 0,this.theme=void 0,this.onChangeBoxShadow=(p,x)=>{const r={color:f.color,offsetY:f.offsetY,offsetX:f.offsetX,blurRadius:f.blurRadius,spreadRadius:f.spreadRadius,inset:!!f.inset};if(void 0!==r[p]&&("string"==typeof x||"number"==typeof x||"boolean"==typeof x)){r[p]=x,f[p]=x;const e=`${r.offsetX}px ${r.offsetY}px ${r.blurRadius}px ${r.spreadRadius}px ${r.color} ${r.inset?"inset":""}`;this.changeBoxShadowValue(e)}},this.tabName="design",this.theme=i.M.get("theme"),this.removeBoxShadow=this.removeBoxShadow.bind(this),this.onChangeBoxShadow=this.onChangeBoxShadow.bind(this)}changeBoxShadowValue(p){h.store().execCommand("style",{boxShadow:p}),this.boxShadow=this.value=p}removeBoxShadow(){h.store().execCommand("style",{boxShadow:w}),this.boxShadow=this.value=w}connectedCallback(){super.connectedCallback(),r.e(1456).then(r.bind(r,11456)),r.e(5666).then(r.bind(r,35666))}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}changeTab(p){this.tabName=p.target.value}render(){if(void 0===this.value||this.value!==this.boxShadow){this.value||(this.value=w),this.boxShadow=this.value;const p=l(this.value);Array.isArray(p)&&p.length>0?(f.offsetX=p[0].offsetX,f.offsetY=p[0].offsetY,f.blurRadius=p[0].blurRadius,f.spreadRadius=p[0].spreadRadius,f.color=p[0].color,f.inset=p[0].inset):(f.offsetX=0,f.offsetY=0,f.blurRadius=0,f.spreadRadius=0,f.color="#000",f.inset=void 0)}return a.qy`
|
|
2
2
|
<cdtr-editor-container>
|
|
3
3
|
<cdtr-row alignItems="center" justify="space-between">
|
|
4
4
|
<cdtr-col>
|
|
Binary file
|