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