@creaditor/newsletter-starterkit 1.0.53 → 1.0.54
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 +260 -128
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +1 -1
- 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/1565.creaditor.bundle.js +276 -77
- package/dist/1565.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/453.creaditor.bundle.js +1 -1
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +141 -108
- 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 +125 -36
- package/dist/5340.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/7937.creaditor.bundle.js +63 -115
- package/dist/7937.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/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 +1780 -608
- 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([[7238],{97238(t,e,n){n.r(e),n.d(e,{TextEditorPlugin:()=>
|
|
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(36565),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>
|
|
@@ -124,8 +124,8 @@
|
|
|
124
124
|
min="8"
|
|
125
125
|
></cdtr-range-device-editor>
|
|
126
126
|
</cdtr-editor-container>
|
|
127
|
-
`;return this.hasTextComponent?i.qy`${t} `:null}}
|
|
127
|
+
`;return this.hasTextComponent?i.qy`${t} `:null}}d.properties={themeType:{type:String},fontFamily:{type:String},fontSize:{type:Number},fontColor:{type:String},lineHeight:{type:Number},letterSpacing:{type:Number},fontFamilies:{type:Array},filteredFonts:{type:Array},hasTextComponent:{type:Boolean},accordion:{type:Boolean},isOpen:{type:Boolean},device:{type:String}},d.styles=i.AH`
|
|
128
128
|
.dropdown-button {
|
|
129
129
|
min-width: 100px;
|
|
130
130
|
}
|
|
131
|
-
`,customElements.define("cdtr-text-editor-plugin",
|
|
131
|
+
`,customElements.define("cdtr-text-editor-plugin",d)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[752],{40752(t,e
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[752],{40752(t,i,e){e.r(i),e.d(i,{EditorContainer:()=>a});var n=e(59929);class a extends n.WF{constructor(){super(),this.pt="10px",this.isAnimate=!0}render(){return n.qy`<div
|
|
2
2
|
style="padding-top:${this.pt}"
|
|
3
3
|
class="container ${this.isAnimate?"animate":""}"
|
|
4
4
|
>
|
|
@@ -11,16 +11,12 @@
|
|
|
11
11
|
:host *{
|
|
12
12
|
direction: var(--direction-locale);
|
|
13
13
|
}
|
|
14
|
-
.container:hover {
|
|
15
|
-
background: #9c9c9c0b;
|
|
16
|
-
}
|
|
17
14
|
.container {
|
|
18
|
-
padding-
|
|
19
|
-
padding-right: 15px;
|
|
15
|
+
padding-inline: var(--editor-container-inline-padding, 16px);
|
|
20
16
|
display: block;
|
|
21
17
|
width: 100%;
|
|
22
18
|
min-height: 20px;
|
|
23
|
-
padding-bottom:
|
|
19
|
+
padding-bottom: 8px;
|
|
24
20
|
box-sizing: border-box;
|
|
25
21
|
}
|
|
26
22
|
.animate {
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[763],{10763(e,t,n){n.d(t,{default:()=>B});var o=n(96374);const i=e=>{{const{component:t,commands:n,helpers:i}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"design",selected:!0},{text:"link"},{text:"icons"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:i,changeTab:r,tabs:a}=e;return[{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"design"===i.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"divider",active:()=>"design"===i.text},{type:"divider",active:()=>"design"===i.text},{type:"typography",active:()=>"design"===i.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 i="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:i})}}},{type:"divider",active:()=>"design"===i.text},{type:"fontFamily",active:()=>"design"===i.text,value:t.props.style.fontFamily,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})}},{type:"divider",active:()=>"design"===i.text},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"design"===i.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"divider",active:()=>"design"===i.text},{type:"slider",title:"width",min:10,max:500,active:()=>"design"===i.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"divider",active:()=>"design"===i.text},{type:"colorpicker",alpha:!1,title:"button_background",active:()=>"design"===i.text,value:t.props.style.background,onChange:e=>{const i=e.target.value,r=(0,o.w)(t.props.style.color,i);n.execCommand("style",{color:r}),n.execCommand("style",{background:i,backgroundColor:null})}},{type:"divider",active:()=>"design"===i.text},{type:"colorpicker",title:"font_color",alpha:!1,active:()=>"design"===i.text,value:t.props.style.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{type:"divider",active:()=>"design"===i.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"design"===i.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"divider",active:()=>"design"===i.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===i.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"icons"===i.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"icons"===i.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:()=>"icons"===i.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"icons"===i.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"divider",active:()=>"design"===i.text},{type:"borderpicker",title:"border",active:()=>"design"===i.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"design"===i.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"design"===i.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"divider",active:()=>"design"===i.text},{type:"spacingPicker",active:()=>"design"===i.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,i=e.target.leftValue,r=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:i+"px",paddingRight:r+"px",padding:null})}}]}}}},r=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,i,r)=>{switch(i){case"style":return e[i]=t.deepMerge(e[i],r),!0;case"text":return e.text=r,o()||n.chain().setContent(r).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":return e[i]=r,!0;case"onClick":if(r.link)return e[i]=r,!0}}}};var a=n(72591),s=n.n(a),l=n(88639),c=n.n(l),d=n(88128),p=n.n(d),u=n(30855),m=n.n(u),g=n(93051),A=n.n(g),h=n(49536),y={};y.setAttributes=m(),y.insert=p().bind(null,"head"),y.domAPI=c(),y.insertStyleElement=A();s()(h.A,y);const x=h.A&&h.A.locals?h.A.locals:void 0;var C=n(81318),v=n(1366);const b=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 f=n(85194),E=n(28396);const k=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const B=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:a}=t,{arrayToString:s,mergeDiff:l}=a;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,b,E.A,f.Ay,k],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=x.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)}l(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,i=o.props.iconSize,r="icon_in_button";let a=d.querySelector(`.${r}`)||document.createElement("img");e&&t?(a.className=r,a.src=t,a.style.width=(i||16)+"px",a.style.height=(i||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:r({template:d,helpers:a,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:i})}}}},49536(e,t,n){n.d(t,{A:()=>s});var o=n(82001),i=n.n(o),r=n(40935),a=n.n(r)()(i());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 s=a}}]);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[763],{10763(e,t,n){n.d(t,{default:()=>w});var o=n(96374),i=n(86319);const a=e=>{{const{component:t,commands:n,helpers:a}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"design",selected:!0},{text:"link"},{text:"icons"},..."web"===i.M.get("config","channel")?[{text:"animations"}]:[],{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:r,tabs:s}=e;return[{type:"heading",level:6,text:"settings",active:()=>"design"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"design"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"heading",level:6,text:"typography",active:()=>"design"===a.text},{type:"typography",active:()=>"design"===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 i="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:i})}}},{type:"fontFamily",active:()=>"design"===a.text,value:t.props.style.fontFamily,weight:"web"===i.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:()=>"design"===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:()=>"design"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"design"===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:"colors",active:()=>"design"===a.text},{type:"colorSwatchGroup",active:()=>"design"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const i=e.target.value;if(!i.includes("gradient(")){const e=(0,o.w)(t.props.style.color,i);n.execCommand("style",{color:e})}n.execCommand("style",{background:i,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:"border_design",active:()=>"design"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"design"===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:()=>"design"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"design"===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:()=>"design"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"icons"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"icons"===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:()=>"icons"===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:()=>"icons"===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:()=>"design"===a.text},{type:"spacingPicker",active:()=>"design"===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,i=e.target.leftValue,a=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:i+"px",paddingRight:a+"px",padding:null})}}]}}}},r=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,i,a)=>{switch(i){case"style":return e[i]=t.deepMerge(e[i],a),!0;case"text":return e.text=a,o()||n.chain().setContent(a).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":return e[i]=a,!0;case"onClick":if(a.link)return e[i]=a,!0}}}};var s=n(72591),l=n.n(s),c=n(88639),d=n.n(c),p=n(88128),u=n.n(p),g=n(30855),m=n.n(g),A=n(93051),h=n.n(A),y=n(49536),x={};x.setAttributes=m(),x.insert=u().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=h();l()(y.A,x);const C=y.A&&y.A.locals?y.A.locals:void 0;var b=n(81318),f=n(1366);const v=b.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,b.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 E=n(85194),k=n(28396);const B=b.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const w=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:i}=t,{arrayToString:s,mergeDiff:l}=i;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 b.KE({element:n,extensions:[f.A,v,k.A,E.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=C.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)}l(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,i=o.props.iconSize,a="icon_in_button";let r=d.querySelector(`.${a}`)||document.createElement("img");e&&t?(r.className=a,r.src=t,r.style.width=(i||16)+"px",r.style.height=(i||16)+"px",r.style.marginRight="8px",r.style.marginLeft="8px","left"===n?d.insertBefore(r,d.firstChild):d.appendChild(r)):r.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,handleBar:!0,validator:r({template:d,helpers:i,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:()=>s});var o=n(82001),i=n.n(o),a=n(40935),r=n.n(a)()(i());r.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:""}]),r.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const s=r}}]);
|
|
Binary file
|
|
@@ -1,130 +1,78 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(t,e,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
></cdtr-setting-icon>`;case"qr":return n.qy`<img style="width: 20px; height: 20px;" alt="qr" width="20" height="20" src="https://img.creaditor.ai/images/qr?link=https%3A%2F%2Fexample.com&size=20" />`;case"link":return i.e(5428).then(i.bind(i,85428)),n.qy`<cdtr-link-icon iconStyle=${t}></cdtr-link-icon>`;case"spacing":return i.e(365).then(i.bind(i,50365)),n.qy`<cdtr-spacing-icon
|
|
8
|
-
iconStyle=${t}
|
|
9
|
-
></cdtr-spacing-icon>`;case"background":case"image":case"giphy":return i.e(1452).then(i.bind(i,61452)),n.qy`<cdtr-background-icon
|
|
10
|
-
iconStyle=${t}
|
|
11
|
-
></cdtr-background-icon>`;case"video":return i.e(7759).then(i.bind(i,97759)),n.qy`<cdtr-video-icon iconStyle=${t}></cdtr-video-icon>`;case"list-check":return i.e(6459).then(i.bind(i,16459)),n.qy`<cdtr-list-check-icon
|
|
12
|
-
iconStyle=${t}
|
|
13
|
-
></cdtr-list-check-icon>`;case"time":return i.e(307).then(i.bind(i,307)),n.qy`<cdtr-time-icon iconStyle=${t}></cdtr-time-icon>`;case"icons":return n.qy`<cdtr-icon icon="emoji"></cdtr-icon>`;case"list-settings":return i.e(8676).then(i.bind(i,48676)),n.qy`<cdtr-list-settings-icon
|
|
14
|
-
iconStyle=${t}
|
|
15
|
-
></cdtr-list-settings-icon>`;case"automations":return i.e(8305).then(i.bind(i,58305)),n.qy`<cdtr-automation-icon
|
|
16
|
-
iconStyle=${t}
|
|
17
|
-
></cdtr-automation-icon>`;case"ai":return n.qy`<svg
|
|
18
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
20
|
-
width="20"
|
|
21
|
-
zoomAndPan="magnify"
|
|
22
|
-
viewBox="0 0 20.25 20.999999"
|
|
23
|
-
height="28"
|
|
24
|
-
preserveAspectRatio="xMidYMid meet"
|
|
25
|
-
version="1.0"
|
|
26
|
-
>
|
|
27
|
-
<defs>
|
|
28
|
-
<clippath id="84a0f9f97b">
|
|
29
|
-
<path
|
|
30
|
-
d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z M 0 0.375 "
|
|
31
|
-
clip-rule="nonzero"
|
|
32
|
-
></path>
|
|
33
|
-
</clippath>
|
|
34
|
-
</defs>
|
|
35
|
-
<g clip-path="url(#84a0f9f97b)">
|
|
36
|
-
<path
|
|
37
|
-
fill="#9747ff"
|
|
38
|
-
d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
|
|
39
|
-
fill-opacity="1"
|
|
40
|
-
fill-rule="evenodd"
|
|
41
|
-
></path>
|
|
42
|
-
</g>
|
|
43
|
-
</svg>`;default:return null}}render(){return n.qy`
|
|
44
|
-
<paper-button
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(t,e,n){n.r(e),n.d(e,{EditorTabItem:()=>c});var i=n(59929);class c extends i.WF{constructor(){super()}focus(){const t=this.shadowRoot.querySelector(".tab-btn");t?t.focus():super.focus()}onClickItem(t){this.value=t,this.dispatchEvent(new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}))}handleKeyDown(t){if("Enter"===t.key||" "===t.key)return t.preventDefault(),t.stopPropagation(),void this.onClickItem(this.icon);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("arrow-navigation",{detail:{key:t.key,currentIcon:this.icon},bubbles:!0,cancelable:!0})))}factory(){let t="fill:currentColor;color:inherit;width:18px;height:18px;";switch(this.icon){case"box-shadow":return n.e(1456).then(n.bind(n,11456)),i.qy`<cdtr-box-shadow-icon iconStyle=${t}></cdtr-box-shadow-icon>`;case"design":return n.e(9162).then(n.bind(n,59162)),i.qy`<cdtr-design-icon iconStyle=${t}></cdtr-design-icon>`;case"text":case"typography":return n.e(9089).then(n.bind(n,59089)),i.qy`<cdtr-text-icon iconStyle=${t}></cdtr-text-icon>`;case"animations":return n.e(9184).then(n.bind(n,29184)),i.qy`<cdtr-animation-icon iconStyle=${t}></cdtr-animation-icon>`;case"settings":return n.e(4114).then(n.bind(n,84114)),i.qy`<cdtr-setting-icon iconStyle=${t}></cdtr-setting-icon>`;case"qr":return i.qy`<img style="width:16px;height:16px;" alt="qr" width="16" height="16" src="https://img.creaditor.ai/images/qr?link=https%3A%2F%2Fexample.com&size=20" />`;case"link":return n.e(5428).then(n.bind(n,85428)),i.qy`<cdtr-link-icon iconStyle=${t}></cdtr-link-icon>`;case"spacing":return n.e(365).then(n.bind(n,50365)),i.qy`<cdtr-spacing-icon iconStyle=${t}></cdtr-spacing-icon>`;case"background":case"image":case"giphy":return n.e(1452).then(n.bind(n,61452)),i.qy`<cdtr-background-icon iconStyle=${t}></cdtr-background-icon>`;case"video":return n.e(7759).then(n.bind(n,97759)),i.qy`<cdtr-video-icon iconStyle=${t}></cdtr-video-icon>`;case"list-check":return n.e(6459).then(n.bind(n,16459)),i.qy`<cdtr-list-check-icon iconStyle=${t}></cdtr-list-check-icon>`;case"time":return n.e(307).then(n.bind(n,307)),i.qy`<cdtr-time-icon iconStyle=${t}></cdtr-time-icon>`;case"icons":return i.qy`<cdtr-icon icon="emoji" .width=${18} .height=${18} color="currentColor"></cdtr-icon>`;case"list-settings":return n.e(8676).then(n.bind(n,48676)),i.qy`<cdtr-list-settings-icon iconStyle=${t}></cdtr-list-settings-icon>`;case"automations":return n.e(8305).then(n.bind(n,58305)),i.qy`<cdtr-automation-icon iconStyle=${t}></cdtr-automation-icon>`;case"ai":return i.qy`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20.25 21" preserveAspectRatio="xMidYMid meet">
|
|
2
|
+
<defs><clippath id="ai-clip"><path d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z" clip-rule="nonzero"></path></clippath></defs>
|
|
3
|
+
<g clip-path="url(#ai-clip)"><path fill="#9747ff" d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z" fill-opacity="1" fill-rule="evenodd"></path></g>
|
|
4
|
+
</svg>`;default:return null}}render(){return i.qy`
|
|
5
|
+
<button
|
|
6
|
+
class="tab-btn ${this.selected?"selected":""}"
|
|
45
7
|
data-icon="${this.icon}"
|
|
46
8
|
tabindex="0"
|
|
47
9
|
@keydown=${t=>this.handleKeyDown(t)}
|
|
48
10
|
@click=${()=>this.onClickItem(this.icon)}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
></div>
|
|
55
|
-
<cdtr-row justify="center"
|
|
56
|
-
><span style="transform:translateY(50%)" class="factory-item"
|
|
57
|
-
>${this.factory()}</span
|
|
58
|
-
>
|
|
59
|
-
</cdtr-row>
|
|
60
|
-
</cdtr-col>
|
|
61
|
-
<cdtr-col style="margin-top: 7px;" sm="12">
|
|
62
|
-
<cdtr-title
|
|
63
|
-
style="${this.selected?"color:var(--primary)":""}"
|
|
64
|
-
><lang-text
|
|
65
|
-
style="font-size:10px;"
|
|
66
|
-
class="label-item"
|
|
67
|
-
text="${this.icon}"
|
|
68
|
-
></lang-text
|
|
69
|
-
></cdtr-title>
|
|
70
|
-
</cdtr-col> </cdtr-row
|
|
71
|
-
></paper-button>
|
|
72
|
-
`}}o.styles=n.AH`
|
|
11
|
+
>
|
|
12
|
+
<span class="icon">${this.factory()}</span>
|
|
13
|
+
<span class="label"><lang-text text="${this.icon}"></lang-text></span>
|
|
14
|
+
</button>
|
|
15
|
+
`}}c.styles=i.AH`
|
|
73
16
|
:host {
|
|
74
|
-
display:
|
|
75
|
-
|
|
17
|
+
display: block;
|
|
18
|
+
direction: ltr;
|
|
76
19
|
}
|
|
77
|
-
|
|
78
|
-
min-width: 0;
|
|
79
|
-
margin: 0;
|
|
20
|
+
.tab-btn {
|
|
80
21
|
width: 100%;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
gap: 3px;
|
|
27
|
+
padding: 6px 2px;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
border: none;
|
|
30
|
+
background: transparent;
|
|
31
|
+
outline: none;
|
|
32
|
+
position: relative;
|
|
33
|
+
transition: background 0.15s ease;
|
|
86
34
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
padding: 5px 0;
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: 50%;
|
|
92
|
-
left: 50%;
|
|
93
|
-
opacity: 0.1;
|
|
94
|
-
width: 100%;
|
|
95
|
-
height: 40px;
|
|
96
|
-
transform: translate(-50%, -50%);
|
|
35
|
+
.tab-btn:hover:not(.selected) {
|
|
36
|
+
background: #eeeef0;
|
|
97
37
|
}
|
|
98
|
-
.tab-selected
|
|
99
|
-
|
|
100
|
-
position: absolute;
|
|
101
|
-
top: 0;
|
|
102
|
-
left: 0;
|
|
103
|
-
width: 1px;
|
|
104
|
-
transform: translateX(-1px);
|
|
105
|
-
height: 100%;
|
|
106
|
-
background: #fff;
|
|
107
|
-
opacity: 1;
|
|
108
|
-
z-index: 1;
|
|
38
|
+
.tab-btn.selected {
|
|
39
|
+
background: color-mix(in srgb, var(--accent, #5B5FC7) 12%, transparent);
|
|
109
40
|
}
|
|
110
|
-
.
|
|
111
|
-
|
|
41
|
+
.icon {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
--cdtr-icon-width: 18px;
|
|
46
|
+
--cdtr-icon-height: 18px;
|
|
47
|
+
opacity: 0.55;
|
|
48
|
+
transition: opacity 0.15s ease, color 0.15s ease;
|
|
49
|
+
color: #666;
|
|
112
50
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
51
|
+
.tab-btn:hover:not(.selected) .icon {
|
|
52
|
+
opacity: 0.8;
|
|
53
|
+
color: #444;
|
|
116
54
|
}
|
|
117
|
-
.selected {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
border-bottom: 1px solid black;
|
|
55
|
+
.tab-btn.selected .icon {
|
|
56
|
+
opacity: 1;
|
|
57
|
+
color: var(--accent, #5B5FC7);
|
|
121
58
|
}
|
|
122
|
-
|
|
123
|
-
|
|
59
|
+
.label {
|
|
60
|
+
font-size: 9px;
|
|
61
|
+
color: #888;
|
|
62
|
+
font-weight: 500;
|
|
124
63
|
text-align: center;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
64
|
+
line-height: 1;
|
|
65
|
+
max-width: 100%;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
transition: color 0.15s ease;
|
|
70
|
+
}
|
|
71
|
+
.tab-btn.selected .label {
|
|
72
|
+
color: var(--accent, #5B5FC7);
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
}
|
|
75
|
+
.tab-btn:hover:not(.selected) .label {
|
|
76
|
+
color: #444;
|
|
128
77
|
}
|
|
129
|
-
|
|
130
|
-
`,o.properties={icon:{},labelMode:{},selected:{}},customElements.define("cdtr-editor-tab-item",o)}}]);
|
|
78
|
+
`,c.properties={icon:{},labelMode:{},selected:{}},customElements.define("cdtr-editor-tab-item",c)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8305],{58305(t,C,i){i.r(C),i.d(C,{AutomationIcon:()=>
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8305],{58305(t,C,i){i.r(C),i.d(C,{AutomationIcon:()=>r});var e=i(59929);class r extends e.WF{constructor(){super(),this.iconStyle="",this.width="24",this.height="24"}render(){return e.qy`<svg
|
|
2
2
|
style="${this.iconStyle}"
|
|
3
3
|
width="${this.width}"
|
|
4
4
|
height="${this.height}"
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
>
|
|
9
9
|
<path
|
|
10
10
|
d="M6 4H21C21.2652 4 21.5196 4.10536 21.7071 4.29289C21.8946 4.48043 22 4.73478 22 5V12H20V6H6V9L1 5L6 1V4ZM18 20H3C2.73478 20 2.48043 19.8946 2.29289 19.7071C2.10536 19.5196 2 19.2652 2 19V12H4V18H18V15L23 19L18 23V20Z"
|
|
11
|
-
fill="
|
|
11
|
+
fill="currentColor"
|
|
12
12
|
/>
|
|
13
13
|
<path
|
|
14
14
|
d="M7.10782 13.0297C6.96406 12.3508 6.96406 11.6492 7.10782 10.9703C7.66267 11.0353 8.14754 10.8518 8.30549 10.4699C8.46395 10.0875 8.25151 9.61514 7.81263 9.26874C8.19105 8.68705 8.68705 8.19105 9.26874 7.81263C9.61464 8.25101 10.0875 8.46395 10.4699 8.30549C10.8523 8.14704 11.0358 7.66267 10.9703 7.10782C11.6492 6.96406 12.3508 6.96406 13.0297 7.10782C12.9647 7.66267 13.1482 8.14754 13.5301 8.30549C13.9125 8.46395 14.3849 8.25151 14.7313 7.81263C15.3129 8.19105 15.809 8.68705 16.1874 9.26874C15.749 9.61464 15.536 10.0875 15.6945 10.4699C15.853 10.8523 16.3373 11.0358 16.8922 10.9703C17.0359 11.6492 17.0359 12.3508 16.8922 13.0297C16.3373 12.9647 15.8525 13.1482 15.6945 13.5301C15.536 13.9125 15.7485 14.3849 16.1874 14.7313C15.809 15.3129 15.3129 15.809 14.7313 16.1874C14.3854 15.749 13.9125 15.536 13.5301 15.6945C13.1477 15.853 12.9642 16.3373 13.0297 16.8922C12.3508 17.0359 11.6492 17.0359 10.9703 16.8922C11.0353 16.3373 10.8518 15.8525 10.4699 15.6945C10.0875 15.536 9.61514 15.7485 9.26874 16.1874C8.68705 15.809 8.19105 15.3129 7.81263 14.7313C8.25101 14.3854 8.46395 13.9125 8.30549 13.5301C8.14704 13.1477 7.66267 12.9642 7.10782 13.0297ZM8.00108 12.105C8.55093 12.2574 9.00431 12.6058 9.22925 13.1477C9.45369 13.69 9.37921 14.2574 9.09828 14.7533C9.14627 14.8042 9.19575 14.8537 9.24674 14.9017C9.74311 14.6208 10.31 14.5468 10.8523 14.7708C11.3942 14.9957 11.7426 15.4491 11.895 15.9989C11.965 16.0009 12.035 16.0009 12.105 15.9989C12.2574 15.4491 12.6058 14.9957 13.1477 14.7708C13.69 14.5463 14.2574 14.6208 14.7533 14.9017C14.8042 14.8537 14.8537 14.8042 14.9017 14.7533C14.6208 14.2569 14.5468 13.69 14.7708 13.1477C14.9957 12.6058 15.4491 12.2574 15.9989 12.105C16.0009 12.035 16.0009 11.965 15.9989 11.895C15.4491 11.7426 14.9957 11.3942 14.7708 10.8523C14.5463 10.31 14.6208 9.74261 14.9017 9.24674C14.8536 9.19595 14.804 9.14645 14.7533 9.09828C14.2569 9.37921 13.69 9.45319 13.1477 9.22925C12.6058 9.00431 12.2574 8.55093 12.105 8.00108C12.035 7.99922 11.965 7.99922 11.895 8.00108C11.7426 8.55093 11.3942 9.00431 10.8523 9.22925C10.31 9.45369 9.74261 9.37921 9.24674 9.09828C9.19575 9.14627 9.14627 9.19575 9.09828 9.24674C9.37921 9.74311 9.45319 10.31 9.22925 10.8523C9.00431 11.3942 8.55093 11.7426 8.00108 11.895C7.99908 11.965 7.99908 12.035 8.00108 12.105Z"
|
|
15
|
-
fill="
|
|
15
|
+
fill="currentColor"
|
|
16
16
|
/>
|
|
17
17
|
<path
|
|
18
18
|
d="M13.55 11.7402C13.75 11.8557 13.75 12.1443 13.55 12.2598L11.45 13.4722C11.25 13.5877 11 13.4434 11 13.2124V10.7876C11 10.5566 11.25 10.4123 11.45 10.5278L13.55 11.7402Z"
|
|
19
|
-
fill="
|
|
19
|
+
fill="currentColor"
|
|
20
20
|
/>
|
|
21
|
-
</svg> `}}
|
|
21
|
+
</svg> `}}r.styles=e.AH`
|
|
22
22
|
:host {
|
|
23
23
|
display: inherit;
|
|
24
24
|
--cdtr-icon-width: 20px;
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
height: var(--cdtr-icon-height);
|
|
30
30
|
color: var(--cdtr-icon-color);
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,r.properties={iconStyle:{type:String},width:{type:String},height:{type:String}},customElements.define("cdtr-automation-icon",r)}}]);
|
|
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(36565);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
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
>
|
|
8
8
|
<path fill="none" d="M0 0h24v24H0z" />
|
|
9
9
|
<path
|
|
10
|
+
fill="currentColor"
|
|
10
11
|
d="M2 18h7v2H2v-2zm0-7h9v2H2v-2zm0-7h20v2H2V4zm18.674 9.025l1.156-.391 1 1.732-.916.805a4.017 4.017 0 0 1 0 1.658l.916.805-1 1.732-1.156-.391c-.41.37-.898.655-1.435.83L19 21h-2l-.24-1.196a3.996 3.996 0 0 1-1.434-.83l-1.156.392-1-1.732.916-.805a4.017 4.017 0 0 1 0-1.658l-.916-.805 1-1.732 1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196c.536.174 1.024.46 1.434.83zM18 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"
|
|
11
12
|
/>
|
|
12
13
|
</svg>`}}s.styles=h.AH`
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8916],{48916(e,t
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8916],{48916(e,r,t){t.r(r);var n=t(59929);class s extends n.WF{constructor(){super()}render(){return n.qy`<hr />`}}s.styles=n.AH`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
width: 100%;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
hr {
|
|
7
7
|
outline: none;
|
|
8
8
|
border: none;
|
|
9
|
+
margin: 4px 16px;
|
|
9
10
|
}
|
|
10
11
|
hr:after {
|
|
11
12
|
content: "";
|
|
12
13
|
height: 1px;
|
|
13
|
-
background:
|
|
14
|
+
background: #e8e8eb;
|
|
14
15
|
display: block;
|
|
15
16
|
width: 100%;
|
|
16
|
-
opacity: 0.8;
|
|
17
17
|
}
|
|
18
|
-
`,customElements.define("cdtr-divider",
|
|
18
|
+
`,customElements.define("cdtr-divider",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),s=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),s=n(36565),r=n(89531),l=n(83965),c=n(67549);const d=s.Ay;r.A,l.i,c.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,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([[9162],{59162(t,e,
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9162],{59162(t,e,i){i.r(e),i.d(e,{DesignIcon:()=>r});var h=i(59929);class r extends h.WF{constructor(){super(),this.iconStyle="",this.width="24",this.height="24"}render(){return h.qy`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
viewBox="0 0 24 24"
|
|
4
4
|
width="24"
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
>
|
|
8
8
|
<path fill="none" d="M0 0h24v24H0z" />
|
|
9
9
|
<path
|
|
10
|
+
fill="currentColor"
|
|
10
11
|
d="M5 8v12h4V8H5zM3 7l4-5 4 5v15H3V7zm16 9v-2h-3v-2h3v-2h-2V8h2V6h-4v14h4v-2h-2v-2h2zM14 4h6a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z"
|
|
11
12
|
/>
|
|
12
|
-
</svg>`}}
|
|
13
|
+
</svg>`}}r.styles=h.AH`
|
|
13
14
|
:host {
|
|
14
15
|
display: inherit;
|
|
15
16
|
--cdtr-icon-width: 20px;
|
|
@@ -20,4 +21,4 @@
|
|
|
20
21
|
height: var(--cdtr-icon-height);
|
|
21
22
|
color: var(--cdtr-icon-color);
|
|
22
23
|
}
|
|
23
|
-
`,
|
|
24
|
+
`,r.properties={iconStyle:{type:String},width:{type:String},height:{type:String}},customElements.define("cdtr-design-icon",r)}}]);
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9694],{69694(e,n,t){t.d(n,{default:()=>b});const o=e=>{{const{component:n,commands:t}=e;return{select:e=>{let{changeTab:n,tab:t}=e;"design"!==t.text&&n("design")},tabs:e=>{const n=[{text:"design"}];return n.forEach(n=>n.selected=n.selected=n.text===e),n},layout:e=>{let{tab:o,changeTab:r,tabs:s}=e;return[{type:"slider",title:"height",unit:"px",value:parseFloat(n.props.size),min:10,max:900,onInput:e=>{const n=e.target.value;t.execCommand("size",n+"px")}}]}}}},r=()=>({set:(e,n,t)=>"size"===n&&(e[n]=t,!0)});var s=t(72591),a=t.n(s),i=t(88639),d=t.n(i),A=t(88128),c=t.n(A),l=t(30855),u=t.n(l),g=t(93051),C=t.n(g),p=t(30772),m={};m.setAttributes=u(),m.insert=c().bind(null,"head"),m.domAPI=d(),m.insertStyleElement=C();a()(p.A,m);const h=p.A&&p.A.locals?p.A.locals:void 0,b=()=>{const e="spacer";return{name:e,create:n=>{let{createElement:t,compose:s,helpers:a}=n;const i=document.createElement("div");i.classList.add(h.root);const d=t({name:e,id:s.id,template:i,defaultProps:{size:"200px"},draggable:{group:"element"},droppable:{group:"element"},handleBar:!0,render:e=>{i.style.height=s.props.size||"200px"},validator:r(),getRenderedHTML:()=>`<div style="height:${s.props.size}"></div>`,schema:s.schema,onSelect:e=>{i.classList.add(e)},onDeselect:e=>{i.classList.remove(e)},elementProps:s,remove:()=>{i.remove()},createEditor:o});return((e,n)=>{const t=document.createElement("div");t.classList.add(h.resizeBar),t.setAttribute("draggable","false"),e.appendChild(t);let o=!1,r=0,s=0;const a=t=>{if(!o)return;const a=t.clientY-r,i=Math.max(10,s+a)+"px";e.style.height=i,n.commands.execCommand("size",i)},i=()=>{o&&(o=!1,t.classList.remove(h.dragging),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i))};t.addEventListener("mousedown",n=>{n.preventDefault(),n.stopPropagation(),o=!0,r=n.clientY,s=e.getBoundingClientRect().height,document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),t.classList.add(h.dragging)})})(i,d),d}}}},30772(e,n,t){t.d(n,{A:()=>i});var o=t(82001),r=t.n(o),s=t(40935),a=t.n(s)()(r());a.push([e.id,'.aLJn5aW2t4h6fq41PEdv{\n width: 100%;\n position: relative;\n}\n.aLJn5aW2t4h6fq41PEdv::after{\n content: "";\n outline: 1px dashed rgba(57, 170, 193, 0.459);\n display: block;\n width: 100%;\n height: 100%;\n background-color: rgba(63, 115, 125, 0.005);\n}\n.pxoFCz5GGvHmLd86XtRD{\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 8px;\n cursor: ns-resize;\n z-index: 10;\n background-color: rgba(57, 170, 193, 0.
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9694],{69694(e,n,t){t.d(n,{default:()=>b});const o=e=>{{const{component:n,commands:t}=e;return{select:e=>{let{changeTab:n,tab:t}=e;"design"!==t.text&&n("design")},tabs:e=>{const n=[{text:"design"}];return n.forEach(n=>n.selected=n.selected=n.text===e),n},layout:e=>{let{tab:o,changeTab:r,tabs:s}=e;return[{type:"slider",title:"height",unit:"px",value:parseFloat(n.props.size),min:10,max:900,onInput:e=>{const n=e.target.value;t.execCommand("size",n+"px")}}]}}}},r=()=>({set:(e,n,t)=>"size"===n&&(e[n]=t,!0)});var s=t(72591),a=t.n(s),i=t(88639),d=t.n(i),A=t(88128),c=t.n(A),l=t(30855),u=t.n(l),g=t(93051),C=t.n(g),p=t(30772),m={};m.setAttributes=u(),m.insert=c().bind(null,"head"),m.domAPI=d(),m.insertStyleElement=C();a()(p.A,m);const h=p.A&&p.A.locals?p.A.locals:void 0,b=()=>{const e="spacer";return{name:e,create:n=>{let{createElement:t,compose:s,helpers:a}=n;const i=document.createElement("div");i.classList.add(h.root);const d=t({name:e,id:s.id,template:i,defaultProps:{size:"200px"},draggable:{group:"element"},droppable:{group:"element"},handleBar:!0,render:e=>{i.style.height=s.props.size||"200px"},validator:r(),getRenderedHTML:()=>`<div style="height:${s.props.size}"></div>`,schema:s.schema,onSelect:e=>{i.classList.add(e)},onDeselect:e=>{i.classList.remove(e)},elementProps:s,remove:()=>{i.remove()},createEditor:o});return((e,n)=>{const t=document.createElement("div");t.classList.add(h.resizeBar),t.setAttribute("draggable","false"),e.appendChild(t);let o=!1,r=0,s=0;const a=t=>{if(!o)return;const a=t.clientY-r,i=Math.max(10,s+a)+"px";e.style.height=i,n.commands.execCommand("size",i)},i=()=>{o&&(o=!1,t.classList.remove(h.dragging),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i))};t.addEventListener("mousedown",n=>{n.preventDefault(),n.stopPropagation(),o=!0,r=n.clientY,s=e.getBoundingClientRect().height,document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),t.classList.add(h.dragging)})})(i,d),d}}}},30772(e,n,t){t.d(n,{A:()=>i});var o=t(82001),r=t.n(o),s=t(40935),a=t.n(s)()(r());a.push([e.id,'.aLJn5aW2t4h6fq41PEdv{\n width: 100%;\n position: relative;\n}\n.aLJn5aW2t4h6fq41PEdv::after{\n content: "";\n outline: 1px dashed rgba(57, 170, 193, 0.459);\n display: block;\n width: 100%;\n height: 100%;\n background-color: rgba(63, 115, 125, 0.005);\n}\n.pxoFCz5GGvHmLd86XtRD{\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 8px;\n cursor: ns-resize;\n z-index: 10;\n background-color: rgba(57, 170, 193, 0.1);\n transition: background-color 0.2s;\n}\n\n.pxoFCz5GGvHmLd86XtRD:hover{\n background-color: rgba(57, 170, 193, 0.6);\n}\n.pxoFCz5GGvHmLd86XtRD._0A7M5j1AiL_VBIzQGDK{\n background-color: rgba(57, 170, 193, 0.8);\n}',"",{version:3,sources:["webpack://./../web-editors/spacer-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;IACI,WAAW;IACX,kBAAkB;AACtB;AACA;IACI,WAAW;IACX,6CAA6C;IAC7C,cAAc;IACd,WAAW;IACX,YAAY;IACZ,2CAA2C;AAC/C;AACA;IACI,kBAAkB;IAClB,SAAS;IACT,OAAO;IACP,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,WAAW;IACX,yCAAyC;IACzC,iCAAiC;AACrC;;AAEA;IACI,yCAAyC;AAC7C;AACA;IACI,yCAAyC;AAC7C",sourcesContent:['.root{\n width: 100%;\n position: relative;\n}\n.root::after{\n content: "";\n outline: 1px dashed rgba(57, 170, 193, 0.459);\n display: block;\n width: 100%;\n height: 100%;\n background-color: rgba(63, 115, 125, 0.005);\n}\n.resizeBar{\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 8px;\n cursor: ns-resize;\n z-index: 10;\n background-color: rgba(57, 170, 193, 0.1);\n transition: background-color 0.2s;\n}\n\n.resizeBar:hover{\n background-color: rgba(57, 170, 193, 0.6);\n}\n.resizeBar.dragging{\n background-color: rgba(57, 170, 193, 0.8);\n}'],sourceRoot:""}]),a.locals={root:"aLJn5aW2t4h6fq41PEdv",resizeBar:"pxoFCz5GGvHmLd86XtRD",dragging:"_0A7M5j1AiL_VBIzQGDK"};const i=a}}]);
|
|
Binary file
|