asab_webui_shell 27.3.9 → 27.3.10

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.
@@ -75,6 +75,22 @@ class Application extends _react.Component {
75
75
  // The application can provide a list of keys that should be automatically parsed as BigInt, when received from the server in Axios call
76
76
  // This is important to preserve 64bit numbers from the server such as IP addresses, timestamps etc.
77
77
  this.JSONParseBigInt = new Set(props === null || props === void 0 ? void 0 : props.bigint);
78
+
79
+ /*
80
+ Prevent JSON.stringify from throwing on BigInt values (including inside React's
81
+ own dev-mode error handling). BigInt has no native JSON representation so it is
82
+ serialized as a decimal string.
83
+ */
84
+ if (typeof BigInt !== "undefined" && typeof BigInt.prototype.toJSON !== "function") {
85
+ Object.defineProperty(BigInt.prototype, "toJSON", {
86
+ value() {
87
+ return this.toString();
88
+ },
89
+ enumerable: false,
90
+ configurable: true,
91
+ writable: true
92
+ });
93
+ }
78
94
  this._handleKeyUp = this._handleKeyUp.bind(this);
79
95
  // Clear print-ready timeout handler
80
96
  this._clearPrintReadyTimeout = this._clearPrintReadyTimeout.bind(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asab_webui_shell",
3
- "version": "27.3.9",
3
+ "version": "27.3.10",
4
4
  "license": "BSD-3-Clause",
5
5
  "description": "TeskaLabs ASAB WebUI Shell Application",
6
6
  "contributors": [