@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.
- package/Common/CheckboxGroup.d.ts +13 -0
- package/Common/CheckboxGroup.js +50 -0
- package/Common/ConditionalRuleEngine.d.ts +296 -0
- package/Common/ConditionalRuleEngine.js +566 -0
- package/Common/CustomTabComponent.d.ts +17 -0
- package/Common/CustomTabComponent.js +30 -0
- package/Common/CustomValidationEngine.d.ts +58 -0
- package/Common/CustomValidationEngine.js +146 -0
- package/Common/DataGridComponent.d.ts +20 -0
- package/Common/DataGridComponent.js +273 -0
- package/Common/FormValidator.d.ts +485 -0
- package/Common/FormValidator.js +575 -0
- package/Common/MinMaxRuleEngine.d.ts +105 -0
- package/Common/MinMaxRuleEngine.js +365 -0
- package/Common/StaticHtmlRenderer.d.ts +14 -0
- package/Common/StaticHtmlRenderer.js +24 -0
- package/Common/expressions/DependencyTracker.d.ts +30 -0
- package/Common/expressions/DependencyTracker.js +128 -0
- package/Common/expressions/ExpressionEngine.d.ts +95 -0
- package/Common/expressions/ExpressionEngine.js +506 -0
- package/Common/expressions/ExpressionParser.d.ts +41 -0
- package/Common/expressions/ExpressionParser.js +269 -0
- package/Common/expressions/useGridExpressions.d.ts +12 -0
- package/Common/expressions/useGridExpressions.js +71 -0
- package/Common/globalFormId.d.ts +26 -0
- package/Common/globalFormId.js +45 -0
- package/Common/json-converter.d.ts +444 -0
- package/Common/json-converter.js +1184 -0
- package/Common/parser.d.ts +98 -0
- package/Common/parser.js +753 -0
- package/Common/utils.d.ts +130 -0
- package/Common/utils.js +574 -0
- package/README.md +53 -0
- package/index.d.ts +6 -0
- package/index.js +6 -0
- package/license +13 -0
- package/package.json +54 -0
- package/src/FormBuilder.d.ts +211 -0
- package/src/FormBuilder.js +1299 -0
- package/src/components/Database/ConnectionForm.d.ts +8 -0
- package/src/components/Database/ConnectionForm.js +28 -0
- package/src/components/TopBar.d.ts +10 -0
- package/src/components/TopBar.js +7 -0
- package/src/components/icons/ComponentIcons.d.ts +44 -0
- package/src/components/icons/ComponentIcons.js +40 -0
- package/src/components/layout/FormFieldWrapper.d.ts +41 -0
- package/src/components/layout/FormFieldWrapper.js +112 -0
- package/src/components/layout/LeftPane.d.ts +23 -0
- package/src/components/layout/LeftPane.js +310 -0
- package/src/components/layout/ListBoxPane.d.ts +24 -0
- package/src/components/layout/ListBoxPane.js +94 -0
- package/src/components/layout/MainSection.d.ts +39 -0
- package/src/components/layout/MainSection.js +1766 -0
- package/src/components/layout/Preview.d.ts +12 -0
- package/src/components/layout/Preview.js +337 -0
- package/src/components/layout/RightPane.d.ts +22 -0
- package/src/components/layout/RightPane.js +370 -0
- package/src/components/theme/ThemeSwitcher.d.ts +14 -0
- package/src/components/theme/ThemeSwitcher.js +24 -0
- package/src/components/theme/theme-constant.d.ts +37 -0
- package/src/components/theme/theme-constant.js +23 -0
- package/src/config/component-properties.json +4929 -0
- package/src/config/form-setting.json +56 -0
- package/src/config/locale.d.ts +449 -0
- package/src/config/locale.js +449 -0
- package/src/context/FormSchemaContext.d.ts +32 -0
- package/src/context/FormSchemaContext.js +155 -0
- package/src/context/LocalizationContext.d.ts +27 -0
- package/src/context/LocalizationContext.js +43 -0
- package/src/context/ThemeContext.d.ts +23 -0
- package/src/context/ThemeContext.js +161 -0
- package/src/context/contexts.d.ts +6 -0
- package/src/context/contexts.js +6 -0
- package/src/context/defaultFormSchema.d.ts +6 -0
- package/src/context/defaultFormSchema.js +20 -0
- package/src/defaultPalette.d.ts +9 -0
- package/src/defaultPalette.js +45 -0
- package/src/defaultTemplate.d.ts +3 -0
- package/src/defaultTemplate.js +185 -0
- package/src/import/schemaImportUtils.d.ts +24 -0
- package/src/import/schemaImportUtils.js +121 -0
- package/src/index.d.ts +16 -0
- package/src/index.js +6 -0
- package/src/types/ActionButtons.d.ts +44 -0
- package/src/types/ActionButtons.js +27 -0
- package/src/types/ComponentProperties.d.ts +33 -0
- package/src/types/ComponentProperties.js +2 -0
- package/src/types/FormSchema.d.ts +585 -0
- package/src/types/FormSchema.js +147 -0
- package/src/types/connection.d.ts +19 -0
- package/src/types/connection.js +9 -0
- package/src/utils/AttributesEditor.d.ts +13 -0
- package/src/utils/AttributesEditor.js +117 -0
- package/src/utils/ButtonGroupEditor.d.ts +15 -0
- package/src/utils/ButtonGroupEditor.js +141 -0
- package/src/utils/ChoiceBasedFieldEditor.d.ts +16 -0
- package/src/utils/ChoiceBasedFieldEditor.js +87 -0
- package/src/utils/ClipboardHelper.d.ts +26 -0
- package/src/utils/ClipboardHelper.js +83 -0
- package/src/utils/ColumnBuilder.d.ts +11 -0
- package/src/utils/ColumnBuilder.js +153 -0
- package/src/utils/ColumnSpanEditor.d.ts +8 -0
- package/src/utils/ColumnSpanEditor.js +98 -0
- package/src/utils/ConditionDataEditor.d.ts +29 -0
- package/src/utils/ConditionDataEditor.js +177 -0
- package/src/utils/ConditionalEditorUtils.d.ts +27 -0
- package/src/utils/ConditionalEditorUtils.js +310 -0
- package/src/utils/ConditionsEditor.d.ts +20 -0
- package/src/utils/ConditionsEditor.js +571 -0
- package/src/utils/CustomAccordion.d.ts +13 -0
- package/src/utils/CustomAccordion.js +38 -0
- package/src/utils/CustomValidationEditor.d.ts +11 -0
- package/src/utils/CustomValidationEditor.js +208 -0
- package/src/utils/DataSourceCollector.d.ts +3 -0
- package/src/utils/DataSourceCollector.js +252 -0
- package/src/utils/ExpressionEditor.d.ts +13 -0
- package/src/utils/ExpressionEditor.js +99 -0
- package/src/utils/FormSettingsPanel.d.ts +9 -0
- package/src/utils/FormSettingsPanel.js +60 -0
- package/src/utils/LookupConfig.d.ts +11 -0
- package/src/utils/LookupConfig.js +159 -0
- package/src/utils/MinMaxValueEditor.d.ts +25 -0
- package/src/utils/MinMaxValueEditor.js +188 -0
- package/src/utils/OptionsEditor.d.ts +8 -0
- package/src/utils/OptionsEditor.js +79 -0
- package/src/utils/PropertyRenderer.d.ts +22 -0
- package/src/utils/PropertyRenderer.js +210 -0
- package/src/utils/ValueRenderer.d.ts +2 -0
- package/src/utils/ValueRenderer.js +91 -0
- package/src/utils/ej2DbAdaptor.d.ts +6 -0
- package/src/utils/ej2DbAdaptor.js +38 -0
- package/src/utils/mappingHeuristics.d.ts +10 -0
- package/src/utils/mappingHeuristics.js +33 -0
- package/src/utils/renderComponent.d.ts +18 -0
- package/src/utils/renderComponent.js +300 -0
- package/styles/tailwind3.css +67 -0
- package/styles/themes/action-buttons.css +110 -0
- package/styles/themes/datagrid.css +380 -0
- package/styles/themes/drag-reorder.css +248 -0
- package/styles/themes/import-dialog.css +292 -0
- package/styles/themes/index.css +658 -0
- package/styles/themes/left-pane.css +253 -0
- package/styles/themes/options-editor.css +63 -0
- package/styles/themes/preview.css +702 -0
- package/styles/themes/property-dialog.css +371 -0
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @syncfusion/ej2-react-form-builder
|
|
3
|
+
* Form Builder Component - Visual drag-and-drop form editor
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { FormBuilder } from './FormBuilder.js';
|
|
7
|
+
|
|
8
|
+
export type {
|
|
9
|
+
IFormBuilder,
|
|
10
|
+
PropertyChangedEventArgs,
|
|
11
|
+
FieldDragStartedEventArgs,
|
|
12
|
+
FieldDraggingOverEventArgs,
|
|
13
|
+
FieldDroppedEventArgs
|
|
14
|
+
} from './FormBuilder.js';
|
|
15
|
+
|
|
16
|
+
export type { DefaultTemplates, PaletteConfig, Schema, } from './types/FormSchema.js';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
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>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
}
|