@syncfusion/ej2-form-renderer 34.2.2

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 (214) hide show
  1. package/README.md +60 -0
  2. package/common.d.ts +4 -0
  3. package/common.js +4 -0
  4. package/dist/ej2-form-renderer.umd.min.js +11 -0
  5. package/dist/ej2-form-renderer.umd.min.js.map +1 -0
  6. package/dist/es6/ej2-form-renderer.es2015.js +6787 -0
  7. package/dist/es6/ej2-form-renderer.es2015.js.map +1 -0
  8. package/dist/es6/ej2-form-renderer.es5.js +7055 -0
  9. package/dist/es6/ej2-form-renderer.es5.js.map +1 -0
  10. package/dist/global/ej2-form-renderer.min.js +11 -0
  11. package/dist/global/ej2-form-renderer.min.js.map +1 -0
  12. package/dist/global/index.d.ts +14 -0
  13. package/form-renderer.d.ts +4 -0
  14. package/form-renderer.js +4 -0
  15. package/index.d.ts +4 -0
  16. package/index.js +4 -0
  17. package/license +10 -0
  18. package/package.json +41 -0
  19. package/src/common/checkbox-group.d.ts +55 -0
  20. package/src/common/checkbox-group.js +241 -0
  21. package/src/common/conditional-rule-engine.d.ts +241 -0
  22. package/src/common/conditional-rule-engine.js +505 -0
  23. package/src/common/custom-validation-engine.d.ts +57 -0
  24. package/src/common/custom-validation-engine.js +152 -0
  25. package/src/common/datagrid-component.d.ts +156 -0
  26. package/src/common/datagrid-component.js +410 -0
  27. package/src/common/expressions/dependency-tracker.d.ts +29 -0
  28. package/src/common/expressions/dependency-tracker.js +137 -0
  29. package/src/common/expressions/expression-engine.d.ts +94 -0
  30. package/src/common/expressions/expression-engine.js +514 -0
  31. package/src/common/expressions/expression-parser.d.ts +40 -0
  32. package/src/common/expressions/expression-parser.js +270 -0
  33. package/src/common/expressions/grid-expressions.d.ts +24 -0
  34. package/src/common/expressions/grid-expressions.js +92 -0
  35. package/src/common/expressions/index.d.ts +4 -0
  36. package/src/common/expressions/index.js +4 -0
  37. package/src/common/index.d.ts +10 -0
  38. package/src/common/index.js +10 -0
  39. package/src/common/json-converter.d.ts +945 -0
  40. package/src/common/json-converter.js +1110 -0
  41. package/src/common/minmax-rule-engine.d.ts +105 -0
  42. package/src/common/minmax-rule-engine.js +380 -0
  43. package/src/common/option-fetcher.d.ts +30 -0
  44. package/src/common/option-fetcher.js +139 -0
  45. package/src/common/parser.d.ts +98 -0
  46. package/src/common/parser.js +788 -0
  47. package/src/common/static-html-renderer.d.ts +45 -0
  48. package/src/common/static-html-renderer.js +77 -0
  49. package/src/common/utils.d.ts +116 -0
  50. package/src/common/utils.js +484 -0
  51. package/src/form-renderer/form-renderer-model.d.ts +65 -0
  52. package/src/form-renderer/form-renderer.d.ts +425 -0
  53. package/src/form-renderer/form-renderer.js +2277 -0
  54. package/src/form-renderer/index.d.ts +6 -0
  55. package/src/form-renderer/index.js +5 -0
  56. package/src/form-renderer/render-form-field.d.ts +31 -0
  57. package/src/form-renderer/render-form-field.js +816 -0
  58. package/src/form-renderer/types/form-schema.d.ts +452 -0
  59. package/src/form-renderer/types/form-schema.js +32 -0
  60. package/src/global.js +1 -0
  61. package/src/index.d.ts +4 -0
  62. package/src/index.js +4 -0
  63. package/styles/bds-lite.css +599 -0
  64. package/styles/bds-lite.scss +2 -0
  65. package/styles/bds.css +599 -0
  66. package/styles/bds.scss +2 -0
  67. package/styles/bootstrap-dark-lite.css +608 -0
  68. package/styles/bootstrap-dark-lite.scss +2 -0
  69. package/styles/bootstrap-dark.css +608 -0
  70. package/styles/bootstrap-dark.scss +2 -0
  71. package/styles/bootstrap-lite.css +595 -0
  72. package/styles/bootstrap-lite.scss +2 -0
  73. package/styles/bootstrap.css +595 -0
  74. package/styles/bootstrap.scss +2 -0
  75. package/styles/bootstrap4-lite.css +595 -0
  76. package/styles/bootstrap4-lite.scss +2 -0
  77. package/styles/bootstrap4.css +595 -0
  78. package/styles/bootstrap4.scss +2 -0
  79. package/styles/bootstrap5-dark-lite.css +595 -0
  80. package/styles/bootstrap5-dark-lite.scss +2 -0
  81. package/styles/bootstrap5-dark.css +595 -0
  82. package/styles/bootstrap5-dark.scss +2 -0
  83. package/styles/bootstrap5-lite.css +595 -0
  84. package/styles/bootstrap5-lite.scss +2 -0
  85. package/styles/bootstrap5.3-lite.css +679 -0
  86. package/styles/bootstrap5.3-lite.scss +2 -0
  87. package/styles/bootstrap5.3.css +679 -0
  88. package/styles/bootstrap5.3.scss +2 -0
  89. package/styles/bootstrap5.css +595 -0
  90. package/styles/bootstrap5.scss +2 -0
  91. package/styles/fabric-dark-lite.css +608 -0
  92. package/styles/fabric-dark-lite.scss +2 -0
  93. package/styles/fabric-dark.css +608 -0
  94. package/styles/fabric-dark.scss +2 -0
  95. package/styles/fabric-lite.css +595 -0
  96. package/styles/fabric-lite.scss +2 -0
  97. package/styles/fabric.css +595 -0
  98. package/styles/fabric.scss +2 -0
  99. package/styles/fluent-dark-lite.css +595 -0
  100. package/styles/fluent-dark-lite.scss +2 -0
  101. package/styles/fluent-dark.css +595 -0
  102. package/styles/fluent-dark.scss +2 -0
  103. package/styles/fluent-lite.css +595 -0
  104. package/styles/fluent-lite.scss +2 -0
  105. package/styles/fluent.css +595 -0
  106. package/styles/fluent.scss +2 -0
  107. package/styles/fluent2-lite.css +681 -0
  108. package/styles/fluent2-lite.scss +2 -0
  109. package/styles/fluent2.css +681 -0
  110. package/styles/fluent2.scss +2 -0
  111. package/styles/form-renderer/_all.scss +2 -0
  112. package/styles/form-renderer/_bds-definition.scss +8 -0
  113. package/styles/form-renderer/_bootstrap-dark-definition.scss +8 -0
  114. package/styles/form-renderer/_bootstrap-definition.scss +8 -0
  115. package/styles/form-renderer/_bootstrap4-definition.scss +8 -0
  116. package/styles/form-renderer/_bootstrap5-dark-definition.scss +8 -0
  117. package/styles/form-renderer/_bootstrap5-definition.scss +8 -0
  118. package/styles/form-renderer/_bootstrap5.3-definition.scss +8 -0
  119. package/styles/form-renderer/_fabric-dark-definition.scss +8 -0
  120. package/styles/form-renderer/_fabric-definition.scss +8 -0
  121. package/styles/form-renderer/_fluent-dark-definition.scss +8 -0
  122. package/styles/form-renderer/_fluent-definition.scss +8 -0
  123. package/styles/form-renderer/_fluent2-definition.scss +8 -0
  124. package/styles/form-renderer/_highcontrast-definition.scss +8 -0
  125. package/styles/form-renderer/_highcontrast-light-definition.scss +8 -0
  126. package/styles/form-renderer/_layout.scss +480 -0
  127. package/styles/form-renderer/_material-dark-definition.scss +8 -0
  128. package/styles/form-renderer/_material-definition.scss +8 -0
  129. package/styles/form-renderer/_material3-dark-definition.scss +8 -0
  130. package/styles/form-renderer/_material3-definition.scss +8 -0
  131. package/styles/form-renderer/_mixin.scss +26 -0
  132. package/styles/form-renderer/_tailwind-dark-definition.scss +8 -0
  133. package/styles/form-renderer/_tailwind-definition.scss +8 -0
  134. package/styles/form-renderer/_tailwind3-definition.scss +8 -0
  135. package/styles/form-renderer/_theme.scss +69 -0
  136. package/styles/form-renderer/_variables.scss +2 -0
  137. package/styles/form-renderer/bds.css +599 -0
  138. package/styles/form-renderer/bds.scss +2 -0
  139. package/styles/form-renderer/bootstrap-dark.css +608 -0
  140. package/styles/form-renderer/bootstrap-dark.scss +2 -0
  141. package/styles/form-renderer/bootstrap.css +595 -0
  142. package/styles/form-renderer/bootstrap.scss +2 -0
  143. package/styles/form-renderer/bootstrap4.css +595 -0
  144. package/styles/form-renderer/bootstrap4.scss +2 -0
  145. package/styles/form-renderer/bootstrap5-dark.css +595 -0
  146. package/styles/form-renderer/bootstrap5-dark.scss +2 -0
  147. package/styles/form-renderer/bootstrap5.3.css +679 -0
  148. package/styles/form-renderer/bootstrap5.3.scss +2 -0
  149. package/styles/form-renderer/bootstrap5.css +595 -0
  150. package/styles/form-renderer/bootstrap5.scss +2 -0
  151. package/styles/form-renderer/fabric-dark.css +608 -0
  152. package/styles/form-renderer/fabric-dark.scss +2 -0
  153. package/styles/form-renderer/fabric.css +595 -0
  154. package/styles/form-renderer/fabric.scss +2 -0
  155. package/styles/form-renderer/fluent-dark.css +595 -0
  156. package/styles/form-renderer/fluent-dark.scss +2 -0
  157. package/styles/form-renderer/fluent.css +595 -0
  158. package/styles/form-renderer/fluent.scss +2 -0
  159. package/styles/form-renderer/fluent2.css +681 -0
  160. package/styles/form-renderer/fluent2.scss +2 -0
  161. package/styles/form-renderer/highcontrast-light.css +595 -0
  162. package/styles/form-renderer/highcontrast-light.scss +2 -0
  163. package/styles/form-renderer/highcontrast.css +608 -0
  164. package/styles/form-renderer/highcontrast.scss +2 -0
  165. package/styles/form-renderer/material-dark.css +608 -0
  166. package/styles/form-renderer/material-dark.scss +2 -0
  167. package/styles/form-renderer/material.css +595 -0
  168. package/styles/form-renderer/material.scss +2 -0
  169. package/styles/form-renderer/material3-dark.css +677 -0
  170. package/styles/form-renderer/material3-dark.scss +2 -0
  171. package/styles/form-renderer/material3.css +679 -0
  172. package/styles/form-renderer/material3.scss +2 -0
  173. package/styles/form-renderer/tailwind-dark.css +595 -0
  174. package/styles/form-renderer/tailwind-dark.scss +2 -0
  175. package/styles/form-renderer/tailwind.css +595 -0
  176. package/styles/form-renderer/tailwind.scss +2 -0
  177. package/styles/form-renderer/tailwind3.css +669 -0
  178. package/styles/form-renderer/tailwind3.scss +2 -0
  179. package/styles/highcontrast-light-lite.css +595 -0
  180. package/styles/highcontrast-light-lite.scss +2 -0
  181. package/styles/highcontrast-light.css +595 -0
  182. package/styles/highcontrast-light.scss +2 -0
  183. package/styles/highcontrast-lite.css +608 -0
  184. package/styles/highcontrast-lite.scss +2 -0
  185. package/styles/highcontrast.css +608 -0
  186. package/styles/highcontrast.scss +2 -0
  187. package/styles/material-dark-lite.css +608 -0
  188. package/styles/material-dark-lite.scss +2 -0
  189. package/styles/material-dark.css +608 -0
  190. package/styles/material-dark.scss +2 -0
  191. package/styles/material-lite.css +595 -0
  192. package/styles/material-lite.scss +2 -0
  193. package/styles/material.css +595 -0
  194. package/styles/material.scss +2 -0
  195. package/styles/material3-dark-lite.css +677 -0
  196. package/styles/material3-dark-lite.scss +2 -0
  197. package/styles/material3-dark.css +677 -0
  198. package/styles/material3-dark.scss +2 -0
  199. package/styles/material3-lite.css +679 -0
  200. package/styles/material3-lite.scss +2 -0
  201. package/styles/material3.css +679 -0
  202. package/styles/material3.scss +2 -0
  203. package/styles/tailwind-dark-lite.css +595 -0
  204. package/styles/tailwind-dark-lite.scss +2 -0
  205. package/styles/tailwind-dark.css +595 -0
  206. package/styles/tailwind-dark.scss +2 -0
  207. package/styles/tailwind-lite.css +595 -0
  208. package/styles/tailwind-lite.scss +2 -0
  209. package/styles/tailwind.css +595 -0
  210. package/styles/tailwind.scss +2 -0
  211. package/styles/tailwind3-lite.css +669 -0
  212. package/styles/tailwind3-lite.scss +2 -0
  213. package/styles/tailwind3.css +669 -0
  214. package/styles/tailwind3.scss +2 -0
@@ -0,0 +1,452 @@
1
+ import { ClickEventArgs } from '@syncfusion/ej2-buttons';
2
+ import { MinMaxRangeItem } from '../../common/minmax-rule-engine';
3
+ import { LayoutNode, FieldProperties } from '../../common/json-converter';
4
+ import { GridColumn } from '@syncfusion/ej2-grids';
5
+ import { FieldDataType } from '../form-renderer';
6
+ /**
7
+ * @private
8
+ */
9
+ export interface RuleModel {
10
+ condition?: 'And' | 'Or' | 'and' | 'or';
11
+ rules?: RuleModel[] | QueryRule[];
12
+ field?: string;
13
+ label?: string;
14
+ operator?: string;
15
+ type?: string;
16
+ value?: string | number | boolean | Date | (string | number | boolean | Date)[];
17
+ isGroup?: boolean;
18
+ }
19
+ /**
20
+ * @private
21
+ */
22
+ export interface QueryRule {
23
+ field: string;
24
+ operator: string;
25
+ value: string | number | boolean | Date | (string | number | boolean | Date)[];
26
+ label?: string;
27
+ type?: string;
28
+ }
29
+ /**
30
+ * Provides the visual modes of the dropdown component.
31
+ */
32
+ export declare type visualMode = 'Default' | 'Delimiters' | 'Box' | 'CheckBox';
33
+ /**
34
+ * Represents the JSON schema format used for data exchange and storage.
35
+ * Contains a flat key-value map of properties, a layout tree, and optional global settings.
36
+ */
37
+ export interface Schema {
38
+ /** Specifies the version of the schema (e.g., '0.1.0') */
39
+ version: string;
40
+ /** Specifies the key-value map of all field definitions in the form */
41
+ properties: Record<string, FieldProperties>;
42
+ /** Specifies the hierarchical layout nodes mapping properties to UI positions */
43
+ layout: LayoutNode[];
44
+ /** Specifies the optional global form settings (form name, size, floatLabelType, etc.) */
45
+ settings?: FormSettings;
46
+ }
47
+ /**
48
+ * @private
49
+ */
50
+ export interface HeaderPair {
51
+ key: string;
52
+ value: string;
53
+ }
54
+ /**
55
+ * @private
56
+ */
57
+ export interface SearchConfig {
58
+ enabled: boolean;
59
+ fields: string[];
60
+ key?: string;
61
+ }
62
+ /**
63
+ * @private
64
+ */
65
+ export interface SortConfig {
66
+ enabled: boolean;
67
+ field: string;
68
+ direction: 'ascending' | 'descending';
69
+ }
70
+ /**
71
+ * @private
72
+ */
73
+ export interface FilterConfig {
74
+ field: string;
75
+ operator: string;
76
+ value: any;
77
+ }
78
+ /**
79
+ * @private
80
+ */
81
+ export interface DataSourceCollectorProps {
82
+ value: string[] | {
83
+ type: 'url' | 'raw' | 'options';
84
+ url?: string;
85
+ headers?: HeaderPair[];
86
+ data?: string[];
87
+ search?: SearchConfig;
88
+ sort?: SortConfig;
89
+ filters?: FilterConfig[];
90
+ adaptorType?: string;
91
+ take?: number;
92
+ skip?: number;
93
+ dataPath?: string;
94
+ formName?: any;
95
+ };
96
+ onChange: (data: string[] | any) => void;
97
+ type?: string;
98
+ datakey?: string;
99
+ isAccordion?: boolean;
100
+ }
101
+ /**
102
+ * @private
103
+ */
104
+ export interface ConditionalDataRule {
105
+ condition: ConditionType;
106
+ dataSource: DataSourceCollectorProps['value'];
107
+ columns?: GridColumn[];
108
+ includeColumns?: boolean;
109
+ }
110
+ /**
111
+ * Defines the operators that can be used to define a condition.
112
+ */
113
+ export declare type ConditionalOperator = 'equal' | 'notEqual' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'in' | 'notIn' | 'contains' | 'notContains' | 'isempty' | 'isnotempty';
114
+ /**
115
+ * Specifies the rule for the condition by defining the operator, value and labels.
116
+ */
117
+ export interface ConditionalRule {
118
+ label?: string;
119
+ field: string;
120
+ operator: ConditionalOperator;
121
+ type?: string;
122
+ value: object | string | number | boolean | null;
123
+ }
124
+ /**
125
+ * This class is used to define the condition and rules.
126
+ */
127
+ export interface CompositeConditionalRule {
128
+ condition: 'and' | 'or';
129
+ rules: (ConditionalRule | CompositeConditionalRule)[];
130
+ }
131
+ /**
132
+ * Defines the types for the conditions such as rules and composite condtional rule.
133
+ */
134
+ export declare type ConditionType = ConditionalRule | CompositeConditionalRule;
135
+ /**
136
+ * @private
137
+ */
138
+ export interface LookupConfig {
139
+ formName: string;
140
+ field: string;
141
+ }
142
+ /**
143
+ * @private
144
+ */
145
+ export interface ChoiceBasedFieldRule {
146
+ primaryFieldId: string;
147
+ choiceMapping: Record<string, string[]>;
148
+ showAllWhenNotMapped?: boolean;
149
+ }
150
+ /**
151
+ * @private
152
+ */
153
+ export interface CustomValidationRule {
154
+ condition?: RuleModel;
155
+ expression: string;
156
+ }
157
+ /**
158
+ * Specifies the rules configurations for the condtions.
159
+ */
160
+ export interface ConditionRule {
161
+ /**
162
+ * When this is set, the form field can be visible based on a condition.
163
+ */
164
+ visibleWhen?: ConditionType;
165
+ /**
166
+ * When this is set, the form field can be made hidden based on a condition.
167
+ */
168
+ hideWhen?: ConditionType;
169
+ /**
170
+ * When this is set, the form field can be read only based on a condition.
171
+ */
172
+ readOnlyWhen?: ConditionType;
173
+ /**
174
+ * When this is set, the form field can be disabled based on a condition.
175
+ */
176
+ disabledWhen?: ConditionType;
177
+ /**
178
+ * When this is set, the form field can be required based on a condition.
179
+ */
180
+ requiredWhen?: ConditionType;
181
+ /**
182
+ * When this is set, the form field's value can be set based on a condition.
183
+ */
184
+ setValueWhen?: {
185
+ condition: ConditionType;
186
+ value: unknown;
187
+ };
188
+ /**
189
+ * This property is used to handle the dependent dropdowns.
190
+ */
191
+ choiceBasedField?: ChoiceBasedFieldRule;
192
+ /**
193
+ * This property is used to handle data source of Grid based on a condition.
194
+ */
195
+ conditionalData?: ConditionalDataRule[];
196
+ }
197
+ /**
198
+ * @private
199
+ */
200
+ export interface FormSchema {
201
+ version: string;
202
+ components: FormNode[];
203
+ settings?: {
204
+ [key: string]: any;
205
+ };
206
+ }
207
+ /**
208
+ * These enum values define the layouts available to render forms.
209
+ */
210
+ export declare enum FormLayout {
211
+ /**
212
+ * SingleColumn - Represents the single column layout and renders forms in a vertical layout.
213
+ */
214
+ SingleColumn = "SingleColumn",
215
+ /**
216
+ * TwoColumn - Represents the two column layout and renders forms in a two column grid layout.
217
+ */
218
+ TwoColumn = "TwoColumn",
219
+ /**
220
+ * ThreeColumn - Represents the three column layout which renders forms in a three column grid layout.
221
+ */
222
+ ThreeColumn = "ThreeColumn",
223
+ /**
224
+ * FourColumn - Represents the four column layout which renders forms in a four column grid layout.
225
+ */
226
+ FourColumn = "FourColumn"
227
+ }
228
+ /**
229
+ * Specifies the component types supported in the Form Renderer.
230
+ */
231
+ export declare const FORM_COMPONENT_TYPES: ReadonlyArray<'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'>;
232
+ /**
233
+ * @private
234
+ */
235
+ export declare type FormComponentType = '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';
236
+ /**
237
+ * @private
238
+ */
239
+ export interface FormNode {
240
+ id: string;
241
+ type: FormComponentType;
242
+ textboxType?: 'text' | 'password' | 'email' | 'number' | 'url';
243
+ label: string;
244
+ name: string;
245
+ description?: string | undefined;
246
+ prefix?: string | undefined;
247
+ suffix?: string | undefined;
248
+ placeholder?: string;
249
+ defaultValue?: FieldDataType;
250
+ disabled?: boolean;
251
+ visible?: boolean;
252
+ tooltip?: string;
253
+ hideBorders?: boolean;
254
+ hideLabel?: boolean;
255
+ cssClass?: string;
256
+ multiline?: boolean;
257
+ showClearButton?: boolean;
258
+ showCloseIcon?: boolean;
259
+ showIcon?: boolean;
260
+ variant?: 'standard' | 'filled' | 'outlined';
261
+ severity?: 'information' | 'success' | 'warning' | 'error';
262
+ content?: string;
263
+ showTodayButton?: boolean;
264
+ htmlAttributes?: Record<string, any>;
265
+ labelPosition?: 'Top' | 'Bottom' | 'Left' | 'Right';
266
+ position?: 'center' | 'left' | 'right';
267
+ fieldLabelPosition?: 'After' | 'Before';
268
+ labelWidth?: string;
269
+ floatLabelType?: 'Never' | 'Always' | 'Auto';
270
+ readOnly?: boolean;
271
+ autocomplete?: boolean;
272
+ cols?: number;
273
+ textareaRows?: number;
274
+ checked?: boolean;
275
+ indeterminate?: boolean;
276
+ offLabel?: string;
277
+ onLabel?: string;
278
+ buttonType?: 'button' | 'submit' | 'reset';
279
+ iconCss?: string;
280
+ iconPosition?: 'Left' | 'Right';
281
+ style?: 'primary' | 'flat' | 'information' | 'error' | 'success' | 'warning';
282
+ buttonsGroups?: ButtonDefinition[];
283
+ gap?: string;
284
+ onClick?: (event: ClickEventArgs) => void;
285
+ decimals?: number;
286
+ currency?: string;
287
+ format?: string;
288
+ numberFormat?: string;
289
+ allowReset?: boolean;
290
+ itemsCount?: number;
291
+ precision?: number | string;
292
+ showRatingTooltip?: boolean;
293
+ showRatingLabel?: boolean;
294
+ ratingLabelPosition?: 'Top' | 'Bottom' | 'Left' | 'Right';
295
+ height?: number | null;
296
+ width?: number | null;
297
+ backgroundColor?: string;
298
+ strokeColor?: string;
299
+ maximumStrokeWidth?: number;
300
+ minimumStrokeWidth?: number;
301
+ velocity?: number;
302
+ enableOpacity?: boolean;
303
+ showNoColor?: boolean;
304
+ showButtons?: boolean;
305
+ showRecentColors?: boolean;
306
+ orientation?: 'Horizontal' | 'Vertical';
307
+ allowExtensions?: string;
308
+ saveUrl?: string;
309
+ removeUrl?: string;
310
+ buttons?: object;
311
+ dataSource?: [];
312
+ minMaxRange?: MinMaxRangeItem[];
313
+ minMaxTimeRange?: MinMaxRangeItem[];
314
+ allowMultiple?: boolean;
315
+ showFileList?: boolean;
316
+ calendarMode?: 'gregorian' | 'islamic';
317
+ dayHeaderFormat?: 'short' | 'narrow' | 'abbreviated' | 'wide';
318
+ depth?: 'month' | 'year' | 'decade';
319
+ firstDayOfWeek?: number;
320
+ start?: 'month' | 'year' | 'decade';
321
+ allowEdit?: boolean;
322
+ enabled?: boolean;
323
+ timeFormat?: string;
324
+ step?: number;
325
+ startDate?: string;
326
+ endDate?: string;
327
+ separator?: string;
328
+ mask?: string;
329
+ customCharacters?: Record<string, string>;
330
+ promptChar?: string;
331
+ allowCustomValue?: boolean;
332
+ addTagOnBlur?: boolean;
333
+ delimiterChar?: string;
334
+ visualMode?: visualMode;
335
+ showSelectAll?: boolean;
336
+ selectAllText?: string;
337
+ unSelectAllText?: string;
338
+ showDropDownIcon?: boolean;
339
+ validateOn?: 'Change' | 'Blur';
340
+ pageSize?: number;
341
+ size?: string;
342
+ allowPaging?: boolean;
343
+ allowAdding?: boolean;
344
+ allowEditing?: boolean;
345
+ allowDeleting?: boolean;
346
+ required?: boolean;
347
+ minLength?: number | null;
348
+ maxLength?: number | null;
349
+ min?: number | null;
350
+ minimum?: number | null;
351
+ max?: number | null;
352
+ minDate?: string;
353
+ maxDate?: string;
354
+ minValue?: number | null;
355
+ maxValue?: number | null;
356
+ minTime?: string;
357
+ maxTime?: string;
358
+ regex?: string;
359
+ validationMessage?: string;
360
+ options?: string[];
361
+ checkboxLabelPosition?: 'Before' | 'After';
362
+ layoutDirection?: 'row' | 'column';
363
+ enableHtmlSanitizer?: boolean;
364
+ fields?: Record<string, any>;
365
+ enableVirtualization?: boolean;
366
+ popupHeight?: string;
367
+ popupWidth?: string;
368
+ children?: FormNode[];
369
+ rows?: number;
370
+ columns?: number;
371
+ messageType?: 'info' | 'success' | 'warning' | 'error';
372
+ messageContent?: string;
373
+ legend?: string;
374
+ cardTitle?: string;
375
+ cardSubtitle?: string;
376
+ columnWidths?: {
377
+ columns: number;
378
+ widths: number[];
379
+ };
380
+ tabItems?: Array<{
381
+ header: string;
382
+ content?: FormNode[];
383
+ }>;
384
+ tableCells?: FormNode[][][];
385
+ tabOptions?: string[];
386
+ lookUpConfig?: LookupConfig;
387
+ enableImportFromWord?: {
388
+ enabled: boolean;
389
+ serviceUrl: string;
390
+ };
391
+ enableExportToWord?: {
392
+ enabled: boolean;
393
+ serviceUrl: string;
394
+ };
395
+ enableExportToPdf?: {
396
+ enabled: boolean;
397
+ serviceUrl: string;
398
+ };
399
+ parentPath?: string;
400
+ properties?: Record<string, any>;
401
+ expressionValue?: string;
402
+ conditions?: ConditionRule;
403
+ customValidation?: CustomValidationRule[];
404
+ _configured?: boolean;
405
+ }
406
+ /**
407
+ * @private
408
+ */
409
+ export interface ValidationRules {
410
+ [fieldName: string]: {
411
+ required?: [boolean, string];
412
+ minLength?: [number, string];
413
+ maxLength?: [number, string];
414
+ min?: [number, string];
415
+ max?: [number, string];
416
+ regex?: [string, string];
417
+ date?: [string, string];
418
+ [key: string]: any | undefined;
419
+ };
420
+ }
421
+ /**
422
+ * Specifies the optional global settings that control form rendering behavior.
423
+ */
424
+ export interface FormSettings {
425
+ /** Specifies the title or name of the form. */
426
+ name?: string;
427
+ /** Specifies the width of the form container, such as '100%' or '600px'. */
428
+ width?: string;
429
+ /** Specifies whether labels are hidden for form fields. */
430
+ hideLabel?: boolean;
431
+ /**
432
+ * Specifies the overall UI size variant for form controls.
433
+ * Takes values such as `Small`, `Medium`, or `Large`.
434
+ */
435
+ size?: string;
436
+ /**
437
+ * Specifies the float label display mode for input fields.
438
+ * Takes values such as `Never`, `Always`, or `Auto`.
439
+ */
440
+ floatLabelType?: string;
441
+ }
442
+ /**
443
+ * @private
444
+ */
445
+ export interface ButtonDefinition {
446
+ label: string;
447
+ type?: 'submit' | 'reset' | 'button';
448
+ style?: 'primary' | 'flat' | 'information' | 'error' | 'success' | 'warning';
449
+ iconCss?: string;
450
+ iconPosition?: 'Left' | 'Right';
451
+ disabled?: boolean;
452
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * These enum values define the layouts available to render forms.
3
+ */
4
+ export var FormLayout;
5
+ (function (FormLayout) {
6
+ /**
7
+ * SingleColumn - Represents the single column layout and renders forms in a vertical layout.
8
+ */
9
+ FormLayout["SingleColumn"] = "SingleColumn";
10
+ /**
11
+ * TwoColumn - Represents the two column layout and renders forms in a two column grid layout.
12
+ */
13
+ FormLayout["TwoColumn"] = "TwoColumn";
14
+ /**
15
+ * ThreeColumn - Represents the three column layout which renders forms in a three column grid layout.
16
+ */
17
+ FormLayout["ThreeColumn"] = "ThreeColumn";
18
+ /**
19
+ * FourColumn - Represents the four column layout which renders forms in a four column grid layout.
20
+ */
21
+ FormLayout["FourColumn"] = "FourColumn";
22
+ })(FormLayout || (FormLayout = {}));
23
+ /**
24
+ * Specifies the component types supported in the Form Renderer.
25
+ */
26
+ export var FORM_COMPONENT_TYPES = [
27
+ 'textbox', 'textarea', 'number', 'checkbox', 'checkboxGroup', 'radio',
28
+ 'dropdown', 'multiselect', 'button', 'date', 'dateTime', 'time', 'dateRange',
29
+ 'switch', 'signature', 'rating', 'imageEditor', 'fileUpload', 'rangeSlider',
30
+ 'colorPicker', 'inputMask', 'message', 'panel', 'table', 'tabs', 'dataGrid',
31
+ 'staticHtml', 'card', 'splitButton', 'richTextEditor'
32
+ ];
package/src/global.js ADDED
@@ -0,0 +1 @@
1
+ export * from './index';
package/src/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Form Renderer all modules.
3
+ */
4
+ export * from './form-renderer/index';
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Form Renderer all modules.
3
+ */
4
+ export * from './form-renderer/index';