@intuitionrobotics/thunderstorm 0.41.69 → 0.41.70
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/app-backend/api/v1/utils/version/_assert.js +1 -1
- package/app-backend/api/v1/utils/version/_assert.js.map +1 -1
- package/app-backend/api/v1/utils/version/assert.js +13 -58
- package/app-backend/api/v1/utils/version/assert.js.map +1 -1
- package/app-backend/core/BaseStorm.js +34 -87
- package/app-backend/core/BaseStorm.js.map +1 -1
- package/app-backend/core/Storm.js +42 -112
- package/app-backend/core/Storm.js.map +1 -1
- package/app-backend/exceptions.js +11 -27
- package/app-backend/exceptions.js.map +1 -1
- package/app-backend/modules/CleanupScheduler.js +24 -92
- package/app-backend/modules/CleanupScheduler.js.map +1 -1
- package/app-backend/modules/FirestoreBackupScheduler.js +47 -138
- package/app-backend/modules/FirestoreBackupScheduler.js.map +1 -1
- package/app-backend/modules/ForceUpgrade.js +31 -82
- package/app-backend/modules/ForceUpgrade.js.map +1 -1
- package/app-backend/modules/http/AxiosHttpModule.js +116 -184
- package/app-backend/modules/http/AxiosHttpModule.js.map +1 -1
- package/app-backend/modules/proxy/RemoteProxy.js +40 -90
- package/app-backend/modules/proxy/RemoteProxy.js.map +1 -1
- package/app-backend/modules/proxy/RemoteProxyCaller.js +49 -122
- package/app-backend/modules/proxy/RemoteProxyCaller.js.map +1 -1
- package/app-backend/modules/server/HttpServer.js +153 -216
- package/app-backend/modules/server/HttpServer.js.map +1 -1
- package/app-backend/modules/server/server-api.js +236 -361
- package/app-backend/modules/server/server-api.js.map +1 -1
- package/app-backend/modules/server/server-errors.js +51 -91
- package/app-backend/modules/server/server-errors.js.map +1 -1
- package/app-backend/utils/LogClient_File.js +23 -42
- package/app-backend/utils/LogClient_File.js.map +1 -1
- package/app-backend/utils/file.js +7 -50
- package/app-backend/utils/file.js.map +1 -1
- package/app-backend/utils/promisify-request.js +13 -43
- package/app-backend/utils/promisify-request.js.map +1 -1
- package/app-backend/utils/to-be-removed.js +7 -8
- package/app-backend/utils/to-be-removed.js.map +1 -1
- package/app-backend/utils/types.js +1 -1
- package/app-backend/utils/types.js.map +1 -1
- package/app-frontend/components/ActionButton.js +5 -5
- package/app-frontend/components/ActionButton.js.map +1 -1
- package/app-frontend/components/DropDown.js +91 -119
- package/app-frontend/components/DropDown.js.map +1 -1
- package/app-frontend/components/FilterInput.js +31 -48
- package/app-frontend/components/FilterInput.js.map +1 -1
- package/app-frontend/components/GenericSelect.js +30 -59
- package/app-frontend/components/GenericSelect.js.map +1 -1
- package/app-frontend/components/GenericTabs.js +5 -23
- package/app-frontend/components/GenericTabs.js.map +1 -1
- package/app-frontend/components/Overlay.js +15 -34
- package/app-frontend/components/Overlay.js.map +1 -1
- package/app-frontend/components/TS_Input.js +43 -60
- package/app-frontend/components/TS_Input.js.map +1 -1
- package/app-frontend/components/TS_Table.js +31 -48
- package/app-frontend/components/TS_Table.js.map +1 -1
- package/app-frontend/components/TS_TextArea.js +21 -48
- package/app-frontend/components/TS_TextArea.js.map +1 -1
- package/app-frontend/components/Tabs.js +16 -33
- package/app-frontend/components/Tabs.js.map +1 -1
- package/app-frontend/components/adapter/Adapter.js +103 -154
- package/app-frontend/components/adapter/Adapter.js.map +1 -1
- package/app-frontend/components/adapter/BaseRenderer.js +9 -32
- package/app-frontend/components/adapter/BaseRenderer.js.map +1 -1
- package/app-frontend/components/checkbox/TS_Checkbox.js +12 -29
- package/app-frontend/components/checkbox/TS_Checkbox.js.map +1 -1
- package/app-frontend/components/checkbox/TS_CheckboxField.js +16 -34
- package/app-frontend/components/checkbox/TS_CheckboxField.js.map +1 -1
- package/app-frontend/components/form/Form.js +21 -39
- package/app-frontend/components/form/Form.js.map +1 -1
- package/app-frontend/components/playground/Example_NewProps.js +25 -53
- package/app-frontend/components/playground/Example_NewProps.js.map +1 -1
- package/app-frontend/components/playground/Playground.js +21 -49
- package/app-frontend/components/playground/Playground.js.map +1 -1
- package/app-frontend/components/tree/MenuComponent.js +11 -27
- package/app-frontend/components/tree/MenuComponent.js.map +1 -1
- package/app-frontend/components/tree/MultiTypeAdaptor.js +16 -32
- package/app-frontend/components/tree/MultiTypeAdaptor.js.map +1 -1
- package/app-frontend/components/tree/SimpleTreeNodeRenderer.js +18 -52
- package/app-frontend/components/tree/SimpleTreeNodeRenderer.js.map +1 -1
- package/app-frontend/components/tree/Tree.js +142 -178
- package/app-frontend/components/tree/Tree.js.map +1 -1
- package/app-frontend/components/treeicons.js +5 -5
- package/app-frontend/components/treeicons.js.map +1 -1
- package/app-frontend/core/AbstractThunder.js +27 -43
- package/app-frontend/core/AbstractThunder.js.map +1 -1
- package/app-frontend/core/AppPage.js +16 -32
- package/app-frontend/core/AppPage.js.map +1 -1
- package/app-frontend/core/AppWrapper.js +9 -10
- package/app-frontend/core/AppWrapper.js.map +1 -1
- package/app-frontend/core/BaseComponent.js +62 -106
- package/app-frontend/core/BaseComponent.js.map +1 -1
- package/app-frontend/core/SimpleScriptInjector.js +12 -31
- package/app-frontend/core/SimpleScriptInjector.js.map +1 -1
- package/app-frontend/core/Thunder.js +32 -48
- package/app-frontend/core/Thunder.js.map +1 -1
- package/app-frontend/core/thunder-dispatcher.js +18 -67
- package/app-frontend/core/thunder-dispatcher.js.map +1 -1
- package/app-frontend/modules/ConnectivityModule.js +16 -32
- package/app-frontend/modules/ConnectivityModule.js.map +1 -1
- package/app-frontend/modules/ForceUpgrade.js +17 -33
- package/app-frontend/modules/ForceUpgrade.js.map +1 -1
- package/app-frontend/modules/HistoryModule.js +51 -79
- package/app-frontend/modules/HistoryModule.js.map +1 -1
- package/app-frontend/modules/ResourcesModule.js +12 -28
- package/app-frontend/modules/ResourcesModule.js.map +1 -1
- package/app-frontend/modules/StorageModule.js +47 -68
- package/app-frontend/modules/StorageModule.js.map +1 -1
- package/app-frontend/modules/ThunderstormModule.js +15 -31
- package/app-frontend/modules/ThunderstormModule.js.map +1 -1
- package/app-frontend/modules/component-loader/ReactEntryComponentInjector.js +24 -41
- package/app-frontend/modules/component-loader/ReactEntryComponentInjector.js.map +1 -1
- package/app-frontend/modules/component-loader/entry-component-loading-module.js +19 -36
- package/app-frontend/modules/component-loader/entry-component-loading-module.js.map +1 -1
- package/app-frontend/modules/dialog/Dialog.js +55 -96
- package/app-frontend/modules/dialog/Dialog.js.map +1 -1
- package/app-frontend/modules/dialog/DialogModule.js +48 -84
- package/app-frontend/modules/dialog/DialogModule.js.map +1 -1
- package/app-frontend/modules/http/HttpClient.js +46 -93
- package/app-frontend/modules/http/HttpClient.js.map +1 -1
- package/app-frontend/modules/http/XhrHttpModule.js +66 -88
- package/app-frontend/modules/http/XhrHttpModule.js.map +1 -1
- package/app-frontend/modules/locale/LocaleModule.js +23 -50
- package/app-frontend/modules/locale/LocaleModule.js.map +1 -1
- package/app-frontend/modules/menu/MenuAndButton.js +23 -40
- package/app-frontend/modules/menu/MenuAndButton.js.map +1 -1
- package/app-frontend/modules/menu/MenuModule.js +25 -42
- package/app-frontend/modules/menu/MenuModule.js.map +1 -1
- package/app-frontend/modules/menu/PopupMenu.js +37 -64
- package/app-frontend/modules/menu/PopupMenu.js.map +1 -1
- package/app-frontend/modules/routing/RoutingModule.js +47 -66
- package/app-frontend/modules/routing/RoutingModule.js.map +1 -1
- package/app-frontend/modules/routing/route.js +31 -33
- package/app-frontend/modules/routing/route.js.map +1 -1
- package/app-frontend/modules/toaster/BaseToaster.js +18 -36
- package/app-frontend/modules/toaster/BaseToaster.js.map +1 -1
- package/app-frontend/modules/toaster/Toaster.js +12 -38
- package/app-frontend/modules/toaster/Toaster.js.map +1 -1
- package/app-frontend/modules/toaster/ToasterModule.js +61 -88
- package/app-frontend/modules/toaster/ToasterModule.js.map +1 -1
- package/app-frontend/modules/tooltip/Tooltip.js +25 -52
- package/app-frontend/modules/tooltip/Tooltip.js.map +1 -1
- package/app-frontend/modules/tooltip/TooltipModule.js +32 -51
- package/app-frontend/modules/tooltip/TooltipModule.js.map +1 -1
- package/app-frontend/tools/KeyboardListener.js +24 -41
- package/app-frontend/tools/KeyboardListener.js.map +1 -1
- package/app-frontend/tools/Stylable.js +14 -28
- package/app-frontend/tools/Stylable.js.map +1 -1
- package/app-frontend/utils/tools.js +8 -8
- package/app-frontend/utils/tools.js.map +1 -1
- package/app-frontend/widgets/FieldEditor.js +16 -32
- package/app-frontend/widgets/FieldEditor.js.map +1 -1
- package/app-frontend/widgets/FieldEditorClick.js +32 -49
- package/app-frontend/widgets/FieldEditorClick.js.map +1 -1
- package/app-frontend/widgets/FieldEditorWithButtons.js +33 -49
- package/app-frontend/widgets/FieldEditorWithButtons.js.map +1 -1
- package/app-frontend/widgets/click-to-drag/ClickToDrag.js +25 -41
- package/app-frontend/widgets/click-to-drag/ClickToDrag.js.map +1 -1
- package/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.js +22 -38
- package/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.js.map +1 -1
- package/package.json +4 -4
- package/shared/BaseHttpModule.js +44 -64
- package/shared/BaseHttpModule.js.map +1 -1
- package/shared/BaseHttpRequest.js +122 -176
- package/shared/BaseHttpRequest.js.map +1 -1
- package/shared/request-types.js +4 -19
- package/shared/request-types.js.map +1 -1
- package/test-backend/StormTester.js +37 -90
- package/test-backend/StormTester.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractThunder.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AbstractThunder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"AbstractThunder.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AbstractThunder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,6DAAuD;AAEvD,qFAA+E;AAC/E,gFAAmF;AAEnF,MAAa,eACZ,SAAQ,8BAAa;IAIrB;QACC,KAAK,EAAE,CAAC;QAHC,cAAS,GAAU,EAAE,CAAC;QAwCtB,cAAS,GAAG,GAAS,EAAE;YAChC,OAAO;QACR,CAAC,CAAC;QAtCD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,aAAa;QACb,sCAAiB,CAAC,iBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,WAAW;QACjB,OAAO,eAAe,CAAC,QAA2B,CAAC;IACpD,CAAC;IAED,IAAI;QACH,KAAK,CAAC,IAAI,EAAE,CAAC;QAEb,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YAAY,CAAC,SAAqB;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IAES,aAAa,CAAC,QAAa;QACpC,IAAI,CAAC,OAAO,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAES,gBAAgB,CAAC,QAAa;QACvC,IAAI,CAAC,OAAO,CAAC,2BAA2B,QAAQ,EAAE,CAAC,CAAC;QACpD,iCAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAEM,KAAK,CAAC,SAAsB;QAClC,KAAK,CAAC,KAAK,EAAE,CAAA;QACb,SAAS,aAAT,SAAS,uBAAT,SAAS,GAAK;IACf,CAAC;CAKD;AA9CD,0CA8CC;AAEY,QAAA,yBAAyB,GAAG,IAAI,sCAAiB,CAA4C,sBAAsB,CAAC,CAAC"}
|
|
@@ -19,49 +19,33 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.AppPage = exports.dispatch_onPageTitleChanged = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
25
|
+
const thunder_dispatcher_1 = require("./thunder-dispatcher");
|
|
39
26
|
exports.dispatch_onPageTitleChanged = new thunder_dispatcher_1.ThunderDispatcher("onPageTitleChanged");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_this.pageTitle = pageTitle || document.title;
|
|
46
|
-
return _this;
|
|
27
|
+
class AppPage extends BaseComponent_1.BaseComponent {
|
|
28
|
+
constructor(p, pageTitle) {
|
|
29
|
+
super(p);
|
|
30
|
+
this.mounted = false;
|
|
31
|
+
this.pageTitle = pageTitle || document.title;
|
|
47
32
|
}
|
|
48
|
-
|
|
33
|
+
setPageTitle(pageTitle) {
|
|
49
34
|
this.pageTitle = pageTitle;
|
|
50
35
|
if (this.mounted)
|
|
51
36
|
document.title = this.pageTitle;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
this.logDebug(
|
|
37
|
+
}
|
|
38
|
+
componentDidMount() {
|
|
39
|
+
this.logDebug(`Mounting page: ${this.pageTitle}`);
|
|
55
40
|
this.prevTitle = document.title;
|
|
56
41
|
document.title = this.pageTitle;
|
|
57
42
|
this.mounted = true;
|
|
58
|
-
}
|
|
59
|
-
|
|
43
|
+
}
|
|
44
|
+
componentWillUnmount() {
|
|
60
45
|
var _a;
|
|
61
46
|
document.title = this.prevTitle;
|
|
62
|
-
(_a =
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}(BaseComponent_1.BaseComponent));
|
|
47
|
+
(_a = super.componentWillUnmount) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
66
50
|
exports.AppPage = AppPage;
|
|
67
51
|
//# sourceMappingURL=AppPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppPage.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AppPage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"AppPage.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AppPage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,mDAA8C;AAC9C,6DAAuD;AAM1C,QAAA,2BAA2B,GAAG,IAAI,sCAAiB,CAAmD,oBAAoB,CAAC,CAAC;AAGzI,MAAsB,OACrB,SAAQ,6BAAmB;IAM3B,YAAsB,CAAI,EAAE,SAAkB;QAC7C,KAAK,CAAC,CAAC,CAAC,CAAC;QAHF,YAAO,GAAY,KAAK,CAAC;QAIhC,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC;IAC9C,CAAC;IAED,YAAY,CAAC,SAAiB;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,IAAI,CAAC,OAAO;YACf,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;IAClC,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,QAAQ,CAAC,kBAAkB,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;QAChC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,oBAAoB;;QACnB,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,MAAA,KAAK,CAAC,oBAAoB,qDAAK;IAChC,CAAC;CACD;AA7BD,0BA6BC"}
|
|
@@ -21,23 +21,22 @@
|
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.renderApp = exports.AppWrapper = void 0;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const React = require("react");
|
|
25
|
+
const ReactDOM = require("react-dom");
|
|
26
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
27
27
|
// noinspection TypeScriptPreferShortImport`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const HistoryModule_1 = require("../modules/HistoryModule");
|
|
29
|
+
const Thunder_1 = require("./Thunder");
|
|
30
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
31
|
+
const AppWrapper = (props) => {
|
|
32
|
+
const MainApp = Thunder_1.Thunder.getInstance().getMainApp();
|
|
33
33
|
if (!MainApp)
|
|
34
34
|
throw new ts_common_1.ImplementationMissingException("mainApp was not specified!!");
|
|
35
35
|
return (React.createElement(react_router_dom_1.Router, { history: HistoryModule_1.BrowserHistoryModule.getHistory() },
|
|
36
36
|
React.createElement(MainApp, null)));
|
|
37
37
|
};
|
|
38
38
|
exports.AppWrapper = AppWrapper;
|
|
39
|
-
function renderApp(appId) {
|
|
40
|
-
if (appId === void 0) { appId = "app"; }
|
|
39
|
+
function renderApp(appId = "app") {
|
|
41
40
|
ReactDOM.render(React.createElement(exports.AppWrapper, null), document.getElementById(appId));
|
|
42
41
|
}
|
|
43
42
|
exports.renderApp = renderApp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AppWrapper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH
|
|
1
|
+
{"version":3,"file":"AppWrapper.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/AppWrapper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,+BAA+B;AAC/B,sCAAsC;AACtC,uDAAwC;AACxC,4CAA4C;AAC5C,4DAA8D;AAC9D,uCAAkC;AAClC,4DAA4E;AAIrE,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAEjD,MAAM,OAAO,GAAG,iBAAO,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACnD,IAAI,CAAC,OAAO;QACX,MAAM,IAAI,0CAA8B,CAAC,6BAA6B,CAAC,CAAC;IAEzE,OAAO,CACN,oBAAC,yBAAM,IAAC,OAAO,EAAE,oCAAoB,CAAC,UAAU,EAAE;QACjD,oBAAC,OAAO,OAAE,CACF,CAAC,CAAA;AACZ,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB;AAEF,SAAgB,SAAS,CAAC,QAAgB,KAAK;IAC9C,QAAQ,CAAC,MAAM,CACd,oBAAC,kBAAU,OAAE,EACb,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAC9B,CAAC;AACH,CAAC;AALD,8BAKC"}
|
|
@@ -19,149 +19,105 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.BaseComponent = void 0;
|
|
37
24
|
/**
|
|
38
25
|
* Created by tacb0ss on 28/07/2018.
|
|
39
26
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
const React = require("react");
|
|
28
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
29
|
+
const StorageModule_1 = require("../modules/StorageModule");
|
|
30
|
+
const ResourcesModule_1 = require("../modules/ResourcesModule");
|
|
31
|
+
const HistoryModule_1 = require("../modules/HistoryModule");
|
|
32
|
+
const Thunder_1 = require("./Thunder");
|
|
46
33
|
// @ts-ignore
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_this.componentDidMount = function () {
|
|
34
|
+
class BaseComponent extends React.Component {
|
|
35
|
+
constructor(props) {
|
|
36
|
+
super(props);
|
|
37
|
+
this.timeoutMap = {};
|
|
38
|
+
this.logger = new ts_common_1.Logger(this.constructor.name);
|
|
39
|
+
this._componentDidMount = this.componentDidMount;
|
|
40
|
+
this.componentDidMount = () => {
|
|
55
41
|
// @ts-ignore
|
|
56
|
-
Thunder_1.Thunder.getInstance().addUIListener(
|
|
57
|
-
if (
|
|
58
|
-
|
|
42
|
+
Thunder_1.Thunder.getInstance().addUIListener(this);
|
|
43
|
+
if (this._componentDidMount)
|
|
44
|
+
this._componentDidMount();
|
|
59
45
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (
|
|
63
|
-
|
|
46
|
+
this._componentWillUnmount = this.componentWillUnmount;
|
|
47
|
+
this.componentWillUnmount = () => {
|
|
48
|
+
if (this._componentWillUnmount)
|
|
49
|
+
this._componentWillUnmount();
|
|
64
50
|
// @ts-ignore
|
|
65
|
-
Thunder_1.Thunder.getInstance().removeUIListener(
|
|
51
|
+
Thunder_1.Thunder.getInstance().removeUIListener(this);
|
|
66
52
|
};
|
|
67
|
-
return _this;
|
|
68
53
|
}
|
|
69
|
-
|
|
70
|
-
if (ms === void 0) { ms = 0; }
|
|
54
|
+
debounce(handler, key, ms = 0) {
|
|
71
55
|
ts_common_1._clearTimeout(this.timeoutMap[key]);
|
|
72
56
|
this.timeoutMap[key] = ts_common_1._setTimeout(handler, ms);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var _this = this;
|
|
76
|
-
if (ms === void 0) { ms = 0; }
|
|
57
|
+
}
|
|
58
|
+
throttle(handler, key, ms = 0) {
|
|
77
59
|
if (this.timeoutMap[key])
|
|
78
60
|
return;
|
|
79
|
-
this.timeoutMap[key] = ts_common_1._setTimeout(
|
|
61
|
+
this.timeoutMap[key] = ts_common_1._setTimeout(() => {
|
|
80
62
|
handler();
|
|
81
|
-
delete
|
|
63
|
+
delete this.timeoutMap[key];
|
|
82
64
|
}, ms);
|
|
83
|
-
}
|
|
84
|
-
|
|
65
|
+
}
|
|
66
|
+
setStateKeysToUpdate(stateKeysToUpdate) {
|
|
85
67
|
this.stateKeysToUpdate = stateKeysToUpdate;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
var _this = this;
|
|
68
|
+
}
|
|
69
|
+
shouldComponentUpdate(nextProps, nextState, nextContext) {
|
|
89
70
|
if (!this.stateKeysToUpdate)
|
|
90
71
|
return true;
|
|
91
|
-
return this.stateKeysToUpdate.find(
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
var toLog = [];
|
|
95
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
96
|
-
toLog[_i] = arguments[_i];
|
|
97
|
-
}
|
|
72
|
+
return this.stateKeysToUpdate.find(key => this.state[key] !== nextState[key]) !== undefined;
|
|
73
|
+
}
|
|
74
|
+
logVerbose(...toLog) {
|
|
98
75
|
this.logImpl(ts_common_1.LogLevel.Verbose, false, toLog);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
var toLog = [];
|
|
102
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
103
|
-
toLog[_i] = arguments[_i];
|
|
104
|
-
}
|
|
76
|
+
}
|
|
77
|
+
logDebug(...toLog) {
|
|
105
78
|
this.logImpl(ts_common_1.LogLevel.Debug, false, toLog);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
var toLog = [];
|
|
109
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
110
|
-
toLog[_i] = arguments[_i];
|
|
111
|
-
}
|
|
79
|
+
}
|
|
80
|
+
logInfo(...toLog) {
|
|
112
81
|
this.logImpl(ts_common_1.LogLevel.Info, false, toLog);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
var toLog = [];
|
|
116
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
117
|
-
toLog[_i] = arguments[_i];
|
|
118
|
-
}
|
|
82
|
+
}
|
|
83
|
+
logWarning(...toLog) {
|
|
119
84
|
this.logImpl(ts_common_1.LogLevel.Warning, false, toLog);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
var toLog = [];
|
|
123
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
124
|
-
toLog[_i] = arguments[_i];
|
|
125
|
-
}
|
|
85
|
+
}
|
|
86
|
+
logError(...toLog) {
|
|
126
87
|
this.logImpl(ts_common_1.LogLevel.Error, false, toLog);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
var toLog = [];
|
|
130
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
131
|
-
toLog[_i - 2] = arguments[_i];
|
|
132
|
-
}
|
|
88
|
+
}
|
|
89
|
+
log(level, bold, ...toLog) {
|
|
133
90
|
this.logImpl(level, bold, toLog);
|
|
134
|
-
}
|
|
135
|
-
|
|
91
|
+
}
|
|
92
|
+
logImpl(level, bold, toLog) {
|
|
136
93
|
this.logger.log(level, bold, toLog);
|
|
137
|
-
}
|
|
138
|
-
|
|
94
|
+
}
|
|
95
|
+
static store(key, value) {
|
|
139
96
|
StorageModule_1.StorageModule.set(key, value);
|
|
140
|
-
}
|
|
141
|
-
|
|
97
|
+
}
|
|
98
|
+
static load(key, defaultValue) {
|
|
142
99
|
return StorageModule_1.StorageModule.get(key, defaultValue);
|
|
143
|
-
}
|
|
144
|
-
|
|
100
|
+
}
|
|
101
|
+
static getElementId(e) {
|
|
145
102
|
return e.currentTarget.id;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
103
|
+
}
|
|
104
|
+
static getImageUrl(_relativePath) {
|
|
105
|
+
let relativePath = _relativePath;
|
|
149
106
|
if (!relativePath)
|
|
150
107
|
return "";
|
|
151
108
|
if (relativePath.indexOf(".") === -1)
|
|
152
109
|
relativePath += ".png";
|
|
153
110
|
return ResourcesModule_1.ResourcesModule.getImageUrl(relativePath);
|
|
154
|
-
}
|
|
155
|
-
|
|
111
|
+
}
|
|
112
|
+
static getQueryParameter(name) {
|
|
156
113
|
return HistoryModule_1.BrowserHistoryModule.getQueryParams()[name];
|
|
157
|
-
}
|
|
158
|
-
|
|
114
|
+
}
|
|
115
|
+
static getUrl() {
|
|
159
116
|
return HistoryModule_1.BrowserHistoryModule.getCurrent().pathname;
|
|
160
|
-
}
|
|
161
|
-
|
|
117
|
+
}
|
|
118
|
+
toString() {
|
|
162
119
|
return this.constructor.name;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}(React.Component));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
166
122
|
exports.BaseComponent = BaseComponent;
|
|
167
123
|
//# sourceMappingURL=BaseComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseComponent.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/BaseComponent.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"BaseComponent.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/BaseComponent.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH;;GAEG;AACH,+BAA+B;AAE/B,4DAOsC;AACtC,4DAAuD;AACvD,gEAA2D;AAC3D,4DAA8D;AAC9D,uCAAkC;AAElC,aAAa;AACb,MAAa,aACZ,SAAQ,KAAK,CAAC,SAAe;IAQ7B,YAAY,KAAQ;QACnB,KAAK,CAAC,KAAK,CAAC,CAAC;QAHN,eAAU,GAA4B,EAAE,CAAC;QAIhD,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEhD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,iBAAiB,GAAG,GAAG,EAAE;YAC7B,aAAa;YACb,iBAAO,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAE1C,IAAI,IAAI,CAAC,kBAAkB;gBAC1B,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC5B,CAAC,CAAC;QAEF,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACvD,IAAI,CAAC,oBAAoB,GAAG,GAAG,EAAE;YAChC,IAAI,IAAI,CAAC,qBAAqB;gBAC7B,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAE9B,aAAa;YACb,iBAAO,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,OAAqB,EAAE,GAAW,EAAE,EAAE,GAAG,CAAC;QAClD,yBAAa,CAAC,IAAI,C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OAAO,oCAAoB,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,MAAM;QACZ,OAAO,oCAAoB,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;IACnD,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC9B,CAAC;CACD;AAvHD,sCAuHC"}
|
|
@@ -19,48 +19,29 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.SimpleScriptInjector = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function SimpleScriptInjector() {
|
|
42
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
43
|
-
}
|
|
44
|
-
SimpleScriptInjector.prototype.componentDidMount = function () {
|
|
45
|
-
var _this = this;
|
|
24
|
+
const React = require("react");
|
|
25
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
26
|
+
class SimpleScriptInjector extends React.Component {
|
|
27
|
+
componentDidMount() {
|
|
46
28
|
if (SimpleScriptInjector.injected[this.props.src]) {
|
|
47
|
-
ts_common_1._setTimeout(
|
|
29
|
+
ts_common_1._setTimeout(() => this.props.onLoaded(this.props.src));
|
|
48
30
|
return;
|
|
49
31
|
}
|
|
50
|
-
|
|
32
|
+
const script = document.createElement("script");
|
|
51
33
|
script.type = "text/javascript";
|
|
52
34
|
script.src = this.props.src;
|
|
53
35
|
script.async = true;
|
|
54
36
|
script.id = this.props.src;
|
|
55
|
-
script.onload =
|
|
37
|
+
script.onload = () => this.props.onLoaded(this.props.src);
|
|
56
38
|
document.body.appendChild(script);
|
|
57
39
|
SimpleScriptInjector.injected[this.props.src] = script;
|
|
58
|
-
}
|
|
59
|
-
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
60
42
|
return "";
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return SimpleScriptInjector;
|
|
64
|
-
}(React.Component));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
65
45
|
exports.SimpleScriptInjector = SimpleScriptInjector;
|
|
46
|
+
SimpleScriptInjector.injected = {};
|
|
66
47
|
//# sourceMappingURL=SimpleScriptInjector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleScriptInjector.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/SimpleScriptInjector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"SimpleScriptInjector.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/SimpleScriptInjector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,+BAA+B;AAC/B,4DAAyD;AAOzD,MAAa,oBACZ,SAAQ,KAAK,CAAC,SAAgB;IAI9B,iBAAiB;QAChB,IAAI,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YAClD,uBAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YACvD,OAAO;SACP;QAED,MAAM,MAAM,GAAsB,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACnE,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QAC5B,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QAC3B,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1D,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACxD,CAAC;IAED,MAAM;QACL,OAAO,EAAE,CAAC;IACX,CAAC;;AAvBF,oDAwBC;AArBgB,6BAAQ,GAAyC,EAAE,CAAC"}
|
|
@@ -19,44 +19,31 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.Thunder = exports.SuccessHandler_Dispatch = exports.ErrorHandler_Dispatch = exports.SuccessHandler_Toast = exports.ErrorHandler_Toast = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
24
|
+
const AppWrapper_1 = require("./AppWrapper");
|
|
25
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
26
|
+
const XhrHttpModule_1 = require("../modules/http/XhrHttpModule");
|
|
27
|
+
const ToasterModule_1 = require("../modules/toaster/ToasterModule");
|
|
28
|
+
const RoutingModule_1 = require("../modules/routing/RoutingModule");
|
|
29
|
+
const HistoryModule_1 = require("../modules/HistoryModule");
|
|
30
|
+
const StorageModule_1 = require("../modules/StorageModule");
|
|
31
|
+
const ResourcesModule_1 = require("../modules/ResourcesModule");
|
|
32
|
+
const AbstractThunder_1 = require("./AbstractThunder");
|
|
33
|
+
const ThunderstormModule_1 = require("../modules/ThunderstormModule");
|
|
34
|
+
const DialogModule_1 = require("../modules/dialog/DialogModule");
|
|
35
|
+
const ErrorHandler_Toast = (request, resError) => {
|
|
36
|
+
const errorMessage = request.errorMessage || (resError === null || resError === void 0 ? void 0 : resError.debugMessage);
|
|
50
37
|
return errorMessage && ToasterModule_1.ToastModule.toastError(errorMessage);
|
|
51
38
|
};
|
|
52
39
|
exports.ErrorHandler_Toast = ErrorHandler_Toast;
|
|
53
|
-
|
|
40
|
+
const SuccessHandler_Toast = (request) => request.successMessage && ToasterModule_1.ToastModule.toastSuccess(request.successMessage);
|
|
54
41
|
exports.SuccessHandler_Toast = SuccessHandler_Toast;
|
|
55
|
-
|
|
42
|
+
const ErrorHandler_Dispatch = (request) => AbstractThunder_1.dispatch_requestCompleted.dispatchUI([request.key, false, request.requestData]);
|
|
56
43
|
exports.ErrorHandler_Dispatch = ErrorHandler_Dispatch;
|
|
57
|
-
|
|
44
|
+
const SuccessHandler_Dispatch = (request) => AbstractThunder_1.dispatch_requestCompleted.dispatchUI([request.key, true, request.requestData]);
|
|
58
45
|
exports.SuccessHandler_Dispatch = SuccessHandler_Dispatch;
|
|
59
|
-
|
|
46
|
+
const modules = [
|
|
60
47
|
ThunderstormModule_1.ThunderstormModule,
|
|
61
48
|
XhrHttpModule_1.XhrHttpModule,
|
|
62
49
|
RoutingModule_1.RoutingModule,
|
|
@@ -66,35 +53,32 @@ var modules = [
|
|
|
66
53
|
StorageModule_1.StorageModule,
|
|
67
54
|
ResourcesModule_1.ResourcesModule
|
|
68
55
|
];
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
_this.renderApp = function () {
|
|
56
|
+
class Thunder extends AbstractThunder_1.AbstractThunder {
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.renderApp = () => {
|
|
74
60
|
AppWrapper_1.renderApp();
|
|
75
61
|
};
|
|
76
|
-
|
|
77
|
-
return _this;
|
|
62
|
+
this.addModules(...modules);
|
|
78
63
|
}
|
|
79
|
-
|
|
64
|
+
static getInstance() {
|
|
80
65
|
return Thunder.instance;
|
|
81
|
-
}
|
|
82
|
-
|
|
66
|
+
}
|
|
67
|
+
init() {
|
|
83
68
|
ts_common_1.BeLogged.addClient(ts_common_1.LogClient_Browser);
|
|
84
|
-
|
|
69
|
+
super.init();
|
|
85
70
|
// @ts-ignore
|
|
86
71
|
XhrHttpModule_1.XhrHttpModule.setErrorHandlers([exports.ErrorHandler_Toast, exports.ErrorHandler_Dispatch]);
|
|
87
72
|
XhrHttpModule_1.XhrHttpModule.setSuccessHandlers([exports.SuccessHandler_Toast, exports.SuccessHandler_Dispatch]);
|
|
88
73
|
return this;
|
|
89
|
-
}
|
|
90
|
-
|
|
74
|
+
}
|
|
75
|
+
setMainApp(mainApp) {
|
|
91
76
|
this.mainApp = mainApp;
|
|
92
77
|
return this;
|
|
93
|
-
}
|
|
94
|
-
|
|
78
|
+
}
|
|
79
|
+
getMainApp() {
|
|
95
80
|
return this.mainApp;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
}(AbstractThunder_1.AbstractThunder));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
99
83
|
exports.Thunder = Thunder;
|
|
100
84
|
//# sourceMappingURL=Thunder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thunder.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/Thunder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"Thunder.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/Thunder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAGH,6CAGsB;AACtB,4DAIsC;AACtC,iEAA4D;AAC5D,oEAA6D;AAC7D,oEAA+D;AAC/D,4DAA8D;AAC9D,4DAAuD;AACvD,gEAA2D;AAK3D,uDAG2B;AAC3B,sEAAiE;AACjE,iEAA4D;AAErD,MAAM,kBAAkB,GAA6B,CAAC,OAAO,EAAE,QAAS,EAAE,EAAE;IAClF,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,KAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,CAAA,CAAC;IACpE,OAAO,YAAY,IAAI,2BAAW,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAC7D,CAAC,CAAC;AAHW,QAAA,kBAAkB,sBAG7B;AACK,MAAM,oBAAoB,GAA0B,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,IAAI,2BAAW,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AAAtI,QAAA,oBAAoB,wBAAkH;AAE5I,MAAM,qBAAqB,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