@kengic/core.react 0.0.1-beta.1 → 0.0.1-beta.11
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/kengic-core.react.js → kengic-core.react.js} +9905 -9571
- package/package.json +4 -80
- package/{dist/src → src}/component/KgWorkStation/index.event.d.ts +6 -6
- package/src/component/KgWorkStation/index.hooks.d.ts +48 -0
- package/{dist/src → src}/component/KgWorkStation/index.store.d.ts +4 -0
- package/README.md +0 -1
- package/dist/src/component/KgWorkStation/index.hooks.d.ts +0 -37
- /package/{dist/close-outlined-DMcSQWxQ.js → close-outlined-DMcSQWxQ.js} +0 -0
- /package/{dist/fullscreen-exit-outlined-X1iYkFc4.js → fullscreen-exit-outlined-X1iYkFc4.js} +0 -0
- /package/{dist/fullscreen-outlined-DDBrsRcy.js → fullscreen-outlined-DDBrsRcy.js} +0 -0
- /package/{dist/index.css → index.css} +0 -0
- /package/{dist/src → src}/component/Kg/Kg.d.ts +0 -0
- /package/{dist/src → src}/component/Kg/KgProvider.d.ts +0 -0
- /package/{dist/src → src}/component/Kg/index.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/KgModal.HeaderButtons.Close.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/KgModal.HeaderButtons.Fullscreen.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/KgModal.HeaderButtons.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/KgModal.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/KgModalPropsProvider.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/hook/useDragToMove.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/index.d.ts +0 -0
- /package/{dist/src → src}/component/KgModal/index.vm.d.ts +0 -0
- /package/{dist/src → src}/component/KgVarConfig/KgVarConfig.d.ts +0 -0
- /package/{dist/src → src}/component/KgVarConfig/KgVarConfigModal.d.ts +0 -0
- /package/{dist/src → src}/component/KgVarConfig/index.d.ts +0 -0
- /package/{dist/src → src}/component/KgVarConfig/index.wc.d.ts +0 -0
- /package/{dist/src → src}/component/KgWorkStation/KgWorkStation.d.ts +0 -0
- /package/{dist/src → src}/component/KgWorkStation/KgWorkStation.service.d.ts +0 -0
- /package/{dist/src → src}/component/KgWorkStation/KgWorkStationModal.d.ts +0 -0
- /package/{dist/src → src}/component/KgWorkStation/index.d.ts +0 -0
- /package/{dist/src → src}/component/KgWorkStation/index.vm.d.ts +0 -0
- /package/{dist/src → src}/component/KgWorkStation/index.wc.d.ts +0 -0
- /package/{dist/src → src}/component/index.d.ts +0 -0
- /package/{dist/src → src}/const/index.d.ts +0 -0
- /package/{dist/src → src}/const/index.vm.d.ts +0 -0
- /package/{dist/src → src}/i18n/en.d.ts +0 -0
- /package/{dist/src → src}/i18n/index.d.ts +0 -0
- /package/{dist/src → src}/i18n/zh_CN.d.ts +0 -0
- /package/{dist/src → src}/iconify.init.d.ts +0 -0
- /package/{dist/src → src}/index.d.ts +0 -0
- /package/{dist/src → src}/util/index.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,84 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kengic/core.react",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.11",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"--------------------------------------------------": "",
|
|
9
|
-
"gen:apis:WMS": "npm run use-node && kengic-pont generate-apis --config kg.config.ts --origin WMS",
|
|
10
|
-
"- ------------------------------------------------": "",
|
|
11
|
-
"use-node": "nvm use 20.17.0 && corepack enable && corepack use pnpm@9.12.1",
|
|
12
|
-
"cnpm:sync": "npm run use-node && npx cnpm --yes sync @kengic/core",
|
|
13
|
-
"-- -----------------------------------------------": "",
|
|
14
|
-
"publish:major": "npm run bump:major && tsx script/publish.ts",
|
|
15
|
-
"publish:minor": "npm run bump:minor && tsx script/publish.ts",
|
|
16
|
-
"publish:patch": "npm run bump:patch && tsx script/publish.ts",
|
|
17
|
-
"publish:beta": "npm run bump:beta && tsx script/publish.ts",
|
|
18
|
-
"----- --------------------------------------------": "",
|
|
19
|
-
"bump:major": "npm run use-node && tsx script/bump.ts major",
|
|
20
|
-
"bump:minor": "npm run use-node && tsx script/bump.ts minor",
|
|
21
|
-
"bump:patch": "npm run use-node && tsx script/bump.ts patch",
|
|
22
|
-
"bump:beta": "npm run use-node && tsx script/bump.ts beta",
|
|
23
|
-
"---- ---------------------------------------------": "",
|
|
24
|
-
"publish:npm": "npm run use-node && npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public",
|
|
25
|
-
"------ -------------------------------------------": "",
|
|
26
|
-
"bump-to:kengic": "npm run use-node && tsx script/bump-to.kengic.ts"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@eslint/js": "9.9.0",
|
|
30
|
-
"@iconify-icons/ant-design": "1.2.7",
|
|
31
|
-
"@iconify/react": "5.0.2",
|
|
32
|
-
"@kengic/core.core": "0.0.1-beta.5",
|
|
33
|
-
"@reduxjs/toolkit": "2.3.0",
|
|
34
|
-
"@types/lodash-es": "4.17.12",
|
|
35
|
-
"@types/node": "20.16.10",
|
|
36
|
-
"@types/react": "18.3.3",
|
|
37
|
-
"@types/react-dom": "18.3.0",
|
|
38
|
-
"@types/semver": "7.5.8",
|
|
39
|
-
"@vitejs/plugin-react": "4.3.1",
|
|
40
|
-
"ahooks": "3.8.1",
|
|
41
|
-
"antd": "5.21.3",
|
|
42
|
-
"chalk": "4.1.2",
|
|
43
|
-
"eslint": "9.9.0",
|
|
44
|
-
"eslint-plugin-react-hooks": "5.1.0-rc.0",
|
|
45
|
-
"eslint-plugin-react-refresh": "0.4.9",
|
|
46
|
-
"globals": "15.9.0",
|
|
47
|
-
"lodash-es": "4.17.21",
|
|
48
|
-
"prettier": "3.3.3",
|
|
49
|
-
"react": "18.3.1",
|
|
50
|
-
"react-dom": "18.3.1",
|
|
51
|
-
"react-intl": "6.8.0",
|
|
52
|
-
"react-redux": "9.1.2",
|
|
53
|
-
"rimraf": "6.0.1",
|
|
54
|
-
"semver": "7.6.3",
|
|
55
|
-
"tsx": "4.19.1",
|
|
56
|
-
"typescript": "5.5.3",
|
|
57
|
-
"typescript-eslint": "8.0.1",
|
|
58
|
-
"use-immer": "0.10.0",
|
|
59
|
-
"vite": "5.4.1"
|
|
60
|
-
},
|
|
61
|
-
"main": "./dist/kengic-core.react.js",
|
|
62
|
-
"module": "./dist/kengic-core.react.js",
|
|
63
|
-
"types": "./dist/src/index.d.ts",
|
|
64
|
-
"prettier": {
|
|
65
|
-
"endOfLine": "auto",
|
|
66
|
-
"overrides": [
|
|
67
|
-
{
|
|
68
|
-
"files": [
|
|
69
|
-
"*.less",
|
|
70
|
-
"*.css"
|
|
71
|
-
],
|
|
72
|
-
"options": {
|
|
73
|
-
"printWidth": 320
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"printWidth": 160,
|
|
78
|
-
"semi": true,
|
|
79
|
-
"singleAttributePerLine": true,
|
|
80
|
-
"singleQuote": true,
|
|
81
|
-
"tabWidth": 4,
|
|
82
|
-
"trailingComma": "all"
|
|
83
|
-
}
|
|
5
|
+
"main": "./kengic-core.react.js",
|
|
6
|
+
"module": "./kengic-core.react.js",
|
|
7
|
+
"types": "./src/index.d.ts"
|
|
84
8
|
}
|
|
@@ -15,10 +15,10 @@ export type IKgWorkStationEventListener = IKgWorkStationOnMountEventListener;
|
|
|
15
15
|
* @param param.id 唯一标识.
|
|
16
16
|
* @param param.listener 事件监听函数.
|
|
17
17
|
*/
|
|
18
|
-
export declare function addEventListener<
|
|
18
|
+
export declare function addEventListener<L extends IKgWorkStationEventListener>(param: {
|
|
19
19
|
event: IKgWorkStationEvent;
|
|
20
20
|
id?: string | undefined;
|
|
21
|
-
listener:
|
|
21
|
+
listener: L;
|
|
22
22
|
}): void;
|
|
23
23
|
/**
|
|
24
24
|
* 移除事件监听.
|
|
@@ -27,10 +27,10 @@ export declare function addEventListener<T extends IKgWorkStationEventListener>(
|
|
|
27
27
|
* @param param.id 唯一标识.
|
|
28
28
|
* @param param.listener 事件监听函数.
|
|
29
29
|
*/
|
|
30
|
-
export declare function removeEventListener(param: {
|
|
30
|
+
export declare function removeEventListener<L extends IKgWorkStationEventListener>(param: {
|
|
31
31
|
event: IKgWorkStationEvent;
|
|
32
32
|
id?: string | undefined;
|
|
33
|
-
listener?:
|
|
33
|
+
listener?: L;
|
|
34
34
|
}): void;
|
|
35
35
|
/**
|
|
36
36
|
* 触发事件.
|
|
@@ -39,8 +39,8 @@ export declare function removeEventListener(param: {
|
|
|
39
39
|
* @param param.id 唯一标识.
|
|
40
40
|
* @param param.parameter 事件参数.
|
|
41
41
|
*/
|
|
42
|
-
export declare function emit<
|
|
42
|
+
export declare function emit<P = IKgWorkStationEventListenerParameter>(param: {
|
|
43
43
|
event: IKgWorkStationEvent;
|
|
44
44
|
id?: string | undefined;
|
|
45
|
-
parameter
|
|
45
|
+
parameter?: P;
|
|
46
46
|
}): Promise<boolean>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IKgWorkStationState, store } from './index.store';
|
|
2
|
+
import { IKgWorkStationOnMountEventListener } from './index.event.ts';
|
|
3
|
+
import { IRemoveEventListener } from '@kengic/core.core';
|
|
4
|
+
export interface IDoKgWorkStation {
|
|
5
|
+
/**
|
|
6
|
+
* 关闭弹窗.
|
|
7
|
+
*/
|
|
8
|
+
closeModal(): void;
|
|
9
|
+
/**
|
|
10
|
+
* <p>获取某个状态数据. 在 vue 项目中使用.</p>
|
|
11
|
+
*
|
|
12
|
+
* @param ref vue 中的 ref() 函数.
|
|
13
|
+
* @param fn 获取函数, 该函数由框架调用并传入状态数据作为参数, 调用者从参数中获取想要的数据.
|
|
14
|
+
* @return 返回一个数组, 包含两个元素, 第一个元素是要获取的数据, 是一个 ref 数据, 第二个元素是一个退订函数, 由调用者负责在合适的时候调用, 用于移除对该数据的变更监听.
|
|
15
|
+
*/
|
|
16
|
+
get<T extends {
|
|
17
|
+
value: any;
|
|
18
|
+
}>(ref: (value: any) => any, fn: (state: IKgWorkStationState[string]) => any): [T, () => void];
|
|
19
|
+
/**
|
|
20
|
+
* 监听事件: 挂载.
|
|
21
|
+
*
|
|
22
|
+
* @param listener 事件监听函数.
|
|
23
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
|
24
|
+
*/
|
|
25
|
+
onMount(listener: IKgWorkStationOnMountEventListener, isOnce?: boolean): IRemoveEventListener;
|
|
26
|
+
/**
|
|
27
|
+
* 打开弹窗.
|
|
28
|
+
*/
|
|
29
|
+
openModal(): void;
|
|
30
|
+
/**
|
|
31
|
+
* 设置数据.
|
|
32
|
+
*
|
|
33
|
+
* @param fn 设置函数.
|
|
34
|
+
*/
|
|
35
|
+
set(fn: (state: IKgWorkStationState[string]) => void): void;
|
|
36
|
+
store: typeof store;
|
|
37
|
+
/**
|
|
38
|
+
* 订阅数据变更.
|
|
39
|
+
*
|
|
40
|
+
* @param fn 回调函数, 可以通过参数 state 获取到最新的数据.
|
|
41
|
+
*/
|
|
42
|
+
subscribe(fn: (state: IKgWorkStationState[string]) => void): () => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param id 唯一标识.
|
|
47
|
+
*/
|
|
48
|
+
export declare function doKgWorkStation(id?: string): IDoKgWorkStation;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { KgWorkStationProps } from './index.vm';
|
|
2
2
|
export type IKgWorkStationState = Record<string, {
|
|
3
|
+
/**
|
|
4
|
+
* 是否已经完成挂载.
|
|
5
|
+
*/
|
|
6
|
+
isMount: boolean;
|
|
3
7
|
props?: KgWorkStationProps;
|
|
4
8
|
}>;
|
|
5
9
|
export declare const set: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# @kengic/core.react
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { IKgWorkStationState, store } from './index.store';
|
|
2
|
-
export interface IDoKgWorkStation {
|
|
3
|
-
/**
|
|
4
|
-
* 关闭弹窗.
|
|
5
|
-
*/
|
|
6
|
-
closeModal(): void;
|
|
7
|
-
/**
|
|
8
|
-
* 挂载.
|
|
9
|
-
*/
|
|
10
|
-
mount(): void;
|
|
11
|
-
/**
|
|
12
|
-
* 打开弹窗.
|
|
13
|
-
*/
|
|
14
|
-
openModal(): void;
|
|
15
|
-
/**
|
|
16
|
-
* 设置数据.
|
|
17
|
-
*
|
|
18
|
-
* @param fn 设置函数.
|
|
19
|
-
*/
|
|
20
|
-
set(fn: (state: IKgWorkStationState[string]) => void): void;
|
|
21
|
-
store: typeof store;
|
|
22
|
-
/**
|
|
23
|
-
* 订阅数据变更.
|
|
24
|
-
*
|
|
25
|
-
* @param fn 回调函数, 可以通过参数 state 获取到最新的数据.
|
|
26
|
-
*/
|
|
27
|
-
subscribe(fn: (state: IKgWorkStationState[string]) => void): () => void;
|
|
28
|
-
/**
|
|
29
|
-
* 卸载.
|
|
30
|
-
*/
|
|
31
|
-
unmount(): void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param id 唯一标识.
|
|
36
|
-
*/
|
|
37
|
-
export declare function doKgWorkStation(id?: string): IDoKgWorkStation;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|