@zhongguo168a/yxeditor-common 0.0.18 → 0.0.19
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 +9 -17
- package/dist/index.esm.js +9 -22
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -893,28 +893,19 @@ declare class List<T = any> {
|
|
|
893
893
|
private _onDeleteCaller;
|
|
894
894
|
}
|
|
895
895
|
|
|
896
|
-
interface IModule {
|
|
897
|
-
get controllers(): ControllerDict;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
896
|
interface IController {
|
|
901
897
|
get name(): string;
|
|
902
|
-
get module(): IModule;
|
|
903
|
-
init(core: IModule, ...args: any): any;
|
|
904
898
|
enable(): any;
|
|
905
899
|
disable(): any;
|
|
906
900
|
dispose(): any;
|
|
907
901
|
}
|
|
908
902
|
declare class Controller {
|
|
909
903
|
constructor(name: string);
|
|
910
|
-
init(module: IModule, ...args: any[]): void;
|
|
911
904
|
enable(): void;
|
|
912
905
|
disable(): void;
|
|
913
906
|
dispose(): void;
|
|
914
907
|
get name(): string;
|
|
915
|
-
get module(): IModule;
|
|
916
908
|
get isEnable(): boolean;
|
|
917
|
-
protected _module: IModule;
|
|
918
909
|
protected _name: string;
|
|
919
910
|
protected _enabled: boolean;
|
|
920
911
|
}
|
|
@@ -926,11 +917,13 @@ declare class ControllerDict extends Dictionary<string, IController> {
|
|
|
926
917
|
disableAll(): void;
|
|
927
918
|
}
|
|
928
919
|
declare class ControllerRepo extends ControllerDict {
|
|
929
|
-
constructor(
|
|
920
|
+
constructor();
|
|
930
921
|
add(controller: IController): void;
|
|
931
922
|
remove(name: string): void;
|
|
932
923
|
dispose(): void;
|
|
933
|
-
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
interface IModule {
|
|
934
927
|
}
|
|
935
928
|
|
|
936
929
|
interface IModel {
|
|
@@ -1043,7 +1036,7 @@ declare class PageLayer {
|
|
|
1043
1036
|
declare class PageList extends List<Page> {
|
|
1044
1037
|
}
|
|
1045
1038
|
declare class PageRepo extends PageList {
|
|
1046
|
-
constructor(
|
|
1039
|
+
constructor();
|
|
1047
1040
|
openByString(route: string): Page;
|
|
1048
1041
|
/**
|
|
1049
1042
|
* 打开页面
|
|
@@ -1070,7 +1063,7 @@ declare class PageRepo extends PageList {
|
|
|
1070
1063
|
*/
|
|
1071
1064
|
getLayer(name: string): PageLayer;
|
|
1072
1065
|
protected getOrNewLayer(name: string): PageLayer;
|
|
1073
|
-
getController(
|
|
1066
|
+
getController(name: string): PageController;
|
|
1074
1067
|
registerController(ctrl: PageController): void;
|
|
1075
1068
|
get objectDict(): UIObjectDict;
|
|
1076
1069
|
protected _objectDict: UIObjectDict;
|
|
@@ -1078,8 +1071,8 @@ declare class PageRepo extends PageList {
|
|
|
1078
1071
|
protected _indexRoute: {};
|
|
1079
1072
|
protected _history: Route[];
|
|
1080
1073
|
protected _ctrlDict: ControllerDict;
|
|
1081
|
-
protected _module: IModule;
|
|
1082
1074
|
}
|
|
1075
|
+
declare const pageRepo: PageRepo;
|
|
1083
1076
|
|
|
1084
1077
|
declare class PageController extends Controller {
|
|
1085
1078
|
constructor(routeName: string, config?: {
|
|
@@ -1087,7 +1080,6 @@ declare class PageController extends Controller {
|
|
|
1087
1080
|
tags?: string[];
|
|
1088
1081
|
enableHistory?: boolean;
|
|
1089
1082
|
});
|
|
1090
|
-
init(module: IModule, pageRepo: PageRepo): void;
|
|
1091
1083
|
open(...args: any[]): void;
|
|
1092
1084
|
close(): void;
|
|
1093
1085
|
protected onOpening(page: Page): void;
|
|
@@ -1164,7 +1156,7 @@ declare class Page extends EventManager {
|
|
|
1164
1156
|
protected _waitCloseComplete: boolean;
|
|
1165
1157
|
get controller(): PageController;
|
|
1166
1158
|
get route(): Route;
|
|
1167
|
-
|
|
1159
|
+
datas: {};
|
|
1168
1160
|
tags: {};
|
|
1169
1161
|
layer: string;
|
|
1170
1162
|
state: PageState;
|
|
@@ -2022,5 +2014,5 @@ declare class WidgetUtil {
|
|
|
2022
2014
|
}
|
|
2023
2015
|
declare var widgetutil: WidgetUtil;
|
|
2024
2016
|
|
|
2025
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uidict, uimgr, uiutil, widgetutil };
|
|
2017
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pageRepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uidict, uimgr, uiutil, widgetutil };
|
|
2026
2018
|
export type { CreatorFunction, DisposeFunction, IController, IError, IEventManager, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };
|
package/dist/index.esm.js
CHANGED
|
@@ -3348,9 +3348,6 @@ class Controller {
|
|
|
3348
3348
|
this._enabled = false;
|
|
3349
3349
|
this._name = name;
|
|
3350
3350
|
}
|
|
3351
|
-
init(module, ...args) {
|
|
3352
|
-
this._module = module;
|
|
3353
|
-
}
|
|
3354
3351
|
enable() {
|
|
3355
3352
|
if (this._enabled) {
|
|
3356
3353
|
return;
|
|
@@ -3364,16 +3361,12 @@ class Controller {
|
|
|
3364
3361
|
this._enabled = false;
|
|
3365
3362
|
}
|
|
3366
3363
|
dispose() {
|
|
3367
|
-
this._module = null;
|
|
3368
3364
|
this._enabled = false;
|
|
3369
3365
|
this._name = "";
|
|
3370
3366
|
}
|
|
3371
3367
|
get name() {
|
|
3372
3368
|
return this._name;
|
|
3373
3369
|
}
|
|
3374
|
-
get module() {
|
|
3375
|
-
return this._module;
|
|
3376
|
-
}
|
|
3377
3370
|
get isEnable() {
|
|
3378
3371
|
return this._enabled;
|
|
3379
3372
|
}
|
|
@@ -3406,15 +3399,13 @@ class ControllerDict extends Dictionary {
|
|
|
3406
3399
|
}
|
|
3407
3400
|
}
|
|
3408
3401
|
class ControllerRepo extends ControllerDict {
|
|
3409
|
-
constructor(
|
|
3402
|
+
constructor() {
|
|
3410
3403
|
super();
|
|
3411
|
-
this._mod = mod;
|
|
3412
3404
|
}
|
|
3413
3405
|
add(controller) {
|
|
3414
3406
|
if (this.get(controller.name)) {
|
|
3415
3407
|
throw new Error("重复创建控制器: " + name);
|
|
3416
3408
|
}
|
|
3417
|
-
controller.init(this._mod);
|
|
3418
3409
|
this.set(controller.name, controller);
|
|
3419
3410
|
}
|
|
3420
3411
|
remove(name) {
|
|
@@ -3569,7 +3560,7 @@ class Page extends EventManager {
|
|
|
3569
3560
|
super();
|
|
3570
3561
|
this._waitOpenComplete = false;
|
|
3571
3562
|
this._waitCloseComplete = false;
|
|
3572
|
-
this.
|
|
3563
|
+
this.datas = {};
|
|
3573
3564
|
this.tags = {};
|
|
3574
3565
|
this.state = 0;
|
|
3575
3566
|
this._controller = controller;
|
|
@@ -3793,10 +3784,6 @@ class PageController extends Controller {
|
|
|
3793
3784
|
}
|
|
3794
3785
|
}
|
|
3795
3786
|
}
|
|
3796
|
-
init(module, pageRepo) {
|
|
3797
|
-
this._module = module;
|
|
3798
|
-
this._pagerepo = pageRepo;
|
|
3799
|
-
}
|
|
3800
3787
|
open(...args) {
|
|
3801
3788
|
}
|
|
3802
3789
|
close() {
|
|
@@ -3996,7 +3983,7 @@ class PageLayer {
|
|
|
3996
3983
|
class PageList extends List {
|
|
3997
3984
|
}
|
|
3998
3985
|
class PageRepo extends PageList {
|
|
3999
|
-
constructor(
|
|
3986
|
+
constructor() {
|
|
4000
3987
|
super();
|
|
4001
3988
|
this._indexLayer = {};
|
|
4002
3989
|
this._indexRoute = {};
|
|
@@ -4018,14 +4005,14 @@ class PageRepo extends PageList {
|
|
|
4018
4005
|
* @param route
|
|
4019
4006
|
*/
|
|
4020
4007
|
open(route) {
|
|
4021
|
-
let controller = this.getController(route);
|
|
4008
|
+
let controller = this.getController(route.path);
|
|
4022
4009
|
if (!controller) {
|
|
4023
4010
|
throw new Error("page controller no register: " + route.path);
|
|
4024
4011
|
}
|
|
4025
4012
|
return controller.openByRoute(route);
|
|
4026
4013
|
}
|
|
4027
4014
|
close(route) {
|
|
4028
|
-
let controller = this.getController(route);
|
|
4015
|
+
let controller = this.getController(route.path);
|
|
4029
4016
|
if (!controller) {
|
|
4030
4017
|
throw new Error("page controller no register: " + route.path);
|
|
4031
4018
|
}
|
|
@@ -4079,11 +4066,10 @@ class PageRepo extends PageList {
|
|
|
4079
4066
|
}
|
|
4080
4067
|
return layer;
|
|
4081
4068
|
}
|
|
4082
|
-
getController(
|
|
4083
|
-
return this._ctrlDict.get(
|
|
4069
|
+
getController(name) {
|
|
4070
|
+
return this._ctrlDict.get(name);
|
|
4084
4071
|
}
|
|
4085
4072
|
registerController(ctrl) {
|
|
4086
|
-
ctrl.init(this._module, this);
|
|
4087
4073
|
this._ctrlDict.set(ctrl.name, ctrl);
|
|
4088
4074
|
}
|
|
4089
4075
|
get objectDict() {
|
|
@@ -4095,6 +4081,7 @@ class PageRepo extends PageList {
|
|
|
4095
4081
|
return dict;
|
|
4096
4082
|
}
|
|
4097
4083
|
}
|
|
4084
|
+
const pageRepo = new PageRepo();
|
|
4098
4085
|
|
|
4099
4086
|
class Listener {
|
|
4100
4087
|
static create(ident) {
|
|
@@ -6338,5 +6325,5 @@ class WidgetUtil {
|
|
|
6338
6325
|
}
|
|
6339
6326
|
var widgetutil = new WidgetUtil();
|
|
6340
6327
|
|
|
6341
|
-
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uidict, uimgr, uiutil, widgetutil };
|
|
6328
|
+
export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, Dispatcher, DocUtil, ErrorUtil, EventItem, EventManager, EventUtil, Factory, FloatUtil, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapUtil, MathUtil, Model, NetUtil, Page, PageController, PageEvent, PageLayer, PageList, PageRepo, PageState, PathUtil, Pool, RandUtil, Route, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TimeUtil, Timer, TreeIterator, TreeNode, TreeNodePlugin, TreeRoot, TreeRootPlugin, TreeUtil, UIManager, UIObjectDict, UIPoolConfig, UISingleConfig, UIUtil, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, pageRepo, parseAtlas, parsePlist, pathutil, randutil, resutil, scaleutil, stringutil, timer, timeutil, treeutil, uidict, uimgr, uiutil, widgetutil };
|
|
6342
6329
|
//# sourceMappingURL=index.esm.js.map
|