@zhongguo168a/yxeditor-common 0.0.40 → 0.0.43
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 +80 -91
- package/dist/index.esm.js +363 -364
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1035,28 +1035,78 @@ declare enum ViewEvent {
|
|
|
1035
1035
|
Closed = "closed",
|
|
1036
1036
|
Stop = "stop"
|
|
1037
1037
|
}
|
|
1038
|
-
declare class
|
|
1039
|
-
constructor(controller:
|
|
1038
|
+
declare class RouteView extends EventDispatcher {
|
|
1039
|
+
constructor(controller: RouteController, route: Route);
|
|
1040
|
+
open(): void;
|
|
1041
|
+
close(): void;
|
|
1042
|
+
refresh(): void;
|
|
1040
1043
|
/**
|
|
1041
1044
|
* 等待发送的结果
|
|
1042
1045
|
* 如果返回 null,表示主动取消 [cancel]
|
|
1043
1046
|
*/
|
|
1044
1047
|
wait(): Promise<this>;
|
|
1045
1048
|
toString(): string;
|
|
1049
|
+
/**
|
|
1050
|
+
* 等待打开完成指令
|
|
1051
|
+
*/
|
|
1052
|
+
waitOpenComplete(): void;
|
|
1053
|
+
openComplete(): void;
|
|
1054
|
+
protected waitCloseComplete(view: RouteView): void;
|
|
1055
|
+
closeComplete(this: RouteView): void;
|
|
1046
1056
|
protected _waitOpenComplete: boolean;
|
|
1047
1057
|
protected _waitCloseComplete: boolean;
|
|
1048
|
-
get controller():
|
|
1058
|
+
get controller(): RouteController;
|
|
1049
1059
|
get route(): Route;
|
|
1060
|
+
onOpen: () => void;
|
|
1061
|
+
onOpened: () => void;
|
|
1062
|
+
onClose: () => void;
|
|
1063
|
+
onClosed: () => void;
|
|
1064
|
+
onRefresh: () => void;
|
|
1050
1065
|
node: Node;
|
|
1051
1066
|
datas: {};
|
|
1052
1067
|
tags: {};
|
|
1068
|
+
enableHistory: boolean;
|
|
1053
1069
|
layer: string;
|
|
1054
1070
|
state: ViewState;
|
|
1055
|
-
protected _controller:
|
|
1071
|
+
protected _controller: RouteController;
|
|
1072
|
+
protected _route: Route;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
declare function OpenPageHandler(route: Route): Promise<void>;
|
|
1076
|
+
declare function OpenDialogHandler(route?: Route): Promise<void>;
|
|
1077
|
+
declare function CloseDialogHandler(route?: Route): RouteView;
|
|
1078
|
+
/**
|
|
1079
|
+
* @param route
|
|
1080
|
+
* @returns
|
|
1081
|
+
*/
|
|
1082
|
+
declare function ClosePageHandler(route?: Route): Promise<RouteView>;
|
|
1083
|
+
declare class RouteController extends Controller {
|
|
1084
|
+
constructor(routePath: string);
|
|
1085
|
+
open(): void;
|
|
1086
|
+
/**
|
|
1087
|
+
* 当视图需要通过路由打开时,需要实现此方法
|
|
1088
|
+
* @param route
|
|
1089
|
+
*/
|
|
1090
|
+
openByRoute(route?: Route): RouteView;
|
|
1091
|
+
protected refreshView(view: RouteView): void;
|
|
1092
|
+
close(): void;
|
|
1093
|
+
/**
|
|
1094
|
+
* 当视图需要通过路由关闭时,需要实现此方法
|
|
1095
|
+
* @param route
|
|
1096
|
+
* @returns
|
|
1097
|
+
*/
|
|
1098
|
+
closeByRoute(route?: Route): RouteView;
|
|
1099
|
+
refresh(): void;
|
|
1100
|
+
hasTags(tags: string[]): boolean;
|
|
1101
|
+
setTags(tags: string[]): this;
|
|
1102
|
+
get lastView(): RouteView;
|
|
1103
|
+
get route(): Route;
|
|
1056
1104
|
protected _route: Route;
|
|
1105
|
+
protected _lastView: RouteView;
|
|
1106
|
+
protected _tags: {};
|
|
1057
1107
|
}
|
|
1058
1108
|
|
|
1059
|
-
declare class
|
|
1109
|
+
declare class UIObjectRepo extends Dictionary<string, any | List> {
|
|
1060
1110
|
/**
|
|
1061
1111
|
* 获取唯一的
|
|
1062
1112
|
* @param prefab
|
|
@@ -1067,117 +1117,56 @@ declare class UIObjectDict extends Dictionary<string, any | List> {
|
|
|
1067
1117
|
backObject(object: Node): void;
|
|
1068
1118
|
protected getList(key: any): List;
|
|
1069
1119
|
}
|
|
1070
|
-
|
|
1120
|
+
/**
|
|
1121
|
+
* 全局的UI对象库,用于管理一些常用的ui对象,例如主界面,背包
|
|
1122
|
+
*/
|
|
1123
|
+
declare var uirepo: UIObjectRepo;
|
|
1071
1124
|
|
|
1072
|
-
declare class
|
|
1125
|
+
declare class ViewHistory extends RouteList {
|
|
1126
|
+
back(): void;
|
|
1127
|
+
}
|
|
1128
|
+
declare const viewhistorys: ViewHistory;
|
|
1129
|
+
|
|
1130
|
+
declare class ViewList extends List<RouteView> {
|
|
1073
1131
|
}
|
|
1074
1132
|
/**
|
|
1075
1133
|
* 路由唯一编号->视图
|
|
1076
1134
|
*/
|
|
1077
|
-
declare class ViewDict extends Dictionary<string,
|
|
1135
|
+
declare class ViewDict extends Dictionary<string, RouteView> {
|
|
1078
1136
|
}
|
|
1079
1137
|
declare class ViewRepo extends ViewDict {
|
|
1080
1138
|
constructor();
|
|
1081
|
-
openByString(route: string):
|
|
1139
|
+
openByString(route: string): RouteView;
|
|
1082
1140
|
/**
|
|
1083
1141
|
* 打开页面
|
|
1084
1142
|
* 一个路由代表一个页面
|
|
1085
1143
|
* @param route
|
|
1086
1144
|
*/
|
|
1087
|
-
open(route: Route):
|
|
1145
|
+
open(route: Route): RouteView;
|
|
1088
1146
|
close(route: Route): void;
|
|
1089
1147
|
/**
|
|
1148
|
+
* 关闭相斥的视图对象
|
|
1149
|
+
* 1. 关闭同一层的所有视图对象
|
|
1150
|
+
* 2. 关闭符合相斥规则的视图对象
|
|
1151
|
+
* @param view
|
|
1152
|
+
* @param validFunc 符合条件的视图对象会被关闭
|
|
1153
|
+
* @returns 被关闭的视图
|
|
1154
|
+
*/
|
|
1155
|
+
closeExclusion(validFunc?: (existed: RouteView) => boolean): ViewList;
|
|
1156
|
+
/**
|
|
1090
1157
|
* 如果页面存在,则刷新
|
|
1091
1158
|
* @param route
|
|
1092
1159
|
*/
|
|
1093
1160
|
refresh(route: Route): void;
|
|
1094
|
-
getByRoute(route: Route):
|
|
1161
|
+
getByRoute(route: Route): RouteView;
|
|
1095
1162
|
listByRoutePath(path: string): ViewList;
|
|
1096
1163
|
listByTags(tags: string[]): ViewList;
|
|
1097
|
-
protected getController(name: string):
|
|
1098
|
-
get objectDict(): UIObjectDict;
|
|
1099
|
-
protected _objectDict: UIObjectDict;
|
|
1164
|
+
protected getController(name: string): RouteController;
|
|
1100
1165
|
protected _indexLayer: {};
|
|
1101
1166
|
protected _indexRoute: {};
|
|
1102
1167
|
}
|
|
1103
1168
|
declare const viewrepo: ViewRepo;
|
|
1104
1169
|
|
|
1105
|
-
declare class ViewController extends Controller {
|
|
1106
|
-
constructor(routeName: string);
|
|
1107
|
-
/**
|
|
1108
|
-
* 当视图需要通过路由打开时,需要实现此方法
|
|
1109
|
-
* @param route
|
|
1110
|
-
*/
|
|
1111
|
-
open(route?: Route): View;
|
|
1112
|
-
protected onOpening(view: View): void;
|
|
1113
|
-
protected onOpened(view: View): void;
|
|
1114
|
-
protected onClosing(view: View): void;
|
|
1115
|
-
protected onClosed(view: View): void;
|
|
1116
|
-
protected refreshView(view: View): void;
|
|
1117
|
-
protected openView(view: View): void;
|
|
1118
|
-
/**
|
|
1119
|
-
* 等待打开完成指令
|
|
1120
|
-
*/
|
|
1121
|
-
protected waitOpenComplete(view: View): void;
|
|
1122
|
-
protected openComplete(view: View): void;
|
|
1123
|
-
/**
|
|
1124
|
-
* 当视图需要通过路由关闭时,需要实现此方法
|
|
1125
|
-
* @param route
|
|
1126
|
-
* @returns
|
|
1127
|
-
*/
|
|
1128
|
-
close(route?: Route): View;
|
|
1129
|
-
/**
|
|
1130
|
-
* 关闭相斥的视图对象
|
|
1131
|
-
* 1. 关闭同一层的所有视图对象
|
|
1132
|
-
* 2. 关闭符合相斥规则的视图对象
|
|
1133
|
-
* @param view
|
|
1134
|
-
* @param validFunc 符合条件的视图对象会被关闭
|
|
1135
|
-
* @returns 被关闭的视图
|
|
1136
|
-
*/
|
|
1137
|
-
closeExclusion(validFunc?: (existed: View) => boolean): ViewList;
|
|
1138
|
-
protected closeView(view: View): void;
|
|
1139
|
-
protected waitCloseComplete(view: View): void;
|
|
1140
|
-
protected closeComplete(view: View): void;
|
|
1141
|
-
refresh(): void;
|
|
1142
|
-
get layer(): string;
|
|
1143
|
-
hasTags(tags: string[]): boolean;
|
|
1144
|
-
setLayer(name: string): this;
|
|
1145
|
-
setTags(tags: string[]): this;
|
|
1146
|
-
useHistory(): this;
|
|
1147
|
-
get lastView(): View;
|
|
1148
|
-
get route(): Route;
|
|
1149
|
-
get enableHistory(): boolean;
|
|
1150
|
-
protected _enableHistory: boolean;
|
|
1151
|
-
protected _route: Route;
|
|
1152
|
-
protected _lastView: View;
|
|
1153
|
-
protected _tags: {};
|
|
1154
|
-
protected _layer: string;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
declare class ViewHistory extends RouteList {
|
|
1158
|
-
back(): void;
|
|
1159
|
-
}
|
|
1160
|
-
declare const viewhistorys: ViewHistory;
|
|
1161
|
-
|
|
1162
|
-
declare class PageController extends ViewController {
|
|
1163
|
-
constructor(routeName: string);
|
|
1164
|
-
/**
|
|
1165
|
-
* 打开视图,如果视图已经存在则刷新视图
|
|
1166
|
-
* @param route
|
|
1167
|
-
*/
|
|
1168
|
-
open(route: Route): View;
|
|
1169
|
-
/**
|
|
1170
|
-
* @param route
|
|
1171
|
-
* @returns
|
|
1172
|
-
*/
|
|
1173
|
-
close(route?: Route): View;
|
|
1174
|
-
useHistory(): this;
|
|
1175
|
-
get route(): Route;
|
|
1176
|
-
get enableHistory(): boolean;
|
|
1177
|
-
protected _enableHistory: boolean;
|
|
1178
|
-
protected _layer: string;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
1170
|
/**
|
|
1182
1171
|
* 事件字符串分隔符
|
|
1183
1172
|
*/
|
|
@@ -2040,5 +2029,5 @@ declare class WidgetUtil {
|
|
|
2040
2029
|
}
|
|
2041
2030
|
declare var widgetutil: WidgetUtil;
|
|
2042
2031
|
|
|
2043
|
-
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,
|
|
2032
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, CloseDialogHandler, ClosePageHandler, 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, OpenDialogHandler, OpenPageHandler, 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 };
|
|
2044
2033
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventDispatcher, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };
|