@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,371 @@
1
+ /* Sidebar Header */
2
+ .sidebar-header {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ min-height: 48px;
7
+ background-color: rgb(var(--sf-color-surface));
8
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
9
+ padding: 0rem 1.5rem;
10
+ flex-shrink: 0;
11
+ }
12
+
13
+ .sidebar-header .tab {
14
+ display: flex;
15
+ height: 48px;
16
+ align-items: center;
17
+ text-align: center;
18
+ }
19
+
20
+ .sidebar-header .tab p {
21
+ font-weight: 500;
22
+ }
23
+
24
+ .sidebar-header h3 {
25
+ margin: 0;
26
+ font-size: 0.875rem;
27
+ line-height: 20px;
28
+ color: var(--dashboard-heading-color);
29
+ font-weight: 600;
30
+ font-style: Semi Bold;
31
+ line-height: 20px;
32
+ letter-spacing: 0%;
33
+ }
34
+
35
+ .close-btn {
36
+ background: none;
37
+ border: none;
38
+ font-size: 1rem;
39
+ cursor: pointer;
40
+ color: rgb(var(--sf-color-on-surface-variant));
41
+ }
42
+
43
+ .rightpane-property-content.single-view {
44
+ height: 100%;
45
+ overflow-y: hidden;
46
+ }
47
+
48
+ .form-settings.property-content {
49
+ display: flex;
50
+ flex-direction: column;
51
+ height: calc(100dvh - var(--topbar-height) - var(--topbar-height) - 3rem);
52
+ }
53
+
54
+ .builder-container.e-component .form-settings.property-content {
55
+ height: calc(100% - var(--topbar-height) - var(--topbar-height));
56
+ }
57
+
58
+
59
+ /* Property Tabs */
60
+ .property-tabs-wrapper {
61
+ flex: 1;
62
+ display: flex;
63
+ flex-direction: column;
64
+ overflow: hidden;
65
+ }
66
+
67
+ .property-tabs {
68
+ width: 100%;
69
+ overflow: auto;
70
+ flex: 1;
71
+ display: flex;
72
+ flex-direction: column;
73
+ }
74
+
75
+ .property-tabs.e-tab {
76
+ display: flex;
77
+ }
78
+
79
+ .property-tabs .e-tab-header {
80
+ background-color: rgb(var(--sf-color-surface));
81
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
82
+ flex-shrink: 0;
83
+ }
84
+
85
+ .property-tabs .e-content {
86
+ padding: 0;
87
+ overflow-y: hidden;
88
+ flex: 1;
89
+ }
90
+
91
+ .property-tabs .e-content .e-item {
92
+ padding: 0;
93
+ height: 100%;
94
+ overflow-y: auto;
95
+ }
96
+
97
+ .property-tabs .e-content .e-item.e-active {
98
+ display: block;
99
+ }
100
+
101
+ /* Property Group */
102
+ .property-group {
103
+ padding: 0.75rem 1rem;
104
+ }
105
+
106
+ .property-group-content {
107
+ display: flex;
108
+ flex-direction: column;
109
+ gap: 1.25rem;
110
+ }
111
+
112
+ .property-group-content:has(.custom-accordion) {
113
+ gap: 0px
114
+ }
115
+
116
+ .property-group:has(.custom-accordion) {
117
+ padding: 0.75rem 0rem;
118
+ }
119
+
120
+ /* Property Field */
121
+ .property-field {
122
+ display: flex;
123
+ flex-direction: column;
124
+ gap: 0.5rem;
125
+ }
126
+
127
+ .property-field-checkbox {
128
+ align-items: flex-start;
129
+ gap: 0.75rem;
130
+ }
131
+
132
+ .property-label {
133
+ font-size: 0.875rem;
134
+ font-weight: 600;
135
+ color: var(--jsonview-text-color);
136
+ margin: 0;
137
+ line-height: 20px;
138
+ display: flex;
139
+ align-items: center;
140
+ gap: 0.25rem;
141
+ font-family: Inter;
142
+ font-style: Semi Bold;
143
+ letter-spacing: 0%;
144
+ }
145
+
146
+ .property-label .required {
147
+ color: #ef4444;
148
+ font-weight: 600;
149
+ }
150
+
151
+ .property-description {
152
+ font-size: 0.75rem;
153
+ color: rgb(var(--sf-color-on-surface-variant));
154
+ margin: 0;
155
+ line-height: 1.4;
156
+ }
157
+
158
+ /* Input Fields */
159
+ .property-field .e-input-group,
160
+ .property-field .e-control-wrapper,
161
+ .property-field .e-float-input {
162
+ width: 100%;
163
+ }
164
+
165
+ .property-field .e-textbox,
166
+ .property-field .e-numerictextbox,
167
+ .property-field .e-dropdownlist {
168
+ width: 100%;
169
+ }
170
+
171
+ /* Condition Builder Placeholder */
172
+ .condition-builder-placeholder {
173
+ padding: 2rem;
174
+ border: 2px dashed rgba(var(--sf-color-on-surface-variant), 0.3);
175
+ border-radius: var(--border-radius);
176
+ text-align: center;
177
+ background-color: rgba(var(--sf-color-surface), 0.5);
178
+ }
179
+
180
+ /* Scrollbar */
181
+ .rightpane-property-content::-webkit-scrollbar {
182
+ width: 8px;
183
+ }
184
+
185
+ .rightpane-property-content::-webkit-scrollbar-track {
186
+ background: rgb(var(--sf-color-background));
187
+ }
188
+
189
+ .rightpane-property-content::-webkit-scrollbar-thumb {
190
+ background: rgba(var(--sf-color-on-surface-variant), 0.3);
191
+ border-radius: 4px;
192
+ }
193
+
194
+ .rightpane-property-content::-webkit-scrollbar-thumb:hover {
195
+ background: rgba(var(--sf-color-on-surface), 0.5);
196
+ }
197
+
198
+ .properties-section {
199
+ display: flex;
200
+ flex-direction: column;
201
+ overflow: hidden;
202
+ }
203
+
204
+ .properties-section {
205
+ width: 100%;
206
+ height: calc(100dvh - var(--topbar-height) - var(--topbar-height));
207
+ background: rgb(var(--sf-color-surface));
208
+ }
209
+
210
+ .preview-section {
211
+ background: rgb(var(--sf-color-background));
212
+ }
213
+
214
+ .preview-main-section .main-header {
215
+ position: absolute;
216
+ z-index: 10001;
217
+ }
218
+
219
+ .builder-container.e-component .properties-section {
220
+ height: calc(100% - var(--topbar-height) - var(--topbar-height));
221
+ }
222
+
223
+ .builder-container.e-component .properties-section:has(.column-details) {
224
+ height: calc(100% - var(--topbar-height));
225
+ }
226
+
227
+ .builder-container.e-component .main-header {
228
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
229
+ }
230
+
231
+ .section-header {
232
+ min-height: 3.7rem;
233
+ padding: 16px 20px;
234
+ font-weight: 600;
235
+ font-size: 14px;
236
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
237
+ background: rgba(var(--sf-color-surface), 0.5);
238
+ flex-shrink: 0;
239
+ color: var(--jsonview-text-color);
240
+ }
241
+
242
+ .properties-section .property-tabs-wrapper {
243
+ flex: 1;
244
+ overflow: hidden;
245
+ display: flex;
246
+ flex-direction: column;
247
+ }
248
+
249
+ .properties-section .property-group {
250
+ flex: 1;
251
+ overflow-y: auto;
252
+ }
253
+
254
+ /* Custom Tabs */
255
+ .custom-tabs {
256
+ flex: 1;
257
+ display: flex;
258
+ flex-direction: column;
259
+ overflow: hidden;
260
+ }
261
+
262
+ .custom-tab-headers {
263
+ display: flex;
264
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
265
+ background-color: rgb(var(--sf-color-surface));
266
+ flex-shrink: 0;
267
+ }
268
+
269
+ .custom-tab-header {
270
+ padding: 12px 24px;
271
+ border: none;
272
+ background: transparent;
273
+ color: rgb(var(--sf-color-on-surface-variant));
274
+ font-size: 14px;
275
+ font-weight: 500;
276
+ cursor: pointer;
277
+ position: relative;
278
+ transition: all 0.3s ease;
279
+ border-bottom: 2px solid transparent;
280
+ }
281
+
282
+ .custom-tab-header:hover {
283
+ background-color: rgba(var(--sf-color-primary), 0.08);
284
+ color: rgb(var(--sf-color-primary));
285
+ }
286
+
287
+ .custom-tab-header.active {
288
+ color: rgb(var(--sf-color-primary));
289
+ border-bottom-color: rgb(var(--sf-color-primary));
290
+ background-color: rgba(var(--sf-color-primary), 0.12);
291
+ }
292
+
293
+ .custom-tab-content {
294
+ flex: 1;
295
+ overflow-y: auto;
296
+ background-color: rgb(var(--sf-color-background));
297
+ }
298
+
299
+ .custom-validation-editor .e-rule-field {
300
+ display: flex;
301
+ align-items: flex-start;
302
+ width: 100%;
303
+ height: 28px;
304
+ align-items: center;
305
+ justify-content: center;
306
+ gap: 8px;
307
+ }
308
+
309
+ .custom-validation-editor .e-rule-value {
310
+ flex: 1;
311
+ }
312
+
313
+ .custom-validation-editor .e-removerule {
314
+ display: flex;
315
+ align-items: center;
316
+ justify-content: center !important;
317
+ padding: 0 !important;
318
+ min-width: 32px;
319
+ min-height: 32px;
320
+ }
321
+
322
+ .custom-validation-editor .e-group-header {
323
+ display: flex;
324
+ justify-content: space-between;
325
+ align-items: center;
326
+ margin-bottom: 20px;
327
+ }
328
+
329
+ .custom-validation-editor .e-rule-list {
330
+ display: flex;
331
+ flex-direction: column;
332
+ gap: 4px;
333
+ }
334
+
335
+ .property-tabs .e-content {
336
+ background: unset;
337
+ }
338
+
339
+ .minmax-toggle-section {
340
+ padding-bottom: 12px;
341
+ }
342
+
343
+ .minmax-toggle-section .e-checkbox-wrapper {
344
+ margin-bottom: 0;
345
+ }
346
+
347
+ .minmax-inputs-row {
348
+ display: flex;
349
+ gap: 4px;
350
+ align-items: flex-end;
351
+ }
352
+
353
+ .minmax-input-group {
354
+ flex: 1;
355
+ display: flex;
356
+ flex-direction: column;
357
+ gap: 3px;
358
+ }
359
+
360
+ /* Responsive */
361
+ @container (max-width: 768px) {
362
+ .rightpane-property-content.split-view {
363
+ grid-template-columns: 1fr;
364
+ grid-template-rows: 1fr 1fr;
365
+ }
366
+
367
+ .properties-section {
368
+ border-right: none;
369
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
370
+ }
371
+ }