@movk/nuxt 1.1.2 → 1.3.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/.nuxt/movk-ui.css +3 -0
- package/README.md +75 -104
- package/dist/module.d.mts +59 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +136 -56
- package/dist/runtime/components/AutoForm.d.vue.ts +10 -31
- package/dist/runtime/components/AutoForm.vue +114 -148
- package/dist/runtime/components/AutoForm.vue.d.ts +10 -31
- package/dist/runtime/components/ColorChooser.d.vue.ts +20 -17
- package/dist/runtime/components/ColorChooser.vue +305 -31
- package/dist/runtime/components/ColorChooser.vue.d.ts +20 -17
- package/dist/runtime/components/DataTable.d.vue.ts +57 -0
- package/dist/runtime/components/DataTable.vue +584 -0
- package/dist/runtime/components/DataTable.vue.d.ts +57 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +15 -22
- package/dist/runtime/components/DatePicker.vue +173 -65
- package/dist/runtime/components/DatePicker.vue.d.ts +15 -22
- package/dist/runtime/components/MessageBox.d.vue.ts +36 -0
- package/dist/runtime/components/MessageBox.vue +113 -0
- package/dist/runtime/components/MessageBox.vue.d.ts +36 -0
- package/dist/runtime/components/PillGroup.d.vue.ts +33 -0
- package/dist/runtime/components/PillGroup.vue +291 -0
- package/dist/runtime/components/PillGroup.vue.d.ts +33 -0
- package/dist/runtime/components/Popconfirm.d.vue.ts +30 -0
- package/dist/runtime/components/Popconfirm.vue +143 -0
- package/dist/runtime/components/Popconfirm.vue.d.ts +30 -0
- package/dist/runtime/components/SearchForm.d.vue.ts +43 -0
- package/dist/runtime/components/SearchForm.vue +274 -0
- package/dist/runtime/components/SearchForm.vue.d.ts +43 -0
- package/dist/runtime/components/SlideVerify.d.vue.ts +13 -79
- package/dist/runtime/components/SlideVerify.vue +117 -90
- package/dist/runtime/components/SlideVerify.vue.d.ts +13 -79
- package/dist/runtime/components/StarRating.d.vue.ts +25 -82
- package/dist/runtime/components/StarRating.vue +128 -99
- package/dist/runtime/components/StarRating.vue.d.ts +25 -82
- package/dist/runtime/components/input/AsPhoneNumberInput.d.vue.ts +32 -0
- package/dist/runtime/components/input/AsPhoneNumberInput.vue +48 -0
- package/dist/runtime/components/input/AsPhoneNumberInput.vue.d.ts +32 -0
- package/dist/runtime/components/input/WithCharacterLimit.d.vue.ts +13 -7
- package/dist/runtime/components/input/WithCharacterLimit.vue +27 -15
- package/dist/runtime/components/input/WithCharacterLimit.vue.d.ts +13 -7
- package/dist/runtime/components/input/WithClear.d.vue.ts +11 -5
- package/dist/runtime/components/input/WithClear.vue +29 -10
- package/dist/runtime/components/input/WithClear.vue.d.ts +11 -5
- package/dist/runtime/components/input/WithCopy.d.vue.ts +13 -7
- package/dist/runtime/components/input/WithCopy.vue +28 -11
- package/dist/runtime/components/input/WithCopy.vue.d.ts +13 -7
- package/dist/runtime/components/input/WithFloatingLabel.d.vue.ts +33 -0
- package/dist/runtime/components/input/WithFloatingLabel.vue +75 -0
- package/dist/runtime/components/input/WithFloatingLabel.vue.d.ts +33 -0
- package/dist/runtime/components/input/WithPasswordToggle.d.vue.ts +13 -7
- package/dist/runtime/components/input/WithPasswordToggle.vue +27 -10
- package/dist/runtime/components/input/WithPasswordToggle.vue.d.ts +13 -7
- package/dist/runtime/components/theme-picker/ThemePicker.d.vue.ts +8 -1
- package/dist/runtime/components/theme-picker/ThemePicker.vue +37 -28
- package/dist/runtime/components/theme-picker/ThemePicker.vue.d.ts +8 -1
- package/dist/runtime/components/theme-picker/ThemePickerButton.d.vue.ts +5 -6
- package/dist/runtime/components/theme-picker/ThemePickerButton.vue +4 -0
- package/dist/runtime/components/theme-picker/ThemePickerButton.vue.d.ts +5 -6
- package/dist/runtime/composables/index.d.ts +9 -8
- package/dist/runtime/composables/index.js +2 -1
- package/dist/runtime/composables/useApiFetch.d.ts +23 -15
- package/dist/runtime/composables/useApiFetch.js +21 -28
- package/dist/runtime/composables/useAutoForm.d.ts +14 -98
- package/dist/runtime/composables/useAutoForm.js +55 -161
- package/dist/runtime/composables/useClientApiFetch.d.ts +7 -7
- package/dist/runtime/composables/useDateFormatter.d.ts +16 -3
- package/dist/runtime/composables/useDateFormatter.js +89 -30
- package/dist/runtime/composables/useDownloadWithProgress.d.ts +26 -27
- package/dist/runtime/composables/useDownloadWithProgress.js +143 -42
- package/dist/runtime/composables/useLazyApiFetch.d.ts +19 -0
- package/dist/runtime/composables/useLazyApiFetch.js +4 -0
- package/dist/runtime/composables/useMessageBox.d.ts +6 -0
- package/dist/runtime/composables/useMessageBox.js +16 -0
- package/dist/runtime/composables/useTheme.d.ts +21 -8
- package/dist/runtime/composables/useTheme.js +109 -86
- package/dist/runtime/composables/useUploadWithProgress.d.ts +22 -28
- package/dist/runtime/composables/useUploadWithProgress.js +79 -68
- package/dist/runtime/domains/api/auth.d.ts +2 -0
- package/dist/runtime/domains/api/auth.js +31 -0
- package/dist/runtime/domains/api/endpoint-config.d.ts +11 -0
- package/dist/runtime/domains/api/endpoint-config.js +17 -0
- package/dist/runtime/domains/api/errors.d.ts +2 -0
- package/dist/runtime/domains/api/errors.js +10 -0
- package/dist/runtime/domains/api/fetch-key.d.ts +20 -0
- package/dist/runtime/domains/api/fetch-key.js +23 -0
- package/dist/runtime/domains/api/interceptors/error.d.ts +13 -0
- package/dist/runtime/domains/api/interceptors/error.js +49 -0
- package/dist/runtime/domains/api/interceptors/request.d.ts +12 -0
- package/dist/runtime/domains/api/interceptors/request.js +46 -0
- package/dist/runtime/domains/api/interceptors/response.d.ts +17 -0
- package/dist/runtime/domains/api/interceptors/response.js +27 -0
- package/dist/runtime/domains/api/response.d.ts +4 -0
- package/dist/runtime/domains/api/response.js +14 -0
- package/dist/runtime/domains/api/toast.d.ts +15 -0
- package/dist/runtime/domains/api/toast.js +46 -0
- package/dist/runtime/domains/api/transfer.d.ts +69 -0
- package/dist/runtime/domains/api/transfer.js +81 -0
- package/dist/runtime/domains/auto-form/actions.d.ts +2 -0
- package/dist/runtime/domains/auto-form/actions.js +4 -0
- package/dist/runtime/domains/auto-form/components/Array.d.vue.ts +13 -0
- package/dist/runtime/{components/auto-form-renderer/AutoFormRendererArray.vue → domains/auto-form/components/Array.vue} +37 -48
- package/dist/runtime/domains/auto-form/components/Array.vue.d.ts +13 -0
- package/dist/runtime/domains/auto-form/components/Children.d.vue.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Children.vue +50 -0
- package/dist/runtime/domains/auto-form/components/Children.vue.d.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Field.d.vue.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Field.vue +56 -0
- package/dist/runtime/domains/auto-form/components/Field.vue.d.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Layout.d.vue.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Layout.vue +89 -0
- package/dist/runtime/domains/auto-form/components/Layout.vue.d.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Nested.d.vue.ts +11 -0
- package/dist/runtime/domains/auto-form/components/Nested.vue +47 -0
- package/dist/runtime/domains/auto-form/components/Nested.vue.d.ts +11 -0
- package/dist/runtime/{constants/auto-form.d.ts → domains/auto-form/constants.d.ts} +0 -2
- package/dist/runtime/{constants/auto-form.js → domains/auto-form/constants.js} +0 -25
- package/dist/runtime/domains/auto-form/controls.d.ts +41 -0
- package/dist/runtime/domains/auto-form/controls.js +73 -0
- package/dist/runtime/{utils/field-utils.d.ts → domains/auto-form/fields.d.ts} +7 -21
- package/dist/runtime/{utils/field-utils.js → domains/auto-form/fields.js} +19 -4
- package/dist/runtime/domains/auto-form/metadata.d.ts +22 -0
- package/dist/runtime/domains/auto-form/metadata.js +53 -0
- package/dist/runtime/domains/auto-form/provider.d.ts +62 -0
- package/dist/runtime/{internal/useAutoFormProvider.js → domains/auto-form/provider.js} +6 -3
- package/dist/runtime/domains/auto-form/reactive.d.ts +12 -0
- package/dist/runtime/{utils/reactive-utils.js → domains/auto-form/reactive.js} +1 -1
- package/dist/runtime/domains/auto-form/schema.d.ts +7 -0
- package/dist/runtime/{utils/schema-introspector.js → domains/auto-form/schema.js} +12 -10
- package/dist/runtime/domains/data-table/columns/constants.d.ts +50 -0
- package/dist/runtime/domains/data-table/columns/constants.js +19 -0
- package/dist/runtime/domains/data-table/columns/resolve-columns.d.ts +4 -0
- package/dist/runtime/domains/data-table/columns/resolve-columns.js +59 -0
- package/dist/runtime/domains/data-table/columns/resolve-data-column.d.ts +9 -0
- package/dist/runtime/domains/data-table/columns/resolve-data-column.js +164 -0
- package/dist/runtime/domains/data-table/columns/resolve-group-column.d.ts +4 -0
- package/dist/runtime/domains/data-table/columns/resolve-group-column.js +19 -0
- package/dist/runtime/domains/data-table/columns/resolve-special-columns.d.ts +8 -0
- package/dist/runtime/domains/data-table/columns/resolve-special-columns.js +232 -0
- package/dist/runtime/domains/data-table/columns/style.d.ts +11 -0
- package/dist/runtime/domains/data-table/columns/style.js +67 -0
- package/dist/runtime/domains/data-table/columns/utils.d.ts +6 -0
- package/dist/runtime/domains/data-table/columns/utils.js +16 -0
- package/dist/runtime/domains/data-table/components/ActionConfirm.d.vue.ts +10 -0
- package/dist/runtime/domains/data-table/components/ActionConfirm.vue +39 -0
- package/dist/runtime/domains/data-table/components/ActionConfirm.vue.d.ts +10 -0
- package/dist/runtime/domains/data-table/components/ActionsCell.d.vue.ts +11 -0
- package/dist/runtime/domains/data-table/components/ActionsCell.vue +91 -0
- package/dist/runtime/domains/data-table/components/ActionsCell.vue.d.ts +11 -0
- package/dist/runtime/domains/data-table/components/CellTooltip.d.vue.ts +9 -0
- package/dist/runtime/domains/data-table/components/CellTooltip.vue +40 -0
- package/dist/runtime/domains/data-table/components/CellTooltip.vue.d.ts +9 -0
- package/dist/runtime/domains/data-table/components/Pagination.d.vue.ts +26 -0
- package/dist/runtime/domains/data-table/components/Pagination.vue +132 -0
- package/dist/runtime/domains/data-table/components/Pagination.vue.d.ts +26 -0
- package/dist/runtime/domains/data-table/indent.d.ts +8 -0
- package/dist/runtime/domains/data-table/indent.js +19 -0
- package/dist/runtime/domains/data-table/tree-selection.d.ts +9 -0
- package/dist/runtime/domains/data-table/tree-selection.js +76 -0
- package/dist/runtime/{utils/theme.d.ts → domains/theme/theme-icons.d.ts} +0 -1
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/plugins/api.factory.js +28 -171
- package/dist/runtime/plugins/theme.js +72 -70
- package/dist/runtime/types/api/config.d.ts +127 -0
- package/dist/runtime/types/api/fetch.d.ts +50 -0
- package/dist/runtime/types/api/index.d.ts +5 -0
- package/dist/runtime/types/api/module.d.ts +94 -0
- package/dist/runtime/types/api/response.d.ts +62 -0
- package/dist/runtime/types/api/transfer.d.ts +32 -0
- package/dist/runtime/types/api/transfer.js +0 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/auto-form/base.d.ts +26 -0
- package/dist/runtime/types/auto-form/base.js +0 -0
- package/dist/runtime/types/auto-form/component.d.ts +28 -0
- package/dist/runtime/types/auto-form/component.js +0 -0
- package/dist/runtime/types/auto-form/controls.d.ts +45 -0
- package/dist/runtime/types/auto-form/controls.js +0 -0
- package/dist/runtime/types/auto-form/fields.d.ts +68 -0
- package/dist/runtime/types/auto-form/fields.js +0 -0
- package/dist/runtime/types/auto-form/index.d.ts +7 -0
- package/dist/runtime/types/auto-form/index.js +0 -0
- package/dist/runtime/types/auto-form/search-form.d.ts +84 -0
- package/dist/runtime/types/auto-form/search-form.js +0 -0
- package/dist/runtime/types/auto-form/slots.d.ts +85 -0
- package/dist/runtime/types/auto-form/slots.js +0 -0
- package/dist/runtime/types/auto-form/zod-factory.d.ts +127 -0
- package/dist/runtime/types/auto-form/zod-factory.js +0 -0
- package/dist/runtime/types/components/color-chooser.d.ts +109 -0
- package/dist/runtime/types/components/color-chooser.js +0 -0
- package/dist/runtime/types/components/date-picker.d.ts +41 -0
- package/dist/runtime/types/components/date-picker.js +0 -0
- package/dist/runtime/types/components/index.d.ts +8 -0
- package/dist/runtime/types/components/index.js +0 -0
- package/dist/runtime/types/components/input/as-phone-number-input.d.ts +17 -0
- package/dist/runtime/types/components/input/as-phone-number-input.js +0 -0
- package/dist/runtime/types/components/input/index.d.ts +6 -0
- package/dist/runtime/types/components/input/index.js +0 -0
- package/dist/runtime/types/components/input/with-character-limit.d.ts +11 -0
- package/dist/runtime/types/components/input/with-character-limit.js +0 -0
- package/dist/runtime/types/components/input/with-clear.d.ts +10 -0
- package/dist/runtime/types/components/input/with-clear.js +0 -0
- package/dist/runtime/types/components/input/with-copy.d.ts +11 -0
- package/dist/runtime/types/components/input/with-copy.js +0 -0
- package/dist/runtime/types/components/input/with-floating-label.d.ts +12 -0
- package/dist/runtime/types/components/input/with-floating-label.js +0 -0
- package/dist/runtime/types/components/input/with-password-toggle.d.ts +7 -0
- package/dist/runtime/types/components/input/with-password-toggle.js +0 -0
- package/dist/runtime/types/components/message-box.d.ts +69 -0
- package/dist/runtime/types/components/message-box.js +0 -0
- package/dist/runtime/types/components/pill-group.d.ts +103 -0
- package/dist/runtime/types/components/pill-group.js +0 -0
- package/dist/runtime/types/components/popconfirm.d.ts +74 -0
- package/dist/runtime/types/components/popconfirm.js +0 -0
- package/dist/runtime/types/components/slide-verify.d.ts +54 -0
- package/dist/runtime/types/components/slide-verify.js +0 -0
- package/dist/runtime/types/components/star-rating.d.ts +55 -0
- package/dist/runtime/types/components/star-rating.js +0 -0
- package/dist/runtime/types/data-table/columns.d.ts +236 -0
- package/dist/runtime/types/data-table/columns.js +6 -0
- package/dist/runtime/types/data-table/component.d.ts +190 -0
- package/dist/runtime/types/data-table/component.js +0 -0
- package/dist/runtime/types/data-table/contexts.d.ts +44 -0
- package/dist/runtime/types/data-table/contexts.js +0 -0
- package/dist/runtime/types/data-table/index.d.ts +6 -0
- package/dist/runtime/types/data-table/index.js +1 -0
- package/dist/runtime/types/data-table/pagination.d.ts +87 -0
- package/dist/runtime/types/data-table/pagination.js +0 -0
- package/dist/runtime/types/index.d.ts +6 -5
- package/dist/runtime/types/index.js +5 -5
- package/dist/runtime/types/shared.d.ts +5 -0
- package/dist/runtime/types/shared.js +0 -0
- package/dist/runtime/types/zod.d.ts +19 -17
- package/dist/runtime/utils/extend-theme.d.ts +19 -0
- package/dist/runtime/utils/extend-theme.js +44 -0
- package/dist/runtime/utils/form-control.d.ts +33 -0
- package/dist/runtime/utils/form-control.js +54 -0
- package/dist/runtime/utils/meta.d.ts +4 -0
- package/dist/runtime/utils/meta.js +14 -0
- package/dist/runtime/utils/theme-defaults.d.ts +27 -0
- package/dist/runtime/utils/theme-defaults.js +28 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/composables/useSiteConfig.d.ts +13 -0
- package/dist/runtime/vue/composables/useSiteConfig.js +11 -0
- package/dist/runtime/vue/plugins/theme.d.ts +6 -0
- package/dist/runtime/vue/plugins/theme.js +14 -0
- package/dist/runtime/vue/stubs/base.d.ts +2 -0
- package/dist/runtime/vue/stubs/base.js +2 -0
- package/dist/runtime/vue/stubs/inertia.d.ts +2 -0
- package/dist/runtime/vue/stubs/inertia.js +2 -0
- package/dist/runtime/vue/stubs/movk-extra.d.ts +2 -0
- package/dist/runtime/vue/stubs/movk-extra.js +2 -0
- package/dist/runtime/vue/stubs/none.d.ts +2 -0
- package/dist/runtime/vue/stubs/none.js +2 -0
- package/dist/runtime/vue/stubs/vue-router.d.ts +2 -0
- package/dist/runtime/vue/stubs/vue-router.js +2 -0
- package/dist/shared/nuxt.DfBEyjld.mjs +667 -0
- package/dist/types.d.mts +2 -6
- package/dist/unplugin.d.mts +28 -0
- package/dist/unplugin.mjs +292 -0
- package/dist/vite.d.mts +12 -0
- package/dist/vite.mjs +20 -0
- package/package.json +82 -42
- package/vue-plugin.d.ts +5 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.d.vue.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue.d.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.d.vue.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue +0 -55
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue.d.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.d.vue.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue +0 -125
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue.d.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.d.vue.ts +0 -20
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue +0 -105
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue.d.ts +0 -20
- package/dist/runtime/composables/useApiAuth.d.ts +0 -47
- package/dist/runtime/composables/useApiAuth.js +0 -66
- package/dist/runtime/internal/useAutoFormProvider.d.ts +0 -50
- package/dist/runtime/schemas/api.d.ts +0 -590
- package/dist/runtime/schemas/api.js +0 -228
- package/dist/runtime/server/api/_movk/session.post.d.ts +0 -10
- package/dist/runtime/server/api/_movk/session.post.js +0 -18
- package/dist/runtime/style.css +0 -1
- package/dist/runtime/types/api.d.ts +0 -218
- package/dist/runtime/types/auth.d.ts +0 -34
- package/dist/runtime/types/auto-form-renderer.d.ts +0 -22
- package/dist/runtime/types/auto-form.d.ts +0 -548
- package/dist/runtime/types/components.d.ts +0 -43
- package/dist/runtime/types/module.d.ts +0 -39
- package/dist/runtime/utils/api-utils.d.ts +0 -79
- package/dist/runtime/utils/api-utils.js +0 -127
- package/dist/runtime/utils/auto-form.d.ts +0 -3
- package/dist/runtime/utils/auto-form.js +0 -18
- package/dist/runtime/utils/reactive-utils.d.ts +0 -30
- package/dist/runtime/utils/schema-introspector.d.ts +0 -13
- /package/dist/runtime/{utils/theme.js → domains/theme/theme-icons.js} +0 -0
- /package/dist/runtime/types/{api.js → api/config.js} +0 -0
- /package/dist/runtime/types/{auto-form-renderer.js → api/fetch.js} +0 -0
- /package/dist/runtime/types/{auto-form.js → api/index.js} +0 -0
- /package/dist/runtime/types/{module.js → api/module.js} +0 -0
- /package/dist/runtime/types/{components.js → api/response.js} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod/v4';
|
|
2
|
-
import type { AutoFormRendererLayoutProps } from '../../types/auto-form-renderer.js';
|
|
3
|
-
declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererLayoutProps<S>> & (typeof globalThis extends {
|
|
5
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
-
} ? P : {});
|
|
7
|
-
expose: (exposed: {}) => void;
|
|
8
|
-
attrs: any;
|
|
9
|
-
slots: {};
|
|
10
|
-
emit: {};
|
|
11
|
-
}>) => import("vue").VNode & {
|
|
12
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
16
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
17
|
-
[K in keyof T]: T[K];
|
|
18
|
-
} : {
|
|
19
|
-
[K in keyof T as K]: T[K];
|
|
20
|
-
}) & {};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed, resolveDynamicComponent } from "vue";
|
|
3
|
-
import { classifyFields } from "../../utils/auto-form";
|
|
4
|
-
import { resolveReactiveValue } from "../../utils/reactive-utils";
|
|
5
|
-
import { useAutoFormInjector } from "../../internal/useAutoFormProvider";
|
|
6
|
-
import AutoFormRendererArray from "./AutoFormRendererArray.vue";
|
|
7
|
-
import AutoFormRendererField from "./AutoFormRendererField.vue";
|
|
8
|
-
import AutoFormRendererNested from "./AutoFormRendererNested.vue";
|
|
9
|
-
const {
|
|
10
|
-
field,
|
|
11
|
-
schema,
|
|
12
|
-
extraProps
|
|
13
|
-
} = defineProps({
|
|
14
|
-
field: { type: Object, required: true },
|
|
15
|
-
extraProps: { type: Object, required: false },
|
|
16
|
-
schema: { type: null, required: false }
|
|
17
|
-
});
|
|
18
|
-
const { createFieldContext, resolveFieldProp } = useAutoFormInjector();
|
|
19
|
-
const context = createFieldContext(field);
|
|
20
|
-
function getFieldName(field2) {
|
|
21
|
-
return field2.path.split(".").pop() || field2.path;
|
|
22
|
-
}
|
|
23
|
-
const renderData = computed(() => {
|
|
24
|
-
if (!field.children?.length) return null;
|
|
25
|
-
const visibleFields = field.children.filter(
|
|
26
|
-
(f) => f && (f.meta?.if === void 0 || resolveFieldProp(f, "if") === true)
|
|
27
|
-
);
|
|
28
|
-
const classified = classifyFields(visibleFields);
|
|
29
|
-
return {
|
|
30
|
-
...classified,
|
|
31
|
-
allFields: visibleFields
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const layoutComponent = computed(() => {
|
|
35
|
-
if (!field.meta?.layout?.component) {
|
|
36
|
-
return "div";
|
|
37
|
-
}
|
|
38
|
-
return resolveDynamicComponent(field.meta.layout.component);
|
|
39
|
-
});
|
|
40
|
-
const layoutProps = computed(() => {
|
|
41
|
-
const config = field.meta.layout;
|
|
42
|
-
if (!config) return {};
|
|
43
|
-
return {
|
|
44
|
-
...resolveReactiveValue(config.props, context),
|
|
45
|
-
...config.class && { class: resolveReactiveValue(config.class, context) }
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
const layoutSlots = computed(() => {
|
|
49
|
-
const config = field.meta.layout;
|
|
50
|
-
if (!config?.slots) return {};
|
|
51
|
-
const resolvedSlots = resolveReactiveValue(config.slots, context);
|
|
52
|
-
return Object.entries(resolvedSlots).reduce((acc, [name, fn]) => {
|
|
53
|
-
if (typeof fn === "function") acc[name] = fn;
|
|
54
|
-
return acc;
|
|
55
|
-
}, {});
|
|
56
|
-
});
|
|
57
|
-
const fieldSlotMapping = computed(() => {
|
|
58
|
-
const config = field.meta.layout;
|
|
59
|
-
if (!config || !renderData.value) return /* @__PURE__ */ new Map();
|
|
60
|
-
const mapping = /* @__PURE__ */ new Map();
|
|
61
|
-
if (config.fieldSlots) {
|
|
62
|
-
const resolved = resolveReactiveValue(config.fieldSlots, context);
|
|
63
|
-
Object.entries(resolved).forEach(([name, slot]) => {
|
|
64
|
-
if (slot && typeof slot === "string") mapping.set(name, slot);
|
|
65
|
-
});
|
|
66
|
-
return mapping;
|
|
67
|
-
}
|
|
68
|
-
if (config.fieldSlot) {
|
|
69
|
-
const slot = resolveReactiveValue(config.fieldSlot, context);
|
|
70
|
-
if (slot && typeof slot === "string") {
|
|
71
|
-
renderData.value.allFields.forEach((f) => {
|
|
72
|
-
mapping.set(getFieldName(f), slot);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return mapping;
|
|
77
|
-
});
|
|
78
|
-
const fieldsBySlot = computed(() => {
|
|
79
|
-
if (!renderData.value) return /* @__PURE__ */ new Map();
|
|
80
|
-
const grouped = renderData.value.allFields.reduce((map, field2) => {
|
|
81
|
-
const slot = fieldSlotMapping.value.get(getFieldName(field2)) || "default";
|
|
82
|
-
if (!map.has(slot)) map.set(slot, []);
|
|
83
|
-
map.get(slot).push(field2);
|
|
84
|
-
return map;
|
|
85
|
-
}, /* @__PURE__ */ new Map());
|
|
86
|
-
return grouped;
|
|
87
|
-
});
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<template>
|
|
91
|
-
<component :is="layoutComponent" v-bind="layoutProps" v-if="renderData">
|
|
92
|
-
<template v-for="(slotFn, slotName) in layoutSlots" :key="`slot-${slotName}`" #[slotName]>
|
|
93
|
-
<component :is="slotFn" />
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<template v-for="[slotName, fields] in fieldsBySlot.entries()" :key="`fields-${slotName}`" #[slotName]>
|
|
97
|
-
<template v-for="childField in fields" :key="childField.path">
|
|
98
|
-
<AutoFormRendererField
|
|
99
|
-
v-if="renderData.leafFields.includes(childField)"
|
|
100
|
-
:field="childField"
|
|
101
|
-
:schema="schema"
|
|
102
|
-
:extra-props="extraProps"
|
|
103
|
-
/>
|
|
104
|
-
<AutoFormRendererArray
|
|
105
|
-
v-else-if="renderData.arrayFields.includes(childField)"
|
|
106
|
-
:field="childField"
|
|
107
|
-
:schema="schema"
|
|
108
|
-
:extra-props="extraProps"
|
|
109
|
-
/>
|
|
110
|
-
<AutoFormRendererLayout
|
|
111
|
-
v-else-if="renderData.layoutFields.includes(childField)"
|
|
112
|
-
:field="childField"
|
|
113
|
-
:schema="schema"
|
|
114
|
-
:extra-props="extraProps"
|
|
115
|
-
/>
|
|
116
|
-
<AutoFormRendererNested
|
|
117
|
-
v-else
|
|
118
|
-
:field="childField"
|
|
119
|
-
:schema="schema"
|
|
120
|
-
:extra-props="extraProps"
|
|
121
|
-
/>
|
|
122
|
-
</template>
|
|
123
|
-
</template>
|
|
124
|
-
</component>
|
|
125
|
-
</template>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod/v4';
|
|
2
|
-
import type { AutoFormRendererLayoutProps } from '../../types/auto-form-renderer.js';
|
|
3
|
-
declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererLayoutProps<S>> & (typeof globalThis extends {
|
|
5
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
-
} ? P : {});
|
|
7
|
-
expose: (exposed: {}) => void;
|
|
8
|
-
attrs: any;
|
|
9
|
-
slots: {};
|
|
10
|
-
emit: {};
|
|
11
|
-
}>) => import("vue").VNode & {
|
|
12
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
16
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
17
|
-
[K in keyof T]: T[K];
|
|
18
|
-
} : {
|
|
19
|
-
[K in keyof T as K]: T[K];
|
|
20
|
-
}) & {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod/v4';
|
|
2
|
-
import type { AutoFormRendererNestedProps } from '../../types/auto-form-renderer.js';
|
|
3
|
-
declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererNestedProps<S>> & (typeof globalThis extends {
|
|
5
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
-
} ? P : {});
|
|
7
|
-
expose: (exposed: {}) => void;
|
|
8
|
-
attrs: any;
|
|
9
|
-
slots: {};
|
|
10
|
-
emit: {};
|
|
11
|
-
}>) => import("vue").VNode & {
|
|
12
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
16
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
17
|
-
[K in keyof T]: T[K];
|
|
18
|
-
} : {
|
|
19
|
-
[K in keyof T as K]: T[K];
|
|
20
|
-
}) & {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { UCollapsible } from "#components";
|
|
3
|
-
import { computed } from "vue";
|
|
4
|
-
import { useAutoFormInjector } from "../../internal/useAutoFormProvider";
|
|
5
|
-
import { classifyFields, isLeafField, VNodeRender } from "../../utils/auto-form";
|
|
6
|
-
import AutoFormRendererArray from "./AutoFormRendererArray.vue";
|
|
7
|
-
import AutoFormRendererField from "./AutoFormRendererField.vue";
|
|
8
|
-
import AutoFormRendererLayout from "./AutoFormRendererLayout.vue";
|
|
9
|
-
const {
|
|
10
|
-
field,
|
|
11
|
-
schema,
|
|
12
|
-
extraProps
|
|
13
|
-
} = defineProps({
|
|
14
|
-
field: { type: Object, required: true },
|
|
15
|
-
extraProps: { type: Object, required: false },
|
|
16
|
-
schema: { type: null, required: false }
|
|
17
|
-
});
|
|
18
|
-
const { createSlotResolver, createSlotProps, createCollapsibleEnhancer, resolveFieldProp } = useAutoFormInjector();
|
|
19
|
-
const renderData = computed(() => {
|
|
20
|
-
if (isLeafField(field) || !field.children?.length) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
const visibleFields = field.children.filter(
|
|
24
|
-
(f) => f && (f.meta?.if === void 0 || resolveFieldProp(f, "if") === true)
|
|
25
|
-
);
|
|
26
|
-
const classified = classifyFields(visibleFields);
|
|
27
|
-
return {
|
|
28
|
-
...classified,
|
|
29
|
-
allFields: visibleFields
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
const slotResolver = computed(() => createSlotResolver(field, extraProps));
|
|
33
|
-
const { collapsibleConfig, shouldShowCollapsible, isHidden, enhancedField } = createCollapsibleEnhancer(field, extraProps);
|
|
34
|
-
const slotProps = computed(() => createSlotProps(field, extraProps));
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<template>
|
|
38
|
-
<UCollapsible v-if="shouldShowCollapsible && renderData" v-show="!isHidden" v-bind="collapsibleConfig || {}">
|
|
39
|
-
<template #default="{ open }">
|
|
40
|
-
<AutoFormRendererField :field="enhancedField" :schema="schema" :extra-props="{ ...extraProps, open }" />
|
|
41
|
-
</template>
|
|
42
|
-
<template #content>
|
|
43
|
-
<VNodeRender v-if="slotResolver.hasSlot('before')" :node="slotResolver.renderSlot('before', slotProps)" />
|
|
44
|
-
<VNodeRender v-if="slotResolver.hasSlot('content')" :node="slotResolver.renderSlot('content', slotProps)" />
|
|
45
|
-
<template v-else>
|
|
46
|
-
<template v-for="childField in renderData.allFields" :key="childField.path">
|
|
47
|
-
<AutoFormRendererField
|
|
48
|
-
v-if="renderData.leafFields.includes(childField)"
|
|
49
|
-
:field="childField"
|
|
50
|
-
:schema="schema"
|
|
51
|
-
:extra-props="extraProps"
|
|
52
|
-
/>
|
|
53
|
-
<AutoFormRendererArray
|
|
54
|
-
v-else-if="renderData.arrayFields.includes(childField)"
|
|
55
|
-
:field="childField"
|
|
56
|
-
:schema="schema"
|
|
57
|
-
:extra-props="extraProps"
|
|
58
|
-
/>
|
|
59
|
-
<AutoFormRendererLayout
|
|
60
|
-
v-else-if="renderData.layoutFields.includes(childField)"
|
|
61
|
-
:field="childField"
|
|
62
|
-
:schema="schema"
|
|
63
|
-
:extra-props="extraProps"
|
|
64
|
-
/>
|
|
65
|
-
<AutoFormRendererNested
|
|
66
|
-
v-else
|
|
67
|
-
:field="childField"
|
|
68
|
-
:schema="schema"
|
|
69
|
-
:extra-props="extraProps"
|
|
70
|
-
/>
|
|
71
|
-
</template>
|
|
72
|
-
</template>
|
|
73
|
-
<VNodeRender v-if="slotResolver.hasSlot('after')" :node="slotResolver.renderSlot('after', slotProps)" />
|
|
74
|
-
</template>
|
|
75
|
-
</UCollapsible>
|
|
76
|
-
|
|
77
|
-
<template v-else-if="renderData">
|
|
78
|
-
<template v-for="childField in renderData.allFields" :key="childField.path">
|
|
79
|
-
<AutoFormRendererField
|
|
80
|
-
v-if="renderData.leafFields.includes(childField)"
|
|
81
|
-
:field="childField"
|
|
82
|
-
:schema="schema"
|
|
83
|
-
:extra-props="extraProps"
|
|
84
|
-
/>
|
|
85
|
-
<AutoFormRendererArray
|
|
86
|
-
v-else-if="renderData.arrayFields.includes(childField)"
|
|
87
|
-
:field="childField"
|
|
88
|
-
:schema="schema"
|
|
89
|
-
:extra-props="extraProps"
|
|
90
|
-
/>
|
|
91
|
-
<AutoFormRendererLayout
|
|
92
|
-
v-else-if="renderData.layoutFields.includes(childField)"
|
|
93
|
-
:field="childField"
|
|
94
|
-
:schema="schema"
|
|
95
|
-
:extra-props="extraProps"
|
|
96
|
-
/>
|
|
97
|
-
<AutoFormRendererNested
|
|
98
|
-
v-else
|
|
99
|
-
:field="childField"
|
|
100
|
-
:schema="schema"
|
|
101
|
-
:extra-props="extraProps"
|
|
102
|
-
/>
|
|
103
|
-
</template>
|
|
104
|
-
</template>
|
|
105
|
-
</template>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod/v4';
|
|
2
|
-
import type { AutoFormRendererNestedProps } from '../../types/auto-form-renderer.js';
|
|
3
|
-
declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererNestedProps<S>> & (typeof globalThis extends {
|
|
5
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
-
} ? P : {});
|
|
7
|
-
expose: (exposed: {}) => void;
|
|
8
|
-
attrs: any;
|
|
9
|
-
slots: {};
|
|
10
|
-
emit: {};
|
|
11
|
-
}>) => import("vue").VNode & {
|
|
12
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
16
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
17
|
-
[K in keyof T]: T[K];
|
|
18
|
-
} : {
|
|
19
|
-
[K in keyof T as K]: T[K];
|
|
20
|
-
}) & {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { UseApiAuthReturn } from '../types/api.js';
|
|
2
|
-
/**
|
|
3
|
-
* API 认证 Composable
|
|
4
|
-
*
|
|
5
|
-
* 提供完整的登录、登出、刷新用户信息等功能,
|
|
6
|
-
* 与 nuxt-auth-utils 无缝集成。
|
|
7
|
-
*
|
|
8
|
-
* @returns UseApiAuthReturn 认证相关方法和状态
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const { login, clear, loggedIn, user } = useApiAuth()
|
|
13
|
-
*
|
|
14
|
-
* // 基础登录
|
|
15
|
-
* await login({
|
|
16
|
-
* loginPath: '/auth/login',
|
|
17
|
-
* credentials: { username: 'admin', password: '123456' }
|
|
18
|
-
* })
|
|
19
|
-
*
|
|
20
|
-
* // 登录后获取用户信息
|
|
21
|
-
* await login({
|
|
22
|
-
* loginPath: '/auth/login',
|
|
23
|
-
* credentials: { username: 'admin', password: '123456' },
|
|
24
|
-
* userInfoPath: '/auth/me'
|
|
25
|
-
* })
|
|
26
|
-
*
|
|
27
|
-
* // 自定义 token 提取和 session 构建
|
|
28
|
-
* await login({
|
|
29
|
-
* loginPath: '/auth/login',
|
|
30
|
-
* credentials: { username: 'admin', password: '123456' },
|
|
31
|
-
* tokenExtractor: (res) => res.data?.accessToken,
|
|
32
|
-
* sessionBuilder: (user, token) => ({
|
|
33
|
-
* user: { id: user.id, name: user.name },
|
|
34
|
-
* secure: { token, permissions: user.permissions }
|
|
35
|
-
* })
|
|
36
|
-
* })
|
|
37
|
-
*
|
|
38
|
-
* // 登出
|
|
39
|
-
* await clear()
|
|
40
|
-
*
|
|
41
|
-
* // 响应式状态
|
|
42
|
-
* if (loggedIn.value) {
|
|
43
|
-
* console.log('当前用户:', user.value)
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export declare function useApiAuth(): UseApiAuthReturn;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { getPath } from "@movk/core";
|
|
2
|
-
import { useNuxtApp, useRuntimeConfig, useUserSession } from "#imports";
|
|
3
|
-
export function useApiAuth() {
|
|
4
|
-
const { $api } = useNuxtApp();
|
|
5
|
-
const userSession = useUserSession();
|
|
6
|
-
const moduleConfig = useRuntimeConfig().public.movkApi;
|
|
7
|
-
const buildAuthHeader = (token, authConfig = {}) => {
|
|
8
|
-
const tokenType = authConfig.tokenType === "Custom" ? authConfig.customTokenType || "" : authConfig.tokenType || "Bearer";
|
|
9
|
-
return tokenType ? `${tokenType} ${token}` : token;
|
|
10
|
-
};
|
|
11
|
-
const getHeaderName = (authConfig = {}) => {
|
|
12
|
-
return authConfig.headerName || "Authorization";
|
|
13
|
-
};
|
|
14
|
-
const defaultTokenExtractor = (response) => {
|
|
15
|
-
return getPath(response, "data.token") ?? getPath(response, "data.accessToken") ?? getPath(response, "token");
|
|
16
|
-
};
|
|
17
|
-
const defaultSessionBuilder = (user, token) => ({
|
|
18
|
-
user,
|
|
19
|
-
token,
|
|
20
|
-
loggedInAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
21
|
-
});
|
|
22
|
-
async function login(options) {
|
|
23
|
-
const {
|
|
24
|
-
loginPath,
|
|
25
|
-
credentials,
|
|
26
|
-
userInfoPath,
|
|
27
|
-
tokenExtractor = defaultTokenExtractor,
|
|
28
|
-
sessionBuilder = defaultSessionBuilder,
|
|
29
|
-
endpoint
|
|
30
|
-
} = options;
|
|
31
|
-
const api = endpoint ? $api.use(endpoint) : $api;
|
|
32
|
-
const loginResponse = await api.$fetch(loginPath, {
|
|
33
|
-
method: "POST",
|
|
34
|
-
body: credentials
|
|
35
|
-
});
|
|
36
|
-
const token = tokenExtractor(loginResponse);
|
|
37
|
-
if (!token) {
|
|
38
|
-
throw new Error("Login failed: token not found in response");
|
|
39
|
-
}
|
|
40
|
-
let userInfo;
|
|
41
|
-
if (userInfoPath) {
|
|
42
|
-
const endpointConfig = api.getConfig();
|
|
43
|
-
const authConfig = endpointConfig.auth || moduleConfig.auth || {};
|
|
44
|
-
const headerName = getHeaderName(authConfig);
|
|
45
|
-
const headerValue = buildAuthHeader(token, authConfig);
|
|
46
|
-
const userResponse = await api.$fetch(userInfoPath, {
|
|
47
|
-
headers: { [headerName]: headerValue },
|
|
48
|
-
context: { toast: false }
|
|
49
|
-
});
|
|
50
|
-
userInfo = getPath(userResponse, "data") ?? userResponse;
|
|
51
|
-
} else {
|
|
52
|
-
userInfo = getPath(loginResponse, "data") ?? loginResponse;
|
|
53
|
-
}
|
|
54
|
-
const sessionData = sessionBuilder(userInfo, token);
|
|
55
|
-
await $fetch("/api/_movk/session", {
|
|
56
|
-
method: "POST",
|
|
57
|
-
body: sessionData
|
|
58
|
-
});
|
|
59
|
-
await userSession.fetch();
|
|
60
|
-
return { user: userInfo, token };
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
login,
|
|
64
|
-
...userSession
|
|
65
|
-
};
|
|
66
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
import type { AutoFormField, AutoFormFieldContext } from '../types/auto-form.js';
|
|
3
|
-
export declare function useAutoFormProvider<T extends Record<string, any>>(state: Ref<T>, slots: Record<string, any>): {
|
|
4
|
-
createFieldContext: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
5
|
-
createSlotProps: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
6
|
-
resolveFieldProp: <T_1 = any>(field: AutoFormField, prop: string, defaultValue?: T_1, extraProps?: Record<string, any>) => T_1 | undefined;
|
|
7
|
-
renderFieldSlot: (fn?: (props?: any) => any, slotProps?: any) => any;
|
|
8
|
-
getResolvedFieldSlots: (field: AutoFormField, extraProps?: Record<string, any>) => undefined;
|
|
9
|
-
renderControl: (field: AutoFormField, extraProps?: Record<string, any>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}> | null;
|
|
12
|
-
createSlotResolver: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
13
|
-
hasSlot(name: string): boolean;
|
|
14
|
-
renderSlot(name: string, slotProps: any): any;
|
|
15
|
-
};
|
|
16
|
-
createFormFieldSlots: (field: AutoFormField, slotResolver: ReturnType<(field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
17
|
-
hasSlot(name: string): boolean;
|
|
18
|
-
renderSlot(name: string, slotProps: any): any;
|
|
19
|
-
}>, extraProps?: Record<string, any>) => Record<string, any>;
|
|
20
|
-
createCollapsibleEnhancer: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
21
|
-
collapsibleConfig: import("vue").ComputedRef<undefined>;
|
|
22
|
-
shouldShowCollapsible: import("vue").ComputedRef<boolean>;
|
|
23
|
-
isHidden: import("vue").ComputedRef<undefined>;
|
|
24
|
-
enhancedField: import("vue").ComputedRef<AutoFormField>;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare function useAutoFormInjector(): {
|
|
28
|
-
createFieldContext: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
29
|
-
createSlotProps: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
|
|
30
|
-
resolveFieldProp: <T = any>(field: AutoFormField, prop: string, defaultValue?: T | undefined, extraProps?: Record<string, any>) => T | undefined;
|
|
31
|
-
renderFieldSlot: (fn?: ((props?: any) => any) | undefined, slotProps?: any) => any;
|
|
32
|
-
getResolvedFieldSlots: (field: AutoFormField, extraProps?: Record<string, any>) => undefined;
|
|
33
|
-
renderControl: (field: AutoFormField, extraProps?: Record<string, any>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
}> | null;
|
|
36
|
-
createSlotResolver: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
37
|
-
hasSlot(name: string): boolean;
|
|
38
|
-
renderSlot(name: string, slotProps: any): any;
|
|
39
|
-
};
|
|
40
|
-
createFormFieldSlots: (field: AutoFormField, slotResolver: {
|
|
41
|
-
hasSlot(name: string): boolean;
|
|
42
|
-
renderSlot(name: string, slotProps: any): any;
|
|
43
|
-
}, extraProps?: Record<string, any>) => Record<string, any>;
|
|
44
|
-
createCollapsibleEnhancer: (field: AutoFormField, extraProps?: Record<string, any>) => {
|
|
45
|
-
collapsibleConfig: import("vue").ComputedRef<undefined>;
|
|
46
|
-
shouldShowCollapsible: import("vue").ComputedRef<boolean>;
|
|
47
|
-
isHidden: import("vue").ComputedRef<undefined>;
|
|
48
|
-
enhancedField: import("vue").ComputedRef<AutoFormField>;
|
|
49
|
-
};
|
|
50
|
-
};
|