@btst/stack 1.5.1 → 1.6.0
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/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.cjs +68 -0
- package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs +60 -0
- package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +3937 -0
- package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +3907 -0
- package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.cjs +30 -0
- package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs +28 -0
- package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs +675 -0
- package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +661 -0
- package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs +358 -0
- package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs +332 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.cjs +211 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.mjs +188 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/DayPicker.cjs +14 -2
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/DayPicker.mjs +14 -2
- package/dist/node_modules/.pnpm/react-day-picker@9.13.0_react@19.2.0/node_modules/react-day-picker/dist/esm/noonDateLib.cjs +162 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.13.0_react@19.2.0/node_modules/react-day-picker/dist/esm/noonDateLib.mjs +160 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.cjs +12 -8
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.mjs +12 -8
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +36 -6
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +36 -6
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +39 -154
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +37 -152
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.cjs +2 -2
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.mjs +2 -2
- package/dist/packages/better-stack/src/plugins/cms/db.cjs +4 -0
- package/dist/packages/better-stack/src/plugins/cms/db.mjs +4 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.cjs +0 -1
- package/dist/packages/better-stack/src/plugins/cms/schemas.mjs +0 -1
- package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.cjs +588 -0
- package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.mjs +586 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.cjs +131 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.mjs +129 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.cjs +21 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.mjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.cjs +34 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.mjs +32 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.cjs +20 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.mjs +18 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.cjs +186 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.mjs +184 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.cjs +165 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.mjs +163 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.cjs +177 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.mjs +175 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.cjs +16 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.mjs +14 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.cjs +27 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.mjs +25 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.cjs +551 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.mjs +537 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.cjs +36 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.mjs +34 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.cjs +21 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.mjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.cjs +14 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.mjs +12 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.cjs +278 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.mjs +276 -0
- package/dist/packages/better-stack/src/plugins/form-builder/db.cjs +99 -0
- package/dist/packages/better-stack/src/plugins/form-builder/db.mjs +97 -0
- package/dist/packages/better-stack/src/plugins/form-builder/schemas.cjs +82 -0
- package/dist/packages/better-stack/src/plugins/form-builder/schemas.mjs +74 -0
- package/dist/packages/better-stack/src/plugins/form-builder/utils.cjs +37 -0
- package/dist/packages/better-stack/src/plugins/form-builder/utils.mjs +29 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/common/label.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/common/label.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/config.cjs +0 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/config.mjs +0 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/array.cjs +15 -29
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/array.mjs +16 -16
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/checkbox.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/checkbox.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/date.cjs +29 -5
- package/dist/packages/ui/src/components/auto-form/fields/date.mjs +59 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/enum.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/enum.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/input.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/input.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/number.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/number.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/object.cjs +7 -4
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/object.mjs +8 -5
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/radio-group.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/radio-group.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/switch.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/switch.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/textarea.cjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/fields/textarea.mjs +2 -2
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/index.cjs +4 -14
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/index.mjs +4 -11
- package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +377 -0
- package/dist/packages/ui/src/components/auto-form/stepped-auto-form.mjs +368 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/utils.cjs +83 -11
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/utils.mjs +82 -11
- package/dist/packages/ui/src/components/calendar.cjs +2 -2
- package/dist/packages/ui/src/components/calendar.mjs +2 -2
- package/dist/packages/ui/src/components/form-builder/canvas.cjs +111 -0
- package/dist/packages/ui/src/components/form-builder/canvas.mjs +109 -0
- package/dist/packages/ui/src/components/form-builder/components/index.cjs +570 -0
- package/dist/packages/ui/src/components/form-builder/components/index.mjs +553 -0
- package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +131 -0
- package/dist/packages/ui/src/components/form-builder/edit-field-dialog.mjs +129 -0
- package/dist/packages/ui/src/components/form-builder/form-preview.cjs +73 -0
- package/dist/packages/ui/src/components/form-builder/form-preview.mjs +71 -0
- package/dist/packages/ui/src/components/form-builder/index.cjs +353 -0
- package/dist/packages/ui/src/components/form-builder/index.mjs +344 -0
- package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.cjs +263 -0
- package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.mjs +261 -0
- package/dist/packages/ui/src/components/form-builder/palette.cjs +52 -0
- package/dist/packages/ui/src/components/form-builder/palette.mjs +49 -0
- package/dist/packages/ui/src/components/form-builder/schema-utils.cjs +120 -0
- package/dist/packages/ui/src/components/form-builder/schema-utils.mjs +114 -0
- package/dist/packages/ui/src/components/form-builder/sortable-field.cjs +151 -0
- package/dist/packages/ui/src/components/form-builder/sortable-field.mjs +148 -0
- package/dist/packages/ui/src/components/form-builder/step-tabs.cjs +180 -0
- package/dist/packages/ui/src/components/form-builder/step-tabs.mjs +178 -0
- package/dist/packages/ui/src/components/form-builder/types.cjs +7 -0
- package/dist/packages/ui/src/components/form-builder/types.mjs +5 -0
- package/dist/packages/ui/src/components/form-builder/validation-schemas.cjs +67 -0
- package/dist/packages/ui/src/components/form-builder/validation-schemas.mjs +56 -0
- package/dist/packages/ui/src/components/tabs.cjs +70 -0
- package/dist/packages/ui/src/components/tabs.mjs +65 -0
- package/dist/packages/ui/src/lib/schema-converter.cjs +130 -0
- package/dist/packages/ui/src/lib/schema-converter.mjs +124 -0
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/cms/api/index.d.cts +2 -4
- package/dist/plugins/cms/api/index.d.mts +2 -4
- package/dist/plugins/cms/api/index.d.ts +2 -4
- package/dist/plugins/cms/client/hooks/index.d.cts +1 -4
- package/dist/plugins/cms/client/hooks/index.d.mts +1 -4
- package/dist/plugins/cms/client/hooks/index.d.ts +1 -4
- package/dist/plugins/cms/client/index.cjs +6 -0
- package/dist/plugins/cms/client/index.d.cts +2 -1
- package/dist/plugins/cms/client/index.d.mts +2 -1
- package/dist/plugins/cms/client/index.d.ts +2 -1
- package/dist/plugins/cms/client/index.mjs +1 -0
- package/dist/plugins/cms/query-keys.d.cts +1 -4
- package/dist/plugins/cms/query-keys.d.mts +1 -4
- package/dist/plugins/cms/query-keys.d.ts +1 -4
- package/dist/plugins/form-builder/api/index.cjs +7 -0
- package/dist/plugins/form-builder/api/index.d.cts +141 -0
- package/dist/plugins/form-builder/api/index.d.mts +141 -0
- package/dist/plugins/form-builder/api/index.d.ts +141 -0
- package/dist/plugins/form-builder/api/index.mjs +1 -0
- package/dist/plugins/form-builder/client/components/index.cjs +29 -0
- package/dist/plugins/form-builder/client/components/index.d.cts +93 -0
- package/dist/plugins/form-builder/client/components/index.d.mts +93 -0
- package/dist/plugins/form-builder/client/components/index.d.ts +93 -0
- package/dist/plugins/form-builder/client/components/index.mjs +18 -0
- package/dist/plugins/form-builder/client/hooks/index.cjs +19 -0
- package/dist/plugins/form-builder/client/hooks/index.d.cts +154 -0
- package/dist/plugins/form-builder/client/hooks/index.d.mts +154 -0
- package/dist/plugins/form-builder/client/hooks/index.d.ts +154 -0
- package/dist/plugins/form-builder/client/hooks/index.mjs +1 -0
- package/dist/plugins/form-builder/client/index.cjs +13 -0
- package/dist/plugins/form-builder/client/index.d.cts +381 -0
- package/dist/plugins/form-builder/client/index.d.mts +381 -0
- package/dist/plugins/form-builder/client/index.d.ts +381 -0
- package/dist/plugins/form-builder/client/index.mjs +2 -0
- package/dist/plugins/form-builder/client.css +3 -0
- package/dist/plugins/form-builder/query-keys.cjs +143 -0
- package/dist/plugins/form-builder/query-keys.d.cts +74 -0
- package/dist/plugins/form-builder/query-keys.d.mts +74 -0
- package/dist/plugins/form-builder/query-keys.d.ts +74 -0
- package/dist/plugins/form-builder/query-keys.mjs +141 -0
- package/dist/plugins/form-builder/style.css +19 -0
- package/dist/shared/stack.AX5nZ6A3.d.cts +86 -0
- package/dist/shared/stack.AX5nZ6A3.d.mts +86 -0
- package/dist/shared/stack.AX5nZ6A3.d.ts +86 -0
- package/dist/shared/stack.BIh2AXaW.d.cts +123 -0
- package/dist/shared/stack.BIh2AXaW.d.mts +123 -0
- package/dist/shared/stack.BIh2AXaW.d.ts +123 -0
- package/dist/shared/stack.DzH_wcvr.d.cts +195 -0
- package/dist/shared/stack.DzH_wcvr.d.mts +195 -0
- package/dist/shared/stack.DzH_wcvr.d.ts +195 -0
- package/dist/shared/{stack.DwnJA87a.d.ts → stack.L-UFwz2G.d.cts} +14 -14
- package/dist/shared/{stack.BwkyFwF8.d.cts → stack.L-UFwz2G.d.mts} +14 -14
- package/dist/shared/{stack.DBqxCs0V.d.mts → stack.L-UFwz2G.d.ts} +14 -14
- package/package.json +54 -1
- package/src/plugins/cms/__tests__/schema-roundtrip.test.ts +195 -0
- package/src/plugins/cms/api/plugin.ts +73 -7
- package/src/plugins/cms/client/components/forms/content-form.tsx +66 -252
- package/src/plugins/cms/client/components/forms/file-upload.tsx +3 -3
- package/src/plugins/cms/client/index.ts +12 -1
- package/src/plugins/cms/client/overrides.ts +1 -1
- package/src/plugins/cms/db.ts +4 -0
- package/src/plugins/cms/schemas.ts +1 -1
- package/src/plugins/cms/types.ts +14 -17
- package/src/plugins/form-builder/api/index.ts +1 -0
- package/src/plugins/form-builder/api/plugin.ts +776 -0
- package/src/plugins/form-builder/client/components/forms/form-renderer.tsx +253 -0
- package/src/plugins/form-builder/client/components/index.tsx +24 -0
- package/src/plugins/form-builder/client/components/loading/form-builder-skeleton.tsx +42 -0
- package/src/plugins/form-builder/client/components/loading/form-list-skeleton.tsx +25 -0
- package/src/plugins/form-builder/client/components/loading/index.tsx +3 -0
- package/src/plugins/form-builder/client/components/loading/submissions-skeleton.tsx +40 -0
- package/src/plugins/form-builder/client/components/pages/404-page.tsx +28 -0
- package/src/plugins/form-builder/client/components/pages/form-builder-page.internal.tsx +253 -0
- package/src/plugins/form-builder/client/components/pages/form-builder-page.tsx +26 -0
- package/src/plugins/form-builder/client/components/pages/form-list-page.internal.tsx +231 -0
- package/src/plugins/form-builder/client/components/pages/form-list-page.tsx +22 -0
- package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +268 -0
- package/src/plugins/form-builder/client/components/pages/submissions-page.tsx +26 -0
- package/src/plugins/form-builder/client/components/shared/default-error.tsx +30 -0
- package/src/plugins/form-builder/client/components/shared/empty-state.tsx +26 -0
- package/src/plugins/form-builder/client/components/shared/page-wrapper.tsx +32 -0
- package/src/plugins/form-builder/client/components/shared/pagination.tsx +52 -0
- package/src/plugins/form-builder/client/hooks/form-builder-hooks.tsx +799 -0
- package/src/plugins/form-builder/client/hooks/index.tsx +1 -0
- package/src/plugins/form-builder/client/index.ts +22 -0
- package/src/plugins/form-builder/client/localization/form-builder-common.ts +36 -0
- package/src/plugins/form-builder/client/localization/form-builder-editor.ts +18 -0
- package/src/plugins/form-builder/client/localization/form-builder-list.ts +17 -0
- package/src/plugins/form-builder/client/localization/form-builder-submissions.ts +17 -0
- package/src/plugins/form-builder/client/localization/form-builder-toasts.ts +10 -0
- package/src/plugins/form-builder/client/localization/index.ts +15 -0
- package/src/plugins/form-builder/client/overrides.ts +146 -0
- package/src/plugins/form-builder/client/plugin.tsx +488 -0
- package/src/plugins/form-builder/client.css +3 -0
- package/src/plugins/form-builder/db.ts +99 -0
- package/src/plugins/form-builder/query-keys.ts +198 -0
- package/src/plugins/form-builder/schemas.ts +122 -0
- package/src/plugins/form-builder/style.css +19 -0
- package/src/plugins/form-builder/types.ts +317 -0
- package/src/plugins/form-builder/utils.ts +63 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.mjs +0 -35
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.cjs +0 -63
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.mjs +0 -61
- package/dist/shared/stack.NZJogTUn.d.cts +0 -66
- package/dist/shared/stack.NZJogTUn.d.mts +0 -66
- package/dist/shared/stack.NZJogTUn.d.ts +0 -66
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/UI.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/UI.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarDay.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarDay.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/DateLib.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/DateLib.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Button.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Button.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/CaptionLabel.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/CaptionLabel.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Chevron.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Chevron.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Day.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Day.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DayButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DayButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Dropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Dropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DropdownNav.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DropdownNav.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Footer.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Footer.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Month.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Month.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthCaption.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthCaption.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthGrid.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthGrid.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Months.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Months.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Nav.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Nav.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/NextMonthButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/NextMonthButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Option.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Option.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Root.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Root.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Select.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Select.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Week.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Week.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumber.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumber.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekday.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekday.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekdays.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekdays.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weeks.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weeks.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/YearsDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/YearsDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/custom-components.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/custom-components.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatCaption.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatCaption.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatDay.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatDay.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getComponents.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getComponents.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDates.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDates.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDays.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDays.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFormatters.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFormatters.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getLabels.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getLabels.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonths.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonths.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeeks.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeeks.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelDayButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelDayButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGrid.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGrid.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGridcell.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGridcell.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNav.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNav.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNext.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNext.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelPrevious.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelPrevious.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekday.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekday.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/locale/en-US.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/locale/en-US.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useMulti.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useMulti.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useRange.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useRange.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useSingle.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useSingle.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useAnimation.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useAnimation.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useCalendar.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useCalendar.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useDayPicker.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useDayPicker.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useFocus.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useFocus.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useSelection.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/useSelection.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/addToRange.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/addToRange.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/toTimeZone.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/toTimeZone.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/typeguards.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.12.0_react@19.2.0 → react-day-picker@9.13.0_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/typeguards.mjs +0 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/common/tooltip.cjs +0 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/common/tooltip.mjs +0 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/dependencies.cjs +0 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/dependencies.mjs +0 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/types.cjs +0 -0
- package/dist/packages/ui/src/components/{ui/auto-form → auto-form}/types.mjs +0 -0
- package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.cts} +1 -1
- package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.mts} +1 -1
- package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.ts} +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form Builder Plugin Types
|
|
3
|
+
*
|
|
4
|
+
* Key distinction from CMS Plugin:
|
|
5
|
+
* - CMS uses developer-defined Zod schemas in code
|
|
6
|
+
* - Form Builder allows non-technical admins to build forms via drag-and-drop UI
|
|
7
|
+
* - Forms are serialized to/from JSON Schema for storage
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Form stored in the database
|
|
11
|
+
*/
|
|
12
|
+
type Form = {
|
|
13
|
+
id: string;
|
|
14
|
+
/** Display name for the form */
|
|
15
|
+
name: string;
|
|
16
|
+
/** URL-friendly slug - unique identifier for public access */
|
|
17
|
+
slug: string;
|
|
18
|
+
/** Optional description for admin UI */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** JSON Schema stored as string (includes steps, fieldType, stepGroup, etc.) */
|
|
21
|
+
schema: string;
|
|
22
|
+
/** Optional custom success message after submission */
|
|
23
|
+
successMessage?: string;
|
|
24
|
+
/** Optional redirect URL after submission */
|
|
25
|
+
redirectUrl?: string;
|
|
26
|
+
/** Form status: active, inactive, archived */
|
|
27
|
+
status: "active" | "inactive" | "archived";
|
|
28
|
+
/** User who created the form */
|
|
29
|
+
createdBy?: string;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Form submission stored in the database
|
|
35
|
+
*/
|
|
36
|
+
type FormSubmission = {
|
|
37
|
+
id: string;
|
|
38
|
+
/** Reference to the form */
|
|
39
|
+
formId: string;
|
|
40
|
+
/** Submitted data as JSON string */
|
|
41
|
+
data: string;
|
|
42
|
+
/** Submission timestamp */
|
|
43
|
+
submittedAt: Date;
|
|
44
|
+
/** Optional user ID if authenticated */
|
|
45
|
+
submittedBy?: string;
|
|
46
|
+
/** Client IP address for rate limiting and spam protection */
|
|
47
|
+
ipAddress?: string;
|
|
48
|
+
/** User agent for analytics */
|
|
49
|
+
userAgent?: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Serialized form for API responses (dates as strings)
|
|
53
|
+
*/
|
|
54
|
+
interface SerializedForm extends Omit<Form, "createdAt" | "updatedAt" | "status"> {
|
|
55
|
+
status: string;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Serialized form submission for API responses (dates as strings)
|
|
61
|
+
*/
|
|
62
|
+
interface SerializedFormSubmission extends Omit<FormSubmission, "submittedAt"> {
|
|
63
|
+
submittedAt: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Serialized form submission with parsed data
|
|
67
|
+
*/
|
|
68
|
+
interface SerializedFormSubmissionWithData<TData = Record<string, unknown>> extends SerializedFormSubmission {
|
|
69
|
+
/** Parsed data object (JSON.parse of data field) */
|
|
70
|
+
parsedData: TData;
|
|
71
|
+
/** Joined form */
|
|
72
|
+
form?: SerializedForm;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Paginated list response for forms
|
|
76
|
+
*/
|
|
77
|
+
interface PaginatedForms {
|
|
78
|
+
items: SerializedForm[];
|
|
79
|
+
total: number;
|
|
80
|
+
limit: number;
|
|
81
|
+
offset: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Paginated list response for form submissions
|
|
85
|
+
*/
|
|
86
|
+
interface PaginatedFormSubmissions<TData = Record<string, unknown>> {
|
|
87
|
+
items: SerializedFormSubmissionWithData<TData>[];
|
|
88
|
+
total: number;
|
|
89
|
+
limit: number;
|
|
90
|
+
offset: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Context passed to all backend hooks
|
|
94
|
+
*/
|
|
95
|
+
interface FormBuilderHookContext {
|
|
96
|
+
/** User ID if authenticated */
|
|
97
|
+
userId?: string;
|
|
98
|
+
/** Request headers */
|
|
99
|
+
headers?: Headers;
|
|
100
|
+
/** Client IP address (for rate limiting) */
|
|
101
|
+
ipAddress?: string;
|
|
102
|
+
/** User agent string */
|
|
103
|
+
userAgent?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Context for submission-specific hooks
|
|
107
|
+
*/
|
|
108
|
+
interface SubmissionHookContext extends FormBuilderHookContext {
|
|
109
|
+
/** Form slug being submitted */
|
|
110
|
+
formSlug: string;
|
|
111
|
+
/** Form ID */
|
|
112
|
+
formId: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Input data for creating a form
|
|
116
|
+
*/
|
|
117
|
+
interface FormInput {
|
|
118
|
+
name: string;
|
|
119
|
+
slug: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
schema: string;
|
|
122
|
+
successMessage?: string;
|
|
123
|
+
redirectUrl?: string;
|
|
124
|
+
status?: "active" | "inactive" | "archived";
|
|
125
|
+
createdBy?: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Input data for updating a form
|
|
129
|
+
*/
|
|
130
|
+
interface FormUpdate {
|
|
131
|
+
name?: string;
|
|
132
|
+
slug?: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
schema?: string;
|
|
135
|
+
successMessage?: string;
|
|
136
|
+
redirectUrl?: string;
|
|
137
|
+
status?: "active" | "inactive" | "archived";
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Backend hooks for Form Builder plugin
|
|
141
|
+
*
|
|
142
|
+
* All CRUD hooks receive ipAddress and headers for auth/rate limiting.
|
|
143
|
+
* Return false from onBefore* hooks to reject the operation (throws 403).
|
|
144
|
+
*/
|
|
145
|
+
interface FormBuilderBackendHooks {
|
|
146
|
+
/** Called before listing forms. Return false to deny access (403). */
|
|
147
|
+
onBeforeListForms?: (ctx: FormBuilderHookContext) => Promise<boolean> | boolean;
|
|
148
|
+
/** Called before creating a form. Return false to deny, or modified data. */
|
|
149
|
+
onBeforeFormCreated?: (data: FormInput, ctx: FormBuilderHookContext) => Promise<FormInput | false> | FormInput | false;
|
|
150
|
+
/** Called after a form is created */
|
|
151
|
+
onAfterFormCreated?: (form: SerializedForm, ctx: FormBuilderHookContext) => Promise<void> | void;
|
|
152
|
+
/** Called before getting a form by ID or slug. Return false to deny access. */
|
|
153
|
+
onBeforeGetForm?: (idOrSlug: string, ctx: FormBuilderHookContext) => Promise<boolean> | boolean;
|
|
154
|
+
/** Called before updating a form. Return false to deny, or modified data. */
|
|
155
|
+
onBeforeFormUpdated?: (id: string, data: FormUpdate, ctx: FormBuilderHookContext) => Promise<FormUpdate | false> | FormUpdate | false;
|
|
156
|
+
/** Called after a form is updated */
|
|
157
|
+
onAfterFormUpdated?: (form: SerializedForm, ctx: FormBuilderHookContext) => Promise<void> | void;
|
|
158
|
+
/** Called before deleting a form. Return false to deny. */
|
|
159
|
+
onBeforeFormDeleted?: (id: string, ctx: FormBuilderHookContext) => Promise<boolean> | boolean;
|
|
160
|
+
/** Called after a form is deleted */
|
|
161
|
+
onAfterFormDeleted?: (id: string, ctx: FormBuilderHookContext) => Promise<void> | void;
|
|
162
|
+
/**
|
|
163
|
+
* Called before processing a form submission.
|
|
164
|
+
* Use for: spam protection, rate limiting, data validation/enrichment.
|
|
165
|
+
*
|
|
166
|
+
* @returns false to reject submission (400), or modified data to continue
|
|
167
|
+
*/
|
|
168
|
+
onBeforeSubmission?: (formSlug: string, data: Record<string, unknown>, ctx: SubmissionHookContext) => Promise<Record<string, unknown> | false> | Record<string, unknown> | false;
|
|
169
|
+
/**
|
|
170
|
+
* Called after a submission is saved.
|
|
171
|
+
* Use for: sending emails, storing in CRM, triggering workflows.
|
|
172
|
+
*/
|
|
173
|
+
onAfterSubmission?: (submission: SerializedFormSubmission, form: SerializedForm, ctx: SubmissionHookContext) => Promise<void> | void;
|
|
174
|
+
/** Called when a submission fails */
|
|
175
|
+
onSubmissionError?: (error: Error, formSlug: string, data: Record<string, unknown>, ctx: SubmissionHookContext) => Promise<void> | void;
|
|
176
|
+
/** Called before listing submissions. Return false to deny access (403). */
|
|
177
|
+
onBeforeListSubmissions?: (formId: string, ctx: FormBuilderHookContext) => Promise<boolean> | boolean;
|
|
178
|
+
/** Called before getting a submission. Return false to deny access. */
|
|
179
|
+
onBeforeGetSubmission?: (submissionId: string, ctx: FormBuilderHookContext) => Promise<boolean> | boolean;
|
|
180
|
+
/** Called before deleting a submission. Return false to deny. */
|
|
181
|
+
onBeforeSubmissionDeleted?: (submissionId: string, ctx: FormBuilderHookContext) => Promise<boolean> | boolean;
|
|
182
|
+
/** Called after a submission is deleted */
|
|
183
|
+
onAfterSubmissionDeleted?: (submissionId: string, ctx: FormBuilderHookContext) => Promise<void> | void;
|
|
184
|
+
/** Called on any error */
|
|
185
|
+
onError?: (error: Error, operation: "list" | "get" | "create" | "update" | "delete" | "submit" | "listSubmissions" | "getSubmission" | "deleteSubmission", ctx: FormBuilderHookContext) => Promise<void> | void;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Configuration for the Form Builder backend plugin
|
|
189
|
+
*/
|
|
190
|
+
interface FormBuilderBackendConfig {
|
|
191
|
+
/** Optional hooks for customizing behavior */
|
|
192
|
+
hooks?: FormBuilderBackendHooks;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type { FormBuilderBackendConfig as F, PaginatedForms as P, SerializedForm as S, SerializedFormSubmission as a, SerializedFormSubmissionWithData as b, PaginatedFormSubmissions as c };
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as AutoFormFieldType } from './stack.NZJogTUn.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
* Configuration for a content type defined by the developer
|
|
4
|
+
* Configuration for a content type defined by the developer.
|
|
5
|
+
*
|
|
6
|
+
* Field types are now specified directly in the Zod schema via .meta():
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const ProductSchema = z.object({
|
|
10
|
+
* description: z.string().meta({ fieldType: "textarea" }),
|
|
11
|
+
* image: z.string().optional().meta({ fieldType: "file" }),
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
6
14
|
*/
|
|
7
15
|
interface ContentTypeConfig {
|
|
8
16
|
/** Display name for the content type (e.g., "Product", "Testimonial") */
|
|
@@ -11,18 +19,8 @@ interface ContentTypeConfig {
|
|
|
11
19
|
slug: string;
|
|
12
20
|
/** Optional description shown in the admin UI */
|
|
13
21
|
description?: string;
|
|
14
|
-
/** Zod schema defining the content type's fields */
|
|
22
|
+
/** Zod schema defining the content type's fields. Use .meta({ fieldType: "..." }) for field type overrides. */
|
|
15
23
|
schema: z.ZodObject<z.ZodRawShape>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional field configuration for AutoForm customization.
|
|
18
|
-
*
|
|
19
|
-
* fieldType can be:
|
|
20
|
-
* - A built-in AutoForm type: "checkbox", "date", "select", "radio", "switch", "textarea", "number", "file", "fallback"
|
|
21
|
-
* - A custom type name that maps to a component provided via `fieldComponents` in overrides
|
|
22
|
-
*/
|
|
23
|
-
fieldConfig?: Record<string, {
|
|
24
|
-
fieldType?: AutoFormFieldType | (string & {});
|
|
25
|
-
}>;
|
|
26
24
|
}
|
|
27
25
|
/**
|
|
28
26
|
* Content type stored in the database
|
|
@@ -37,8 +35,10 @@ type ContentType = {
|
|
|
37
35
|
description?: string;
|
|
38
36
|
/** JSON Schema representation of the Zod schema (stringified) */
|
|
39
37
|
jsonSchema: string;
|
|
40
|
-
/**
|
|
38
|
+
/** @deprecated Legacy field config - now embedded in jsonSchema. Kept for backwards compat. */
|
|
41
39
|
fieldConfig?: string;
|
|
40
|
+
/** AutoForm schema version. 1 = legacy (separate fieldConfig), 2 = unified (fieldType in jsonSchema) */
|
|
41
|
+
autoFormVersion?: number;
|
|
42
42
|
createdAt: Date;
|
|
43
43
|
updatedAt: Date;
|
|
44
44
|
};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as AutoFormFieldType } from './stack.NZJogTUn.cjs';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
* Configuration for a content type defined by the developer
|
|
4
|
+
* Configuration for a content type defined by the developer.
|
|
5
|
+
*
|
|
6
|
+
* Field types are now specified directly in the Zod schema via .meta():
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const ProductSchema = z.object({
|
|
10
|
+
* description: z.string().meta({ fieldType: "textarea" }),
|
|
11
|
+
* image: z.string().optional().meta({ fieldType: "file" }),
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
6
14
|
*/
|
|
7
15
|
interface ContentTypeConfig {
|
|
8
16
|
/** Display name for the content type (e.g., "Product", "Testimonial") */
|
|
@@ -11,18 +19,8 @@ interface ContentTypeConfig {
|
|
|
11
19
|
slug: string;
|
|
12
20
|
/** Optional description shown in the admin UI */
|
|
13
21
|
description?: string;
|
|
14
|
-
/** Zod schema defining the content type's fields */
|
|
22
|
+
/** Zod schema defining the content type's fields. Use .meta({ fieldType: "..." }) for field type overrides. */
|
|
15
23
|
schema: z.ZodObject<z.ZodRawShape>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional field configuration for AutoForm customization.
|
|
18
|
-
*
|
|
19
|
-
* fieldType can be:
|
|
20
|
-
* - A built-in AutoForm type: "checkbox", "date", "select", "radio", "switch", "textarea", "number", "file", "fallback"
|
|
21
|
-
* - A custom type name that maps to a component provided via `fieldComponents` in overrides
|
|
22
|
-
*/
|
|
23
|
-
fieldConfig?: Record<string, {
|
|
24
|
-
fieldType?: AutoFormFieldType | (string & {});
|
|
25
|
-
}>;
|
|
26
24
|
}
|
|
27
25
|
/**
|
|
28
26
|
* Content type stored in the database
|
|
@@ -37,8 +35,10 @@ type ContentType = {
|
|
|
37
35
|
description?: string;
|
|
38
36
|
/** JSON Schema representation of the Zod schema (stringified) */
|
|
39
37
|
jsonSchema: string;
|
|
40
|
-
/**
|
|
38
|
+
/** @deprecated Legacy field config - now embedded in jsonSchema. Kept for backwards compat. */
|
|
41
39
|
fieldConfig?: string;
|
|
40
|
+
/** AutoForm schema version. 1 = legacy (separate fieldConfig), 2 = unified (fieldType in jsonSchema) */
|
|
41
|
+
autoFormVersion?: number;
|
|
42
42
|
createdAt: Date;
|
|
43
43
|
updatedAt: Date;
|
|
44
44
|
};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as AutoFormFieldType } from './stack.NZJogTUn.mjs';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
* Configuration for a content type defined by the developer
|
|
4
|
+
* Configuration for a content type defined by the developer.
|
|
5
|
+
*
|
|
6
|
+
* Field types are now specified directly in the Zod schema via .meta():
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const ProductSchema = z.object({
|
|
10
|
+
* description: z.string().meta({ fieldType: "textarea" }),
|
|
11
|
+
* image: z.string().optional().meta({ fieldType: "file" }),
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
6
14
|
*/
|
|
7
15
|
interface ContentTypeConfig {
|
|
8
16
|
/** Display name for the content type (e.g., "Product", "Testimonial") */
|
|
@@ -11,18 +19,8 @@ interface ContentTypeConfig {
|
|
|
11
19
|
slug: string;
|
|
12
20
|
/** Optional description shown in the admin UI */
|
|
13
21
|
description?: string;
|
|
14
|
-
/** Zod schema defining the content type's fields */
|
|
22
|
+
/** Zod schema defining the content type's fields. Use .meta({ fieldType: "..." }) for field type overrides. */
|
|
15
23
|
schema: z.ZodObject<z.ZodRawShape>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional field configuration for AutoForm customization.
|
|
18
|
-
*
|
|
19
|
-
* fieldType can be:
|
|
20
|
-
* - A built-in AutoForm type: "checkbox", "date", "select", "radio", "switch", "textarea", "number", "file", "fallback"
|
|
21
|
-
* - A custom type name that maps to a component provided via `fieldComponents` in overrides
|
|
22
|
-
*/
|
|
23
|
-
fieldConfig?: Record<string, {
|
|
24
|
-
fieldType?: AutoFormFieldType | (string & {});
|
|
25
|
-
}>;
|
|
26
24
|
}
|
|
27
25
|
/**
|
|
28
26
|
* Content type stored in the database
|
|
@@ -37,8 +35,10 @@ type ContentType = {
|
|
|
37
35
|
description?: string;
|
|
38
36
|
/** JSON Schema representation of the Zod schema (stringified) */
|
|
39
37
|
jsonSchema: string;
|
|
40
|
-
/**
|
|
38
|
+
/** @deprecated Legacy field config - now embedded in jsonSchema. Kept for backwards compat. */
|
|
41
39
|
fieldConfig?: string;
|
|
40
|
+
/** AutoForm schema version. 1 = legacy (separate fieldConfig), 2 = unified (fieldType in jsonSchema) */
|
|
41
|
+
autoFormVersion?: number;
|
|
42
42
|
createdAt: Date;
|
|
43
43
|
updatedAt: Date;
|
|
44
44
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btst/stack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A composable, plugin-based library for building full-stack applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -206,6 +206,47 @@
|
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
208
|
"./plugins/cms/css": "./dist/plugins/cms/style.css",
|
|
209
|
+
"./plugins/form-builder/api": {
|
|
210
|
+
"import": {
|
|
211
|
+
"types": "./dist/plugins/form-builder/api/index.d.ts",
|
|
212
|
+
"default": "./dist/plugins/form-builder/api/index.mjs"
|
|
213
|
+
},
|
|
214
|
+
"require": {
|
|
215
|
+
"types": "./dist/plugins/form-builder/api/index.d.cts",
|
|
216
|
+
"default": "./dist/plugins/form-builder/api/index.cjs"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"./plugins/form-builder/client": {
|
|
220
|
+
"import": {
|
|
221
|
+
"types": "./dist/plugins/form-builder/client/index.d.ts",
|
|
222
|
+
"default": "./dist/plugins/form-builder/client/index.mjs"
|
|
223
|
+
},
|
|
224
|
+
"require": {
|
|
225
|
+
"types": "./dist/plugins/form-builder/client/index.d.cts",
|
|
226
|
+
"default": "./dist/plugins/form-builder/client/index.cjs"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"./plugins/form-builder/client/components": {
|
|
230
|
+
"import": {
|
|
231
|
+
"types": "./dist/plugins/form-builder/client/components/index.d.ts",
|
|
232
|
+
"default": "./dist/plugins/form-builder/client/components/index.mjs"
|
|
233
|
+
},
|
|
234
|
+
"require": {
|
|
235
|
+
"types": "./dist/plugins/form-builder/client/components/index.d.cts",
|
|
236
|
+
"default": "./dist/plugins/form-builder/client/components/index.cjs"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"./plugins/form-builder/client/hooks": {
|
|
240
|
+
"import": {
|
|
241
|
+
"types": "./dist/plugins/form-builder/client/hooks/index.d.ts",
|
|
242
|
+
"default": "./dist/plugins/form-builder/client/hooks/index.mjs"
|
|
243
|
+
},
|
|
244
|
+
"require": {
|
|
245
|
+
"types": "./dist/plugins/form-builder/client/hooks/index.d.cts",
|
|
246
|
+
"default": "./dist/plugins/form-builder/client/hooks/index.cjs"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"./plugins/form-builder/css": "./dist/plugins/form-builder/style.css",
|
|
209
250
|
"./dist/*": "./dist/*",
|
|
210
251
|
"./ui/css": "./dist/ui/components.css",
|
|
211
252
|
"./package.json": "./package.json"
|
|
@@ -259,6 +300,18 @@
|
|
|
259
300
|
],
|
|
260
301
|
"plugins/cms/client/hooks": [
|
|
261
302
|
"./dist/plugins/cms/client/hooks/index.d.ts"
|
|
303
|
+
],
|
|
304
|
+
"plugins/form-builder/api": [
|
|
305
|
+
"./dist/plugins/form-builder/api/index.d.ts"
|
|
306
|
+
],
|
|
307
|
+
"plugins/form-builder/client": [
|
|
308
|
+
"./dist/plugins/form-builder/client/index.d.ts"
|
|
309
|
+
],
|
|
310
|
+
"plugins/form-builder/client/components": [
|
|
311
|
+
"./dist/plugins/form-builder/client/components/index.d.ts"
|
|
312
|
+
],
|
|
313
|
+
"plugins/form-builder/client/hooks": [
|
|
314
|
+
"./dist/plugins/form-builder/client/hooks/index.d.ts"
|
|
262
315
|
]
|
|
263
316
|
}
|
|
264
317
|
},
|
|
@@ -338,6 +338,201 @@ describe("Zod to JSON Schema roundtrip", () => {
|
|
|
338
338
|
});
|
|
339
339
|
});
|
|
340
340
|
|
|
341
|
+
describe("Unified schema format with fieldType in .meta()", () => {
|
|
342
|
+
it("preserves fieldType in JSON Schema properties", () => {
|
|
343
|
+
const schema = z.object({
|
|
344
|
+
description: z.string().meta({
|
|
345
|
+
description: "Full description",
|
|
346
|
+
fieldType: "textarea",
|
|
347
|
+
}),
|
|
348
|
+
image: z.string().optional().meta({
|
|
349
|
+
description: "Image URL",
|
|
350
|
+
fieldType: "file",
|
|
351
|
+
}),
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
const jsonSchema = z.toJSONSchema(schema) as {
|
|
355
|
+
properties?: Record<
|
|
356
|
+
string,
|
|
357
|
+
{ description?: string; fieldType?: string }
|
|
358
|
+
>;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
// fieldType should be preserved in JSON Schema properties
|
|
362
|
+
expect(jsonSchema.properties?.description?.fieldType).toBe("textarea");
|
|
363
|
+
expect(jsonSchema.properties?.image?.fieldType).toBe("file");
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
it("preserves placeholder in JSON Schema properties", () => {
|
|
367
|
+
const schema = z.object({
|
|
368
|
+
name: z.string().meta({
|
|
369
|
+
placeholder: "Enter product name...",
|
|
370
|
+
}),
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
const jsonSchema = z.toJSONSchema(schema) as {
|
|
374
|
+
properties?: Record<string, { placeholder?: string }>;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
expect(jsonSchema.properties?.name?.placeholder).toBe(
|
|
378
|
+
"Enter product name...",
|
|
379
|
+
);
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
it("simulates unified schema storage and retrieval", () => {
|
|
383
|
+
// This test simulates the new CMS flow with unified schema:
|
|
384
|
+
// 1. Developer defines schema with fieldType in .meta()
|
|
385
|
+
// 2. Backend converts to JSON Schema and stores (fieldType embedded)
|
|
386
|
+
// 3. Client reads JSON Schema and extracts fieldType for AutoForm
|
|
387
|
+
|
|
388
|
+
// Step 1: Developer defines schema with fieldType in .meta()
|
|
389
|
+
const ProductSchema = z.object({
|
|
390
|
+
name: z.string().min(1).meta({
|
|
391
|
+
description: "Product name",
|
|
392
|
+
placeholder: "Enter name...",
|
|
393
|
+
}),
|
|
394
|
+
description: z.string().meta({
|
|
395
|
+
description: "Full description",
|
|
396
|
+
fieldType: "textarea",
|
|
397
|
+
}),
|
|
398
|
+
image: z.string().optional().meta({
|
|
399
|
+
description: "Product image",
|
|
400
|
+
fieldType: "file",
|
|
401
|
+
}),
|
|
402
|
+
price: z.number().min(0).meta({
|
|
403
|
+
placeholder: "0.00",
|
|
404
|
+
}),
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
// Step 2: Convert to JSON Schema (stored in DB as version 2)
|
|
408
|
+
const jsonSchema = z.toJSONSchema(ProductSchema);
|
|
409
|
+
const dbStoredString = JSON.stringify(jsonSchema);
|
|
410
|
+
|
|
411
|
+
// Step 3: Client fetches and extracts fieldTypes
|
|
412
|
+
const fetchedSchema = JSON.parse(dbStoredString) as {
|
|
413
|
+
properties?: Record<
|
|
414
|
+
string,
|
|
415
|
+
{ description?: string; placeholder?: string; fieldType?: string }
|
|
416
|
+
>;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// Verify fieldTypes are preserved
|
|
420
|
+
expect(fetchedSchema.properties?.description?.fieldType).toBe("textarea");
|
|
421
|
+
expect(fetchedSchema.properties?.image?.fieldType).toBe("file");
|
|
422
|
+
|
|
423
|
+
// Verify other meta properties are preserved
|
|
424
|
+
expect(fetchedSchema.properties?.name?.description).toBe("Product name");
|
|
425
|
+
expect(fetchedSchema.properties?.name?.placeholder).toBe("Enter name...");
|
|
426
|
+
expect(fetchedSchema.properties?.price?.placeholder).toBe("0.00");
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
describe("Legacy schema migration", () => {
|
|
431
|
+
/**
|
|
432
|
+
* Simulates the migrateToUnifiedSchema function from api/plugin.ts
|
|
433
|
+
*/
|
|
434
|
+
function migrateToUnifiedSchema(
|
|
435
|
+
jsonSchemaStr: string,
|
|
436
|
+
fieldConfigStr: string | null | undefined,
|
|
437
|
+
): string {
|
|
438
|
+
if (!fieldConfigStr) {
|
|
439
|
+
return jsonSchemaStr;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
try {
|
|
443
|
+
const jsonSchema = JSON.parse(jsonSchemaStr);
|
|
444
|
+
const fieldConfig = JSON.parse(fieldConfigStr);
|
|
445
|
+
|
|
446
|
+
if (!jsonSchema.properties || typeof fieldConfig !== "object") {
|
|
447
|
+
return jsonSchemaStr;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// Merge fieldType from fieldConfig into each property
|
|
451
|
+
for (const [key, config] of Object.entries(fieldConfig)) {
|
|
452
|
+
if (
|
|
453
|
+
jsonSchema.properties[key] &&
|
|
454
|
+
typeof config === "object" &&
|
|
455
|
+
config !== null &&
|
|
456
|
+
"fieldType" in config
|
|
457
|
+
) {
|
|
458
|
+
jsonSchema.properties[key].fieldType = (
|
|
459
|
+
config as { fieldType: string }
|
|
460
|
+
).fieldType;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
return JSON.stringify(jsonSchema);
|
|
465
|
+
} catch {
|
|
466
|
+
return jsonSchemaStr;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
it("merges legacy fieldConfig into JSON Schema", () => {
|
|
471
|
+
// Legacy format: separate jsonSchema and fieldConfig
|
|
472
|
+
const legacyJsonSchema = JSON.stringify({
|
|
473
|
+
type: "object",
|
|
474
|
+
properties: {
|
|
475
|
+
name: { type: "string", description: "Product name" },
|
|
476
|
+
description: { type: "string" },
|
|
477
|
+
image: { type: "string" },
|
|
478
|
+
},
|
|
479
|
+
required: ["name", "description"],
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
const legacyFieldConfig = JSON.stringify({
|
|
483
|
+
description: { fieldType: "textarea" },
|
|
484
|
+
image: { fieldType: "file" },
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
// Migrate
|
|
488
|
+
const migratedStr = migrateToUnifiedSchema(
|
|
489
|
+
legacyJsonSchema,
|
|
490
|
+
legacyFieldConfig,
|
|
491
|
+
);
|
|
492
|
+
const migrated = JSON.parse(migratedStr);
|
|
493
|
+
|
|
494
|
+
// Verify fieldTypes are now embedded
|
|
495
|
+
expect(migrated.properties.description.fieldType).toBe("textarea");
|
|
496
|
+
expect(migrated.properties.image.fieldType).toBe("file");
|
|
497
|
+
|
|
498
|
+
// Verify other properties are preserved
|
|
499
|
+
expect(migrated.properties.name.description).toBe("Product name");
|
|
500
|
+
expect(migrated.required).toEqual(["name", "description"]);
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
it("handles null fieldConfig", () => {
|
|
504
|
+
const jsonSchema = JSON.stringify({
|
|
505
|
+
type: "object",
|
|
506
|
+
properties: {
|
|
507
|
+
name: { type: "string" },
|
|
508
|
+
},
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
const result = migrateToUnifiedSchema(jsonSchema, null);
|
|
512
|
+
expect(result).toBe(jsonSchema);
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
it("handles undefined fieldConfig", () => {
|
|
516
|
+
const jsonSchema = JSON.stringify({
|
|
517
|
+
type: "object",
|
|
518
|
+
properties: {
|
|
519
|
+
name: { type: "string" },
|
|
520
|
+
},
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
const result = migrateToUnifiedSchema(jsonSchema, undefined);
|
|
524
|
+
expect(result).toBe(jsonSchema);
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
it("handles invalid JSON gracefully", () => {
|
|
528
|
+
const jsonSchema = "invalid json";
|
|
529
|
+
const fieldConfig = "also invalid";
|
|
530
|
+
|
|
531
|
+
const result = migrateToUnifiedSchema(jsonSchema, fieldConfig);
|
|
532
|
+
expect(result).toBe(jsonSchema); // Returns original on error
|
|
533
|
+
});
|
|
534
|
+
});
|
|
535
|
+
|
|
341
536
|
describe("AutoForm schema generation and data shape", () => {
|
|
342
537
|
/**
|
|
343
538
|
* Helper function to convert JSON Schema to Zod with coercion for AutoForm
|