@opencitylabs/formio-custom-components 0.7.7 → 0.7.9

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
@@ -7964,6 +7964,28 @@ var pr = e.components.select, mr = class extends fr(pr) {
7964
7964
  let t = pr.editForm(...e), n = (t.components?.find((e) => e.key === "tabs"))?.components?.find((e) => e.key === "data");
7965
7965
  return n?.components && n.components.push(dr), t;
7966
7966
  }
7967
+ choicesOptions() {
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;
7972
+ try {
7973
+ return {
7974
+ ...t,
7975
+ ...JSON.parse(e)
7976
+ };
7977
+ } catch {
7978
+ try {
7979
+ let n = Function("instance", `return (${e})`)(this);
7980
+ return {
7981
+ ...t,
7982
+ ...n
7983
+ };
7984
+ } catch (e) {
7985
+ return console.warn("Select customOptions eval error:", e.message), t;
7986
+ }
7987
+ }
7988
+ }
7967
7989
  attach(e) {
7968
7990
  let t = super.attach(e);
7969
7991
  return (Array.isArray(this.refs.autocompleteInput) ? this.refs.autocompleteInput : [this.refs.autocompleteInput]).forEach((e) => {