@syncfusion/ej2-react-form-builder 0.1.0-beta

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.
Files changed (145) hide show
  1. package/Common/CheckboxGroup.d.ts +13 -0
  2. package/Common/CheckboxGroup.js +50 -0
  3. package/Common/ConditionalRuleEngine.d.ts +296 -0
  4. package/Common/ConditionalRuleEngine.js +566 -0
  5. package/Common/CustomTabComponent.d.ts +17 -0
  6. package/Common/CustomTabComponent.js +30 -0
  7. package/Common/CustomValidationEngine.d.ts +58 -0
  8. package/Common/CustomValidationEngine.js +146 -0
  9. package/Common/DataGridComponent.d.ts +20 -0
  10. package/Common/DataGridComponent.js +273 -0
  11. package/Common/FormValidator.d.ts +485 -0
  12. package/Common/FormValidator.js +575 -0
  13. package/Common/MinMaxRuleEngine.d.ts +105 -0
  14. package/Common/MinMaxRuleEngine.js +365 -0
  15. package/Common/StaticHtmlRenderer.d.ts +14 -0
  16. package/Common/StaticHtmlRenderer.js +24 -0
  17. package/Common/expressions/DependencyTracker.d.ts +30 -0
  18. package/Common/expressions/DependencyTracker.js +128 -0
  19. package/Common/expressions/ExpressionEngine.d.ts +95 -0
  20. package/Common/expressions/ExpressionEngine.js +506 -0
  21. package/Common/expressions/ExpressionParser.d.ts +41 -0
  22. package/Common/expressions/ExpressionParser.js +269 -0
  23. package/Common/expressions/useGridExpressions.d.ts +12 -0
  24. package/Common/expressions/useGridExpressions.js +71 -0
  25. package/Common/globalFormId.d.ts +26 -0
  26. package/Common/globalFormId.js +45 -0
  27. package/Common/json-converter.d.ts +444 -0
  28. package/Common/json-converter.js +1184 -0
  29. package/Common/parser.d.ts +98 -0
  30. package/Common/parser.js +753 -0
  31. package/Common/utils.d.ts +130 -0
  32. package/Common/utils.js +574 -0
  33. package/README.md +53 -0
  34. package/index.d.ts +6 -0
  35. package/index.js +6 -0
  36. package/license +13 -0
  37. package/package.json +54 -0
  38. package/src/FormBuilder.d.ts +211 -0
  39. package/src/FormBuilder.js +1299 -0
  40. package/src/components/Database/ConnectionForm.d.ts +8 -0
  41. package/src/components/Database/ConnectionForm.js +28 -0
  42. package/src/components/TopBar.d.ts +10 -0
  43. package/src/components/TopBar.js +7 -0
  44. package/src/components/icons/ComponentIcons.d.ts +44 -0
  45. package/src/components/icons/ComponentIcons.js +40 -0
  46. package/src/components/layout/FormFieldWrapper.d.ts +41 -0
  47. package/src/components/layout/FormFieldWrapper.js +112 -0
  48. package/src/components/layout/LeftPane.d.ts +23 -0
  49. package/src/components/layout/LeftPane.js +310 -0
  50. package/src/components/layout/ListBoxPane.d.ts +24 -0
  51. package/src/components/layout/ListBoxPane.js +94 -0
  52. package/src/components/layout/MainSection.d.ts +39 -0
  53. package/src/components/layout/MainSection.js +1766 -0
  54. package/src/components/layout/Preview.d.ts +12 -0
  55. package/src/components/layout/Preview.js +337 -0
  56. package/src/components/layout/RightPane.d.ts +22 -0
  57. package/src/components/layout/RightPane.js +370 -0
  58. package/src/components/theme/ThemeSwitcher.d.ts +14 -0
  59. package/src/components/theme/ThemeSwitcher.js +24 -0
  60. package/src/components/theme/theme-constant.d.ts +37 -0
  61. package/src/components/theme/theme-constant.js +23 -0
  62. package/src/config/component-properties.json +4929 -0
  63. package/src/config/form-setting.json +56 -0
  64. package/src/config/locale.d.ts +449 -0
  65. package/src/config/locale.js +449 -0
  66. package/src/context/FormSchemaContext.d.ts +32 -0
  67. package/src/context/FormSchemaContext.js +155 -0
  68. package/src/context/LocalizationContext.d.ts +27 -0
  69. package/src/context/LocalizationContext.js +43 -0
  70. package/src/context/ThemeContext.d.ts +23 -0
  71. package/src/context/ThemeContext.js +161 -0
  72. package/src/context/contexts.d.ts +6 -0
  73. package/src/context/contexts.js +6 -0
  74. package/src/context/defaultFormSchema.d.ts +6 -0
  75. package/src/context/defaultFormSchema.js +20 -0
  76. package/src/defaultPalette.d.ts +9 -0
  77. package/src/defaultPalette.js +45 -0
  78. package/src/defaultTemplate.d.ts +3 -0
  79. package/src/defaultTemplate.js +185 -0
  80. package/src/import/schemaImportUtils.d.ts +24 -0
  81. package/src/import/schemaImportUtils.js +121 -0
  82. package/src/index.d.ts +16 -0
  83. package/src/index.js +6 -0
  84. package/src/types/ActionButtons.d.ts +44 -0
  85. package/src/types/ActionButtons.js +27 -0
  86. package/src/types/ComponentProperties.d.ts +33 -0
  87. package/src/types/ComponentProperties.js +2 -0
  88. package/src/types/FormSchema.d.ts +585 -0
  89. package/src/types/FormSchema.js +147 -0
  90. package/src/types/connection.d.ts +19 -0
  91. package/src/types/connection.js +9 -0
  92. package/src/utils/AttributesEditor.d.ts +13 -0
  93. package/src/utils/AttributesEditor.js +117 -0
  94. package/src/utils/ButtonGroupEditor.d.ts +15 -0
  95. package/src/utils/ButtonGroupEditor.js +141 -0
  96. package/src/utils/ChoiceBasedFieldEditor.d.ts +16 -0
  97. package/src/utils/ChoiceBasedFieldEditor.js +87 -0
  98. package/src/utils/ClipboardHelper.d.ts +26 -0
  99. package/src/utils/ClipboardHelper.js +83 -0
  100. package/src/utils/ColumnBuilder.d.ts +11 -0
  101. package/src/utils/ColumnBuilder.js +153 -0
  102. package/src/utils/ColumnSpanEditor.d.ts +8 -0
  103. package/src/utils/ColumnSpanEditor.js +98 -0
  104. package/src/utils/ConditionDataEditor.d.ts +29 -0
  105. package/src/utils/ConditionDataEditor.js +177 -0
  106. package/src/utils/ConditionalEditorUtils.d.ts +27 -0
  107. package/src/utils/ConditionalEditorUtils.js +310 -0
  108. package/src/utils/ConditionsEditor.d.ts +20 -0
  109. package/src/utils/ConditionsEditor.js +571 -0
  110. package/src/utils/CustomAccordion.d.ts +13 -0
  111. package/src/utils/CustomAccordion.js +38 -0
  112. package/src/utils/CustomValidationEditor.d.ts +11 -0
  113. package/src/utils/CustomValidationEditor.js +208 -0
  114. package/src/utils/DataSourceCollector.d.ts +3 -0
  115. package/src/utils/DataSourceCollector.js +252 -0
  116. package/src/utils/ExpressionEditor.d.ts +13 -0
  117. package/src/utils/ExpressionEditor.js +99 -0
  118. package/src/utils/FormSettingsPanel.d.ts +9 -0
  119. package/src/utils/FormSettingsPanel.js +60 -0
  120. package/src/utils/LookupConfig.d.ts +11 -0
  121. package/src/utils/LookupConfig.js +159 -0
  122. package/src/utils/MinMaxValueEditor.d.ts +25 -0
  123. package/src/utils/MinMaxValueEditor.js +188 -0
  124. package/src/utils/OptionsEditor.d.ts +8 -0
  125. package/src/utils/OptionsEditor.js +79 -0
  126. package/src/utils/PropertyRenderer.d.ts +22 -0
  127. package/src/utils/PropertyRenderer.js +210 -0
  128. package/src/utils/ValueRenderer.d.ts +2 -0
  129. package/src/utils/ValueRenderer.js +91 -0
  130. package/src/utils/ej2DbAdaptor.d.ts +6 -0
  131. package/src/utils/ej2DbAdaptor.js +38 -0
  132. package/src/utils/mappingHeuristics.d.ts +10 -0
  133. package/src/utils/mappingHeuristics.js +33 -0
  134. package/src/utils/renderComponent.d.ts +18 -0
  135. package/src/utils/renderComponent.js +300 -0
  136. package/styles/tailwind3.css +67 -0
  137. package/styles/themes/action-buttons.css +110 -0
  138. package/styles/themes/datagrid.css +380 -0
  139. package/styles/themes/drag-reorder.css +248 -0
  140. package/styles/themes/import-dialog.css +292 -0
  141. package/styles/themes/index.css +658 -0
  142. package/styles/themes/left-pane.css +253 -0
  143. package/styles/themes/options-editor.css +63 -0
  144. package/styles/themes/preview.css +702 -0
  145. package/styles/themes/property-dialog.css +371 -0
@@ -0,0 +1,585 @@
1
+ import type { visualMode } from "@syncfusion/ej2-react-dropdowns";
2
+ import type { RuleModel } from "@syncfusion/ej2-react-querybuilder";
3
+ import type { LayoutNode, FieldProperties } from "../../Common/json-converter";
4
+ /**
5
+ * Represents a pre-defined form template that can be loaded into the Form Builder.
6
+ * Templates can be used to create custom components and frequently used form element structures.
7
+ */
8
+ export interface DefaultTemplates {
9
+ /** Specifies the unique identifier for the template */
10
+ id: string;
11
+ /** Specifies the display title shown in the template palette */
12
+ title: string;
13
+ /** Specifies the JSON schema payload of the template */
14
+ schema?: any;
15
+ }
16
+ /**
17
+ * Represents the category of components in the Form Builder
18
+ * @private
19
+ */
20
+ export declare enum ComponentCategory {
21
+ /**
22
+ * Specifies the basic set of form components in the Form Builder
23
+ */
24
+ BASIC = "basic",
25
+ /**
26
+ * Specifies the advanced set of form components in the Form Builder
27
+ */
28
+ ADVANCED = "advanced",
29
+ /**
30
+ * Specifies the layout components in the Form Builder
31
+ */
32
+ LAYOUT = "layout"
33
+ }
34
+ /**
35
+ * Represents the components supported in the Form Builder.
36
+ */
37
+ export declare enum FormComponentType {
38
+ /**
39
+ * Specifies the text box component.
40
+ */
41
+ TEXTBOX = "textbox",
42
+ /**
43
+ * Specifies the text area component.
44
+ */
45
+ TEXTAREA = "textarea",
46
+ /**
47
+ * Specifies the check box component.
48
+ */
49
+ CHECKBOX = "checkbox",
50
+ /**
51
+ * Specifies the radio button component.
52
+ */
53
+ RADIO = "radio",
54
+ /**
55
+ * Specifies the numeric text box component.
56
+ */
57
+ NUMBER = "number",
58
+ /**
59
+ * Specifies the masked text box component.
60
+ */
61
+ INPUT_MASK = "inputMask",
62
+ /**
63
+ * Specifies the dropdown list component.
64
+ */
65
+ DROPDOWN = "dropdown",
66
+ /**
67
+ * Specifies the date picker component.
68
+ */
69
+ DATE = "date",
70
+ /**
71
+ * Specifies the button component.
72
+ */
73
+ BUTTON = "button",
74
+ /**
75
+ * Specifies the check box component for multiple choice selection.
76
+ */
77
+ CHECKBOX_GROUP = "checkboxGroup",
78
+ /**
79
+ * Specifies the multiselect component for multiple choice selection.
80
+ */
81
+ MULTISELECT = "multiselect",
82
+ /**
83
+ * Specifies the date time picker component.
84
+ */
85
+ DATE_TIME = "dateTime",
86
+ /**
87
+ * Specifies the time picker component.
88
+ */
89
+ TIME = "time",
90
+ /**
91
+ * Specifies the date range picker component.
92
+ */
93
+ DATE_RANGE = "dateRange",
94
+ /**
95
+ * Specifies the switch component.
96
+ */
97
+ SWITCH = "switch",
98
+ /**
99
+ * Specifies the rating component.
100
+ */
101
+ RATING = "rating",
102
+ /**
103
+ * Specifies the splitbutton component.
104
+ */
105
+ SPLIT_BUTTON = "splitButton",
106
+ /**
107
+ * Specifies the range slider component.
108
+ */
109
+ RANGE_SLIDER = "rangeSlider",
110
+ /**
111
+ * Specifies the signature component.
112
+ */
113
+ SIGNATURE = "signature",
114
+ /**
115
+ * Specifies the image editor component.
116
+ */
117
+ IMAGE_EDITOR = "imageEditor",
118
+ /**
119
+ * Specifies the file upload component.
120
+ */
121
+ FILE_UPLOAD = "fileUpload",
122
+ COLOR_PICKER = "colorPicker",
123
+ /**
124
+ * Specifies the rich text editor component.
125
+ */
126
+ RICH_TEXT_EDITOR = "richTextEditor",
127
+ /**
128
+ * Specifies the data grid component.
129
+ */
130
+ DATA_GRID = "dataGrid",
131
+ /**
132
+ * Specifies the message component.
133
+ */
134
+ MESSAGE = "message",
135
+ /**
136
+ * Specifies the panel element for layouting.
137
+ */
138
+ PANEL = "panel",
139
+ /**
140
+ * Specifies the table element for layouting.
141
+ */
142
+ TABLE = "table",
143
+ /**
144
+ * Specifies the tab component for layouting.
145
+ */
146
+ TABS = "tabs",
147
+ /**
148
+ * Specifies the card element for layouting.
149
+ */
150
+ CARD = "card",
151
+ /**
152
+ * Specifies the lookup component for associating the data from other forms in the current form.
153
+ */
154
+ LOOKUP = "lookup",
155
+ /**
156
+ * Specifies the HTML element that can be rendered in the form.
157
+ */
158
+ STATIC_HTML = "staticHtml",
159
+ AUTO_NUMBER = "autoNumber"
160
+ }
161
+ /**
162
+ * @private
163
+ */
164
+ export interface PaletteComponent {
165
+ /** The type identifier of the component (e.g., 'textbox', 'dropdown') */
166
+ type: string;
167
+ /** Display label shown in the palette UI */
168
+ label: string;
169
+ /** Optional CSS icon class for the component representation in the palette */
170
+ icon?: string;
171
+ /** Category grouping for the palette ('basic', 'layout', 'advanced', 'data', or 'templates') */
172
+ category?: 'basic' | 'layout' | 'advanced' | 'data' | 'templates';
173
+ /** Indicates if this palette item is a pre-defined template */
174
+ isTemplate?: boolean;
175
+ /** Template data associated with the item, if `isTemplate` is true */
176
+ templateData?: DefaultTemplates;
177
+ }
178
+ /**
179
+ * Minimal representation of a palette item, containing only the component type.
180
+ * @private
181
+ */
182
+ export type PaletteItem = Pick<PaletteComponent, 'type'>;
183
+ /**
184
+ * Palette configuration - allows users to control which components appear in each category
185
+ * @private
186
+ */
187
+ export interface PaletteConfig {
188
+ /** List of basic components to display in the palette */
189
+ [ComponentCategory.BASIC]?: PaletteItem[];
190
+ /** List of advanced components to display in the palette */
191
+ [ComponentCategory.ADVANCED]?: PaletteItem[];
192
+ /** List of layout components to display in the palette */
193
+ [ComponentCategory.LAYOUT]?: PaletteItem[];
194
+ }
195
+ /**
196
+ * @private
197
+ */
198
+ export type ConditionalOperator = 'equal' | 'notEqual' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'in' | 'notIn' | 'contains' | 'notContains';
199
+ /**
200
+ * @private
201
+ */
202
+ export interface ConditionalRule {
203
+ field: string;
204
+ operator: ConditionalOperator;
205
+ value: any;
206
+ }
207
+ /**
208
+ * @private
209
+ */
210
+ export interface CompositeConditionalRule {
211
+ condition: 'and' | 'or';
212
+ rules: (ConditionalRule | CompositeConditionalRule)[];
213
+ }
214
+ /**
215
+ * @private
216
+ */
217
+ export type ConditionType = ConditionalRule | CompositeConditionalRule;
218
+ /**
219
+ * @private
220
+ */
221
+ export interface DataSourceCollectorProps {
222
+ value: string[] | {
223
+ type: 'url' | 'raw' | 'options' | 'lookup';
224
+ url?: string;
225
+ headers?: HeaderPair[];
226
+ data?: string[];
227
+ search?: SearchConfig;
228
+ sort?: SortConfig;
229
+ filters?: FilterConfig[];
230
+ adaptorType?: string;
231
+ take?: number;
232
+ skip?: number;
233
+ dataPath?: string;
234
+ formName?: any;
235
+ };
236
+ onChange: (data: string[] | any) => void;
237
+ type?: string;
238
+ datakey?: string;
239
+ isAccordion?: boolean;
240
+ }
241
+ /**
242
+ * @private
243
+ */
244
+ export interface HeaderPair {
245
+ key: string;
246
+ value: string;
247
+ }
248
+ /**
249
+ * @private
250
+ */
251
+ export interface SearchConfig {
252
+ enabled: boolean;
253
+ fields: string[];
254
+ key?: string;
255
+ }
256
+ /**
257
+ * @private
258
+ */
259
+ export interface SortConfig {
260
+ enabled: boolean;
261
+ field: string;
262
+ direction: 'ascending' | 'descending';
263
+ }
264
+ /**
265
+ * @private
266
+ */
267
+ export interface FilterConfig {
268
+ field: string;
269
+ operator: string;
270
+ value: any;
271
+ }
272
+ /**
273
+ * @private
274
+ */
275
+ export interface ChoiceBasedFieldRule {
276
+ primaryFieldId: string;
277
+ choiceMapping: Record<string, string[]>;
278
+ showAllWhenNotMapped?: boolean;
279
+ }
280
+ /**
281
+ * @private
282
+ */
283
+ export interface ConditionalDataRule {
284
+ condition: ConditionType;
285
+ dataSource: DataSourceCollectorProps['value'];
286
+ columns?: GridColumn[];
287
+ includeColumns?: boolean;
288
+ }
289
+ /**
290
+ * @private
291
+ */
292
+ export interface FormComponentConditions {
293
+ visibleWhen?: ConditionType;
294
+ hideWhen?: ConditionType;
295
+ readOnlyWhen?: ConditionType;
296
+ disabledWhen?: ConditionType;
297
+ requiredWhen?: ConditionType;
298
+ setValueWhen?: {
299
+ condition: ConditionType;
300
+ value: any;
301
+ };
302
+ choiceBasedField?: ChoiceBasedFieldRule;
303
+ conditionalData?: ConditionalDataRule[];
304
+ }
305
+ /**
306
+ * @private
307
+ */
308
+ export interface MinMaxRangeConfig {
309
+ minMode?: 'value' | 'field';
310
+ minValue?: number | string | {
311
+ field: string;
312
+ };
313
+ maxMode?: 'value' | 'field';
314
+ maxValue?: number | string | {
315
+ field: string;
316
+ };
317
+ }
318
+ /**
319
+ * @private
320
+ */
321
+ export interface LookupConfig {
322
+ formName: string;
323
+ field: string;
324
+ }
325
+ /**
326
+ * @private
327
+ */
328
+ export interface CustomValidationRule {
329
+ condition?: RuleModel;
330
+ expression: string;
331
+ }
332
+ /**
333
+ * @private
334
+ */
335
+ export interface FormComponent {
336
+ id: string;
337
+ type: 'textbox' | 'textarea' | 'number' | 'checkbox' | 'checkboxGroup' | 'radio' | 'dropdown' | 'multiselect' | 'button' | 'date' | 'dateTime' | 'time' | 'dateRange' | 'switch' | 'signature' | 'rating' | 'imageEditor' | 'fileUpload' | 'rangeSlider' | 'colorPicker' | 'inputMask' | 'message' | 'panel' | 'table' | 'tabs' | 'dataGrid' | 'staticHtml' | 'card' | 'splitButton' | 'richTextEditor' | 'autoNumber' | 'lookup';
338
+ textboxType?: string;
339
+ label: string;
340
+ name: string;
341
+ description?: string | undefined;
342
+ prefix?: string | undefined;
343
+ suffix?: string | undefined;
344
+ hideBorders?: boolean;
345
+ placeholder?: string;
346
+ defaultValue?: any;
347
+ disabled?: boolean;
348
+ visible?: boolean;
349
+ tooltip?: string;
350
+ hideLabel?: boolean;
351
+ cssClass?: string;
352
+ multiline?: boolean;
353
+ showClearButton?: boolean;
354
+ showCloseIcon?: boolean;
355
+ showIcon?: boolean;
356
+ variant?: string;
357
+ severity?: string;
358
+ content?: string;
359
+ showTodayButton?: boolean;
360
+ htmlAttributes?: Record<string, any>;
361
+ labelPosition?: 'top' | 'bottom' | 'left' | 'right';
362
+ position?: 'center' | 'left' | 'right';
363
+ fieldLabelPosition?: 'After' | 'Before';
364
+ labelWidth?: string;
365
+ floatLabelType?: 'Never' | 'Always' | 'Auto';
366
+ readOnly?: boolean;
367
+ autocomplete?: boolean;
368
+ cols?: number;
369
+ textareaRows?: number;
370
+ checked?: boolean;
371
+ indeterminate?: boolean;
372
+ enableHtmlSanitizer?: boolean;
373
+ offLabel?: string;
374
+ onLabel?: string;
375
+ buttonType?: 'button' | 'submit';
376
+ iconCss?: string;
377
+ iconPosition?: 'Left' | 'Right';
378
+ style?: string;
379
+ buttonsGroups?: ButtonDefinition[] | [];
380
+ gap?: string;
381
+ decimals?: number;
382
+ currency?: string;
383
+ format?: string;
384
+ numberFormat?: string;
385
+ allowReset?: boolean;
386
+ itemsCount?: number;
387
+ precision?: number | string;
388
+ showRatingTooltip?: boolean;
389
+ showRatingLabel?: boolean;
390
+ ratingLabelPosition?: 'top' | 'bottom' | 'left' | 'right';
391
+ height?: string | number;
392
+ width?: string | number;
393
+ backgroundColor?: string;
394
+ strokeColor?: string;
395
+ maximumStrokeWidth?: number;
396
+ minimumStrokeWidth?: number;
397
+ velocity?: number;
398
+ enableOpacity?: boolean;
399
+ showNoColor?: boolean;
400
+ showButtons?: boolean;
401
+ showRecentColors?: boolean;
402
+ orientation?: 'Horizontal' | 'Vertical';
403
+ allowExtensions?: string;
404
+ saveUrl?: string;
405
+ removeUrl?: string;
406
+ buttons?: {};
407
+ allowMultiple?: boolean;
408
+ showFileList?: boolean;
409
+ calendarMode?: string;
410
+ dayHeaderFormat?: string;
411
+ depth?: string;
412
+ firstDayOfWeek?: number;
413
+ start?: string;
414
+ allowEdit?: boolean;
415
+ enabled?: boolean;
416
+ timeFormat?: string;
417
+ step?: number;
418
+ startDate?: string;
419
+ endDate?: string;
420
+ separator?: string;
421
+ mask?: string;
422
+ customCharacters?: Record<string, string>;
423
+ promptChar?: string;
424
+ allowCustomValue?: boolean;
425
+ addTagOnBlur?: boolean;
426
+ delimiterChar?: string;
427
+ visualMode?: visualMode;
428
+ showSelectAll?: boolean;
429
+ selectAllText?: string;
430
+ unSelectAllText?: string;
431
+ showDropDownIcon?: boolean;
432
+ validateOn?: 'Change' | 'Blur';
433
+ pageSize?: number;
434
+ size?: string;
435
+ allowPaging?: boolean;
436
+ allowAdding?: boolean;
437
+ allowEditing?: boolean;
438
+ allowFiltering?: boolean;
439
+ allowDeleting?: boolean;
440
+ dataSource?: [];
441
+ required?: boolean;
442
+ minLength?: number;
443
+ maxLength?: number;
444
+ min?: number;
445
+ max?: number;
446
+ minDate?: string;
447
+ maxDate?: string;
448
+ minValue?: number;
449
+ maxValue?: number;
450
+ minMaxRange?: MinMaxRangeConfig;
451
+ minMaxTimeRange?: MinMaxRangeConfig;
452
+ minTime?: string;
453
+ maxTime?: string;
454
+ regex?: RegExp;
455
+ validationMessage?: string;
456
+ options?: string[];
457
+ checkboxLabelPosition?: 'Before' | 'After';
458
+ layoutDirection?: 'row' | 'column';
459
+ tabOptions?: string[];
460
+ fields?: Record<string, any>;
461
+ enableVirtualization?: boolean;
462
+ popupHeight?: string;
463
+ popupWidth?: string;
464
+ children?: FormComponent[];
465
+ rows?: number;
466
+ columns?: number;
467
+ messageType?: 'info' | 'success' | 'warning' | 'error';
468
+ messageContent?: string;
469
+ legend?: string;
470
+ cardTitle?: string;
471
+ cardSubtitle?: string;
472
+ tabItems?: Array<{
473
+ header: string;
474
+ content?: FormComponent[];
475
+ }>;
476
+ tableCells?: FormComponent[][][];
477
+ columnWidths?: {
478
+ widths: number[];
479
+ };
480
+ lookUpConfig?: LookupConfig;
481
+ enableImportFromWord?: {
482
+ enabled: boolean;
483
+ serviceUrl: string;
484
+ };
485
+ enableExportToWord?: {
486
+ enabled: boolean;
487
+ serviceUrl: string;
488
+ };
489
+ enableExportToPdf?: {
490
+ enabled: boolean;
491
+ serviceUrl: string;
492
+ };
493
+ parentPath?: string;
494
+ startIndex?: number;
495
+ conditions?: FormComponentConditions;
496
+ properties?: Record<string, any>;
497
+ expressionValue?: string;
498
+ customValidation?: CustomValidationRule[];
499
+ _configured?: boolean;
500
+ }
501
+ /**
502
+ * @private
503
+ */
504
+ export interface GridColumn {
505
+ field: string;
506
+ headerText: string;
507
+ type?: 'string' | 'number' | 'date' | 'boolean';
508
+ isPrimaryKey?: boolean;
509
+ allowEditing?: boolean;
510
+ width?: string | number;
511
+ textAlign?: 'Left' | 'Right' | 'Center';
512
+ format?: string;
513
+ editType?: 'textbox' | 'numericedit' | 'datepickeredit' | 'dropdownedit' | 'checkbox' | 'booleanedit';
514
+ edit?: {
515
+ params?: Record<string, any>;
516
+ };
517
+ validationRules?: {
518
+ required?: boolean;
519
+ min?: number;
520
+ max?: number;
521
+ minLength?: number;
522
+ maxLength?: number;
523
+ };
524
+ expression?: string;
525
+ customValidation?: CustomValidationRule[];
526
+ }
527
+ /**
528
+ * @private
529
+ */
530
+ export interface GridComponentSchema extends Omit<FormComponent, 'columns' | 'dataSource' | 'selectionType'> {
531
+ type: 'dataGrid';
532
+ columns: GridColumn[];
533
+ dataSource?: Record<string, any>[];
534
+ allowPaging?: boolean;
535
+ pageSize?: number;
536
+ height?: string | number;
537
+ width?: string | number;
538
+ allowAdding?: boolean;
539
+ allowEditing?: boolean;
540
+ allowDeleting?: boolean;
541
+ locale?: string;
542
+ toolbar?: ('Add' | 'Edit' | 'Delete' | 'Update' | 'Cancel' | 'Search')[];
543
+ _currentData?: Record<string, any>[];
544
+ }
545
+ /**
546
+ * @private
547
+ */
548
+ export interface FormSettings {
549
+ name?: string;
550
+ width?: string;
551
+ validate?: boolean;
552
+ hideLabel?: boolean;
553
+ size?: string;
554
+ floatLabelType?: string;
555
+ }
556
+ /**
557
+ * Represents the JSON schema format that is used to render in the Form Renderer and exported from the Form Builder components.
558
+ */
559
+ export interface Schema {
560
+ /** Represents the version of the schema (e.g., '0.1.0') */
561
+ version: string;
562
+ properties: Record<string, FieldProperties>;
563
+ theme?: string;
564
+ layout: LayoutNode[];
565
+ settings?: any;
566
+ }
567
+ /**
568
+ * @private
569
+ */
570
+ export interface FormSchema {
571
+ version: string;
572
+ components: FormComponent[];
573
+ settings?: FormSettings;
574
+ }
575
+ /**
576
+ * @private
577
+ */
578
+ export interface ButtonDefinition {
579
+ label: string;
580
+ type?: 'submit' | 'reset' | 'button';
581
+ style?: 'primary' | 'flat' | 'information' | 'error' | 'success' | 'warning';
582
+ iconCss?: string;
583
+ iconPosition?: 'Left' | 'Right';
584
+ disabled?: boolean;
585
+ }