knight-web 2.0.7 → 2.0.8

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.
@@ -1,36 +1,36 @@
1
- import React from "react";
2
- import { Knight } from "../core";
3
- /** 抽象对象基类 */
4
- export declare abstract class AbstractObject<Props extends AbstractObjectProps = AbstractObjectProps> extends React.Component<Props, Props> {
5
- /** 组件ID */
6
- protected id: string;
7
- /** Knight实例 */
8
- protected get knight(): Knight;
9
- /** 构造函数 */
10
- constructor(props: Props);
11
- /** 组件挂载 */
12
- componentDidMount(): void;
13
- /** 组件刷新 */
14
- componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<Props>, snapshot?: any): void;
15
- /** 组件是否应该刷新 */
16
- shouldComponentUpdate(nextProps: Readonly<Props>, nextState?: Readonly<Props>, nextContext?: any): boolean;
17
- /** 组件卸载 */
18
- componentWillUnmount(): void;
19
- /** 组件捕获 */
20
- componentDidCatch(error: any, errorInfo: any): boolean;
21
- /** 组件渲染 */
22
- render(): React.ReactElement;
23
- /** 加载 */
24
- protected abstract OnLoad(): void;
25
- /** 卸载 */
26
- protected abstract OnDestroy(): void;
27
- /** 刷新 */
28
- protected abstract OnUpdate(prevProps: Readonly<Props>, prevState: Readonly<Props>): void;
29
- /** 提交渲染 */
30
- protected abstract OnRender(props: Readonly<Props>): React.ReactElement;
31
- }
32
- /** 抽象属性接口 */
33
- export declare abstract class AbstractObjectProps implements React.HTMLAttributes<HTMLDivElement>, React.ClassAttributes<HTMLDivElement> {
34
- /** 自定义属性 */
35
- [key: string]: any;
36
- }
1
+ import React from "react";
2
+ import { Knight } from "../core";
3
+ /** 抽象对象基类 */
4
+ export declare abstract class AbstractObject<Props extends AbstractObjectProps = AbstractObjectProps> extends React.Component<Props, Props> {
5
+ /** 组件ID */
6
+ protected id: string;
7
+ /** Knight实例 */
8
+ protected get knight(): Knight;
9
+ /** 构造函数 */
10
+ constructor(props: Props);
11
+ /** 组件挂载 */
12
+ componentDidMount(): void;
13
+ /** 组件刷新 */
14
+ componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<Props>, snapshot?: any): void;
15
+ /** 组件是否应该刷新 */
16
+ shouldComponentUpdate(nextProps: Readonly<Props>, nextState?: Readonly<Props>, nextContext?: any): boolean;
17
+ /** 组件卸载 */
18
+ componentWillUnmount(): void;
19
+ /** 组件捕获 */
20
+ componentDidCatch(error: any, errorInfo: any): boolean;
21
+ /** 组件渲染 */
22
+ render(): React.ReactElement;
23
+ /** 加载 */
24
+ protected abstract OnLoad(): void;
25
+ /** 卸载 */
26
+ protected abstract OnDestroy(): void;
27
+ /** 刷新 */
28
+ protected abstract OnUpdate(prevProps: Readonly<Props>, prevState: Readonly<Props>): void;
29
+ /** 提交渲染 */
30
+ protected abstract OnRender(): React.ReactElement;
31
+ }
32
+ /** 抽象属性接口 */
33
+ export declare abstract class AbstractObjectProps implements React.HTMLAttributes<HTMLDivElement>, React.ClassAttributes<HTMLDivElement> {
34
+ /** 自定义属性 */
35
+ [key: string]: any;
36
+ }
@@ -1,4 +1,4 @@
1
- import { AbstractObject } from "./AbstractObject";
2
- /** 抽象界面基类 */
3
- export declare abstract class AbstractPanel extends AbstractObject {
4
- }
1
+ import { AbstractObject } from "./AbstractObject";
2
+ /** 抽象界面基类 */
3
+ export declare abstract class AbstractPanel extends AbstractObject {
4
+ }
@@ -1,2 +1,2 @@
1
- export * from './AbstractObject';
2
- export * from './AbstractPanel';
1
+ export * from './AbstractObject';
2
+ export * from './AbstractPanel';
@@ -1,42 +1,42 @@
1
- import { BrowserUtility, InputUtility, NetworkUtility, ObjectUtility } from '../utility';
2
- import { AbstractObject } from '../base';
3
- export declare class Knight {
4
- /** 全局单例 */
5
- private static instance;
6
- static get Instance(): Knight;
7
- /** 根容器 */
8
- private htmlRoot;
9
- /** 渲染器 */
10
- private renderer;
11
- /** 配置 */
12
- private config;
13
- /** 全局对象池 */
14
- get Objects(): ObjectUtility.MapPool<AbstractObject>;
15
- private _objects;
16
- /** 全局事件系统 */
17
- get Event(): ObjectUtility.EventSystem;
18
- private _event;
19
- /** 路由历史数据 */
20
- get History(): BrowserUtility.BrowserHistory;
21
- private _history;
22
- /** 本地路由数据 */
23
- get Location(): BrowserUtility.BrowserLocation;
24
- private _location;
25
- /** 本地缓存数据 */
26
- get Storage(): BrowserUtility.LocalStorage;
27
- private _storage;
28
- /** 本地Cookie数据 */
29
- get Cookie(): BrowserUtility.BrowserCookie;
30
- private _cookie;
31
- /** 全局数据 */
32
- get GlobalData(): ObjectUtility.MapPool<object>;
33
- private _globalData;
34
- /** 网络接口 */
35
- get NetWork(): NetworkUtility.NetWork;
36
- private _network;
37
- /** 输入接口 */
38
- get Input(): InputUtility.Input;
39
- private _input;
40
- /** 构造函数 */
41
- private constructor();
42
- }
1
+ import { BrowserUtility, InputUtility, NetworkUtility, ObjectUtility } from '../utility';
2
+ import { AbstractObject } from '../base';
3
+ export declare class Knight {
4
+ /** 全局单例 */
5
+ private static instance;
6
+ static get Instance(): Knight;
7
+ /** 根容器 */
8
+ private htmlRoot;
9
+ /** 渲染器 */
10
+ private renderer;
11
+ /** 配置 */
12
+ private config;
13
+ /** 全局对象池 */
14
+ get Objects(): ObjectUtility.MapPool<AbstractObject>;
15
+ private _objects;
16
+ /** 全局事件系统 */
17
+ get Event(): ObjectUtility.EventSystem;
18
+ private _event;
19
+ /** 路由历史数据 */
20
+ get History(): BrowserUtility.BrowserHistory;
21
+ private _history;
22
+ /** 本地路由数据 */
23
+ get Location(): BrowserUtility.BrowserLocation;
24
+ private _location;
25
+ /** 本地缓存数据 */
26
+ get Storage(): BrowserUtility.LocalStorage;
27
+ private _storage;
28
+ /** 本地Cookie数据 */
29
+ get Cookie(): BrowserUtility.BrowserCookie;
30
+ private _cookie;
31
+ /** 全局数据 */
32
+ get GlobalData(): ObjectUtility.MapPool<object>;
33
+ private _globalData;
34
+ /** 网络接口 */
35
+ get NetWork(): NetworkUtility.NetWork;
36
+ private _network;
37
+ /** 输入接口 */
38
+ get Input(): InputUtility.Input;
39
+ private _input;
40
+ /** 构造函数 */
41
+ private constructor();
42
+ }
@@ -1,26 +1,26 @@
1
- import React from "react";
2
- import { AbstractObject } from "../base";
3
- import { InterfaceUtility } from "../utility";
4
- /** 导航工具 */
5
- export declare class Navgation {
6
- /** 导航配置池 */
7
- private static navgations;
8
- /** 注册导航
9
- * @param option 导航配置
10
- */
11
- static OnRegist(option: NavgationOption): Function;
12
- /** 构建路由 */
13
- static OnRender(): React.ReactElement;
14
- }
15
- /** 导航配置 */
16
- export interface NavgationOption {
17
- /** 路径
18
- * 格式:aaa/bbb/ccc
19
- */
20
- path?: string;
21
- }
22
- /** 导航配置 */
23
- export interface NavgationConfig extends NavgationOption {
24
- /** 组件元素 */
25
- type: InterfaceUtility.IType<AbstractObject>;
26
- }
1
+ import React from "react";
2
+ import { AbstractObject } from "../base";
3
+ import { InterfaceUtility } from "../utility";
4
+ /** 导航工具 */
5
+ export declare class Navgation {
6
+ /** 导航配置池 */
7
+ private static navgations;
8
+ /** 注册导航
9
+ * @param option 导航配置
10
+ */
11
+ static OnRegist(option: NavgationOption): Function;
12
+ /** 构建路由 */
13
+ static OnRender(): React.ReactElement;
14
+ }
15
+ /** 导航配置 */
16
+ export interface NavgationOption {
17
+ /** 路径
18
+ * 格式:aaa/bbb/ccc
19
+ */
20
+ path?: string;
21
+ }
22
+ /** 导航配置 */
23
+ export interface NavgationConfig extends NavgationOption {
24
+ /** 组件元素 */
25
+ type: InterfaceUtility.IType<AbstractObject>;
26
+ }
@@ -1,2 +1,2 @@
1
- export * from './Navgation';
2
- export * from './Knight';
1
+ export * from './Knight';
2
+ export * from './Navgation';
package/frame/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * as Base from './base';
2
- export * as Core from './core';
3
- export * as Utility from "./utility";
1
+ export * as Base from './base';
2
+ export * as Core from './core';
3
+ export * as Utility from "./utility";