@dhis2/analytics 24.2.3 → 24.2.5

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [24.2.5](https://github.com/dhis2/analytics/compare/v24.2.4...v24.2.5) (2022-10-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * use styled-jsx instead of css module ([#1352](https://github.com/dhis2/analytics/issues/1352)) ([df8ad6c](https://github.com/dhis2/analytics/commit/df8ad6c78129f9dc4249472912cf5a235c26346c))
7
+
8
+ ## [24.2.4](https://github.com/dhis2/analytics/compare/v24.2.3...v24.2.4) (2022-10-07)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **translations:** sync translations from transifex (master) ([f01855f](https://github.com/dhis2/analytics/commit/f01855fec8d91bbb59af90bbd0ac49b604e2d449))
14
+
1
15
  ## [24.2.3](https://github.com/dhis2/analytics/compare/v24.2.2...v24.2.3) (2022-10-02)
2
16
 
3
17
 
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.OfflineTooltip = void 0;
7
7
 
8
+ var _style = _interopRequireDefault(require("styled-jsx/style"));
9
+
8
10
  var _appRuntime = require("@dhis2/app-runtime");
9
11
 
10
12
  var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
@@ -17,7 +19,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
19
 
18
20
  var _react = _interopRequireDefault(require("react"));
19
21
 
20
- var _OfflineTooltipModule = _interopRequireDefault(require("./styles/OfflineTooltip.module.css"));
22
+ var _OfflineTooltipStyle = require("./styles/OfflineTooltip.style.js");
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
@@ -32,7 +34,7 @@ const OfflineTooltip = _ref => {
32
34
  offline
33
35
  } = (0, _appRuntime.useOnlineStatus)();
34
36
  const notAllowed = disabled || disabledWhenOffline && offline;
35
- return /*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
37
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
36
38
  content: content || _d2I18n.default.t('Not available offline'),
37
39
  openDelay: 200,
38
40
  closeDelay: 100
@@ -43,12 +45,16 @@ const OfflineTooltip = _ref => {
43
45
  ref
44
46
  } = _ref2;
45
47
  return /*#__PURE__*/_react.default.createElement("span", {
46
- className: (0, _classnames.default)(_OfflineTooltipModule.default.span, notAllowed && _OfflineTooltipModule.default.notAllowed),
47
48
  onMouseOver: () => notAllowed && onMouseOver(),
48
49
  onMouseOut: () => notAllowed && onMouseOut(),
49
- ref: ref
50
+ ref: ref,
51
+ className: "jsx-".concat(_OfflineTooltipStyle.styles.__hash) + " " + ((0, _classnames.default)('tooltip', {
52
+ notAllowed
53
+ }) || "")
50
54
  }, children);
51
- });
55
+ }), /*#__PURE__*/_react.default.createElement(_style.default, {
56
+ id: _OfflineTooltipStyle.styles.__hash
57
+ }, _OfflineTooltipStyle.styles));
52
58
  };
53
59
 
54
60
  exports.OfflineTooltip = OfflineTooltip;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.styles = void 0;
7
+ const styles = [".tooltip.jsx-3661110597{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;pointer-events:all;}", ".tooltip.jsx-3661110597>button:disabled{pointer-events:none;}", ".notAllowed.jsx-3661110597{cursor:not-allowed;}"];
8
+ exports.styles = styles;
9
+ styles.__hash = "3661110597";
@@ -5,7 +5,7 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "No description": "Немає змалювання",
8
+ "No description": "Немає опису",
9
9
  "Last updated {{time}}": "",
10
10
  "Created {{time}} by {{author}}": "",
11
11
  "Created {{time}}": "",
@@ -1,10 +1,11 @@
1
+ import _JSXStyle from "styled-jsx/style";
1
2
  import { useOnlineStatus } from '@dhis2/app-runtime';
2
3
  import i18n from '@dhis2/d2-i18n';
3
4
  import { Tooltip } from '@dhis2/ui';
4
5
  import cx from 'classnames';
5
6
  import PropTypes from 'prop-types';
6
7
  import React from 'react';
7
- import classes from './styles/OfflineTooltip.module.css';
8
+ import { styles } from './styles/OfflineTooltip.style.js';
8
9
 
9
10
  const OfflineTooltip = _ref => {
10
11
  let {
@@ -17,7 +18,7 @@ const OfflineTooltip = _ref => {
17
18
  offline
18
19
  } = useOnlineStatus();
19
20
  const notAllowed = disabled || disabledWhenOffline && offline;
20
- return /*#__PURE__*/React.createElement(Tooltip, {
21
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
21
22
  content: content || i18n.t('Not available offline'),
22
23
  openDelay: 200,
23
24
  closeDelay: 100
@@ -28,12 +29,16 @@ const OfflineTooltip = _ref => {
28
29
  ref
29
30
  } = _ref2;
30
31
  return /*#__PURE__*/React.createElement("span", {
31
- className: cx(classes.span, notAllowed && classes.notAllowed),
32
32
  onMouseOver: () => notAllowed && onMouseOver(),
33
33
  onMouseOut: () => notAllowed && onMouseOut(),
34
- ref: ref
34
+ ref: ref,
35
+ className: "jsx-".concat(styles.__hash) + " " + (cx('tooltip', {
36
+ notAllowed
37
+ }) || "")
35
38
  }, children);
36
- });
39
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
40
+ id: styles.__hash
41
+ }, styles));
37
42
  };
38
43
 
39
44
  OfflineTooltip.propTypes = {
@@ -0,0 +1,2 @@
1
+ export const styles = [".tooltip.jsx-3661110597{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;pointer-events:all;}", ".tooltip.jsx-3661110597>button:disabled{pointer-events:none;}", ".notAllowed.jsx-3661110597{cursor:not-allowed;}"];
2
+ styles.__hash = "3661110597";
@@ -5,7 +5,7 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "No description": "Немає змалювання",
8
+ "No description": "Немає опису",
9
9
  "Last updated {{time}}": "",
10
10
  "Created {{time}} by {{author}}": "",
11
11
  "Created {{time}}": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.2.3",
3
+ "version": "24.2.5",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {
@@ -1,11 +0,0 @@
1
- .span {
2
- display: inline-flex;
3
- pointer-events: all;
4
- }
5
- .span > :global(button:disabled) {
6
- pointer-events: none;
7
- }
8
-
9
- .notAllowed {
10
- cursor: not-allowed;
11
- }
@@ -1,11 +0,0 @@
1
- .span {
2
- display: inline-flex;
3
- pointer-events: all;
4
- }
5
- .span > :global(button:disabled) {
6
- pointer-events: none;
7
- }
8
-
9
- .notAllowed {
10
- cursor: not-allowed;
11
- }