@zhongguo168a/yxeditor-common 0.0.88 → 0.0.90
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 +8 -6
- package/dist/index.esm.js +14 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1326,6 +1326,8 @@ declare class ViewModel extends EventDispatcher {
|
|
|
1326
1326
|
closeComplete(): void;
|
|
1327
1327
|
protected _waitOpenComplete: boolean;
|
|
1328
1328
|
protected _waitCloseComplete: boolean;
|
|
1329
|
+
get controller(): RouteController;
|
|
1330
|
+
get route(): Route;
|
|
1329
1331
|
get reason(): LinkError;
|
|
1330
1332
|
node: Node;
|
|
1331
1333
|
datas: MapObject;
|
|
@@ -1347,12 +1349,12 @@ declare class ViewModel extends EventDispatcher {
|
|
|
1347
1349
|
protected onStop(): void;
|
|
1348
1350
|
}
|
|
1349
1351
|
|
|
1350
|
-
declare class ViewList extends List<
|
|
1352
|
+
declare class ViewList extends List<ViewModel> {
|
|
1351
1353
|
}
|
|
1352
1354
|
/**
|
|
1353
1355
|
* 路由唯一编号->视图
|
|
1354
1356
|
*/
|
|
1355
|
-
declare class ViewDict extends Dictionary<string,
|
|
1357
|
+
declare class ViewDict extends Dictionary<string, ViewModel> {
|
|
1356
1358
|
/**
|
|
1357
1359
|
* 关闭相斥的视图对象
|
|
1358
1360
|
* 1. 关闭同一层的所有视图对象
|
|
@@ -1361,7 +1363,7 @@ declare class ViewDict extends Dictionary<string, any> {
|
|
|
1361
1363
|
* @param validFunc 符合条件的视图对象会被关闭
|
|
1362
1364
|
* @returns 被关闭的视图
|
|
1363
1365
|
*/
|
|
1364
|
-
closeExclusion(validFunc?: (existed:
|
|
1366
|
+
closeExclusion(validFunc?: (existed: ViewModel) => boolean): ViewList;
|
|
1365
1367
|
listByRoutePath(path: string): ViewList;
|
|
1366
1368
|
listByTags(tags: string[]): ViewList;
|
|
1367
1369
|
/**
|
|
@@ -1385,10 +1387,10 @@ declare class RouteViewDict extends ViewDict {
|
|
|
1385
1387
|
* @param route
|
|
1386
1388
|
*/
|
|
1387
1389
|
refresh(route: Route): void;
|
|
1388
|
-
getByRoute(route: Route):
|
|
1390
|
+
getByRoute(route: Route): ViewModel;
|
|
1389
1391
|
protected getController(name: string): RouteController;
|
|
1390
1392
|
}
|
|
1391
|
-
declare const
|
|
1393
|
+
declare const routeViews: RouteViewDict;
|
|
1392
1394
|
|
|
1393
1395
|
/**
|
|
1394
1396
|
* 事件字符串分隔符
|
|
@@ -2180,5 +2182,5 @@ declare class WidgetUtil {
|
|
|
2180
2182
|
}
|
|
2181
2183
|
declare var widgetutil: WidgetUtil;
|
|
2182
2184
|
|
|
2183
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil,
|
|
2185
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, routeViews, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, widgetutil };
|
|
2184
2186
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventDispatcher, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };
|
package/dist/index.esm.js
CHANGED
|
@@ -4128,7 +4128,6 @@ class ViewDict extends Dictionary {
|
|
|
4128
4128
|
}
|
|
4129
4129
|
});
|
|
4130
4130
|
closedList.forEach((index, item) => {
|
|
4131
|
-
item.controller;
|
|
4132
4131
|
item.close();
|
|
4133
4132
|
});
|
|
4134
4133
|
return closedList;
|
|
@@ -4210,18 +4209,18 @@ class RouteViewDict extends ViewDict {
|
|
|
4210
4209
|
return ctrlrepo.get(name);
|
|
4211
4210
|
}
|
|
4212
4211
|
}
|
|
4213
|
-
const
|
|
4212
|
+
const routeViews = new RouteViewDict();
|
|
4214
4213
|
|
|
4215
4214
|
class ViewHistory extends RouteList {
|
|
4216
4215
|
back() {
|
|
4217
4216
|
if (viewhistorys.length == 0) {
|
|
4218
4217
|
return;
|
|
4219
4218
|
}
|
|
4220
|
-
|
|
4219
|
+
routeViews.close(viewhistorys.shift());
|
|
4221
4220
|
if (viewhistorys.length == 0) {
|
|
4222
4221
|
return;
|
|
4223
4222
|
}
|
|
4224
|
-
|
|
4223
|
+
routeViews.open(viewhistorys.last());
|
|
4225
4224
|
}
|
|
4226
4225
|
}
|
|
4227
4226
|
const viewhistorys = new ViewHistory();
|
|
@@ -4275,10 +4274,10 @@ class ViewModel extends EventDispatcher {
|
|
|
4275
4274
|
}
|
|
4276
4275
|
let route = this._route;
|
|
4277
4276
|
if (route) {
|
|
4278
|
-
if (
|
|
4277
|
+
if (routeViews.get(route.key)) {
|
|
4279
4278
|
throw `视图已存在: route=${route.key}`;
|
|
4280
4279
|
}
|
|
4281
|
-
|
|
4280
|
+
routeViews.set(route.key, this);
|
|
4282
4281
|
}
|
|
4283
4282
|
this.state = ViewState.Opening;
|
|
4284
4283
|
this.dispatch(ViewEvent.Opening);
|
|
@@ -4307,7 +4306,7 @@ class ViewModel extends EventDispatcher {
|
|
|
4307
4306
|
}
|
|
4308
4307
|
let route = this._route;
|
|
4309
4308
|
if (route) {
|
|
4310
|
-
|
|
4309
|
+
routeViews.delete(this._route.key);
|
|
4311
4310
|
}
|
|
4312
4311
|
this.state = ViewState.Closeing;
|
|
4313
4312
|
this.dispatch(ViewEvent.Closeing);
|
|
@@ -4407,12 +4406,18 @@ class ViewModel extends EventDispatcher {
|
|
|
4407
4406
|
if (this.state == ViewState.Closed) {
|
|
4408
4407
|
return;
|
|
4409
4408
|
}
|
|
4410
|
-
|
|
4409
|
+
routeViews.delete(this.getIdent());
|
|
4411
4410
|
this._waitCloseComplete = false;
|
|
4412
4411
|
this.state = ViewState.Closed;
|
|
4413
4412
|
this.dispatch(ViewEvent.Closed);
|
|
4414
4413
|
this.onClosed();
|
|
4415
4414
|
}
|
|
4415
|
+
get controller() {
|
|
4416
|
+
return this._controller;
|
|
4417
|
+
}
|
|
4418
|
+
get route() {
|
|
4419
|
+
return this._route;
|
|
4420
|
+
}
|
|
4416
4421
|
get reason() {
|
|
4417
4422
|
return this._reason;
|
|
4418
4423
|
}
|
|
@@ -6847,5 +6852,5 @@ class WidgetUtil {
|
|
|
6847
6852
|
}
|
|
6848
6853
|
var widgetutil = new WidgetUtil();
|
|
6849
6854
|
|
|
6850
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil,
|
|
6855
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, routeViews, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, widgetutil };
|
|
6851
6856
|
//# sourceMappingURL=index.esm.js.map
|