@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,253 @@
1
+ .left-pane {
2
+ width: var(--sidebar-width);
3
+ height: calc(100dvh - var(--topbar-height) - 3rem);
4
+ background-color: rgb(var(--sf-color-surface));
5
+ border-right: 1px solid rgb(var(--sf-color-line-color));
6
+ overflow-y: auto;
7
+ transition: transform .5s ease-in-out, width .5s ease-in-out;
8
+ margin-top: 48px;
9
+ scrollbar-width: thin;
10
+ flex-shrink: 0;
11
+ display: flex;
12
+ flex-direction: column;
13
+ }
14
+
15
+ .builder-container.e-component .left-pane {
16
+ height: calc(100% - var(--topbar-height));
17
+ }
18
+
19
+ .left-pane.collapsed {
20
+ transform: translateX(-100%);
21
+ border-right: none;
22
+ width: 0;
23
+ }
24
+
25
+ .e-rtl .left-pane.collapsed {
26
+ transform: translateX(100%);
27
+ border-left: none;
28
+ border-right: initial;
29
+ width: 0;
30
+ }
31
+
32
+ .left-pane .e-accordion {
33
+ border: none;
34
+ background: rgb(var(--sf-color-surface)) !important;
35
+ }
36
+
37
+
38
+ .left-pane .e-accordion .e-acrdn-item {
39
+ margin-bottom: 12px;
40
+ border-bottom: none !important;
41
+ }
42
+
43
+ .left-pane .e-accordion .e-acrdn-item.e-selected.e-select.e-active {
44
+ background: rgb(var(--sf-color-surface)) !important;
45
+ }
46
+
47
+ .left-pane .e-accordion .e-acrdn-item .e-acrdn-panel .e-acrdn-content {
48
+ padding: 12px 0 0 0;
49
+ }
50
+
51
+ .palette-container {
52
+ padding: 0.75rem;
53
+ scrollbar-width: thin;
54
+ flex: 1;
55
+ overflow-y: auto;
56
+ }
57
+
58
+ .palette-items {
59
+ display: flex;
60
+ flex-direction: row;
61
+ gap: 0.8rem;
62
+ flex-wrap: wrap;
63
+ }
64
+
65
+ .palette-item {
66
+ display: flex;
67
+ flex-direction: column;
68
+ width: 7.625rem;
69
+ min-height: 4.5rem;
70
+ height: auto;
71
+ align-items: center;
72
+ gap: 0.75rem;
73
+ padding: 0.85rem 0.45rem;
74
+ background-color: rgb(var(--sf-color-background));
75
+ border: 1px solid rgb(var(--sf-color-line-color));
76
+ border-radius: 0.375rem;
77
+ cursor: pointer;
78
+ transition: all 0.2s ease;
79
+ }
80
+
81
+ .palette-items > * {
82
+ flex: 0 0 calc(50% - 0.45rem); /* 2 items per row (adjust for gap) */
83
+ }
84
+
85
+
86
+ .palette-item:hover, .palette-item:focus-visible {
87
+ border-color: #4a4a4a;
88
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
89
+ }
90
+
91
+ .palette-item:active {
92
+ cursor: grabbing;
93
+ opacity: 0.7;
94
+ }
95
+
96
+ .palette-item-icon {
97
+ font-size: 1.25rem;
98
+ flex-shrink: 0;
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ }
103
+
104
+ .palette-item-icon-svg {
105
+ color: var(--hint-text-color);
106
+ opacity: 0.8;
107
+ transition: all 0.2s ease;
108
+ }
109
+
110
+ .palette-item:hover .palette-item-icon-svg,
111
+ .palette-item:focus-visible .palette-item-icon-svg {
112
+ color: #4a4a4a;
113
+ opacity: 1;
114
+ }
115
+
116
+ .palette-item-label {
117
+ font-size: 0.75rem;
118
+ font-weight: 500;
119
+ color: var(--dashboard-heading-color);
120
+ line-height: 16px;
121
+ letter-spacing: 0%;
122
+ text-align: center;
123
+ }
124
+
125
+ /* Dark mode specific styles */
126
+ [data-theme="dark"] .palette-item-icon-svg {
127
+ color: rgb(var(--sf-color-on-surface));
128
+ opacity: 0.9;
129
+ }
130
+
131
+ [data-theme="dark"] .palette-item:hover .palette-item-icon-svg {
132
+ color: #9e9e9e;
133
+ opacity: 1;
134
+ }
135
+
136
+ /* Scrollbar styling */
137
+ .left-pane::-webkit-scrollbar {
138
+ width: 8px;
139
+ }
140
+
141
+ .left-pane::-webkit-scrollbar-track {
142
+ background: rgb(var(--sf-color-surface));
143
+ }
144
+
145
+ .left-pane::-webkit-scrollbar-thumb {
146
+ background: rgb(var(--sf-color-on-surface-variant));
147
+ border-radius: 4px;
148
+ opacity: 0.3;
149
+ }
150
+
151
+ .left-pane::-webkit-scrollbar-thumb:hover {
152
+ background: rgb(var(--sf-color-on-surface));
153
+ opacity: 0.5;
154
+ }
155
+
156
+ .template-item:hover {
157
+ border-color: #4a4a4a;
158
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
159
+ }
160
+
161
+ .template-item:active {
162
+ cursor: grabbing;
163
+ opacity: 0.7;
164
+ }
165
+
166
+ .listbox-pane-wrapper {
167
+ z-index: 1099;
168
+ }
169
+
170
+ .listbox-pane-popup {
171
+ position: absolute;
172
+ top: 50%;
173
+ left: 50%;
174
+ transform: translate(-50%, -50%);
175
+ z-index: 1100;
176
+ width: 253px;
177
+ height: 360px;
178
+ background-color: rgb(var(--sf-color-surface));
179
+ border-radius: 8px;
180
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
181
+ border: 1px solid rgb(var(--sf-color-line-color));
182
+ animation: slideUp 0.3s ease-out;
183
+ overflow: hidden;
184
+ }
185
+
186
+ .listbox-pane-popup .e-listbox-container {
187
+ border: none;
188
+ }
189
+
190
+ .listbox-pane-popup .e-filter-input {
191
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
192
+ margin: 12px;
193
+ margin-bottom: 0;
194
+ }
195
+
196
+ .listbox-pane-popup .e-filter-parent .e-filterinput {
197
+ background-color: rgb(var(--sf-color-background));
198
+ color: rgb(var(--sf-color-on-surface));
199
+ }
200
+
201
+ .listbox-pane-popup .e-list-item {
202
+ padding: 10px 16px;
203
+ border-bottom: 1px solid rgb(var(--sf-color-line-color));
204
+ }
205
+
206
+ .listbox-pane-popup .e-list-group-item {
207
+ padding: 8px 16px;
208
+ font-weight: 600;
209
+ font-size: 12px;
210
+ text-transform: uppercase;
211
+ letter-spacing: 0.5px;
212
+ background-color: rgb(var(--sf-color-background));
213
+ }
214
+
215
+ .listbox-pane-popup .e-list-item-content {
216
+ color: rgb(var(--sf-color-on-surface));
217
+ }
218
+
219
+ .listbox-pane-popup .e-listbox-wrapper.e-filter-list:not(.e-listbox-container) .e-list-parent {
220
+ height: 310px !important;
221
+ scrollbar-width: thin;
222
+ }
223
+
224
+ /* Item with icon styling */
225
+ .listbox-item-with-icon {
226
+ display: flex;
227
+ align-items: center;
228
+ gap: 10px;
229
+ width: 100%;
230
+ }
231
+
232
+ .listbox-item-with-icon.e-btn:hover {
233
+ background-color: transparent !important;
234
+ box-shadow: none !important;
235
+ border: none !important;
236
+ }
237
+
238
+ .listbox-item-icon {
239
+ flex-shrink: 0;
240
+ width: 18px;
241
+ height: 18px;
242
+ display: flex;
243
+ align-items: center;
244
+ justify-content: center;
245
+ color: rgb(var(--sf-color-on-surface-variant));
246
+ opacity: 0.7;
247
+ transition: all 0.2s ease;
248
+ }
249
+
250
+ .listbox-item-label {
251
+ color: var(--jsonview-text-color);
252
+ font-size: 13px;
253
+ }
@@ -0,0 +1,63 @@
1
+ /* Options Editor Styling */
2
+ .options-editor {
3
+ padding: 0;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 16px;
7
+ }
8
+
9
+ .options-grid {
10
+ max-height: 300px;
11
+ }
12
+
13
+ .options-grid.table-col .e-content {
14
+ height: 260px !important;
15
+ }
16
+
17
+ .options-grid .e-rowcell {
18
+ padding: 12px;
19
+ font-size: 13px;
20
+ }
21
+
22
+ .options-editor .e-rowcell.e-templatecell {
23
+ box-shadow: unset !important;
24
+ }
25
+
26
+ .options-grid .e-rowcell select {
27
+ width: 100%;
28
+ padding: 6px 10px;
29
+ margin: 0 2px;
30
+ border: none ;
31
+ color: var(--color-sf-content-text-color);
32
+ background-color: var(--color-sf-content-bg-color);
33
+ border-radius: 3px;
34
+ font-size: 14px;
35
+ font-family: inherit;
36
+ transition: border-color 0.2s ease;
37
+ }
38
+
39
+ .options-grid .e-rowcell input[type="checkbox"] {
40
+ width: 18px;
41
+ height: 18px;
42
+ cursor: pointer;
43
+ accent-color: var(--color-sf-primary);
44
+ }
45
+
46
+ .theme-material3 .options-grid .e-rowcell input[type="checkbox"] {
47
+ accent-color: rgb(var(--color-sf-primary));
48
+ }
49
+
50
+ .options-grid input[type=checkbox]:focus {
51
+ outline: 5px auto var(--color-sf-primary);
52
+ outline-offset: 3px;
53
+ }
54
+
55
+ .options-actions {
56
+ display: flex;
57
+ gap: 8px;
58
+ }
59
+
60
+ .options-actions .e-primary {
61
+ padding: 8px 16px;
62
+ font-size: 13px;
63
+ }