@kengic/core.react 0.0.1-beta.47 → 0.0.1-beta.49
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/exclamation-circle-outlined-DZrXCnvM.js +8 -0
- package/kengic-core.react.js +5978 -5530
- package/package.json +1 -1
- package/src/component/KgWorkStation/index.event.d.ts +9 -5
- package/src/component/KgWorkStation/index.hooks.d.ts +17 -3
- package/src/i18n/en.d.ts +5 -0
- package/src/i18n/zh_CN.d.ts +5 -0
- package/src/util/index.d.ts +1 -1
- package/src/util/kg.util.d.ts +26 -0
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { IKgEventListener } from '@kengic/core.core';
|
|
2
2
|
/**
|
|
3
3
|
* 事件类型.
|
|
4
|
-
* 'onMount':
|
|
4
|
+
* 'onMount': 挂载
|
|
5
|
+
* 'onOk': 确定
|
|
5
6
|
*/
|
|
6
|
-
export type IKgWorkStationEvent = 'onMount';
|
|
7
|
+
export type IKgWorkStationEvent = 'onMount' | 'onOk';
|
|
7
8
|
export type IKgWorkStationOnMountEventListenerParameter = {};
|
|
8
9
|
export type IKgWorkStationOnMountEventListener = ((param: IKgWorkStationOnMountEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
10
|
+
export type IKgWorkStationOnOkEventListenerParameter = {};
|
|
11
|
+
export type IKgWorkStationOnOkEventListener = ((param: IKgWorkStationOnOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
|
12
|
+
export type IKgWorkStationEventListenerParameter = IKgWorkStationOnMountEventListenerParameter | IKgWorkStationOnOkEventListenerParameter;
|
|
13
|
+
export type IKgWorkStationEventListener = IKgWorkStationOnMountEventListener | IKgWorkStationOnOkEventListener;
|
|
11
14
|
export declare const eventListenerListRecordRecord: Record<string, {
|
|
12
|
-
onMount: Array<
|
|
15
|
+
onMount: Array<IKgWorkStationOnMountEventListener>;
|
|
16
|
+
onOk: Array<IKgWorkStationOnOkEventListener>;
|
|
13
17
|
}>;
|
|
14
18
|
/**
|
|
15
19
|
* 触发事件.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkstationDTO } from '../../api/WMS/models.ts';
|
|
3
|
+
import { IKgWorkStationOnMountEventListener, IKgWorkStationOnOkEventListener } from './index.event';
|
|
3
4
|
import { IKgWorkStationState, store } from './index.store';
|
|
4
5
|
export interface IDoKgWorkStation {
|
|
5
6
|
/**
|
|
@@ -18,9 +19,15 @@ export interface IDoKgWorkStation {
|
|
|
18
19
|
/**
|
|
19
20
|
* <p>获取「是否显示」. 在 vue 项目中使用.</p>
|
|
20
21
|
*/
|
|
21
|
-
getIsVisible
|
|
22
|
+
getIsVisible(): [{
|
|
22
23
|
value: boolean;
|
|
23
|
-
}
|
|
24
|
+
}, () => void];
|
|
25
|
+
/**
|
|
26
|
+
* <p>获取「当前选择的工作站」. 在 vue 项目中使用.</p>
|
|
27
|
+
*/
|
|
28
|
+
getWorkStation(): [{
|
|
29
|
+
value: WorkstationDTO | null;
|
|
30
|
+
}, () => void];
|
|
24
31
|
id: string;
|
|
25
32
|
/**
|
|
26
33
|
* 监听事件: 挂载.
|
|
@@ -29,6 +36,13 @@ export interface IDoKgWorkStation {
|
|
|
29
36
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
|
30
37
|
*/
|
|
31
38
|
onMount(listener: IKgWorkStationOnMountEventListener, isOnce?: boolean): IRemoveEventListener;
|
|
39
|
+
/**
|
|
40
|
+
* 监听事件: 确定.
|
|
41
|
+
*
|
|
42
|
+
* @param listener 事件监听函数.
|
|
43
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
|
44
|
+
*/
|
|
45
|
+
onOk(listener: IKgWorkStationOnOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
|
32
46
|
/**
|
|
33
47
|
* 打开弹窗.
|
|
34
48
|
*/
|
package/src/i18n/en.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export declare const en: {
|
|
2
2
|
'KgWorkStation.modalTitle': string;
|
|
3
|
+
'KgWorkStation.reloadMessage': string;
|
|
3
4
|
'KgWorkStation.selectWorkStation': string;
|
|
4
5
|
'KgWorkStation.workStation': string;
|
|
5
6
|
'KgWorkStation.workStationAndWorkStationArea': string;
|
|
6
7
|
'KgWorkStation.workStationArea': string;
|
|
8
|
+
'kg.cancel': string;
|
|
9
|
+
'kg.confirm': string;
|
|
10
|
+
'kg.confirmDelete': string;
|
|
11
|
+
'kg.refresh': string;
|
|
7
12
|
};
|
package/src/i18n/zh_CN.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export declare const zh_CN: {
|
|
2
2
|
'KgWorkStation.modalTitle': string;
|
|
3
|
+
'KgWorkStation.reloadMessage': string;
|
|
3
4
|
'KgWorkStation.selectWorkStation': string;
|
|
4
5
|
'KgWorkStation.workStation': string;
|
|
5
6
|
'KgWorkStation.workStationAndWorkStationArea': string;
|
|
6
7
|
'KgWorkStation.workStationArea': string;
|
|
8
|
+
'kg.cancel': string;
|
|
9
|
+
'kg.confirm': string;
|
|
10
|
+
'kg.confirmDelete': string;
|
|
11
|
+
'kg.refresh': string;
|
|
7
12
|
};
|
package/src/util/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './kg.util.tsx';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ModalFuncProps } from 'antd';
|
|
2
|
+
/**
|
|
3
|
+
* 工具方法.
|
|
4
|
+
*/
|
|
5
|
+
export declare class KgUtil {
|
|
6
|
+
/**
|
|
7
|
+
* 确认弹窗.
|
|
8
|
+
* 设置了多个属性的默认值, 简化使用.
|
|
9
|
+
* https://www.antdv.com/components/modal
|
|
10
|
+
* @param props
|
|
11
|
+
*/
|
|
12
|
+
static confirm(props: IKgVarButtonModalProperties): ModalFunc;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 按钮确认弹窗的参数.
|
|
16
|
+
*/
|
|
17
|
+
export type IKgVarButtonModalProperties = ModalFuncProps & {
|
|
18
|
+
/** 是否隐藏取消按钮. */
|
|
19
|
+
kgHideCancelButton?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type ModalFunc = {
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
24
|
+
showLoading(): void;
|
|
25
|
+
hideLoading(): void;
|
|
26
|
+
};
|