@intuitionrobotics/thunderstorm 0.47.3 → 0.47.4
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.
|
@@ -1,33 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Thunderstorm is a full web app framework!
|
|
4
|
-
*
|
|
5
|
-
* Typescript & Express backend infrastructure that natively runs on firebase function
|
|
6
|
-
* Typescript & React frontend infrastructure
|
|
7
|
-
*
|
|
8
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
* you may not use this file except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/
|
|
22
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
3
|
exports.renderApp = exports.AppWrapper = void 0;
|
|
24
4
|
const React = require("react");
|
|
25
|
-
const ReactDOM = require("react-dom");
|
|
26
5
|
const react_router_dom_1 = require("react-router-dom");
|
|
27
6
|
// noinspection TypeScriptPreferShortImport`
|
|
28
7
|
const HistoryModule_1 = require("../modules/HistoryModule");
|
|
29
8
|
const Thunder_1 = require("./Thunder");
|
|
30
9
|
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
10
|
+
const client_1 = require("react-dom/client");
|
|
31
11
|
const AppWrapper = (props) => {
|
|
32
12
|
const MainApp = Thunder_1.Thunder.getInstance().getMainApp();
|
|
33
13
|
if (!MainApp)
|
|
@@ -37,7 +17,11 @@ const AppWrapper = (props) => {
|
|
|
37
17
|
};
|
|
38
18
|
exports.AppWrapper = AppWrapper;
|
|
39
19
|
function renderApp(appId = "app") {
|
|
40
|
-
|
|
20
|
+
const el = document.getElementById(appId);
|
|
21
|
+
if (!el)
|
|
22
|
+
throw new Error(`Could not find element with id ${appId}`);
|
|
23
|
+
const root = (0, client_1.createRoot)(el);
|
|
24
|
+
root.render(React.createElement(exports.AppWrapper, null));
|
|
41
25
|
}
|
|
42
26
|
exports.renderApp = renderApp;
|
|
43
27
|
//# sourceMappingURL=AppWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AppWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AppWrapper.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,uDAAwC;AACxC,4CAA4C;AAC5C,4DAA8D;AAC9D,uCAAkC;AAClC,4DAA4E;AAC5E,6CAA4C;AAGrC,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAE9C,MAAM,OAAO,GAAG,iBAAO,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACnD,IAAI,CAAC,OAAO;QACR,MAAM,IAAI,0CAA8B,CAAC,6BAA6B,CAAC,CAAC;IAE5E,OAAO,CACH,oBAAC,yBAAM,IAAC,OAAO,EAAE,oCAAoB,CAAC,UAAU,EAAE;QAC9C,oBAAC,OAAO,OAAE,CACL,CAAC,CAAA;AAClB,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB;AAEF,SAAgB,SAAS,CAAC,QAAgB,KAAK;IAC3C,MAAM,EAAE,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE;QACH,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,EAAE,CAAC,CAAC;IAE/D,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,CAAC,MAAM,CAAC,oBAAC,kBAAU,OAAE,CAAC,CAAA;AAC9B,CAAC;AAPD,8BAOC"}
|