@zhongguo168a/yxeditor-common 0.0.55 → 0.0.57
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/index.d.ts +133 -132
- package/dist/index.esm.js +5 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1010,136 +1010,6 @@ declare class Route {
|
|
|
1010
1010
|
declare class RouteList extends List<Route> {
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
declare class MapObject extends Dictionary<string, MapValue> {
|
|
1014
|
-
object: {};
|
|
1015
|
-
constructor(object: {});
|
|
1016
|
-
getValue(key: string): MapValue;
|
|
1017
|
-
}
|
|
1018
|
-
declare class MapValue {
|
|
1019
|
-
obj: {};
|
|
1020
|
-
key: any;
|
|
1021
|
-
constructor(obj: {}, key: any);
|
|
1022
|
-
isUndefined(): boolean;
|
|
1023
|
-
toNumber(): number;
|
|
1024
|
-
toString(): string;
|
|
1025
|
-
toBoolean(): boolean;
|
|
1026
|
-
toAny(): any;
|
|
1027
|
-
}
|
|
1028
|
-
declare class MapUtil {
|
|
1029
|
-
/**
|
|
1030
|
-
* 获取所欲的值
|
|
1031
|
-
*/
|
|
1032
|
-
values<T = any>(m: {
|
|
1033
|
-
[key: string]: T;
|
|
1034
|
-
}): T[];
|
|
1035
|
-
/**
|
|
1036
|
-
* 获取所有的键
|
|
1037
|
-
*/
|
|
1038
|
-
keys(m: {
|
|
1039
|
-
[key: string]: any;
|
|
1040
|
-
}): string[];
|
|
1041
|
-
/**
|
|
1042
|
-
* 以字符串数字作为键值的map,转化成数组
|
|
1043
|
-
*/
|
|
1044
|
-
toList<T = any>(m: {
|
|
1045
|
-
[key: string]: T;
|
|
1046
|
-
}): T[];
|
|
1047
|
-
/**
|
|
1048
|
-
* 以字符串数字作为键值的map,转化成数组
|
|
1049
|
-
*/
|
|
1050
|
-
listToMap(list: any[]): any;
|
|
1051
|
-
/**
|
|
1052
|
-
* 转换成数字, 如果原值无效, 返回0
|
|
1053
|
-
* @constructor
|
|
1054
|
-
*/
|
|
1055
|
-
has(m: any, key: string): boolean;
|
|
1056
|
-
/**
|
|
1057
|
-
* 转换成数字, 如果原值无效, 返回0
|
|
1058
|
-
* @constructor
|
|
1059
|
-
*/
|
|
1060
|
-
number(m: any, key: string, dflt?: number): number;
|
|
1061
|
-
/**
|
|
1062
|
-
* 转换成字符串, 如果原值无效, 返回""
|
|
1063
|
-
* @constructor
|
|
1064
|
-
*/
|
|
1065
|
-
string(m: any, key: string, dflt?: string): string;
|
|
1066
|
-
/**
|
|
1067
|
-
* 转换成布尔值, 如果原值无效, 返回false
|
|
1068
|
-
* @constructor
|
|
1069
|
-
*/
|
|
1070
|
-
boolean(m: any, key: string, dflt?: boolean): boolean;
|
|
1071
|
-
/**
|
|
1072
|
-
* 转换成{}, 如果原值无效, 返回{}
|
|
1073
|
-
* @constructor
|
|
1074
|
-
*/
|
|
1075
|
-
map(m: any, key: string, dflt?: boolean | Object): any;
|
|
1076
|
-
/**
|
|
1077
|
-
* 转换成[], 如果原值无效, 返回[]
|
|
1078
|
-
* @constructor
|
|
1079
|
-
*/
|
|
1080
|
-
array(m: any, key: string, dflt?: boolean | Array<any>): any[];
|
|
1081
|
-
/**
|
|
1082
|
-
* 返回第一个符合条件的key
|
|
1083
|
-
* @param m
|
|
1084
|
-
* @param conf
|
|
1085
|
-
*/
|
|
1086
|
-
keyOfConf(m: any, conf: (key: string, item: any) => boolean): string;
|
|
1087
|
-
/**
|
|
1088
|
-
* 比较对象,并返回包含差异的对象
|
|
1089
|
-
* 如果返回 undefined 表示没有差异
|
|
1090
|
-
* @param obj
|
|
1091
|
-
* @param parent
|
|
1092
|
-
* @param removeDefault
|
|
1093
|
-
*/
|
|
1094
|
-
diff(obj: any, parent: any, removeDefault?: boolean): any;
|
|
1095
|
-
/**
|
|
1096
|
-
* 克隆对象
|
|
1097
|
-
* @param obj
|
|
1098
|
-
*/
|
|
1099
|
-
clone(obj: any): any;
|
|
1100
|
-
/**
|
|
1101
|
-
* 通过path设置属性,创建不存在的路径对象
|
|
1102
|
-
* @param obj
|
|
1103
|
-
* @param path "/key1/key2"
|
|
1104
|
-
* @param data
|
|
1105
|
-
*/
|
|
1106
|
-
setByPath(obj: any, path: string, data: any): void;
|
|
1107
|
-
/**
|
|
1108
|
-
* 通过path删除
|
|
1109
|
-
* @param obj
|
|
1110
|
-
* @param path "/key1/key2"
|
|
1111
|
-
*/
|
|
1112
|
-
removeByPath(obj: any, path: string): void;
|
|
1113
|
-
/**
|
|
1114
|
-
* 通过path获取属性
|
|
1115
|
-
* @param obj
|
|
1116
|
-
* @param path
|
|
1117
|
-
*/
|
|
1118
|
-
getByPath(obj: any, path: string): any;
|
|
1119
|
-
flat(obj: any, split?: string): any;
|
|
1120
|
-
_flat(obj: any, result: any, path: string, split?: string): any;
|
|
1121
|
-
/**
|
|
1122
|
-
* 比较两个对象,包括基础类型
|
|
1123
|
-
* @param a
|
|
1124
|
-
* @param b
|
|
1125
|
-
*/
|
|
1126
|
-
compare(a: any, b: any): boolean;
|
|
1127
|
-
/**
|
|
1128
|
-
* 从[from]对象复制到 [to]对象
|
|
1129
|
-
* 如果from字段为object并且等于null,则设置to字段为null
|
|
1130
|
-
* 如果from字段为undefined, 则不覆盖
|
|
1131
|
-
* @param from
|
|
1132
|
-
* @param to
|
|
1133
|
-
* @param tokey 如果[to]存在key才进行拷贝
|
|
1134
|
-
*/
|
|
1135
|
-
copy(from: any, to: any, tokey?: boolean): void;
|
|
1136
|
-
/**
|
|
1137
|
-
* 去掉兼职
|
|
1138
|
-
*/
|
|
1139
|
-
flatString(target: any): string;
|
|
1140
|
-
}
|
|
1141
|
-
declare const maputil: MapUtil;
|
|
1142
|
-
|
|
1143
1013
|
declare enum ViewState {
|
|
1144
1014
|
/**
|
|
1145
1015
|
* 关闭
|
|
@@ -1201,8 +1071,8 @@ declare class RouteView extends EventDispatcher {
|
|
|
1201
1071
|
onStop(value: (ctx: this) => void): this;
|
|
1202
1072
|
get reason(): LinkError;
|
|
1203
1073
|
node: Node;
|
|
1204
|
-
datas:
|
|
1205
|
-
tags:
|
|
1074
|
+
datas: {};
|
|
1075
|
+
tags: {};
|
|
1206
1076
|
enableHistory: boolean;
|
|
1207
1077
|
layer: string;
|
|
1208
1078
|
state: ViewState;
|
|
@@ -1820,6 +1690,137 @@ declare class IdentUtil {
|
|
|
1820
1690
|
}
|
|
1821
1691
|
declare const identutil: IdentUtil;
|
|
1822
1692
|
|
|
1693
|
+
declare class MapObject extends Dictionary<string, MapValue> {
|
|
1694
|
+
object: {};
|
|
1695
|
+
constructor(object: {});
|
|
1696
|
+
getValue(key: string): MapValue;
|
|
1697
|
+
}
|
|
1698
|
+
declare class MapValue {
|
|
1699
|
+
obj: {};
|
|
1700
|
+
key: any;
|
|
1701
|
+
constructor(obj: {}, key: any);
|
|
1702
|
+
set(value: any): void;
|
|
1703
|
+
isUndefined(): boolean;
|
|
1704
|
+
toNumber(): number;
|
|
1705
|
+
toString(): string;
|
|
1706
|
+
toBoolean(): boolean;
|
|
1707
|
+
toAny(): any;
|
|
1708
|
+
}
|
|
1709
|
+
declare class MapUtil {
|
|
1710
|
+
/**
|
|
1711
|
+
* 获取所欲的值
|
|
1712
|
+
*/
|
|
1713
|
+
values<T = any>(m: {
|
|
1714
|
+
[key: string]: T;
|
|
1715
|
+
}): T[];
|
|
1716
|
+
/**
|
|
1717
|
+
* 获取所有的键
|
|
1718
|
+
*/
|
|
1719
|
+
keys(m: {
|
|
1720
|
+
[key: string]: any;
|
|
1721
|
+
}): string[];
|
|
1722
|
+
/**
|
|
1723
|
+
* 以字符串数字作为键值的map,转化成数组
|
|
1724
|
+
*/
|
|
1725
|
+
toList<T = any>(m: {
|
|
1726
|
+
[key: string]: T;
|
|
1727
|
+
}): T[];
|
|
1728
|
+
/**
|
|
1729
|
+
* 以字符串数字作为键值的map,转化成数组
|
|
1730
|
+
*/
|
|
1731
|
+
listToMap(list: any[]): any;
|
|
1732
|
+
/**
|
|
1733
|
+
* 转换成数字, 如果原值无效, 返回0
|
|
1734
|
+
* @constructor
|
|
1735
|
+
*/
|
|
1736
|
+
has(m: any, key: string): boolean;
|
|
1737
|
+
/**
|
|
1738
|
+
* 转换成数字, 如果原值无效, 返回0
|
|
1739
|
+
* @constructor
|
|
1740
|
+
*/
|
|
1741
|
+
number(m: any, key: string, dflt?: number): number;
|
|
1742
|
+
/**
|
|
1743
|
+
* 转换成字符串, 如果原值无效, 返回""
|
|
1744
|
+
* @constructor
|
|
1745
|
+
*/
|
|
1746
|
+
string(m: any, key: string, dflt?: string): string;
|
|
1747
|
+
/**
|
|
1748
|
+
* 转换成布尔值, 如果原值无效, 返回false
|
|
1749
|
+
* @constructor
|
|
1750
|
+
*/
|
|
1751
|
+
boolean(m: any, key: string, dflt?: boolean): boolean;
|
|
1752
|
+
/**
|
|
1753
|
+
* 转换成{}, 如果原值无效, 返回{}
|
|
1754
|
+
* @constructor
|
|
1755
|
+
*/
|
|
1756
|
+
map(m: any, key: string, dflt?: boolean | Object): any;
|
|
1757
|
+
/**
|
|
1758
|
+
* 转换成[], 如果原值无效, 返回[]
|
|
1759
|
+
* @constructor
|
|
1760
|
+
*/
|
|
1761
|
+
array(m: any, key: string, dflt?: boolean | Array<any>): any[];
|
|
1762
|
+
/**
|
|
1763
|
+
* 返回第一个符合条件的key
|
|
1764
|
+
* @param m
|
|
1765
|
+
* @param conf
|
|
1766
|
+
*/
|
|
1767
|
+
keyOfConf(m: any, conf: (key: string, item: any) => boolean): string;
|
|
1768
|
+
/**
|
|
1769
|
+
* 比较对象,并返回包含差异的对象
|
|
1770
|
+
* 如果返回 undefined 表示没有差异
|
|
1771
|
+
* @param obj
|
|
1772
|
+
* @param parent
|
|
1773
|
+
* @param removeDefault
|
|
1774
|
+
*/
|
|
1775
|
+
diff(obj: any, parent: any, removeDefault?: boolean): any;
|
|
1776
|
+
/**
|
|
1777
|
+
* 克隆对象
|
|
1778
|
+
* @param obj
|
|
1779
|
+
*/
|
|
1780
|
+
clone(obj: any): any;
|
|
1781
|
+
/**
|
|
1782
|
+
* 通过path设置属性,创建不存在的路径对象
|
|
1783
|
+
* @param obj
|
|
1784
|
+
* @param path "/key1/key2"
|
|
1785
|
+
* @param data
|
|
1786
|
+
*/
|
|
1787
|
+
setByPath(obj: any, path: string, data: any): void;
|
|
1788
|
+
/**
|
|
1789
|
+
* 通过path删除
|
|
1790
|
+
* @param obj
|
|
1791
|
+
* @param path "/key1/key2"
|
|
1792
|
+
*/
|
|
1793
|
+
removeByPath(obj: any, path: string): void;
|
|
1794
|
+
/**
|
|
1795
|
+
* 通过path获取属性
|
|
1796
|
+
* @param obj
|
|
1797
|
+
* @param path
|
|
1798
|
+
*/
|
|
1799
|
+
getByPath(obj: any, path: string): any;
|
|
1800
|
+
flat(obj: any, split?: string): any;
|
|
1801
|
+
_flat(obj: any, result: any, path: string, split?: string): any;
|
|
1802
|
+
/**
|
|
1803
|
+
* 比较两个对象,包括基础类型
|
|
1804
|
+
* @param a
|
|
1805
|
+
* @param b
|
|
1806
|
+
*/
|
|
1807
|
+
compare(a: any, b: any): boolean;
|
|
1808
|
+
/**
|
|
1809
|
+
* 从[from]对象复制到 [to]对象
|
|
1810
|
+
* 如果from字段为object并且等于null,则设置to字段为null
|
|
1811
|
+
* 如果from字段为undefined, 则不覆盖
|
|
1812
|
+
* @param from
|
|
1813
|
+
* @param to
|
|
1814
|
+
* @param tokey 如果[to]存在key才进行拷贝
|
|
1815
|
+
*/
|
|
1816
|
+
copy(from: any, to: any, tokey?: boolean): void;
|
|
1817
|
+
/**
|
|
1818
|
+
* 去掉兼职
|
|
1819
|
+
*/
|
|
1820
|
+
flatString(target: any): string;
|
|
1821
|
+
}
|
|
1822
|
+
declare const maputil: MapUtil;
|
|
1823
|
+
|
|
1823
1824
|
declare class MathUtil {
|
|
1824
1825
|
version: number;
|
|
1825
1826
|
TempVec2: Vec2;
|
package/dist/index.esm.js
CHANGED
|
@@ -1140,6 +1140,9 @@ class MapValue {
|
|
|
1140
1140
|
this.obj = obj;
|
|
1141
1141
|
this.key = key;
|
|
1142
1142
|
}
|
|
1143
|
+
set(value) {
|
|
1144
|
+
this.obj[this.key] = value;
|
|
1145
|
+
}
|
|
1143
1146
|
isUndefined() {
|
|
1144
1147
|
return this.obj[this.key] == undefined;
|
|
1145
1148
|
}
|
|
@@ -3890,8 +3893,8 @@ class RouteView extends EventDispatcher {
|
|
|
3890
3893
|
super();
|
|
3891
3894
|
this._waitOpenComplete = false;
|
|
3892
3895
|
this._waitCloseComplete = false;
|
|
3893
|
-
this.datas =
|
|
3894
|
-
this.tags =
|
|
3896
|
+
this.datas = {};
|
|
3897
|
+
this.tags = {};
|
|
3895
3898
|
this.enableHistory = false;
|
|
3896
3899
|
this.state = 0;
|
|
3897
3900
|
this._onStop = (ctx) => {
|