@stubber/form-fields 2.2.3 → 2.2.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.
@@ -93,6 +93,9 @@ export const final_field_type = (f, allow_dynamic_switching) => {
93
93
  }
94
94
  if (f.fieldtype === "select") {
95
95
  const options = f.params?.options || [];
96
+ if (!Array.isArray(options)) {
97
+ return "smart_text";
98
+ }
96
99
  const has_value_in_options = options.some((opt) => opt.value === f.value);
97
100
  if (has_value_in_options) {
98
101
  return "select";
@@ -19,11 +19,8 @@ async function setup_intl_tel_input(input_element) {
19
19
  const data = await res.json();
20
20
  return data?.country_code || "us";
21
21
  },
22
- separateDialCode: false
23
- });
24
- const itis = document.querySelectorAll("div.iti");
25
- itis.forEach((iti2) => {
26
- iti2.style["width"] = "100%";
22
+ separateDialCode: false,
23
+ containerClass: "w-full"
27
24
  });
28
25
  input_element.addEventListener("countrychange", () => set_number_details());
29
26
  await iti.promise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubber/form-fields",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "An automatic form builder based on field specifications",
5
5
  "keywords": [
6
6
  "components",