form-builder-pro 1.0.9 → 1.0.10

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.d.mts CHANGED
@@ -39,6 +39,7 @@ interface FormField {
39
39
  id: string;
40
40
  name: string;
41
41
  };
42
+ masterTypeName?: string;
42
43
  enabled?: boolean;
43
44
  visible?: boolean;
44
45
  }
@@ -234,8 +235,8 @@ declare class FormRenderer {
234
235
  /**
235
236
  * Cleans a form schema by removing invalid properties and normalizing field types
236
237
  * - Converts "decimal" type to "number"
237
- * - Removes invalid properties like "masterTypeName"
238
238
  * - Removes empty options arrays from non-select/radio fields
239
+ * - Preserves masterTypeName for select fields with groupName
239
240
  * @param schema
240
241
  * @returns Cleaned schema
241
242
  */
package/dist/index.d.ts CHANGED
@@ -39,6 +39,7 @@ interface FormField {
39
39
  id: string;
40
40
  name: string;
41
41
  };
42
+ masterTypeName?: string;
42
43
  enabled?: boolean;
43
44
  visible?: boolean;
44
45
  }
@@ -234,8 +235,8 @@ declare class FormRenderer {
234
235
  /**
235
236
  * Cleans a form schema by removing invalid properties and normalizing field types
236
237
  * - Converts "decimal" type to "number"
237
- * - Removes invalid properties like "masterTypeName"
238
238
  * - Removes empty options arrays from non-select/radio fields
239
+ * - Preserves masterTypeName for select fields with groupName
239
240
  * @param schema
240
241
  * @returns Cleaned schema
241
242
  */
package/dist/index.js CHANGED
@@ -4188,6 +4188,9 @@ var cleanFormSchema = (schema) => {
4188
4188
  if (field.type === "select" && field.groupName) {
4189
4189
  cleaned.groupName = field.groupName;
4190
4190
  }
4191
+ if (field.type === "select" && field.masterTypeName !== void 0) {
4192
+ cleaned.masterTypeName = field.masterTypeName;
4193
+ }
4191
4194
  return cleaned;
4192
4195
  };
4193
4196
  return {
@@ -8001,6 +8004,7 @@ var FormBuilder = class {
8001
8004
  id: selectedMasterType.id,
8002
8005
  name: selectedMasterType.name
8003
8006
  },
8007
+ masterTypeName: selectedEnumName,
8004
8008
  options: options.length > 0 ? options : void 0
8005
8009
  });
8006
8010
  if (this.options.onGroupSelectionChange) {
@@ -8013,6 +8017,7 @@ var FormBuilder = class {
8013
8017
  } else {
8014
8018
  formStore.getState().updateField(selectedField.id, {
8015
8019
  groupName: void 0,
8020
+ masterTypeName: void 0,
8016
8021
  options: void 0
8017
8022
  // Clear options when groupName is cleared
8018
8023
  });