@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,12 +0,0 @@
1
- import React from 'react';
2
- import '@syncfusion/ej2-form-renderer/styles/tailwind3.css';
3
- import type { FormSchema } from '../../types/FormSchema';
4
- import type { UnifiedSchema } from '../../../Common/json-converter';
5
- interface PreviewProps {
6
- isOpen: boolean;
7
- onClose: () => void;
8
- schema?: UnifiedSchema;
9
- formSchema: FormSchema;
10
- }
11
- export declare const Preview: React.FC<PreviewProps>;
12
- export default Preview;
@@ -1,337 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState, useMemo, useEffect, useRef } from 'react';
3
- import { FormRendererComponent } from '@syncfusion/ej2-react-form-renderer';
4
- import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
5
- import '@syncfusion/ej2-form-renderer/styles/tailwind3.css';
6
- import { DialogComponent } from '@syncfusion/ej2-react-popups';
7
- import { GridComponent, ColumnsDirective, ColumnDirective, Inject, Page, Sort, Filter } from '@syncfusion/ej2-react-grids';
8
- import { formBuilderMode } from '../../FormBuilder';
9
- import { getFormId } from '../../../Common/globalFormId';
10
- import { useLocalization } from '../../context/LocalizationContext';
11
- // Ignore list for components to exclude from grid columns
12
- const IGNORE_COMPONENT_TYPES = ['button', 'staticHtml', 'panel', 'table', 'tabs', 'card', 'splitButton', 'fileUpload', 'message'];
13
- const IGNORE_COMPONENT_NAMES = []; // Can be populated manually
14
- const getSubmissionsFromStorage = async (formName) => {
15
- try {
16
- const response = await fetch(/*getRecordsUrl*/ '' + `${formName}`);
17
- return response.ok ? await response.json() : [];
18
- }
19
- catch (error) {
20
- console.error('Error fetching submissions:', error);
21
- return [];
22
- }
23
- };
24
- const saveSubmissionToStorage = async (formName, submission) => {
25
- try {
26
- await fetch(/*submitUrl*/ '' + `${formName}`, {
27
- method: 'POST',
28
- headers: { 'Content-Type': 'application/json' },
29
- body: JSON.stringify(submission)
30
- });
31
- }
32
- catch (error) {
33
- console.error('Error saving submission:', error);
34
- }
35
- };
36
- const clearSubmissionsFromStorage = async (formName) => {
37
- try {
38
- await fetch(/*submitUrl*/ '' + `${formName}`, { method: 'DELETE' });
39
- }
40
- catch (error) {
41
- console.error('Error clearing submissions:', error);
42
- }
43
- };
44
- const extractGridColumns = (formSchema) => {
45
- const columns = [];
46
- if (!formSchema?.components)
47
- return columns;
48
- const extractFromComponent = (component) => {
49
- if (IGNORE_COMPONENT_TYPES.includes(component.type) || IGNORE_COMPONENT_NAMES.includes(component.name)) {
50
- return;
51
- }
52
- if (component.label && component.type !== 'dataGrid') {
53
- columns.push({
54
- field: component.label,
55
- headerText: component.label
56
- });
57
- }
58
- else if (component.label && component.type === 'dataGrid') {
59
- columns.push({
60
- field: component.label,
61
- headerText: `${component.label} (View)`
62
- });
63
- }
64
- if (component.children && Array.isArray(component.children)) {
65
- component.children.forEach((child) => {
66
- if (Array.isArray(child)) {
67
- child.forEach((nestedChild) => extractFromComponent(nestedChild));
68
- }
69
- else {
70
- extractFromComponent(child);
71
- }
72
- });
73
- }
74
- if (component.tableCells && Array.isArray(component.tableCells)) {
75
- component.tableCells.forEach((row) => {
76
- if (Array.isArray(row)) {
77
- row.forEach((cell) => {
78
- if (Array.isArray(cell)) {
79
- cell.forEach((cellComponent) => extractFromComponent(cellComponent));
80
- }
81
- else {
82
- extractFromComponent(cell);
83
- }
84
- });
85
- }
86
- });
87
- }
88
- if (component.tabItems && Array.isArray(component.tabItems)) {
89
- component.tabItems.forEach((tab) => {
90
- if (tab.content && Array.isArray(tab.content)) {
91
- tab.content.forEach((tabComponent) => extractFromComponent(tabComponent));
92
- }
93
- });
94
- }
95
- };
96
- formSchema.components.forEach(component => extractFromComponent(component));
97
- return columns;
98
- };
99
- export const Preview = ({ isOpen, onClose, schema, formSchema }) => {
100
- const [showSuccessScreen, setShowSuccessScreen] = useState(false);
101
- const [formKey, setFormKey] = useState(0);
102
- const [showDataDialog, setShowDataDialog] = useState(false);
103
- const [storageRefresh, setStorageRefresh] = useState(0);
104
- const gridColumns = useMemo(() => extractGridColumns(formSchema), [formSchema]);
105
- const [gridData, setGridData] = useState([]);
106
- const [expandedGridData, setExpandedGridData] = useState(null);
107
- const [showExpandedDialog, setShowExpandedDialog] = useState(false);
108
- const previewMainSectionRef = useRef(null);
109
- const { locale } = useLocalization();
110
- const dataGridFields = useMemo(() => {
111
- const fields = new Set();
112
- const traverse = (components) => {
113
- components.forEach(comp => {
114
- if (comp.type === 'dataGrid' && comp.label) {
115
- fields.add(comp.label);
116
- }
117
- if (comp.children)
118
- traverse(comp.children);
119
- if (comp.tableCells)
120
- comp.tableCells.forEach((row) => row.forEach((cell) => traverse(cell)));
121
- if (comp.tabItems)
122
- comp.tabItems.forEach((tab) => tab.content && traverse(tab.content));
123
- });
124
- };
125
- traverse(formSchema?.components || []);
126
- return fields;
127
- }, [formSchema]);
128
- useEffect(() => {
129
- if (!isOpen || formBuilderMode !== 'component')
130
- return;
131
- const updatePreviewHeight = () => {
132
- const container = document.getElementById('form-builder');
133
- if (!container)
134
- return;
135
- const previewMainSection = previewMainSectionRef.current || container.querySelector('.preview-main-section');
136
- if (!previewMainSection)
137
- return;
138
- const containerHeight = container.offsetHeight;
139
- previewMainSection.style.height = `${containerHeight - 48}px`;
140
- };
141
- const rafId = requestAnimationFrame(updatePreviewHeight);
142
- const resizeObserver = new ResizeObserver(updatePreviewHeight);
143
- const container = document.getElementById('form-builder');
144
- if (container) {
145
- resizeObserver.observe(container);
146
- }
147
- window.addEventListener('resize', updatePreviewHeight);
148
- return () => {
149
- cancelAnimationFrame(rafId);
150
- resizeObserver.disconnect();
151
- window.removeEventListener('resize', updatePreviewHeight);
152
- };
153
- }, [isOpen, formSchema.components, formSchema.settings]);
154
- if (!isOpen)
155
- return null;
156
- const handleSubmit = (args) => {
157
- const formName = formSchema?.settings?.name || 'Untitled Form';
158
- // Process auto number fields
159
- const processedData = { ...args.data };
160
- if (formBuilderMode === undefined) {
161
- if (formSchema?.components) {
162
- const processAutoNumberFields = (components) => {
163
- components.forEach((component) => {
164
- if (component.type === 'autoNumber') {
165
- // Get submissions count from form data storage to calculate next index
166
- const submissions = getSubmissionsFromStorage(formName);
167
- const lastIndex = parseInt((submissions[submissions.length - 1]?.[component.label]?.replace(component.prefix, '').replace(component.suffix, '')) || String(component.startIndex - 1 || -1), 10);
168
- const nextIndex = lastIndex + 1;
169
- const formattedValue = `${component.prefix || ''}${nextIndex}${component.suffix || ''}`;
170
- processedData[component.label] = formattedValue;
171
- }
172
- // Handle nested components (like panel children)
173
- if (component.children && Array.isArray(component.children)) {
174
- component.children.forEach((child) => {
175
- if (Array.isArray(child)) {
176
- processAutoNumberFields(child);
177
- }
178
- else {
179
- processAutoNumberFields([child]);
180
- }
181
- });
182
- }
183
- // Handle table cells
184
- if (component.tableCells && Array.isArray(component.tableCells)) {
185
- component.tableCells.forEach((row) => {
186
- if (Array.isArray(row)) {
187
- row.forEach((cell) => {
188
- if (Array.isArray(cell)) {
189
- processAutoNumberFields(cell);
190
- }
191
- else {
192
- processAutoNumberFields([cell]);
193
- }
194
- });
195
- }
196
- });
197
- }
198
- // Handle tab items
199
- if (component.tabItems && Array.isArray(component.tabItems)) {
200
- component.tabItems.forEach((tab) => {
201
- if (tab.content && Array.isArray(tab.content)) {
202
- processAutoNumberFields(tab.content);
203
- }
204
- });
205
- }
206
- });
207
- };
208
- processAutoNumberFields(formSchema.components);
209
- }
210
- const currentFormId = getFormId();
211
- const storageKey = (currentFormId && String(currentFormId).trim()) ? currentFormId : formName;
212
- saveSubmissionToStorage(storageKey, processedData);
213
- setStorageRefresh(prev => prev + 1);
214
- setShowSuccessScreen(true);
215
- }
216
- };
217
- const handleAddAnotherResponse = () => {
218
- setShowSuccessScreen(false);
219
- setFormKey(prev => prev + 1);
220
- };
221
- const handleClearData = () => {
222
- const formName = formSchema?.settings?.name || 'Untitled Form';
223
- clearSubmissionsFromStorage(formName);
224
- setStorageRefresh(prev => prev + 1);
225
- };
226
- return (_jsxs(_Fragment, { children: [_jsxs("main", { role: "dialog", "aria-modal": "true", className: "preview-main-section", style: { position: 'absolute', top: '48px', left: 0, width: '100%' }, children: [_jsxs("div", { className: "main-header", children: [_jsx("div", { className: "left-section", children: formSchema?.settings?.name || 'Untitled Form' }), _jsx("div", { className: "center-section" }), _jsx("div", { className: "right-section", children: _jsx(ButtonComponent, { onClick: onClose, cssClass: "action-btn e-flat", children: "Close Preview" }) })] }), _jsx("div", { className: "preview-main-content", style: { width: "100%", position: "relative", zIndex: 9999, marginTop: "48px" }, children: !showSuccessScreen ? (_jsx("div", { className: `form-preview-area`, ref: previewMainSectionRef, children: (schema) &&
227
- _jsx(FormRendererComponent, { locale: locale, style: { maxWidth: formSchema.settings?.width || 'var(--form-width)' }, schema: schema, className: "preview-form", submit: handleSubmit }, formKey) })) : (_jsx("div", { style: {
228
- display: 'flex',
229
- alignItems: 'center',
230
- justifyContent: 'center',
231
- minHeight: 'calc(100vh - 100px)',
232
- position: 'relative',
233
- zIndex: 99999,
234
- background: "var(--preview-area-color)",
235
- padding: '40px 20px'
236
- }, children: _jsxs("div", { className: "e-card", style: {
237
- textAlign: 'center',
238
- maxWidth: '500px',
239
- borderRadius: '12px',
240
- padding: '60px 40px',
241
- boxShadow: '0 10px 40px rgba(0, 0, 0, 0.08)',
242
- animation: 'fadeIn 0.5s ease-in'
243
- }, children: [_jsx("div", { style: {
244
- width: '80px',
245
- height: '80px',
246
- background: 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)',
247
- borderRadius: '50%',
248
- display: 'flex',
249
- alignItems: 'center',
250
- justifyContent: 'center',
251
- margin: '0 auto 30px',
252
- animation: 'scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)'
253
- }, children: _jsx("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M13.8333 23.3333L19.25 28.75L30.1667 15.25", stroke: "white", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("h1", { style: {
254
- fontSize: '28px',
255
- fontWeight: '600',
256
- color: 'var(--dashboard-heading-color)',
257
- margin: '0 0 12px 0',
258
- lineHeight: '1.4'
259
- }, children: "Thank You!" }), _jsx("p", { style: {
260
- fontSize: '16px',
261
- color: '#64748b',
262
- margin: '0 0 40px 0',
263
- lineHeight: '1.6'
264
- }, children: "Your response has been submitted successfully." }), _jsxs("div", { style: {
265
- display: 'flex',
266
- gap: '12px',
267
- flexDirection: 'column'
268
- }, children: [_jsx(ButtonComponent, { onClick: handleAddAnotherResponse, cssClass: "e-primary", style: {
269
- background: 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)',
270
- border: 'none',
271
- height: '44px',
272
- fontSize: '15px',
273
- fontWeight: '500',
274
- borderRadius: '8px',
275
- cursor: 'pointer',
276
- transition: 'all 0.3s ease',
277
- boxShadow: '0 4px 15px rgba(99, 102, 241, 0.3)'
278
- }, children: "\uFF0B Add Another Response" }), _jsx(ButtonComponent, { onClick: () => {
279
- const fetchData = async () => {
280
- const currentFormId = getFormId()?.toString();
281
- const data = await getSubmissionsFromStorage(currentFormId);
282
- setGridData(data);
283
- };
284
- fetchData();
285
- setShowDataDialog(true);
286
- }, cssClass: "e-outline", style: {
287
- height: '44px',
288
- fontSize: '15px',
289
- fontWeight: '500',
290
- borderRadius: '8px',
291
- cursor: 'pointer',
292
- }, children: "View Submitted Data" }), _jsx(ButtonComponent, { onClick: onClose, cssClass: "e-outline", style: {
293
- height: '44px',
294
- fontSize: '15px',
295
- fontWeight: '500',
296
- borderRadius: '8px',
297
- cursor: 'pointer',
298
- }, children: "Close Preview" })] })] }) })) })] }), _jsx(DialogComponent, { header: "Submitted Data", isModal: false, width: "100%", height: "calc(100dvh - 48px)", position: { X: 0, Y: 48 }, visible: showDataDialog, close: () => setShowDataDialog(false), showCloseIcon: true, footerTemplate: () => (_jsx("div", { style: { display: 'flex', gap: '8px', justifyContent: 'flex-end' }, children: _jsx(ButtonComponent, { onClick: handleClearData, cssClass: "e-danger", children: "Clear All Data" }) })), children: _jsx("div", { style: { display: 'flex', flexDirection: 'column', height: '100%' }, children: _jsxs(GridComponent, { dataSource: gridData, allowPaging: true, pageSettings: { pageSize: 10 }, allowSorting: true, allowFiltering: true, children: [_jsx(ColumnsDirective, { children: gridColumns.map((column, index) => (_jsx(ColumnDirective, { field: column.field, headerText: column.headerText, isPrimaryKey: index === 0, template: (props) => {
299
- const value = props[column.field];
300
- if (dataGridFields.has(column.field) && Array.isArray(value)) {
301
- return (_jsxs(ButtonComponent, { cssClass: "e-outline e-small", onClick: () => {
302
- setExpandedGridData(value);
303
- setShowExpandedDialog(true);
304
- }, children: ["View (", value.length, ")"] }));
305
- }
306
- if (typeof value === 'boolean') {
307
- return value ? 'true' : 'false';
308
- }
309
- if (typeof value === 'object' && value !== null) {
310
- return JSON.stringify(value);
311
- }
312
- return value ?? '';
313
- } }, index))) }), _jsx(Inject, { services: [Page, Sort, Filter] })] }) }) }), _jsx(DialogComponent, { isModal: true, width: "90%", height: "80%", visible: showExpandedDialog, close: () => setShowExpandedDialog(false), showCloseIcon: true, children: _jsxs(GridComponent, { dataSource: expandedGridData || [], allowPaging: true, pageSettings: { pageSize: 10 }, allowSorting: true, allowFiltering: true, children: [_jsx(ColumnsDirective, { children: expandedGridData && expandedGridData.length > 0 && Object.keys(expandedGridData[0]).map((key, index) => (_jsx(ColumnDirective, { field: key, headerText: key }, index))) }), _jsx(Inject, { services: [Page, Sort, Filter] })] }) }), _jsx("style", { children: `
314
- @keyframes fadeIn {
315
- from {
316
- opacity: 0;
317
- transform: translateY(10px);
318
- }
319
- to {
320
- opacity: 1;
321
- transform: translateY(0);
322
- }
323
- }
324
-
325
- @keyframes scaleIn {
326
- from {
327
- transform: scale(0.3);
328
- opacity: 0;
329
- }
330
- to {
331
- transform: scale(1);
332
- opacity: 1;
333
- }
334
- }
335
- ` })] }));
336
- };
337
- export default Preview;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import type { PropertyValues, ComponentDefinition } from '../../types/ComponentProperties';
3
- import type { FormSettings } from '../../types/FormSchema';
4
- import { type PropertyChangedEventArgs } from '../../FormBuilder';
5
- interface RightPaneProps {
6
- mode: 'component' | 'formSettings';
7
- componentType: string;
8
- configData: Record<string, ComponentDefinition>;
9
- formSettingsConfig?: any;
10
- existingValues?: PropertyValues;
11
- formSettings?: FormSettings;
12
- onSave: (values: PropertyValues | FormSettings, key?: string) => void;
13
- onPropertyChanged?: (args: PropertyChangedEventArgs) => void;
14
- onClose: () => void;
15
- builderMode?: 'Simple' | 'Developer';
16
- }
17
- /**
18
- * RightPane Component
19
- */
20
- export declare const RightPane: React.FC<RightPaneProps>;
21
- declare const _default: React.NamedExoticComponent<RightPaneProps>;
22
- export default _default;