@zhongguo168a/yxeditor-common 0.0.41 → 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 +68 -80
- package/dist/index.esm.js +310 -306
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1035,108 +1035,75 @@ 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;
|
|
1056
1072
|
protected _route: Route;
|
|
1057
1073
|
}
|
|
1058
1074
|
|
|
1059
|
-
declare
|
|
1060
|
-
|
|
1075
|
+
declare function OpenPageHandler(route: Route): Promise<void>;
|
|
1076
|
+
declare function OpenDialogHandler(route?: Route): Promise<void>;
|
|
1077
|
+
declare function CloseDialogHandler(route?: Route): RouteView;
|
|
1061
1078
|
/**
|
|
1062
|
-
*
|
|
1079
|
+
* @param route
|
|
1080
|
+
* @returns
|
|
1063
1081
|
*/
|
|
1064
|
-
declare
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
openByString(route: string): View;
|
|
1069
|
-
/**
|
|
1070
|
-
* 打开页面
|
|
1071
|
-
* 一个路由代表一个页面
|
|
1072
|
-
* @param route
|
|
1073
|
-
*/
|
|
1074
|
-
open(route: Route): View;
|
|
1075
|
-
close(route: Route): void;
|
|
1076
|
-
/**
|
|
1077
|
-
* 如果页面存在,则刷新
|
|
1078
|
-
* @param route
|
|
1079
|
-
*/
|
|
1080
|
-
refresh(route: Route): void;
|
|
1081
|
-
getByRoute(route: Route): View;
|
|
1082
|
-
listByRoutePath(path: string): ViewList;
|
|
1083
|
-
listByTags(tags: string[]): ViewList;
|
|
1084
|
-
protected getController(name: string): ViewController;
|
|
1085
|
-
protected _indexLayer: {};
|
|
1086
|
-
protected _indexRoute: {};
|
|
1087
|
-
}
|
|
1088
|
-
declare const viewrepo: ViewRepo;
|
|
1089
|
-
|
|
1090
|
-
declare class ViewController extends Controller {
|
|
1091
|
-
constructor(routeName: string);
|
|
1082
|
+
declare function ClosePageHandler(route?: Route): Promise<RouteView>;
|
|
1083
|
+
declare class RouteController extends Controller {
|
|
1084
|
+
constructor(routePath: string);
|
|
1085
|
+
open(): void;
|
|
1092
1086
|
/**
|
|
1093
1087
|
* 当视图需要通过路由打开时,需要实现此方法
|
|
1094
1088
|
* @param route
|
|
1095
1089
|
*/
|
|
1096
|
-
|
|
1097
|
-
protected
|
|
1098
|
-
|
|
1099
|
-
protected onClosing(view: View): void;
|
|
1100
|
-
protected onClosed(view: View): void;
|
|
1101
|
-
protected refreshView(view: View): void;
|
|
1102
|
-
protected openView(view: View): void;
|
|
1103
|
-
/**
|
|
1104
|
-
* 等待打开完成指令
|
|
1105
|
-
*/
|
|
1106
|
-
protected waitOpenComplete(view: View): void;
|
|
1107
|
-
protected openComplete(view: View): void;
|
|
1090
|
+
openByRoute(route?: Route): RouteView;
|
|
1091
|
+
protected refreshView(view: RouteView): void;
|
|
1092
|
+
close(): void;
|
|
1108
1093
|
/**
|
|
1109
1094
|
* 当视图需要通过路由关闭时,需要实现此方法
|
|
1110
1095
|
* @param route
|
|
1111
1096
|
* @returns
|
|
1112
1097
|
*/
|
|
1113
|
-
|
|
1114
|
-
/**
|
|
1115
|
-
* 关闭相斥的视图对象
|
|
1116
|
-
* 1. 关闭同一层的所有视图对象
|
|
1117
|
-
* 2. 关闭符合相斥规则的视图对象
|
|
1118
|
-
* @param view
|
|
1119
|
-
* @param validFunc 符合条件的视图对象会被关闭
|
|
1120
|
-
* @returns 被关闭的视图
|
|
1121
|
-
*/
|
|
1122
|
-
closeExclusion(validFunc?: (existed: View) => boolean): ViewList;
|
|
1123
|
-
protected closeView(view: View): void;
|
|
1124
|
-
protected waitCloseComplete(view: View): void;
|
|
1125
|
-
protected closeComplete(view: View): void;
|
|
1098
|
+
closeByRoute(route?: Route): RouteView;
|
|
1126
1099
|
refresh(): void;
|
|
1127
|
-
get layer(): string;
|
|
1128
1100
|
hasTags(tags: string[]): boolean;
|
|
1129
|
-
setLayer(name: string): this;
|
|
1130
1101
|
setTags(tags: string[]): this;
|
|
1131
|
-
|
|
1132
|
-
get lastView(): View;
|
|
1102
|
+
get lastView(): RouteView;
|
|
1133
1103
|
get route(): Route;
|
|
1134
|
-
get enableHistory(): boolean;
|
|
1135
|
-
protected _enableHistory: boolean;
|
|
1136
1104
|
protected _route: Route;
|
|
1137
|
-
protected _lastView:
|
|
1105
|
+
protected _lastView: RouteView;
|
|
1138
1106
|
protected _tags: {};
|
|
1139
|
-
protected _layer: string;
|
|
1140
1107
|
}
|
|
1141
1108
|
|
|
1142
1109
|
declare class UIObjectRepo extends Dictionary<string, any | List> {
|
|
@@ -1160,24 +1127,45 @@ declare class ViewHistory extends RouteList {
|
|
|
1160
1127
|
}
|
|
1161
1128
|
declare const viewhistorys: ViewHistory;
|
|
1162
1129
|
|
|
1163
|
-
declare class
|
|
1164
|
-
|
|
1130
|
+
declare class ViewList extends List<RouteView> {
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* 路由唯一编号->视图
|
|
1134
|
+
*/
|
|
1135
|
+
declare class ViewDict extends Dictionary<string, RouteView> {
|
|
1136
|
+
}
|
|
1137
|
+
declare class ViewRepo extends ViewDict {
|
|
1138
|
+
constructor();
|
|
1139
|
+
openByString(route: string): RouteView;
|
|
1165
1140
|
/**
|
|
1166
|
-
*
|
|
1141
|
+
* 打开页面
|
|
1142
|
+
* 一个路由代表一个页面
|
|
1167
1143
|
* @param route
|
|
1168
1144
|
*/
|
|
1169
|
-
open(route: Route):
|
|
1145
|
+
open(route: Route): RouteView;
|
|
1146
|
+
close(route: Route): void;
|
|
1147
|
+
/**
|
|
1148
|
+
* 关闭相斥的视图对象
|
|
1149
|
+
* 1. 关闭同一层的所有视图对象
|
|
1150
|
+
* 2. 关闭符合相斥规则的视图对象
|
|
1151
|
+
* @param view
|
|
1152
|
+
* @param validFunc 符合条件的视图对象会被关闭
|
|
1153
|
+
* @returns 被关闭的视图
|
|
1154
|
+
*/
|
|
1155
|
+
closeExclusion(validFunc?: (existed: RouteView) => boolean): ViewList;
|
|
1170
1156
|
/**
|
|
1157
|
+
* 如果页面存在,则刷新
|
|
1171
1158
|
* @param route
|
|
1172
|
-
* @returns
|
|
1173
1159
|
*/
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
protected
|
|
1179
|
-
protected
|
|
1160
|
+
refresh(route: Route): void;
|
|
1161
|
+
getByRoute(route: Route): RouteView;
|
|
1162
|
+
listByRoutePath(path: string): ViewList;
|
|
1163
|
+
listByTags(tags: string[]): ViewList;
|
|
1164
|
+
protected getController(name: string): RouteController;
|
|
1165
|
+
protected _indexLayer: {};
|
|
1166
|
+
protected _indexRoute: {};
|
|
1180
1167
|
}
|
|
1168
|
+
declare const viewrepo: ViewRepo;
|
|
1181
1169
|
|
|
1182
1170
|
/**
|
|
1183
1171
|
* 事件字符串分隔符
|
|
@@ -2041,5 +2029,5 @@ declare class WidgetUtil {
|
|
|
2041
2029
|
}
|
|
2042
2030
|
declare var widgetutil: WidgetUtil;
|
|
2043
2031
|
|
|
2044
|
-
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 };
|
|
2045
2033
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventDispatcher, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };
|