golden-logic-ui 1.0.548 → 1.0.551

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.
@@ -1066,13 +1066,13 @@ const Aye = /* @__PURE__ */ Fi(cie, [["render", fie]]), mie = { class: "bg-white
1066
1066
  ref: y
1067
1067
  }, null, 40, Mie),
1068
1068
  Z("textarea", {
1069
+ class: xn(["form-input-translation mt-4", {
1070
+ " gl-textarea-form": u.error_message == "",
1071
+ " gl-textarea-form-invalid": u.error_message !== ""
1072
+ }]),
1069
1073
  required: u.is_required,
1070
1074
  name: u.field_name,
1071
1075
  id: u.field_name,
1072
- class: xn({
1073
- " gl-textarea-form form-input-translation mt-4 ": u.error_message == "",
1074
- " gl-textarea-form-invalid form-input-translation mt-4 ": u.error_message !== ""
1075
- }),
1076
1076
  type: u.type,
1077
1077
  onInput: D[1] || (D[1] = (R) => T.$emit("update:modelValue", R.target.value)),
1078
1078
  onKeydown: D[2] || (D[2] = (R) => T.$emit("keydown", R)),
@@ -1190,10 +1190,10 @@ const Aye = /* @__PURE__ */ Fi(cie, [["render", fie]]), mie = { class: "bg-white
1190
1190
  required: u.is_required,
1191
1191
  name: u.field_name,
1192
1192
  id: u.field_name,
1193
- class: xn({
1194
- " gl-input-form form-input-translation mt-2 ": u.error_message == "",
1195
- " gl-input-form-invalid form-input-translation mt-2 ": u.error_message !== ""
1196
- }),
1193
+ class: xn(["form-input-translation mt-2", {
1194
+ " gl-input-form": u.error_message == "",
1195
+ " gl-input-form-invalid": u.error_message !== ""
1196
+ }]),
1197
1197
  type: u.type,
1198
1198
  onInput: D[1] || (D[1] = (R) => T.$emit("update:modelValue", R.target.value)),
1199
1199
  onKeydown: D[2] || (D[2] = (R) => T.$emit("keydown", R)),
@@ -71855,9 +71855,9 @@ const Fge = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav
71855
71855
  Z("div", {
71856
71856
  ref_key: "editor",
71857
71857
  ref: h,
71858
- class: xn(["CodeEditor custom-editor", {
71859
- "gl-input-form form-input-translation": u.error_message == "",
71860
- "gl-input-form-invalid form-input-translation": u.error_message !== ""
71858
+ class: xn(["CodeEditor custom-editor form-input-translation", {
71859
+ "gl-input-form": u.error_message == "",
71860
+ "gl-input-form-invalid ": u.error_message !== ""
71861
71861
  }]),
71862
71862
  name: u.field_name,
71863
71863
  id: u.field_name
@@ -71969,17 +71969,7 @@ const Fge = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav
71969
71969
  Uh(T), O_(() => {
71970
71970
  x && (x.destroy(), x = null);
71971
71971
  }), Uh(() => {
71972
- T(), g.value !== null && g.value.hasAttribute("autofocus") && g.value.focus(), c.modelValue && (h("update:modelValue", c.modelValue), g.value.value = c.modelValue), c.modelValueTranslate && (h("update:modelValueTranslate", c.modelValueTranslate), y.value.value = c.modelValueTranslate), c.translatable && !c.modelValueTranslate && axios.get("/admin/get_field_translations", {
71973
- params: {
71974
- model: c.translatable.model,
71975
- row_id: c.translatable.row_id,
71976
- field: c.translatable.field
71977
- }
71978
- }).then((Q) => {
71979
- y.value.value = JSON.stringify(Q.data), h("update:modelValueTranslate", JSON.stringify(Q.data));
71980
- }).catch((Q) => {
71981
- console.log(Q);
71982
- });
71972
+ T(), c.modelValue && (h("update:modelValue", c.modelValue), g.value.value = c.modelValue), c.modelValueTranslate && (h("update:modelValueTranslate", c.modelValueTranslate), y.value.value = c.modelValueTranslate);
71983
71973
  }), Bu(() => c.modelValue, (Q) => {
71984
71974
  x && x.getContent() !== Q && x.setContent(Q);
71985
71975
  });
@@ -72040,9 +72030,9 @@ const Fge = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav
72040
72030
  Jr(Z("textarea", {
72041
72031
  name: u.field_name,
72042
72032
  id: u.field_name,
72043
- class: xn(["tiny", {
72044
- " gl-textarea-form form-input-translation mt-4 ": u.error_message == "",
72045
- " gl-textarea-form-invalid form-input-translation mt-4 ": u.error_message !== ""
72033
+ class: xn(["tiny form-input-translation mt-4", {
72034
+ " gl-textarea-form": u.error_message == "",
72035
+ " gl-textarea-form-invalid": u.error_message !== ""
72046
72036
  }]),
72047
72037
  type: u.type,
72048
72038
  "onUpdate:modelValue": W[1] || (W[1] = (te) => R.value = te),
@@ -75529,11 +75519,10 @@ class DOe {
75529
75519
  refresh: function() {
75530
75520
  var g = this;
75531
75521
  this.transInputs.forEach(function(y) {
75532
- console.log("refresh loop"), console.log(y);
75533
75522
  var x = y, T = x.nextElementSibling.classList.contains(
75534
75523
  g.settings.editing ? "form-input-translation" : "input_tr_show"
75535
75524
  ) ? x.nextElementSibling : null;
75536
- if (T && (T.dataset.inp = x.id, x.dataset.inpUsr = T.id, console.log("refresh"), console.log(T), g.settings.editing))
75525
+ if (T && (T.dataset.inp = x.id, x.dataset.inpUsr = T.id, g.settings.editing))
75537
75526
  if (T.classList.contains("tiny")) {
75538
75527
  var D = tinymce.get(
75539
75528
  T.name
@@ -75541,7 +75530,9 @@ class DOe {
75541
75530
  D.on("change", function(Q) {
75542
75531
  g.prepareData();
75543
75532
  });
75544
- } else T.classList.contains("CodeEditor") ? console.log("CodeEditor") : T.addEventListener("change", function(Q) {
75533
+ } else T.classList.contains("CodeEditor") ? T.querySelector(".cm-content").cmView.view.state.docView.observer.on("docChanged", function() {
75534
+ g.prepareData(), console.log("docChanged");
75535
+ }) : T.addEventListener("change", function(Q) {
75545
75536
  g.prepareData();
75546
75537
  });
75547
75538
  var R = g.loadJsonField(x.value);
@@ -75606,18 +75597,14 @@ class DOe {
75606
75597
  var R = tinymce.get(o.getElementById(x).name);
75607
75598
  T = R.getContent();
75608
75599
  }
75609
- if (o.getElementById(x).classList.contains("CodeEditor")) {
75610
- let te = o.getElementById(x).querySelector(".cm-content").cmView.view.state.doc.toString();
75611
- T = te, console.log("CodeEditor"), console.log(te);
75612
- }
75613
- y.langSelectors.forEach(function(Q) {
75600
+ o.getElementById(x).classList.contains("CodeEditor") && (T = o.getElementById(x).querySelector(".cm-content").cmView.view.state.doc.toString()), y.langSelectors.forEach(function(Q) {
75614
75601
  var W = Q.value;
75615
75602
  D[W] = y.locale == W ? T : g.dataset[W];
75616
75603
  }), g.value = JSON.stringify(D), g.dataset[y.locale] = T;
75617
75604
  },
75618
75605
  loadLang: function(g, y) {
75619
75606
  var x = g.dataset.inpUsr, T = g.dataset[y];
75620
- if (console.log("loadLang"), console.log(x), console.log(T), !this.settings.editing)
75607
+ if (!this.settings.editing)
75621
75608
  this.settings.type === "tiny" ? o.getElementById(x).innerHTML = T : o.getElementById(x).textContent = T;
75622
75609
  else {
75623
75610
  var D = tinymce.get(x);
@@ -75625,7 +75612,7 @@ class DOe {
75625
75612
  D.setContent(T);
75626
75613
  else if (o.getElementById(x).classList.contains("CodeEditor")) {
75627
75614
  let Q = o.getElementById(x).querySelector(".cm-content").cmView.view;
75628
- Q.dispatch({ changes: { from: 0, to: Q.state.doc.length, insert: T } }), console.log("CodeEditor _val"), console.log(T);
75615
+ Q.dispatch({ changes: { from: 0, to: Q.state.doc.length, insert: T } });
75629
75616
  } else
75630
75617
  o.getElementById(x).value = T;
75631
75618
  }