neko-ui 2.6.7 → 2.7.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.
- package/CHANGELOG.md +24 -6
- package/es/@moneko/routes/index.d.ts +1 -1
- package/es/back-top/style.js +1 -3
- package/es/back-top/style.js.map +1 -1
- package/es/button/style.js.map +1 -1
- package/es/capture-screen/index.js +1 -1
- package/es/capture-screen/index.js.map +1 -1
- package/es/cron/begin-interval.d.ts +1 -0
- package/es/cron/index.js +1 -1
- package/es/cron/index.js.map +1 -1
- package/es/cron/item.d.ts +1 -0
- package/es/cron/period.d.ts +1 -0
- package/es/cron/some.d.ts +1 -0
- package/es/date-picker/index.js +1 -1
- package/es/date-picker/index.js.map +1 -1
- package/es/img/style.js +0 -2
- package/es/img/style.js.map +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/md-style/index.js +6 -8
- package/es/md-style/index.js.map +1 -1
- package/es/modal/hooks.d.ts +5 -0
- package/es/modal/hooks.js +2 -0
- package/es/modal/hooks.js.map +1 -0
- package/es/modal/style.js +3 -4
- package/es/modal/style.js.map +1 -1
- package/es/notification/index.d.ts +59 -0
- package/es/notification/index.js +2 -0
- package/es/notification/index.js.map +1 -0
- package/es/notification/notification.d.ts +3 -0
- package/es/notification/notification.js +2 -0
- package/es/notification/notification.js.map +1 -0
- package/es/notification/queque.d.ts +46 -0
- package/es/notification/queque.js +2 -0
- package/es/notification/queque.js.map +1 -0
- package/es/notification/styles.d.ts +1 -0
- package/es/notification/styles.js +97 -0
- package/es/notification/styles.js.map +1 -0
- package/es/popover/index.js +1 -1
- package/es/popover/index.js.map +1 -1
- package/es/popover/style.js +1 -3
- package/es/popover/style.js.map +1 -1
- package/es/prism/css.js +1 -3
- package/es/prism/css.js.map +1 -1
- package/es/select/index.js +1 -1
- package/es/select/index.js.map +1 -1
- package/es/theme/index.js +10 -8
- package/es/theme/index.js.map +1 -1
- package/es/tree/index.d.ts +3 -99
- package/es/tree/index.js +1 -1
- package/es/tree/index.js.map +1 -1
- package/es/tree/register.d.ts +1 -0
- package/es/tree/register.js +2 -0
- package/es/tree/register.js.map +1 -0
- package/es/tree/type.d.ts +104 -0
- package/es/tree/type.js +2 -0
- package/es/tree/type.js.map +1 -0
- package/lib/@moneko/routes/index.d.ts +1 -1
- package/lib/back-top/style.js +1 -3
- package/lib/back-top/style.js.map +1 -1
- package/lib/button/style.js.map +1 -1
- package/lib/capture-screen/index.js +1 -1
- package/lib/capture-screen/index.js.map +1 -1
- package/lib/cron/begin-interval.d.ts +1 -0
- package/lib/cron/index.js +1 -1
- package/lib/cron/index.js.map +1 -1
- package/lib/cron/item.d.ts +1 -0
- package/lib/cron/period.d.ts +1 -0
- package/lib/cron/some.d.ts +1 -0
- package/lib/img/style.js +0 -2
- package/lib/img/style.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/md-style/index.js +6 -8
- package/lib/md-style/index.js.map +1 -1
- package/lib/modal/hooks.d.ts +5 -0
- package/lib/modal/hooks.js +2 -0
- package/lib/modal/hooks.js.map +1 -0
- package/lib/modal/style.js +3 -4
- package/lib/modal/style.js.map +1 -1
- package/lib/notification/index.d.ts +59 -0
- package/lib/notification/index.js +2 -0
- package/lib/notification/index.js.map +1 -0
- package/lib/notification/notification.d.ts +3 -0
- package/lib/notification/notification.js +2 -0
- package/lib/notification/notification.js.map +1 -0
- package/lib/notification/queque.d.ts +46 -0
- package/lib/notification/queque.js +2 -0
- package/lib/notification/queque.js.map +1 -0
- package/lib/notification/styles.d.ts +1 -0
- package/lib/notification/styles.js +97 -0
- package/lib/notification/styles.js.map +1 -0
- package/lib/popover/index.js +1 -1
- package/lib/popover/index.js.map +1 -1
- package/lib/popover/style.js +1 -3
- package/lib/popover/style.js.map +1 -1
- package/lib/prism/css.js +1 -3
- package/lib/prism/css.js.map +1 -1
- package/lib/theme/index.js +8 -6
- package/lib/theme/index.js.map +1 -1
- package/lib/tree/index.d.ts +3 -99
- package/lib/tree/index.js +1 -1
- package/lib/tree/index.js.map +1 -1
- package/lib/tree/register.d.ts +1 -0
- package/lib/tree/register.js +2 -0
- package/lib/tree/register.js.map +1 -0
- package/lib/tree/type.d.ts +104 -0
- package/lib/tree/type.js +2 -0
- package/lib/tree/type.js.map +1 -0
- package/package.json +23 -21
- package/umd/index.js +1 -1
- package/es/@introduce/api.md +0 -158
- package/es/@introduce/getting-started/api.md +0 -34
- package/es/@introduce/html/doc.md +0 -45
- package/es/@introduce/react/doc.md +0 -49
- package/es/@introduce/solid/doc.md +0 -39
- package/es/@introduce/vue/doc.md +0 -54
- package/es/@moneko/cli/doc.md +0 -211
- package/es/@moneko/config/api.md +0 -213
- package/es/@moneko/locales/doc.md +0 -130
- package/es/@moneko/mock/api.md +0 -177
- package/es/@moneko/request/api.md +0 -31
- package/es/@moneko/routes/doc.md +0 -81
- package/es/@moneko/sso/api.md +0 -158
- package/lib/@introduce/api.md +0 -158
- package/lib/@introduce/getting-started/api.md +0 -34
- package/lib/@introduce/html/doc.md +0 -45
- package/lib/@introduce/react/doc.md +0 -49
- package/lib/@introduce/solid/doc.md +0 -39
- package/lib/@introduce/vue/doc.md +0 -54
- package/lib/@moneko/cli/doc.md +0 -211
- package/lib/@moneko/config/api.md +0 -213
- package/lib/@moneko/locales/doc.md +0 -130
- package/lib/@moneko/mock/api.md +0 -177
- package/lib/@moneko/request/api.md +0 -31
- package/lib/@moneko/routes/doc.md +0 -81
- package/lib/@moneko/sso/api.md +0 -158
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { BasicConfig } from '../basic-config';
|
|
2
|
+
import type { Schema } from '../from-schema';
|
|
3
|
+
export interface TreeBaseProp {
|
|
4
|
+
/** 自定义类名 */
|
|
5
|
+
class?: string;
|
|
6
|
+
/** 自定义样式表 */
|
|
7
|
+
css?: string;
|
|
8
|
+
/** 尺寸
|
|
9
|
+
* @default 'normal'
|
|
10
|
+
*/
|
|
11
|
+
size?: BasicConfig['size'];
|
|
12
|
+
/** 只读 */
|
|
13
|
+
readonly?: boolean;
|
|
14
|
+
/** 开启取消选中, 仅多选模式生效 */
|
|
15
|
+
toggle?: boolean;
|
|
16
|
+
/** 方向
|
|
17
|
+
* @default 'ltr'
|
|
18
|
+
*/
|
|
19
|
+
direction?: 'rtl' | 'ltr';
|
|
20
|
+
/** 点击行时的回调函数 */
|
|
21
|
+
onRowClick?: (e: MouseEvent, key: string, item: TreeData) => void;
|
|
22
|
+
/** 双击行时的回调函数 */
|
|
23
|
+
onRowDoubleClick?: (e: MouseEvent, key: string, item: TreeData) => void;
|
|
24
|
+
/** 自定义渲染行 */
|
|
25
|
+
renderRow?: (item: TreeData, title: JSX.Element, subTitle?: JSX.Element) => JSX.Element[];
|
|
26
|
+
/** 开启此选项支持 `JSONSchema`
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
fromSchema?: false;
|
|
30
|
+
}
|
|
31
|
+
interface TreeBaseProps extends TreeBaseProp {
|
|
32
|
+
/** 选中的值, 多选模式时为数组 */
|
|
33
|
+
value?: string;
|
|
34
|
+
/** 多选模式
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
multiple?: false;
|
|
38
|
+
/** 选中的值发生修改时的回调函数, 多选模式时入参为数组 */
|
|
39
|
+
onChange?(key?: string, item?: TreeData): void;
|
|
40
|
+
}
|
|
41
|
+
interface TreeMultipleBaseProps extends TreeBaseProp {
|
|
42
|
+
/** 选中的值 */
|
|
43
|
+
value?: string[];
|
|
44
|
+
/** 多选模式
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
multiple: true;
|
|
48
|
+
onChange?(key?: string[], item?: TreeData): void;
|
|
49
|
+
}
|
|
50
|
+
export interface TreeProps extends TreeBaseProps {
|
|
51
|
+
/** 数据源 */
|
|
52
|
+
data: TreeData[];
|
|
53
|
+
}
|
|
54
|
+
export interface TreeSchemaProps extends Omit<TreeBaseProps, 'fromSchema'> {
|
|
55
|
+
/** 开启此选项支持 `JSONSchema` */
|
|
56
|
+
fromSchema: true;
|
|
57
|
+
/** 数据源 */
|
|
58
|
+
data: Schema;
|
|
59
|
+
}
|
|
60
|
+
export interface TreeStringProps extends TreeBaseProps {
|
|
61
|
+
/** 数据源 */
|
|
62
|
+
data: string;
|
|
63
|
+
}
|
|
64
|
+
export interface TreeMultipleProps extends TreeMultipleBaseProps {
|
|
65
|
+
/** 数据源 */
|
|
66
|
+
data: TreeData[];
|
|
67
|
+
}
|
|
68
|
+
export interface TreeMultipleSchemaProps extends Omit<TreeMultipleBaseProps, 'fromSchema'> {
|
|
69
|
+
/** 开启此选项支持 `JSONSchema` */
|
|
70
|
+
fromSchema: true;
|
|
71
|
+
/** 数据源 */
|
|
72
|
+
data: Schema;
|
|
73
|
+
}
|
|
74
|
+
export interface TreeMultipleStringProps extends TreeMultipleBaseProps {
|
|
75
|
+
/** 数据源 */
|
|
76
|
+
data: string;
|
|
77
|
+
}
|
|
78
|
+
type CustomEvents = 'onChange' | 'onRowDoubleClick' | 'onRowClick';
|
|
79
|
+
export type TreeElement = CustomElement<TreeProps, CustomEvents>;
|
|
80
|
+
export type TreeSchemaElement = CustomElement<TreeSchemaProps, CustomEvents>;
|
|
81
|
+
export type TreeStringElement = CustomElement<TreeStringProps, CustomEvents>;
|
|
82
|
+
export type TreeMultipleElement = CustomElement<TreeMultipleProps, CustomEvents>;
|
|
83
|
+
export type TreeMultipleSchemaElement = CustomElement<TreeMultipleSchemaProps, CustomEvents>;
|
|
84
|
+
export type TreeMultipleStringElement = CustomElement<TreeMultipleStringProps, CustomEvents>;
|
|
85
|
+
export interface TreeStack extends TreeData {
|
|
86
|
+
/** 深度 */
|
|
87
|
+
depth?: number;
|
|
88
|
+
}
|
|
89
|
+
export interface TreeData<T = string> {
|
|
90
|
+
/** key(唯一值) */
|
|
91
|
+
key: T;
|
|
92
|
+
/** 属性 */
|
|
93
|
+
name?: string;
|
|
94
|
+
/** 标题 */
|
|
95
|
+
title?: string;
|
|
96
|
+
/** 副标题 */
|
|
97
|
+
subTitle?: string;
|
|
98
|
+
/** 详细描述 */
|
|
99
|
+
description?: string;
|
|
100
|
+
/** 子项 */
|
|
101
|
+
children?: TreeData<T>[];
|
|
102
|
+
[key: string | number | symbol]: T | string | number | symbol | boolean | TreeData<T>[] | undefined;
|
|
103
|
+
}
|
|
104
|
+
export {};
|
package/lib/tree/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../components/tree/type.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neko-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "WebComponents UI Libraries",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "mo build library solid",
|
|
8
8
|
"changelog": "mo changelog CHANGELOG.md && git add CHANGELOG.md",
|
|
9
|
-
"
|
|
9
|
+
"prelint": "mo eslint components && mo eslint site",
|
|
10
|
+
"stylelint": "mo stylelint components && mo stylelint site",
|
|
11
|
+
"lint": "jest --coverage",
|
|
10
12
|
"precommit": "yarn lint && yarn changelog",
|
|
11
|
-
"
|
|
13
|
+
"ppprepare": "mo githooks pre-commit=\"yarn precommit\" commit-msg=\"npx --no -- commitlint --edit \\${1}\"",
|
|
12
14
|
"start": "rm -rf lib && rm -rf es && mo start library solid",
|
|
13
15
|
"test": "jest --coverage --watchAll"
|
|
14
16
|
},
|
|
@@ -40,34 +42,33 @@
|
|
|
40
42
|
"ui libraries"
|
|
41
43
|
],
|
|
42
44
|
"devDependencies": {
|
|
43
|
-
"@commitlint/cli": "
|
|
44
|
-
"@commitlint/config-conventional": "
|
|
45
|
-
"@moneko/cli": "2.
|
|
46
|
-
"@moneko/core": "3.9.
|
|
47
|
-
"@moneko/solid": "1.
|
|
48
|
-
"@solidjs/testing-library": "0.8.
|
|
49
|
-
"@swc/jest": "0.2.
|
|
50
|
-
"@testing-library/jest-dom": "6.
|
|
45
|
+
"@commitlint/cli": "18.4.4",
|
|
46
|
+
"@commitlint/config-conventional": "18.4.4",
|
|
47
|
+
"@moneko/cli": "2.7.0",
|
|
48
|
+
"@moneko/core": "3.9.22",
|
|
49
|
+
"@moneko/solid": "1.6.1",
|
|
50
|
+
"@solidjs/testing-library": "0.8.5",
|
|
51
|
+
"@swc/jest": "0.2.30",
|
|
52
|
+
"@testing-library/jest-dom": "6.2.0",
|
|
51
53
|
"@types/jest": "29.5.11",
|
|
52
54
|
"babel-loader": "9.1.3",
|
|
53
|
-
"eslint-config-neko": "2.3.
|
|
54
|
-
"eslint-plugin-solid": "0.13.
|
|
55
|
+
"eslint-config-neko": "2.3.1",
|
|
56
|
+
"eslint-plugin-solid": "0.13.1",
|
|
55
57
|
"husky": "8.0.3",
|
|
56
58
|
"jest": "29.7.0",
|
|
57
59
|
"jest-environment-jsdom": "29.7.0",
|
|
58
|
-
"n-code-live": "1.0
|
|
60
|
+
"n-code-live": "1.1.0",
|
|
59
61
|
"n-katex": "1.0.8",
|
|
60
|
-
"shadow-dom-testing-library": "1.11.
|
|
61
|
-
"stylelint-config-moneko": "1.2.1"
|
|
62
|
+
"shadow-dom-testing-library": "1.11.2"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
|
-
"@moneko/common": "1.3.
|
|
65
|
-
"@moneko/css": "1.
|
|
65
|
+
"@moneko/common": "1.3.1",
|
|
66
|
+
"@moneko/css": "1.1.1",
|
|
66
67
|
"custom-element-type": "1.0.3",
|
|
67
68
|
"dayjs": "1.11.10",
|
|
68
|
-
"marked-completed": "1.2.
|
|
69
|
+
"marked-completed": "1.2.14",
|
|
69
70
|
"solid-element": "1.8.0",
|
|
70
|
-
"solid-js": "1.8.
|
|
71
|
+
"solid-js": "1.8.11"
|
|
71
72
|
},
|
|
72
73
|
"files": [
|
|
73
74
|
"es",
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
"LICENSE"
|
|
80
81
|
],
|
|
81
82
|
"browserslist": [
|
|
82
|
-
"Chrome >= 86"
|
|
83
|
+
"Chrome >= 86",
|
|
84
|
+
"Safari >= 15"
|
|
83
85
|
]
|
|
84
86
|
}
|