builder-settings-types 0.0.392 → 0.0.393
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.
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
justify-content: center;
|
|
374
374
|
color: #666;
|
|
375
375
|
transition: color 0.2s;
|
|
376
|
-
`,s.addEventListener("mouseenter",()=>{s.style.color="#000"}),s.addEventListener("mouseleave",()=>{s.style.color="#666"}),s.addEventListener("click",l=>{console.log(this.$id),l.preventDefault(),this.showPopup()});const n=l=>{var d;const{type:r,data:h}=l.data||{};r==="TEXT_ELEMENT_CLICKED"&&h.$id&&(console.log((d=this.value)==null?void 0:d.$id),(h==null?void 0:h.$id)===this.$id&&this.showPopup())};window.addEventListener("message",n),window.tesst=this.$id,e.appendChild(i),e.appendChild(s),t.appendChild(e);const o=document.createElement("div");o.classList.add("simple-multi-language-content"),t.appendChild(o),this.container=t,this.renderContent(t),this.languageChangeUnsubscribe=w.onLanguageChange(l=>{l&&this.props.languages.includes(l)&&(this.defaultLanguage=l),this.container&&this.renderContent(this.container)});const a=()=>{if(!this.container)return;this.container.querySelectorAll(".simple-language-textarea").forEach(r=>{const h=r.getAttribute("data-full-placeholder")||"";h&&this.adaptPlaceholderToSingleLine(r,h)})};return window.addEventListener("resize",a),t}setValue(t){super.setValue(t),this.container&&this.props.languages.forEach(e=>{var i;if(this.props.multiImg){const s=this.uploadSettings.get(e);s&&s.setValue((t==null?void 0:t[e])||"")}else{const s=(i=this.container)==null?void 0:i.querySelector(`#textarea-${e}`);if(s){s.value=(t==null?void 0:t[e])||"",this.autosizeTextarea(s,3);const n=s.getAttribute("data-full-placeholder")||"";n&&this.adaptPlaceholderToSingleLine(s,n)}}})}}class di extends w{constructor(t={}){super(t),this.inputType="select";const e=[{name:"None",value:"none"},{name:"Fade",value:"fade 1.5s ease-in-out infinite"},{name:"Slide",value:"slide 1.5s ease-in-out infinite"},{name:"Zoom",value:"zoom 1.5s ease-in-out infinite"},{name:"Bounce",value:"bounce 1.5s ease-in-out infinite"},{name:"Pulse",value:"pulse 1.5s ease-in-out infinite"}];this.selectSetting=new st({title:this.title||"Animation",options:e,default:this.props.default||"none"}),this.selectSetting.onChange=i=>{var s;this.value=i,(s=this.onChange)==null||s.call(this,i)}}draw(){return this.selectSetting.draw()}destroy(){this.selectSetting.destroy(),super.destroy()}}const pi=`
|
|
376
|
+
`,s.addEventListener("mouseenter",()=>{s.style.color="#000"}),s.addEventListener("mouseleave",()=>{s.style.color="#666"}),s.addEventListener("click",l=>{console.log(this.$id),l.preventDefault(),this.showPopup()});const n=l=>{var d;const{type:r,data:h}=l.data||{};r==="TEXT_ELEMENT_CLICKED"&&h.$id&&(console.log((d=this.value)==null?void 0:d.$id),(h==null?void 0:h.$id)===this.$id&&this.showPopup())};window.addEventListener("message",n),window.tesst=this.$id,e.appendChild(i),e.appendChild(s),t.appendChild(e);const o=document.createElement("div");o.classList.add("simple-multi-language-content"),t.appendChild(o),this.container=t,this.renderContent(t),this.languageChangeUnsubscribe=w.onLanguageChange(l=>{l&&this.props.languages.includes(l)&&(this.defaultLanguage=l),this.container&&this.renderContent(this.container)});const a=()=>{if(!this.container)return;this.container.querySelectorAll(".simple-language-textarea").forEach(r=>{const h=r.getAttribute("data-full-placeholder")||"";h&&this.adaptPlaceholderToSingleLine(r,h)})};return window.addEventListener("resize",a),t}setValue(t){t.$id=this.$id,super.setValue(t),this.container&&this.props.languages.forEach(e=>{var i;if(this.props.multiImg){const s=this.uploadSettings.get(e);s&&s.setValue((t==null?void 0:t[e])||"")}else{const s=(i=this.container)==null?void 0:i.querySelector(`#textarea-${e}`);if(s){s.value=(t==null?void 0:t[e])||"",this.autosizeTextarea(s,3);const n=s.getAttribute("data-full-placeholder")||"";n&&this.adaptPlaceholderToSingleLine(s,n)}}})}}class di extends w{constructor(t={}){super(t),this.inputType="select";const e=[{name:"None",value:"none"},{name:"Fade",value:"fade 1.5s ease-in-out infinite"},{name:"Slide",value:"slide 1.5s ease-in-out infinite"},{name:"Zoom",value:"zoom 1.5s ease-in-out infinite"},{name:"Bounce",value:"bounce 1.5s ease-in-out infinite"},{name:"Pulse",value:"pulse 1.5s ease-in-out infinite"}];this.selectSetting=new st({title:this.title||"Animation",options:e,default:this.props.default||"none"}),this.selectSetting.onChange=i=>{var s;this.value=i,(s=this.onChange)==null||s.call(this,i)}}draw(){return this.selectSetting.draw()}destroy(){this.selectSetting.destroy(),super.destroy()}}const pi=`
|
|
377
377
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
378
378
|
<path d="M5.625 9.5H5.6325M12.375 9.5H12.3825M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 6.35L2.25 12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75L5.85 2.75C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
379
379
|
</svg>
|
|
@@ -5000,7 +5000,7 @@ class yi extends w {
|
|
|
5000
5000
|
return window.addEventListener("resize", a), t;
|
|
5001
5001
|
}
|
|
5002
5002
|
setValue(t) {
|
|
5003
|
-
super.setValue(t), this.container && this.props.languages.forEach((e) => {
|
|
5003
|
+
t.$id = this.$id, super.setValue(t), this.container && this.props.languages.forEach((e) => {
|
|
5004
5004
|
var i;
|
|
5005
5005
|
if (this.props.multiImg) {
|
|
5006
5006
|
const s = this.uploadSettings.get(e);
|
package/package.json
CHANGED