@vived/host 3.1.0 → 3.3.0
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/lib/Components/Apps/Adapters/activeAppPMAdapter.d.ts +3 -0
- package/lib/Components/Apps/Adapters/activeAppPMAdapter.js +23 -0
- package/lib/Components/Apps/Adapters/appListPMAdapter.d.ts +2 -0
- package/lib/Components/Apps/Adapters/appListPMAdapter.js +23 -0
- package/lib/Components/Apps/Adapters/appPMAdapter.d.ts +3 -0
- package/lib/Components/Apps/Adapters/appPMAdapter.js +23 -0
- package/lib/Components/Apps/Adapters/index.d.ts +3 -0
- package/lib/Components/Apps/Adapters/index.js +15 -0
- package/lib/Components/Apps/Controllers/index.d.ts +1 -0
- package/lib/Components/Apps/Controllers/index.js +13 -0
- package/lib/Components/Apps/Controllers/updateApp.d.ts +2 -0
- package/lib/Components/Apps/Controllers/updateApp.js +13 -0
- package/lib/Components/Apps/Entities/AppEntity.d.ts +28 -0
- package/lib/Components/Apps/Entities/AppEntity.js +93 -0
- package/lib/Components/Apps/Entities/AppRepo.d.ts +19 -0
- package/lib/Components/Apps/Entities/AppRepo.js +57 -0
- package/lib/Components/Apps/Entities/index.d.ts +2 -0
- package/lib/Components/Apps/Entities/index.js +14 -0
- package/lib/Components/Apps/Mocks/MockActiveAppPM.d.ts +8 -0
- package/lib/Components/Apps/Mocks/MockActiveAppPM.js +15 -0
- package/lib/Components/Apps/Mocks/MockAppListPM.d.ts +8 -0
- package/lib/Components/Apps/Mocks/MockAppListPM.js +15 -0
- package/lib/Components/Apps/Mocks/MockAppMounterUC.d.ts +10 -0
- package/lib/Components/Apps/Mocks/MockAppMounterUC.js +14 -0
- package/lib/Components/Apps/Mocks/MockAppPM.d.ts +7 -0
- package/lib/Components/Apps/Mocks/MockAppPM.js +11 -0
- package/lib/Components/Apps/Mocks/MockStartAppUC.d.ts +7 -0
- package/lib/Components/Apps/Mocks/MockStartAppUC.js +11 -0
- package/lib/Components/Apps/Mocks/MockStopAppUC.d.ts +7 -0
- package/lib/Components/Apps/Mocks/MockStopAppUC.js +11 -0
- package/lib/Components/Apps/Mocks/MockUpdateAppUC.d.ts +7 -0
- package/lib/Components/Apps/Mocks/MockUpdateAppUC.js +11 -0
- package/lib/Components/Apps/Mocks/index.d.ts +7 -0
- package/lib/Components/Apps/Mocks/index.js +19 -0
- package/lib/Components/Apps/PMs/ActiveAppPM.d.ts +10 -0
- package/lib/Components/Apps/PMs/ActiveAppPM.js +15 -0
- package/lib/Components/Apps/PMs/AppPM.d.ts +13 -0
- package/lib/Components/Apps/PMs/AppPM.js +57 -0
- package/lib/Components/Apps/PMs/AppsListPM.d.ts +6 -0
- package/lib/Components/Apps/PMs/AppsListPM.js +51 -0
- package/lib/Components/Apps/PMs/index.d.ts +3 -0
- package/lib/Components/Apps/PMs/index.js +15 -0
- package/lib/Components/Apps/UCs/MounterUC.d.ts +12 -0
- package/lib/Components/Apps/UCs/MounterUC.js +15 -0
- package/lib/Components/Apps/UCs/StartAppUC.d.ts +8 -0
- package/lib/Components/Apps/UCs/StartAppUC.js +27 -0
- package/lib/Components/Apps/UCs/StopAppUC.d.ts +8 -0
- package/lib/Components/Apps/UCs/StopAppUC.js +27 -0
- package/lib/Components/Apps/UCs/UpdateAppUC.d.ts +7 -0
- package/lib/Components/Apps/UCs/UpdateAppUC.js +23 -0
- package/lib/Components/Apps/UCs/appIDWithVersion.d.ts +3 -0
- package/lib/Components/Apps/UCs/appIDWithVersion.js +8 -0
- package/lib/Components/Apps/UCs/index.d.ts +5 -0
- package/lib/Components/Apps/UCs/index.js +17 -0
- package/lib/Components/Apps/index.d.ts +6 -0
- package/lib/Components/Apps/index.js +18 -0
- package/lib/Components/AssetPlugin/Adapters/assetPluginPMAdapter.d.ts +3 -0
- package/lib/Components/AssetPlugin/Adapters/assetPluginPMAdapter.js +23 -0
- package/lib/Components/AssetPlugin/Adapters/index.d.ts +1 -0
- package/lib/Components/AssetPlugin/Adapters/index.js +13 -0
- package/lib/Components/AssetPlugin/Controllers/clearAssetPluginContainer.d.ts +2 -0
- package/lib/Components/AssetPlugin/Controllers/clearAssetPluginContainer.js +14 -0
- package/lib/Components/AssetPlugin/Controllers/index.d.ts +2 -0
- package/lib/Components/AssetPlugin/Controllers/index.js +14 -0
- package/lib/Components/AssetPlugin/Controllers/setAssetPluginContainer.d.ts +2 -0
- package/lib/Components/AssetPlugin/Controllers/setAssetPluginContainer.js +14 -0
- package/lib/Components/AssetPlugin/Entities/AssetPluginEntity.d.ts +14 -0
- package/lib/Components/AssetPlugin/Entities/AssetPluginEntity.js +40 -0
- package/lib/Components/AssetPlugin/Entities/index.d.ts +1 -0
- package/lib/Components/AssetPlugin/Entities/index.js +13 -0
- package/lib/Components/AssetPlugin/Mocks/MockAssetPluginContainerUC.d.ts +9 -0
- package/lib/Components/AssetPlugin/Mocks/MockAssetPluginContainerUC.js +16 -0
- package/lib/Components/AssetPlugin/Mocks/MockAssetPluginPM.d.ts +8 -0
- package/lib/Components/AssetPlugin/Mocks/MockAssetPluginPM.js +15 -0
- package/lib/Components/AssetPlugin/Mocks/index.d.ts +2 -0
- package/lib/Components/AssetPlugin/Mocks/index.js +14 -0
- package/lib/Components/AssetPlugin/PM/AssetPluginPM.d.ts +12 -0
- package/lib/Components/AssetPlugin/PM/AssetPluginPM.js +68 -0
- package/lib/Components/AssetPlugin/PM/index.d.ts +1 -0
- package/lib/Components/AssetPlugin/PM/index.js +13 -0
- package/lib/Components/AssetPlugin/UCs/AssetPluginContainerUC.d.ts +7 -0
- package/lib/Components/AssetPlugin/UCs/AssetPluginContainerUC.js +11 -0
- package/lib/Components/AssetPlugin/UCs/index.d.ts +1 -0
- package/lib/Components/AssetPlugin/UCs/index.js +13 -0
- package/lib/Components/AssetPlugin/index.d.ts +6 -0
- package/lib/Components/AssetPlugin/index.js +18 -0
- package/lib/Components/Assets/UCs/ArchiveAssetUC.js +6 -16
- package/lib/Components/Assets/UCs/DeleteAssetUC.js +7 -19
- package/lib/Components/Assets/UCs/DownloadAssetFileUC.js +5 -13
- package/lib/Components/Assets/UCs/UpdateAssetFileUC.js +5 -13
- package/lib/Components/Dialog/Adapters/alertDialogAdapter.d.ts +3 -0
- package/lib/Components/Dialog/Adapters/alertDialogAdapter.js +23 -0
- package/lib/Components/Dialog/Adapters/confirmDialogAdapter.d.ts +3 -0
- package/lib/Components/Dialog/Adapters/confirmDialogAdapter.js +23 -0
- package/lib/Components/Dialog/Adapters/dialogQueueAdapter.d.ts +3 -0
- package/lib/Components/Dialog/Adapters/dialogQueueAdapter.js +23 -0
- package/lib/Components/Dialog/Adapters/index.d.ts +5 -0
- package/lib/Components/Dialog/Adapters/index.js +17 -0
- package/lib/Components/Dialog/Adapters/markDownEditorDialogAdapters.d.ts +3 -0
- package/lib/Components/Dialog/Adapters/markDownEditorDialogAdapters.js +23 -0
- package/lib/Components/Dialog/Adapters/spinnerDialogAdapter.d.ts +3 -0
- package/lib/Components/Dialog/Adapters/spinnerDialogAdapter.js +23 -0
- package/lib/Components/Dialog/Entities/DialogQueue.d.ts +1 -11
- package/lib/Components/Dialog/Entities/DialogQueue.js +1 -21
- package/lib/Components/Dialog/Factories/alertDialogFactory.js +1 -1
- package/lib/Components/Dialog/Factories/confirmDialogFactory.js +1 -1
- package/lib/Components/Dialog/Factories/markdownDialogEditorFactory.js +1 -1
- package/lib/Components/Dialog/Factories/spinnerDialogFactory.js +1 -1
- package/lib/Components/Dialog/Mocks/MockAlertDialogPM.d.ts +7 -0
- package/lib/Components/Dialog/Mocks/MockAlertDialogPM.js +11 -0
- package/lib/Components/Dialog/Mocks/MockConfirmDialogPM.d.ts +7 -0
- package/lib/Components/Dialog/Mocks/MockConfirmDialogPM.js +11 -0
- package/lib/Components/Dialog/Mocks/MockDialogQueuePM.d.ts +8 -0
- package/lib/Components/Dialog/Mocks/MockDialogQueuePM.js +15 -0
- package/lib/Components/Dialog/Mocks/MockMakeAlertDialogUC.d.ts +9 -0
- package/lib/Components/Dialog/Mocks/MockMakeAlertDialogUC.js +16 -0
- package/lib/Components/Dialog/Mocks/MockMakeConfirmDialogUC.d.ts +9 -0
- package/lib/Components/Dialog/Mocks/MockMakeConfirmDialogUC.js +16 -0
- package/lib/Components/Dialog/Mocks/MockMakeMarkdownDialogUC.d.ts +9 -0
- package/lib/Components/Dialog/Mocks/MockMakeMarkdownDialogUC.js +16 -0
- package/lib/Components/Dialog/Mocks/MockMakeSelectModelDialogUC.d.ts +9 -0
- package/lib/Components/Dialog/Mocks/MockMakeSelectModelDialogUC.js +16 -0
- package/lib/Components/Dialog/Mocks/MockMakeSpinnerDialogUC.d.ts +9 -0
- package/lib/Components/Dialog/Mocks/MockMakeSpinnerDialogUC.js +16 -0
- package/lib/Components/Dialog/Mocks/MockMarkDownEditorDialogPM.d.ts +7 -0
- package/lib/Components/Dialog/Mocks/MockMarkDownEditorDialogPM.js +11 -0
- package/lib/Components/Dialog/Mocks/MockSpinnerDialogPM.d.ts +7 -0
- package/lib/Components/Dialog/Mocks/MockSpinnerDialogPM.js +11 -0
- package/lib/Components/Dialog/Mocks/index.d.ts +10 -0
- package/lib/Components/Dialog/Mocks/index.js +22 -0
- package/lib/Components/Dialog/PMs/AlertDialogPM.d.ts +5 -8
- package/lib/Components/Dialog/PMs/AlertDialogPM.js +32 -26
- package/lib/Components/Dialog/PMs/ConfirmDialogPM.d.ts +4 -7
- package/lib/Components/Dialog/PMs/ConfirmDialogPM.js +30 -24
- package/lib/Components/Dialog/PMs/DialogQueuePM.d.ts +5 -8
- package/lib/Components/Dialog/PMs/DialogQueuePM.js +16 -10
- package/lib/Components/Dialog/PMs/MarkDownEditorDialogPM.d.ts +3 -6
- package/lib/Components/Dialog/PMs/MarkDownEditorDialogPM.js +27 -21
- package/lib/Components/Dialog/PMs/SpinnerDialogPM.d.ts +3 -6
- package/lib/Components/Dialog/PMs/SpinnerDialogPM.js +26 -20
- package/lib/Components/Dialog/UCs/MakeAlertDialogUC.d.ts +10 -0
- package/lib/Components/Dialog/UCs/MakeAlertDialogUC.js +41 -0
- package/lib/Components/Dialog/UCs/MakeConfirmDialogUC.d.ts +10 -0
- package/lib/Components/Dialog/UCs/MakeConfirmDialogUC.js +41 -0
- package/lib/Components/Dialog/UCs/MakeMarkdownDialogUC.d.ts +10 -0
- package/lib/Components/Dialog/UCs/MakeMarkdownDialogUC.js +41 -0
- package/lib/Components/Dialog/UCs/MakeSelectModelDialogUC.d.ts +10 -0
- package/lib/Components/Dialog/UCs/MakeSelectModelDialogUC.js +41 -0
- package/lib/Components/Dialog/UCs/MakeSpinnerDialogUC.d.ts +10 -0
- package/lib/Components/Dialog/UCs/MakeSpinnerDialogUC.js +42 -0
- package/lib/Components/Dialog/UCs/index.d.ts +5 -0
- package/lib/Components/Dialog/UCs/index.js +17 -0
- package/lib/Components/Dialog/index.d.ts +6 -3
- package/lib/Components/Dialog/index.js +3 -0
- package/lib/Components/Dispatcher/Entities/HostDispatchEntity.js +7 -2
- package/lib/Components/Dispatcher/UCs/DispatchStartBrowseChannelsUC.d.ts +1 -1
- package/lib/Components/Dispatcher/UCs/DispatchStartBrowseChannelsUC.js +1 -1
- package/lib/Components/Handler/UCs/CloseAssetSystemPlugin.d.ts +17 -0
- package/lib/Components/Handler/UCs/CloseAssetSystemPlugin.js +67 -0
- package/lib/Components/Handler/UCs/GetAssetFolderURLHandler.js +12 -2
- package/lib/Components/Handler/UCs/OnAppIsReadyHandler.js +9 -1
- package/lib/Components/Handler/UCs/RegisterExternalStyleSheetsHandler.js +11 -1
- package/lib/Components/Handler/UCs/ShowAlertHandler.js +2 -9
- package/lib/Components/Handler/UCs/ShowConfirmHandler.js +2 -9
- package/lib/Components/Handler/UCs/ShowMarkDownEditorHandler.d.ts +0 -1
- package/lib/Components/Handler/UCs/ShowMarkDownEditorHandler.js +2 -9
- package/lib/Components/Handler/UCs/ShowSelectModelHandler.js +11 -2
- package/lib/Components/Handler/UCs/ShowSpinnerHandler.js +3 -13
- package/lib/Components/Handler/UCs/index.d.ts +1 -0
- package/lib/Components/Handler/UCs/index.js +1 -0
- package/lib/Components/StateMachine/Adapters/hostStateMachinePMAdapter.d.ts +2 -2
- package/lib/Components/StateMachine/Adapters/index.d.ts +0 -1
- package/lib/Components/StateMachine/Adapters/index.js +0 -1
- package/lib/Components/index.d.ts +2 -0
- package/lib/Components/index.js +2 -0
- package/lib/Types/PmAdapter.d.ts +6 -0
- package/lib/Types/PmAdapter.js +2 -0
- package/lib/Types/SingletonPmAdapter.d.ts +6 -0
- package/lib/Types/SingletonPmAdapter.js +2 -0
- package/lib/Types/index.d.ts +3 -2
- package/lib/Types/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultMarkDownEditorDialogVM = exports.MarkDownEditorDialogPM = void 0;
|
|
3
|
+
exports.defaultMarkDownEditorDialogVM = exports.makeMarkDownEditorDialogPM = exports.MarkDownEditorDialogPM = void 0;
|
|
4
4
|
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
5
|
const MarkDownEditor_1 = require("../Entities/MarkDownEditor");
|
|
6
6
|
class MarkDownEditorDialogPM extends HostAppObject_1.HostAppObjectPM {
|
|
7
|
+
static get(assetID, appObjects) {
|
|
8
|
+
const appObject = appObjects.get(assetID);
|
|
9
|
+
if (!appObject) {
|
|
10
|
+
appObjects.submitWarning("MarkDownEditorDialogPM.get", "Unable to find app object");
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const pm = appObject.getComponent(MarkDownEditorDialogPM.type);
|
|
14
|
+
if (!pm) {
|
|
15
|
+
appObjects.submitWarning("MarkDownEditorDialogPM.get", "App Object does not have MarkDownEditorDialogPM");
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
return pm;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.MarkDownEditorDialogPM = MarkDownEditorDialogPM;
|
|
22
|
+
MarkDownEditorDialogPM.type = "MarkDownEditorDialogPM";
|
|
23
|
+
function makeMarkDownEditorDialogPM(appObject) {
|
|
24
|
+
return new MarkDownEditorDialogPMImp(appObject);
|
|
25
|
+
}
|
|
26
|
+
exports.makeMarkDownEditorDialogPM = makeMarkDownEditorDialogPM;
|
|
27
|
+
class MarkDownEditorDialogPMImp extends MarkDownEditorDialogPM {
|
|
7
28
|
constructor(appObject) {
|
|
8
29
|
super(appObject, MarkDownEditorDialogPM.type);
|
|
9
30
|
this.onAlertChange = () => {
|
|
@@ -11,41 +32,26 @@ class MarkDownEditorDialogPM extends HostAppObject_1.HostAppObjectPM {
|
|
|
11
32
|
return;
|
|
12
33
|
this.doUpdateView({
|
|
13
34
|
initialText: this.dialog.initialText,
|
|
14
|
-
confirm: this.dialog.confirm
|
|
35
|
+
confirm: this.dialog.confirm
|
|
15
36
|
});
|
|
16
37
|
};
|
|
17
38
|
this.dialog = appObject.getComponent(MarkDownEditor_1.MarkDownEditorDialogEntity.type);
|
|
18
39
|
if (!this.dialog) {
|
|
19
|
-
this.error(
|
|
40
|
+
this.error("PM added to an app object that does not have a DialogMarkDownEntity");
|
|
20
41
|
return;
|
|
21
42
|
}
|
|
22
43
|
this.dialog.addChangeObserver(this.onAlertChange);
|
|
23
44
|
this.onAlertChange();
|
|
24
45
|
}
|
|
25
|
-
static get(assetID, appObjects) {
|
|
26
|
-
const appObject = appObjects.get(assetID);
|
|
27
|
-
if (!appObject) {
|
|
28
|
-
appObjects.submitWarning('MarkDownEditorDialogPM.get', 'Unable to find app object');
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
const pm = appObject.getComponent(MarkDownEditorDialogPM.type);
|
|
32
|
-
if (!pm) {
|
|
33
|
-
appObjects.submitWarning('MarkDownEditorDialogPM.get', 'App Object does not have MarkDownEditorDialogPM');
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
return pm;
|
|
37
|
-
}
|
|
38
46
|
vmsAreEqual(a, b) {
|
|
39
47
|
if (a.initialText !== b.initialText)
|
|
40
48
|
return false;
|
|
41
49
|
return true;
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
|
-
exports.MarkDownEditorDialogPM = MarkDownEditorDialogPM;
|
|
45
|
-
MarkDownEditorDialogPM.type = 'MarkDownEditorDialogPM';
|
|
46
52
|
exports.defaultMarkDownEditorDialogVM = {
|
|
47
|
-
initialText:
|
|
53
|
+
initialText: "",
|
|
48
54
|
confirm: (text) => {
|
|
49
|
-
console.warn(
|
|
50
|
-
}
|
|
55
|
+
console.warn("[MarkDownEditorDialogVM.confirm] default VM!");
|
|
56
|
+
}
|
|
51
57
|
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { HostAppObject, HostAppObjectPM, HostAppObjectRepo } from
|
|
1
|
+
import { HostAppObject, HostAppObjectPM, HostAppObjectRepo } from "../../../HostAppObject";
|
|
2
2
|
export interface SpinnerDialogVM {
|
|
3
3
|
message: string;
|
|
4
4
|
title: string;
|
|
5
5
|
}
|
|
6
|
-
export declare class SpinnerDialogPM extends HostAppObjectPM<SpinnerDialogVM> {
|
|
6
|
+
export declare abstract class SpinnerDialogPM extends HostAppObjectPM<SpinnerDialogVM> {
|
|
7
7
|
static type: string;
|
|
8
8
|
static get(assetID: string, appObjects: HostAppObjectRepo): SpinnerDialogPM | undefined;
|
|
9
|
-
private dialog?;
|
|
10
|
-
vmsAreEqual(a: SpinnerDialogVM, b: SpinnerDialogVM): boolean;
|
|
11
|
-
onAlertChange: () => void;
|
|
12
|
-
constructor(appObject: HostAppObject);
|
|
13
9
|
}
|
|
10
|
+
export declare function makeSpinnerDialogPM(appObject: HostAppObject): SpinnerDialogPM;
|
|
14
11
|
export declare const defaultSpinnerDialogVM: SpinnerDialogVM;
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultSpinnerDialogVM = exports.SpinnerDialogPM = void 0;
|
|
3
|
+
exports.defaultSpinnerDialogVM = exports.makeSpinnerDialogPM = exports.SpinnerDialogPM = void 0;
|
|
4
4
|
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
5
|
const Entities_1 = require("../Entities");
|
|
6
6
|
class SpinnerDialogPM extends HostAppObject_1.HostAppObjectPM {
|
|
7
|
+
static get(assetID, appObjects) {
|
|
8
|
+
const appObject = appObjects.get(assetID);
|
|
9
|
+
if (!appObject) {
|
|
10
|
+
appObjects.submitWarning("SpinnerDialogPM.get", "Unable to find app object");
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const pm = appObject.getComponent(SpinnerDialogPM.type);
|
|
14
|
+
if (!pm) {
|
|
15
|
+
appObjects.submitWarning("SpinnerDialogPM.get", "App Object does not have SpinnerDialogPM");
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
return pm;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.SpinnerDialogPM = SpinnerDialogPM;
|
|
22
|
+
SpinnerDialogPM.type = "SpinnerDialogPM";
|
|
23
|
+
function makeSpinnerDialogPM(appObject) {
|
|
24
|
+
return new SpinnerDialogPMImp(appObject);
|
|
25
|
+
}
|
|
26
|
+
exports.makeSpinnerDialogPM = makeSpinnerDialogPM;
|
|
27
|
+
class SpinnerDialogPMImp extends SpinnerDialogPM {
|
|
7
28
|
constructor(appObject) {
|
|
8
29
|
super(appObject, SpinnerDialogPM.type);
|
|
9
30
|
this.onAlertChange = () => {
|
|
@@ -11,30 +32,17 @@ class SpinnerDialogPM extends HostAppObject_1.HostAppObjectPM {
|
|
|
11
32
|
return;
|
|
12
33
|
this.doUpdateView({
|
|
13
34
|
message: this.dialog.message,
|
|
14
|
-
title: this.dialog.title
|
|
35
|
+
title: this.dialog.title
|
|
15
36
|
});
|
|
16
37
|
};
|
|
17
38
|
this.dialog = appObject.getComponent(Entities_1.SpinnerDialogEntity.type);
|
|
18
39
|
if (!this.dialog) {
|
|
19
|
-
this.error(
|
|
40
|
+
this.error("PM added to an app object that does not have a DialogSpinnerEntity");
|
|
20
41
|
return;
|
|
21
42
|
}
|
|
22
43
|
this.dialog.addChangeObserver(this.onAlertChange);
|
|
23
44
|
this.onAlertChange();
|
|
24
45
|
}
|
|
25
|
-
static get(assetID, appObjects) {
|
|
26
|
-
const appObject = appObjects.get(assetID);
|
|
27
|
-
if (!appObject) {
|
|
28
|
-
appObjects.submitWarning('SpinnerDialogPM.get', 'Unable to find app object');
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
const pm = appObject.getComponent(SpinnerDialogPM.type);
|
|
32
|
-
if (!pm) {
|
|
33
|
-
appObjects.submitWarning('SpinnerDialogPM.get', 'App Object does not have SpinnerDialogPM');
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
return pm;
|
|
37
|
-
}
|
|
38
46
|
vmsAreEqual(a, b) {
|
|
39
47
|
if (a.message !== b.message)
|
|
40
48
|
return false;
|
|
@@ -43,9 +51,7 @@ class SpinnerDialogPM extends HostAppObject_1.HostAppObjectPM {
|
|
|
43
51
|
return true;
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
|
-
exports.SpinnerDialogPM = SpinnerDialogPM;
|
|
47
|
-
SpinnerDialogPM.type = 'SpinnerDialogPM';
|
|
48
54
|
exports.defaultSpinnerDialogVM = {
|
|
49
|
-
message:
|
|
50
|
-
title:
|
|
55
|
+
message: "Default spinner message",
|
|
56
|
+
title: "Spinner"
|
|
51
57
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HostAppObject, HostAppObjectRepo, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
|
+
import { DialogAlertDTO, AlertDialogEntity } from "../Entities";
|
|
3
|
+
export declare abstract class MakeAlertDialogUC extends HostAppObjectUC {
|
|
4
|
+
static type: string;
|
|
5
|
+
abstract make(dto: DialogAlertDTO): void;
|
|
6
|
+
abstract factory(data: DialogAlertDTO): AlertDialogEntity;
|
|
7
|
+
static get(appObjects: HostAppObjectRepo): MakeAlertDialogUC | undefined;
|
|
8
|
+
static make(dto: DialogAlertDTO, appObjects: HostAppObjectRepo): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMakeAlertDialogUC(appObject: HostAppObject): MakeAlertDialogUC;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMakeAlertDialogUC = exports.MakeAlertDialogUC = void 0;
|
|
4
|
+
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const Utilities_1 = require("../../../Utilities");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class MakeAlertDialogUC extends HostAppObject_1.HostAppObjectUC {
|
|
8
|
+
static get(appObjects) {
|
|
9
|
+
return HostAppObject_1.getSingletonComponent(MakeAlertDialogUC.type, appObjects);
|
|
10
|
+
}
|
|
11
|
+
static make(dto, appObjects) {
|
|
12
|
+
const uc = MakeAlertDialogUC.get(appObjects);
|
|
13
|
+
uc === null || uc === void 0 ? void 0 : uc.make(dto);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.MakeAlertDialogUC = MakeAlertDialogUC;
|
|
17
|
+
MakeAlertDialogUC.type = "MakeAlertDialogUC";
|
|
18
|
+
function makeMakeAlertDialogUC(appObject) {
|
|
19
|
+
return new MakeActivityDetailsDialogUCImp(appObject);
|
|
20
|
+
}
|
|
21
|
+
exports.makeMakeAlertDialogUC = makeMakeAlertDialogUC;
|
|
22
|
+
class MakeActivityDetailsDialogUCImp extends MakeAlertDialogUC {
|
|
23
|
+
get dialogRepo() {
|
|
24
|
+
return this.getCachedSingleton(Entities_1.DialogQueue.type);
|
|
25
|
+
}
|
|
26
|
+
factory(data) {
|
|
27
|
+
const ao = this.appObjects.getOrCreate(Utilities_1.generateUniqueID());
|
|
28
|
+
const entity = new Entities_1.AlertDialogEntity(data, ao);
|
|
29
|
+
return entity;
|
|
30
|
+
}
|
|
31
|
+
make(dto) {
|
|
32
|
+
if (!this.dialogRepo)
|
|
33
|
+
return;
|
|
34
|
+
const dialog = this.factory(dto);
|
|
35
|
+
this.dialogRepo.submitDialog(dialog);
|
|
36
|
+
}
|
|
37
|
+
constructor(appObject) {
|
|
38
|
+
super(appObject, MakeAlertDialogUC.type);
|
|
39
|
+
this.appObjects.registerSingleton(this);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HostAppObject, HostAppObjectRepo, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
|
+
import { ConfirmDialogEntity, DialogConfirmDTO } from "../Entities";
|
|
3
|
+
export declare abstract class MakeConfirmDialogUC extends HostAppObjectUC {
|
|
4
|
+
static type: string;
|
|
5
|
+
abstract make(dto: DialogConfirmDTO): void;
|
|
6
|
+
abstract factory(data: DialogConfirmDTO): ConfirmDialogEntity;
|
|
7
|
+
static get(appObjects: HostAppObjectRepo): MakeConfirmDialogUC | undefined;
|
|
8
|
+
static make(dto: DialogConfirmDTO, appObjects: HostAppObjectRepo): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMakeConfirmDialogUC(appObject: HostAppObject): MakeConfirmDialogUC;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMakeConfirmDialogUC = exports.MakeConfirmDialogUC = void 0;
|
|
4
|
+
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const Utilities_1 = require("../../../Utilities");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class MakeConfirmDialogUC extends HostAppObject_1.HostAppObjectUC {
|
|
8
|
+
static get(appObjects) {
|
|
9
|
+
return HostAppObject_1.getSingletonComponent(MakeConfirmDialogUC.type, appObjects);
|
|
10
|
+
}
|
|
11
|
+
static make(dto, appObjects) {
|
|
12
|
+
const uc = MakeConfirmDialogUC.get(appObjects);
|
|
13
|
+
uc === null || uc === void 0 ? void 0 : uc.make(dto);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.MakeConfirmDialogUC = MakeConfirmDialogUC;
|
|
17
|
+
MakeConfirmDialogUC.type = "MakeConfirmDialogUC";
|
|
18
|
+
function makeMakeConfirmDialogUC(appObject) {
|
|
19
|
+
return new MakeConfirmDialogUCImp(appObject);
|
|
20
|
+
}
|
|
21
|
+
exports.makeMakeConfirmDialogUC = makeMakeConfirmDialogUC;
|
|
22
|
+
class MakeConfirmDialogUCImp extends MakeConfirmDialogUC {
|
|
23
|
+
get dialogRepo() {
|
|
24
|
+
return this.getCachedSingleton(Entities_1.DialogQueue.type);
|
|
25
|
+
}
|
|
26
|
+
factory(data) {
|
|
27
|
+
const ao = this.appObjects.getOrCreate(Utilities_1.generateUniqueID());
|
|
28
|
+
const entity = new Entities_1.ConfirmDialogEntity(data, ao);
|
|
29
|
+
return entity;
|
|
30
|
+
}
|
|
31
|
+
make(dto) {
|
|
32
|
+
if (!this.dialogRepo)
|
|
33
|
+
return;
|
|
34
|
+
const dialog = this.factory(dto);
|
|
35
|
+
this.dialogRepo.submitDialog(dialog);
|
|
36
|
+
}
|
|
37
|
+
constructor(appObject) {
|
|
38
|
+
super(appObject, MakeConfirmDialogUC.type);
|
|
39
|
+
this.appObjects.registerSingleton(this);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HostAppObject, HostAppObjectRepo, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
|
+
import { DialogMarkDownEditorDTO, MarkDownEditorDialogEntity } from "../Entities";
|
|
3
|
+
export declare abstract class MakeMarkdownDialogUC extends HostAppObjectUC {
|
|
4
|
+
static type: string;
|
|
5
|
+
abstract make(dto: DialogMarkDownEditorDTO): void;
|
|
6
|
+
abstract factory(data: DialogMarkDownEditorDTO): MarkDownEditorDialogEntity;
|
|
7
|
+
static get(appObjects: HostAppObjectRepo): MakeMarkdownDialogUC | undefined;
|
|
8
|
+
static make(dto: DialogMarkDownEditorDTO, appObjects: HostAppObjectRepo): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMakeMarkdownDialogUC(appObject: HostAppObject): MakeMarkdownDialogUC;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMakeMarkdownDialogUC = exports.MakeMarkdownDialogUC = void 0;
|
|
4
|
+
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const Utilities_1 = require("../../../Utilities");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class MakeMarkdownDialogUC extends HostAppObject_1.HostAppObjectUC {
|
|
8
|
+
static get(appObjects) {
|
|
9
|
+
return HostAppObject_1.getSingletonComponent(MakeMarkdownDialogUC.type, appObjects);
|
|
10
|
+
}
|
|
11
|
+
static make(dto, appObjects) {
|
|
12
|
+
const uc = MakeMarkdownDialogUC.get(appObjects);
|
|
13
|
+
uc === null || uc === void 0 ? void 0 : uc.make(dto);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.MakeMarkdownDialogUC = MakeMarkdownDialogUC;
|
|
17
|
+
MakeMarkdownDialogUC.type = "MakeMarkdownDialogUC";
|
|
18
|
+
function makeMakeMarkdownDialogUC(appObject) {
|
|
19
|
+
return new MakeMarkdownDialogUCImp(appObject);
|
|
20
|
+
}
|
|
21
|
+
exports.makeMakeMarkdownDialogUC = makeMakeMarkdownDialogUC;
|
|
22
|
+
class MakeMarkdownDialogUCImp extends MakeMarkdownDialogUC {
|
|
23
|
+
get dialogRepo() {
|
|
24
|
+
return this.getCachedSingleton(Entities_1.DialogQueue.type);
|
|
25
|
+
}
|
|
26
|
+
factory(data) {
|
|
27
|
+
const ao = this.appObjects.getOrCreate(Utilities_1.generateUniqueID());
|
|
28
|
+
const entity = new Entities_1.MarkDownEditorDialogEntity(data, ao);
|
|
29
|
+
return entity;
|
|
30
|
+
}
|
|
31
|
+
make(dto) {
|
|
32
|
+
if (!this.dialogRepo)
|
|
33
|
+
return;
|
|
34
|
+
const dialog = this.factory(dto);
|
|
35
|
+
this.dialogRepo.submitDialog(dialog);
|
|
36
|
+
}
|
|
37
|
+
constructor(appObject) {
|
|
38
|
+
super(appObject, MakeMarkdownDialogUC.type);
|
|
39
|
+
this.appObjects.registerSingleton(this);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HostAppObject, HostAppObjectRepo, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
|
+
import { SelectModelDialogEntity } from "../Entities";
|
|
3
|
+
export declare abstract class MakeSelectModelDialogUC extends HostAppObjectUC {
|
|
4
|
+
static type: string;
|
|
5
|
+
abstract make(): void;
|
|
6
|
+
abstract factory(): SelectModelDialogEntity;
|
|
7
|
+
static get(appObjects: HostAppObjectRepo): MakeSelectModelDialogUC | undefined;
|
|
8
|
+
static make(appObjects: HostAppObjectRepo): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMakeSelectModelDialogUC(appObject: HostAppObject): MakeSelectModelDialogUC;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMakeSelectModelDialogUC = exports.MakeSelectModelDialogUC = void 0;
|
|
4
|
+
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const Utilities_1 = require("../../../Utilities");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class MakeSelectModelDialogUC extends HostAppObject_1.HostAppObjectUC {
|
|
8
|
+
static get(appObjects) {
|
|
9
|
+
return HostAppObject_1.getSingletonComponent(MakeSelectModelDialogUC.type, appObjects);
|
|
10
|
+
}
|
|
11
|
+
static make(appObjects) {
|
|
12
|
+
const uc = MakeSelectModelDialogUC.get(appObjects);
|
|
13
|
+
uc === null || uc === void 0 ? void 0 : uc.make();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.MakeSelectModelDialogUC = MakeSelectModelDialogUC;
|
|
17
|
+
MakeSelectModelDialogUC.type = "MakeSelectModelDialogUC";
|
|
18
|
+
function makeMakeSelectModelDialogUC(appObject) {
|
|
19
|
+
return new MakeSelectModelDialogUCImp(appObject);
|
|
20
|
+
}
|
|
21
|
+
exports.makeMakeSelectModelDialogUC = makeMakeSelectModelDialogUC;
|
|
22
|
+
class MakeSelectModelDialogUCImp extends MakeSelectModelDialogUC {
|
|
23
|
+
get dialogRepo() {
|
|
24
|
+
return this.getCachedSingleton(Entities_1.DialogQueue.type);
|
|
25
|
+
}
|
|
26
|
+
factory() {
|
|
27
|
+
const ao = this.appObjects.getOrCreate(Utilities_1.generateUniqueID());
|
|
28
|
+
const entity = new Entities_1.SelectModelDialogEntity(ao);
|
|
29
|
+
return entity;
|
|
30
|
+
}
|
|
31
|
+
make() {
|
|
32
|
+
if (!this.dialogRepo)
|
|
33
|
+
return;
|
|
34
|
+
const dialog = this.factory();
|
|
35
|
+
this.dialogRepo.submitDialog(dialog);
|
|
36
|
+
}
|
|
37
|
+
constructor(appObject) {
|
|
38
|
+
super(appObject, MakeSelectModelDialogUC.type);
|
|
39
|
+
this.appObjects.registerSingleton(this);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HostAppObject, HostAppObjectRepo, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
|
+
import { DialogSpinnerDTO, SpinnerDialogEntity } from "../Entities";
|
|
3
|
+
export declare abstract class MakeSpinnerDialogUC extends HostAppObjectUC {
|
|
4
|
+
static type: string;
|
|
5
|
+
abstract make(dto: DialogSpinnerDTO): SpinnerDialogEntity | undefined;
|
|
6
|
+
abstract factory(data: DialogSpinnerDTO): SpinnerDialogEntity;
|
|
7
|
+
static get(appObjects: HostAppObjectRepo): MakeSpinnerDialogUC | undefined;
|
|
8
|
+
static make(dto: DialogSpinnerDTO, appObjects: HostAppObjectRepo): SpinnerDialogEntity | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMakeSpinnerDialogUC(appObject: HostAppObject): MakeSpinnerDialogUC;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMakeSpinnerDialogUC = exports.MakeSpinnerDialogUC = void 0;
|
|
4
|
+
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const Utilities_1 = require("../../../Utilities");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class MakeSpinnerDialogUC extends HostAppObject_1.HostAppObjectUC {
|
|
8
|
+
static get(appObjects) {
|
|
9
|
+
return HostAppObject_1.getSingletonComponent(MakeSpinnerDialogUC.type, appObjects);
|
|
10
|
+
}
|
|
11
|
+
static make(dto, appObjects) {
|
|
12
|
+
const uc = MakeSpinnerDialogUC.get(appObjects);
|
|
13
|
+
return uc === null || uc === void 0 ? void 0 : uc.make(dto);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.MakeSpinnerDialogUC = MakeSpinnerDialogUC;
|
|
17
|
+
MakeSpinnerDialogUC.type = "MakeSpinnerDialogUC";
|
|
18
|
+
function makeMakeSpinnerDialogUC(appObject) {
|
|
19
|
+
return new MakeSpinnerDialogUCImp(appObject);
|
|
20
|
+
}
|
|
21
|
+
exports.makeMakeSpinnerDialogUC = makeMakeSpinnerDialogUC;
|
|
22
|
+
class MakeSpinnerDialogUCImp extends MakeSpinnerDialogUC {
|
|
23
|
+
get dialogRepo() {
|
|
24
|
+
return this.getCachedSingleton(Entities_1.DialogQueue.type);
|
|
25
|
+
}
|
|
26
|
+
factory(data) {
|
|
27
|
+
const ao = this.appObjects.getOrCreate(Utilities_1.generateUniqueID());
|
|
28
|
+
const entity = new Entities_1.SpinnerDialogEntity(data, ao);
|
|
29
|
+
return entity;
|
|
30
|
+
}
|
|
31
|
+
make(dto) {
|
|
32
|
+
if (!this.dialogRepo)
|
|
33
|
+
return;
|
|
34
|
+
const dialog = this.factory(dto);
|
|
35
|
+
this.dialogRepo.submitDialog(dialog);
|
|
36
|
+
return dialog;
|
|
37
|
+
}
|
|
38
|
+
constructor(appObject) {
|
|
39
|
+
super(appObject, MakeSpinnerDialogUC.type);
|
|
40
|
+
this.appObjects.registerSingleton(this);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./MakeAlertDialogUC"), exports);
|
|
14
|
+
__exportStar(require("./MakeConfirmDialogUC"), exports);
|
|
15
|
+
__exportStar(require("./MakeMarkdownDialogUC"), exports);
|
|
16
|
+
__exportStar(require("./MakeSelectModelDialogUC"), exports);
|
|
17
|
+
__exportStar(require("./MakeSpinnerDialogUC"), exports);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export * from "./Adapters";
|
|
1
2
|
export * from "./Controllers";
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
3
|
+
export * from "./Entities";
|
|
4
|
+
export * from "./Factories";
|
|
5
|
+
export * from "./Mocks";
|
|
6
|
+
export * from "./PMs";
|
|
7
|
+
export * from "./UCs";
|
|
@@ -10,7 +10,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Adapters"), exports);
|
|
13
14
|
__exportStar(require("./Controllers"), exports);
|
|
14
15
|
__exportStar(require("./Entities"), exports);
|
|
15
16
|
__exportStar(require("./Factories"), exports);
|
|
17
|
+
__exportStar(require("./Mocks"), exports);
|
|
16
18
|
__exportStar(require("./PMs"), exports);
|
|
19
|
+
__exportStar(require("./UCs"), exports);
|
|
@@ -55,7 +55,12 @@ class HostDispatchEntityImp extends HostDispatchEntity {
|
|
|
55
55
|
this.error("No app handler has been registered");
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
try {
|
|
59
|
+
this.appHandler(request);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
this.warn(e.message);
|
|
63
|
+
}
|
|
59
64
|
};
|
|
60
65
|
this.formRequestAndDispatch = (type, version, payload) => {
|
|
61
66
|
if (!this.appHandler) {
|
|
@@ -67,7 +72,7 @@ class HostDispatchEntityImp extends HostDispatchEntity {
|
|
|
67
72
|
version,
|
|
68
73
|
payload
|
|
69
74
|
};
|
|
70
|
-
this.
|
|
75
|
+
this.dispatch(request);
|
|
71
76
|
};
|
|
72
77
|
}
|
|
73
78
|
get appHandlerVersion() {
|
|
@@ -7,7 +7,7 @@ export interface BrowseChannelDTO {
|
|
|
7
7
|
}
|
|
8
8
|
export declare abstract class DispatchStartBrowseChannelsUC extends HostAppObjectUC {
|
|
9
9
|
static readonly type = "DispatchStartBrowseChannelsUC";
|
|
10
|
-
readonly requestType = "
|
|
10
|
+
readonly requestType = "START_SELECT_CHANNEL_MODEL";
|
|
11
11
|
abstract doDispatch(dto: BrowseChannelDTO): void;
|
|
12
12
|
static get(appObject: HostAppObject): DispatchStartBrowseChannelsUC | undefined;
|
|
13
13
|
static getByID(id: string, appObjects: HostAppObjectRepo): DispatchStartBrowseChannelsUC | undefined;
|
|
@@ -6,7 +6,7 @@ const Entities_1 = require("../Entities");
|
|
|
6
6
|
class DispatchStartBrowseChannelsUC extends HostAppObject_1.HostAppObjectUC {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
|
-
this.requestType = "
|
|
9
|
+
this.requestType = "START_SELECT_CHANNEL_MODEL";
|
|
10
10
|
}
|
|
11
11
|
static get(appObject) {
|
|
12
12
|
const asset = appObject.getComponent(DispatchStartBrowseChannelsUC.type);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HostAppObject, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
|
+
import { RequestHandler } from "../Entities";
|
|
3
|
+
export declare abstract class CloseAssetSystemPluginUC extends HostAppObjectUC implements RequestHandler {
|
|
4
|
+
static readonly type = "CloseAssetSystemPluginUC";
|
|
5
|
+
readonly requestType = "CLOSE_PLUGIN";
|
|
6
|
+
readonly payloadVersion = 1;
|
|
7
|
+
abstract action: () => void;
|
|
8
|
+
abstract handleRequest: (version: number, payload?: unknown) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function makeCloseAssetSystemPluginUC(appObject: HostAppObject): CloseAssetSystemPluginUC;
|
|
11
|
+
export declare class CloseAssetSystemPluginUCImp extends CloseAssetSystemPluginUC {
|
|
12
|
+
private get dialogQueue();
|
|
13
|
+
private get assetSystemPlugin();
|
|
14
|
+
handleRequest: (version: number) => void;
|
|
15
|
+
action: () => void;
|
|
16
|
+
constructor(appObject: HostAppObject);
|
|
17
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloseAssetSystemPluginUCImp = exports.makeCloseAssetSystemPluginUC = exports.CloseAssetSystemPluginUC = void 0;
|
|
4
|
+
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const AssetPlugin_1 = require("../../AssetPlugin");
|
|
6
|
+
const Dialog_1 = require("../../Dialog");
|
|
7
|
+
const Dispatcher_1 = require("../../Dispatcher");
|
|
8
|
+
const Entities_1 = require("../Entities");
|
|
9
|
+
class CloseAssetSystemPluginUC extends HostAppObject_1.HostAppObjectUC {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.requestType = "CLOSE_PLUGIN";
|
|
13
|
+
this.payloadVersion = 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.CloseAssetSystemPluginUC = CloseAssetSystemPluginUC;
|
|
17
|
+
CloseAssetSystemPluginUC.type = "CloseAssetSystemPluginUC";
|
|
18
|
+
function makeCloseAssetSystemPluginUC(appObject) {
|
|
19
|
+
return new CloseAssetSystemPluginUCImp(appObject);
|
|
20
|
+
}
|
|
21
|
+
exports.makeCloseAssetSystemPluginUC = makeCloseAssetSystemPluginUC;
|
|
22
|
+
class CloseAssetSystemPluginUCImp extends CloseAssetSystemPluginUC {
|
|
23
|
+
constructor(appObject) {
|
|
24
|
+
super(appObject, CloseAssetSystemPluginUC.type);
|
|
25
|
+
this.handleRequest = (version) => {
|
|
26
|
+
if (version === this.payloadVersion) {
|
|
27
|
+
this.action();
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
throw new Entities_1.UnsupportedRequestVersion(this.requestType, version);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.action = () => {
|
|
34
|
+
if (!this.assetSystemPlugin)
|
|
35
|
+
return;
|
|
36
|
+
if (!this.dialogQueue)
|
|
37
|
+
return;
|
|
38
|
+
this.dialogQueue.activeDialogHasClosed();
|
|
39
|
+
const dispatchDisposeApp = Dispatcher_1.DispatchDisposeAppUC.get(this.appObject);
|
|
40
|
+
if (!dispatchDisposeApp) {
|
|
41
|
+
this.error("Cannot find DispatchDisposeAppUC");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const dispatchStopApp = Dispatcher_1.DispatchStopAppUC.get(this.appObject);
|
|
45
|
+
if (!dispatchStopApp) {
|
|
46
|
+
this.error("Cannot find DispatchDisposeAppUC");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
dispatchStopApp.doDispatch();
|
|
50
|
+
dispatchDisposeApp.doDispatch();
|
|
51
|
+
this.assetSystemPlugin.show = false;
|
|
52
|
+
};
|
|
53
|
+
const hostHandler = Entities_1.HostHandlerEntity.get(appObject);
|
|
54
|
+
if (!hostHandler) {
|
|
55
|
+
this.error("UC added to an entity that does not have HostHandlerEntity");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
hostHandler.registerRequestHandler(this);
|
|
59
|
+
}
|
|
60
|
+
get dialogQueue() {
|
|
61
|
+
return this.getCachedSingleton(Dialog_1.DialogQueue.type);
|
|
62
|
+
}
|
|
63
|
+
get assetSystemPlugin() {
|
|
64
|
+
return this.getCachedLocalComponent(AssetPlugin_1.AssetPluginEntity.type);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.CloseAssetSystemPluginUCImp = CloseAssetSystemPluginUCImp;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeGetAssetFolderURLHandler = exports.GetAssetFolderURLHandler = void 0;
|
|
4
4
|
const HostAppObject_1 = require("../../../HostAppObject");
|
|
5
|
+
const Apps_1 = require("../../Apps");
|
|
5
6
|
const Entities_1 = require("../Entities");
|
|
6
7
|
class GetAssetFolderURLHandler extends HostAppObject_1.HostAppObjectUC {
|
|
7
8
|
constructor() {
|
|
@@ -18,8 +19,14 @@ exports.makeGetAssetFolderURLHandler = makeGetAssetFolderURLHandler;
|
|
|
18
19
|
class GetAssetFolderURLHandlerImp extends GetAssetFolderURLHandler {
|
|
19
20
|
constructor(appObject) {
|
|
20
21
|
super(appObject, GetAssetFolderURLHandler.type);
|
|
21
|
-
this.action = () => {
|
|
22
|
-
|
|
22
|
+
this.action = (callback) => {
|
|
23
|
+
var _a;
|
|
24
|
+
if (!this.app) {
|
|
25
|
+
this.error("No AppEntity");
|
|
26
|
+
callback("");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
callback((_a = this.app.appAssetFolderURL) !== null && _a !== void 0 ? _a : "");
|
|
23
30
|
};
|
|
24
31
|
this.handleRequest = (version, payload) => {
|
|
25
32
|
if (version === 1) {
|
|
@@ -37,6 +44,9 @@ class GetAssetFolderURLHandlerImp extends GetAssetFolderURLHandler {
|
|
|
37
44
|
}
|
|
38
45
|
hostHandler.registerRequestHandler(this);
|
|
39
46
|
}
|
|
47
|
+
get app() {
|
|
48
|
+
return this.getCachedLocalComponent(Apps_1.AppEntity.type);
|
|
49
|
+
}
|
|
40
50
|
castPayloadV1(payload) {
|
|
41
51
|
const castPayload = payload;
|
|
42
52
|
if (!castPayload.callback) {
|