@kengic/core.react 0.0.1-beta.54 → 0.0.1-beta.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/core.react",
3
- "version": "0.0.1-beta.54",
3
+ "version": "0.0.1-beta.55",
4
4
  "type": "module",
5
5
  "main": "./kengic-core.react.js",
6
6
  "module": "./kengic-core.react.js",
@@ -1,2 +1,2 @@
1
- export * from './Kg';
1
+ export * from './index.store';
2
2
  export * from './KgProvider';
@@ -0,0 +1,23 @@
1
+ export interface IKgOption {
2
+ /** 选择工作站. */
3
+ KgWorkStation?: {
4
+ /**
5
+ * 是否启用功能.
6
+ * @default true
7
+ */
8
+ isOn?: boolean;
9
+ };
10
+ }
11
+ export type IKgState = {
12
+ /**
13
+ * 选项.
14
+ */
15
+ option: IKgOption;
16
+ };
17
+ export declare const setOption: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<IKgOption | null | undefined, "Kg/setOption">;
18
+ export declare function getOption(state: IKgState): IKgOption;
19
+ export declare const kgStore: import("@reduxjs/toolkit").EnhancedStore<IKgState, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
20
+ dispatch: import("@reduxjs/toolkit").ThunkDispatch<IKgState, undefined, import("@reduxjs/toolkit").UnknownAction>;
21
+ }>, import("@reduxjs/toolkit").StoreEnhancer]>>;
22
+ export declare const useKgDispatch: import("react-redux").UseDispatch<import("@reduxjs/toolkit").ThunkDispatch<IKgState, undefined, import("@reduxjs/toolkit").UnknownAction> & import("@reduxjs/toolkit").Dispatch<import("@reduxjs/toolkit").UnknownAction>>;
23
+ export declare const useKgSelector: import("react-redux").UseSelector<IKgState>;
@@ -3,4 +3,4 @@ import './KgWorkStation.css';
3
3
  /**
4
4
  * 选择工作站.
5
5
  */
6
- export declare function KgWorkStation(): React.JSX.Element;
6
+ export declare function KgWorkStation(): React.JSX.Element | null;
@@ -1,7 +1,7 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { WorkstationDTO } from '../../api/WMS/models.ts';
3
3
  import { IKgWorkStationOnMountEventListener, IKgWorkStationOnOkEventListener } from './index.event';
4
- import { IKgWorkStationState, store } from './index.store';
4
+ import { IKgWorkStationState, kgWorkStationStore } from './index.store';
5
5
  export interface IDoKgWorkStation {
6
6
  /**
7
7
  * 关闭弹窗.
@@ -53,7 +53,7 @@ export interface IDoKgWorkStation {
53
53
  * @param fn 设置函数.
54
54
  */
55
55
  set(fn: (state: IKgWorkStationState[string]) => void): void;
56
- store: typeof store;
56
+ store: typeof kgWorkStationStore;
57
57
  /**
58
58
  * 订阅数据变更.
59
59
  *
@@ -37,8 +37,8 @@ export declare function getIsVisible(id: string): (state: IKgWorkStationState) =
37
37
  export declare function getIsOpen(id: string): (state: IKgWorkStationState) => boolean;
38
38
  export declare function getWorkStation(id: string): (state: IKgWorkStationState) => WorkstationDTO | null;
39
39
  export declare function getWorkStationArea(id: string): (state: IKgWorkStationState) => WorkstationAreaDTO | null;
40
- export declare const store: import("@reduxjs/toolkit").EnhancedStore<IKgWorkStationState, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
40
+ export declare const kgWorkStationStore: import("@reduxjs/toolkit").EnhancedStore<IKgWorkStationState, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
41
41
  dispatch: import("@reduxjs/toolkit").ThunkDispatch<IKgWorkStationState, undefined, import("@reduxjs/toolkit").UnknownAction>;
42
42
  }>, import("@reduxjs/toolkit").StoreEnhancer]>>;
43
- export declare const useReduxDispatch: import("react-redux").UseDispatch<import("@reduxjs/toolkit").ThunkDispatch<IKgWorkStationState, undefined, import("@reduxjs/toolkit").UnknownAction> & import("@reduxjs/toolkit").Dispatch<import("@reduxjs/toolkit").UnknownAction>>;
44
- export declare const useReduxSelector: import("react-redux").UseSelector<IKgWorkStationState>;
43
+ export declare const useKgWorkStationDispatch: import("react-redux").UseDispatch<import("@reduxjs/toolkit").ThunkDispatch<IKgWorkStationState, undefined, import("@reduxjs/toolkit").UnknownAction> & import("@reduxjs/toolkit").Dispatch<import("@reduxjs/toolkit").UnknownAction>>;
44
+ export declare const useKgWorkStationSelector: import("react-redux").UseSelector<IKgWorkStationState>;
@@ -2,6 +2,6 @@ export * from './KgModal';
2
2
  export * from './KgVarConfig';
3
3
  export * from './KgWorkStation';
4
4
  /**
5
- * 初始化 web component.
5
+ * 初始化所有的 web component.
6
6
  */
7
- export declare function initWebComponent(): void;
7
+ export declare function initWebComponents(): void;
@@ -0,0 +1,12 @@
1
+ export declare const es_ES: {
2
+ 'KgWorkStation.modalTitle': string;
3
+ 'KgWorkStation.reloadMessage': string;
4
+ 'KgWorkStation.selectWorkStation': string;
5
+ 'KgWorkStation.workStation': string;
6
+ 'KgWorkStation.workStationAndWorkStationArea': string;
7
+ 'KgWorkStation.workStationArea': string;
8
+ 'kg.cancel': string;
9
+ 'kg.confirm': string;
10
+ 'kg.confirmDelete': string;
11
+ 'kg.refresh': string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const fr_FR: {
2
+ 'KgWorkStation.modalTitle': string;
3
+ 'KgWorkStation.reloadMessage': string;
4
+ 'KgWorkStation.selectWorkStation': string;
5
+ 'KgWorkStation.workStation': string;
6
+ 'KgWorkStation.workStationAndWorkStationArea': string;
7
+ 'KgWorkStation.workStationArea': string;
8
+ 'kg.cancel': string;
9
+ 'kg.confirm': string;
10
+ 'kg.confirmDelete': string;
11
+ 'kg.refresh': string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const km_KH: {
2
+ 'KgWorkStation.modalTitle': string;
3
+ 'KgWorkStation.reloadMessage': string;
4
+ 'KgWorkStation.selectWorkStation': string;
5
+ 'KgWorkStation.workStation': string;
6
+ 'KgWorkStation.workStationAndWorkStationArea': string;
7
+ 'KgWorkStation.workStationArea': string;
8
+ 'kg.cancel': string;
9
+ 'kg.confirm': string;
10
+ 'kg.confirmDelete': string;
11
+ 'kg.refresh': string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const ko_KR: {
2
+ 'KgWorkStation.modalTitle': string;
3
+ 'KgWorkStation.reloadMessage': string;
4
+ 'KgWorkStation.selectWorkStation': string;
5
+ 'KgWorkStation.workStation': string;
6
+ 'KgWorkStation.workStationAndWorkStationArea': string;
7
+ 'KgWorkStation.workStationArea': string;
8
+ 'kg.cancel': string;
9
+ 'kg.confirm': string;
10
+ 'kg.confirmDelete': string;
11
+ 'kg.refresh': string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const vi_VN: {
2
+ 'KgWorkStation.modalTitle': string;
3
+ 'KgWorkStation.reloadMessage': string;
4
+ 'KgWorkStation.selectWorkStation': string;
5
+ 'KgWorkStation.workStation': string;
6
+ 'KgWorkStation.workStationAndWorkStationArea': string;
7
+ 'KgWorkStation.workStationArea': string;
8
+ 'kg.cancel': string;
9
+ 'kg.confirm': string;
10
+ 'kg.confirmDelete': string;
11
+ 'kg.refresh': string;
12
+ };
package/src/index.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import './asset/index.css';
2
2
  import './iconify.init';
3
+ import { IKgOption } from './component/Kg';
3
4
  export { doKgWorkStation, type IDoKgWorkStation } from './component';
4
5
  export { setHttpClient } from './service';
5
6
  export interface IKgCoreReactOptions {
7
+ /**
8
+ * 选项.
9
+ */
10
+ option?: IKgOption;
6
11
  /**
7
12
  * vue 中的 ref() 函数.
8
13
  *
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare function Kg({ children }: {
3
- children?: React.ReactNode;
4
- }): React.JSX.Element;