@opencitylabs/formio-custom-components 0.7.8 → 0.7.10

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/index.js CHANGED
@@ -6806,7 +6806,7 @@ var Jn = ({ component: e, current: t, onChange: n, i18next: o }) => {
6806
6806
  return t.conditionallyHidden() || t.visible === !1 ? null : /* @__PURE__ */ i(r, { children: p ? /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ a("label", {
6807
6807
  className: "col-form-label floating-label",
6808
6808
  htmlFor: `${e.id}-${e.key}`,
6809
- children: [e.label, e.validate.required && /* @__PURE__ */ i("span", { className: "text-danger" })]
6809
+ children: [o.t(e.label), e.validate.required && /* @__PURE__ */ i("span", { className: "text-danger" })]
6810
6810
  }), /* @__PURE__ */ a("ul", {
6811
6811
  className: "upload-file-list",
6812
6812
  children: [c.map((e, t) => /* @__PURE__ */ a("li", {
@@ -6844,7 +6844,7 @@ var Jn = ({ component: e, current: t, onChange: n, i18next: o }) => {
6844
6844
  htmlFor: `${e.id}-${e.key}`,
6845
6845
  title: e.tooltip || void 0,
6846
6846
  children: [
6847
- e.label,
6847
+ o.t(e.label),
6848
6848
  e.validate.required && /* @__PURE__ */ i("span", { className: "text-danger" }),
6849
6849
  e.tooltip && /* @__PURE__ */ i("i", {
6850
6850
  tabIndex: 0,
@@ -7965,19 +7965,24 @@ var pr = e.components.select, mr = class extends fr(pr) {
7965
7965
  return n?.components && n.components.push(dr), t;
7966
7966
  }
7967
7967
  choicesOptions() {
7968
- let e = super.choicesOptions(), t = this.component.customOptions;
7969
- if (typeof t != "string" || !t.trim()) return e;
7968
+ let e = this.component.customOptions;
7969
+ this.component.customOptions = void 0;
7970
+ let t = super.choicesOptions();
7971
+ if (this.component.customOptions = e, typeof e != "string" || !e.trim()) return t;
7970
7972
  try {
7971
- return JSON.parse(t), e;
7973
+ return {
7974
+ ...t,
7975
+ ...JSON.parse(e)
7976
+ };
7972
7977
  } catch {
7973
7978
  try {
7974
- let n = Function("instance", `return (${t})`)(this);
7979
+ let n = Function("instance", `return (${e})`)(this);
7975
7980
  return {
7976
- ...e,
7981
+ ...t,
7977
7982
  ...n
7978
7983
  };
7979
- } catch (t) {
7980
- return console.warn("Select customOptions eval error:", t.message), e;
7984
+ } catch (e) {
7985
+ return console.warn("Select customOptions eval error:", e.message), t;
7981
7986
  }
7982
7987
  }
7983
7988
  }