@oiij/naive-ui 0.0.63 → 0.0.64
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/components/data-table-plus/DataTablePlus.vue.d.ts +98 -7
- package/dist/components/preset-form/PresetForm.vue.d.ts +4 -6
- package/dist/components/search-input/SearchInput.vue.d.ts +48 -48
- package/dist/components/toggle-editor/ToggleEditor.vue.d.ts +24 -24
- package/dist/components.js +508 -525
- package/dist/composables/{index.d.ts → index.d.mts} +3 -3
- package/dist/composables/{useDataRequest.d.cts → useDataRequest.d.mts} +2 -2
- package/dist/composables/{useNaiveForm.d.ts → useNaiveForm.d.mts} +4 -5
- package/dist/composables/{useNaiveForm.js → useNaiveForm.mjs} +1 -3
- package/dist/composables/{useNaiveTheme.d.ts → useNaiveTheme.d.mts} +1 -1
- package/dist/composables/{useNaiveTheme.js → useNaiveTheme.mjs} +2 -2
- package/dist/{index.d.cts → index.d.mts} +4 -3
- package/dist/index.mjs +5 -0
- package/package.json +21 -24
- package/dist/_virtual/rolldown_runtime.cjs +0 -25
- package/dist/components.cjs +0 -42
- package/dist/components.umd.cjs +0 -42
- package/dist/composables/_helper.cjs +0 -29
- package/dist/composables/_helper.d.ts +0 -10
- package/dist/composables/useDataRequest.cjs +0 -105
- package/dist/composables/useDataRequest.d.ts +0 -61
- package/dist/composables/useNaiveForm.cjs +0 -92
- package/dist/composables/useNaiveForm.d.cts +0 -40
- package/dist/composables/useNaiveTheme.cjs +0 -89
- package/dist/composables/useNaiveTheme.d.cts +0 -171
- package/dist/index.cjs +0 -7
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -5
- /package/dist/composables/{_helper.d.cts → _helper.d.mts} +0 -0
- /package/dist/composables/{_helper.js → _helper.mjs} +0 -0
- /package/dist/composables/{useDataRequest.js → useDataRequest.mjs} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DataObject, DataRequestFields, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest } from "./useDataRequest.
|
|
2
|
-
import { NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, useNaiveForm } from "./useNaiveForm.
|
|
3
|
-
import { NaiveThemeReturns, useNaiveTheme } from "./useNaiveTheme.
|
|
1
|
+
import { DataObject, DataRequestFields, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest } from "./useDataRequest.mjs";
|
|
2
|
+
import { NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, useNaiveForm } from "./useNaiveForm.mjs";
|
|
3
|
+
import { NaiveThemeReturns, useNaiveTheme } from "./useNaiveTheme.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as vue0 from "vue";
|
|
2
1
|
import * as _vueuse_core0 from "@vueuse/core";
|
|
2
|
+
import * as vue0 from "vue";
|
|
3
3
|
import { UseRequestOptions, UseRequestPlugin } from "vue-hooks-plus/es/useRequest/types";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/useDataRequest.d.ts
|
|
@@ -27,7 +27,7 @@ declare function useDataRequest<P extends DataObject = DataObject, D extends Dat
|
|
|
27
27
|
loading: Readonly<vue0.Ref<boolean, boolean>>;
|
|
28
28
|
data: Readonly<vue0.Ref<D | undefined, D | undefined>>;
|
|
29
29
|
error: Readonly<vue0.Ref<Error | undefined, Error | undefined>>;
|
|
30
|
-
params: Readonly<vue0.Ref<
|
|
30
|
+
params: Readonly<vue0.Ref<[] | P[], [] | P[]>>;
|
|
31
31
|
list: vue0.ComputedRef<R[]>;
|
|
32
32
|
pagination: vue0.Ref<{
|
|
33
33
|
page: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataObject } from "./useDataRequest.
|
|
1
|
+
import { DataObject } from "./useDataRequest.mjs";
|
|
2
2
|
import * as _vueuse_core3 from "@vueuse/core";
|
|
3
3
|
import * as vue5 from "vue";
|
|
4
|
-
import { Ref } from "vue";
|
|
4
|
+
import { Ref, TemplateRef } from "vue";
|
|
5
5
|
import { FormInst, FormItemRule, FormRules } from "naive-ui";
|
|
6
6
|
import { ValidateError } from "async-validator";
|
|
7
7
|
|
|
@@ -16,12 +16,11 @@ type NaiveFormOptions<T extends DataObject> = {
|
|
|
16
16
|
rules?: NaiveFormRules<T> | Ref<NaiveFormRules<T>>;
|
|
17
17
|
clearRules?: NaiveFormClearRules;
|
|
18
18
|
};
|
|
19
|
-
declare function useNaiveForm<T extends DataObject = DataObject>(value?: T | Ref<T>, options?: NaiveFormOptions<T>): {
|
|
20
|
-
formRef:
|
|
19
|
+
declare function useNaiveForm<T extends DataObject = DataObject>(formRef: TemplateRef<FormInst>, value?: T | Ref<T>, options?: NaiveFormOptions<T>): {
|
|
20
|
+
formRef: Readonly<vue5.ShallowRef<FormInst | null>>;
|
|
21
21
|
formValue: Ref<T, T>;
|
|
22
22
|
formRules: Ref<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>, Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
23
23
|
formProps: {
|
|
24
|
-
ref: Ref<FormInst | undefined, FormInst | undefined>;
|
|
25
24
|
model: vue5.Reactive<T>;
|
|
26
25
|
rules: vue5.Reactive<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
27
26
|
};
|
|
@@ -30,14 +30,12 @@ function deepMerge(target = {}, source = {}) {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
}
|
|
33
|
-
function useNaiveForm(value, options) {
|
|
33
|
+
function useNaiveForm(formRef, value, options) {
|
|
34
34
|
const { rules, clearRules } = options ?? {};
|
|
35
35
|
const cacheValue = cloneDeep(toValue(value));
|
|
36
36
|
const formValue = ref(toValue(value ?? {}));
|
|
37
37
|
const formRules = ref(toValue(rules) ?? {});
|
|
38
|
-
const formRef = ref();
|
|
39
38
|
const formProps = {
|
|
40
|
-
ref: formRef,
|
|
41
39
|
model: reactive(formValue.value),
|
|
42
40
|
rules: reactive(formRules.value)
|
|
43
41
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getColors } from "./_helper.
|
|
1
|
+
import { getColors } from "./_helper.mjs";
|
|
2
2
|
import { computed, ref, toValue, watchEffect } from "vue";
|
|
3
3
|
import { darkTheme, dateEnUS, dateZhCN, enUS, zhCN } from "naive-ui";
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ function useNaiveTheme(options) {
|
|
|
25
25
|
watchEffect(() => {
|
|
26
26
|
darkModeRef.value = toValue(darkMode);
|
|
27
27
|
});
|
|
28
|
-
const { common
|
|
28
|
+
const { common, ...extra } = globalThemeOverrides ?? {};
|
|
29
29
|
const colorRef = ref({ ...colors });
|
|
30
30
|
function setColor(v) {
|
|
31
31
|
colorRef.value = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DataObject, DataRequestFields, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest } from "./composables/useDataRequest.
|
|
2
|
-
import { NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, useNaiveForm } from "./composables/useNaiveForm.
|
|
3
|
-
import { NaiveThemeReturns, useNaiveTheme } from "./composables/useNaiveTheme.
|
|
1
|
+
import { DataObject, DataRequestFields, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest } from "./composables/useDataRequest.mjs";
|
|
2
|
+
import { NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, useNaiveForm } from "./composables/useNaiveForm.mjs";
|
|
3
|
+
import { NaiveThemeReturns, useNaiveTheme } from "./composables/useNaiveTheme.mjs";
|
|
4
|
+
import "./composables/index.mjs";
|
|
4
5
|
export { DataObject, DataRequestFields, NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, NaiveThemeReturns, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest, useNaiveForm, useNaiveTheme };
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oiij/naive-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.64",
|
|
5
5
|
"description": "Some Composable Functions And Components for Vue 3",
|
|
6
6
|
"author": "oiij",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,19 +18,17 @@
|
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
-
"types": "./dist/index.d.
|
|
22
|
-
"import": "./dist/index.
|
|
23
|
-
"require": "./dist/index.cjs"
|
|
21
|
+
"types": "./dist/index.d.mts",
|
|
22
|
+
"import": "./dist/index.mjs"
|
|
24
23
|
},
|
|
25
24
|
"./components": {
|
|
26
25
|
"types": "./dist/components.d.ts",
|
|
27
|
-
"import": "./dist/components.js"
|
|
28
|
-
"require": "./dist/components.cjs"
|
|
26
|
+
"import": "./dist/components.js"
|
|
29
27
|
}
|
|
30
28
|
},
|
|
31
|
-
"main": "./dist/index.
|
|
32
|
-
"module": "./dist/index.
|
|
33
|
-
"types": "./dist/index.d.
|
|
29
|
+
"main": "./dist/index.mjs",
|
|
30
|
+
"module": "./dist/index.mjs",
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
34
32
|
"files": [
|
|
35
33
|
"LICENSE",
|
|
36
34
|
"README.md",
|
|
@@ -38,32 +36,31 @@
|
|
|
38
36
|
"package.json"
|
|
39
37
|
],
|
|
40
38
|
"peerDependencies": {
|
|
41
|
-
"@vueuse/core": "^14.
|
|
39
|
+
"@vueuse/core": "^14.1.0",
|
|
42
40
|
"async-validator": "^4.2.5",
|
|
43
41
|
"colord": "^2.9.3",
|
|
44
|
-
"es-toolkit": "^1.
|
|
45
|
-
"naive-ui": "^2.43.
|
|
42
|
+
"es-toolkit": "^1.43.0",
|
|
43
|
+
"naive-ui": "^2.43.2",
|
|
46
44
|
"prismjs": "^1.30.0",
|
|
47
|
-
"vue": "^3.5.
|
|
45
|
+
"vue": "^3.5.25",
|
|
48
46
|
"vue-hooks-plus": "^2.4.1",
|
|
49
|
-
"@oiij/css-render": "0.0.
|
|
50
|
-
"@oiij/
|
|
51
|
-
"@oiij/
|
|
47
|
+
"@oiij/css-render": "0.0.7",
|
|
48
|
+
"@oiij/use": "0.0.28",
|
|
49
|
+
"@oiij/markdown-it": "0.0.9"
|
|
52
50
|
},
|
|
53
51
|
"devDependencies": {
|
|
54
52
|
"@types/prismjs": "^1.26.5",
|
|
55
|
-
"@vueuse/core": "^14.
|
|
53
|
+
"@vueuse/core": "^14.1.0",
|
|
56
54
|
"async-validator": "^4.2.5",
|
|
57
55
|
"colord": "^2.9.3",
|
|
58
|
-
"es-toolkit": "^1.
|
|
59
|
-
"naive-ui": "^2.43.
|
|
56
|
+
"es-toolkit": "^1.43.0",
|
|
57
|
+
"naive-ui": "^2.43.2",
|
|
60
58
|
"prismjs": "^1.30.0",
|
|
61
|
-
"vue": "^3.5.
|
|
62
|
-
"vue-component-type-helpers": "^3.1.2",
|
|
59
|
+
"vue": "^3.5.25",
|
|
63
60
|
"vue-hooks-plus": "^2.4.1",
|
|
64
|
-
"@oiij/
|
|
65
|
-
"@oiij/markdown-it": "0.0.
|
|
66
|
-
"@oiij/
|
|
61
|
+
"@oiij/use": "0.0.28",
|
|
62
|
+
"@oiij/markdown-it": "0.0.9",
|
|
63
|
+
"@oiij/css-render": "0.0.7"
|
|
67
64
|
},
|
|
68
65
|
"publishConfig": {
|
|
69
66
|
"access": "public"
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
|
|
25
|
-
exports.__toESM = __toESM;
|