@digiform/builder 0.1.7 → 0.2.1
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/FormBuilder.d.ts +24 -0
- package/client.d.ts +18 -0
- package/component-registry/components/alert.d.ts +4 -0
- package/component-registry/components/button.d.ts +4 -0
- package/component-registry/components/checkbox.d.ts +9 -0
- package/component-registry/components/code-input/code-input.d.ts +4 -0
- package/component-registry/components/dropdown.d.ts +1 -0
- package/component-registry/components/heading.d.ts +4 -0
- package/component-registry/components/index.d.ts +35 -0
- package/component-registry/components/paragraph.d.ts +4 -0
- package/component-registry/components/progress-loader.d.ts +4 -0
- package/component-registry/components/radioGroup.d.ts +1 -0
- package/component-registry/components/text.d.ts +2 -0
- package/component-registry/components/textarea.d.ts +2 -0
- package/component-registry/createFormFieldComponent.d.ts +52 -0
- package/component-registry/index.d.ts +3 -0
- package/component-registry/types.d.ts +42 -0
- package/component-registry/utils.d.ts +33 -0
- package/component-registry/validation.d.ts +141 -0
- package/component-registry/validationBridge.d.ts +10 -0
- package/components/ConnectionErrorScreen/ConnectionErrorScreen.d.ts +10 -0
- package/components/DatabaseStatusIndicator/DatabaseStatusIndicator.d.ts +24 -0
- package/config/SecureConfigLoader.d.ts +57 -0
- package/config/hooks.d.ts +2 -0
- package/config/index.d.ts +5 -0
- package/config/types.d.ts +94 -0
- package/configReader-BkMPr3Ju.js.map +1 -1
- package/configReader-CbGTKRUP.cjs.map +1 -1
- package/design-system/components/ComponentSourceBadge/ComponentSourceBadge.d.ts +15 -0
- package/design-system/components/FormFieldWrapper/FormFieldWrapper.d.ts +18 -0
- package/design-system/custom/config/date-preset.config.d.ts +7 -0
- package/design-system/custom/config/email-preset.config.d.ts +7 -0
- package/design-system/custom/config/index.d.ts +10 -0
- package/design-system/custom/config/number-preset.config.d.ts +7 -0
- package/design-system/custom/config/tel-preset.config.d.ts +7 -0
- package/design-system/custom/index.d.ts +17 -0
- package/design-system/custom/utils/create-preset-config.d.ts +74 -0
- package/design-system/generated/rhc-catalog.generated.d.ts +9360 -0
- package/design-system/index.d.ts +15 -0
- package/design-system/rhc/components.d.ts +12 -0
- package/design-system/rhc/config/alert.config.d.ts +5 -0
- package/design-system/rhc/config/button.config.d.ts +8 -0
- package/design-system/rhc/config/checkbox.config.d.ts +4 -0
- package/design-system/rhc/config/form-builder.config.d.ts +74 -0
- package/design-system/rhc/config/heading.config.d.ts +5 -0
- package/design-system/rhc/config/index.d.ts +9 -0
- package/design-system/rhc/config/paragraph.config.d.ts +8 -0
- package/design-system/rhc/config/radio-group.config.d.ts +5 -0
- package/design-system/rhc/config/select.config.d.ts +5 -0
- package/design-system/rhc/config/text-input.config.d.ts +5 -0
- package/design-system/rhc/config/textarea.config.d.ts +4 -0
- package/design-system/rhc/index.d.ts +1 -0
- package/design-system/rhc/utils/create-config.d.ts +76 -0
- package/design-system/rhc/utils/generate-schema.d.ts +20 -0
- package/design-system/types.d.ts +22 -0
- package/error-boundaries/BaseErrorBoundary/BaseErrorBoundary.d.ts +31 -0
- package/error-boundaries/ComponentErrorBoundary/ComponentErrorBoundary.d.ts +9 -0
- package/error-boundaries/ErrorBoundaryTest/ErrorBoundaryTest.d.ts +2 -0
- package/error-boundaries/FlowBuilderErrorBoundary/FlowBuilderErrorBoundary.d.ts +7 -0
- package/error-boundaries/index.d.ts +1 -0
- package/features/condition-editor/components/ConditionEditor/ConditionEditor.d.ts +17 -0
- package/features/condition-editor/components/ConditionItem/ConditionItem.d.ts +17 -0
- package/features/condition-editor/components/ConditionOperatorSelect/ConditionOperatorSelect.d.ts +8 -0
- package/features/condition-editor/components/ConditionRow/ConditionRow.d.ts +14 -0
- package/features/condition-editor/components/ConditionSummary/ConditionSummary.d.ts +7 -0
- package/features/condition-editor/components/ConditionTargetSelect/ConditionTargetSelect.d.ts +14 -0
- package/features/condition-editor/components/ConditionValueInput/ConditionValueInput.d.ts +10 -0
- package/features/condition-editor/components/EditConditionForm/EditConditionForm.d.ts +13 -0
- package/features/condition-editor/components/ExistingCondition/ExistingCondition.d.ts +13 -0
- package/features/condition-editor/components/LogicalConnector/LogicalConnector.d.ts +8 -0
- package/features/condition-editor/components/LogicalOperatorToggle/LogicalOperatorToggle.d.ts +13 -0
- package/features/condition-editor/components/NewConditionBuilder/NewConditionBuilder.d.ts +10 -0
- package/features/condition-editor/components/NewConditionRow/NewConditionRow.d.ts +15 -0
- package/features/condition-editor/components/VisibilityConditionBuilder/VisibilityConditionBuilder.d.ts +17 -0
- package/features/condition-editor/components/hooks/useTargetComponents.d.ts +6 -0
- package/features/condition-editor/components/utils/conditionUtils.d.ts +7 -0
- package/features/condition-editor/components/visibilityHelpers.d.ts +21 -0
- package/features/condition-editor/index.d.ts +17 -0
- package/features/dialog-system/components/ConfirmDialog.d.ts +12 -0
- package/features/dialog-system/components/DialogEditor/DialogEditor.d.ts +12 -0
- package/features/dialog-system/components/ModalDialog/ModalDialog.d.ts +12 -0
- package/features/dialog-system/components/VerifyEmailDialog/VerifyEmailDialog.d.ts +10 -0
- package/features/dialog-system/index.d.ts +4 -0
- package/features/form-builder/components/actions/ActionsPanel/ActionsPanel.d.ts +3 -0
- package/features/form-builder/components/actions/SortableActionItem/SortableActionItem.d.ts +9 -0
- package/features/form-builder/components/actions/index.d.ts +4 -0
- package/features/form-builder/components/actions-menu/FormBuilderActionsMenu/FormBuilderActionsMenu.d.ts +1 -0
- package/features/form-builder/components/actions-menu/index.d.ts +3 -0
- package/features/form-builder/components/actions-menu/items/CreateTemplateMenuItem/CreateTemplateMenuItem.d.ts +2 -0
- package/features/form-builder/components/actions-menu/items/ExampleMenuItem/ExampleMenuItem.d.ts +2 -0
- package/features/form-builder/components/actions-menu/items/index.d.ts +2 -0
- package/features/form-builder/components/actions-menu/registry.d.ts +9 -0
- package/features/form-builder/components/actions-menu/types.d.ts +44 -0
- package/features/form-builder/components/buttons/PreviewButton/PreviewButton.d.ts +74 -0
- package/features/form-builder/components/buttons/SaveDropdownButton/SaveDropdownButton.d.ts +8 -0
- package/features/form-builder/components/buttons/index.d.ts +6 -0
- package/features/form-builder/components/canvas/AdminRenderCanvasItems/AdminRenderCanvasItems.d.ts +15 -0
- package/features/form-builder/components/canvas/Canvas/Canvas.d.ts +3 -0
- package/features/form-builder/components/canvas/CanvasComponent/CanvasComponent.d.ts +16 -0
- package/features/form-builder/components/canvas/SortableComponent/SortableComponent.d.ts +13 -0
- package/features/form-builder/components/canvas/index.d.ts +8 -0
- package/features/form-builder/components/components-panel/FormWizardComponentItem/FormWizardComponentItem.d.ts +7 -0
- package/features/form-builder/components/components-panel/FormWizardComponentsPanel/FormWizardComponentsPanel.d.ts +6 -0
- package/features/form-builder/components/components-panel/SortableComponentItem/SortableComponentItem.d.ts +20 -0
- package/features/form-builder/components/components-panel/index.d.ts +6 -0
- package/features/form-builder/components/core/AdminFormContent/AdminFormContent.d.ts +5 -0
- package/features/form-builder/components/core/FormBuilder/FormBuilder.d.ts +23 -0
- package/features/form-builder/components/core/index.d.ts +4 -0
- package/features/form-builder/components/editors/AdminPropertiesPanel/AdminPropertiesPanel.d.ts +3 -0
- package/features/form-builder/components/editors/ConditionsTab/ConditionsTab.d.ts +10 -0
- package/features/form-builder/components/editors/NavigationEditor/NavigationEditor.d.ts +13 -0
- package/features/form-builder/components/editors/NavigationSettings/NavigationSettings.d.ts +2 -0
- package/features/form-builder/components/editors/SectionConfigEditor/SectionConfigEditor.d.ts +8 -0
- package/features/form-builder/components/editors/index.d.ts +10 -0
- package/features/form-builder/components/fields/FieldValueButton/FieldValueButton.d.ts +7 -0
- package/features/form-builder/components/fields/FormFieldSelector/FormFieldSelector.d.ts +19 -0
- package/features/form-builder/components/fields/index.d.ts +4 -0
- package/features/form-builder/components/index.d.ts +13 -0
- package/features/form-builder/components/layout/FormFooter.d.ts +11 -0
- package/features/form-builder/components/layout/FormFooterBase.d.ts +15 -0
- package/features/form-builder/components/layout/FormHeader/FormHeader.d.ts +35 -0
- package/features/form-builder/components/layout/index.d.ts +6 -0
- package/features/form-builder/components/panels/RightPanel/RightPanel.d.ts +1 -0
- package/features/form-builder/components/panels/index.d.ts +1 -0
- package/features/form-builder/components/sections/AdminFormSection/AdminFormSection.d.ts +14 -0
- package/features/form-builder/components/sections/SectionContainer/SectionContainer.d.ts +13 -0
- package/features/form-builder/components/sections/index.d.ts +4 -0
- package/features/form-builder/components/steps/AdminStepSettings/AdminStepSettings.d.ts +7 -0
- package/features/form-builder/components/steps/SortableStepItem/SortableStepItem.d.ts +18 -0
- package/features/form-builder/components/steps/StepLockIndicator/StepLockIndicator.d.ts +18 -0
- package/features/form-builder/components/steps/StepsList/StepsList.d.ts +3 -0
- package/features/form-builder/components/steps/index.d.ts +8 -0
- package/features/form-builder/context/FormBuilderContext.d.ts +30 -0
- package/features/form-builder/context/ResolvedStepContext.d.ts +9 -0
- package/features/form-builder/hooks/useCurrentStep.d.ts +18 -0
- package/features/form-builder/hooks/useDragAndDrop.d.ts +16 -0
- package/features/form-builder/hooks/useDragFeedback.d.ts +32 -0
- package/features/form-builder/hooks/useHoldToDrag.d.ts +18 -0
- package/features/form-builder/hooks/usePreviewConfig.d.ts +23 -0
- package/features/form-builder/hooks/useSectionOperations.d.ts +7 -0
- package/features/form-builder/index.d.ts +10 -0
- package/features/form-builder/providers/DragAndDropProvider/DragAndDropProvider.d.ts +8 -0
- package/features/form-builder/utils/PropertyLockIndicator/PropertyLockIndicator.d.ts +30 -0
- package/features/form-builder/utils/bodyConversionUtils.d.ts +35 -0
- package/features/form-builder/utils/collisionDetection.d.ts +6 -0
- package/features/form-management/components/FormBuilderView/FormBuilderView.d.ts +17 -0
- package/features/form-management/components/FormExplorer/FormExplorer.d.ts +38 -0
- package/features/form-management/components/FormExplorerCore/FormExplorerCore.d.ts +67 -0
- package/features/form-management/components/FormManager/FormManager.d.ts +43 -0
- package/features/form-management/components/FormSectionList/FormSectionList.d.ts +1 -0
- package/features/form-management/components/FormsView/FormsView.d.ts +40 -0
- package/features/form-management/components/NewFormDialog/NewFormDialog.d.ts +25 -0
- package/features/form-management/components/NewProjectDialog/NewProjectDialog.d.ts +23 -0
- package/features/form-management/components/ProjectCard/ProjectCard.d.ts +9 -0
- package/features/form-management/components/ProjectsView/ProjectsView.d.ts +20 -0
- package/features/form-management/components/SearchInput/SearchInput.d.ts +9 -0
- package/features/form-management/components/ViewCard/ViewCard.d.ts +40 -0
- package/features/form-management/components/pages/FormBuilderPage.d.ts +3 -0
- package/features/form-management/components/pages/FormsPage.d.ts +3 -0
- package/features/form-management/components/pages/ProjectsPage.d.ts +16 -0
- package/features/form-management/components/pages/index.d.ts +13 -0
- package/features/form-management/hooks/index.d.ts +9 -0
- package/features/form-management/hooks/useFormActions.d.ts +20 -0
- package/features/form-management/hooks/useFormData.d.ts +13 -0
- package/features/form-management/hooks/useFormExplorerState.d.ts +26 -0
- package/features/form-management/hooks/useFormOperations.d.ts +17 -0
- package/features/form-management/hooks/useFormsQuery.d.ts +50 -0
- package/features/form-management/hooks/useProjectActions.d.ts +25 -0
- package/features/form-management/hooks/useProjectOperations.d.ts +10 -0
- package/features/form-management/hooks/useProjectsData.d.ts +13 -0
- package/features/form-management/index.d.ts +29 -0
- package/features/form-management/layout/BaseHeader/BaseHeader.d.ts +1 -0
- package/features/form-management/layout/BaseLayout/BaseLayout.d.ts +25 -0
- package/features/form-management/providers/QueryProvider.d.ts +8 -0
- package/features/form-management/types/viewTypes.d.ts +53 -0
- package/features/form-management/utils/configInitializer.d.ts +4 -0
- package/features/index.d.ts +9 -0
- package/features/property-editors/components/ComponentValidationEditor/ComponentValidationEditor.d.ts +12 -0
- package/features/property-editors/components/GenericPropertyEditor/GenericPropertyEditor.d.ts +13 -0
- package/features/property-editors/components/ProgressLoaderEditor/ProgressLoaderEditor.d.ts +12 -0
- package/features/property-editors/components/RadioGroupEditor/RadioGroupEditor.d.ts +3 -0
- package/features/property-editors/components/SelectEditor/SelectEditor.d.ts +3 -0
- package/features/property-editors/components/ValidationRuleEditor/ValidationRuleEditor.d.ts +23 -0
- package/features/property-editors/components/ValidationRuleListItem/ValidationRuleListItem.d.ts +9 -0
- package/features/property-editors/components/ValidationRuleSheet/ValidationRuleSheet.d.ts +14 -0
- package/features/property-editors/index.d.ts +5 -0
- package/features/property-editors/types/schema.d.ts +66 -0
- package/features/property-editors/types/types.d.ts +23 -0
- package/features/template-system/components/CreateTemplateDialog/CreateTemplateDialog.d.ts +17 -0
- package/features/template-system/components/DeleteTemplateDialog/DeleteTemplateDialog.d.ts +11 -0
- package/features/template-system/components/DuplicateTemplateDialog/DuplicateTemplateDialog.d.ts +11 -0
- package/features/template-system/components/EditTemplateDialog/EditTemplateDialog.d.ts +10 -0
- package/features/template-system/components/EnhancedTemplateBrowser/EnhancedTemplateBrowser.d.ts +11 -0
- package/features/template-system/components/TemplateContextMenu/TemplateContextMenu.d.ts +12 -0
- package/features/template-system/hooks/useTemplateGovernance.d.ts +46 -0
- package/features/template-system/hooks/useTemplatePermissions.d.ts +104 -0
- package/features/template-system/hooks/useTemplateStepTitle.d.ts +5 -0
- package/features/template-system/index.d.ts +17 -0
- package/features/template-system/services/TemplateStorageService.d.ts +52 -0
- package/features/template-system/utils/templateApplication.d.ts +75 -0
- package/features/template-system/utils/templateCategories.d.ts +105 -0
- package/features/template-system/utils/templateConfig.d.ts +148 -0
- package/features/template-system/utils/templateDeletion.d.ts +44 -0
- package/features/template-system/utils/templateDuplication.d.ts +65 -0
- package/features/template-system/utils/templateGovernance.d.ts +54 -0
- package/features/template-system/utils/templateLoader.d.ts +25 -0
- package/features/template-system/utils/templateMetadataOperations.d.ts +40 -0
- package/features/template-system/utils/templateUtils.d.ts +12 -0
- package/features/trigger-action-system/components/ActionConfigurationSheet/ActionConfigurationSheet.d.ts +9 -0
- package/features/trigger-action-system/components/ActionEditor/ActionEditor.d.ts +15 -0
- package/features/trigger-action-system/components/ActionsList/ActionsList.d.ts +8 -0
- package/features/trigger-action-system/components/ComponentTriggerActionEditor/ComponentTriggerActionEditor.d.ts +8 -0
- package/features/trigger-action-system/components/TriggerContextSelector/TriggerContextSelector.d.ts +9 -0
- package/features/trigger-action-system/index.d.ts +5 -0
- package/features/visual-mapping/components/ApiCallEditor/ApiCallEditor.d.ts +15 -0
- package/features/visual-mapping/components/ApiResponsePreview/ApiResponsePreview.d.ts +8 -0
- package/features/visual-mapping/components/ApiStructureTree/ApiStructureTree.d.ts +10 -0
- package/features/visual-mapping/components/CompactApiTestButton/CompactApiTestButton.d.ts +11 -0
- package/features/visual-mapping/components/ConnectionCircle/ConnectionCircle.d.ts +8 -0
- package/features/visual-mapping/components/ConnectionLines/ConnectionLines.d.ts +8 -0
- package/features/visual-mapping/components/CurrentMappingsDisplay/CurrentMappingsDisplay.d.ts +5 -0
- package/features/visual-mapping/components/EmptyFormFieldsMessage/EmptyFormFieldsMessage.d.ts +1 -0
- package/features/visual-mapping/components/FormFieldItem/FormFieldItem.d.ts +9 -0
- package/features/visual-mapping/components/FormFieldsList/FormFieldsList.d.ts +9 -0
- package/features/visual-mapping/components/KeyValueEditor/KeyValueEditor.d.ts +39 -0
- package/features/visual-mapping/components/MappingActionsDropdownMenu/MappingActionsDropdownMenu.d.ts +9 -0
- package/features/visual-mapping/components/MappingConnections/MappingConnections.d.ts +10 -0
- package/features/visual-mapping/components/RequestBodyEditor/RequestBodyEditor.d.ts +10 -0
- package/features/visual-mapping/components/SearchBar/SearchBar.d.ts +25 -0
- package/features/visual-mapping/components/VisualApiMappingInterface/VisualApiMappingInterface.d.ts +9 -0
- package/features/visual-mapping/components/index.d.ts +2 -0
- package/features/visual-mapping/components/typeCompatibility.d.ts +4 -0
- package/features/visual-mapping/components/utils/getFormFieldDataType.d.ts +2 -0
- package/features/visual-mapping/index.d.ts +18 -0
- package/features/visual-mapping/utils/apiBodyUtils.d.ts +1 -0
- package/index.d.ts +35 -0
- package/integrations/NextJSIntegration.d.ts +23 -0
- package/integrations/ReactRouterIntegration.d.ts +16 -0
- package/integrations/index.d.ts +12 -0
- package/integrations/react-router/FormBuilderPage/FormBuilderPage.d.ts +23 -0
- package/integrations/react-router/FormsPage.d.ts +18 -0
- package/integrations/react-router/index.d.ts +11 -0
- package/package.json +1 -1
- package/providers/FormSaveContext.d.ts +20 -0
- package/providers/FormSaveProvider.d.ts +93 -0
- package/providers/ThemeProvider.d.ts +2 -0
- package/providers/index.d.ts +9 -0
- package/server.d.ts +8 -0
- package/storage/FilesystemStorageProvider.d.ts +19 -0
- package/storage/NullStorageProvider.d.ts +15 -0
- package/storage/PgLiteSyncProvider.d.ts +41 -0
- package/storage/StorageProviderFactory.d.ts +77 -0
- package/storage/ZeroConfigFilesystemStorageProvider.d.ts +157 -0
- package/storage/database-schemas.d.ts +17901 -0
- package/storage/database-types.d.ts +194 -0
- package/storage/index.d.ts +17 -0
- package/storage/types.d.ts +195 -0
- package/store/formBuilderStore.d.ts +287 -0
- package/store/index.d.ts +7 -0
- package/store/initialState/templates.d.ts +22 -0
- package/styles/index.d.ts +0 -0
- package/utils/configInitializer.d.ts +11 -0
- package/utils/configReader.d.ts +13 -0
- package/utils/fieldChangeValidation.d.ts +127 -0
- package/utils/fileStorage.d.ts +253 -0
- package/utils/formSaver.d.ts +22 -0
- package/utils/formsExplorer.d.ts +128 -0
- package/utils/index.d.ts +2 -0
- package/utils/routeUtils.d.ts +85 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ProjectsPageProps {
|
|
3
|
+
/**
|
|
4
|
+
* Optional CSS class name
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional inline styles
|
|
9
|
+
*/
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Standalone ProjectsPage component for user-defined routing
|
|
14
|
+
* Shows the projects overview and allows navigation to forms
|
|
15
|
+
*/
|
|
16
|
+
export declare const ProjectsPage: React.FC<ProjectsPageProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page components for user-defined routing
|
|
3
|
+
*/
|
|
4
|
+
/** @deprecated Import from integrations/react-router instead */
|
|
5
|
+
export type { FormBuilderPageProps } from './FormBuilderPage';
|
|
6
|
+
/** @deprecated Import from integrations/react-router instead */
|
|
7
|
+
export { FormBuilderPage } from './FormBuilderPage';
|
|
8
|
+
/** @deprecated Import from integrations/react-router instead */
|
|
9
|
+
export type { FormsPageProps } from './FormsPage';
|
|
10
|
+
/** @deprecated Import from integrations/react-router instead */
|
|
11
|
+
export { FormsPage } from './FormsPage';
|
|
12
|
+
export type { ProjectsPageProps } from './ProjectsPage';
|
|
13
|
+
export { ProjectsPage } from './ProjectsPage';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form Management Hooks
|
|
3
|
+
*/
|
|
4
|
+
export type { UseFormExplorerStateOptions, UseFormExplorerStateReturn, } from './useFormExplorerState';
|
|
5
|
+
export { useFormExplorerState } from './useFormExplorerState';
|
|
6
|
+
export type { UseFormOperationsOptions, UseFormOperationsReturn, } from './useFormOperations';
|
|
7
|
+
export { useFormOperations } from './useFormOperations';
|
|
8
|
+
export type { UseProjectOperationsOptions, UseProjectOperationsReturn, } from './useProjectOperations';
|
|
9
|
+
export { useProjectOperations } from './useProjectOperations';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CreateFormRequest } from '../../../../../core/src/index.ts';
|
|
2
|
+
export interface UseFormActionsReturn {
|
|
3
|
+
/**
|
|
4
|
+
* Create a new form in a project
|
|
5
|
+
*/
|
|
6
|
+
createForm: (request: CreateFormRequest) => Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Delete a specific form from a project
|
|
9
|
+
*/
|
|
10
|
+
deleteForm: (projectId: string, formId: string) => Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Edit a form (navigation helper)
|
|
13
|
+
*/
|
|
14
|
+
editForm: (projectId: string, formId: string) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Hook providing centralized form operations
|
|
18
|
+
* Uses the storage layer directly to avoid prop drilling
|
|
19
|
+
*/
|
|
20
|
+
export declare function useFormActions(): UseFormActionsReturn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormWizardConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
import { FormConfig } from '../../../config/types';
|
|
3
|
+
interface UseFormDataOptions {
|
|
4
|
+
projectId: string;
|
|
5
|
+
formId: string;
|
|
6
|
+
config?: FormConfig;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Query hook for loading a single form configuration
|
|
10
|
+
* Returns form config with loading and error states
|
|
11
|
+
*/
|
|
12
|
+
export declare function useFormData({ projectId, formId, config }: UseFormDataOptions): import('@tanstack/react-query').UseQueryResult<FormWizardConfig, Error>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FormsExplorerState } from '../../../../../core/src/index.ts';
|
|
2
|
+
import { FormConfig } from '../../../config/types';
|
|
3
|
+
export interface UseFormExplorerStateOptions {
|
|
4
|
+
autoLoad?: boolean;
|
|
5
|
+
config?: FormConfig;
|
|
6
|
+
}
|
|
7
|
+
export interface UseFormExplorerStateReturn {
|
|
8
|
+
state: FormsExplorerState;
|
|
9
|
+
searchQuery: string;
|
|
10
|
+
setSearchQuery: (query: string) => void;
|
|
11
|
+
filteredProjects: FormsExplorerState["projects"];
|
|
12
|
+
loadProjects: () => Promise<void>;
|
|
13
|
+
selectedProject: string | null;
|
|
14
|
+
setSelectedProject: (projectId: string | null) => void;
|
|
15
|
+
addProjectOptimistic: (project: Omit<FormsExplorerState["projects"][0], "lastModified">) => void;
|
|
16
|
+
removeProjectOptimistic: (projectId: string) => void;
|
|
17
|
+
addFormOptimistic: (projectId: string, form: {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
removeFormOptimistic: (projectId: string, formId: string) => void;
|
|
23
|
+
refreshProjectsList: () => Promise<void>;
|
|
24
|
+
invalidateCache: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function useFormExplorerState({ autoLoad, config, }?: UseFormExplorerStateOptions): UseFormExplorerStateReturn;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FormWizardConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
export interface UseFormOperationsOptions {
|
|
3
|
+
onFormLoad?: (projectId: string, wizardId: string) => Promise<FormWizardConfig>;
|
|
4
|
+
onFormCreate?: (projectId: string, formId: string, title: string) => Promise<FormWizardConfig | null>;
|
|
5
|
+
onFormDelete?: (projectId: string, wizardId: string) => Promise<boolean>;
|
|
6
|
+
onFormSave?: (projectId: string, wizardId: string, config: FormWizardConfig) => Promise<void>;
|
|
7
|
+
onFormEdit?: (projectId: string, wizardId: string, config: FormWizardConfig) => void;
|
|
8
|
+
onFormCreated?: (projectId: string, wizardId: string, config: FormWizardConfig) => void;
|
|
9
|
+
onProjectsRefresh?: () => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface UseFormOperationsReturn {
|
|
12
|
+
handleCreateForm: (projectId: string, formTitle: string, formId?: string) => Promise<FormWizardConfig | null>;
|
|
13
|
+
handleDeleteForm: (projectId: string, wizardId: string) => Promise<boolean>;
|
|
14
|
+
handleEditForm: (projectId: string, wizardId: string) => Promise<void>;
|
|
15
|
+
handleSaveForm: (projectId: string, wizardId: string, config: FormWizardConfig) => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare function useFormOperations({ onFormLoad, onFormCreate, onFormDelete, onFormSave, onFormEdit, onFormCreated, onProjectsRefresh, }?: UseFormOperationsOptions): UseFormOperationsReturn;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { FormConfig } from '../../../config/types';
|
|
2
|
+
export declare const formsQueryKeys: {
|
|
3
|
+
all: readonly ["forms"];
|
|
4
|
+
projects: () => readonly ["forms", "projects"];
|
|
5
|
+
project: (projectId: string) => readonly ["forms", "projects", string];
|
|
6
|
+
form: (projectId: string, formId: string) => readonly ["forms", "projects", string, string];
|
|
7
|
+
};
|
|
8
|
+
interface UseFormsQueryOptions {
|
|
9
|
+
config?: FormConfig;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Query hook for fetching all projects and forms
|
|
13
|
+
* Replaces useFormExplorerState with automatic caching and background updates
|
|
14
|
+
*/
|
|
15
|
+
export declare function useFormsQuery({ config }?: UseFormsQueryOptions): import('@tanstack/react-query').UseQueryResult<import('../../../../../core/src/index.ts').ProjectMetadata[], Error>;
|
|
16
|
+
/**
|
|
17
|
+
* Mutation hook for creating forms with optimistic updates
|
|
18
|
+
*/
|
|
19
|
+
export declare function useCreateFormMutation(): import('@tanstack/react-query').UseMutationResult<{
|
|
20
|
+
config: import('../../../../../core/src/index.ts').FormWizardConfig;
|
|
21
|
+
projectId: string;
|
|
22
|
+
formId: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}, Error, {
|
|
26
|
+
projectId: string;
|
|
27
|
+
formId: string;
|
|
28
|
+
title: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
}, {
|
|
31
|
+
previousProjects: unknown;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Mutation hook for deleting forms with optimistic updates
|
|
35
|
+
*/
|
|
36
|
+
export declare function useDeleteFormMutation(): import('@tanstack/react-query').UseMutationResult<{
|
|
37
|
+
projectId: string;
|
|
38
|
+
formId: string;
|
|
39
|
+
}, Error, {
|
|
40
|
+
projectId: string;
|
|
41
|
+
formId: string;
|
|
42
|
+
}, {
|
|
43
|
+
previousProjects: unknown;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Hook to force refresh all form data
|
|
47
|
+
* Useful for manual sync when needed
|
|
48
|
+
*/
|
|
49
|
+
export declare function useRefreshForms(): () => void;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CreateProjectRequest } from '../../../../../core/src/index.ts';
|
|
2
|
+
export interface UseProjectActionsReturn {
|
|
3
|
+
/**
|
|
4
|
+
* Create a new project
|
|
5
|
+
*/
|
|
6
|
+
createProject: (request: CreateProjectRequest) => Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Delete a project by deleting all its forms
|
|
9
|
+
* Note: Some storage providers may have direct project deletion methods
|
|
10
|
+
*/
|
|
11
|
+
deleteProject: (projectId: string) => Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Delete a specific form from a project
|
|
14
|
+
*/
|
|
15
|
+
deleteForm: (projectId: string, formId: string) => Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Navigate to a project's forms view (navigation helper)
|
|
18
|
+
*/
|
|
19
|
+
navigateToProject: (projectId: string) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Hook providing centralized project and form operations
|
|
23
|
+
* Uses the storage layer directly to avoid prop drilling
|
|
24
|
+
*/
|
|
25
|
+
export declare function useProjectActions(): UseProjectActionsReturn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useProjectOperations - Hook for project operations
|
|
3
|
+
*/
|
|
4
|
+
export interface UseProjectOperationsOptions {
|
|
5
|
+
onProjectsRefresh?: () => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export interface UseProjectOperationsReturn {
|
|
8
|
+
handleCreateProject: (projectName: string, description?: string) => Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useProjectOperations({ onProjectsRefresh, }?: UseProjectOperationsOptions): UseProjectOperationsReturn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormConfig } from '../../../config/types';
|
|
2
|
+
export declare const projectsQueryKeys: {
|
|
3
|
+
all: readonly ["projects"];
|
|
4
|
+
};
|
|
5
|
+
interface UseProjectsDataOptions {
|
|
6
|
+
config?: FormConfig;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Query hook for fetching all projects
|
|
10
|
+
* Provides automatic caching and background updates via TanStack Query
|
|
11
|
+
*/
|
|
12
|
+
export declare function useProjectsData({ config }?: UseProjectsDataOptions): import('@tanstack/react-query').UseQueryResult<import('../../../../../core/src/index.ts').ProjectMetadata[], Error>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form Management Feature
|
|
3
|
+
* Handles form and project CRUD operations
|
|
4
|
+
*/
|
|
5
|
+
/** FormBuilderView - Standalone form builder component */
|
|
6
|
+
export type { FormBuilderViewProps } from './components/FormBuilderView/FormBuilderView';
|
|
7
|
+
export { FormBuilderView } from './components/FormBuilderView/FormBuilderView';
|
|
8
|
+
/** FormsView - Standalone forms list component */
|
|
9
|
+
export type { FormsViewProps } from './components/FormsView/FormsView';
|
|
10
|
+
export { FormsView } from './components/FormsView/FormsView';
|
|
11
|
+
/** ProjectsView - Standalone projects list component */
|
|
12
|
+
export type { ProjectsViewProps } from './components/ProjectsView/ProjectsView';
|
|
13
|
+
export { ProjectsView } from './components/ProjectsView/ProjectsView';
|
|
14
|
+
export { useFormData } from './hooks/useFormData';
|
|
15
|
+
export { useProjectsData } from './hooks/useProjectsData';
|
|
16
|
+
export type { NewFormDialogProps } from './components/NewFormDialog/NewFormDialog';
|
|
17
|
+
export { NewFormDialog } from './components/NewFormDialog/NewFormDialog';
|
|
18
|
+
export type { NewProjectDialogProps } from './components/NewProjectDialog/NewProjectDialog';
|
|
19
|
+
export { NewProjectDialog } from './components/NewProjectDialog/NewProjectDialog';
|
|
20
|
+
export type { ProjectCardProps } from './components/ProjectCard/ProjectCard';
|
|
21
|
+
export { ProjectCard } from './components/ProjectCard/ProjectCard';
|
|
22
|
+
export type { UseFormExplorerStateOptions, UseFormExplorerStateReturn, UseFormOperationsOptions, UseFormOperationsReturn, UseProjectOperationsOptions, UseProjectOperationsReturn, } from './hooks';
|
|
23
|
+
export { useFormExplorerState, useFormOperations, useProjectOperations, } from './hooks';
|
|
24
|
+
/** @deprecated Since v1.2 - Use standalone view components with NavigationProvider */
|
|
25
|
+
export type { FormExplorerCoreProps } from './components/FormExplorerCore/FormExplorerCore';
|
|
26
|
+
/** @deprecated Since v1.2 - Use standalone view components with NavigationProvider */
|
|
27
|
+
export { FormExplorerCore } from './components/FormExplorerCore/FormExplorerCore';
|
|
28
|
+
/** @deprecated SPA view state types - not needed for standalone components */
|
|
29
|
+
export type { ExplorerViewType, NavigationContext, ViewState, } from './types/viewTypes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BaseHeader: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ButtonProps } from '../../../../../../ui/src/design-system/index.ts';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface BaseLayoutProps {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
showBackButton?: boolean;
|
|
7
|
+
onBack?: () => void;
|
|
8
|
+
backButtonText?: string;
|
|
9
|
+
searchSlot?: ReactNode;
|
|
10
|
+
primaryAction?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
secondaryActions?: Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
onClick: () => void;
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
variant?: ButtonProps["appearance"];
|
|
20
|
+
}>;
|
|
21
|
+
isLoading?: boolean;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const BaseLayout: React.FC<BaseLayoutProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const queryClient: QueryClient;
|
|
4
|
+
interface QueryProviderProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function QueryProvider({ children }: QueryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { queryClient };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View types for the SPA-style FormExplorer navigation
|
|
3
|
+
*
|
|
4
|
+
* @deprecated These types support the legacy FormExplorerCore SPA architecture.
|
|
5
|
+
* Standalone components (ProjectsView, FormsView, FormBuilderView) do not need these types.
|
|
6
|
+
*/
|
|
7
|
+
/** @deprecated Use standalone view components instead */
|
|
8
|
+
export type ExplorerViewType = "projects" | "forms" | "builder" | "preview";
|
|
9
|
+
/** @deprecated Use standalone view components instead */
|
|
10
|
+
export interface BaseViewState {
|
|
11
|
+
type: ExplorerViewType;
|
|
12
|
+
}
|
|
13
|
+
/** @deprecated Use standalone view components instead */
|
|
14
|
+
export interface ProjectsViewState extends BaseViewState {
|
|
15
|
+
type: "projects";
|
|
16
|
+
}
|
|
17
|
+
/** @deprecated Use standalone view components instead */
|
|
18
|
+
export interface FormsViewState extends BaseViewState {
|
|
19
|
+
type: "forms";
|
|
20
|
+
projectId: string;
|
|
21
|
+
projectName: string;
|
|
22
|
+
}
|
|
23
|
+
/** @deprecated Use standalone view components instead */
|
|
24
|
+
export interface BuilderViewState extends BaseViewState {
|
|
25
|
+
type: "builder";
|
|
26
|
+
projectId: string;
|
|
27
|
+
formId: string;
|
|
28
|
+
config?: unknown;
|
|
29
|
+
}
|
|
30
|
+
/** @deprecated Use standalone view components instead */
|
|
31
|
+
export interface PreviewViewState extends BaseViewState {
|
|
32
|
+
type: "preview";
|
|
33
|
+
projectId: string;
|
|
34
|
+
formId: string;
|
|
35
|
+
}
|
|
36
|
+
/** @deprecated Use standalone view components instead */
|
|
37
|
+
export type ViewState = ProjectsViewState | FormsViewState | BuilderViewState | PreviewViewState;
|
|
38
|
+
/** @deprecated Use standalone view components instead */
|
|
39
|
+
export interface NavigationContext {
|
|
40
|
+
currentView: ViewState;
|
|
41
|
+
viewHistory: ViewState[];
|
|
42
|
+
navigateToView: (view: ViewState, addToHistory?: boolean) => void;
|
|
43
|
+
navigateBack: () => void;
|
|
44
|
+
canGoBack: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** @deprecated Use standalone view components instead */
|
|
47
|
+
export declare const createProjectsView: () => ProjectsViewState;
|
|
48
|
+
/** @deprecated Use standalone view components instead */
|
|
49
|
+
export declare const createFormsView: (projectId: string, projectName: string) => FormsViewState;
|
|
50
|
+
/** @deprecated Use standalone view components instead */
|
|
51
|
+
export declare const createBuilderView: (projectId: string, formId: string, config?: unknown) => BuilderViewState;
|
|
52
|
+
/** @deprecated Use standalone view components instead */
|
|
53
|
+
export declare const createPreviewView: (projectId: string, formId: string) => PreviewViewState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './condition-editor';
|
|
2
|
+
export * from './dialog-system';
|
|
3
|
+
export * from './form-builder';
|
|
4
|
+
export { CanvasComponent, FormBuilder } from './form-builder';
|
|
5
|
+
export * from './form-management';
|
|
6
|
+
export * from './property-editors';
|
|
7
|
+
export * from './template-system';
|
|
8
|
+
export * from './trigger-action-system';
|
|
9
|
+
export * from './visual-mapping';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentConfig, ComponentValidation } from '../../../../../../core/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ComponentValidationEditorProps {
|
|
4
|
+
component: ComponentConfig;
|
|
5
|
+
onChange: (validation: ComponentValidation | undefined) => void;
|
|
6
|
+
fieldId: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Component validation editor that bridges the admin and user validation systems
|
|
10
|
+
*/
|
|
11
|
+
export declare const ComponentValidationEditor: React.FC<ComponentValidationEditorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentValue } from '../../../../component-registry/types';
|
|
2
|
+
import { ComponentConfig } from '../../../../../../core/src/index.ts';
|
|
3
|
+
import { PropertyEditorSchema } from '../../types/schema';
|
|
4
|
+
interface GenericPropertyEditorProps {
|
|
5
|
+
component: ComponentConfig;
|
|
6
|
+
stepId: string;
|
|
7
|
+
handlePropertyChange: (field: string, value: ComponentValue) => void;
|
|
8
|
+
handleChange: (field: string, value: ComponentValue) => void;
|
|
9
|
+
schema: PropertyEditorSchema;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const GenericPropertyEditor: React.FC<GenericPropertyEditorProps>;
|
|
13
|
+
export default GenericPropertyEditor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProgressLoaderConfig } from '../../../../../../ui/src/index.ts';
|
|
2
|
+
interface ProgressLoaderEditorProps {
|
|
3
|
+
config: Partial<ProgressLoaderConfig>;
|
|
4
|
+
onConfigUpdate: (updates: Partial<ProgressLoaderConfig>) => void;
|
|
5
|
+
availableComponents?: Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ProgressLoaderEditor: import('react').NamedExoticComponent<ProgressLoaderEditorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentValidationConfig, ValidationRuleParameter } from '../../../../component-registry/validation';
|
|
2
|
+
import { ComponentConfig } from '../../../../../../core/src/index.ts';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
interface ValidationParameterInputProps {
|
|
5
|
+
parameter: ValidationRuleParameter;
|
|
6
|
+
value: string | number | boolean;
|
|
7
|
+
onChange: (value: string | number | boolean) => void;
|
|
8
|
+
fieldId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Input component for a single validation rule parameter
|
|
12
|
+
*/
|
|
13
|
+
export declare const ValidationParameterInput: React.FC<ValidationParameterInputProps>;
|
|
14
|
+
interface ValidationRulesConfiguratorProps {
|
|
15
|
+
component: ComponentConfig;
|
|
16
|
+
value: ComponentValidationConfig | undefined;
|
|
17
|
+
onChange: (config: ComponentValidationConfig) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Complete validation rules configuration interface
|
|
21
|
+
*/
|
|
22
|
+
export declare const ValidationRulesConfigurator: React.FC<ValidationRulesConfiguratorProps>;
|
|
23
|
+
export {};
|
package/features/property-editors/components/ValidationRuleListItem/ValidationRuleListItem.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidationRuleDefinition, ValidationRuleInstance } from '../../../../component-registry/validation';
|
|
2
|
+
interface ValidationRuleListItemProps {
|
|
3
|
+
rule: ValidationRuleInstance;
|
|
4
|
+
ruleDefinition: ValidationRuleDefinition;
|
|
5
|
+
onEdit: () => void;
|
|
6
|
+
onDelete: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ValidationRuleListItem: import('react').NamedExoticComponent<ValidationRuleListItemProps>;
|
|
9
|
+
export { ValidationRuleListItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationRuleDefinition, ValidationRuleInstance } from '../../../../component-registry/validation';
|
|
2
|
+
interface ValidationRuleSheetProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
availableRuleTypes: ValidationRuleDefinition[];
|
|
6
|
+
editingRule?: {
|
|
7
|
+
rule: ValidationRuleInstance;
|
|
8
|
+
index: number;
|
|
9
|
+
} | null;
|
|
10
|
+
onRuleCreate?: (rule: ValidationRuleInstance) => void;
|
|
11
|
+
onRuleUpdate?: (index: number, rule: ValidationRuleInstance) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ValidationRuleSheet: import('react').NamedExoticComponent<ValidationRuleSheetProps>;
|
|
14
|
+
export { ValidationRuleSheet };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { GenericPropertyEditor } from './components/GenericPropertyEditor/GenericPropertyEditor';
|
|
2
|
+
export { ProgressLoaderEditor } from './components/ProgressLoaderEditor/ProgressLoaderEditor';
|
|
3
|
+
export { default as RadioGroupEditor } from './components/RadioGroupEditor/RadioGroupEditor';
|
|
4
|
+
export { default as SelectEditor } from './components/SelectEditor/SelectEditor';
|
|
5
|
+
export * from './types/schema';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ComponentValue } from '../../../component-registry/types';
|
|
2
|
+
import { ComponentConfig } from '../../../../../core/src/index.ts';
|
|
3
|
+
export type PropertyFieldType = "text" | "textarea" | "select" | "checkbox" | "number" | "email" | "url" | "validationRules" | "valueChangeActions" | "triggers" | "conditions";
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PropertyFieldBase {
|
|
10
|
+
type: PropertyFieldType;
|
|
11
|
+
label: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
defaultValue?: ComponentValue;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
tab?: "general" | "advanced" | "validation" | "triggers" | "conditions" | "styling";
|
|
16
|
+
condition?: (component: ComponentConfig) => boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface TextFieldSchema extends PropertyFieldBase {
|
|
19
|
+
type: "text" | "email" | "url";
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface TextareaFieldSchema extends PropertyFieldBase {
|
|
24
|
+
type: "textarea";
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
rows?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface SelectFieldSchema extends PropertyFieldBase {
|
|
29
|
+
type: "select";
|
|
30
|
+
options: SelectOption[];
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CheckboxFieldSchema extends PropertyFieldBase {
|
|
34
|
+
type: "checkbox";
|
|
35
|
+
}
|
|
36
|
+
export interface NumberFieldSchema extends PropertyFieldBase {
|
|
37
|
+
type: "number";
|
|
38
|
+
min?: number;
|
|
39
|
+
max?: number;
|
|
40
|
+
step?: number;
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ValidationRulesFieldSchema extends PropertyFieldBase {
|
|
44
|
+
type: "validationRules";
|
|
45
|
+
}
|
|
46
|
+
export interface ValueChangeActionsFieldSchema extends PropertyFieldBase {
|
|
47
|
+
type: "valueChangeActions";
|
|
48
|
+
}
|
|
49
|
+
export interface TriggersFieldSchema extends PropertyFieldBase {
|
|
50
|
+
type: "triggers";
|
|
51
|
+
}
|
|
52
|
+
export interface ConditionsFieldSchema extends PropertyFieldBase {
|
|
53
|
+
type: "conditions";
|
|
54
|
+
}
|
|
55
|
+
export type PropertyFieldSchema = TextFieldSchema | TextareaFieldSchema | SelectFieldSchema | CheckboxFieldSchema | NumberFieldSchema | ValidationRulesFieldSchema | ValueChangeActionsFieldSchema | TriggersFieldSchema | ConditionsFieldSchema;
|
|
56
|
+
export interface PropertyEditorSchema {
|
|
57
|
+
component: Record<string, PropertyFieldSchema>;
|
|
58
|
+
properties: Record<string, PropertyFieldSchema>;
|
|
59
|
+
}
|
|
60
|
+
export interface PropertyEditorProps {
|
|
61
|
+
component: ComponentConfig;
|
|
62
|
+
stepId: string;
|
|
63
|
+
handlePropertyChange: (field: string, value: ComponentValue) => void;
|
|
64
|
+
handleChange: (field: string, value: ComponentValue) => void;
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
import { ComponentValue } from '../../../component-registry/types';
|
|
3
|
+
export interface PropertyEditorProps {
|
|
4
|
+
component: ComponentConfig;
|
|
5
|
+
stepId: string;
|
|
6
|
+
handlePropertyChange: (field: string, value: ComponentValue) => void;
|
|
7
|
+
handleChange: (field: string, value: ComponentValue) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface PropertyFieldConfig {
|
|
10
|
+
type: "text" | "textarea" | "select" | "checkbox" | "number";
|
|
11
|
+
label: string;
|
|
12
|
+
field: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
options?: Array<{
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}>;
|
|
18
|
+
rows?: number;
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
isComponentProperty?: boolean;
|
|
21
|
+
condition?: (component: ComponentConfig) => boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TemplateCategory } from '../../../../utils/fileStorage';
|
|
2
|
+
import { FormStepConfig } from '../../../../../../core/src/index.ts';
|
|
3
|
+
interface CreateTemplateDialogProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
steps: FormStepConfig[];
|
|
7
|
+
preSelectedStepId?: string | null;
|
|
8
|
+
onCreateTemplate: (templateData: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: TemplateCategory;
|
|
12
|
+
tags: string[];
|
|
13
|
+
stepsData: FormStepConfig[];
|
|
14
|
+
}) => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare const CreateTemplateDialog: React.FC<CreateTemplateDialogProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Template, TemplateStorageConfig } from '../../../../utils/fileStorage';
|
|
2
|
+
interface DeleteTemplateDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
template: Template | null;
|
|
6
|
+
storageConfig: TemplateStorageConfig | null;
|
|
7
|
+
currentUser: string;
|
|
8
|
+
onTemplateDeleted: (templateId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DeleteTemplateDialog: React.FC<DeleteTemplateDialogProps>;
|
|
11
|
+
export {};
|
package/features/template-system/components/DuplicateTemplateDialog/DuplicateTemplateDialog.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Template, TemplateCategory, TemplateStorageConfig } from '../../../../utils/fileStorage';
|
|
2
|
+
interface DuplicateTemplateDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
template: Template | null;
|
|
6
|
+
storageConfig: TemplateStorageConfig | null;
|
|
7
|
+
currentUser: string;
|
|
8
|
+
onTemplateDuplicated: (templateId: string, category: TemplateCategory) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DuplicateTemplateDialog: React.FC<DuplicateTemplateDialogProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Template, TemplateStorageConfig } from '../../../../utils/fileStorage';
|
|
2
|
+
interface EditTemplateDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
template: Template | null;
|
|
6
|
+
storageConfig: TemplateStorageConfig | null;
|
|
7
|
+
onTemplateUpdated: (updatedTemplate: Template) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const EditTemplateDialog: React.FC<EditTemplateDialogProps>;
|
|
10
|
+
export {};
|
package/features/template-system/components/EnhancedTemplateBrowser/EnhancedTemplateBrowser.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StepTemplate } from '../../../../store';
|
|
2
|
+
import { TemplateCategory } from '../../../../utils/fileStorage';
|
|
3
|
+
interface EnhancedTemplateBrowserProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSelectTemplate: (templateKey: StepTemplate) => void;
|
|
7
|
+
onSelectCustomTemplate?: (templateId: string, category: TemplateCategory) => void;
|
|
8
|
+
currentUser?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const EnhancedTemplateBrowser: React.FC<EnhancedTemplateBrowserProps>;
|
|
11
|
+
export {};
|