@vived/host 3.10.0 → 3.10.1
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.
|
@@ -35,7 +35,7 @@ class StartAppUCImp extends StartAppUC {
|
|
|
35
35
|
constructor(appObject) {
|
|
36
36
|
super(appObject, StartAppUC.type);
|
|
37
37
|
this.start = (container) => {
|
|
38
|
-
var _a, _b, _c, _d
|
|
38
|
+
var _a, _b, _c, _d;
|
|
39
39
|
if (!this.stateMachine)
|
|
40
40
|
return;
|
|
41
41
|
if (!this.dispatchStart)
|
|
@@ -43,10 +43,9 @@ class StartAppUCImp extends StartAppUC {
|
|
|
43
43
|
if (!this.editStateEntity)
|
|
44
44
|
return;
|
|
45
45
|
this.dispatchStart.doDispatch(container);
|
|
46
|
-
let state
|
|
47
|
-
if (this.stateMachine.activeState
|
|
48
|
-
state =
|
|
49
|
-
(_b = (_a = this.stateMachine.getStateByID(this.stateMachine.activeState)) === null || _a === void 0 ? void 0 : _a.stateData) !== null && _b !== void 0 ? _b : {};
|
|
46
|
+
let state;
|
|
47
|
+
if (this.stateMachine.activeState) {
|
|
48
|
+
state = (_a = this.stateMachine.getStateByID(this.stateMachine.activeState)) === null || _a === void 0 ? void 0 : _a.stateData;
|
|
50
49
|
}
|
|
51
50
|
const hideNavigation = this.stateMachine.states.length <= 1;
|
|
52
51
|
const hasNextSlide = this.stateMachine.nextState !== undefined;
|
|
@@ -57,13 +56,13 @@ class StartAppUCImp extends StartAppUC {
|
|
|
57
56
|
hasNextSlide,
|
|
58
57
|
hasPreviousSlide
|
|
59
58
|
};
|
|
60
|
-
(
|
|
59
|
+
(_b = this.dispatchSetState) === null || _b === void 0 ? void 0 : _b.doDispatch(dto);
|
|
61
60
|
let isAuthoring = this.editStateEntity.isEditing;
|
|
62
61
|
if (this.stateMachine.activeState === undefined) {
|
|
63
62
|
isAuthoring = true;
|
|
64
63
|
}
|
|
65
|
-
(
|
|
66
|
-
(
|
|
64
|
+
(_c = this.dispatchSetIsAuthoring) === null || _c === void 0 ? void 0 : _c.doDispatch(isAuthoring);
|
|
65
|
+
(_d = this.dispatchThemeColors) === null || _d === void 0 ? void 0 : _d.doDispatch();
|
|
67
66
|
};
|
|
68
67
|
}
|
|
69
68
|
get stateMachine() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HostAppObject, HostAppObjectRepo, HostAppObjectUC } from "../../../HostAppObject";
|
|
2
2
|
export interface DispatchStateDTO {
|
|
3
|
-
finalState
|
|
3
|
+
finalState?: object;
|
|
4
4
|
hideNavigation: boolean;
|
|
5
5
|
hasNextSlide: boolean;
|
|
6
6
|
hasPreviousSlide: boolean;
|
|
@@ -19,9 +19,9 @@ export interface SetStatePayloadV2 {
|
|
|
19
19
|
duration?: number;
|
|
20
20
|
}
|
|
21
21
|
export interface SetStatePayloadV3 {
|
|
22
|
-
finalState: object;
|
|
23
22
|
hideNavigation: boolean;
|
|
24
23
|
hasNextSlide: boolean;
|
|
25
24
|
hasPreviousSlide: boolean;
|
|
26
25
|
duration?: number;
|
|
26
|
+
finalState?: object;
|
|
27
27
|
}
|
|
@@ -54,8 +54,9 @@ class DispatchSetStateUCImp extends DispatchSetStateUC {
|
|
|
54
54
|
}
|
|
55
55
|
dispatchV2(state, duration) {
|
|
56
56
|
var _a;
|
|
57
|
+
const finalState = state ? JSON.stringify(state) : "";
|
|
57
58
|
const payload = {
|
|
58
|
-
finalState
|
|
59
|
+
finalState,
|
|
59
60
|
duration
|
|
60
61
|
};
|
|
61
62
|
(_a = this.dispatcher) === null || _a === void 0 ? void 0 : _a.formRequestAndDispatch(this.requestType, 2, payload);
|