@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
|
@@ -2,6 +2,10 @@ import type { Adapter } from "@btst/db";
|
|
|
2
2
|
import { defineBackendPlugin } from "@btst/stack/plugins/api";
|
|
3
3
|
import { createEndpoint } from "@btst/stack/plugins/api";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import {
|
|
6
|
+
zodToFormSchema,
|
|
7
|
+
formSchemaToZod,
|
|
8
|
+
} from "@workspace/ui/lib/schema-converter";
|
|
5
9
|
import { cmsSchema as dbSchema } from "../db";
|
|
6
10
|
import type {
|
|
7
11
|
ContentType,
|
|
@@ -16,12 +20,66 @@ import type {
|
|
|
16
20
|
import { listContentQuerySchema } from "../schemas";
|
|
17
21
|
import { slugify } from "../utils";
|
|
18
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Migrate a legacy JSON Schema (version 1) to unified format (version 2)
|
|
25
|
+
* by merging fieldConfig values into the JSON Schema properties
|
|
26
|
+
*/
|
|
27
|
+
function migrateToUnifiedSchema(
|
|
28
|
+
jsonSchemaStr: string,
|
|
29
|
+
fieldConfigStr: string | null | undefined,
|
|
30
|
+
): string {
|
|
31
|
+
if (!fieldConfigStr) {
|
|
32
|
+
return jsonSchemaStr;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const jsonSchema = JSON.parse(jsonSchemaStr);
|
|
37
|
+
const fieldConfig = JSON.parse(fieldConfigStr);
|
|
38
|
+
|
|
39
|
+
if (!jsonSchema.properties || typeof fieldConfig !== "object") {
|
|
40
|
+
return jsonSchemaStr;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Merge fieldType from fieldConfig into each property
|
|
44
|
+
for (const [key, config] of Object.entries(fieldConfig)) {
|
|
45
|
+
if (
|
|
46
|
+
jsonSchema.properties[key] &&
|
|
47
|
+
typeof config === "object" &&
|
|
48
|
+
config !== null &&
|
|
49
|
+
"fieldType" in config
|
|
50
|
+
) {
|
|
51
|
+
jsonSchema.properties[key].fieldType = (
|
|
52
|
+
config as { fieldType: string }
|
|
53
|
+
).fieldType;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return JSON.stringify(jsonSchema);
|
|
58
|
+
} catch {
|
|
59
|
+
// If parsing fails, return original
|
|
60
|
+
return jsonSchemaStr;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
19
64
|
/**
|
|
20
65
|
* Serialize a ContentType for API response (convert dates to strings)
|
|
66
|
+
* Also applies lazy migration for legacy schemas (version 1 → 2)
|
|
21
67
|
*/
|
|
22
68
|
function serializeContentType(ct: ContentType): SerializedContentType {
|
|
69
|
+
// Check if this is a legacy schema that needs migration
|
|
70
|
+
const needsMigration = !ct.autoFormVersion || ct.autoFormVersion < 2;
|
|
71
|
+
|
|
72
|
+
// Apply lazy migration: merge fieldConfig into jsonSchema on read
|
|
73
|
+
const migratedJsonSchema = needsMigration
|
|
74
|
+
? migrateToUnifiedSchema(ct.jsonSchema, ct.fieldConfig)
|
|
75
|
+
: ct.jsonSchema;
|
|
76
|
+
|
|
23
77
|
return {
|
|
24
|
-
|
|
78
|
+
id: ct.id,
|
|
79
|
+
name: ct.name,
|
|
80
|
+
slug: ct.slug,
|
|
81
|
+
description: ct.description,
|
|
82
|
+
jsonSchema: migratedJsonSchema,
|
|
25
83
|
createdAt: ct.createdAt.toISOString(),
|
|
26
84
|
updatedAt: ct.updatedAt.toISOString(),
|
|
27
85
|
};
|
|
@@ -57,6 +115,11 @@ function serializeContentItemWithType(
|
|
|
57
115
|
* Sync content types from config to database
|
|
58
116
|
* Creates or updates content types based on the developer's Zod schemas
|
|
59
117
|
*
|
|
118
|
+
* Always writes version 2 format:
|
|
119
|
+
* - fieldType is embedded in jsonSchema via .meta()
|
|
120
|
+
* - fieldConfig is set to null (no longer used)
|
|
121
|
+
* - autoFormVersion is set to 2
|
|
122
|
+
*
|
|
60
123
|
* Handles race conditions from multiple instances by catching unique constraint
|
|
61
124
|
* errors and verifying the record exists (another instance created it first).
|
|
62
125
|
*/
|
|
@@ -65,8 +128,9 @@ async function syncContentTypes(
|
|
|
65
128
|
config: CMSBackendConfig,
|
|
66
129
|
): Promise<void> {
|
|
67
130
|
for (const ct of config.contentTypes) {
|
|
68
|
-
|
|
69
|
-
|
|
131
|
+
// Convert Zod schema to JSON Schema using zodToFormSchema
|
|
132
|
+
// This properly handles dates, date constraints, and steps metadata
|
|
133
|
+
const jsonSchema = JSON.stringify(zodToFormSchema(ct.schema));
|
|
70
134
|
|
|
71
135
|
const existing = await adapter.findOne<ContentType>({
|
|
72
136
|
model: "contentType",
|
|
@@ -81,7 +145,8 @@ async function syncContentTypes(
|
|
|
81
145
|
name: ct.name,
|
|
82
146
|
description: ct.description ?? null,
|
|
83
147
|
jsonSchema,
|
|
84
|
-
fieldConfig,
|
|
148
|
+
fieldConfig: null, // No longer used in version 2
|
|
149
|
+
autoFormVersion: 2,
|
|
85
150
|
updatedAt: new Date(),
|
|
86
151
|
},
|
|
87
152
|
});
|
|
@@ -94,7 +159,8 @@ async function syncContentTypes(
|
|
|
94
159
|
slug: ct.slug,
|
|
95
160
|
description: ct.description ?? null,
|
|
96
161
|
jsonSchema,
|
|
97
|
-
fieldConfig,
|
|
162
|
+
fieldConfig: null, // No longer used in version 2
|
|
163
|
+
autoFormVersion: 2,
|
|
98
164
|
createdAt: new Date(),
|
|
99
165
|
updatedAt: new Date(),
|
|
100
166
|
},
|
|
@@ -123,11 +189,11 @@ async function syncContentTypes(
|
|
|
123
189
|
|
|
124
190
|
/**
|
|
125
191
|
* Get Zod schema for a content type from its JSON Schema
|
|
126
|
-
* Uses
|
|
192
|
+
* Uses formSchemaToZod to properly handle dates, date constraints, and steps metadata
|
|
127
193
|
*/
|
|
128
194
|
function getContentTypeZodSchema(contentType: ContentType): z.ZodTypeAny {
|
|
129
195
|
const jsonSchema = JSON.parse(contentType.jsonSchema);
|
|
130
|
-
return
|
|
196
|
+
return formSchemaToZod(jsonSchema);
|
|
131
197
|
}
|
|
132
198
|
|
|
133
199
|
/**
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { useState, useMemo, useEffect } from "react";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
|
-
import
|
|
7
|
-
AutoFormSubmit,
|
|
8
|
-
} from "@workspace/ui/components/ui/auto-form";
|
|
6
|
+
import { SteppedAutoForm } from "@workspace/ui/components/auto-form/stepped-auto-form";
|
|
9
7
|
import type {
|
|
10
8
|
FieldConfig,
|
|
11
9
|
AutoFormInputComponentProps,
|
|
12
|
-
} from "@workspace/ui/components/
|
|
10
|
+
} from "@workspace/ui/components/auto-form/types";
|
|
11
|
+
import { buildFieldConfigFromJsonSchema as buildFieldConfigBase } from "@workspace/ui/components/auto-form/utils";
|
|
12
|
+
import { formSchemaToZod } from "@workspace/ui/lib/schema-converter";
|
|
13
13
|
import { Input } from "@workspace/ui/components/input";
|
|
14
14
|
import { Label } from "@workspace/ui/components/label";
|
|
15
15
|
import { Badge } from "@workspace/ui/components/badge";
|
|
@@ -20,126 +20,6 @@ import { slugify } from "../../../utils";
|
|
|
20
20
|
import { CMS_LOCALIZATION } from "../../localization";
|
|
21
21
|
import { CMSFileUpload } from "./file-upload";
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* JSON Schema property type definition
|
|
25
|
-
*/
|
|
26
|
-
interface JsonSchemaProperty {
|
|
27
|
-
type?: string | string[];
|
|
28
|
-
format?: string;
|
|
29
|
-
enum?: (string | number | boolean)[];
|
|
30
|
-
minimum?: number;
|
|
31
|
-
maximum?: number;
|
|
32
|
-
minLength?: number;
|
|
33
|
-
maxLength?: number;
|
|
34
|
-
default?: unknown;
|
|
35
|
-
description?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface JsonSchema {
|
|
39
|
-
type?: string;
|
|
40
|
-
properties?: Record<string, JsonSchemaProperty>;
|
|
41
|
-
required?: string[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Convert JSON Schema to Zod schema with proper coercion for AutoForm
|
|
46
|
-
*
|
|
47
|
-
* Uses Zod v4's native z.fromJSONSchema() as a base and applies coercion
|
|
48
|
-
* where needed. AutoForm requires z.coerce.number() and z.coerce.date()
|
|
49
|
-
* for proper form handling because HTML inputs return strings.
|
|
50
|
-
*
|
|
51
|
-
* Note: We build the schema manually to ensure proper coercion support,
|
|
52
|
-
* as z.fromJSONSchema() doesn't add coercion automatically.
|
|
53
|
-
*/
|
|
54
|
-
function jsonSchemaToZodWithCoercion(
|
|
55
|
-
jsonSchema: JsonSchema,
|
|
56
|
-
): z.ZodObject<Record<string, z.ZodTypeAny>> {
|
|
57
|
-
const shape: Record<string, z.ZodTypeAny> = {};
|
|
58
|
-
const properties = jsonSchema.properties || {};
|
|
59
|
-
const required = jsonSchema.required || [];
|
|
60
|
-
|
|
61
|
-
for (const [key, prop] of Object.entries(properties)) {
|
|
62
|
-
let fieldSchema: z.ZodTypeAny;
|
|
63
|
-
|
|
64
|
-
// Determine the type (handle arrays like ["string", "null"] for nullable)
|
|
65
|
-
const typeValue = Array.isArray(prop.type) ? prop.type[0] : prop.type;
|
|
66
|
-
|
|
67
|
-
// Handle enum first - works for string enums
|
|
68
|
-
if (prop.enum && Array.isArray(prop.enum) && prop.enum.length > 0) {
|
|
69
|
-
// Filter to only string values for z.enum
|
|
70
|
-
const stringValues = prop.enum.filter(
|
|
71
|
-
(v): v is string => typeof v === "string",
|
|
72
|
-
);
|
|
73
|
-
if (stringValues.length > 0) {
|
|
74
|
-
fieldSchema = z.enum(stringValues as [string, ...string[]]);
|
|
75
|
-
} else {
|
|
76
|
-
// Fallback for non-string enums
|
|
77
|
-
fieldSchema = z.string();
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
switch (typeValue) {
|
|
81
|
-
case "number":
|
|
82
|
-
case "integer": {
|
|
83
|
-
// Use z.coerce.number() for proper form handling (HTML inputs return strings)
|
|
84
|
-
let numSchema = z.coerce.number();
|
|
85
|
-
if (prop.minimum !== undefined) {
|
|
86
|
-
numSchema = numSchema.min(prop.minimum);
|
|
87
|
-
}
|
|
88
|
-
if (prop.maximum !== undefined) {
|
|
89
|
-
numSchema = numSchema.max(prop.maximum);
|
|
90
|
-
}
|
|
91
|
-
fieldSchema = numSchema;
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
case "boolean": {
|
|
95
|
-
fieldSchema = z.boolean();
|
|
96
|
-
if (prop.default !== undefined) {
|
|
97
|
-
fieldSchema = (fieldSchema as z.ZodBoolean).default(
|
|
98
|
-
prop.default as boolean,
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
case "string": {
|
|
104
|
-
// Check for date format
|
|
105
|
-
if (prop.format === "date" || prop.format === "date-time") {
|
|
106
|
-
fieldSchema = z.coerce.date();
|
|
107
|
-
} else {
|
|
108
|
-
let strSchema = z.string();
|
|
109
|
-
if (prop.minLength !== undefined) {
|
|
110
|
-
strSchema = strSchema.min(prop.minLength);
|
|
111
|
-
}
|
|
112
|
-
if (prop.maxLength !== undefined) {
|
|
113
|
-
strSchema = strSchema.max(prop.maxLength);
|
|
114
|
-
}
|
|
115
|
-
fieldSchema = strSchema;
|
|
116
|
-
}
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
default: {
|
|
120
|
-
// Fallback to string for unknown types
|
|
121
|
-
fieldSchema = z.string();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Apply default if present and not already applied (skip for booleans which handle it above)
|
|
127
|
-
// Use typeValue to correctly handle nullable types where prop.type is an array like ["boolean", "null"]
|
|
128
|
-
if (prop.default !== undefined && typeValue !== "boolean") {
|
|
129
|
-
fieldSchema = fieldSchema.default(prop.default);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// Make optional if not in required array
|
|
133
|
-
if (!required.includes(key)) {
|
|
134
|
-
fieldSchema = fieldSchema.optional();
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
shape[key] = fieldSchema;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return z.object(shape);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
23
|
interface ContentFormProps {
|
|
144
24
|
contentType: SerializedContentType;
|
|
145
25
|
initialData?: Record<string, unknown>;
|
|
@@ -153,112 +33,63 @@ interface ContentFormProps {
|
|
|
153
33
|
}
|
|
154
34
|
|
|
155
35
|
/**
|
|
156
|
-
*
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"select",
|
|
162
|
-
"radio",
|
|
163
|
-
"switch",
|
|
164
|
-
"textarea",
|
|
165
|
-
"number",
|
|
166
|
-
"file",
|
|
167
|
-
"fallback",
|
|
168
|
-
] as const;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Extract field configuration from JSON Schema properties
|
|
172
|
-
* Maps description and placeholder to AutoForm's fieldConfig format
|
|
36
|
+
* Build field configuration for AutoForm with CMS-specific file upload handling.
|
|
37
|
+
*
|
|
38
|
+
* Uses the shared buildFieldConfigFromJsonSchema from auto-form/utils as a base,
|
|
39
|
+
* then adds special handling for "file" fieldType to inject CMSFileUpload component
|
|
40
|
+
* ONLY if no custom component is provided via fieldComponents.
|
|
173
41
|
*
|
|
174
|
-
* @param jsonSchema - The JSON Schema from the content type
|
|
175
|
-
* @param
|
|
176
|
-
* @param uploadImage - The uploadImage function from overrides (for default file component)
|
|
42
|
+
* @param jsonSchema - The JSON Schema from the content type (with fieldType embedded in properties)
|
|
43
|
+
* @param uploadImage - The uploadImage function from overrides (for file fields)
|
|
177
44
|
* @param fieldComponents - Custom field components from overrides
|
|
178
45
|
*/
|
|
179
46
|
function buildFieldConfigFromJsonSchema(
|
|
180
47
|
jsonSchema: Record<string, unknown>,
|
|
181
|
-
storedFieldConfig?: Record<string, { fieldType?: string }>,
|
|
182
48
|
uploadImage?: (file: File) => Promise<string>,
|
|
183
49
|
fieldComponents?: Record<
|
|
184
50
|
string,
|
|
185
51
|
React.ComponentType<AutoFormInputComponentProps>
|
|
186
52
|
>,
|
|
187
53
|
): FieldConfig<Record<string, unknown>> {
|
|
188
|
-
|
|
54
|
+
// Get base config from shared utility (handles fieldType from JSON Schema)
|
|
55
|
+
const baseConfig = buildFieldConfigBase(jsonSchema, fieldComponents);
|
|
56
|
+
|
|
57
|
+
// Apply CMS-specific handling for "file" fieldType ONLY if no custom component exists
|
|
58
|
+
// Custom fieldComponents take priority - don't override if user provided one
|
|
189
59
|
const properties = jsonSchema.properties as Record<
|
|
190
60
|
string,
|
|
191
|
-
{
|
|
61
|
+
{ fieldType?: string }
|
|
192
62
|
>;
|
|
193
63
|
|
|
194
|
-
if (!properties) return
|
|
195
|
-
|
|
196
|
-
for (const [key, value] of Object.entries(properties)) {
|
|
197
|
-
const config: Record<string, unknown> = {};
|
|
198
|
-
|
|
199
|
-
if (value.description) {
|
|
200
|
-
config.description = value.description;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (value.placeholder) {
|
|
204
|
-
config.inputProps = {
|
|
205
|
-
placeholder: value.placeholder,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// Apply stored fieldConfig overrides (e.g., fieldType: "textarea", "file", or custom types)
|
|
210
|
-
if (storedFieldConfig?.[key]) {
|
|
211
|
-
const storedConfig = storedFieldConfig[key];
|
|
212
|
-
const fieldType = storedConfig.fieldType;
|
|
64
|
+
if (!properties) return baseConfig;
|
|
213
65
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
// 3. For other built-in types, pass through to auto-form
|
|
239
|
-
else if (
|
|
240
|
-
BUILTIN_FIELD_TYPES.includes(
|
|
241
|
-
fieldType as (typeof BUILTIN_FIELD_TYPES)[number],
|
|
242
|
-
)
|
|
243
|
-
) {
|
|
244
|
-
config.fieldType = fieldType;
|
|
245
|
-
}
|
|
246
|
-
// 4. Unknown custom type without a component - log warning and skip
|
|
247
|
-
else {
|
|
248
|
-
console.warn(
|
|
249
|
-
`CMS: Unknown fieldType "${fieldType}" for field "${key}". ` +
|
|
250
|
-
`Provide a component via fieldComponents override or use a built-in type.`,
|
|
251
|
-
);
|
|
252
|
-
}
|
|
66
|
+
for (const [key, prop] of Object.entries(properties)) {
|
|
67
|
+
// Only handle "file" fieldType when there's NO custom component for "file"
|
|
68
|
+
if (prop.fieldType === "file" && !fieldComponents?.["file"]) {
|
|
69
|
+
// Use CMSFileUpload as the default file component
|
|
70
|
+
if (!uploadImage) {
|
|
71
|
+
// Show a clear error message if uploadImage is not provided
|
|
72
|
+
baseConfig[key] = {
|
|
73
|
+
...baseConfig[key],
|
|
74
|
+
fieldType: () => (
|
|
75
|
+
<div className="rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive">
|
|
76
|
+
File upload requires an <code>uploadImage</code> function in CMS
|
|
77
|
+
overrides.
|
|
78
|
+
</div>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
} else {
|
|
82
|
+
baseConfig[key] = {
|
|
83
|
+
...baseConfig[key],
|
|
84
|
+
fieldType: (props: AutoFormInputComponentProps) => (
|
|
85
|
+
<CMSFileUpload {...props} uploadImage={uploadImage} />
|
|
86
|
+
),
|
|
87
|
+
};
|
|
253
88
|
}
|
|
254
89
|
}
|
|
255
|
-
|
|
256
|
-
if (Object.keys(config).length > 0) {
|
|
257
|
-
fieldConfig[key] = config;
|
|
258
|
-
}
|
|
259
90
|
}
|
|
260
91
|
|
|
261
|
-
return
|
|
92
|
+
return baseConfig;
|
|
262
93
|
}
|
|
263
94
|
|
|
264
95
|
/**
|
|
@@ -326,7 +157,7 @@ export function ContentForm({
|
|
|
326
157
|
}
|
|
327
158
|
}, [initialSlug, isEditing]);
|
|
328
159
|
|
|
329
|
-
// Parse JSON Schema
|
|
160
|
+
// Parse JSON Schema (now includes fieldType embedded in properties)
|
|
330
161
|
const jsonSchema = useMemo(() => {
|
|
331
162
|
try {
|
|
332
163
|
return JSON.parse(contentType.jsonSchema) as Record<string, unknown>;
|
|
@@ -335,38 +166,21 @@ export function ContentForm({
|
|
|
335
166
|
}
|
|
336
167
|
}, [contentType.jsonSchema]);
|
|
337
168
|
|
|
338
|
-
//
|
|
339
|
-
|
|
340
|
-
if (!contentType.fieldConfig) return undefined;
|
|
341
|
-
try {
|
|
342
|
-
return JSON.parse(contentType.fieldConfig) as Record<
|
|
343
|
-
string,
|
|
344
|
-
{ fieldType?: string }
|
|
345
|
-
>;
|
|
346
|
-
} catch {
|
|
347
|
-
return undefined;
|
|
348
|
-
}
|
|
349
|
-
}, [contentType.fieldConfig]);
|
|
350
|
-
|
|
351
|
-
// Convert to Zod schema with coercion for proper AutoForm handling
|
|
169
|
+
// Convert JSON Schema to Zod schema using formSchemaToZod utility
|
|
170
|
+
// This properly handles date fields (format: "date-time") and min/max date constraints
|
|
352
171
|
const zodSchema = useMemo(() => {
|
|
353
172
|
try {
|
|
354
|
-
return
|
|
173
|
+
return formSchemaToZod(jsonSchema);
|
|
355
174
|
} catch {
|
|
356
175
|
return z.object({});
|
|
357
176
|
}
|
|
358
177
|
}, [jsonSchema]);
|
|
359
178
|
|
|
360
|
-
// Build field config for AutoForm
|
|
179
|
+
// Build field config for AutoForm (fieldType is now embedded in jsonSchema)
|
|
361
180
|
const fieldConfig = useMemo(
|
|
362
181
|
() =>
|
|
363
|
-
buildFieldConfigFromJsonSchema(
|
|
364
|
-
|
|
365
|
-
storedFieldConfig,
|
|
366
|
-
uploadImage,
|
|
367
|
-
fieldComponents,
|
|
368
|
-
),
|
|
369
|
-
[jsonSchema, storedFieldConfig, uploadImage, fieldComponents],
|
|
182
|
+
buildFieldConfigFromJsonSchema(jsonSchema, uploadImage, fieldComponents),
|
|
183
|
+
[jsonSchema, uploadImage, fieldComponents],
|
|
370
184
|
);
|
|
371
185
|
|
|
372
186
|
// Find the field to use for slug auto-generation
|
|
@@ -448,30 +262,30 @@ export function ContentForm({
|
|
|
448
262
|
</div>
|
|
449
263
|
|
|
450
264
|
{/* Dynamic form from Zod schema */}
|
|
451
|
-
|
|
265
|
+
{/* Uses SteppedAutoForm which automatically handles both single-step and multi-step content types */}
|
|
266
|
+
<SteppedAutoForm
|
|
452
267
|
formSchema={zodSchema as z.ZodObject<any, any>}
|
|
453
268
|
values={formData as any}
|
|
454
269
|
onValuesChange={handleValuesChange as any}
|
|
455
270
|
onSubmit={handleSubmit as any}
|
|
456
271
|
fieldConfig={fieldConfig as any}
|
|
272
|
+
isSubmitting={isSubmitting}
|
|
273
|
+
submitButtonText={
|
|
274
|
+
isSubmitting
|
|
275
|
+
? localization.CMS_STATUS_SAVING
|
|
276
|
+
: localization.CMS_BUTTON_SAVE
|
|
277
|
+
}
|
|
457
278
|
>
|
|
458
|
-
|
|
459
|
-
<
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
className="px-4 py-2 text-sm text-muted-foreground hover:text-foreground"
|
|
469
|
-
>
|
|
470
|
-
{localization.CMS_BUTTON_CANCEL}
|
|
471
|
-
</button>
|
|
472
|
-
)}
|
|
473
|
-
</div>
|
|
474
|
-
</AutoForm>
|
|
279
|
+
{onCancel && (
|
|
280
|
+
<button
|
|
281
|
+
type="button"
|
|
282
|
+
onClick={onCancel}
|
|
283
|
+
className="px-4 py-2 text-sm text-muted-foreground hover:text-foreground"
|
|
284
|
+
>
|
|
285
|
+
{localization.CMS_BUTTON_CANCEL}
|
|
286
|
+
</button>
|
|
287
|
+
)}
|
|
288
|
+
</SteppedAutoForm>
|
|
475
289
|
</div>
|
|
476
290
|
);
|
|
477
291
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useCallback, useEffect, type ChangeEvent } from "react";
|
|
4
4
|
import { toast } from "sonner";
|
|
5
|
-
import type { AutoFormInputComponentProps } from "@workspace/ui/components/
|
|
5
|
+
import type { AutoFormInputComponentProps } from "@workspace/ui/components/auto-form/types";
|
|
6
6
|
import { Input } from "@workspace/ui/components/input";
|
|
7
7
|
import { Button } from "@workspace/ui/components/button";
|
|
8
8
|
import {
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
FormMessage,
|
|
12
12
|
} from "@workspace/ui/components/form";
|
|
13
13
|
import { Trash2, Loader2 } from "lucide-react";
|
|
14
|
-
import AutoFormLabel from "@workspace/ui/components/
|
|
15
|
-
import AutoFormTooltip from "@workspace/ui/components/
|
|
14
|
+
import AutoFormLabel from "@workspace/ui/components/auto-form/common/label";
|
|
15
|
+
import AutoFormTooltip from "@workspace/ui/components/auto-form/common/tooltip";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Props for the CMSFileUpload component
|
|
@@ -4,7 +4,18 @@ export type { CMSPluginOverrides, RouteContext } from "./overrides";
|
|
|
4
4
|
export type { CMSLocalization } from "./localization";
|
|
5
5
|
|
|
6
6
|
// Re-export AutoFormInputComponentProps for custom field components
|
|
7
|
-
export type { AutoFormInputComponentProps } from "@workspace/ui/components/
|
|
7
|
+
export type { AutoFormInputComponentProps } from "@workspace/ui/components/auto-form/types";
|
|
8
|
+
|
|
9
|
+
// Re-export schema converter utilities
|
|
10
|
+
export {
|
|
11
|
+
zodToFormSchema,
|
|
12
|
+
formSchemaToZod,
|
|
13
|
+
hasSteps,
|
|
14
|
+
getSteps,
|
|
15
|
+
getStepGroupMap,
|
|
16
|
+
type FormStep,
|
|
17
|
+
type FormSchemaMetadata,
|
|
18
|
+
} from "@workspace/ui/lib/schema-converter";
|
|
8
19
|
|
|
9
20
|
// Export CMSFileUpload for consumers to use or extend
|
|
10
21
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
2
|
import type { CMSLocalization } from "./localization";
|
|
3
|
-
import type { AutoFormInputComponentProps } from "@workspace/ui/components/
|
|
3
|
+
import type { AutoFormInputComponentProps } from "@workspace/ui/components/auto-form/types";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Context passed to lifecycle hooks
|
package/src/plugins/cms/db.ts
CHANGED
|
@@ -31,6 +31,7 @@ export const updateContentSchema = z.object({
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Schema for content type response
|
|
34
|
+
* Note: fieldConfig is no longer included - it's merged into jsonSchema during read
|
|
34
35
|
*/
|
|
35
36
|
export const contentTypeResponseSchema = z.object({
|
|
36
37
|
id: z.string(),
|
|
@@ -38,7 +39,6 @@ export const contentTypeResponseSchema = z.object({
|
|
|
38
39
|
slug: z.string(),
|
|
39
40
|
description: z.string().nullable().optional(),
|
|
40
41
|
jsonSchema: z.string(),
|
|
41
|
-
fieldConfig: z.string().nullable().optional(),
|
|
42
42
|
createdAt: z.string(),
|
|
43
43
|
updatedAt: z.string(),
|
|
44
44
|
});
|
package/src/plugins/cms/types.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
|
-
import type { AutoFormFieldType } from "@workspace/ui/components/ui/auto-form/types";
|
|
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
|
export interface ContentTypeConfig {
|
|
8
16
|
/** Display name for the content type (e.g., "Product", "Testimonial") */
|
|
@@ -11,21 +19,8 @@ export 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<
|
|
24
|
-
string,
|
|
25
|
-
{
|
|
26
|
-
fieldType?: AutoFormFieldType | (string & {});
|
|
27
|
-
}
|
|
28
|
-
>;
|
|
29
24
|
}
|
|
30
25
|
|
|
31
26
|
/**
|
|
@@ -41,8 +36,10 @@ export type ContentType = {
|
|
|
41
36
|
description?: string;
|
|
42
37
|
/** JSON Schema representation of the Zod schema (stringified) */
|
|
43
38
|
jsonSchema: string;
|
|
44
|
-
/**
|
|
39
|
+
/** @deprecated Legacy field config - now embedded in jsonSchema. Kept for backwards compat. */
|
|
45
40
|
fieldConfig?: string;
|
|
41
|
+
/** AutoForm schema version. 1 = legacy (separate fieldConfig), 2 = unified (fieldType in jsonSchema) */
|
|
42
|
+
autoFormVersion?: number;
|
|
46
43
|
createdAt: Date;
|
|
47
44
|
updatedAt: Date;
|
|
48
45
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { formBuilderBackendPlugin, type FormBuilderApiRouter } from "./plugin";
|