@dhis2/analytics 26.12.2 → 26.12.3

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.WithMenu = exports.SelectedDimension = exports.RecommendedDimension = exports.LockedDimension = exports.FixedDimensionsOnly = exports.FixedAndDynamicDimensions = exports.DynamicDimensionsOnly = exports.DisabledDimension = void 0;
6
+ exports.default = exports.WithMenu = exports.TextWrapping = exports.SelectedDimension = exports.RecommendedDimension = exports.LockedDimension = exports.FixedDimensionsOnly = exports.FixedAndDynamicDimensions = exports.DynamicDimensionsOnly = exports.DisabledDimension = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _DimensionsPanel = _interopRequireDefault(require("../components/DimensionsPanel/DimensionsPanel.js"));
9
9
  var _predefinedDimensions = require("../modules/predefinedDimensions.js");
@@ -20,13 +20,16 @@ const fixedDimensions = [{
20
20
  }];
21
21
  const dynamicDimensions = [{
22
22
  id: '0000001',
23
- name: 'One'
23
+ name: 'Dietary diversity score based on variety of consumed food groups over a weekly period'
24
24
  }, {
25
25
  id: '0000002',
26
- name: 'Two'
26
+ name: 'Healthcare services access and utilization frequency including preventive check-ups and specialist care'
27
27
  }, {
28
28
  id: '0000003',
29
- name: 'Three'
29
+ name: 'Sleep quality index incorporating duration, time to sleep, frequency of awakenings, and restfulness'
30
+ }, {
31
+ id: '0000004',
32
+ name: 'Malaria incidence rate'
30
33
  }];
31
34
  const onDimensionClick = () => alert('click');
32
35
  var _default = exports.default = {
@@ -120,4 +123,26 @@ const WithMenu = () => {
120
123
  exports.WithMenu = WithMenu;
121
124
  WithMenu.story = {
122
125
  name: 'with menu'
126
+ };
127
+ const TextWrapping = () => {
128
+ return /*#__PURE__*/_react.default.createElement("div", {
129
+ style: {
130
+ width: '260px',
131
+ height: '400px',
132
+ borderInlineEnd: '1px dotted #CCC',
133
+ resize: 'both',
134
+ overflow: 'auto'
135
+ }
136
+ }, /*#__PURE__*/_react.default.createElement(_DimensionsPanel.default, {
137
+ dimensions: [...fixedDimensions, ...dynamicDimensions],
138
+ onDimensionClick: onDimensionClick,
139
+ onDimensionOptionsClick: () => alert('options click'),
140
+ recommendedDimension: dimension => dimension === '0000002',
141
+ lockedDimension: dimension => dimension === '0000003',
142
+ selectedIds: ['0000003', '0000002']
143
+ }));
144
+ };
145
+ exports.TextWrapping = TextWrapping;
146
+ TextWrapping.story = {
147
+ name: 'text wrapping'
123
148
  };
@@ -15,10 +15,10 @@ const OptionsButton = _ref => {
15
15
  } = _ref;
16
16
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
17
17
  onClick: onClick,
18
- className: "jsx-2728765288"
18
+ className: "jsx-2074438274"
19
19
  }, /*#__PURE__*/_react.default.createElement(_ui.IconMore16, null)), /*#__PURE__*/_react.default.createElement(_style.default, {
20
- id: "2728765288"
21
- }, ["button.jsx-2728765288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:20px;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2728765288:hover{background-color:rgba(0,0,0,0.09);}"]));
20
+ id: "2074438274"
21
+ }, ["button.jsx-2074438274{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2074438274:hover{background-color:rgba(33,41,52,0.08);}", "button.jsx-2074438274:active{background-color:rgba(33,41,52,0.13);}"]));
22
22
  };
23
23
  OptionsButton.propTypes = {
24
24
  onClick: _propTypes.default.func
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _ui = require("@dhis2/ui");
8
- const _defaultExport = [`.item.jsx-1684920521{color:${_ui.colors.grey900};background-color:transparent;fill:${_ui.colors.grey800};display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;outline:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:0 0 0 4px;margin:0;border-radius:2px;cursor:pointer;min-height:22px;border:1px solid transparent;}`, `.item.jsx-1684920521:not(.deactivated):not(.dragging):hover{background-color:${_ui.colors.grey100};border-color:${_ui.colors.grey400};}`, ".label.jsx-1684920521{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".labelWrapper.jsx-1684920521{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".labelText.jsx-1684920521{font-size:13px;line-height:15px;margin-top:1px;}", ".iconWrapper.jsx-1684920521{width:16px;height:16px;margin:2px 4px 0 0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}", ".item.deactivated.jsx-1684920521{opacity:0.5;cursor:not-allowed;}", `.item.selected.jsx-1684920521{background-color:${_ui.colors.teal100};border:1px solid ${_ui.colors.teal200};color:${_ui.colors.teal900};fill:${_ui.colors.teal800};font-weight:400;}`, ".item.selected.jsx-1684920521:not(.deactivated):hover{background:#cdeae8;border-color:#93c4bf;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);}", ".optionsWrapper.jsx-1684920521{width:20px;height:20px;}", `.lockWrapper.jsx-1684920521 svg.jsx-1684920521 path.jsx-1684920521{fill:${_ui.colors.grey800};}`, `.lockWrapper.jsx-1684920521{background:${_ui.colors.grey300};height:20px;padding:0 2px 0 3px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}`, ".item.selected.jsx-1684920521 .lockWrapper.jsx-1684920521{background:#cbe7e5;}", `.item.selected.jsx-1684920521 .lockWrapper.jsx-1684920521 svg.jsx-1684920521 path.jsx-1684920521{fill:${_ui.colors.teal900};}`];
9
- _defaultExport.__hash = "1684920521";
8
+ const _defaultExport = [`.item.jsx-3350116288{color:${_ui.colors.grey900};background-color:transparent;fill:${_ui.colors.grey800};display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:4px;outline:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:0 0 0 4px;margin:0;border-radius:2px;cursor:pointer;min-height:22px;border:1px solid transparent;}`, `.item.jsx-3350116288:not(.deactivated):not(.dragging):hover{background-color:${_ui.colors.grey100};border-color:${_ui.colors.grey400};}`, ".label.jsx-3350116288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".labelWrapper.jsx-3350116288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:2px 0;}", ".labelText.jsx-3350116288{font-size:13px;line-height:15px;margin-top:1px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}", ".iconWrapper.jsx-3350116288{width:16px;height:16px;margin:2px 4px 0 0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}", ".item.deactivated.jsx-3350116288{opacity:0.5;cursor:not-allowed;}", `.item.selected.jsx-3350116288{background-color:${_ui.colors.teal100};border:1px solid ${_ui.colors.teal200};color:${_ui.colors.teal900};fill:${_ui.colors.teal800};font-weight:400;}`, ".item.selected.jsx-3350116288:not(.deactivated):hover{background:#cdeae8;border-color:#93c4bf;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);}", ".optionsWrapper.jsx-3350116288{width:20px;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;}", `.lockWrapper.jsx-3350116288 svg.jsx-3350116288 path.jsx-3350116288{fill:${_ui.colors.grey800};}`, `.lockWrapper.jsx-3350116288{background:${_ui.colors.grey300};-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding:0 2px 0 3px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}`, ".item.selected.jsx-3350116288 .lockWrapper.jsx-3350116288{background:#cbe7e5;}", `.item.selected.jsx-3350116288 .lockWrapper.jsx-3350116288 svg.jsx-3350116288 path.jsx-3350116288{fill:${_ui.colors.teal900};}`];
9
+ _defaultExport.__hash = "3350116288";
10
10
  var _default = exports.default = _defaultExport;
@@ -13,13 +13,16 @@ const fixedDimensions = [{
13
13
  }];
14
14
  const dynamicDimensions = [{
15
15
  id: '0000001',
16
- name: 'One'
16
+ name: 'Dietary diversity score based on variety of consumed food groups over a weekly period'
17
17
  }, {
18
18
  id: '0000002',
19
- name: 'Two'
19
+ name: 'Healthcare services access and utilization frequency including preventive check-ups and specialist care'
20
20
  }, {
21
21
  id: '0000003',
22
- name: 'Three'
22
+ name: 'Sleep quality index incorporating duration, time to sleep, frequency of awakenings, and restfulness'
23
+ }, {
24
+ id: '0000004',
25
+ name: 'Malaria incidence rate'
23
26
  }];
24
27
  const onDimensionClick = () => alert('click');
25
28
  export default {
@@ -105,4 +108,25 @@ export const WithMenu = () => {
105
108
  };
106
109
  WithMenu.story = {
107
110
  name: 'with menu'
111
+ };
112
+ export const TextWrapping = () => {
113
+ return /*#__PURE__*/React.createElement("div", {
114
+ style: {
115
+ width: '260px',
116
+ height: '400px',
117
+ borderInlineEnd: '1px dotted #CCC',
118
+ resize: 'both',
119
+ overflow: 'auto'
120
+ }
121
+ }, /*#__PURE__*/React.createElement(DimensionsPanel, {
122
+ dimensions: [...fixedDimensions, ...dynamicDimensions],
123
+ onDimensionClick: onDimensionClick,
124
+ onDimensionOptionsClick: () => alert('options click'),
125
+ recommendedDimension: dimension => dimension === '0000002',
126
+ lockedDimension: dimension => dimension === '0000003',
127
+ selectedIds: ['0000003', '0000002']
128
+ }));
129
+ };
130
+ TextWrapping.story = {
131
+ name: 'text wrapping'
108
132
  };
@@ -8,10 +8,10 @@ const OptionsButton = _ref => {
8
8
  } = _ref;
9
9
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
10
10
  onClick: onClick,
11
- className: "jsx-2728765288"
11
+ className: "jsx-2074438274"
12
12
  }, /*#__PURE__*/React.createElement(IconMore16, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
13
- id: "2728765288"
14
- }, ["button.jsx-2728765288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:20px;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2728765288:hover{background-color:rgba(0,0,0,0.09);}"]));
13
+ id: "2074438274"
14
+ }, ["button.jsx-2074438274{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2074438274:hover{background-color:rgba(33,41,52,0.08);}", "button.jsx-2074438274:active{background-color:rgba(33,41,52,0.13);}"]));
15
15
  };
16
16
  OptionsButton.propTypes = {
17
17
  onClick: PropTypes.func
@@ -1,4 +1,4 @@
1
1
  import { colors } from '@dhis2/ui';
2
- const _defaultExport = [`.item.jsx-1684920521{color:${colors.grey900};background-color:transparent;fill:${colors.grey800};display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;outline:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:0 0 0 4px;margin:0;border-radius:2px;cursor:pointer;min-height:22px;border:1px solid transparent;}`, `.item.jsx-1684920521:not(.deactivated):not(.dragging):hover{background-color:${colors.grey100};border-color:${colors.grey400};}`, ".label.jsx-1684920521{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".labelWrapper.jsx-1684920521{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".labelText.jsx-1684920521{font-size:13px;line-height:15px;margin-top:1px;}", ".iconWrapper.jsx-1684920521{width:16px;height:16px;margin:2px 4px 0 0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}", ".item.deactivated.jsx-1684920521{opacity:0.5;cursor:not-allowed;}", `.item.selected.jsx-1684920521{background-color:${colors.teal100};border:1px solid ${colors.teal200};color:${colors.teal900};fill:${colors.teal800};font-weight:400;}`, ".item.selected.jsx-1684920521:not(.deactivated):hover{background:#cdeae8;border-color:#93c4bf;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);}", ".optionsWrapper.jsx-1684920521{width:20px;height:20px;}", `.lockWrapper.jsx-1684920521 svg.jsx-1684920521 path.jsx-1684920521{fill:${colors.grey800};}`, `.lockWrapper.jsx-1684920521{background:${colors.grey300};height:20px;padding:0 2px 0 3px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}`, ".item.selected.jsx-1684920521 .lockWrapper.jsx-1684920521{background:#cbe7e5;}", `.item.selected.jsx-1684920521 .lockWrapper.jsx-1684920521 svg.jsx-1684920521 path.jsx-1684920521{fill:${colors.teal900};}`];
3
- _defaultExport.__hash = "1684920521";
2
+ const _defaultExport = [`.item.jsx-3350116288{color:${colors.grey900};background-color:transparent;fill:${colors.grey800};display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:4px;outline:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:0 0 0 4px;margin:0;border-radius:2px;cursor:pointer;min-height:22px;border:1px solid transparent;}`, `.item.jsx-3350116288:not(.deactivated):not(.dragging):hover{background-color:${colors.grey100};border-color:${colors.grey400};}`, ".label.jsx-3350116288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".labelWrapper.jsx-3350116288{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:2px 0;}", ".labelText.jsx-3350116288{font-size:13px;line-height:15px;margin-top:1px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}", ".iconWrapper.jsx-3350116288{width:16px;height:16px;margin:2px 4px 0 0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}", ".item.deactivated.jsx-3350116288{opacity:0.5;cursor:not-allowed;}", `.item.selected.jsx-3350116288{background-color:${colors.teal100};border:1px solid ${colors.teal200};color:${colors.teal900};fill:${colors.teal800};font-weight:400;}`, ".item.selected.jsx-3350116288:not(.deactivated):hover{background:#cdeae8;border-color:#93c4bf;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);}", ".optionsWrapper.jsx-3350116288{width:20px;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;}", `.lockWrapper.jsx-3350116288 svg.jsx-3350116288 path.jsx-3350116288{fill:${colors.grey800};}`, `.lockWrapper.jsx-3350116288{background:${colors.grey300};-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding:0 2px 0 3px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}`, ".item.selected.jsx-3350116288 .lockWrapper.jsx-3350116288{background:#cbe7e5;}", `.item.selected.jsx-3350116288 .lockWrapper.jsx-3350116288 svg.jsx-3350116288 path.jsx-3350116288{fill:${colors.teal900};}`];
3
+ _defaultExport.__hash = "3350116288";
4
4
  export default _defaultExport;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "26.12.2",
3
+ "version": "26.12.3",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {