@vived/app 4.19.1 → 4.21.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/ChannelModel/Controllers/clickSelectChannelModel.d.ts +2 -0
- package/lib/Components/ChannelModel/Controllers/clickSelectChannelModel.js +13 -0
- package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Controllers/index.js +1 -0
- package/lib/Components/ChannelModel/Mocks/LoadChannelModelMock.d.ts +9 -0
- package/lib/Components/ChannelModel/Mocks/LoadChannelModelMock.js +16 -0
- package/lib/Components/ChannelModel/Mocks/SelectChannelModelUCMock.d.ts +8 -0
- package/lib/Components/ChannelModel/Mocks/SelectChannelModelUCMock.js +15 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +2 -0
- package/lib/Components/ChannelModel/Mocks/index.js +2 -0
- package/lib/Components/ChannelModel/UC/LoadChannelModelUC.d.ts +10 -0
- package/lib/Components/ChannelModel/UC/LoadChannelModelUC.js +132 -0
- package/lib/Components/ChannelModel/UC/SelectChannelModelUC.js +28 -34
- package/lib/Components/ChannelModel/UC/index.d.ts +2 -0
- package/lib/Components/ChannelModel/UC/index.js +2 -0
- package/lib/Components/Dispatcher/Mocks/GetAssetBlobURLUCMock.d.ts +8 -0
- package/lib/Components/Dispatcher/Mocks/GetAssetBlobURLUCMock.js +15 -0
- package/lib/Components/Dispatcher/Mocks/GetLinkedAssetsUCMock.d.ts +8 -0
- package/lib/Components/Dispatcher/Mocks/GetLinkedAssetsUCMock.js +15 -0
- package/lib/Components/Dispatcher/Mocks/MockGetAssetFolderURL.d.ts +1 -1
- package/lib/Components/Dispatcher/Mocks/MockGetAssetFolderURL.js +3 -3
- package/lib/Components/Dispatcher/Mocks/MockShowAlert.d.ts +1 -1
- package/lib/Components/Dispatcher/Mocks/MockShowAlert.js +3 -3
- package/lib/Components/Dispatcher/Mocks/MockShowConfirm.d.ts +1 -1
- package/lib/Components/Dispatcher/Mocks/MockShowConfirm.js +3 -3
- package/lib/Components/Dispatcher/Mocks/MockShowMarkdown.d.ts +1 -1
- package/lib/Components/Dispatcher/Mocks/MockShowMarkdown.js +3 -3
- package/lib/Components/Dispatcher/Mocks/MockShowSpinner.d.ts +8 -0
- package/lib/Components/Dispatcher/Mocks/MockShowSpinner.js +15 -0
- package/lib/Components/Dispatcher/Mocks/MockSubmitResult.d.ts +1 -1
- package/lib/Components/Dispatcher/Mocks/MockSubmitResult.js +3 -3
- package/lib/Components/Dispatcher/Mocks/ShowSelectModelUCMock.d.ts +8 -0
- package/lib/Components/Dispatcher/Mocks/ShowSelectModelUCMock.js +15 -0
- package/lib/Components/Dispatcher/Mocks/index.d.ts +6 -1
- package/lib/Components/Dispatcher/Mocks/index.js +6 -1
- package/lib/Components/Dispatcher/UC/AppIsReadyUC.js +5 -5
- package/lib/Components/Dispatcher/UC/DispatchStartZSpaceUC.js +5 -5
- package/lib/Components/Dispatcher/UC/DispatchStateChangeUC.js +4 -4
- package/lib/Components/Dispatcher/UC/DispatchStopZSpaceUC.js +5 -5
- package/lib/Components/Dispatcher/UC/GetAssetBlobURLUC.js +21 -21
- package/lib/Components/Dispatcher/UC/GetAssetFolderURLUC.js +20 -20
- package/lib/Components/Dispatcher/UC/GetAssetMetaUC.js +21 -21
- package/lib/Components/Dispatcher/UC/GetAssetsForOwnerUC.js +21 -21
- package/lib/Components/Dispatcher/UC/GetLinkedAssetsUC.js +22 -22
- package/lib/Components/Dispatcher/UC/GoToNextStateUC.js +5 -5
- package/lib/Components/Dispatcher/UC/GoToPreviousStateUC.js +5 -5
- package/lib/Components/Dispatcher/UC/HasNextStateUC.js +15 -15
- package/lib/Components/Dispatcher/UC/HasPreviousStateUC.js +15 -15
- package/lib/Components/Dispatcher/UC/IsAssetFetchedUC.js +16 -16
- package/lib/Components/Dispatcher/UC/IsZSpaceAvailableUC.js +15 -15
- package/lib/Components/Dispatcher/UC/LogUC.js +12 -12
- package/lib/Components/Dispatcher/UC/RegisterExternalStylesheetsUC.js +7 -7
- package/lib/Components/Dispatcher/UC/RestoreCurrentStateUC.js +5 -5
- package/lib/Components/Dispatcher/UC/ShowAlertUC.js +11 -11
- package/lib/Components/Dispatcher/UC/ShowConfirmUC.js +13 -13
- package/lib/Components/Dispatcher/UC/ShowMarkdownEditorUC.js +13 -13
- package/lib/Components/Dispatcher/UC/ShowSelectModelUC.js +15 -15
- package/lib/Components/Dispatcher/UC/StateIsCompleteUC.js +5 -5
- package/lib/Components/Dispatcher/UC/SubmitActivityAssetUC.js +21 -21
- package/lib/Components/Dispatcher/UC/SubmitResultResultUC.js +69 -69
- package/lib/Components/Dispatcher/index.d.ts +1 -0
- package/lib/Components/Dispatcher/index.js +1 -0
- package/lib/Components/FeatureFlags/Adapters/featureFlagsAdapter.d.ts +2 -0
- package/lib/Components/FeatureFlags/Adapters/featureFlagsAdapter.js +23 -0
- package/lib/Components/FeatureFlags/Adapters/index.d.ts +1 -0
- package/lib/Components/FeatureFlags/Adapters/index.js +13 -0
- package/lib/Components/FeatureFlags/Entity/FeatureFlagEntity.d.ts +10 -0
- package/lib/Components/FeatureFlags/Entity/FeatureFlagEntity.js +40 -0
- package/lib/Components/FeatureFlags/Entity/index.d.ts +1 -0
- package/lib/Components/FeatureFlags/Entity/index.js +13 -0
- package/lib/Components/FeatureFlags/Mocks/FeatureFlagsPMMock.d.ts +8 -0
- package/lib/Components/FeatureFlags/Mocks/FeatureFlagsPMMock.js +15 -0
- package/lib/Components/FeatureFlags/Mocks/index.d.ts +1 -0
- package/lib/Components/FeatureFlags/Mocks/index.js +13 -0
- package/lib/Components/FeatureFlags/PMs/FeatureFlagsPM.d.ts +6 -0
- package/lib/Components/FeatureFlags/PMs/FeatureFlagsPM.js +45 -0
- package/lib/Components/FeatureFlags/PMs/index.d.ts +1 -0
- package/lib/Components/FeatureFlags/PMs/index.js +13 -0
- package/lib/Components/FeatureFlags/index.d.ts +4 -0
- package/lib/Components/FeatureFlags/index.js +16 -0
- package/lib/Components/GLBModel/Mocks/LoadGlbFileUCMock.d.ts +1 -0
- package/lib/Components/GLBModel/Mocks/LoadGlbFileUCMock.js +1 -0
- package/lib/Components/GLBModel/UCs/LoadGlbFileUC.d.ts +1 -0
- package/lib/Components/RequestHandler/UC/EnableFeatureUC.d.ts +11 -0
- package/lib/Components/RequestHandler/UC/EnableFeatureUC.js +53 -0
- package/lib/Components/RequestHandler/UC/index.d.ts +1 -0
- package/lib/Components/RequestHandler/UC/index.js +1 -0
- package/lib/Components/index.d.ts +1 -0
- package/lib/Components/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeEnableFeatureUC = exports.EnableFeatureUC = void 0;
|
|
4
|
+
const AppObjectUC_1 = require("../../../AppObject/AppObjectUC");
|
|
5
|
+
const FeatureFlags_1 = require("../../FeatureFlags");
|
|
6
|
+
const Entities_1 = require("../Entities");
|
|
7
|
+
class EnableFeatureUC extends AppObjectUC_1.AppObjectUC {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.requestType = "ENABLE_FEATURE";
|
|
11
|
+
this.payloadVersion = 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.EnableFeatureUC = EnableFeatureUC;
|
|
15
|
+
EnableFeatureUC.type = "EnableFeatureUC";
|
|
16
|
+
function makeEnableFeatureUC(appObject) {
|
|
17
|
+
return new EnableFeatureUCImp(appObject);
|
|
18
|
+
}
|
|
19
|
+
exports.makeEnableFeatureUC = makeEnableFeatureUC;
|
|
20
|
+
class EnableFeatureUCImp extends EnableFeatureUC {
|
|
21
|
+
constructor(appObject) {
|
|
22
|
+
super(appObject, EnableFeatureUC.type);
|
|
23
|
+
this.action = (featureFlag) => {
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = this.featureFlagEntity) === null || _a === void 0 ? void 0 : _a.addFlag(featureFlag);
|
|
26
|
+
};
|
|
27
|
+
this.handleRequest = (version, payload) => {
|
|
28
|
+
if (version === this.payloadVersion) {
|
|
29
|
+
const { featureFlag } = this.castPayload(payload);
|
|
30
|
+
this.action(featureFlag);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
throw new Entities_1.UnsupportedRequestVersion(this.requestType, version);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const handler = appObject.getComponent(Entities_1.AppHandlerEntity.type);
|
|
37
|
+
if (!handler) {
|
|
38
|
+
this.warn("DisposeAppBaseUC has been added to an app object that does not have an AppHandlerEntity. Add one first");
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
handler.registerRequestHandler(this);
|
|
42
|
+
}
|
|
43
|
+
get featureFlagEntity() {
|
|
44
|
+
return this.getCachedSingleton(FeatureFlags_1.FeatureFlagsEntity.type);
|
|
45
|
+
}
|
|
46
|
+
castPayload(payload) {
|
|
47
|
+
const castPayload = payload;
|
|
48
|
+
if (castPayload.featureFlag === undefined) {
|
|
49
|
+
throw new Entities_1.UnableToParsePayload(this.requestType, 1, JSON.stringify(payload));
|
|
50
|
+
}
|
|
51
|
+
return castPayload;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -11,6 +11,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./DisposeAppUC"), exports);
|
|
14
|
+
__exportStar(require("./EnableFeatureUC"), exports);
|
|
14
15
|
__exportStar(require("./SetAppStateUC"), exports);
|
|
15
16
|
__exportStar(require("./SetIsAuthoringUC"), exports);
|
|
16
17
|
__exportStar(require("./SetThemeColorUC"), exports);
|
package/lib/Components/index.js
CHANGED
|
@@ -17,6 +17,7 @@ __exportStar(require("./Challenge"), exports);
|
|
|
17
17
|
__exportStar(require("./ChannelModel"), exports);
|
|
18
18
|
__exportStar(require("./Dispatcher"), exports);
|
|
19
19
|
__exportStar(require("./Enablement"), exports);
|
|
20
|
+
__exportStar(require("./FeatureFlags"), exports);
|
|
20
21
|
__exportStar(require("./FramedScreen"), exports);
|
|
21
22
|
__exportStar(require("./GLBModel"), exports);
|
|
22
23
|
__exportStar(require("./Hideable"), exports);
|