asab_webui_components 27.3.5 → 27.3.7

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.
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ErrorHandler = ErrorHandler;
7
7
  var _reactI18next = require("react-i18next");
8
+ // TODO: REMOVE/REWRITE THIS COMPONENT AFTER ALL DEPENDENCY ON ERRORHANDLER COMPONENT IS STRIPPED
9
+
8
10
  /*
9
11
  - Component responsible for handling and displaying error messages.
10
12
  - The 'error' prop is an object that contains the error message and any which contains a dictionary with variables, if any, in the error message.
@@ -21,8 +23,9 @@ function ErrorHandler(_ref) {
21
23
  t
22
24
  } = (0, _reactI18next.useTranslation)();
23
25
  if (error.error_dict) {
26
+ // Always escape the values (safety precaution), do not change this!
24
27
  error.error_dict['interpolation'] = {
25
- escapeValue: false
28
+ escapeValue: true
26
29
  };
27
30
  }
28
31
  return t(error.error, error.error_dict);
@@ -463,7 +463,19 @@ var stringifyIPv6 = bigintIP6Address => {
463
463
  }
464
464
 
465
465
  // Join the parts with colons to form the final compressed IPv6 address.
466
- return parts.join(':');
466
+ var result = parts.join(':');
467
+ // All-zero address compresses to a single empty segment ""; canonical form is "::"
468
+ if (result === '') {
469
+ return '::';
470
+ }
471
+ // Boundary compression: empty segment at start/end produces ":1" or "1:" instead of "::1" or "1::"
472
+ if (result.startsWith(':') && !result.startsWith('::')) {
473
+ result = ':' + result;
474
+ }
475
+ if (result.endsWith(':') && !result.endsWith('::')) {
476
+ result = result + ':';
477
+ }
478
+ return result;
467
479
  };
468
480
  var stringifyIPv4 = bigintIP4Address => {
469
481
  var parts = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asab_webui_components",
3
- "version": "27.3.5",
3
+ "version": "27.3.7",
4
4
  "license": "BSD-3-Clause",
5
5
  "description": "TeskaLabs ASAB WebUI Components Library",
6
6
  "contributors": [