v-nuxt-ui 0.1.11 → 0.1.14

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,9 +7,9 @@
7
7
  "dependencies": [
8
8
  "@nuxt/ui"
9
9
  ],
10
- "version": "0.1.11",
10
+ "version": "0.1.14",
11
11
  "builder": {
12
12
  "@nuxt/module-builder": "1.0.2",
13
- "unbuild": "unknown"
13
+ "unbuild": "3.6.1"
14
14
  }
15
15
  }
package/dist/module.mjs CHANGED
@@ -22,6 +22,7 @@ const module$1 = defineNuxtModule({
22
22
  });
23
23
  addImportsDir(resolve("./runtime/composables"));
24
24
  addImportsDir(resolve("./runtime/composables/api"));
25
+ addImportsDir(resolve("./runtime/composables/api/sys"));
25
26
  addImportsDir(resolve("./runtime/composables/flow"));
26
27
  addImportsDir(resolve("./runtime/composables/table"));
27
28
  addImportsDir(resolve("./runtime/utils"));
@@ -31,7 +32,6 @@ const module$1 = defineNuxtModule({
31
32
  addPlugin(resolve("./runtime/plugins/02.dayjs"));
32
33
  addPlugin(resolve("./runtime/plugins/03.theme"));
33
34
  addPlugin(resolve("./runtime/plugins/04.head"));
34
- addPlugin(resolve("./runtime/plugins/05.api"));
35
35
  nuxt.options.vite ??= {};
36
36
  nuxt.options.vite.optimizeDeps ??= {};
37
37
  nuxt.options.vite.optimizeDeps.include ??= [];
@@ -1,25 +1,25 @@
1
1
  import type { TableColumn } from '@nuxt/ui';
2
2
  import type { FixType } from './index.vue.js';
3
- import type { DndProps } from '#v/types';
3
+ import type { Column, DndProps } from '#v/types';
4
4
  declare const __VLS_export: <T>(__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<{
5
5
  props: import("vue").PublicProps & __VLS_PrettifyLocal<({
6
6
  name: string;
7
7
  rawBizColumns: TableColumn<T>[];
8
8
  group: DndProps<T>["group"];
9
9
  handle: DndProps<T>["handle"];
10
- onFixCol: (col: LocalStorage.Column, fixType: FixType) => void;
10
+ onFixCol: (col: Column, fixType: FixType) => void;
11
11
  onAfterDrag?: () => void;
12
12
  } & {
13
- list: LocalStorage.Column[];
13
+ list: Column[];
14
14
  }) & {
15
- "onUpdate:list"?: ((value: LocalStorage.Column[]) => any) | undefined;
15
+ "onUpdate:list"?: ((value: Column[]) => any) | undefined;
16
16
  }> & (typeof globalThis extends {
17
17
  __VLS_PROPS_FALLBACK: infer P;
18
18
  } ? P : {});
19
19
  expose: (exposed: {}) => void;
20
20
  attrs: any;
21
21
  slots: {};
22
- emit: (event: "update:list", value: LocalStorage.Column[]) => void;
22
+ emit: (event: "update:list", value: Column[]) => void;
23
23
  }>) => import("vue").VNode & {
24
24
  __ctx?: Awaited<typeof __VLS_setup>;
25
25
  };
@@ -1,25 +1,25 @@
1
1
  import type { TableColumn } from '@nuxt/ui';
2
2
  import type { FixType } from './index.vue.js';
3
- import type { DndProps } from '#v/types';
3
+ import type { Column, DndProps } from '#v/types';
4
4
  declare const __VLS_export: <T>(__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<{
5
5
  props: import("vue").PublicProps & __VLS_PrettifyLocal<({
6
6
  name: string;
7
7
  rawBizColumns: TableColumn<T>[];
8
8
  group: DndProps<T>["group"];
9
9
  handle: DndProps<T>["handle"];
10
- onFixCol: (col: LocalStorage.Column, fixType: FixType) => void;
10
+ onFixCol: (col: Column, fixType: FixType) => void;
11
11
  onAfterDrag?: () => void;
12
12
  } & {
13
- list: LocalStorage.Column[];
13
+ list: Column[];
14
14
  }) & {
15
- "onUpdate:list"?: ((value: LocalStorage.Column[]) => any) | undefined;
15
+ "onUpdate:list"?: ((value: Column[]) => any) | undefined;
16
16
  }> & (typeof globalThis extends {
17
17
  __VLS_PROPS_FALLBACK: infer P;
18
18
  } ? P : {});
19
19
  expose: (exposed: {}) => void;
20
20
  attrs: any;
21
21
  slots: {};
22
- emit: (event: "update:list", value: LocalStorage.Column[]) => void;
22
+ emit: (event: "update:list", value: Column[]) => void;
23
23
  }>) => import("vue").VNode & {
24
24
  __ctx?: Awaited<typeof __VLS_setup>;
25
25
  };
@@ -1,9 +1,9 @@
1
1
  import type { FixType } from './index.vue.js';
2
- import type { VColumn } from '#v/types';
2
+ import type { Column, VColumn } from '#v/types';
3
3
  type __VLS_Props = {
4
4
  columns: VColumn<any>[];
5
- stgCol: LocalStorage.Column;
6
- onFixCol: (col: LocalStorage.Column, fixType: FixType) => void;
5
+ stgCol: Column;
6
+ onFixCol: (col: Column, fixType: FixType) => void;
7
7
  };
8
8
  type __VLS_ModelProps = {
9
9
  'checked': boolean | undefined;
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  defineProps({
3
3
  columns: { type: Array, required: true },
4
- stgCol: { type: null, required: true },
4
+ stgCol: { type: Object, required: true },
5
5
  onFixCol: { type: Function, required: true }
6
6
  });
7
7
  const checked = defineModel("checked", { type: Boolean, skipCheck: true, ...{ required: true } });
@@ -1,9 +1,9 @@
1
1
  import type { FixType } from './index.vue.js';
2
- import type { VColumn } from '#v/types';
2
+ import type { Column, VColumn } from '#v/types';
3
3
  type __VLS_Props = {
4
4
  columns: VColumn<any>[];
5
- stgCol: LocalStorage.Column;
6
- onFixCol: (col: LocalStorage.Column, fixType: FixType) => void;
5
+ stgCol: Column;
6
+ onFixCol: (col: Column, fixType: FixType) => void;
7
7
  };
8
8
  type __VLS_ModelProps = {
9
9
  'checked': boolean | undefined;
@@ -0,0 +1 @@
1
+ export * from './useFlowStyles.js';
@@ -0,0 +1 @@
1
+ export * from "./useFlowStyles.js";
@@ -1,5 +1,5 @@
1
1
  export * from "./api/index.js";
2
- export * from "./flow";
2
+ export * from "./flow/index.js";
3
3
  export * from "./table/index.js";
4
4
  export * from "./useApp.js";
5
5
  export * from "./useBoolean.js";
@@ -1,6 +1,6 @@
1
1
  import { type Ref, type ComputedRef } from 'vue';
2
2
  import type { ColumnPinningState } from '@tanstack/table-core';
3
- import type { VColumn, OrderQuery } from '#v/types';
3
+ import type { VColumn, OrderQuery, TableSettings, Column } from '#v/types';
4
4
  interface UseTableColumnsReturn<T> {
5
5
  selectionColumn: VColumn<T>;
6
6
  expandColumn: VColumn<T>;
@@ -15,8 +15,8 @@ interface UseTableColumnsReturn<T> {
15
15
  export declare function useTableColumns<T>(props: {
16
16
  bizColumns: VColumn<T>[];
17
17
  commonColumnProps?: any;
18
- localStgSettings: Ref<LocalStorage.TableSettings<T>>;
19
- initStorageColumns: ComputedRef<LocalStorage.Column[]>;
18
+ localStgSettings: Ref<TableSettings<T>>;
19
+ initStorageColumns: ComputedRef<Column[]>;
20
20
  orderQuery: ComputedRef<OrderQuery<T>>;
21
21
  orderQueryInitValues: ComputedRef<OrderQuery<T>>;
22
22
  onUpdateOrderQuery: (query: OrderQuery<T>) => void;
@@ -1,7 +1,7 @@
1
1
  import { type Ref } from 'vue';
2
2
  import type { DropdownMenuItem } from '@nuxt/ui';
3
- import type { Pagination } from '#v/types';
4
- export declare function useTablePagination(localStgSettings: Ref<LocalStorage.TableSettings<any>>): {
3
+ import type { Pagination, TableSettings } from '#v/types';
4
+ export declare function useTablePagination(localStgSettings: Ref<TableSettings<any>>): {
5
5
  pagination: Ref<Pagination, Pagination>;
6
6
  pageSizeDropdownMenuItems: import("vue").ComputedRef<DropdownMenuItem[]>;
7
7
  };
@@ -1,4 +1,4 @@
1
- import type { OrderQueryOption, WhereQueryOption, VColumn, OrderQuery, WhereQuery, WhereQueryItem, WhereQueryItemGroup } from '#v/types';
1
+ import type { OrderQueryOption, WhereQueryOption, VColumn, OrderQuery, WhereQuery, WhereQueryItem, WhereQueryItemGroup, Column, TableSettings } from '#v/types';
2
2
  export declare function useTableQuery<T>(props: {
3
3
  name: string;
4
4
  bizColumns: VColumn<T>[];
@@ -10,8 +10,8 @@ export declare function useTableQuery<T>(props: {
10
10
  whereQueryInitValues: import("vue").ComputedRef<WhereQuery<T>>;
11
11
  orderQueryOptions: import("vue").ComputedRef<OrderQueryOption<T>[]>;
12
12
  orderQueryInitValues: import("vue").ComputedRef<OrderQuery<T>>;
13
- initStorageColumns: import("vue").ComputedRef<LocalStorage.Column[]>;
14
- localStgSettings: import("@vueuse/core").RemovableRef<LocalStorage.TableSettings<T>>;
13
+ initStorageColumns: import("vue").ComputedRef<Column[]>;
14
+ localStgSettings: import("@vueuse/core").RemovableRef<TableSettings<T>>;
15
15
  whereQuery: import("vue").WritableComputedRef<WhereQuery<T> | undefined, WhereQuery<T> | undefined>;
16
16
  whereQueryOpen: import("vue").WritableComputedRef<boolean, boolean>;
17
17
  orderQuery: import("vue").WritableComputedRef<OrderQuery<T>, OrderQuery<T>>;
@@ -1,10 +1,10 @@
1
1
  import type { BadgeProps } from '@nuxt/ui';
2
2
  export * from './cmds/index.js';
3
3
  export * from './models/index.js';
4
+ export * from './components/index.js';
4
5
  export * from './app.js';
5
6
  export * from './locale.js';
6
7
  export * from './request.js';
7
- export * from './components/index.js';
8
8
  export * from './query.js';
9
9
  export * from './storage.js';
10
10
  export type Size = import('@nuxt/ui').ButtonProps['size'];
@@ -1,8 +1,8 @@
1
1
  export * from "./cmds/index.js";
2
2
  export * from "./models/index.js";
3
+ export * from "./components/index.js";
3
4
  export * from "./app.js";
4
5
  export * from "./locale.js";
5
6
  export * from "./request.js";
6
- export * from "./components/index.js";
7
7
  export * from "./query.js";
8
8
  export * from "./storage.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-nuxt-ui",
3
- "version": "0.1.11",
3
+ "version": "0.1.14",
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",
@@ -84,14 +84,19 @@
84
84
  "echarts": "^6.0.0",
85
85
  "eslint": "^9.39.3",
86
86
  "exceljs": "^4.4.0",
87
+ "fflate": "^0.8.2",
88
+ "json5": "^2.2.3",
87
89
  "monaco-editor": "^0.55.1",
88
90
  "nuxt": "^4.3.1",
91
+ "ohash": "^2.0.11",
89
92
  "reka-ui": "^2.9.2",
93
+ "scule": "^1.3.0",
90
94
  "shiki": "^3.23.0",
91
95
  "sql-formatter": "^15.7.2",
92
96
  "sortablejs": "^1.15.7",
93
97
  "tailwindcss": "^4.2.2",
94
98
  "typescript": "^5.9.3",
99
+ "unbuild": "^3.6.1",
95
100
  "vue": "^3.5.0",
96
101
  "vue-draggable-plus": "^0.6.1",
97
102
  "vue-echarts": "^8.0.1",
@@ -102,6 +107,7 @@
102
107
  "pnpm": {
103
108
  "onlyBuiltDependencies": [
104
109
  "@parcel/watcher",
110
+ "better-sqlite3",
105
111
  "esbuild",
106
112
  "unrs-resolver",
107
113
  "vue-demi"
@@ -1,6 +0,0 @@
1
- declare const _default: import("nuxt/app").Plugin<{
2
- api: import("nitropack/types").$Fetch<unknown, import("nitropack/types").NitroFetchRequest>;
3
- }> & import("nuxt/app").ObjectPlugin<{
4
- api: import("nitropack/types").$Fetch<unknown, import("nitropack/types").NitroFetchRequest>;
5
- }>;
6
- export default _default;
@@ -1,157 +0,0 @@
1
- import { useAuth } from "#v/composables";
2
- import { StorageKey, ErrorCode, noErrorMsgCodes, ShowType } from "#v/types";
3
- import { useToast } from "@nuxt/ui/runtime/composables/useToast.js";
4
- import { useLocalStorage } from "@vueuse/core";
5
- import { defineNuxtPlugin, useFetch } from "nuxt/app";
6
- import { useRoute } from "vue-router";
7
- function handleRequestResult(data, error) {
8
- if (error) {
9
- const fail = {
10
- error,
11
- data: null
12
- };
13
- return fail;
14
- }
15
- const success = {
16
- error: null,
17
- data
18
- };
19
- return success;
20
- }
21
- export default defineNuxtPlugin(() => {
22
- const toast = useToast();
23
- const route = useRoute();
24
- const api = $fetch.create({
25
- baseURL: "/api/v1",
26
- onRequest({ options }) {
27
- const token = useLocalStorage(StorageKey.ACCESS_TOKEN, "");
28
- const Authorization = token.value ? `Bearer ${token.value}` : "";
29
- options.headers.set("Authorization", Authorization);
30
- },
31
- onRequestError: async ({ error }) => {
32
- toast.add({
33
- title: "\u8BF7\u6C42\u9519\u8BEF",
34
- description: error.message,
35
- color: "error"
36
- });
37
- },
38
- onResponse: async ({ response, options }) => {
39
- const { status } = response;
40
- if (status === 200 || status < 300 || status === 304) {
41
- if (options.responseType === "blob") {
42
- response._data = response.blob();
43
- return;
44
- }
45
- if (response._data.code === ErrorCode.FIELD_VALIDATION_ERROR_CODE) {
46
- const errors = response._data.data;
47
- toast.add({
48
- title: "\u5B57\u6BB5\u6821\u9A8C\u9519\u8BEF",
49
- description: errors.map((err) => err.errorMsg).join("\n"),
50
- color: "error"
51
- });
52
- } else if (noErrorMsgCodes.includes(response._data.code)) {
53
- console.error(response._data.message);
54
- } else {
55
- switch (response._data.showType) {
56
- case ShowType.Silent:
57
- break;
58
- case ShowType.SuccessMessage:
59
- toast.add({
60
- title: "\u6210\u529F",
61
- description: response._data.message,
62
- color: "success"
63
- });
64
- break;
65
- case ShowType.InfoMessage:
66
- toast.add({
67
- title: "\u4FE1\u606F",
68
- description: response._data.message,
69
- color: "info"
70
- });
71
- break;
72
- case ShowType.WarnMessage:
73
- toast.add({
74
- title: "\u8B66\u544A",
75
- description: response._data.message,
76
- color: "warning"
77
- });
78
- break;
79
- case ShowType.ErrorMessage:
80
- toast.add({
81
- title: "\u9519\u8BEF",
82
- description: response._data.message,
83
- color: "error"
84
- });
85
- break;
86
- case ShowType.SuccessNotification:
87
- toast.add({
88
- title: "\u6210\u529F",
89
- description: response._data.message,
90
- color: "success"
91
- });
92
- break;
93
- case ShowType.InfoNotification:
94
- toast.add({
95
- title: "\u4FE1\u606F",
96
- description: response._data.message,
97
- color: "info"
98
- });
99
- break;
100
- case ShowType.WarnNotification:
101
- toast.add({
102
- title: "\u8B66\u544A",
103
- description: response._data.message,
104
- color: "warning"
105
- });
106
- break;
107
- case ShowType.ErrorNotification:
108
- toast.add({
109
- title: "\u9519\u8BEF",
110
- description: response._data.message,
111
- color: "error"
112
- });
113
- break;
114
- default:
115
- toast.add({
116
- title: "\u63D0\u793A",
117
- description: response._data.message,
118
- color: "info"
119
- });
120
- }
121
- }
122
- if (response._data.success) {
123
- response._data = handleRequestResult(response._data.data, null);
124
- return;
125
- }
126
- if (response._data.code === ErrorCode.ACCESS_TOKEN_ERROR_CODE) {
127
- const newOptions = await useAuth().refreshToken(route, options);
128
- if (newOptions) {
129
- const { data: refetchedData } = await useFetch(response.url, newOptions);
130
- response._data = refetchedData.value;
131
- return;
132
- }
133
- }
134
- response._data = handleRequestResult(null, new Error(response._data.message));
135
- } else if (status === 500) {
136
- toast.add({
137
- title: "\u9519\u8BEF",
138
- description: "\u670D\u52A1\u5668\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",
139
- color: "error"
140
- });
141
- response._data = handleRequestResult(null, new Error(response.statusText));
142
- } else {
143
- toast.add({
144
- title: "\u9519\u8BEF",
145
- description: response.statusText,
146
- color: "error"
147
- });
148
- response._data = handleRequestResult(null, new Error(response.statusText));
149
- }
150
- }
151
- });
152
- return {
153
- provide: {
154
- api
155
- }
156
- };
157
- });