form-builder-pro 1.3.8 → 1.3.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.css CHANGED
@@ -744,11 +744,6 @@ body {
744
744
  /* Slider thumb (Firefox) */
745
745
  /* Slider track (Firefox) */
746
746
  /* Width value badge animation */
747
- .width-value-badge {
748
- min-width: 40px;
749
- text-align: center;
750
- transition: transform 0.1s ease, background-color 0.15s ease;
751
- }
752
747
  /* Preset buttons */
753
748
  /* Breakpoint markers */
754
749
  /* ===== PHONE ISD SELECTOR STYLES ===== */
@@ -942,6 +937,9 @@ body {
942
937
  .mt-2 {
943
938
  margin-top: 0.5rem;
944
939
  }
940
+ .mt-3 {
941
+ margin-top: 0.75rem;
942
+ }
945
943
  .mt-4 {
946
944
  margin-top: 1rem;
947
945
  }
@@ -1041,6 +1039,9 @@ body {
1041
1039
  .w-full {
1042
1040
  width: 100%;
1043
1041
  }
1042
+ .min-w-0 {
1043
+ min-width: 0px;
1044
+ }
1044
1045
  .max-w-2xl {
1045
1046
  max-width: 42rem;
1046
1047
  }
@@ -1141,6 +1142,11 @@ body {
1141
1142
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
1142
1143
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
1143
1144
  }
1145
+ .space-y-4 > :not([hidden]) ~ :not([hidden]) {
1146
+ --tw-space-y-reverse: 0;
1147
+ margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
1148
+ margin-bottom: calc(1rem * var(--tw-space-y-reverse));
1149
+ }
1144
1150
  .space-y-6 > :not([hidden]) ~ :not([hidden]) {
1145
1151
  --tw-space-y-reverse: 0;
1146
1152
  margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
@@ -1184,6 +1190,9 @@ body {
1184
1190
  border-top-left-radius: var(--radius);
1185
1191
  border-top-right-radius: var(--radius);
1186
1192
  }
1193
+ .rounded-bl-md {
1194
+ border-bottom-left-radius: calc(var(--radius) - 2px);
1195
+ }
1187
1196
  .border {
1188
1197
  border-width: 1px;
1189
1198
  }
@@ -1196,6 +1205,9 @@ body {
1196
1205
  .border-l {
1197
1206
  border-left-width: 1px;
1198
1207
  }
1208
+ .border-l-2 {
1209
+ border-left-width: 2px;
1210
+ }
1199
1211
  .border-r {
1200
1212
  border-right-width: 1px;
1201
1213
  }
@@ -1208,6 +1220,9 @@ body {
1208
1220
  .border-dashed {
1209
1221
  border-style: dashed;
1210
1222
  }
1223
+ .border-\[\#635bff\]\/35 {
1224
+ border-color: rgb(99 91 255 / 0.35);
1225
+ }
1211
1226
  .border-\[\#e7e7ff\] {
1212
1227
  --tw-border-opacity: 1;
1213
1228
  border-color: rgb(231 231 255 / var(--tw-border-opacity, 1));
@@ -1381,12 +1396,24 @@ body {
1381
1396
  .pb-20 {
1382
1397
  padding-bottom: 5rem;
1383
1398
  }
1399
+ .pb-4 {
1400
+ padding-bottom: 1rem;
1401
+ }
1402
+ .pl-3 {
1403
+ padding-left: 0.75rem;
1404
+ }
1384
1405
  .pl-\[95px\] {
1385
1406
  padding-left: 95px;
1386
1407
  }
1408
+ .pt-0 {
1409
+ padding-top: 0px;
1410
+ }
1387
1411
  .pt-2 {
1388
1412
  padding-top: 0.5rem;
1389
1413
  }
1414
+ .pt-3 {
1415
+ padding-top: 0.75rem;
1416
+ }
1390
1417
  .text-center {
1391
1418
  text-align: center;
1392
1419
  }
@@ -1516,6 +1543,11 @@ body {
1516
1543
  .opacity-50 {
1517
1544
  opacity: 0.5;
1518
1545
  }
1546
+ .shadow-inner {
1547
+ --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
1548
+ --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);
1549
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1550
+ }
1519
1551
  .shadow-none {
1520
1552
  --tw-shadow: 0 0 #0000;
1521
1553
  --tw-shadow-colored: 0 0 #0000;
@@ -1536,13 +1568,13 @@ body {
1536
1568
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1537
1569
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1538
1570
  }
1571
+ .ring-\[\#635bff\] {
1572
+ --tw-ring-opacity: 1;
1573
+ --tw-ring-color: rgb(99 91 255 / var(--tw-ring-opacity, 1));
1574
+ }
1539
1575
  .ring-offset-background {
1540
1576
  --tw-ring-offset-color: hsl(var(--background));
1541
1577
  }
1542
- .blur {
1543
- --tw-blur: blur(8px);
1544
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1545
- }
1546
1578
  .filter {
1547
1579
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1548
1580
  }
@@ -1936,6 +1968,10 @@ input[type="radio"]:checked::after {
1936
1968
  opacity: 0.7;
1937
1969
  }
1938
1970
 
1971
+ .dark\:border-\[\#635bff\]\/50:is(.dark *) {
1972
+ border-color: rgb(99 91 255 / 0.5);
1973
+ }
1974
+
1939
1975
  .dark\:border-gray-600:is(.dark *) {
1940
1976
  --tw-border-opacity: 1;
1941
1977
  border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
@@ -1970,6 +2006,10 @@ input[type="radio"]:checked::after {
1970
2006
  background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
1971
2007
  }
1972
2008
 
2009
+ .dark\:bg-gray-800\/40:is(.dark *) {
2010
+ background-color: rgb(31 41 55 / 0.4);
2011
+ }
2012
+
1973
2013
  .dark\:bg-gray-800\/50:is(.dark *) {
1974
2014
  background-color: rgb(31 41 55 / 0.5);
1975
2015
  }
package/dist/index.d.mts CHANGED
@@ -156,6 +156,14 @@ interface ISDConfig {
156
156
  showCountryName: boolean;
157
157
  allowCustomCode: boolean;
158
158
  }
159
+ /** Group / section position on the form canvas (payload: groups[].position) */
160
+ interface GroupPosition {
161
+ row: number;
162
+ column: number;
163
+ /** Grid span 1–12 (group width on parent grid) */
164
+ width: number;
165
+ order: number;
166
+ }
159
167
  interface FormSection {
160
168
  id: string;
161
169
  title: string;
@@ -172,6 +180,20 @@ interface FormSection {
172
180
  class?: string;
173
181
  style?: Record<string, string>;
174
182
  };
183
+ /** API group name (payload groups[].name); mirrors title when set */
184
+ name?: string;
185
+ description?: string | null;
186
+ position?: GroupPosition;
187
+ /** Payload expanded (preferred); isExpanded kept for legacy */
188
+ expanded?: boolean;
189
+ visible?: boolean;
190
+ collapsible?: boolean;
191
+ parentGroupId?: string | null;
192
+ repeatable?: boolean;
193
+ dataKey?: string | null;
194
+ addButtonLabel?: string | null;
195
+ minInstances?: number | null;
196
+ maxInstances?: number | null;
175
197
  }
176
198
  interface FormSchema {
177
199
  id: string;
@@ -238,6 +260,7 @@ interface MasterType {
238
260
  interface FormState {
239
261
  schema: FormSchema;
240
262
  selectedFieldId: string | null;
263
+ selectedSectionId: string | null;
241
264
  history: FormSchema[];
242
265
  historyIndex: number;
243
266
  isPreviewMode: boolean;
@@ -280,6 +303,7 @@ interface FormActions {
280
303
  removeField: (fieldId: string) => void;
281
304
  updateField: (fieldId: string, updates: Partial<FormField>) => void;
282
305
  selectField: (fieldId: string | null) => void;
306
+ selectSection: (sectionId: string | null) => void;
283
307
  moveField: (fieldId: string, targetSectionId: string | null, newIndex: number) => void;
284
308
  undo: () => void;
285
309
  redo: () => void;
@@ -376,6 +400,15 @@ declare class FormBuilder {
376
400
  private renderImportList;
377
401
  private renderCanvas;
378
402
  private createCheckboxField;
403
+ /**
404
+ * Shared 1–12 grid span control (Field Settings + Group Settings).
405
+ */
406
+ private createGridSpanSelector;
407
+ /**
408
+ * Shared Styling block (Padding, Background, Alignment, CSS class, Advanced CSS) — same as Field Settings.
409
+ */
410
+ private appendSharedStylingSection;
411
+ private renderGroupSettingsPanel;
379
412
  private renderConfigPanel;
380
413
  private initSidebarSortables;
381
414
  }
@@ -415,7 +448,7 @@ declare const cleanFormSchema: (schema: any) => FormSchema;
415
448
  /**
416
449
  * Transforms Form Builder JSON to Platform JSON (standardized payload format)
417
450
  * @param builderSchema
418
- * @returns Standardized payload format
451
+ * @returns Standardized payload format (root `fields` + `groups` with fieldIds)
419
452
  */
420
453
  declare const builderToPlatform: (builderSchema: FormSchema) => any;
421
454
  /**
@@ -490,4 +523,4 @@ declare const initFormBuilder: (options: FormBuilderOptions & {
490
523
  containerId: string;
491
524
  }) => FormBuilder;
492
525
 
493
- export { type AsyncOptionSource, type DateConstraint, type FieldType, type FieldValidations, type FieldWidth, FormBuilder, type FormBuilderOptions, type FormField, FormRenderer, type FormSchema, FormSchemaValidation, type FormSection, type ISDConfig, LOOKUP_SOURCE_TYPE_OPTIONS, type LookupSourceType, type MasterType, type NameGeneratorFormat, type ValidationObject, type ValidationRule, builderToPlatform, cleanFormSchema, convertValidationObjectToArray, detectCircularDependency, evaluateFormula, formStore, generateName, getColSpanFromWidth, getNumericFieldsForFormula, getValidationConfigForAngular, initFormBuilder, parseFormulaDependencies, parseWidth, platformToBuilder, resetNameGeneratorCounter, validateFormula };
526
+ export { type AsyncOptionSource, type DateConstraint, type FieldType, type FieldValidations, type FieldWidth, FormBuilder, type FormBuilderOptions, type FormField, FormRenderer, type FormSchema, FormSchemaValidation, type FormSection, type GroupPosition, type ISDConfig, LOOKUP_SOURCE_TYPE_OPTIONS, type LookupSourceType, type MasterType, type NameGeneratorFormat, type ValidationObject, type ValidationRule, builderToPlatform, cleanFormSchema, convertValidationObjectToArray, detectCircularDependency, evaluateFormula, formStore, generateName, getColSpanFromWidth, getNumericFieldsForFormula, getValidationConfigForAngular, initFormBuilder, parseFormulaDependencies, parseWidth, platformToBuilder, resetNameGeneratorCounter, validateFormula };
package/dist/index.d.ts CHANGED
@@ -156,6 +156,14 @@ interface ISDConfig {
156
156
  showCountryName: boolean;
157
157
  allowCustomCode: boolean;
158
158
  }
159
+ /** Group / section position on the form canvas (payload: groups[].position) */
160
+ interface GroupPosition {
161
+ row: number;
162
+ column: number;
163
+ /** Grid span 1–12 (group width on parent grid) */
164
+ width: number;
165
+ order: number;
166
+ }
159
167
  interface FormSection {
160
168
  id: string;
161
169
  title: string;
@@ -172,6 +180,20 @@ interface FormSection {
172
180
  class?: string;
173
181
  style?: Record<string, string>;
174
182
  };
183
+ /** API group name (payload groups[].name); mirrors title when set */
184
+ name?: string;
185
+ description?: string | null;
186
+ position?: GroupPosition;
187
+ /** Payload expanded (preferred); isExpanded kept for legacy */
188
+ expanded?: boolean;
189
+ visible?: boolean;
190
+ collapsible?: boolean;
191
+ parentGroupId?: string | null;
192
+ repeatable?: boolean;
193
+ dataKey?: string | null;
194
+ addButtonLabel?: string | null;
195
+ minInstances?: number | null;
196
+ maxInstances?: number | null;
175
197
  }
176
198
  interface FormSchema {
177
199
  id: string;
@@ -238,6 +260,7 @@ interface MasterType {
238
260
  interface FormState {
239
261
  schema: FormSchema;
240
262
  selectedFieldId: string | null;
263
+ selectedSectionId: string | null;
241
264
  history: FormSchema[];
242
265
  historyIndex: number;
243
266
  isPreviewMode: boolean;
@@ -280,6 +303,7 @@ interface FormActions {
280
303
  removeField: (fieldId: string) => void;
281
304
  updateField: (fieldId: string, updates: Partial<FormField>) => void;
282
305
  selectField: (fieldId: string | null) => void;
306
+ selectSection: (sectionId: string | null) => void;
283
307
  moveField: (fieldId: string, targetSectionId: string | null, newIndex: number) => void;
284
308
  undo: () => void;
285
309
  redo: () => void;
@@ -376,6 +400,15 @@ declare class FormBuilder {
376
400
  private renderImportList;
377
401
  private renderCanvas;
378
402
  private createCheckboxField;
403
+ /**
404
+ * Shared 1–12 grid span control (Field Settings + Group Settings).
405
+ */
406
+ private createGridSpanSelector;
407
+ /**
408
+ * Shared Styling block (Padding, Background, Alignment, CSS class, Advanced CSS) — same as Field Settings.
409
+ */
410
+ private appendSharedStylingSection;
411
+ private renderGroupSettingsPanel;
379
412
  private renderConfigPanel;
380
413
  private initSidebarSortables;
381
414
  }
@@ -415,7 +448,7 @@ declare const cleanFormSchema: (schema: any) => FormSchema;
415
448
  /**
416
449
  * Transforms Form Builder JSON to Platform JSON (standardized payload format)
417
450
  * @param builderSchema
418
- * @returns Standardized payload format
451
+ * @returns Standardized payload format (root `fields` + `groups` with fieldIds)
419
452
  */
420
453
  declare const builderToPlatform: (builderSchema: FormSchema) => any;
421
454
  /**
@@ -490,4 +523,4 @@ declare const initFormBuilder: (options: FormBuilderOptions & {
490
523
  containerId: string;
491
524
  }) => FormBuilder;
492
525
 
493
- export { type AsyncOptionSource, type DateConstraint, type FieldType, type FieldValidations, type FieldWidth, FormBuilder, type FormBuilderOptions, type FormField, FormRenderer, type FormSchema, FormSchemaValidation, type FormSection, type ISDConfig, LOOKUP_SOURCE_TYPE_OPTIONS, type LookupSourceType, type MasterType, type NameGeneratorFormat, type ValidationObject, type ValidationRule, builderToPlatform, cleanFormSchema, convertValidationObjectToArray, detectCircularDependency, evaluateFormula, formStore, generateName, getColSpanFromWidth, getNumericFieldsForFormula, getValidationConfigForAngular, initFormBuilder, parseFormulaDependencies, parseWidth, platformToBuilder, resetNameGeneratorCounter, validateFormula };
526
+ export { type AsyncOptionSource, type DateConstraint, type FieldType, type FieldValidations, type FieldWidth, FormBuilder, type FormBuilderOptions, type FormField, FormRenderer, type FormSchema, FormSchemaValidation, type FormSection, type GroupPosition, type ISDConfig, LOOKUP_SOURCE_TYPE_OPTIONS, type LookupSourceType, type MasterType, type NameGeneratorFormat, type ValidationObject, type ValidationRule, builderToPlatform, cleanFormSchema, convertValidationObjectToArray, detectCircularDependency, evaluateFormula, formStore, generateName, getColSpanFromWidth, getNumericFieldsForFormula, getValidationConfigForAngular, initFormBuilder, parseFormulaDependencies, parseWidth, platformToBuilder, resetNameGeneratorCounter, validateFormula };