@robotical/webapp-types 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-types/src/analytics/AnalyticsManager.d.ts +28 -0
- package/dist-types/src/analytics/AnalyticsManager.js +171 -0
- package/dist-types/src/application/ApplicationManager/ApplicationManager.d.ts +8 -2
- package/dist-types/src/application/ApplicationManager/ApplicationManager.js +23 -8
- package/dist-types/src/application/RAFTs/Cog/Cog.d.ts +1 -1
- package/dist-types/src/application/RAFTs/Cog/Cog.js +1 -1
- package/dist-types/src/application/RAFTs/Cog/PublishedDataAnalyser.d.ts +36 -16
- package/dist-types/src/application/RAFTs/Cog/PublishedDataAnalyser.js +130 -88
- package/dist-types/src/application/RAFTs/Cog/PublishedDataGetter.d.ts +1 -1
- package/dist-types/src/application/RAFTs/Cog/PublishedDataGetter.js +1 -1
- package/dist-types/src/application/RAFTs/Marty/Marty.d.ts +5 -3
- package/dist-types/src/application/RAFTs/Marty/Marty.js +24 -16
- package/dist-types/src/application/RAFTs/RAFT.d.ts +5 -1
- package/dist-types/src/application/RAFTs/RAFT.js +30 -1
- package/dist-types/src/application/RAFTs/RAFTInterface.d.ts +1 -1
- package/dist-types/src/application/RAFTs/RaftObserver.d.ts +1 -1
- package/dist-types/src/application/RAFTs/raft-subscription-helpers.js +1 -1
- package/dist-types/src/components/modals/DisconnectConfirmation/index.js +3 -1
- package/dist-types/src/components/modals/VerificationModal/index.js +1 -1
- package/dist-types/src/components/modals/VerificationModalPhoneApp/index.js +1 -1
- package/dist-types/src/components/oneoffs/LEDs/index.js +1 -1
- package/dist-types/src/components/oneoffs/RaftSignal/index.d.ts +7 -0
- package/dist-types/src/components/oneoffs/{RICSignal → RaftSignal}/index.js +2 -2
- package/dist-types/src/state-observables/modal/ModalState.d.ts +1 -0
- package/dist-types/src/state-observables/modal/ModalState.js +1 -0
- package/dist-types/src/store/SelectedRaftContext.d.ts +2 -0
- package/dist-types/src/store/SelectedRaftContext.js +2 -1
- package/dist-types/src/wrapper-app/WrapperAppManager.d.ts +2 -2
- package/dist-types/src/wrapper-app/WrapperAppManager.js +3 -3
- package/dist-types/src/wrapper-app/connectors/CogConnector/CogConnector.d.ts +1 -1
- package/dist-types/src/wrapper-app/connectors/CogConnector/CogConnector.js +1 -1
- package/dist-types/src/wrapper-app/connectors/Connector.d.ts +2 -2
- package/dist-types/src/wrapper-app/connectors/Connector.js +1 -1
- package/dist-types/src/wrapper-app/connectors/ConnectorInterface.d.ts +1 -1
- package/dist-types/src/wrapper-app/connectors/MartyConnector/MartyConnector.d.ts +1 -1
- package/dist-types/src/wrapper-app/connectors/MartyConnector/MartyConnector.js +1 -1
- package/package.json +1 -1
- package/dist-types/src/components/oneoffs/RICSignal/index.d.ts +0 -7
|
@@ -5,7 +5,7 @@ import rescale from "../../../utils/helpers/rescale-range";
|
|
|
5
5
|
import { SCREENFREE_GREEN, SCREENFREE_YELLOW } from "../../../styles/colors";
|
|
6
6
|
import isVersionGreater from "../../../utils/helpers/compare-version";
|
|
7
7
|
import { FW_VERSION_RSSI_WIFI } from "../../../utils/helpers/wifi-configuration-subtitle-gen";
|
|
8
|
-
export default function
|
|
8
|
+
export default function RaftSignal(_a) {
|
|
9
9
|
var signalStrength = _a.signalStrength, connectedRaft = _a.connectedRaft;
|
|
10
10
|
var signalRef = useRef(null);
|
|
11
11
|
useEffect(function () {
|
|
@@ -25,5 +25,5 @@ export default function RICSignal(_a) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}, [signalStrength]);
|
|
28
|
-
return _jsx(EmptySignalSVG, { ref: signalRef, width: "
|
|
28
|
+
return _jsx(EmptySignalSVG, { ref: signalRef, width: "100%", opacity: !isVersionGreater((connectedRaft === null || connectedRaft === void 0 ? void 0 : connectedRaft.getRaftVersion()) || "100.0.0", FW_VERSION_RSSI_WIFI) ? 0.5 : 1 });
|
|
29
29
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { RaftTypeE } from '../types/raft';
|
|
1
2
|
export declare enum NewRobotIdE {
|
|
2
3
|
NEW = "=+__new__+="
|
|
3
4
|
}
|
|
4
5
|
export type ConnectedRaftItem = {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
8
|
+
type: RaftTypeE;
|
|
7
9
|
isSelected: boolean;
|
|
8
10
|
};
|
|
9
11
|
export declare const ConnectedRaftContentProvider: ({ children }: {
|
|
@@ -20,6 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
20
20
|
};
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
import { createContext, useContext, useEffect, useState } from 'react';
|
|
23
|
+
import { RaftTypeE } from '../types/raft';
|
|
23
24
|
export var NewRobotIdE;
|
|
24
25
|
(function (NewRobotIdE) {
|
|
25
26
|
NewRobotIdE["NEW"] = "=+__new__+=";
|
|
@@ -33,7 +34,7 @@ var ConnectedRaftContext = createContext({
|
|
|
33
34
|
// Provider component
|
|
34
35
|
export var ConnectedRaftContentProvider = function (_a) {
|
|
35
36
|
var children = _a.children;
|
|
36
|
-
var _b = useState([{ id: NewRobotIdE.NEW, isSelected: true, name: "Connect to new robot" }]), connectedRafts = _b[0], setConnectedRafts = _b[1];
|
|
37
|
+
var _b = useState([{ id: NewRobotIdE.NEW, isSelected: true, name: "Connect to new robot", type: RaftTypeE.undefined }]), connectedRafts = _b[0], setConnectedRafts = _b[1];
|
|
37
38
|
useEffect(function () {
|
|
38
39
|
if (window.applicationManager) {
|
|
39
40
|
window.applicationManager.connectedRaftContextMethods = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RaftInfoEvents } from "../types/events/raft-info";
|
|
2
2
|
import { ConnectionAttemptResults, RaftConnectionMethod } from "../types/raft";
|
|
3
|
-
import { RaftConnEvent, RaftPublishEvent, RaftUpdateEvent } from "@
|
|
3
|
+
import { RaftConnEvent, RaftPublishEvent, RaftUpdateEvent } from "@robotical/raftjs";
|
|
4
4
|
import { RICLedLcdColours } from "@robotical/roboticaljs";
|
|
5
5
|
export declare class WrapperAppManager {
|
|
6
6
|
private connectors;
|
|
@@ -47,7 +47,7 @@ export declare class WrapperAppManager {
|
|
|
47
47
|
/**
|
|
48
48
|
* Send a REST message to the RAFT
|
|
49
49
|
*/
|
|
50
|
-
sendRestMessage(msg: string, params: object | undefined, raftId: string): Promise<import("@
|
|
50
|
+
sendRestMessage(msg: string, params: object | undefined, raftId: string): Promise<import("@robotical/raftjs").RaftOKFail>;
|
|
51
51
|
/**
|
|
52
52
|
* Removes marty after a certain time
|
|
53
53
|
* Removes from the martys list after x seconds so that we can still get the last event
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { WrapperSentMessage } from "../types/communication-between-apps/wrapper-communication";
|
|
38
38
|
import Logger from "../services/logger/Logger";
|
|
39
|
-
import { RaftConnEvent } from "@
|
|
39
|
+
import { RaftConnEvent } from "@robotical/raftjs";
|
|
40
40
|
import ConnectorFactory from "./connectors/ConnectorFactory";
|
|
41
41
|
var SHOW_LOGS = true;
|
|
42
42
|
var TAG = "WrapperAppManager";
|
|
@@ -116,7 +116,7 @@ var WrapperAppManager = /** @class */ (function () {
|
|
|
116
116
|
*/
|
|
117
117
|
WrapperAppManager.prototype.stopVerifyingRaft = function (isCorrectRIC, raftId) {
|
|
118
118
|
if (!isCorrectRIC) {
|
|
119
|
-
this._removeRICConnector(raftId,
|
|
119
|
+
this._removeRICConnector(raftId, 3000);
|
|
120
120
|
}
|
|
121
121
|
return this.connectors[raftId].stopVerifyingRaft(isCorrectRIC);
|
|
122
122
|
};
|
|
@@ -124,7 +124,7 @@ var WrapperAppManager = /** @class */ (function () {
|
|
|
124
124
|
* Disconnect from a RAFT
|
|
125
125
|
*/
|
|
126
126
|
WrapperAppManager.prototype.disconnect = function (raftId) {
|
|
127
|
-
this._removeRICConnector(raftId,
|
|
127
|
+
this._removeRICConnector(raftId, 3000);
|
|
128
128
|
return this.connectors[raftId].disconnect();
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
@@ -2,7 +2,7 @@ import { RaftInfoEvents } from "../../../types/events/raft-info";
|
|
|
2
2
|
import { ConnectionAttemptResults, RaftTypeE } from "../../../types/raft";
|
|
3
3
|
import Connector from "../Connector";
|
|
4
4
|
import ConnectorInterface from "../ConnectorInterface";
|
|
5
|
-
import { RaftConnEvent, RaftPublishEvent, RaftUpdateEvent } from "@
|
|
5
|
+
import { RaftConnEvent, RaftPublishEvent, RaftUpdateEvent } from "@robotical/raftjs";
|
|
6
6
|
import { ConnManager } from "@robotical/roboticaljs";
|
|
7
7
|
declare class CogConnector extends Connector implements ConnectorInterface {
|
|
8
8
|
type: RaftTypeE;
|
|
@@ -52,7 +52,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
52
52
|
import Logger from "../../../services/logger/Logger";
|
|
53
53
|
import { RaftTypeE } from "../../../types/raft";
|
|
54
54
|
import Connector from "../Connector";
|
|
55
|
-
import { RaftConnEvent, RaftUpdateEvent } from "@
|
|
55
|
+
import { RaftConnEvent, RaftUpdateEvent } from "@robotical/raftjs";
|
|
56
56
|
var SHOW_LOGS = true;
|
|
57
57
|
var TAG = "CogConnector";
|
|
58
58
|
var CogConnector = /** @class */ (function (_super) {
|
|
@@ -2,7 +2,7 @@ import { RaftInfoEvents } from "../../types/events/raft-info";
|
|
|
2
2
|
import { ConnectionAttemptResults, RaftTypeE } from "../../types/raft";
|
|
3
3
|
import ConnectorInterface from "./ConnectorInterface";
|
|
4
4
|
import { ConnManager, RICLedLcdColours } from "@robotical/roboticaljs";
|
|
5
|
-
import { RaftOKFail, RaftConnEvent, RaftUpdateEvent, RaftPublishEvent } from "@
|
|
5
|
+
import { RaftOKFail, RaftConnEvent, RaftUpdateEvent, RaftPublishEvent } from "@robotical/raftjs";
|
|
6
6
|
declare class Connector implements ConnectorInterface {
|
|
7
7
|
id: string;
|
|
8
8
|
type: RaftTypeE;
|
|
@@ -16,7 +16,7 @@ declare class Connector implements ConnectorInterface {
|
|
|
16
16
|
/**
|
|
17
17
|
* Get connected raft info
|
|
18
18
|
*/
|
|
19
|
-
getSystemInfo(): Promise<import("@
|
|
19
|
+
getSystemInfo(): Promise<import("@robotical/raftjs").RaftSystemInfo>;
|
|
20
20
|
/**
|
|
21
21
|
* Gets the RAFT name
|
|
22
22
|
*/
|
|
@@ -38,7 +38,7 @@ import { RaftInfoEvents } from "../../types/events/raft-info";
|
|
|
38
38
|
import { WrapperSentMessage } from "../../types/communication-between-apps/wrapper-communication";
|
|
39
39
|
import Logger from "../../services/logger/Logger";
|
|
40
40
|
import { RaftTypeE } from "../../types/raft";
|
|
41
|
-
import { RaftConnEvent, RaftUpdateEvent, RaftPublishEvent } from "@
|
|
41
|
+
import { RaftConnEvent, RaftUpdateEvent, RaftPublishEvent } from "@robotical/raftjs";
|
|
42
42
|
var SHOW_LOGS = true;
|
|
43
43
|
var TAG = "Connector";
|
|
44
44
|
var Connector = /** @class */ (function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RaftConnEvent, RaftPublishEvent, RaftUpdateEvent } from "@
|
|
1
|
+
import { RaftConnEvent, RaftPublishEvent, RaftUpdateEvent } from "@robotical/raftjs";
|
|
2
2
|
import { ConnectionAttemptResults, RaftTypeE } from "../../types/raft";
|
|
3
3
|
import { RaftInfoEvents } from "../../types/events/raft-info";
|
|
4
4
|
import { RICLedLcdColours } from "@robotical/roboticaljs";
|
|
@@ -2,7 +2,7 @@ import { RaftInfoEvents } from "../../../types/events/raft-info";
|
|
|
2
2
|
import { ConnectionAttemptResults, RaftTypeE } from "../../../types/raft";
|
|
3
3
|
import Connector from "../Connector";
|
|
4
4
|
import ConnectorInterface from "../ConnectorInterface";
|
|
5
|
-
import { RaftConnEvent, RaftUpdateEvent, RaftPublishEvent } from "@
|
|
5
|
+
import { RaftConnEvent, RaftUpdateEvent, RaftPublishEvent } from "@robotical/raftjs";
|
|
6
6
|
import { ConnManager } from "@robotical/roboticaljs";
|
|
7
7
|
declare class MartyConnector extends Connector implements ConnectorInterface {
|
|
8
8
|
type: RaftTypeE;
|
|
@@ -53,7 +53,7 @@ import { RICRoboticalAddOns } from "@robotical/ricjs-robotical-addons";
|
|
|
53
53
|
import Logger from "../../../services/logger/Logger";
|
|
54
54
|
import { RaftTypeE } from "../../../types/raft";
|
|
55
55
|
import Connector from "../Connector";
|
|
56
|
-
import { RaftConnEvent, RaftUpdateEvent, RaftPublishEvent, } from "@
|
|
56
|
+
import { RaftConnEvent, RaftUpdateEvent, RaftPublishEvent, } from "@robotical/raftjs";
|
|
57
57
|
import { RICServoParamUpdater, RICSystemUtils, } from "@robotical/roboticaljs";
|
|
58
58
|
var SHOW_LOGS = true;
|
|
59
59
|
var TAG = "MartyConnector";
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import RAFT from "../../../application/RAFTs/RAFT";
|
|
2
|
-
type RICSignlaProps = {
|
|
3
|
-
signalStrength: number;
|
|
4
|
-
connectedRaft?: RAFT;
|
|
5
|
-
};
|
|
6
|
-
export default function RICSignal({ signalStrength, connectedRaft }: RICSignlaProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|