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

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 (160) hide show
  1. package/README.md +81 -36
  2. package/diConfig.json +148 -0
  3. package/dist/ej2-react-form-builder.min.js +10 -0
  4. package/dist/ej2-react-form-builder.umd.min.js +11 -0
  5. package/dist/ej2-react-form-builder.umd.min.js.map +1 -0
  6. package/dist/es6/ej2-react-form-builder.es2015.js +60 -0
  7. package/dist/es6/ej2-react-form-builder.es2015.js.map +1 -0
  8. package/form-builder.d.ts +4 -0
  9. package/form-builder.js +4 -0
  10. package/index.d.ts +2 -4
  11. package/index.js +2 -4
  12. package/license +6 -13
  13. package/package.json +19 -43
  14. package/src/form-builder/formbuilder.component.d.ts +37 -0
  15. package/src/form-builder/formbuilder.component.js +50 -0
  16. package/src/form-builder/index.d.ts +2 -0
  17. package/src/form-builder/index.js +2 -0
  18. package/src/form-builder/toolboxitems-directive.d.ts +28 -0
  19. package/src/form-builder/toolboxitems-directive.js +47 -0
  20. package/src/global.js +1 -0
  21. package/src/index.d.ts +2 -16
  22. package/src/index.js +2 -6
  23. package/Common/CheckboxGroup.d.ts +0 -13
  24. package/Common/CheckboxGroup.js +0 -50
  25. package/Common/ConditionalRuleEngine.d.ts +0 -296
  26. package/Common/ConditionalRuleEngine.js +0 -566
  27. package/Common/CustomTabComponent.d.ts +0 -17
  28. package/Common/CustomTabComponent.js +0 -30
  29. package/Common/CustomValidationEngine.d.ts +0 -58
  30. package/Common/CustomValidationEngine.js +0 -146
  31. package/Common/DataGridComponent.d.ts +0 -20
  32. package/Common/DataGridComponent.js +0 -273
  33. package/Common/FormValidator.d.ts +0 -485
  34. package/Common/FormValidator.js +0 -575
  35. package/Common/MinMaxRuleEngine.d.ts +0 -105
  36. package/Common/MinMaxRuleEngine.js +0 -365
  37. package/Common/StaticHtmlRenderer.d.ts +0 -14
  38. package/Common/StaticHtmlRenderer.js +0 -24
  39. package/Common/expressions/DependencyTracker.d.ts +0 -30
  40. package/Common/expressions/DependencyTracker.js +0 -128
  41. package/Common/expressions/ExpressionEngine.d.ts +0 -95
  42. package/Common/expressions/ExpressionEngine.js +0 -506
  43. package/Common/expressions/ExpressionParser.d.ts +0 -41
  44. package/Common/expressions/ExpressionParser.js +0 -269
  45. package/Common/expressions/useGridExpressions.d.ts +0 -12
  46. package/Common/expressions/useGridExpressions.js +0 -71
  47. package/Common/globalFormId.d.ts +0 -26
  48. package/Common/globalFormId.js +0 -45
  49. package/Common/json-converter.d.ts +0 -444
  50. package/Common/json-converter.js +0 -1184
  51. package/Common/parser.d.ts +0 -98
  52. package/Common/parser.js +0 -753
  53. package/Common/utils.d.ts +0 -130
  54. package/Common/utils.js +0 -574
  55. package/src/FormBuilder.d.ts +0 -211
  56. package/src/FormBuilder.js +0 -1299
  57. package/src/components/Database/ConnectionForm.d.ts +0 -8
  58. package/src/components/Database/ConnectionForm.js +0 -28
  59. package/src/components/TopBar.d.ts +0 -10
  60. package/src/components/TopBar.js +0 -7
  61. package/src/components/icons/ComponentIcons.d.ts +0 -44
  62. package/src/components/icons/ComponentIcons.js +0 -40
  63. package/src/components/layout/FormFieldWrapper.d.ts +0 -41
  64. package/src/components/layout/FormFieldWrapper.js +0 -112
  65. package/src/components/layout/LeftPane.d.ts +0 -23
  66. package/src/components/layout/LeftPane.js +0 -310
  67. package/src/components/layout/ListBoxPane.d.ts +0 -24
  68. package/src/components/layout/ListBoxPane.js +0 -94
  69. package/src/components/layout/MainSection.d.ts +0 -39
  70. package/src/components/layout/MainSection.js +0 -1766
  71. package/src/components/layout/Preview.d.ts +0 -12
  72. package/src/components/layout/Preview.js +0 -337
  73. package/src/components/layout/RightPane.d.ts +0 -22
  74. package/src/components/layout/RightPane.js +0 -370
  75. package/src/components/theme/ThemeSwitcher.d.ts +0 -14
  76. package/src/components/theme/ThemeSwitcher.js +0 -24
  77. package/src/components/theme/theme-constant.d.ts +0 -37
  78. package/src/components/theme/theme-constant.js +0 -23
  79. package/src/config/component-properties.json +0 -4929
  80. package/src/config/form-setting.json +0 -56
  81. package/src/config/locale.d.ts +0 -449
  82. package/src/config/locale.js +0 -449
  83. package/src/context/FormSchemaContext.d.ts +0 -32
  84. package/src/context/FormSchemaContext.js +0 -155
  85. package/src/context/LocalizationContext.d.ts +0 -27
  86. package/src/context/LocalizationContext.js +0 -43
  87. package/src/context/ThemeContext.d.ts +0 -23
  88. package/src/context/ThemeContext.js +0 -161
  89. package/src/context/contexts.d.ts +0 -6
  90. package/src/context/contexts.js +0 -6
  91. package/src/context/defaultFormSchema.d.ts +0 -6
  92. package/src/context/defaultFormSchema.js +0 -20
  93. package/src/defaultPalette.d.ts +0 -9
  94. package/src/defaultPalette.js +0 -45
  95. package/src/defaultTemplate.d.ts +0 -3
  96. package/src/defaultTemplate.js +0 -185
  97. package/src/import/schemaImportUtils.d.ts +0 -24
  98. package/src/import/schemaImportUtils.js +0 -121
  99. package/src/types/ActionButtons.d.ts +0 -44
  100. package/src/types/ActionButtons.js +0 -27
  101. package/src/types/ComponentProperties.d.ts +0 -33
  102. package/src/types/ComponentProperties.js +0 -2
  103. package/src/types/FormSchema.d.ts +0 -585
  104. package/src/types/FormSchema.js +0 -147
  105. package/src/types/connection.d.ts +0 -19
  106. package/src/types/connection.js +0 -9
  107. package/src/utils/AttributesEditor.d.ts +0 -13
  108. package/src/utils/AttributesEditor.js +0 -117
  109. package/src/utils/ButtonGroupEditor.d.ts +0 -15
  110. package/src/utils/ButtonGroupEditor.js +0 -141
  111. package/src/utils/ChoiceBasedFieldEditor.d.ts +0 -16
  112. package/src/utils/ChoiceBasedFieldEditor.js +0 -87
  113. package/src/utils/ClipboardHelper.d.ts +0 -26
  114. package/src/utils/ClipboardHelper.js +0 -83
  115. package/src/utils/ColumnBuilder.d.ts +0 -11
  116. package/src/utils/ColumnBuilder.js +0 -153
  117. package/src/utils/ColumnSpanEditor.d.ts +0 -8
  118. package/src/utils/ColumnSpanEditor.js +0 -98
  119. package/src/utils/ConditionDataEditor.d.ts +0 -29
  120. package/src/utils/ConditionDataEditor.js +0 -177
  121. package/src/utils/ConditionalEditorUtils.d.ts +0 -27
  122. package/src/utils/ConditionalEditorUtils.js +0 -310
  123. package/src/utils/ConditionsEditor.d.ts +0 -20
  124. package/src/utils/ConditionsEditor.js +0 -571
  125. package/src/utils/CustomAccordion.d.ts +0 -13
  126. package/src/utils/CustomAccordion.js +0 -38
  127. package/src/utils/CustomValidationEditor.d.ts +0 -11
  128. package/src/utils/CustomValidationEditor.js +0 -208
  129. package/src/utils/DataSourceCollector.d.ts +0 -3
  130. package/src/utils/DataSourceCollector.js +0 -252
  131. package/src/utils/ExpressionEditor.d.ts +0 -13
  132. package/src/utils/ExpressionEditor.js +0 -99
  133. package/src/utils/FormSettingsPanel.d.ts +0 -9
  134. package/src/utils/FormSettingsPanel.js +0 -60
  135. package/src/utils/LookupConfig.d.ts +0 -11
  136. package/src/utils/LookupConfig.js +0 -159
  137. package/src/utils/MinMaxValueEditor.d.ts +0 -25
  138. package/src/utils/MinMaxValueEditor.js +0 -188
  139. package/src/utils/OptionsEditor.d.ts +0 -8
  140. package/src/utils/OptionsEditor.js +0 -79
  141. package/src/utils/PropertyRenderer.d.ts +0 -22
  142. package/src/utils/PropertyRenderer.js +0 -210
  143. package/src/utils/ValueRenderer.d.ts +0 -2
  144. package/src/utils/ValueRenderer.js +0 -91
  145. package/src/utils/ej2DbAdaptor.d.ts +0 -6
  146. package/src/utils/ej2DbAdaptor.js +0 -38
  147. package/src/utils/mappingHeuristics.d.ts +0 -10
  148. package/src/utils/mappingHeuristics.js +0 -33
  149. package/src/utils/renderComponent.d.ts +0 -18
  150. package/src/utils/renderComponent.js +0 -300
  151. package/styles/tailwind3.css +0 -67
  152. package/styles/themes/action-buttons.css +0 -110
  153. package/styles/themes/datagrid.css +0 -380
  154. package/styles/themes/drag-reorder.css +0 -248
  155. package/styles/themes/import-dialog.css +0 -292
  156. package/styles/themes/index.css +0 -658
  157. package/styles/themes/left-pane.css +0 -253
  158. package/styles/themes/options-editor.css +0 -63
  159. package/styles/themes/preview.css +0 -702
  160. package/styles/themes/property-dialog.css +0 -371
@@ -1,44 +0,0 @@
1
- import type { FormComponent } from './FormSchema';
2
- /**
3
- * Enumeration of available action button types
4
- */
5
- export declare const ActionButtonType: {
6
- readonly PASTE: "paste";
7
- readonly COPY: "copy";
8
- readonly DELETE: "delete";
9
- readonly SWITCH_WIDGET: "switch_widget";
10
- };
11
- export type ActionButtonType = typeof ActionButtonType[keyof typeof ActionButtonType];
12
- /**
13
- * System clipboard state for managing copied field configurations
14
- * Uses navigator.clipboard API for cross-tab compatibility
15
- */
16
- export interface ClipboardState {
17
- /** Checks if clipboard contains valid field data */
18
- hasClipboardData: () => Promise<boolean>;
19
- /** Writes field configuration to system clipboard as JSON */
20
- copyToClipboard: (field: FormComponent) => Promise<void>;
21
- /** Reads field configuration from system clipboard */
22
- readFromClipboard: () => Promise<FormComponent | null>;
23
- }
24
- /**
25
- * Collection of callback functions for handling field actions
26
- */
27
- export interface FormFieldActionHandlers {
28
- /** Opens PropertyDialog with current field values */
29
- onEdit: (fieldId: string) => void;
30
- /** Stores field in system clipboard as JSON */
31
- onCopy: (field: FormComponent) => void;
32
- /** Pastes copied field after (next to) target field */
33
- onPaste: (targetFieldId: string) => void;
34
- /** Removes field from schema */
35
- onDelete: (fieldId: string) => void;
36
- }
37
- /**
38
- * Icon CSS classes for action buttons (Syncfusion ej2-icons)
39
- */
40
- export declare const ACTION_BUTTON_ICONS: Record<ActionButtonType, string>;
41
- /**
42
- * Aria labels for action buttons (accessibility)
43
- */
44
- export declare const ACTION_BUTTON_LABELS: Record<ActionButtonType, string>;
@@ -1,27 +0,0 @@
1
- /**
2
- * Enumeration of available action button types
3
- */
4
- export const ActionButtonType = {
5
- PASTE: 'paste',
6
- COPY: 'copy',
7
- DELETE: 'delete',
8
- SWITCH_WIDGET: 'switch_widget'
9
- };
10
- /**
11
- * Icon CSS classes for action buttons (Syncfusion ej2-icons)
12
- */
13
- export const ACTION_BUTTON_ICONS = {
14
- [ActionButtonType.PASTE]: 'e-icons e-paste',
15
- [ActionButtonType.COPY]: 'e-icons e-copy',
16
- [ActionButtonType.DELETE]: 'e-icons e-trash',
17
- [ActionButtonType.SWITCH_WIDGET]: 'e-icons e-repeat'
18
- };
19
- /**
20
- * Aria labels for action buttons (accessibility)
21
- */
22
- export const ACTION_BUTTON_LABELS = {
23
- [ActionButtonType.PASTE]: 'Paste copied field after this field',
24
- [ActionButtonType.COPY]: 'Copy field configuration to clipboard',
25
- [ActionButtonType.DELETE]: 'Delete field',
26
- [ActionButtonType.SWITCH_WIDGET]: 'Switch widget type'
27
- };
@@ -1,33 +0,0 @@
1
- export interface PropertyDefinition {
2
- name: string;
3
- key: string;
4
- label: string;
5
- type: 'text' | 'number' | 'boolean' | 'dropdown' | 'object' | 'lookupconfig' | 'conditionBuilder' | 'expression' | 'customValidation' | 'multiselect' | 'radio' | 'minMaxEditor' | 'options' | 'day' | 'time' | 'datetime' | 'attributes' | 'array' | 'daterange' | 'color' | 'datagridcolumns' | 'json' | 'buttonGroup' | 'html' | 'columnspaneditor' | 'switch' | 'URLImport';
6
- default: any;
7
- required?: boolean;
8
- placeholder?: string;
9
- editorMode?: 'date' | 'number' | 'time';
10
- length?: number;
11
- description?: string;
12
- options?: string[];
13
- min?: number;
14
- max?: number;
15
- step?: number;
16
- componentType?: string;
17
- }
18
- export interface PropertyGroup {
19
- name: string;
20
- properties: PropertyDefinition[];
21
- }
22
- export interface ComponentDefinition {
23
- type: string;
24
- displayName: string;
25
- category: string;
26
- groups: PropertyGroup[];
27
- }
28
- export interface ComponentsConfig {
29
- [key: string]: ComponentDefinition;
30
- }
31
- export interface PropertyValues {
32
- [key: string]: any;
33
- }
@@ -1,2 +0,0 @@
1
- // Type definitions for component property configuration
2
- export {};
@@ -1,585 +0,0 @@
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
- }