builder-settings-types 0.0.380 → 0.0.381
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",a=>{a.preventDefault(),this.showPopup()}),e.appendChild(i),e.appendChild(s),t.appendChild(e);const n=document.createElement("div");n.classList.add("simple-multi-language-content"),t.appendChild(n),this.container=t,this.renderContent(t),this.languageChangeUnsubscribe=w.onLanguageChange(a=>{a&&this.props.languages.includes(a)&&(this.defaultLanguage=a),this.container&&this.renderContent(this.container)});const o=()=>{if(!this.container)return;this.container.querySelectorAll(".simple-language-textarea").forEach(l=>{const r=l.getAttribute("data-full-placeholder")||"";r&&this.adaptPlaceholderToSingleLine(l,r)})};return window.addEventListener("resize",o),t}setValue(t){var n;super.setValue(t),this.value.$id=t.$id;const e=window;e.textElementListeners||(e.textElementListeners=new Map);const i=(n=this.value)==null?void 0:n.$id,s=window.textElementListeners;if(i&&!s.has(i)){const o=a=>{const{type:l,data:r}=a.data||{};l==="TEXT_ELEMENT_CLICKED"&&(r==null?void 0:r.$id)===i&&this.showPopup()};window.addEventListener("message",o),s.set(i,o)}this.container&&this.props.languages.forEach(o=>{var a;if(this.props.multiImg){const l=this.uploadSettings.get(o);l&&l.setValue((t==null?void 0:t[o])||"")}else{const l=(a=this.container)==null?void 0:a.querySelector(`#textarea-${o}`);if(l){l.value=(t==null?void 0:t[o])||"",this.autosizeTextarea(l,3);const r=l.getAttribute("data-full-placeholder")||"";r&&this.adaptPlaceholderToSingleLine(l,r)}}})}}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",a=>{a.preventDefault(),this.showPopup()}),e.appendChild(i),e.appendChild(s),t.appendChild(e);const n=document.createElement("div");n.classList.add("simple-multi-language-content"),t.appendChild(n),this.container=t,this.renderContent(t),this.languageChangeUnsubscribe=w.onLanguageChange(a=>{a&&this.props.languages.includes(a)&&(this.defaultLanguage=a),this.container&&this.renderContent(this.container)});const o=()=>{if(!this.container)return;this.container.querySelectorAll(".simple-language-textarea").forEach(l=>{const r=l.getAttribute("data-full-placeholder")||"";r&&this.adaptPlaceholderToSingleLine(l,r)})};return window.addEventListener("resize",o),t}setValue(t){var n;super.setValue(t),this.value.$id=this.value.$id||t.$id;const e=window;e.textElementListeners||(e.textElementListeners=new Map);const i=(n=this.value)==null?void 0:n.$id,s=window.textElementListeners;if(i&&!s.has(i)){const o=a=>{const{type:l,data:r}=a.data||{};l==="TEXT_ELEMENT_CLICKED"&&(r==null?void 0:r.$id)===i&&this.showPopup()};window.addEventListener("message",o),s.set(i,o)}this.container&&this.props.languages.forEach(o=>{var a;if(this.props.multiImg){const l=this.uploadSettings.get(o);l&&l.setValue((t==null?void 0:t[o])||"")}else{const l=(a=this.container)==null?void 0:a.querySelector(`#textarea-${o}`);if(l){l.value=(t==null?void 0:t[o])||"",this.autosizeTextarea(l,3);const r=l.getAttribute("data-full-placeholder")||"";r&&this.adaptPlaceholderToSingleLine(l,r)}}})}}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>
|
|
@@ -4993,7 +4993,7 @@ class yi extends w {
|
|
|
4993
4993
|
}
|
|
4994
4994
|
setValue(t) {
|
|
4995
4995
|
var n;
|
|
4996
|
-
super.setValue(t), this.value.$id = t.$id;
|
|
4996
|
+
super.setValue(t), this.value.$id = this.value.$id || t.$id;
|
|
4997
4997
|
const e = window;
|
|
4998
4998
|
e.textElementListeners || (e.textElementListeners = /* @__PURE__ */ new Map());
|
|
4999
4999
|
const i = (n = this.value) == null ? void 0 : n.$id, s = window.textElementListeners;
|
package/package.json
CHANGED