@zhongguo168a/yxeditor-common 0.0.59 → 0.0.61

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 CHANGED
@@ -1010,6 +1010,137 @@ 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
+ set(value: any): void;
1023
+ isUndefined(): boolean;
1024
+ toNumber(): number;
1025
+ toString(): string;
1026
+ toBoolean(): boolean;
1027
+ toAny(): any;
1028
+ }
1029
+ declare class MapUtil {
1030
+ /**
1031
+ * 获取所欲的值
1032
+ */
1033
+ values<T = any>(m: {
1034
+ [key: string]: T;
1035
+ }): T[];
1036
+ /**
1037
+ * 获取所有的键
1038
+ */
1039
+ keys(m: {
1040
+ [key: string]: any;
1041
+ }): string[];
1042
+ /**
1043
+ * 以字符串数字作为键值的map,转化成数组
1044
+ */
1045
+ toList<T = any>(m: {
1046
+ [key: string]: T;
1047
+ }): T[];
1048
+ /**
1049
+ * 以字符串数字作为键值的map,转化成数组
1050
+ */
1051
+ listToMap(list: any[]): any;
1052
+ /**
1053
+ * 转换成数字, 如果原值无效, 返回0
1054
+ * @constructor
1055
+ */
1056
+ has(m: any, key: string): boolean;
1057
+ /**
1058
+ * 转换成数字, 如果原值无效, 返回0
1059
+ * @constructor
1060
+ */
1061
+ number(m: any, key: string, dflt?: number): number;
1062
+ /**
1063
+ * 转换成字符串, 如果原值无效, 返回""
1064
+ * @constructor
1065
+ */
1066
+ string(m: any, key: string, dflt?: string): string;
1067
+ /**
1068
+ * 转换成布尔值, 如果原值无效, 返回false
1069
+ * @constructor
1070
+ */
1071
+ boolean(m: any, key: string, dflt?: boolean): boolean;
1072
+ /**
1073
+ * 转换成{}, 如果原值无效, 返回{}
1074
+ * @constructor
1075
+ */
1076
+ map(m: any, key: string, dflt?: boolean | Object): any;
1077
+ /**
1078
+ * 转换成[], 如果原值无效, 返回[]
1079
+ * @constructor
1080
+ */
1081
+ array(m: any, key: string, dflt?: boolean | Array<any>): any[];
1082
+ /**
1083
+ * 返回第一个符合条件的key
1084
+ * @param m
1085
+ * @param conf
1086
+ */
1087
+ keyOfConf(m: any, conf: (key: string, item: any) => boolean): string;
1088
+ /**
1089
+ * 比较对象,并返回包含差异的对象
1090
+ * 如果返回 undefined 表示没有差异
1091
+ * @param obj
1092
+ * @param parent
1093
+ * @param removeDefault
1094
+ */
1095
+ diff(obj: any, parent: any, removeDefault?: boolean): any;
1096
+ /**
1097
+ * 克隆对象
1098
+ * @param obj
1099
+ */
1100
+ clone(obj: any): any;
1101
+ /**
1102
+ * 通过path设置属性,创建不存在的路径对象
1103
+ * @param obj
1104
+ * @param path "/key1/key2"
1105
+ * @param data
1106
+ */
1107
+ setByPath(obj: any, path: string, data: any): void;
1108
+ /**
1109
+ * 通过path删除
1110
+ * @param obj
1111
+ * @param path "/key1/key2"
1112
+ */
1113
+ removeByPath(obj: any, path: string): void;
1114
+ /**
1115
+ * 通过path获取属性
1116
+ * @param obj
1117
+ * @param path
1118
+ */
1119
+ getByPath(obj: any, path: string): any;
1120
+ flat(obj: any, split?: string): any;
1121
+ _flat(obj: any, result: any, path: string, split?: string): any;
1122
+ /**
1123
+ * 比较两个对象,包括基础类型
1124
+ * @param a
1125
+ * @param b
1126
+ */
1127
+ compare(a: any, b: any): boolean;
1128
+ /**
1129
+ * 从[from]对象复制到 [to]对象
1130
+ * 如果from字段为object并且等于null,则设置to字段为null
1131
+ * 如果from字段为undefined, 则不覆盖
1132
+ * @param from
1133
+ * @param to
1134
+ * @param tokey 如果[to]存在key才进行拷贝
1135
+ */
1136
+ copy(from: any, to: any, tokey?: boolean): void;
1137
+ /**
1138
+ * 去掉兼职
1139
+ */
1140
+ flatString(target: any): string;
1141
+ }
1142
+ declare const maputil: MapUtil;
1143
+
1013
1144
  declare enum ViewState {
1014
1145
  /**
1015
1146
  * 关闭
@@ -1071,8 +1202,8 @@ declare class RouteView extends EventDispatcher {
1071
1202
  onStop(value: (ctx: this) => void): this;
1072
1203
  get reason(): LinkError;
1073
1204
  node: Node;
1074
- datas: {};
1075
- tags: {};
1205
+ datas: MapObject;
1206
+ tags: MapObject;
1076
1207
  enableHistory: boolean;
1077
1208
  layer: string;
1078
1209
  state: ViewState;
@@ -1690,121 +1821,6 @@ declare class IdentUtil {
1690
1821
  }
1691
1822
  declare const identutil: IdentUtil;
1692
1823
 
1693
- declare class MapUtil {
1694
- /**
1695
- * 获取所欲的值
1696
- */
1697
- values<T = any>(m: {
1698
- [key: string]: T;
1699
- }): T[];
1700
- /**
1701
- * 获取所有的键
1702
- */
1703
- keys(m: {
1704
- [key: string]: any;
1705
- }): string[];
1706
- /**
1707
- * 以字符串数字作为键值的map,转化成数组
1708
- */
1709
- toList<T = any>(m: {
1710
- [key: string]: T;
1711
- }): T[];
1712
- /**
1713
- * 以字符串数字作为键值的map,转化成数组
1714
- */
1715
- listToMap(list: any[]): any;
1716
- /**
1717
- * 转换成数字, 如果原值无效, 返回0
1718
- * @constructor
1719
- */
1720
- has(m: any, key: string): boolean;
1721
- /**
1722
- * 转换成数字, 如果原值无效, 返回0
1723
- * @constructor
1724
- */
1725
- number(m: any, key: string, dflt?: number): number;
1726
- /**
1727
- * 转换成字符串, 如果原值无效, 返回""
1728
- * @constructor
1729
- */
1730
- string(m: any, key: string, dflt?: string): string;
1731
- /**
1732
- * 转换成布尔值, 如果原值无效, 返回false
1733
- * @constructor
1734
- */
1735
- boolean(m: any, key: string, dflt?: boolean): boolean;
1736
- /**
1737
- * 转换成{}, 如果原值无效, 返回{}
1738
- * @constructor
1739
- */
1740
- map(m: any, key: string, dflt?: boolean | Object): any;
1741
- /**
1742
- * 转换成[], 如果原值无效, 返回[]
1743
- * @constructor
1744
- */
1745
- array(m: any, key: string, dflt?: boolean | Array<any>): any[];
1746
- /**
1747
- * 返回第一个符合条件的key
1748
- * @param m
1749
- * @param conf
1750
- */
1751
- keyOfConf(m: any, conf: (key: string, item: any) => boolean): string;
1752
- /**
1753
- * 比较对象,并返回包含差异的对象
1754
- * 如果返回 undefined 表示没有差异
1755
- * @param obj
1756
- * @param parent
1757
- * @param removeDefault
1758
- */
1759
- diff(obj: any, parent: any, removeDefault?: boolean): any;
1760
- /**
1761
- * 克隆对象
1762
- * @param obj
1763
- */
1764
- clone(obj: any): any;
1765
- /**
1766
- * 通过path设置属性,创建不存在的路径对象
1767
- * @param obj
1768
- * @param path "/key1/key2"
1769
- * @param data
1770
- */
1771
- setByPath(obj: any, path: string, data: any): void;
1772
- /**
1773
- * 通过path删除
1774
- * @param obj
1775
- * @param path "/key1/key2"
1776
- */
1777
- removeByPath(obj: any, path: string): void;
1778
- /**
1779
- * 通过path获取属性
1780
- * @param obj
1781
- * @param path
1782
- */
1783
- getByPath(obj: any, path: string): any;
1784
- flat(obj: any, split?: string): any;
1785
- _flat(obj: any, result: any, path: string, split?: string): any;
1786
- /**
1787
- * 比较两个对象,包括基础类型
1788
- * @param a
1789
- * @param b
1790
- */
1791
- compare(a: any, b: any): boolean;
1792
- /**
1793
- * 从[from]对象复制到 [to]对象
1794
- * 如果from字段为object并且等于null,则设置to字段为null
1795
- * 如果from字段为undefined, 则不覆盖
1796
- * @param from
1797
- * @param to
1798
- * @param tokey 如果[to]存在key才进行拷贝
1799
- */
1800
- copy(from: any, to: any, tokey?: boolean): void;
1801
- /**
1802
- * 去掉兼职
1803
- */
1804
- flatString(target: any): string;
1805
- }
1806
- declare const maputil: MapUtil;
1807
-
1808
1824
  declare class MathUtil {
1809
1825
  version: number;
1810
1826
  TempVec2: Vec2;
@@ -2047,5 +2063,5 @@ declare class WidgetUtil {
2047
2063
  }
2048
2064
  declare var widgetutil: WidgetUtil;
2049
2065
 
2050
- export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewRepo, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, viewrepo, widgetutil };
2066
+ export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MapValue, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewRepo, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, viewrepo, widgetutil };
2051
2067
  export type { CreatorFunction, DisposeFunction, IController, IError, IEventDispatcher, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };