Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/form-widget/src/index.ts
T

48 lines
1.5 KiB
TypeScript

/**
* @hivegrid/form-widget — shared types & helpers for the embeddable form
* widget (Task #58). Contains zero runtime dependencies on the rest of the
* codebase so it can be imported from the web app, the api, the worker and
* the cli without dragging in Prisma or React.
*
* Sub-modules:
* - schema — Zod definitions for form/field/theme/submission JSON
* - origin — allowed-origin matcher with wildcard support
* - honeypot — honeypot-field detection helper
* - routing — submission target resolver (entity / crm / generic) +
* field-mapping helper consumed by the worker
*/
export {
FormDefinitionSchema,
FormFieldSchema,
FormThemeSchema,
FormSubmissionPayloadSchema,
FieldTypeSchema,
ConditionalLogicRuleSchema,
FieldValidationRulesSchema,
HONEYPOT_FIELD_KEY,
type FormDefinition,
type FormField,
type FormFieldType,
type FormTheme,
type FormSubmissionPayload,
type ConditionalLogicRule,
type FieldValidationRules,
} from "./schema.js";
export { matchAllowedOrigin, normalizeOrigin } from "./origin.js";
export { isHoneypotTriggered } from "./honeypot.js";
export { evaluateConditionalLogic, isFieldVisible, filterVisibleFields, type ConditionalValues } from "./visibility.js";
export {
validateFormValues,
type FormValueValidationCode,
type FormValueValidationError,
} from "./validation.js";
export {
resolveSubmissionTarget,
applyFieldMapping,
type SubmissionTargetType,
type SubmissionTargetDescriptor,
type ApplyFieldMappingInput,
} from "./routing.js";