builder-settings-types 0.0.318 → 0.0.319

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.
@@ -324,16 +324,16 @@
324
324
  align-items: center;
325
325
  justify-content: center;
326
326
  line-height: 1;
327
- `,n.addEventListener("click",()=>this.closePopup()),i.appendChild(s),i.appendChild(n),e.appendChild(i);const o=document.createElement("div");return o.classList.add("multi-language-popup-content"),this.props.languages.forEach(a=>{var c;const l=((c=this.value)==null?void 0:c[a])||"",r=this.createTextareaRow(a,l);o.appendChild(r)}),e.appendChild(o),t.appendChild(e),t.addEventListener("click",a=>{a.target===t&&this.closePopup()}),t}showPopup(){this.popup||(this.popup=this.createPopup(),document.body.appendChild(this.popup))}closePopup(){this.popup&&(document.body.removeChild(this.popup),this.popup=null)}draw(){const t=document.createElement("div");if(t.classList.add("simple-multi-language-wrapper"),this.props.title){const s=document.createElement("div");s.classList.add("simple-multi-language-title"),s.style.cssText=`
327
+ `,n.addEventListener("click",()=>this.closePopup()),i.appendChild(s),i.appendChild(n),e.appendChild(i);const o=document.createElement("div");return o.classList.add("multi-language-popup-content"),this.props.languages.forEach(a=>{var c;const l=((c=this.value)==null?void 0:c[a])||"",r=this.createTextareaRow(a,l);o.appendChild(r)}),e.appendChild(o),t.appendChild(e),t.addEventListener("click",a=>{a.target===t&&this.closePopup()}),t}showPopup(){this.popup||(this.popup=this.createPopup(),document.body.appendChild(this.popup))}closePopup(){this.popup&&(document.body.removeChild(this.popup),this.popup=null)}draw(){const t=document.createElement("div");t.classList.add("simple-multi-language-wrapper");const e=document.createElement("div");e.classList.add("simple-multi-language-title"),e.style.cssText=`
328
328
  display: flex;
329
329
  justify-content: space-between;
330
330
  align-items: center;
331
- `;const n=document.createElement("span");n.textContent=this.props.title;const o=document.createElement("button");o.classList.add("multi-language-eye-icon"),o.innerHTML=`
331
+ `;const i=document.createElement("span");i.textContent=this.props.title??"";const s=document.createElement("button");s.classList.add("multi-language-eye-icon"),s.innerHTML=`
332
332
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
333
333
  <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
334
334
  <circle cx="12" cy="12" r="3"></circle>
335
335
  </svg>
336
- `,o.style.cssText=`
336
+ `,s.style.cssText=`
337
337
  background: none;
338
338
  border: none;
339
339
  cursor: pointer;
@@ -343,7 +343,7 @@
343
343
  justify-content: center;
344
344
  color: #666;
345
345
  transition: color 0.2s;
346
- `,o.addEventListener("mouseenter",()=>{o.style.color="#000"}),o.addEventListener("mouseleave",()=>{o.style.color="#666"}),o.addEventListener("click",a=>{a.preventDefault(),this.showPopup()}),s.appendChild(n),s.appendChild(o),t.appendChild(s)}const e=document.createElement("div");e.classList.add("simple-multi-language-content"),t.appendChild(e),this.container=t,this.renderContent(t),this.languageChangeUnsubscribe=x.onLanguageChange(()=>{this.container&&this.renderContent(this.container)});const i=()=>{if(!this.container)return;this.container.querySelectorAll(".simple-language-textarea").forEach(n=>{const o=n.getAttribute("data-full-placeholder")||"";o&&this.adaptPlaceholderToSingleLine(n,o)})};return window.addEventListener("resize",i),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 xe extends x{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 Q({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 Le=`
346
+ `,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=x.onLanguageChange(()=>{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){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 xe extends x{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 Q({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 Le=`
347
347
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
348
348
  <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"/>
349
349
  </svg>
@@ -4378,22 +4378,22 @@ class Te extends x {
4378
4378
  }
4379
4379
  draw() {
4380
4380
  const t = document.createElement("div");
4381
- if (t.classList.add("simple-multi-language-wrapper"), this.props.title) {
4382
- const s = document.createElement("div");
4383
- s.classList.add("simple-multi-language-title"), s.style.cssText = `
4381
+ t.classList.add("simple-multi-language-wrapper");
4382
+ const e = document.createElement("div");
4383
+ e.classList.add("simple-multi-language-title"), e.style.cssText = `
4384
4384
  display: flex;
4385
4385
  justify-content: space-between;
4386
4386
  align-items: center;
4387
4387
  `;
4388
- const n = document.createElement("span");
4389
- n.textContent = this.props.title;
4390
- const o = document.createElement("button");
4391
- o.classList.add("multi-language-eye-icon"), o.innerHTML = `
4388
+ const i = document.createElement("span");
4389
+ i.textContent = this.props.title ?? "";
4390
+ const s = document.createElement("button");
4391
+ s.classList.add("multi-language-eye-icon"), s.innerHTML = `
4392
4392
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4393
4393
  <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
4394
4394
  <circle cx="12" cy="12" r="3"></circle>
4395
4395
  </svg>
4396
- `, o.style.cssText = `
4396
+ `, s.style.cssText = `
4397
4397
  background: none;
4398
4398
  border: none;
4399
4399
  cursor: pointer;
@@ -4403,28 +4403,27 @@ class Te extends x {
4403
4403
  justify-content: center;
4404
4404
  color: #666;
4405
4405
  transition: color 0.2s;
4406
- `, o.addEventListener("mouseenter", () => {
4407
- o.style.color = "#000";
4408
- }), o.addEventListener("mouseleave", () => {
4409
- o.style.color = "#666";
4410
- }), o.addEventListener("click", (a) => {
4411
- a.preventDefault(), this.showPopup();
4412
- }), s.appendChild(n), s.appendChild(o), t.appendChild(s);
4413
- }
4414
- const e = document.createElement("div");
4415
- e.classList.add("simple-multi-language-content"), t.appendChild(e), this.container = t, this.renderContent(t), this.languageChangeUnsubscribe = x.onLanguageChange(() => {
4406
+ `, s.addEventListener("mouseenter", () => {
4407
+ s.style.color = "#000";
4408
+ }), s.addEventListener("mouseleave", () => {
4409
+ s.style.color = "#666";
4410
+ }), s.addEventListener("click", (a) => {
4411
+ a.preventDefault(), this.showPopup();
4412
+ }), e.appendChild(i), e.appendChild(s), t.appendChild(e);
4413
+ const n = document.createElement("div");
4414
+ n.classList.add("simple-multi-language-content"), t.appendChild(n), this.container = t, this.renderContent(t), this.languageChangeUnsubscribe = x.onLanguageChange(() => {
4416
4415
  this.container && this.renderContent(this.container);
4417
4416
  });
4418
- const i = () => {
4417
+ const o = () => {
4419
4418
  if (!this.container) return;
4420
4419
  this.container.querySelectorAll(
4421
4420
  ".simple-language-textarea"
4422
- ).forEach((n) => {
4423
- const o = n.getAttribute("data-full-placeholder") || "";
4424
- o && this.adaptPlaceholderToSingleLine(n, o);
4421
+ ).forEach((l) => {
4422
+ const r = l.getAttribute("data-full-placeholder") || "";
4423
+ r && this.adaptPlaceholderToSingleLine(l, r);
4425
4424
  });
4426
4425
  };
4427
- return window.addEventListener("resize", i), t;
4426
+ return window.addEventListener("resize", o), t;
4428
4427
  }
4429
4428
  setValue(t) {
4430
4429
  super.setValue(t), this.container && this.props.languages.forEach((e) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "builder-settings-types",
3
3
  "description": "builder settings",
4
- "version": "0.0.318",
4
+ "version": "0.0.319",
5
5
  "type": "module",
6
6
  "main": "dist/builder-settings-types.cjs.js",
7
7
  "module": "dist/builder-settings-types.es.js",