@opencitylabs/formio-custom-components 0.7.8 → 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.iife.js +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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 =
|
|
7969
|
-
|
|
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
|
|
7973
|
+
return {
|
|
7974
|
+
...t,
|
|
7975
|
+
...JSON.parse(e)
|
|
7976
|
+
};
|
|
7972
7977
|
} catch {
|
|
7973
7978
|
try {
|
|
7974
|
-
let n = Function("instance", `return (${
|
|
7979
|
+
let n = Function("instance", `return (${e})`)(this);
|
|
7975
7980
|
return {
|
|
7976
|
-
...
|
|
7981
|
+
...t,
|
|
7977
7982
|
...n
|
|
7978
7983
|
};
|
|
7979
|
-
} catch (
|
|
7980
|
-
return console.warn("Select customOptions eval error:",
|
|
7984
|
+
} catch (e) {
|
|
7985
|
+
return console.warn("Select customOptions eval error:", e.message), t;
|
|
7981
7986
|
}
|
|
7982
7987
|
}
|
|
7983
7988
|
}
|