@opencitylabs/formio-custom-components 0.8.3 → 0.8.5

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
@@ -7985,26 +7985,31 @@ var mr = e.components.select, hr = {
7985
7985
  let e = this.component.customOptions;
7986
7986
  this.component.customOptions = void 0;
7987
7987
  let t = super.choicesOptions();
7988
- if (this.component.customOptions = e, typeof e != "string" || !e.trim()) return t;
7988
+ this.component.customOptions = e;
7989
+ let n = (e, t) => e === t ? !0 : e !== null && t !== null && typeof e == "object" && typeof t == "object" ? JSON.stringify(e) === JSON.stringify(t) : String(e) === String(t), r = {
7990
+ ...t,
7991
+ valueComparer: n
7992
+ };
7993
+ if (typeof e != "string" || !e.trim()) return r;
7989
7994
  try {
7990
7995
  return {
7991
- ...t,
7996
+ ...r,
7992
7997
  ...JSON.parse(e)
7993
7998
  };
7994
7999
  } catch {
7995
8000
  try {
7996
- let n = Function("instance", `return (${e})`)(this);
8001
+ let t = Function("instance", `return (${e})`)(this);
7997
8002
  return {
7998
- ...t,
7999
- ...n
8003
+ ...r,
8004
+ ...t
8000
8005
  };
8001
8006
  } catch (e) {
8002
- return console.warn("Select customOptions eval error:", e.message), t;
8007
+ return console.warn("Select customOptions eval error:", e.message), r;
8003
8008
  }
8004
8009
  }
8005
8010
  }
8006
8011
  attach(e) {
8007
- this.options.readOnly && this.itemsFromUrl && (this.activated = !0);
8012
+ this.options.readOnly && (this.activated = !0);
8008
8013
  let t = super.attach(e);
8009
8014
  return (Array.isArray(this.refs.autocompleteInput) ? this.refs.autocompleteInput : [this.refs.autocompleteInput]).forEach((e) => {
8010
8015
  e?.parentNode && e.parentNode.removeChild(e);