v-nuxt-ui 0.1.1 → 0.1.3

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/module.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "dependencies": [
8
8
  "@nuxt/ui"
9
9
  ],
10
- "version": "0.1.1",
10
+ "version": "0.1.3",
11
11
  "builder": {
12
12
  "@nuxt/module-builder": "1.0.2",
13
13
  "unbuild": "unknown"
@@ -1,8 +1,9 @@
1
1
  import type { RequestResult } from '#v/types';
2
+ import type { Ref } from 'vue';
2
3
  type __VLS_Props = {
3
4
  ids: number[];
4
5
  onDelete: ((ids: number[]) => Promise<{
5
- data: globalThis.Ref<RequestResult<any>>;
6
+ data: Ref<RequestResult<any>>;
6
7
  }> | undefined) | undefined | null;
7
8
  };
8
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1,8 +1,9 @@
1
1
  import type { RequestResult } from '#v/types';
2
+ import type { Ref } from 'vue';
2
3
  type __VLS_Props = {
3
4
  ids: number[];
4
5
  onDelete: ((ids: number[]) => Promise<{
5
- data: globalThis.Ref<RequestResult<any>>;
6
+ data: Ref<RequestResult<any>>;
6
7
  }> | undefined) | undefined | null;
7
8
  };
8
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
2
  import { isEmptyString, getColSpanClassFromResponsive } from "#v/utils";
3
+ import { useTemplateRef, computed } from "vue";
3
4
  import FormField from "./field/index.vue";
4
5
  import * as z from "zod";
5
6
  const props = defineProps({
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { ref, computed } from "vue";
2
3
  defineProps({
3
4
  collapsed: { type: Boolean, required: false }
4
5
  });
@@ -2,6 +2,7 @@
2
2
  import { useAuth, useApp } from "#v/composables";
3
3
  import { useRoute } from "vue-router";
4
4
  import { getEmojiFlag } from "#v/utils";
5
+ import { computed } from "vue";
5
6
  defineProps({
6
7
  collapsed: { type: Boolean, required: false },
7
8
  headerMode: { type: Boolean, required: false }
@@ -10,6 +10,7 @@ import LayoutModuleMenu from "#v/components/layout/ModuleMenu.vue";
10
10
  import LayoutThemePicker from "#v/components/layout/ThemePicker.vue";
11
11
  import LayoutUserMenu from "#v/components/layout/UserMenu.vue";
12
12
  import Watermark from "#v/components/Watermark.vue";
13
+ import { ref, watch } from "vue";
13
14
  const open = ref(false);
14
15
  const app = useApp();
15
16
  const loginUser = useAuth().loginUser;
@@ -1 +1 @@
1
- export declare const useFlowApi: any;
1
+ export declare const useFlowApi: () => import("../../../types/index.js").ApiGroup<Model.Flow>;
@@ -1 +1,3 @@
1
+ import { createSharedComposable } from "@vueuse/core";
2
+ import { useApi } from "../useApi.js";
1
3
  export const useFlowApi = createSharedComposable(() => useApi("/flows"));
@@ -1 +1 @@
1
- export declare const useFlowNodeApi: any;
1
+ export declare const useFlowNodeApi: () => import("../../../types/index.js").ApiGroup<Model.FlowNode>;
@@ -1 +1,3 @@
1
+ import { createSharedComposable } from "@vueuse/core";
2
+ import { useApi } from "../useApi.js";
1
3
  export const useFlowNodeApi = createSharedComposable(() => useApi("/flows/nodes"));
@@ -1 +1 @@
1
- export declare const useFlowNodeLinkApi: any;
1
+ export declare const useFlowNodeLinkApi: () => import("../../../types/index.js").ApiGroup<Model.FlowNodeLink>;
@@ -1 +1,3 @@
1
+ import { createSharedComposable } from "@vueuse/core";
2
+ import { useApi } from "../useApi.js";
1
3
  export const useFlowNodeLinkApi = createSharedComposable(() => useApi("/flows/nodes/links"));
@@ -2,11 +2,11 @@ import type { UseFetchOptions } from 'nuxt/app';
2
2
  import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
3
3
  export declare const useAuth: () => {
4
4
  loginLoading: import("vue").Ref<boolean, boolean>;
5
- isLoggedIn: any;
6
- isUserInfoFetched: any;
7
- loginUser: any;
8
- loginUserRoles: any;
9
- loginUserMenus: any;
5
+ isLoggedIn: import("vue").ComputedRef<boolean>;
6
+ isUserInfoFetched: import("vue").ComputedRef<any>;
7
+ loginUser: import("vue").Ref<any, any>;
8
+ loginUserRoles: import("vue").Ref<any, any>;
9
+ loginUserMenus: import("vue").Ref<any, any>;
10
10
  logout: (route: RouteLocationNormalizedLoadedGeneric) => Promise<void>;
11
11
  loginByUsernameAndPassword: (route: RouteLocationNormalizedLoadedGeneric, payload: Cmd.UsernamePasswordLoginPayload, redirect?: boolean) => Promise<void>;
12
12
  initUserInfo: () => Promise<boolean>;
@@ -3,6 +3,7 @@ import { isEmptyString } from "#v/utils";
3
3
  import { useLocalStorage, createSharedComposable } from "@vueuse/core";
4
4
  import { useAuthApi, useLoading, useLoginApi, useRouterPush } from "./index.js";
5
5
  import { useToast } from "@nuxt/ui/runtime/composables/useToast.js";
6
+ import { computed, ref } from "vue";
6
7
  const _useAuth = () => {
7
8
  const { loading: loginLoading, startLoading: startLoginLoading, endLoading: endLoginLoading } = useLoading();
8
9
  const { toLogin, redirectFromLogin, toSecuritySettings } = useRouterPush();
@@ -1,5 +1,6 @@
1
1
  import { createSharedComposable } from "@vueuse/core";
2
2
  import { useAuth } from "./useAuth.js";
3
+ import { ref, watch } from "vue";
3
4
  export const _usePermission = () => {
4
5
  const { loginUserRoles, loginUserMenus } = useAuth();
5
6
  const permissions = ref(/* @__PURE__ */ new Set());
@@ -1,36 +0,0 @@
1
- import type { BreadcrumbItem, NavigationMenuItem } from '@nuxt/ui';
2
- export declare function setGlobalSidebarMenus(opts: {
3
- constantMenus?: NavigationMenuItem[];
4
- bizMenus?: NavigationMenuItem[];
5
- menuMode?: 'static' | 'dynamic';
6
- }): void;
7
- export declare const _useSidebarMenus: () => {
8
- constantMenus: any;
9
- constantMenuPathSet: any;
10
- bizMenus: any;
11
- flattenBizMenus: any;
12
- bizMenuPathSet: any;
13
- menusFromUser: any;
14
- sidebarMenus: any;
15
- sidebarMenuPathSet: any;
16
- expandSidebarMenu: (path: string) => void;
17
- setUserDynamicMenus: (newRolesFromUser: Model.Role[], newMenusFromUser: Model.Menu[]) => void;
18
- disabledMenuPathSet: any;
19
- breadcrumbs: any;
20
- getBreadcrumbs: (current: string, menus?: NavigationMenuItem[]) => BreadcrumbItem[];
21
- };
22
- export declare const useSidebarMenus: () => {
23
- constantMenus: any;
24
- constantMenuPathSet: any;
25
- bizMenus: any;
26
- flattenBizMenus: any;
27
- bizMenuPathSet: any;
28
- menusFromUser: any;
29
- sidebarMenus: any;
30
- sidebarMenuPathSet: any;
31
- expandSidebarMenu: (path: string) => void;
32
- setUserDynamicMenus: (newRolesFromUser: Model.Role[], newMenusFromUser: Model.Menu[]) => void;
33
- disabledMenuPathSet: any;
34
- breadcrumbs: any;
35
- getBreadcrumbs: (current: string, menus?: NavigationMenuItem[]) => BreadcrumbItem[];
36
- };
@@ -1,6 +1,7 @@
1
1
  import { flattenTree } from "#v/utils";
2
2
  import { createSharedComposable } from "@vueuse/core";
3
3
  import { useAuth } from "./useAuth.js";
4
+ import { ref, computed, watch } from "vue";
4
5
  const constantMenus = ref([]);
5
6
  const bizMenus = ref([]);
6
7
  const menuMode = ref("static");
@@ -1,3 +1,3 @@
1
- import type { UseFetchOptions } from '#app';
2
1
  import type { ShowType } from '#v/types';
2
+ import type { UseFetchOptions } from 'nuxt/app';
3
3
  export declare function showTypeHeader(showType: ShowType): UseFetchOptions<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-nuxt-ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Veken UI Component Library - Reusable Nuxt UI components, composables, and utilities for enterprise applications",
5
5
  "type": "module",
6
6
  "style": "./dist/runtime/index.css",
@@ -9,6 +9,9 @@
9
9
  "types": "./dist/types.d.mts",
10
10
  "style": "./dist/runtime/index.css",
11
11
  "import": "./dist/module.mjs"
12
+ },
13
+ "./types": {
14
+ "types": "./dist/runtime/types/index.d.ts"
12
15
  }
13
16
  },
14
17
  "main": "./dist/module.mjs",