@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,18 @@
|
|
|
1
|
+
import { FormStepConfig, TemplateStepConfig } from '../../../../../../../core/src/index.ts';
|
|
2
|
+
interface StepLockIndicatorProps {
|
|
3
|
+
step: FormStepConfig | TemplateStepConfig;
|
|
4
|
+
templateOrigin?: {
|
|
5
|
+
templateId: string;
|
|
6
|
+
stepIndex?: number;
|
|
7
|
+
};
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* StepLockIndicator component displays lock icons for template steps with informative tooltips.
|
|
12
|
+
*
|
|
13
|
+
* - Generic template steps: Shows lock icon with explanation about organizational standards
|
|
14
|
+
* - Team template steps: Shows users icon with explanation about team templates
|
|
15
|
+
* - Regular steps: No indicator shown
|
|
16
|
+
*/
|
|
17
|
+
export declare const StepLockIndicator: React.FC<StepLockIndicatorProps>;
|
|
18
|
+
export default StepLockIndicator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type * from './AdminStepSettings/AdminStepSettings';
|
|
2
|
+
export { default as AdminStepSettings } from './AdminStepSettings/AdminStepSettings';
|
|
3
|
+
export type * from './SortableStepItem/SortableStepItem';
|
|
4
|
+
export { default as SortableStepItem } from './SortableStepItem/SortableStepItem';
|
|
5
|
+
export type * from './StepLockIndicator/StepLockIndicator';
|
|
6
|
+
export { default as StepLockIndicator } from './StepLockIndicator/StepLockIndicator';
|
|
7
|
+
export type * from './StepsList/StepsList';
|
|
8
|
+
export { default as StepsList } from './StepsList/StepsList';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FormSectionConfig, FormStepConfig, FormWizardConfig, TemplateStepConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface FormBuilderContextValue {
|
|
4
|
+
formConfig: FormWizardConfig;
|
|
5
|
+
selectedStepId: string | null;
|
|
6
|
+
selectedSectionId: string | null;
|
|
7
|
+
currentStep: FormStepConfig | TemplateStepConfig | null;
|
|
8
|
+
currentSection: FormSectionConfig | null;
|
|
9
|
+
updateFormConfig: (config: FormWizardConfig) => void;
|
|
10
|
+
updateFormTitle: (title: string) => void;
|
|
11
|
+
setSelectedStepId: (stepId: string | null) => void;
|
|
12
|
+
addStep: () => FormStepConfig;
|
|
13
|
+
updateStep: (stepId: string, updates: Partial<FormStepConfig>) => void;
|
|
14
|
+
deleteStep: (stepId: string) => void;
|
|
15
|
+
reorderSteps: (steps: FormStepConfig[]) => void;
|
|
16
|
+
setSelectedSectionId: (sectionId: string | null) => void;
|
|
17
|
+
addSection: (stepId: string) => FormSectionConfig;
|
|
18
|
+
updateSection: (stepId: string, sectionId: string, updatedSection: FormSectionConfig) => void;
|
|
19
|
+
deleteSection: (stepId: string, sectionId: string) => void;
|
|
20
|
+
reorderSections: (stepId: string, sections: FormSectionConfig[]) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const FormBuilderContext: () => import('react').Context<FormBuilderContextValue | null>;
|
|
23
|
+
interface FormBuilderProviderProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
initialConfig: FormWizardConfig;
|
|
26
|
+
onConfigChange?: (config: FormWizardConfig) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const FormBuilderProvider: React.FC<FormBuilderProviderProps>;
|
|
29
|
+
export declare const useFormBuilderContext: () => FormBuilderContextValue;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormStepConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ResolvedStepProviderProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
resolvedStep: FormStepConfig | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const ResolvedStepProvider: React.FC<ResolvedStepProviderProps>;
|
|
8
|
+
export declare const useResolvedStep: () => FormStepConfig | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormSectionConfig, FormStepConfig, TemplateStepConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
export interface UseCurrentStepReturn {
|
|
3
|
+
currentStep: FormStepConfig | TemplateStepConfig | null;
|
|
4
|
+
stepIndex: number;
|
|
5
|
+
isFirstStep: boolean;
|
|
6
|
+
isLastStep: boolean;
|
|
7
|
+
updateCurrentStep: (updates: Partial<FormStepConfig>) => void;
|
|
8
|
+
updateStepTitle: (title: string) => void;
|
|
9
|
+
sections: FormSectionConfig[];
|
|
10
|
+
selectedSectionId: string | null;
|
|
11
|
+
currentSection: FormSectionConfig | null;
|
|
12
|
+
setSelectedSectionId: (sectionId: string | null) => void;
|
|
13
|
+
addSection: () => FormSectionConfig;
|
|
14
|
+
updateCurrentSection: (updatedSection: FormSectionConfig) => void;
|
|
15
|
+
deleteSection: (sectionId: string) => void;
|
|
16
|
+
reorderSections: (sections: FormSectionConfig[]) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const useCurrentStep: () => UseCurrentStepReturn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DragEndEvent, DragOverEvent, DragStartEvent } from '@dnd-kit/core';
|
|
2
|
+
import { ComponentConfig, FormSectionConfig, FormStepConfig } from '../../../../../core/src/index.ts';
|
|
3
|
+
interface DragState {
|
|
4
|
+
activeId: string | null;
|
|
5
|
+
activeComponent: ComponentConfig | null;
|
|
6
|
+
activeSection: FormSectionConfig | null;
|
|
7
|
+
dragType: "component" | "section" | null;
|
|
8
|
+
isDragging: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function useDragAndDrop(currentStep: FormStepConfig): {
|
|
11
|
+
dragState: DragState;
|
|
12
|
+
handleDragStart: (event: DragStartEvent) => void;
|
|
13
|
+
handleDragOver: (event: DragOverEvent) => void;
|
|
14
|
+
handleDragEnd: (event: DragEndEvent) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface DragFeedbackState {
|
|
2
|
+
isDragOver: boolean;
|
|
3
|
+
dragOverSection: string | null;
|
|
4
|
+
dragOverIndex: number | null;
|
|
5
|
+
insertionIndicator: {
|
|
6
|
+
sectionId: string;
|
|
7
|
+
index: number;
|
|
8
|
+
} | null;
|
|
9
|
+
isDragActive: boolean;
|
|
10
|
+
dragType: "component" | "section" | null;
|
|
11
|
+
dragOverDropIndicator: string | null;
|
|
12
|
+
sectionHoldProgress: Record<string, number>;
|
|
13
|
+
}
|
|
14
|
+
export declare function useDragFeedback(): {
|
|
15
|
+
feedbackState: DragFeedbackState;
|
|
16
|
+
startDrag: (dragType: "component" | "section") => void;
|
|
17
|
+
endDrag: () => void;
|
|
18
|
+
showDropZone: (sectionId: string) => void;
|
|
19
|
+
hideDropZone: () => void;
|
|
20
|
+
showInsertionIndicator: (sectionId: string, index: number) => void;
|
|
21
|
+
hideInsertionIndicator: () => void;
|
|
22
|
+
showDropIndicatorFeedback: (dropIndicatorId: string) => void;
|
|
23
|
+
hideDropIndicatorFeedback: () => void;
|
|
24
|
+
setSectionHoldProgress: (sectionId: string, progress: number) => void;
|
|
25
|
+
clearSectionHoldProgress: (sectionId: string) => void;
|
|
26
|
+
clearAllFeedback: () => void;
|
|
27
|
+
isDropZoneActive: (sectionId: string) => boolean;
|
|
28
|
+
isInsertionIndicatorActive: (sectionId: string, index: number) => boolean;
|
|
29
|
+
isDropIndicatorActive: (dropIndicatorId: string) => boolean;
|
|
30
|
+
getSectionHoldProgress: (sectionId: string) => number;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface UseHoldToDragProps {
|
|
2
|
+
holdDelay?: number;
|
|
3
|
+
onHoldStart?: () => void;
|
|
4
|
+
onHoldComplete?: () => void;
|
|
5
|
+
onHoldCancel?: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface HoldToDragState {
|
|
8
|
+
isHolding: boolean;
|
|
9
|
+
isHoldComplete: boolean;
|
|
10
|
+
holdProgress: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function useHoldToDrag({ holdDelay, onHoldStart, onHoldComplete, onHoldCancel, }?: UseHoldToDragProps): {
|
|
13
|
+
holdState: HoldToDragState;
|
|
14
|
+
startHold: () => void;
|
|
15
|
+
cancelHold: () => void;
|
|
16
|
+
resetHold: () => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PreviewConfig } from '../components/buttons/PreviewButton/PreviewButton';
|
|
2
|
+
/**
|
|
3
|
+
* Form configuration structure (partial)
|
|
4
|
+
*/
|
|
5
|
+
interface FormConfig {
|
|
6
|
+
urls?: {
|
|
7
|
+
previewBase?: string;
|
|
8
|
+
previewPath?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Hook to get preview configuration
|
|
13
|
+
*
|
|
14
|
+
* @param formConfig Optional form configuration object
|
|
15
|
+
* @returns Preview configuration for PreviewButton
|
|
16
|
+
*/
|
|
17
|
+
export declare const usePreviewConfig: (formConfig?: FormConfig) => PreviewConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Hook to load preview configuration from file system
|
|
20
|
+
* This is a placeholder that can be extended to actually read from form.config.json
|
|
21
|
+
*/
|
|
22
|
+
export declare const useLoadedPreviewConfig: () => PreviewConfig;
|
|
23
|
+
export default usePreviewConfig;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormStepConfig } from '../../../../../core/src/index.ts';
|
|
2
|
+
export declare function useSectionOperations(currentStep: FormStepConfig | null): {
|
|
3
|
+
addSection: () => void;
|
|
4
|
+
moveSection: (sectionId: string, direction: "up" | "down") => void;
|
|
5
|
+
deleteSection: (sectionId: string) => void;
|
|
6
|
+
canDeleteSection: (_sectionId: string) => boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './hooks/useCurrentStep';
|
|
3
|
+
export * from './hooks/useDragAndDrop';
|
|
4
|
+
export * from './hooks/useDragFeedback';
|
|
5
|
+
export * from './hooks/useHoldToDrag';
|
|
6
|
+
export * from './hooks/useSectionOperations';
|
|
7
|
+
export * from './providers/DragAndDropProvider/DragAndDropProvider';
|
|
8
|
+
export * from './utils/bodyConversionUtils';
|
|
9
|
+
export * from './utils/collisionDetection';
|
|
10
|
+
export * from './utils/PropertyLockIndicator/PropertyLockIndicator';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormStepConfig } from '../../../../../../core/src/index.ts';
|
|
2
|
+
interface DragAndDropProviderProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
currentStep: FormStepConfig;
|
|
5
|
+
isLocked?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function DragAndDropProvider({ children, currentStep, isLocked, }: DragAndDropProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
interface PropertyLockIndicatorProps {
|
|
2
|
+
/** Whether this property is locked */
|
|
3
|
+
isLocked: boolean;
|
|
4
|
+
/** Custom tooltip message explaining why the property is locked */
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
/** Additional CSS classes */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Size variant for the lock icon */
|
|
9
|
+
size?: "sm" | "md";
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* PropertyLockIndicator component displays a small lock icon next to property labels
|
|
13
|
+
* when they are locked due to template governance rules.
|
|
14
|
+
*
|
|
15
|
+
* Used for individual form properties that cannot be edited in generic templates.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PropertyLockIndicator: React.FC<PropertyLockIndicatorProps>;
|
|
18
|
+
/**
|
|
19
|
+
* PropertyLockWrapper component wraps form controls to make them read-only when locked
|
|
20
|
+
*/
|
|
21
|
+
interface PropertyLockWrapperProps {
|
|
22
|
+
/** Whether this property is locked */
|
|
23
|
+
isLocked: boolean;
|
|
24
|
+
/** The form control to wrap */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** Custom tooltip message */
|
|
27
|
+
tooltip?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const PropertyLockWrapper: React.FC<PropertyLockWrapperProps>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ApiBodyField } from '../../../../../core/src/index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for a key-value pair in the editor
|
|
4
|
+
*/
|
|
5
|
+
export interface BodyFieldEntry {
|
|
6
|
+
id: string;
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
type: "static" | "dynamic";
|
|
10
|
+
fieldPath?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Converts a body object to an array of BodyFieldEntry items for the key-value editor
|
|
14
|
+
*/
|
|
15
|
+
export declare function bodyObjectToFields(bodyObject: Record<string, unknown>): BodyFieldEntry[];
|
|
16
|
+
/**
|
|
17
|
+
* Converts an array of BodyFieldEntry items to a body object
|
|
18
|
+
*/
|
|
19
|
+
export declare function fieldsToBodyObject(fields: BodyFieldEntry[]): Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Validates if a string is valid JSON
|
|
22
|
+
*/
|
|
23
|
+
export declare function isValidJSON(str: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Safely parses JSON string, returns empty object if invalid
|
|
26
|
+
*/
|
|
27
|
+
export declare function safeParseJSON(str: string): Record<string, unknown>;
|
|
28
|
+
/**
|
|
29
|
+
* Converts legacy ApiBodyField format to BodyFieldEntry format
|
|
30
|
+
*/
|
|
31
|
+
export declare function apiBodyFieldToBodyFieldEntry(apiField: ApiBodyField): BodyFieldEntry;
|
|
32
|
+
/**
|
|
33
|
+
* Converts BodyFieldEntry format to legacy ApiBodyField format
|
|
34
|
+
*/
|
|
35
|
+
export declare function bodyFieldEntryToApiBodyField(entry: BodyFieldEntry): ApiBodyField;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CollisionDetection } from '@dnd-kit/core';
|
|
2
|
+
/**
|
|
3
|
+
* Enhanced collision detection that prioritizes drop indicators and provides better UX
|
|
4
|
+
* Designed to prevent component removal bugs and enable smooth cross-section movement
|
|
5
|
+
*/
|
|
6
|
+
export declare const customCollisionDetection: CollisionDetection;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FormWizardConfig } from '../../../../../../core/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { FormConfig } from '../../../../config/types';
|
|
4
|
+
export interface FormBuilderViewProps {
|
|
5
|
+
projectId: string;
|
|
6
|
+
formId: string;
|
|
7
|
+
config?: FormConfig;
|
|
8
|
+
showPreview?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
onSave?: (config: FormWizardConfig) => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Standalone FormBuilderView component
|
|
15
|
+
* Wraps FormBuilder with loading, error handling, and navigation
|
|
16
|
+
*/
|
|
17
|
+
export declare const FormBuilderView: React.FC<FormBuilderViewProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FormWizardConfig } from '../../../../../../core/src/index.ts';
|
|
2
|
+
import { FormConfig } from '../../../../config/types';
|
|
3
|
+
import { ExplorerView } from '../FormExplorerCore/FormExplorerCore';
|
|
4
|
+
export interface FormExplorerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Optional form configuration
|
|
7
|
+
* If not provided, FormExplorer will automatically search for form.config.json in the user's project
|
|
8
|
+
* Supports both strict FormConfig and raw JSON objects (which will be processed)
|
|
9
|
+
*/
|
|
10
|
+
config?: FormConfig | Record<string, unknown>;
|
|
11
|
+
initialView?: ExplorerView;
|
|
12
|
+
onFormSave?: (projectId: string, wizardId: string, config: FormWizardConfig) => Promise<void>;
|
|
13
|
+
onFormLoad?: (projectId: string, wizardId: string) => Promise<FormWizardConfig>;
|
|
14
|
+
onProjectCreate?: (projectName: string) => Promise<boolean>;
|
|
15
|
+
onFormCreate?: (projectId: string, formId: string, title: string) => Promise<FormWizardConfig | null>;
|
|
16
|
+
onFormDelete?: (projectId: string, wizardId: string) => Promise<boolean>;
|
|
17
|
+
onFormEdit?: (projectId: string, wizardId: string, config: FormWizardConfig) => void;
|
|
18
|
+
showPreview?: boolean;
|
|
19
|
+
getPreviewUrl?: (projectId: string, wizardId: string) => string;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* FormExplorer - Legacy form management wrapper with config auto-detection
|
|
25
|
+
*
|
|
26
|
+
* @deprecated Use standalone view components with NavigationProvider instead:
|
|
27
|
+
* - ProjectsView, FormsView, FormBuilderView
|
|
28
|
+
*
|
|
29
|
+
* @see ProjectsView
|
|
30
|
+
* @see FormsView
|
|
31
|
+
* @see FormBuilderView
|
|
32
|
+
*/
|
|
33
|
+
declare const FormExplorer: React.FC<FormExplorerProps>;
|
|
34
|
+
/** @deprecated Use standalone view components instead */
|
|
35
|
+
export default FormExplorer;
|
|
36
|
+
/** @deprecated Use standalone view components instead */
|
|
37
|
+
export { FormExplorer };
|
|
38
|
+
export type { ExplorerView };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { FormWizardConfig } from '../../../../../../core/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { FormConfig } from '../../../../config/types';
|
|
4
|
+
import { ViewState } from '../../types/viewTypes';
|
|
5
|
+
export type ExplorerView = ViewState;
|
|
6
|
+
export interface FormExplorerCoreProps {
|
|
7
|
+
/**
|
|
8
|
+
* Optional form configuration
|
|
9
|
+
*/
|
|
10
|
+
config?: FormConfig;
|
|
11
|
+
/**
|
|
12
|
+
* Optional initial view configuration
|
|
13
|
+
*/
|
|
14
|
+
initialView?: ExplorerView;
|
|
15
|
+
/**
|
|
16
|
+
* Optional custom save handler for forms
|
|
17
|
+
*/
|
|
18
|
+
onFormSave?: (projectId: string, wizardId: string, config: FormWizardConfig) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Optional custom load handler for forms
|
|
21
|
+
*/
|
|
22
|
+
onFormLoad?: (projectId: string, wizardId: string) => Promise<FormWizardConfig>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional custom form creation handler
|
|
25
|
+
*/
|
|
26
|
+
onFormCreate?: (projectId: string, formId: string, title: string) => Promise<FormWizardConfig | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Optional custom form deletion handler
|
|
29
|
+
*/
|
|
30
|
+
onFormDelete?: (projectId: string, wizardId: string) => Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Optional form edit handler
|
|
33
|
+
*/
|
|
34
|
+
onFormEdit?: (projectId: string, wizardId: string, config: FormWizardConfig) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to show preview functionality
|
|
37
|
+
*/
|
|
38
|
+
showPreview?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Custom preview URL generator
|
|
41
|
+
*/
|
|
42
|
+
getPreviewUrl?: (projectId: string, wizardId: string) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Custom navigation handler for going back from builder to forms list
|
|
45
|
+
* If not provided, will use internal navigateBack handler
|
|
46
|
+
*/
|
|
47
|
+
onNavigateToForms?: (projectId: string) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Custom navigation handler for going back to projects list
|
|
50
|
+
* If not provided, will use internal view state navigation
|
|
51
|
+
*/
|
|
52
|
+
onNavigateToProjects?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to disable automatic route-based navigation
|
|
55
|
+
* @deprecated No longer has effect - route navigation removed
|
|
56
|
+
*/
|
|
57
|
+
disableRouteNavigation?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Additional CSS class name
|
|
60
|
+
*/
|
|
61
|
+
className?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Custom styles
|
|
64
|
+
*/
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
}
|
|
67
|
+
export declare const FormExplorerCore: React.FC<FormExplorerCoreProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FormWizardConfig } from '../../../../../../core/src/index.ts';
|
|
2
|
+
export interface RouterIntegration {
|
|
3
|
+
params: {
|
|
4
|
+
project?: string;
|
|
5
|
+
wizardId?: string;
|
|
6
|
+
};
|
|
7
|
+
navigate: (path: string) => void;
|
|
8
|
+
pathname: string;
|
|
9
|
+
}
|
|
10
|
+
type FormManagerView = {
|
|
11
|
+
type: "explorer";
|
|
12
|
+
} | {
|
|
13
|
+
type: "editor";
|
|
14
|
+
projectId: string;
|
|
15
|
+
wizardId: string;
|
|
16
|
+
config: FormWizardConfig;
|
|
17
|
+
};
|
|
18
|
+
export interface FormManagerProps {
|
|
19
|
+
/** Optional CSS class name */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Optional custom styles */
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
/** Optional initial view */
|
|
24
|
+
initialView?: FormManagerView;
|
|
25
|
+
/** Whether to show preview functionality */
|
|
26
|
+
showPreview?: boolean;
|
|
27
|
+
/** Custom preview URL generator */
|
|
28
|
+
getPreviewUrl?: (projectId: string, wizardId: string) => string;
|
|
29
|
+
/** Optional router integration for framework compatibility */
|
|
30
|
+
router?: RouterIntegration;
|
|
31
|
+
/** Optional configuration override */
|
|
32
|
+
config?: {
|
|
33
|
+
urls?: {
|
|
34
|
+
previewBase?: string;
|
|
35
|
+
previewPath?: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/** Alternative prop name for preview URL function (alias for getPreviewUrl) */
|
|
39
|
+
previewUrl?: (projectId: string, wizardId: string) => string;
|
|
40
|
+
}
|
|
41
|
+
declare const FormManager: React.FC<FormManagerProps>;
|
|
42
|
+
export default FormManager;
|
|
43
|
+
export type { FormManagerView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FormSectionList(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormsView with TanStack Query - Example implementation
|
|
3
|
+
* Demonstrates how to replace manual state management with TanStack Query
|
|
4
|
+
*/
|
|
5
|
+
export interface FormsViewProps {
|
|
6
|
+
projectId: string;
|
|
7
|
+
/** If provided, used instead of internal TanStack Query fetch */
|
|
8
|
+
forms?: {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
fileName: string;
|
|
12
|
+
lastModified: number;
|
|
13
|
+
description?: string;
|
|
14
|
+
}[];
|
|
15
|
+
/** Project name override — used when forms prop is provided */
|
|
16
|
+
projectName?: string;
|
|
17
|
+
/** If provided, used instead of internal loading state */
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
onNavigateToProjects?: () => void;
|
|
20
|
+
onRefresh?: () => void;
|
|
21
|
+
/** Custom form creation handler — bypasses the default formsExplorer storage path */
|
|
22
|
+
onCreateForm?: (request: {
|
|
23
|
+
projectId: string;
|
|
24
|
+
formId: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
}) => Promise<{
|
|
28
|
+
success: boolean;
|
|
29
|
+
formId?: string;
|
|
30
|
+
}>;
|
|
31
|
+
onFormDeleted?: (projectId: string, formId: string) => void;
|
|
32
|
+
onFormAdded?: (projectId: string, form: {
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
}) => void;
|
|
37
|
+
className?: string;
|
|
38
|
+
style?: React.CSSProperties;
|
|
39
|
+
}
|
|
40
|
+
export declare const FormsView: React.FC<FormsViewProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NewFormDialog component - dialog for creating new forms
|
|
3
|
+
*/
|
|
4
|
+
export interface NewFormDialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
selectedProjectId?: string;
|
|
8
|
+
onFormCreated?: (projectId: string, formId: string) => void;
|
|
9
|
+
onFormAdded?: (projectId: string, form: {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
/** Custom form creation handler — bypasses the default formsExplorer storage path */
|
|
15
|
+
onCreateForm?: (request: {
|
|
16
|
+
projectId: string;
|
|
17
|
+
formId: string;
|
|
18
|
+
title: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
}) => Promise<{
|
|
21
|
+
success: boolean;
|
|
22
|
+
formId?: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export declare const NewFormDialog: React.FC<NewFormDialogProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NewProjectDialog component - dialog for creating new projects
|
|
3
|
+
*/
|
|
4
|
+
export interface NewProjectDialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
onProjectCreated?: (projectData?: {
|
|
8
|
+
projectId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
/** Custom project creation handler — bypasses the default formsExplorer storage path */
|
|
13
|
+
onCreateProject?: (request: {
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}) => Promise<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
projectId?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export declare const NewProjectDialog: React.FC<NewProjectDialogProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProjectMetadata } from '../../../../../../core/src/index.ts';
|
|
2
|
+
export interface ProjectCardProps {
|
|
3
|
+
project: ProjectMetadata;
|
|
4
|
+
onCreateForm: () => void;
|
|
5
|
+
onEditForm: (projectId: string, wizardId: string) => void;
|
|
6
|
+
onDeleteForm: (projectId: string, wizardId: string) => void;
|
|
7
|
+
onPreviewForm?: (projectId: string, wizardId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ProjectCard: React.FC<ProjectCardProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ProjectMetadata } from '../../../../../../core/src/index.ts';
|
|
2
|
+
export interface ProjectsViewProps {
|
|
3
|
+
projects?: ProjectMetadata[];
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
onRefresh?: () => void;
|
|
6
|
+
onProjectDeleted?: (projectId: string) => void;
|
|
7
|
+
/** Custom project creation handler — bypasses the default formsExplorer storage path */
|
|
8
|
+
onCreateProject?: (request: {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}) => Promise<{
|
|
12
|
+
success: boolean;
|
|
13
|
+
projectId?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}>;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
export declare const ProjectsView: React.FC<ProjectsViewProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ButtonProps } from '../../../../../../ui/src/design-system/index.ts';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface ViewCardMetaData {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
}
|
|
7
|
+
export interface ViewCardAction {
|
|
8
|
+
label?: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
appearance?: ButtonProps["appearance"];
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ViewCardDropdownAction {
|
|
15
|
+
label?: string;
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
onClick: () => void;
|
|
18
|
+
variant?: "default" | "destructive";
|
|
19
|
+
className?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ViewCardProps {
|
|
23
|
+
/** Icon to display next to the title */
|
|
24
|
+
icon: ReactNode;
|
|
25
|
+
/** Main title of the card */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Optional description text */
|
|
28
|
+
description?: string;
|
|
29
|
+
/** Array of metadata items to display */
|
|
30
|
+
metadata?: ViewCardMetaData[];
|
|
31
|
+
/** Dropdown menu actions (appears in top-right) */
|
|
32
|
+
dropdownActions?: ViewCardDropdownAction[];
|
|
33
|
+
/** Primary action button (appears at bottom) */
|
|
34
|
+
primaryAction?: ViewCardAction;
|
|
35
|
+
/** Additional CSS classes */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Click handler for the entire card */
|
|
38
|
+
onClick?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const ViewCard: React.FC<ViewCardProps>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** @deprecated Import from integrations/react-router instead */
|
|
2
|
+
export type { FormBuilderPageProps } from '../../../../integrations/react-router/FormBuilderPage/FormBuilderPage';
|
|
3
|
+
export { FormBuilderPage } from '../../../../integrations/react-router/FormBuilderPage/FormBuilderPage';
|