guava-ui 0.0.9 → 0.1.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.
@@ -0,0 +1,229 @@
1
+ import { App } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { Composer } from '../vue-i18n/dist/vue-i18n.cjs.js';
5
+ import { CSSProperties } from 'vue';
6
+ import { DefineComponent } from 'vue';
7
+ import { ExtractPropTypes } from 'vue';
8
+ import { JSX } from 'vue/jsx-runtime';
9
+ import { Pinia } from 'pinia';
10
+ import { PublicProps } from 'vue';
11
+ import { ValidatorFunction } from 'vue-types/dist/types';
12
+ import { VueTypesInterface } from 'vue-types';
13
+ import { VueTypeValidableDef } from 'vue-types';
14
+
15
+ declare type __VLS_Props = {
16
+ iconType?: string;
17
+ iconName: string;
18
+ className?: string;
19
+ size?: string;
20
+ };
21
+
22
+ export declare const decrypt: (word: string) => any;
23
+
24
+ export declare const eachTree: (treeDatas: any[], callBack: Fn, parentNode?: {}) => void;
25
+
26
+ export declare const encrypt: (word: any) => string;
27
+
28
+ export declare const filter: <T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>) => T[];
29
+
30
+ export declare const findNode: <T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>) => T | null;
31
+
32
+ export declare const findNodeAll: <T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>) => T[];
33
+
34
+ export declare const findPath: <T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>) => T | T[] | null;
35
+
36
+ export declare const findPathAll: (tree: any, func: Fn, config?: Partial<TreeHelperConfig>) => any[];
37
+
38
+ export declare const forEach: <T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>) => void;
39
+
40
+ export declare const generateKey: (num: number) => string;
41
+
42
+ export declare const getDomCssProp: (prop: string, dom?: HTMLElement) => string;
43
+
44
+ export declare const GuavaUI: {
45
+ install: (app: App, options: GuavaUIOptions) => void;
46
+ };
47
+
48
+ export declare type GuavaUIOptions = {
49
+ store: Pinia;
50
+ i18n: Composer;
51
+ };
52
+
53
+ export declare const GvBacktop: {
54
+ install(app: App): void;
55
+ };
56
+
57
+ export declare const GvBreadCrumb: DefineComponent< {}, () => JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
58
+
59
+ export declare const GvButton: DefineComponent<ExtractPropTypes< {
60
+ message: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ request: boolean;
64
+ };
65
+ }>, () => any, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("click" | "submit")[], "click" | "submit", PublicProps, Readonly<ExtractPropTypes< {
66
+ message: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ request: boolean;
70
+ };
71
+ }>> & Readonly<{
72
+ onClick?: ((...args: any[]) => any) | undefined;
73
+ onSubmit?: ((...args: any[]) => any) | undefined;
74
+ }>, {
75
+ message: string;
76
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
77
+
78
+ export declare const GvExpandMenu: {
79
+ install(app: App): void;
80
+ };
81
+
82
+ export declare const GvHamburger: {
83
+ install(app: App): void;
84
+ };
85
+
86
+ export declare const GvIcon: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
87
+ iconType: string;
88
+ className: string;
89
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
90
+
91
+ export declare const GvLangSelect: DefineComponent<ExtractPropTypes< {
92
+ className: VueTypeValidableDef<string, ValidatorFunction<string>> & {
93
+ default: string;
94
+ } & {
95
+ default: string;
96
+ };
97
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
98
+ className: VueTypeValidableDef<string, ValidatorFunction<string>> & {
99
+ default: string;
100
+ } & {
101
+ default: string;
102
+ };
103
+ }>> & Readonly<{}>, {
104
+ className: string;
105
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
106
+
107
+ export declare const GvScreenFull: {
108
+ install(app: App): void;
109
+ };
110
+
111
+ export declare const GvSidebar: {
112
+ install(app: App): void;
113
+ };
114
+
115
+ export declare const GvSidebarLogo: {
116
+ install(app: App): void;
117
+ };
118
+
119
+ export declare const GvTagsView: {
120
+ install(app: App): void;
121
+ };
122
+
123
+ export declare const GvTheme: {
124
+ install(app: App): void;
125
+ };
126
+
127
+ export declare const install: (app: App, options: GuavaUIOptions) => void;
128
+
129
+ export declare const is: (val: unknown, type: string) => boolean;
130
+
131
+ export declare const isArray: (val: any) => val is any[];
132
+
133
+ export declare const isBoolean: (val: unknown) => val is boolean;
134
+
135
+ export declare const isDark: () => boolean;
136
+
137
+ export declare const isDate: (val: unknown) => val is Date;
138
+
139
+ export declare const isElement: (val: unknown) => val is Element;
140
+
141
+ export declare const isEmpty: <T = unknown>(val: T) => val is T;
142
+
143
+ export declare const isError: (e: unknown) => e is Error;
144
+
145
+ export declare const isExternal: (path: string) => boolean;
146
+
147
+ export declare const isFunction: (val: unknown) => val is (...args: any[]) => any;
148
+
149
+ export declare const isImgPath: (path: string) => boolean;
150
+
151
+ export declare const isMap: (val: unknown) => val is Map<any, any>;
152
+
153
+ export declare const isNull: (val: unknown) => val is null;
154
+
155
+ export declare const isNumber: (val: unknown) => val is number;
156
+
157
+ export declare const isObject: (val: any) => val is Record<any, any>;
158
+
159
+ export declare const isString: (val: unknown) => val is string;
160
+
161
+ export declare const isUrl: (path: string) => boolean;
162
+
163
+ export declare const joinIcon: (icon: any) => string;
164
+
165
+ export declare const key = "abcdefgabcdefg12";
166
+
167
+ export declare const listToTree: <T = any>(list: any[], config?: Partial<TreeHelperConfig>) => T[];
168
+
169
+ declare const newPropTypes: PropTypes;
170
+
171
+ export declare const pathResolve: (parentPath: string, path: string) => string;
172
+
173
+ declare type PropTypes = VueTypesInterface & {
174
+ readonly style: VueTypeValidableDef<CSSProperties>;
175
+ };
176
+
177
+ export declare class propTypes extends newPropTypes {
178
+ static get style(): VueTypeValidableDef<CSSProperties>;
179
+ }
180
+
181
+ export declare const setDomCssProp: (prop: string, val: any, dom?: HTMLElement) => void;
182
+
183
+ export declare const setHtmlAttrByLang: (locale: LocaleType) => void;
184
+
185
+ export declare const setQuickKeys: (ev: any) => void;
186
+
187
+ export declare const sleep: (timeLen: number) => Promise<void>;
188
+
189
+ export declare const toHump: (name: string) => string;
190
+
191
+ export declare const toLine: (name: string) => string;
192
+
193
+ declare interface TreeHelperConfig {
194
+ id: string;
195
+ children: string;
196
+ pid: string;
197
+ }
198
+
199
+ export declare const treeMap: <T = any>(treeData: T[], opt: {
200
+ children?: string;
201
+ conversion: Fn;
202
+ }) => T[];
203
+
204
+ export declare const treeMapEach: (data: any, { children, conversion }: {
205
+ children?: string;
206
+ conversion: Fn;
207
+ }) => any;
208
+
209
+ export declare const treeToList: <T = any>(tree: any, config?: Partial<TreeHelperConfig>) => T;
210
+
211
+ export declare const useCrud: () => {
212
+ fetchData: <T = any>(fetch: any, params: any) => Promise<IResponse<T>>;
213
+ };
214
+
215
+ export declare const useNotify: () => {
216
+ alert: (msg: unknown, type?: MessageType) => Promise<void>;
217
+ message: (msg: unknown, type?: MessageType, tableedit?: boolean) => Promise<void>;
218
+ confirm: (msg: string, type?: MessageType) => Promise<unknown>;
219
+ };
220
+
221
+ export declare function usePinyin(): {
222
+ toPinyin: (text: string, withTone?: boolean) => string;
223
+ getFirstLetter: (text: string) => string;
224
+ getPinyinArray: (text: string) => string[];
225
+ };
226
+
227
+ export declare const useStorage: (type?: "sessionStorage" | "localStorage") => IWebStorage;
228
+
229
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guava-ui",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "description": "vue3 & element-plus & typesScript & vite UI platform",
5
5
  "author": "Andy <xukaixing@hotmail.com>",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,6 @@
14
14
  "build": "pnpm vite build --mode prod",
15
15
  "build:no-cache": "npm clean:cache && npm run build",
16
16
  "lib": "pnpm vite build ",
17
- "lib:types": "unbuild",
18
17
  "prepare": "npx husky install",
19
18
  "preview": "pnpm vite preview",
20
19
  "clean": "rm -rf node_modules .pnpm pnpm-lock.yaml && pnpm store prune",
@@ -138,21 +137,19 @@
138
137
  "vue-tsc": "^2.2.12"
139
138
  },
140
139
  "files": [
141
- "lib/static",
142
140
  "lib/guava-ui.es.js",
143
141
  "lib/guava-ui.es.js.map",
144
142
  "lib/guava-ui.umd.js",
145
143
  "lib/guava-ui.umd.js.map",
146
144
  "lib/index.css",
147
- "lib/index.d.ts",
148
- "lib/logo.png",
149
- "lib/favicon.ico"
145
+ "lib/types/index.d.ts"
150
146
  ],
151
147
  "exports": {
152
148
  ".": {
153
149
  "import": "./lib/guava-ui.es.js",
154
150
  "require": "./lib/guava-ui.umd.js"
155
- }
151
+ },
152
+ "./style.css": "./lib/index.css"
156
153
  },
157
154
  "packageManager": "pnpm@10.6.5",
158
155
  "engines": {
package/lib/favicon.ico DELETED
Binary file
package/lib/logo.png DELETED
Binary file