@intuitionrobotics/thunderstorm 0.41.69 → 0.41.72
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
|
@@ -19,48 +19,34 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __assign = (this && this.__assign) || function () {
|
|
23
|
-
__assign = Object.assign || function(t) {
|
|
24
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
-
s = arguments[i];
|
|
26
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
-
t[p] = s[p];
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
};
|
|
31
|
-
return __assign.apply(this, arguments);
|
|
32
|
-
};
|
|
33
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
23
|
exports.StylableBuilder = void 0;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
StylableBuilder.prototype.setStyle = function (style) {
|
|
24
|
+
class StylableBuilder {
|
|
25
|
+
setStyle(style) {
|
|
39
26
|
this.style = style;
|
|
40
27
|
return this;
|
|
41
|
-
}
|
|
42
|
-
|
|
28
|
+
}
|
|
29
|
+
clearInlineStyle() {
|
|
43
30
|
this.style = {};
|
|
44
31
|
return this;
|
|
45
|
-
}
|
|
46
|
-
|
|
32
|
+
}
|
|
33
|
+
addStyle(style) {
|
|
47
34
|
if (!this.style)
|
|
48
35
|
return this.setStyle(style);
|
|
49
|
-
this.style =
|
|
36
|
+
this.style = Object.assign(Object.assign({}, this.style), style);
|
|
50
37
|
return this;
|
|
51
|
-
}
|
|
52
|
-
|
|
38
|
+
}
|
|
39
|
+
setClassName(className) {
|
|
53
40
|
this.className = className;
|
|
54
41
|
return this;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
}
|
|
43
|
+
build() {
|
|
44
|
+
const styleable = {
|
|
58
45
|
style: this.style,
|
|
59
46
|
className: this.className
|
|
60
47
|
};
|
|
61
48
|
return styleable;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
}());
|
|
49
|
+
}
|
|
50
|
+
}
|
|
65
51
|
exports.StylableBuilder = StylableBuilder;
|
|
66
52
|
//# sourceMappingURL=Stylable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stylable.js","sourceRoot":"","sources":["../../../src/main/app-frontend/tools/Stylable.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"Stylable.js","sourceRoot":"","sources":["../../../src/main/app-frontend/tools/Stylable.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AASH,MAAa,eAAe;IAI3B,QAAQ,CAAC,KAAoB;QAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,gBAAgB;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,QAAQ,CAAC,KAAoB;QAC5B,IAAI,CAAC,IAAI,CAAC,KAAK;YACd,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,KAAK,mCAAO,IAAI,CAAC,KAAK,GAAK,KAAK,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YAAY,CAAC,SAAiB;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,KAAK;QACJ,MAAM,SAAS,GAAa;YAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SACzB,CAAA;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AAnCD,0CAmCC"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.stopPropagation = exports.convertBase64ToFile = exports.browserType = void 0;
|
|
24
|
-
|
|
24
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
25
25
|
function browserType() {
|
|
26
26
|
if (navigator === null || navigator === void 0 ? void 0 : navigator.vendor.includes("Google")) {
|
|
27
27
|
return 'chrome';
|
|
@@ -30,21 +30,21 @@ function browserType() {
|
|
|
30
30
|
}
|
|
31
31
|
exports.browserType = browserType;
|
|
32
32
|
function convertBase64ToFile(fileName, base64, _mimeType) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
const arr = base64.split(',');
|
|
34
|
+
const match = arr[0].match(/:(.*?);/);
|
|
35
|
+
const mimeType = (match && match[1]) || (_mimeType && _mimeType);
|
|
36
36
|
if (!mimeType)
|
|
37
37
|
throw new ts_common_1.ImplementationMissingException("Could not extract mime type from data...");
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const bstr = atob(arr[1]);
|
|
39
|
+
let n = bstr.length;
|
|
40
|
+
const u8arr = new Uint8Array(n);
|
|
41
41
|
while (n--) {
|
|
42
42
|
u8arr[n] = bstr.charCodeAt(n);
|
|
43
43
|
}
|
|
44
44
|
return new File([u8arr], fileName, { type: mimeType });
|
|
45
45
|
}
|
|
46
46
|
exports.convertBase64ToFile = convertBase64ToFile;
|
|
47
|
-
|
|
47
|
+
const stopPropagation = (e) => {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
e.stopPropagation();
|
|
50
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/main/app-frontend/utils/tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/main/app-frontend/utils/tools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAGH,4DAGsC;AAGtC,SAAgB,WAAW;IAC1B,IAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG;QACzC,OAAO,QAAQ,CAAC;KAChB;IAED,MAAM,IAAI,sCAA0B,CAAC,8BAA8B,CAAC,CAAC;AACtE,CAAC;AAND,kCAMC;AAED,SAAgB,mBAAmB,CAAC,QAAgB,EAAE,MAAc,EAAE,SAAkB;IACvF,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC;IACjE,IAAI,CAAC,QAAQ;QACZ,MAAM,IAAI,0CAA8B,CAAC,0CAA0C,CAAC,CAAC;IAEtF,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAEhC,OAAO,CAAC,EAAE,EAAE;QACX,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAC9B;IAED,OAAO,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC;AACtD,CAAC;AAhBD,kDAgBC;AAGM,MAAM,eAAe,GAAG,CAAC,CAAsE,EAAE,EAAE;IACzG,CAAC,CAAC,cAAc,EAAE,CAAC;IACnB,CAAC,CAAC,eAAe,EAAE,CAAC;AACrB,CAAC,CAAC;AAHW,QAAA,eAAe,mBAG1B"}
|
|
@@ -1,41 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.FieldEditor = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.forceUpdate();
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const BaseComponent_1 = require("../core/BaseComponent");
|
|
6
|
+
const TS_Input_1 = require("../components/TS_Input");
|
|
7
|
+
class FieldEditor extends BaseComponent_1.BaseComponent {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.onChange = (value) => {
|
|
11
|
+
this.props.storageKey.set(value);
|
|
12
|
+
this.forceUpdate();
|
|
27
13
|
};
|
|
28
|
-
|
|
29
|
-
return (React.createElement(TS_Input_1.TS_Input, { id:
|
|
14
|
+
this.renderInput = () => {
|
|
15
|
+
return (React.createElement(TS_Input_1.TS_Input, { id: this.props.id, key: this.props.id, type: "text", value: this.props.storageKey.get() || "", style: this.props.inputStyle, onChange: this.onChange, onAccept: this.props.onAccept, onCancel: this.props.onCancel, placeholder: this.props.placeholder, focus: this.props.isEditing }));
|
|
30
16
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return _this;
|
|
17
|
+
this.renderLabel = () => React.createElement("div", { style: this.props.labelStyle }, this.props.value || "");
|
|
18
|
+
this.props.storageKey.set(this.props.value || "");
|
|
34
19
|
}
|
|
35
|
-
|
|
20
|
+
render() {
|
|
36
21
|
return this.props.isEditing ? this.renderInput() : this.renderLabel();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}(BaseComponent_1.BaseComponent));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
40
24
|
exports.FieldEditor = FieldEditor;
|
|
41
25
|
//# sourceMappingURL=FieldEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldEditor.js","sourceRoot":"","sources":["../../../src/main/app-frontend/widgets/FieldEditor.tsx"],"names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AK,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;IA0BD,MAAM;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IACvE,CAAC;CACD;AAnCD,kCAmCC"}
|
|
@@ -1,65 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.FieldEditorClick = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_this.endEdit();
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const FieldEditor_1 = require("./FieldEditor");
|
|
6
|
+
const BaseComponent_1 = require("../core/BaseComponent");
|
|
7
|
+
const StorageModule_1 = require("../modules/StorageModule");
|
|
8
|
+
class FieldEditorClick extends BaseComponent_1.BaseComponent {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props);
|
|
11
|
+
this.handleSave = () => {
|
|
12
|
+
this.props.onAccept(this.state.storageKey.get());
|
|
13
|
+
this.endEdit();
|
|
28
14
|
};
|
|
29
|
-
|
|
30
|
-
addEventListener("keydown",
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
this.startEdit = () => {
|
|
16
|
+
addEventListener("keydown", this.keyPressed);
|
|
17
|
+
this.state.storageKey.set(this.props.value || '');
|
|
18
|
+
this.setState({ isEditing: true });
|
|
33
19
|
};
|
|
34
|
-
|
|
35
|
-
removeEventListener("keydown",
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
this.endEdit = () => {
|
|
21
|
+
removeEventListener("keydown", this.keyPressed);
|
|
22
|
+
this.state.storageKey.delete();
|
|
23
|
+
this.setState({ isEditing: false });
|
|
38
24
|
};
|
|
39
|
-
|
|
25
|
+
this.keyPressed = (e) => {
|
|
40
26
|
if (e.code === 'Escape')
|
|
41
|
-
|
|
27
|
+
this.endEdit();
|
|
42
28
|
};
|
|
43
|
-
|
|
44
|
-
storageKey:
|
|
29
|
+
this.state = {
|
|
30
|
+
storageKey: this.createStorageKey(),
|
|
45
31
|
isEditing: false,
|
|
46
32
|
};
|
|
47
|
-
return _this;
|
|
48
33
|
}
|
|
49
|
-
|
|
50
|
-
return new StorageModule_1.StorageKey(
|
|
51
|
-
}
|
|
52
|
-
|
|
34
|
+
createStorageKey() {
|
|
35
|
+
return new StorageModule_1.StorageKey(`editable-label-controller-${this.props.id}`);
|
|
36
|
+
}
|
|
37
|
+
componentDidUpdate(prevProps, prevState) {
|
|
53
38
|
if (prevProps.id !== this.props.id)
|
|
54
39
|
this.setState({ storageKey: this.createStorageKey() });
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return (React.createElement("div", { className: "ll_h_c", onDoubleClick: this.startEdit, onBlur: function () { return _this.handleSave(); } },
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const { inputStyle, labelStyle } = this.props;
|
|
43
|
+
return (React.createElement("div", { className: `ll_h_c`, onDoubleClick: this.startEdit, onBlur: () => this.handleSave() },
|
|
60
44
|
React.createElement(FieldEditor_1.FieldEditor, { isEditing: this.state.isEditing, inputStyle: inputStyle, labelStyle: labelStyle, onCancel: this.endEdit, onAccept: this.handleSave, storageKey: this.state.storageKey, value: this.props.value, placeholder: this.props.placeholder, id: this.props.id })));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
}(BaseComponent_1.BaseComponent));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
64
47
|
exports.FieldEditorClick = FieldEditorClick;
|
|
65
48
|
//# sourceMappingURL=FieldEditorClick.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldEditorClick.js","sourceRoot":"","sources":["../../../src/main/app-frontend/widgets/FieldEditorClick.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldEditorClick.js","sourceRoot":"","sources":["../../../src/main/app-frontend/widgets/FieldEditorClick.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAA0C;AAC1C,yDAAoD;AACpD,4DAAoD;AAgBpD,MAAa,gBACZ,SAAQ,6BAA2C;IAMnD,YAAY,KAA4B;QACvC,KAAK,CAAC,KAAK,CAAC,CAAC;QAYN,eAAU,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;YACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,CAAC,CAAC;QAEM,cAAS,GAAG,GAAG,EAAE;YACxB,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QAClC,CAAC,CAAC;QAEM,YAAO,GAAG,GAAG,EAAE;YACtB,mB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AAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAChB,CACG,CACN,CAAC;IACH,CAAC;CACD;AA/DD,4CA+DC"}
|
|
@@ -1,71 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.FieldEditorWithButtons = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_this.handleEdit = function () {
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const FieldEditor_1 = require("./FieldEditor");
|
|
6
|
+
const StorageModule_1 = require("../modules/StorageModule");
|
|
7
|
+
const BaseComponent_1 = require("../core/BaseComponent");
|
|
8
|
+
class FieldEditorWithButtons extends BaseComponent_1.BaseComponent {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props);
|
|
11
|
+
this.handleEdit = () => {
|
|
26
12
|
// Save the state's value in case of cancellation.
|
|
27
|
-
|
|
13
|
+
this.setState({ isEditing: true });
|
|
28
14
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
this.handleSave = () => {
|
|
16
|
+
this.props.onAccept(this.state.storageKey.get());
|
|
17
|
+
this.handleCancel();
|
|
32
18
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
this.handleCancel = () => {
|
|
20
|
+
this.state.storageKey.delete();
|
|
21
|
+
this.setState({ isEditing: false });
|
|
36
22
|
};
|
|
37
|
-
|
|
38
|
-
return React.createElement("button", { onClick:
|
|
23
|
+
this.renderEditButton = () => {
|
|
24
|
+
return React.createElement("button", { onClick: this.handleEdit }, "Edit");
|
|
39
25
|
};
|
|
40
|
-
|
|
26
|
+
this.renderControlButtons = () => {
|
|
41
27
|
return React.createElement("div", null,
|
|
42
|
-
React.createElement("button", { onClick:
|
|
43
|
-
React.createElement("button", { onClick:
|
|
28
|
+
React.createElement("button", { onClick: this.handleSave }, "Save"),
|
|
29
|
+
React.createElement("button", { onClick: this.handleCancel }, "Cancel"));
|
|
44
30
|
};
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
const storage = this.createStorageKey();
|
|
32
|
+
this.state = {
|
|
47
33
|
storageKey: storage,
|
|
48
34
|
isEditing: false,
|
|
49
35
|
};
|
|
50
|
-
return _this;
|
|
51
36
|
}
|
|
52
|
-
|
|
53
|
-
return new StorageModule_1.StorageKey(
|
|
54
|
-
}
|
|
55
|
-
|
|
37
|
+
createStorageKey() {
|
|
38
|
+
return new StorageModule_1.StorageKey(`editable-label-controller-${this.props.id}`);
|
|
39
|
+
}
|
|
40
|
+
componentDidUpdate(prevProps, prevState) {
|
|
56
41
|
if (prevProps.id !== this.props.id) {
|
|
57
42
|
this.setState({ storageKey: this.createStorageKey() });
|
|
58
43
|
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return (React.createElement("div", { className:
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const { isEditing } = this.state;
|
|
47
|
+
const { inputStyle, labelStyle } = this.props;
|
|
48
|
+
return (React.createElement("div", { className: `ll_h_c`, style: { justifyContent: "space-between" } },
|
|
64
49
|
React.createElement("div", null,
|
|
65
50
|
React.createElement(FieldEditor_1.FieldEditor, { isEditing: this.state.isEditing, inputStyle: inputStyle, labelStyle: labelStyle, onAccept: this.handleSave, onCancel: this.handleCancel, storageKey: this.state.storageKey, value: this.props.value, placeholder: this.props.placeholder, id: this.props.id })),
|
|
66
51
|
isEditing ? this.renderControlButtons() : this.renderEditButton()));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
}(BaseComponent_1.BaseComponent));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
70
54
|
exports.FieldEditorWithButtons = FieldEditorWithButtons;
|
|
71
55
|
//# sourceMappingURL=FieldEditorWithButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldEditorWithButtons.js","sourceRoot":"","sources":["../../../src/main/app-frontend/widgets/FieldEditorWithButtons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldEditorWithButtons.js","sourceRoot":"","sources":["../../../src/main/app-frontend/widgets/FieldEditorWithButtons.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAA0C;AAC1C,4DAAoD;AACpD,yDAAoD;AAgBpD,MAAa,sBACZ,SAAQ,6BAA2B;IAMnC,YAAY,KAAY;QACvB,KAAK,CAAC,KAAK,CAAC,CAAC;QAcd,eAAU,GAAG,GAAG,EAAE;YACjB,kDAAkD;YAClD,IAAI,CAAC,QAAQ,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QAClC,CAAC,CAAC;QAEF,eAAU,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;YACjD,IAAI,CAAC,YAAY,EAA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,EAAC;YACjE;gBACC,oBAAC,yBAAW,IACX,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAChB,CACG;YACL,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAC7D,CACN,CAAC;IACH,CAAC;CAkBD;AA5ED,wDA4EC"}
|
|
@@ -1,55 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.ClickToDrag = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_this.setState({ isDragging: true });
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const BaseComponent_1 = require("../../core/BaseComponent");
|
|
6
|
+
const OverlayWithDocumentListener_1 = require("./OverlayWithDocumentListener");
|
|
7
|
+
class ClickToDrag extends BaseComponent_1.BaseComponent {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.handleMouseDown = () => {
|
|
11
|
+
this.setState({ isDragging: true });
|
|
26
12
|
};
|
|
27
|
-
|
|
28
|
-
if (!
|
|
13
|
+
this.onMouseMove = (e) => {
|
|
14
|
+
if (!this.state.isDragging)
|
|
29
15
|
return;
|
|
30
|
-
if (
|
|
31
|
-
|
|
16
|
+
if (this.props.onMouseMove)
|
|
17
|
+
this.props.onMouseMove(e);
|
|
32
18
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
|
|
19
|
+
this.onMouseUp = (e) => {
|
|
20
|
+
this.setState({ isDragging: false });
|
|
21
|
+
if (this.props.onMouseUp)
|
|
22
|
+
this.props.onMouseUp(e);
|
|
37
23
|
};
|
|
38
|
-
|
|
39
|
-
return (React.createElement("div", { style: { display: "contents" }, onMouseDown:
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
this.render = () => {
|
|
25
|
+
return (React.createElement("div", { style: { display: "contents" }, onMouseDown: this.handleMouseDown },
|
|
26
|
+
this.props.children,
|
|
27
|
+
this.renderOverlay()));
|
|
42
28
|
};
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
React.createElement(OverlayWithDocumentListener_1.OverlayWithDocumentListener, { documentOnMouseMove:
|
|
29
|
+
this.renderOverlay = () => {
|
|
30
|
+
return this.state.isDragging &&
|
|
31
|
+
React.createElement(OverlayWithDocumentListener_1.OverlayWithDocumentListener, { documentOnMouseMove: this.onMouseMove, documentOnMouseUp: this.onMouseUp, zIndex: this.props.overlayZIndex });
|
|
46
32
|
};
|
|
47
|
-
|
|
33
|
+
this.state = {
|
|
48
34
|
isDragging: false
|
|
49
35
|
};
|
|
50
|
-
return _this;
|
|
51
36
|
}
|
|
52
|
-
|
|
53
|
-
}(BaseComponent_1.BaseComponent));
|
|
37
|
+
}
|
|
54
38
|
exports.ClickToDrag = ClickToDrag;
|
|
55
39
|
//# sourceMappingURL=ClickToDrag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickToDrag.js","sourceRoot":"","sources":["../../../../src/main/app-frontend/widgets/click-to-drag/ClickToDrag.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClickToDrag.js","sourceRoot":"","sources":["../../../../src/main/app-frontend/widgets/click-to-drag/ClickToDrag.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,4DAAuD;AACvD,+EAA0E;AAY1E,MAAa,WACZ,SAAQ,6BAA2B;IAEnC,YAAY,KAAY;QACvB,KAAK,CAAC,KAAK,CAAC,CAAC;QAMd,oBAAe,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,QAAQ,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;QACnC,CAAC,CAAC;QAEF,gBAAW,GAAG,CAAC,CAAa,EAAE,EAAE;YAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU;gBACzB,OAAO;YAER,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW;gBACzB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC;QAEF,cAAS,GAAG,CAAC,CAAa,EAAE,EAAE;YAC7B,IAAI,CAAC,QAAQ,CAAC,EAAC,UAAU,EAAE,KAAK,EAAC,CAAC,CAAC;YACnC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;gBACvB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,CAAC;QAEF,WAAM,GAAG,GAAG,EAAE;YACb,OAAO,CACN,6BACC,KAAK,EAAE,EAAC,OAAO,EAAE,UAAU,EAAC,EAC5B,WAAW,EAAE,IAAI,CAAC,eAAe;gBAChC,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACnB,IAAI,CAAC,aAAa,EAAE,CAChB,CACN,CAAA;QACF,CAAC,CAAC;QAEM,kBAAa,GAAG,GAAG,EAAE;YAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU;gBAC3B,oBAAC,yDAA2B,IAC3B,mBAAmB,EAAE,IAAI,CAAC,WAAW,EACrC,iBAAiB,EAAE,IAAI,CAAC,SAAS,EACjC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAC/B,CAAC;QACL,CAAC,CAAA;QAzCA,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE,KAAK;SACjB,CAAC;IACH,CAAC;CAuCD;AA/CD,kCA+CC"}
|
|
@@ -1,50 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.OverlayWithDocumentListener = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_this.props.documentOnMouseMove(e);
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const BaseComponent_1 = require("../../core/BaseComponent");
|
|
6
|
+
class OverlayWithDocumentListener extends BaseComponent_1.BaseComponent {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.onMouseMove = (e) => {
|
|
10
|
+
if (this.props.documentOnMouseMove) {
|
|
11
|
+
this.props.documentOnMouseMove(e);
|
|
26
12
|
}
|
|
27
13
|
};
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
|
|
14
|
+
this.onMouseUp = (e) => {
|
|
15
|
+
if (this.props.documentOnMouseUp) {
|
|
16
|
+
this.props.documentOnMouseUp(e);
|
|
31
17
|
}
|
|
32
18
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
document.addEventListener('mousemove',
|
|
36
|
-
document.addEventListener('mouseup',
|
|
19
|
+
this.componentDidMount = () => {
|
|
20
|
+
this.logDebug('Mounted');
|
|
21
|
+
document.addEventListener('mousemove', this.onMouseMove, false);
|
|
22
|
+
document.addEventListener('mouseup', this.onMouseUp, false);
|
|
37
23
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
document.removeEventListener('mousemove',
|
|
41
|
-
document.removeEventListener('mouseup',
|
|
24
|
+
this.componentWillUnmount = () => {
|
|
25
|
+
this.logDebug('Unmounted');
|
|
26
|
+
document.removeEventListener('mousemove', this.onMouseMove);
|
|
27
|
+
document.removeEventListener('mouseup', this.onMouseUp);
|
|
42
28
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return _this;
|
|
29
|
+
this.render = () => React.createElement("div", { id: `full-page-overlay-with-listener`, className: 'full_screen', style: { zIndex: this.props.zIndex } });
|
|
30
|
+
this.state = {};
|
|
46
31
|
}
|
|
47
|
-
|
|
48
|
-
}(BaseComponent_1.BaseComponent));
|
|
32
|
+
}
|
|
49
33
|
exports.OverlayWithDocumentListener = OverlayWithDocumentListener;
|
|
50
34
|
//# sourceMappingURL=OverlayWithDocumentListener.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayWithDocumentListener.js","sourceRoot":"","sources":["../../../../src/main/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OverlayWithDocumentListener.js","sourceRoot":"","sources":["../../../../src/main/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,4DAAuD;AASvD,MAAa,2BACZ,SAAQ,6BAA2B;IAEnC,YAAY,KAAY;QACvB,KAAK,CAAC,KAAK,CAAC,CAAC;QAId,gBAAW,GAAG,CAAC,CAAa,EAAE,EAAE;YAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE;gBACnC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;aAClC;QACF,CAAC,CAAC;QAEF,cAAS,GAAG,CAAC,CAAa,EAAE,EAAE;YAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;gBACjC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;aAChC;QACF,CAAC,CAAC;QAEF,sBAAiB,GAAG,GAAG,EAAE;YACxB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACzB,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;YAChE,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC7D,CAAC,CAAC;QAEF,yBAAoB,GAAG,GAAG,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAC3B,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAC5D,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACzD,CAAC,CAAC;QAEF,WAAM,GAAG,GAAG,EAAE,CAAC,6BACd,EAAE,EAAE,iCAAiC,EACrC,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAC,GACjC,CAAC;QA/BF,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;IAChB,CAAC;CA+BD;AArCD,kEAqCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuitionrobotics/thunderstorm",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.72",
|
|
4
4
|
"description": "Thunderstorm",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IR",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"buffer": "^6.0.3",
|
|
37
37
|
"crypto-browserify": "^3.12.0",
|
|
38
38
|
"express": "^4.16.4",
|
|
39
|
-
"firebase": "^9.
|
|
40
|
-
"firebase-admin": "^
|
|
41
|
-
"firebase-functions": "^3.
|
|
39
|
+
"firebase": "^9.9.1",
|
|
40
|
+
"firebase-admin": "^11.0.0",
|
|
41
|
+
"firebase-functions": "^3.22.0",
|
|
42
42
|
"node-fetch": "^2.6.1",
|
|
43
43
|
"react": "^16.0.0",
|
|
44
44
|
"react-dom": "^16.0.0",
|