@vinicunca/taman-ui 0.1.3 → 0.1.4
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/_virtual/_/plugin-vue/export-helper.mjs +1 -2
- package/dist/components/auth/taman-auth-form.mjs +1 -2
- package/dist/components/auth/taman-auth-form.vue.d.ts +0 -2
- package/dist/components/back-to-top/taman-back-to-top.mjs +1 -2
- package/dist/components/back-to-top/taman-back-to-top.vue.d.ts +0 -2
- package/dist/components/button/check-group-selection.mjs +1 -2
- package/dist/components/button/taman-button-check-group.mjs +1 -2
- package/dist/components/button/taman-button-check-group.types.d.ts +1 -3
- package/dist/components/button/taman-button-check-group.vue.d.ts +0 -2
- package/dist/components/button/taman-button-icon.mjs +1 -2
- package/dist/components/button/taman-button-icon.vue.d.ts +0 -2
- package/dist/components/descriptions/taman-description-cell.mjs +1 -2
- package/dist/components/descriptions/taman-description-item.mjs +1 -2
- package/dist/components/descriptions/taman-description-item.vue.d.ts +0 -2
- package/dist/components/descriptions/taman-description-row.mjs +1 -2
- package/dist/components/descriptions/taman-description.mjs +1 -2
- package/dist/components/descriptions/taman-description.types.d.ts +1 -3
- package/dist/components/descriptions/taman-description.vue.d.ts +7 -7
- package/dist/components/descriptions/use-taman-description.mjs +1 -2
- package/dist/components/file-upload/taman-file-upload.mjs +1 -2
- package/dist/components/file-upload/taman-file-upload.types.d.ts +1 -3
- package/dist/components/file-upload/taman-file-upload.vue.d.ts +0 -2
- package/dist/components/full-screen/full-screen.mjs +1 -2
- package/dist/components/full-screen/full-screen.vue.d.ts +0 -2
- package/dist/components/icon/icon.mjs +1 -2
- package/dist/components/icon/icon.vue.d.ts +0 -2
- package/dist/components/index.mjs +10 -10
- package/dist/components/input/password-strength.d.ts +1 -3
- package/dist/components/input/password-strength.mjs +1 -2
- package/dist/components/input/taman-input-currency.mjs +1 -2
- package/dist/components/input/taman-input-currency.types.d.ts +1 -3
- package/dist/components/input/taman-input-currency.vue.d.ts +0 -2
- package/dist/components/input/taman-input-password.mjs +1 -2
- package/dist/components/input/taman-input-password.vue.d.ts +0 -2
- package/dist/components/input-date/format-calendar-input-value.mjs +1 -2
- package/dist/components/input-date/taman-input-date.mjs +1 -2
- package/dist/components/input-date/taman-input-date.types.d.ts +1 -3
- package/dist/components/input-date/taman-input-date.vue.d.ts +0 -2
- package/dist/components/loading/index.d.ts +1 -1
- package/dist/components/loading/taman-loading.mjs +1 -2
- package/dist/components/loading/taman-loading.vue.d.ts +5 -5
- package/dist/components/loading/types.d.ts +1 -3
- package/dist/components/logo/taman-logo.mjs +1 -2
- package/dist/components/logo/taman-logo.vue.d.ts +5 -5
- package/dist/components/render-content/render-content.mjs +1 -2
- package/dist/components/render-content/render-content.vue.d.ts +0 -2
- package/dist/components/scrollbar/scrollbar.mjs +1 -2
- package/dist/components/scrollbar/scrollbar.vue.d.ts +5 -5
- package/dist/form/components/form-actions.mjs +1 -2
- package/dist/form/components/form-field-array.mjs +3 -4
- package/dist/form/components/form-field-array.types.d.ts +1 -3
- package/dist/form/form-render/form-render-field-collapsible.mjs +1 -2
- package/dist/form/form-render/form-render-field-control.mjs +1 -2
- package/dist/form/form-render/form-render-form-field.mjs +1 -2
- package/dist/form/form-render/form-render-form-label.mjs +1 -2
- package/dist/form/form-render/form-render-form.mjs +4 -5
- package/dist/form/form-render/form-render-group.mjs +1 -2
- package/dist/form/form-render/form-render.context.mjs +1 -2
- package/dist/form/form-render/form-render.dependencies.mjs +1 -2
- package/dist/form/form-render/form-render.helper.mjs +1 -2
- package/dist/form/form-render/form-render.schema.mjs +1 -2
- package/dist/form/form-render/index.mjs +1 -1
- package/dist/form/form.api.d.ts +0 -2
- package/dist/form/form.api.mjs +2 -3
- package/dist/form/form.built-ins.d.ts +1 -3
- package/dist/form/form.built-ins.mjs +1 -2
- package/dist/form/form.codec.d.ts +0 -2
- package/dist/form/form.codec.mjs +1 -2
- package/dist/form/form.config.d.ts +1 -3
- package/dist/form/form.config.mjs +2 -3
- package/dist/form/form.empty-value.d.ts +1 -3
- package/dist/form/form.empty-value.mjs +1 -2
- package/dist/form/form.field-name.mjs +1 -2
- package/dist/form/form.rule-registry.mjs +1 -2
- package/dist/form/form.runtime-field.mjs +1 -2
- package/dist/form/form.runtime.mjs +1 -2
- package/dist/form/form.schema-defaults.mjs +1 -2
- package/dist/form/form.types.d.ts +0 -2
- package/dist/form/form.use-delayed-flag.mjs +1 -2
- package/dist/form/form.use-form-context.mjs +1 -2
- package/dist/form/form.use-taman-form.d.ts +0 -2
- package/dist/form/form.use-taman-form.mjs +1 -2
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/form/taman-use-form.mjs +4 -5
- package/dist/index.mjs +2 -2
- package/dist/layout/components/taman-core-button-collapse.mjs +1 -2
- package/dist/layout/components/taman-core-button-fixed.mjs +1 -2
- package/dist/layout/components/taman-core-layout-content.mjs +1 -2
- package/dist/layout/components/taman-core-layout-footer.mjs +1 -2
- package/dist/layout/components/taman-core-layout-header.mjs +1 -2
- package/dist/layout/components/taman-core-layout-sidebar.mjs +1 -2
- package/dist/layout/components/taman-core-layout-tabbar.mjs +1 -2
- package/dist/layout/composables/use-layout.mjs +1 -2
- package/dist/layout/composables/use-sidebar-drag.mjs +1 -2
- package/dist/layout/header-scroll-state.mjs +1 -2
- package/dist/layout/taman-core-layout.d.ts +0 -2
- package/dist/layout/taman-core-layout.mjs +1 -2
- package/dist/layout/taman-core-layout.vue.d.ts +32 -27
- package/dist/menu/components/collapse-transition.mjs +1 -2
- package/dist/menu/components/index.mjs +3 -3
- package/dist/menu/components/normal-menu/normal-menu.d.ts +0 -2
- package/dist/menu/components/normal-menu/normal-menu.mjs +1 -2
- package/dist/menu/components/normal-menu/normal-menu.vue.d.ts +0 -2
- package/dist/menu/components/taman-menu-badge-dot.mjs +1 -2
- package/dist/menu/components/taman-menu-badge.mjs +1 -2
- package/dist/menu/components/taman-menu-badge.vue.d.ts +0 -2
- package/dist/menu/components/taman-menu-item.mjs +3 -4
- package/dist/menu/components/taman-menu-root.mjs +5 -6
- package/dist/menu/components/taman-menu-sub-menu-content.mjs +1 -2
- package/dist/menu/components/taman-menu-sub-menu.mjs +3 -4
- package/dist/menu/composables/use-menu-context.mjs +1 -2
- package/dist/menu/composables/use-menu-scroll.mjs +1 -2
- package/dist/menu/composables/use-menu.mjs +1 -2
- package/dist/menu/menu.constants.mjs +1 -2
- package/dist/menu/menu.types.d.ts +0 -2
- package/dist/menu/menu.utils.mjs +1 -2
- package/dist/menu/taman-menu.mjs +1 -2
- package/dist/menu/taman-menu.vue.d.ts +0 -2
- package/dist/menu/taman-sub-menu.mjs +1 -2
- package/dist/popup/alert/alert-builder.d.ts +1 -3
- package/dist/popup/alert/alert-builder.mjs +1 -2
- package/dist/popup/alert/alert-overlay.mjs +1 -2
- package/dist/popup/alert/alert.d.ts +1 -3
- package/dist/popup/alert/alert.mjs +1 -2
- package/dist/popup/alert/alert.vue.d.ts +0 -2
- package/dist/popup/alert/alert2.mjs +1 -2
- package/dist/popup/alert/index.mjs +1 -1
- package/dist/popup/dialog/dialog.api.d.ts +1 -3
- package/dist/popup/dialog/dialog.api.mjs +1 -2
- package/dist/popup/dialog/dialog.mjs +26 -16
- package/dist/popup/dialog/dialog.types.d.ts +0 -2
- package/dist/popup/dialog/dialog.vue.d.ts +25 -25
- package/dist/popup/dialog/use-dialog-draggable.mjs +1 -2
- package/dist/popup/dialog/use-taman-dialog.d.ts +0 -2
- package/dist/popup/dialog/use-taman-dialog.mjs +2 -3
- package/dist/popup/drawer/drawer.api.d.ts +1 -3
- package/dist/popup/drawer/drawer.api.mjs +1 -2
- package/dist/popup/drawer/drawer.mjs +29 -14
- package/dist/popup/drawer/drawer.types.d.ts +0 -2
- package/dist/popup/drawer/drawer.vue.d.ts +27 -27
- package/dist/popup/drawer/use-taman-drawer.d.ts +0 -2
- package/dist/popup/drawer/use-taman-drawer.mjs +2 -3
- package/dist/tabs/components/taman-tabs.mjs +1 -2
- package/dist/tabs/components/widgets/tool-more.mjs +1 -2
- package/dist/tabs/components/widgets/tool-more.vue.d.ts +0 -2
- package/dist/tabs/components/widgets/tool-refresh.mjs +1 -2
- package/dist/tabs/components/widgets/tool-refresh.vue.d.ts +0 -2
- package/dist/tabs/components/widgets/tool-screen.mjs +1 -2
- package/dist/tabs/components/widgets/tool-screen.vue.d.ts +0 -2
- package/dist/tabs/strict-context-menu.d.ts +0 -2
- package/dist/tabs/tabs.types.d.ts +1 -3
- package/dist/tabs/taman-tabs-view.mjs +1 -2
- package/dist/tabs/taman-tabs-view.vue.d.ts +0 -2
- package/dist/tabs/use-tabs-drag.mjs +1 -2
- package/dist/tabs/use-tabs-view-scroll.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-action.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-action.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-cancel.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-cancel.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-content.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-content.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-description.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-description.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-footer.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-footer.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-header.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-header.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-overlay.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-root.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-root.vue.d.ts +8 -8
- package/dist/ui/alert-dialog/alert-dialog-title.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-title.vue.d.ts +5 -5
- package/dist/ui/alert-dialog/alert-dialog-trigger.mjs +1 -2
- package/dist/ui/alert-dialog/alert-dialog-trigger.vue.d.ts +5 -5
- package/dist/ui/dialog/dialog-close.mjs +1 -2
- package/dist/ui/dialog/dialog-close.vue.d.ts +5 -5
- package/dist/ui/dialog/dialog-content.mjs +10 -6
- package/dist/ui/dialog/dialog-content.vue.d.ts +7 -5
- package/dist/ui/dialog/dialog-description.mjs +1 -2
- package/dist/ui/dialog/dialog-description.vue.d.ts +5 -5
- package/dist/ui/dialog/dialog-footer.mjs +1 -2
- package/dist/ui/dialog/dialog-footer.vue.d.ts +5 -5
- package/dist/ui/dialog/dialog-header.mjs +1 -2
- package/dist/ui/dialog/dialog-header.vue.d.ts +5 -5
- package/dist/ui/dialog/dialog-overlay.mjs +1 -2
- package/dist/ui/dialog/dialog-overlay.vue.d.ts +0 -2
- package/dist/ui/dialog/dialog-root.mjs +1 -2
- package/dist/ui/dialog/dialog-root.vue.d.ts +8 -8
- package/dist/ui/dialog/dialog-title.mjs +1 -2
- package/dist/ui/dialog/dialog-title.vue.d.ts +5 -5
- package/dist/ui/dialog/dialog-trigger.mjs +1 -2
- package/dist/ui/dialog/dialog-trigger.vue.d.ts +5 -5
- package/dist/ui/dialog/index.mjs +4 -4
- package/dist/ui/dialog/use-dialog-state-events.mjs +1 -2
- package/dist/ui/form/form-control.mjs +1 -2
- package/dist/ui/form/form-control.vue.d.ts +5 -5
- package/dist/ui/form/form-description.mjs +1 -2
- package/dist/ui/form/form-description.vue.d.ts +5 -5
- package/dist/ui/form/form-field.mjs +1 -2
- package/dist/ui/form/form-field.vue.d.ts +5 -5
- package/dist/ui/form/form-item.mjs +1 -2
- package/dist/ui/form/form-item.vue.d.ts +5 -5
- package/dist/ui/form/form-label.mjs +3 -4
- package/dist/ui/form/form-label.vue.d.ts +5 -5
- package/dist/ui/form/form-message.mjs +1 -2
- package/dist/ui/form/form-message.vue.d.ts +0 -2
- package/dist/ui/form/injection-keys.d.ts +1 -3
- package/dist/ui/form/injection-keys.mjs +1 -2
- package/dist/ui/form/use-form-field.mjs +1 -2
- package/dist/ui/index.mjs +2 -2
- package/dist/ui/label/label.mjs +1 -2
- package/dist/ui/label/label.vue.d.ts +5 -5
- package/dist/ui/scroll-area/index.mjs +3 -3
- package/dist/ui/scroll-area/scroll-area.mjs +1 -2
- package/dist/ui/scroll-area/scroll-area.vue.d.ts +5 -5
- package/dist/ui/scroll-area/scroll-bar.mjs +1 -2
- package/dist/ui/scroll-area/scroll-bar.vue.d.ts +0 -2
- package/dist/ui/sheet/sheet-close.mjs +1 -2
- package/dist/ui/sheet/sheet-close.vue.d.ts +5 -5
- package/dist/ui/sheet/sheet-content.mjs +9 -5
- package/dist/ui/sheet/sheet-content.vue.d.ts +7 -5
- package/dist/ui/sheet/sheet-description.mjs +1 -2
- package/dist/ui/sheet/sheet-description.vue.d.ts +5 -5
- package/dist/ui/sheet/sheet-footer.mjs +1 -2
- package/dist/ui/sheet/sheet-footer.vue.d.ts +5 -5
- package/dist/ui/sheet/sheet-header.mjs +1 -2
- package/dist/ui/sheet/sheet-header.vue.d.ts +5 -5
- package/dist/ui/sheet/sheet-overlay.mjs +1 -2
- package/dist/ui/sheet/sheet-root.mjs +1 -2
- package/dist/ui/sheet/sheet-root.vue.d.ts +8 -8
- package/dist/ui/sheet/sheet-title.mjs +1 -2
- package/dist/ui/sheet/sheet-title.vue.d.ts +5 -5
- package/dist/ui/sheet/sheet.variants.d.ts +1 -3
- package/dist/ui/sheet/sheet.variants.mjs +1 -2
- package/dist/unocss/content.d.ts +1 -3
- package/dist/unocss/content.mjs +1 -2
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString } from "vue";
|
|
2
2
|
import PAvatar from "pohon-ui/components/Avatar.vue";
|
|
3
|
-
|
|
3
|
+
// src/components/logo/taman-logo.vue
|
|
4
4
|
const _hoisted_1 = ["href"];
|
|
5
5
|
const _hoisted_2 = ["alt", "src"];
|
|
6
6
|
const _hoisted_3 = { class: "color-text font-600 text-nowrap truncate" };
|
|
@@ -56,5 +56,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
//#endregion
|
|
60
59
|
export { _sfc_main as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/logo/taman-logo.vue.d.ts
|
|
2
1
|
type __VLS_Props = {
|
|
3
2
|
collapsed?: boolean;
|
|
4
3
|
fullLogoHeight?: number | string;
|
|
@@ -10,10 +9,12 @@ type __VLS_Props = {
|
|
|
10
9
|
text: string;
|
|
11
10
|
theme?: string;
|
|
12
11
|
};
|
|
13
|
-
declare
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
declare const __VLS_template: () => {
|
|
13
|
+
__VLS_Slots: {
|
|
14
|
+
text?: (props: {}) => any;
|
|
15
|
+
};
|
|
16
16
|
};
|
|
17
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
17
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
19
|
theme: string;
|
|
19
20
|
collapsed: boolean;
|
|
@@ -28,5 +29,4 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
28
29
|
$slots: S;
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
|
-
//#endregion
|
|
32
32
|
export { _default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h } from "vue";
|
|
2
2
|
import { isFunction, isPlainObject, isString } from "@vinicunca/taman-core/utils";
|
|
3
|
-
|
|
3
|
+
// src/components/render-content/render-content.vue
|
|
4
4
|
const _sfc_main = defineComponent({
|
|
5
5
|
name: "TamanRenderContent",
|
|
6
6
|
props: {
|
|
@@ -38,5 +38,4 @@ const _sfc_main = defineComponent({
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
//#endregion
|
|
42
41
|
export { _sfc_main as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Component, PropType } from "vue";
|
|
2
|
-
//#region src/components/render-content/render-content.vue.d.ts
|
|
3
2
|
declare const _default: typeof __VLS_export;
|
|
4
3
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
4
|
content: {
|
|
@@ -27,5 +26,4 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
26
|
content: string | Function | Record<string, any>;
|
|
28
27
|
renderBr: boolean;
|
|
29
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
|
-
//#endregion
|
|
31
29
|
export { _default as default };
|
|
@@ -2,7 +2,7 @@ import _sfc_main$1 from "../../ui/scroll-area/scroll-bar.mjs";
|
|
|
2
2
|
import _sfc_main$2 from "../../ui/scroll-area/scroll-area.mjs";
|
|
3
3
|
import "../../ui/index.mjs";
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, normalizeClass, openBlock, ref, renderSlot, unref, withCtx } from "vue";
|
|
5
|
-
|
|
5
|
+
// src/components/scrollbar/scrollbar.vue
|
|
6
6
|
const ARRIVED_STATE_THRESHOLD_PIXELS = 1;
|
|
7
7
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
8
|
__name: "scrollbar",
|
|
@@ -132,5 +132,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
|
-
//#endregion
|
|
136
135
|
export { _sfc_main as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from "vue";
|
|
2
|
-
//#region src/components/scrollbar/scrollbar.vue.d.ts
|
|
3
2
|
interface Props {
|
|
4
3
|
class?: HTMLAttributes['class'];
|
|
5
4
|
horizontal?: boolean;
|
|
@@ -11,10 +10,12 @@ interface Props {
|
|
|
11
10
|
shadowRight?: boolean;
|
|
12
11
|
shadowTop?: boolean;
|
|
13
12
|
}
|
|
14
|
-
declare
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
declare const __VLS_template: () => {
|
|
14
|
+
__VLS_Slots: {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
};
|
|
17
17
|
};
|
|
18
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
18
19
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
20
|
scrollAt: (args_0: {
|
|
20
21
|
bottom: boolean;
|
|
@@ -46,5 +47,4 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
46
47
|
$slots: S;
|
|
47
48
|
};
|
|
48
49
|
};
|
|
49
|
-
//#endregion
|
|
50
50
|
export { _default as default };
|
|
@@ -4,7 +4,7 @@ import PButton from "pohon-ui/components/Button.vue";
|
|
|
4
4
|
import { isFunction, triggerWindowResize } from "@vinicunca/taman-core/utils";
|
|
5
5
|
import { useSimpleLocale } from "@vinicunca/taman-core/composables";
|
|
6
6
|
import PIcon from "pohon-ui/components/Icon.vue";
|
|
7
|
-
|
|
7
|
+
// src/form/components/form-actions.vue
|
|
8
8
|
const _hoisted_1 = ["aria-controls", "aria-expanded"];
|
|
9
9
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
10
10
|
__name: "form-actions",
|
|
@@ -147,5 +147,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
-
//#endregion
|
|
151
150
|
export { _sfc_main as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _sfc_main$1 from "../../components/render-content/render-content.mjs";
|
|
2
2
|
import _sfc_main$2 from "../../components/button/taman-button-icon.mjs";
|
|
3
3
|
import "../../index.mjs";
|
|
4
|
-
import { createArrayChildSchema } from "../form-render/form-render.schema.mjs";
|
|
5
|
-
import { injectRenderFormProps } from "../form-render/form-render.context.mjs";
|
|
6
4
|
import _sfc_main$3 from "../form-render/form-render-form-field.mjs";
|
|
5
|
+
import { injectRenderFormProps } from "../form-render/form-render.context.mjs";
|
|
6
|
+
import { createArrayChildSchema } from "../form-render/form-render.schema.mjs";
|
|
7
7
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
8
8
|
import PButton from "pohon-ui/components/Button.vue";
|
|
9
9
|
import { get, set } from "@vinicunca/taman-core/utils";
|
|
10
|
-
|
|
10
|
+
// src/form/components/form-field-array.vue
|
|
11
11
|
const _hoisted_1 = { class: "border border-border/70 rounded-md overflow-hidden" };
|
|
12
12
|
const _hoisted_2 = {
|
|
13
13
|
key: 0,
|
|
@@ -150,5 +150,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
//#endregion
|
|
154
153
|
export { _sfc_main as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FormCommonConfig, FormFieldSchema } from "../form.types.js";
|
|
2
|
-
//#region src/form/components/form-field-array.types.d.ts
|
|
3
2
|
export interface TamanFormFieldArrayProps {
|
|
4
3
|
actionText?: string;
|
|
5
4
|
addButtonText?: string;
|
|
@@ -13,5 +12,4 @@ export interface TamanFormFieldArrayProps {
|
|
|
13
12
|
name?: string;
|
|
14
13
|
schema?: Array<FormFieldSchema>;
|
|
15
14
|
showIndex?: boolean;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
15
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBlock, defineComponent, mergeModels, openBlock, renderSlot, useModel, withCtx } from "vue";
|
|
2
2
|
import PCollapsible from "pohon-ui/components/Collapsible.vue";
|
|
3
|
-
|
|
3
|
+
// src/form/form-render/form-render-field-collapsible.vue
|
|
4
4
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
5
5
|
inheritAttrs: false,
|
|
6
6
|
__name: "form-render-field-collapsible",
|
|
@@ -28,5 +28,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
//#endregion
|
|
32
31
|
export { _sfc_main as default };
|
|
@@ -2,7 +2,7 @@ import _sfc_main$1 from "../../components/render-content/render-content.mjs";
|
|
|
2
2
|
import _sfc_main$2 from "../../ui/form/form-control.mjs";
|
|
3
3
|
import "../../index.mjs";
|
|
4
4
|
import { createCommentVNode, createElementBlock, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
5
|
-
|
|
5
|
+
// src/form/form-render/form-render-field-control.vue
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "ml-1"
|
|
@@ -40,5 +40,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
//#endregion
|
|
44
43
|
export { _sfc_main as default };
|
|
@@ -18,7 +18,7 @@ import { computed, createBlock, createCommentVNode, createElementBlock, createEl
|
|
|
18
18
|
import PButton from "pohon-ui/components/Button.vue";
|
|
19
19
|
import { isFunction, isString } from "@vinicunca/taman-core/utils";
|
|
20
20
|
import { globalShareState } from "@vinicunca/taman-core/global-state";
|
|
21
|
-
|
|
21
|
+
// src/form/form-render/form-render-form-field.vue
|
|
22
22
|
const _hoisted_1 = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "flex items-center"
|
|
@@ -404,5 +404,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
|
-
//#endregion
|
|
408
407
|
export { _sfc_main as default };
|
|
@@ -5,7 +5,7 @@ import { createBlock, createCommentVNode, createVNode, defineComponent, normaliz
|
|
|
5
5
|
import PTooltip from "pohon-ui/components/Tooltip.vue";
|
|
6
6
|
import { useForwardExpose } from "@vinicunca/taman-core/composables";
|
|
7
7
|
import PIcon from "pohon-ui/components/Icon.vue";
|
|
8
|
-
|
|
8
|
+
// src/form/form-render/form-render-form-label.vue
|
|
9
9
|
const REQUIRED_CLASS = `after:content-['*'] after:color-error after:ml-0.5 after:order-1`;
|
|
10
10
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
11
11
|
__name: "form-render-form-label",
|
|
@@ -42,5 +42,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
//#endregion
|
|
46
45
|
export { _sfc_main as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createFormFieldSchema, getFormFieldSchemas, isFormGroupSchema } from "./form-render.schema.mjs";
|
|
2
|
-
import { provideFormRenderProps } from "./form-render.context.mjs";
|
|
3
|
-
import { getBaseRules, getDefaultValueInZodStack } from "./form-render.helper.mjs";
|
|
4
1
|
import _sfc_main$1 from "./form-render-form-field.mjs";
|
|
5
2
|
import _sfc_main$2 from "./form-render-group.mjs";
|
|
3
|
+
import { provideFormRenderProps } from "./form-render.context.mjs";
|
|
4
|
+
import { getBaseRules, getDefaultValueInZodStack } from "./form-render.helper.mjs";
|
|
5
|
+
import { createFormFieldSchema, getFormFieldSchemas, isFormGroupSchema } from "./form-render.schema.mjs";
|
|
6
6
|
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, reactive, renderList, renderSlot, resolveDynamicComponent, toRaw, toRefs, unref, useId, watch, withCtx } from "vue";
|
|
7
7
|
import { isString } from "@vinicunca/taman-core/utils";
|
|
8
|
-
|
|
8
|
+
// src/form/form-render/form-render-form.vue
|
|
9
9
|
const _hoisted_1 = ["id"];
|
|
10
10
|
const formComponent = "form";
|
|
11
11
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -159,5 +159,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
|
-
//#endregion
|
|
163
162
|
export { _sfc_main as default };
|
|
@@ -4,7 +4,7 @@ import { injectRenderFormProps } from "./form-render.context.mjs";
|
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderSlot, resolveDynamicComponent, unref, vShow, watch, withCtx, withDirectives } from "vue";
|
|
5
5
|
import PIcon from "pohon-ui/components/Icon.vue";
|
|
6
6
|
import PCollapsible from "pohon-ui/components/Collapsible.vue";
|
|
7
|
-
|
|
7
|
+
// src/form/form-render/form-render-group.vue
|
|
8
8
|
const _hoisted_1 = { class: "form-group-header mb-2 flex flex-1 gap-2 min-h-7 items-center" };
|
|
9
9
|
const _hoisted_2 = {
|
|
10
10
|
key: 0,
|
|
@@ -85,5 +85,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
//#endregion
|
|
89
88
|
export { _sfc_main as default };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createContext } from "../../index.mjs";
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/form/form-render/form-render.context.ts
|
|
4
4
|
const [injectRenderFormProps, provideFormRenderProps] = createContext("FormRenderProps");
|
|
5
5
|
function useFormContext() {
|
|
6
6
|
const formRenderProps = injectRenderFormProps();
|
|
7
7
|
return { componentMap: computed(() => formRenderProps.componentMap) };
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { injectRenderFormProps, provideFormRenderProps, useFormContext };
|
|
@@ -3,7 +3,7 @@ import { injectFormProps } from "../form.use-form-context.mjs";
|
|
|
3
3
|
import { injectRenderFormProps } from "./form-render.context.mjs";
|
|
4
4
|
import { computed, isRef, onScopeDispose, shallowRef, watch } from "vue";
|
|
5
5
|
import { clone, get, isDeepEqual } from "@vinicunca/taman-core/utils";
|
|
6
|
-
|
|
6
|
+
// src/form/form-render/form-render.dependencies.ts
|
|
7
7
|
/**
|
|
8
8
|
* Resolve the value of the nested objects corresponding to the field name
|
|
9
9
|
* @param values form values
|
|
@@ -97,5 +97,4 @@ function useDependencies(getDependencies, getSchemaContext = () => ({})) {
|
|
|
97
97
|
isShow: computed(() => dependencyState.value.isShow)
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
//#endregion
|
|
101
100
|
export { useDependencies as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toRaw } from "vue";
|
|
2
2
|
import { isString } from "@vinicunca/taman-core/utils";
|
|
3
3
|
import { ZodPipe } from "zod";
|
|
4
|
-
|
|
4
|
+
// src/form/form-render/form-render.helper.ts
|
|
5
5
|
/**
|
|
6
6
|
* Get the lowest level Zod type.
|
|
7
7
|
* This will unpack optionals, refinements, etc.
|
|
@@ -27,5 +27,4 @@ function getDefaultValueInZodStack(schema) {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { getBaseRules, getDefaultValueInZodStack };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveChildUpdateFieldName } from "../form.field-name.mjs";
|
|
2
2
|
import { get, isFunctionType, mergeWithArrayOverride } from "@vinicunca/taman-core/utils";
|
|
3
|
-
|
|
3
|
+
// src/form/form-render/form-render.schema.ts
|
|
4
4
|
function createSchemaContext(baseContext, values) {
|
|
5
5
|
const rootValues = values;
|
|
6
6
|
return {
|
|
@@ -205,5 +205,4 @@ function createArrayChildSchema(schema, options) {
|
|
|
205
205
|
globalCommonConfig: wrapCommonConfig(options.globalCommonConfig, baseContext)
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
//#endregion
|
|
209
208
|
export { createArrayChildSchema, createFormFieldSchema, getFormArraySchemaChildren, getFormFieldSchemas, isFormArraySchema, isFormGroupSchema, removeFormSchemaByFields, resolveArrayChildFieldName, updateFormSchemaList };
|
package/dist/form/form.api.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { FormActions, FormBaseComponentType, FormFieldName, FormFieldSchema, For
|
|
|
2
2
|
import { ComponentPublicInstance } from "vue";
|
|
3
3
|
import { StateHandler } from "@vinicunca/taman-core/utils";
|
|
4
4
|
import { Store } from "@vinicunca/taman-core/store";
|
|
5
|
-
//#region src/form/form.api.d.ts
|
|
6
5
|
type FormApiProps<TFormValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>, TSubmitValues extends FormValues> = TamanFormProps<T, P, TFormValues, TSubmitValues>;
|
|
7
6
|
type FormApiFieldSchema<TValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>> = FormFieldSchema<T, P, TValues>;
|
|
8
7
|
export declare class FormApi<TFormValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TFormValues> {
|
|
@@ -50,5 +49,4 @@ export declare class FormApi<TFormValues extends FormValues = FormValues, T exte
|
|
|
50
49
|
private submitValues;
|
|
51
50
|
private updateState;
|
|
52
51
|
}
|
|
53
|
-
//#endregion
|
|
54
52
|
export {};
|
package/dist/form/form.api.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { getFormFieldSchemas, removeFormSchemaByFields, updateFormSchemaList } from "./form-render/form-render.schema.mjs";
|
|
1
2
|
import { decodeFormValues, encodeFormValues } from "./form.codec.mjs";
|
|
2
3
|
import { resolveFieldNamePath } from "./form.field-name.mjs";
|
|
3
|
-
import { getFormFieldSchemas, removeFormSchemaByFields, updateFormSchemaList } from "./form-render/form-render.schema.mjs";
|
|
4
4
|
import { isRef, toRaw } from "vue";
|
|
5
5
|
import { StateHandler, bindMethods, clone, isFunction, isString, mergeWithArrayOverride } from "@vinicunca/taman-core/utils";
|
|
6
6
|
import { Store } from "@vinicunca/taman-core/store";
|
|
7
|
-
|
|
7
|
+
// src/form/form.api.ts
|
|
8
8
|
function cloneFormValues(value) {
|
|
9
9
|
if (Array.isArray(value)) return value.map((item) => cloneFormValues(item));
|
|
10
10
|
if (isPlainFormObject(value)) {
|
|
@@ -322,5 +322,4 @@ var FormApi = class {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
};
|
|
325
|
-
//#endregion
|
|
326
325
|
export { FormApi };
|
|
@@ -5,7 +5,6 @@ import "../index.js";
|
|
|
5
5
|
import { TamanFormFieldArrayProps } from "./components/form-field-array.types.js";
|
|
6
6
|
import { Component } from "vue";
|
|
7
7
|
import { CheckboxGroupProps, CheckboxProps, InputMenuProps, InputNumberProps, InputProps, InputRatingProps, InputTagsProps, InputTimeProps, PinInputProps, RadioGroupProps, SelectMenuProps, SelectProps, SeparatorProps, SliderProps, SwitchProps, TextareaProps } from "pohon-ui";
|
|
8
|
-
//#region src/form/form.built-ins.d.ts
|
|
9
8
|
export interface BuiltInFormComponentPropsMap {
|
|
10
9
|
Checkbox: CheckboxProps;
|
|
11
10
|
CheckboxGroup: CheckboxGroupProps;
|
|
@@ -31,5 +30,4 @@ export interface BuiltInFormComponentPropsMap {
|
|
|
31
30
|
Separator: SeparatorProps;
|
|
32
31
|
TamanFormFieldArray: TamanFormFieldArrayProps;
|
|
33
32
|
}
|
|
34
|
-
export type BuiltInFormComponentType = keyof BuiltInFormComponentPropsMap;
|
|
35
|
-
//#endregion
|
|
33
|
+
export type BuiltInFormComponentType = keyof BuiltInFormComponentPropsMap;
|
|
@@ -20,7 +20,7 @@ import PSelectMenu from "pohon-ui/components/SelectMenu.vue";
|
|
|
20
20
|
import PSlider from "pohon-ui/components/Slider.vue";
|
|
21
21
|
import PSwitch from "pohon-ui/components/Switch.vue";
|
|
22
22
|
import PTextarea from "pohon-ui/components/Textarea.vue";
|
|
23
|
-
|
|
23
|
+
// src/form/form.built-ins.ts
|
|
24
24
|
/** @keep-sorted */
|
|
25
25
|
const BUILT_IN_COMPONENT_MAP = {
|
|
26
26
|
Checkbox: PCheckbox,
|
|
@@ -45,5 +45,4 @@ const BUILT_IN_COMPONENT_MAP = {
|
|
|
45
45
|
TamanFormFieldArray: _sfc_main$4,
|
|
46
46
|
Textarea: PTextarea
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { BUILT_IN_COMPONENT_MAP };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FormCodec } from "./form.types.js";
|
|
2
2
|
import { CalendarDateCodecOptions, CalendarDateCodecOptions as CalendarDateCodecOptions$1 } from "@vinicunca/taman-core/utils";
|
|
3
|
-
//#region src/form/form.codec.d.ts
|
|
4
3
|
export type FormCodecPhase = 'decode' | 'encode';
|
|
5
4
|
export declare class FormCodecError extends Error {
|
|
6
5
|
readonly cause: unknown;
|
|
@@ -13,5 +12,4 @@ export declare function createCalendarDateTimeCodec(options?: CalendarDateCodecO
|
|
|
13
12
|
export declare const calendarDateCodec: FormCodec;
|
|
14
13
|
export declare const timeCodec: FormCodec;
|
|
15
14
|
export declare const calendarDateTimeCodec: FormCodec;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { type CalendarDateCodecOptions$1 as CalendarDateCodecOptions, createCalendarDateCodec$1 as createCalendarDateCodec, createTimeCodec$1 as createTimeCodec };
|
package/dist/form/form.codec.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCalendarDateCodec, createTimeCodec } from "@vinicunca/taman-core/utils";
|
|
2
|
-
|
|
2
|
+
// src/form/form.codec.ts
|
|
3
3
|
var FormCodecError = class extends Error {
|
|
4
4
|
cause;
|
|
5
5
|
phase;
|
|
@@ -41,5 +41,4 @@ function createCalendarDateTimeCodec(options) {
|
|
|
41
41
|
const calendarDateCodec = createCalendarDateCodec$1();
|
|
42
42
|
const timeCodec = createTimeCodec$1();
|
|
43
43
|
const calendarDateTimeCodec = createCalendarDateTimeCodec();
|
|
44
|
-
//#endregion
|
|
45
44
|
export { FormCodecError, calendarDateCodec, calendarDateTimeCodec, createCalendarDateCodec$1 as createCalendarDateCodec, createCalendarDateTimeCodec, createTimeCodec$1 as createTimeCodec, decodeFormValues, encodeFormValues, timeCodec };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { TamanFormAdapterOptions } from "./form.types.js";
|
|
2
2
|
import { Component } from "vue";
|
|
3
|
-
|
|
4
|
-
export declare function setupTamanForm(options: TamanFormAdapterOptions): void;
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare function setupTamanForm(options: TamanFormAdapterOptions): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerFormRules } from "./form.rule-registry.mjs";
|
|
2
1
|
import { BUILT_IN_COMPONENT_MAP } from "./form.built-ins.mjs";
|
|
2
|
+
import { registerFormRules } from "./form.rule-registry.mjs";
|
|
3
3
|
import { globalShareState } from "@vinicunca/taman-core/global-state";
|
|
4
|
-
|
|
4
|
+
// src/form/form.config.ts
|
|
5
5
|
const DEFAULT_FORM_COMMON_CONFIG = {};
|
|
6
6
|
const COMPONENT_MAP = { ...BUILT_IN_COMPONENT_MAP };
|
|
7
7
|
function replaceRecord(target, source) {
|
|
@@ -39,5 +39,4 @@ if (hot) {
|
|
|
39
39
|
if (resumed) setupTamanForm(resumed);
|
|
40
40
|
else rehydrateFormComponentMaps();
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { COMPONENT_MAP, DEFAULT_FORM_COMMON_CONFIG, getFormComponentMap, rehydrateFormComponentMaps, setupTamanForm };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { markRaw } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/form/form.empty-value.ts
|
|
3
3
|
/**
|
|
4
4
|
* perkakas `isEmpty` treats a File as empty because `Object.keys(file)` is [].
|
|
5
5
|
* Form required/selectRequired rules must not use that for upload values.
|
|
@@ -16,5 +16,4 @@ function toFormFieldValue(value) {
|
|
|
16
16
|
if (Array.isArray(value)) return value.map((item) => toFormFieldValue(item));
|
|
17
17
|
return value;
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { isEmptyFormValue, toFormFieldValue };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@vinicunca/taman-core/utils";
|
|
2
|
-
|
|
2
|
+
// src/form/form.field-name.ts
|
|
3
3
|
function resolveChildUpdateFieldName(parentFieldName, fieldName) {
|
|
4
4
|
if (fieldName.startsWith(`${parentFieldName}.`)) return fieldName.slice(parentFieldName.length + 1);
|
|
5
5
|
const indexedPrefix = `${parentFieldName}[`;
|
|
@@ -21,5 +21,4 @@ function resolveFieldNamePath(fieldName) {
|
|
|
21
21
|
rawKey: void 0
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { resolveChildUpdateFieldName, resolveFieldNamePath };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/form/form.rule-registry.ts
|
|
2
2
|
const FORM_RULES = /* @__PURE__ */ new Map();
|
|
3
3
|
function getFormRule(name) {
|
|
4
4
|
return FORM_RULES.get(name);
|
|
@@ -6,5 +6,4 @@ function getFormRule(name) {
|
|
|
6
6
|
function registerFormRules(rules) {
|
|
7
7
|
for (const [name, validator] of Object.entries(rules)) if (validator) FORM_RULES.set(name, validator);
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { getFormRule, registerFormRules };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, h, markRaw, onUnmounted } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/form/form.runtime-field.ts
|
|
3
3
|
function isAsyncStandardSchemaValidator(validator) {
|
|
4
4
|
return Boolean(validator && typeof validator === "object" && "~standard" in validator);
|
|
5
5
|
}
|
|
@@ -52,5 +52,4 @@ function createRuntimeFieldComponent(fieldComponent, registerInvalidator, onVali
|
|
|
52
52
|
}
|
|
53
53
|
}));
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { createRuntimeFieldComponent };
|
|
@@ -3,7 +3,7 @@ import { computed, shallowRef } from "vue";
|
|
|
3
3
|
import { mergeWithArrayOverride } from "@vinicunca/taman-core/utils";
|
|
4
4
|
import { batch } from "@tanstack/store";
|
|
5
5
|
import { defaultValidationLogic, useForm } from "@tanstack/vue-form";
|
|
6
|
-
|
|
6
|
+
// src/form/form.runtime.ts
|
|
7
7
|
function normalizeError(error) {
|
|
8
8
|
if (typeof error === "string") return error;
|
|
9
9
|
if (error && typeof error === "object" && "message" in error) {
|
|
@@ -231,5 +231,4 @@ function useFormRuntime(defaultValues) {
|
|
|
231
231
|
validateField
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
//#endregion
|
|
235
234
|
export { useFormRuntime };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toRaw } from "vue";
|
|
2
2
|
import { ZodIntersection, ZodNumber, ZodObject, ZodString, ZodStringFormat, object, string } from "zod";
|
|
3
3
|
import { getDefaultsForSchema } from "zod-defaults";
|
|
4
|
-
|
|
4
|
+
// src/form/form.schema-defaults.ts
|
|
5
5
|
function getCustomDefaultValue(rule) {
|
|
6
6
|
rule = toRaw(rule);
|
|
7
7
|
if (rule instanceof ZodString || rule instanceof ZodStringFormat) return "";
|
|
@@ -32,5 +32,4 @@ function normalizeSchemaForDefaults(rule) {
|
|
|
32
32
|
if (rawRule.constructor.name === "ZodPipe") return normalizeSchemaForDefaults(rawRule.in).pipe(rawRule.out);
|
|
33
33
|
return rawRule;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { getCustomDefaultValue, normalizeSchemaForDefaults };
|
|
@@ -5,7 +5,6 @@ import { ZodType } from "zod";
|
|
|
5
5
|
import { AnyFieldApi } from "@tanstack/vue-form";
|
|
6
6
|
import { MaybeComputedRef } from "@vinicunca/taman-core/typings";
|
|
7
7
|
import { ButtonProps } from "pohon-ui";
|
|
8
|
-
//#region src/form/form.types.d.ts
|
|
9
8
|
export type FormValues = Record<string, any>;
|
|
10
9
|
export type FormValuePatch<T> = T extends ((...args: Array<any>) => unknown) | Date | ReadonlyArray<unknown> ? T : T extends object ? { [K in keyof T]?: FormValuePatch<T[K]>; } : T;
|
|
11
10
|
export interface FormCodec<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> {
|
|
@@ -311,5 +310,4 @@ export interface FormRuleContext {
|
|
|
311
310
|
name: string;
|
|
312
311
|
}
|
|
313
312
|
export type FormRuleValidator = (value: any, params: any, context: FormRuleContext) => boolean | string;
|
|
314
|
-
//#endregion
|
|
315
313
|
export type { BuiltInFormComponentPropsMap, BuiltInFormComponentType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, onScopeDispose, ref, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/form/form.use-delayed-flag.ts
|
|
3
3
|
/**
|
|
4
4
|
* Mirrors `source`, but only flips to `true` once it has stayed truthy for
|
|
5
5
|
* `delayMs`. Falls back to `false` immediately.
|
|
@@ -31,5 +31,4 @@ function useDelayedFlag(source, delayMs) {
|
|
|
31
31
|
onScopeDispose(clear);
|
|
32
32
|
return computed(() => settled.value);
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { useDelayedFlag };
|
|
@@ -6,7 +6,7 @@ import { computed, toRaw, unref, useSlots } from "vue";
|
|
|
6
6
|
import { isString, mergeWithArrayOverride, set } from "@vinicunca/taman-core/utils";
|
|
7
7
|
import { object } from "zod";
|
|
8
8
|
import { getDefaultsForSchema } from "zod-defaults";
|
|
9
|
-
|
|
9
|
+
// src/form/form.use-form-context.ts
|
|
10
10
|
const [injectFormProps, provideFormProps] = createContext("TamanFormProps");
|
|
11
11
|
const [injectComponentRefMap, provideComponentRefMap] = createContext("ComponentRefMap");
|
|
12
12
|
function useFormInitial(props) {
|
|
@@ -40,5 +40,4 @@ function useFormInitial(props) {
|
|
|
40
40
|
form
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { injectComponentRefMap, injectFormProps, provideComponentRefMap, provideFormProps, useFormInitial };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ExtendedFormApi, FormBaseComponentType, FormValues, TamanFormComponent, TamanFormProps } from "./form.types.js";
|
|
2
|
-
//#region src/form/form.use-taman-form.d.ts
|
|
3
2
|
type UseTamanFormReturn<TValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>, TSubmitValues extends FormValues = TValues> = readonly [TamanFormComponent<TValues, T, P, TSubmitValues>, ExtendedFormApi<TValues, T, P, TSubmitValues>];
|
|
4
3
|
export declare function useTamanForm<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>>(options: TamanFormProps<T, P>): UseTamanFormReturn<FormValues, T, P>;
|
|
5
4
|
export declare function useTamanForm<TValues extends FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues>(options: TamanFormProps<T, P, TValues, TSubmitValues>): UseTamanFormReturn<TValues, T, P, TSubmitValues>;
|
|
6
|
-
//#endregion
|
|
7
5
|
export {};
|
|
@@ -2,7 +2,7 @@ import { FormApi } from "./form.api.mjs";
|
|
|
2
2
|
import _sfc_main from "./taman-use-form.mjs";
|
|
3
3
|
import { defineComponent, h, isReactive, onBeforeUnmount, watch } from "vue";
|
|
4
4
|
import { useSelector } from "@vinicunca/taman-core/store";
|
|
5
|
-
|
|
5
|
+
// src/form/form.use-taman-form.ts
|
|
6
6
|
function useTamanForm(options) {
|
|
7
7
|
const IS_REACTIVE = isReactive(options);
|
|
8
8
|
const api = new FormApi(options);
|
|
@@ -32,5 +32,4 @@ function useTamanForm(options) {
|
|
|
32
32
|
}, { immediate: true });
|
|
33
33
|
return [Form, extendedApi];
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { useTamanForm };
|
package/dist/form/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BuiltInFormComponentPropsMap, BuiltInFormComponentType } from "./form.built-ins.js";
|
|
2
|
-
import { ExtendedFormApi, FormActions, FormBaseComponentType, FormCodec, FormFieldSchema, FormGroupSchema, FormSchema, FormSchemaContext, FormValueSnapshot, FormValues, TamanFormActionSlotProps, TamanFormComponent, TamanFormDefaultSlotProps, TamanFormFieldArrayProps, TamanFormFieldSlotProps, TamanFormProps, TamanFormResolvedComponentProps, TamanFormSlots } from "./form.types.js";
|
|
3
2
|
import { CalendarDateCodecOptions, FormCodecError, FormCodecPhase, calendarDateCodec, calendarDateTimeCodec, createCalendarDateCodec, createCalendarDateTimeCodec, createTimeCodec, timeCodec } from "./form.codec.js";
|
|
4
3
|
import { setupTamanForm } from "./form.config.js";
|
|
5
4
|
import { isEmptyFormValue } from "./form.empty-value.js";
|
|
5
|
+
import { ExtendedFormApi, FormActions, FormBaseComponentType, FormCodec, FormFieldSchema, FormGroupSchema, FormSchema, FormSchemaContext, FormValueSnapshot, FormValues, TamanFormActionSlotProps, TamanFormComponent, TamanFormDefaultSlotProps, TamanFormFieldArrayProps, TamanFormFieldSlotProps, TamanFormProps, TamanFormResolvedComponentProps, TamanFormSlots } from "./form.types.js";
|
|
6
6
|
import { useTamanForm } from "./form.use-taman-form.js";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
export { type BuiltInFormComponentPropsMap, type BuiltInFormComponentType, type CalendarDateCodecOptions, type ExtendedFormApi, type FormActions, type FormBaseComponentType, type FormCodec, FormCodecError, type FormCodecPhase, type FormGroupSchema, type FormSchemaContext, type FormValueSnapshot, type FormValues, type TamanFormActionSlotProps, type TamanFormComponent, type TamanFormDefaultSlotProps, type TamanFormFieldArrayProps, type FormFieldSchema as TamanFormFieldSchema, type TamanFormFieldSlotProps, type FormGroupSchema as TamanFormGroupSchema, type TamanFormProps, type TamanFormResolvedComponentProps, type FormSchema as TamanFormSchema, type TamanFormSlots, calendarDateCodec, calendarDateTimeCodec, createCalendarDateCodec, createCalendarDateTimeCodec, createTimeCodec, isEmptyFormValue, setupTamanForm, timeCodec, useTamanForm, z };
|