refactor(form-schema): extract schema types and schema-driven behaviors to shared package

Moves formBuilder types, formValidation, useConditionalLogic, useFormSteps,
and formatFieldValue from apps/portal/src to packages/form-schema/src.
Adds @form-schema path alias to both apps/portal and apps/app.
Vue field components remain per-app to allow independent visual evolution.
Behavior-neutral: all 35 Vitest tests green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 23:57:39 +02:00
parent b6a3a17b0a
commit dda60ed5e4
48 changed files with 114 additions and 83 deletions

View File

@@ -1,12 +1,12 @@
import { describe, expect, it } from 'vitest'
import { formatFieldValue } from '@/composables/formatFieldValue'
import { FormFieldType } from '@/types/formBuilder'
import { formatFieldValue } from '@form-schema/composables/formatFieldValue'
import { FormFieldType } from '@form-schema/types/formBuilder'
import type {
AvailableTag,
PublicFormField,
PublicFormSectionOption,
PublicFormTimeSlot,
} from '@/types/formBuilder'
} from '@form-schema/types/formBuilder'
function field(partial: Partial<PublicFormField> = {}): PublicFormField {
return {