@cashub/ui 0.26.8 → 0.26.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashub/ui",
3
- "version": "0.26.8",
3
+ "version": "0.26.10",
4
4
  "private": false,
5
5
  "author": "CasHUB Team",
6
6
  "description": "CasHUB UI components library",
@@ -11,7 +11,7 @@
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
13
  "@cashub/hooks": "^0.3.1",
14
- "@cashub/utils": "^0.6.0",
14
+ "@cashub/utils": "^0.5.0",
15
15
  "@googlemaps/markerclusterer": "^2.5.1",
16
16
  "@googlemaps/react-wrapper": "^1.1.35",
17
17
  "@monaco-editor/react": "^4.6.0",
@@ -39,7 +39,8 @@
39
39
  "react-router-dom": "^5.2.0",
40
40
  "react-toastify": "^7.0.4",
41
41
  "react-transition-group": "^4.4.2",
42
- "styled-components": "^5.3.0"
42
+ "styled-components": "^5.3.0",
43
+ "xml-formatter": "^3.6.3"
43
44
  },
44
45
  "peerDependencies": {
45
46
  "react": "^17.0.1",
@@ -193,6 +193,12 @@ const GridTable = _ref => {
193
193
  (0, _react.useEffect)(() => {
194
194
  handleResize();
195
195
  }, [columns, handleResize]);
196
+ (0, _react.useEffect)(() => {
197
+ window.addEventListener('resize', handleResize);
198
+ return () => {
199
+ window.removeEventListener('resize', handleResize);
200
+ };
201
+ }, [handleResize]);
196
202
  (0, _react.useEffect)(() => {
197
203
  if (tableRef.current) {
198
204
  setTableWidth(tableRef.current.offsetWidth);
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("@monaco-editor/react"));
8
- var _utils = require("@cashub/utils");
8
+ var _xmlFormatter = _interopRequireDefault(require("xml-formatter"));
9
9
  var _jsxRuntime = require("react/jsx-runtime");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const XmlEditor = _ref => {
@@ -19,7 +19,9 @@ const XmlEditor = _ref => {
19
19
  height: "150px",
20
20
  theme: "vs-dark",
21
21
  defaultLanguage: "xml",
22
- defaultValue: initialValue ? (0, _utils.xmlFormatter)(initialValue) : '',
22
+ defaultValue: initialValue ? (0, _xmlFormatter.default)(initialValue, {
23
+ indentation: ' '
24
+ }) : '',
23
25
  options: {
24
26
  readOnly: mode === 'view',
25
27
  minimap: {