form-builder-pro 1.2.7 → 1.2.8
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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4321,10 +4321,12 @@ function convertSpanToWidth(span, totalColumns = 12) {
|
|
|
4321
4321
|
function normalizeFieldType(type) {
|
|
4322
4322
|
if (!type)
|
|
4323
4323
|
return "text";
|
|
4324
|
-
const normalized = String(type).toLowerCase();
|
|
4324
|
+
const normalized = String(type).toLowerCase().replace(/_/g, "");
|
|
4325
4325
|
if (normalized === "decimal")
|
|
4326
4326
|
return "number";
|
|
4327
|
-
|
|
4327
|
+
if (["phonenumber", "telephone", "mobile"].includes(normalized))
|
|
4328
|
+
return "phone";
|
|
4329
|
+
return String(type).toLowerCase();
|
|
4328
4330
|
}
|
|
4329
4331
|
function transformField(field) {
|
|
4330
4332
|
const fieldId = field.id || field.fieldId;
|
|
@@ -4469,6 +4471,8 @@ function transformField(field) {
|
|
|
4469
4471
|
transformed.enabled = field.enabled;
|
|
4470
4472
|
if (field.visible !== void 0)
|
|
4471
4473
|
transformed.visible = field.visible;
|
|
4474
|
+
if (field.isd !== void 0)
|
|
4475
|
+
transformed.isd = field.isd;
|
|
4472
4476
|
if (field.css !== void 0)
|
|
4473
4477
|
transformed.css = field.css;
|
|
4474
4478
|
if (field.optionsSource !== void 0)
|