@flashist/appframework 0.0.140 → 0.0.142
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/app/AppModule.js +9 -28
- package/app/AppModule.js.map +1 -1
- package/app/AppSettings.js +1 -1
- package/app/AppSettings.js.map +1 -1
- package/app/commands/LoadAppConfigCommand.js +12 -34
- package/app/commands/LoadAppConfigCommand.js.map +1 -1
- package/app/commands/ParseStaticItemsConfigCommand.js +10 -32
- package/app/commands/ParseStaticItemsConfigCommand.js.map +1 -1
- package/app/data/state/AppModuleState.d.ts +1 -1
- package/app/data/state/AppModuleState.js +1 -1
- package/app/data/state/AppModuleState.js.map +1 -1
- package/app/managers/AppManager.js +18 -44
- package/app/managers/AppManager.js.map +1 -1
- package/app/views/AppMainContainer.js +11 -36
- package/app/views/AppMainContainer.js.map +1 -1
- package/assets/commands/ParseAssetsConfigCommand.js +6 -27
- package/assets/commands/ParseAssetsConfigCommand.js.map +1 -1
- package/base/BaseObjectWithGlobalDispatcher.js +9 -48
- package/base/BaseObjectWithGlobalDispatcher.js.map +1 -1
- package/base/commands/BaseAppCommand.js +9 -48
- package/base/commands/BaseAppCommand.js.map +1 -1
- package/base/managers/BaseAppManager.js +2 -23
- package/base/managers/BaseAppManager.js.map +1 -1
- package/base/mediators/BaseAppMediator.js +8 -29
- package/base/mediators/BaseAppMediator.js.map +1 -1
- package/base/models/BaseAppModel.js +2 -23
- package/base/models/BaseAppModel.js.map +1 -1
- package/base/modules/AppModulesManager.js +18 -20
- package/base/modules/AppModulesManager.js.map +1 -1
- package/base/modules/BaseAppModule.js +8 -29
- package/base/modules/BaseAppModule.js.map +1 -1
- package/base/views/BaseAppView.js +7 -32
- package/base/views/BaseAppView.js.map +1 -1
- package/containers/ContainersModule.js +5 -26
- package/containers/ContainersModule.js.map +1 -1
- package/containers/managers/ContainersManager.js +12 -31
- package/containers/managers/ContainersManager.js.map +1 -1
- package/date/DateSettings.js +1 -1
- package/date/DateSettings.js.map +1 -1
- package/debug/DebugModule.js +9 -30
- package/debug/DebugModule.js.map +1 -1
- package/debug/data/state/DebugModuleState.d.ts +1 -1
- package/debug/data/state/DebugModuleState.js +1 -1
- package/debug/data/state/DebugModuleState.js.map +1 -1
- package/device/DeviceModule.js +5 -26
- package/device/DeviceModule.js.map +1 -1
- package/device/data/state/DeviceModuleState.d.ts +1 -1
- package/device/data/state/DeviceModuleState.js +1 -1
- package/device/data/state/DeviceModuleState.js.map +1 -1
- package/display/tools/GetSizeTools.js +6 -10
- package/display/tools/GetSizeTools.js.map +1 -1
- package/display/views/AppContainer.js +8 -33
- package/display/views/AppContainer.js.map +1 -1
- package/display/views/button/BaseBtn.js +92 -129
- package/display/views/button/BaseBtn.js.map +1 -1
- package/display/views/button/BaseBtnEvent.js +1 -1
- package/display/views/button/BaseBtnEvent.js.map +1 -1
- package/display/views/button/BaseBtnState.js +26 -30
- package/display/views/button/BaseBtnState.js.map +1 -1
- package/display/views/button/BaseBtnView.js +44 -70
- package/display/views/button/BaseBtnView.js.map +1 -1
- package/display/views/button/DefaultButtonViewConfig.js +3 -5
- package/display/views/button/DefaultButtonViewConfig.js.map +1 -1
- package/display/views/button/SimpleButtonConfig.d.ts +1 -1
- package/display/views/button/SimpleButtonConfig.js +1 -1
- package/display/views/button/SimpleButtonConfig.js.map +1 -1
- package/display/views/button/SimpleButtonState.js +26 -30
- package/display/views/button/SimpleButtonState.js.map +1 -1
- package/display/views/button/SimpleButtonView.js +64 -98
- package/display/views/button/SimpleButtonView.js.map +1 -1
- package/display/views/button/simple-image-button/SimpleImageButton.js +75 -109
- package/display/views/button/simple-image-button/SimpleImageButton.js.map +1 -1
- package/display/views/button/simple-image-button/SimpleImageButtonConfig.d.ts +1 -1
- package/display/views/button/simple-image-button/SimpleImageButtonConfig.js +1 -1
- package/display/views/button/simple-image-button/SimpleImageButtonConfig.js.map +1 -1
- package/display/views/button/simple-image-button/SimpleImageButtonState.js +12 -13
- package/display/views/button/simple-image-button/SimpleImageButtonState.js.map +1 -1
- package/display/views/layout/BaseLayout.js +17 -22
- package/display/views/layout/BaseLayout.js.map +1 -1
- package/display/views/layout/ColumnLayout.js +12 -36
- package/display/views/layout/ColumnLayout.js.map +1 -1
- package/display/views/layout/LayoutConfig.js +3 -5
- package/display/views/layout/LayoutConfig.js.map +1 -1
- package/display/views/layout/MultiColumnLayout.js +10 -28
- package/display/views/layout/MultiColumnLayout.js.map +1 -1
- package/display/views/layout/MultiColumnLayoutConfig.js +2 -23
- package/display/views/layout/MultiColumnLayoutConfig.js.map +1 -1
- package/display/views/layout/RowLayout.js +12 -36
- package/display/views/layout/RowLayout.js.map +1 -1
- package/display/views/layout/container/BaseLayoutableContainer.js +6 -27
- package/display/views/layout/container/BaseLayoutableContainer.js.map +1 -1
- package/display/views/layout/container/ILayoutableChild.d.ts +1 -1
- package/display/views/resize/ResizableContainer.js +39 -76
- package/display/views/resize/ResizableContainer.js.map +1 -1
- package/display/views/simplelist/SimpleList.js +82 -123
- package/display/views/simplelist/SimpleList.js.map +1 -1
- package/display/views/simplelist/SimpleListEvent.js +1 -1
- package/display/views/simplelist/SimpleListEvent.js.map +1 -1
- package/display/views/sizedistributor/SizeDistributor.js +2 -6
- package/display/views/sizedistributor/SizeDistributor.js.map +1 -1
- package/display/views/sizedistributor/SizeDistributorConfig.js +3 -5
- package/display/views/sizedistributor/SizeDistributorConfig.js.map +1 -1
- package/display/views/togglegroup/ToggleGroup.js +74 -107
- package/display/views/togglegroup/ToggleGroup.js.map +1 -1
- package/display/views/togglegroup/ToggleGroupEvent.js +1 -1
- package/display/views/togglegroup/ToggleGroupEvent.js.map +1 -1
- package/display/views/viewstack/ViewLazyCreationServiceLocatorStack.js +6 -27
- package/display/views/viewstack/ViewLazyCreationServiceLocatorStack.js.map +1 -1
- package/display/views/viewstack/ViewLazyCreationStack.js +17 -42
- package/display/views/viewstack/ViewLazyCreationStack.js.map +1 -1
- package/display/views/viewstack/ViewStack.js +42 -75
- package/display/views/viewstack/ViewStack.js.map +1 -1
- package/display/views/viewstack/ViewStackLazyCreation.js +14 -39
- package/display/views/viewstack/ViewStackLazyCreation.js.map +1 -1
- package/ecs/ECSModule.js +5 -26
- package/ecs/ECSModule.js.map +1 -1
- package/ecs/ecs/entities/queries/EntitiesQuery.js +14 -38
- package/ecs/ecs/entities/queries/EntitiesQuery.js.map +1 -1
- package/ecs/ecs/entities/queries/EntitiesQueryEvent.js +1 -1
- package/ecs/ecs/entities/queries/EntitiesQueryEvent.js.map +1 -1
- package/ecs/ecs/systems/System.js +17 -38
- package/ecs/ecs/systems/System.js.map +1 -1
- package/ecs/managers/ECSManager.js +62 -111
- package/ecs/managers/ECSManager.js.map +1 -1
- package/ecs-rendermodule/ECSRenderModule.js +9 -30
- package/ecs-rendermodule/ECSRenderModule.js.map +1 -1
- package/ecs-rendermodule/data/RenderModuleRootContainerId.js +1 -1
- package/ecs-rendermodule/data/RenderModuleRootContainerId.js.map +1 -1
- package/ecs-rendermodule/ecs/components/RenderComponent.d.ts +1 -1
- package/ecs-rendermodule/ecs/components/RenderComponent.js +2 -2
- package/ecs-rendermodule/ecs/components/RenderComponent.js.map +1 -1
- package/ecs-rendermodule/ecs/systems/RenderSystem.js +17 -35
- package/ecs-rendermodule/ecs/systems/RenderSystem.js.map +1 -1
- package/events/commands/DispatchGlobalEventCommand.js +8 -27
- package/events/commands/DispatchGlobalEventCommand.js.map +1 -1
- package/facade/Facade.js +49 -72
- package/facade/Facade.js.map +1 -1
- package/globaleventdispatcher/GlobalEventDispatcherModule.js +5 -26
- package/globaleventdispatcher/GlobalEventDispatcherModule.js.map +1 -1
- package/globaleventdispatcher/commands/WaitGlobalEventCommand.js +11 -31
- package/globaleventdispatcher/commands/WaitGlobalEventCommand.js.map +1 -1
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcher.js +17 -51
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcher.js.map +1 -1
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcherEvent.js +1 -1
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcherEvent.js.map +1 -1
- package/globaleventdispatcher/managers/GlobalEventsCommandManager.js +8 -41
- package/globaleventdispatcher/managers/GlobalEventsCommandManager.js.map +1 -1
- package/hints/commands/AnimateHintCommand.js +19 -39
- package/hints/commands/AnimateHintCommand.js.map +1 -1
- package/hints/data/DefaultHintConfig.js +3 -5
- package/hints/data/DefaultHintConfig.js.map +1 -1
- package/hints/data/HintContainerId.js +1 -1
- package/hints/data/HintContainerId.js.map +1 -1
- package/html/HTMLModule.js +5 -26
- package/html/HTMLModule.js.map +1 -1
- package/html/managers/HTMLManager.js +19 -38
- package/html/managers/HTMLManager.js.map +1 -1
- package/init/commands/InitApplicationCommand.js +5 -23
- package/init/commands/InitApplicationCommand.js.map +1 -1
- package/init/commands/InitApplicationDataCommand.js +7 -28
- package/init/commands/InitApplicationDataCommand.js.map +1 -1
- package/init/commands/InitApplicationDataEvent.js +1 -1
- package/init/commands/InitApplicationDataEvent.js.map +1 -1
- package/init/events/InitApplicationEvent.js +1 -1
- package/init/events/InitApplicationEvent.js.map +1 -1
- package/load/LoadModule.js +11 -31
- package/load/LoadModule.js.map +1 -1
- package/local-storage/LocalStorageModule.js +5 -26
- package/local-storage/LocalStorageModule.js.map +1 -1
- package/local-storage/LocalStorageModuleConfig.js +1 -1
- package/local-storage/LocalStorageModuleConfig.js.map +1 -1
- package/local-storage/managers/LocalStorageManager.js +23 -44
- package/local-storage/managers/LocalStorageManager.js.map +1 -1
- package/locales/LocalesModule.js +5 -26
- package/locales/LocalesModule.js.map +1 -1
- package/locales/commands/ParseLocaleConfigCommand.js +9 -30
- package/locales/commands/ParseLocaleConfigCommand.js.map +1 -1
- package/package.json +1 -1
- package/pages/PagesModule.js +5 -26
- package/pages/PagesModule.js.map +1 -1
- package/pages/commands/ChangePageCommand.js +7 -26
- package/pages/commands/ChangePageCommand.js.map +1 -1
- package/pages/data/state/PagesModuleState.d.ts +1 -1
- package/pages/data/state/PagesModuleState.js +1 -1
- package/pages/data/state/PagesModuleState.js.map +1 -1
- package/pages/views/BasePageView.js +32 -63
- package/pages/views/BasePageView.js.map +1 -1
- package/pages/views/PagesMediator.js +7 -28
- package/pages/views/PagesMediator.js.map +1 -1
- package/pages/views/PagesView.js +17 -43
- package/pages/views/PagesView.js.map +1 -1
- package/pool/ObjectsPoolModule.js +5 -26
- package/pool/ObjectsPoolModule.js.map +1 -1
- package/preloader-page/data/PreloaderPageId.js +1 -1
- package/preloader-page/data/PreloaderPageId.js.map +1 -1
- package/renderer/RendererModule.js +5 -26
- package/renderer/RendererModule.js.map +1 -1
- package/renderer/data/RendererManagerConfigVO.js +3 -5
- package/renderer/data/RendererManagerConfigVO.js.map +1 -1
- package/renderer/events/RendererManagerEvent.js +1 -1
- package/renderer/events/RendererManagerEvent.js.map +1 -1
- package/renderer/managers/RendererManager.js +14 -43
- package/renderer/managers/RendererManager.js.map +1 -1
- package/size/tools/ViewWithSizeAreaTools.js +4 -8
- package/size/tools/ViewWithSizeAreaTools.js.map +1 -1
- package/sounds/SoundsModule.js +9 -30
- package/sounds/SoundsModule.js.map +1 -1
- package/sounds/SoundsSettings.js +1 -1
- package/sounds/SoundsSettings.js.map +1 -1
- package/sounds/managers/BackgroundMusicManager.js +13 -32
- package/sounds/managers/BackgroundMusicManager.js.map +1 -1
- package/sounds/managers/SoundsStorageManager.js +15 -40
- package/sounds/managers/SoundsStorageManager.js.map +1 -1
- package/state/AppStateModule.js +11 -32
- package/state/AppStateModule.js.map +1 -1
- package/state/data/AppStateStorage.js +80 -125
- package/state/data/AppStateStorage.js.map +1 -1
- package/state/data/DeepKeyTypings.d.ts +6 -6
- package/state/data/DeepReadableTypings.d.ts +1 -1
- package/state/tools/AppStateDeepKeyTools.js +25 -35
- package/state/tools/AppStateDeepKeyTools.js.map +1 -1
- package/state/tools/AppStateEventChangeTools.js +5 -9
- package/state/tools/AppStateEventChangeTools.js.map +1 -1
- package/strategy/managers/BaseStrategyManager.js +5 -26
- package/strategy/managers/BaseStrategyManager.js.map +1 -1
- package/strategy/models/BaseStrategyModel.js +21 -44
- package/strategy/models/BaseStrategyModel.js.map +1 -1
- package/strategy/strategies/BaseStrategy.js +7 -28
- package/strategy/strategies/BaseStrategy.js.map +1 -1
- package/time/TimeModule.js +5 -26
- package/time/TimeModule.js.map +1 -1
- package/time/data/state/TimeModuleAppState.d.ts +1 -1
- package/time/data/state/TimeModuleAppState.js +1 -1
- package/time/data/state/TimeModuleAppState.js.map +1 -1
- package/time/managers/TimeManager.js +16 -35
- package/time/managers/TimeManager.js.map +1 -1
- package/windows/managers/WindowsManager.js +24 -44
- package/windows/managers/WindowsManager.js.map +1 -1
- package/windows/views/BaseWindow.js +11 -36
- package/windows/views/BaseWindow.js.map +1 -1
package/app/AppModule.js
CHANGED
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { serviceLocatorAdd } from "@flashist/flibs";
|
|
17
2
|
import { ObjectTools } from '@flashist/fcore';
|
|
18
3
|
import { BaseAppModule } from "../base/modules/BaseAppModule";
|
|
19
4
|
import { AppManager } from "./managers/AppManager";
|
|
20
5
|
import { AppModuleInitialState } from './data/state/AppModuleState';
|
|
21
6
|
import { appStorage } from "../state/AppStateModule";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.debug = debug;
|
|
27
|
-
return _this;
|
|
7
|
+
export class AppModule extends BaseAppModule {
|
|
8
|
+
constructor(debug) {
|
|
9
|
+
super();
|
|
10
|
+
this.debug = debug;
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
init() {
|
|
13
|
+
super.init();
|
|
31
14
|
// Init the app with initial state
|
|
32
|
-
|
|
15
|
+
const initState = ObjectTools.clone(AppModuleInitialState);
|
|
33
16
|
ObjectTools.copyProps(initState, { app: { debug: this.debug } });
|
|
34
17
|
//
|
|
35
18
|
appStorage().initializeWith(initState);
|
|
36
19
|
serviceLocatorAdd(AppManager, { isSingleton: true, forceCreation: true });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}(BaseAppModule));
|
|
40
|
-
export { AppModule };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
41
22
|
//# sourceMappingURL=AppModule.js.map
|
package/app/AppModule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppModule.js","sourceRoot":"","sources":["../../src/app/AppModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppModule.js","sourceRoot":"","sources":["../../src/app/AppModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAkB,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,OAAO,SAAU,SAAQ,aAAa;IAExC,YAAsB,KAAc;QAChC,KAAK,EAAE,CAAC;QADU,UAAK,GAAL,KAAK,CAAS;IAEpC,CAAC;IAED,IAAI;QACA,KAAK,CAAC,IAAI,EAAE,CAAC;QAEb,kCAAkC;QAClC,MAAM,SAAS,GAAmB,WAAW,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3E,WAAW,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAChE,EAAE;QACF,UAAU,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAEvC,iBAAiB,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9E,CAAC;CACJ"}
|
package/app/AppSettings.js
CHANGED
package/app/AppSettings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSettings.js","sourceRoot":"","sources":["../../src/app/AppSettings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"AppSettings.js","sourceRoot":"","sources":["../../src/app/AppSettings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,cAAc,EAAE,UAAU;IAE1B,aAAa,EAAE,wBAAwB;IAEvC,kBAAkB,EAAE,kBAAkB;IACtC,kBAAkB,EAAE,kBAAkB;IACtC,iBAAiB,EAAE,iBAAiB;CACvC,CAAC"}
|
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { CommandErrorCode } from "@flashist/fcore";
|
|
17
2
|
import { getInstance, LoadItemCommand, LoadItemsListCommand, LoadManager } from "@flashist/flibs";
|
|
18
3
|
import { BaseAppCommand } from "../../base/commands/BaseAppCommand";
|
|
19
4
|
import { AppSettings } from "../AppSettings";
|
|
20
5
|
import { appStorage } from "../../state/AppStateModule";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function LoadAppConfigCommand() {
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
LoadAppConfigCommand.prototype.executeInternal = function () {
|
|
27
|
-
var _this = this;
|
|
6
|
+
export class LoadAppConfigCommand extends BaseAppCommand {
|
|
7
|
+
executeInternal() {
|
|
28
8
|
// const appConfigModel: AppConfigModel = getInstance(AppConfigModel);
|
|
29
9
|
new LoadItemCommand({
|
|
30
10
|
src: AppSettings.appConfigPath,
|
|
31
11
|
id: AppSettings.appConfigPath
|
|
32
12
|
})
|
|
33
13
|
.execute()
|
|
34
|
-
.then(
|
|
14
|
+
.then((data) => {
|
|
35
15
|
console.log("LoadAppConfigCommand | executeInternal __ data: ", data);
|
|
36
16
|
appStorage().change()("app.config", data);
|
|
37
17
|
//
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
const appState = appStorage().getState();
|
|
19
|
+
const loadManager = getInstance(LoadManager);
|
|
40
20
|
loadManager.addSubstituteParams({
|
|
41
21
|
locale: appState.app.config.locale
|
|
42
22
|
});
|
|
@@ -46,16 +26,14 @@ var LoadAppConfigCommand = /** @class */ (function (_super) {
|
|
|
46
26
|
new LoadItemsListCommand(appState.app.config.files)
|
|
47
27
|
.execute();
|
|
48
28
|
}
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
29
|
+
this.notifyComplete();
|
|
30
|
+
}, () => {
|
|
31
|
+
const errorText = "LoadAppConfigCommand | executeInternal __ ERROR! Can't load the app-config.json file!";
|
|
52
32
|
console.error(errorText);
|
|
53
33
|
alert(errorText);
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
this.errorCode = CommandErrorCode.GENERAL_ERROR;
|
|
35
|
+
this.terminate();
|
|
56
36
|
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}(BaseAppCommand));
|
|
60
|
-
export { LoadAppConfigCommand };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
61
39
|
//# sourceMappingURL=LoadAppConfigCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadAppConfigCommand.js","sourceRoot":"","sources":["../../../src/app/commands/LoadAppConfigCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadAppConfigCommand.js","sourceRoot":"","sources":["../../../src/app/commands/LoadAppConfigCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACH,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,EACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IAE1C,eAAe;QACrB,sEAAsE;QACtE,IAAI,eAAe,CACf;YACI,GAAG,EAAE,WAAW,CAAC,aAAa;YAC9B,EAAE,EAAE,WAAW,CAAC,aAAa;SAChC,CACJ;aACI,OAAO,EAAE;aACT,IAAI,CACD,CAAC,IAAS,EAAE,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,kDAAkD,EAAE,IAAI,CAAC,CAAC;YAEtE,UAAU,EAAE,CAAC,MAAM,EAAkB,CACjC,YAAY,EACZ,IAAI,CACP,CAAC;YAEF,EAAE;YACF,MAAM,QAAQ,GAAG,UAAU,EAAE,CAAC,QAAQ,EAAkB,CAAC;YACzD,MAAM,WAAW,GAAgB,WAAW,CAAC,WAAW,CAAC,CAAC;YAC1D,WAAW,CAAC,mBAAmB,CAC3B;gBACI,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM;aACrC,CACJ,CAAC;YAEF,EAAE;YACF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,mDAAmD;gBACnD,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAY,CAAC;qBACrD,OAAO,EAAE,CAAC;aAClB;YAED,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1B,CAAC,EACD,GAAG,EAAE;YACD,MAAM,SAAS,GAAW,uFAAuF,CAAC;YAClH,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACzB,KAAK,CAAC,SAAS,CAAC,CAAC;YAEjB,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,aAAa,CAAC;YAChD,IAAI,CAAC,SAAS,EAAE,CAAC;QACrB,CAAC,CACJ,CAAC;IACV,CAAC;CAEJ"}
|
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { CommandErrorCode } from "@flashist/fcore";
|
|
17
2
|
import { GenericObjectsByTypeModel, getInstance, LoadManager } from "@flashist/flibs";
|
|
18
3
|
import { BaseAppCommand } from "../../base/commands/BaseAppCommand";
|
|
19
4
|
import { ECSManager } from "../../ecs/managers/ECSManager";
|
|
20
5
|
import { AppSettings } from "../AppSettings";
|
|
21
6
|
// import {IItemsConfigVO} from "../data/IItemsConfigVO";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
ParseStaticItemsConfigCommand.prototype.executeInternal = function () {
|
|
28
|
-
var loadManager = getInstance(LoadManager);
|
|
29
|
-
var staticItemsConfigFileItem = loadManager.getLoadItem(AppSettings.staticItemsFileId);
|
|
7
|
+
export class ParseStaticItemsConfigCommand extends BaseAppCommand {
|
|
8
|
+
executeInternal() {
|
|
9
|
+
let loadManager = getInstance(LoadManager);
|
|
10
|
+
let staticItemsConfigFileItem = loadManager.getLoadItem(AppSettings.staticItemsFileId);
|
|
30
11
|
if (staticItemsConfigFileItem && staticItemsConfigFileItem.data) {
|
|
31
12
|
if (staticItemsConfigFileItem.data) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
for (
|
|
35
|
-
var singleStaticItem = staticItems_1[_i];
|
|
13
|
+
const ecsManager = getInstance(ECSManager);
|
|
14
|
+
const staticItems = staticItemsConfigFileItem.data;
|
|
15
|
+
for (let singleStaticItem of staticItems) {
|
|
36
16
|
ecsManager.entities.add(singleStaticItem);
|
|
37
17
|
}
|
|
38
18
|
if (staticItemsConfigFileItem.data.items) {
|
|
39
|
-
|
|
19
|
+
const genericObjectsByTypeModel = getInstance(GenericObjectsByTypeModel);
|
|
40
20
|
genericObjectsByTypeModel.commitItems(staticItemsConfigFileItem.data.items);
|
|
41
21
|
}
|
|
42
22
|
}
|
|
@@ -47,8 +27,6 @@ var ParseStaticItemsConfigCommand = /** @class */ (function (_super) {
|
|
|
47
27
|
this.errorCode = CommandErrorCode.GENERAL_ERROR;
|
|
48
28
|
this.terminate();
|
|
49
29
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}(BaseAppCommand));
|
|
53
|
-
export { ParseStaticItemsConfigCommand };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
54
32
|
//# sourceMappingURL=ParseStaticItemsConfigCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseStaticItemsConfigCommand.js","sourceRoot":"","sources":["../../../src/app/commands/ParseStaticItemsConfigCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParseStaticItemsConfigCommand.js","sourceRoot":"","sources":["../../../src/app/commands/ParseStaticItemsConfigCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAoB,yBAAyB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,yDAAyD;AAEzD,MAAM,OAAO,6BAA8B,SAAQ,cAAc;IAEnD,eAAe;QAErB,IAAI,WAAW,GAAgB,WAAW,CAAC,WAAW,CAAC,CAAC;QACxD,IAAI,yBAAyB,GAAqB,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QACzG,IAAI,yBAAyB,IAAI,yBAAyB,CAAC,IAAI,EAAE;YAE7D,IAAI,yBAAyB,CAAC,IAAI,EAAE;gBAChC,MAAM,UAAU,GAAe,WAAW,CAAC,UAAU,CAAC,CAAC;gBACvD,MAAM,WAAW,GAAc,yBAAyB,CAAC,IAAI,CAAC;gBAC9D,KAAK,IAAI,gBAAgB,IAAI,WAAW,EAAE;oBACtC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;iBAC7C;gBAED,IAAI,yBAAyB,CAAC,IAAI,CAAC,KAAK,EAAE;oBACtC,MAAM,yBAAyB,GAA8B,WAAW,CAAC,yBAAyB,CAAC,CAAC;oBACpG,yBAAyB,CAAC,WAAW,CAAC,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC/E;aACJ;YAED,IAAI,CAAC,cAAc,EAAE,CAAC;SAEzB;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;YAC7F,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,aAAa,CAAC;YAChD,IAAI,CAAC,SAAS,EAAE,CAAC;SACpB;IAEL,CAAC;CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppModuleState.js","sourceRoot":"","sources":["../../../../src/app/data/state/AppModuleState.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"AppModuleState.js","sourceRoot":"","sources":["../../../../src/app/data/state/AppModuleState.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,GAAG,EAAE;QACD,KAAK,EAAE,KAAK;QAEZ,gBAAgB,EAAE,CAAC;QACnB,kBAAkB,EAAE,CAAC;QAErB,gBAAgB,EAAE,CAAC;QACnB,6BAA6B,EAAE,CAAC;QAEhC,MAAM,EAAE;YACJ,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE;gBACN,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;gBACJ,KAAK,EAAE,IAAI;gBACX,MAAM,EAAE,IAAI;aACF;SACjB;KACJ;CACJ,CAAC"}
|
|
@@ -1,38 +1,14 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { getInstance } from "@flashist/flibs";
|
|
17
2
|
import { BaseAppManager } from "../../base/managers/BaseAppManager";
|
|
18
3
|
import { LocalStorageManager } from "../../local-storage/managers/LocalStorageManager";
|
|
19
4
|
import { appStorage } from "../../state/AppStateModule";
|
|
20
5
|
import { AppSettings } from "../AppSettings";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
AppManager.prototype.construction = function () {
|
|
27
|
-
var _this = this;
|
|
28
|
-
var args = [];
|
|
29
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
30
|
-
args[_i] = arguments[_i];
|
|
31
|
-
}
|
|
32
|
-
_super.prototype.construction.call(this, args);
|
|
6
|
+
export class AppManager extends BaseAppManager {
|
|
7
|
+
construction(...args) {
|
|
8
|
+
super.construction(args);
|
|
33
9
|
this.storageManager = getInstance(LocalStorageManager);
|
|
34
10
|
this.appState = appStorage().getState();
|
|
35
|
-
|
|
11
|
+
const appModelStorageData = this.storageManager.getParam(AppSettings.storageParamId);
|
|
36
12
|
this.applyStorageData(appModelStorageData);
|
|
37
13
|
// this.appState.app.previousSessionTotalUsageTime = this.appState.app.totalUsageDuration;
|
|
38
14
|
// this.appState.app.sessionStartTime = Date.now();
|
|
@@ -44,21 +20,21 @@ var AppManager = /** @class */ (function (_super) {
|
|
|
44
20
|
appLaunchesCount: this.appState.app.appLaunchesCount + 1
|
|
45
21
|
});
|
|
46
22
|
this.updateStorageData();
|
|
47
|
-
this.updateTimeInterval = setInterval(
|
|
48
|
-
|
|
23
|
+
this.updateTimeInterval = setInterval(() => {
|
|
24
|
+
this.updateUsageTime();
|
|
49
25
|
},
|
|
50
26
|
// 1 min
|
|
51
27
|
1000 * 60);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
}
|
|
29
|
+
updateUsageTime() {
|
|
30
|
+
let sessionTimeDelta = Date.now() - this.appState.app.sessionStartTime;
|
|
55
31
|
// this.appState.app.totalUsageDuration = this.appState.app.previousSessionTotalUsageTime + sessionTimeDelta;
|
|
56
32
|
appStorage().change()("app", {
|
|
57
33
|
totalUsageDuration: this.appState.app.previousSessionTotalUsageTime + sessionTimeDelta
|
|
58
34
|
});
|
|
59
35
|
this.updateStorageData();
|
|
60
|
-
}
|
|
61
|
-
|
|
36
|
+
}
|
|
37
|
+
applyStorageData(data) {
|
|
62
38
|
if (!data) {
|
|
63
39
|
return;
|
|
64
40
|
}
|
|
@@ -68,18 +44,16 @@ var AppManager = /** @class */ (function (_super) {
|
|
|
68
44
|
appLaunchesCount: data.appLaunchesCount,
|
|
69
45
|
totalUsageDuration: data.totalUsageTime
|
|
70
46
|
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
47
|
+
}
|
|
48
|
+
updateStorageData() {
|
|
49
|
+
const storageData = this.generateStorageData();
|
|
74
50
|
this.storageManager.setParam(AppSettings.storageParamId, storageData);
|
|
75
|
-
}
|
|
76
|
-
|
|
51
|
+
}
|
|
52
|
+
generateStorageData() {
|
|
77
53
|
return {
|
|
78
54
|
appLaunchesCount: this.appState.app.appLaunchesCount,
|
|
79
55
|
totalUsageTime: this.appState.app.totalUsageDuration
|
|
80
56
|
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}(BaseAppManager));
|
|
84
|
-
export { AppManager };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
85
59
|
//# sourceMappingURL=AppManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppManager.js","sourceRoot":"","sources":["../../../src/app/managers/AppManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppManager.js","sourceRoot":"","sources":["../../../src/app/managers/AppManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,MAAM,OAAO,UAAW,SAAQ,cAAc;IAOhC,YAAY,CAAC,GAAG,IAAI;QAC1B,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAC;QAEvD,IAAI,CAAC,QAAQ,GAAG,UAAU,EAAE,CAAC,QAAQ,EAAkB,CAAC;QACxD,MAAM,mBAAmB,GAA4B,IAAI,CAAC,cAAc,CAAC,QAAQ,CAA0B,WAAW,CAAC,cAAc,CAAC,CAAC;QACvI,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;QAE3C,0FAA0F;QAC1F,mDAAmD;QACnD,iCAAiC;QACjC,wCAAwC;QACxC,UAAU,EAAE,CAAC,MAAM,EAAkB,CACjC,KAAK,EACL;YACI,6BAA6B,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB;YACnE,gBAAgB,EAAE,IAAI,CAAC,GAAG,EAAE;YAC5B,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,GAAG,CAAC;SAC3D,CACJ,CAAC;QAEF,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,WAAW,CACjC,GAAG,EAAE;YACD,IAAI,CAAC,eAAe,EAAE,CAAC;QAC3B,CAAC;QACD,QAAQ;QACR,IAAI,GAAG,EAAE,CACZ,CAAC;IACN,CAAC;IAES,eAAe;QACrB,IAAI,gBAAgB,GAAW,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC;QAE/E,6GAA6G;QAC7G,UAAU,EAAE,CAAC,MAAM,EAAkB,CACjC,KAAK,EACL;YACI,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,6BAA6B,GAAG,gBAAgB;SACzF,CACJ,CAAC;QAEF,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAES,gBAAgB,CAAC,IAA6B;QACpD,IAAI,CAAC,IAAI,EAAE;YACP,OAAO;SACV;QAED,8DAA8D;QAC9D,8DAA8D;QAC9D,UAAU,EAAE,CAAC,MAAM,EAAkB,CACjC,KAAK,EACL;YACI,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,kBAAkB,EAAE,IAAI,CAAC,cAAc;SAC1C,CACJ,CAAC;IACN,CAAC;IAES,iBAAiB;QACvB,MAAM,WAAW,GAA4B,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACxE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAA0B,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IACnG,CAAC;IAES,mBAAmB;QACzB,OAAO;YACH,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB;YACpD,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB;SACvD,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,54 +1,29 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { PagesView } from "../../pages/views/PagesView";
|
|
17
2
|
import { BaseAppView } from "../../base/views/BaseAppView";
|
|
18
3
|
import { Graphics } from '@flashist/flibs';
|
|
19
4
|
import { AppMainContainerEvent } from "./AppMainContainerEvent";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
}
|
|
25
|
-
AppMainContainer.prototype.construction = function () {
|
|
26
|
-
var args = [];
|
|
27
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
28
|
-
args[_i] = arguments[_i];
|
|
29
|
-
}
|
|
30
|
-
_super.prototype.construction.apply(this, args);
|
|
5
|
+
export class AppMainContainer extends BaseAppView {
|
|
6
|
+
construction(...args) {
|
|
7
|
+
super.construction(...args);
|
|
31
8
|
this.bg = this.createBg();
|
|
32
9
|
this.addChild(this.bg);
|
|
33
10
|
this.pagesView = new PagesView();
|
|
34
11
|
this.addChild(this.pagesView);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
12
|
+
}
|
|
13
|
+
arrange() {
|
|
14
|
+
super.arrange();
|
|
38
15
|
this.globalDispatcher.dispatchEvent(AppMainContainerEvent.PRE_RESIZE);
|
|
39
16
|
// Make the bg a bit bigger to cover the whole screen 100%
|
|
40
17
|
this.bg.width = this.resizeSize.x + 2;
|
|
41
18
|
this.bg.height = this.resizeSize.y + 2;
|
|
42
19
|
this.pagesView.resize(this.resizeSize.x, this.resizeSize.y);
|
|
43
20
|
this.globalDispatcher.dispatchEvent(AppMainContainerEvent.POST_RESIZE);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
}
|
|
22
|
+
createBg() {
|
|
23
|
+
let result = new Graphics();
|
|
47
24
|
result.beginFill(0xFFFFFF, 0);
|
|
48
25
|
result.drawRect(0, 0, 10, 10);
|
|
49
26
|
return result;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}(BaseAppView));
|
|
53
|
-
export { AppMainContainer };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
54
29
|
//# sourceMappingURL=AppMainContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppMainContainer.js","sourceRoot":"","sources":["../../../src/app/views/AppMainContainer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppMainContainer.js","sourceRoot":"","sources":["../../../src/app/views/AppMainContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAA0B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAKnC,YAAY,CAAC,GAAG,IAAI;QAC1B,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEvB,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAES,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;QAEhB,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAEtE,0DAA0D;QAC1D,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;QAEvC,IAAI,CAAC,SAAS,CAAC,MAAM,CACjB,IAAI,CAAC,UAAU,CAAC,CAAC,EACjB,IAAI,CAAC,UAAU,CAAC,CAAC,CACpB,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC3E,CAAC;IAES,QAAQ;QACd,IAAI,MAAM,GAAa,IAAI,QAAQ,EAAE,CAAC;QACtC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC9B,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAE9B,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { getInstance, LoadItemsListCommand, LoadManager } from "@flashist/flibs";
|
|
17
2
|
import { BaseAppCommand } from "../../base/commands/BaseAppCommand";
|
|
18
3
|
import { AppSettings } from "../../app/AppSettings";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
ParseAssetsConfigCommand.prototype.executeInternal = function () {
|
|
25
|
-
var loadManager = getInstance(LoadManager);
|
|
26
|
-
var assetsConfigFileLoadItem = loadManager.getLoadItem(AppSettings.assetsConfigFileId);
|
|
4
|
+
export class ParseAssetsConfigCommand extends BaseAppCommand {
|
|
5
|
+
executeInternal() {
|
|
6
|
+
let loadManager = getInstance(LoadManager);
|
|
7
|
+
let assetsConfigFileLoadItem = loadManager.getLoadItem(AppSettings.assetsConfigFileId);
|
|
27
8
|
if (assetsConfigFileLoadItem && assetsConfigFileLoadItem.data) {
|
|
28
9
|
if (assetsConfigFileLoadItem.data.files) {
|
|
29
10
|
new LoadItemsListCommand(assetsConfigFileLoadItem.data.files)
|
|
@@ -35,8 +16,6 @@ var ParseAssetsConfigCommand = /** @class */ (function (_super) {
|
|
|
35
16
|
console.error("ParseAssetsConfigCommand | executeInternal __ ERROR! Can't find config file!");
|
|
36
17
|
this.terminate();
|
|
37
18
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}(BaseAppCommand));
|
|
41
|
-
export { ParseAssetsConfigCommand };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
42
21
|
//# sourceMappingURL=ParseAssetsConfigCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseAssetsConfigCommand.js","sourceRoot":"","sources":["../../../src/assets/commands/ParseAssetsConfigCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParseAssetsConfigCommand.js","sourceRoot":"","sources":["../../../src/assets/commands/ParseAssetsConfigCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAEjG,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IAE9C,eAAe;QACrB,IAAI,WAAW,GAAgB,WAAW,CAAC,WAAW,CAAC,CAAC;QACxD,IAAI,wBAAwB,GAAqB,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QAEzG,IAAI,wBAAwB,IAAI,wBAAwB,CAAC,IAAI,EAAE;YAC3D,IAAI,wBAAwB,CAAC,IAAI,CAAC,KAAK,EAAE;gBACrC,IAAI,oBAAoB,CAAC,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC;qBACxD,OAAO,EAAE,CAAC;aAClB;YAED,IAAI,CAAC,cAAc,EAAE,CAAC;SAEzB;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YAC9F,IAAI,CAAC,SAAS,EAAE,CAAC;SACpB;IACL,CAAC;CACJ"}
|
|
@@ -1,54 +1,15 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
-
if (ar || !(i in from)) {
|
|
19
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
-
ar[i] = from[i];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
-
};
|
|
25
1
|
import { BaseObject } from "@flashist/fcore";
|
|
26
2
|
import { getInstance } from "@flashist/flibs";
|
|
27
3
|
import { GlobalEventDispatcher } from "../globaleventdispatcher/dispatcher/GlobalEventDispatcher";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
32
|
-
}
|
|
33
|
-
BaseObjectWithGlobalDispatcher.prototype.construction = function () {
|
|
34
|
-
var args = [];
|
|
35
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
36
|
-
args[_i] = arguments[_i];
|
|
37
|
-
}
|
|
38
|
-
_super.prototype.construction.apply(this, args);
|
|
4
|
+
export class BaseObjectWithGlobalDispatcher extends BaseObject {
|
|
5
|
+
construction(...args) {
|
|
6
|
+
super.construction(...args);
|
|
39
7
|
this.globalDispatcher = getInstance(GlobalEventDispatcher);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var args = [];
|
|
44
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
45
|
-
args[_i - 1] = arguments[_i];
|
|
46
|
-
}
|
|
47
|
-
_super.prototype.dispatchEvent.apply(this, __spreadArray([event], args, false));
|
|
8
|
+
}
|
|
9
|
+
dispatchEvent(event, ...args) {
|
|
10
|
+
super.dispatchEvent(event, ...args);
|
|
48
11
|
// Redispatch event to the global level
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}(BaseObject));
|
|
53
|
-
export { BaseObjectWithGlobalDispatcher };
|
|
12
|
+
this.globalDispatcher.dispatchEvent(event, ...args);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
54
15
|
//# sourceMappingURL=BaseObjectWithGlobalDispatcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseObjectWithGlobalDispatcher.js","sourceRoot":"","sources":["../../src/base/BaseObjectWithGlobalDispatcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseObjectWithGlobalDispatcher.js","sourceRoot":"","sources":["../../src/base/BaseObjectWithGlobalDispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAC,qBAAqB,EAAC,MAAM,2DAA2D,CAAC;AAEhG,MAAM,OAAO,8BAA+B,SAAQ,UAAU;IAIhD,YAAY,CAAC,GAAG,IAAI;QAC1B,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5B,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAC/D,CAAC;IAED,aAAa,CAAC,KAAa,EAAE,GAAG,IAAW;QACvC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;QAEpC,uCAAuC;QACvC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;IACxD,CAAC;CAEJ"}
|
|
@@ -1,54 +1,15 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
-
if (ar || !(i in from)) {
|
|
19
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
-
ar[i] = from[i];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
-
};
|
|
25
1
|
import { Command } from "@flashist/fcore";
|
|
26
2
|
import { GlobalEventDispatcher } from "../../globaleventdispatcher/dispatcher/GlobalEventDispatcher";
|
|
27
3
|
import { getInstance } from "@flashist/flibs";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
32
|
-
}
|
|
33
|
-
BaseAppCommand.prototype.construction = function () {
|
|
34
|
-
var args = [];
|
|
35
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
36
|
-
args[_i] = arguments[_i];
|
|
37
|
-
}
|
|
38
|
-
_super.prototype.construction.apply(this, args);
|
|
4
|
+
export class BaseAppCommand extends Command {
|
|
5
|
+
construction(...args) {
|
|
6
|
+
super.construction(...args);
|
|
39
7
|
this.globalDispatcher = getInstance(GlobalEventDispatcher);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var args = [];
|
|
44
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
45
|
-
args[_i - 1] = arguments[_i];
|
|
46
|
-
}
|
|
47
|
-
_super.prototype.dispatchEvent.apply(this, __spreadArray([event], args, false));
|
|
8
|
+
}
|
|
9
|
+
dispatchEvent(event, ...args) {
|
|
10
|
+
super.dispatchEvent(event, ...args);
|
|
48
11
|
// Redispatch event to the global level
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}(Command));
|
|
53
|
-
export { BaseAppCommand };
|
|
12
|
+
this.globalDispatcher.dispatchEvent(event, ...args);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
54
15
|
//# sourceMappingURL=BaseAppCommand.js.map
|